notebook 7.3.0b2__py3-none-any.whl → 7.3.0rc0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of notebook might be problematic. Click here for more details.
- notebook/_version.py +1 -1
- notebook/static/{1650.1bd28ce67416c8f16b0a.js → 1650.87effa8120f5c75793d2.js} +4 -4
- notebook/static/{1650.1bd28ce67416c8f16b0a.js.map → 1650.87effa8120f5c75793d2.js.map} +1 -1
- notebook/static/{1684.559efe17ab89dde47ae7.js → 1684.fa69e1c4e38197db875c.js} +5 -5
- notebook/static/{1684.559efe17ab89dde47ae7.js.map → 1684.fa69e1c4e38197db875c.js.map} +1 -1
- notebook/static/{5018.ee5d379ed404ab1c5431.js → 1960.7d12087e25eb6449e7ce.js} +2 -2
- notebook/static/{5018.ee5d379ed404ab1c5431.js.map → 1960.7d12087e25eb6449e7ce.js.map} +1 -1
- notebook/static/{2065.e9b5d8d0a8bec3304454.js → 2065.4b2bfec98774b3165d4a.js} +3 -3
- notebook/static/{2065.e9b5d8d0a8bec3304454.js.map → 2065.4b2bfec98774b3165d4a.js.map} +1 -1
- notebook/static/{7636.1c12a1c4f50368561c79.js → 2692.aa472750b0685d9dc0b2.js} +2 -2
- notebook/static/{7636.1c12a1c4f50368561c79.js.map → 2692.aa472750b0685d9dc0b2.js.map} +1 -1
- notebook/static/{2913.274b19d8f201991f4a69.js → 2913.40af140ee433938c1393.js} +3 -3
- notebook/static/{2913.274b19d8f201991f4a69.js.map → 2913.40af140ee433938c1393.js.map} +1 -1
- notebook/static/{3146.6c0713ef79dfaa20bfb1.js → 3146.d9be433c38447539b2ae.js} +3 -3
- notebook/static/{3146.6c0713ef79dfaa20bfb1.js.map → 3146.d9be433c38447539b2ae.js.map} +1 -1
- notebook/static/{3768.aff185a034d18009623a.js → 3768.5acd3111e6f1975cfe03.js} +19 -19
- notebook/static/{7302.21256befc2511fe4d32f.js.map → 3768.5acd3111e6f1975cfe03.js.map} +1 -1
- notebook/static/{4382.8e6c28124e4454aef279.js → 4382.4fc6da1dc03e651b486a.js} +3 -3
- notebook/static/{4382.8e6c28124e4454aef279.js.map → 4382.4fc6da1dc03e651b486a.js.map} +1 -1
- notebook/static/{4630.7e63eb06a239c9d5284e.js → 4630.64ab2753f3286b5a778b.js} +2 -2
- notebook/static/{4630.7e63eb06a239c9d5284e.js.map → 4630.64ab2753f3286b5a778b.js.map} +1 -1
- notebook/static/{4645.a7f11a7ccd983d2b97d3.js → 4645.0e67c6d0dceea70ea632.js} +5 -5
- notebook/static/{4645.a7f11a7ccd983d2b97d3.js.map → 4645.0e67c6d0dceea70ea632.js.map} +1 -1
- notebook/static/{4837.f5f3df5f5cff466be27b.js → 4837.83ca0f4b34bedf9ca04b.js} +3 -3
- notebook/static/{4837.f5f3df5f5cff466be27b.js.map → 4837.83ca0f4b34bedf9ca04b.js.map} +1 -1
- notebook/static/{4864.64c377dd0f7d413c6094.js → 4864.c22882a8feba283c53ca.js} +4 -4
- notebook/static/{4864.64c377dd0f7d413c6094.js.map → 4864.c22882a8feba283c53ca.js.map} +1 -1
- notebook/static/{5135.5fea9ea2df659f5eb5ae.js → 5135.fec9e8f8d4a46cb05da6.js} +11 -11
- notebook/static/{5135.5fea9ea2df659f5eb5ae.js.map → 5135.fec9e8f8d4a46cb05da6.js.map} +1 -1
- notebook/static/{5573.480c617153be4745c1ce.js → 5573.6ac07c855f945dc1f930.js} +17 -17
- notebook/static/{5573.480c617153be4745c1ce.js.map → 5573.6ac07c855f945dc1f930.js.map} +1 -1
- notebook/static/{5601.718852b05fe43a575c45.js → 5601.4c763101de025f83f28e.js} +5 -5
- notebook/static/{5601.718852b05fe43a575c45.js.map → 5601.4c763101de025f83f28e.js.map} +1 -1
- notebook/static/{6345.007af86b68aa28034080.js → 6345.06c2149842cd8d1881c9.js} +5 -5
- notebook/static/{6345.007af86b68aa28034080.js.map → 6345.06c2149842cd8d1881c9.js.map} +1 -1
- notebook/static/{7302.21256befc2511fe4d32f.js → 7302.7dea224d66b845d1aba3.js} +19 -19
- notebook/static/{3768.aff185a034d18009623a.js.map → 7302.7dea224d66b845d1aba3.js.map} +1 -1
- notebook/static/{7906.cee077e7e80731ddf8a7.js → 7906.386fb917c7a78bd6575a.js} +3 -3
- notebook/static/{7906.cee077e7e80731ddf8a7.js.map → 7906.386fb917c7a78bd6575a.js.map} +1 -1
- notebook/static/{8579.64e229a3c2210a14fcf7.js → 8579.672ef05f50ec1a639499.js} +13 -13
- notebook/static/{8579.64e229a3c2210a14fcf7.js.map → 8579.672ef05f50ec1a639499.js.map} +1 -1
- notebook/static/{8635.76a56708236264507087.js → 8635.4c8189485e3c65e7ecc0.js} +4 -4
- notebook/static/{8635.76a56708236264507087.js.map → 8635.4c8189485e3c65e7ecc0.js.map} +1 -1
- notebook/static/{8781.9e8a12a243dae2c0f2d4.js → 8781.559293b7acc5c9a6c85c.js} +57 -57
- notebook/static/{8781.9e8a12a243dae2c0f2d4.js.map → 8781.559293b7acc5c9a6c85c.js.map} +1 -1
- notebook/static/{8875.648b97219ad96ef9ba4c.js → 8875.3576877a040347035e62.js} +4 -4
- notebook/static/{8875.648b97219ad96ef9ba4c.js.map → 8875.3576877a040347035e62.js.map} +1 -1
- notebook/static/{9068.bf907c642d9541e6894b.js → 9068.97733adfadd485aa7cd7.js} +3 -3
- notebook/static/{9068.bf907c642d9541e6894b.js.map → 9068.97733adfadd485aa7cd7.js.map} +1 -1
- notebook/static/{9380.71f02ce91dd216d66b15.js → 9380.dbb97caa9c457da5267e.js} +5 -5
- notebook/static/{9380.71f02ce91dd216d66b15.js.map → 9380.dbb97caa9c457da5267e.js.map} +1 -1
- notebook/static/main.ffe733f3a4b0a84e244f.js +1164 -0
- notebook/static/main.ffe733f3a4b0a84e244f.js.map +1 -0
- notebook/static/{notebook_core.d9335e513324cb89fdda.js → notebook_core.8f3a44cab16bab9bd8f4.js} +1072 -907
- notebook/static/{notebook_core.d9335e513324cb89fdda.js.map → notebook_core.8f3a44cab16bab9bd8f4.js.map} +1 -1
- notebook/static/third-party-licenses.json +101 -101
- notebook/templates/consoles.html +1 -1
- notebook/templates/edit.html +1 -1
- notebook/templates/error.html +1 -1
- notebook/templates/notebooks.html +1 -1
- notebook/templates/terminals.html +1 -1
- notebook/templates/tree.html +1 -1
- {notebook-7.3.0b2.data → notebook-7.3.0rc0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/package.json.orig +14 -14
- {notebook-7.3.0b2.data → notebook-7.3.0rc0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/documentsearch-extension/package.json.orig +4 -4
- {notebook-7.3.0b2.data → notebook-7.3.0rc0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/package.json.orig +6 -6
- {notebook-7.3.0b2.data → notebook-7.3.0rc0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/package.json.orig +9 -9
- {notebook-7.3.0b2.data → notebook-7.3.0rc0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/package.json.orig +15 -15
- {notebook-7.3.0b2.data → notebook-7.3.0rc0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/package.json +11 -11
- {notebook-7.3.0b2.data → notebook-7.3.0rc0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/package.json.orig +10 -10
- notebook-7.3.0rc0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/454.a8fd180a103fb540edd4.js +1 -0
- notebook-7.3.0b2.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.6775a82fd4797c8a757e.js → notebook-7.3.0rc0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.6540c9fb9260de5622ef.js +1 -1
- notebook-7.3.0b2.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.628090148fd2c1d8e659.js → notebook-7.3.0rc0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.e5e6d72d43bb1376115c.js +1 -1
- notebook-7.3.0rc0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.a440964232a20ad16779.js +1 -0
- {notebook-7.3.0b2.data → notebook-7.3.0rc0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/third-party-licenses.json +2 -2
- {notebook-7.3.0b2.dist-info → notebook-7.3.0rc0.dist-info}/METADATA +2 -3
- {notebook-7.3.0b2.dist-info → notebook-7.3.0rc0.dist-info}/RECORD +100 -100
- {notebook-7.3.0b2.dist-info → notebook-7.3.0rc0.dist-info}/WHEEL +1 -1
- notebook/static/main.dcc101ae087bd679a592.js +0 -1164
- notebook/static/main.dcc101ae087bd679a592.js.map +0 -1
- notebook-7.3.0b2.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/29.a4a23d51c410a7dd82e6.js +0 -1
- notebook-7.3.0b2.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.d4c6147036cdc583f6e3.js +0 -1
- {notebook-7.3.0b2.data → notebook-7.3.0rc0.data}/data/etc/jupyter/jupyter_server_config.d/notebook.json +0 -0
- {notebook-7.3.0b2.data → notebook-7.3.0rc0.data}/data/share/applications/jupyter-notebook.desktop +0 -0
- {notebook-7.3.0b2.data → notebook-7.3.0rc0.data}/data/share/icons/hicolor/scalable/apps/notebook.svg +0 -0
- {notebook-7.3.0b2.data → notebook-7.3.0rc0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/menus.json +0 -0
- {notebook-7.3.0b2.data → notebook-7.3.0rc0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/pages.json +0 -0
- {notebook-7.3.0b2.data → notebook-7.3.0rc0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/shell.json +0 -0
- {notebook-7.3.0b2.data → notebook-7.3.0rc0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/title.json +0 -0
- {notebook-7.3.0b2.data → notebook-7.3.0rc0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/top.json +0 -0
- {notebook-7.3.0b2.data → notebook-7.3.0rc0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/zen.json +0 -0
- {notebook-7.3.0b2.data → notebook-7.3.0rc0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/open.json +0 -0
- {notebook-7.3.0b2.data → notebook-7.3.0rc0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/checkpoints.json +0 -0
- {notebook-7.3.0b2.data → notebook-7.3.0rc0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/edit-notebook-metadata.json +0 -0
- {notebook-7.3.0b2.data → notebook-7.3.0rc0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/full-width-notebook.json +0 -0
- {notebook-7.3.0b2.data → notebook-7.3.0rc0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/kernel-logo.json +0 -0
- {notebook-7.3.0b2.data → notebook-7.3.0rc0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/scroll-output.json +0 -0
- {notebook-7.3.0b2.data → notebook-7.3.0rc0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/file-actions.json +0 -0
- {notebook-7.3.0b2.data → notebook-7.3.0rc0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/widget.json +0 -0
- {notebook-7.3.0b2.data → notebook-7.3.0rc0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/interface-switcher.json +0 -0
- {notebook-7.3.0b2.data → notebook-7.3.0rc0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/launch-tree.json +0 -0
- {notebook-7.3.0b2.data → notebook-7.3.0rc0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/93.eae3497dd223d842d198.js +0 -0
- {notebook-7.3.0b2.data → notebook-7.3.0rc0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/style.js +0 -0
- {notebook-7.3.0b2.dist-info → notebook-7.3.0rc0.dist-info}/entry_points.txt +0 -0
- {notebook-7.3.0b2.dist-info → notebook-7.3.0rc0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"8635.76a56708236264507087.js?v=76a56708236264507087","mappings":";;;;;;;;;;;;AAAmD;;AAE5C;AACP,EAAE,gDAAS;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,GAAG;AACH;;AAEO;AACP,EAAE,sDAAe;AACjB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;ACjC6E;AAChB;AAC7D;AACO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA,4BAA4B,wEAAW;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+EAAQ;AAChC;AACA,iCAAiC,wFAAsB;AACvD;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrDyC;AAClC;AACP,WAAW,0DAAS;AACpB;AACA;AACA,mDAAmD,oDAAoD;AACvG;AACA;AACA;AACO;AACP;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACPoG;AAC1D;AACA;AACA;AACO;AACL;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,gBAAgB,qCAAQ;AACxB;AACA;AACA;AACA;AACA,WAAW,qCAAQ,KAAK,yBAAQ;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,eAAe,gCAAW;AAC1B;AACA;AACA;AACA;AACO;AACP;AACA,eAAe,gCAAK;AACpB;AACA,WAAW,gCAAK;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,eAAe,gCAAW;AAC1B;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,wCAAwC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7Q4I;AAClG;AACA;AACA;AACA;AACO;AACP;AACsB;AAChE;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gCAAW,CAAC,+BAAI,6BAA6B,+BAAI,6BAA6B,+BAAI,6BAA6B,+BAAI;AAClI;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAQ,CAAC,8CAAmB,6BAA6B,+BAAI,6BAA6B,+BAAI;AAC7G;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAQ,CAAC,8CAAmB,6BAA6B,+BAAI,6BAA6B,+BAAI;AAC7G;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAQ,CAAC,+BAAI,6BAA6B,+BAAI,6BAA6B,+BAAI;AAC9F;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAQ,CAAC,+BAAI,6BAA6B,+BAAI,6BAA6B,+BAAI;AAC9F;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAQ,CAAC,+BAAI,6BAA6B,+BAAI,6BAA6B,8CAAmB;AAC7G;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0DAA0D;AAC3D;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,qCAAQ,0BAA0B,qCAAQ,QAAQ,qCAAQ;AAC7E;AACA,mBAAmB,qCAAQ,0BAA0B,qCAAQ,QAAQ,qCAAQ;AAC7E;AACA,mBAAmB,qCAAQ,0BAA0B,qCAAQ,QAAQ,qCAAQ;AAC7E;AACA,mBAAmB,qCAAQ,0BAA0B,qCAAQ,QAAQ,qCAAQ;AAC7E;AACA,mBAAmB,qCAAQ,0BAA0B,qCAAQ,QAAQ,qCAAQ;AAC7E;AACA;AACA;AACA;;;ACpIsD;AACuC;AAC7F;AACA;AACA;AACA;AACO,MAAM,sBAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mBAAmB;AAC3C;AACA;AACA,6BAA6B;AAC7B;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,sBAAU;AAC7B;AACA,2CAA2C,uBAAuB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,qDAAqD,uBAAuB;AAC5E;AACA;AACA;AACA;AACA,uBAAuB,sBAAU;AACjC,kBAAkB,kEAAkE;AACpF;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,sBAAU;AACjC,kBAAkB,wDAAwD;AAC1E,kBAAkB,wDAAwD;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,wBAAwB,2BAA2B;AACnD;AACA;AACA;AACA;AACA;AACA,mBAAmB,sBAAU;AAC7B;AACA,8EAA8E,uBAAuB;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,0CAAa;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,0CAAa;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;AACA,mBAAmB,sBAAU;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;;;;AC/KkF;AACjC;AAC4C;AAC5C;AACH;AACM;AACpD;AACA;AACA;AACA;AACO;AACP;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,qCAAQ;AACrC,8BAA8B,sBAAU;AACxC,cAAc,iDAAiD;AAC/D,cAAc,6CAA6C;AAC3D,cAAc,gDAAgD;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,cAAc;AAC1C,2BAA2B,cAAc;AACzC;AACA;AACA,6BAA6B,aAAa;AAC1C,4BAA4B,uBAAuB;AACnD;AACA;AACA,6BAA6B,aAAa;AAC1C,2BAA2B,uBAAuB;AAClD;AACA;AACA,4BAA4B,YAAY;AACxC,4BAA4B,uBAAuB;AACnD;AACA;AACA,4BAA4B,YAAY;AACxC,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA,2BAA2B,sBAAU;AACrC,sBAAsB,2CAA2C;AACjE,sBAAsB,0CAA0C;AAChE;AACA;AACA;AACA,2BAA2B,sBAAU;AACrC,sBAAsB,2CAA2C;AACjE,sBAAsB,2CAA2C;AACjE;AACA;AACA,uBAAuB,sBAAU;AACjC,kBAAkB,2CAA2C;AAC7D;AACA;AACA;AACA,iBAAiB;AACjB,kBAAkB,0CAA0C;AAC5D;AACA;AACA,mBAAmB,sBAAU;AAC7B,cAAc,2CAA2C;AACzD,cAAc,6CAA6C;AAC3D,cAAc,0CAA0C;AACxD;AACA;AACA;AACA;AACA,eAAe,2CAAgB;AAC/B;AACA,uBAAuB,uBAAuB;AAC9C,yBAAyB,gCAAW;AACpC,wBAAwB,gCAAW;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAAgB;AAC/B;AACA,uBAAuB,uBAAuB;AAC9C,yBAAyB,gCAAW;AACpC,wBAAwB,gCAAW;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,qEAAqE,sBAAsB,oBAAoB;AAC/G;AACA,0DAA0D,kBAAkB,yFAAyF;AACrK;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,kBAAkB;AAC1C;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,kBAAkB;AAC1C,yBAAyB;AACzB;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,aAAa;AACb;;;AC5RiD;AACC;AAC+B;AACnC;AACJ;AACyB;AACf;AACpD;AACA;AACA;AACA;AACO;AACP;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gCAAW;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,YAAY,+BAA+B,EAAE,YAAY,4BAA4B,kGAAkG;AAC7M;AACA;AACA;AACA,8BAA8B,iDAAoB;AAClD,8BAA8B,qCAAQ;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,qCAAQ;AACrC,8BAA8B,qCAAQ,CAAC,yBAAQ;AAC/C;AACA;AACA;AACA,SAAS;AACT,iCAAiC,qCAAQ,CAAC,yBAAQ;AAClD;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,uBAAuB,gCAAW;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gCAAW;AAClC;AACA,0BAA0B,sBAAU;AACpC;AACA;AACA,wBAAwB,WAAW;AACnC,sDAAsD,uBAAuB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,sCAAsC,iDAAoB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAAgB;AAC/B;AACA;;;;;AChHA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACfsC;AACtC;AACA;AACA;AACO;AACP,WAAW,yBAAM;AACjB;;;;;ACN0G;AACrD;AACO;AACY;AACX;AAC7D;AACA;AACA;AACA,+BAA+B,uBAAS;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,6BAAW;AACtB;AACA,8BAA8B,uBAAS;AACvC;AACA;AACO;AACP;AACA;AACA,CAAC;AACD;AACA,MAAM,eAAe;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA,qCAAqC,sCAAQ;AAC7C;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA;AACA,QAAQ;AACR;AACA;AACA,sDAAsD,gCAAK;AAC3D;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,0BAA0B;AACtF;AACA,uBAAuB,gCAAW;AAClC,SAAS;AACT;AACA,uBAAuB,2CAAgB;AACvC,mBAAmB,uBAAS;AAC5B,SAAS;AACT;AACA;;;ACvGA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACnByE;AACzE;AACA;AACA;AACO;AACP;AACA;AACA,sBAAsB,iBAAiB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AClC0D;AACjB;AACzC;AACA;AACA;AACO,cAAc,uBAAS;AAC9B;AACA;AACA;AACO,cAAc,uBAAS;AAC9B;AACA;AACA;AACA;AACO,mBAAmB,uBAAS,MAAM,2CAAgB;AACzD;AACA;AACA;AACA;AACO,mBAAmB,uBAAS,MAAM,2CAAgB;AACzD;AACA;AACA;AACA;AACO,kBAAkB,uBAAS,MAAM,2CAAgB;;;ACxBO;AAC/D;AACA;AACA;AACO;AACP,8BAA8B,KAAK,sBAAsB,KAAK,GAAG,KAAK;AACtE;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACpByE;AACzE;AACA;AACA;AACO;AACP,sBAAsB,iBAAiB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACbA;AACA;AACA;AACO;AACP;AACA;AACA;;;ACNA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACbyE;AACzE;AACA;AACA;AACO;AACP,sBAAsB,iBAAiB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC3ByE;AACzE;AACO;AACP;AACA;AACA;AACO;AACP,2FAA2F,iBAAiB;AAC5G;;;ACRA;AACA;AACA;AACO;AACP;AACA;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;;;;;ACTgF;AAChF;AACA;AACA;AACO;AACP,8CAA8C,wDAAwB;AACtE;AACA;;;ACPgF;AAChF;AACA;AACA;AACO;AACP,6CAA6C,wDAAwB;AACrE;AACA;AACA;;;ACRgF;AACzE;AACP,8CAA8C,wDAAwB;AACtE;;;ACHgF;AAChF;AACA;AACA;AACO;AACP,2CAA2C,wDAAwB;AACnE;AACA;AACA;AACA;AACO;AACP;AACA;;;ACZ0D;AAC1D;AACA;AACA;AACO;AACP,uBAAuB,kBAAkB;AACzC;;;ACN0D;AAC1D;AACA;AACA;AACO;AACP,uBAAuB,kBAAkB;AACzC;AACA;;;ACPyE;AACzE;AACA;AACA;AACO;AACP;AACA,sBAAsB,iBAAiB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACjByE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,2DAA2D,iBAAiB;AAC5E;;;ACXiD;AAC1C;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,sBAAsB,yBAAM;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACnD+D;AAC/D;AACA;AACA;AACO;AACP,8BAA8B,KAAK,sBAAsB,KAAK,GAAG,KAAK;AACtE;;;ACNA;AACA;AACA;AACyD;AACC;AACV;AACmC;AACkB;AACO;AACtB;AACgB;AACA;AACM;AACG;AACgC;AACvC;AACa;AACa;AAChB;AACrB;AACA;AACA;AACA;AACD;AACsB;AACpC;AACW;AACI;AACT;AACpF,QAAQ,MAAM,yBAAG,EAAE,wBAAW;AAC9B;AACA,WAAW,wBAAW,UAAU,mCAAmC;AACnE;AACA;AACA;AACO,iBAAiB,oBAAM;AAC9B;AACO,6BAA6B,oBAAM;AAC1C;AACO,wCAAwC,oBAAM;AACrD;AACO,2BAA2B,oBAAM,qCAAqC,6CAAiB;AAC9F;AACO,4BAA4B,oBAAM;AACzC;AACO,gBAAgB,oBAAM;AAC7B;AACO,mBAAmB,oBAAM;AAChC;AACA;AACA;AACA;AACA;AACO,qBAAqB,oBAAM;AAClC;AACO,kBAAkB,oBAAM,0BAA0B,6BAAS;AAClE;AACO,wBAAwB,oBAAM;AACrC;AACO,oBAAoB,oBAAM;AACjC;AACO,yBAAyB,oBAAM;AACtC;AACA;AACO,6BAA6B,oBAAM;AAC1C;AACO,+BAA+B,oBAAM;AAC5C;AACO,+BAA+B,oBAAM;AAC5C;AACO,iCAAiC,oBAAM;AAC9C;AACO,+BAA+B,oBAAM;AAC5C;AACO,iCAAiC,oBAAM;AAC9C;AACO,8BAA8B,oBAAM;AAC3C;AACO,gCAAgC,oBAAM;AAC7C;AACO,8BAA8B,oBAAM;AAC3C;AACO,gCAAgC,oBAAM;AAC7C;AACO,8BAA8B,oBAAM;AAC3C;AACO,gCAAgC,oBAAM;AAC7C;AACO,8BAA8B,oBAAM;AAC3C;AACO,gCAAgC,oBAAM;AAC7C;AACO,8BAA8B,oBAAM;AAC3C;AACO,gCAAgC,oBAAM;AAC7C;AACO,8BAA8B,oBAAM;AAC3C;AACO,gCAAgC,oBAAM;AAC7C;AACA;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACA;AACO,qBAAqB,oBAAM,8BAA8B,UAAU;AAC1E;AACO,gFAAgF,UAAU;AACjG;AACO,oBAAoB,oBAAM,6BAA6B,UAAU;AACxE;AACO,8EAA8E,UAAU;AAC/F;AACA;AACO;AACP,2BAA2B,yBAAkC;AAC7D,CAAC;AACD;AACO,MAAM,uCAAyB,GAAG,oBAAM;AAC/C;AACA;AACO;AACP,2BAA2B,oBAA6B;AACxD,CAAC;AACD;AACO,MAAM,kCAAoB,GAAG,oBAAM;AAC1C;AACA;AACO;AACP,2BAA2B,aAAsB;AACjD,CAAC;AACD;AACO,MAAM,2BAAa,GAAG,oBAAM;AACnC;AACA;AACO;AACP,2BAA2B,aAAsB;AACjD,CAAC;AACD;AACO,MAAM,2BAAa,GAAG,oBAAM;AACnC;AACA;AACO;AACP,2BAA2B,aAAsB;AACjD,CAAC;AACD;AACO,MAAM,2BAAa,GAAG,oBAAM;AACnC;AACA;AACO;AACP,2BAA2B,aAAsB;AACjD,CAAC;AACD;AACO,MAAM,2BAAa,GAAG,oBAAM;AACnC;AACO,kBAAkB,oBAAM,sCAAsC,2BAAa;AAClF;AACA;AACA;AACA;AACA,CAAC,wCAAwC;AACzC;AACA;AACO,yBAAyB,oBAAM;AACtC;AACA;AACA,CAAC;AACD,sCAAsC,UAAmB;AACzD,CAAC;AACD;AACO,uBAAuB,oBAAM;AACpC;AACA,CAAC;AACD;AACO,wBAAwB,oBAAM;AACrC;AACA,CAAC;AACD;AACO,yBAAyB,oBAAM;AACtC;AACA,CAAC;AACD;AACO,wBAAwB,oBAAM;AACrC;AACA,CAAC;AACD;AACA;AACA,WAAW,kBAA2B;AACtC;AACA;AACO;AACP;AACA,CAAC;AACD;AACO,+BAA+B,oBAAM;AAC5C;AACA;AACA;AACO,gCAAgC,oBAAM;AAC7C;AACA;AACA;AACO,iCAAiC,oBAAM;AAC9C;AACA;AACA;AACO,gCAAgC,oBAAM;AAC7C;AACA;AACA;AACO;AACP;AACA,CAAC;AACD;AACO,oCAAoC,oBAAM;AACjD;AACA;AACA;AACO,qCAAqC,oBAAM;AAClD;AACA;AACA;AACO,sCAAsC,oBAAM;AACnD;AACA;AACA;AACO,qCAAqC,oBAAM;AAClD;AACA;AACA;AACA,yEAAyE,gBAAyB;AAClG;AACO,+BAA+B,oBAAM;AAC5C;AACA;AACA,CAAC;AACD;AACA,CAAC;AACD;AACO,6BAA6B,oBAAM;AAC1C;AACO,8BAA8B,oBAAM;AAC3C;AACO,+BAA+B,oBAAM;AAC5C;AACO,8BAA8B,oBAAM;AAC3C;AACA;AACO,0BAA0B,oBAAM;AACvC;AACA;AACA,CAAC;AACD,sCAAsC,WAAoB;AAC1D,CAAC;AACD;AACO,wBAAwB,oBAAM;AACrC;AACO,yBAAyB,oBAAM;AACtC;AACO,0BAA0B,oBAAM;AACvC;AACO,yBAAyB,oBAAM;AACtC;AACA;AACO,+BAA+B,oBAAM;AAC5C;AACA;AACA,CAAC;AACD,sCAAsC,gBAAyB;AAC/D,CAAC;AACD;AACO,6BAA6B,oBAAM;AAC1C;AACO,8BAA8B,oBAAM;AAC3C;AACO,+BAA+B,oBAAM;AAC5C;AACO,8BAA8B,oBAAM;AAC3C;AACA;AACO,iCAAiC,oBAAM;AAC9C;AACA;AACA,CAAC;AACD,sCAAsC,kBAA2B;AACjE,CAAC;AACD;AACO,+BAA+B,oBAAM;AAC5C;AACO,gCAAgC,oBAAM;AAC7C;AACO,iCAAiC,oBAAM;AAC9C;AACO,gCAAgC,oBAAM;AAC7C;AACA;AACO,gCAAgC,oBAAM;AAC7C;AACA;AACA,CAAC;AACD,sCAAsC,mBAA4B;AAClE,CAAC;AACD;AACO,8BAA8B,oBAAM;AAC3C;AACO,+BAA+B,oBAAM;AAC5C;AACO,gCAAgC,oBAAM;AAC7C;AACO,+BAA+B,oBAAM;AAC5C;AACA;AACO;AACP,sCAAsC,gBAAyB;AAC/D,CAAC;AACD;AACO,6BAA6B,oBAAM;AAC1C;AACA;AACO;AACP,2BAA2B,gBAAyB;AACpD,CAAC;AACD;AACO,MAAM,8BAAgB,GAAG,oBAAM;AACtC;AACA;AACO;AACP,2BAA2B,gBAAyB,qEAAqE,8BAAgB;AACzI,CAAC;AACD;AACO,MAAM,8BAAgB,GAAG,oBAAM;AACtC;AACA;AACO;AACP,2BAA2B,qBAA8B;AACzD,CAAC;AACD;AACO,MAAM,mCAAqB,GAAG,oBAAM;AAC3C;AACA;AACO;AACP,2BAA2B,iBAA0B;AACrD,CAAC;AACD;AACO,8BAA8B,oBAAM;AAC3C;AACA;AACO,4BAA4B,oBAAM;AACzC;AACA;AACA,CAAC;AACD;AACA,eAAe,aAAsB;AACrC;AACA,CAAC;AACD;AACO,0BAA0B,oBAAM;AACvC;AACO,2BAA2B,oBAAM;AACxC;AACO,4BAA4B,oBAAM;AACzC;AACO,2BAA2B,oBAAM;AACxC;AACA;AACO;AACP,sCAAsC,oBAA6B;AACnE,CAAC;AACD;AACO,iCAAiC,oBAAM;AAC9C;AACA;AACA;AACA;AACA;AACA;AACO,4BAA4B,wBAAW;AAC9C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,mBAAmB,oBAAM,4BAA4B,SAAS;AACrE;AACA;AACA;AACA;AACO,4EAA4E,UAAU;AAC7F;AACA;AACO,wBAAwB,oBAAM;AACrC;AACA;AACA,CAAC;AACD,sCAAsC,kBAAkB;AACxD,CAAC;AACD;AACO,sBAAsB,oBAAM;AACnC;AACA,CAAC;AACD;AACO,uBAAuB,oBAAM;AACpC;AACA,CAAC;AACD;AACO,wBAAwB,oBAAM;AACrC;AACA,CAAC;AACD;AACO,uBAAuB,oBAAM;AACpC;AACA,CAAC;AACD;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;AACO,gCAAgC,oBAAM;AAC7C;AACA;AACA,CAAC;AACD;AACA,CAAC;AACD;AACO,8BAA8B,oBAAM;AAC3C;AACA;AACA;AACO,+BAA+B,oBAAM;AAC5C;AACA;AACA;AACO,gCAAgC,oBAAM;AAC7C;AACA;AACA;AACO,+BAA+B,oBAAM;AAC5C;AACA;AACA;AACO,qCAAqC,oBAAM;AAClD;AACA;AACA,CAAC;AACD;AACA,CAAC;AACD;AACO,mCAAmC,oBAAM;AAChD;AACA;AACA;AACO,oCAAoC,oBAAM;AACjD;AACA;AACA;AACO,qCAAqC,oBAAM;AAClD;AACA;AACA;AACO,oCAAoC,oBAAM;AACjD;AACA;AACA;AACA,wEAAwE,wBAAwB;AAChG;AACO,8BAA8B,oBAAM;AAC3C;AACA;AACA,CAAC;AACD;AACA,CAAC;AACD;AACO,4BAA4B,oBAAM;AACzC;AACO,6BAA6B,oBAAM;AAC1C;AACO,8BAA8B,oBAAM;AAC3C;AACO,6BAA6B,oBAAM;;;;;;;;;;;;;;;;;;;;;;;;;AC7hBsB;AACgB;AACjC;AACe;AACM;AACpE;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,wBAAwB,KAAE;AAC1B;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,KAAE;AAC5B;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,KAAE;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,KAAE;AAC5B;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAY;AAC3C;AACA;AACA,KAAK;AACL,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,4BAA4B;AACpD,sBAAsB,OAAO;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,2CAAiB;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,gBAAgB,wBAAW;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mDAAqB;AAC7B;AACA;AACA,8BAA8B,6CAAqB,0CAA0C,iBAAiB,iBAAiB;AAC/H;AACA;AACA;AACA;AACA;AACA;;;AC9MA;AACA;AAC0D;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,WAAW,YAAY;AACvB;;;;;;;;;;;;;ACZA;AACA;AACA;AACqD;AACyC;AAC9F;AACA;AACA;AACA;AACA;AACO,qBAAqB,4EAAU,KAAK,6EAAoB,EAAE,IAAI,gEAAO,EAAE,IAAI,qEAAY,CAAC,MAAM,mEAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACVtE;AACA;AACA;AACA;AACO;AACP;AAC+B;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,mEAAW;AAC/C;AACA;AACA;AACA,mFAAmF,6DAA6D;AAChJ;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C,MAAM;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4DAAQ;AACvB;AACA;AACA,eAAe,uCAAuC,MAAM;AAC5D;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mEAAW;AAC1B;AACA;AACA,eAAe,0CAA0C,MAAM;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4DAAQ;AACvB;AACA;AACA,eAAe,uCAAuC,MAAM;AAC5D;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mEAAW;AAC1B;AACA;AACA,eAAe,uCAAuC,MAAM;AAC5D;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,qBAAqB,8EAAgB;AACrC,qBAAqB,8EAAgB;AACrC;AACA,eAAe,4DAAQ;AACvB;AACA;AACA,eAAe,uCAAuC,MAAM;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,YAAY,8EAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA,eAAe,4DAAQ;AACvB;AACA;AACA,eAAe,uCAAuC,MAAM;AAC5D;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,4DAAQ;AACzB;AACA;AACA;AACA,8BAA8B,4DAAQ;AACtC;AACA;AACA,gBAAgB,4DAAQ,WAAW,4DAAQ;AAC3C;AACA;AACA;AACA,oBAAoB,4DAAQ;AAC5B;AACA;AACA,iBAAiB,4DAAQ;AACzB;AACA;AACA;AACA,8BAA8B,4DAAQ;AACtC;AACA,QAAQ,4DAAQ;AAChB,QAAQ,4DAAQ;AAChB,QAAQ,4DAAQ;AAChB,eAAe,4DAAQ;AACvB;AACA;AACA,eAAe,uCAAuC,MAAM;AAC5D;AACA;AACA;AACA;AACO;AACP;AACA,gBAAgB,4DAAQ;AACxB;AACA;AACA,gBAAgB,4DAAQ;AACxB;AACA,qCAAqC,4DAAQ;AAC7C,qCAAqC,4DAAQ;AAC7C,qCAAqC,4DAAQ;AAC7C;AACA;AACA;AACA,eAAe,4DAAQ;AACvB;AACA;AACA,eAAe,0CAA0C,MAAM;AAC/D;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4DAAQ;AACvB;AACA;AACA,eAAe,uCAAuC,MAAM;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mEAAW;AAC1B;AACA;AACA,eAAe,0CAA0C,MAAM;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,eAAe,uCAAuC,MAAM;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,cAAc,0CAA0C,MAAM;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,cAAc,uCAAuC,MAAM;AAC3D;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3gB4D;AAC5D;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,gBAAgB;AACtC;AACA;AACA;AACA,4BAA4B,mFAAqB,qBAAqB,mFAAqB,qBAAqB,mFAAqB;AACrI;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA,iBAAiB;AACjB;AACA;;;;;;;;;;;;ACzC4D;AAC5D;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,gBAAgB;AACtC;AACA;AACA;AACA,4BAA4B,mFAAqB,qBAAqB,mFAAqB,qBAAqB,mFAAqB;AACrI;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA,iBAAiB;AACjB;AACA;;;;;;;;;;;;ACzC4D;AAC5D;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,gBAAgB;AACtC;AACA;AACA;AACA,4BAA4B,mFAAqB,qBAAqB,mFAAqB,qBAAqB,mFAAqB;AACrI;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;;;;;;;;;;;;AC9C4D;AAC5D;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,gBAAgB;AACtC;AACA;AACA;AACA,4BAA4B,mFAAqB,qBAAqB,mFAAqB,qBAAqB,mFAAqB;AACrI;AACA;AACA,qBAAqB,gBAAgB;AACrC;AACA;AACA,iBAAiB;AACjB;AACA;;;;;;;;;;;;ACjDsG;AACtG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB,QAAQ;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA,sBAAsB,WAAW,yEAAW,sBAAsB,GAAG,WAAW,yEAAW,sBAAsB,GAAG,WAAW,yEAAW,sBAAsB;AAChK;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA,uBAAuB,WAAW,yEAAW,sBAAsB,GAAG,WAAW,yEAAW,sBAAsB,GAAG,WAAW,yEAAW,sBAAsB,GAAG,mEAAK,eAAe;AACxL;AACA;AACA,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA,+BAA+B,mFAAqB,qBAAqB,mFAAqB,qBAAqB,mFAAqB,qBAAqB,mFAAqB;AAClL;AACA;AACA,sBAAsB,mBAAmB;AACzC;AACA;AACA,+BAA+B,mEAAK,gBAAgB,mEAAK,gBAAgB,mEAAK,gBAAgB,mEAAK;AACnG;AACA;AACA,qBAAqB,mBAAmB,MAAM,wBAAwB;AACtE;AACA;AACA,iBAAiB;AACjB;AACA;AACA,eAAe,iFAAmB,CAAC,yEAAW;AAC9C;AACA;;;;;;;;;;;;AC9F4D;AAC5D;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,gBAAgB;AACtC;AACA;AACA;AACA,4BAA4B,mFAAqB,qBAAqB,mFAAqB,qBAAqB,mFAAqB;AACrI;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;ACzIO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;;;ACtuBiD;AACD;AACO;AACvD;AACA,+DAA+D,IAAI,UAAU,EAAE,6BAA6B,IAAI;AAChH;AACA,iEAAiE,IAAI,UAAU,EAAE;AACjF;AACA,oCAAoC,EAAE,UAAU,EAAE;AAClD;AACA,qCAAqC,EAAE,UAAU,EAAE;AACnD;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,gCAAgC,yCAAyC;AACzE;AACA;AACA;AACO;AACP,WAAW,kBAAkB;AAC7B;AACA;AACA,6CAA6C,yCAAyC;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gCAAW,CAAC,oCAAS,sCAAsC,oCAAS,qCAAqC,oCAAS;AACjI;AACA;AACA,6CAA6C,yCAAyC;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gCAAW,CAAC,oCAAS,wCAAwC,oCAAS,uCAAuC,oCAAS,+BAA+B,oCAAS;AAC7K;AACA;AACA,6CAA6C,yCAAyC;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,yCAAyC;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,eAAe,gCAAW,CAAC,oCAAS,4BAA4B,oCAAS,4BAA4B,oCAAS;AAC9G;AACA;AACA,sCAAsC,yCAAyC;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,gCAAW,CAAC,oCAAS,4BAA4B,oCAAS,4BAA4B,oCAAS;AAClH;AACA;AACA;AACA;AACA,gCAAgC,yCAAyC;AACzE,mBAAmB,yEAAyE;AAC5F;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA,mBAAmB,kBAAkB;AACrC;AACA,cAAc,gCAAW;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,0EAA0E;AAC5F;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AC1N0D;AAC1B;AACuB;AACvD;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,YAAY,6EAAqB;AACjC,CAAC;AACD;AACA,MAAM,sBAAsB;AAC5B;AACA,0CAA0C,qBAAqB;AAC/D;AACA;AACO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,MAAM,sBAAsB;AAC5B;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,yBAAyB,gBAAgB;AACzC;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,0BAA0B,qBAAqB;AAC/C,6BAA6B,sBAAsB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,KAAK;AAClC,+BAA+B,KAAK;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,4EAAU;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,kDAAG;AACX;AACA;AACA;AACA;AACA;AACA,oBAAoB,kDAAG;AACvB;AACA;AACA,oBAAoB,kDAAG;AACvB;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,QAAQ;AAC5D;AACA;AACA;AACA;AACA,8CAA8C,QAAQ;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,QAAQ;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB,4CAA4C;AAC5C;AACA;;;;;;;;;;;;;;;ACrMsC;AACoB;AACE;AACN;AACtD,+BAA+B;AAC/B;AACA,qBAAqB,wDAAI;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT,KAAK;AACL,CAAC;AACD;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA,2BAA2B,yEAAmB;AAC9C;AACA;AACA;AACA,gDAAgD,QAAQ;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA,sBAAsB,8EAAa;AACnC,qDAAqD,8EAAa;AAClE;AACA,0BAA0B,8EAAa;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,QAAQ;AAC5D,gBAAgB,4EAAU;AAC1B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;ACzGgC;AACoC;AACe;AACrB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,yBAAyB,sCAAsB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,6BAAU;AACpC;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,6BAAU;AAClB;AACA;AACA;AACA;AACA,QAAQ,6BAAU;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,4BAA4B;AACxD,iDAAiD,0CAAuB;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,8BAA8B;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,0CAAuB;AAC3D;AACA;AACA;AACA;AACA,uCAAuC,0CAAuB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kGAAkG,QAAQ;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,QAAQ;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,eAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6CAAqB;AAChD;AACA;AACA;AACA;AACA;AACA;;;AC9W6C;AACkB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,6CAAqB;AACxC,KAAK;AACL,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AC3DwC;AACxC,oBAAoB,2DAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,kBAAkB;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,2DAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC;AACD;AACA,uBAAuB,2DAAO;AAC9B;AACA,CAAC;AACD;AACA;AACA,uBAAuB,2CAA2C;AAClE;AACO,+BAA+B,QAAQ;AAC9C;AACO,4BAA4B,EAAE,OAAO;AAC5C;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,yCAAyC,qBAAqB;AAC9D;AACA;AACA;AACA,6CAA6C,OAAO;AACpD,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,oBAAoB,EAAE,MAAM,EAAE,kBAAkB;AAClE,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,cAAc,IAAI,2CAA2C;AAC/E,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,OAAO,GAAG,MAAM;AACtC,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,4CAA4C,gBAAgB;AAC5D;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC;;;;;;;;;;;;AC9MD;AACA,yBAAyB,gBAAgB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AC3KgC;AAC6B;AACS;AACtE;AACA;AACA;AACA;AACO,mBAAmB,wDAAI;AAC9B;AACA;AACA,wBAAwB,kDAAG;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,yEAAsB;AAC9E;AACA;AACA;AACA;AACA,yBAAyB,6EAAqB;AAC9C;AACA;AACA;AACA,6BAA6B,KAAK;AAClC,+BAA+B,KAAK;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,gEAAa;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,uBAAuB;AAC7C,qBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,2BAA2B;AAC3B;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,qBAAqB,wDAAI;AACzB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA,CAAC;AACD;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;;;;;;;;;;;;;;AC/VP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA,eAAe,qBAAM;AACrB;AACA,eAAe,qBAAM;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,4BAA4B;AACxF;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzFA;AACA,yBAAyB,UAAU;AACnC;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACpBkD;AACE;AACpD;AACA;AACA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA,6BAA6B,oEAAY;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,uEAAa;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,YAAY,oBAAoB;AAChC,0BAA0B,uEAAa;AACvC;AACA;AACA;AACA;AACA;AACA,yBAAyB,oEAAY;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,0BAA0B,uEAAa;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,YAAY,oBAAoB;AAChC;AACA;;;;;;;;;;;;;ACtGgC;AAChC;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,kDAAG;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,kDAAG;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,eAAe;AAC9C;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,wBAAwB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,gBAAgB;AACnE,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AClLoE;AACJ;AAChE;AACA;AACA;AACA;AACO,+BAA+B,kFAAuB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,eAAe,uFAA6B;AAC5C;;;;;;;;;;;;;;ACvDgC;AAChC;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,qBAAqB;AAC3B;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,kDAAG;AACpC;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAG;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AC/D0D;AACd;AAC5C;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,4EAAU;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,8DAAU;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACvEoE;AACpE;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,eAAe,uFAA6B;AAC5C;;;;;;;;;;;;;;ACrCoE;AACJ;AAChE;AACA;AACA;AACA;AACO,8BAA8B,kFAAuB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA,8BAA8B;AAC9B;AACA,eAAe,uFAA6B;AAC5C;;;;;;;;;;;;;;;;;;;;;;;AC7CgC;AAC6C;AACjB;AAC5D;AACA;AACA;AACA;AACA,+BAA+B,6BAAU;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,eAAG;AACP;AACA;AACA,IAAI,eAAG;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,QAAQ;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,mCAAmC,4CAAqB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,6BAAU;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,eAAG;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mCAAgB;AACxB;AACA,QAAQ,mCAAgB;AACxB;AACA;AACA;AACA;AACA;;;AC3PwE;AACpB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,wBAAwB,eAAe;AACvC;AACA;AACA;AACA;AACA,0BAA0B,oBAAoB;AAC9C;AACA;AACA;AACA,+BAA+B,6BAAiB;AAChD;AACA,mCAAmC,+BAAmB;AACtD;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA,sCAAsC,6BAAiB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,oBAAoB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,QAAQ;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,eAAG;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,eAAG;AACvB,kDAAkD,eAAG;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,eAAG;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACzLA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,QAAQ;AACnD;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;;;AC5JgC;AACuC;AACvB;AACX;AACuC;AACxB;AACpD;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,eAAG;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,eAAG;AAC1B;AACA;AACA;AACA,4CAA4C,oBAAoB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,QAAQ;AAC/D;AACA;AACA;AACA,mBAAmB,QAAQ;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,0CAAuB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,oBAAoB;AAC5C;AACA,6BAA6B,4CAAqB;AAClD;AACA;AACA;AACA;AACA;AACA,6BAA6B,oCAAa;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACtJyD;AACV;AAC/C;AACA,cAAc,sBAAsB;AACpC;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6DAAY;AACvC,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,yCAAE;AAChC;AACA;AACA;AACA,KAAK;AACL,CAAC;AACD;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,4EAAa;AACnC,wCAAwC,4EAAa;AACrD;AACA,0BAA0B,4EAAa;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;ACrFsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,kBAAkB,yCAAc;AAChC;AACA;AACA;;;;;;;ACrBmC;AACgE;AAC5F;AACP;AACA,8BAA8B,+BAAW;AACzC;AACA;AACA;AACA,QAAQ,eAAG;AACX;AACA;AACA,QAAQ,eAAG;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D,yCAAyC,oCAAa;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,6BAAU;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,eAAG;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,QAAQ,eAAG;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAU;AACV,IAAI,6BAAU;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,eAAG;AACX;AACA;AACA,QAAQ,eAAG;AACX;AACA;AACA;AACA;AACA,4BAA4B,uCAAuC;AACnE;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAG;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,eAAG;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC;;;ACtNkC;AACmF;AACrD;AACI;AACuB;AAC9B;AAC9D;AACA,sBAAsB;AACtB;AACA,8BAA8B,iCAAY;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,oCAAoC;AAC9E,iCAAiC,uBAAuB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,UAAU,iCAAiC,SAAS,oBAAoB,QAAQ;AACzJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,cAAc;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,8BAA8B;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,eAAe;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA,QAAQ,qBAAqB;AAC7B;AACA;AACA,QAAQ,qBAAqB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,6BAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,0CAAuB;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,6BAAU;AACtB;AACA;AACA;AACA,QAAQ,6BAAU;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,QAAQ,6BAAU;AAClB,8BAA8B,+BAAW;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,cAAc;AAC5B,yBAAyB,yCAAc;AACvC;AACA;AACA;AACA;AACA,yBAAyB,yCAAc;AACvC;AACA,+CAA+C,cAAc;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,cAAc;AACnD,kDAAkD,cAAc;AAChE;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,6BAAU;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,6BAAU;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAU;AACV,IAAI,6BAAU;AACd;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,+BAA+B;AAC/D;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,QAAQ,wCAAwC;AAChD,QAAQ,2CAA2C;AACnD;AACA;AACA;AACA,0BAA0B,cAAc;AACxC,QAAQ,oBAAoB;AAC5B,KAAK;AACL;AACA;AACA;AACA;AACA,4BAA4B,cAAc;AAC1C,QAAQ,oBAAoB;AAC5B,KAAK;AACL,CAAC;AACD;;;;;;;;;;;;;;;AC5nBA;AACA;AACA;AACA;AACkE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC;AACD;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,mBAAmB;AACzC,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E;AAC5E;AACA,iBAAiB;AACjB;AACA;AACA,oDAAoD;AACpD;AACA,aAAa;AACb,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,aAAa;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,yEAAW;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,cAAc;AAC3D;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,uBAAuB;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,uBAAuB;AAC7D;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,yBAAyB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC;AACD;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACO,uBAAuB,yDAAS;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,0BAA0B;AAClC;AACA;AACA;AACO;AACP;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,0BAA0B;AAClC;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,gBAAgB;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,kBAAkB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,cAAc;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,QAAQ;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,YAAY;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,yEAAU;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,yEAAU;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yEAAU;AACzB;AACA;AACA;AACA;AACA;AACA,mCAAmC,WAAW;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,yBAAyB,2BAA2B;AAC3G;AACA;AACA;AACA,8FAA8F,WAAW;AACzG;AACA;AACA,2EAA2E,gBAAgB;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,wBAAwB;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,oCAAoC,WAAW;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,oCAAoC,WAAW;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,oCAAoC,WAAW;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,oCAAoC,WAAW;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,6BAA6B,WAAW;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC;AACD;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,eAAe;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,YAAY;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC5zCmC;AAC+B;AACgD;AAClH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,gCAAgC,yEAAW;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,oGAAqB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,2DAAU;AACV,IAAI,yEAAU;AACd;AACA,2DAAU;AACV,IAAI,yEAAU;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA,wBAAwB,OAAO,GAAG,oBAAoB;AACtD;AACA;AACA;AACA;AACA;AACA,yCAAyC,2GAA4B;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA;;;;;;;;;;;;;;;;ACnIoD;AACpD;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACO,iDAAiD,sEAAI;AAC5D;AACA;AACA,UAAU,qEAAG;AACb,gBAAgB;AAChB;AACA,2BAA2B,qEAAG,SAAS,eAAe,gCAAgC;AACtF,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACO,mDAAmD,sEAAI;AAC9D;AACA;AACA,UAAU,qEAAG;AACb,iBAAiB,2CAA2C;AAC5D;AACA;AACA;AACA,cAAc,qEAAG;AACjB,2BAA2B,kCAAkC;AAC7D;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACO,oBAAoB,sEAAI;AAC/B,uBAAuB,qEAAG,iBAAiB;AAC3C;AACA;AACA,cAAc,qEAAG;AACjB,2BAA2B,gCAAgC;AAC3D;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACO,sBAAsB,sEAAI;AACjC,yBAAyB,qEAAG,mBAAmB;AAC/C;AACA;AACA,cAAc,qEAAG;AACjB,2BAA2B,kCAAkC;AAC7D;AACA;AACA;;;;;;;;;;;;ACnFiE;AACjE;AACA;AACA,iBAAiB,2FAA2F;AAC5G;AACA;AACO;AACP,8BAA8B,qFAAsB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,+BAA+B,qFAAsB;AACrD;AACA,KAAK;AACL;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA,qBAAqB,oCAAoC;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,oEAAoE;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,UAAU;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACO;;;;;;;;;;;AC3IP;AACA;AACA;AACA;AACO;;;;;;;;;;;;ACJP;AACA,wCAAwC;AACxC;AACA;AACO,gCAAgC,aAAa;AACpD;AACA;AACA;AACA;AACA;AACA;AACO;AACP,cAAc,OAAO,MAAM,UAAU,cAAc;AACnD;;;;;;;;;;;;ACbmE;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACO,qBAAqB,2FAAkB;;;;;;;;;;;;ACR9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,gBAAgB,sCAAsC,kBAAkB;AACnF,0BAA0B;AAC1B;AACA;AACA;AACO;AACP;AACA,oBAAoB;AACpB;AACA;AACA;AACO;AACP;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA,6DAA6D,cAAc;AAC3E;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA;AACO;AACP,oCAAoC;AACpC;AACA;AACO;AACP;AACA;AACA;AACO;AACP,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACO;AACP,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACO;AACP,6BAA6B,sBAAsB;AACnD;AACA;AACA;AACA;AACO;AACP,kDAAkD,QAAQ;AAC1D,yCAAyC,QAAQ;AACjD,yDAAyD,QAAQ;AACjE;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA,iBAAiB,uFAAuF,cAAc;AACtH,uBAAuB,gCAAgC,qCAAqC,2CAA2C;AACvI,4BAA4B,MAAM,iBAAiB,YAAY;AAC/D,uBAAuB;AACvB,8BAA8B;AAC9B,6BAA6B;AAC7B,4BAA4B;AAC5B;AACA;AACO;AACP;AACA,iBAAiB,6CAA6C,UAAU,sDAAsD,cAAc;AAC5I,0BAA0B,6BAA6B,oBAAoB,gDAAgD,kBAAkB;AAC7I;AACA;AACO;AACP;AACA;AACA,2GAA2G,uFAAuF,cAAc;AAChN,uBAAuB,8BAA8B,gDAAgD,wDAAwD;AAC7J,6CAA6C,sCAAsC,UAAU,mBAAmB,IAAI;AACpH;AACA;AACO;AACP,iCAAiC,uCAAuC,YAAY,KAAK,OAAO;AAChG;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,6CAA6C;AAC7C;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACzNA;AACA;AACA;AACO,SAAS,qBAAS;AACzB;AACA;;;ACLsC;AACtC;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,SAAS,qBAAS;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,cAAc;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO,4BAA4B,kEAAkB;;;;;;;;;;;;;;;;;;;AClGrD;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4BAA4B;AAC7B;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO,0BAA0B;AACjC;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO,2BAA2B;AAClC;AACA;AACA;AACO,4BAA4B;AACnC;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO,2BAA2B;AAClC;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO,iCAAiC;AACxC;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACP;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvXA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,CAAC,8BAA8B;;;;;;;;;;;ACP/B;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,oCAAoC","sources":["webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/react-components/lib/react-utils.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/swatch.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/utilities/base-layer-luminance.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/utilities/is-dark.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/utilities/relative-luminance.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-colors/dist/color-blending.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-colors/dist/color-interpolation.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-colors/dist/color-scale.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-colors/dist/color-palette.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-colors/dist/component-state-color-palette.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/utilities/binary-search.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/utilities/direction-by-is-dark.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/palette.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/accent-fill.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/accent-foreground.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/utilities/color-constants.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/foreground-on-accent.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/neutral-fill.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/neutral-fill-input.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/neutral-fill-layer.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/neutral-fill-stealth.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/neutral-fill-contrast.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/focus-stroke.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/neutral-foreground.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/neutral-foreground-hint.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/neutral-layer-card-container.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/neutral-layer-floating.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/neutral-layer-1.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/neutral-layer-2.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/neutral-layer-3.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/neutral-layer-4.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/neutral-stroke.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/neutral-stroke-divider.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/error-fill.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/foreground-on-error.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/design-tokens.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-foundation/dist/esm/design-system/design-system.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/jupyter-design-system.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/styles/size.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-colors/dist/color-converters.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-colors/dist/color-hsl.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-colors/dist/color-hsv.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-colors/dist/color-lab.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-colors/dist/color-lch.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-colors/dist/color-rgba-64.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-colors/dist/color-xyz.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-colors/dist/math-utilities.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-colors/dist/named-colors.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-colors/dist/parse-color.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/components/attributes.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/components/fast-definitions.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/components/controller.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/components/fast-element.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/dom.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/observation/notifier.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/observation/observable.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/platform.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/styles/css-directive.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/styles/css.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/styles/element-styles.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/templating/children.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/templating/html-directive.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/templating/node-observation.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/templating/ref.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/templating/slotted.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/templating/binding.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/templating/compiler.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/templating/view.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/templating/template.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-foundation/dist/esm/design-system/component-presentation.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-foundation/dist/esm/utilities/composed-contains.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-foundation/dist/esm/design-token/custom-property-manager.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-foundation/dist/esm/design-token/design-token.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-foundation/dist/esm/di/di.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-foundation/dist/esm/foundation-element/foundation-element.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-foundation/dist/esm/patterns/start-end.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-foundation/dist/esm/utilities/apply-mixins.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-foundation/dist/esm/utilities/composed-parent.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-foundation/dist/esm/utilities/match-media-stylesheet-behavior.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-foundation/dist/esm/utilities/style/disabled.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-foundation/dist/esm/utilities/style/display.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-foundation/dist/esm/utilities/style/focus.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-foundation/node_modules/tslib/tslib.es6.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/exenv-es6/dist/can-use-dom.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-web-utilities/dist/dom.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-web-utilities/dist/key-codes.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-web-utilities/dist/localization.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-web-utilities/dist/system-colors.js"],"sourcesContent":["import { useEffect, useLayoutEffect } from 'react';\n\nexport function useProperties(targetElement, propName, value) {\n useEffect(() => {\n if (\n value !== undefined &&\n targetElement.current &&\n targetElement.current[propName] !== value\n ) {\n // add try catch to avoid errors when setting read-only properties\n try {\n targetElement.current[propName] = value;\n } catch (e) {\n console.warn(e);\n }\n }\n }, [value, targetElement.current]);\n}\n\nexport function useEventListener(targetElement, eventName, eventHandler) {\n useLayoutEffect(() => {\n if (eventHandler !== undefined) {\n targetElement?.current?.addEventListener(eventName, eventHandler);\n }\n\n return () => {\n if (eventHandler?.cancel) {\n eventHandler.cancel();\n }\n\n targetElement?.current?.removeEventListener(eventName, eventHandler);\n };\n }, [eventName, eventHandler, targetElement.current]);\n}\n","import { ColorRGBA64, rgbToRelativeLuminance } from '@microsoft/fast-colors';\nimport { contrast } from './utilities/relative-luminance.js';\n/** @public */\nexport const SwatchRGB = Object.freeze({\n create(r, g, b) {\n return new SwatchRGBImpl(r, g, b);\n },\n from(obj) {\n return new SwatchRGBImpl(obj.r, obj.g, obj.b);\n }\n});\n/**\n * Runtime test for an objects conformance with the SwatchRGB interface.\n * @internal\n */\nexport function isSwatchRGB(value) {\n const test = {\n r: 0,\n g: 0,\n b: 0,\n toColorString: () => '',\n contrast: () => 0,\n relativeLuminance: 0\n };\n for (const key in test) {\n // @ts-expect-error swatch has no index\n if (typeof test[key] !== typeof value[key]) {\n return false;\n }\n }\n return true;\n}\n/**\n * A RGB implementation of {@link Swatch}\n * @internal\n */\nclass SwatchRGBImpl extends ColorRGBA64 {\n /**\n *\n * @param red - Red channel expressed as a number between 0 and 1\n * @param green - Green channel expressed as a number between 0 and 1\n * @param blue - Blue channel expressed as a number between 0 and 1\n */\n constructor(red, green, blue) {\n super(red, green, blue, 1);\n this.toColorString = this.toStringHexRGB;\n this.contrast = contrast.bind(null, this);\n this.createCSS = this.toColorString;\n this.relativeLuminance = rgbToRelativeLuminance(this);\n }\n static fromObject(obj) {\n return new SwatchRGBImpl(obj.r, obj.g, obj.b);\n }\n}\n","import { SwatchRGB } from '../swatch.js';\nexport function baseLayerLuminanceSwatch(luminance) {\n return SwatchRGB.create(luminance, luminance, luminance);\n}\n/**\n * Recommended values for light and dark mode for {@link @microsoft/fast-components#baseLayerLuminance}.\n *\n * @public\n */\nexport const StandardLuminance = {\n LightMode: 1,\n DarkMode: 0.23\n};\n","/*\n * A color is in \"dark\" if there is more contrast between #000000 and a reference\n * color than #FFFFFF and the reference color. That threshold can be expressed as a relative luminance\n * using the contrast formula as (1 + 0.5) / (R + 0.05) === (R + 0.05) / (0 + 0.05),\n * which reduces to the following, where 'R' is the relative luminance of the reference color\n */\nconst target = (-0.1 + Math.sqrt(0.21)) / 2;\n/**\n * Determines if a color should be considered Dark Mode\n * @param color - The color to check to mode of\n * @returns boolean\n *\n * @public\n */\nexport function isDark(color) {\n return color.relativeLuminance <= target;\n}\n","/**\n * @internal\n */\nexport function contrast(a, b) {\n const L1 = a.relativeLuminance > b.relativeLuminance ? a : b;\n const L2 = a.relativeLuminance > b.relativeLuminance ? b : a;\n return (L1.relativeLuminance + 0.05) / (L2.relativeLuminance + 0.05);\n}\n","import { hslToRGB, labToRGB, lchToRGB, rgbToHSL, rgbToLAB, rgbToLCH, } from \"./color-converters.js\";\nimport { ColorHSL } from \"./color-hsl.js\";\nimport { ColorLAB } from \"./color-lab.js\";\nimport { ColorLCH } from \"./color-lch.js\";\nimport { ColorRGBA64 } from \"./color-rgba-64.js\";\nimport { clamp } from \"./math-utilities.js\";\n/**\n * Saturate a color using LCH color space\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function saturateViaLCH(input, saturation, saturationConstant = 18) {\n const lch = rgbToLCH(input);\n let sat = lch.c + saturation * saturationConstant;\n if (sat < 0) {\n sat = 0;\n }\n return lchToRGB(new ColorLCH(lch.l, sat, lch.h));\n}\n/**\n * De-saturate a color using LCH color space\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function desaturateViaLCH(input, saturation, saturationConstant = 18) {\n return saturateViaLCH(input, -1 * saturation, saturationConstant);\n}\n/**\n * Darken a color using LAB color space\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function darkenViaLAB(input, amount, darkenConstant = 18) {\n const lab = rgbToLAB(input);\n const darkened = lab.l - amount * darkenConstant;\n return labToRGB(new ColorLAB(darkened, lab.a, lab.b));\n}\n/**\n * Lighten a color using LAB color space\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function lightenViaLAB(input, amount, darkenConstant = 18) {\n return darkenViaLAB(input, -1 * amount, darkenConstant);\n}\n/**\n * @public\n */\nexport function blendBurnChannel(bottom, top) {\n if (top === 0.0) {\n // Despite the discontinuity, other sources seem to use 0.0 here instead of 1\n return 0.0;\n }\n return 1.0 - (1.0 - bottom) / top;\n}\n/**\n * Blends two colors with the burn mode\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function blendBurn(bottom, top) {\n return new ColorRGBA64(blendBurnChannel(bottom.r, top.r), blendBurnChannel(bottom.g, top.g), blendBurnChannel(bottom.b, top.b), 1);\n}\n/**\n * Blends two colors\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function blendColor(bottom, top) {\n const bottomHSL = rgbToHSL(bottom);\n const topHSL = rgbToHSL(top);\n if (topHSL.s === 0) {\n return new ColorRGBA64(bottomHSL.l, bottomHSL.l, bottomHSL.l, 1);\n }\n return hslToRGB(new ColorHSL(topHSL.h, topHSL.s, bottomHSL.l));\n}\n/**\n * @public\n */\nexport function blendDarkenChannel(bottom, top) {\n return Math.min(bottom, top);\n}\n/**\n * Blends two colors with the darken mode\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function blendDarken(bottom, top) {\n return new ColorRGBA64(blendDarkenChannel(bottom.r, top.r), blendDarkenChannel(bottom.g, top.g), blendDarkenChannel(bottom.b, top.b), 1);\n}\n/**\n * @public\n */\nexport function blendDodgeChannel(bottom, top) {\n if (top >= 1.0) {\n return 1.0;\n }\n const retVal = bottom / (1.0 - top);\n if (retVal >= 1.0) {\n return 1.0;\n }\n return retVal;\n}\n/**\n * Blends two colors with the dodge mode\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function blendDodge(bottom, top) {\n return new ColorRGBA64(blendDodgeChannel(bottom.r, top.r), blendDodgeChannel(bottom.g, top.g), blendDodgeChannel(bottom.b, top.b), 1);\n}\n/**\n * @public\n */\nexport function blendLightenChannel(bottom, top) {\n return Math.max(bottom, top);\n}\n/**\n * Blends two colors with the lighten mode\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function blendLighten(bottom, top) {\n return new ColorRGBA64(blendLightenChannel(bottom.r, top.r), blendLightenChannel(bottom.g, top.g), blendLightenChannel(bottom.b, top.b), 1);\n}\n/**\n * @public\n */\nexport function blendMultiplyChannel(bottom, top) {\n return bottom * top;\n}\n/**\n * Blends two colors with the multiply mode\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function blendMultiply(bottom, top) {\n return new ColorRGBA64(blendMultiplyChannel(bottom.r, top.r), blendMultiplyChannel(bottom.g, top.g), blendMultiplyChannel(bottom.b, top.b), 1);\n}\n/**\n * @public\n */\nexport function blendOverlayChannel(bottom, top) {\n if (bottom < 0.5) {\n return clamp(2.0 * top * bottom, 0, 1);\n }\n return clamp(1.0 - 2.0 * (1.0 - top) * (1.0 - bottom), 0, 1);\n}\n/**\n * Blends two colors with the overlay mode\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function blendOverlay(bottom, top) {\n return new ColorRGBA64(blendOverlayChannel(bottom.r, top.r), blendOverlayChannel(bottom.g, top.g), blendOverlayChannel(bottom.b, top.b), 1);\n}\n/**\n * @public\n */\nexport function blendScreenChannel(bottom, top) {\n return 1.0 - (1.0 - top) * (1.0 - bottom);\n}\n/**\n * Blends two colors with the screen mode\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function blendScreen(bottom, top) {\n return new ColorRGBA64(blendScreenChannel(bottom.r, top.r), blendScreenChannel(bottom.g, top.g), blendScreenChannel(bottom.b, top.b), 1);\n}\n/**\n * Color blend modes.\n * @public\n */\nexport var ColorBlendMode;\n(function (ColorBlendMode) {\n ColorBlendMode[ColorBlendMode[\"Burn\"] = 0] = \"Burn\";\n ColorBlendMode[ColorBlendMode[\"Color\"] = 1] = \"Color\";\n ColorBlendMode[ColorBlendMode[\"Darken\"] = 2] = \"Darken\";\n ColorBlendMode[ColorBlendMode[\"Dodge\"] = 3] = \"Dodge\";\n ColorBlendMode[ColorBlendMode[\"Lighten\"] = 4] = \"Lighten\";\n ColorBlendMode[ColorBlendMode[\"Multiply\"] = 5] = \"Multiply\";\n ColorBlendMode[ColorBlendMode[\"Overlay\"] = 6] = \"Overlay\";\n ColorBlendMode[ColorBlendMode[\"Screen\"] = 7] = \"Screen\";\n})(ColorBlendMode || (ColorBlendMode = {}));\n/**\n * Blend two colors.\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function blend(mode, bottom, top) {\n switch (mode) {\n case ColorBlendMode.Burn:\n return blendBurn(bottom, top);\n case ColorBlendMode.Color:\n return blendColor(bottom, top);\n case ColorBlendMode.Darken:\n return blendDarken(bottom, top);\n case ColorBlendMode.Dodge:\n return blendDodge(bottom, top);\n case ColorBlendMode.Lighten:\n return blendLighten(bottom, top);\n case ColorBlendMode.Multiply:\n return blendMultiply(bottom, top);\n case ColorBlendMode.Overlay:\n return blendOverlay(bottom, top);\n case ColorBlendMode.Screen:\n return blendScreen(bottom, top);\n default:\n throw new Error(\"Unknown blend mode\");\n }\n}\n/**\n * Alpha channel of bottom is ignored\n * The returned color always has an alpha channel of 1\n * Different programs (eg: paint.net, photoshop) will give different answers than this occasionally but within +/- 1/255 in each channel. Just depends on the details of how they round off decimals\n *\n * @public\n */\nexport function computeAlphaBlend(bottom, top) {\n if (top.a >= 1) {\n return top;\n }\n else if (top.a <= 0) {\n return new ColorRGBA64(bottom.r, bottom.g, bottom.b, 1);\n }\n const r = top.a * top.r + (1 - top.a) * bottom.r;\n const g = top.a * top.g + (1 - top.a) * bottom.g;\n const b = top.a * top.b + (1 - top.a) * bottom.b;\n return new ColorRGBA64(r, g, b, 1);\n}\n","import { hslToRGB, hsvToRGB, labToRGB, lchToRGB, rgbToHSL, rgbToHSV, rgbToLAB, rgbToLCH, rgbToXYZ, xyzToRGB, } from \"./color-converters.js\";\nimport { ColorHSL } from \"./color-hsl.js\";\nimport { ColorHSV } from \"./color-hsv.js\";\nimport { ColorLAB } from \"./color-lab.js\";\nimport { ColorLCH } from \"./color-lch.js\";\nimport { ColorRGBA64 } from \"./color-rgba-64.js\";\nimport { ColorXYZ } from \"./color-xyz.js\";\nimport { lerp, lerpAnglesInDegrees } from \"./math-utilities.js\";\n/**\n * Interpolate by RGB color space\n *\n * @public\n */\nexport function interpolateRGB(position, left, right) {\n if (isNaN(position) || position <= 0) {\n return left;\n }\n else if (position >= 1) {\n return right;\n }\n return new ColorRGBA64(lerp(position, left.r, right.r), lerp(position, left.g, right.g), lerp(position, left.b, right.b), lerp(position, left.a, right.a));\n}\n/**\n * Interpolate by HSL color space\n *\n * @public\n */\nexport function interpolateHSL(position, left, right) {\n if (isNaN(position) || position <= 0) {\n return left;\n }\n else if (position >= 1) {\n return right;\n }\n return new ColorHSL(lerpAnglesInDegrees(position, left.h, right.h), lerp(position, left.s, right.s), lerp(position, left.l, right.l));\n}\n/**\n * Interpolate by HSV color space\n *\n * @public\n */\nexport function interpolateHSV(position, left, right) {\n if (isNaN(position) || position <= 0) {\n return left;\n }\n else if (position >= 1) {\n return right;\n }\n return new ColorHSV(lerpAnglesInDegrees(position, left.h, right.h), lerp(position, left.s, right.s), lerp(position, left.v, right.v));\n}\n/**\n * Interpolate by XYZ color space\n *\n * @public\n */\nexport function interpolateXYZ(position, left, right) {\n if (isNaN(position) || position <= 0) {\n return left;\n }\n else if (position >= 1) {\n return right;\n }\n return new ColorXYZ(lerp(position, left.x, right.x), lerp(position, left.y, right.y), lerp(position, left.z, right.z));\n}\n/**\n * Interpolate by LAB color space\n *\n * @public\n */\nexport function interpolateLAB(position, left, right) {\n if (isNaN(position) || position <= 0) {\n return left;\n }\n else if (position >= 1) {\n return right;\n }\n return new ColorLAB(lerp(position, left.l, right.l), lerp(position, left.a, right.a), lerp(position, left.b, right.b));\n}\n/**\n * Interpolate by LCH color space\n *\n * @public\n */\nexport function interpolateLCH(position, left, right) {\n if (isNaN(position) || position <= 0) {\n return left;\n }\n else if (position >= 1) {\n return right;\n }\n return new ColorLCH(lerp(position, left.l, right.l), lerp(position, left.c, right.c), lerpAnglesInDegrees(position, left.h, right.h));\n}\n/**\n * Color interpolation spaces\n *\n * @public\n */\nexport var ColorInterpolationSpace;\n(function (ColorInterpolationSpace) {\n ColorInterpolationSpace[ColorInterpolationSpace[\"RGB\"] = 0] = \"RGB\";\n ColorInterpolationSpace[ColorInterpolationSpace[\"HSL\"] = 1] = \"HSL\";\n ColorInterpolationSpace[ColorInterpolationSpace[\"HSV\"] = 2] = \"HSV\";\n ColorInterpolationSpace[ColorInterpolationSpace[\"XYZ\"] = 3] = \"XYZ\";\n ColorInterpolationSpace[ColorInterpolationSpace[\"LAB\"] = 4] = \"LAB\";\n ColorInterpolationSpace[ColorInterpolationSpace[\"LCH\"] = 5] = \"LCH\";\n})(ColorInterpolationSpace || (ColorInterpolationSpace = {}));\n/**\n * Interpolate by color space\n *\n * @public\n */\nexport function interpolateByColorSpace(position, space, left, right) {\n if (isNaN(position) || position <= 0) {\n return left;\n }\n else if (position >= 1) {\n return right;\n }\n switch (space) {\n case ColorInterpolationSpace.HSL:\n return hslToRGB(interpolateHSL(position, rgbToHSL(left), rgbToHSL(right)));\n case ColorInterpolationSpace.HSV:\n return hsvToRGB(interpolateHSV(position, rgbToHSV(left), rgbToHSV(right)));\n case ColorInterpolationSpace.XYZ:\n return xyzToRGB(interpolateXYZ(position, rgbToXYZ(left), rgbToXYZ(right)));\n case ColorInterpolationSpace.LAB:\n return labToRGB(interpolateLAB(position, rgbToLAB(left), rgbToLAB(right)));\n case ColorInterpolationSpace.LCH:\n return lchToRGB(interpolateLCH(position, rgbToLCH(left), rgbToLCH(right)));\n default:\n return interpolateRGB(position, left, right);\n }\n}\n","import { contrastRatio } from \"./color-converters.js\";\nimport { ColorInterpolationSpace, interpolateByColorSpace, } from \"./color-interpolation.js\";\n/**\n * A color scale created from linear stops\n * @public\n */\nexport class ColorScale {\n constructor(stops) {\n if (stops == null || stops.length === 0) {\n throw new Error(\"The stops argument must be non-empty\");\n }\n else {\n this.stops = this.sortColorScaleStops(stops);\n }\n }\n static createBalancedColorScale(colors) {\n if (colors == null || colors.length === 0) {\n throw new Error(\"The colors argument must be non-empty\");\n }\n const stops = new Array(colors.length);\n for (let i = 0; i < colors.length; i++) {\n // Special case first and last in order to avoid floating point jaggies\n if (i === 0) {\n stops[i] = { color: colors[i], position: 0 };\n }\n else if (i === colors.length - 1) {\n stops[i] = { color: colors[i], position: 1 };\n }\n else {\n stops[i] = {\n color: colors[i],\n position: i * (1 / (colors.length - 1)),\n };\n }\n }\n return new ColorScale(stops);\n }\n getColor(position, interpolationMode = ColorInterpolationSpace.RGB) {\n if (this.stops.length === 1) {\n return this.stops[0].color;\n }\n else if (position <= 0) {\n return this.stops[0].color;\n }\n else if (position >= 1) {\n return this.stops[this.stops.length - 1].color;\n }\n let lowerIndex = 0;\n for (let i = 0; i < this.stops.length; i++) {\n if (this.stops[i].position <= position) {\n lowerIndex = i;\n }\n }\n let upperIndex = lowerIndex + 1;\n if (upperIndex >= this.stops.length) {\n upperIndex = this.stops.length - 1;\n }\n const scalePosition = (position - this.stops[lowerIndex].position) *\n (1.0 / (this.stops[upperIndex].position - this.stops[lowerIndex].position));\n return interpolateByColorSpace(scalePosition, interpolationMode, this.stops[lowerIndex].color, this.stops[upperIndex].color);\n }\n trim(lowerBound, upperBound, interpolationMode = ColorInterpolationSpace.RGB) {\n if (lowerBound < 0 || upperBound > 1 || upperBound < lowerBound) {\n throw new Error(\"Invalid bounds\");\n }\n if (lowerBound === upperBound) {\n return new ColorScale([\n { color: this.getColor(lowerBound, interpolationMode), position: 0 },\n ]);\n }\n const containedStops = [];\n for (let i = 0; i < this.stops.length; i++) {\n if (this.stops[i].position >= lowerBound &&\n this.stops[i].position <= upperBound) {\n containedStops.push(this.stops[i]);\n }\n }\n if (containedStops.length === 0) {\n return new ColorScale([\n { color: this.getColor(lowerBound), position: lowerBound },\n { color: this.getColor(upperBound), position: upperBound },\n ]);\n }\n if (containedStops[0].position !== lowerBound) {\n containedStops.unshift({\n color: this.getColor(lowerBound),\n position: lowerBound,\n });\n }\n if (containedStops[containedStops.length - 1].position !== upperBound) {\n containedStops.push({\n color: this.getColor(upperBound),\n position: upperBound,\n });\n }\n const range = upperBound - lowerBound;\n const finalStops = new Array(containedStops.length);\n for (let i = 0; i < containedStops.length; i++) {\n finalStops[i] = {\n color: containedStops[i].color,\n position: (containedStops[i].position - lowerBound) / range,\n };\n }\n return new ColorScale(finalStops);\n }\n findNextColor(position, contrast, searchDown = false, interpolationMode = ColorInterpolationSpace.RGB, contrastErrorMargin = 0.005, maxSearchIterations = 32) {\n if (isNaN(position) || position <= 0) {\n position = 0;\n }\n else if (position >= 1) {\n position = 1;\n }\n const startingColor = this.getColor(position, interpolationMode);\n const finalPosition = searchDown ? 0 : 1;\n const finalColor = this.getColor(finalPosition, interpolationMode);\n const finalContrast = contrastRatio(startingColor, finalColor);\n if (finalContrast <= contrast) {\n return finalPosition;\n }\n let testRangeMin = searchDown ? 0 : position;\n let testRangeMax = searchDown ? position : 0;\n let mid = finalPosition;\n let iterations = 0;\n while (iterations <= maxSearchIterations) {\n mid = Math.abs(testRangeMax - testRangeMin) / 2 + testRangeMin;\n const midColor = this.getColor(mid, interpolationMode);\n const midContrast = contrastRatio(startingColor, midColor);\n if (Math.abs(midContrast - contrast) <= contrastErrorMargin) {\n return mid;\n }\n else if (midContrast > contrast) {\n if (searchDown) {\n testRangeMin = mid;\n }\n else {\n testRangeMax = mid;\n }\n }\n else {\n if (searchDown) {\n testRangeMax = mid;\n }\n else {\n testRangeMin = mid;\n }\n }\n iterations++;\n }\n return mid;\n }\n clone() {\n const newStops = new Array(this.stops.length);\n for (let i = 0; i < newStops.length; i++) {\n newStops[i] = {\n color: this.stops[i].color,\n position: this.stops[i].position,\n };\n }\n return new ColorScale(newStops);\n }\n sortColorScaleStops(stops) {\n return stops.sort((a, b) => {\n const A = a.position;\n const B = b.position;\n if (A < B) {\n return -1;\n }\n else if (A > B) {\n return 1;\n }\n else {\n return 0;\n }\n });\n }\n}\n","import { blendMultiply, blendOverlay, saturateViaLCH } from \"./color-blending.js\";\nimport { rgbToHSL } from \"./color-converters.js\";\nimport { ColorInterpolationSpace, interpolateByColorSpace, } from \"./color-interpolation.js\";\nimport { ColorRGBA64 } from \"./color-rgba-64.js\";\nimport { ColorScale } from \"./color-scale.js\";\nimport { parseColorHexRGB } from \"./parse-color.js\";\n/**\n * Generates a color palette\n * @public\n */\nexport class ColorPalette {\n constructor(config) {\n this.config = Object.assign({}, ColorPalette.defaultPaletteConfig, config);\n this.palette = [];\n this.updatePaletteColors();\n }\n updatePaletteGenerationValues(newConfig) {\n let changed = false;\n for (const key in newConfig) {\n if (this.config[key]) {\n if (this.config[key].equalValue) {\n if (!this.config[key].equalValue(newConfig[key])) {\n this.config[key] = newConfig[key];\n changed = true;\n }\n }\n else {\n if (newConfig[key] !== this.config[key]) {\n this.config[key] = newConfig[key];\n changed = true;\n }\n }\n }\n }\n if (changed) {\n this.updatePaletteColors();\n }\n return changed;\n }\n updatePaletteColors() {\n const scale = this.generatePaletteColorScale();\n for (let i = 0; i < this.config.steps; i++) {\n this.palette[i] = scale.getColor(i / (this.config.steps - 1), this.config.interpolationMode);\n }\n }\n generatePaletteColorScale() {\n // Even when config.baseScalePosition is specified, using 0.5 for the baseColor\n // in the baseScale gives better results. Otherwise very off-center palettes\n // tend to go completely grey at the end furthest from the specified base color.\n const baseColorHSL = rgbToHSL(this.config.baseColor);\n const baseScale = new ColorScale([\n { position: 0, color: this.config.scaleColorLight },\n { position: 0.5, color: this.config.baseColor },\n { position: 1, color: this.config.scaleColorDark },\n ]);\n const trimmedScale = baseScale.trim(this.config.clipLight, 1 - this.config.clipDark);\n const trimmedLight = trimmedScale.getColor(0);\n const trimmedDark = trimmedScale.getColor(1);\n let adjustedLight = trimmedLight;\n let adjustedDark = trimmedDark;\n if (baseColorHSL.s >= this.config.saturationAdjustmentCutoff) {\n adjustedLight = saturateViaLCH(adjustedLight, this.config.saturationLight);\n adjustedDark = saturateViaLCH(adjustedDark, this.config.saturationDark);\n }\n if (this.config.multiplyLight !== 0) {\n const multiply = blendMultiply(this.config.baseColor, adjustedLight);\n adjustedLight = interpolateByColorSpace(this.config.multiplyLight, this.config.interpolationMode, adjustedLight, multiply);\n }\n if (this.config.multiplyDark !== 0) {\n const multiply = blendMultiply(this.config.baseColor, adjustedDark);\n adjustedDark = interpolateByColorSpace(this.config.multiplyDark, this.config.interpolationMode, adjustedDark, multiply);\n }\n if (this.config.overlayLight !== 0) {\n const overlay = blendOverlay(this.config.baseColor, adjustedLight);\n adjustedLight = interpolateByColorSpace(this.config.overlayLight, this.config.interpolationMode, adjustedLight, overlay);\n }\n if (this.config.overlayDark !== 0) {\n const overlay = blendOverlay(this.config.baseColor, adjustedDark);\n adjustedDark = interpolateByColorSpace(this.config.overlayDark, this.config.interpolationMode, adjustedDark, overlay);\n }\n if (this.config.baseScalePosition) {\n if (this.config.baseScalePosition <= 0) {\n return new ColorScale([\n { position: 0, color: this.config.baseColor },\n { position: 1, color: adjustedDark.clamp() },\n ]);\n }\n else if (this.config.baseScalePosition >= 1) {\n return new ColorScale([\n { position: 0, color: adjustedLight.clamp() },\n { position: 1, color: this.config.baseColor },\n ]);\n }\n return new ColorScale([\n { position: 0, color: adjustedLight.clamp() },\n {\n position: this.config.baseScalePosition,\n color: this.config.baseColor,\n },\n { position: 1, color: adjustedDark.clamp() },\n ]);\n }\n return new ColorScale([\n { position: 0, color: adjustedLight.clamp() },\n { position: 0.5, color: this.config.baseColor },\n { position: 1, color: adjustedDark.clamp() },\n ]);\n }\n}\nColorPalette.defaultPaletteConfig = {\n baseColor: parseColorHexRGB(\"#808080\"),\n steps: 11,\n interpolationMode: ColorInterpolationSpace.RGB,\n scaleColorLight: new ColorRGBA64(1, 1, 1, 1),\n scaleColorDark: new ColorRGBA64(0, 0, 0, 1),\n clipLight: 0.185,\n clipDark: 0.16,\n saturationAdjustmentCutoff: 0.05,\n saturationLight: 0.35,\n saturationDark: 1.25,\n overlayLight: 0,\n overlayDark: 0.25,\n multiplyLight: 0,\n multiplyDark: 0,\n baseScalePosition: 0.5,\n};\nColorPalette.greyscalePaletteConfig = {\n baseColor: parseColorHexRGB(\"#808080\"),\n steps: 11,\n interpolationMode: ColorInterpolationSpace.RGB,\n scaleColorLight: new ColorRGBA64(1, 1, 1, 1),\n scaleColorDark: new ColorRGBA64(0, 0, 0, 1),\n clipLight: 0,\n clipDark: 0,\n saturationAdjustmentCutoff: 0,\n saturationLight: 0,\n saturationDark: 0,\n overlayLight: 0,\n overlayDark: 0,\n multiplyLight: 0,\n multiplyDark: 0,\n baseScalePosition: 0.5,\n};\n/**\n * Takes the input color and compares it to each color in the reference array to find the index with the closest Lightness value in HSL color space\n * @public\n */\nexport function matchLightnessIndex(input, reference) {\n const hsl = rgbToHSL(input);\n let bestFitValue = Number.MAX_VALUE;\n let bestFitIndex = 0;\n for (let i = 0; i < reference.length; i++) {\n const ihsl = rgbToHSL(reference[i]);\n const fitValue = Math.abs(ihsl.l - hsl.l);\n if (fitValue < bestFitValue) {\n bestFitValue = fitValue;\n bestFitIndex = i;\n }\n }\n return bestFitIndex;\n}\n/**\n * Generates a greyscale palette using greyscaleConfig. The Lightness (in HSL) of the input color is then compared to the greyscale palette to determine how far off center the input color should be placed. The output palette is then generated with outputSteps number of steps using colorConfig.\n * @public\n */\nexport function generateOffCenterPalette(input, outputSteps, greyscaleConfig = ColorPalette.greyscalePaletteConfig, colorConfig = ColorPalette.defaultPaletteConfig) {\n const greyscale = new ColorPalette(Object.assign(Object.assign({}, greyscaleConfig), { steps: outputSteps }));\n const scaleIndex = matchLightnessIndex(input, greyscale.palette);\n return new ColorPalette(Object.assign(Object.assign({}, colorConfig), { steps: outputSteps, baseColor: input, baseScalePosition: scaleIndex / (outputSteps - 1) }));\n}\n/**\n * Take the input array of colors and extrapolates them to a larger palette of size targetSize. If preserveInputColors is false the input colors are evenly distributed into the output. Otherwise, the positions of the input colors are adjusted from a perfectly even distribution in order to ensure that the exact color values appearing in the input array also appear in the output array. The larger targetSize is compared to input.length the smaller those adjustments will be.\n *\n * @public\n */\nexport function rescale(input, targetSize, preserveInputColors) {\n if (input.length <= 1 || targetSize <= 1) {\n throw new Error(\"The input array and targetSize must both be greater than 1\");\n }\n if (preserveInputColors && targetSize <= input.length) {\n throw new Error(\"If preserveInputColors is true then targetSize must be greater than the length of the input array\");\n }\n const stops = new Array(input.length);\n if (preserveInputColors) {\n for (let i = 0; i < input.length; i++) {\n const p = i / (input.length - 1);\n let bestFitValue = 2;\n let bestFitIndex = 0;\n for (let j = 0; j < targetSize; j++) {\n const fitValue = Math.abs(j / (targetSize - 1) - p);\n if (fitValue < bestFitValue) {\n bestFitValue = fitValue;\n bestFitIndex = j;\n }\n if (fitValue === 0) {\n break;\n }\n }\n stops[i] = {\n color: input[i],\n position: bestFitIndex / (targetSize - 1),\n };\n }\n }\n else {\n for (let i = 0; i < stops.length; i++) {\n stops[i] = { color: input[i], position: i / (input.length - 1) };\n }\n }\n const scale = new ColorScale(stops);\n const retVal = new Array(targetSize);\n for (let i = 0; i < targetSize; i++) {\n retVal[i] = scale.getColor(i / (targetSize - 1));\n }\n return retVal;\n}\n/**\n * @public\n */\nexport const defaultCenteredRescaleConfig = {\n targetSize: 63,\n spacing: 4,\n scaleColorLight: ColorPalette.defaultPaletteConfig.scaleColorLight,\n scaleColorDark: ColorPalette.defaultPaletteConfig.scaleColorDark,\n};\n/**\n * Takes an input array of colors and extrapolates them to a larger palette. The mapping first takes the input array and extrapolates between each color so that they are separated by spacing-1 slots. Then it adds to either end enough new colors to make up the desired targetSize. All output color slots between the defined stops are interpolated.\n * @example\n * For an input array with length 5, a targetSize of 17 and spacing of 3 the output would be:\n * 0: scaleColorLight\n * 1:\n * 2: input 0\n * 3:\n * 4:\n * 5: input 1\n * 6:\n * 7:\n * 8: input 2\n * 9:\n * 10:\n * 11: input 3\n * 12:\n * 13:\n * 14: input 4\n * 15:\n * 16: scaleColorDark\n *\n * @public\n */\nexport function centeredRescale(input, config = defaultCenteredRescaleConfig) {\n if (input.length === 0) {\n return [];\n }\n const offset = Math.floor((config.targetSize - ((input.length - 1) * config.spacing + 1)) / 2);\n if (offset < 0) {\n throw new Error(\"(targetSize - ((input.length - 1) * spacing + 1)) / 2 must be >= 0\");\n }\n const stops = new Array(input.length + 2);\n stops[0] = { position: 0, color: config.scaleColorLight };\n stops[stops.length - 1] = {\n position: 1,\n color: config.scaleColorDark,\n };\n for (let i = 0; i < input.length; i++) {\n stops[i + 1] = {\n color: input[i],\n position: (i * config.spacing + offset) / (config.targetSize - 1),\n };\n }\n const scale = new ColorScale(stops);\n const retVal = new Array(config.targetSize);\n for (let i = 0; i < config.targetSize; i++) {\n retVal[i] = scale.getColor(i / (config.targetSize - 1));\n }\n return retVal;\n}\n/**\n * Generates two palettes of length shortPaletteLength and longPaletteLength from a base color. The base color is compared to the default greyscale palette to determine where it should be placed. The short palette is then fed into centeredRescale to create the long palette. The colors in the short palette are always contained within the long.\n * @public\n */\nexport function generateScaledPalettes(input, shortPaletteLength = 11, config = defaultCenteredRescaleConfig) {\n const shortPalette = generateOffCenterPalette(input, shortPaletteLength);\n const longPalette = centeredRescale(shortPalette.palette, config);\n return { short: shortPalette.palette, long: longPalette };\n}\n","import { ColorRGBA64 } from \"./color-rgba-64.js\";\nimport { ColorPalette } from \"./color-palette.js\";\nimport { hslToRGB, rgbToHSL, rgbToLinearLuminance } from \"./color-converters.js\";\nimport { ColorScale } from \"./color-scale.js\";\nimport { ColorHSL } from \"./color-hsl.js\";\nimport { ColorInterpolationSpace } from \"./color-interpolation.js\";\nimport { parseColorHexRGB } from \"./parse-color.js\";\n/**\n * Creates a color palette for UI components\n * @public\n */\nexport class ComponentStateColorPalette {\n constructor(config) {\n this.palette = [];\n this.config = Object.assign({}, ComponentStateColorPalette.defaultPaletteConfig, config);\n this.regenPalettes();\n }\n regenPalettes() {\n let steps = this.config.steps;\n if (isNaN(steps) || steps < 3) {\n steps = 3;\n }\n // This palette is tuned to go as dark as differences between the levels can be perceived according to tests\n // on numerous monitors in different conditions. Stay linear from white until this first cutoff.\n const darkLum = 0.14;\n // In the dark compression, this is the last luminance value before full black.\n const darkestLum = 0.06;\n // The Color for the luminance value above, placed on the ramp at it's normal position, so darker colors after\n // it can be compressed.\n const darkLumColor = new ColorRGBA64(darkLum, darkLum, darkLum, 1);\n // The number of steps in the ramp that has been tuned for default use. This coincides with the size of the\n // default ramp, but the palette could be generated with fewer steps to increase final contrast. This number\n // should however stay the same.\n const stepsForLuminanceRamp = 94;\n // Create the reference, dark-compressed, grey palette, like:\n // F------------------------------------------------------------------------------------[dark]------[darkest]0\n // |--compressed area--|\n const r = new ColorPalette(Object.assign(Object.assign({}, ColorPalette.greyscalePaletteConfig), { baseColor: darkLumColor, baseScalePosition: ((1 - darkLum) * 100) / stepsForLuminanceRamp, steps }));\n const referencePalette = r.palette;\n // Find the requested base color on the adjusted luminance reference ramp.\n // There is no _right_ way to desaturate a color, and both methods we've tested have value, so average them out.\n const baseColorLum1 = rgbToLinearLuminance(this.config.baseColor);\n const baseColorLum2 = rgbToHSL(this.config.baseColor).l;\n const baseColorLum = (baseColorLum1 + baseColorLum2) / 2;\n const baseColorRefIndex = this.matchRelativeLuminanceIndex(baseColorLum, referencePalette);\n const baseColorPercent = baseColorRefIndex / (steps - 1);\n // Find the luminance location for the dark cutoff.\n const darkRefIndex = this.matchRelativeLuminanceIndex(darkLum, referencePalette);\n const darkPercent = darkRefIndex / (steps - 1);\n // Issue https://github.com/microsoft/fast/issues/1904\n // Creating a color from H, S, and a known L value is not the inverse of getting the relative\n // luminace as above. Need to derive a relative luminance version of the color to better match on the dark end.\n // Find the dark cutoff and darkest variations of the requested base color.\n const baseColorHSL = rgbToHSL(this.config.baseColor);\n const darkBaseColor = hslToRGB(ColorHSL.fromObject({\n h: baseColorHSL.h,\n s: baseColorHSL.s,\n l: darkLum,\n }));\n const darkestBaseColor = hslToRGB(ColorHSL.fromObject({\n h: baseColorHSL.h,\n s: baseColorHSL.s,\n l: darkestLum,\n }));\n // Create the gradient stops, including the base color and anchor colors for the dark end compression.\n const fullColorScaleStops = new Array(5);\n fullColorScaleStops[0] = {\n position: 0,\n color: new ColorRGBA64(1, 1, 1, 1),\n };\n fullColorScaleStops[1] = {\n position: baseColorPercent,\n color: this.config.baseColor,\n };\n fullColorScaleStops[2] = {\n position: darkPercent,\n color: darkBaseColor,\n };\n fullColorScaleStops[3] = {\n position: 0.99,\n color: darkestBaseColor,\n };\n fullColorScaleStops[4] = {\n position: 1,\n color: new ColorRGBA64(0, 0, 0, 1),\n };\n const scale = new ColorScale(fullColorScaleStops);\n // Create the palette.\n this.palette = new Array(steps);\n for (let i = 0; i < steps; i++) {\n const c = scale.getColor(i / (steps - 1), ColorInterpolationSpace.RGB);\n this.palette[i] = c;\n }\n }\n matchRelativeLuminanceIndex(input, reference) {\n let bestFitValue = Number.MAX_VALUE;\n let bestFitIndex = 0;\n let i = 0;\n const referenceLength = reference.length;\n for (; i < referenceLength; i++) {\n const fitValue = Math.abs(rgbToLinearLuminance(reference[i]) - input);\n if (fitValue < bestFitValue) {\n bestFitValue = fitValue;\n bestFitIndex = i;\n }\n }\n return bestFitIndex;\n }\n}\nComponentStateColorPalette.defaultPaletteConfig = {\n baseColor: parseColorHexRGB(\"#808080\"),\n steps: 94,\n};\n","/**\n * @internal\n */\nexport function binarySearch(valuesToSearch, searchCondition, startIndex = 0, endIndex = valuesToSearch.length - 1) {\n if (endIndex === startIndex) {\n return valuesToSearch[startIndex];\n }\n const middleIndex = Math.floor((endIndex - startIndex) / 2) + startIndex;\n // Check to see if this passes on the item in the center of the array\n // if it does check the previous values\n return searchCondition(valuesToSearch[middleIndex])\n ? binarySearch(valuesToSearch, searchCondition, startIndex, middleIndex // include this index because it passed the search condition\n )\n : binarySearch(valuesToSearch, searchCondition, middleIndex + 1, // exclude this index because it failed the search condition\n endIndex);\n}\n","import { isDark } from './is-dark.js';\n/**\n * @internal\n */\nexport function directionByIsDark(color) {\n return isDark(color) ? -1 : 1;\n}\n","import { clamp, ColorRGBA64, ComponentStateColorPalette, parseColorHexRGB } from '@microsoft/fast-colors';\nimport { isSwatchRGB, SwatchRGB } from './swatch.js';\nimport { binarySearch } from './utilities/binary-search.js';\nimport { directionByIsDark } from './utilities/direction-by-is-dark.js';\nimport { contrast } from './utilities/relative-luminance.js';\nfunction create(rOrSource, g, b) {\n if (typeof rOrSource === 'number') {\n /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\n return PaletteRGB.from(SwatchRGB.create(rOrSource, g, b));\n }\n else {\n return PaletteRGB.from(rOrSource);\n }\n}\nfunction from(source) {\n return isSwatchRGB(source)\n ? PaletteRGBImpl.from(source)\n : PaletteRGBImpl.from(SwatchRGB.create(source.r, source.g, source.b));\n}\n/** @public */\nexport const PaletteRGB = Object.freeze({\n create,\n from\n});\n/**\n * A {@link Palette} representing RGB swatch values.\n * @public\n */\nclass PaletteRGBImpl {\n /**\n *\n * @param source - The source color for the palette\n * @param swatches - All swatches in the palette\n */\n constructor(source, swatches) {\n this.closestIndexCache = new Map();\n this.source = source;\n this.swatches = swatches;\n this.reversedSwatches = Object.freeze([...this.swatches].reverse());\n this.lastIndex = this.swatches.length - 1;\n }\n /**\n * {@inheritdoc Palette.colorContrast}\n */\n colorContrast(reference, contrastTarget, initialSearchIndex, direction) {\n if (initialSearchIndex === undefined) {\n initialSearchIndex = this.closestIndexOf(reference);\n }\n let source = this.swatches;\n const endSearchIndex = this.lastIndex;\n let startSearchIndex = initialSearchIndex;\n if (direction === undefined) {\n direction = directionByIsDark(reference);\n }\n const condition = (value) => contrast(reference, value) >= contrastTarget;\n if (direction === -1) {\n source = this.reversedSwatches;\n startSearchIndex = endSearchIndex - startSearchIndex;\n }\n return binarySearch(source, condition, startSearchIndex, endSearchIndex);\n }\n /**\n * {@inheritdoc Palette.get}\n */\n get(index) {\n return (this.swatches[index] || this.swatches[clamp(index, 0, this.lastIndex)]);\n }\n /**\n * {@inheritdoc Palette.closestIndexOf}\n */\n closestIndexOf(reference) {\n if (this.closestIndexCache.has(reference.relativeLuminance)) {\n /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\n return this.closestIndexCache.get(reference.relativeLuminance);\n }\n let index = this.swatches.indexOf(reference);\n if (index !== -1) {\n this.closestIndexCache.set(reference.relativeLuminance, index);\n return index;\n }\n const closest = this.swatches.reduce((previous, next) => Math.abs(next.relativeLuminance - reference.relativeLuminance) <\n Math.abs(previous.relativeLuminance - reference.relativeLuminance)\n ? next\n : previous);\n index = this.swatches.indexOf(closest);\n this.closestIndexCache.set(reference.relativeLuminance, index);\n return index;\n }\n /**\n * Create a color palette from a provided swatch\n * @param source - The source swatch to create a palette from\n * @returns\n */\n static from(source) {\n return new PaletteRGBImpl(source, Object.freeze(new ComponentStateColorPalette({\n /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\n baseColor: ColorRGBA64.fromObject(source)\n }).palette.map(x => {\n /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\n const _x = parseColorHexRGB(x.toStringHexRGB());\n return SwatchRGB.create(_x.r, _x.g, _x.b);\n })));\n }\n}\n","/**\n * @internal\n */\nexport function accentFill(palette, neutralPalette, reference, hoverDelta, activeDelta, focusDelta, neutralFillRestDelta, neutralFillHoverDelta, neutralFillActiveDelta) {\n const accent = palette.source;\n const referenceIndex = neutralPalette.closestIndexOf(reference);\n const swapThreshold = Math.max(neutralFillRestDelta, neutralFillHoverDelta, neutralFillActiveDelta);\n const direction = referenceIndex >= swapThreshold ? -1 : 1;\n const accentIndex = palette.closestIndexOf(accent);\n const hoverIndex = accentIndex;\n const restIndex = hoverIndex + direction * -1 * hoverDelta;\n const activeIndex = restIndex + direction * activeDelta;\n const focusIndex = restIndex + direction * focusDelta;\n return {\n rest: palette.get(restIndex),\n hover: palette.get(hoverIndex),\n active: palette.get(activeIndex),\n focus: palette.get(focusIndex)\n };\n}\n","import { directionByIsDark } from '../utilities/direction-by-is-dark.js';\n/**\n * @internal\n */\nexport function accentForeground(palette, reference, contrastTarget, restDelta, hoverDelta, activeDelta, focusDelta) {\n const accent = palette.source;\n const accentIndex = palette.closestIndexOf(accent);\n const direction = directionByIsDark(reference);\n const startIndex = accentIndex +\n (direction === 1\n ? Math.min(restDelta, hoverDelta)\n : Math.max(direction * restDelta, direction * hoverDelta));\n const accessibleSwatch = palette.colorContrast(reference, contrastTarget, startIndex, direction);\n const accessibleIndex1 = palette.closestIndexOf(accessibleSwatch);\n const accessibleIndex2 = accessibleIndex1 + direction * Math.abs(restDelta - hoverDelta);\n const indexOneIsRestState = direction === 1\n ? restDelta < hoverDelta\n : direction * restDelta > direction * hoverDelta;\n let restIndex;\n let hoverIndex;\n if (indexOneIsRestState) {\n restIndex = accessibleIndex1;\n hoverIndex = accessibleIndex2;\n }\n else {\n restIndex = accessibleIndex2;\n hoverIndex = accessibleIndex1;\n }\n return {\n rest: palette.get(restIndex),\n hover: palette.get(hoverIndex),\n active: palette.get(restIndex + direction * activeDelta),\n focus: palette.get(restIndex + direction * focusDelta)\n };\n}\n","import { parseColorHexRGB } from '@microsoft/fast-colors';\nimport { SwatchRGB } from '../swatch.js';\n/**\n * @internal\n */\nexport const white = SwatchRGB.create(1, 1, 1);\n/**\n * @internal\n */\nexport const black = SwatchRGB.create(0, 0, 0);\n/**\n * @internal\n */\n/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\nexport const middleGrey = SwatchRGB.from(parseColorHexRGB('#808080'));\n/**\n * @internal\n */\n/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\nexport const accentBase = SwatchRGB.from(parseColorHexRGB('#DA1A5F'));\n/**\n * @internal\n */\n/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\nexport const errorBase = SwatchRGB.from(parseColorHexRGB('#D32F2F'));\n","import { black, white } from '../utilities/color-constants.js';\n/**\n * @internal\n */\nexport function foregroundOnAccent(reference, contrastTarget) {\n return reference.contrast(white) >= contrastTarget ? white : black;\n}\n","/**\n *\n * @param palette - The palette to operate on\n * @param reference - The reference color to calculate a color for\n * @param delta - The offset from the reference's location\n * @param threshold - Determines if a lighter or darker color than the reference will be picked.\n * @returns\n *\n * @internal\n */\nexport function neutralFill(palette, reference, restDelta, hoverDelta, activeDelta, focusDelta) {\n const referenceIndex = palette.closestIndexOf(reference);\n const threshold = Math.max(restDelta, hoverDelta, activeDelta, focusDelta);\n const direction = referenceIndex >= threshold ? -1 : 1;\n return {\n rest: palette.get(referenceIndex + direction * restDelta),\n hover: palette.get(referenceIndex + direction * hoverDelta),\n active: palette.get(referenceIndex + direction * activeDelta),\n focus: palette.get(referenceIndex + direction * focusDelta)\n };\n}\n","import { directionByIsDark } from '../utilities/direction-by-is-dark.js';\n/**\n * @internal\n */\nexport function neutralFillInput(palette, reference, restDelta, hoverDelta, activeDelta, focusDelta) {\n const direction = directionByIsDark(reference);\n const referenceIndex = palette.closestIndexOf(reference);\n return {\n rest: palette.get(referenceIndex - direction * restDelta),\n hover: palette.get(referenceIndex - direction * hoverDelta),\n active: palette.get(referenceIndex - direction * activeDelta),\n focus: palette.get(referenceIndex - direction * focusDelta)\n };\n}\n","/**\n * @internal\n */\nexport function neutralFillLayer(palette, reference, delta) {\n const referenceIndex = palette.closestIndexOf(reference);\n return palette.get(referenceIndex - (referenceIndex < delta ? delta * -1 : delta));\n}\n","/**\n * @internal\n */\nexport function neutralFillStealth(palette, reference, restDelta, hoverDelta, activeDelta, focusDelta, fillRestDelta, fillHoverDelta, fillActiveDelta, fillFocusDelta) {\n const swapThreshold = Math.max(restDelta, hoverDelta, activeDelta, focusDelta, fillRestDelta, fillHoverDelta, fillActiveDelta, fillFocusDelta);\n const referenceIndex = palette.closestIndexOf(reference);\n const direction = referenceIndex >= swapThreshold ? -1 : 1;\n return {\n rest: palette.get(referenceIndex + direction * restDelta),\n hover: palette.get(referenceIndex + direction * hoverDelta),\n active: palette.get(referenceIndex + direction * activeDelta),\n focus: palette.get(referenceIndex + direction * focusDelta)\n };\n}\n","import { directionByIsDark } from '../utilities/direction-by-is-dark.js';\n/**\n * @internal\n */\nexport function neutralFillContrast(palette, reference, restDelta, hoverDelta, activeDelta, focusDelta) {\n const direction = directionByIsDark(reference);\n const accessibleIndex = palette.closestIndexOf(palette.colorContrast(reference, 4.5));\n const accessibleIndex2 = accessibleIndex + direction * Math.abs(restDelta - hoverDelta);\n const indexOneIsRest = direction === 1\n ? restDelta < hoverDelta\n : direction * restDelta > direction * hoverDelta;\n let restIndex;\n let hoverIndex;\n if (indexOneIsRest) {\n restIndex = accessibleIndex;\n hoverIndex = accessibleIndex2;\n }\n else {\n restIndex = accessibleIndex2;\n hoverIndex = accessibleIndex;\n }\n return {\n rest: palette.get(restIndex),\n hover: palette.get(hoverIndex),\n active: palette.get(restIndex + direction * activeDelta),\n focus: palette.get(restIndex + direction * focusDelta)\n };\n}\n","import { directionByIsDark } from '../utilities/direction-by-is-dark.js';\n/** @internal */\nexport function focusStrokeOuter(palette, reference) {\n return palette.colorContrast(reference, 3.5);\n}\n/** @internal */\nexport function focusStrokeInner(palette, reference, focusColor) {\n return palette.colorContrast(focusColor, 3.5, palette.closestIndexOf(palette.source), (directionByIsDark(reference) * -1));\n}\n","/**\n * @internal\n */\nexport function neutralForeground(palette, reference) {\n return palette.colorContrast(reference, 14);\n}\n","/**\n * The neutralForegroundHint color recipe\n * @param palette - The palette to operate on\n * @param reference - The reference color\n *\n * @internal\n */\nexport function neutralForegroundHint(palette, reference) {\n return palette.colorContrast(reference, 4.5);\n}\n","import { baseLayerLuminanceSwatch } from '../utilities/base-layer-luminance.js';\n/**\n * @internal\n */\nexport function neutralLayerCardContainer(palette, relativeLuminance, layerDelta) {\n return palette.get(palette.closestIndexOf(baseLayerLuminanceSwatch(relativeLuminance)) +\n layerDelta);\n}\n","import { baseLayerLuminanceSwatch } from '../utilities/base-layer-luminance.js';\n/**\n * @internal\n */\nexport function neutralLayerFloating(palette, relativeLuminance, layerDelta) {\n const cardIndex = palette.closestIndexOf(baseLayerLuminanceSwatch(relativeLuminance)) -\n layerDelta;\n return palette.get(cardIndex - layerDelta);\n}\n","import { baseLayerLuminanceSwatch } from '../utilities/base-layer-luminance.js';\nexport function neutralLayer1(palette, baseLayerLuminance) {\n return palette.get(palette.closestIndexOf(baseLayerLuminanceSwatch(baseLayerLuminance)));\n}\n","import { baseLayerLuminanceSwatch } from '../utilities/base-layer-luminance.js';\n/**\n * @internal\n */\nexport function neutralLayer2Index(palette, luminance, layerDelta, fillRestDelta, fillHoverDelta, fillActiveDelta) {\n return Math.max(palette.closestIndexOf(baseLayerLuminanceSwatch(luminance)) + layerDelta, fillRestDelta, fillHoverDelta, fillActiveDelta);\n}\n/**\n * @internal\n */\nexport function neutralLayer2(palette, luminance, layerDelta, fillRestDelta, fillHoverDelta, fillActiveDelta) {\n return palette.get(neutralLayer2Index(palette, luminance, layerDelta, fillRestDelta, fillHoverDelta, fillActiveDelta));\n}\n","import { neutralLayer2Index } from './neutral-layer-2.js';\n/**\n * @internal\n */\nexport function neutralLayer3(palette, luminance, layerDelta, fillRestDelta, fillHoverDelta, fillActiveDelta) {\n return palette.get(neutralLayer2Index(palette, luminance, layerDelta, fillRestDelta, fillHoverDelta, fillActiveDelta) + layerDelta);\n}\n","import { neutralLayer2Index } from './neutral-layer-2.js';\n/**\n * @internal\n */\nexport function neutralLayer4(palette, luminance, layerDelta, fillRestDelta, fillHoverDelta, fillActiveDelta) {\n return palette.get(neutralLayer2Index(palette, luminance, layerDelta, fillRestDelta, fillHoverDelta, fillActiveDelta) +\n layerDelta * 2);\n}\n","import { directionByIsDark } from '../utilities/direction-by-is-dark.js';\n/**\n * @internal\n */\nexport function neutralStroke(palette, reference, restDelta, hoverDelta, activeDelta, focusDelta) {\n const referenceIndex = palette.closestIndexOf(reference);\n const direction = directionByIsDark(reference);\n const restIndex = referenceIndex + direction * restDelta;\n const hoverIndex = restIndex + direction * (hoverDelta - restDelta);\n const activeIndex = restIndex + direction * (activeDelta - restDelta);\n const focusIndex = restIndex + direction * (focusDelta - restDelta);\n return {\n rest: palette.get(restIndex),\n hover: palette.get(hoverIndex),\n active: palette.get(activeIndex),\n focus: palette.get(focusIndex)\n };\n}\n","import { directionByIsDark } from '../utilities/direction-by-is-dark.js';\n/**\n * The neutralStrokeDivider color recipe\n * @param palette - The palette to operate on\n * @param reference - The reference color\n * @param delta - The offset from the reference\n *\n * @internal\n */\nexport function neutralStrokeDivider(palette, reference, delta) {\n return palette.get(palette.closestIndexOf(reference) + directionByIsDark(reference) * delta);\n}\n","import { isDark } from '../utilities/is-dark.js';\nexport function errorFillAlgorithm(palette, neutralPalette, reference, hoverDelta, activeDelta, focusDelta, neutralFillRestDelta, neutralFillHoverDelta, neutralFillActiveDelta) {\n const error = palette.source;\n const referenceIndex = neutralPalette.closestIndexOf(reference);\n const swapThreshold = Math.max(neutralFillRestDelta, neutralFillHoverDelta, neutralFillActiveDelta);\n const direction = referenceIndex >= swapThreshold ? -1 : 1;\n const errorIndex = palette.closestIndexOf(error);\n const hoverIndex = errorIndex;\n const restIndex = hoverIndex + direction * -1 * hoverDelta;\n const activeIndex = restIndex + direction * activeDelta;\n const focusIndex = restIndex + direction * focusDelta;\n return {\n rest: palette.get(restIndex),\n hover: palette.get(hoverIndex),\n active: palette.get(activeIndex),\n focus: palette.get(focusIndex)\n };\n}\n/**\n * @internal\n */\nexport function errorForegroundAlgorithm(palette, reference, contrastTarget, restDelta, hoverDelta, activeDelta, focusDelta) {\n const error = palette.source;\n const errorIndex = palette.closestIndexOf(error);\n const direction = isDark(reference) ? -1 : 1;\n const startIndex = errorIndex +\n (direction === 1\n ? Math.min(restDelta, hoverDelta)\n : Math.max(direction * restDelta, direction * hoverDelta));\n const accessibleSwatch = palette.colorContrast(reference, contrastTarget, startIndex, direction);\n const accessibleIndex1 = palette.closestIndexOf(accessibleSwatch);\n const accessibleIndex2 = accessibleIndex1 + direction * Math.abs(restDelta - hoverDelta);\n const indexOneIsRestState = direction === 1\n ? restDelta < hoverDelta\n : direction * restDelta > direction * hoverDelta;\n let restIndex;\n let hoverIndex;\n if (indexOneIsRestState) {\n restIndex = accessibleIndex1;\n hoverIndex = accessibleIndex2;\n }\n else {\n restIndex = accessibleIndex2;\n hoverIndex = accessibleIndex1;\n }\n return {\n rest: palette.get(restIndex),\n hover: palette.get(hoverIndex),\n active: palette.get(restIndex + direction * activeDelta),\n focus: palette.get(restIndex + direction * focusDelta)\n };\n}\n","import { black, white } from '../utilities/color-constants.js';\n/**\n * @internal\n */\nexport function foregroundOnErrorAlgorithm(reference, contrastTarget) {\n return reference.contrast(white) >= contrastTarget ? white : black;\n}\n","// Copyright (c) Jupyter Development Team.\n// Copyright (c) Microsoft Corporation.\n// Distributed under the terms of the Modified BSD License.\nimport { DesignToken } from '@microsoft/fast-foundation';\nimport { Direction } from '@microsoft/fast-web-utilities';\nimport { PaletteRGB } from './color/palette.js';\nimport { accentFill as accentFillAlgorithm } from './color/recipes/accent-fill.js';\nimport { accentForeground as accentForegroundAlgorithm } from './color/recipes/accent-foreground.js';\nimport { foregroundOnAccent as foregroundOnAccentAlgorithm } from './color/recipes/foreground-on-accent.js';\nimport { neutralFill as neutralFillAlgorithm } from './color/recipes/neutral-fill.js';\nimport { neutralFillInput as neutralFillInputAlgorithm } from './color/recipes/neutral-fill-input.js';\nimport { neutralFillLayer as neutralFillLayerAlgorithm } from './color/recipes/neutral-fill-layer.js';\nimport { neutralFillStealth as neutralFillStealthAlgorithm } from './color/recipes/neutral-fill-stealth.js';\nimport { neutralFillContrast as neutralFillContrastAlgorithm } from './color/recipes/neutral-fill-contrast.js';\nimport { focusStrokeInner as focusStrokeInnerAlgorithm, focusStrokeOuter as focusStrokeOuterAlgorithm } from './color/recipes/focus-stroke.js';\nimport { neutralForeground as neutralForegroundAlgorithm } from './color/recipes/neutral-foreground.js';\nimport { neutralForegroundHint as neutralForegroundHintAlgorithm } from './color/recipes/neutral-foreground-hint.js';\nimport { neutralLayerCardContainer as neutralLayerCardContainerAlgorithm } from './color/recipes/neutral-layer-card-container.js';\nimport { neutralLayerFloating as neutralLayerFloatingAlgorithm } from './color/recipes/neutral-layer-floating.js';\nimport { neutralLayer1 as neutralLayer1Algorithm } from './color/recipes/neutral-layer-1.js';\nimport { neutralLayer2 as neutralLayer2Algorithm } from './color/recipes/neutral-layer-2.js';\nimport { neutralLayer3 as neutralLayer3Algorithm } from './color/recipes/neutral-layer-3.js';\nimport { neutralLayer4 as neutralLayer4Algorithm } from './color/recipes/neutral-layer-4.js';\nimport { neutralStroke as neutralStrokeAlgorithm } from './color/recipes/neutral-stroke.js';\nimport { neutralStrokeDivider as neutralStrokeDividerAlgorithm } from './color/recipes/neutral-stroke-divider.js';\nimport { StandardLuminance } from './color/utilities/base-layer-luminance.js';\nimport { accentBase, errorBase, middleGrey } from './color/utilities/color-constants.js';\nimport { errorFillAlgorithm, errorForegroundAlgorithm } from './color/recipes/error-fill.js';\nimport { foregroundOnErrorAlgorithm } from './color/recipes/foreground-on-error.js';\nconst { create } = DesignToken;\nfunction createNonCss(name) {\n return DesignToken.create({ name, cssCustomPropertyName: null });\n}\n// General tokens\n/** @public */\nexport const bodyFont = create('body-font').withDefault('aktiv-grotesk, \"Segoe UI\", Arial, Helvetica, sans-serif');\n/** @public */\nexport const baseHeightMultiplier = create('base-height-multiplier').withDefault(10);\n/** @public */\nexport const baseHorizontalSpacingMultiplier = create('base-horizontal-spacing-multiplier').withDefault(3);\n/** @public */\nexport const baseLayerLuminance = create('base-layer-luminance').withDefault(StandardLuminance.DarkMode);\n/** @public */\nexport const controlCornerRadius = create('control-corner-radius').withDefault(4);\n/** @public */\nexport const density = create('density').withDefault(0);\n/** @public */\nexport const designUnit = create('design-unit').withDefault(4);\n/**\n * Adds to the density on specified element.\n *\n * @private\n */\nexport const elementScale = create('element-scale').withDefault(0);\n/** @public */\nexport const direction = create('direction').withDefault(Direction.ltr);\n/** @public */\nexport const disabledOpacity = create('disabled-opacity').withDefault(0.4);\n/** @public */\nexport const strokeWidth = create('stroke-width').withDefault(1);\n/** @public */\nexport const focusStrokeWidth = create('focus-stroke-width').withDefault(2);\n// Typography values\n/** @public */\nexport const typeRampBaseFontSize = create('type-ramp-base-font-size').withDefault('14px');\n/** @public */\nexport const typeRampBaseLineHeight = create('type-ramp-base-line-height').withDefault('20px');\n/** @public */\nexport const typeRampMinus1FontSize = create('type-ramp-minus-1-font-size').withDefault('12px');\n/** @public */\nexport const typeRampMinus1LineHeight = create('type-ramp-minus-1-line-height').withDefault('16px');\n/** @public */\nexport const typeRampMinus2FontSize = create('type-ramp-minus-2-font-size').withDefault('10px');\n/** @public */\nexport const typeRampMinus2LineHeight = create('type-ramp-minus-2-line-height').withDefault('16px');\n/** @public */\nexport const typeRampPlus1FontSize = create('type-ramp-plus-1-font-size').withDefault('16px');\n/** @public */\nexport const typeRampPlus1LineHeight = create('type-ramp-plus-1-line-height').withDefault('24px');\n/** @public */\nexport const typeRampPlus2FontSize = create('type-ramp-plus-2-font-size').withDefault('20px');\n/** @public */\nexport const typeRampPlus2LineHeight = create('type-ramp-plus-2-line-height').withDefault('28px');\n/** @public */\nexport const typeRampPlus3FontSize = create('type-ramp-plus-3-font-size').withDefault('28px');\n/** @public */\nexport const typeRampPlus3LineHeight = create('type-ramp-plus-3-line-height').withDefault('36px');\n/** @public */\nexport const typeRampPlus4FontSize = create('type-ramp-plus-4-font-size').withDefault('34px');\n/** @public */\nexport const typeRampPlus4LineHeight = create('type-ramp-plus-4-line-height').withDefault('44px');\n/** @public */\nexport const typeRampPlus5FontSize = create('type-ramp-plus-5-font-size').withDefault('46px');\n/** @public */\nexport const typeRampPlus5LineHeight = create('type-ramp-plus-5-line-height').withDefault('56px');\n/** @public */\nexport const typeRampPlus6FontSize = create('type-ramp-plus-6-font-size').withDefault('60px');\n/** @public */\nexport const typeRampPlus6LineHeight = create('type-ramp-plus-6-line-height').withDefault('72px');\n// Color recipe values\n/** @public */\nexport const accentFillRestDelta = createNonCss('accent-fill-rest-delta').withDefault(0);\n/** @public */\nexport const accentFillHoverDelta = createNonCss('accent-fill-hover-delta').withDefault(4);\n/** @public */\nexport const accentFillActiveDelta = createNonCss('accent-fill-active-delta').withDefault(-5);\n/** @public */\nexport const accentFillFocusDelta = createNonCss('accent-fill-focus-delta').withDefault(0);\n/** @public */\nexport const accentForegroundRestDelta = createNonCss('accent-foreground-rest-delta').withDefault(0);\n/** @public */\nexport const accentForegroundHoverDelta = createNonCss('accent-foreground-hover-delta').withDefault(6);\n/** @public */\nexport const accentForegroundActiveDelta = createNonCss('accent-foreground-active-delta').withDefault(-4);\n/** @public */\nexport const accentForegroundFocusDelta = createNonCss('accent-foreground-focus-delta').withDefault(0);\n/** @public */\nexport const neutralFillRestDelta = createNonCss('neutral-fill-rest-delta').withDefault(7);\n/** @public */\nexport const neutralFillHoverDelta = createNonCss('neutral-fill-hover-delta').withDefault(10);\n/** @public */\nexport const neutralFillActiveDelta = createNonCss('neutral-fill-active-delta').withDefault(5);\n/** @public */\nexport const neutralFillFocusDelta = createNonCss('neutral-fill-focus-delta').withDefault(0);\n/** @public */\nexport const neutralFillInputRestDelta = createNonCss('neutral-fill-input-rest-delta').withDefault(0);\n/** @public */\nexport const neutralFillInputHoverDelta = createNonCss('neutral-fill-input-hover-delta').withDefault(0);\n/** @public */\nexport const neutralFillInputActiveDelta = createNonCss('neutral-fill-input-active-delta').withDefault(0);\n/** @public */\nexport const neutralFillInputFocusDelta = createNonCss('neutral-fill-input-focus-delta').withDefault(0);\n/** @public */\nexport const neutralFillStealthRestDelta = createNonCss('neutral-fill-stealth-rest-delta').withDefault(0);\n/** @public */\nexport const neutralFillStealthHoverDelta = createNonCss('neutral-fill-stealth-hover-delta').withDefault(5);\n/** @public */\nexport const neutralFillStealthActiveDelta = createNonCss('neutral-fill-stealth-active-delta').withDefault(3);\n/** @public */\nexport const neutralFillStealthFocusDelta = createNonCss('neutral-fill-stealth-focus-delta').withDefault(0);\n/** @public */\nexport const neutralFillStrongRestDelta = createNonCss('neutral-fill-strong-rest-delta').withDefault(0);\n/** @public */\nexport const neutralFillStrongHoverDelta = createNonCss('neutral-fill-strong-hover-delta').withDefault(8);\n/** @public */\nexport const neutralFillStrongActiveDelta = createNonCss('neutral-fill-strong-active-delta').withDefault(-5);\n/** @public */\nexport const neutralFillStrongFocusDelta = createNonCss('neutral-fill-strong-focus-delta').withDefault(0);\n/** @public */\nexport const neutralFillLayerRestDelta = createNonCss('neutral-fill-layer-rest-delta').withDefault(3);\n/** @public */\nexport const neutralStrokeRestDelta = createNonCss('neutral-stroke-rest-delta').withDefault(25);\n/** @public */\nexport const neutralStrokeHoverDelta = createNonCss('neutral-stroke-hover-delta').withDefault(40);\n/** @public */\nexport const neutralStrokeActiveDelta = createNonCss('neutral-stroke-active-delta').withDefault(16);\n/** @public */\nexport const neutralStrokeFocusDelta = createNonCss('neutral-stroke-focus-delta').withDefault(25);\n/** @public */\nexport const neutralStrokeDividerRestDelta = createNonCss('neutral-stroke-divider-rest-delta').withDefault(8);\n// Color recipes\n/** @public */\nexport const neutralColor = create('neutral-color').withDefault(middleGrey);\n/** @public */\nexport const neutralPalette = createNonCss('neutral-palette').withDefault((element) => PaletteRGB.from(neutralColor.getValueFor(element)));\n/** @public */\nexport const accentColor = create('accent-color').withDefault(accentBase);\n/** @public */\nexport const accentPalette = createNonCss('accent-palette').withDefault((element) => PaletteRGB.from(accentColor.getValueFor(element)));\n// Neutral Layer Card Container\n/** @public */\nexport const neutralLayerCardContainerRecipe = createNonCss('neutral-layer-card-container-recipe').withDefault({\n evaluate: (element) => neutralLayerCardContainerAlgorithm(neutralPalette.getValueFor(element), baseLayerLuminance.getValueFor(element), neutralFillLayerRestDelta.getValueFor(element))\n});\n/** @public */\nexport const neutralLayerCardContainer = create('neutral-layer-card-container').withDefault((element) => neutralLayerCardContainerRecipe.getValueFor(element).evaluate(element));\n// Neutral Layer Floating\n/** @public */\nexport const neutralLayerFloatingRecipe = createNonCss('neutral-layer-floating-recipe').withDefault({\n evaluate: (element) => neutralLayerFloatingAlgorithm(neutralPalette.getValueFor(element), baseLayerLuminance.getValueFor(element), neutralFillLayerRestDelta.getValueFor(element))\n});\n/** @public */\nexport const neutralLayerFloating = create('neutral-layer-floating').withDefault((element) => neutralLayerFloatingRecipe.getValueFor(element).evaluate(element));\n// Neutral Layer 1\n/** @public */\nexport const neutralLayer1Recipe = createNonCss('neutral-layer-1-recipe').withDefault({\n evaluate: (element) => neutralLayer1Algorithm(neutralPalette.getValueFor(element), baseLayerLuminance.getValueFor(element))\n});\n/** @public */\nexport const neutralLayer1 = create('neutral-layer-1').withDefault((element) => neutralLayer1Recipe.getValueFor(element).evaluate(element));\n// Neutral Layer 2\n/** @public */\nexport const neutralLayer2Recipe = createNonCss('neutral-layer-2-recipe').withDefault({\n evaluate: (element) => neutralLayer2Algorithm(neutralPalette.getValueFor(element), baseLayerLuminance.getValueFor(element), neutralFillLayerRestDelta.getValueFor(element), neutralFillRestDelta.getValueFor(element), neutralFillHoverDelta.getValueFor(element), neutralFillActiveDelta.getValueFor(element))\n});\n/** @public */\nexport const neutralLayer2 = create('neutral-layer-2').withDefault((element) => neutralLayer2Recipe.getValueFor(element).evaluate(element));\n// Neutral Layer 3\n/** @public */\nexport const neutralLayer3Recipe = createNonCss('neutral-layer-3-recipe').withDefault({\n evaluate: (element) => neutralLayer3Algorithm(neutralPalette.getValueFor(element), baseLayerLuminance.getValueFor(element), neutralFillLayerRestDelta.getValueFor(element), neutralFillRestDelta.getValueFor(element), neutralFillHoverDelta.getValueFor(element), neutralFillActiveDelta.getValueFor(element))\n});\n/** @public */\nexport const neutralLayer3 = create('neutral-layer-3').withDefault((element) => neutralLayer3Recipe.getValueFor(element).evaluate(element));\n// Neutral Layer 4\n/** @public */\nexport const neutralLayer4Recipe = createNonCss('neutral-layer-4-recipe').withDefault({\n evaluate: (element) => neutralLayer4Algorithm(neutralPalette.getValueFor(element), baseLayerLuminance.getValueFor(element), neutralFillLayerRestDelta.getValueFor(element), neutralFillRestDelta.getValueFor(element), neutralFillHoverDelta.getValueFor(element), neutralFillActiveDelta.getValueFor(element))\n});\n/** @public */\nexport const neutralLayer4 = create('neutral-layer-4').withDefault((element) => neutralLayer4Recipe.getValueFor(element).evaluate(element));\n/** @public */\nexport const fillColor = create('fill-color').withDefault(element => neutralLayer1.getValueFor(element));\nvar ContrastTarget;\n(function (ContrastTarget) {\n ContrastTarget[ContrastTarget[\"normal\"] = 4.5] = \"normal\";\n ContrastTarget[ContrastTarget[\"large\"] = 7] = \"large\";\n})(ContrastTarget || (ContrastTarget = {}));\n// Accent Fill\n/** @public */\nexport const accentFillRecipe = create({\n name: 'accent-fill-recipe',\n cssCustomPropertyName: null\n}).withDefault({\n evaluate: (element, reference) => accentFillAlgorithm(accentPalette.getValueFor(element), neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), accentFillHoverDelta.getValueFor(element), accentFillActiveDelta.getValueFor(element), accentFillFocusDelta.getValueFor(element), neutralFillRestDelta.getValueFor(element), neutralFillHoverDelta.getValueFor(element), neutralFillActiveDelta.getValueFor(element))\n});\n/** @public */\nexport const accentFillRest = create('accent-fill-rest').withDefault((element) => {\n return accentFillRecipe.getValueFor(element).evaluate(element).rest;\n});\n/** @public */\nexport const accentFillHover = create('accent-fill-hover').withDefault((element) => {\n return accentFillRecipe.getValueFor(element).evaluate(element).hover;\n});\n/** @public */\nexport const accentFillActive = create('accent-fill-active').withDefault((element) => {\n return accentFillRecipe.getValueFor(element).evaluate(element).active;\n});\n/** @public */\nexport const accentFillFocus = create('accent-fill-focus').withDefault((element) => {\n return accentFillRecipe.getValueFor(element).evaluate(element).focus;\n});\n// Foreground On Accent\nconst foregroundOnAccentByContrast = (contrast) => (element, reference) => {\n return foregroundOnAccentAlgorithm(reference || accentFillRest.getValueFor(element), contrast);\n};\n/** @public */\nexport const foregroundOnAccentRecipe = createNonCss('foreground-on-accent-recipe').withDefault({\n evaluate: (element, reference) => foregroundOnAccentByContrast(ContrastTarget.normal)(element, reference)\n});\n/** @public */\nexport const foregroundOnAccentRest = create('foreground-on-accent-rest').withDefault((element) => foregroundOnAccentRecipe\n .getValueFor(element)\n .evaluate(element, accentFillRest.getValueFor(element)));\n/** @public */\nexport const foregroundOnAccentHover = create('foreground-on-accent-hover').withDefault((element) => foregroundOnAccentRecipe\n .getValueFor(element)\n .evaluate(element, accentFillHover.getValueFor(element)));\n/** @public */\nexport const foregroundOnAccentActive = create('foreground-on-accent-active').withDefault((element) => foregroundOnAccentRecipe\n .getValueFor(element)\n .evaluate(element, accentFillActive.getValueFor(element)));\n/** @public */\nexport const foregroundOnAccentFocus = create('foreground-on-accent-focus').withDefault((element) => foregroundOnAccentRecipe\n .getValueFor(element)\n .evaluate(element, accentFillFocus.getValueFor(element)));\n/** @public */\nexport const foregroundOnAccentLargeRecipe = createNonCss('foreground-on-accent-large-recipe').withDefault({\n evaluate: (element, reference) => foregroundOnAccentByContrast(ContrastTarget.large)(element, reference)\n});\n/** @public */\nexport const foregroundOnAccentRestLarge = create('foreground-on-accent-rest-large').withDefault((element) => foregroundOnAccentLargeRecipe\n .getValueFor(element)\n .evaluate(element, accentFillRest.getValueFor(element)));\n/** @public */\nexport const foregroundOnAccentHoverLarge = create('foreground-on-accent-hover-large').withDefault((element) => foregroundOnAccentLargeRecipe\n .getValueFor(element)\n .evaluate(element, accentFillHover.getValueFor(element)));\n/** @public */\nexport const foregroundOnAccentActiveLarge = create('foreground-on-accent-active-large').withDefault((element) => foregroundOnAccentLargeRecipe\n .getValueFor(element)\n .evaluate(element, accentFillActive.getValueFor(element)));\n/** @public */\nexport const foregroundOnAccentFocusLarge = create('foreground-on-accent-focus-large').withDefault((element) => foregroundOnAccentLargeRecipe\n .getValueFor(element)\n .evaluate(element, accentFillFocus.getValueFor(element)));\n// Accent Foreground\nconst accentForegroundByContrast = (contrast) => (element, reference) => accentForegroundAlgorithm(accentPalette.getValueFor(element), reference || fillColor.getValueFor(element), contrast, accentForegroundRestDelta.getValueFor(element), accentForegroundHoverDelta.getValueFor(element), accentForegroundActiveDelta.getValueFor(element), accentForegroundFocusDelta.getValueFor(element));\n/** @public */\nexport const accentForegroundRecipe = create({\n name: 'accent-foreground-recipe',\n cssCustomPropertyName: null\n}).withDefault({\n evaluate: (element, reference) => accentForegroundByContrast(ContrastTarget.normal)(element, reference)\n});\n/** @public */\nexport const accentForegroundRest = create('accent-foreground-rest').withDefault((element) => accentForegroundRecipe.getValueFor(element).evaluate(element).rest);\n/** @public */\nexport const accentForegroundHover = create('accent-foreground-hover').withDefault((element) => accentForegroundRecipe.getValueFor(element).evaluate(element).hover);\n/** @public */\nexport const accentForegroundActive = create('accent-foreground-active').withDefault((element) => accentForegroundRecipe.getValueFor(element).evaluate(element).active);\n/** @public */\nexport const accentForegroundFocus = create('accent-foreground-focus').withDefault((element) => accentForegroundRecipe.getValueFor(element).evaluate(element).focus);\n// Neutral Fill\n/** @public */\nexport const neutralFillRecipe = create({\n name: 'neutral-fill-recipe',\n cssCustomPropertyName: null\n}).withDefault({\n evaluate: (element, reference) => neutralFillAlgorithm(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), neutralFillRestDelta.getValueFor(element), neutralFillHoverDelta.getValueFor(element), neutralFillActiveDelta.getValueFor(element), neutralFillFocusDelta.getValueFor(element))\n});\n/** @public */\nexport const neutralFillRest = create('neutral-fill-rest').withDefault((element) => neutralFillRecipe.getValueFor(element).evaluate(element).rest);\n/** @public */\nexport const neutralFillHover = create('neutral-fill-hover').withDefault((element) => neutralFillRecipe.getValueFor(element).evaluate(element).hover);\n/** @public */\nexport const neutralFillActive = create('neutral-fill-active').withDefault((element) => neutralFillRecipe.getValueFor(element).evaluate(element).active);\n/** @public */\nexport const neutralFillFocus = create('neutral-fill-focus').withDefault((element) => neutralFillRecipe.getValueFor(element).evaluate(element).focus);\n// Neutral Fill Input\n/** @public */\nexport const neutralFillInputRecipe = create({\n name: 'neutral-fill-input-recipe',\n cssCustomPropertyName: null\n}).withDefault({\n evaluate: (element, reference) => neutralFillInputAlgorithm(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), neutralFillInputRestDelta.getValueFor(element), neutralFillInputHoverDelta.getValueFor(element), neutralFillInputActiveDelta.getValueFor(element), neutralFillInputFocusDelta.getValueFor(element))\n});\n/** @public */\nexport const neutralFillInputRest = create('neutral-fill-input-rest').withDefault((element) => neutralFillInputRecipe.getValueFor(element).evaluate(element).rest);\n/** @public */\nexport const neutralFillInputHover = create('neutral-fill-input-hover').withDefault((element) => neutralFillInputRecipe.getValueFor(element).evaluate(element).hover);\n/** @public */\nexport const neutralFillInputActive = create('neutral-fill-input-active').withDefault((element) => neutralFillInputRecipe.getValueFor(element).evaluate(element).active);\n/** @public */\nexport const neutralFillInputFocus = create('neutral-fill-input-focus').withDefault((element) => neutralFillInputRecipe.getValueFor(element).evaluate(element).focus);\n// Neutral Fill Stealth\n/** @public */\nexport const neutralFillStealthRecipe = create({\n name: 'neutral-fill-stealth-recipe',\n cssCustomPropertyName: null\n}).withDefault({\n evaluate: (element, reference) => neutralFillStealthAlgorithm(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), neutralFillStealthRestDelta.getValueFor(element), neutralFillStealthHoverDelta.getValueFor(element), neutralFillStealthActiveDelta.getValueFor(element), neutralFillStealthFocusDelta.getValueFor(element), neutralFillRestDelta.getValueFor(element), neutralFillHoverDelta.getValueFor(element), neutralFillActiveDelta.getValueFor(element), neutralFillFocusDelta.getValueFor(element))\n});\n/** @public */\nexport const neutralFillStealthRest = create('neutral-fill-stealth-rest').withDefault((element) => neutralFillStealthRecipe.getValueFor(element).evaluate(element).rest);\n/** @public */\nexport const neutralFillStealthHover = create('neutral-fill-stealth-hover').withDefault((element) => neutralFillStealthRecipe.getValueFor(element).evaluate(element).hover);\n/** @public */\nexport const neutralFillStealthActive = create('neutral-fill-stealth-active').withDefault((element) => neutralFillStealthRecipe.getValueFor(element).evaluate(element).active);\n/** @public */\nexport const neutralFillStealthFocus = create('neutral-fill-stealth-focus').withDefault((element) => neutralFillStealthRecipe.getValueFor(element).evaluate(element).focus);\n// Neutral Fill Strong\n/** @public */\nexport const neutralFillStrongRecipe = create({\n name: 'neutral-fill-strong-recipe',\n cssCustomPropertyName: null\n}).withDefault({\n evaluate: (element, reference) => neutralFillContrastAlgorithm(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), neutralFillStrongRestDelta.getValueFor(element), neutralFillStrongHoverDelta.getValueFor(element), neutralFillStrongActiveDelta.getValueFor(element), neutralFillStrongFocusDelta.getValueFor(element))\n});\n/** @public */\nexport const neutralFillStrongRest = create('neutral-fill-strong-rest').withDefault((element) => neutralFillStrongRecipe.getValueFor(element).evaluate(element).rest);\n/** @public */\nexport const neutralFillStrongHover = create('neutral-fill-strong-hover').withDefault((element) => neutralFillStrongRecipe.getValueFor(element).evaluate(element).hover);\n/** @public */\nexport const neutralFillStrongActive = create('neutral-fill-strong-active').withDefault((element) => neutralFillStrongRecipe.getValueFor(element).evaluate(element).active);\n/** @public */\nexport const neutralFillStrongFocus = create('neutral-fill-strong-focus').withDefault((element) => neutralFillStrongRecipe.getValueFor(element).evaluate(element).focus);\n// Neutral Fill Layer\n/** @public */\nexport const neutralFillLayerRecipe = createNonCss('neutral-fill-layer-recipe').withDefault({\n evaluate: (element, reference) => neutralFillLayerAlgorithm(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), neutralFillLayerRestDelta.getValueFor(element))\n});\n/** @public */\nexport const neutralFillLayerRest = create('neutral-fill-layer-rest').withDefault((element) => neutralFillLayerRecipe.getValueFor(element).evaluate(element));\n// Focus Stroke Outer\n/** @public */\nexport const focusStrokeOuterRecipe = createNonCss('focus-stroke-outer-recipe').withDefault({\n evaluate: (element) => focusStrokeOuterAlgorithm(neutralPalette.getValueFor(element), fillColor.getValueFor(element))\n});\n/** @public */\nexport const focusStrokeOuter = create('focus-stroke-outer').withDefault((element) => focusStrokeOuterRecipe.getValueFor(element).evaluate(element));\n// Focus Stroke Inner\n/** @public */\nexport const focusStrokeInnerRecipe = createNonCss('focus-stroke-inner-recipe').withDefault({\n evaluate: (element) => focusStrokeInnerAlgorithm(accentPalette.getValueFor(element), fillColor.getValueFor(element), focusStrokeOuter.getValueFor(element))\n});\n/** @public */\nexport const focusStrokeInner = create('focus-stroke-inner').withDefault((element) => focusStrokeInnerRecipe.getValueFor(element).evaluate(element));\n// Neutral Foreground Hint\n/** @public */\nexport const neutralForegroundHintRecipe = createNonCss('neutral-foreground-hint-recipe').withDefault({\n evaluate: (element) => neutralForegroundHintAlgorithm(neutralPalette.getValueFor(element), fillColor.getValueFor(element))\n});\n/** @public */\nexport const neutralForegroundHint = create('neutral-foreground-hint').withDefault((element) => neutralForegroundHintRecipe.getValueFor(element).evaluate(element));\n// Neutral Foreground\n/** @public */\nexport const neutralForegroundRecipe = createNonCss('neutral-foreground-recipe').withDefault({\n evaluate: (element) => neutralForegroundAlgorithm(neutralPalette.getValueFor(element), fillColor.getValueFor(element))\n});\n/** @public */\nexport const neutralForegroundRest = create('neutral-foreground-rest').withDefault((element) => neutralForegroundRecipe.getValueFor(element).evaluate(element));\n// Neutral Stroke\n/** @public */\nexport const neutralStrokeRecipe = create({\n name: 'neutral-stroke-recipe',\n cssCustomPropertyName: null\n}).withDefault({\n evaluate: (element) => {\n return neutralStrokeAlgorithm(neutralPalette.getValueFor(element), fillColor.getValueFor(element), neutralStrokeRestDelta.getValueFor(element), neutralStrokeHoverDelta.getValueFor(element), neutralStrokeActiveDelta.getValueFor(element), neutralStrokeFocusDelta.getValueFor(element));\n }\n});\n/** @public */\nexport const neutralStrokeRest = create('neutral-stroke-rest').withDefault((element) => neutralStrokeRecipe.getValueFor(element).evaluate(element).rest);\n/** @public */\nexport const neutralStrokeHover = create('neutral-stroke-hover').withDefault((element) => neutralStrokeRecipe.getValueFor(element).evaluate(element).hover);\n/** @public */\nexport const neutralStrokeActive = create('neutral-stroke-active').withDefault((element) => neutralStrokeRecipe.getValueFor(element).evaluate(element).active);\n/** @public */\nexport const neutralStrokeFocus = create('neutral-stroke-focus').withDefault((element) => neutralStrokeRecipe.getValueFor(element).evaluate(element).focus);\n// Neutral Stroke Divider\n/** @public */\nexport const neutralStrokeDividerRecipe = createNonCss('neutral-stroke-divider-recipe').withDefault({\n evaluate: (element, reference) => neutralStrokeDividerAlgorithm(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), neutralStrokeDividerRestDelta.getValueFor(element))\n});\n/** @public */\nexport const neutralStrokeDividerRest = create('neutral-stroke-divider-rest').withDefault(element => neutralStrokeDividerRecipe.getValueFor(element).evaluate(element));\n/**\n * The control height formula expressed as a design token.\n * This token does not provide a CSS custom property.\n *\n * @public\n */\nexport const heightNumberAsToken = DesignToken.create({\n name: 'height-number',\n cssCustomPropertyName: null\n}).withDefault(target => (baseHeightMultiplier.getValueFor(target) + density.getValueFor(target)) *\n designUnit.getValueFor(target));\n/*\n * The error palette is built using the same color algorithm as the accent palette\n * But by copying the algorithm from @microsoft/fast-components at commit 03d711f222bd816834a5e1d60256d3e083b27c27\n * as some helpers are not exported.\n * The delta used are those of the accent palette.\n */\n/** @public */\nexport const errorColor = create('error-color').withDefault(errorBase);\n/**\n * Error palette\n * @public\n */\nexport const errorPalette = createNonCss('error-palette').withDefault((element) => PaletteRGB.from(errorColor.getValueFor(element)));\n// Error Fill\n/** @public */\nexport const errorFillRecipe = create({\n name: 'error-fill-recipe',\n cssCustomPropertyName: null\n}).withDefault({\n evaluate: (element, reference) => errorFillAlgorithm(errorPalette.getValueFor(element), neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), accentFillHoverDelta.getValueFor(element), accentFillActiveDelta.getValueFor(element), accentFillFocusDelta.getValueFor(element), neutralFillRestDelta.getValueFor(element), neutralFillHoverDelta.getValueFor(element), neutralFillActiveDelta.getValueFor(element))\n});\n/** @public */\nexport const errorFillRest = create('error-fill-rest').withDefault((element) => {\n return errorFillRecipe.getValueFor(element).evaluate(element).rest;\n});\n/** @public */\nexport const errorFillHover = create('error-fill-hover').withDefault((element) => {\n return errorFillRecipe.getValueFor(element).evaluate(element).hover;\n});\n/** @public */\nexport const errorFillActive = create('error-fill-active').withDefault((element) => {\n return errorFillRecipe.getValueFor(element).evaluate(element).active;\n});\n/** @public */\nexport const errorFillFocus = create('error-fill-focus').withDefault((element) => {\n return errorFillRecipe.getValueFor(element).evaluate(element).focus;\n});\n// Foreground On Error\nconst foregroundOnErrorByContrast = (contrast) => (element, reference) => {\n return foregroundOnErrorAlgorithm(reference || errorFillRest.getValueFor(element), contrast);\n};\n/** @public */\nexport const foregroundOnErrorRecipe = create({\n name: 'foreground-on-error-recipe',\n cssCustomPropertyName: null\n}).withDefault({\n evaluate: (element, reference) => foregroundOnErrorByContrast(ContrastTarget.normal)(element, reference)\n});\n/** @public */\nexport const foregroundOnErrorRest = create('foreground-on-error-rest').withDefault((element) => foregroundOnErrorRecipe\n .getValueFor(element)\n .evaluate(element, errorFillRest.getValueFor(element)));\n/** @public */\nexport const foregroundOnErrorHover = create('foreground-on-error-hover').withDefault((element) => foregroundOnErrorRecipe\n .getValueFor(element)\n .evaluate(element, errorFillHover.getValueFor(element)));\n/** @public */\nexport const foregroundOnErrorActive = create('foreground-on-error-active').withDefault((element) => foregroundOnErrorRecipe\n .getValueFor(element)\n .evaluate(element, errorFillActive.getValueFor(element)));\n/** @public */\nexport const foregroundOnErrorFocus = create('foreground-on-error-focus').withDefault((element) => foregroundOnErrorRecipe\n .getValueFor(element)\n .evaluate(element, errorFillFocus.getValueFor(element)));\n/** @public */\nexport const foregroundOnErrorLargeRecipe = create({\n name: 'foreground-on-error-large-recipe',\n cssCustomPropertyName: null\n}).withDefault({\n evaluate: (element, reference) => foregroundOnErrorByContrast(ContrastTarget.large)(element, reference)\n});\n/** @public */\nexport const foregroundOnErrorRestLarge = create('foreground-on-error-rest-large').withDefault((element) => foregroundOnErrorLargeRecipe\n .getValueFor(element)\n .evaluate(element, errorFillRest.getValueFor(element)));\n/** @public */\nexport const foregroundOnErrorHoverLarge = create('foreground-on-error-hover-large').withDefault((element) => foregroundOnErrorLargeRecipe\n .getValueFor(element)\n .evaluate(element, errorFillHover.getValueFor(element)));\n/** @public */\nexport const foregroundOnErrorActiveLarge = create('foreground-on-error-active-large').withDefault((element) => foregroundOnErrorLargeRecipe\n .getValueFor(element)\n .evaluate(element, errorFillActive.getValueFor(element)));\n/** @public */\nexport const foregroundOnErrorFocusLarge = create('foreground-on-error-focus-large').withDefault((element) => foregroundOnErrorLargeRecipe\n .getValueFor(element)\n .evaluate(element, errorFillFocus.getValueFor(element)));\n// Error Foreground\nconst errorForegroundByContrast = (contrast) => (element, reference) => errorForegroundAlgorithm(errorPalette.getValueFor(element), reference || fillColor.getValueFor(element), contrast, accentForegroundRestDelta.getValueFor(element), accentForegroundHoverDelta.getValueFor(element), accentForegroundActiveDelta.getValueFor(element), accentForegroundFocusDelta.getValueFor(element));\n/** @public */\nexport const errorForegroundRecipe = create({\n name: 'error-foreground-recipe',\n cssCustomPropertyName: null\n}).withDefault({\n evaluate: (element, reference) => errorForegroundByContrast(ContrastTarget.normal)(element, reference)\n});\n/** @public */\nexport const errorForegroundRest = create('error-foreground-rest').withDefault((element) => errorForegroundRecipe.getValueFor(element).evaluate(element).rest);\n/** @public */\nexport const errorForegroundHover = create('error-foreground-hover').withDefault((element) => errorForegroundRecipe.getValueFor(element).evaluate(element).hover);\n/** @public */\nexport const errorForegroundActive = create('error-foreground-active').withDefault((element) => errorForegroundRecipe.getValueFor(element).evaluate(element).active);\n/** @public */\nexport const errorForegroundFocus = create('error-foreground-focus').withDefault((element) => errorForegroundRecipe.getValueFor(element).evaluate(element).focus);\n","import { FASTElementDefinition } from \"@microsoft/fast-element\";\nimport { FoundationElement } from \"../foundation-element/foundation-element.js\";\nimport { DI, Registration } from \"../di/di.js\";\nimport { DesignToken } from \"../design-token/design-token.js\";\nimport { ComponentPresentation } from \"./component-presentation.js\";\n/* eslint-disable @typescript-eslint/no-non-null-assertion */\n/**\n * Indicates what to do with an ambiguous (duplicate) element.\n * @public\n */\nexport const ElementDisambiguation = Object.freeze({\n /**\n * Skip defining the element but still call the provided callback passed\n * to DesignSystemRegistrationContext.tryDefineElement\n */\n definitionCallbackOnly: null,\n /**\n * Ignore the duplicate element entirely.\n */\n ignoreDuplicate: Symbol(),\n});\nconst elementTypesByTag = new Map();\nconst elementTagsByType = new Map();\nlet rootDesignSystem = null;\nconst designSystemKey = DI.createInterface(x => x.cachedCallback(handler => {\n if (rootDesignSystem === null) {\n rootDesignSystem = new DefaultDesignSystem(null, handler);\n }\n return rootDesignSystem;\n}));\n/**\n * An API gateway to design system features.\n * @public\n */\nexport const DesignSystem = Object.freeze({\n /**\n * Returns the HTML element name that the type is defined as.\n * @param type - The type to lookup.\n * @public\n */\n tagFor(type) {\n return elementTagsByType.get(type);\n },\n /**\n * Searches the DOM hierarchy for the design system that is responsible\n * for the provided element.\n * @param element - The element to locate the design system for.\n * @returns The located design system.\n * @public\n */\n responsibleFor(element) {\n const owned = element.$$designSystem$$;\n if (owned) {\n return owned;\n }\n const container = DI.findResponsibleContainer(element);\n return container.get(designSystemKey);\n },\n /**\n * Gets the DesignSystem if one is explicitly defined on the provided element;\n * otherwise creates a design system defined directly on the element.\n * @param element - The element to get or create a design system for.\n * @returns The design system.\n * @public\n */\n getOrCreate(node) {\n if (!node) {\n if (rootDesignSystem === null) {\n rootDesignSystem = DI.getOrCreateDOMContainer().get(designSystemKey);\n }\n return rootDesignSystem;\n }\n const owned = node.$$designSystem$$;\n if (owned) {\n return owned;\n }\n const container = DI.getOrCreateDOMContainer(node);\n if (container.has(designSystemKey, false)) {\n return container.get(designSystemKey);\n }\n else {\n const system = new DefaultDesignSystem(node, container);\n container.register(Registration.instance(designSystemKey, system));\n return system;\n }\n },\n});\nfunction extractTryDefineElementParams(params, elementDefinitionType, elementDefinitionCallback) {\n if (typeof params === \"string\") {\n return {\n name: params,\n type: elementDefinitionType,\n callback: elementDefinitionCallback,\n };\n }\n else {\n return params;\n }\n}\nclass DefaultDesignSystem {\n constructor(owner, container) {\n this.owner = owner;\n this.container = container;\n this.designTokensInitialized = false;\n this.prefix = \"fast\";\n this.shadowRootMode = undefined;\n this.disambiguate = () => ElementDisambiguation.definitionCallbackOnly;\n if (owner !== null) {\n owner.$$designSystem$$ = this;\n }\n }\n withPrefix(prefix) {\n this.prefix = prefix;\n return this;\n }\n withShadowRootMode(mode) {\n this.shadowRootMode = mode;\n return this;\n }\n withElementDisambiguation(callback) {\n this.disambiguate = callback;\n return this;\n }\n withDesignTokenRoot(root) {\n this.designTokenRoot = root;\n return this;\n }\n register(...registrations) {\n const container = this.container;\n const elementDefinitionEntries = [];\n const disambiguate = this.disambiguate;\n const shadowRootMode = this.shadowRootMode;\n const context = {\n elementPrefix: this.prefix,\n tryDefineElement(params, elementDefinitionType, elementDefinitionCallback) {\n const extractedParams = extractTryDefineElementParams(params, elementDefinitionType, elementDefinitionCallback);\n const { name, callback, baseClass } = extractedParams;\n let { type } = extractedParams;\n let elementName = name;\n let typeFoundByName = elementTypesByTag.get(elementName);\n let needsDefine = true;\n while (typeFoundByName) {\n const result = disambiguate(elementName, type, typeFoundByName);\n switch (result) {\n case ElementDisambiguation.ignoreDuplicate:\n return;\n case ElementDisambiguation.definitionCallbackOnly:\n needsDefine = false;\n typeFoundByName = void 0;\n break;\n default:\n elementName = result;\n typeFoundByName = elementTypesByTag.get(elementName);\n break;\n }\n }\n if (needsDefine) {\n if (elementTagsByType.has(type) || type === FoundationElement) {\n type = class extends type {\n };\n }\n elementTypesByTag.set(elementName, type);\n elementTagsByType.set(type, elementName);\n if (baseClass) {\n elementTagsByType.set(baseClass, elementName);\n }\n }\n elementDefinitionEntries.push(new ElementDefinitionEntry(container, elementName, type, shadowRootMode, callback, needsDefine));\n },\n };\n if (!this.designTokensInitialized) {\n this.designTokensInitialized = true;\n if (this.designTokenRoot !== null) {\n DesignToken.registerRoot(this.designTokenRoot);\n }\n }\n container.registerWithContext(context, ...registrations);\n for (const entry of elementDefinitionEntries) {\n entry.callback(entry);\n if (entry.willDefine && entry.definition !== null) {\n entry.definition.define();\n }\n }\n return this;\n }\n}\nclass ElementDefinitionEntry {\n constructor(container, name, type, shadowRootMode, callback, willDefine) {\n this.container = container;\n this.name = name;\n this.type = type;\n this.shadowRootMode = shadowRootMode;\n this.callback = callback;\n this.willDefine = willDefine;\n this.definition = null;\n }\n definePresentation(presentation) {\n ComponentPresentation.define(this.name, presentation, this.container);\n }\n defineElement(definition) {\n this.definition = new FASTElementDefinition(this.type, Object.assign(Object.assign({}, definition), { name: this.name }));\n }\n tagFor(type) {\n return DesignSystem.tagFor(type);\n }\n}\n/* eslint-enable @typescript-eslint/no-non-null-assertion */\n","// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nimport { DesignSystem } from '@microsoft/fast-foundation';\n/**\n * Provides a design system for the specified element either by returning one that was\n * already created for that element or creating one.\n * @param element - The element to root the design system at. By default, this is the body.\n * @returns A Jupyter Design System\n * @public\n */\nexport function provideJupyterDesignSystem(element) {\n return DesignSystem.getOrCreate(element).withPrefix('jp');\n}\n","// Copyright (c) Jupyter Development Team.\n// Copyright (c) Microsoft Corporation.\n// Distributed under the terms of the Modified BSD License.\nimport { cssPartial } from '@microsoft/fast-element';\nimport { baseHeightMultiplier, density, designUnit, elementScale } from '../design-tokens.js';\n/**\n * A formula to retrieve the control height.\n * Use this as the value of any CSS property that\n * accepts a pixel size.\n */\nexport const heightNumber = cssPartial `(${baseHeightMultiplier} + ${density} + ${elementScale}) * ${designUnit}`;\n","import { ColorHSL } from \"./color-hsl.js\";\nimport { ColorHSV } from \"./color-hsv.js\";\nimport { ColorLAB } from \"./color-lab.js\";\nimport { ColorLCH } from \"./color-lch.js\";\nimport { ColorRGBA64 } from \"./color-rgba-64.js\";\nimport { ColorXYZ } from \"./color-xyz.js\";\nimport { degreesToRadians, radiansToDegrees } from \"./math-utilities.js\";\n// All hue values are in degrees rather than radians or normalized\n// All conversions use the D65 2 degree white point for XYZ\n// Info on conversions and constants used can be found in the following:\n// https://en.wikipedia.org/wiki/CIELAB_color_space\n// https://en.wikipedia.org/wiki/Illuminant_D65\n// https://ninedegreesbelow.com/photography/xyz-rgb.html\n// http://user.engineering.uiowa.edu/~aip/Misc/ColorFAQ.html\n// https://web.stanford.edu/~sujason/ColorBalancing/adaptation.html\n// http://brucelindbloom.com/index.html\n/**\n * Get the luminance of a color in the linear RGB space.\n * This is not the same as the relative luminance in the sRGB space for WCAG contrast calculations. Use rgbToRelativeLuminance instead.\n * @param rgb - The input color\n *\n * @public\n */\nexport function rgbToLinearLuminance(rgb) {\n return rgb.r * 0.2126 + rgb.g * 0.7152 + rgb.b * 0.0722;\n}\n/**\n * Get the relative luminance of a color.\n * Adjusts the color to sRGB space, which is necessary for the WCAG contrast spec.\n * The alpha channel of the input is ignored.\n * @param rgb - The input color\n *\n * @public\n */\nexport function rgbToRelativeLuminance(rgb) {\n function luminanceHelper(i) {\n if (i <= 0.03928) {\n return i / 12.92;\n }\n return Math.pow((i + 0.055) / 1.055, 2.4);\n }\n return rgbToLinearLuminance(new ColorRGBA64(luminanceHelper(rgb.r), luminanceHelper(rgb.g), luminanceHelper(rgb.b), 1));\n}\nconst calculateContrastRatio = (a, b) => (a + 0.05) / (b + 0.05);\n/**\n * Calculate the contrast ratio between two colors. Uses the formula described by {@link https://www.w3.org/TR/WCAG20-TECHS/G17.html | WCAG 2.0}.\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function contrastRatio(a, b) {\n const luminanceA = rgbToRelativeLuminance(a);\n const luminanceB = rgbToRelativeLuminance(b);\n return luminanceA > luminanceB\n ? calculateContrastRatio(luminanceA, luminanceB)\n : calculateContrastRatio(luminanceB, luminanceA);\n}\nfunction calcChannelOverlay(match, background, overlay) {\n if (overlay - background === 0) {\n return 0;\n }\n else {\n return (match - background) / (overlay - background);\n }\n}\nfunction calcRgbOverlay(rgbMatch, rgbBackground, rgbOverlay) {\n const rChannel = calcChannelOverlay(rgbMatch.r, rgbBackground.r, rgbOverlay.r);\n const gChannel = calcChannelOverlay(rgbMatch.g, rgbBackground.g, rgbOverlay.g);\n const bChannel = calcChannelOverlay(rgbMatch.b, rgbBackground.b, rgbOverlay.b);\n return (rChannel + gChannel + bChannel) / 3;\n}\n/**\n * Calculate an overlay color that uses rgba (rgb + alpha) that matches the appearance of a given solid color when placed on the same background\n * @param rgbMatch - The solid color the overlay should match in appearance when placed over the rgbBackground\n * @param rgbBackground - The background on which the overlay rests\n * @param rgbOverlay - The rgb color of the overlay. Typically this is either pure white or pure black and when not provided will be determined automatically. This color will be used in the returned output\n * @returns The rgba (rgb + alpha) color of the overlay\n *\n * @public\n */\nexport function calculateOverlayColor(rgbMatch, rgbBackground, rgbOverlay = null) {\n let alpha = 0;\n let overlay = rgbOverlay;\n if (overlay !== null) {\n alpha = calcRgbOverlay(rgbMatch, rgbBackground, overlay);\n }\n else {\n overlay = new ColorRGBA64(0, 0, 0, 1);\n alpha = calcRgbOverlay(rgbMatch, rgbBackground, overlay);\n if (alpha <= 0) {\n overlay = new ColorRGBA64(1, 1, 1, 1);\n alpha = calcRgbOverlay(rgbMatch, rgbBackground, overlay);\n }\n }\n alpha = Math.round(alpha * 1000) / 1000;\n return new ColorRGBA64(overlay.r, overlay.g, overlay.b, alpha);\n}\n/**\n * Converts a {@link @microsoft/fast-colors#ColorRGBA64} to a {@link @microsoft/fast-colors#ColorHSL}\n * @param rgb - the rgb color to convert\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function rgbToHSL(rgb) {\n const max = Math.max(rgb.r, rgb.g, rgb.b);\n const min = Math.min(rgb.r, rgb.g, rgb.b);\n const delta = max - min;\n let hue = 0;\n if (delta !== 0) {\n if (max === rgb.r) {\n hue = 60 * (((rgb.g - rgb.b) / delta) % 6);\n }\n else if (max === rgb.g) {\n hue = 60 * ((rgb.b - rgb.r) / delta + 2);\n }\n else {\n hue = 60 * ((rgb.r - rgb.g) / delta + 4);\n }\n }\n if (hue < 0) {\n hue += 360;\n }\n const lum = (max + min) / 2;\n let sat = 0;\n if (delta !== 0) {\n sat = delta / (1 - Math.abs(2 * lum - 1));\n }\n return new ColorHSL(hue, sat, lum);\n}\n/**\n * Converts a {@link @microsoft/fast-colors#ColorHSL} to a {@link @microsoft/fast-colors#ColorRGBA64}\n * @param hsl - the hsl color to convert\n * @param alpha - the alpha value\n *\n * @public\n */\nexport function hslToRGB(hsl, alpha = 1) {\n const c = (1 - Math.abs(2 * hsl.l - 1)) * hsl.s;\n const x = c * (1 - Math.abs(((hsl.h / 60) % 2) - 1));\n const m = hsl.l - c / 2;\n let r = 0;\n let g = 0;\n let b = 0;\n if (hsl.h < 60) {\n r = c;\n g = x;\n b = 0;\n }\n else if (hsl.h < 120) {\n r = x;\n g = c;\n b = 0;\n }\n else if (hsl.h < 180) {\n r = 0;\n g = c;\n b = x;\n }\n else if (hsl.h < 240) {\n r = 0;\n g = x;\n b = c;\n }\n else if (hsl.h < 300) {\n r = x;\n g = 0;\n b = c;\n }\n else if (hsl.h < 360) {\n r = c;\n g = 0;\n b = x;\n }\n return new ColorRGBA64(r + m, g + m, b + m, alpha);\n}\n/**\n * Converts a {@link @microsoft/fast-colors#ColorRGBA64} to a {@link @microsoft/fast-colors#ColorHSV}\n * @param rgb - the rgb color to convert\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function rgbToHSV(rgb) {\n const max = Math.max(rgb.r, rgb.g, rgb.b);\n const min = Math.min(rgb.r, rgb.g, rgb.b);\n const delta = max - min;\n let hue = 0;\n if (delta !== 0) {\n if (max === rgb.r) {\n hue = 60 * (((rgb.g - rgb.b) / delta) % 6);\n }\n else if (max === rgb.g) {\n hue = 60 * ((rgb.b - rgb.r) / delta + 2);\n }\n else {\n hue = 60 * ((rgb.r - rgb.g) / delta + 4);\n }\n }\n if (hue < 0) {\n hue += 360;\n }\n let sat = 0;\n if (max !== 0) {\n sat = delta / max;\n }\n return new ColorHSV(hue, sat, max);\n}\n/**\n * Converts a {@link @microsoft/fast-colors#ColorHSV} to a {@link @microsoft/fast-colors#ColorRGBA64}\n * @param hsv - the hsv color to convert\n * @param alpha - the alpha value\n *\n * @public\n */\nexport function hsvToRGB(hsv, alpha = 1) {\n const c = hsv.s * hsv.v;\n const x = c * (1 - Math.abs(((hsv.h / 60) % 2) - 1));\n const m = hsv.v - c;\n let r = 0;\n let g = 0;\n let b = 0;\n if (hsv.h < 60) {\n r = c;\n g = x;\n b = 0;\n }\n else if (hsv.h < 120) {\n r = x;\n g = c;\n b = 0;\n }\n else if (hsv.h < 180) {\n r = 0;\n g = c;\n b = x;\n }\n else if (hsv.h < 240) {\n r = 0;\n g = x;\n b = c;\n }\n else if (hsv.h < 300) {\n r = x;\n g = 0;\n b = c;\n }\n else if (hsv.h < 360) {\n r = c;\n g = 0;\n b = x;\n }\n return new ColorRGBA64(r + m, g + m, b + m, alpha);\n}\n/**\n * Converts a {@link @microsoft/fast-colors#ColorLCH} to a {@link @microsoft/fast-colors#ColorLAB}\n * @param lch - the lch color to convert\n *\n * @public\n */\nexport function lchToLAB(lch) {\n let a = 0;\n let b = 0;\n if (lch.h !== 0) {\n a = Math.cos(degreesToRadians(lch.h)) * lch.c;\n b = Math.sin(degreesToRadians(lch.h)) * lch.c;\n }\n return new ColorLAB(lch.l, a, b);\n}\n/**\n * Converts a {@link @microsoft/fast-colors#ColorLAB} to a {@link @microsoft/fast-colors#ColorLCH}\n * @param lab - the lab color to convert\n *\n * @remarks\n * The discontinuity in the C parameter at 0 means that floating point errors will often result in values near 0 giving unpredictable results.\n * EG: 0.0000001 gives a very different result than -0.0000001\n * In cases where both a and b are very near zero this function will return an LCH color with an H of 0\n * More info about the atan2 function: {@link https://en.wikipedia.org/wiki/Atan2}\n * @public\n */\nexport function labToLCH(lab) {\n let h = 0;\n // Because of the discontinuity at 0 if a number is very close to 0 - often due to floating point errors - then\n // it gives unexpected results. EG: 0.000000000001 gives a different result than 0. So just avoid any number\n // that has both a and b very close to zero and lump it in with the h = 0 case.\n if (Math.abs(lab.b) > 0.001 || Math.abs(lab.a) > 0.001) {\n h = radiansToDegrees(Math.atan2(lab.b, lab.a));\n }\n if (h < 0) {\n h += 360;\n }\n const c = Math.sqrt(lab.a * lab.a + lab.b * lab.b);\n return new ColorLCH(lab.l, c, h);\n}\n/**\n * Converts a {@link @microsoft/fast-colors#ColorLAB} to a {@link @microsoft/fast-colors#ColorXYZ}\n * @param lab - the lab color to convert\n *\n * @public\n */\nexport function labToXYZ(lab) {\n const fy = (lab.l + 16) / 116;\n const fx = fy + lab.a / 500;\n const fz = fy - lab.b / 200;\n const xcubed = Math.pow(fx, 3);\n const ycubed = Math.pow(fy, 3);\n const zcubed = Math.pow(fz, 3);\n let x = 0;\n if (xcubed > ColorLAB.epsilon) {\n x = xcubed;\n }\n else {\n x = (116 * fx - 16) / ColorLAB.kappa;\n }\n let y = 0;\n if (lab.l > ColorLAB.epsilon * ColorLAB.kappa) {\n y = ycubed;\n }\n else {\n y = lab.l / ColorLAB.kappa;\n }\n let z = 0;\n if (zcubed > ColorLAB.epsilon) {\n z = zcubed;\n }\n else {\n z = (116 * fz - 16) / ColorLAB.kappa;\n }\n x = ColorXYZ.whitePoint.x * x;\n y = ColorXYZ.whitePoint.y * y;\n z = ColorXYZ.whitePoint.z * z;\n return new ColorXYZ(x, y, z);\n}\n/**\n * Converts a {@link @microsoft/fast-colors#ColorXYZ} to a {@link @microsoft/fast-colors#ColorLAB}\n * @param xyz - the xyz color to convert\n *\n * @public\n */\nexport function xyzToLAB(xyz) {\n function xyzToLABHelper(i) {\n if (i > ColorLAB.epsilon) {\n return Math.pow(i, 1 / 3);\n }\n return (ColorLAB.kappa * i + 16) / 116;\n }\n const x = xyzToLABHelper(xyz.x / ColorXYZ.whitePoint.x);\n const y = xyzToLABHelper(xyz.y / ColorXYZ.whitePoint.y);\n const z = xyzToLABHelper(xyz.z / ColorXYZ.whitePoint.z);\n const l = 116 * y - 16;\n const a = 500 * (x - y);\n const b = 200 * (y - z);\n return new ColorLAB(l, a, b);\n}\n/**\n * Converts a {@link @microsoft/fast-colors#ColorRGBA64} to a {@link @microsoft/fast-colors#ColorXYZ}\n * @param rgb - the rgb color to convert\n *\n * @remarks\n * The alpha channel of the input is ignored\n * @public\n */\nexport function rgbToXYZ(rgb) {\n function rgbToXYZHelper(i) {\n if (i <= 0.04045) {\n return i / 12.92;\n }\n return Math.pow((i + 0.055) / 1.055, 2.4);\n }\n const r = rgbToXYZHelper(rgb.r);\n const g = rgbToXYZHelper(rgb.g);\n const b = rgbToXYZHelper(rgb.b);\n const x = r * 0.4124564 + g * 0.3575761 + b * 0.1804375;\n const y = r * 0.2126729 + g * 0.7151522 + b * 0.072175;\n const z = r * 0.0193339 + g * 0.119192 + b * 0.9503041;\n return new ColorXYZ(x, y, z);\n}\n/**\n * Converts a {@link @microsoft/fast-colors#ColorXYZ} to a {@link @microsoft/fast-colors#ColorRGBA64}\n * @param xyz - the xyz color to convert\n * @param alpha - the alpha value\n *\n * @remarks\n * Note that the xyz color space is significantly larger than sRGB. As such, this can return colors rgb values greater than 1 or less than 0\n * @public\n */\nexport function xyzToRGB(xyz, alpha = 1) {\n function xyzToRGBHelper(i) {\n if (i <= 0.0031308) {\n return i * 12.92;\n }\n return 1.055 * Math.pow(i, 1 / 2.4) - 0.055;\n }\n const r = xyzToRGBHelper(xyz.x * 3.2404542 - xyz.y * 1.5371385 - xyz.z * 0.4985314);\n const g = xyzToRGBHelper(xyz.x * -0.969266 + xyz.y * 1.8760108 + xyz.z * 0.041556);\n const b = xyzToRGBHelper(xyz.x * 0.0556434 - xyz.y * 0.2040259 + xyz.z * 1.0572252);\n return new ColorRGBA64(r, g, b, alpha);\n}\n/**\n * Converts a {@link @microsoft/fast-colors#ColorRGBA64} to a {@link @microsoft/fast-colors#ColorLAB}\n * @param rgb - the rgb color to convert\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function rgbToLAB(rgb) {\n return xyzToLAB(rgbToXYZ(rgb));\n}\n/**\n * Converts a {@link @microsoft/fast-colors#ColorLAB} to a {@link @microsoft/fast-colors#ColorRGBA64}\n * @param lab - the LAB color to convert\n * @param alpha - the alpha value\n *\n * @remarks\n * Note that the xyz color space (which the conversion from LAB uses) is significantly larger than sRGB. As such, this can return colors rgb values greater than 1 or less than 0\n *\n * @public\n */\nexport function labToRGB(lab, alpha = 1) {\n return xyzToRGB(labToXYZ(lab), alpha);\n}\n/**\n * Convert a {@link @microsoft/fast-colors#ColorRGBA64} to a {@link @microsoft/fast-colors#ColorLCH}\n *\n * @param rgb - the rgb color to convert\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function rgbToLCH(rgb) {\n return labToLCH(rgbToLAB(rgb));\n}\n/**\n * Convert a {@link @microsoft/fast-colors#ColorLCH} to a {@link @microsoft/fast-colors#ColorRGBA64}\n * @param lch - the LCH color to convert\n * @param alpha - the alpha value\n *\n * @public\n */\nexport function lchToRGB(lch, alpha = 1) {\n return labToRGB(lchToLAB(lch), alpha);\n}\n/**\n * Converts a color temperature to a {@link @microsoft/fast-colors#ColorRGBA64}\n * @param tempKelvin - the temperature to convert\n * @param alpha - the alpha value\n *\n * @public\n */\nexport function temperatureToRGB(tempKelvin, alpha = 1) {\n // The constants I could find assumed a decimal range of [0,255] for each channel. Just going to put a /255.0 at the end\n let r = 0;\n let g = 0;\n let b = 0;\n if (tempKelvin <= 1000) {\n tempKelvin = 1000;\n }\n else if (tempKelvin >= 40000) {\n tempKelvin = 40000;\n }\n if (tempKelvin < 6600.0) {\n r = 255.0;\n g = tempKelvin / 100.0 - 2.0;\n g =\n -155.25485562709179 -\n 0.44596950469579133 * g +\n 104.49216199393888 * Math.log(g);\n }\n else {\n r = tempKelvin / 100.0 - 55.0;\n r = 351.97690566805693 + 0.114206453784165 * r - 40.25366309332127 * Math.log(r);\n g = tempKelvin / 100.0 - 50.0;\n g = 325.4494125711974 + 0.07943456536662342 * g - 28.0852963507957 * Math.log(g);\n }\n if (tempKelvin >= 6600.0) {\n b = 255.0;\n }\n else if (tempKelvin < 2000.0) {\n b = 0.0;\n }\n else {\n b = tempKelvin / 100.0 - 10;\n b =\n -254.76935184120902 +\n 0.8274096064007395 * b +\n 115.67994401066147 * Math.log(b);\n }\n return new ColorRGBA64(r / 255, g / 255, b / 255, alpha);\n}\n/**\n * Convert a rgb color to a color temperature\n * @param rgb - the color to convert\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function rgbToTemperature(rgb) {\n let t = 0;\n let min = 1000;\n let max = 40000;\n while (max - min > 0.4) {\n t = (max + min) / 2.0;\n const testColor = temperatureToRGB(t);\n if (testColor.b / testColor.r >= rgb.b / rgb.r) {\n max = t;\n }\n else {\n min = t;\n }\n }\n return Math.round(t);\n}\n","import { roundToPrecisionSmall } from \"./math-utilities.js\";\n/**\n * This uses Hue values in \"degree\" format. So expect a range of [0,360]. Some other implementations instead uses radians or a normalized Hue with range [0,1]. Be aware of this when checking values or using other libraries.\n *\n * @public\n */\nexport class ColorHSL {\n constructor(hue, sat, lum) {\n this.h = hue;\n this.s = sat;\n this.l = lum;\n }\n /**\n * Construct a {@link ColorHSL} from a config object.\n */\n static fromObject(data) {\n if (data && !isNaN(data.h) && !isNaN(data.s) && !isNaN(data.l)) {\n return new ColorHSL(data.h, data.s, data.l);\n }\n return null;\n }\n /**\n * Determines if a color is equal to another\n * @param rhs - the value to compare\n */\n equalValue(rhs) {\n return this.h === rhs.h && this.s === rhs.s && this.l === rhs.l;\n }\n /**\n * Returns a new {@link ColorHSL} rounded to the provided precision\n * @param precision - the precision to round to\n */\n roundToPrecision(precision) {\n return new ColorHSL(roundToPrecisionSmall(this.h, precision), roundToPrecisionSmall(this.s, precision), roundToPrecisionSmall(this.l, precision));\n }\n /**\n * Returns the {@link ColorHSL} formatted as an object.\n */\n toObject() {\n return { h: this.h, s: this.s, l: this.l };\n }\n}\n","import { roundToPrecisionSmall } from \"./math-utilities.js\";\n/**\n * This uses Hue values in \"degree\" format. So expect a range of [0,360]. Some other implementations instead uses radians or a normalized Hue with range [0,1]. Be aware of this when checking values or using other libraries.\n *\n * @public\n */\nexport class ColorHSV {\n constructor(hue, sat, val) {\n this.h = hue;\n this.s = sat;\n this.v = val;\n }\n /**\n * Construct a {@link ColorHSV} from a config object.\n */\n static fromObject(data) {\n if (data && !isNaN(data.h) && !isNaN(data.s) && !isNaN(data.v)) {\n return new ColorHSV(data.h, data.s, data.v);\n }\n return null;\n }\n /**\n * Determines if a color is equal to another\n * @param rhs - the value to compare\n */\n equalValue(rhs) {\n return this.h === rhs.h && this.s === rhs.s && this.v === rhs.v;\n }\n /**\n * Returns a new {@link ColorHSV} rounded to the provided precision\n * @param precision - the precision to round to\n */\n roundToPrecision(precision) {\n return new ColorHSV(roundToPrecisionSmall(this.h, precision), roundToPrecisionSmall(this.s, precision), roundToPrecisionSmall(this.v, precision));\n }\n /**\n * Returns the {@link ColorHSV} formatted as an object.\n */\n toObject() {\n return { h: this.h, s: this.s, v: this.v };\n }\n}\n","import { roundToPrecisionSmall } from \"./math-utilities.js\";\n/**\n * {@link https://en.wikipedia.org/wiki/CIELAB_color_space | CIELAB color space}\n * This implementation uses the D65 constants for 2 degrees. That determines the constants used for the pure white point of the XYZ space of 0.95047, 1.0, 1.08883.\n * {@link https://en.wikipedia.org/wiki/Illuminant_D65}\n * These constants determine how the XYZ, LCH and LAB colors convert to/from RGB.\n *\n * @public\n */\nexport class ColorLAB {\n constructor(l, a, b) {\n this.l = l;\n this.a = a;\n this.b = b;\n }\n /**\n * Construct a {@link ColorLAB} from a config object.\n */\n static fromObject(data) {\n if (data && !isNaN(data.l) && !isNaN(data.a) && !isNaN(data.b)) {\n return new ColorLAB(data.l, data.a, data.b);\n }\n return null;\n }\n /**\n * Determines if a color is equal to another\n * @param rhs - the value to compare\n */\n equalValue(rhs) {\n return this.l === rhs.l && this.a === rhs.a && this.b === rhs.b;\n }\n /**\n * Returns a new {@link ColorLAB} rounded to the provided precision\n * @param precision - the precision to round to\n */\n roundToPrecision(precision) {\n return new ColorLAB(roundToPrecisionSmall(this.l, precision), roundToPrecisionSmall(this.a, precision), roundToPrecisionSmall(this.b, precision));\n }\n /**\n * Returns the {@link ColorLAB} formatted as an object.\n */\n toObject() {\n return { l: this.l, a: this.a, b: this.b };\n }\n}\nColorLAB.epsilon = 216 / 24389;\nColorLAB.kappa = 24389 / 27;\n","import { roundToPrecisionSmall } from \"./math-utilities.js\";\n/**\n *\n * {@link https://en.wikipedia.org/wiki/CIELAB_color_space | CIELCH color space}\n *\n * This is a cylindrical representation of the CIELAB space useful for saturation operations\n * This uses Hue values in \"degree\" format. So expect a range of [0,360]. Some other implementations instead uses radians or a normalized Hue with range [0,1]. Be aware of this when checking values or using other libraries.\n * This implementation uses the D65 constants for 2 degrees. That determines the constants used for the pure white point of the XYZ space of 0.95047, 1.0, 1.08883.\n * {@link https://en.wikipedia.org/wiki/Illuminant_D65}\n * These constants determine how the XYZ, LCH and LAB colors convert to/from RGB.\n *\n * @public\n */\nexport class ColorLCH {\n constructor(l, c, h) {\n this.l = l;\n this.c = c;\n this.h = h;\n }\n /**\n * Construct a {@link ColorLCH} from a config object.\n * @param data - the config object\n */\n static fromObject(data) {\n if (data && !isNaN(data.l) && !isNaN(data.c) && !isNaN(data.h)) {\n return new ColorLCH(data.l, data.c, data.h);\n }\n return null;\n }\n /**\n * Determines if one color is equal to another.\n * @param rhs - the color to compare\n */\n equalValue(rhs) {\n return this.l === rhs.l && this.c === rhs.c && this.h === rhs.h;\n }\n /**\n * Returns a new {@link ColorLCH} rounded to the provided precision\n * @param precision - the precision to round to\n */\n roundToPrecision(precision) {\n return new ColorLCH(roundToPrecisionSmall(this.l, precision), roundToPrecisionSmall(this.c, precision), roundToPrecisionSmall(this.h, precision));\n }\n /**\n * Converts the {@link ColorLCH} to a config object.\n */\n toObject() {\n return { l: this.l, c: this.c, h: this.h };\n }\n}\n","import { clamp, denormalize, getHexStringForByte, roundToPrecisionSmall, } from \"./math-utilities.js\";\n/**\n * A RGBA color with 64 bit channels.\n *\n * @example\n * ```ts\n * new ColorRGBA64(1, 0, 0, 1) // red\n * ```\n * @public\n */\nexport class ColorRGBA64 {\n /**\n *\n * @param red - the red value\n * @param green - the green value\n * @param blue - the blue value\n * @param alpha - the alpha value\n */\n constructor(red, green, blue, alpha) {\n this.r = red;\n this.g = green;\n this.b = blue;\n this.a = typeof alpha === \"number\" && !isNaN(alpha) ? alpha : 1;\n }\n /**\n * Construct a {@link ColorRGBA64} from a {@link ColorRGBA64Config}\n * @param data - the config object\n */\n static fromObject(data) {\n return data && !isNaN(data.r) && !isNaN(data.g) && !isNaN(data.b)\n ? new ColorRGBA64(data.r, data.g, data.b, data.a)\n : null;\n }\n /**\n * Determines if one color is equal to another.\n * @param rhs - the color to compare\n */\n equalValue(rhs) {\n return (this.r === rhs.r && this.g === rhs.g && this.b === rhs.b && this.a === rhs.a);\n }\n /**\n * Returns the color formatted as a string; #RRGGBB\n */\n toStringHexRGB() {\n return \"#\" + [this.r, this.g, this.b].map(this.formatHexValue).join(\"\");\n }\n /**\n * Returns the color formatted as a string; #RRGGBBAA\n */\n toStringHexRGBA() {\n return this.toStringHexRGB() + this.formatHexValue(this.a);\n }\n /**\n * Returns the color formatted as a string; #AARRGGBB\n */\n toStringHexARGB() {\n return \"#\" + [this.a, this.r, this.g, this.b].map(this.formatHexValue).join(\"\");\n }\n /**\n * Returns the color formatted as a string; \"rgb(0xRR, 0xGG, 0xBB)\"\n */\n toStringWebRGB() {\n return `rgb(${Math.round(denormalize(this.r, 0.0, 255.0))},${Math.round(denormalize(this.g, 0.0, 255.0))},${Math.round(denormalize(this.b, 0.0, 255.0))})`;\n }\n /**\n * Returns the color formatted as a string; \"rgba(0xRR, 0xGG, 0xBB, a)\"\n * @remarks\n * Note that this follows the convention of putting alpha in the range [0.0,1.0] while the other three channels are [0,255]\n */\n toStringWebRGBA() {\n return `rgba(${Math.round(denormalize(this.r, 0.0, 255.0))},${Math.round(denormalize(this.g, 0.0, 255.0))},${Math.round(denormalize(this.b, 0.0, 255.0))},${clamp(this.a, 0, 1)})`;\n }\n /**\n * Returns a new {@link ColorRGBA64} rounded to the provided precision\n * @param precision - the precision to round to\n */\n roundToPrecision(precision) {\n return new ColorRGBA64(roundToPrecisionSmall(this.r, precision), roundToPrecisionSmall(this.g, precision), roundToPrecisionSmall(this.b, precision), roundToPrecisionSmall(this.a, precision));\n }\n /**\n * Returns a new {@link ColorRGBA64} with channel values clamped between 0 and 1.\n */\n clamp() {\n return new ColorRGBA64(clamp(this.r, 0, 1), clamp(this.g, 0, 1), clamp(this.b, 0, 1), clamp(this.a, 0, 1));\n }\n /**\n * Converts the {@link ColorRGBA64} to a {@link ColorRGBA64Config}.\n */\n toObject() {\n return { r: this.r, g: this.g, b: this.b, a: this.a };\n }\n formatHexValue(value) {\n return getHexStringForByte(denormalize(value, 0.0, 255.0));\n }\n}\n","import { roundToPrecisionSmall } from \"./math-utilities.js\";\n/**\n * {@link https://en.wikipedia.org/wiki/CIE_1931_color_space | XYZ color space}\n *\n * This implementation uses the D65 constants for 2 degrees. That determines the constants used for the pure white point of the XYZ space of 0.95047, 1.0, 1.08883.\n * {@link https://en.wikipedia.org/wiki/Illuminant_D65}\n * These constants determine how the XYZ, LCH and LAB colors convert to/from RGB.\n *\n * @public\n */\nexport class ColorXYZ {\n constructor(x, y, z) {\n this.x = x;\n this.y = y;\n this.z = z;\n }\n /**\n * Construct a {@link ColorXYZ} from a config object.\n */\n static fromObject(data) {\n if (data && !isNaN(data.x) && !isNaN(data.y) && !isNaN(data.z)) {\n return new ColorXYZ(data.x, data.y, data.z);\n }\n return null;\n }\n /**\n * Determines if a color is equal to another\n * @param rhs - the value to compare\n */\n equalValue(rhs) {\n return this.x === rhs.x && this.y === rhs.y && this.z === rhs.z;\n }\n /**\n * Returns a new {@link ColorXYZ} rounded to the provided precision\n * @param precision - the precision to round to\n */\n roundToPrecision(precision) {\n return new ColorXYZ(roundToPrecisionSmall(this.x, precision), roundToPrecisionSmall(this.y, precision), roundToPrecisionSmall(this.z, precision));\n }\n /**\n * Returns the {@link ColorXYZ} formatted as an object.\n */\n toObject() {\n return { x: this.x, y: this.y, z: this.z };\n }\n}\n/**\n * D65 2 degree white point\n */\nColorXYZ.whitePoint = new ColorXYZ(0.95047, 1.0, 1.08883);\n","/**\n * Ensures that an input number does not exceed a max value and is not less than a min value.\n * @param i - the number to clamp\n * @param min - the maximum (inclusive) value\n * @param max - the minimum (inclusive) value\n * @public\n */\nexport function clamp(i, min, max) {\n if (isNaN(i) || i <= min) {\n return min;\n }\n else if (i >= max) {\n return max;\n }\n return i;\n}\n/**\n * Scales an input to a number between 0 and 1\n * @param i - a number between min and max\n * @param min - the max value\n * @param max - the min value\n * @public\n */\nexport function normalize(i, min, max) {\n if (isNaN(i) || i <= min) {\n return 0.0;\n }\n else if (i >= max) {\n return 1.0;\n }\n return i / (max - min);\n}\n/**\n * Scales a number between 0 and 1\n * @param i - the number to denormalize\n * @param min - the min value\n * @param max - the max value\n * @public\n */\nexport function denormalize(i, min, max) {\n if (isNaN(i)) {\n return min;\n }\n return min + i * (max - min);\n}\n/**\n * Converts degrees to radians.\n * @param i - degrees\n * @public\n */\nexport function degreesToRadians(i) {\n return i * (Math.PI / 180.0);\n}\n/**\n * Converts radians to degrees.\n * @param i - radians\n * @public\n */\nexport function radiansToDegrees(i) {\n return i * (180.0 / Math.PI);\n}\n/**\n * Converts a number between 0 and 255 to a hex string.\n * @param i - the number to convert to a hex string\n * @public\n */\nexport function getHexStringForByte(i) {\n const s = Math.round(clamp(i, 0.0, 255.0)).toString(16);\n if (s.length === 1) {\n return \"0\" + s;\n }\n return s;\n}\n/**\n * Linearly interpolate\n * @public\n */\nexport function lerp(i, min, max) {\n if (isNaN(i) || i <= 0.0) {\n return min;\n }\n else if (i >= 1.0) {\n return max;\n }\n return min + i * (max - min);\n}\n/**\n * Linearly interpolate angles in degrees\n * @public\n */\nexport function lerpAnglesInDegrees(i, min, max) {\n if (i <= 0.0) {\n return min % 360.0;\n }\n else if (i >= 1.0) {\n return max % 360.0;\n }\n const a = (min - max + 360.0) % 360.0;\n const b = (max - min + 360.0) % 360.0;\n if (a <= b) {\n return (min - a * i + 360.0) % 360.0;\n }\n return (min + a * i + 360.0) % 360.0;\n}\nconst TwoPI = Math.PI * 2;\n/**\n * Linearly interpolate angles in radians\n * @public\n */\nexport function lerpAnglesInRadians(i, min, max) {\n if (isNaN(i) || i <= 0.0) {\n return min % TwoPI;\n }\n else if (i >= 1.0) {\n return max % TwoPI;\n }\n const a = (min - max + TwoPI) % TwoPI;\n const b = (max - min + TwoPI) % TwoPI;\n if (a <= b) {\n return (min - a * i + TwoPI) % TwoPI;\n }\n return (min + a * i + TwoPI) % TwoPI;\n}\n/**\n *\n * Will return infinity if i*10^(precision) overflows number\n * note that floating point rounding rules come into play here\n * so values that end up rounding on a .5 round to the nearest\n * even not always up so 2.5 rounds to 2\n * @param i - the number to round\n * @param precision - the precision to round to\n *\n * @public\n */\nexport function roundToPrecisionSmall(i, precision) {\n const factor = Math.pow(10, precision);\n return Math.round(i * factor) / factor;\n}\n","export const namedColorsConfigs = {\n aliceblue: {\n r: 0.941176,\n g: 0.972549,\n b: 1,\n },\n antiquewhite: {\n r: 0.980392,\n g: 0.921569,\n b: 0.843137,\n },\n aqua: {\n r: 0,\n g: 1,\n b: 1,\n },\n aquamarine: {\n r: 0.498039,\n g: 1,\n b: 0.831373,\n },\n azure: {\n r: 0.941176,\n g: 1,\n b: 1,\n },\n beige: {\n r: 0.960784,\n g: 0.960784,\n b: 0.862745,\n },\n bisque: {\n r: 1,\n g: 0.894118,\n b: 0.768627,\n },\n black: {\n r: 0,\n g: 0,\n b: 0,\n },\n blanchedalmond: {\n r: 1,\n g: 0.921569,\n b: 0.803922,\n },\n blue: {\n r: 0,\n g: 0,\n b: 1,\n },\n blueviolet: {\n r: 0.541176,\n g: 0.168627,\n b: 0.886275,\n },\n brown: {\n r: 0.647059,\n g: 0.164706,\n b: 0.164706,\n },\n burlywood: {\n r: 0.870588,\n g: 0.721569,\n b: 0.529412,\n },\n cadetblue: {\n r: 0.372549,\n g: 0.619608,\n b: 0.627451,\n },\n chartreuse: {\n r: 0.498039,\n g: 1,\n b: 0,\n },\n chocolate: {\n r: 0.823529,\n g: 0.411765,\n b: 0.117647,\n },\n coral: {\n r: 1,\n g: 0.498039,\n b: 0.313725,\n },\n cornflowerblue: {\n r: 0.392157,\n g: 0.584314,\n b: 0.929412,\n },\n cornsilk: {\n r: 1,\n g: 0.972549,\n b: 0.862745,\n },\n crimson: {\n r: 0.862745,\n g: 0.078431,\n b: 0.235294,\n },\n cyan: {\n r: 0,\n g: 1,\n b: 1,\n },\n darkblue: {\n r: 0,\n g: 0,\n b: 0.545098,\n },\n darkcyan: {\n r: 0,\n g: 0.545098,\n b: 0.545098,\n },\n darkgoldenrod: {\n r: 0.721569,\n g: 0.52549,\n b: 0.043137,\n },\n darkgray: {\n r: 0.662745,\n g: 0.662745,\n b: 0.662745,\n },\n darkgreen: {\n r: 0,\n g: 0.392157,\n b: 0,\n },\n darkgrey: {\n r: 0.662745,\n g: 0.662745,\n b: 0.662745,\n },\n darkkhaki: {\n r: 0.741176,\n g: 0.717647,\n b: 0.419608,\n },\n darkmagenta: {\n r: 0.545098,\n g: 0,\n b: 0.545098,\n },\n darkolivegreen: {\n r: 0.333333,\n g: 0.419608,\n b: 0.184314,\n },\n darkorange: {\n r: 1,\n g: 0.54902,\n b: 0,\n },\n darkorchid: {\n r: 0.6,\n g: 0.196078,\n b: 0.8,\n },\n darkred: {\n r: 0.545098,\n g: 0,\n b: 0,\n },\n darksalmon: {\n r: 0.913725,\n g: 0.588235,\n b: 0.478431,\n },\n darkseagreen: {\n r: 0.560784,\n g: 0.737255,\n b: 0.560784,\n },\n darkslateblue: {\n r: 0.282353,\n g: 0.239216,\n b: 0.545098,\n },\n darkslategray: {\n r: 0.184314,\n g: 0.309804,\n b: 0.309804,\n },\n darkslategrey: {\n r: 0.184314,\n g: 0.309804,\n b: 0.309804,\n },\n darkturquoise: {\n r: 0,\n g: 0.807843,\n b: 0.819608,\n },\n darkviolet: {\n r: 0.580392,\n g: 0,\n b: 0.827451,\n },\n deeppink: {\n r: 1,\n g: 0.078431,\n b: 0.576471,\n },\n deepskyblue: {\n r: 0,\n g: 0.74902,\n b: 1,\n },\n dimgray: {\n r: 0.411765,\n g: 0.411765,\n b: 0.411765,\n },\n dimgrey: {\n r: 0.411765,\n g: 0.411765,\n b: 0.411765,\n },\n dodgerblue: {\n r: 0.117647,\n g: 0.564706,\n b: 1,\n },\n firebrick: {\n r: 0.698039,\n g: 0.133333,\n b: 0.133333,\n },\n floralwhite: {\n r: 1,\n g: 0.980392,\n b: 0.941176,\n },\n forestgreen: {\n r: 0.133333,\n g: 0.545098,\n b: 0.133333,\n },\n fuchsia: {\n r: 1,\n g: 0,\n b: 1,\n },\n gainsboro: {\n r: 0.862745,\n g: 0.862745,\n b: 0.862745,\n },\n ghostwhite: {\n r: 0.972549,\n g: 0.972549,\n b: 1,\n },\n gold: {\n r: 1,\n g: 0.843137,\n b: 0,\n },\n goldenrod: {\n r: 0.854902,\n g: 0.647059,\n b: 0.12549,\n },\n gray: {\n r: 0.501961,\n g: 0.501961,\n b: 0.501961,\n },\n green: {\n r: 0,\n g: 0.501961,\n b: 0,\n },\n greenyellow: {\n r: 0.678431,\n g: 1,\n b: 0.184314,\n },\n grey: {\n r: 0.501961,\n g: 0.501961,\n b: 0.501961,\n },\n honeydew: {\n r: 0.941176,\n g: 1,\n b: 0.941176,\n },\n hotpink: {\n r: 1,\n g: 0.411765,\n b: 0.705882,\n },\n indianred: {\n r: 0.803922,\n g: 0.360784,\n b: 0.360784,\n },\n indigo: {\n r: 0.294118,\n g: 0,\n b: 0.509804,\n },\n ivory: {\n r: 1,\n g: 1,\n b: 0.941176,\n },\n khaki: {\n r: 0.941176,\n g: 0.901961,\n b: 0.54902,\n },\n lavender: {\n r: 0.901961,\n g: 0.901961,\n b: 0.980392,\n },\n lavenderblush: {\n r: 1,\n g: 0.941176,\n b: 0.960784,\n },\n lawngreen: {\n r: 0.486275,\n g: 0.988235,\n b: 0,\n },\n lemonchiffon: {\n r: 1,\n g: 0.980392,\n b: 0.803922,\n },\n lightblue: {\n r: 0.678431,\n g: 0.847059,\n b: 0.901961,\n },\n lightcoral: {\n r: 0.941176,\n g: 0.501961,\n b: 0.501961,\n },\n lightcyan: {\n r: 0.878431,\n g: 1,\n b: 1,\n },\n lightgoldenrodyellow: {\n r: 0.980392,\n g: 0.980392,\n b: 0.823529,\n },\n lightgray: {\n r: 0.827451,\n g: 0.827451,\n b: 0.827451,\n },\n lightgreen: {\n r: 0.564706,\n g: 0.933333,\n b: 0.564706,\n },\n lightgrey: {\n r: 0.827451,\n g: 0.827451,\n b: 0.827451,\n },\n lightpink: {\n r: 1,\n g: 0.713725,\n b: 0.756863,\n },\n lightsalmon: {\n r: 1,\n g: 0.627451,\n b: 0.478431,\n },\n lightseagreen: {\n r: 0.12549,\n g: 0.698039,\n b: 0.666667,\n },\n lightskyblue: {\n r: 0.529412,\n g: 0.807843,\n b: 0.980392,\n },\n lightslategray: {\n r: 0.466667,\n g: 0.533333,\n b: 0.6,\n },\n lightslategrey: {\n r: 0.466667,\n g: 0.533333,\n b: 0.6,\n },\n lightsteelblue: {\n r: 0.690196,\n g: 0.768627,\n b: 0.870588,\n },\n lightyellow: {\n r: 1,\n g: 1,\n b: 0.878431,\n },\n lime: {\n r: 0,\n g: 1,\n b: 0,\n },\n limegreen: {\n r: 0.196078,\n g: 0.803922,\n b: 0.196078,\n },\n linen: {\n r: 0.980392,\n g: 0.941176,\n b: 0.901961,\n },\n magenta: {\n r: 1,\n g: 0,\n b: 1,\n },\n maroon: {\n r: 0.501961,\n g: 0,\n b: 0,\n },\n mediumaquamarine: {\n r: 0.4,\n g: 0.803922,\n b: 0.666667,\n },\n mediumblue: {\n r: 0,\n g: 0,\n b: 0.803922,\n },\n mediumorchid: {\n r: 0.729412,\n g: 0.333333,\n b: 0.827451,\n },\n mediumpurple: {\n r: 0.576471,\n g: 0.439216,\n b: 0.858824,\n },\n mediumseagreen: {\n r: 0.235294,\n g: 0.701961,\n b: 0.443137,\n },\n mediumslateblue: {\n r: 0.482353,\n g: 0.407843,\n b: 0.933333,\n },\n mediumspringgreen: {\n r: 0,\n g: 0.980392,\n b: 0.603922,\n },\n mediumturquoise: {\n r: 0.282353,\n g: 0.819608,\n b: 0.8,\n },\n mediumvioletred: {\n r: 0.780392,\n g: 0.082353,\n b: 0.521569,\n },\n midnightblue: {\n r: 0.098039,\n g: 0.098039,\n b: 0.439216,\n },\n mintcream: {\n r: 0.960784,\n g: 1,\n b: 0.980392,\n },\n mistyrose: {\n r: 1,\n g: 0.894118,\n b: 0.882353,\n },\n moccasin: {\n r: 1,\n g: 0.894118,\n b: 0.709804,\n },\n navajowhite: {\n r: 1,\n g: 0.870588,\n b: 0.678431,\n },\n navy: {\n r: 0,\n g: 0,\n b: 0.501961,\n },\n oldlace: {\n r: 0.992157,\n g: 0.960784,\n b: 0.901961,\n },\n olive: {\n r: 0.501961,\n g: 0.501961,\n b: 0,\n },\n olivedrab: {\n r: 0.419608,\n g: 0.556863,\n b: 0.137255,\n },\n orange: {\n r: 1,\n g: 0.647059,\n b: 0,\n },\n orangered: {\n r: 1,\n g: 0.270588,\n b: 0,\n },\n orchid: {\n r: 0.854902,\n g: 0.439216,\n b: 0.839216,\n },\n palegoldenrod: {\n r: 0.933333,\n g: 0.909804,\n b: 0.666667,\n },\n palegreen: {\n r: 0.596078,\n g: 0.984314,\n b: 0.596078,\n },\n paleturquoise: {\n r: 0.686275,\n g: 0.933333,\n b: 0.933333,\n },\n palevioletred: {\n r: 0.858824,\n g: 0.439216,\n b: 0.576471,\n },\n papayawhip: {\n r: 1,\n g: 0.937255,\n b: 0.835294,\n },\n peachpuff: {\n r: 1,\n g: 0.854902,\n b: 0.72549,\n },\n peru: {\n r: 0.803922,\n g: 0.521569,\n b: 0.247059,\n },\n pink: {\n r: 1,\n g: 0.752941,\n b: 0.796078,\n },\n plum: {\n r: 0.866667,\n g: 0.627451,\n b: 0.866667,\n },\n powderblue: {\n r: 0.690196,\n g: 0.878431,\n b: 0.901961,\n },\n purple: {\n r: 0.501961,\n g: 0,\n b: 0.501961,\n },\n red: {\n r: 1,\n g: 0,\n b: 0,\n },\n rosybrown: {\n r: 0.737255,\n g: 0.560784,\n b: 0.560784,\n },\n royalblue: {\n r: 0.254902,\n g: 0.411765,\n b: 0.882353,\n },\n saddlebrown: {\n r: 0.545098,\n g: 0.270588,\n b: 0.07451,\n },\n salmon: {\n r: 0.980392,\n g: 0.501961,\n b: 0.447059,\n },\n sandybrown: {\n r: 0.956863,\n g: 0.643137,\n b: 0.376471,\n },\n seagreen: {\n r: 0.180392,\n g: 0.545098,\n b: 0.341176,\n },\n seashell: {\n r: 1,\n g: 0.960784,\n b: 0.933333,\n },\n sienna: {\n r: 0.627451,\n g: 0.321569,\n b: 0.176471,\n },\n silver: {\n r: 0.752941,\n g: 0.752941,\n b: 0.752941,\n },\n skyblue: {\n r: 0.529412,\n g: 0.807843,\n b: 0.921569,\n },\n slateblue: {\n r: 0.415686,\n g: 0.352941,\n b: 0.803922,\n },\n slategray: {\n r: 0.439216,\n g: 0.501961,\n b: 0.564706,\n },\n slategrey: {\n r: 0.439216,\n g: 0.501961,\n b: 0.564706,\n },\n snow: {\n r: 1,\n g: 0.980392,\n b: 0.980392,\n },\n springgreen: {\n r: 0,\n g: 1,\n b: 0.498039,\n },\n steelblue: {\n r: 0.27451,\n g: 0.509804,\n b: 0.705882,\n },\n tan: {\n r: 0.823529,\n g: 0.705882,\n b: 0.54902,\n },\n teal: {\n r: 0,\n g: 0.501961,\n b: 0.501961,\n },\n thistle: {\n r: 0.847059,\n g: 0.74902,\n b: 0.847059,\n },\n tomato: {\n r: 1,\n g: 0.388235,\n b: 0.278431,\n },\n transparent: {\n r: 0,\n g: 0,\n b: 0,\n a: 0,\n },\n turquoise: {\n r: 0.25098,\n g: 0.878431,\n b: 0.815686,\n },\n violet: {\n r: 0.933333,\n g: 0.509804,\n b: 0.933333,\n },\n wheat: {\n r: 0.960784,\n g: 0.870588,\n b: 0.701961,\n },\n white: {\n r: 1,\n g: 1,\n b: 1,\n },\n whitesmoke: {\n r: 0.960784,\n g: 0.960784,\n b: 0.960784,\n },\n yellow: {\n r: 1,\n g: 1,\n b: 0,\n },\n yellowgreen: {\n r: 0.603922,\n g: 0.803922,\n b: 0.196078,\n },\n};\n","import { ColorRGBA64 } from \"./color-rgba-64.js\";\nimport { normalize } from \"./math-utilities.js\";\nimport { namedColorsConfigs } from \"./named-colors.js\";\n// Matches rgb(R, G, B) where R, G, and B are integers [0 - 255]\nconst webRGBRegex = /^rgb\\(\\s*((?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|\\d{1,2})\\s*,\\s*){2}(?:25[0-5]|2[0-4]\\d|1\\d\\d|\\d{1,2})\\s*)\\)$/i;\n// Matches rgb(R, G, B, A) where R, G, and B are integers [0 - 255] and A is [0-1] floating\nconst webRGBARegex = /^rgba\\(\\s*((?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|\\d{1,2})\\s*,\\s*){3}(?:0|1|0?\\.\\d*)\\s*)\\)$/i;\n// Matches #RGB and #RRGGBB, where R, G, and B are [0-9] or [A-F]\nconst hexRGBRegex = /^#((?:[0-9a-f]{6}|[0-9a-f]{3}))$/i;\n// Matches #RGB and #RRGGBBAA, where R, G, B, and A are [0-9] or [A-F]\nconst hexRGBARegex = /^#((?:[0-9a-f]{8}|[0-9a-f]{4}))$/i;\n/**\n * Test if a color matches #RRGGBB or #RGB\n * @public\n */\nexport function isColorStringHexRGB(raw) {\n return hexRGBRegex.test(raw);\n}\n/**\n * Test if a color matches #AARRGGBB or #ARGB\n * @public\n */\nexport function isColorStringHexARGB(raw) {\n return hexRGBARegex.test(raw);\n}\n/**\n * Test if a color matches #RRGGBBAA or #RGBA\n * @public\n */\nexport function isColorStringHexRGBA(raw) {\n return isColorStringHexARGB(raw); // No way to differentiate these two formats, so just use the same test\n}\n/**\n * Test if a color matches rgb(rr, gg, bb)\n * @public\n */\nexport function isColorStringWebRGB(raw) {\n return webRGBRegex.test(raw);\n}\n/**\n * Test if a color matches rgba(rr, gg, bb, aa)\n *\n * @public\n */\nexport function isColorStringWebRGBA(raw) {\n return webRGBARegex.test(raw);\n}\n/**\n * Tests whether a color is in {@link @microsoft/fast-colors#NamedColors}.\n * @param raw - the color name to test\n * @public\n */\nexport function isColorNamed(raw) {\n return namedColorsConfigs.hasOwnProperty(raw);\n}\n/**\n * Converts a hexadecimal color string to a {@link @microsoft/fast-colors#ColorRGBA64}.\n * @param raw - a color string in the form of \"#RRGGBB\" or \"#RGB\"\n * @example\n * ```ts\n * parseColorHexRGBA(\"#FF0000\");\n * parseColorHexRGBA(\"#F00\");\n * ```\n * @public\n */\nexport function parseColorHexRGB(raw) {\n const result = hexRGBRegex.exec(raw);\n if (result === null) {\n return null;\n }\n let digits = result[1];\n if (digits.length === 3) {\n const r = digits.charAt(0);\n const g = digits.charAt(1);\n const b = digits.charAt(2);\n digits = r.concat(r, g, g, b, b);\n }\n const rawInt = parseInt(digits, 16);\n if (isNaN(rawInt)) {\n return null;\n }\n // Note the use of >>> rather than >> as we want JS to manipulate these as unsigned numbers\n return new ColorRGBA64(normalize((rawInt & 0xff0000) >>> 16, 0, 255), normalize((rawInt & 0x00ff00) >>> 8, 0, 255), normalize(rawInt & 0x0000ff, 0, 255), 1);\n}\n/**\n * Converts a hexadecimal color string to a {@link @microsoft/fast-colors#ColorRGBA64}.\n * @param raw - a color string in the form of \"#AARRGGBB\" or \"#ARGB\"\n * @example\n * ```ts\n * parseColorHexRGBA(\"#AAFF0000\");\n * parseColorHexRGBA(\"#AF00\");\n * ```\n * @public\n */\nexport function parseColorHexARGB(raw) {\n const result = hexRGBARegex.exec(raw);\n if (result === null) {\n return null;\n }\n let digits = result[1];\n if (digits.length === 4) {\n const a = digits.charAt(0);\n const r = digits.charAt(1);\n const g = digits.charAt(2);\n const b = digits.charAt(3);\n digits = a.concat(a, r, r, g, g, b, b);\n }\n const rawInt = parseInt(digits, 16);\n if (isNaN(rawInt)) {\n return null;\n }\n // Note the use of >>> rather than >> as we want JS to manipulate these as unsigned numbers\n return new ColorRGBA64(normalize((rawInt & 0x00ff0000) >>> 16, 0, 255), normalize((rawInt & 0x0000ff00) >>> 8, 0, 255), normalize(rawInt & 0x000000ff, 0, 255), normalize((rawInt & 0xff000000) >>> 24, 0, 255));\n}\n/**\n * Converts a hexadecimal color string to a {@link @microsoft/fast-colors#ColorRGBA64}.\n * @param raw - a color string in the form of \"#RRGGBBAA\" or \"#RGBA\"\n * @example\n * ```ts\n * parseColorHexRGBA(\"#FF0000AA\");\n * parseColorHexRGBA(\"#F00A\");\n * ```\n * @public\n */\nexport function parseColorHexRGBA(raw) {\n const result = hexRGBARegex.exec(raw);\n if (result === null) {\n return null;\n }\n let digits = result[1];\n if (digits.length === 4) {\n const r = digits.charAt(0);\n const g = digits.charAt(1);\n const b = digits.charAt(2);\n const a = digits.charAt(3);\n digits = r.concat(r, g, g, b, b, a, a);\n }\n const rawInt = parseInt(digits, 16);\n if (isNaN(rawInt)) {\n return null;\n }\n // Note the use of >>> rather than >> as we want JS to manipulate these as unsigned numbers\n return new ColorRGBA64(normalize((rawInt & 0xff000000) >>> 24, 0, 255), normalize((rawInt & 0x00ff0000) >>> 16, 0, 255), normalize((rawInt & 0x0000ff00) >>> 8, 0, 255), normalize(rawInt & 0x000000ff, 0, 255));\n}\n/**\n * Converts a rgb color string to a {@link @microsoft/fast-colors#ColorRGBA64}.\n * @param raw - a color string format \"rgba(RR,GG,BB)\" where RR,GG,BB are [0,255]\n * @example\n * ```ts\n * parseColorWebRGB(\"rgba(255, 0, 0\");\n * ```\n * @public\n */\nexport function parseColorWebRGB(raw) {\n const result = webRGBRegex.exec(raw);\n if (result === null) {\n return null;\n }\n const split = result[1].split(\",\");\n return new ColorRGBA64(normalize(Number(split[0]), 0, 255), normalize(Number(split[1]), 0, 255), normalize(Number(split[2]), 0, 255), 1);\n}\n/**\n * Converts a rgba color string to a {@link @microsoft/fast-colors#ColorRGBA64}.\n * @param raw - a color string format \"rgba(RR,GG,BB,a)\" where RR,GG,BB are [0,255] and a is [0,1]\n * @example\n * ```ts\n * parseColorWebRGBA(\"rgba(255, 0, 0, 1\");\n * ```\n * @public\n */\nexport function parseColorWebRGBA(raw) {\n const result = webRGBARegex.exec(raw);\n if (result === null) {\n return null;\n }\n const split = result[1].split(\",\");\n if (split.length === 4) {\n return new ColorRGBA64(normalize(Number(split[0]), 0, 255), normalize(Number(split[1]), 0, 255), normalize(Number(split[2]), 0, 255), Number(split[3]));\n }\n return null;\n}\n/**\n * Converts a named color to a {@link @microsoft/fast-colors#ColorRGBA64}.\n * @param raw - a {@link https://www.w3schools.com/colors/colors_names.asp | CSS color name}.\n * @example\n * ```ts\n * parseColorNamed(\"red\");\n * ```\n * @public\n */\nexport function parseColorNamed(raw) {\n // const rawLower: typeof raw = raw.toLowerCase() : raw.toString();\n const config = namedColorsConfigs[raw.toLowerCase()];\n return config\n ? new ColorRGBA64(config.r, config.g, config.b, config.hasOwnProperty(\"a\") ? config.a : void 0)\n : null;\n}\n/**\n *\n Expects any of the following and attempts to determine which is being used\n * #RRGGBB, #AARRGGBB, rgb(RR,GG,BB) rgba(RR,GG,BB,a),\n * or any of the {@link https://www.w3schools.com/colors/colors_names.asp | CSS color names}.\n * @param raw - the color string to parse\n * @public\n */\nexport function parseColor(raw) {\n const rawLower = raw.toLowerCase();\n return isColorStringHexRGB(rawLower)\n ? parseColorHexRGB(rawLower)\n : isColorStringHexRGBA(rawLower)\n ? parseColorHexARGB(rawLower)\n : isColorStringWebRGB(rawLower)\n ? parseColorWebRGB(rawLower)\n : isColorStringWebRGBA(rawLower)\n ? parseColorWebRGBA(rawLower)\n : isColorNamed(rawLower)\n ? parseColorNamed(rawLower)\n : null;\n}\n","import { Observable } from \"../observation/observable.js\";\nimport { DOM } from \"../dom.js\";\nimport { createMetadataLocator } from \"../platform.js\";\n/**\n * Metadata used to configure a custom attribute's behavior.\n * @public\n */\nexport const AttributeConfiguration = Object.freeze({\n /**\n * Locates all attribute configurations associated with a type.\n */\n locate: createMetadataLocator(),\n});\n/**\n * A {@link ValueConverter} that converts to and from `boolean` values.\n * @remarks\n * Used automatically when the `boolean` {@link AttributeMode} is selected.\n * @public\n */\nexport const booleanConverter = {\n toView(value) {\n return value ? \"true\" : \"false\";\n },\n fromView(value) {\n if (value === null ||\n value === void 0 ||\n value === \"false\" ||\n value === false ||\n value === 0) {\n return false;\n }\n return true;\n },\n};\n/**\n * A {@link ValueConverter} that converts to and from `number` values.\n * @remarks\n * This converter allows for nullable numbers, returning `null` if the\n * input was `null`, `undefined`, or `NaN`.\n * @public\n */\nexport const nullableNumberConverter = {\n toView(value) {\n if (value === null || value === undefined) {\n return null;\n }\n const number = value * 1;\n return isNaN(number) ? null : number.toString();\n },\n fromView(value) {\n if (value === null || value === undefined) {\n return null;\n }\n const number = value * 1;\n return isNaN(number) ? null : number;\n },\n};\n/**\n * An implementation of {@link Accessor} that supports reactivity,\n * change callbacks, attribute reflection, and type conversion for\n * custom elements.\n * @public\n */\nexport class AttributeDefinition {\n /**\n * Creates an instance of AttributeDefinition.\n * @param Owner - The class constructor that owns this attribute.\n * @param name - The name of the property associated with the attribute.\n * @param attribute - The name of the attribute in HTML.\n * @param mode - The {@link AttributeMode} that describes the behavior of this attribute.\n * @param converter - A {@link ValueConverter} that integrates with the property getter/setter\n * to convert values to and from a DOM string.\n */\n constructor(Owner, name, attribute = name.toLowerCase(), mode = \"reflect\", converter) {\n this.guards = new Set();\n this.Owner = Owner;\n this.name = name;\n this.attribute = attribute;\n this.mode = mode;\n this.converter = converter;\n this.fieldName = `_${name}`;\n this.callbackName = `${name}Changed`;\n this.hasCallback = this.callbackName in Owner.prototype;\n if (mode === \"boolean\" && converter === void 0) {\n this.converter = booleanConverter;\n }\n }\n /**\n * Sets the value of the attribute/property on the source element.\n * @param source - The source element to access.\n * @param value - The value to set the attribute/property to.\n */\n setValue(source, newValue) {\n const oldValue = source[this.fieldName];\n const converter = this.converter;\n if (converter !== void 0) {\n newValue = converter.fromView(newValue);\n }\n if (oldValue !== newValue) {\n source[this.fieldName] = newValue;\n this.tryReflectToAttribute(source);\n if (this.hasCallback) {\n source[this.callbackName](oldValue, newValue);\n }\n source.$fastController.notify(this.name);\n }\n }\n /**\n * Gets the value of the attribute/property on the source element.\n * @param source - The source element to access.\n */\n getValue(source) {\n Observable.track(source, this.name);\n return source[this.fieldName];\n }\n /** @internal */\n onAttributeChangedCallback(element, value) {\n if (this.guards.has(element)) {\n return;\n }\n this.guards.add(element);\n this.setValue(element, value);\n this.guards.delete(element);\n }\n tryReflectToAttribute(element) {\n const mode = this.mode;\n const guards = this.guards;\n if (guards.has(element) || mode === \"fromView\") {\n return;\n }\n DOM.queueUpdate(() => {\n guards.add(element);\n const latestValue = element[this.fieldName];\n switch (mode) {\n case \"reflect\":\n const converter = this.converter;\n DOM.setAttribute(element, this.attribute, converter !== void 0 ? converter.toView(latestValue) : latestValue);\n break;\n case \"boolean\":\n DOM.setBooleanAttribute(element, this.attribute, latestValue);\n break;\n }\n guards.delete(element);\n });\n }\n /**\n * Collects all attribute definitions associated with the owner.\n * @param Owner - The class constructor to collect attribute for.\n * @param attributeLists - Any existing attributes to collect and merge with those associated with the owner.\n * @internal\n */\n static collect(Owner, ...attributeLists) {\n const attributes = [];\n attributeLists.push(AttributeConfiguration.locate(Owner));\n for (let i = 0, ii = attributeLists.length; i < ii; ++i) {\n const list = attributeLists[i];\n if (list === void 0) {\n continue;\n }\n for (let j = 0, jj = list.length; j < jj; ++j) {\n const config = list[j];\n if (typeof config === \"string\") {\n attributes.push(new AttributeDefinition(Owner, config));\n }\n else {\n attributes.push(new AttributeDefinition(Owner, config.property, config.attribute, config.mode, config.converter));\n }\n }\n }\n return attributes;\n }\n}\nexport function attr(configOrTarget, prop) {\n let config;\n function decorator($target, $prop) {\n if (arguments.length > 1) {\n // Non invocation:\n // - @attr\n // Invocation with or w/o opts:\n // - @attr()\n // - @attr({...opts})\n config.property = $prop;\n }\n AttributeConfiguration.locate($target.constructor).push(config);\n }\n if (arguments.length > 1) {\n // Non invocation:\n // - @attr\n config = {};\n decorator(configOrTarget, prop);\n return;\n }\n // Invocation with or w/o opts:\n // - @attr()\n // - @attr({...opts})\n config = configOrTarget === void 0 ? {} : configOrTarget;\n return decorator;\n}\n","import { FAST } from \"../platform.js\";\nimport { Observable } from \"../observation/observable.js\";\nimport { ElementStyles } from \"../styles/element-styles.js\";\nimport { AttributeDefinition } from \"./attributes.js\";\nconst defaultShadowOptions = { mode: \"open\" };\nconst defaultElementOptions = {};\nconst fastRegistry = FAST.getById(4 /* elementRegistry */, () => {\n const typeToDefinition = new Map();\n return Object.freeze({\n register(definition) {\n if (typeToDefinition.has(definition.type)) {\n return false;\n }\n typeToDefinition.set(definition.type, definition);\n return true;\n },\n getByType(key) {\n return typeToDefinition.get(key);\n },\n });\n});\n/**\n * Defines metadata for a FASTElement.\n * @public\n */\nexport class FASTElementDefinition {\n /**\n * Creates an instance of FASTElementDefinition.\n * @param type - The type this definition is being created for.\n * @param nameOrConfig - The name of the element to define or a config object\n * that describes the element to define.\n */\n constructor(type, nameOrConfig = type.definition) {\n if (typeof nameOrConfig === \"string\") {\n nameOrConfig = { name: nameOrConfig };\n }\n this.type = type;\n this.name = nameOrConfig.name;\n this.template = nameOrConfig.template;\n const attributes = AttributeDefinition.collect(type, nameOrConfig.attributes);\n const observedAttributes = new Array(attributes.length);\n const propertyLookup = {};\n const attributeLookup = {};\n for (let i = 0, ii = attributes.length; i < ii; ++i) {\n const current = attributes[i];\n observedAttributes[i] = current.attribute;\n propertyLookup[current.name] = current;\n attributeLookup[current.attribute] = current;\n }\n this.attributes = attributes;\n this.observedAttributes = observedAttributes;\n this.propertyLookup = propertyLookup;\n this.attributeLookup = attributeLookup;\n this.shadowOptions =\n nameOrConfig.shadowOptions === void 0\n ? defaultShadowOptions\n : nameOrConfig.shadowOptions === null\n ? void 0\n : Object.assign(Object.assign({}, defaultShadowOptions), nameOrConfig.shadowOptions);\n this.elementOptions =\n nameOrConfig.elementOptions === void 0\n ? defaultElementOptions\n : Object.assign(Object.assign({}, defaultElementOptions), nameOrConfig.elementOptions);\n this.styles =\n nameOrConfig.styles === void 0\n ? void 0\n : Array.isArray(nameOrConfig.styles)\n ? ElementStyles.create(nameOrConfig.styles)\n : nameOrConfig.styles instanceof ElementStyles\n ? nameOrConfig.styles\n : ElementStyles.create([nameOrConfig.styles]);\n }\n /**\n * Indicates if this element has been defined in at least one registry.\n */\n get isDefined() {\n return !!fastRegistry.getByType(this.type);\n }\n /**\n * Defines a custom element based on this definition.\n * @param registry - The element registry to define the element in.\n */\n define(registry = customElements) {\n const type = this.type;\n if (fastRegistry.register(this)) {\n const attributes = this.attributes;\n const proto = type.prototype;\n for (let i = 0, ii = attributes.length; i < ii; ++i) {\n Observable.defineProperty(proto, attributes[i]);\n }\n Reflect.defineProperty(type, \"observedAttributes\", {\n value: this.observedAttributes,\n enumerable: true,\n });\n }\n if (!registry.get(this.name)) {\n registry.define(this.name, type, this.elementOptions);\n }\n return this;\n }\n}\n/**\n * Gets the element definition associated with the specified type.\n * @param type - The custom element type to retrieve the definition for.\n */\nFASTElementDefinition.forType = fastRegistry.getByType;\n","import { DOM } from \"../dom.js\";\nimport { PropertyChangeNotifier } from \"../observation/notifier.js\";\nimport { defaultExecutionContext, Observable } from \"../observation/observable.js\";\nimport { FASTElementDefinition } from \"./fast-definitions.js\";\nconst shadowRoots = new WeakMap();\nconst defaultEventOptions = {\n bubbles: true,\n composed: true,\n cancelable: true,\n};\nfunction getShadowRoot(element) {\n return element.shadowRoot || shadowRoots.get(element) || null;\n}\n/**\n * Controls the lifecycle and rendering of a `FASTElement`.\n * @public\n */\nexport class Controller extends PropertyChangeNotifier {\n /**\n * Creates a Controller to control the specified element.\n * @param element - The element to be controlled by this controller.\n * @param definition - The element definition metadata that instructs this\n * controller in how to handle rendering and other platform integrations.\n * @internal\n */\n constructor(element, definition) {\n super(element);\n this.boundObservables = null;\n this.behaviors = null;\n this.needsInitialization = true;\n this._template = null;\n this._styles = null;\n this._isConnected = false;\n /**\n * This allows Observable.getNotifier(...) to return the Controller\n * when the notifier for the Controller itself is being requested. The\n * result is that the Observable system does not need to create a separate\n * instance of Notifier for observables on the Controller. The component and\n * the controller will now share the same notifier, removing one-object construct\n * per web component instance.\n */\n this.$fastController = this;\n /**\n * The view associated with the custom element.\n * @remarks\n * If `null` then the element is managing its own rendering.\n */\n this.view = null;\n this.element = element;\n this.definition = definition;\n const shadowOptions = definition.shadowOptions;\n if (shadowOptions !== void 0) {\n const shadowRoot = element.attachShadow(shadowOptions);\n if (shadowOptions.mode === \"closed\") {\n shadowRoots.set(element, shadowRoot);\n }\n }\n // Capture any observable values that were set by the binding engine before\n // the browser upgraded the element. Then delete the property since it will\n // shadow the getter/setter that is required to make the observable operate.\n // Later, in the connect callback, we'll re-apply the values.\n const accessors = Observable.getAccessors(element);\n if (accessors.length > 0) {\n const boundObservables = (this.boundObservables = Object.create(null));\n for (let i = 0, ii = accessors.length; i < ii; ++i) {\n const propertyName = accessors[i].name;\n const value = element[propertyName];\n if (value !== void 0) {\n delete element[propertyName];\n boundObservables[propertyName] = value;\n }\n }\n }\n }\n /**\n * Indicates whether or not the custom element has been\n * connected to the document.\n */\n get isConnected() {\n Observable.track(this, \"isConnected\");\n return this._isConnected;\n }\n setIsConnected(value) {\n this._isConnected = value;\n Observable.notify(this, \"isConnected\");\n }\n /**\n * Gets/sets the template used to render the component.\n * @remarks\n * This value can only be accurately read after connect but can be set at any time.\n */\n get template() {\n return this._template;\n }\n set template(value) {\n if (this._template === value) {\n return;\n }\n this._template = value;\n if (!this.needsInitialization) {\n this.renderTemplate(value);\n }\n }\n /**\n * Gets/sets the primary styles used for the component.\n * @remarks\n * This value can only be accurately read after connect but can be set at any time.\n */\n get styles() {\n return this._styles;\n }\n set styles(value) {\n if (this._styles === value) {\n return;\n }\n if (this._styles !== null) {\n this.removeStyles(this._styles);\n }\n this._styles = value;\n if (!this.needsInitialization && value !== null) {\n this.addStyles(value);\n }\n }\n /**\n * Adds styles to this element. Providing an HTMLStyleElement will attach the element instance to the shadowRoot.\n * @param styles - The styles to add.\n */\n addStyles(styles) {\n const target = getShadowRoot(this.element) ||\n this.element.getRootNode();\n if (styles instanceof HTMLStyleElement) {\n target.append(styles);\n }\n else if (!styles.isAttachedTo(target)) {\n const sourceBehaviors = styles.behaviors;\n styles.addStylesTo(target);\n if (sourceBehaviors !== null) {\n this.addBehaviors(sourceBehaviors);\n }\n }\n }\n /**\n * Removes styles from this element. Providing an HTMLStyleElement will detach the element instance from the shadowRoot.\n * @param styles - the styles to remove.\n */\n removeStyles(styles) {\n const target = getShadowRoot(this.element) ||\n this.element.getRootNode();\n if (styles instanceof HTMLStyleElement) {\n target.removeChild(styles);\n }\n else if (styles.isAttachedTo(target)) {\n const sourceBehaviors = styles.behaviors;\n styles.removeStylesFrom(target);\n if (sourceBehaviors !== null) {\n this.removeBehaviors(sourceBehaviors);\n }\n }\n }\n /**\n * Adds behaviors to this element.\n * @param behaviors - The behaviors to add.\n */\n addBehaviors(behaviors) {\n const targetBehaviors = this.behaviors || (this.behaviors = new Map());\n const length = behaviors.length;\n const behaviorsToBind = [];\n for (let i = 0; i < length; ++i) {\n const behavior = behaviors[i];\n if (targetBehaviors.has(behavior)) {\n targetBehaviors.set(behavior, targetBehaviors.get(behavior) + 1);\n }\n else {\n targetBehaviors.set(behavior, 1);\n behaviorsToBind.push(behavior);\n }\n }\n if (this._isConnected) {\n const element = this.element;\n for (let i = 0; i < behaviorsToBind.length; ++i) {\n behaviorsToBind[i].bind(element, defaultExecutionContext);\n }\n }\n }\n /**\n * Removes behaviors from this element.\n * @param behaviors - The behaviors to remove.\n * @param force - Forces unbinding of behaviors.\n */\n removeBehaviors(behaviors, force = false) {\n const targetBehaviors = this.behaviors;\n if (targetBehaviors === null) {\n return;\n }\n const length = behaviors.length;\n const behaviorsToUnbind = [];\n for (let i = 0; i < length; ++i) {\n const behavior = behaviors[i];\n if (targetBehaviors.has(behavior)) {\n const count = targetBehaviors.get(behavior) - 1;\n count === 0 || force\n ? targetBehaviors.delete(behavior) && behaviorsToUnbind.push(behavior)\n : targetBehaviors.set(behavior, count);\n }\n }\n if (this._isConnected) {\n const element = this.element;\n for (let i = 0; i < behaviorsToUnbind.length; ++i) {\n behaviorsToUnbind[i].unbind(element);\n }\n }\n }\n /**\n * Runs connected lifecycle behavior on the associated element.\n */\n onConnectedCallback() {\n if (this._isConnected) {\n return;\n }\n const element = this.element;\n if (this.needsInitialization) {\n this.finishInitialization();\n }\n else if (this.view !== null) {\n this.view.bind(element, defaultExecutionContext);\n }\n const behaviors = this.behaviors;\n if (behaviors !== null) {\n for (const [behavior] of behaviors) {\n behavior.bind(element, defaultExecutionContext);\n }\n }\n this.setIsConnected(true);\n }\n /**\n * Runs disconnected lifecycle behavior on the associated element.\n */\n onDisconnectedCallback() {\n if (!this._isConnected) {\n return;\n }\n this.setIsConnected(false);\n const view = this.view;\n if (view !== null) {\n view.unbind();\n }\n const behaviors = this.behaviors;\n if (behaviors !== null) {\n const element = this.element;\n for (const [behavior] of behaviors) {\n behavior.unbind(element);\n }\n }\n }\n /**\n * Runs the attribute changed callback for the associated element.\n * @param name - The name of the attribute that changed.\n * @param oldValue - The previous value of the attribute.\n * @param newValue - The new value of the attribute.\n */\n onAttributeChangedCallback(name, oldValue, newValue) {\n const attrDef = this.definition.attributeLookup[name];\n if (attrDef !== void 0) {\n attrDef.onAttributeChangedCallback(this.element, newValue);\n }\n }\n /**\n * Emits a custom HTML event.\n * @param type - The type name of the event.\n * @param detail - The event detail object to send with the event.\n * @param options - The event options. By default bubbles and composed.\n * @remarks\n * Only emits events if connected.\n */\n emit(type, detail, options) {\n if (this._isConnected) {\n return this.element.dispatchEvent(new CustomEvent(type, Object.assign(Object.assign({ detail }, defaultEventOptions), options)));\n }\n return false;\n }\n finishInitialization() {\n const element = this.element;\n const boundObservables = this.boundObservables;\n // If we have any observables that were bound, re-apply their values.\n if (boundObservables !== null) {\n const propertyNames = Object.keys(boundObservables);\n for (let i = 0, ii = propertyNames.length; i < ii; ++i) {\n const propertyName = propertyNames[i];\n element[propertyName] = boundObservables[propertyName];\n }\n this.boundObservables = null;\n }\n const definition = this.definition;\n // 1. Template overrides take top precedence.\n if (this._template === null) {\n if (this.element.resolveTemplate) {\n // 2. Allow for element instance overrides next.\n this._template = this.element.resolveTemplate();\n }\n else if (definition.template) {\n // 3. Default to the static definition.\n this._template = definition.template || null;\n }\n }\n // If we have a template after the above process, render it.\n // If there's no template, then the element author has opted into\n // custom rendering and they will managed the shadow root's content themselves.\n if (this._template !== null) {\n this.renderTemplate(this._template);\n }\n // 1. Styles overrides take top precedence.\n if (this._styles === null) {\n if (this.element.resolveStyles) {\n // 2. Allow for element instance overrides next.\n this._styles = this.element.resolveStyles();\n }\n else if (definition.styles) {\n // 3. Default to the static definition.\n this._styles = definition.styles || null;\n }\n }\n // If we have styles after the above process, add them.\n if (this._styles !== null) {\n this.addStyles(this._styles);\n }\n this.needsInitialization = false;\n }\n renderTemplate(template) {\n const element = this.element;\n // When getting the host to render to, we start by looking\n // up the shadow root. If there isn't one, then that means\n // we're doing a Light DOM render to the element's direct children.\n const host = getShadowRoot(element) || element;\n if (this.view !== null) {\n // If there's already a view, we need to unbind and remove through dispose.\n this.view.dispose();\n this.view = null;\n }\n else if (!this.needsInitialization) {\n // If there was previous custom rendering, we need to clear out the host.\n DOM.removeChildNodes(host);\n }\n if (template) {\n // If a new template was provided, render it.\n this.view = template.render(element, host, element);\n }\n }\n /**\n * Locates or creates a controller for the specified element.\n * @param element - The element to return the controller for.\n * @remarks\n * The specified element must have a {@link FASTElementDefinition}\n * registered either through the use of the {@link customElement}\n * decorator or a call to `FASTElement.define`.\n */\n static forCustomElement(element) {\n const controller = element.$fastController;\n if (controller !== void 0) {\n return controller;\n }\n const definition = FASTElementDefinition.forType(element.constructor);\n if (definition === void 0) {\n throw new Error(\"Missing FASTElement definition.\");\n }\n return (element.$fastController = new Controller(element, definition));\n }\n}\n","import { Controller } from \"./controller.js\";\nimport { FASTElementDefinition, } from \"./fast-definitions.js\";\n/* eslint-disable-next-line @typescript-eslint/explicit-function-return-type */\nfunction createFASTElement(BaseType) {\n return class extends BaseType {\n constructor() {\n /* eslint-disable-next-line */\n super();\n Controller.forCustomElement(this);\n }\n $emit(type, detail, options) {\n return this.$fastController.emit(type, detail, options);\n }\n connectedCallback() {\n this.$fastController.onConnectedCallback();\n }\n disconnectedCallback() {\n this.$fastController.onDisconnectedCallback();\n }\n attributeChangedCallback(name, oldValue, newValue) {\n this.$fastController.onAttributeChangedCallback(name, oldValue, newValue);\n }\n };\n}\n/**\n * A minimal base class for FASTElements that also provides\n * static helpers for working with FASTElements.\n * @public\n */\nexport const FASTElement = Object.assign(createFASTElement(HTMLElement), {\n /**\n * Creates a new FASTElement base class inherited from the\n * provided base type.\n * @param BaseType - The base element type to inherit from.\n */\n from(BaseType) {\n return createFASTElement(BaseType);\n },\n /**\n * Defines a platform custom element based on the provided type and definition.\n * @param type - The custom element type to define.\n * @param nameOrDef - The name of the element to define or a definition object\n * that describes the element to define.\n */\n define(type, nameOrDef) {\n return new FASTElementDefinition(type, nameOrDef).define().type;\n },\n});\n/**\n * Decorator: Defines a platform custom element based on `FASTElement`.\n * @param nameOrDef - The name of the element to define or a definition object\n * that describes the element to define.\n * @public\n */\nexport function customElement(nameOrDef) {\n /* eslint-disable-next-line @typescript-eslint/explicit-function-return-type */\n return function (type) {\n new FASTElementDefinition(type, nameOrDef).define();\n };\n}\n","import { $global } from \"./platform.js\";\nconst updateQueue = $global.FAST.getById(1 /* updateQueue */, () => {\n const tasks = [];\n const pendingErrors = [];\n function throwFirstError() {\n if (pendingErrors.length) {\n throw pendingErrors.shift();\n }\n }\n function tryRunTask(task) {\n try {\n task.call();\n }\n catch (error) {\n pendingErrors.push(error);\n setTimeout(throwFirstError, 0);\n }\n }\n function process() {\n const capacity = 1024;\n let index = 0;\n while (index < tasks.length) {\n tryRunTask(tasks[index]);\n index++;\n // Prevent leaking memory for long chains of recursive calls to `DOM.queueUpdate`.\n // If we call `DOM.queueUpdate` within a task scheduled by `DOM.queueUpdate`, the queue will\n // grow, but to avoid an O(n) walk for every task we execute, we don't\n // shift tasks off the queue after they have been executed.\n // Instead, we periodically shift 1024 tasks off the queue.\n if (index > capacity) {\n // Manually shift all values starting at the index back to the\n // beginning of the queue.\n for (let scan = 0, newLength = tasks.length - index; scan < newLength; scan++) {\n tasks[scan] = tasks[scan + index];\n }\n tasks.length -= index;\n index = 0;\n }\n }\n tasks.length = 0;\n }\n function enqueue(callable) {\n if (tasks.length < 1) {\n $global.requestAnimationFrame(process);\n }\n tasks.push(callable);\n }\n return Object.freeze({\n enqueue,\n process,\n });\n});\n/* eslint-disable */\nconst fastHTMLPolicy = $global.trustedTypes.createPolicy(\"fast-html\", {\n createHTML: html => html,\n});\n/* eslint-enable */\nlet htmlPolicy = fastHTMLPolicy;\nconst marker = `fast-${Math.random().toString(36).substring(2, 8)}`;\n/** @internal */\nexport const _interpolationStart = `${marker}{`;\n/** @internal */\nexport const _interpolationEnd = `}${marker}`;\n/**\n * Common DOM APIs.\n * @public\n */\nexport const DOM = Object.freeze({\n /**\n * Indicates whether the DOM supports the adoptedStyleSheets feature.\n */\n supportsAdoptedStyleSheets: Array.isArray(document.adoptedStyleSheets) &&\n \"replace\" in CSSStyleSheet.prototype,\n /**\n * Sets the HTML trusted types policy used by the templating engine.\n * @param policy - The policy to set for HTML.\n * @remarks\n * This API can only be called once, for security reasons. It should be\n * called by the application developer at the start of their program.\n */\n setHTMLPolicy(policy) {\n if (htmlPolicy !== fastHTMLPolicy) {\n throw new Error(\"The HTML policy can only be set once.\");\n }\n htmlPolicy = policy;\n },\n /**\n * Turns a string into trusted HTML using the configured trusted types policy.\n * @param html - The string to turn into trusted HTML.\n * @remarks\n * Used internally by the template engine when creating templates\n * and setting innerHTML.\n */\n createHTML(html) {\n return htmlPolicy.createHTML(html);\n },\n /**\n * Determines if the provided node is a template marker used by the runtime.\n * @param node - The node to test.\n */\n isMarker(node) {\n return node && node.nodeType === 8 && node.data.startsWith(marker);\n },\n /**\n * Given a marker node, extract the {@link HTMLDirective} index from the placeholder.\n * @param node - The marker node to extract the index from.\n */\n extractDirectiveIndexFromMarker(node) {\n return parseInt(node.data.replace(`${marker}:`, \"\"));\n },\n /**\n * Creates a placeholder string suitable for marking out a location *within*\n * an attribute value or HTML content.\n * @param index - The directive index to create the placeholder for.\n * @remarks\n * Used internally by binding directives.\n */\n createInterpolationPlaceholder(index) {\n return `${_interpolationStart}${index}${_interpolationEnd}`;\n },\n /**\n * Creates a placeholder that manifests itself as an attribute on an\n * element.\n * @param attributeName - The name of the custom attribute.\n * @param index - The directive index to create the placeholder for.\n * @remarks\n * Used internally by attribute directives such as `ref`, `slotted`, and `children`.\n */\n createCustomAttributePlaceholder(attributeName, index) {\n return `${attributeName}=\"${this.createInterpolationPlaceholder(index)}\"`;\n },\n /**\n * Creates a placeholder that manifests itself as a marker within the DOM structure.\n * @param index - The directive index to create the placeholder for.\n * @remarks\n * Used internally by structural directives such as `repeat`.\n */\n createBlockPlaceholder(index) {\n return `<!--${marker}:${index}-->`;\n },\n /**\n * Schedules DOM update work in the next async batch.\n * @param callable - The callable function or object to queue.\n */\n queueUpdate: updateQueue.enqueue,\n /**\n * Immediately processes all work previously scheduled\n * through queueUpdate.\n * @remarks\n * This also forces nextUpdate promises\n * to resolve.\n */\n processUpdates: updateQueue.process,\n /**\n * Resolves with the next DOM update.\n */\n nextUpdate() {\n return new Promise(updateQueue.enqueue);\n },\n /**\n * Sets an attribute value on an element.\n * @param element - The element to set the attribute value on.\n * @param attributeName - The attribute name to set.\n * @param value - The value of the attribute to set.\n * @remarks\n * If the value is `null` or `undefined`, the attribute is removed, otherwise\n * it is set to the provided value using the standard `setAttribute` API.\n */\n setAttribute(element, attributeName, value) {\n if (value === null || value === undefined) {\n element.removeAttribute(attributeName);\n }\n else {\n element.setAttribute(attributeName, value);\n }\n },\n /**\n * Sets a boolean attribute value.\n * @param element - The element to set the boolean attribute value on.\n * @param attributeName - The attribute name to set.\n * @param value - The value of the attribute to set.\n * @remarks\n * If the value is true, the attribute is added; otherwise it is removed.\n */\n setBooleanAttribute(element, attributeName, value) {\n value\n ? element.setAttribute(attributeName, \"\")\n : element.removeAttribute(attributeName);\n },\n /**\n * Removes all the child nodes of the provided parent node.\n * @param parent - The node to remove the children from.\n */\n removeChildNodes(parent) {\n for (let child = parent.firstChild; child !== null; child = parent.firstChild) {\n parent.removeChild(child);\n }\n },\n /**\n * Creates a TreeWalker configured to walk a template fragment.\n * @param fragment - The fragment to walk.\n */\n createTemplateWalker(fragment) {\n return document.createTreeWalker(fragment, 133, // element, text, comment\n null, false);\n },\n});\n","/**\n * An implementation of {@link Notifier} that efficiently keeps track of\n * subscribers interested in a specific change notification on an\n * observable source.\n *\n * @remarks\n * This set is optimized for the most common scenario of 1 or 2 subscribers.\n * With this in mind, it can store a subscriber in an internal field, allowing it to avoid Array#push operations.\n * If the set ever exceeds two subscribers, it upgrades to an array automatically.\n * @public\n */\nexport class SubscriberSet {\n /**\n * Creates an instance of SubscriberSet for the specified source.\n * @param source - The object source that subscribers will receive notifications from.\n * @param initialSubscriber - An initial subscriber to changes.\n */\n constructor(source, initialSubscriber) {\n this.sub1 = void 0;\n this.sub2 = void 0;\n this.spillover = void 0;\n this.source = source;\n this.sub1 = initialSubscriber;\n }\n /**\n * Checks whether the provided subscriber has been added to this set.\n * @param subscriber - The subscriber to test for inclusion in this set.\n */\n has(subscriber) {\n return this.spillover === void 0\n ? this.sub1 === subscriber || this.sub2 === subscriber\n : this.spillover.indexOf(subscriber) !== -1;\n }\n /**\n * Subscribes to notification of changes in an object's state.\n * @param subscriber - The object that is subscribing for change notification.\n */\n subscribe(subscriber) {\n const spillover = this.spillover;\n if (spillover === void 0) {\n if (this.has(subscriber)) {\n return;\n }\n if (this.sub1 === void 0) {\n this.sub1 = subscriber;\n return;\n }\n if (this.sub2 === void 0) {\n this.sub2 = subscriber;\n return;\n }\n this.spillover = [this.sub1, this.sub2, subscriber];\n this.sub1 = void 0;\n this.sub2 = void 0;\n }\n else {\n const index = spillover.indexOf(subscriber);\n if (index === -1) {\n spillover.push(subscriber);\n }\n }\n }\n /**\n * Unsubscribes from notification of changes in an object's state.\n * @param subscriber - The object that is unsubscribing from change notification.\n */\n unsubscribe(subscriber) {\n const spillover = this.spillover;\n if (spillover === void 0) {\n if (this.sub1 === subscriber) {\n this.sub1 = void 0;\n }\n else if (this.sub2 === subscriber) {\n this.sub2 = void 0;\n }\n }\n else {\n const index = spillover.indexOf(subscriber);\n if (index !== -1) {\n spillover.splice(index, 1);\n }\n }\n }\n /**\n * Notifies all subscribers.\n * @param args - Data passed along to subscribers during notification.\n */\n notify(args) {\n const spillover = this.spillover;\n const source = this.source;\n if (spillover === void 0) {\n const sub1 = this.sub1;\n const sub2 = this.sub2;\n if (sub1 !== void 0) {\n sub1.handleChange(source, args);\n }\n if (sub2 !== void 0) {\n sub2.handleChange(source, args);\n }\n }\n else {\n for (let i = 0, ii = spillover.length; i < ii; ++i) {\n spillover[i].handleChange(source, args);\n }\n }\n }\n}\n/**\n * An implementation of Notifier that allows subscribers to be notified\n * of individual property changes on an object.\n * @public\n */\nexport class PropertyChangeNotifier {\n /**\n * Creates an instance of PropertyChangeNotifier for the specified source.\n * @param source - The object source that subscribers will receive notifications from.\n */\n constructor(source) {\n this.subscribers = {};\n this.sourceSubscribers = null;\n this.source = source;\n }\n /**\n * Notifies all subscribers, based on the specified property.\n * @param propertyName - The property name, passed along to subscribers during notification.\n */\n notify(propertyName) {\n var _a;\n const subscribers = this.subscribers[propertyName];\n if (subscribers !== void 0) {\n subscribers.notify(propertyName);\n }\n (_a = this.sourceSubscribers) === null || _a === void 0 ? void 0 : _a.notify(propertyName);\n }\n /**\n * Subscribes to notification of changes in an object's state.\n * @param subscriber - The object that is subscribing for change notification.\n * @param propertyToWatch - The name of the property that the subscriber is interested in watching for changes.\n */\n subscribe(subscriber, propertyToWatch) {\n var _a;\n if (propertyToWatch) {\n let subscribers = this.subscribers[propertyToWatch];\n if (subscribers === void 0) {\n this.subscribers[propertyToWatch] = subscribers = new SubscriberSet(this.source);\n }\n subscribers.subscribe(subscriber);\n }\n else {\n this.sourceSubscribers =\n (_a = this.sourceSubscribers) !== null && _a !== void 0 ? _a : new SubscriberSet(this.source);\n this.sourceSubscribers.subscribe(subscriber);\n }\n }\n /**\n * Unsubscribes from notification of changes in an object's state.\n * @param subscriber - The object that is unsubscribing from change notification.\n * @param propertyToUnwatch - The name of the property that the subscriber is no longer interested in watching.\n */\n unsubscribe(subscriber, propertyToUnwatch) {\n var _a;\n if (propertyToUnwatch) {\n const subscribers = this.subscribers[propertyToUnwatch];\n if (subscribers !== void 0) {\n subscribers.unsubscribe(subscriber);\n }\n }\n else {\n (_a = this.sourceSubscribers) === null || _a === void 0 ? void 0 : _a.unsubscribe(subscriber);\n }\n }\n}\n","import { DOM } from \"../dom.js\";\nimport { createMetadataLocator, FAST } from \"../platform.js\";\nimport { PropertyChangeNotifier, SubscriberSet } from \"./notifier.js\";\n/**\n * Common Observable APIs.\n * @public\n */\nexport const Observable = FAST.getById(2 /* observable */, () => {\n const volatileRegex = /(:|&&|\\|\\||if)/;\n const notifierLookup = new WeakMap();\n const queueUpdate = DOM.queueUpdate;\n let watcher = void 0;\n let createArrayObserver = (array) => {\n throw new Error(\"Must call enableArrayObservation before observing arrays.\");\n };\n function getNotifier(source) {\n let found = source.$fastController || notifierLookup.get(source);\n if (found === void 0) {\n if (Array.isArray(source)) {\n found = createArrayObserver(source);\n }\n else {\n notifierLookup.set(source, (found = new PropertyChangeNotifier(source)));\n }\n }\n return found;\n }\n const getAccessors = createMetadataLocator();\n class DefaultObservableAccessor {\n constructor(name) {\n this.name = name;\n this.field = `_${name}`;\n this.callback = `${name}Changed`;\n }\n getValue(source) {\n if (watcher !== void 0) {\n watcher.watch(source, this.name);\n }\n return source[this.field];\n }\n setValue(source, newValue) {\n const field = this.field;\n const oldValue = source[field];\n if (oldValue !== newValue) {\n source[field] = newValue;\n const callback = source[this.callback];\n if (typeof callback === \"function\") {\n callback.call(source, oldValue, newValue);\n }\n getNotifier(source).notify(this.name);\n }\n }\n }\n class BindingObserverImplementation extends SubscriberSet {\n constructor(binding, initialSubscriber, isVolatileBinding = false) {\n super(binding, initialSubscriber);\n this.binding = binding;\n this.isVolatileBinding = isVolatileBinding;\n this.needsRefresh = true;\n this.needsQueue = true;\n this.first = this;\n this.last = null;\n this.propertySource = void 0;\n this.propertyName = void 0;\n this.notifier = void 0;\n this.next = void 0;\n }\n observe(source, context) {\n if (this.needsRefresh && this.last !== null) {\n this.disconnect();\n }\n const previousWatcher = watcher;\n watcher = this.needsRefresh ? this : void 0;\n this.needsRefresh = this.isVolatileBinding;\n const result = this.binding(source, context);\n watcher = previousWatcher;\n return result;\n }\n disconnect() {\n if (this.last !== null) {\n let current = this.first;\n while (current !== void 0) {\n current.notifier.unsubscribe(this, current.propertyName);\n current = current.next;\n }\n this.last = null;\n this.needsRefresh = this.needsQueue = true;\n }\n }\n watch(propertySource, propertyName) {\n const prev = this.last;\n const notifier = getNotifier(propertySource);\n const current = prev === null ? this.first : {};\n current.propertySource = propertySource;\n current.propertyName = propertyName;\n current.notifier = notifier;\n notifier.subscribe(this, propertyName);\n if (prev !== null) {\n if (!this.needsRefresh) {\n // Declaring the variable prior to assignment below circumvents\n // a bug in Angular's optimization process causing infinite recursion\n // of this watch() method. Details https://github.com/microsoft/fast/issues/4969\n let prevValue;\n watcher = void 0;\n /* eslint-disable-next-line */\n prevValue = prev.propertySource[prev.propertyName];\n /* eslint-disable-next-line @typescript-eslint/no-this-alias */\n watcher = this;\n if (propertySource === prevValue) {\n this.needsRefresh = true;\n }\n }\n prev.next = current;\n }\n this.last = current;\n }\n handleChange() {\n if (this.needsQueue) {\n this.needsQueue = false;\n queueUpdate(this);\n }\n }\n call() {\n if (this.last !== null) {\n this.needsQueue = true;\n this.notify(this);\n }\n }\n records() {\n let next = this.first;\n return {\n next: () => {\n const current = next;\n if (current === undefined) {\n return { value: void 0, done: true };\n }\n else {\n next = next.next;\n return {\n value: current,\n done: false,\n };\n }\n },\n [Symbol.iterator]: function () {\n return this;\n },\n };\n }\n }\n return Object.freeze({\n /**\n * @internal\n * @param factory - The factory used to create array observers.\n */\n setArrayObserverFactory(factory) {\n createArrayObserver = factory;\n },\n /**\n * Gets a notifier for an object or Array.\n * @param source - The object or Array to get the notifier for.\n */\n getNotifier,\n /**\n * Records a property change for a source object.\n * @param source - The object to record the change against.\n * @param propertyName - The property to track as changed.\n */\n track(source, propertyName) {\n if (watcher !== void 0) {\n watcher.watch(source, propertyName);\n }\n },\n /**\n * Notifies watchers that the currently executing property getter or function is volatile\n * with respect to its observable dependencies.\n */\n trackVolatile() {\n if (watcher !== void 0) {\n watcher.needsRefresh = true;\n }\n },\n /**\n * Notifies subscribers of a source object of changes.\n * @param source - the object to notify of changes.\n * @param args - The change args to pass to subscribers.\n */\n notify(source, args) {\n getNotifier(source).notify(args);\n },\n /**\n * Defines an observable property on an object or prototype.\n * @param target - The target object to define the observable on.\n * @param nameOrAccessor - The name of the property to define as observable;\n * or a custom accessor that specifies the property name and accessor implementation.\n */\n defineProperty(target, nameOrAccessor) {\n if (typeof nameOrAccessor === \"string\") {\n nameOrAccessor = new DefaultObservableAccessor(nameOrAccessor);\n }\n getAccessors(target).push(nameOrAccessor);\n Reflect.defineProperty(target, nameOrAccessor.name, {\n enumerable: true,\n get: function () {\n return nameOrAccessor.getValue(this);\n },\n set: function (newValue) {\n nameOrAccessor.setValue(this, newValue);\n },\n });\n },\n /**\n * Finds all the observable accessors defined on the target,\n * including its prototype chain.\n * @param target - The target object to search for accessor on.\n */\n getAccessors,\n /**\n * Creates a {@link BindingObserver} that can watch the\n * provided {@link Binding} for changes.\n * @param binding - The binding to observe.\n * @param initialSubscriber - An initial subscriber to changes in the binding value.\n * @param isVolatileBinding - Indicates whether the binding's dependency list must be re-evaluated on every value evaluation.\n */\n binding(binding, initialSubscriber, isVolatileBinding = this.isVolatileBinding(binding)) {\n return new BindingObserverImplementation(binding, initialSubscriber, isVolatileBinding);\n },\n /**\n * Determines whether a binding expression is volatile and needs to have its dependency list re-evaluated\n * on every evaluation of the value.\n * @param binding - The binding to inspect.\n */\n isVolatileBinding(binding) {\n return volatileRegex.test(binding.toString());\n },\n });\n});\n/**\n * Decorator: Defines an observable property on the target.\n * @param target - The target to define the observable on.\n * @param nameOrAccessor - The property name or accessor to define the observable as.\n * @public\n */\nexport function observable(target, nameOrAccessor) {\n Observable.defineProperty(target, nameOrAccessor);\n}\n/**\n * Decorator: Marks a property getter as having volatile observable dependencies.\n * @param target - The target that the property is defined on.\n * @param name - The property name.\n * @param name - The existing descriptor.\n * @public\n */\nexport function volatile(target, name, descriptor) {\n return Object.assign({}, descriptor, {\n get: function () {\n Observable.trackVolatile();\n return descriptor.get.apply(this);\n },\n });\n}\nconst contextEvent = FAST.getById(3 /* contextEvent */, () => {\n let current = null;\n return {\n get() {\n return current;\n },\n set(event) {\n current = event;\n },\n };\n});\n/**\n * Provides additional contextual information available to behaviors and expressions.\n * @public\n */\nexport class ExecutionContext {\n constructor() {\n /**\n * The index of the current item within a repeat context.\n */\n this.index = 0;\n /**\n * The length of the current collection within a repeat context.\n */\n this.length = 0;\n /**\n * The parent data object within a repeat context.\n */\n this.parent = null;\n /**\n * The parent execution context when in nested context scenarios.\n */\n this.parentContext = null;\n }\n /**\n * The current event within an event handler.\n */\n get event() {\n return contextEvent.get();\n }\n /**\n * Indicates whether the current item within a repeat context\n * has an even index.\n */\n get isEven() {\n return this.index % 2 === 0;\n }\n /**\n * Indicates whether the current item within a repeat context\n * has an odd index.\n */\n get isOdd() {\n return this.index % 2 !== 0;\n }\n /**\n * Indicates whether the current item within a repeat context\n * is the first item in the collection.\n */\n get isFirst() {\n return this.index === 0;\n }\n /**\n * Indicates whether the current item within a repeat context\n * is somewhere in the middle of the collection.\n */\n get isInMiddle() {\n return !this.isFirst && !this.isLast;\n }\n /**\n * Indicates whether the current item within a repeat context\n * is the last item in the collection.\n */\n get isLast() {\n return this.index === this.length - 1;\n }\n /**\n * Sets the event for the current execution context.\n * @param event - The event to set.\n * @internal\n */\n static setEvent(event) {\n contextEvent.set(event);\n }\n}\nObservable.defineProperty(ExecutionContext.prototype, \"index\");\nObservable.defineProperty(ExecutionContext.prototype, \"length\");\n/**\n * The default execution context used in binding expressions.\n * @public\n */\nexport const defaultExecutionContext = Object.seal(new ExecutionContext());\n","/**\n * A reference to globalThis, with support\n * for browsers that don't yet support the spec.\n * @public\n */\nexport const $global = (function () {\n if (typeof globalThis !== \"undefined\") {\n // We're running in a modern environment.\n return globalThis;\n }\n if (typeof global !== \"undefined\") {\n // We're running in NodeJS\n return global;\n }\n if (typeof self !== \"undefined\") {\n // We're running in a worker.\n return self;\n }\n if (typeof window !== \"undefined\") {\n // We're running in the browser's main thread.\n return window;\n }\n try {\n // Hopefully we never get here...\n // Not all environments allow eval and Function. Use only as a last resort:\n // eslint-disable-next-line no-new-func\n return new Function(\"return this\")();\n }\n catch (_a) {\n // If all fails, give up and create an object.\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n return {};\n }\n})();\n// API-only Polyfill for trustedTypes\nif ($global.trustedTypes === void 0) {\n $global.trustedTypes = { createPolicy: (n, r) => r };\n}\nconst propConfig = {\n configurable: false,\n enumerable: false,\n writable: false,\n};\nif ($global.FAST === void 0) {\n Reflect.defineProperty($global, \"FAST\", Object.assign({ value: Object.create(null) }, propConfig));\n}\n/**\n * The FAST global.\n * @internal\n */\nexport const FAST = $global.FAST;\nif (FAST.getById === void 0) {\n const storage = Object.create(null);\n Reflect.defineProperty(FAST, \"getById\", Object.assign({ value(id, initialize) {\n let found = storage[id];\n if (found === void 0) {\n found = initialize ? (storage[id] = initialize()) : null;\n }\n return found;\n } }, propConfig));\n}\n/**\n * A readonly, empty array.\n * @remarks\n * Typically returned by APIs that return arrays when there are\n * no actual items to return.\n * @internal\n */\nexport const emptyArray = Object.freeze([]);\n/**\n * Creates a function capable of locating metadata associated with a type.\n * @returns A metadata locator function.\n * @internal\n */\nexport function createMetadataLocator() {\n const metadataLookup = new WeakMap();\n return function (target) {\n let metadata = metadataLookup.get(target);\n if (metadata === void 0) {\n let currentTarget = Reflect.getPrototypeOf(target);\n while (metadata === void 0 && currentTarget !== null) {\n metadata = metadataLookup.get(currentTarget);\n currentTarget = Reflect.getPrototypeOf(currentTarget);\n }\n metadata = metadata === void 0 ? [] : metadata.slice(0);\n metadataLookup.set(target, metadata);\n }\n return metadata;\n };\n}\n","/**\n * Directive for use in {@link css}.\n *\n * @public\n */\nexport class CSSDirective {\n /**\n * Creates a CSS fragment to interpolate into the CSS document.\n * @returns - the string to interpolate into CSS\n */\n createCSS() {\n return \"\";\n }\n /**\n * Creates a behavior to bind to the host element.\n * @returns - the behavior to bind to the host element, or undefined.\n */\n createBehavior() {\n return undefined;\n }\n}\n","import { CSSDirective } from \"./css-directive.js\";\nimport { ElementStyles } from \"./element-styles.js\";\nfunction collectStyles(strings, values) {\n const styles = [];\n let cssString = \"\";\n const behaviors = [];\n for (let i = 0, ii = strings.length - 1; i < ii; ++i) {\n cssString += strings[i];\n let value = values[i];\n if (value instanceof CSSDirective) {\n const behavior = value.createBehavior();\n value = value.createCSS();\n if (behavior) {\n behaviors.push(behavior);\n }\n }\n if (value instanceof ElementStyles || value instanceof CSSStyleSheet) {\n if (cssString.trim() !== \"\") {\n styles.push(cssString);\n cssString = \"\";\n }\n styles.push(value);\n }\n else {\n cssString += value;\n }\n }\n cssString += strings[strings.length - 1];\n if (cssString.trim() !== \"\") {\n styles.push(cssString);\n }\n return {\n styles,\n behaviors,\n };\n}\n/**\n * Transforms a template literal string into styles.\n * @param strings - The string fragments that are interpolated with the values.\n * @param values - The values that are interpolated with the string fragments.\n * @remarks\n * The css helper supports interpolation of strings and ElementStyle instances.\n * @public\n */\nexport function css(strings, ...values) {\n const { styles, behaviors } = collectStyles(strings, values);\n const elementStyles = ElementStyles.create(styles);\n if (behaviors.length) {\n elementStyles.withBehaviors(...behaviors);\n }\n return elementStyles;\n}\nclass CSSPartial extends CSSDirective {\n constructor(styles, behaviors) {\n super();\n this.behaviors = behaviors;\n this.css = \"\";\n const stylesheets = styles.reduce((accumulated, current) => {\n if (typeof current === \"string\") {\n this.css += current;\n }\n else {\n accumulated.push(current);\n }\n return accumulated;\n }, []);\n if (stylesheets.length) {\n this.styles = ElementStyles.create(stylesheets);\n }\n }\n createBehavior() {\n return this;\n }\n createCSS() {\n return this.css;\n }\n bind(el) {\n if (this.styles) {\n el.$fastController.addStyles(this.styles);\n }\n if (this.behaviors.length) {\n el.$fastController.addBehaviors(this.behaviors);\n }\n }\n unbind(el) {\n if (this.styles) {\n el.$fastController.removeStyles(this.styles);\n }\n if (this.behaviors.length) {\n el.$fastController.removeBehaviors(this.behaviors);\n }\n }\n}\n/**\n * Transforms a template literal string into partial CSS.\n * @param strings - The string fragments that are interpolated with the values.\n * @param values - The values that are interpolated with the string fragments.\n * @public\n */\nexport function cssPartial(strings, ...values) {\n const { styles, behaviors } = collectStyles(strings, values);\n return new CSSPartial(styles, behaviors);\n}\n","import { DOM } from \"../dom.js\";\n/**\n * Represents styles that can be applied to a custom element.\n * @public\n */\nexport class ElementStyles {\n constructor() {\n this.targets = new WeakSet();\n }\n /** @internal */\n addStylesTo(target) {\n this.targets.add(target);\n }\n /** @internal */\n removeStylesFrom(target) {\n this.targets.delete(target);\n }\n /** @internal */\n isAttachedTo(target) {\n return this.targets.has(target);\n }\n /**\n * Associates behaviors with this set of styles.\n * @param behaviors - The behaviors to associate.\n */\n withBehaviors(...behaviors) {\n this.behaviors =\n this.behaviors === null ? behaviors : this.behaviors.concat(behaviors);\n return this;\n }\n}\n/**\n * Create ElementStyles from ComposableStyles.\n */\nElementStyles.create = (() => {\n if (DOM.supportsAdoptedStyleSheets) {\n const styleSheetCache = new Map();\n return (styles) => \n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n new AdoptedStyleSheetsStyles(styles, styleSheetCache);\n }\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n return (styles) => new StyleElementStyles(styles);\n})();\nfunction reduceStyles(styles) {\n return styles\n .map((x) => x instanceof ElementStyles ? reduceStyles(x.styles) : [x])\n .reduce((prev, curr) => prev.concat(curr), []);\n}\nfunction reduceBehaviors(styles) {\n return styles\n .map((x) => (x instanceof ElementStyles ? x.behaviors : null))\n .reduce((prev, curr) => {\n if (curr === null) {\n return prev;\n }\n if (prev === null) {\n prev = [];\n }\n return prev.concat(curr);\n }, null);\n}\nlet addAdoptedStyleSheets = (target, sheets) => {\n target.adoptedStyleSheets = [...target.adoptedStyleSheets, ...sheets];\n};\nlet removeAdoptedStyleSheets = (target, sheets) => {\n target.adoptedStyleSheets = target.adoptedStyleSheets.filter((x) => sheets.indexOf(x) === -1);\n};\nif (DOM.supportsAdoptedStyleSheets) {\n try {\n // Test if browser implementation uses FrozenArray.\n // If not, use push / splice to alter the stylesheets\n // in place. This circumvents a bug in Safari 16.4 where\n // periodically, assigning the array would previously\n // cause sheets to be removed.\n document.adoptedStyleSheets.push();\n document.adoptedStyleSheets.splice();\n addAdoptedStyleSheets = (target, sheets) => {\n target.adoptedStyleSheets.push(...sheets);\n };\n removeAdoptedStyleSheets = (target, sheets) => {\n for (const sheet of sheets) {\n const index = target.adoptedStyleSheets.indexOf(sheet);\n if (index !== -1) {\n target.adoptedStyleSheets.splice(index, 1);\n }\n }\n };\n }\n catch (e) {\n // Do nothing if an error is thrown, the default\n // case handles FrozenArray.\n }\n}\n/**\n * https://wicg.github.io/construct-stylesheets/\n * https://developers.google.com/web/updates/2019/02/constructable-stylesheets\n *\n * @internal\n */\nexport class AdoptedStyleSheetsStyles extends ElementStyles {\n constructor(styles, styleSheetCache) {\n super();\n this.styles = styles;\n this.styleSheetCache = styleSheetCache;\n this._styleSheets = void 0;\n this.behaviors = reduceBehaviors(styles);\n }\n get styleSheets() {\n if (this._styleSheets === void 0) {\n const styles = this.styles;\n const styleSheetCache = this.styleSheetCache;\n this._styleSheets = reduceStyles(styles).map((x) => {\n if (x instanceof CSSStyleSheet) {\n return x;\n }\n let sheet = styleSheetCache.get(x);\n if (sheet === void 0) {\n sheet = new CSSStyleSheet();\n sheet.replaceSync(x);\n styleSheetCache.set(x, sheet);\n }\n return sheet;\n });\n }\n return this._styleSheets;\n }\n addStylesTo(target) {\n addAdoptedStyleSheets(target, this.styleSheets);\n super.addStylesTo(target);\n }\n removeStylesFrom(target) {\n removeAdoptedStyleSheets(target, this.styleSheets);\n super.removeStylesFrom(target);\n }\n}\nlet styleClassId = 0;\nfunction getNextStyleClass() {\n return `fast-style-class-${++styleClassId}`;\n}\n/**\n * @internal\n */\nexport class StyleElementStyles extends ElementStyles {\n constructor(styles) {\n super();\n this.styles = styles;\n this.behaviors = null;\n this.behaviors = reduceBehaviors(styles);\n this.styleSheets = reduceStyles(styles);\n this.styleClass = getNextStyleClass();\n }\n addStylesTo(target) {\n const styleSheets = this.styleSheets;\n const styleClass = this.styleClass;\n target = this.normalizeTarget(target);\n for (let i = 0; i < styleSheets.length; i++) {\n const element = document.createElement(\"style\");\n element.innerHTML = styleSheets[i];\n element.className = styleClass;\n target.append(element);\n }\n super.addStylesTo(target);\n }\n removeStylesFrom(target) {\n target = this.normalizeTarget(target);\n const styles = target.querySelectorAll(`.${this.styleClass}`);\n for (let i = 0, ii = styles.length; i < ii; ++i) {\n target.removeChild(styles[i]);\n }\n super.removeStylesFrom(target);\n }\n isAttachedTo(target) {\n return super.isAttachedTo(this.normalizeTarget(target));\n }\n normalizeTarget(target) {\n return target === document ? document.body : target;\n }\n}\n","import { AttachedBehaviorHTMLDirective } from \"./html-directive.js\";\nimport { NodeObservationBehavior } from \"./node-observation.js\";\n/**\n * The runtime behavior for child node observation.\n * @public\n */\nexport class ChildrenBehavior extends NodeObservationBehavior {\n /**\n * Creates an instance of ChildrenBehavior.\n * @param target - The element target to observe children on.\n * @param options - The options to use when observing the element children.\n */\n constructor(target, options) {\n super(target, options);\n this.observer = null;\n options.childList = true;\n }\n /**\n * Begins observation of the nodes.\n */\n observe() {\n if (this.observer === null) {\n this.observer = new MutationObserver(this.handleEvent.bind(this));\n }\n this.observer.observe(this.target, this.options);\n }\n /**\n * Disconnects observation of the nodes.\n */\n disconnect() {\n this.observer.disconnect();\n }\n /**\n * Retrieves the nodes that should be assigned to the target.\n */\n getNodes() {\n if (\"subtree\" in this.options) {\n return Array.from(this.target.querySelectorAll(this.options.selector));\n }\n return Array.from(this.target.childNodes);\n }\n}\n/**\n * A directive that observes the `childNodes` of an element and updates a property\n * whenever they change.\n * @param propertyOrOptions - The options used to configure child node observation.\n * @public\n */\nexport function children(propertyOrOptions) {\n if (typeof propertyOrOptions === \"string\") {\n propertyOrOptions = {\n property: propertyOrOptions,\n };\n }\n return new AttachedBehaviorHTMLDirective(\"fast-children\", ChildrenBehavior, propertyOrOptions);\n}\n","import { DOM } from \"../dom.js\";\n/**\n * Instructs the template engine to apply behavior to a node.\n * @public\n */\nexport class HTMLDirective {\n constructor() {\n /**\n * The index of the DOM node to which the created behavior will apply.\n */\n this.targetIndex = 0;\n }\n}\n/**\n * A {@link HTMLDirective} that targets a named attribute or property on a node.\n * @public\n */\nexport class TargetedHTMLDirective extends HTMLDirective {\n constructor() {\n super(...arguments);\n /**\n * Creates a placeholder string based on the directive's index within the template.\n * @param index - The index of the directive within the template.\n */\n this.createPlaceholder = DOM.createInterpolationPlaceholder;\n }\n}\n/**\n * A directive that attaches special behavior to an element via a custom attribute.\n * @public\n */\nexport class AttachedBehaviorHTMLDirective extends HTMLDirective {\n /**\n *\n * @param name - The name of the behavior; used as a custom attribute on the element.\n * @param behavior - The behavior to instantiate and attach to the element.\n * @param options - Options to pass to the behavior during creation.\n */\n constructor(name, behavior, options) {\n super();\n this.name = name;\n this.behavior = behavior;\n this.options = options;\n }\n /**\n * Creates a placeholder string based on the directive's index within the template.\n * @param index - The index of the directive within the template.\n * @remarks\n * Creates a custom attribute placeholder.\n */\n createPlaceholder(index) {\n return DOM.createCustomAttributePlaceholder(this.name, index);\n }\n /**\n * Creates a behavior for the provided target node.\n * @param target - The node instance to create the behavior for.\n * @remarks\n * Creates an instance of the `behavior` type this directive was constructed with\n * and passes the target and options to that `behavior`'s constructor.\n */\n createBehavior(target) {\n return new this.behavior(target, this.options);\n }\n}\n","import { Observable } from \"../observation/observable.js\";\nimport { emptyArray } from \"../platform.js\";\n/**\n * Creates a function that can be used to filter a Node array, selecting only elements.\n * @param selector - An optional selector to restrict the filter to.\n * @public\n */\nexport function elements(selector) {\n if (selector) {\n return function (value, index, array) {\n return value.nodeType === 1 && value.matches(selector);\n };\n }\n return function (value, index, array) {\n return value.nodeType === 1;\n };\n}\n/**\n * A base class for node observation.\n * @internal\n */\nexport class NodeObservationBehavior {\n /**\n * Creates an instance of NodeObservationBehavior.\n * @param target - The target to assign the nodes property on.\n * @param options - The options to use in configuring node observation.\n */\n constructor(target, options) {\n this.target = target;\n this.options = options;\n this.source = null;\n }\n /**\n * Bind this behavior to the source.\n * @param source - The source to bind to.\n * @param context - The execution context that the binding is operating within.\n */\n bind(source) {\n const name = this.options.property;\n this.shouldUpdate = Observable.getAccessors(source).some((x) => x.name === name);\n this.source = source;\n this.updateTarget(this.computeNodes());\n if (this.shouldUpdate) {\n this.observe();\n }\n }\n /**\n * Unbinds this behavior from the source.\n * @param source - The source to unbind from.\n */\n unbind() {\n this.updateTarget(emptyArray);\n this.source = null;\n if (this.shouldUpdate) {\n this.disconnect();\n }\n }\n /** @internal */\n handleEvent() {\n this.updateTarget(this.computeNodes());\n }\n computeNodes() {\n let nodes = this.getNodes();\n if (this.options.filter !== void 0) {\n nodes = nodes.filter(this.options.filter);\n }\n return nodes;\n }\n updateTarget(value) {\n this.source[this.options.property] = value;\n }\n}\n","import { AttachedBehaviorHTMLDirective } from \"./html-directive.js\";\n/**\n * The runtime behavior for template references.\n * @public\n */\nexport class RefBehavior {\n /**\n * Creates an instance of RefBehavior.\n * @param target - The element to reference.\n * @param propertyName - The name of the property to assign the reference to.\n */\n constructor(target, propertyName) {\n this.target = target;\n this.propertyName = propertyName;\n }\n /**\n * Bind this behavior to the source.\n * @param source - The source to bind to.\n * @param context - The execution context that the binding is operating within.\n */\n bind(source) {\n source[this.propertyName] = this.target;\n }\n /**\n * Unbinds this behavior from the source.\n * @param source - The source to unbind from.\n */\n /* eslint-disable-next-line @typescript-eslint/no-empty-function */\n unbind() { }\n}\n/**\n * A directive that observes the updates a property with a reference to the element.\n * @param propertyName - The name of the property to assign the reference to.\n * @public\n */\nexport function ref(propertyName) {\n return new AttachedBehaviorHTMLDirective(\"fast-ref\", RefBehavior, propertyName);\n}\n","import { AttachedBehaviorHTMLDirective } from \"./html-directive.js\";\nimport { NodeObservationBehavior } from \"./node-observation.js\";\n/**\n * The runtime behavior for slotted node observation.\n * @public\n */\nexport class SlottedBehavior extends NodeObservationBehavior {\n /**\n * Creates an instance of SlottedBehavior.\n * @param target - The slot element target to observe.\n * @param options - The options to use when observing the slot.\n */\n constructor(target, options) {\n super(target, options);\n }\n /**\n * Begins observation of the nodes.\n */\n observe() {\n this.target.addEventListener(\"slotchange\", this);\n }\n /**\n * Disconnects observation of the nodes.\n */\n disconnect() {\n this.target.removeEventListener(\"slotchange\", this);\n }\n /**\n * Retrieves the nodes that should be assigned to the target.\n */\n getNodes() {\n return this.target.assignedNodes(this.options);\n }\n}\n/**\n * A directive that observes the `assignedNodes()` of a slot and updates a property\n * whenever they change.\n * @param propertyOrOptions - The options used to configure slotted node observation.\n * @public\n */\nexport function slotted(propertyOrOptions) {\n if (typeof propertyOrOptions === \"string\") {\n propertyOrOptions = { property: propertyOrOptions };\n }\n return new AttachedBehaviorHTMLDirective(\"fast-slotted\", SlottedBehavior, propertyOrOptions);\n}\n","import { DOM } from \"../dom.js\";\nimport { ExecutionContext, Observable, } from \"../observation/observable.js\";\nimport { TargetedHTMLDirective } from \"./html-directive.js\";\nfunction normalBind(source, context) {\n this.source = source;\n this.context = context;\n if (this.bindingObserver === null) {\n this.bindingObserver = Observable.binding(this.binding, this, this.isBindingVolatile);\n }\n this.updateTarget(this.bindingObserver.observe(source, context));\n}\nfunction triggerBind(source, context) {\n this.source = source;\n this.context = context;\n this.target.addEventListener(this.targetName, this);\n}\nfunction normalUnbind() {\n this.bindingObserver.disconnect();\n this.source = null;\n this.context = null;\n}\nfunction contentUnbind() {\n this.bindingObserver.disconnect();\n this.source = null;\n this.context = null;\n const view = this.target.$fastView;\n if (view !== void 0 && view.isComposed) {\n view.unbind();\n view.needsBindOnly = true;\n }\n}\nfunction triggerUnbind() {\n this.target.removeEventListener(this.targetName, this);\n this.source = null;\n this.context = null;\n}\nfunction updateAttributeTarget(value) {\n DOM.setAttribute(this.target, this.targetName, value);\n}\nfunction updateBooleanAttributeTarget(value) {\n DOM.setBooleanAttribute(this.target, this.targetName, value);\n}\nfunction updateContentTarget(value) {\n // If there's no actual value, then this equates to the\n // empty string for the purposes of content bindings.\n if (value === null || value === undefined) {\n value = \"\";\n }\n // If the value has a \"create\" method, then it's a template-like.\n if (value.create) {\n this.target.textContent = \"\";\n let view = this.target.$fastView;\n // If there's no previous view that we might be able to\n // reuse then create a new view from the template.\n if (view === void 0) {\n view = value.create();\n }\n else {\n // If there is a previous view, but it wasn't created\n // from the same template as the new value, then we\n // need to remove the old view if it's still in the DOM\n // and create a new view from the template.\n if (this.target.$fastTemplate !== value) {\n if (view.isComposed) {\n view.remove();\n view.unbind();\n }\n view = value.create();\n }\n }\n // It's possible that the value is the same as the previous template\n // and that there's actually no need to compose it.\n if (!view.isComposed) {\n view.isComposed = true;\n view.bind(this.source, this.context);\n view.insertBefore(this.target);\n this.target.$fastView = view;\n this.target.$fastTemplate = value;\n }\n else if (view.needsBindOnly) {\n view.needsBindOnly = false;\n view.bind(this.source, this.context);\n }\n }\n else {\n const view = this.target.$fastView;\n // If there is a view and it's currently composed into\n // the DOM, then we need to remove it.\n if (view !== void 0 && view.isComposed) {\n view.isComposed = false;\n view.remove();\n if (view.needsBindOnly) {\n view.needsBindOnly = false;\n }\n else {\n view.unbind();\n }\n }\n this.target.textContent = value;\n }\n}\nfunction updatePropertyTarget(value) {\n this.target[this.targetName] = value;\n}\nfunction updateClassTarget(value) {\n const classVersions = this.classVersions || Object.create(null);\n const target = this.target;\n let version = this.version || 0;\n // Add the classes, tracking the version at which they were added.\n if (value !== null && value !== undefined && value.length) {\n const names = value.split(/\\s+/);\n for (let i = 0, ii = names.length; i < ii; ++i) {\n const currentName = names[i];\n if (currentName === \"\") {\n continue;\n }\n classVersions[currentName] = version;\n target.classList.add(currentName);\n }\n }\n this.classVersions = classVersions;\n this.version = version + 1;\n // If this is the first call to add classes, there's no need to remove old ones.\n if (version === 0) {\n return;\n }\n // Remove classes from the previous version.\n version -= 1;\n for (const name in classVersions) {\n if (classVersions[name] === version) {\n target.classList.remove(name);\n }\n }\n}\n/**\n * A directive that configures data binding to element content and attributes.\n * @public\n */\nexport class HTMLBindingDirective extends TargetedHTMLDirective {\n /**\n * Creates an instance of BindingDirective.\n * @param binding - A binding that returns the data used to update the DOM.\n */\n constructor(binding) {\n super();\n this.binding = binding;\n this.bind = normalBind;\n this.unbind = normalUnbind;\n this.updateTarget = updateAttributeTarget;\n this.isBindingVolatile = Observable.isVolatileBinding(this.binding);\n }\n /**\n * Gets/sets the name of the attribute or property that this\n * binding is targeting.\n */\n get targetName() {\n return this.originalTargetName;\n }\n set targetName(value) {\n this.originalTargetName = value;\n if (value === void 0) {\n return;\n }\n switch (value[0]) {\n case \":\":\n this.cleanedTargetName = value.substr(1);\n this.updateTarget = updatePropertyTarget;\n if (this.cleanedTargetName === \"innerHTML\") {\n const binding = this.binding;\n this.binding = (s, c) => DOM.createHTML(binding(s, c));\n }\n break;\n case \"?\":\n this.cleanedTargetName = value.substr(1);\n this.updateTarget = updateBooleanAttributeTarget;\n break;\n case \"@\":\n this.cleanedTargetName = value.substr(1);\n this.bind = triggerBind;\n this.unbind = triggerUnbind;\n break;\n default:\n this.cleanedTargetName = value;\n if (value === \"class\") {\n this.updateTarget = updateClassTarget;\n }\n break;\n }\n }\n /**\n * Makes this binding target the content of an element rather than\n * a particular attribute or property.\n */\n targetAtContent() {\n this.updateTarget = updateContentTarget;\n this.unbind = contentUnbind;\n }\n /**\n * Creates the runtime BindingBehavior instance based on the configuration\n * information stored in the BindingDirective.\n * @param target - The target node that the binding behavior should attach to.\n */\n createBehavior(target) {\n /* eslint-disable-next-line @typescript-eslint/no-use-before-define */\n return new BindingBehavior(target, this.binding, this.isBindingVolatile, this.bind, this.unbind, this.updateTarget, this.cleanedTargetName);\n }\n}\n/**\n * A behavior that updates content and attributes based on a configured\n * BindingDirective.\n * @public\n */\nexport class BindingBehavior {\n /**\n * Creates an instance of BindingBehavior.\n * @param target - The target of the data updates.\n * @param binding - The binding that returns the latest value for an update.\n * @param isBindingVolatile - Indicates whether the binding has volatile dependencies.\n * @param bind - The operation to perform during binding.\n * @param unbind - The operation to perform during unbinding.\n * @param updateTarget - The operation to perform when updating.\n * @param targetName - The name of the target attribute or property to update.\n */\n constructor(target, binding, isBindingVolatile, bind, unbind, updateTarget, targetName) {\n /** @internal */\n this.source = null;\n /** @internal */\n this.context = null;\n /** @internal */\n this.bindingObserver = null;\n this.target = target;\n this.binding = binding;\n this.isBindingVolatile = isBindingVolatile;\n this.bind = bind;\n this.unbind = unbind;\n this.updateTarget = updateTarget;\n this.targetName = targetName;\n }\n /** @internal */\n handleChange() {\n this.updateTarget(this.bindingObserver.observe(this.source, this.context));\n }\n /** @internal */\n handleEvent(event) {\n ExecutionContext.setEvent(event);\n const result = this.binding(this.source, this.context);\n ExecutionContext.setEvent(null);\n if (result !== true) {\n event.preventDefault();\n }\n }\n}\n","import { _interpolationEnd, _interpolationStart, DOM } from \"../dom.js\";\nimport { HTMLBindingDirective } from \"./binding.js\";\nlet sharedContext = null;\nclass CompilationContext {\n addFactory(factory) {\n factory.targetIndex = this.targetIndex;\n this.behaviorFactories.push(factory);\n }\n captureContentBinding(directive) {\n directive.targetAtContent();\n this.addFactory(directive);\n }\n reset() {\n this.behaviorFactories = [];\n this.targetIndex = -1;\n }\n release() {\n /* eslint-disable-next-line @typescript-eslint/no-this-alias */\n sharedContext = this;\n }\n static borrow(directives) {\n const shareable = sharedContext || new CompilationContext();\n shareable.directives = directives;\n shareable.reset();\n sharedContext = null;\n return shareable;\n }\n}\nfunction createAggregateBinding(parts) {\n if (parts.length === 1) {\n return parts[0];\n }\n let targetName;\n const partCount = parts.length;\n const finalParts = parts.map((x) => {\n if (typeof x === \"string\") {\n return () => x;\n }\n targetName = x.targetName || targetName;\n return x.binding;\n });\n const binding = (scope, context) => {\n let output = \"\";\n for (let i = 0; i < partCount; ++i) {\n output += finalParts[i](scope, context);\n }\n return output;\n };\n const directive = new HTMLBindingDirective(binding);\n directive.targetName = targetName;\n return directive;\n}\nconst interpolationEndLength = _interpolationEnd.length;\nfunction parseContent(context, value) {\n const valueParts = value.split(_interpolationStart);\n if (valueParts.length === 1) {\n return null;\n }\n const bindingParts = [];\n for (let i = 0, ii = valueParts.length; i < ii; ++i) {\n const current = valueParts[i];\n const index = current.indexOf(_interpolationEnd);\n let literal;\n if (index === -1) {\n literal = current;\n }\n else {\n const directiveIndex = parseInt(current.substring(0, index));\n bindingParts.push(context.directives[directiveIndex]);\n literal = current.substring(index + interpolationEndLength);\n }\n if (literal !== \"\") {\n bindingParts.push(literal);\n }\n }\n return bindingParts;\n}\nfunction compileAttributes(context, node, includeBasicValues = false) {\n const attributes = node.attributes;\n for (let i = 0, ii = attributes.length; i < ii; ++i) {\n const attr = attributes[i];\n const attrValue = attr.value;\n const parseResult = parseContent(context, attrValue);\n let result = null;\n if (parseResult === null) {\n if (includeBasicValues) {\n result = new HTMLBindingDirective(() => attrValue);\n result.targetName = attr.name;\n }\n }\n else {\n result = createAggregateBinding(parseResult);\n }\n if (result !== null) {\n node.removeAttributeNode(attr);\n i--;\n ii--;\n context.addFactory(result);\n }\n }\n}\nfunction compileContent(context, node, walker) {\n const parseResult = parseContent(context, node.textContent);\n if (parseResult !== null) {\n let lastNode = node;\n for (let i = 0, ii = parseResult.length; i < ii; ++i) {\n const currentPart = parseResult[i];\n const currentNode = i === 0\n ? node\n : lastNode.parentNode.insertBefore(document.createTextNode(\"\"), lastNode.nextSibling);\n if (typeof currentPart === \"string\") {\n currentNode.textContent = currentPart;\n }\n else {\n currentNode.textContent = \" \";\n context.captureContentBinding(currentPart);\n }\n lastNode = currentNode;\n context.targetIndex++;\n if (currentNode !== node) {\n walker.nextNode();\n }\n }\n context.targetIndex--;\n }\n}\n/**\n * Compiles a template and associated directives into a raw compilation\n * result which include a cloneable DocumentFragment and factories capable\n * of attaching runtime behavior to nodes within the fragment.\n * @param template - The template to compile.\n * @param directives - The directives referenced by the template.\n * @remarks\n * The template that is provided for compilation is altered in-place\n * and cannot be compiled again. If the original template must be preserved,\n * it is recommended that you clone the original and pass the clone to this API.\n * @public\n */\nexport function compileTemplate(template, directives) {\n const fragment = template.content;\n // https://bugs.chromium.org/p/chromium/issues/detail?id=1111864\n document.adoptNode(fragment);\n const context = CompilationContext.borrow(directives);\n compileAttributes(context, template, true);\n const hostBehaviorFactories = context.behaviorFactories;\n context.reset();\n const walker = DOM.createTemplateWalker(fragment);\n let node;\n while ((node = walker.nextNode())) {\n context.targetIndex++;\n switch (node.nodeType) {\n case 1: // element node\n compileAttributes(context, node);\n break;\n case 3: // text node\n compileContent(context, node, walker);\n break;\n case 8: // comment\n if (DOM.isMarker(node)) {\n context.addFactory(directives[DOM.extractDirectiveIndexFromMarker(node)]);\n }\n }\n }\n let targetOffset = 0;\n if (\n // If the first node in a fragment is a marker, that means it's an unstable first node,\n // because something like a when, repeat, etc. could add nodes before the marker.\n // To mitigate this, we insert a stable first node. However, if we insert a node,\n // that will alter the result of the TreeWalker. So, we also need to offset the target index.\n DOM.isMarker(fragment.firstChild) ||\n // Or if there is only one node and a directive, it means the template's content\n // is *only* the directive. In that case, HTMLView.dispose() misses any nodes inserted by\n // the directive. Inserting a new node ensures proper disposal of nodes added by the directive.\n (fragment.childNodes.length === 1 && directives.length)) {\n fragment.insertBefore(document.createComment(\"\"), fragment.firstChild);\n targetOffset = -1;\n }\n const viewBehaviorFactories = context.behaviorFactories;\n context.release();\n return {\n fragment,\n viewBehaviorFactories,\n hostBehaviorFactories,\n targetOffset,\n };\n}\n","// A singleton Range instance used to efficiently remove ranges of DOM nodes.\n// See the implementation of HTMLView below for further details.\nconst range = document.createRange();\n/**\n * The standard View implementation, which also implements ElementView and SyntheticView.\n * @public\n */\nexport class HTMLView {\n /**\n * Constructs an instance of HTMLView.\n * @param fragment - The html fragment that contains the nodes for this view.\n * @param behaviors - The behaviors to be applied to this view.\n */\n constructor(fragment, behaviors) {\n this.fragment = fragment;\n this.behaviors = behaviors;\n /**\n * The data that the view is bound to.\n */\n this.source = null;\n /**\n * The execution context the view is running within.\n */\n this.context = null;\n this.firstChild = fragment.firstChild;\n this.lastChild = fragment.lastChild;\n }\n /**\n * Appends the view's DOM nodes to the referenced node.\n * @param node - The parent node to append the view's DOM nodes to.\n */\n appendTo(node) {\n node.appendChild(this.fragment);\n }\n /**\n * Inserts the view's DOM nodes before the referenced node.\n * @param node - The node to insert the view's DOM before.\n */\n insertBefore(node) {\n if (this.fragment.hasChildNodes()) {\n node.parentNode.insertBefore(this.fragment, node);\n }\n else {\n const end = this.lastChild;\n if (node.previousSibling === end)\n return;\n const parentNode = node.parentNode;\n let current = this.firstChild;\n let next;\n while (current !== end) {\n next = current.nextSibling;\n parentNode.insertBefore(current, node);\n current = next;\n }\n parentNode.insertBefore(end, node);\n }\n }\n /**\n * Removes the view's DOM nodes.\n * The nodes are not disposed and the view can later be re-inserted.\n */\n remove() {\n const fragment = this.fragment;\n const end = this.lastChild;\n let current = this.firstChild;\n let next;\n while (current !== end) {\n next = current.nextSibling;\n fragment.appendChild(current);\n current = next;\n }\n fragment.appendChild(end);\n }\n /**\n * Removes the view and unbinds its behaviors, disposing of DOM nodes afterward.\n * Once a view has been disposed, it cannot be inserted or bound again.\n */\n dispose() {\n const parent = this.firstChild.parentNode;\n const end = this.lastChild;\n let current = this.firstChild;\n let next;\n while (current !== end) {\n next = current.nextSibling;\n parent.removeChild(current);\n current = next;\n }\n parent.removeChild(end);\n const behaviors = this.behaviors;\n const oldSource = this.source;\n for (let i = 0, ii = behaviors.length; i < ii; ++i) {\n behaviors[i].unbind(oldSource);\n }\n }\n /**\n * Binds a view's behaviors to its binding source.\n * @param source - The binding source for the view's binding behaviors.\n * @param context - The execution context to run the behaviors within.\n */\n bind(source, context) {\n const behaviors = this.behaviors;\n if (this.source === source) {\n return;\n }\n else if (this.source !== null) {\n const oldSource = this.source;\n this.source = source;\n this.context = context;\n for (let i = 0, ii = behaviors.length; i < ii; ++i) {\n const current = behaviors[i];\n current.unbind(oldSource);\n current.bind(source, context);\n }\n }\n else {\n this.source = source;\n this.context = context;\n for (let i = 0, ii = behaviors.length; i < ii; ++i) {\n behaviors[i].bind(source, context);\n }\n }\n }\n /**\n * Unbinds a view's behaviors from its binding source.\n */\n unbind() {\n if (this.source === null) {\n return;\n }\n const behaviors = this.behaviors;\n const oldSource = this.source;\n for (let i = 0, ii = behaviors.length; i < ii; ++i) {\n behaviors[i].unbind(oldSource);\n }\n this.source = null;\n }\n /**\n * Efficiently disposes of a contiguous range of synthetic view instances.\n * @param views - A contiguous range of views to be disposed.\n */\n static disposeContiguousBatch(views) {\n if (views.length === 0) {\n return;\n }\n range.setStartBefore(views[0].firstChild);\n range.setEndAfter(views[views.length - 1].lastChild);\n range.deleteContents();\n for (let i = 0, ii = views.length; i < ii; ++i) {\n const view = views[i];\n const behaviors = view.behaviors;\n const oldSource = view.source;\n for (let j = 0, jj = behaviors.length; j < jj; ++j) {\n behaviors[j].unbind(oldSource);\n }\n }\n }\n}\n","import { DOM } from \"../dom.js\";\nimport { defaultExecutionContext } from \"../observation/observable.js\";\nimport { compileTemplate } from \"./compiler.js\";\nimport { HTMLView } from \"./view.js\";\nimport { HTMLDirective, TargetedHTMLDirective, } from \"./html-directive.js\";\nimport { HTMLBindingDirective } from \"./binding.js\";\n/**\n * A template capable of creating HTMLView instances or rendering directly to DOM.\n * @public\n */\n/* eslint-disable-next-line @typescript-eslint/no-unused-vars */\nexport class ViewTemplate {\n /**\n * Creates an instance of ViewTemplate.\n * @param html - The html representing what this template will instantiate, including placeholders for directives.\n * @param directives - The directives that will be connected to placeholders in the html.\n */\n constructor(html, directives) {\n this.behaviorCount = 0;\n this.hasHostBehaviors = false;\n this.fragment = null;\n this.targetOffset = 0;\n this.viewBehaviorFactories = null;\n this.hostBehaviorFactories = null;\n this.html = html;\n this.directives = directives;\n }\n /**\n * Creates an HTMLView instance based on this template definition.\n * @param hostBindingTarget - The element that host behaviors will be bound to.\n */\n create(hostBindingTarget) {\n if (this.fragment === null) {\n let template;\n const html = this.html;\n if (typeof html === \"string\") {\n template = document.createElement(\"template\");\n template.innerHTML = DOM.createHTML(html);\n const fec = template.content.firstElementChild;\n if (fec !== null && fec.tagName === \"TEMPLATE\") {\n template = fec;\n }\n }\n else {\n template = html;\n }\n const result = compileTemplate(template, this.directives);\n this.fragment = result.fragment;\n this.viewBehaviorFactories = result.viewBehaviorFactories;\n this.hostBehaviorFactories = result.hostBehaviorFactories;\n this.targetOffset = result.targetOffset;\n this.behaviorCount =\n this.viewBehaviorFactories.length + this.hostBehaviorFactories.length;\n this.hasHostBehaviors = this.hostBehaviorFactories.length > 0;\n }\n const fragment = this.fragment.cloneNode(true);\n const viewFactories = this.viewBehaviorFactories;\n const behaviors = new Array(this.behaviorCount);\n const walker = DOM.createTemplateWalker(fragment);\n let behaviorIndex = 0;\n let targetIndex = this.targetOffset;\n let node = walker.nextNode();\n for (let ii = viewFactories.length; behaviorIndex < ii; ++behaviorIndex) {\n const factory = viewFactories[behaviorIndex];\n const factoryIndex = factory.targetIndex;\n while (node !== null) {\n if (targetIndex === factoryIndex) {\n behaviors[behaviorIndex] = factory.createBehavior(node);\n break;\n }\n else {\n node = walker.nextNode();\n targetIndex++;\n }\n }\n }\n if (this.hasHostBehaviors) {\n const hostFactories = this.hostBehaviorFactories;\n for (let i = 0, ii = hostFactories.length; i < ii; ++i, ++behaviorIndex) {\n behaviors[behaviorIndex] = hostFactories[i].createBehavior(hostBindingTarget);\n }\n }\n return new HTMLView(fragment, behaviors);\n }\n /**\n * Creates an HTMLView from this template, binds it to the source, and then appends it to the host.\n * @param source - The data source to bind the template to.\n * @param host - The Element where the template will be rendered.\n * @param hostBindingTarget - An HTML element to target the host bindings at if different from the\n * host that the template is being attached to.\n */\n render(source, host, hostBindingTarget) {\n if (typeof host === \"string\") {\n host = document.getElementById(host);\n }\n if (hostBindingTarget === void 0) {\n hostBindingTarget = host;\n }\n const view = this.create(hostBindingTarget);\n view.bind(source, defaultExecutionContext);\n view.appendTo(host);\n return view;\n }\n}\n// Much thanks to LitHTML for working this out!\nconst lastAttributeNameRegex = \n/* eslint-disable-next-line no-control-regex */\n/([ \\x09\\x0a\\x0c\\x0d])([^\\0-\\x1F\\x7F-\\x9F \"'>=/]+)([ \\x09\\x0a\\x0c\\x0d]*=[ \\x09\\x0a\\x0c\\x0d]*(?:[^ \\x09\\x0a\\x0c\\x0d\"'`<>=]*|\"[^\"]*|'[^']*))$/;\n/**\n * Transforms a template literal string into a renderable ViewTemplate.\n * @param strings - The string fragments that are interpolated with the values.\n * @param values - The values that are interpolated with the string fragments.\n * @remarks\n * The html helper supports interpolation of strings, numbers, binding expressions,\n * other template instances, and Directive instances.\n * @public\n */\nexport function html(strings, ...values) {\n const directives = [];\n let html = \"\";\n for (let i = 0, ii = strings.length - 1; i < ii; ++i) {\n const currentString = strings[i];\n let value = values[i];\n html += currentString;\n if (value instanceof ViewTemplate) {\n const template = value;\n value = () => template;\n }\n if (typeof value === \"function\") {\n value = new HTMLBindingDirective(value);\n }\n if (value instanceof TargetedHTMLDirective) {\n const match = lastAttributeNameRegex.exec(currentString);\n if (match !== null) {\n value.targetName = match[2];\n }\n }\n if (value instanceof HTMLDirective) {\n // Since not all values are directives, we can't use i\n // as the index for the placeholder. Instead, we need to\n // use directives.length to get the next index.\n html += value.createPlaceholder(directives.length);\n directives.push(value);\n }\n else {\n html += value;\n }\n }\n html += strings[strings.length - 1];\n return new ViewTemplate(html, directives);\n}\n","import { ElementStyles, } from \"@microsoft/fast-element\";\nimport { DI, Registration } from \"../di/di.js\";\nfunction presentationKeyFromTag(tagName) {\n return `${tagName.toLowerCase()}:presentation`;\n}\nconst presentationRegistry = new Map();\n/**\n * An API gateway to component presentation features.\n * @public\n */\nexport const ComponentPresentation = Object.freeze({\n /**\n * Defines a component presentation for an element.\n * @param tagName - The element name to define the presentation for.\n * @param presentation - The presentation that will be applied to matching elements.\n * @param container - The dependency injection container to register the configuration in.\n * @public\n */\n define(tagName, presentation, container) {\n const key = presentationKeyFromTag(tagName);\n const existing = presentationRegistry.get(key);\n if (existing === void 0) {\n presentationRegistry.set(key, presentation);\n }\n else {\n // false indicates that we have more than one presentation\n // registered for a tagName and we must resolve through DI\n presentationRegistry.set(key, false);\n }\n container.register(Registration.instance(key, presentation));\n },\n /**\n * Finds a component presentation for the specified element name,\n * searching the DOM hierarchy starting from the provided element.\n * @param tagName - The name of the element to locate the presentation for.\n * @param element - The element to begin the search from.\n * @returns The component presentation or null if none is found.\n * @public\n */\n forTag(tagName, element) {\n const key = presentationKeyFromTag(tagName);\n const existing = presentationRegistry.get(key);\n if (existing === false) {\n const container = DI.findResponsibleContainer(element);\n return container.get(key);\n }\n return existing || null;\n },\n});\n/**\n * The default implementation of ComponentPresentation, used by FoundationElement.\n * @public\n */\nexport class DefaultComponentPresentation {\n /**\n * Creates an instance of DefaultComponentPresentation.\n * @param template - The template to apply to the element.\n * @param styles - The styles to apply to the element.\n * @public\n */\n constructor(template, styles) {\n this.template = template || null;\n this.styles =\n styles === void 0\n ? null\n : Array.isArray(styles)\n ? ElementStyles.create(styles)\n : styles instanceof ElementStyles\n ? styles\n : ElementStyles.create([styles]);\n }\n /**\n * Applies the presentation details to the specified element.\n * @param element - The element to apply the presentation details to.\n * @public\n */\n applyTo(element) {\n const controller = element.$fastController;\n if (controller.template === null) {\n controller.template = this.template;\n }\n if (controller.styles === null) {\n controller.styles = this.styles;\n }\n }\n}\n","import { composedParent } from \"./composed-parent.js\";\n/**\n * Determines if the reference element contains the test element in a \"composed\" DOM tree that\n * ignores shadow DOM boundaries.\n *\n * Returns true of the test element is a descendent of the reference, or exist in\n * a shadow DOM that is a logical descendent of the reference. Otherwise returns false.\n * @param reference - The element to test for containment against.\n * @param test - The element being tested for containment.\n *\n * @public\n */\nexport function composedContains(reference, test) {\n let current = test;\n while (current !== null) {\n if (current === reference) {\n return true;\n }\n current = composedParent(current);\n }\n return false;\n}\n","import { __decorate } from \"tslib\";\nimport { DOM, ElementStyles, FASTElement, observable, Observable, } from \"@microsoft/fast-element\";\nexport const defaultElement = document.createElement(\"div\");\nfunction isFastElement(element) {\n return element instanceof FASTElement;\n}\nclass QueuedStyleSheetTarget {\n setProperty(name, value) {\n DOM.queueUpdate(() => this.target.setProperty(name, value));\n }\n removeProperty(name) {\n DOM.queueUpdate(() => this.target.removeProperty(name));\n }\n}\n/**\n * Handles setting properties for a FASTElement using Constructable Stylesheets\n */\nclass ConstructableStyleSheetTarget extends QueuedStyleSheetTarget {\n constructor(source) {\n super();\n const sheet = new CSSStyleSheet();\n this.target = sheet.cssRules[sheet.insertRule(\":host{}\")].style;\n source.$fastController.addStyles(ElementStyles.create([sheet]));\n }\n}\nclass DocumentStyleSheetTarget extends QueuedStyleSheetTarget {\n constructor() {\n super();\n const sheet = new CSSStyleSheet();\n this.target = sheet.cssRules[sheet.insertRule(\":root{}\")].style;\n document.adoptedStyleSheets = [\n ...document.adoptedStyleSheets,\n sheet,\n ];\n }\n}\nclass HeadStyleElementStyleSheetTarget extends QueuedStyleSheetTarget {\n constructor() {\n super();\n this.style = document.createElement(\"style\");\n document.head.appendChild(this.style);\n const { sheet } = this.style;\n // Because the HTMLStyleElement has been appended,\n // there shouldn't exist a case where `sheet` is null,\n // but if-check it just in case.\n if (sheet) {\n // https://github.com/jsdom/jsdom uses https://github.com/NV/CSSOM for it's CSSOM implementation,\n // which implements the DOM Level 2 spec for CSSStyleSheet where insertRule() requires an index argument.\n const index = sheet.insertRule(\":root{}\", sheet.cssRules.length);\n this.target = sheet.cssRules[index].style;\n }\n }\n}\n/**\n * Handles setting properties for a FASTElement using an HTMLStyleElement\n */\nclass StyleElementStyleSheetTarget {\n constructor(target) {\n this.store = new Map();\n this.target = null;\n const controller = target.$fastController;\n this.style = document.createElement(\"style\");\n controller.addStyles(this.style);\n Observable.getNotifier(controller).subscribe(this, \"isConnected\");\n this.handleChange(controller, \"isConnected\");\n }\n targetChanged() {\n if (this.target !== null) {\n for (const [key, value] of this.store.entries()) {\n this.target.setProperty(key, value);\n }\n }\n }\n setProperty(name, value) {\n this.store.set(name, value);\n DOM.queueUpdate(() => {\n if (this.target !== null) {\n this.target.setProperty(name, value);\n }\n });\n }\n removeProperty(name) {\n this.store.delete(name);\n DOM.queueUpdate(() => {\n if (this.target !== null) {\n this.target.removeProperty(name);\n }\n });\n }\n handleChange(source, key) {\n // HTMLStyleElement.sheet is null if the element isn't connected to the DOM,\n // so this method reacts to changes in DOM connection for the element hosting\n // the HTMLStyleElement.\n //\n // All rules applied via the CSSOM also get cleared when the element disconnects,\n // so we need to add a new rule each time and populate it with the stored properties\n const { sheet } = this.style;\n if (sheet) {\n // Safari will throw if we try to use the return result of insertRule()\n // to index the rule inline, so store as a const prior to indexing.\n // https://github.com/jsdom/jsdom uses https://github.com/NV/CSSOM for it's CSSOM implementation,\n // which implements the DOM Level 2 spec for CSSStyleSheet where insertRule() requires an index argument.\n const index = sheet.insertRule(\":host{}\", sheet.cssRules.length);\n this.target = sheet.cssRules[index].style;\n }\n else {\n this.target = null;\n }\n }\n}\n__decorate([\n observable\n], StyleElementStyleSheetTarget.prototype, \"target\", void 0);\n/**\n * Handles setting properties for a normal HTMLElement\n */\nclass ElementStyleSheetTarget {\n constructor(source) {\n this.target = source.style;\n }\n setProperty(name, value) {\n DOM.queueUpdate(() => this.target.setProperty(name, value));\n }\n removeProperty(name) {\n DOM.queueUpdate(() => this.target.removeProperty(name));\n }\n}\n/**\n * Controls emission for default values. This control is capable\n * of emitting to multiple {@link PropertyTarget | PropertyTargets},\n * and only emits if it has at least one root.\n *\n * @internal\n */\nexport class RootStyleSheetTarget {\n setProperty(name, value) {\n RootStyleSheetTarget.properties[name] = value;\n for (const target of RootStyleSheetTarget.roots.values()) {\n PropertyTargetManager.getOrCreate(RootStyleSheetTarget.normalizeRoot(target)).setProperty(name, value);\n }\n }\n removeProperty(name) {\n delete RootStyleSheetTarget.properties[name];\n for (const target of RootStyleSheetTarget.roots.values()) {\n PropertyTargetManager.getOrCreate(RootStyleSheetTarget.normalizeRoot(target)).removeProperty(name);\n }\n }\n static registerRoot(root) {\n const { roots } = RootStyleSheetTarget;\n if (!roots.has(root)) {\n roots.add(root);\n const target = PropertyTargetManager.getOrCreate(this.normalizeRoot(root));\n for (const key in RootStyleSheetTarget.properties) {\n target.setProperty(key, RootStyleSheetTarget.properties[key]);\n }\n }\n }\n static unregisterRoot(root) {\n const { roots } = RootStyleSheetTarget;\n if (roots.has(root)) {\n roots.delete(root);\n const target = PropertyTargetManager.getOrCreate(RootStyleSheetTarget.normalizeRoot(root));\n for (const key in RootStyleSheetTarget.properties) {\n target.removeProperty(key);\n }\n }\n }\n /**\n * Returns the document when provided the default element,\n * otherwise is a no-op\n * @param root - the root to normalize\n */\n static normalizeRoot(root) {\n return root === defaultElement ? document : root;\n }\n}\nRootStyleSheetTarget.roots = new Set();\nRootStyleSheetTarget.properties = {};\n// Caches PropertyTarget instances\nconst propertyTargetCache = new WeakMap();\n// Use Constructable StyleSheets for FAST elements when supported, otherwise use\n// HTMLStyleElement instances\nconst propertyTargetCtor = DOM.supportsAdoptedStyleSheets\n ? ConstructableStyleSheetTarget\n : StyleElementStyleSheetTarget;\n/**\n * Manages creation and caching of PropertyTarget instances.\n *\n * @internal\n */\nexport const PropertyTargetManager = Object.freeze({\n getOrCreate(source) {\n if (propertyTargetCache.has(source)) {\n /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\n return propertyTargetCache.get(source);\n }\n let target;\n if (source === defaultElement) {\n target = new RootStyleSheetTarget();\n }\n else if (source instanceof Document) {\n target = DOM.supportsAdoptedStyleSheets\n ? new DocumentStyleSheetTarget()\n : new HeadStyleElementStyleSheetTarget();\n }\n else if (isFastElement(source)) {\n target = new propertyTargetCtor(source);\n }\n else {\n target = new ElementStyleSheetTarget(source);\n }\n propertyTargetCache.set(source, target);\n return target;\n },\n});\n","import { __decorate } from \"tslib\";\nimport { CSSDirective, defaultExecutionContext, FASTElement, observable, Observable, } from \"@microsoft/fast-element\";\nimport { composedParent } from \"../utilities/composed-parent.js\";\nimport { composedContains } from \"../utilities/composed-contains.js\";\nimport { PropertyTargetManager, RootStyleSheetTarget, } from \"./custom-property-manager.js\";\nimport { defaultElement } from \"./custom-property-manager.js\";\n/**\n * Implementation of {@link (DesignToken:interface)}\n */\nclass DesignTokenImpl extends CSSDirective {\n constructor(configuration) {\n super();\n this.subscribers = new WeakMap();\n this._appliedTo = new Set();\n this.name = configuration.name;\n if (configuration.cssCustomPropertyName !== null) {\n this.cssCustomProperty = `--${configuration.cssCustomPropertyName}`;\n this.cssVar = `var(${this.cssCustomProperty})`;\n }\n this.id = DesignTokenImpl.uniqueId();\n DesignTokenImpl.tokensById.set(this.id, this);\n }\n get appliedTo() {\n return [...this._appliedTo];\n }\n static from(nameOrConfig) {\n return new DesignTokenImpl({\n name: typeof nameOrConfig === \"string\" ? nameOrConfig : nameOrConfig.name,\n cssCustomPropertyName: typeof nameOrConfig === \"string\"\n ? nameOrConfig\n : nameOrConfig.cssCustomPropertyName === void 0\n ? nameOrConfig.name\n : nameOrConfig.cssCustomPropertyName,\n });\n }\n static isCSSDesignToken(token) {\n return typeof token.cssCustomProperty === \"string\";\n }\n static isDerivedDesignTokenValue(value) {\n return typeof value === \"function\";\n }\n /**\n * Gets a token by ID. Returns undefined if the token was not found.\n * @param id - The ID of the token\n * @returns\n */\n static getTokenById(id) {\n return DesignTokenImpl.tokensById.get(id);\n }\n getOrCreateSubscriberSet(target = this) {\n return (this.subscribers.get(target) ||\n (this.subscribers.set(target, new Set()) && this.subscribers.get(target)));\n }\n createCSS() {\n return this.cssVar || \"\";\n }\n getValueFor(element) {\n const value = DesignTokenNode.getOrCreate(element).get(this);\n if (value !== undefined) {\n return value;\n }\n throw new Error(`Value could not be retrieved for token named \"${this.name}\". Ensure the value is set for ${element} or an ancestor of ${element}.`);\n }\n setValueFor(element, value) {\n this._appliedTo.add(element);\n if (value instanceof DesignTokenImpl) {\n value = this.alias(value);\n }\n DesignTokenNode.getOrCreate(element).set(this, value);\n return this;\n }\n deleteValueFor(element) {\n this._appliedTo.delete(element);\n if (DesignTokenNode.existsFor(element)) {\n DesignTokenNode.getOrCreate(element).delete(this);\n }\n return this;\n }\n withDefault(value) {\n this.setValueFor(defaultElement, value);\n return this;\n }\n subscribe(subscriber, target) {\n const subscriberSet = this.getOrCreateSubscriberSet(target);\n if (target && !DesignTokenNode.existsFor(target)) {\n DesignTokenNode.getOrCreate(target);\n }\n if (!subscriberSet.has(subscriber)) {\n subscriberSet.add(subscriber);\n }\n }\n unsubscribe(subscriber, target) {\n const list = this.subscribers.get(target || this);\n if (list && list.has(subscriber)) {\n list.delete(subscriber);\n }\n }\n /**\n * Notifies subscribers that the value for an element has changed.\n * @param element - The element to emit a notification for\n */\n notify(element) {\n const record = Object.freeze({ token: this, target: element });\n if (this.subscribers.has(this)) {\n this.subscribers.get(this).forEach(sub => sub.handleChange(record));\n }\n if (this.subscribers.has(element)) {\n this.subscribers.get(element).forEach(sub => sub.handleChange(record));\n }\n }\n /**\n * Alias the token to the provided token.\n * @param token - the token to alias to\n */\n alias(token) {\n return ((target) => token.getValueFor(target));\n }\n}\nDesignTokenImpl.uniqueId = (() => {\n let id = 0;\n return () => {\n id++;\n return id.toString(16);\n };\n})();\n/**\n * Token storage by token ID\n */\nDesignTokenImpl.tokensById = new Map();\nclass CustomPropertyReflector {\n startReflection(token, target) {\n token.subscribe(this, target);\n this.handleChange({ token, target });\n }\n stopReflection(token, target) {\n token.unsubscribe(this, target);\n this.remove(token, target);\n }\n handleChange(record) {\n const { token, target } = record;\n this.add(token, target);\n }\n add(token, target) {\n PropertyTargetManager.getOrCreate(target).setProperty(token.cssCustomProperty, this.resolveCSSValue(DesignTokenNode.getOrCreate(target).get(token)));\n }\n remove(token, target) {\n PropertyTargetManager.getOrCreate(target).removeProperty(token.cssCustomProperty);\n }\n resolveCSSValue(value) {\n return value && typeof value.createCSS === \"function\" ? value.createCSS() : value;\n }\n}\n/**\n * A light wrapper around BindingObserver to handle value caching and\n * token notification\n */\nclass DesignTokenBindingObserver {\n constructor(source, token, node) {\n this.source = source;\n this.token = token;\n this.node = node;\n this.dependencies = new Set();\n this.observer = Observable.binding(source, this, false);\n // This is a little bit hacky because it's using internal APIs of BindingObserverImpl.\n // BindingObserverImpl queues updates to batch it's notifications which doesn't work for this\n // scenario because the DesignToken.getValueFor API is not async. Without this, using DesignToken.getValueFor()\n // after DesignToken.setValueFor() when setting a dependency of the value being retrieved can return a stale\n // value. Assigning .handleChange to .call forces immediate invocation of this classes handleChange() method,\n // allowing resolution of values synchronously.\n // TODO: https://github.com/microsoft/fast/issues/5110\n this.observer.handleChange = this.observer.call;\n this.handleChange();\n }\n disconnect() {\n this.observer.disconnect();\n }\n /**\n * @internal\n */\n handleChange() {\n this.node.store.set(this.token, this.observer.observe(this.node.target, defaultExecutionContext));\n }\n}\n/**\n * Stores resolved token/value pairs and notifies on changes\n */\nclass Store {\n constructor() {\n this.values = new Map();\n }\n set(token, value) {\n if (this.values.get(token) !== value) {\n this.values.set(token, value);\n Observable.getNotifier(this).notify(token.id);\n }\n }\n get(token) {\n Observable.track(this, token.id);\n return this.values.get(token);\n }\n delete(token) {\n this.values.delete(token);\n }\n all() {\n return this.values.entries();\n }\n}\nconst nodeCache = new WeakMap();\nconst childToParent = new WeakMap();\n/**\n * A node responsible for setting and getting token values,\n * emitting values to CSS custom properties, and maintaining\n * inheritance structures.\n */\nclass DesignTokenNode {\n constructor(target) {\n this.target = target;\n /**\n * Stores all resolved token values for a node\n */\n this.store = new Store();\n /**\n * All children assigned to the node\n */\n this.children = [];\n /**\n * All values explicitly assigned to the node in their raw form\n */\n this.assignedValues = new Map();\n /**\n * Tokens currently being reflected to CSS custom properties\n */\n this.reflecting = new Set();\n /**\n * Binding observers for assigned and inherited derived values.\n */\n this.bindingObservers = new Map();\n /**\n * Emits notifications to token when token values\n * change the DesignTokenNode\n */\n this.tokenValueChangeHandler = {\n handleChange: (source, arg) => {\n const token = DesignTokenImpl.getTokenById(arg);\n if (token) {\n // Notify any token subscribers\n token.notify(this.target);\n this.updateCSSTokenReflection(source, token);\n }\n },\n };\n nodeCache.set(target, this);\n // Map store change notifications to token change notifications\n Observable.getNotifier(this.store).subscribe(this.tokenValueChangeHandler);\n if (target instanceof FASTElement) {\n target.$fastController.addBehaviors([this]);\n }\n else if (target.isConnected) {\n this.bind();\n }\n }\n /**\n * Returns a DesignTokenNode for an element.\n * Creates a new instance if one does not already exist for a node,\n * otherwise returns the cached instance\n *\n * @param target - The HTML element to retrieve a DesignTokenNode for\n */\n static getOrCreate(target) {\n return nodeCache.get(target) || new DesignTokenNode(target);\n }\n /**\n * Determines if a DesignTokenNode has been created for a target\n * @param target - The element to test\n */\n static existsFor(target) {\n return nodeCache.has(target);\n }\n /**\n * Searches for and return the nearest parent DesignTokenNode.\n * Null is returned if no node is found or the node provided is for a default element.\n */\n static findParent(node) {\n if (!(defaultElement === node.target)) {\n let parent = composedParent(node.target);\n while (parent !== null) {\n if (nodeCache.has(parent)) {\n return nodeCache.get(parent);\n }\n parent = composedParent(parent);\n }\n return DesignTokenNode.getOrCreate(defaultElement);\n }\n return null;\n }\n /**\n * Finds the closest node with a value explicitly assigned for a token, otherwise null.\n * @param token - The token to look for\n * @param start - The node to start looking for value assignment\n * @returns\n */\n static findClosestAssignedNode(token, start) {\n let current = start;\n do {\n if (current.has(token)) {\n return current;\n }\n current = current.parent\n ? current.parent\n : current.target !== defaultElement\n ? DesignTokenNode.getOrCreate(defaultElement)\n : null;\n } while (current !== null);\n return null;\n }\n /**\n * The parent DesignTokenNode, or null.\n */\n get parent() {\n return childToParent.get(this) || null;\n }\n updateCSSTokenReflection(source, token) {\n if (DesignTokenImpl.isCSSDesignToken(token)) {\n const parent = this.parent;\n const reflecting = this.isReflecting(token);\n if (parent) {\n const parentValue = parent.get(token);\n const sourceValue = source.get(token);\n if (parentValue !== sourceValue && !reflecting) {\n this.reflectToCSS(token);\n }\n else if (parentValue === sourceValue && reflecting) {\n this.stopReflectToCSS(token);\n }\n }\n else if (!reflecting) {\n this.reflectToCSS(token);\n }\n }\n }\n /**\n * Checks if a token has been assigned an explicit value the node.\n * @param token - the token to check.\n */\n has(token) {\n return this.assignedValues.has(token);\n }\n /**\n * Gets the value of a token for a node\n * @param token - The token to retrieve the value for\n * @returns\n */\n get(token) {\n const value = this.store.get(token);\n if (value !== undefined) {\n return value;\n }\n const raw = this.getRaw(token);\n if (raw !== undefined) {\n this.hydrate(token, raw);\n return this.get(token);\n }\n }\n /**\n * Retrieves the raw assigned value of a token from the nearest assigned node.\n * @param token - The token to retrieve a raw value for\n * @returns\n */\n getRaw(token) {\n var _a;\n if (this.assignedValues.has(token)) {\n return this.assignedValues.get(token);\n }\n return (_a = DesignTokenNode.findClosestAssignedNode(token, this)) === null || _a === void 0 ? void 0 : _a.getRaw(token);\n }\n /**\n * Sets a token to a value for a node\n * @param token - The token to set\n * @param value - The value to set the token to\n */\n set(token, value) {\n if (DesignTokenImpl.isDerivedDesignTokenValue(this.assignedValues.get(token))) {\n this.tearDownBindingObserver(token);\n }\n this.assignedValues.set(token, value);\n if (DesignTokenImpl.isDerivedDesignTokenValue(value)) {\n this.setupBindingObserver(token, value);\n }\n else {\n this.store.set(token, value);\n }\n }\n /**\n * Deletes a token value for the node.\n * @param token - The token to delete the value for\n */\n delete(token) {\n this.assignedValues.delete(token);\n this.tearDownBindingObserver(token);\n const upstream = this.getRaw(token);\n if (upstream) {\n this.hydrate(token, upstream);\n }\n else {\n this.store.delete(token);\n }\n }\n /**\n * Invoked when the DesignTokenNode.target is attached to the document\n */\n bind() {\n const parent = DesignTokenNode.findParent(this);\n if (parent) {\n parent.appendChild(this);\n }\n for (const key of this.assignedValues.keys()) {\n key.notify(this.target);\n }\n }\n /**\n * Invoked when the DesignTokenNode.target is detached from the document\n */\n unbind() {\n if (this.parent) {\n const parent = childToParent.get(this);\n parent.removeChild(this);\n }\n }\n /**\n * Appends a child to a parent DesignTokenNode.\n * @param child - The child to append to the node\n */\n appendChild(child) {\n if (child.parent) {\n childToParent.get(child).removeChild(child);\n }\n const reParent = this.children.filter(x => child.contains(x));\n childToParent.set(child, this);\n this.children.push(child);\n reParent.forEach(x => child.appendChild(x));\n Observable.getNotifier(this.store).subscribe(child);\n // How can we not notify *every* subscriber?\n for (const [token, value] of this.store.all()) {\n child.hydrate(token, this.bindingObservers.has(token) ? this.getRaw(token) : value);\n }\n }\n /**\n * Removes a child from a node.\n * @param child - The child to remove.\n */\n removeChild(child) {\n const childIndex = this.children.indexOf(child);\n if (childIndex !== -1) {\n this.children.splice(childIndex, 1);\n }\n Observable.getNotifier(this.store).unsubscribe(child);\n return child.parent === this ? childToParent.delete(child) : false;\n }\n /**\n * Tests whether a provided node is contained by\n * the calling node.\n * @param test - The node to test\n */\n contains(test) {\n return composedContains(this.target, test.target);\n }\n /**\n * Instructs the node to reflect a design token for the provided token.\n * @param token - The design token to reflect\n */\n reflectToCSS(token) {\n if (!this.isReflecting(token)) {\n this.reflecting.add(token);\n DesignTokenNode.cssCustomPropertyReflector.startReflection(token, this.target);\n }\n }\n /**\n * Stops reflecting a DesignToken to CSS\n * @param token - The design token to stop reflecting\n */\n stopReflectToCSS(token) {\n if (this.isReflecting(token)) {\n this.reflecting.delete(token);\n DesignTokenNode.cssCustomPropertyReflector.stopReflection(token, this.target);\n }\n }\n /**\n * Determines if a token is being reflected to CSS for a node.\n * @param token - The token to check for reflection\n * @returns\n */\n isReflecting(token) {\n return this.reflecting.has(token);\n }\n /**\n * Handle changes to upstream tokens\n * @param source - The parent DesignTokenNode\n * @param property - The token ID that changed\n */\n handleChange(source, property) {\n const token = DesignTokenImpl.getTokenById(property);\n if (!token) {\n return;\n }\n this.hydrate(token, this.getRaw(token));\n this.updateCSSTokenReflection(this.store, token);\n }\n /**\n * Hydrates a token with a DesignTokenValue, making retrieval available.\n * @param token - The token to hydrate\n * @param value - The value to hydrate\n */\n hydrate(token, value) {\n if (!this.has(token)) {\n const observer = this.bindingObservers.get(token);\n if (DesignTokenImpl.isDerivedDesignTokenValue(value)) {\n if (observer) {\n // If the binding source doesn't match, we need\n // to update the binding\n if (observer.source !== value) {\n this.tearDownBindingObserver(token);\n this.setupBindingObserver(token, value);\n }\n }\n else {\n this.setupBindingObserver(token, value);\n }\n }\n else {\n if (observer) {\n this.tearDownBindingObserver(token);\n }\n this.store.set(token, value);\n }\n }\n }\n /**\n * Sets up a binding observer for a derived token value that notifies token\n * subscribers on change.\n *\n * @param token - The token to notify when the binding updates\n * @param source - The binding source\n */\n setupBindingObserver(token, source) {\n const binding = new DesignTokenBindingObserver(source, token, this);\n this.bindingObservers.set(token, binding);\n return binding;\n }\n /**\n * Tear down a binding observer for a token.\n */\n tearDownBindingObserver(token) {\n if (this.bindingObservers.has(token)) {\n this.bindingObservers.get(token).disconnect();\n this.bindingObservers.delete(token);\n return true;\n }\n return false;\n }\n}\n/**\n * Responsible for reflecting tokens to CSS custom properties\n */\nDesignTokenNode.cssCustomPropertyReflector = new CustomPropertyReflector();\n__decorate([\n observable\n], DesignTokenNode.prototype, \"children\", void 0);\nfunction create(nameOrConfig) {\n return DesignTokenImpl.from(nameOrConfig);\n}\n/* eslint-enable @typescript-eslint/no-unused-vars */\n/**\n * Factory object for creating {@link (DesignToken:interface)} instances.\n * @public\n */\nexport const DesignToken = Object.freeze({\n create,\n /**\n * Informs DesignToken that an HTMLElement for which tokens have\n * been set has been connected to the document.\n *\n * The browser does not provide a reliable mechanism to observe an HTMLElement's connectedness\n * in all scenarios, so invoking this method manually is necessary when:\n *\n * 1. Token values are set for an HTMLElement.\n * 2. The HTMLElement does not inherit from FASTElement.\n * 3. The HTMLElement is not connected to the document when token values are set.\n *\n * @param element - The element to notify\n * @returns - true if notification was successful, otherwise false.\n */\n notifyConnection(element) {\n if (!element.isConnected || !DesignTokenNode.existsFor(element)) {\n return false;\n }\n DesignTokenNode.getOrCreate(element).bind();\n return true;\n },\n /**\n * Informs DesignToken that an HTMLElement for which tokens have\n * been set has been disconnected to the document.\n *\n * The browser does not provide a reliable mechanism to observe an HTMLElement's connectedness\n * in all scenarios, so invoking this method manually is necessary when:\n *\n * 1. Token values are set for an HTMLElement.\n * 2. The HTMLElement does not inherit from FASTElement.\n *\n * @param element - The element to notify\n * @returns - true if notification was successful, otherwise false.\n */\n notifyDisconnection(element) {\n if (element.isConnected || !DesignTokenNode.existsFor(element)) {\n return false;\n }\n DesignTokenNode.getOrCreate(element).unbind();\n return true;\n },\n /**\n * Registers and element or document as a DesignToken root.\n * {@link CSSDesignToken | CSSDesignTokens} with default values assigned via\n * {@link (DesignToken:interface).withDefault} will emit CSS custom properties to all\n * registered roots.\n * @param target - The root to register\n */\n registerRoot(target = defaultElement) {\n RootStyleSheetTarget.registerRoot(target);\n },\n /**\n * Unregister an element or document as a DesignToken root.\n * @param target - The root to deregister\n */\n unregisterRoot(target = defaultElement) {\n RootStyleSheetTarget.unregisterRoot(target);\n },\n});\n/* eslint-enable @typescript-eslint/no-non-null-assertion */\n","/**\n * Big thanks to https://github.com/fkleuver and the https://github.com/aurelia/aurelia project\n * for the bulk of this code and many of the associated tests.\n */\nimport { emptyArray, FASTElement } from \"@microsoft/fast-element\";\n// Tiny polyfill for TypeScript's Reflect metadata API.\nconst metadataByTarget = new Map();\nif (!(\"metadata\" in Reflect)) {\n Reflect.metadata = function (key, value) {\n return function (target) {\n Reflect.defineMetadata(key, value, target);\n };\n };\n Reflect.defineMetadata = function (key, value, target) {\n let metadata = metadataByTarget.get(target);\n if (metadata === void 0) {\n metadataByTarget.set(target, (metadata = new Map()));\n }\n metadata.set(key, value);\n };\n Reflect.getOwnMetadata = function (key, target) {\n const metadata = metadataByTarget.get(target);\n if (metadata !== void 0) {\n return metadata.get(key);\n }\n return void 0;\n };\n}\n/**\n * A utility class used that constructs and registers resolvers for a dependency\n * injection container. Supports a standard set of object lifetimes.\n * @public\n */\nexport class ResolverBuilder {\n /**\n *\n * @param container - The container to create resolvers for.\n * @param key - The key to register resolvers under.\n */\n constructor(container, key) {\n this.container = container;\n this.key = key;\n }\n /**\n * Creates a resolver for an existing object instance.\n * @param value - The instance to resolve.\n * @returns The resolver.\n */\n instance(value) {\n return this.registerResolver(0 /* instance */, value);\n }\n /**\n * Creates a resolver that enforces a singleton lifetime.\n * @param value - The type to create and cache the singleton for.\n * @returns The resolver.\n */\n singleton(value) {\n return this.registerResolver(1 /* singleton */, value);\n }\n /**\n * Creates a resolver that creates a new instance for every dependency request.\n * @param value - The type to create instances of.\n * @returns - The resolver.\n */\n transient(value) {\n return this.registerResolver(2 /* transient */, value);\n }\n /**\n * Creates a resolver that invokes a callback function for every dependency resolution\n * request, allowing custom logic to return the dependency.\n * @param value - The callback to call during resolution.\n * @returns The resolver.\n */\n callback(value) {\n return this.registerResolver(3 /* callback */, value);\n }\n /**\n * Creates a resolver that invokes a callback function the first time that a dependency\n * resolution is requested. The returned value is then cached and provided for all\n * subsequent requests.\n * @param value - The callback to call during the first resolution.\n * @returns The resolver.\n */\n cachedCallback(value) {\n return this.registerResolver(3 /* callback */, cacheCallbackResult(value));\n }\n /**\n * Aliases the current key to a different key.\n * @param destinationKey - The key to point the alias to.\n * @returns The resolver.\n */\n aliasTo(destinationKey) {\n return this.registerResolver(5 /* alias */, destinationKey);\n }\n registerResolver(strategy, state) {\n const { container, key } = this;\n /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\n this.container = this.key = (void 0);\n return container.registerResolver(key, new ResolverImpl(key, strategy, state));\n }\n}\nfunction cloneArrayWithPossibleProps(source) {\n const clone = source.slice();\n const keys = Object.keys(source);\n const len = keys.length;\n let key;\n for (let i = 0; i < len; ++i) {\n key = keys[i];\n if (!isArrayIndex(key)) {\n clone[key] = source[key];\n }\n }\n return clone;\n}\n/**\n * A set of default resolvers useful in configuring a container.\n * @public\n */\nexport const DefaultResolver = Object.freeze({\n /**\n * Disables auto-registration and throws for all un-registered dependencies.\n * @param key - The key to create the resolver for.\n */\n none(key) {\n throw Error(`${key.toString()} not registered, did you forget to add @singleton()?`);\n },\n /**\n * Provides default singleton resolution behavior during auto-registration.\n * @param key - The key to create the resolver for.\n * @returns The resolver.\n */\n singleton(key) {\n return new ResolverImpl(key, 1 /* singleton */, key);\n },\n /**\n * Provides default transient resolution behavior during auto-registration.\n * @param key - The key to create the resolver for.\n * @returns The resolver.\n */\n transient(key) {\n return new ResolverImpl(key, 2 /* transient */, key);\n },\n});\n/**\n * Configuration for a dependency injection container.\n * @public\n */\nexport const ContainerConfiguration = Object.freeze({\n /**\n * The default configuration used when creating a DOM-disconnected container.\n * @remarks\n * The default creates a root container, with no parent container. It does not handle\n * owner requests and it uses singleton resolution behavior for auto-registration.\n */\n default: Object.freeze({\n parentLocator: () => null,\n responsibleForOwnerRequests: false,\n defaultResolver: DefaultResolver.singleton,\n }),\n});\nconst dependencyLookup = new Map();\nfunction getParamTypes(key) {\n return (Type) => {\n return Reflect.getOwnMetadata(key, Type);\n };\n}\nlet rootDOMContainer = null;\n/**\n * The gateway to dependency injection APIs.\n * @public\n */\nexport const DI = Object.freeze({\n /**\n * Creates a new dependency injection container.\n * @param config - The configuration for the container.\n * @returns A newly created dependency injection container.\n */\n createContainer(config) {\n return new ContainerImpl(null, Object.assign({}, ContainerConfiguration.default, config));\n },\n /**\n * Finds the dependency injection container responsible for providing dependencies\n * to the specified node.\n * @param node - The node to find the responsible container for.\n * @returns The container responsible for providing dependencies to the node.\n * @remarks\n * This will be the same as the parent container if the specified node\n * does not itself host a container configured with responsibleForOwnerRequests.\n */\n findResponsibleContainer(node) {\n const owned = node.$$container$$;\n if (owned && owned.responsibleForOwnerRequests) {\n return owned;\n }\n return DI.findParentContainer(node);\n },\n /**\n * Find the dependency injection container up the DOM tree from this node.\n * @param node - The node to find the parent container for.\n * @returns The parent container of this node.\n * @remarks\n * This will be the same as the responsible container if the specified node\n * does not itself host a container configured with responsibleForOwnerRequests.\n */\n findParentContainer(node) {\n const event = new CustomEvent(DILocateParentEventType, {\n bubbles: true,\n composed: true,\n cancelable: true,\n detail: { container: void 0 },\n });\n node.dispatchEvent(event);\n return event.detail.container || DI.getOrCreateDOMContainer();\n },\n /**\n * Returns a dependency injection container if one is explicitly owned by the specified\n * node. If one is not owned, then a new container is created and assigned to the node.\n * @param node - The node to find or create the container for.\n * @param config - The configuration for the container if one needs to be created.\n * @returns The located or created container.\n * @remarks\n * This API does not search for a responsible or parent container. It looks only for a container\n * directly defined on the specified node and creates one at that location if one does not\n * already exist.\n */\n getOrCreateDOMContainer(node, config) {\n if (!node) {\n return (rootDOMContainer ||\n (rootDOMContainer = new ContainerImpl(null, Object.assign({}, ContainerConfiguration.default, config, {\n parentLocator: () => null,\n }))));\n }\n return (node.$$container$$ ||\n new ContainerImpl(node, Object.assign({}, ContainerConfiguration.default, config, {\n parentLocator: DI.findParentContainer,\n })));\n },\n /**\n * Gets the \"design:paramtypes\" metadata for the specified type.\n * @param Type - The type to get the metadata for.\n * @returns The metadata array or undefined if no metadata is found.\n */\n getDesignParamtypes: getParamTypes(\"design:paramtypes\"),\n /**\n * Gets the \"di:paramtypes\" metadata for the specified type.\n * @param Type - The type to get the metadata for.\n * @returns The metadata array or undefined if no metadata is found.\n */\n getAnnotationParamtypes: getParamTypes(\"di:paramtypes\"),\n /**\n *\n * @param Type - Gets the \"di:paramtypes\" metadata for the specified type. If none is found,\n * an empty metadata array is created and added.\n * @returns The metadata array.\n */\n getOrCreateAnnotationParamTypes(Type) {\n let annotationParamtypes = this.getAnnotationParamtypes(Type);\n if (annotationParamtypes === void 0) {\n Reflect.defineMetadata(\"di:paramtypes\", (annotationParamtypes = []), Type);\n }\n return annotationParamtypes;\n },\n /**\n * Gets the dependency keys representing what is needed to instantiate the specified type.\n * @param Type - The type to get the dependencies for.\n * @returns An array of dependency keys.\n */\n getDependencies(Type) {\n // Note: Every detail of this getDependencies method is pretty deliberate at the moment, and probably not yet 100% tested from every possible angle,\n // so be careful with making changes here as it can have a huge impact on complex end user apps.\n // Preferably, only make changes to the dependency resolution process via a RFC.\n let dependencies = dependencyLookup.get(Type);\n if (dependencies === void 0) {\n // Type.length is the number of constructor parameters. If this is 0, it could mean the class has an empty constructor\n // but it could also mean the class has no constructor at all (in which case it inherits the constructor from the prototype).\n // Non-zero constructor length + no paramtypes means emitDecoratorMetadata is off, or the class has no decorator.\n // We're not doing anything with the above right now, but it's good to keep in mind for any future issues.\n const inject = Type.inject;\n if (inject === void 0) {\n // design:paramtypes is set by tsc when emitDecoratorMetadata is enabled.\n const designParamtypes = DI.getDesignParamtypes(Type);\n // di:paramtypes is set by the parameter decorator from DI.createInterface or by @inject\n const annotationParamtypes = DI.getAnnotationParamtypes(Type);\n if (designParamtypes === void 0) {\n if (annotationParamtypes === void 0) {\n // Only go up the prototype if neither static inject nor any of the paramtypes is defined, as\n // there is no sound way to merge a type's deps with its prototype's deps\n const Proto = Object.getPrototypeOf(Type);\n if (typeof Proto === \"function\" && Proto !== Function.prototype) {\n dependencies = cloneArrayWithPossibleProps(DI.getDependencies(Proto));\n }\n else {\n dependencies = [];\n }\n }\n else {\n // No design:paramtypes so just use the di:paramtypes\n dependencies = cloneArrayWithPossibleProps(annotationParamtypes);\n }\n }\n else if (annotationParamtypes === void 0) {\n // No di:paramtypes so just use the design:paramtypes\n dependencies = cloneArrayWithPossibleProps(designParamtypes);\n }\n else {\n // We've got both, so merge them (in case of conflict on same index, di:paramtypes take precedence)\n dependencies = cloneArrayWithPossibleProps(designParamtypes);\n let len = annotationParamtypes.length;\n let auAnnotationParamtype;\n for (let i = 0; i < len; ++i) {\n auAnnotationParamtype = annotationParamtypes[i];\n if (auAnnotationParamtype !== void 0) {\n dependencies[i] = auAnnotationParamtype;\n }\n }\n const keys = Object.keys(annotationParamtypes);\n len = keys.length;\n let key;\n for (let i = 0; i < len; ++i) {\n key = keys[i];\n if (!isArrayIndex(key)) {\n dependencies[key] = annotationParamtypes[key];\n }\n }\n }\n }\n else {\n // Ignore paramtypes if we have static inject\n dependencies = cloneArrayWithPossibleProps(inject);\n }\n dependencyLookup.set(Type, dependencies);\n }\n return dependencies;\n },\n /**\n * Defines a property on a web component class. The value of this property will\n * be resolved from the dependency injection container responsible for the element\n * instance, based on where it is connected in the DOM.\n * @param target - The target to define the property on.\n * @param propertyName - The name of the property to define.\n * @param key - The dependency injection key.\n * @param respectConnection - Indicates whether or not to update the property value if the\n * hosting component is disconnected and then re-connected at a different location in the DOM.\n * @remarks\n * The respectConnection option is only applicable to elements that descend from FASTElement.\n */\n defineProperty(target, propertyName, key, respectConnection = false) {\n const diPropertyKey = `$di_${propertyName}`;\n Reflect.defineProperty(target, propertyName, {\n get: function () {\n let value = this[diPropertyKey];\n if (value === void 0) {\n const container = this instanceof HTMLElement\n ? DI.findResponsibleContainer(this)\n : DI.getOrCreateDOMContainer();\n value = container.get(key);\n this[diPropertyKey] = value;\n if (respectConnection && this instanceof FASTElement) {\n const notifier = this.$fastController;\n const handleChange = () => {\n const newContainer = DI.findResponsibleContainer(this);\n const newValue = newContainer.get(key);\n const oldValue = this[diPropertyKey];\n if (newValue !== oldValue) {\n this[diPropertyKey] = value;\n notifier.notify(propertyName);\n }\n };\n notifier.subscribe({ handleChange }, \"isConnected\");\n }\n }\n return value;\n },\n });\n },\n /**\n * Creates a dependency injection key.\n * @param nameConfigOrCallback - A friendly name for the key or a lambda that configures a\n * default resolution for the dependency.\n * @param configuror - If a friendly name was provided for the first parameter, then an optional\n * lambda that configures a default resolution for the dependency can be provided second.\n * @returns The created key.\n * @remarks\n * The created key can be used as a property decorator or constructor parameter decorator,\n * in addition to its standard use in an inject array or through direct container APIs.\n */\n createInterface(nameConfigOrCallback, configuror) {\n const configure = typeof nameConfigOrCallback === \"function\"\n ? nameConfigOrCallback\n : configuror;\n const friendlyName = typeof nameConfigOrCallback === \"string\"\n ? nameConfigOrCallback\n : nameConfigOrCallback && \"friendlyName\" in nameConfigOrCallback\n ? nameConfigOrCallback.friendlyName || defaultFriendlyName\n : defaultFriendlyName;\n const respectConnection = typeof nameConfigOrCallback === \"string\"\n ? false\n : nameConfigOrCallback && \"respectConnection\" in nameConfigOrCallback\n ? nameConfigOrCallback.respectConnection || false\n : false;\n const Interface = function (target, property, index) {\n if (target == null || new.target !== undefined) {\n throw new Error(`No registration for interface: '${Interface.friendlyName}'`);\n }\n if (property) {\n DI.defineProperty(target, property, Interface, respectConnection);\n }\n else {\n const annotationParamtypes = DI.getOrCreateAnnotationParamTypes(target);\n annotationParamtypes[index] = Interface;\n }\n };\n Interface.$isInterface = true;\n Interface.friendlyName = friendlyName == null ? \"(anonymous)\" : friendlyName;\n if (configure != null) {\n Interface.register = function (container, key) {\n return configure(new ResolverBuilder(container, key !== null && key !== void 0 ? key : Interface));\n };\n }\n Interface.toString = function toString() {\n return `InterfaceSymbol<${Interface.friendlyName}>`;\n };\n return Interface;\n },\n /**\n * A decorator that specifies what to inject into its target.\n * @param dependencies - The dependencies to inject.\n * @returns The decorator to be applied to the target class.\n * @remarks\n * The decorator can be used to decorate a class, listing all of the classes dependencies.\n * Or it can be used to decorate a constructor paramter, indicating what to inject for that\n * parameter.\n * Or it can be used for a web component property, indicating what that property should resolve to.\n */\n inject(...dependencies) {\n return function (target, key, descriptor) {\n if (typeof descriptor === \"number\") {\n // It's a parameter decorator.\n const annotationParamtypes = DI.getOrCreateAnnotationParamTypes(target);\n const dep = dependencies[0];\n if (dep !== void 0) {\n annotationParamtypes[descriptor] = dep;\n }\n }\n else if (key) {\n DI.defineProperty(target, key, dependencies[0]);\n }\n else {\n const annotationParamtypes = descriptor\n ? DI.getOrCreateAnnotationParamTypes(descriptor.value)\n : DI.getOrCreateAnnotationParamTypes(target);\n let dep;\n for (let i = 0; i < dependencies.length; ++i) {\n dep = dependencies[i];\n if (dep !== void 0) {\n annotationParamtypes[i] = dep;\n }\n }\n }\n };\n },\n /**\n * Registers the `target` class as a transient dependency; each time the dependency is resolved\n * a new instance will be created.\n *\n * @param target - The class / constructor function to register as transient.\n * @returns The same class, with a static `register` method that takes a container and returns the appropriate resolver.\n *\n * @example\n * On an existing class\n * ```ts\n * class Foo { }\n * DI.transient(Foo);\n * ```\n *\n * @example\n * Inline declaration\n *\n * ```ts\n * const Foo = DI.transient(class { });\n * // Foo is now strongly typed with register\n * Foo.register(container);\n * ```\n *\n * @public\n */\n transient(target) {\n target.register = function register(container) {\n const registration = Registration.transient(target, target);\n return registration.register(container);\n };\n target.registerInRequestor = false;\n return target;\n },\n /**\n * Registers the `target` class as a singleton dependency; the class will only be created once. Each\n * consecutive time the dependency is resolved, the same instance will be returned.\n *\n * @param target - The class / constructor function to register as a singleton.\n * @returns The same class, with a static `register` method that takes a container and returns the appropriate resolver.\n * @example\n * On an existing class\n * ```ts\n * class Foo { }\n * DI.singleton(Foo);\n * ```\n *\n * @example\n * Inline declaration\n * ```ts\n * const Foo = DI.singleton(class { });\n * // Foo is now strongly typed with register\n * Foo.register(container);\n * ```\n *\n * @public\n */\n singleton(target, options = defaultSingletonOptions) {\n target.register = function register(container) {\n const registration = Registration.singleton(target, target);\n return registration.register(container);\n };\n target.registerInRequestor = options.scoped;\n return target;\n },\n});\n/**\n * The interface key that resolves the dependency injection container itself.\n * @public\n */\nexport const Container = DI.createInterface(\"Container\");\n/**\n * The interface key that resolves the service locator itself.\n * @public\n */\nexport const ServiceLocator = Container;\nfunction createResolver(getter) {\n return function (key) {\n const resolver = function (target, property, descriptor) {\n DI.inject(resolver)(target, property, descriptor);\n };\n resolver.$isResolver = true;\n resolver.resolve = function (handler, requestor) {\n return getter(key, handler, requestor);\n };\n return resolver;\n };\n}\n/**\n * A decorator that specifies what to inject into its target.\n * @param dependencies - The dependencies to inject.\n * @returns The decorator to be applied to the target class.\n * @remarks\n * The decorator can be used to decorate a class, listing all of the classes dependencies.\n * Or it can be used to decorate a constructor paramter, indicating what to inject for that\n * parameter.\n * Or it can be used for a web component property, indicating what that property should resolve to.\n *\n * @public\n */\nexport const inject = DI.inject;\nfunction transientDecorator(target) {\n return DI.transient(target);\n}\nexport function transient(target) {\n return target == null ? transientDecorator : transientDecorator(target);\n}\nconst defaultSingletonOptions = { scoped: false };\nfunction singletonDecorator(target) {\n return DI.singleton(target);\n}\n/**\n * @public\n */\nexport function singleton(targetOrOptions) {\n if (typeof targetOrOptions === \"function\") {\n return DI.singleton(targetOrOptions);\n }\n return function ($target) {\n return DI.singleton($target, targetOrOptions);\n };\n}\nfunction createAllResolver(getter) {\n return function (key, searchAncestors) {\n searchAncestors = !!searchAncestors;\n const resolver = function (target, property, descriptor) {\n DI.inject(resolver)(target, property, descriptor);\n };\n resolver.$isResolver = true;\n resolver.resolve = function (handler, requestor) {\n /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\n return getter(key, handler, requestor, searchAncestors);\n };\n return resolver;\n };\n}\n/**\n * A decorator and DI resolver that will resolve an array of all dependencies\n * registered with the specified key.\n * @param key - The key to resolve all dependencies for.\n * @param searchAncestors - [optional] Indicates whether to search ancestor containers.\n * @public\n */\nexport const all = createAllResolver((key, handler, requestor, searchAncestors) => requestor.getAll(key, searchAncestors));\n/**\n * A decorator that lazily injects a dependency depending on whether the `Key` is present at the time of function call.\n *\n * @example\n * You need to make your argument a function that returns the type, for example\n * ```ts\n * class Foo {\n * constructor( @lazy('random') public random: () => number )\n * }\n * const foo = container.get(Foo); // instanceof Foo\n * foo.random(); // throws\n * ```\n * would throw an exception because you haven't registered `'random'` before calling the method.\n * @example\n * This, would give you a new 'Math.random()' number each time.\n * ```ts\n * class Foo {\n * constructor( @lazy('random') public random: () => random )\n * }\n * container.register(Registration.callback('random', Math.random ));\n * container.get(Foo).random(); // some random number\n * container.get(Foo).random(); // another random number\n * ```\n *\n * `@lazy` does not manage the lifecycle of the underlying key. If you want a singleton, you have to register as a\n * `singleton`, `transient` would also behave as you would expect, providing you a new instance each time.\n *\n * @param key - The key to lazily resolve.\n * see {@link DI.createInterface} on interactions with interfaces\n *\n * @public\n */\nexport const lazy = createResolver((key, handler, requestor) => {\n return () => requestor.get(key);\n});\n/**\n * A decorator that allows you to optionally inject a dependency depending on whether the [[`Key`]] is present, for example:\n * @example\n * ```ts\n * class Foo {\n * constructor( @inject('mystring') public str: string = 'somestring' )\n * }\n * container.get(Foo); // throws\n * ```\n * would fail\n *\n * @example\n * ```ts\n * class Foo {\n * constructor( @optional('mystring') public str: string = 'somestring' )\n * }\n * container.get(Foo).str // somestring\n * ```\n * if you use it without a default it will inject `undefined`, so remember to mark your input type as\n * possibly `undefined`!\n *\n * @param key - The key to optionally resolve.\n * see {@link DI.createInterface} on interactions with interfaces\n *\n * @public\n */\nexport const optional = createResolver((key, handler, requestor) => {\n if (requestor.has(key, true)) {\n return requestor.get(key);\n }\n else {\n return undefined;\n }\n});\n/**\n * A decorator that tells the container not to try to inject a dependency.\n *\n * @public\n */\nexport function ignore(target, property, descriptor) {\n DI.inject(ignore)(target, property, descriptor);\n}\n// Hack: casting below used to prevent TS from generate a namespace which can't be commented\n// and results in documentation validation errors.\nignore.$isResolver = true;\nignore.resolve = () => undefined;\n/**\n * A decorator that indicates that a new instance should be injected scoped to the\n * container that requested the instance.\n * @param key - The dependency key for the new instance.\n * @remarks\n * This creates a resolver with an instance strategy pointing to the new instance, effectively\n * making this a singleton, scoped to the container or DOM's subtree.\n *\n * @public\n */\nexport const newInstanceForScope = createResolver((key, handler, requestor) => {\n const instance = createNewInstance(key, handler);\n const resolver = new ResolverImpl(key, 0 /* instance */, instance);\n requestor.registerResolver(key, resolver);\n return instance;\n});\n/**\n * A decorator that indicates that a new instance should be injected.\n * @param key - The dependency key for the new instance.\n * @remarks\n * The instance is not internally cached with a resolver as newInstanceForScope does.\n *\n * @public\n */\nexport const newInstanceOf = createResolver((key, handler, _requestor) => createNewInstance(key, handler));\nfunction createNewInstance(key, handler) {\n /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\n return handler.getFactory(key).construct(handler);\n}\n/** @internal */\nexport class ResolverImpl {\n constructor(key, strategy, state) {\n this.key = key;\n this.strategy = strategy;\n this.state = state;\n this.resolving = false;\n }\n get $isResolver() {\n return true;\n }\n register(container) {\n return container.registerResolver(this.key, this);\n }\n resolve(handler, requestor) {\n switch (this.strategy) {\n case 0 /* instance */:\n return this.state;\n case 1 /* singleton */: {\n if (this.resolving) {\n throw new Error(`Cyclic dependency found: ${this.state.name}`);\n }\n this.resolving = true;\n this.state = handler\n .getFactory(this.state)\n .construct(requestor);\n this.strategy = 0 /* instance */;\n this.resolving = false;\n return this.state;\n }\n case 2 /* transient */: {\n // Always create transients from the requesting container\n const factory = handler.getFactory(this.state);\n if (factory === null) {\n throw new Error(`Resolver for ${String(this.key)} returned a null factory`);\n }\n return factory.construct(requestor);\n }\n case 3 /* callback */:\n return this.state(handler, requestor, this);\n case 4 /* array */:\n return this.state[0].resolve(handler, requestor);\n case 5 /* alias */:\n return requestor.get(this.state);\n default:\n throw new Error(`Invalid resolver strategy specified: ${this.strategy}.`);\n }\n }\n getFactory(container) {\n var _a, _b, _c;\n switch (this.strategy) {\n case 1 /* singleton */:\n case 2 /* transient */:\n return container.getFactory(this.state);\n case 5 /* alias */:\n return (_c = (_b = (_a = container.getResolver(this.state)) === null || _a === void 0 ? void 0 : _a.getFactory) === null || _b === void 0 ? void 0 : _b.call(_a, container)) !== null && _c !== void 0 ? _c : null;\n default:\n return null;\n }\n }\n}\nfunction containerGetKey(d) {\n return this.get(d);\n}\nfunction transformInstance(inst, transform) {\n return transform(inst);\n}\n/** @internal */\nexport class FactoryImpl {\n constructor(Type, dependencies) {\n this.Type = Type;\n this.dependencies = dependencies;\n this.transformers = null;\n }\n construct(container, dynamicDependencies) {\n let instance;\n if (dynamicDependencies === void 0) {\n instance = new this.Type(...this.dependencies.map(containerGetKey, container));\n }\n else {\n instance = new this.Type(...this.dependencies.map(containerGetKey, container), ...dynamicDependencies);\n }\n if (this.transformers == null) {\n return instance;\n }\n return this.transformers.reduce(transformInstance, instance);\n }\n registerTransformer(transformer) {\n (this.transformers || (this.transformers = [])).push(transformer);\n }\n}\nconst containerResolver = {\n $isResolver: true,\n resolve(handler, requestor) {\n return requestor;\n },\n};\nfunction isRegistry(obj) {\n return typeof obj.register === \"function\";\n}\nfunction isSelfRegistry(obj) {\n return isRegistry(obj) && typeof obj.registerInRequestor === \"boolean\";\n}\nfunction isRegisterInRequester(obj) {\n return isSelfRegistry(obj) && obj.registerInRequestor;\n}\nfunction isClass(obj) {\n return obj.prototype !== void 0;\n}\nconst InstrinsicTypeNames = new Set([\n \"Array\",\n \"ArrayBuffer\",\n \"Boolean\",\n \"DataView\",\n \"Date\",\n \"Error\",\n \"EvalError\",\n \"Float32Array\",\n \"Float64Array\",\n \"Function\",\n \"Int8Array\",\n \"Int16Array\",\n \"Int32Array\",\n \"Map\",\n \"Number\",\n \"Object\",\n \"Promise\",\n \"RangeError\",\n \"ReferenceError\",\n \"RegExp\",\n \"Set\",\n \"SharedArrayBuffer\",\n \"String\",\n \"SyntaxError\",\n \"TypeError\",\n \"Uint8Array\",\n \"Uint8ClampedArray\",\n \"Uint16Array\",\n \"Uint32Array\",\n \"URIError\",\n \"WeakMap\",\n \"WeakSet\",\n]);\nconst DILocateParentEventType = \"__DI_LOCATE_PARENT__\";\nconst factories = new Map();\n/**\n * @internal\n */\nexport class ContainerImpl {\n constructor(owner, config) {\n this.owner = owner;\n this.config = config;\n this._parent = void 0;\n this.registerDepth = 0;\n this.context = null;\n if (owner !== null) {\n owner.$$container$$ = this;\n }\n this.resolvers = new Map();\n this.resolvers.set(Container, containerResolver);\n if (owner instanceof Node) {\n owner.addEventListener(DILocateParentEventType, (e) => {\n if (e.composedPath()[0] !== this.owner) {\n e.detail.container = this;\n e.stopImmediatePropagation();\n }\n });\n }\n }\n get parent() {\n if (this._parent === void 0) {\n this._parent = this.config.parentLocator(this.owner);\n }\n return this._parent;\n }\n get depth() {\n return this.parent === null ? 0 : this.parent.depth + 1;\n }\n get responsibleForOwnerRequests() {\n return this.config.responsibleForOwnerRequests;\n }\n registerWithContext(context, ...params) {\n this.context = context;\n this.register(...params);\n this.context = null;\n return this;\n }\n register(...params) {\n if (++this.registerDepth === 100) {\n throw new Error(\"Unable to autoregister dependency\");\n // Most likely cause is trying to register a plain object that does not have a\n // register method and is not a class constructor\n }\n let current;\n let keys;\n let value;\n let j;\n let jj;\n const context = this.context;\n for (let i = 0, ii = params.length; i < ii; ++i) {\n current = params[i];\n if (!isObject(current)) {\n continue;\n }\n if (isRegistry(current)) {\n current.register(this, context);\n }\n else if (isClass(current)) {\n Registration.singleton(current, current).register(this);\n }\n else {\n keys = Object.keys(current);\n j = 0;\n jj = keys.length;\n for (; j < jj; ++j) {\n value = current[keys[j]];\n if (!isObject(value)) {\n continue;\n }\n // note: we could remove this if-branch and call this.register directly\n // - the extra check is just a perf tweak to create fewer unnecessary arrays by the spread operator\n if (isRegistry(value)) {\n value.register(this, context);\n }\n else {\n this.register(value);\n }\n }\n }\n }\n --this.registerDepth;\n return this;\n }\n registerResolver(key, resolver) {\n validateKey(key);\n const resolvers = this.resolvers;\n const result = resolvers.get(key);\n if (result == null) {\n resolvers.set(key, resolver);\n }\n else if (result instanceof ResolverImpl &&\n result.strategy === 4 /* array */) {\n result.state.push(resolver);\n }\n else {\n resolvers.set(key, new ResolverImpl(key, 4 /* array */, [result, resolver]));\n }\n return resolver;\n }\n registerTransformer(key, transformer) {\n const resolver = this.getResolver(key);\n if (resolver == null) {\n return false;\n }\n if (resolver.getFactory) {\n const factory = resolver.getFactory(this);\n if (factory == null) {\n return false;\n }\n // This type cast is a bit of a hacky one, necessary due to the duplicity of IResolverLike.\n // Problem is that that interface's type arg can be of type Key, but the getFactory method only works on\n // type Constructable. So the return type of that optional method has this additional constraint, which\n // seems to confuse the type checker.\n factory.registerTransformer(transformer);\n return true;\n }\n return false;\n }\n getResolver(key, autoRegister = true) {\n validateKey(key);\n if (key.resolve !== void 0) {\n return key;\n }\n /* eslint-disable-next-line @typescript-eslint/no-this-alias */\n let current = this;\n let resolver;\n while (current != null) {\n resolver = current.resolvers.get(key);\n if (resolver == null) {\n if (current.parent == null) {\n const handler = isRegisterInRequester(key)\n ? this\n : current;\n return autoRegister ? this.jitRegister(key, handler) : null;\n }\n current = current.parent;\n }\n else {\n return resolver;\n }\n }\n return null;\n }\n has(key, searchAncestors = false) {\n return this.resolvers.has(key)\n ? true\n : searchAncestors && this.parent != null\n ? this.parent.has(key, true)\n : false;\n }\n get(key) {\n validateKey(key);\n if (key.$isResolver) {\n return key.resolve(this, this);\n }\n /* eslint-disable-next-line @typescript-eslint/no-this-alias */\n let current = this;\n let resolver;\n while (current != null) {\n resolver = current.resolvers.get(key);\n if (resolver == null) {\n if (current.parent == null) {\n const handler = isRegisterInRequester(key)\n ? this\n : current;\n resolver = this.jitRegister(key, handler);\n return resolver.resolve(current, this);\n }\n current = current.parent;\n }\n else {\n return resolver.resolve(current, this);\n }\n }\n throw new Error(`Unable to resolve key: ${String(key)}`);\n }\n getAll(key, searchAncestors = false) {\n validateKey(key);\n /* eslint-disable-next-line @typescript-eslint/no-this-alias */\n const requestor = this;\n let current = requestor;\n let resolver;\n if (searchAncestors) {\n let resolutions = emptyArray;\n while (current != null) {\n resolver = current.resolvers.get(key);\n if (resolver != null) {\n resolutions = resolutions.concat(\n /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\n buildAllResponse(resolver, current, requestor));\n }\n current = current.parent;\n }\n return resolutions;\n }\n else {\n while (current != null) {\n resolver = current.resolvers.get(key);\n if (resolver == null) {\n current = current.parent;\n if (current == null) {\n return emptyArray;\n }\n }\n else {\n return buildAllResponse(resolver, current, requestor);\n }\n }\n }\n return emptyArray;\n }\n getFactory(Type) {\n let factory = factories.get(Type);\n if (factory === void 0) {\n if (isNativeFunction(Type)) {\n throw new Error(`${Type.name} is a native function and therefore cannot be safely constructed by DI. If this is intentional, please use a callback or cachedCallback resolver.`);\n }\n factories.set(Type, (factory = new FactoryImpl(Type, DI.getDependencies(Type))));\n }\n return factory;\n }\n registerFactory(key, factory) {\n factories.set(key, factory);\n }\n createChild(config) {\n return new ContainerImpl(null, Object.assign({}, this.config, config, { parentLocator: () => this }));\n }\n jitRegister(keyAsValue, handler) {\n if (typeof keyAsValue !== \"function\") {\n throw new Error(`Attempted to jitRegister something that is not a constructor: '${keyAsValue}'. Did you forget to register this dependency?`);\n }\n if (InstrinsicTypeNames.has(keyAsValue.name)) {\n throw new Error(`Attempted to jitRegister an intrinsic type: ${keyAsValue.name}. Did you forget to add @inject(Key)`);\n }\n if (isRegistry(keyAsValue)) {\n const registrationResolver = keyAsValue.register(handler);\n if (!(registrationResolver instanceof Object) ||\n registrationResolver.resolve == null) {\n const newResolver = handler.resolvers.get(keyAsValue);\n if (newResolver != void 0) {\n return newResolver;\n }\n throw new Error(\"A valid resolver was not returned from the static register method\");\n }\n return registrationResolver;\n }\n else if (keyAsValue.$isInterface) {\n throw new Error(`Attempted to jitRegister an interface: ${keyAsValue.friendlyName}`);\n }\n else {\n const resolver = this.config.defaultResolver(keyAsValue, handler);\n handler.resolvers.set(keyAsValue, resolver);\n return resolver;\n }\n }\n}\nconst cache = new WeakMap();\nfunction cacheCallbackResult(fun) {\n return function (handler, requestor, resolver) {\n if (cache.has(resolver)) {\n return cache.get(resolver);\n }\n const t = fun(handler, requestor, resolver);\n cache.set(resolver, t);\n return t;\n };\n}\n/**\n * You can use the resulting Registration of any of the factory methods\n * to register with the container.\n *\n * @example\n * ```\n * class Foo {}\n * const container = DI.createContainer();\n * container.register(Registration.instance(Foo, new Foo()));\n * container.get(Foo);\n * ```\n *\n * @public\n */\nexport const Registration = Object.freeze({\n /**\n * Allows you to pass an instance.\n * Every time you request this {@link Key} you will get this instance back.\n *\n * @example\n * ```\n * Registration.instance(Foo, new Foo()));\n * ```\n *\n * @param key - The key to register the instance under.\n * @param value - The instance to return when the key is requested.\n */\n instance(key, value) {\n return new ResolverImpl(key, 0 /* instance */, value);\n },\n /**\n * Creates an instance from the class.\n * Every time you request this {@link Key} you will get the same one back.\n *\n * @example\n * ```\n * Registration.singleton(Foo, Foo);\n * ```\n *\n * @param key - The key to register the singleton under.\n * @param value - The class to instantiate as a singleton when first requested.\n */\n singleton(key, value) {\n return new ResolverImpl(key, 1 /* singleton */, value);\n },\n /**\n * Creates an instance from a class.\n * Every time you request this {@link Key} you will get a new instance.\n *\n * @example\n * ```\n * Registration.instance(Foo, Foo);\n * ```\n *\n * @param key - The key to register the instance type under.\n * @param value - The class to instantiate each time the key is requested.\n */\n transient(key, value) {\n return new ResolverImpl(key, 2 /* transient */, value);\n },\n /**\n * Delegates to a callback function to provide the dependency.\n * Every time you request this {@link Key} the callback will be invoked to provide\n * the dependency.\n *\n * @example\n * ```\n * Registration.callback(Foo, () => new Foo());\n * Registration.callback(Bar, (c: Container) => new Bar(c.get(Foo)));\n * ```\n *\n * @param key - The key to register the callback for.\n * @param callback - The function that is expected to return the dependency.\n */\n callback(key, callback) {\n return new ResolverImpl(key, 3 /* callback */, callback);\n },\n /**\n * Delegates to a callback function to provide the dependency and then caches the\n * dependency for future requests.\n *\n * @example\n * ```\n * Registration.cachedCallback(Foo, () => new Foo());\n * Registration.cachedCallback(Bar, (c: Container) => new Bar(c.get(Foo)));\n * ```\n *\n * @param key - The key to register the callback for.\n * @param callback - The function that is expected to return the dependency.\n * @remarks\n * If you pass the same Registration to another container, the same cached value will be used.\n * Should all references to the resolver returned be removed, the cache will expire.\n */\n cachedCallback(key, callback) {\n return new ResolverImpl(key, 3 /* callback */, cacheCallbackResult(callback));\n },\n /**\n * Creates an alternate {@link Key} to retrieve an instance by.\n *\n * @example\n * ```\n * Register.singleton(Foo, Foo)\n * Register.aliasTo(Foo, MyFoos);\n *\n * container.getAll(MyFoos) // contains an instance of Foo\n * ```\n *\n * @param originalKey - The original key that has been registered.\n * @param aliasKey - The alias to the original key.\n */\n aliasTo(originalKey, aliasKey) {\n return new ResolverImpl(aliasKey, 5 /* alias */, originalKey);\n },\n});\n/** @internal */\nexport function validateKey(key) {\n if (key === null || key === void 0) {\n throw new Error(\"key/value cannot be null or undefined. Are you trying to inject/register something that doesn't exist with DI?\");\n }\n}\nfunction buildAllResponse(resolver, handler, requestor) {\n if (resolver instanceof ResolverImpl &&\n resolver.strategy === 4 /* array */) {\n const state = resolver.state;\n let i = state.length;\n const results = new Array(i);\n while (i--) {\n results[i] = state[i].resolve(handler, requestor);\n }\n return results;\n }\n return [resolver.resolve(handler, requestor)];\n}\nconst defaultFriendlyName = \"(anonymous)\";\nfunction isObject(value) {\n return (typeof value === \"object\" && value !== null) || typeof value === \"function\";\n}\n/**\n * Determine whether the value is a native function.\n *\n * @param fn - The function to check.\n * @returns `true` is the function is a native function, otherwise `false`\n */\nconst isNativeFunction = (function () {\n const lookup = new WeakMap();\n let isNative = false;\n let sourceText = \"\";\n let i = 0;\n return function (fn) {\n isNative = lookup.get(fn);\n if (isNative === void 0) {\n sourceText = fn.toString();\n i = sourceText.length;\n // http://www.ecma-international.org/ecma-262/#prod-NativeFunction\n isNative =\n // 29 is the length of 'function () { [native code] }' which is the smallest length of a native function string\n i >= 29 &&\n // 100 seems to be a safe upper bound of the max length of a native function. In Chrome and FF it's 56, in Edge it's 61.\n i <= 100 &&\n // This whole heuristic *could* be tricked by a comment. Do we need to care about that?\n sourceText.charCodeAt(i - 1) === 0x7d && // }\n // TODO: the spec is a little vague about the precise constraints, so we do need to test this across various browsers to make sure just one whitespace is a safe assumption.\n sourceText.charCodeAt(i - 2) <= 0x20 && // whitespace\n sourceText.charCodeAt(i - 3) === 0x5d && // ]\n sourceText.charCodeAt(i - 4) === 0x65 && // e\n sourceText.charCodeAt(i - 5) === 0x64 && // d\n sourceText.charCodeAt(i - 6) === 0x6f && // o\n sourceText.charCodeAt(i - 7) === 0x63 && // c\n sourceText.charCodeAt(i - 8) === 0x20 && //\n sourceText.charCodeAt(i - 9) === 0x65 && // e\n sourceText.charCodeAt(i - 10) === 0x76 && // v\n sourceText.charCodeAt(i - 11) === 0x69 && // i\n sourceText.charCodeAt(i - 12) === 0x74 && // t\n sourceText.charCodeAt(i - 13) === 0x61 && // a\n sourceText.charCodeAt(i - 14) === 0x6e && // n\n sourceText.charCodeAt(i - 15) === 0x58; // [\n lookup.set(fn, isNative);\n }\n return isNative;\n };\n})();\nconst isNumericLookup = {};\nfunction isArrayIndex(value) {\n switch (typeof value) {\n case \"number\":\n return value >= 0 && (value | 0) === value;\n case \"string\": {\n const result = isNumericLookup[value];\n if (result !== void 0) {\n return result;\n }\n const length = value.length;\n if (length === 0) {\n return (isNumericLookup[value] = false);\n }\n let ch = 0;\n for (let i = 0; i < length; ++i) {\n ch = value.charCodeAt(i);\n if ((i === 0 && ch === 0x30 && length > 1) /* must not start with 0 */ ||\n ch < 0x30 /* 0 */ ||\n ch > 0x39 /* 9 */) {\n return (isNumericLookup[value] = false);\n }\n }\n return (isNumericLookup[value] = true);\n }\n default:\n return false;\n }\n}\n","import { __decorate } from \"tslib\";\nimport { FASTElement, observable } from \"@microsoft/fast-element\";\nimport { ComponentPresentation, DefaultComponentPresentation, } from \"../design-system/component-presentation.js\";\n/**\n * Defines a foundation element class that:\n * 1. Connects the element to its ComponentPresentation\n * 2. Allows resolving the element template from the instance or ComponentPresentation\n * 3. Allows resolving the element styles from the instance or ComponentPresentation\n *\n * @public\n */\nexport class FoundationElement extends FASTElement {\n constructor() {\n super(...arguments);\n this._presentation = void 0;\n }\n /**\n * A property which resolves the ComponentPresentation instance\n * for the current component.\n * @public\n */\n get $presentation() {\n if (this._presentation === void 0) {\n this._presentation = ComponentPresentation.forTag(this.tagName, this);\n }\n return this._presentation;\n }\n templateChanged() {\n if (this.template !== undefined) {\n this.$fastController.template = this.template;\n }\n }\n stylesChanged() {\n if (this.styles !== undefined) {\n this.$fastController.styles = this.styles;\n }\n }\n /**\n * The connected callback for this FASTElement.\n * @remarks\n * This method is invoked by the platform whenever this FoundationElement\n * becomes connected to the document.\n * @public\n */\n connectedCallback() {\n if (this.$presentation !== null) {\n this.$presentation.applyTo(this);\n }\n super.connectedCallback();\n }\n /**\n * Defines an element registry function with a set of element definition defaults.\n * @param elementDefinition - The definition of the element to create the registry\n * function for.\n * @public\n */\n static compose(elementDefinition) {\n return (overrideDefinition = {}) => new FoundationElementRegistry(this === FoundationElement\n ? class extends FoundationElement {\n }\n : this, elementDefinition, overrideDefinition);\n }\n}\n__decorate([\n observable\n], FoundationElement.prototype, \"template\", void 0);\n__decorate([\n observable\n], FoundationElement.prototype, \"styles\", void 0);\nfunction resolveOption(option, context, definition) {\n if (typeof option === \"function\") {\n return option(context, definition);\n }\n return option;\n}\n/**\n * Registry capable of defining presentation properties for a DOM Container hierarchy.\n *\n * @internal\n */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nexport class FoundationElementRegistry {\n constructor(type, elementDefinition, overrideDefinition) {\n this.type = type;\n this.elementDefinition = elementDefinition;\n this.overrideDefinition = overrideDefinition;\n this.definition = Object.assign(Object.assign({}, this.elementDefinition), this.overrideDefinition);\n }\n register(container, context) {\n const definition = this.definition;\n const overrideDefinition = this.overrideDefinition;\n const prefix = definition.prefix || context.elementPrefix;\n const name = `${prefix}-${definition.baseName}`;\n context.tryDefineElement({\n name,\n type: this.type,\n baseClass: this.elementDefinition.baseClass,\n callback: x => {\n const presentation = new DefaultComponentPresentation(resolveOption(definition.template, x, definition), resolveOption(definition.styles, x, definition));\n x.definePresentation(presentation);\n let shadowOptions = resolveOption(definition.shadowOptions, x, definition);\n if (x.shadowRootMode) {\n // If the design system has overridden the shadow root mode, we need special handling.\n if (shadowOptions) {\n // If there are shadow options present in the definition, then\n // either the component itself has specified an option or the\n // registry function has overridden it.\n if (!overrideDefinition.shadowOptions) {\n // There were shadow options provided by the component and not overridden by\n // the registry.\n shadowOptions.mode = x.shadowRootMode;\n }\n }\n else if (shadowOptions !== null) {\n // If the component author did not provide shadow options,\n // and did not null them out (light dom opt-in) then they\n // were relying on the FASTElement default. So, if the\n // design system provides a mode, we need to create the options\n // to override the default.\n shadowOptions = { mode: x.shadowRootMode };\n }\n }\n x.defineElement({\n elementOptions: resolveOption(definition.elementOptions, x, definition),\n shadowOptions,\n attributes: resolveOption(definition.attributes, x, definition),\n });\n },\n });\n }\n}\n/* eslint-enable @typescript-eslint/no-unused-vars */\n","import { html, ref } from \"@microsoft/fast-element\";\n/**\n * A mixin class implementing start and end elements.\n * These are generally used to decorate text elements with icons or other visual indicators.\n * @public\n */\nexport class StartEnd {\n handleStartContentChange() {\n this.startContainer.classList.toggle(\"start\", this.start.assignedNodes().length > 0);\n }\n handleEndContentChange() {\n this.endContainer.classList.toggle(\"end\", this.end.assignedNodes().length > 0);\n }\n}\n/**\n * The template for the end element.\n * For use with {@link StartEnd}\n *\n * @public\n */\nexport const endSlotTemplate = (context, definition) => html `\n <span\n part=\"end\"\n ${ref(\"endContainer\")}\n class=${x => (definition.end ? \"end\" : void 0)}\n >\n <slot name=\"end\" ${ref(\"end\")} @slotchange=\"${x => x.handleEndContentChange()}\">\n ${definition.end || \"\"}\n </slot>\n </span>\n`;\n/**\n * The template for the start element.\n * For use with {@link StartEnd}\n *\n * @public\n */\nexport const startSlotTemplate = (context, definition) => html `\n <span\n part=\"start\"\n ${ref(\"startContainer\")}\n class=\"${x => (definition.start ? \"start\" : void 0)}\"\n >\n <slot\n name=\"start\"\n ${ref(\"start\")}\n @slotchange=\"${x => x.handleStartContentChange()}\"\n >\n ${definition.start || \"\"}\n </slot>\n </span>\n`;\n/**\n * The template for the end element.\n * For use with {@link StartEnd}\n *\n * @public\n * @deprecated - use endSlotTemplate\n */\nexport const endTemplate = html `\n <span part=\"end\" ${ref(\"endContainer\")}>\n <slot\n name=\"end\"\n ${ref(\"end\")}\n @slotchange=\"${x => x.handleEndContentChange()}\"\n ></slot>\n </span>\n`;\n/**\n * The template for the start element.\n * For use with {@link StartEnd}\n *\n * @public\n * @deprecated - use startSlotTemplate\n */\nexport const startTemplate = html `\n <span part=\"start\" ${ref(\"startContainer\")}>\n <slot\n name=\"start\"\n ${ref(\"start\")}\n @slotchange=\"${x => x.handleStartContentChange()}\"\n ></slot>\n </span>\n`;\n","import { AttributeConfiguration } from \"@microsoft/fast-element\";\n/**\n * Apply mixins to a constructor.\n * Sourced from {@link https://www.typescriptlang.org/docs/handbook/mixins.html | TypeScript Documentation }.\n * @public\n */\nexport function applyMixins(derivedCtor, ...baseCtors) {\n const derivedAttributes = AttributeConfiguration.locate(derivedCtor);\n baseCtors.forEach(baseCtor => {\n Object.getOwnPropertyNames(baseCtor.prototype).forEach(name => {\n if (name !== \"constructor\") {\n Object.defineProperty(derivedCtor.prototype, name, \n /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\n Object.getOwnPropertyDescriptor(baseCtor.prototype, name));\n }\n });\n const baseAttributes = AttributeConfiguration.locate(baseCtor);\n baseAttributes.forEach(x => derivedAttributes.push(x));\n });\n}\n","/**\n * Retrieves the \"composed parent\" element of a node, ignoring DOM tree boundaries.\n * When the parent of a node is a shadow-root, it will return the host\n * element of the shadow root. Otherwise it will return the parent node or null if\n * no parent node exists.\n * @param element - The element for which to retrieve the composed parent\n *\n * @public\n */\nexport function composedParent(element) {\n const parentNode = element.parentElement;\n if (parentNode) {\n return parentNode;\n }\n else {\n const rootNode = element.getRootNode();\n if (rootNode.host instanceof HTMLElement) {\n // this is shadow-root\n return rootNode.host;\n }\n }\n return null;\n}\n","/**\n * An abstract behavior to react to media queries. Implementations should implement\n * the `constructListener` method to perform some action based on media query changes.\n *\n * @public\n */\nexport class MatchMediaBehavior {\n /**\n *\n * @param query - The media query to operate from.\n */\n constructor(query) {\n /**\n * The behavior needs to operate on element instances but elements might share a behavior instance.\n * To ensure proper attachment / detachment per instance, we construct a listener for\n * each bind invocation and cache the listeners by element reference.\n */\n this.listenerCache = new WeakMap();\n this.query = query;\n }\n /**\n * Binds the behavior to the element.\n * @param source - The element for which the behavior is bound.\n */\n bind(source) {\n const { query } = this;\n const listener = this.constructListener(source);\n // Invoke immediately to add if the query currently matches\n listener.bind(query)();\n query.addListener(listener);\n this.listenerCache.set(source, listener);\n }\n /**\n * Unbinds the behavior from the element.\n * @param source - The element for which the behavior is unbinding.\n */\n unbind(source) {\n const listener = this.listenerCache.get(source);\n if (listener) {\n this.query.removeListener(listener);\n this.listenerCache.delete(source);\n }\n }\n}\n/**\n * A behavior to add or remove a stylesheet from an element based on a media query. The behavior ensures that\n * styles are applied while the a query matches the environment and that styles are not applied if the query does\n * not match the environment.\n *\n * @public\n */\nexport class MatchMediaStyleSheetBehavior extends MatchMediaBehavior {\n /**\n * Constructs a {@link MatchMediaStyleSheetBehavior} instance.\n * @param query - The media query to operate from.\n * @param styles - The styles to coordinate with the query.\n */\n constructor(query, styles) {\n super(query);\n this.styles = styles;\n }\n /**\n * Defines a function to construct {@link MatchMediaStyleSheetBehavior | MatchMediaStyleSheetBehaviors} for\n * a provided query.\n * @param query - The media query to operate from.\n *\n * @public\n * @example\n *\n * ```ts\n * import { css } from \"@microsoft/fast-element\";\n * import { MatchMediaStyleSheetBehavior } from \"@microsoft/fast-foundation\";\n *\n * const landscapeBehavior = MatchMediaStyleSheetBehavior.with(\n * window.matchMedia(\"(orientation: landscape)\")\n * );\n * const styles = css`\n * :host {\n * width: 200px;\n * height: 400px;\n * }\n * `\n * .withBehaviors(landscapeBehavior(css`\n * :host {\n * width: 400px;\n * height: 200px;\n * }\n * `))\n * ```\n */\n static with(query) {\n return (styles) => {\n return new MatchMediaStyleSheetBehavior(query, styles);\n };\n }\n /**\n * Constructs a match-media listener for a provided element.\n * @param source - the element for which to attach or detach styles.\n * @internal\n */\n constructListener(source) {\n let attached = false;\n const styles = this.styles;\n return function listener() {\n const { matches } = this;\n if (matches && !attached) {\n source.$fastController.addStyles(styles);\n attached = matches;\n }\n else if (!matches && attached) {\n source.$fastController.removeStyles(styles);\n attached = matches;\n }\n };\n }\n /**\n * Unbinds the behavior from the element.\n * @param source - The element for which the behavior is unbinding.\n * @internal\n */\n unbind(source) {\n super.unbind(source);\n source.$fastController.removeStyles(this.styles);\n }\n}\n/**\n * This can be used to construct a behavior to apply a forced-colors only stylesheet.\n * @public\n */\nexport const forcedColorsStylesheetBehavior = MatchMediaStyleSheetBehavior.with(window.matchMedia(\"(forced-colors)\"));\n/**\n * This can be used to construct a behavior to apply a prefers color scheme: dark only stylesheet.\n * @public\n */\nexport const darkModeStylesheetBehavior = MatchMediaStyleSheetBehavior.with(window.matchMedia(\"(prefers-color-scheme: dark)\"));\n/**\n * This can be used to construct a behavior to apply a prefers color scheme: light only stylesheet.\n * @public\n */\nexport const lightModeStylesheetBehavior = MatchMediaStyleSheetBehavior.with(window.matchMedia(\"(prefers-color-scheme: light)\"));\n","/**\n * The CSS value for disabled cursors.\n * @public\n */\nexport const disabledCursor = \"not-allowed\";\n","/**\n * A CSS fragment to set `display: none;` when the host is hidden using the [hidden] attribute.\n * @public\n */\nexport const hidden = `:host([hidden]){display:none}`;\n/**\n * Applies a CSS display property.\n * Also adds CSS rules to not display the element when the [hidden] attribute is applied to the element.\n * @param display - The CSS display property value\n * @public\n */\nexport function display(displayValue) {\n return `${hidden}:host{display:${displayValue}}`;\n}\n","import { canUseFocusVisible } from \"@microsoft/fast-web-utilities\";\n/**\n * The string representing the focus selector to be used. Value\n * will be \"focus-visible\" when https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo\n * is supported and \"focus\" when it is not.\n *\n * @public\n */\nexport const focusVisible = canUseFocusVisible() ? \"focus-visible\" : \"focus\";\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","/**\n * Checks if the DOM is available to access and use\n */\nexport function canUseDOM() {\n return !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\n}\n","import { canUseDOM } from \"exenv-es6\";\n/**\n * A test that ensures that all arguments are HTML Elements\n */\nexport function isHTMLElement(...args) {\n return args.every((arg) => arg instanceof HTMLElement);\n}\n/**\n * Returns all displayed elements inside of a root node that match a provided selector\n */\nexport function getDisplayedNodes(rootNode, selector) {\n if (!rootNode || !selector || !isHTMLElement(rootNode)) {\n return;\n }\n const nodes = Array.from(rootNode.querySelectorAll(selector));\n // offsetParent will be null if the element isn't currently displayed,\n // so this will allow us to operate only on visible nodes\n return nodes.filter((node) => node.offsetParent !== null);\n}\n/**\n * Gets the numeric key code associated with a keyboard event. This method is for use with DOM level 3 events\n * that still use the deprecated keyCode property.\n */\nexport function getKeyCode(event) {\n return event === null ? null : event.which || event.keyCode || event.charCode;\n}\n/**\n * Returns the nonce used in the page, if any.\n *\n * Based on https://github.com/cssinjs/jss/blob/master/packages/jss/src/DomRenderer.js\n */\nfunction getNonce() {\n const node = document.querySelector('meta[property=\"csp-nonce\"]');\n if (node) {\n return node.getAttribute(\"content\");\n }\n else {\n return null;\n }\n}\n/**\n * Test if the document supports :focus-visible\n */\nlet _canUseFocusVisible;\nexport function canUseFocusVisible() {\n if (typeof _canUseFocusVisible === \"boolean\") {\n return _canUseFocusVisible;\n }\n if (!canUseDOM()) {\n _canUseFocusVisible = false;\n return _canUseFocusVisible;\n }\n // Check to see if the document supports the focus-visible element\n const styleElement = document.createElement(\"style\");\n // If nonces are present on the page, use it when creating the style element\n // to test focus-visible support.\n const styleNonce = getNonce();\n if (styleNonce !== null) {\n styleElement.setAttribute(\"nonce\", styleNonce);\n }\n document.head.appendChild(styleElement);\n try {\n styleElement.sheet.insertRule(\"foo:focus-visible {color:inherit}\", 0);\n _canUseFocusVisible = true;\n }\n catch (e) {\n _canUseFocusVisible = false;\n }\n finally {\n document.head.removeChild(styleElement);\n }\n return _canUseFocusVisible;\n}\nlet _canUseCssGrid;\nexport function canUseCssGrid() {\n if (typeof _canUseCssGrid === \"boolean\") {\n return _canUseCssGrid;\n }\n try {\n _canUseCssGrid = CSS.supports(\"display\", \"grid\");\n }\n catch (_a) {\n _canUseCssGrid = false;\n }\n return _canUseCssGrid;\n}\nexport function canUseForcedColors() {\n return (canUseDOM() &&\n (window.matchMedia(\"(forced-colors: none)\").matches ||\n window.matchMedia(\"(forced-colors: active)\").matches));\n}\nexport function resetDocumentCache() {\n _canUseCssGrid = undefined;\n _canUseFocusVisible = undefined;\n}\n/**\n * @deprecated Use 'canUseForcedColors' instead\n */\nexport const canUsedForcedColors = canUseForcedColors;\n","/**\n * Key Code values\n * @deprecated - KeyCodes are deprecated, use individual string key exports\n */\nexport var KeyCodes;\n(function (KeyCodes) {\n KeyCodes[KeyCodes[\"alt\"] = 18] = \"alt\";\n KeyCodes[KeyCodes[\"arrowDown\"] = 40] = \"arrowDown\";\n KeyCodes[KeyCodes[\"arrowLeft\"] = 37] = \"arrowLeft\";\n KeyCodes[KeyCodes[\"arrowRight\"] = 39] = \"arrowRight\";\n KeyCodes[KeyCodes[\"arrowUp\"] = 38] = \"arrowUp\";\n KeyCodes[KeyCodes[\"back\"] = 8] = \"back\";\n KeyCodes[KeyCodes[\"backSlash\"] = 220] = \"backSlash\";\n KeyCodes[KeyCodes[\"break\"] = 19] = \"break\";\n KeyCodes[KeyCodes[\"capsLock\"] = 20] = \"capsLock\";\n KeyCodes[KeyCodes[\"closeBracket\"] = 221] = \"closeBracket\";\n KeyCodes[KeyCodes[\"colon\"] = 186] = \"colon\";\n KeyCodes[KeyCodes[\"colon2\"] = 59] = \"colon2\";\n KeyCodes[KeyCodes[\"comma\"] = 188] = \"comma\";\n KeyCodes[KeyCodes[\"ctrl\"] = 17] = \"ctrl\";\n KeyCodes[KeyCodes[\"delete\"] = 46] = \"delete\";\n KeyCodes[KeyCodes[\"end\"] = 35] = \"end\";\n KeyCodes[KeyCodes[\"enter\"] = 13] = \"enter\";\n KeyCodes[KeyCodes[\"equals\"] = 187] = \"equals\";\n KeyCodes[KeyCodes[\"equals2\"] = 61] = \"equals2\";\n KeyCodes[KeyCodes[\"equals3\"] = 107] = \"equals3\";\n KeyCodes[KeyCodes[\"escape\"] = 27] = \"escape\";\n KeyCodes[KeyCodes[\"forwardSlash\"] = 191] = \"forwardSlash\";\n KeyCodes[KeyCodes[\"function1\"] = 112] = \"function1\";\n KeyCodes[KeyCodes[\"function10\"] = 121] = \"function10\";\n KeyCodes[KeyCodes[\"function11\"] = 122] = \"function11\";\n KeyCodes[KeyCodes[\"function12\"] = 123] = \"function12\";\n KeyCodes[KeyCodes[\"function2\"] = 113] = \"function2\";\n KeyCodes[KeyCodes[\"function3\"] = 114] = \"function3\";\n KeyCodes[KeyCodes[\"function4\"] = 115] = \"function4\";\n KeyCodes[KeyCodes[\"function5\"] = 116] = \"function5\";\n KeyCodes[KeyCodes[\"function6\"] = 117] = \"function6\";\n KeyCodes[KeyCodes[\"function7\"] = 118] = \"function7\";\n KeyCodes[KeyCodes[\"function8\"] = 119] = \"function8\";\n KeyCodes[KeyCodes[\"function9\"] = 120] = \"function9\";\n KeyCodes[KeyCodes[\"home\"] = 36] = \"home\";\n KeyCodes[KeyCodes[\"insert\"] = 45] = \"insert\";\n KeyCodes[KeyCodes[\"menu\"] = 93] = \"menu\";\n KeyCodes[KeyCodes[\"minus\"] = 189] = \"minus\";\n KeyCodes[KeyCodes[\"minus2\"] = 109] = \"minus2\";\n KeyCodes[KeyCodes[\"numLock\"] = 144] = \"numLock\";\n KeyCodes[KeyCodes[\"numPad0\"] = 96] = \"numPad0\";\n KeyCodes[KeyCodes[\"numPad1\"] = 97] = \"numPad1\";\n KeyCodes[KeyCodes[\"numPad2\"] = 98] = \"numPad2\";\n KeyCodes[KeyCodes[\"numPad3\"] = 99] = \"numPad3\";\n KeyCodes[KeyCodes[\"numPad4\"] = 100] = \"numPad4\";\n KeyCodes[KeyCodes[\"numPad5\"] = 101] = \"numPad5\";\n KeyCodes[KeyCodes[\"numPad6\"] = 102] = \"numPad6\";\n KeyCodes[KeyCodes[\"numPad7\"] = 103] = \"numPad7\";\n KeyCodes[KeyCodes[\"numPad8\"] = 104] = \"numPad8\";\n KeyCodes[KeyCodes[\"numPad9\"] = 105] = \"numPad9\";\n KeyCodes[KeyCodes[\"numPadDivide\"] = 111] = \"numPadDivide\";\n KeyCodes[KeyCodes[\"numPadDot\"] = 110] = \"numPadDot\";\n KeyCodes[KeyCodes[\"numPadMinus\"] = 109] = \"numPadMinus\";\n KeyCodes[KeyCodes[\"numPadMultiply\"] = 106] = \"numPadMultiply\";\n KeyCodes[KeyCodes[\"numPadPlus\"] = 107] = \"numPadPlus\";\n KeyCodes[KeyCodes[\"openBracket\"] = 219] = \"openBracket\";\n KeyCodes[KeyCodes[\"pageDown\"] = 34] = \"pageDown\";\n KeyCodes[KeyCodes[\"pageUp\"] = 33] = \"pageUp\";\n KeyCodes[KeyCodes[\"period\"] = 190] = \"period\";\n KeyCodes[KeyCodes[\"print\"] = 44] = \"print\";\n KeyCodes[KeyCodes[\"quote\"] = 222] = \"quote\";\n KeyCodes[KeyCodes[\"scrollLock\"] = 145] = \"scrollLock\";\n KeyCodes[KeyCodes[\"shift\"] = 16] = \"shift\";\n KeyCodes[KeyCodes[\"space\"] = 32] = \"space\";\n KeyCodes[KeyCodes[\"tab\"] = 9] = \"tab\";\n KeyCodes[KeyCodes[\"tilde\"] = 192] = \"tilde\";\n KeyCodes[KeyCodes[\"windowsLeft\"] = 91] = \"windowsLeft\";\n KeyCodes[KeyCodes[\"windowsOpera\"] = 219] = \"windowsOpera\";\n KeyCodes[KeyCodes[\"windowsRight\"] = 92] = \"windowsRight\";\n})(KeyCodes || (KeyCodes = {}));\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeAlt = 18;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeArrowDown = 40;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeArrowLeft = 37;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeArrowRight = 39;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeArrowUp = 38;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeBack = 8;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeBackSlash = 220;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeBreak = 19;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeCapsLock = 20;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeCloseBracket = 221;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeColon = 186;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeColon2 = 59; // Opera and Firefox\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeComma = 188;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeCtrl = 17;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeDelete = 46;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeEnd = 35;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeEnter = 13;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeEquals = 187;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeEquals2 = 61; // Opera\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeEquals3 = 107; // Firefox\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeEscape = 27;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeForwardSlash = 191;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeFunction1 = 112;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeFunction10 = 121;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeFunction11 = 122;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeFunction12 = 123;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeFunction2 = 113;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeFunction3 = 114;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeFunction4 = 115;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeFunction5 = 116;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeFunction6 = 117;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeFunction7 = 118;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeFunction8 = 119;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeFunction9 = 120;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeHome = 36;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeInsert = 45;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeMenu = 93;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeMinus = 189;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeMinus2 = 109; // Opera and Firefox\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeNumLock = 144;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeNumPad0 = 96;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeNumPad1 = 97;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeNumPad2 = 98;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeNumPad3 = 99;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeNumPad4 = 100;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeNumPad5 = 101;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeNumPad6 = 102;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeNumPad7 = 103;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeNumPad8 = 104;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeNumPad9 = 105;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeNumPadDivide = 111;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeNumPadDot = 110;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeNumPadMinus = 109;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeNumPadMultiply = 106;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeNumPadPlus = 107;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeOpenBracket = 219;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodePageDown = 34;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodePageUp = 33;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodePeriod = 190;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodePrint = 44;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeQuote = 222;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeScrollLock = 145;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeShift = 16;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeSpace = 32;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeTab = 9;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeTilde = 192;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeWindowsLeft = 91;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeWindowsOpera = 219; // Opera\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeWindowsRight = 92;\n/**\n * String values for use with KeyboardEvent.key\n */\nexport const keyArrowDown = \"ArrowDown\";\nexport const keyArrowLeft = \"ArrowLeft\";\nexport const keyArrowRight = \"ArrowRight\";\nexport const keyArrowUp = \"ArrowUp\";\nexport const keyEnter = \"Enter\";\nexport const keyEscape = \"Escape\";\nexport const keyHome = \"Home\";\nexport const keyEnd = \"End\";\nexport const keyFunction2 = \"F2\";\nexport const keyPageDown = \"PageDown\";\nexport const keyPageUp = \"PageUp\";\nexport const keySpace = \" \";\nexport const keyTab = \"Tab\";\nexport const keyBackspace = \"Backspace\";\nexport const keyDelete = \"Delete\";\nexport const ArrowKeys = {\n ArrowDown: keyArrowDown,\n ArrowLeft: keyArrowLeft,\n ArrowRight: keyArrowRight,\n ArrowUp: keyArrowUp,\n};\n","/**\n * Expose ltr and rtl strings\n */\nexport var Direction;\n(function (Direction) {\n Direction[\"ltr\"] = \"ltr\";\n Direction[\"rtl\"] = \"rtl\";\n})(Direction || (Direction = {}));\n","/**\n * Define system colors for use in CSS stylesheets.\n *\n * https://drafts.csswg.org/css-color/#css-system-colors\n */\nexport var SystemColors;\n(function (SystemColors) {\n SystemColors[\"Canvas\"] = \"Canvas\";\n SystemColors[\"CanvasText\"] = \"CanvasText\";\n SystemColors[\"LinkText\"] = \"LinkText\";\n SystemColors[\"VisitedText\"] = \"VisitedText\";\n SystemColors[\"ActiveText\"] = \"ActiveText\";\n SystemColors[\"ButtonFace\"] = \"ButtonFace\";\n SystemColors[\"ButtonText\"] = \"ButtonText\";\n SystemColors[\"Field\"] = \"Field\";\n SystemColors[\"FieldText\"] = \"FieldText\";\n SystemColors[\"Highlight\"] = \"Highlight\";\n SystemColors[\"HighlightText\"] = \"HighlightText\";\n SystemColors[\"GrayText\"] = \"GrayText\";\n})(SystemColors || (SystemColors = {}));\n"],"names":[],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"8635.4c8189485e3c65e7ecc0.js?v=4c8189485e3c65e7ecc0","mappings":";;;;;;;;;;;;AAAmD;;AAE5C;AACP,EAAE,gDAAS;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,GAAG;AACH;;AAEO;AACP,EAAE,sDAAe;AACjB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;ACjC6E;AAChB;AAC7D;AACO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA,4BAA4B,wEAAW;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+EAAQ;AAChC;AACA,iCAAiC,wFAAsB;AACvD;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrDyC;AAClC;AACP,WAAW,0DAAS;AACpB;AACA;AACA,mDAAmD,oDAAoD;AACvG;AACA;AACA;AACO;AACP;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACPoG;AAC1D;AACA;AACA;AACO;AACL;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,gBAAgB,qCAAQ;AACxB;AACA;AACA;AACA;AACA,WAAW,qCAAQ,KAAK,yBAAQ;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,eAAe,gCAAW;AAC1B;AACA;AACA;AACA;AACO;AACP;AACA,eAAe,gCAAK;AACpB;AACA,WAAW,gCAAK;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,eAAe,gCAAW;AAC1B;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,wCAAwC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7Q4I;AAClG;AACA;AACA;AACA;AACO;AACP;AACsB;AAChE;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gCAAW,CAAC,+BAAI,6BAA6B,+BAAI,6BAA6B,+BAAI,6BAA6B,+BAAI;AAClI;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAQ,CAAC,8CAAmB,6BAA6B,+BAAI,6BAA6B,+BAAI;AAC7G;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAQ,CAAC,8CAAmB,6BAA6B,+BAAI,6BAA6B,+BAAI;AAC7G;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAQ,CAAC,+BAAI,6BAA6B,+BAAI,6BAA6B,+BAAI;AAC9F;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAQ,CAAC,+BAAI,6BAA6B,+BAAI,6BAA6B,+BAAI;AAC9F;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAQ,CAAC,+BAAI,6BAA6B,+BAAI,6BAA6B,8CAAmB;AAC7G;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0DAA0D;AAC3D;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,qCAAQ,0BAA0B,qCAAQ,QAAQ,qCAAQ;AAC7E;AACA,mBAAmB,qCAAQ,0BAA0B,qCAAQ,QAAQ,qCAAQ;AAC7E;AACA,mBAAmB,qCAAQ,0BAA0B,qCAAQ,QAAQ,qCAAQ;AAC7E;AACA,mBAAmB,qCAAQ,0BAA0B,qCAAQ,QAAQ,qCAAQ;AAC7E;AACA,mBAAmB,qCAAQ,0BAA0B,qCAAQ,QAAQ,qCAAQ;AAC7E;AACA;AACA;AACA;;;ACpIsD;AACuC;AAC7F;AACA;AACA;AACA;AACO,MAAM,sBAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mBAAmB;AAC3C;AACA;AACA,6BAA6B;AAC7B;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,sBAAU;AAC7B;AACA,2CAA2C,uBAAuB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,qDAAqD,uBAAuB;AAC5E;AACA;AACA;AACA;AACA,uBAAuB,sBAAU;AACjC,kBAAkB,kEAAkE;AACpF;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,sBAAU;AACjC,kBAAkB,wDAAwD;AAC1E,kBAAkB,wDAAwD;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,wBAAwB,2BAA2B;AACnD;AACA;AACA;AACA;AACA;AACA,mBAAmB,sBAAU;AAC7B;AACA,8EAA8E,uBAAuB;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,0CAAa;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,0CAAa;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;AACA,mBAAmB,sBAAU;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;;;;AC/KkF;AACjC;AAC4C;AAC5C;AACH;AACM;AACpD;AACA;AACA;AACA;AACO;AACP;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,qCAAQ;AACrC,8BAA8B,sBAAU;AACxC,cAAc,iDAAiD;AAC/D,cAAc,6CAA6C;AAC3D,cAAc,gDAAgD;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,cAAc;AAC1C,2BAA2B,cAAc;AACzC;AACA;AACA,6BAA6B,aAAa;AAC1C,4BAA4B,uBAAuB;AACnD;AACA;AACA,6BAA6B,aAAa;AAC1C,2BAA2B,uBAAuB;AAClD;AACA;AACA,4BAA4B,YAAY;AACxC,4BAA4B,uBAAuB;AACnD;AACA;AACA,4BAA4B,YAAY;AACxC,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA,2BAA2B,sBAAU;AACrC,sBAAsB,2CAA2C;AACjE,sBAAsB,0CAA0C;AAChE;AACA;AACA;AACA,2BAA2B,sBAAU;AACrC,sBAAsB,2CAA2C;AACjE,sBAAsB,2CAA2C;AACjE;AACA;AACA,uBAAuB,sBAAU;AACjC,kBAAkB,2CAA2C;AAC7D;AACA;AACA;AACA,iBAAiB;AACjB,kBAAkB,0CAA0C;AAC5D;AACA;AACA,mBAAmB,sBAAU;AAC7B,cAAc,2CAA2C;AACzD,cAAc,6CAA6C;AAC3D,cAAc,0CAA0C;AACxD;AACA;AACA;AACA;AACA,eAAe,2CAAgB;AAC/B;AACA,uBAAuB,uBAAuB;AAC9C,yBAAyB,gCAAW;AACpC,wBAAwB,gCAAW;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAAgB;AAC/B;AACA,uBAAuB,uBAAuB;AAC9C,yBAAyB,gCAAW;AACpC,wBAAwB,gCAAW;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,qEAAqE,sBAAsB,oBAAoB;AAC/G;AACA,0DAA0D,kBAAkB,yFAAyF;AACrK;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,kBAAkB;AAC1C;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,kBAAkB;AAC1C,yBAAyB;AACzB;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,aAAa;AACb;;;AC5RiD;AACC;AAC+B;AACnC;AACJ;AACyB;AACf;AACpD;AACA;AACA;AACA;AACO;AACP;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gCAAW;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,YAAY,+BAA+B,EAAE,YAAY,4BAA4B,kGAAkG;AAC7M;AACA;AACA;AACA,8BAA8B,iDAAoB;AAClD,8BAA8B,qCAAQ;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,qCAAQ;AACrC,8BAA8B,qCAAQ,CAAC,yBAAQ;AAC/C;AACA;AACA;AACA,SAAS;AACT,iCAAiC,qCAAQ,CAAC,yBAAQ;AAClD;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,uBAAuB,gCAAW;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gCAAW;AAClC;AACA,0BAA0B,sBAAU;AACpC;AACA;AACA,wBAAwB,WAAW;AACnC,sDAAsD,uBAAuB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,sCAAsC,iDAAoB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAAgB;AAC/B;AACA;;;;;AChHA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACfsC;AACtC;AACA;AACA;AACO;AACP,WAAW,yBAAM;AACjB;;;;;ACN0G;AACrD;AACO;AACY;AACX;AAC7D;AACA;AACA;AACA,+BAA+B,uBAAS;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,6BAAW;AACtB;AACA,8BAA8B,uBAAS;AACvC;AACA;AACO;AACP;AACA;AACA,CAAC;AACD;AACA,MAAM,eAAe;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA,qCAAqC,sCAAQ;AAC7C;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA;AACA,QAAQ;AACR;AACA;AACA,sDAAsD,gCAAK;AAC3D;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,0BAA0B;AACtF;AACA,uBAAuB,gCAAW;AAClC,SAAS;AACT;AACA,uBAAuB,2CAAgB;AACvC,mBAAmB,uBAAS;AAC5B,SAAS;AACT;AACA;;;ACvGA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACnByE;AACzE;AACA;AACA;AACO;AACP;AACA;AACA,sBAAsB,iBAAiB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AClC0D;AACjB;AACzC;AACA;AACA;AACO,cAAc,uBAAS;AAC9B;AACA;AACA;AACO,cAAc,uBAAS;AAC9B;AACA;AACA;AACA;AACO,mBAAmB,uBAAS,MAAM,2CAAgB;AACzD;AACA;AACA;AACA;AACO,mBAAmB,uBAAS,MAAM,2CAAgB;AACzD;AACA;AACA;AACA;AACO,kBAAkB,uBAAS,MAAM,2CAAgB;;;ACxBO;AAC/D;AACA;AACA;AACO;AACP,8BAA8B,KAAK,sBAAsB,KAAK,GAAG,KAAK;AACtE;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACpByE;AACzE;AACA;AACA;AACO;AACP,sBAAsB,iBAAiB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACbA;AACA;AACA;AACO;AACP;AACA;AACA;;;ACNA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACbyE;AACzE;AACA;AACA;AACO;AACP,sBAAsB,iBAAiB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC3ByE;AACzE;AACO;AACP;AACA;AACA;AACO;AACP,2FAA2F,iBAAiB;AAC5G;;;ACRA;AACA;AACA;AACO;AACP;AACA;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;;;;;ACTgF;AAChF;AACA;AACA;AACO;AACP,8CAA8C,wDAAwB;AACtE;AACA;;;ACPgF;AAChF;AACA;AACA;AACO;AACP,6CAA6C,wDAAwB;AACrE;AACA;AACA;;;ACRgF;AACzE;AACP,8CAA8C,wDAAwB;AACtE;;;ACHgF;AAChF;AACA;AACA;AACO;AACP,2CAA2C,wDAAwB;AACnE;AACA;AACA;AACA;AACO;AACP;AACA;;;ACZ0D;AAC1D;AACA;AACA;AACO;AACP,uBAAuB,kBAAkB;AACzC;;;ACN0D;AAC1D;AACA;AACA;AACO;AACP,uBAAuB,kBAAkB;AACzC;AACA;;;ACPyE;AACzE;AACA;AACA;AACO;AACP;AACA,sBAAsB,iBAAiB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACjByE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,2DAA2D,iBAAiB;AAC5E;;;ACXiD;AAC1C;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,sBAAsB,yBAAM;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACnD+D;AAC/D;AACA;AACA;AACO;AACP,8BAA8B,KAAK,sBAAsB,KAAK,GAAG,KAAK;AACtE;;;ACNA;AACA;AACA;AACyD;AACC;AACV;AACmC;AACkB;AACO;AACtB;AACgB;AACA;AACM;AACG;AACgC;AACvC;AACa;AACa;AAChB;AACrB;AACA;AACA;AACA;AACD;AACsB;AACpC;AACW;AACI;AACT;AACpF,QAAQ,MAAM,yBAAG,EAAE,wBAAW;AAC9B;AACA,WAAW,wBAAW,UAAU,mCAAmC;AACnE;AACA;AACA;AACO,iBAAiB,oBAAM;AAC9B;AACO,6BAA6B,oBAAM;AAC1C;AACO,wCAAwC,oBAAM;AACrD;AACO,2BAA2B,oBAAM,qCAAqC,6CAAiB;AAC9F;AACO,4BAA4B,oBAAM;AACzC;AACO,gBAAgB,oBAAM;AAC7B;AACO,mBAAmB,oBAAM;AAChC;AACA;AACA;AACA;AACA;AACO,qBAAqB,oBAAM;AAClC;AACO,kBAAkB,oBAAM,0BAA0B,6BAAS;AAClE;AACO,wBAAwB,oBAAM;AACrC;AACO,oBAAoB,oBAAM;AACjC;AACO,yBAAyB,oBAAM;AACtC;AACA;AACO,6BAA6B,oBAAM;AAC1C;AACO,+BAA+B,oBAAM;AAC5C;AACO,+BAA+B,oBAAM;AAC5C;AACO,iCAAiC,oBAAM;AAC9C;AACO,+BAA+B,oBAAM;AAC5C;AACO,iCAAiC,oBAAM;AAC9C;AACO,8BAA8B,oBAAM;AAC3C;AACO,gCAAgC,oBAAM;AAC7C;AACO,8BAA8B,oBAAM;AAC3C;AACO,gCAAgC,oBAAM;AAC7C;AACO,8BAA8B,oBAAM;AAC3C;AACO,gCAAgC,oBAAM;AAC7C;AACO,8BAA8B,oBAAM;AAC3C;AACO,gCAAgC,oBAAM;AAC7C;AACO,8BAA8B,oBAAM;AAC3C;AACO,gCAAgC,oBAAM;AAC7C;AACO,8BAA8B,oBAAM;AAC3C;AACO,gCAAgC,oBAAM;AAC7C;AACA;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACO;AACP;AACA;AACO,qBAAqB,oBAAM,8BAA8B,UAAU;AAC1E;AACO,gFAAgF,UAAU;AACjG;AACO,oBAAoB,oBAAM,6BAA6B,UAAU;AACxE;AACO,8EAA8E,UAAU;AAC/F;AACA;AACO;AACP,2BAA2B,yBAAkC;AAC7D,CAAC;AACD;AACO,MAAM,uCAAyB,GAAG,oBAAM;AAC/C;AACA;AACO;AACP,2BAA2B,oBAA6B;AACxD,CAAC;AACD;AACO,MAAM,kCAAoB,GAAG,oBAAM;AAC1C;AACA;AACO;AACP,2BAA2B,aAAsB;AACjD,CAAC;AACD;AACO,MAAM,2BAAa,GAAG,oBAAM;AACnC;AACA;AACO;AACP,2BAA2B,aAAsB;AACjD,CAAC;AACD;AACO,MAAM,2BAAa,GAAG,oBAAM;AACnC;AACA;AACO;AACP,2BAA2B,aAAsB;AACjD,CAAC;AACD;AACO,MAAM,2BAAa,GAAG,oBAAM;AACnC;AACA;AACO;AACP,2BAA2B,aAAsB;AACjD,CAAC;AACD;AACO,MAAM,2BAAa,GAAG,oBAAM;AACnC;AACO,kBAAkB,oBAAM,sCAAsC,2BAAa;AAClF;AACA;AACA;AACA;AACA,CAAC,wCAAwC;AACzC;AACA;AACO,yBAAyB,oBAAM;AACtC;AACA;AACA,CAAC;AACD,sCAAsC,UAAmB;AACzD,CAAC;AACD;AACO,uBAAuB,oBAAM;AACpC;AACA,CAAC;AACD;AACO,wBAAwB,oBAAM;AACrC;AACA,CAAC;AACD;AACO,yBAAyB,oBAAM;AACtC;AACA,CAAC;AACD;AACO,wBAAwB,oBAAM;AACrC;AACA,CAAC;AACD;AACA;AACA,WAAW,kBAA2B;AACtC;AACA;AACO;AACP;AACA,CAAC;AACD;AACO,+BAA+B,oBAAM;AAC5C;AACA;AACA;AACO,gCAAgC,oBAAM;AAC7C;AACA;AACA;AACO,iCAAiC,oBAAM;AAC9C;AACA;AACA;AACO,gCAAgC,oBAAM;AAC7C;AACA;AACA;AACO;AACP;AACA,CAAC;AACD;AACO,oCAAoC,oBAAM;AACjD;AACA;AACA;AACO,qCAAqC,oBAAM;AAClD;AACA;AACA;AACO,sCAAsC,oBAAM;AACnD;AACA;AACA;AACO,qCAAqC,oBAAM;AAClD;AACA;AACA;AACA,yEAAyE,gBAAyB;AAClG;AACO,+BAA+B,oBAAM;AAC5C;AACA;AACA,CAAC;AACD;AACA,CAAC;AACD;AACO,6BAA6B,oBAAM;AAC1C;AACO,8BAA8B,oBAAM;AAC3C;AACO,+BAA+B,oBAAM;AAC5C;AACO,8BAA8B,oBAAM;AAC3C;AACA;AACO,0BAA0B,oBAAM;AACvC;AACA;AACA,CAAC;AACD,sCAAsC,WAAoB;AAC1D,CAAC;AACD;AACO,wBAAwB,oBAAM;AACrC;AACO,yBAAyB,oBAAM;AACtC;AACO,0BAA0B,oBAAM;AACvC;AACO,yBAAyB,oBAAM;AACtC;AACA;AACO,+BAA+B,oBAAM;AAC5C;AACA;AACA,CAAC;AACD,sCAAsC,gBAAyB;AAC/D,CAAC;AACD;AACO,6BAA6B,oBAAM;AAC1C;AACO,8BAA8B,oBAAM;AAC3C;AACO,+BAA+B,oBAAM;AAC5C;AACO,8BAA8B,oBAAM;AAC3C;AACA;AACO,iCAAiC,oBAAM;AAC9C;AACA;AACA,CAAC;AACD,sCAAsC,kBAA2B;AACjE,CAAC;AACD;AACO,+BAA+B,oBAAM;AAC5C;AACO,gCAAgC,oBAAM;AAC7C;AACO,iCAAiC,oBAAM;AAC9C;AACO,gCAAgC,oBAAM;AAC7C;AACA;AACO,gCAAgC,oBAAM;AAC7C;AACA;AACA,CAAC;AACD,sCAAsC,mBAA4B;AAClE,CAAC;AACD;AACO,8BAA8B,oBAAM;AAC3C;AACO,+BAA+B,oBAAM;AAC5C;AACO,gCAAgC,oBAAM;AAC7C;AACO,+BAA+B,oBAAM;AAC5C;AACA;AACO;AACP,sCAAsC,gBAAyB;AAC/D,CAAC;AACD;AACO,6BAA6B,oBAAM;AAC1C;AACA;AACO;AACP,2BAA2B,gBAAyB;AACpD,CAAC;AACD;AACO,MAAM,8BAAgB,GAAG,oBAAM;AACtC;AACA;AACO;AACP,2BAA2B,gBAAyB,qEAAqE,8BAAgB;AACzI,CAAC;AACD;AACO,MAAM,8BAAgB,GAAG,oBAAM;AACtC;AACA;AACO;AACP,2BAA2B,qBAA8B;AACzD,CAAC;AACD;AACO,MAAM,mCAAqB,GAAG,oBAAM;AAC3C;AACA;AACO;AACP,2BAA2B,iBAA0B;AACrD,CAAC;AACD;AACO,8BAA8B,oBAAM;AAC3C;AACA;AACO,4BAA4B,oBAAM;AACzC;AACA;AACA,CAAC;AACD;AACA,eAAe,aAAsB;AACrC;AACA,CAAC;AACD;AACO,0BAA0B,oBAAM;AACvC;AACO,2BAA2B,oBAAM;AACxC;AACO,4BAA4B,oBAAM;AACzC;AACO,2BAA2B,oBAAM;AACxC;AACA;AACO;AACP,sCAAsC,oBAA6B;AACnE,CAAC;AACD;AACO,iCAAiC,oBAAM;AAC9C;AACA;AACA;AACA;AACA;AACA;AACO,4BAA4B,wBAAW;AAC9C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,mBAAmB,oBAAM,4BAA4B,SAAS;AACrE;AACA;AACA;AACA;AACO,4EAA4E,UAAU;AAC7F;AACA;AACO,wBAAwB,oBAAM;AACrC;AACA;AACA,CAAC;AACD,sCAAsC,kBAAkB;AACxD,CAAC;AACD;AACO,sBAAsB,oBAAM;AACnC;AACA,CAAC;AACD;AACO,uBAAuB,oBAAM;AACpC;AACA,CAAC;AACD;AACO,wBAAwB,oBAAM;AACrC;AACA,CAAC;AACD;AACO,uBAAuB,oBAAM;AACpC;AACA,CAAC;AACD;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;AACO,gCAAgC,oBAAM;AAC7C;AACA;AACA,CAAC;AACD;AACA,CAAC;AACD;AACO,8BAA8B,oBAAM;AAC3C;AACA;AACA;AACO,+BAA+B,oBAAM;AAC5C;AACA;AACA;AACO,gCAAgC,oBAAM;AAC7C;AACA;AACA;AACO,+BAA+B,oBAAM;AAC5C;AACA;AACA;AACO,qCAAqC,oBAAM;AAClD;AACA;AACA,CAAC;AACD;AACA,CAAC;AACD;AACO,mCAAmC,oBAAM;AAChD;AACA;AACA;AACO,oCAAoC,oBAAM;AACjD;AACA;AACA;AACO,qCAAqC,oBAAM;AAClD;AACA;AACA;AACO,oCAAoC,oBAAM;AACjD;AACA;AACA;AACA,wEAAwE,wBAAwB;AAChG;AACO,8BAA8B,oBAAM;AAC3C;AACA;AACA,CAAC;AACD;AACA,CAAC;AACD;AACO,4BAA4B,oBAAM;AACzC;AACO,6BAA6B,oBAAM;AAC1C;AACO,8BAA8B,oBAAM;AAC3C;AACO,6BAA6B,oBAAM;;;;;;;;;;;;;;;;;;;;;;;;;AC7hBsB;AACgB;AACjC;AACe;AACM;AACpE;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,wBAAwB,KAAE;AAC1B;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,KAAE;AAC5B;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,KAAE;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,KAAE;AAC5B;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAY;AAC3C;AACA;AACA,KAAK;AACL,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,4BAA4B;AACpD,sBAAsB,OAAO;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,2CAAiB;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,gBAAgB,wBAAW;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mDAAqB;AAC7B;AACA;AACA,8BAA8B,6CAAqB,0CAA0C,iBAAiB,iBAAiB;AAC/H;AACA;AACA;AACA;AACA;AACA;;;AC9MA;AACA;AAC0D;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,WAAW,YAAY;AACvB;;;;;;;;;;;;;ACZA;AACA;AACA;AACqD;AACyC;AAC9F;AACA;AACA;AACA;AACA;AACO,qBAAqB,4EAAU,KAAK,6EAAoB,EAAE,IAAI,gEAAO,EAAE,IAAI,qEAAY,CAAC,MAAM,mEAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACVtE;AACA;AACA;AACA;AACO;AACP;AAC+B;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,mEAAW;AAC/C;AACA;AACA;AACA,mFAAmF,6DAA6D;AAChJ;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C,MAAM;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4DAAQ;AACvB;AACA;AACA,eAAe,uCAAuC,MAAM;AAC5D;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mEAAW;AAC1B;AACA;AACA,eAAe,0CAA0C,MAAM;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4DAAQ;AACvB;AACA;AACA,eAAe,uCAAuC,MAAM;AAC5D;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mEAAW;AAC1B;AACA;AACA,eAAe,uCAAuC,MAAM;AAC5D;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,qBAAqB,8EAAgB;AACrC,qBAAqB,8EAAgB;AACrC;AACA,eAAe,4DAAQ;AACvB;AACA;AACA,eAAe,uCAAuC,MAAM;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,YAAY,8EAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA,eAAe,4DAAQ;AACvB;AACA;AACA,eAAe,uCAAuC,MAAM;AAC5D;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,4DAAQ;AACzB;AACA;AACA;AACA,8BAA8B,4DAAQ;AACtC;AACA;AACA,gBAAgB,4DAAQ,WAAW,4DAAQ;AAC3C;AACA;AACA;AACA,oBAAoB,4DAAQ;AAC5B;AACA;AACA,iBAAiB,4DAAQ;AACzB;AACA;AACA;AACA,8BAA8B,4DAAQ;AACtC;AACA,QAAQ,4DAAQ;AAChB,QAAQ,4DAAQ;AAChB,QAAQ,4DAAQ;AAChB,eAAe,4DAAQ;AACvB;AACA;AACA,eAAe,uCAAuC,MAAM;AAC5D;AACA;AACA;AACA;AACO;AACP;AACA,gBAAgB,4DAAQ;AACxB;AACA;AACA,gBAAgB,4DAAQ;AACxB;AACA,qCAAqC,4DAAQ;AAC7C,qCAAqC,4DAAQ;AAC7C,qCAAqC,4DAAQ;AAC7C;AACA;AACA;AACA,eAAe,4DAAQ;AACvB;AACA;AACA,eAAe,0CAA0C,MAAM;AAC/D;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4DAAQ;AACvB;AACA;AACA,eAAe,uCAAuC,MAAM;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mEAAW;AAC1B;AACA;AACA,eAAe,0CAA0C,MAAM;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,eAAe,uCAAuC,MAAM;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,cAAc,0CAA0C,MAAM;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,cAAc,uCAAuC,MAAM;AAC3D;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3gB4D;AAC5D;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,gBAAgB;AACtC;AACA;AACA;AACA,4BAA4B,mFAAqB,qBAAqB,mFAAqB,qBAAqB,mFAAqB;AACrI;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA,iBAAiB;AACjB;AACA;;;;;;;;;;;;ACzC4D;AAC5D;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,gBAAgB;AACtC;AACA;AACA;AACA,4BAA4B,mFAAqB,qBAAqB,mFAAqB,qBAAqB,mFAAqB;AACrI;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA,iBAAiB;AACjB;AACA;;;;;;;;;;;;ACzC4D;AAC5D;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,gBAAgB;AACtC;AACA;AACA;AACA,4BAA4B,mFAAqB,qBAAqB,mFAAqB,qBAAqB,mFAAqB;AACrI;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;;;;;;;;;;;;AC9C4D;AAC5D;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,gBAAgB;AACtC;AACA;AACA;AACA,4BAA4B,mFAAqB,qBAAqB,mFAAqB,qBAAqB,mFAAqB;AACrI;AACA;AACA,qBAAqB,gBAAgB;AACrC;AACA;AACA,iBAAiB;AACjB;AACA;;;;;;;;;;;;ACjDsG;AACtG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB,QAAQ;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA,sBAAsB,WAAW,yEAAW,sBAAsB,GAAG,WAAW,yEAAW,sBAAsB,GAAG,WAAW,yEAAW,sBAAsB;AAChK;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA,uBAAuB,WAAW,yEAAW,sBAAsB,GAAG,WAAW,yEAAW,sBAAsB,GAAG,WAAW,yEAAW,sBAAsB,GAAG,mEAAK,eAAe;AACxL;AACA;AACA,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA,+BAA+B,mFAAqB,qBAAqB,mFAAqB,qBAAqB,mFAAqB,qBAAqB,mFAAqB;AAClL;AACA;AACA,sBAAsB,mBAAmB;AACzC;AACA;AACA,+BAA+B,mEAAK,gBAAgB,mEAAK,gBAAgB,mEAAK,gBAAgB,mEAAK;AACnG;AACA;AACA,qBAAqB,mBAAmB,MAAM,wBAAwB;AACtE;AACA;AACA,iBAAiB;AACjB;AACA;AACA,eAAe,iFAAmB,CAAC,yEAAW;AAC9C;AACA;;;;;;;;;;;;AC9F4D;AAC5D;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,gBAAgB;AACtC;AACA;AACA;AACA,4BAA4B,mFAAqB,qBAAqB,mFAAqB,qBAAqB,mFAAqB;AACrI;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;ACzIO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;;;ACtuBiD;AACD;AACO;AACvD;AACA,+DAA+D,IAAI,UAAU,EAAE,6BAA6B,IAAI;AAChH;AACA,iEAAiE,IAAI,UAAU,EAAE;AACjF;AACA,oCAAoC,EAAE,UAAU,EAAE;AAClD;AACA,qCAAqC,EAAE,UAAU,EAAE;AACnD;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,gCAAgC,yCAAyC;AACzE;AACA;AACA;AACO;AACP,WAAW,kBAAkB;AAC7B;AACA;AACA,6CAA6C,yCAAyC;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gCAAW,CAAC,oCAAS,sCAAsC,oCAAS,qCAAqC,oCAAS;AACjI;AACA;AACA,6CAA6C,yCAAyC;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gCAAW,CAAC,oCAAS,wCAAwC,oCAAS,uCAAuC,oCAAS,+BAA+B,oCAAS;AAC7K;AACA;AACA,6CAA6C,yCAAyC;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,yCAAyC;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,eAAe,gCAAW,CAAC,oCAAS,4BAA4B,oCAAS,4BAA4B,oCAAS;AAC9G;AACA;AACA,sCAAsC,yCAAyC;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,gCAAW,CAAC,oCAAS,4BAA4B,oCAAS,4BAA4B,oCAAS;AAClH;AACA;AACA;AACA;AACA,gCAAgC,yCAAyC;AACzE,mBAAmB,yEAAyE;AAC5F;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA,mBAAmB,kBAAkB;AACrC;AACA,cAAc,gCAAW;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,0EAA0E;AAC5F;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AC1N0D;AAC1B;AACuB;AACvD;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,YAAY,6EAAqB;AACjC,CAAC;AACD;AACA,MAAM,sBAAsB;AAC5B;AACA,0CAA0C,qBAAqB;AAC/D;AACA;AACO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,MAAM,sBAAsB;AAC5B;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,yBAAyB,gBAAgB;AACzC;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,0BAA0B,qBAAqB;AAC/C,6BAA6B,sBAAsB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,KAAK;AAClC,+BAA+B,KAAK;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,4EAAU;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,kDAAG;AACX;AACA;AACA;AACA;AACA;AACA,oBAAoB,kDAAG;AACvB;AACA;AACA,oBAAoB,kDAAG;AACvB;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,QAAQ;AAC5D;AACA;AACA;AACA;AACA,8CAA8C,QAAQ;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,QAAQ;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB,4CAA4C;AAC5C;AACA;;;;;;;;;;;;;;;ACrMsC;AACoB;AACE;AACN;AACtD,+BAA+B;AAC/B;AACA,qBAAqB,wDAAI;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT,KAAK;AACL,CAAC;AACD;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA,2BAA2B,yEAAmB;AAC9C;AACA;AACA;AACA,gDAAgD,QAAQ;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA,sBAAsB,8EAAa;AACnC,qDAAqD,8EAAa;AAClE;AACA,0BAA0B,8EAAa;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,QAAQ;AAC5D,gBAAgB,4EAAU;AAC1B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;ACzGgC;AACoC;AACe;AACrB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,yBAAyB,sCAAsB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,6BAAU;AACpC;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,6BAAU;AAClB;AACA;AACA;AACA;AACA,QAAQ,6BAAU;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,4BAA4B;AACxD,iDAAiD,0CAAuB;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,8BAA8B;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,0CAAuB;AAC3D;AACA;AACA;AACA;AACA,uCAAuC,0CAAuB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kGAAkG,QAAQ;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,QAAQ;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,eAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6CAAqB;AAChD;AACA;AACA;AACA;AACA;AACA;;;AC9W6C;AACkB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,6CAAqB;AACxC,KAAK;AACL,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AC3DwC;AACxC,oBAAoB,2DAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,kBAAkB;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,2DAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC;AACD;AACA,uBAAuB,2DAAO;AAC9B;AACA,CAAC;AACD;AACA;AACA,uBAAuB,2CAA2C;AAClE;AACO,+BAA+B,QAAQ;AAC9C;AACO,4BAA4B,EAAE,OAAO;AAC5C;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,yCAAyC,qBAAqB;AAC9D;AACA;AACA;AACA,6CAA6C,OAAO;AACpD,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,oBAAoB,EAAE,MAAM,EAAE,kBAAkB;AAClE,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,cAAc,IAAI,2CAA2C;AAC/E,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,OAAO,GAAG,MAAM;AACtC,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,4CAA4C,gBAAgB;AAC5D;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC;;;;;;;;;;;;AC9MD;AACA,yBAAyB,gBAAgB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AC3KgC;AAC6B;AACS;AACtE;AACA;AACA;AACA;AACO,mBAAmB,wDAAI;AAC9B;AACA;AACA,wBAAwB,kDAAG;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,yEAAsB;AAC9E;AACA;AACA;AACA;AACA,yBAAyB,6EAAqB;AAC9C;AACA;AACA;AACA,6BAA6B,KAAK;AAClC,+BAA+B,KAAK;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,gEAAa;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,uBAAuB;AAC7C,qBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,2BAA2B;AAC3B;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,qBAAqB,wDAAI;AACzB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA,CAAC;AACD;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;;;;;;;;;;;;;;AC/VP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA,eAAe,qBAAM;AACrB;AACA,eAAe,qBAAM;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,4BAA4B;AACxF;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzFA;AACA,yBAAyB,UAAU;AACnC;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACpBkD;AACE;AACpD;AACA;AACA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA,6BAA6B,oEAAY;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,uEAAa;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,YAAY,oBAAoB;AAChC,0BAA0B,uEAAa;AACvC;AACA;AACA;AACA;AACA;AACA,yBAAyB,oEAAY;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,0BAA0B,uEAAa;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,YAAY,oBAAoB;AAChC;AACA;;;;;;;;;;;;;ACtGgC;AAChC;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,kDAAG;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,kDAAG;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,eAAe;AAC9C;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,wBAAwB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,gBAAgB;AACnE,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AClLoE;AACJ;AAChE;AACA;AACA;AACA;AACO,+BAA+B,kFAAuB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,eAAe,uFAA6B;AAC5C;;;;;;;;;;;;;;ACvDgC;AAChC;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,qBAAqB;AAC3B;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,kDAAG;AACpC;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAG;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AC/D0D;AACd;AAC5C;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,4EAAU;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,8DAAU;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACvEoE;AACpE;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,eAAe,uFAA6B;AAC5C;;;;;;;;;;;;;;ACrCoE;AACJ;AAChE;AACA;AACA;AACA;AACO,8BAA8B,kFAAuB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA,8BAA8B;AAC9B;AACA,eAAe,uFAA6B;AAC5C;;;;;;;;;;;;;;;;;;;;;;;AC7CgC;AAC6C;AACjB;AAC5D;AACA;AACA;AACA;AACA,+BAA+B,6BAAU;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,eAAG;AACP;AACA;AACA,IAAI,eAAG;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,QAAQ;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,mCAAmC,4CAAqB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,6BAAU;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,eAAG;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mCAAgB;AACxB;AACA,QAAQ,mCAAgB;AACxB;AACA;AACA;AACA;AACA;;;AC3PwE;AACpB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,wBAAwB,eAAe;AACvC;AACA;AACA;AACA;AACA,0BAA0B,oBAAoB;AAC9C;AACA;AACA;AACA,+BAA+B,6BAAiB;AAChD;AACA,mCAAmC,+BAAmB;AACtD;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA,sCAAsC,6BAAiB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,oBAAoB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,QAAQ;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,eAAG;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,eAAG;AACvB,kDAAkD,eAAG;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,eAAG;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACzLA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,QAAQ;AACnD;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;;;AC5JgC;AACuC;AACvB;AACX;AACuC;AACxB;AACpD;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,eAAG;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,eAAG;AAC1B;AACA;AACA;AACA,4CAA4C,oBAAoB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,QAAQ;AAC/D;AACA;AACA;AACA,mBAAmB,QAAQ;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,0CAAuB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,oBAAoB;AAC5C;AACA,6BAA6B,4CAAqB;AAClD;AACA;AACA;AACA;AACA;AACA,6BAA6B,oCAAa;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACtJyD;AACV;AAC/C;AACA,cAAc,sBAAsB;AACpC;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6DAAY;AACvC,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,yCAAE;AAChC;AACA;AACA;AACA,KAAK;AACL,CAAC;AACD;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,4EAAa;AACnC,wCAAwC,4EAAa;AACrD;AACA,0BAA0B,4EAAa;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;ACrFsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,kBAAkB,yCAAc;AAChC;AACA;AACA;;;;;;;ACrBmC;AACgE;AAC5F;AACP;AACA,8BAA8B,+BAAW;AACzC;AACA;AACA;AACA,QAAQ,eAAG;AACX;AACA;AACA,QAAQ,eAAG;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D,yCAAyC,oCAAa;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,6BAAU;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,eAAG;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,QAAQ,eAAG;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAU;AACV,IAAI,6BAAU;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,eAAG;AACX;AACA;AACA,QAAQ,eAAG;AACX;AACA;AACA;AACA;AACA,4BAA4B,uCAAuC;AACnE;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAG;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,eAAG;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC;;;ACtNkC;AACmF;AACrD;AACI;AACuB;AAC9B;AAC9D;AACA,sBAAsB;AACtB;AACA,8BAA8B,iCAAY;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,oCAAoC;AAC9E,iCAAiC,uBAAuB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,UAAU,iCAAiC,SAAS,oBAAoB,QAAQ;AACzJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,cAAc;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,8BAA8B;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,eAAe;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA,QAAQ,qBAAqB;AAC7B;AACA;AACA,QAAQ,qBAAqB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,6BAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,0CAAuB;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,6BAAU;AACtB;AACA;AACA;AACA,QAAQ,6BAAU;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,QAAQ,6BAAU;AAClB,8BAA8B,+BAAW;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,cAAc;AAC5B,yBAAyB,yCAAc;AACvC;AACA;AACA;AACA;AACA,yBAAyB,yCAAc;AACvC;AACA,+CAA+C,cAAc;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,cAAc;AACnD,kDAAkD,cAAc;AAChE;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,6BAAU;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,6BAAU;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAU;AACV,IAAI,6BAAU;AACd;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,+BAA+B;AAC/D;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,QAAQ,wCAAwC;AAChD,QAAQ,2CAA2C;AACnD;AACA;AACA;AACA,0BAA0B,cAAc;AACxC,QAAQ,oBAAoB;AAC5B,KAAK;AACL;AACA;AACA;AACA;AACA,4BAA4B,cAAc;AAC1C,QAAQ,oBAAoB;AAC5B,KAAK;AACL,CAAC;AACD;;;;;;;;;;;;;;;AC5nBA;AACA;AACA;AACA;AACkE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC;AACD;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,mBAAmB;AACzC,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E;AAC5E;AACA,iBAAiB;AACjB;AACA;AACA,oDAAoD;AACpD;AACA,aAAa;AACb,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,aAAa;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,yEAAW;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,cAAc;AAC3D;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,uBAAuB;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,uBAAuB;AAC7D;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,yBAAyB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC;AACD;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACO,uBAAuB,yDAAS;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,0BAA0B;AAClC;AACA;AACA;AACO;AACP;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,0BAA0B;AAClC;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,gBAAgB;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,kBAAkB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,cAAc;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,QAAQ;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,YAAY;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,yEAAU;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,yEAAU;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yEAAU;AACzB;AACA;AACA;AACA;AACA;AACA,mCAAmC,WAAW;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,yBAAyB,2BAA2B;AAC3G;AACA;AACA;AACA,8FAA8F,WAAW;AACzG;AACA;AACA,2EAA2E,gBAAgB;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,wBAAwB;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,oCAAoC,WAAW;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,oCAAoC,WAAW;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,oCAAoC,WAAW;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,oCAAoC,WAAW;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,6BAA6B,WAAW;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC;AACD;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,eAAe;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,YAAY;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC5zCmC;AAC+B;AACgD;AAClH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,gCAAgC,yEAAW;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,oGAAqB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,2DAAU;AACV,IAAI,yEAAU;AACd;AACA,2DAAU;AACV,IAAI,yEAAU;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA,wBAAwB,OAAO,GAAG,oBAAoB;AACtD;AACA;AACA;AACA;AACA;AACA,yCAAyC,2GAA4B;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA;;;;;;;;;;;;;;;;ACnIoD;AACpD;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACO,iDAAiD,sEAAI;AAC5D;AACA;AACA,UAAU,qEAAG;AACb,gBAAgB;AAChB;AACA,2BAA2B,qEAAG,SAAS,eAAe,gCAAgC;AACtF,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACO,mDAAmD,sEAAI;AAC9D;AACA;AACA,UAAU,qEAAG;AACb,iBAAiB,2CAA2C;AAC5D;AACA;AACA;AACA,cAAc,qEAAG;AACjB,2BAA2B,kCAAkC;AAC7D;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACO,oBAAoB,sEAAI;AAC/B,uBAAuB,qEAAG,iBAAiB;AAC3C;AACA;AACA,cAAc,qEAAG;AACjB,2BAA2B,gCAAgC;AAC3D;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACO,sBAAsB,sEAAI;AACjC,yBAAyB,qEAAG,mBAAmB;AAC/C;AACA;AACA,cAAc,qEAAG;AACjB,2BAA2B,kCAAkC;AAC7D;AACA;AACA;;;;;;;;;;;;ACnFiE;AACjE;AACA;AACA,iBAAiB,2FAA2F;AAC5G;AACA;AACO;AACP,8BAA8B,qFAAsB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,+BAA+B,qFAAsB;AACrD;AACA,KAAK;AACL;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA,qBAAqB,oCAAoC;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,oEAAoE;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,UAAU;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACO;;;;;;;;;;;AC3IP;AACA;AACA;AACA;AACO;;;;;;;;;;;;ACJP;AACA,wCAAwC;AACxC;AACA;AACO,gCAAgC,aAAa;AACpD;AACA;AACA;AACA;AACA;AACA;AACO;AACP,cAAc,OAAO,MAAM,UAAU,cAAc;AACnD;;;;;;;;;;;;ACbmE;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACO,qBAAqB,2FAAkB;;;;;;;;;;;;ACR9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,gBAAgB,sCAAsC,kBAAkB;AACnF,0BAA0B;AAC1B;AACA;AACA;AACO;AACP;AACA,oBAAoB;AACpB;AACA;AACA;AACO;AACP;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA,6DAA6D,cAAc;AAC3E;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA;AACO;AACP,oCAAoC;AACpC;AACA;AACO;AACP;AACA;AACA;AACO;AACP,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACO;AACP,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACO;AACP,6BAA6B,sBAAsB;AACnD;AACA;AACA;AACA;AACO;AACP,kDAAkD,QAAQ;AAC1D,yCAAyC,QAAQ;AACjD,yDAAyD,QAAQ;AACjE;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA,iBAAiB,uFAAuF,cAAc;AACtH,uBAAuB,gCAAgC,qCAAqC,2CAA2C;AACvI,4BAA4B,MAAM,iBAAiB,YAAY;AAC/D,uBAAuB;AACvB,8BAA8B;AAC9B,6BAA6B;AAC7B,4BAA4B;AAC5B;AACA;AACO;AACP;AACA,iBAAiB,6CAA6C,UAAU,sDAAsD,cAAc;AAC5I,0BAA0B,6BAA6B,oBAAoB,gDAAgD,kBAAkB;AAC7I;AACA;AACO;AACP;AACA;AACA,2GAA2G,uFAAuF,cAAc;AAChN,uBAAuB,8BAA8B,gDAAgD,wDAAwD;AAC7J,6CAA6C,sCAAsC,UAAU,mBAAmB,IAAI;AACpH;AACA;AACO;AACP,iCAAiC,uCAAuC,YAAY,KAAK,OAAO;AAChG;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,6CAA6C;AAC7C;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACzNA;AACA;AACA;AACO,SAAS,qBAAS;AACzB;AACA;;;ACLsC;AACtC;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,SAAS,qBAAS;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,cAAc;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO,4BAA4B,kEAAkB;;;;;;;;;;;;;;;;;;;AClGrD;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4BAA4B;AAC7B;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO,0BAA0B;AACjC;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO,2BAA2B;AAClC;AACA;AACA;AACO,4BAA4B;AACnC;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO,2BAA2B;AAClC;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO,iCAAiC;AACxC;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACP;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvXA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,CAAC,8BAA8B;;;;;;;;;;;ACP/B;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,oCAAoC","sources":["webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/react-components/lib/react-utils.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/swatch.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/utilities/base-layer-luminance.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/utilities/is-dark.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/utilities/relative-luminance.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-colors/dist/color-blending.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-colors/dist/color-interpolation.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-colors/dist/color-scale.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-colors/dist/color-palette.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-colors/dist/component-state-color-palette.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/utilities/binary-search.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/utilities/direction-by-is-dark.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/palette.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/accent-fill.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/accent-foreground.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/utilities/color-constants.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/foreground-on-accent.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/neutral-fill.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/neutral-fill-input.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/neutral-fill-layer.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/neutral-fill-stealth.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/neutral-fill-contrast.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/focus-stroke.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/neutral-foreground.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/neutral-foreground-hint.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/neutral-layer-card-container.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/neutral-layer-floating.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/neutral-layer-1.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/neutral-layer-2.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/neutral-layer-3.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/neutral-layer-4.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/neutral-stroke.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/neutral-stroke-divider.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/error-fill.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/color/recipes/foreground-on-error.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/design-tokens.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-foundation/dist/esm/design-system/design-system.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/jupyter-design-system.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter/web-components/dist/esm/styles/size.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-colors/dist/color-converters.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-colors/dist/color-hsl.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-colors/dist/color-hsv.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-colors/dist/color-lab.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-colors/dist/color-lch.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-colors/dist/color-rgba-64.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-colors/dist/color-xyz.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-colors/dist/math-utilities.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-colors/dist/named-colors.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-colors/dist/parse-color.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/components/attributes.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/components/fast-definitions.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/components/controller.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/components/fast-element.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/dom.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/observation/notifier.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/observation/observable.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/platform.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/styles/css-directive.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/styles/css.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/styles/element-styles.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/templating/children.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/templating/html-directive.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/templating/node-observation.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/templating/ref.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/templating/slotted.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/templating/binding.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/templating/compiler.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/templating/view.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-element/dist/esm/templating/template.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-foundation/dist/esm/design-system/component-presentation.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-foundation/dist/esm/utilities/composed-contains.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-foundation/dist/esm/design-token/custom-property-manager.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-foundation/dist/esm/design-token/design-token.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-foundation/dist/esm/di/di.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-foundation/dist/esm/foundation-element/foundation-element.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-foundation/dist/esm/patterns/start-end.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-foundation/dist/esm/utilities/apply-mixins.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-foundation/dist/esm/utilities/composed-parent.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-foundation/dist/esm/utilities/match-media-stylesheet-behavior.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-foundation/dist/esm/utilities/style/disabled.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-foundation/dist/esm/utilities/style/display.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-foundation/dist/esm/utilities/style/focus.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-foundation/node_modules/tslib/tslib.es6.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/exenv-es6/dist/can-use-dom.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-web-utilities/dist/dom.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-web-utilities/dist/key-codes.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-web-utilities/dist/localization.js","webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@microsoft/fast-web-utilities/dist/system-colors.js"],"sourcesContent":["import { useEffect, useLayoutEffect } from 'react';\n\nexport function useProperties(targetElement, propName, value) {\n useEffect(() => {\n if (\n value !== undefined &&\n targetElement.current &&\n targetElement.current[propName] !== value\n ) {\n // add try catch to avoid errors when setting read-only properties\n try {\n targetElement.current[propName] = value;\n } catch (e) {\n console.warn(e);\n }\n }\n }, [value, targetElement.current]);\n}\n\nexport function useEventListener(targetElement, eventName, eventHandler) {\n useLayoutEffect(() => {\n if (eventHandler !== undefined) {\n targetElement?.current?.addEventListener(eventName, eventHandler);\n }\n\n return () => {\n if (eventHandler?.cancel) {\n eventHandler.cancel();\n }\n\n targetElement?.current?.removeEventListener(eventName, eventHandler);\n };\n }, [eventName, eventHandler, targetElement.current]);\n}\n","import { ColorRGBA64, rgbToRelativeLuminance } from '@microsoft/fast-colors';\nimport { contrast } from './utilities/relative-luminance.js';\n/** @public */\nexport const SwatchRGB = Object.freeze({\n create(r, g, b) {\n return new SwatchRGBImpl(r, g, b);\n },\n from(obj) {\n return new SwatchRGBImpl(obj.r, obj.g, obj.b);\n }\n});\n/**\n * Runtime test for an objects conformance with the SwatchRGB interface.\n * @internal\n */\nexport function isSwatchRGB(value) {\n const test = {\n r: 0,\n g: 0,\n b: 0,\n toColorString: () => '',\n contrast: () => 0,\n relativeLuminance: 0\n };\n for (const key in test) {\n // @ts-expect-error swatch has no index\n if (typeof test[key] !== typeof value[key]) {\n return false;\n }\n }\n return true;\n}\n/**\n * A RGB implementation of {@link Swatch}\n * @internal\n */\nclass SwatchRGBImpl extends ColorRGBA64 {\n /**\n *\n * @param red - Red channel expressed as a number between 0 and 1\n * @param green - Green channel expressed as a number between 0 and 1\n * @param blue - Blue channel expressed as a number between 0 and 1\n */\n constructor(red, green, blue) {\n super(red, green, blue, 1);\n this.toColorString = this.toStringHexRGB;\n this.contrast = contrast.bind(null, this);\n this.createCSS = this.toColorString;\n this.relativeLuminance = rgbToRelativeLuminance(this);\n }\n static fromObject(obj) {\n return new SwatchRGBImpl(obj.r, obj.g, obj.b);\n }\n}\n","import { SwatchRGB } from '../swatch.js';\nexport function baseLayerLuminanceSwatch(luminance) {\n return SwatchRGB.create(luminance, luminance, luminance);\n}\n/**\n * Recommended values for light and dark mode for {@link @microsoft/fast-components#baseLayerLuminance}.\n *\n * @public\n */\nexport const StandardLuminance = {\n LightMode: 1,\n DarkMode: 0.23\n};\n","/*\n * A color is in \"dark\" if there is more contrast between #000000 and a reference\n * color than #FFFFFF and the reference color. That threshold can be expressed as a relative luminance\n * using the contrast formula as (1 + 0.5) / (R + 0.05) === (R + 0.05) / (0 + 0.05),\n * which reduces to the following, where 'R' is the relative luminance of the reference color\n */\nconst target = (-0.1 + Math.sqrt(0.21)) / 2;\n/**\n * Determines if a color should be considered Dark Mode\n * @param color - The color to check to mode of\n * @returns boolean\n *\n * @public\n */\nexport function isDark(color) {\n return color.relativeLuminance <= target;\n}\n","/**\n * @internal\n */\nexport function contrast(a, b) {\n const L1 = a.relativeLuminance > b.relativeLuminance ? a : b;\n const L2 = a.relativeLuminance > b.relativeLuminance ? b : a;\n return (L1.relativeLuminance + 0.05) / (L2.relativeLuminance + 0.05);\n}\n","import { hslToRGB, labToRGB, lchToRGB, rgbToHSL, rgbToLAB, rgbToLCH, } from \"./color-converters.js\";\nimport { ColorHSL } from \"./color-hsl.js\";\nimport { ColorLAB } from \"./color-lab.js\";\nimport { ColorLCH } from \"./color-lch.js\";\nimport { ColorRGBA64 } from \"./color-rgba-64.js\";\nimport { clamp } from \"./math-utilities.js\";\n/**\n * Saturate a color using LCH color space\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function saturateViaLCH(input, saturation, saturationConstant = 18) {\n const lch = rgbToLCH(input);\n let sat = lch.c + saturation * saturationConstant;\n if (sat < 0) {\n sat = 0;\n }\n return lchToRGB(new ColorLCH(lch.l, sat, lch.h));\n}\n/**\n * De-saturate a color using LCH color space\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function desaturateViaLCH(input, saturation, saturationConstant = 18) {\n return saturateViaLCH(input, -1 * saturation, saturationConstant);\n}\n/**\n * Darken a color using LAB color space\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function darkenViaLAB(input, amount, darkenConstant = 18) {\n const lab = rgbToLAB(input);\n const darkened = lab.l - amount * darkenConstant;\n return labToRGB(new ColorLAB(darkened, lab.a, lab.b));\n}\n/**\n * Lighten a color using LAB color space\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function lightenViaLAB(input, amount, darkenConstant = 18) {\n return darkenViaLAB(input, -1 * amount, darkenConstant);\n}\n/**\n * @public\n */\nexport function blendBurnChannel(bottom, top) {\n if (top === 0.0) {\n // Despite the discontinuity, other sources seem to use 0.0 here instead of 1\n return 0.0;\n }\n return 1.0 - (1.0 - bottom) / top;\n}\n/**\n * Blends two colors with the burn mode\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function blendBurn(bottom, top) {\n return new ColorRGBA64(blendBurnChannel(bottom.r, top.r), blendBurnChannel(bottom.g, top.g), blendBurnChannel(bottom.b, top.b), 1);\n}\n/**\n * Blends two colors\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function blendColor(bottom, top) {\n const bottomHSL = rgbToHSL(bottom);\n const topHSL = rgbToHSL(top);\n if (topHSL.s === 0) {\n return new ColorRGBA64(bottomHSL.l, bottomHSL.l, bottomHSL.l, 1);\n }\n return hslToRGB(new ColorHSL(topHSL.h, topHSL.s, bottomHSL.l));\n}\n/**\n * @public\n */\nexport function blendDarkenChannel(bottom, top) {\n return Math.min(bottom, top);\n}\n/**\n * Blends two colors with the darken mode\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function blendDarken(bottom, top) {\n return new ColorRGBA64(blendDarkenChannel(bottom.r, top.r), blendDarkenChannel(bottom.g, top.g), blendDarkenChannel(bottom.b, top.b), 1);\n}\n/**\n * @public\n */\nexport function blendDodgeChannel(bottom, top) {\n if (top >= 1.0) {\n return 1.0;\n }\n const retVal = bottom / (1.0 - top);\n if (retVal >= 1.0) {\n return 1.0;\n }\n return retVal;\n}\n/**\n * Blends two colors with the dodge mode\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function blendDodge(bottom, top) {\n return new ColorRGBA64(blendDodgeChannel(bottom.r, top.r), blendDodgeChannel(bottom.g, top.g), blendDodgeChannel(bottom.b, top.b), 1);\n}\n/**\n * @public\n */\nexport function blendLightenChannel(bottom, top) {\n return Math.max(bottom, top);\n}\n/**\n * Blends two colors with the lighten mode\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function blendLighten(bottom, top) {\n return new ColorRGBA64(blendLightenChannel(bottom.r, top.r), blendLightenChannel(bottom.g, top.g), blendLightenChannel(bottom.b, top.b), 1);\n}\n/**\n * @public\n */\nexport function blendMultiplyChannel(bottom, top) {\n return bottom * top;\n}\n/**\n * Blends two colors with the multiply mode\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function blendMultiply(bottom, top) {\n return new ColorRGBA64(blendMultiplyChannel(bottom.r, top.r), blendMultiplyChannel(bottom.g, top.g), blendMultiplyChannel(bottom.b, top.b), 1);\n}\n/**\n * @public\n */\nexport function blendOverlayChannel(bottom, top) {\n if (bottom < 0.5) {\n return clamp(2.0 * top * bottom, 0, 1);\n }\n return clamp(1.0 - 2.0 * (1.0 - top) * (1.0 - bottom), 0, 1);\n}\n/**\n * Blends two colors with the overlay mode\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function blendOverlay(bottom, top) {\n return new ColorRGBA64(blendOverlayChannel(bottom.r, top.r), blendOverlayChannel(bottom.g, top.g), blendOverlayChannel(bottom.b, top.b), 1);\n}\n/**\n * @public\n */\nexport function blendScreenChannel(bottom, top) {\n return 1.0 - (1.0 - top) * (1.0 - bottom);\n}\n/**\n * Blends two colors with the screen mode\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function blendScreen(bottom, top) {\n return new ColorRGBA64(blendScreenChannel(bottom.r, top.r), blendScreenChannel(bottom.g, top.g), blendScreenChannel(bottom.b, top.b), 1);\n}\n/**\n * Color blend modes.\n * @public\n */\nexport var ColorBlendMode;\n(function (ColorBlendMode) {\n ColorBlendMode[ColorBlendMode[\"Burn\"] = 0] = \"Burn\";\n ColorBlendMode[ColorBlendMode[\"Color\"] = 1] = \"Color\";\n ColorBlendMode[ColorBlendMode[\"Darken\"] = 2] = \"Darken\";\n ColorBlendMode[ColorBlendMode[\"Dodge\"] = 3] = \"Dodge\";\n ColorBlendMode[ColorBlendMode[\"Lighten\"] = 4] = \"Lighten\";\n ColorBlendMode[ColorBlendMode[\"Multiply\"] = 5] = \"Multiply\";\n ColorBlendMode[ColorBlendMode[\"Overlay\"] = 6] = \"Overlay\";\n ColorBlendMode[ColorBlendMode[\"Screen\"] = 7] = \"Screen\";\n})(ColorBlendMode || (ColorBlendMode = {}));\n/**\n * Blend two colors.\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function blend(mode, bottom, top) {\n switch (mode) {\n case ColorBlendMode.Burn:\n return blendBurn(bottom, top);\n case ColorBlendMode.Color:\n return blendColor(bottom, top);\n case ColorBlendMode.Darken:\n return blendDarken(bottom, top);\n case ColorBlendMode.Dodge:\n return blendDodge(bottom, top);\n case ColorBlendMode.Lighten:\n return blendLighten(bottom, top);\n case ColorBlendMode.Multiply:\n return blendMultiply(bottom, top);\n case ColorBlendMode.Overlay:\n return blendOverlay(bottom, top);\n case ColorBlendMode.Screen:\n return blendScreen(bottom, top);\n default:\n throw new Error(\"Unknown blend mode\");\n }\n}\n/**\n * Alpha channel of bottom is ignored\n * The returned color always has an alpha channel of 1\n * Different programs (eg: paint.net, photoshop) will give different answers than this occasionally but within +/- 1/255 in each channel. Just depends on the details of how they round off decimals\n *\n * @public\n */\nexport function computeAlphaBlend(bottom, top) {\n if (top.a >= 1) {\n return top;\n }\n else if (top.a <= 0) {\n return new ColorRGBA64(bottom.r, bottom.g, bottom.b, 1);\n }\n const r = top.a * top.r + (1 - top.a) * bottom.r;\n const g = top.a * top.g + (1 - top.a) * bottom.g;\n const b = top.a * top.b + (1 - top.a) * bottom.b;\n return new ColorRGBA64(r, g, b, 1);\n}\n","import { hslToRGB, hsvToRGB, labToRGB, lchToRGB, rgbToHSL, rgbToHSV, rgbToLAB, rgbToLCH, rgbToXYZ, xyzToRGB, } from \"./color-converters.js\";\nimport { ColorHSL } from \"./color-hsl.js\";\nimport { ColorHSV } from \"./color-hsv.js\";\nimport { ColorLAB } from \"./color-lab.js\";\nimport { ColorLCH } from \"./color-lch.js\";\nimport { ColorRGBA64 } from \"./color-rgba-64.js\";\nimport { ColorXYZ } from \"./color-xyz.js\";\nimport { lerp, lerpAnglesInDegrees } from \"./math-utilities.js\";\n/**\n * Interpolate by RGB color space\n *\n * @public\n */\nexport function interpolateRGB(position, left, right) {\n if (isNaN(position) || position <= 0) {\n return left;\n }\n else if (position >= 1) {\n return right;\n }\n return new ColorRGBA64(lerp(position, left.r, right.r), lerp(position, left.g, right.g), lerp(position, left.b, right.b), lerp(position, left.a, right.a));\n}\n/**\n * Interpolate by HSL color space\n *\n * @public\n */\nexport function interpolateHSL(position, left, right) {\n if (isNaN(position) || position <= 0) {\n return left;\n }\n else if (position >= 1) {\n return right;\n }\n return new ColorHSL(lerpAnglesInDegrees(position, left.h, right.h), lerp(position, left.s, right.s), lerp(position, left.l, right.l));\n}\n/**\n * Interpolate by HSV color space\n *\n * @public\n */\nexport function interpolateHSV(position, left, right) {\n if (isNaN(position) || position <= 0) {\n return left;\n }\n else if (position >= 1) {\n return right;\n }\n return new ColorHSV(lerpAnglesInDegrees(position, left.h, right.h), lerp(position, left.s, right.s), lerp(position, left.v, right.v));\n}\n/**\n * Interpolate by XYZ color space\n *\n * @public\n */\nexport function interpolateXYZ(position, left, right) {\n if (isNaN(position) || position <= 0) {\n return left;\n }\n else if (position >= 1) {\n return right;\n }\n return new ColorXYZ(lerp(position, left.x, right.x), lerp(position, left.y, right.y), lerp(position, left.z, right.z));\n}\n/**\n * Interpolate by LAB color space\n *\n * @public\n */\nexport function interpolateLAB(position, left, right) {\n if (isNaN(position) || position <= 0) {\n return left;\n }\n else if (position >= 1) {\n return right;\n }\n return new ColorLAB(lerp(position, left.l, right.l), lerp(position, left.a, right.a), lerp(position, left.b, right.b));\n}\n/**\n * Interpolate by LCH color space\n *\n * @public\n */\nexport function interpolateLCH(position, left, right) {\n if (isNaN(position) || position <= 0) {\n return left;\n }\n else if (position >= 1) {\n return right;\n }\n return new ColorLCH(lerp(position, left.l, right.l), lerp(position, left.c, right.c), lerpAnglesInDegrees(position, left.h, right.h));\n}\n/**\n * Color interpolation spaces\n *\n * @public\n */\nexport var ColorInterpolationSpace;\n(function (ColorInterpolationSpace) {\n ColorInterpolationSpace[ColorInterpolationSpace[\"RGB\"] = 0] = \"RGB\";\n ColorInterpolationSpace[ColorInterpolationSpace[\"HSL\"] = 1] = \"HSL\";\n ColorInterpolationSpace[ColorInterpolationSpace[\"HSV\"] = 2] = \"HSV\";\n ColorInterpolationSpace[ColorInterpolationSpace[\"XYZ\"] = 3] = \"XYZ\";\n ColorInterpolationSpace[ColorInterpolationSpace[\"LAB\"] = 4] = \"LAB\";\n ColorInterpolationSpace[ColorInterpolationSpace[\"LCH\"] = 5] = \"LCH\";\n})(ColorInterpolationSpace || (ColorInterpolationSpace = {}));\n/**\n * Interpolate by color space\n *\n * @public\n */\nexport function interpolateByColorSpace(position, space, left, right) {\n if (isNaN(position) || position <= 0) {\n return left;\n }\n else if (position >= 1) {\n return right;\n }\n switch (space) {\n case ColorInterpolationSpace.HSL:\n return hslToRGB(interpolateHSL(position, rgbToHSL(left), rgbToHSL(right)));\n case ColorInterpolationSpace.HSV:\n return hsvToRGB(interpolateHSV(position, rgbToHSV(left), rgbToHSV(right)));\n case ColorInterpolationSpace.XYZ:\n return xyzToRGB(interpolateXYZ(position, rgbToXYZ(left), rgbToXYZ(right)));\n case ColorInterpolationSpace.LAB:\n return labToRGB(interpolateLAB(position, rgbToLAB(left), rgbToLAB(right)));\n case ColorInterpolationSpace.LCH:\n return lchToRGB(interpolateLCH(position, rgbToLCH(left), rgbToLCH(right)));\n default:\n return interpolateRGB(position, left, right);\n }\n}\n","import { contrastRatio } from \"./color-converters.js\";\nimport { ColorInterpolationSpace, interpolateByColorSpace, } from \"./color-interpolation.js\";\n/**\n * A color scale created from linear stops\n * @public\n */\nexport class ColorScale {\n constructor(stops) {\n if (stops == null || stops.length === 0) {\n throw new Error(\"The stops argument must be non-empty\");\n }\n else {\n this.stops = this.sortColorScaleStops(stops);\n }\n }\n static createBalancedColorScale(colors) {\n if (colors == null || colors.length === 0) {\n throw new Error(\"The colors argument must be non-empty\");\n }\n const stops = new Array(colors.length);\n for (let i = 0; i < colors.length; i++) {\n // Special case first and last in order to avoid floating point jaggies\n if (i === 0) {\n stops[i] = { color: colors[i], position: 0 };\n }\n else if (i === colors.length - 1) {\n stops[i] = { color: colors[i], position: 1 };\n }\n else {\n stops[i] = {\n color: colors[i],\n position: i * (1 / (colors.length - 1)),\n };\n }\n }\n return new ColorScale(stops);\n }\n getColor(position, interpolationMode = ColorInterpolationSpace.RGB) {\n if (this.stops.length === 1) {\n return this.stops[0].color;\n }\n else if (position <= 0) {\n return this.stops[0].color;\n }\n else if (position >= 1) {\n return this.stops[this.stops.length - 1].color;\n }\n let lowerIndex = 0;\n for (let i = 0; i < this.stops.length; i++) {\n if (this.stops[i].position <= position) {\n lowerIndex = i;\n }\n }\n let upperIndex = lowerIndex + 1;\n if (upperIndex >= this.stops.length) {\n upperIndex = this.stops.length - 1;\n }\n const scalePosition = (position - this.stops[lowerIndex].position) *\n (1.0 / (this.stops[upperIndex].position - this.stops[lowerIndex].position));\n return interpolateByColorSpace(scalePosition, interpolationMode, this.stops[lowerIndex].color, this.stops[upperIndex].color);\n }\n trim(lowerBound, upperBound, interpolationMode = ColorInterpolationSpace.RGB) {\n if (lowerBound < 0 || upperBound > 1 || upperBound < lowerBound) {\n throw new Error(\"Invalid bounds\");\n }\n if (lowerBound === upperBound) {\n return new ColorScale([\n { color: this.getColor(lowerBound, interpolationMode), position: 0 },\n ]);\n }\n const containedStops = [];\n for (let i = 0; i < this.stops.length; i++) {\n if (this.stops[i].position >= lowerBound &&\n this.stops[i].position <= upperBound) {\n containedStops.push(this.stops[i]);\n }\n }\n if (containedStops.length === 0) {\n return new ColorScale([\n { color: this.getColor(lowerBound), position: lowerBound },\n { color: this.getColor(upperBound), position: upperBound },\n ]);\n }\n if (containedStops[0].position !== lowerBound) {\n containedStops.unshift({\n color: this.getColor(lowerBound),\n position: lowerBound,\n });\n }\n if (containedStops[containedStops.length - 1].position !== upperBound) {\n containedStops.push({\n color: this.getColor(upperBound),\n position: upperBound,\n });\n }\n const range = upperBound - lowerBound;\n const finalStops = new Array(containedStops.length);\n for (let i = 0; i < containedStops.length; i++) {\n finalStops[i] = {\n color: containedStops[i].color,\n position: (containedStops[i].position - lowerBound) / range,\n };\n }\n return new ColorScale(finalStops);\n }\n findNextColor(position, contrast, searchDown = false, interpolationMode = ColorInterpolationSpace.RGB, contrastErrorMargin = 0.005, maxSearchIterations = 32) {\n if (isNaN(position) || position <= 0) {\n position = 0;\n }\n else if (position >= 1) {\n position = 1;\n }\n const startingColor = this.getColor(position, interpolationMode);\n const finalPosition = searchDown ? 0 : 1;\n const finalColor = this.getColor(finalPosition, interpolationMode);\n const finalContrast = contrastRatio(startingColor, finalColor);\n if (finalContrast <= contrast) {\n return finalPosition;\n }\n let testRangeMin = searchDown ? 0 : position;\n let testRangeMax = searchDown ? position : 0;\n let mid = finalPosition;\n let iterations = 0;\n while (iterations <= maxSearchIterations) {\n mid = Math.abs(testRangeMax - testRangeMin) / 2 + testRangeMin;\n const midColor = this.getColor(mid, interpolationMode);\n const midContrast = contrastRatio(startingColor, midColor);\n if (Math.abs(midContrast - contrast) <= contrastErrorMargin) {\n return mid;\n }\n else if (midContrast > contrast) {\n if (searchDown) {\n testRangeMin = mid;\n }\n else {\n testRangeMax = mid;\n }\n }\n else {\n if (searchDown) {\n testRangeMax = mid;\n }\n else {\n testRangeMin = mid;\n }\n }\n iterations++;\n }\n return mid;\n }\n clone() {\n const newStops = new Array(this.stops.length);\n for (let i = 0; i < newStops.length; i++) {\n newStops[i] = {\n color: this.stops[i].color,\n position: this.stops[i].position,\n };\n }\n return new ColorScale(newStops);\n }\n sortColorScaleStops(stops) {\n return stops.sort((a, b) => {\n const A = a.position;\n const B = b.position;\n if (A < B) {\n return -1;\n }\n else if (A > B) {\n return 1;\n }\n else {\n return 0;\n }\n });\n }\n}\n","import { blendMultiply, blendOverlay, saturateViaLCH } from \"./color-blending.js\";\nimport { rgbToHSL } from \"./color-converters.js\";\nimport { ColorInterpolationSpace, interpolateByColorSpace, } from \"./color-interpolation.js\";\nimport { ColorRGBA64 } from \"./color-rgba-64.js\";\nimport { ColorScale } from \"./color-scale.js\";\nimport { parseColorHexRGB } from \"./parse-color.js\";\n/**\n * Generates a color palette\n * @public\n */\nexport class ColorPalette {\n constructor(config) {\n this.config = Object.assign({}, ColorPalette.defaultPaletteConfig, config);\n this.palette = [];\n this.updatePaletteColors();\n }\n updatePaletteGenerationValues(newConfig) {\n let changed = false;\n for (const key in newConfig) {\n if (this.config[key]) {\n if (this.config[key].equalValue) {\n if (!this.config[key].equalValue(newConfig[key])) {\n this.config[key] = newConfig[key];\n changed = true;\n }\n }\n else {\n if (newConfig[key] !== this.config[key]) {\n this.config[key] = newConfig[key];\n changed = true;\n }\n }\n }\n }\n if (changed) {\n this.updatePaletteColors();\n }\n return changed;\n }\n updatePaletteColors() {\n const scale = this.generatePaletteColorScale();\n for (let i = 0; i < this.config.steps; i++) {\n this.palette[i] = scale.getColor(i / (this.config.steps - 1), this.config.interpolationMode);\n }\n }\n generatePaletteColorScale() {\n // Even when config.baseScalePosition is specified, using 0.5 for the baseColor\n // in the baseScale gives better results. Otherwise very off-center palettes\n // tend to go completely grey at the end furthest from the specified base color.\n const baseColorHSL = rgbToHSL(this.config.baseColor);\n const baseScale = new ColorScale([\n { position: 0, color: this.config.scaleColorLight },\n { position: 0.5, color: this.config.baseColor },\n { position: 1, color: this.config.scaleColorDark },\n ]);\n const trimmedScale = baseScale.trim(this.config.clipLight, 1 - this.config.clipDark);\n const trimmedLight = trimmedScale.getColor(0);\n const trimmedDark = trimmedScale.getColor(1);\n let adjustedLight = trimmedLight;\n let adjustedDark = trimmedDark;\n if (baseColorHSL.s >= this.config.saturationAdjustmentCutoff) {\n adjustedLight = saturateViaLCH(adjustedLight, this.config.saturationLight);\n adjustedDark = saturateViaLCH(adjustedDark, this.config.saturationDark);\n }\n if (this.config.multiplyLight !== 0) {\n const multiply = blendMultiply(this.config.baseColor, adjustedLight);\n adjustedLight = interpolateByColorSpace(this.config.multiplyLight, this.config.interpolationMode, adjustedLight, multiply);\n }\n if (this.config.multiplyDark !== 0) {\n const multiply = blendMultiply(this.config.baseColor, adjustedDark);\n adjustedDark = interpolateByColorSpace(this.config.multiplyDark, this.config.interpolationMode, adjustedDark, multiply);\n }\n if (this.config.overlayLight !== 0) {\n const overlay = blendOverlay(this.config.baseColor, adjustedLight);\n adjustedLight = interpolateByColorSpace(this.config.overlayLight, this.config.interpolationMode, adjustedLight, overlay);\n }\n if (this.config.overlayDark !== 0) {\n const overlay = blendOverlay(this.config.baseColor, adjustedDark);\n adjustedDark = interpolateByColorSpace(this.config.overlayDark, this.config.interpolationMode, adjustedDark, overlay);\n }\n if (this.config.baseScalePosition) {\n if (this.config.baseScalePosition <= 0) {\n return new ColorScale([\n { position: 0, color: this.config.baseColor },\n { position: 1, color: adjustedDark.clamp() },\n ]);\n }\n else if (this.config.baseScalePosition >= 1) {\n return new ColorScale([\n { position: 0, color: adjustedLight.clamp() },\n { position: 1, color: this.config.baseColor },\n ]);\n }\n return new ColorScale([\n { position: 0, color: adjustedLight.clamp() },\n {\n position: this.config.baseScalePosition,\n color: this.config.baseColor,\n },\n { position: 1, color: adjustedDark.clamp() },\n ]);\n }\n return new ColorScale([\n { position: 0, color: adjustedLight.clamp() },\n { position: 0.5, color: this.config.baseColor },\n { position: 1, color: adjustedDark.clamp() },\n ]);\n }\n}\nColorPalette.defaultPaletteConfig = {\n baseColor: parseColorHexRGB(\"#808080\"),\n steps: 11,\n interpolationMode: ColorInterpolationSpace.RGB,\n scaleColorLight: new ColorRGBA64(1, 1, 1, 1),\n scaleColorDark: new ColorRGBA64(0, 0, 0, 1),\n clipLight: 0.185,\n clipDark: 0.16,\n saturationAdjustmentCutoff: 0.05,\n saturationLight: 0.35,\n saturationDark: 1.25,\n overlayLight: 0,\n overlayDark: 0.25,\n multiplyLight: 0,\n multiplyDark: 0,\n baseScalePosition: 0.5,\n};\nColorPalette.greyscalePaletteConfig = {\n baseColor: parseColorHexRGB(\"#808080\"),\n steps: 11,\n interpolationMode: ColorInterpolationSpace.RGB,\n scaleColorLight: new ColorRGBA64(1, 1, 1, 1),\n scaleColorDark: new ColorRGBA64(0, 0, 0, 1),\n clipLight: 0,\n clipDark: 0,\n saturationAdjustmentCutoff: 0,\n saturationLight: 0,\n saturationDark: 0,\n overlayLight: 0,\n overlayDark: 0,\n multiplyLight: 0,\n multiplyDark: 0,\n baseScalePosition: 0.5,\n};\n/**\n * Takes the input color and compares it to each color in the reference array to find the index with the closest Lightness value in HSL color space\n * @public\n */\nexport function matchLightnessIndex(input, reference) {\n const hsl = rgbToHSL(input);\n let bestFitValue = Number.MAX_VALUE;\n let bestFitIndex = 0;\n for (let i = 0; i < reference.length; i++) {\n const ihsl = rgbToHSL(reference[i]);\n const fitValue = Math.abs(ihsl.l - hsl.l);\n if (fitValue < bestFitValue) {\n bestFitValue = fitValue;\n bestFitIndex = i;\n }\n }\n return bestFitIndex;\n}\n/**\n * Generates a greyscale palette using greyscaleConfig. The Lightness (in HSL) of the input color is then compared to the greyscale palette to determine how far off center the input color should be placed. The output palette is then generated with outputSteps number of steps using colorConfig.\n * @public\n */\nexport function generateOffCenterPalette(input, outputSteps, greyscaleConfig = ColorPalette.greyscalePaletteConfig, colorConfig = ColorPalette.defaultPaletteConfig) {\n const greyscale = new ColorPalette(Object.assign(Object.assign({}, greyscaleConfig), { steps: outputSteps }));\n const scaleIndex = matchLightnessIndex(input, greyscale.palette);\n return new ColorPalette(Object.assign(Object.assign({}, colorConfig), { steps: outputSteps, baseColor: input, baseScalePosition: scaleIndex / (outputSteps - 1) }));\n}\n/**\n * Take the input array of colors and extrapolates them to a larger palette of size targetSize. If preserveInputColors is false the input colors are evenly distributed into the output. Otherwise, the positions of the input colors are adjusted from a perfectly even distribution in order to ensure that the exact color values appearing in the input array also appear in the output array. The larger targetSize is compared to input.length the smaller those adjustments will be.\n *\n * @public\n */\nexport function rescale(input, targetSize, preserveInputColors) {\n if (input.length <= 1 || targetSize <= 1) {\n throw new Error(\"The input array and targetSize must both be greater than 1\");\n }\n if (preserveInputColors && targetSize <= input.length) {\n throw new Error(\"If preserveInputColors is true then targetSize must be greater than the length of the input array\");\n }\n const stops = new Array(input.length);\n if (preserveInputColors) {\n for (let i = 0; i < input.length; i++) {\n const p = i / (input.length - 1);\n let bestFitValue = 2;\n let bestFitIndex = 0;\n for (let j = 0; j < targetSize; j++) {\n const fitValue = Math.abs(j / (targetSize - 1) - p);\n if (fitValue < bestFitValue) {\n bestFitValue = fitValue;\n bestFitIndex = j;\n }\n if (fitValue === 0) {\n break;\n }\n }\n stops[i] = {\n color: input[i],\n position: bestFitIndex / (targetSize - 1),\n };\n }\n }\n else {\n for (let i = 0; i < stops.length; i++) {\n stops[i] = { color: input[i], position: i / (input.length - 1) };\n }\n }\n const scale = new ColorScale(stops);\n const retVal = new Array(targetSize);\n for (let i = 0; i < targetSize; i++) {\n retVal[i] = scale.getColor(i / (targetSize - 1));\n }\n return retVal;\n}\n/**\n * @public\n */\nexport const defaultCenteredRescaleConfig = {\n targetSize: 63,\n spacing: 4,\n scaleColorLight: ColorPalette.defaultPaletteConfig.scaleColorLight,\n scaleColorDark: ColorPalette.defaultPaletteConfig.scaleColorDark,\n};\n/**\n * Takes an input array of colors and extrapolates them to a larger palette. The mapping first takes the input array and extrapolates between each color so that they are separated by spacing-1 slots. Then it adds to either end enough new colors to make up the desired targetSize. All output color slots between the defined stops are interpolated.\n * @example\n * For an input array with length 5, a targetSize of 17 and spacing of 3 the output would be:\n * 0: scaleColorLight\n * 1:\n * 2: input 0\n * 3:\n * 4:\n * 5: input 1\n * 6:\n * 7:\n * 8: input 2\n * 9:\n * 10:\n * 11: input 3\n * 12:\n * 13:\n * 14: input 4\n * 15:\n * 16: scaleColorDark\n *\n * @public\n */\nexport function centeredRescale(input, config = defaultCenteredRescaleConfig) {\n if (input.length === 0) {\n return [];\n }\n const offset = Math.floor((config.targetSize - ((input.length - 1) * config.spacing + 1)) / 2);\n if (offset < 0) {\n throw new Error(\"(targetSize - ((input.length - 1) * spacing + 1)) / 2 must be >= 0\");\n }\n const stops = new Array(input.length + 2);\n stops[0] = { position: 0, color: config.scaleColorLight };\n stops[stops.length - 1] = {\n position: 1,\n color: config.scaleColorDark,\n };\n for (let i = 0; i < input.length; i++) {\n stops[i + 1] = {\n color: input[i],\n position: (i * config.spacing + offset) / (config.targetSize - 1),\n };\n }\n const scale = new ColorScale(stops);\n const retVal = new Array(config.targetSize);\n for (let i = 0; i < config.targetSize; i++) {\n retVal[i] = scale.getColor(i / (config.targetSize - 1));\n }\n return retVal;\n}\n/**\n * Generates two palettes of length shortPaletteLength and longPaletteLength from a base color. The base color is compared to the default greyscale palette to determine where it should be placed. The short palette is then fed into centeredRescale to create the long palette. The colors in the short palette are always contained within the long.\n * @public\n */\nexport function generateScaledPalettes(input, shortPaletteLength = 11, config = defaultCenteredRescaleConfig) {\n const shortPalette = generateOffCenterPalette(input, shortPaletteLength);\n const longPalette = centeredRescale(shortPalette.palette, config);\n return { short: shortPalette.palette, long: longPalette };\n}\n","import { ColorRGBA64 } from \"./color-rgba-64.js\";\nimport { ColorPalette } from \"./color-palette.js\";\nimport { hslToRGB, rgbToHSL, rgbToLinearLuminance } from \"./color-converters.js\";\nimport { ColorScale } from \"./color-scale.js\";\nimport { ColorHSL } from \"./color-hsl.js\";\nimport { ColorInterpolationSpace } from \"./color-interpolation.js\";\nimport { parseColorHexRGB } from \"./parse-color.js\";\n/**\n * Creates a color palette for UI components\n * @public\n */\nexport class ComponentStateColorPalette {\n constructor(config) {\n this.palette = [];\n this.config = Object.assign({}, ComponentStateColorPalette.defaultPaletteConfig, config);\n this.regenPalettes();\n }\n regenPalettes() {\n let steps = this.config.steps;\n if (isNaN(steps) || steps < 3) {\n steps = 3;\n }\n // This palette is tuned to go as dark as differences between the levels can be perceived according to tests\n // on numerous monitors in different conditions. Stay linear from white until this first cutoff.\n const darkLum = 0.14;\n // In the dark compression, this is the last luminance value before full black.\n const darkestLum = 0.06;\n // The Color for the luminance value above, placed on the ramp at it's normal position, so darker colors after\n // it can be compressed.\n const darkLumColor = new ColorRGBA64(darkLum, darkLum, darkLum, 1);\n // The number of steps in the ramp that has been tuned for default use. This coincides with the size of the\n // default ramp, but the palette could be generated with fewer steps to increase final contrast. This number\n // should however stay the same.\n const stepsForLuminanceRamp = 94;\n // Create the reference, dark-compressed, grey palette, like:\n // F------------------------------------------------------------------------------------[dark]------[darkest]0\n // |--compressed area--|\n const r = new ColorPalette(Object.assign(Object.assign({}, ColorPalette.greyscalePaletteConfig), { baseColor: darkLumColor, baseScalePosition: ((1 - darkLum) * 100) / stepsForLuminanceRamp, steps }));\n const referencePalette = r.palette;\n // Find the requested base color on the adjusted luminance reference ramp.\n // There is no _right_ way to desaturate a color, and both methods we've tested have value, so average them out.\n const baseColorLum1 = rgbToLinearLuminance(this.config.baseColor);\n const baseColorLum2 = rgbToHSL(this.config.baseColor).l;\n const baseColorLum = (baseColorLum1 + baseColorLum2) / 2;\n const baseColorRefIndex = this.matchRelativeLuminanceIndex(baseColorLum, referencePalette);\n const baseColorPercent = baseColorRefIndex / (steps - 1);\n // Find the luminance location for the dark cutoff.\n const darkRefIndex = this.matchRelativeLuminanceIndex(darkLum, referencePalette);\n const darkPercent = darkRefIndex / (steps - 1);\n // Issue https://github.com/microsoft/fast/issues/1904\n // Creating a color from H, S, and a known L value is not the inverse of getting the relative\n // luminace as above. Need to derive a relative luminance version of the color to better match on the dark end.\n // Find the dark cutoff and darkest variations of the requested base color.\n const baseColorHSL = rgbToHSL(this.config.baseColor);\n const darkBaseColor = hslToRGB(ColorHSL.fromObject({\n h: baseColorHSL.h,\n s: baseColorHSL.s,\n l: darkLum,\n }));\n const darkestBaseColor = hslToRGB(ColorHSL.fromObject({\n h: baseColorHSL.h,\n s: baseColorHSL.s,\n l: darkestLum,\n }));\n // Create the gradient stops, including the base color and anchor colors for the dark end compression.\n const fullColorScaleStops = new Array(5);\n fullColorScaleStops[0] = {\n position: 0,\n color: new ColorRGBA64(1, 1, 1, 1),\n };\n fullColorScaleStops[1] = {\n position: baseColorPercent,\n color: this.config.baseColor,\n };\n fullColorScaleStops[2] = {\n position: darkPercent,\n color: darkBaseColor,\n };\n fullColorScaleStops[3] = {\n position: 0.99,\n color: darkestBaseColor,\n };\n fullColorScaleStops[4] = {\n position: 1,\n color: new ColorRGBA64(0, 0, 0, 1),\n };\n const scale = new ColorScale(fullColorScaleStops);\n // Create the palette.\n this.palette = new Array(steps);\n for (let i = 0; i < steps; i++) {\n const c = scale.getColor(i / (steps - 1), ColorInterpolationSpace.RGB);\n this.palette[i] = c;\n }\n }\n matchRelativeLuminanceIndex(input, reference) {\n let bestFitValue = Number.MAX_VALUE;\n let bestFitIndex = 0;\n let i = 0;\n const referenceLength = reference.length;\n for (; i < referenceLength; i++) {\n const fitValue = Math.abs(rgbToLinearLuminance(reference[i]) - input);\n if (fitValue < bestFitValue) {\n bestFitValue = fitValue;\n bestFitIndex = i;\n }\n }\n return bestFitIndex;\n }\n}\nComponentStateColorPalette.defaultPaletteConfig = {\n baseColor: parseColorHexRGB(\"#808080\"),\n steps: 94,\n};\n","/**\n * @internal\n */\nexport function binarySearch(valuesToSearch, searchCondition, startIndex = 0, endIndex = valuesToSearch.length - 1) {\n if (endIndex === startIndex) {\n return valuesToSearch[startIndex];\n }\n const middleIndex = Math.floor((endIndex - startIndex) / 2) + startIndex;\n // Check to see if this passes on the item in the center of the array\n // if it does check the previous values\n return searchCondition(valuesToSearch[middleIndex])\n ? binarySearch(valuesToSearch, searchCondition, startIndex, middleIndex // include this index because it passed the search condition\n )\n : binarySearch(valuesToSearch, searchCondition, middleIndex + 1, // exclude this index because it failed the search condition\n endIndex);\n}\n","import { isDark } from './is-dark.js';\n/**\n * @internal\n */\nexport function directionByIsDark(color) {\n return isDark(color) ? -1 : 1;\n}\n","import { clamp, ColorRGBA64, ComponentStateColorPalette, parseColorHexRGB } from '@microsoft/fast-colors';\nimport { isSwatchRGB, SwatchRGB } from './swatch.js';\nimport { binarySearch } from './utilities/binary-search.js';\nimport { directionByIsDark } from './utilities/direction-by-is-dark.js';\nimport { contrast } from './utilities/relative-luminance.js';\nfunction create(rOrSource, g, b) {\n if (typeof rOrSource === 'number') {\n /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\n return PaletteRGB.from(SwatchRGB.create(rOrSource, g, b));\n }\n else {\n return PaletteRGB.from(rOrSource);\n }\n}\nfunction from(source) {\n return isSwatchRGB(source)\n ? PaletteRGBImpl.from(source)\n : PaletteRGBImpl.from(SwatchRGB.create(source.r, source.g, source.b));\n}\n/** @public */\nexport const PaletteRGB = Object.freeze({\n create,\n from\n});\n/**\n * A {@link Palette} representing RGB swatch values.\n * @public\n */\nclass PaletteRGBImpl {\n /**\n *\n * @param source - The source color for the palette\n * @param swatches - All swatches in the palette\n */\n constructor(source, swatches) {\n this.closestIndexCache = new Map();\n this.source = source;\n this.swatches = swatches;\n this.reversedSwatches = Object.freeze([...this.swatches].reverse());\n this.lastIndex = this.swatches.length - 1;\n }\n /**\n * {@inheritdoc Palette.colorContrast}\n */\n colorContrast(reference, contrastTarget, initialSearchIndex, direction) {\n if (initialSearchIndex === undefined) {\n initialSearchIndex = this.closestIndexOf(reference);\n }\n let source = this.swatches;\n const endSearchIndex = this.lastIndex;\n let startSearchIndex = initialSearchIndex;\n if (direction === undefined) {\n direction = directionByIsDark(reference);\n }\n const condition = (value) => contrast(reference, value) >= contrastTarget;\n if (direction === -1) {\n source = this.reversedSwatches;\n startSearchIndex = endSearchIndex - startSearchIndex;\n }\n return binarySearch(source, condition, startSearchIndex, endSearchIndex);\n }\n /**\n * {@inheritdoc Palette.get}\n */\n get(index) {\n return (this.swatches[index] || this.swatches[clamp(index, 0, this.lastIndex)]);\n }\n /**\n * {@inheritdoc Palette.closestIndexOf}\n */\n closestIndexOf(reference) {\n if (this.closestIndexCache.has(reference.relativeLuminance)) {\n /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\n return this.closestIndexCache.get(reference.relativeLuminance);\n }\n let index = this.swatches.indexOf(reference);\n if (index !== -1) {\n this.closestIndexCache.set(reference.relativeLuminance, index);\n return index;\n }\n const closest = this.swatches.reduce((previous, next) => Math.abs(next.relativeLuminance - reference.relativeLuminance) <\n Math.abs(previous.relativeLuminance - reference.relativeLuminance)\n ? next\n : previous);\n index = this.swatches.indexOf(closest);\n this.closestIndexCache.set(reference.relativeLuminance, index);\n return index;\n }\n /**\n * Create a color palette from a provided swatch\n * @param source - The source swatch to create a palette from\n * @returns\n */\n static from(source) {\n return new PaletteRGBImpl(source, Object.freeze(new ComponentStateColorPalette({\n /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\n baseColor: ColorRGBA64.fromObject(source)\n }).palette.map(x => {\n /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\n const _x = parseColorHexRGB(x.toStringHexRGB());\n return SwatchRGB.create(_x.r, _x.g, _x.b);\n })));\n }\n}\n","/**\n * @internal\n */\nexport function accentFill(palette, neutralPalette, reference, hoverDelta, activeDelta, focusDelta, neutralFillRestDelta, neutralFillHoverDelta, neutralFillActiveDelta) {\n const accent = palette.source;\n const referenceIndex = neutralPalette.closestIndexOf(reference);\n const swapThreshold = Math.max(neutralFillRestDelta, neutralFillHoverDelta, neutralFillActiveDelta);\n const direction = referenceIndex >= swapThreshold ? -1 : 1;\n const accentIndex = palette.closestIndexOf(accent);\n const hoverIndex = accentIndex;\n const restIndex = hoverIndex + direction * -1 * hoverDelta;\n const activeIndex = restIndex + direction * activeDelta;\n const focusIndex = restIndex + direction * focusDelta;\n return {\n rest: palette.get(restIndex),\n hover: palette.get(hoverIndex),\n active: palette.get(activeIndex),\n focus: palette.get(focusIndex)\n };\n}\n","import { directionByIsDark } from '../utilities/direction-by-is-dark.js';\n/**\n * @internal\n */\nexport function accentForeground(palette, reference, contrastTarget, restDelta, hoverDelta, activeDelta, focusDelta) {\n const accent = palette.source;\n const accentIndex = palette.closestIndexOf(accent);\n const direction = directionByIsDark(reference);\n const startIndex = accentIndex +\n (direction === 1\n ? Math.min(restDelta, hoverDelta)\n : Math.max(direction * restDelta, direction * hoverDelta));\n const accessibleSwatch = palette.colorContrast(reference, contrastTarget, startIndex, direction);\n const accessibleIndex1 = palette.closestIndexOf(accessibleSwatch);\n const accessibleIndex2 = accessibleIndex1 + direction * Math.abs(restDelta - hoverDelta);\n const indexOneIsRestState = direction === 1\n ? restDelta < hoverDelta\n : direction * restDelta > direction * hoverDelta;\n let restIndex;\n let hoverIndex;\n if (indexOneIsRestState) {\n restIndex = accessibleIndex1;\n hoverIndex = accessibleIndex2;\n }\n else {\n restIndex = accessibleIndex2;\n hoverIndex = accessibleIndex1;\n }\n return {\n rest: palette.get(restIndex),\n hover: palette.get(hoverIndex),\n active: palette.get(restIndex + direction * activeDelta),\n focus: palette.get(restIndex + direction * focusDelta)\n };\n}\n","import { parseColorHexRGB } from '@microsoft/fast-colors';\nimport { SwatchRGB } from '../swatch.js';\n/**\n * @internal\n */\nexport const white = SwatchRGB.create(1, 1, 1);\n/**\n * @internal\n */\nexport const black = SwatchRGB.create(0, 0, 0);\n/**\n * @internal\n */\n/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\nexport const middleGrey = SwatchRGB.from(parseColorHexRGB('#808080'));\n/**\n * @internal\n */\n/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\nexport const accentBase = SwatchRGB.from(parseColorHexRGB('#DA1A5F'));\n/**\n * @internal\n */\n/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\nexport const errorBase = SwatchRGB.from(parseColorHexRGB('#D32F2F'));\n","import { black, white } from '../utilities/color-constants.js';\n/**\n * @internal\n */\nexport function foregroundOnAccent(reference, contrastTarget) {\n return reference.contrast(white) >= contrastTarget ? white : black;\n}\n","/**\n *\n * @param palette - The palette to operate on\n * @param reference - The reference color to calculate a color for\n * @param delta - The offset from the reference's location\n * @param threshold - Determines if a lighter or darker color than the reference will be picked.\n * @returns\n *\n * @internal\n */\nexport function neutralFill(palette, reference, restDelta, hoverDelta, activeDelta, focusDelta) {\n const referenceIndex = palette.closestIndexOf(reference);\n const threshold = Math.max(restDelta, hoverDelta, activeDelta, focusDelta);\n const direction = referenceIndex >= threshold ? -1 : 1;\n return {\n rest: palette.get(referenceIndex + direction * restDelta),\n hover: palette.get(referenceIndex + direction * hoverDelta),\n active: palette.get(referenceIndex + direction * activeDelta),\n focus: palette.get(referenceIndex + direction * focusDelta)\n };\n}\n","import { directionByIsDark } from '../utilities/direction-by-is-dark.js';\n/**\n * @internal\n */\nexport function neutralFillInput(palette, reference, restDelta, hoverDelta, activeDelta, focusDelta) {\n const direction = directionByIsDark(reference);\n const referenceIndex = palette.closestIndexOf(reference);\n return {\n rest: palette.get(referenceIndex - direction * restDelta),\n hover: palette.get(referenceIndex - direction * hoverDelta),\n active: palette.get(referenceIndex - direction * activeDelta),\n focus: palette.get(referenceIndex - direction * focusDelta)\n };\n}\n","/**\n * @internal\n */\nexport function neutralFillLayer(palette, reference, delta) {\n const referenceIndex = palette.closestIndexOf(reference);\n return palette.get(referenceIndex - (referenceIndex < delta ? delta * -1 : delta));\n}\n","/**\n * @internal\n */\nexport function neutralFillStealth(palette, reference, restDelta, hoverDelta, activeDelta, focusDelta, fillRestDelta, fillHoverDelta, fillActiveDelta, fillFocusDelta) {\n const swapThreshold = Math.max(restDelta, hoverDelta, activeDelta, focusDelta, fillRestDelta, fillHoverDelta, fillActiveDelta, fillFocusDelta);\n const referenceIndex = palette.closestIndexOf(reference);\n const direction = referenceIndex >= swapThreshold ? -1 : 1;\n return {\n rest: palette.get(referenceIndex + direction * restDelta),\n hover: palette.get(referenceIndex + direction * hoverDelta),\n active: palette.get(referenceIndex + direction * activeDelta),\n focus: palette.get(referenceIndex + direction * focusDelta)\n };\n}\n","import { directionByIsDark } from '../utilities/direction-by-is-dark.js';\n/**\n * @internal\n */\nexport function neutralFillContrast(palette, reference, restDelta, hoverDelta, activeDelta, focusDelta) {\n const direction = directionByIsDark(reference);\n const accessibleIndex = palette.closestIndexOf(palette.colorContrast(reference, 4.5));\n const accessibleIndex2 = accessibleIndex + direction * Math.abs(restDelta - hoverDelta);\n const indexOneIsRest = direction === 1\n ? restDelta < hoverDelta\n : direction * restDelta > direction * hoverDelta;\n let restIndex;\n let hoverIndex;\n if (indexOneIsRest) {\n restIndex = accessibleIndex;\n hoverIndex = accessibleIndex2;\n }\n else {\n restIndex = accessibleIndex2;\n hoverIndex = accessibleIndex;\n }\n return {\n rest: palette.get(restIndex),\n hover: palette.get(hoverIndex),\n active: palette.get(restIndex + direction * activeDelta),\n focus: palette.get(restIndex + direction * focusDelta)\n };\n}\n","import { directionByIsDark } from '../utilities/direction-by-is-dark.js';\n/** @internal */\nexport function focusStrokeOuter(palette, reference) {\n return palette.colorContrast(reference, 3.5);\n}\n/** @internal */\nexport function focusStrokeInner(palette, reference, focusColor) {\n return palette.colorContrast(focusColor, 3.5, palette.closestIndexOf(palette.source), (directionByIsDark(reference) * -1));\n}\n","/**\n * @internal\n */\nexport function neutralForeground(palette, reference) {\n return palette.colorContrast(reference, 14);\n}\n","/**\n * The neutralForegroundHint color recipe\n * @param palette - The palette to operate on\n * @param reference - The reference color\n *\n * @internal\n */\nexport function neutralForegroundHint(palette, reference) {\n return palette.colorContrast(reference, 4.5);\n}\n","import { baseLayerLuminanceSwatch } from '../utilities/base-layer-luminance.js';\n/**\n * @internal\n */\nexport function neutralLayerCardContainer(palette, relativeLuminance, layerDelta) {\n return palette.get(palette.closestIndexOf(baseLayerLuminanceSwatch(relativeLuminance)) +\n layerDelta);\n}\n","import { baseLayerLuminanceSwatch } from '../utilities/base-layer-luminance.js';\n/**\n * @internal\n */\nexport function neutralLayerFloating(palette, relativeLuminance, layerDelta) {\n const cardIndex = palette.closestIndexOf(baseLayerLuminanceSwatch(relativeLuminance)) -\n layerDelta;\n return palette.get(cardIndex - layerDelta);\n}\n","import { baseLayerLuminanceSwatch } from '../utilities/base-layer-luminance.js';\nexport function neutralLayer1(palette, baseLayerLuminance) {\n return palette.get(palette.closestIndexOf(baseLayerLuminanceSwatch(baseLayerLuminance)));\n}\n","import { baseLayerLuminanceSwatch } from '../utilities/base-layer-luminance.js';\n/**\n * @internal\n */\nexport function neutralLayer2Index(palette, luminance, layerDelta, fillRestDelta, fillHoverDelta, fillActiveDelta) {\n return Math.max(palette.closestIndexOf(baseLayerLuminanceSwatch(luminance)) + layerDelta, fillRestDelta, fillHoverDelta, fillActiveDelta);\n}\n/**\n * @internal\n */\nexport function neutralLayer2(palette, luminance, layerDelta, fillRestDelta, fillHoverDelta, fillActiveDelta) {\n return palette.get(neutralLayer2Index(palette, luminance, layerDelta, fillRestDelta, fillHoverDelta, fillActiveDelta));\n}\n","import { neutralLayer2Index } from './neutral-layer-2.js';\n/**\n * @internal\n */\nexport function neutralLayer3(palette, luminance, layerDelta, fillRestDelta, fillHoverDelta, fillActiveDelta) {\n return palette.get(neutralLayer2Index(palette, luminance, layerDelta, fillRestDelta, fillHoverDelta, fillActiveDelta) + layerDelta);\n}\n","import { neutralLayer2Index } from './neutral-layer-2.js';\n/**\n * @internal\n */\nexport function neutralLayer4(palette, luminance, layerDelta, fillRestDelta, fillHoverDelta, fillActiveDelta) {\n return palette.get(neutralLayer2Index(palette, luminance, layerDelta, fillRestDelta, fillHoverDelta, fillActiveDelta) +\n layerDelta * 2);\n}\n","import { directionByIsDark } from '../utilities/direction-by-is-dark.js';\n/**\n * @internal\n */\nexport function neutralStroke(palette, reference, restDelta, hoverDelta, activeDelta, focusDelta) {\n const referenceIndex = palette.closestIndexOf(reference);\n const direction = directionByIsDark(reference);\n const restIndex = referenceIndex + direction * restDelta;\n const hoverIndex = restIndex + direction * (hoverDelta - restDelta);\n const activeIndex = restIndex + direction * (activeDelta - restDelta);\n const focusIndex = restIndex + direction * (focusDelta - restDelta);\n return {\n rest: palette.get(restIndex),\n hover: palette.get(hoverIndex),\n active: palette.get(activeIndex),\n focus: palette.get(focusIndex)\n };\n}\n","import { directionByIsDark } from '../utilities/direction-by-is-dark.js';\n/**\n * The neutralStrokeDivider color recipe\n * @param palette - The palette to operate on\n * @param reference - The reference color\n * @param delta - The offset from the reference\n *\n * @internal\n */\nexport function neutralStrokeDivider(palette, reference, delta) {\n return palette.get(palette.closestIndexOf(reference) + directionByIsDark(reference) * delta);\n}\n","import { isDark } from '../utilities/is-dark.js';\nexport function errorFillAlgorithm(palette, neutralPalette, reference, hoverDelta, activeDelta, focusDelta, neutralFillRestDelta, neutralFillHoverDelta, neutralFillActiveDelta) {\n const error = palette.source;\n const referenceIndex = neutralPalette.closestIndexOf(reference);\n const swapThreshold = Math.max(neutralFillRestDelta, neutralFillHoverDelta, neutralFillActiveDelta);\n const direction = referenceIndex >= swapThreshold ? -1 : 1;\n const errorIndex = palette.closestIndexOf(error);\n const hoverIndex = errorIndex;\n const restIndex = hoverIndex + direction * -1 * hoverDelta;\n const activeIndex = restIndex + direction * activeDelta;\n const focusIndex = restIndex + direction * focusDelta;\n return {\n rest: palette.get(restIndex),\n hover: palette.get(hoverIndex),\n active: palette.get(activeIndex),\n focus: palette.get(focusIndex)\n };\n}\n/**\n * @internal\n */\nexport function errorForegroundAlgorithm(palette, reference, contrastTarget, restDelta, hoverDelta, activeDelta, focusDelta) {\n const error = palette.source;\n const errorIndex = palette.closestIndexOf(error);\n const direction = isDark(reference) ? -1 : 1;\n const startIndex = errorIndex +\n (direction === 1\n ? Math.min(restDelta, hoverDelta)\n : Math.max(direction * restDelta, direction * hoverDelta));\n const accessibleSwatch = palette.colorContrast(reference, contrastTarget, startIndex, direction);\n const accessibleIndex1 = palette.closestIndexOf(accessibleSwatch);\n const accessibleIndex2 = accessibleIndex1 + direction * Math.abs(restDelta - hoverDelta);\n const indexOneIsRestState = direction === 1\n ? restDelta < hoverDelta\n : direction * restDelta > direction * hoverDelta;\n let restIndex;\n let hoverIndex;\n if (indexOneIsRestState) {\n restIndex = accessibleIndex1;\n hoverIndex = accessibleIndex2;\n }\n else {\n restIndex = accessibleIndex2;\n hoverIndex = accessibleIndex1;\n }\n return {\n rest: palette.get(restIndex),\n hover: palette.get(hoverIndex),\n active: palette.get(restIndex + direction * activeDelta),\n focus: palette.get(restIndex + direction * focusDelta)\n };\n}\n","import { black, white } from '../utilities/color-constants.js';\n/**\n * @internal\n */\nexport function foregroundOnErrorAlgorithm(reference, contrastTarget) {\n return reference.contrast(white) >= contrastTarget ? white : black;\n}\n","// Copyright (c) Jupyter Development Team.\n// Copyright (c) Microsoft Corporation.\n// Distributed under the terms of the Modified BSD License.\nimport { DesignToken } from '@microsoft/fast-foundation';\nimport { Direction } from '@microsoft/fast-web-utilities';\nimport { PaletteRGB } from './color/palette.js';\nimport { accentFill as accentFillAlgorithm } from './color/recipes/accent-fill.js';\nimport { accentForeground as accentForegroundAlgorithm } from './color/recipes/accent-foreground.js';\nimport { foregroundOnAccent as foregroundOnAccentAlgorithm } from './color/recipes/foreground-on-accent.js';\nimport { neutralFill as neutralFillAlgorithm } from './color/recipes/neutral-fill.js';\nimport { neutralFillInput as neutralFillInputAlgorithm } from './color/recipes/neutral-fill-input.js';\nimport { neutralFillLayer as neutralFillLayerAlgorithm } from './color/recipes/neutral-fill-layer.js';\nimport { neutralFillStealth as neutralFillStealthAlgorithm } from './color/recipes/neutral-fill-stealth.js';\nimport { neutralFillContrast as neutralFillContrastAlgorithm } from './color/recipes/neutral-fill-contrast.js';\nimport { focusStrokeInner as focusStrokeInnerAlgorithm, focusStrokeOuter as focusStrokeOuterAlgorithm } from './color/recipes/focus-stroke.js';\nimport { neutralForeground as neutralForegroundAlgorithm } from './color/recipes/neutral-foreground.js';\nimport { neutralForegroundHint as neutralForegroundHintAlgorithm } from './color/recipes/neutral-foreground-hint.js';\nimport { neutralLayerCardContainer as neutralLayerCardContainerAlgorithm } from './color/recipes/neutral-layer-card-container.js';\nimport { neutralLayerFloating as neutralLayerFloatingAlgorithm } from './color/recipes/neutral-layer-floating.js';\nimport { neutralLayer1 as neutralLayer1Algorithm } from './color/recipes/neutral-layer-1.js';\nimport { neutralLayer2 as neutralLayer2Algorithm } from './color/recipes/neutral-layer-2.js';\nimport { neutralLayer3 as neutralLayer3Algorithm } from './color/recipes/neutral-layer-3.js';\nimport { neutralLayer4 as neutralLayer4Algorithm } from './color/recipes/neutral-layer-4.js';\nimport { neutralStroke as neutralStrokeAlgorithm } from './color/recipes/neutral-stroke.js';\nimport { neutralStrokeDivider as neutralStrokeDividerAlgorithm } from './color/recipes/neutral-stroke-divider.js';\nimport { StandardLuminance } from './color/utilities/base-layer-luminance.js';\nimport { accentBase, errorBase, middleGrey } from './color/utilities/color-constants.js';\nimport { errorFillAlgorithm, errorForegroundAlgorithm } from './color/recipes/error-fill.js';\nimport { foregroundOnErrorAlgorithm } from './color/recipes/foreground-on-error.js';\nconst { create } = DesignToken;\nfunction createNonCss(name) {\n return DesignToken.create({ name, cssCustomPropertyName: null });\n}\n// General tokens\n/** @public */\nexport const bodyFont = create('body-font').withDefault('aktiv-grotesk, \"Segoe UI\", Arial, Helvetica, sans-serif');\n/** @public */\nexport const baseHeightMultiplier = create('base-height-multiplier').withDefault(10);\n/** @public */\nexport const baseHorizontalSpacingMultiplier = create('base-horizontal-spacing-multiplier').withDefault(3);\n/** @public */\nexport const baseLayerLuminance = create('base-layer-luminance').withDefault(StandardLuminance.DarkMode);\n/** @public */\nexport const controlCornerRadius = create('control-corner-radius').withDefault(4);\n/** @public */\nexport const density = create('density').withDefault(0);\n/** @public */\nexport const designUnit = create('design-unit').withDefault(4);\n/**\n * Adds to the density on specified element.\n *\n * @private\n */\nexport const elementScale = create('element-scale').withDefault(0);\n/** @public */\nexport const direction = create('direction').withDefault(Direction.ltr);\n/** @public */\nexport const disabledOpacity = create('disabled-opacity').withDefault(0.4);\n/** @public */\nexport const strokeWidth = create('stroke-width').withDefault(1);\n/** @public */\nexport const focusStrokeWidth = create('focus-stroke-width').withDefault(2);\n// Typography values\n/** @public */\nexport const typeRampBaseFontSize = create('type-ramp-base-font-size').withDefault('14px');\n/** @public */\nexport const typeRampBaseLineHeight = create('type-ramp-base-line-height').withDefault('20px');\n/** @public */\nexport const typeRampMinus1FontSize = create('type-ramp-minus-1-font-size').withDefault('12px');\n/** @public */\nexport const typeRampMinus1LineHeight = create('type-ramp-minus-1-line-height').withDefault('16px');\n/** @public */\nexport const typeRampMinus2FontSize = create('type-ramp-minus-2-font-size').withDefault('10px');\n/** @public */\nexport const typeRampMinus2LineHeight = create('type-ramp-minus-2-line-height').withDefault('16px');\n/** @public */\nexport const typeRampPlus1FontSize = create('type-ramp-plus-1-font-size').withDefault('16px');\n/** @public */\nexport const typeRampPlus1LineHeight = create('type-ramp-plus-1-line-height').withDefault('24px');\n/** @public */\nexport const typeRampPlus2FontSize = create('type-ramp-plus-2-font-size').withDefault('20px');\n/** @public */\nexport const typeRampPlus2LineHeight = create('type-ramp-plus-2-line-height').withDefault('28px');\n/** @public */\nexport const typeRampPlus3FontSize = create('type-ramp-plus-3-font-size').withDefault('28px');\n/** @public */\nexport const typeRampPlus3LineHeight = create('type-ramp-plus-3-line-height').withDefault('36px');\n/** @public */\nexport const typeRampPlus4FontSize = create('type-ramp-plus-4-font-size').withDefault('34px');\n/** @public */\nexport const typeRampPlus4LineHeight = create('type-ramp-plus-4-line-height').withDefault('44px');\n/** @public */\nexport const typeRampPlus5FontSize = create('type-ramp-plus-5-font-size').withDefault('46px');\n/** @public */\nexport const typeRampPlus5LineHeight = create('type-ramp-plus-5-line-height').withDefault('56px');\n/** @public */\nexport const typeRampPlus6FontSize = create('type-ramp-plus-6-font-size').withDefault('60px');\n/** @public */\nexport const typeRampPlus6LineHeight = create('type-ramp-plus-6-line-height').withDefault('72px');\n// Color recipe values\n/** @public */\nexport const accentFillRestDelta = createNonCss('accent-fill-rest-delta').withDefault(0);\n/** @public */\nexport const accentFillHoverDelta = createNonCss('accent-fill-hover-delta').withDefault(4);\n/** @public */\nexport const accentFillActiveDelta = createNonCss('accent-fill-active-delta').withDefault(-5);\n/** @public */\nexport const accentFillFocusDelta = createNonCss('accent-fill-focus-delta').withDefault(0);\n/** @public */\nexport const accentForegroundRestDelta = createNonCss('accent-foreground-rest-delta').withDefault(0);\n/** @public */\nexport const accentForegroundHoverDelta = createNonCss('accent-foreground-hover-delta').withDefault(6);\n/** @public */\nexport const accentForegroundActiveDelta = createNonCss('accent-foreground-active-delta').withDefault(-4);\n/** @public */\nexport const accentForegroundFocusDelta = createNonCss('accent-foreground-focus-delta').withDefault(0);\n/** @public */\nexport const neutralFillRestDelta = createNonCss('neutral-fill-rest-delta').withDefault(7);\n/** @public */\nexport const neutralFillHoverDelta = createNonCss('neutral-fill-hover-delta').withDefault(10);\n/** @public */\nexport const neutralFillActiveDelta = createNonCss('neutral-fill-active-delta').withDefault(5);\n/** @public */\nexport const neutralFillFocusDelta = createNonCss('neutral-fill-focus-delta').withDefault(0);\n/** @public */\nexport const neutralFillInputRestDelta = createNonCss('neutral-fill-input-rest-delta').withDefault(0);\n/** @public */\nexport const neutralFillInputHoverDelta = createNonCss('neutral-fill-input-hover-delta').withDefault(0);\n/** @public */\nexport const neutralFillInputActiveDelta = createNonCss('neutral-fill-input-active-delta').withDefault(0);\n/** @public */\nexport const neutralFillInputFocusDelta = createNonCss('neutral-fill-input-focus-delta').withDefault(0);\n/** @public */\nexport const neutralFillStealthRestDelta = createNonCss('neutral-fill-stealth-rest-delta').withDefault(0);\n/** @public */\nexport const neutralFillStealthHoverDelta = createNonCss('neutral-fill-stealth-hover-delta').withDefault(5);\n/** @public */\nexport const neutralFillStealthActiveDelta = createNonCss('neutral-fill-stealth-active-delta').withDefault(3);\n/** @public */\nexport const neutralFillStealthFocusDelta = createNonCss('neutral-fill-stealth-focus-delta').withDefault(0);\n/** @public */\nexport const neutralFillStrongRestDelta = createNonCss('neutral-fill-strong-rest-delta').withDefault(0);\n/** @public */\nexport const neutralFillStrongHoverDelta = createNonCss('neutral-fill-strong-hover-delta').withDefault(8);\n/** @public */\nexport const neutralFillStrongActiveDelta = createNonCss('neutral-fill-strong-active-delta').withDefault(-5);\n/** @public */\nexport const neutralFillStrongFocusDelta = createNonCss('neutral-fill-strong-focus-delta').withDefault(0);\n/** @public */\nexport const neutralFillLayerRestDelta = createNonCss('neutral-fill-layer-rest-delta').withDefault(3);\n/** @public */\nexport const neutralStrokeRestDelta = createNonCss('neutral-stroke-rest-delta').withDefault(25);\n/** @public */\nexport const neutralStrokeHoverDelta = createNonCss('neutral-stroke-hover-delta').withDefault(40);\n/** @public */\nexport const neutralStrokeActiveDelta = createNonCss('neutral-stroke-active-delta').withDefault(16);\n/** @public */\nexport const neutralStrokeFocusDelta = createNonCss('neutral-stroke-focus-delta').withDefault(25);\n/** @public */\nexport const neutralStrokeDividerRestDelta = createNonCss('neutral-stroke-divider-rest-delta').withDefault(8);\n// Color recipes\n/** @public */\nexport const neutralColor = create('neutral-color').withDefault(middleGrey);\n/** @public */\nexport const neutralPalette = createNonCss('neutral-palette').withDefault((element) => PaletteRGB.from(neutralColor.getValueFor(element)));\n/** @public */\nexport const accentColor = create('accent-color').withDefault(accentBase);\n/** @public */\nexport const accentPalette = createNonCss('accent-palette').withDefault((element) => PaletteRGB.from(accentColor.getValueFor(element)));\n// Neutral Layer Card Container\n/** @public */\nexport const neutralLayerCardContainerRecipe = createNonCss('neutral-layer-card-container-recipe').withDefault({\n evaluate: (element) => neutralLayerCardContainerAlgorithm(neutralPalette.getValueFor(element), baseLayerLuminance.getValueFor(element), neutralFillLayerRestDelta.getValueFor(element))\n});\n/** @public */\nexport const neutralLayerCardContainer = create('neutral-layer-card-container').withDefault((element) => neutralLayerCardContainerRecipe.getValueFor(element).evaluate(element));\n// Neutral Layer Floating\n/** @public */\nexport const neutralLayerFloatingRecipe = createNonCss('neutral-layer-floating-recipe').withDefault({\n evaluate: (element) => neutralLayerFloatingAlgorithm(neutralPalette.getValueFor(element), baseLayerLuminance.getValueFor(element), neutralFillLayerRestDelta.getValueFor(element))\n});\n/** @public */\nexport const neutralLayerFloating = create('neutral-layer-floating').withDefault((element) => neutralLayerFloatingRecipe.getValueFor(element).evaluate(element));\n// Neutral Layer 1\n/** @public */\nexport const neutralLayer1Recipe = createNonCss('neutral-layer-1-recipe').withDefault({\n evaluate: (element) => neutralLayer1Algorithm(neutralPalette.getValueFor(element), baseLayerLuminance.getValueFor(element))\n});\n/** @public */\nexport const neutralLayer1 = create('neutral-layer-1').withDefault((element) => neutralLayer1Recipe.getValueFor(element).evaluate(element));\n// Neutral Layer 2\n/** @public */\nexport const neutralLayer2Recipe = createNonCss('neutral-layer-2-recipe').withDefault({\n evaluate: (element) => neutralLayer2Algorithm(neutralPalette.getValueFor(element), baseLayerLuminance.getValueFor(element), neutralFillLayerRestDelta.getValueFor(element), neutralFillRestDelta.getValueFor(element), neutralFillHoverDelta.getValueFor(element), neutralFillActiveDelta.getValueFor(element))\n});\n/** @public */\nexport const neutralLayer2 = create('neutral-layer-2').withDefault((element) => neutralLayer2Recipe.getValueFor(element).evaluate(element));\n// Neutral Layer 3\n/** @public */\nexport const neutralLayer3Recipe = createNonCss('neutral-layer-3-recipe').withDefault({\n evaluate: (element) => neutralLayer3Algorithm(neutralPalette.getValueFor(element), baseLayerLuminance.getValueFor(element), neutralFillLayerRestDelta.getValueFor(element), neutralFillRestDelta.getValueFor(element), neutralFillHoverDelta.getValueFor(element), neutralFillActiveDelta.getValueFor(element))\n});\n/** @public */\nexport const neutralLayer3 = create('neutral-layer-3').withDefault((element) => neutralLayer3Recipe.getValueFor(element).evaluate(element));\n// Neutral Layer 4\n/** @public */\nexport const neutralLayer4Recipe = createNonCss('neutral-layer-4-recipe').withDefault({\n evaluate: (element) => neutralLayer4Algorithm(neutralPalette.getValueFor(element), baseLayerLuminance.getValueFor(element), neutralFillLayerRestDelta.getValueFor(element), neutralFillRestDelta.getValueFor(element), neutralFillHoverDelta.getValueFor(element), neutralFillActiveDelta.getValueFor(element))\n});\n/** @public */\nexport const neutralLayer4 = create('neutral-layer-4').withDefault((element) => neutralLayer4Recipe.getValueFor(element).evaluate(element));\n/** @public */\nexport const fillColor = create('fill-color').withDefault(element => neutralLayer1.getValueFor(element));\nvar ContrastTarget;\n(function (ContrastTarget) {\n ContrastTarget[ContrastTarget[\"normal\"] = 4.5] = \"normal\";\n ContrastTarget[ContrastTarget[\"large\"] = 7] = \"large\";\n})(ContrastTarget || (ContrastTarget = {}));\n// Accent Fill\n/** @public */\nexport const accentFillRecipe = create({\n name: 'accent-fill-recipe',\n cssCustomPropertyName: null\n}).withDefault({\n evaluate: (element, reference) => accentFillAlgorithm(accentPalette.getValueFor(element), neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), accentFillHoverDelta.getValueFor(element), accentFillActiveDelta.getValueFor(element), accentFillFocusDelta.getValueFor(element), neutralFillRestDelta.getValueFor(element), neutralFillHoverDelta.getValueFor(element), neutralFillActiveDelta.getValueFor(element))\n});\n/** @public */\nexport const accentFillRest = create('accent-fill-rest').withDefault((element) => {\n return accentFillRecipe.getValueFor(element).evaluate(element).rest;\n});\n/** @public */\nexport const accentFillHover = create('accent-fill-hover').withDefault((element) => {\n return accentFillRecipe.getValueFor(element).evaluate(element).hover;\n});\n/** @public */\nexport const accentFillActive = create('accent-fill-active').withDefault((element) => {\n return accentFillRecipe.getValueFor(element).evaluate(element).active;\n});\n/** @public */\nexport const accentFillFocus = create('accent-fill-focus').withDefault((element) => {\n return accentFillRecipe.getValueFor(element).evaluate(element).focus;\n});\n// Foreground On Accent\nconst foregroundOnAccentByContrast = (contrast) => (element, reference) => {\n return foregroundOnAccentAlgorithm(reference || accentFillRest.getValueFor(element), contrast);\n};\n/** @public */\nexport const foregroundOnAccentRecipe = createNonCss('foreground-on-accent-recipe').withDefault({\n evaluate: (element, reference) => foregroundOnAccentByContrast(ContrastTarget.normal)(element, reference)\n});\n/** @public */\nexport const foregroundOnAccentRest = create('foreground-on-accent-rest').withDefault((element) => foregroundOnAccentRecipe\n .getValueFor(element)\n .evaluate(element, accentFillRest.getValueFor(element)));\n/** @public */\nexport const foregroundOnAccentHover = create('foreground-on-accent-hover').withDefault((element) => foregroundOnAccentRecipe\n .getValueFor(element)\n .evaluate(element, accentFillHover.getValueFor(element)));\n/** @public */\nexport const foregroundOnAccentActive = create('foreground-on-accent-active').withDefault((element) => foregroundOnAccentRecipe\n .getValueFor(element)\n .evaluate(element, accentFillActive.getValueFor(element)));\n/** @public */\nexport const foregroundOnAccentFocus = create('foreground-on-accent-focus').withDefault((element) => foregroundOnAccentRecipe\n .getValueFor(element)\n .evaluate(element, accentFillFocus.getValueFor(element)));\n/** @public */\nexport const foregroundOnAccentLargeRecipe = createNonCss('foreground-on-accent-large-recipe').withDefault({\n evaluate: (element, reference) => foregroundOnAccentByContrast(ContrastTarget.large)(element, reference)\n});\n/** @public */\nexport const foregroundOnAccentRestLarge = create('foreground-on-accent-rest-large').withDefault((element) => foregroundOnAccentLargeRecipe\n .getValueFor(element)\n .evaluate(element, accentFillRest.getValueFor(element)));\n/** @public */\nexport const foregroundOnAccentHoverLarge = create('foreground-on-accent-hover-large').withDefault((element) => foregroundOnAccentLargeRecipe\n .getValueFor(element)\n .evaluate(element, accentFillHover.getValueFor(element)));\n/** @public */\nexport const foregroundOnAccentActiveLarge = create('foreground-on-accent-active-large').withDefault((element) => foregroundOnAccentLargeRecipe\n .getValueFor(element)\n .evaluate(element, accentFillActive.getValueFor(element)));\n/** @public */\nexport const foregroundOnAccentFocusLarge = create('foreground-on-accent-focus-large').withDefault((element) => foregroundOnAccentLargeRecipe\n .getValueFor(element)\n .evaluate(element, accentFillFocus.getValueFor(element)));\n// Accent Foreground\nconst accentForegroundByContrast = (contrast) => (element, reference) => accentForegroundAlgorithm(accentPalette.getValueFor(element), reference || fillColor.getValueFor(element), contrast, accentForegroundRestDelta.getValueFor(element), accentForegroundHoverDelta.getValueFor(element), accentForegroundActiveDelta.getValueFor(element), accentForegroundFocusDelta.getValueFor(element));\n/** @public */\nexport const accentForegroundRecipe = create({\n name: 'accent-foreground-recipe',\n cssCustomPropertyName: null\n}).withDefault({\n evaluate: (element, reference) => accentForegroundByContrast(ContrastTarget.normal)(element, reference)\n});\n/** @public */\nexport const accentForegroundRest = create('accent-foreground-rest').withDefault((element) => accentForegroundRecipe.getValueFor(element).evaluate(element).rest);\n/** @public */\nexport const accentForegroundHover = create('accent-foreground-hover').withDefault((element) => accentForegroundRecipe.getValueFor(element).evaluate(element).hover);\n/** @public */\nexport const accentForegroundActive = create('accent-foreground-active').withDefault((element) => accentForegroundRecipe.getValueFor(element).evaluate(element).active);\n/** @public */\nexport const accentForegroundFocus = create('accent-foreground-focus').withDefault((element) => accentForegroundRecipe.getValueFor(element).evaluate(element).focus);\n// Neutral Fill\n/** @public */\nexport const neutralFillRecipe = create({\n name: 'neutral-fill-recipe',\n cssCustomPropertyName: null\n}).withDefault({\n evaluate: (element, reference) => neutralFillAlgorithm(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), neutralFillRestDelta.getValueFor(element), neutralFillHoverDelta.getValueFor(element), neutralFillActiveDelta.getValueFor(element), neutralFillFocusDelta.getValueFor(element))\n});\n/** @public */\nexport const neutralFillRest = create('neutral-fill-rest').withDefault((element) => neutralFillRecipe.getValueFor(element).evaluate(element).rest);\n/** @public */\nexport const neutralFillHover = create('neutral-fill-hover').withDefault((element) => neutralFillRecipe.getValueFor(element).evaluate(element).hover);\n/** @public */\nexport const neutralFillActive = create('neutral-fill-active').withDefault((element) => neutralFillRecipe.getValueFor(element).evaluate(element).active);\n/** @public */\nexport const neutralFillFocus = create('neutral-fill-focus').withDefault((element) => neutralFillRecipe.getValueFor(element).evaluate(element).focus);\n// Neutral Fill Input\n/** @public */\nexport const neutralFillInputRecipe = create({\n name: 'neutral-fill-input-recipe',\n cssCustomPropertyName: null\n}).withDefault({\n evaluate: (element, reference) => neutralFillInputAlgorithm(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), neutralFillInputRestDelta.getValueFor(element), neutralFillInputHoverDelta.getValueFor(element), neutralFillInputActiveDelta.getValueFor(element), neutralFillInputFocusDelta.getValueFor(element))\n});\n/** @public */\nexport const neutralFillInputRest = create('neutral-fill-input-rest').withDefault((element) => neutralFillInputRecipe.getValueFor(element).evaluate(element).rest);\n/** @public */\nexport const neutralFillInputHover = create('neutral-fill-input-hover').withDefault((element) => neutralFillInputRecipe.getValueFor(element).evaluate(element).hover);\n/** @public */\nexport const neutralFillInputActive = create('neutral-fill-input-active').withDefault((element) => neutralFillInputRecipe.getValueFor(element).evaluate(element).active);\n/** @public */\nexport const neutralFillInputFocus = create('neutral-fill-input-focus').withDefault((element) => neutralFillInputRecipe.getValueFor(element).evaluate(element).focus);\n// Neutral Fill Stealth\n/** @public */\nexport const neutralFillStealthRecipe = create({\n name: 'neutral-fill-stealth-recipe',\n cssCustomPropertyName: null\n}).withDefault({\n evaluate: (element, reference) => neutralFillStealthAlgorithm(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), neutralFillStealthRestDelta.getValueFor(element), neutralFillStealthHoverDelta.getValueFor(element), neutralFillStealthActiveDelta.getValueFor(element), neutralFillStealthFocusDelta.getValueFor(element), neutralFillRestDelta.getValueFor(element), neutralFillHoverDelta.getValueFor(element), neutralFillActiveDelta.getValueFor(element), neutralFillFocusDelta.getValueFor(element))\n});\n/** @public */\nexport const neutralFillStealthRest = create('neutral-fill-stealth-rest').withDefault((element) => neutralFillStealthRecipe.getValueFor(element).evaluate(element).rest);\n/** @public */\nexport const neutralFillStealthHover = create('neutral-fill-stealth-hover').withDefault((element) => neutralFillStealthRecipe.getValueFor(element).evaluate(element).hover);\n/** @public */\nexport const neutralFillStealthActive = create('neutral-fill-stealth-active').withDefault((element) => neutralFillStealthRecipe.getValueFor(element).evaluate(element).active);\n/** @public */\nexport const neutralFillStealthFocus = create('neutral-fill-stealth-focus').withDefault((element) => neutralFillStealthRecipe.getValueFor(element).evaluate(element).focus);\n// Neutral Fill Strong\n/** @public */\nexport const neutralFillStrongRecipe = create({\n name: 'neutral-fill-strong-recipe',\n cssCustomPropertyName: null\n}).withDefault({\n evaluate: (element, reference) => neutralFillContrastAlgorithm(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), neutralFillStrongRestDelta.getValueFor(element), neutralFillStrongHoverDelta.getValueFor(element), neutralFillStrongActiveDelta.getValueFor(element), neutralFillStrongFocusDelta.getValueFor(element))\n});\n/** @public */\nexport const neutralFillStrongRest = create('neutral-fill-strong-rest').withDefault((element) => neutralFillStrongRecipe.getValueFor(element).evaluate(element).rest);\n/** @public */\nexport const neutralFillStrongHover = create('neutral-fill-strong-hover').withDefault((element) => neutralFillStrongRecipe.getValueFor(element).evaluate(element).hover);\n/** @public */\nexport const neutralFillStrongActive = create('neutral-fill-strong-active').withDefault((element) => neutralFillStrongRecipe.getValueFor(element).evaluate(element).active);\n/** @public */\nexport const neutralFillStrongFocus = create('neutral-fill-strong-focus').withDefault((element) => neutralFillStrongRecipe.getValueFor(element).evaluate(element).focus);\n// Neutral Fill Layer\n/** @public */\nexport const neutralFillLayerRecipe = createNonCss('neutral-fill-layer-recipe').withDefault({\n evaluate: (element, reference) => neutralFillLayerAlgorithm(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), neutralFillLayerRestDelta.getValueFor(element))\n});\n/** @public */\nexport const neutralFillLayerRest = create('neutral-fill-layer-rest').withDefault((element) => neutralFillLayerRecipe.getValueFor(element).evaluate(element));\n// Focus Stroke Outer\n/** @public */\nexport const focusStrokeOuterRecipe = createNonCss('focus-stroke-outer-recipe').withDefault({\n evaluate: (element) => focusStrokeOuterAlgorithm(neutralPalette.getValueFor(element), fillColor.getValueFor(element))\n});\n/** @public */\nexport const focusStrokeOuter = create('focus-stroke-outer').withDefault((element) => focusStrokeOuterRecipe.getValueFor(element).evaluate(element));\n// Focus Stroke Inner\n/** @public */\nexport const focusStrokeInnerRecipe = createNonCss('focus-stroke-inner-recipe').withDefault({\n evaluate: (element) => focusStrokeInnerAlgorithm(accentPalette.getValueFor(element), fillColor.getValueFor(element), focusStrokeOuter.getValueFor(element))\n});\n/** @public */\nexport const focusStrokeInner = create('focus-stroke-inner').withDefault((element) => focusStrokeInnerRecipe.getValueFor(element).evaluate(element));\n// Neutral Foreground Hint\n/** @public */\nexport const neutralForegroundHintRecipe = createNonCss('neutral-foreground-hint-recipe').withDefault({\n evaluate: (element) => neutralForegroundHintAlgorithm(neutralPalette.getValueFor(element), fillColor.getValueFor(element))\n});\n/** @public */\nexport const neutralForegroundHint = create('neutral-foreground-hint').withDefault((element) => neutralForegroundHintRecipe.getValueFor(element).evaluate(element));\n// Neutral Foreground\n/** @public */\nexport const neutralForegroundRecipe = createNonCss('neutral-foreground-recipe').withDefault({\n evaluate: (element) => neutralForegroundAlgorithm(neutralPalette.getValueFor(element), fillColor.getValueFor(element))\n});\n/** @public */\nexport const neutralForegroundRest = create('neutral-foreground-rest').withDefault((element) => neutralForegroundRecipe.getValueFor(element).evaluate(element));\n// Neutral Stroke\n/** @public */\nexport const neutralStrokeRecipe = create({\n name: 'neutral-stroke-recipe',\n cssCustomPropertyName: null\n}).withDefault({\n evaluate: (element) => {\n return neutralStrokeAlgorithm(neutralPalette.getValueFor(element), fillColor.getValueFor(element), neutralStrokeRestDelta.getValueFor(element), neutralStrokeHoverDelta.getValueFor(element), neutralStrokeActiveDelta.getValueFor(element), neutralStrokeFocusDelta.getValueFor(element));\n }\n});\n/** @public */\nexport const neutralStrokeRest = create('neutral-stroke-rest').withDefault((element) => neutralStrokeRecipe.getValueFor(element).evaluate(element).rest);\n/** @public */\nexport const neutralStrokeHover = create('neutral-stroke-hover').withDefault((element) => neutralStrokeRecipe.getValueFor(element).evaluate(element).hover);\n/** @public */\nexport const neutralStrokeActive = create('neutral-stroke-active').withDefault((element) => neutralStrokeRecipe.getValueFor(element).evaluate(element).active);\n/** @public */\nexport const neutralStrokeFocus = create('neutral-stroke-focus').withDefault((element) => neutralStrokeRecipe.getValueFor(element).evaluate(element).focus);\n// Neutral Stroke Divider\n/** @public */\nexport const neutralStrokeDividerRecipe = createNonCss('neutral-stroke-divider-recipe').withDefault({\n evaluate: (element, reference) => neutralStrokeDividerAlgorithm(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), neutralStrokeDividerRestDelta.getValueFor(element))\n});\n/** @public */\nexport const neutralStrokeDividerRest = create('neutral-stroke-divider-rest').withDefault(element => neutralStrokeDividerRecipe.getValueFor(element).evaluate(element));\n/**\n * The control height formula expressed as a design token.\n * This token does not provide a CSS custom property.\n *\n * @public\n */\nexport const heightNumberAsToken = DesignToken.create({\n name: 'height-number',\n cssCustomPropertyName: null\n}).withDefault(target => (baseHeightMultiplier.getValueFor(target) + density.getValueFor(target)) *\n designUnit.getValueFor(target));\n/*\n * The error palette is built using the same color algorithm as the accent palette\n * But by copying the algorithm from @microsoft/fast-components at commit 03d711f222bd816834a5e1d60256d3e083b27c27\n * as some helpers are not exported.\n * The delta used are those of the accent palette.\n */\n/** @public */\nexport const errorColor = create('error-color').withDefault(errorBase);\n/**\n * Error palette\n * @public\n */\nexport const errorPalette = createNonCss('error-palette').withDefault((element) => PaletteRGB.from(errorColor.getValueFor(element)));\n// Error Fill\n/** @public */\nexport const errorFillRecipe = create({\n name: 'error-fill-recipe',\n cssCustomPropertyName: null\n}).withDefault({\n evaluate: (element, reference) => errorFillAlgorithm(errorPalette.getValueFor(element), neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), accentFillHoverDelta.getValueFor(element), accentFillActiveDelta.getValueFor(element), accentFillFocusDelta.getValueFor(element), neutralFillRestDelta.getValueFor(element), neutralFillHoverDelta.getValueFor(element), neutralFillActiveDelta.getValueFor(element))\n});\n/** @public */\nexport const errorFillRest = create('error-fill-rest').withDefault((element) => {\n return errorFillRecipe.getValueFor(element).evaluate(element).rest;\n});\n/** @public */\nexport const errorFillHover = create('error-fill-hover').withDefault((element) => {\n return errorFillRecipe.getValueFor(element).evaluate(element).hover;\n});\n/** @public */\nexport const errorFillActive = create('error-fill-active').withDefault((element) => {\n return errorFillRecipe.getValueFor(element).evaluate(element).active;\n});\n/** @public */\nexport const errorFillFocus = create('error-fill-focus').withDefault((element) => {\n return errorFillRecipe.getValueFor(element).evaluate(element).focus;\n});\n// Foreground On Error\nconst foregroundOnErrorByContrast = (contrast) => (element, reference) => {\n return foregroundOnErrorAlgorithm(reference || errorFillRest.getValueFor(element), contrast);\n};\n/** @public */\nexport const foregroundOnErrorRecipe = create({\n name: 'foreground-on-error-recipe',\n cssCustomPropertyName: null\n}).withDefault({\n evaluate: (element, reference) => foregroundOnErrorByContrast(ContrastTarget.normal)(element, reference)\n});\n/** @public */\nexport const foregroundOnErrorRest = create('foreground-on-error-rest').withDefault((element) => foregroundOnErrorRecipe\n .getValueFor(element)\n .evaluate(element, errorFillRest.getValueFor(element)));\n/** @public */\nexport const foregroundOnErrorHover = create('foreground-on-error-hover').withDefault((element) => foregroundOnErrorRecipe\n .getValueFor(element)\n .evaluate(element, errorFillHover.getValueFor(element)));\n/** @public */\nexport const foregroundOnErrorActive = create('foreground-on-error-active').withDefault((element) => foregroundOnErrorRecipe\n .getValueFor(element)\n .evaluate(element, errorFillActive.getValueFor(element)));\n/** @public */\nexport const foregroundOnErrorFocus = create('foreground-on-error-focus').withDefault((element) => foregroundOnErrorRecipe\n .getValueFor(element)\n .evaluate(element, errorFillFocus.getValueFor(element)));\n/** @public */\nexport const foregroundOnErrorLargeRecipe = create({\n name: 'foreground-on-error-large-recipe',\n cssCustomPropertyName: null\n}).withDefault({\n evaluate: (element, reference) => foregroundOnErrorByContrast(ContrastTarget.large)(element, reference)\n});\n/** @public */\nexport const foregroundOnErrorRestLarge = create('foreground-on-error-rest-large').withDefault((element) => foregroundOnErrorLargeRecipe\n .getValueFor(element)\n .evaluate(element, errorFillRest.getValueFor(element)));\n/** @public */\nexport const foregroundOnErrorHoverLarge = create('foreground-on-error-hover-large').withDefault((element) => foregroundOnErrorLargeRecipe\n .getValueFor(element)\n .evaluate(element, errorFillHover.getValueFor(element)));\n/** @public */\nexport const foregroundOnErrorActiveLarge = create('foreground-on-error-active-large').withDefault((element) => foregroundOnErrorLargeRecipe\n .getValueFor(element)\n .evaluate(element, errorFillActive.getValueFor(element)));\n/** @public */\nexport const foregroundOnErrorFocusLarge = create('foreground-on-error-focus-large').withDefault((element) => foregroundOnErrorLargeRecipe\n .getValueFor(element)\n .evaluate(element, errorFillFocus.getValueFor(element)));\n// Error Foreground\nconst errorForegroundByContrast = (contrast) => (element, reference) => errorForegroundAlgorithm(errorPalette.getValueFor(element), reference || fillColor.getValueFor(element), contrast, accentForegroundRestDelta.getValueFor(element), accentForegroundHoverDelta.getValueFor(element), accentForegroundActiveDelta.getValueFor(element), accentForegroundFocusDelta.getValueFor(element));\n/** @public */\nexport const errorForegroundRecipe = create({\n name: 'error-foreground-recipe',\n cssCustomPropertyName: null\n}).withDefault({\n evaluate: (element, reference) => errorForegroundByContrast(ContrastTarget.normal)(element, reference)\n});\n/** @public */\nexport const errorForegroundRest = create('error-foreground-rest').withDefault((element) => errorForegroundRecipe.getValueFor(element).evaluate(element).rest);\n/** @public */\nexport const errorForegroundHover = create('error-foreground-hover').withDefault((element) => errorForegroundRecipe.getValueFor(element).evaluate(element).hover);\n/** @public */\nexport const errorForegroundActive = create('error-foreground-active').withDefault((element) => errorForegroundRecipe.getValueFor(element).evaluate(element).active);\n/** @public */\nexport const errorForegroundFocus = create('error-foreground-focus').withDefault((element) => errorForegroundRecipe.getValueFor(element).evaluate(element).focus);\n","import { FASTElementDefinition } from \"@microsoft/fast-element\";\nimport { FoundationElement } from \"../foundation-element/foundation-element.js\";\nimport { DI, Registration } from \"../di/di.js\";\nimport { DesignToken } from \"../design-token/design-token.js\";\nimport { ComponentPresentation } from \"./component-presentation.js\";\n/* eslint-disable @typescript-eslint/no-non-null-assertion */\n/**\n * Indicates what to do with an ambiguous (duplicate) element.\n * @public\n */\nexport const ElementDisambiguation = Object.freeze({\n /**\n * Skip defining the element but still call the provided callback passed\n * to DesignSystemRegistrationContext.tryDefineElement\n */\n definitionCallbackOnly: null,\n /**\n * Ignore the duplicate element entirely.\n */\n ignoreDuplicate: Symbol(),\n});\nconst elementTypesByTag = new Map();\nconst elementTagsByType = new Map();\nlet rootDesignSystem = null;\nconst designSystemKey = DI.createInterface(x => x.cachedCallback(handler => {\n if (rootDesignSystem === null) {\n rootDesignSystem = new DefaultDesignSystem(null, handler);\n }\n return rootDesignSystem;\n}));\n/**\n * An API gateway to design system features.\n * @public\n */\nexport const DesignSystem = Object.freeze({\n /**\n * Returns the HTML element name that the type is defined as.\n * @param type - The type to lookup.\n * @public\n */\n tagFor(type) {\n return elementTagsByType.get(type);\n },\n /**\n * Searches the DOM hierarchy for the design system that is responsible\n * for the provided element.\n * @param element - The element to locate the design system for.\n * @returns The located design system.\n * @public\n */\n responsibleFor(element) {\n const owned = element.$$designSystem$$;\n if (owned) {\n return owned;\n }\n const container = DI.findResponsibleContainer(element);\n return container.get(designSystemKey);\n },\n /**\n * Gets the DesignSystem if one is explicitly defined on the provided element;\n * otherwise creates a design system defined directly on the element.\n * @param element - The element to get or create a design system for.\n * @returns The design system.\n * @public\n */\n getOrCreate(node) {\n if (!node) {\n if (rootDesignSystem === null) {\n rootDesignSystem = DI.getOrCreateDOMContainer().get(designSystemKey);\n }\n return rootDesignSystem;\n }\n const owned = node.$$designSystem$$;\n if (owned) {\n return owned;\n }\n const container = DI.getOrCreateDOMContainer(node);\n if (container.has(designSystemKey, false)) {\n return container.get(designSystemKey);\n }\n else {\n const system = new DefaultDesignSystem(node, container);\n container.register(Registration.instance(designSystemKey, system));\n return system;\n }\n },\n});\nfunction extractTryDefineElementParams(params, elementDefinitionType, elementDefinitionCallback) {\n if (typeof params === \"string\") {\n return {\n name: params,\n type: elementDefinitionType,\n callback: elementDefinitionCallback,\n };\n }\n else {\n return params;\n }\n}\nclass DefaultDesignSystem {\n constructor(owner, container) {\n this.owner = owner;\n this.container = container;\n this.designTokensInitialized = false;\n this.prefix = \"fast\";\n this.shadowRootMode = undefined;\n this.disambiguate = () => ElementDisambiguation.definitionCallbackOnly;\n if (owner !== null) {\n owner.$$designSystem$$ = this;\n }\n }\n withPrefix(prefix) {\n this.prefix = prefix;\n return this;\n }\n withShadowRootMode(mode) {\n this.shadowRootMode = mode;\n return this;\n }\n withElementDisambiguation(callback) {\n this.disambiguate = callback;\n return this;\n }\n withDesignTokenRoot(root) {\n this.designTokenRoot = root;\n return this;\n }\n register(...registrations) {\n const container = this.container;\n const elementDefinitionEntries = [];\n const disambiguate = this.disambiguate;\n const shadowRootMode = this.shadowRootMode;\n const context = {\n elementPrefix: this.prefix,\n tryDefineElement(params, elementDefinitionType, elementDefinitionCallback) {\n const extractedParams = extractTryDefineElementParams(params, elementDefinitionType, elementDefinitionCallback);\n const { name, callback, baseClass } = extractedParams;\n let { type } = extractedParams;\n let elementName = name;\n let typeFoundByName = elementTypesByTag.get(elementName);\n let needsDefine = true;\n while (typeFoundByName) {\n const result = disambiguate(elementName, type, typeFoundByName);\n switch (result) {\n case ElementDisambiguation.ignoreDuplicate:\n return;\n case ElementDisambiguation.definitionCallbackOnly:\n needsDefine = false;\n typeFoundByName = void 0;\n break;\n default:\n elementName = result;\n typeFoundByName = elementTypesByTag.get(elementName);\n break;\n }\n }\n if (needsDefine) {\n if (elementTagsByType.has(type) || type === FoundationElement) {\n type = class extends type {\n };\n }\n elementTypesByTag.set(elementName, type);\n elementTagsByType.set(type, elementName);\n if (baseClass) {\n elementTagsByType.set(baseClass, elementName);\n }\n }\n elementDefinitionEntries.push(new ElementDefinitionEntry(container, elementName, type, shadowRootMode, callback, needsDefine));\n },\n };\n if (!this.designTokensInitialized) {\n this.designTokensInitialized = true;\n if (this.designTokenRoot !== null) {\n DesignToken.registerRoot(this.designTokenRoot);\n }\n }\n container.registerWithContext(context, ...registrations);\n for (const entry of elementDefinitionEntries) {\n entry.callback(entry);\n if (entry.willDefine && entry.definition !== null) {\n entry.definition.define();\n }\n }\n return this;\n }\n}\nclass ElementDefinitionEntry {\n constructor(container, name, type, shadowRootMode, callback, willDefine) {\n this.container = container;\n this.name = name;\n this.type = type;\n this.shadowRootMode = shadowRootMode;\n this.callback = callback;\n this.willDefine = willDefine;\n this.definition = null;\n }\n definePresentation(presentation) {\n ComponentPresentation.define(this.name, presentation, this.container);\n }\n defineElement(definition) {\n this.definition = new FASTElementDefinition(this.type, Object.assign(Object.assign({}, definition), { name: this.name }));\n }\n tagFor(type) {\n return DesignSystem.tagFor(type);\n }\n}\n/* eslint-enable @typescript-eslint/no-non-null-assertion */\n","// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nimport { DesignSystem } from '@microsoft/fast-foundation';\n/**\n * Provides a design system for the specified element either by returning one that was\n * already created for that element or creating one.\n * @param element - The element to root the design system at. By default, this is the body.\n * @returns A Jupyter Design System\n * @public\n */\nexport function provideJupyterDesignSystem(element) {\n return DesignSystem.getOrCreate(element).withPrefix('jp');\n}\n","// Copyright (c) Jupyter Development Team.\n// Copyright (c) Microsoft Corporation.\n// Distributed under the terms of the Modified BSD License.\nimport { cssPartial } from '@microsoft/fast-element';\nimport { baseHeightMultiplier, density, designUnit, elementScale } from '../design-tokens.js';\n/**\n * A formula to retrieve the control height.\n * Use this as the value of any CSS property that\n * accepts a pixel size.\n */\nexport const heightNumber = cssPartial `(${baseHeightMultiplier} + ${density} + ${elementScale}) * ${designUnit}`;\n","import { ColorHSL } from \"./color-hsl.js\";\nimport { ColorHSV } from \"./color-hsv.js\";\nimport { ColorLAB } from \"./color-lab.js\";\nimport { ColorLCH } from \"./color-lch.js\";\nimport { ColorRGBA64 } from \"./color-rgba-64.js\";\nimport { ColorXYZ } from \"./color-xyz.js\";\nimport { degreesToRadians, radiansToDegrees } from \"./math-utilities.js\";\n// All hue values are in degrees rather than radians or normalized\n// All conversions use the D65 2 degree white point for XYZ\n// Info on conversions and constants used can be found in the following:\n// https://en.wikipedia.org/wiki/CIELAB_color_space\n// https://en.wikipedia.org/wiki/Illuminant_D65\n// https://ninedegreesbelow.com/photography/xyz-rgb.html\n// http://user.engineering.uiowa.edu/~aip/Misc/ColorFAQ.html\n// https://web.stanford.edu/~sujason/ColorBalancing/adaptation.html\n// http://brucelindbloom.com/index.html\n/**\n * Get the luminance of a color in the linear RGB space.\n * This is not the same as the relative luminance in the sRGB space for WCAG contrast calculations. Use rgbToRelativeLuminance instead.\n * @param rgb - The input color\n *\n * @public\n */\nexport function rgbToLinearLuminance(rgb) {\n return rgb.r * 0.2126 + rgb.g * 0.7152 + rgb.b * 0.0722;\n}\n/**\n * Get the relative luminance of a color.\n * Adjusts the color to sRGB space, which is necessary for the WCAG contrast spec.\n * The alpha channel of the input is ignored.\n * @param rgb - The input color\n *\n * @public\n */\nexport function rgbToRelativeLuminance(rgb) {\n function luminanceHelper(i) {\n if (i <= 0.03928) {\n return i / 12.92;\n }\n return Math.pow((i + 0.055) / 1.055, 2.4);\n }\n return rgbToLinearLuminance(new ColorRGBA64(luminanceHelper(rgb.r), luminanceHelper(rgb.g), luminanceHelper(rgb.b), 1));\n}\nconst calculateContrastRatio = (a, b) => (a + 0.05) / (b + 0.05);\n/**\n * Calculate the contrast ratio between two colors. Uses the formula described by {@link https://www.w3.org/TR/WCAG20-TECHS/G17.html | WCAG 2.0}.\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function contrastRatio(a, b) {\n const luminanceA = rgbToRelativeLuminance(a);\n const luminanceB = rgbToRelativeLuminance(b);\n return luminanceA > luminanceB\n ? calculateContrastRatio(luminanceA, luminanceB)\n : calculateContrastRatio(luminanceB, luminanceA);\n}\nfunction calcChannelOverlay(match, background, overlay) {\n if (overlay - background === 0) {\n return 0;\n }\n else {\n return (match - background) / (overlay - background);\n }\n}\nfunction calcRgbOverlay(rgbMatch, rgbBackground, rgbOverlay) {\n const rChannel = calcChannelOverlay(rgbMatch.r, rgbBackground.r, rgbOverlay.r);\n const gChannel = calcChannelOverlay(rgbMatch.g, rgbBackground.g, rgbOverlay.g);\n const bChannel = calcChannelOverlay(rgbMatch.b, rgbBackground.b, rgbOverlay.b);\n return (rChannel + gChannel + bChannel) / 3;\n}\n/**\n * Calculate an overlay color that uses rgba (rgb + alpha) that matches the appearance of a given solid color when placed on the same background\n * @param rgbMatch - The solid color the overlay should match in appearance when placed over the rgbBackground\n * @param rgbBackground - The background on which the overlay rests\n * @param rgbOverlay - The rgb color of the overlay. Typically this is either pure white or pure black and when not provided will be determined automatically. This color will be used in the returned output\n * @returns The rgba (rgb + alpha) color of the overlay\n *\n * @public\n */\nexport function calculateOverlayColor(rgbMatch, rgbBackground, rgbOverlay = null) {\n let alpha = 0;\n let overlay = rgbOverlay;\n if (overlay !== null) {\n alpha = calcRgbOverlay(rgbMatch, rgbBackground, overlay);\n }\n else {\n overlay = new ColorRGBA64(0, 0, 0, 1);\n alpha = calcRgbOverlay(rgbMatch, rgbBackground, overlay);\n if (alpha <= 0) {\n overlay = new ColorRGBA64(1, 1, 1, 1);\n alpha = calcRgbOverlay(rgbMatch, rgbBackground, overlay);\n }\n }\n alpha = Math.round(alpha * 1000) / 1000;\n return new ColorRGBA64(overlay.r, overlay.g, overlay.b, alpha);\n}\n/**\n * Converts a {@link @microsoft/fast-colors#ColorRGBA64} to a {@link @microsoft/fast-colors#ColorHSL}\n * @param rgb - the rgb color to convert\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function rgbToHSL(rgb) {\n const max = Math.max(rgb.r, rgb.g, rgb.b);\n const min = Math.min(rgb.r, rgb.g, rgb.b);\n const delta = max - min;\n let hue = 0;\n if (delta !== 0) {\n if (max === rgb.r) {\n hue = 60 * (((rgb.g - rgb.b) / delta) % 6);\n }\n else if (max === rgb.g) {\n hue = 60 * ((rgb.b - rgb.r) / delta + 2);\n }\n else {\n hue = 60 * ((rgb.r - rgb.g) / delta + 4);\n }\n }\n if (hue < 0) {\n hue += 360;\n }\n const lum = (max + min) / 2;\n let sat = 0;\n if (delta !== 0) {\n sat = delta / (1 - Math.abs(2 * lum - 1));\n }\n return new ColorHSL(hue, sat, lum);\n}\n/**\n * Converts a {@link @microsoft/fast-colors#ColorHSL} to a {@link @microsoft/fast-colors#ColorRGBA64}\n * @param hsl - the hsl color to convert\n * @param alpha - the alpha value\n *\n * @public\n */\nexport function hslToRGB(hsl, alpha = 1) {\n const c = (1 - Math.abs(2 * hsl.l - 1)) * hsl.s;\n const x = c * (1 - Math.abs(((hsl.h / 60) % 2) - 1));\n const m = hsl.l - c / 2;\n let r = 0;\n let g = 0;\n let b = 0;\n if (hsl.h < 60) {\n r = c;\n g = x;\n b = 0;\n }\n else if (hsl.h < 120) {\n r = x;\n g = c;\n b = 0;\n }\n else if (hsl.h < 180) {\n r = 0;\n g = c;\n b = x;\n }\n else if (hsl.h < 240) {\n r = 0;\n g = x;\n b = c;\n }\n else if (hsl.h < 300) {\n r = x;\n g = 0;\n b = c;\n }\n else if (hsl.h < 360) {\n r = c;\n g = 0;\n b = x;\n }\n return new ColorRGBA64(r + m, g + m, b + m, alpha);\n}\n/**\n * Converts a {@link @microsoft/fast-colors#ColorRGBA64} to a {@link @microsoft/fast-colors#ColorHSV}\n * @param rgb - the rgb color to convert\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function rgbToHSV(rgb) {\n const max = Math.max(rgb.r, rgb.g, rgb.b);\n const min = Math.min(rgb.r, rgb.g, rgb.b);\n const delta = max - min;\n let hue = 0;\n if (delta !== 0) {\n if (max === rgb.r) {\n hue = 60 * (((rgb.g - rgb.b) / delta) % 6);\n }\n else if (max === rgb.g) {\n hue = 60 * ((rgb.b - rgb.r) / delta + 2);\n }\n else {\n hue = 60 * ((rgb.r - rgb.g) / delta + 4);\n }\n }\n if (hue < 0) {\n hue += 360;\n }\n let sat = 0;\n if (max !== 0) {\n sat = delta / max;\n }\n return new ColorHSV(hue, sat, max);\n}\n/**\n * Converts a {@link @microsoft/fast-colors#ColorHSV} to a {@link @microsoft/fast-colors#ColorRGBA64}\n * @param hsv - the hsv color to convert\n * @param alpha - the alpha value\n *\n * @public\n */\nexport function hsvToRGB(hsv, alpha = 1) {\n const c = hsv.s * hsv.v;\n const x = c * (1 - Math.abs(((hsv.h / 60) % 2) - 1));\n const m = hsv.v - c;\n let r = 0;\n let g = 0;\n let b = 0;\n if (hsv.h < 60) {\n r = c;\n g = x;\n b = 0;\n }\n else if (hsv.h < 120) {\n r = x;\n g = c;\n b = 0;\n }\n else if (hsv.h < 180) {\n r = 0;\n g = c;\n b = x;\n }\n else if (hsv.h < 240) {\n r = 0;\n g = x;\n b = c;\n }\n else if (hsv.h < 300) {\n r = x;\n g = 0;\n b = c;\n }\n else if (hsv.h < 360) {\n r = c;\n g = 0;\n b = x;\n }\n return new ColorRGBA64(r + m, g + m, b + m, alpha);\n}\n/**\n * Converts a {@link @microsoft/fast-colors#ColorLCH} to a {@link @microsoft/fast-colors#ColorLAB}\n * @param lch - the lch color to convert\n *\n * @public\n */\nexport function lchToLAB(lch) {\n let a = 0;\n let b = 0;\n if (lch.h !== 0) {\n a = Math.cos(degreesToRadians(lch.h)) * lch.c;\n b = Math.sin(degreesToRadians(lch.h)) * lch.c;\n }\n return new ColorLAB(lch.l, a, b);\n}\n/**\n * Converts a {@link @microsoft/fast-colors#ColorLAB} to a {@link @microsoft/fast-colors#ColorLCH}\n * @param lab - the lab color to convert\n *\n * @remarks\n * The discontinuity in the C parameter at 0 means that floating point errors will often result in values near 0 giving unpredictable results.\n * EG: 0.0000001 gives a very different result than -0.0000001\n * In cases where both a and b are very near zero this function will return an LCH color with an H of 0\n * More info about the atan2 function: {@link https://en.wikipedia.org/wiki/Atan2}\n * @public\n */\nexport function labToLCH(lab) {\n let h = 0;\n // Because of the discontinuity at 0 if a number is very close to 0 - often due to floating point errors - then\n // it gives unexpected results. EG: 0.000000000001 gives a different result than 0. So just avoid any number\n // that has both a and b very close to zero and lump it in with the h = 0 case.\n if (Math.abs(lab.b) > 0.001 || Math.abs(lab.a) > 0.001) {\n h = radiansToDegrees(Math.atan2(lab.b, lab.a));\n }\n if (h < 0) {\n h += 360;\n }\n const c = Math.sqrt(lab.a * lab.a + lab.b * lab.b);\n return new ColorLCH(lab.l, c, h);\n}\n/**\n * Converts a {@link @microsoft/fast-colors#ColorLAB} to a {@link @microsoft/fast-colors#ColorXYZ}\n * @param lab - the lab color to convert\n *\n * @public\n */\nexport function labToXYZ(lab) {\n const fy = (lab.l + 16) / 116;\n const fx = fy + lab.a / 500;\n const fz = fy - lab.b / 200;\n const xcubed = Math.pow(fx, 3);\n const ycubed = Math.pow(fy, 3);\n const zcubed = Math.pow(fz, 3);\n let x = 0;\n if (xcubed > ColorLAB.epsilon) {\n x = xcubed;\n }\n else {\n x = (116 * fx - 16) / ColorLAB.kappa;\n }\n let y = 0;\n if (lab.l > ColorLAB.epsilon * ColorLAB.kappa) {\n y = ycubed;\n }\n else {\n y = lab.l / ColorLAB.kappa;\n }\n let z = 0;\n if (zcubed > ColorLAB.epsilon) {\n z = zcubed;\n }\n else {\n z = (116 * fz - 16) / ColorLAB.kappa;\n }\n x = ColorXYZ.whitePoint.x * x;\n y = ColorXYZ.whitePoint.y * y;\n z = ColorXYZ.whitePoint.z * z;\n return new ColorXYZ(x, y, z);\n}\n/**\n * Converts a {@link @microsoft/fast-colors#ColorXYZ} to a {@link @microsoft/fast-colors#ColorLAB}\n * @param xyz - the xyz color to convert\n *\n * @public\n */\nexport function xyzToLAB(xyz) {\n function xyzToLABHelper(i) {\n if (i > ColorLAB.epsilon) {\n return Math.pow(i, 1 / 3);\n }\n return (ColorLAB.kappa * i + 16) / 116;\n }\n const x = xyzToLABHelper(xyz.x / ColorXYZ.whitePoint.x);\n const y = xyzToLABHelper(xyz.y / ColorXYZ.whitePoint.y);\n const z = xyzToLABHelper(xyz.z / ColorXYZ.whitePoint.z);\n const l = 116 * y - 16;\n const a = 500 * (x - y);\n const b = 200 * (y - z);\n return new ColorLAB(l, a, b);\n}\n/**\n * Converts a {@link @microsoft/fast-colors#ColorRGBA64} to a {@link @microsoft/fast-colors#ColorXYZ}\n * @param rgb - the rgb color to convert\n *\n * @remarks\n * The alpha channel of the input is ignored\n * @public\n */\nexport function rgbToXYZ(rgb) {\n function rgbToXYZHelper(i) {\n if (i <= 0.04045) {\n return i / 12.92;\n }\n return Math.pow((i + 0.055) / 1.055, 2.4);\n }\n const r = rgbToXYZHelper(rgb.r);\n const g = rgbToXYZHelper(rgb.g);\n const b = rgbToXYZHelper(rgb.b);\n const x = r * 0.4124564 + g * 0.3575761 + b * 0.1804375;\n const y = r * 0.2126729 + g * 0.7151522 + b * 0.072175;\n const z = r * 0.0193339 + g * 0.119192 + b * 0.9503041;\n return new ColorXYZ(x, y, z);\n}\n/**\n * Converts a {@link @microsoft/fast-colors#ColorXYZ} to a {@link @microsoft/fast-colors#ColorRGBA64}\n * @param xyz - the xyz color to convert\n * @param alpha - the alpha value\n *\n * @remarks\n * Note that the xyz color space is significantly larger than sRGB. As such, this can return colors rgb values greater than 1 or less than 0\n * @public\n */\nexport function xyzToRGB(xyz, alpha = 1) {\n function xyzToRGBHelper(i) {\n if (i <= 0.0031308) {\n return i * 12.92;\n }\n return 1.055 * Math.pow(i, 1 / 2.4) - 0.055;\n }\n const r = xyzToRGBHelper(xyz.x * 3.2404542 - xyz.y * 1.5371385 - xyz.z * 0.4985314);\n const g = xyzToRGBHelper(xyz.x * -0.969266 + xyz.y * 1.8760108 + xyz.z * 0.041556);\n const b = xyzToRGBHelper(xyz.x * 0.0556434 - xyz.y * 0.2040259 + xyz.z * 1.0572252);\n return new ColorRGBA64(r, g, b, alpha);\n}\n/**\n * Converts a {@link @microsoft/fast-colors#ColorRGBA64} to a {@link @microsoft/fast-colors#ColorLAB}\n * @param rgb - the rgb color to convert\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function rgbToLAB(rgb) {\n return xyzToLAB(rgbToXYZ(rgb));\n}\n/**\n * Converts a {@link @microsoft/fast-colors#ColorLAB} to a {@link @microsoft/fast-colors#ColorRGBA64}\n * @param lab - the LAB color to convert\n * @param alpha - the alpha value\n *\n * @remarks\n * Note that the xyz color space (which the conversion from LAB uses) is significantly larger than sRGB. As such, this can return colors rgb values greater than 1 or less than 0\n *\n * @public\n */\nexport function labToRGB(lab, alpha = 1) {\n return xyzToRGB(labToXYZ(lab), alpha);\n}\n/**\n * Convert a {@link @microsoft/fast-colors#ColorRGBA64} to a {@link @microsoft/fast-colors#ColorLCH}\n *\n * @param rgb - the rgb color to convert\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function rgbToLCH(rgb) {\n return labToLCH(rgbToLAB(rgb));\n}\n/**\n * Convert a {@link @microsoft/fast-colors#ColorLCH} to a {@link @microsoft/fast-colors#ColorRGBA64}\n * @param lch - the LCH color to convert\n * @param alpha - the alpha value\n *\n * @public\n */\nexport function lchToRGB(lch, alpha = 1) {\n return labToRGB(lchToLAB(lch), alpha);\n}\n/**\n * Converts a color temperature to a {@link @microsoft/fast-colors#ColorRGBA64}\n * @param tempKelvin - the temperature to convert\n * @param alpha - the alpha value\n *\n * @public\n */\nexport function temperatureToRGB(tempKelvin, alpha = 1) {\n // The constants I could find assumed a decimal range of [0,255] for each channel. Just going to put a /255.0 at the end\n let r = 0;\n let g = 0;\n let b = 0;\n if (tempKelvin <= 1000) {\n tempKelvin = 1000;\n }\n else if (tempKelvin >= 40000) {\n tempKelvin = 40000;\n }\n if (tempKelvin < 6600.0) {\n r = 255.0;\n g = tempKelvin / 100.0 - 2.0;\n g =\n -155.25485562709179 -\n 0.44596950469579133 * g +\n 104.49216199393888 * Math.log(g);\n }\n else {\n r = tempKelvin / 100.0 - 55.0;\n r = 351.97690566805693 + 0.114206453784165 * r - 40.25366309332127 * Math.log(r);\n g = tempKelvin / 100.0 - 50.0;\n g = 325.4494125711974 + 0.07943456536662342 * g - 28.0852963507957 * Math.log(g);\n }\n if (tempKelvin >= 6600.0) {\n b = 255.0;\n }\n else if (tempKelvin < 2000.0) {\n b = 0.0;\n }\n else {\n b = tempKelvin / 100.0 - 10;\n b =\n -254.76935184120902 +\n 0.8274096064007395 * b +\n 115.67994401066147 * Math.log(b);\n }\n return new ColorRGBA64(r / 255, g / 255, b / 255, alpha);\n}\n/**\n * Convert a rgb color to a color temperature\n * @param rgb - the color to convert\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nexport function rgbToTemperature(rgb) {\n let t = 0;\n let min = 1000;\n let max = 40000;\n while (max - min > 0.4) {\n t = (max + min) / 2.0;\n const testColor = temperatureToRGB(t);\n if (testColor.b / testColor.r >= rgb.b / rgb.r) {\n max = t;\n }\n else {\n min = t;\n }\n }\n return Math.round(t);\n}\n","import { roundToPrecisionSmall } from \"./math-utilities.js\";\n/**\n * This uses Hue values in \"degree\" format. So expect a range of [0,360]. Some other implementations instead uses radians or a normalized Hue with range [0,1]. Be aware of this when checking values or using other libraries.\n *\n * @public\n */\nexport class ColorHSL {\n constructor(hue, sat, lum) {\n this.h = hue;\n this.s = sat;\n this.l = lum;\n }\n /**\n * Construct a {@link ColorHSL} from a config object.\n */\n static fromObject(data) {\n if (data && !isNaN(data.h) && !isNaN(data.s) && !isNaN(data.l)) {\n return new ColorHSL(data.h, data.s, data.l);\n }\n return null;\n }\n /**\n * Determines if a color is equal to another\n * @param rhs - the value to compare\n */\n equalValue(rhs) {\n return this.h === rhs.h && this.s === rhs.s && this.l === rhs.l;\n }\n /**\n * Returns a new {@link ColorHSL} rounded to the provided precision\n * @param precision - the precision to round to\n */\n roundToPrecision(precision) {\n return new ColorHSL(roundToPrecisionSmall(this.h, precision), roundToPrecisionSmall(this.s, precision), roundToPrecisionSmall(this.l, precision));\n }\n /**\n * Returns the {@link ColorHSL} formatted as an object.\n */\n toObject() {\n return { h: this.h, s: this.s, l: this.l };\n }\n}\n","import { roundToPrecisionSmall } from \"./math-utilities.js\";\n/**\n * This uses Hue values in \"degree\" format. So expect a range of [0,360]. Some other implementations instead uses radians or a normalized Hue with range [0,1]. Be aware of this when checking values or using other libraries.\n *\n * @public\n */\nexport class ColorHSV {\n constructor(hue, sat, val) {\n this.h = hue;\n this.s = sat;\n this.v = val;\n }\n /**\n * Construct a {@link ColorHSV} from a config object.\n */\n static fromObject(data) {\n if (data && !isNaN(data.h) && !isNaN(data.s) && !isNaN(data.v)) {\n return new ColorHSV(data.h, data.s, data.v);\n }\n return null;\n }\n /**\n * Determines if a color is equal to another\n * @param rhs - the value to compare\n */\n equalValue(rhs) {\n return this.h === rhs.h && this.s === rhs.s && this.v === rhs.v;\n }\n /**\n * Returns a new {@link ColorHSV} rounded to the provided precision\n * @param precision - the precision to round to\n */\n roundToPrecision(precision) {\n return new ColorHSV(roundToPrecisionSmall(this.h, precision), roundToPrecisionSmall(this.s, precision), roundToPrecisionSmall(this.v, precision));\n }\n /**\n * Returns the {@link ColorHSV} formatted as an object.\n */\n toObject() {\n return { h: this.h, s: this.s, v: this.v };\n }\n}\n","import { roundToPrecisionSmall } from \"./math-utilities.js\";\n/**\n * {@link https://en.wikipedia.org/wiki/CIELAB_color_space | CIELAB color space}\n * This implementation uses the D65 constants for 2 degrees. That determines the constants used for the pure white point of the XYZ space of 0.95047, 1.0, 1.08883.\n * {@link https://en.wikipedia.org/wiki/Illuminant_D65}\n * These constants determine how the XYZ, LCH and LAB colors convert to/from RGB.\n *\n * @public\n */\nexport class ColorLAB {\n constructor(l, a, b) {\n this.l = l;\n this.a = a;\n this.b = b;\n }\n /**\n * Construct a {@link ColorLAB} from a config object.\n */\n static fromObject(data) {\n if (data && !isNaN(data.l) && !isNaN(data.a) && !isNaN(data.b)) {\n return new ColorLAB(data.l, data.a, data.b);\n }\n return null;\n }\n /**\n * Determines if a color is equal to another\n * @param rhs - the value to compare\n */\n equalValue(rhs) {\n return this.l === rhs.l && this.a === rhs.a && this.b === rhs.b;\n }\n /**\n * Returns a new {@link ColorLAB} rounded to the provided precision\n * @param precision - the precision to round to\n */\n roundToPrecision(precision) {\n return new ColorLAB(roundToPrecisionSmall(this.l, precision), roundToPrecisionSmall(this.a, precision), roundToPrecisionSmall(this.b, precision));\n }\n /**\n * Returns the {@link ColorLAB} formatted as an object.\n */\n toObject() {\n return { l: this.l, a: this.a, b: this.b };\n }\n}\nColorLAB.epsilon = 216 / 24389;\nColorLAB.kappa = 24389 / 27;\n","import { roundToPrecisionSmall } from \"./math-utilities.js\";\n/**\n *\n * {@link https://en.wikipedia.org/wiki/CIELAB_color_space | CIELCH color space}\n *\n * This is a cylindrical representation of the CIELAB space useful for saturation operations\n * This uses Hue values in \"degree\" format. So expect a range of [0,360]. Some other implementations instead uses radians or a normalized Hue with range [0,1]. Be aware of this when checking values or using other libraries.\n * This implementation uses the D65 constants for 2 degrees. That determines the constants used for the pure white point of the XYZ space of 0.95047, 1.0, 1.08883.\n * {@link https://en.wikipedia.org/wiki/Illuminant_D65}\n * These constants determine how the XYZ, LCH and LAB colors convert to/from RGB.\n *\n * @public\n */\nexport class ColorLCH {\n constructor(l, c, h) {\n this.l = l;\n this.c = c;\n this.h = h;\n }\n /**\n * Construct a {@link ColorLCH} from a config object.\n * @param data - the config object\n */\n static fromObject(data) {\n if (data && !isNaN(data.l) && !isNaN(data.c) && !isNaN(data.h)) {\n return new ColorLCH(data.l, data.c, data.h);\n }\n return null;\n }\n /**\n * Determines if one color is equal to another.\n * @param rhs - the color to compare\n */\n equalValue(rhs) {\n return this.l === rhs.l && this.c === rhs.c && this.h === rhs.h;\n }\n /**\n * Returns a new {@link ColorLCH} rounded to the provided precision\n * @param precision - the precision to round to\n */\n roundToPrecision(precision) {\n return new ColorLCH(roundToPrecisionSmall(this.l, precision), roundToPrecisionSmall(this.c, precision), roundToPrecisionSmall(this.h, precision));\n }\n /**\n * Converts the {@link ColorLCH} to a config object.\n */\n toObject() {\n return { l: this.l, c: this.c, h: this.h };\n }\n}\n","import { clamp, denormalize, getHexStringForByte, roundToPrecisionSmall, } from \"./math-utilities.js\";\n/**\n * A RGBA color with 64 bit channels.\n *\n * @example\n * ```ts\n * new ColorRGBA64(1, 0, 0, 1) // red\n * ```\n * @public\n */\nexport class ColorRGBA64 {\n /**\n *\n * @param red - the red value\n * @param green - the green value\n * @param blue - the blue value\n * @param alpha - the alpha value\n */\n constructor(red, green, blue, alpha) {\n this.r = red;\n this.g = green;\n this.b = blue;\n this.a = typeof alpha === \"number\" && !isNaN(alpha) ? alpha : 1;\n }\n /**\n * Construct a {@link ColorRGBA64} from a {@link ColorRGBA64Config}\n * @param data - the config object\n */\n static fromObject(data) {\n return data && !isNaN(data.r) && !isNaN(data.g) && !isNaN(data.b)\n ? new ColorRGBA64(data.r, data.g, data.b, data.a)\n : null;\n }\n /**\n * Determines if one color is equal to another.\n * @param rhs - the color to compare\n */\n equalValue(rhs) {\n return (this.r === rhs.r && this.g === rhs.g && this.b === rhs.b && this.a === rhs.a);\n }\n /**\n * Returns the color formatted as a string; #RRGGBB\n */\n toStringHexRGB() {\n return \"#\" + [this.r, this.g, this.b].map(this.formatHexValue).join(\"\");\n }\n /**\n * Returns the color formatted as a string; #RRGGBBAA\n */\n toStringHexRGBA() {\n return this.toStringHexRGB() + this.formatHexValue(this.a);\n }\n /**\n * Returns the color formatted as a string; #AARRGGBB\n */\n toStringHexARGB() {\n return \"#\" + [this.a, this.r, this.g, this.b].map(this.formatHexValue).join(\"\");\n }\n /**\n * Returns the color formatted as a string; \"rgb(0xRR, 0xGG, 0xBB)\"\n */\n toStringWebRGB() {\n return `rgb(${Math.round(denormalize(this.r, 0.0, 255.0))},${Math.round(denormalize(this.g, 0.0, 255.0))},${Math.round(denormalize(this.b, 0.0, 255.0))})`;\n }\n /**\n * Returns the color formatted as a string; \"rgba(0xRR, 0xGG, 0xBB, a)\"\n * @remarks\n * Note that this follows the convention of putting alpha in the range [0.0,1.0] while the other three channels are [0,255]\n */\n toStringWebRGBA() {\n return `rgba(${Math.round(denormalize(this.r, 0.0, 255.0))},${Math.round(denormalize(this.g, 0.0, 255.0))},${Math.round(denormalize(this.b, 0.0, 255.0))},${clamp(this.a, 0, 1)})`;\n }\n /**\n * Returns a new {@link ColorRGBA64} rounded to the provided precision\n * @param precision - the precision to round to\n */\n roundToPrecision(precision) {\n return new ColorRGBA64(roundToPrecisionSmall(this.r, precision), roundToPrecisionSmall(this.g, precision), roundToPrecisionSmall(this.b, precision), roundToPrecisionSmall(this.a, precision));\n }\n /**\n * Returns a new {@link ColorRGBA64} with channel values clamped between 0 and 1.\n */\n clamp() {\n return new ColorRGBA64(clamp(this.r, 0, 1), clamp(this.g, 0, 1), clamp(this.b, 0, 1), clamp(this.a, 0, 1));\n }\n /**\n * Converts the {@link ColorRGBA64} to a {@link ColorRGBA64Config}.\n */\n toObject() {\n return { r: this.r, g: this.g, b: this.b, a: this.a };\n }\n formatHexValue(value) {\n return getHexStringForByte(denormalize(value, 0.0, 255.0));\n }\n}\n","import { roundToPrecisionSmall } from \"./math-utilities.js\";\n/**\n * {@link https://en.wikipedia.org/wiki/CIE_1931_color_space | XYZ color space}\n *\n * This implementation uses the D65 constants for 2 degrees. That determines the constants used for the pure white point of the XYZ space of 0.95047, 1.0, 1.08883.\n * {@link https://en.wikipedia.org/wiki/Illuminant_D65}\n * These constants determine how the XYZ, LCH and LAB colors convert to/from RGB.\n *\n * @public\n */\nexport class ColorXYZ {\n constructor(x, y, z) {\n this.x = x;\n this.y = y;\n this.z = z;\n }\n /**\n * Construct a {@link ColorXYZ} from a config object.\n */\n static fromObject(data) {\n if (data && !isNaN(data.x) && !isNaN(data.y) && !isNaN(data.z)) {\n return new ColorXYZ(data.x, data.y, data.z);\n }\n return null;\n }\n /**\n * Determines if a color is equal to another\n * @param rhs - the value to compare\n */\n equalValue(rhs) {\n return this.x === rhs.x && this.y === rhs.y && this.z === rhs.z;\n }\n /**\n * Returns a new {@link ColorXYZ} rounded to the provided precision\n * @param precision - the precision to round to\n */\n roundToPrecision(precision) {\n return new ColorXYZ(roundToPrecisionSmall(this.x, precision), roundToPrecisionSmall(this.y, precision), roundToPrecisionSmall(this.z, precision));\n }\n /**\n * Returns the {@link ColorXYZ} formatted as an object.\n */\n toObject() {\n return { x: this.x, y: this.y, z: this.z };\n }\n}\n/**\n * D65 2 degree white point\n */\nColorXYZ.whitePoint = new ColorXYZ(0.95047, 1.0, 1.08883);\n","/**\n * Ensures that an input number does not exceed a max value and is not less than a min value.\n * @param i - the number to clamp\n * @param min - the maximum (inclusive) value\n * @param max - the minimum (inclusive) value\n * @public\n */\nexport function clamp(i, min, max) {\n if (isNaN(i) || i <= min) {\n return min;\n }\n else if (i >= max) {\n return max;\n }\n return i;\n}\n/**\n * Scales an input to a number between 0 and 1\n * @param i - a number between min and max\n * @param min - the max value\n * @param max - the min value\n * @public\n */\nexport function normalize(i, min, max) {\n if (isNaN(i) || i <= min) {\n return 0.0;\n }\n else if (i >= max) {\n return 1.0;\n }\n return i / (max - min);\n}\n/**\n * Scales a number between 0 and 1\n * @param i - the number to denormalize\n * @param min - the min value\n * @param max - the max value\n * @public\n */\nexport function denormalize(i, min, max) {\n if (isNaN(i)) {\n return min;\n }\n return min + i * (max - min);\n}\n/**\n * Converts degrees to radians.\n * @param i - degrees\n * @public\n */\nexport function degreesToRadians(i) {\n return i * (Math.PI / 180.0);\n}\n/**\n * Converts radians to degrees.\n * @param i - radians\n * @public\n */\nexport function radiansToDegrees(i) {\n return i * (180.0 / Math.PI);\n}\n/**\n * Converts a number between 0 and 255 to a hex string.\n * @param i - the number to convert to a hex string\n * @public\n */\nexport function getHexStringForByte(i) {\n const s = Math.round(clamp(i, 0.0, 255.0)).toString(16);\n if (s.length === 1) {\n return \"0\" + s;\n }\n return s;\n}\n/**\n * Linearly interpolate\n * @public\n */\nexport function lerp(i, min, max) {\n if (isNaN(i) || i <= 0.0) {\n return min;\n }\n else if (i >= 1.0) {\n return max;\n }\n return min + i * (max - min);\n}\n/**\n * Linearly interpolate angles in degrees\n * @public\n */\nexport function lerpAnglesInDegrees(i, min, max) {\n if (i <= 0.0) {\n return min % 360.0;\n }\n else if (i >= 1.0) {\n return max % 360.0;\n }\n const a = (min - max + 360.0) % 360.0;\n const b = (max - min + 360.0) % 360.0;\n if (a <= b) {\n return (min - a * i + 360.0) % 360.0;\n }\n return (min + a * i + 360.0) % 360.0;\n}\nconst TwoPI = Math.PI * 2;\n/**\n * Linearly interpolate angles in radians\n * @public\n */\nexport function lerpAnglesInRadians(i, min, max) {\n if (isNaN(i) || i <= 0.0) {\n return min % TwoPI;\n }\n else if (i >= 1.0) {\n return max % TwoPI;\n }\n const a = (min - max + TwoPI) % TwoPI;\n const b = (max - min + TwoPI) % TwoPI;\n if (a <= b) {\n return (min - a * i + TwoPI) % TwoPI;\n }\n return (min + a * i + TwoPI) % TwoPI;\n}\n/**\n *\n * Will return infinity if i*10^(precision) overflows number\n * note that floating point rounding rules come into play here\n * so values that end up rounding on a .5 round to the nearest\n * even not always up so 2.5 rounds to 2\n * @param i - the number to round\n * @param precision - the precision to round to\n *\n * @public\n */\nexport function roundToPrecisionSmall(i, precision) {\n const factor = Math.pow(10, precision);\n return Math.round(i * factor) / factor;\n}\n","export const namedColorsConfigs = {\n aliceblue: {\n r: 0.941176,\n g: 0.972549,\n b: 1,\n },\n antiquewhite: {\n r: 0.980392,\n g: 0.921569,\n b: 0.843137,\n },\n aqua: {\n r: 0,\n g: 1,\n b: 1,\n },\n aquamarine: {\n r: 0.498039,\n g: 1,\n b: 0.831373,\n },\n azure: {\n r: 0.941176,\n g: 1,\n b: 1,\n },\n beige: {\n r: 0.960784,\n g: 0.960784,\n b: 0.862745,\n },\n bisque: {\n r: 1,\n g: 0.894118,\n b: 0.768627,\n },\n black: {\n r: 0,\n g: 0,\n b: 0,\n },\n blanchedalmond: {\n r: 1,\n g: 0.921569,\n b: 0.803922,\n },\n blue: {\n r: 0,\n g: 0,\n b: 1,\n },\n blueviolet: {\n r: 0.541176,\n g: 0.168627,\n b: 0.886275,\n },\n brown: {\n r: 0.647059,\n g: 0.164706,\n b: 0.164706,\n },\n burlywood: {\n r: 0.870588,\n g: 0.721569,\n b: 0.529412,\n },\n cadetblue: {\n r: 0.372549,\n g: 0.619608,\n b: 0.627451,\n },\n chartreuse: {\n r: 0.498039,\n g: 1,\n b: 0,\n },\n chocolate: {\n r: 0.823529,\n g: 0.411765,\n b: 0.117647,\n },\n coral: {\n r: 1,\n g: 0.498039,\n b: 0.313725,\n },\n cornflowerblue: {\n r: 0.392157,\n g: 0.584314,\n b: 0.929412,\n },\n cornsilk: {\n r: 1,\n g: 0.972549,\n b: 0.862745,\n },\n crimson: {\n r: 0.862745,\n g: 0.078431,\n b: 0.235294,\n },\n cyan: {\n r: 0,\n g: 1,\n b: 1,\n },\n darkblue: {\n r: 0,\n g: 0,\n b: 0.545098,\n },\n darkcyan: {\n r: 0,\n g: 0.545098,\n b: 0.545098,\n },\n darkgoldenrod: {\n r: 0.721569,\n g: 0.52549,\n b: 0.043137,\n },\n darkgray: {\n r: 0.662745,\n g: 0.662745,\n b: 0.662745,\n },\n darkgreen: {\n r: 0,\n g: 0.392157,\n b: 0,\n },\n darkgrey: {\n r: 0.662745,\n g: 0.662745,\n b: 0.662745,\n },\n darkkhaki: {\n r: 0.741176,\n g: 0.717647,\n b: 0.419608,\n },\n darkmagenta: {\n r: 0.545098,\n g: 0,\n b: 0.545098,\n },\n darkolivegreen: {\n r: 0.333333,\n g: 0.419608,\n b: 0.184314,\n },\n darkorange: {\n r: 1,\n g: 0.54902,\n b: 0,\n },\n darkorchid: {\n r: 0.6,\n g: 0.196078,\n b: 0.8,\n },\n darkred: {\n r: 0.545098,\n g: 0,\n b: 0,\n },\n darksalmon: {\n r: 0.913725,\n g: 0.588235,\n b: 0.478431,\n },\n darkseagreen: {\n r: 0.560784,\n g: 0.737255,\n b: 0.560784,\n },\n darkslateblue: {\n r: 0.282353,\n g: 0.239216,\n b: 0.545098,\n },\n darkslategray: {\n r: 0.184314,\n g: 0.309804,\n b: 0.309804,\n },\n darkslategrey: {\n r: 0.184314,\n g: 0.309804,\n b: 0.309804,\n },\n darkturquoise: {\n r: 0,\n g: 0.807843,\n b: 0.819608,\n },\n darkviolet: {\n r: 0.580392,\n g: 0,\n b: 0.827451,\n },\n deeppink: {\n r: 1,\n g: 0.078431,\n b: 0.576471,\n },\n deepskyblue: {\n r: 0,\n g: 0.74902,\n b: 1,\n },\n dimgray: {\n r: 0.411765,\n g: 0.411765,\n b: 0.411765,\n },\n dimgrey: {\n r: 0.411765,\n g: 0.411765,\n b: 0.411765,\n },\n dodgerblue: {\n r: 0.117647,\n g: 0.564706,\n b: 1,\n },\n firebrick: {\n r: 0.698039,\n g: 0.133333,\n b: 0.133333,\n },\n floralwhite: {\n r: 1,\n g: 0.980392,\n b: 0.941176,\n },\n forestgreen: {\n r: 0.133333,\n g: 0.545098,\n b: 0.133333,\n },\n fuchsia: {\n r: 1,\n g: 0,\n b: 1,\n },\n gainsboro: {\n r: 0.862745,\n g: 0.862745,\n b: 0.862745,\n },\n ghostwhite: {\n r: 0.972549,\n g: 0.972549,\n b: 1,\n },\n gold: {\n r: 1,\n g: 0.843137,\n b: 0,\n },\n goldenrod: {\n r: 0.854902,\n g: 0.647059,\n b: 0.12549,\n },\n gray: {\n r: 0.501961,\n g: 0.501961,\n b: 0.501961,\n },\n green: {\n r: 0,\n g: 0.501961,\n b: 0,\n },\n greenyellow: {\n r: 0.678431,\n g: 1,\n b: 0.184314,\n },\n grey: {\n r: 0.501961,\n g: 0.501961,\n b: 0.501961,\n },\n honeydew: {\n r: 0.941176,\n g: 1,\n b: 0.941176,\n },\n hotpink: {\n r: 1,\n g: 0.411765,\n b: 0.705882,\n },\n indianred: {\n r: 0.803922,\n g: 0.360784,\n b: 0.360784,\n },\n indigo: {\n r: 0.294118,\n g: 0,\n b: 0.509804,\n },\n ivory: {\n r: 1,\n g: 1,\n b: 0.941176,\n },\n khaki: {\n r: 0.941176,\n g: 0.901961,\n b: 0.54902,\n },\n lavender: {\n r: 0.901961,\n g: 0.901961,\n b: 0.980392,\n },\n lavenderblush: {\n r: 1,\n g: 0.941176,\n b: 0.960784,\n },\n lawngreen: {\n r: 0.486275,\n g: 0.988235,\n b: 0,\n },\n lemonchiffon: {\n r: 1,\n g: 0.980392,\n b: 0.803922,\n },\n lightblue: {\n r: 0.678431,\n g: 0.847059,\n b: 0.901961,\n },\n lightcoral: {\n r: 0.941176,\n g: 0.501961,\n b: 0.501961,\n },\n lightcyan: {\n r: 0.878431,\n g: 1,\n b: 1,\n },\n lightgoldenrodyellow: {\n r: 0.980392,\n g: 0.980392,\n b: 0.823529,\n },\n lightgray: {\n r: 0.827451,\n g: 0.827451,\n b: 0.827451,\n },\n lightgreen: {\n r: 0.564706,\n g: 0.933333,\n b: 0.564706,\n },\n lightgrey: {\n r: 0.827451,\n g: 0.827451,\n b: 0.827451,\n },\n lightpink: {\n r: 1,\n g: 0.713725,\n b: 0.756863,\n },\n lightsalmon: {\n r: 1,\n g: 0.627451,\n b: 0.478431,\n },\n lightseagreen: {\n r: 0.12549,\n g: 0.698039,\n b: 0.666667,\n },\n lightskyblue: {\n r: 0.529412,\n g: 0.807843,\n b: 0.980392,\n },\n lightslategray: {\n r: 0.466667,\n g: 0.533333,\n b: 0.6,\n },\n lightslategrey: {\n r: 0.466667,\n g: 0.533333,\n b: 0.6,\n },\n lightsteelblue: {\n r: 0.690196,\n g: 0.768627,\n b: 0.870588,\n },\n lightyellow: {\n r: 1,\n g: 1,\n b: 0.878431,\n },\n lime: {\n r: 0,\n g: 1,\n b: 0,\n },\n limegreen: {\n r: 0.196078,\n g: 0.803922,\n b: 0.196078,\n },\n linen: {\n r: 0.980392,\n g: 0.941176,\n b: 0.901961,\n },\n magenta: {\n r: 1,\n g: 0,\n b: 1,\n },\n maroon: {\n r: 0.501961,\n g: 0,\n b: 0,\n },\n mediumaquamarine: {\n r: 0.4,\n g: 0.803922,\n b: 0.666667,\n },\n mediumblue: {\n r: 0,\n g: 0,\n b: 0.803922,\n },\n mediumorchid: {\n r: 0.729412,\n g: 0.333333,\n b: 0.827451,\n },\n mediumpurple: {\n r: 0.576471,\n g: 0.439216,\n b: 0.858824,\n },\n mediumseagreen: {\n r: 0.235294,\n g: 0.701961,\n b: 0.443137,\n },\n mediumslateblue: {\n r: 0.482353,\n g: 0.407843,\n b: 0.933333,\n },\n mediumspringgreen: {\n r: 0,\n g: 0.980392,\n b: 0.603922,\n },\n mediumturquoise: {\n r: 0.282353,\n g: 0.819608,\n b: 0.8,\n },\n mediumvioletred: {\n r: 0.780392,\n g: 0.082353,\n b: 0.521569,\n },\n midnightblue: {\n r: 0.098039,\n g: 0.098039,\n b: 0.439216,\n },\n mintcream: {\n r: 0.960784,\n g: 1,\n b: 0.980392,\n },\n mistyrose: {\n r: 1,\n g: 0.894118,\n b: 0.882353,\n },\n moccasin: {\n r: 1,\n g: 0.894118,\n b: 0.709804,\n },\n navajowhite: {\n r: 1,\n g: 0.870588,\n b: 0.678431,\n },\n navy: {\n r: 0,\n g: 0,\n b: 0.501961,\n },\n oldlace: {\n r: 0.992157,\n g: 0.960784,\n b: 0.901961,\n },\n olive: {\n r: 0.501961,\n g: 0.501961,\n b: 0,\n },\n olivedrab: {\n r: 0.419608,\n g: 0.556863,\n b: 0.137255,\n },\n orange: {\n r: 1,\n g: 0.647059,\n b: 0,\n },\n orangered: {\n r: 1,\n g: 0.270588,\n b: 0,\n },\n orchid: {\n r: 0.854902,\n g: 0.439216,\n b: 0.839216,\n },\n palegoldenrod: {\n r: 0.933333,\n g: 0.909804,\n b: 0.666667,\n },\n palegreen: {\n r: 0.596078,\n g: 0.984314,\n b: 0.596078,\n },\n paleturquoise: {\n r: 0.686275,\n g: 0.933333,\n b: 0.933333,\n },\n palevioletred: {\n r: 0.858824,\n g: 0.439216,\n b: 0.576471,\n },\n papayawhip: {\n r: 1,\n g: 0.937255,\n b: 0.835294,\n },\n peachpuff: {\n r: 1,\n g: 0.854902,\n b: 0.72549,\n },\n peru: {\n r: 0.803922,\n g: 0.521569,\n b: 0.247059,\n },\n pink: {\n r: 1,\n g: 0.752941,\n b: 0.796078,\n },\n plum: {\n r: 0.866667,\n g: 0.627451,\n b: 0.866667,\n },\n powderblue: {\n r: 0.690196,\n g: 0.878431,\n b: 0.901961,\n },\n purple: {\n r: 0.501961,\n g: 0,\n b: 0.501961,\n },\n red: {\n r: 1,\n g: 0,\n b: 0,\n },\n rosybrown: {\n r: 0.737255,\n g: 0.560784,\n b: 0.560784,\n },\n royalblue: {\n r: 0.254902,\n g: 0.411765,\n b: 0.882353,\n },\n saddlebrown: {\n r: 0.545098,\n g: 0.270588,\n b: 0.07451,\n },\n salmon: {\n r: 0.980392,\n g: 0.501961,\n b: 0.447059,\n },\n sandybrown: {\n r: 0.956863,\n g: 0.643137,\n b: 0.376471,\n },\n seagreen: {\n r: 0.180392,\n g: 0.545098,\n b: 0.341176,\n },\n seashell: {\n r: 1,\n g: 0.960784,\n b: 0.933333,\n },\n sienna: {\n r: 0.627451,\n g: 0.321569,\n b: 0.176471,\n },\n silver: {\n r: 0.752941,\n g: 0.752941,\n b: 0.752941,\n },\n skyblue: {\n r: 0.529412,\n g: 0.807843,\n b: 0.921569,\n },\n slateblue: {\n r: 0.415686,\n g: 0.352941,\n b: 0.803922,\n },\n slategray: {\n r: 0.439216,\n g: 0.501961,\n b: 0.564706,\n },\n slategrey: {\n r: 0.439216,\n g: 0.501961,\n b: 0.564706,\n },\n snow: {\n r: 1,\n g: 0.980392,\n b: 0.980392,\n },\n springgreen: {\n r: 0,\n g: 1,\n b: 0.498039,\n },\n steelblue: {\n r: 0.27451,\n g: 0.509804,\n b: 0.705882,\n },\n tan: {\n r: 0.823529,\n g: 0.705882,\n b: 0.54902,\n },\n teal: {\n r: 0,\n g: 0.501961,\n b: 0.501961,\n },\n thistle: {\n r: 0.847059,\n g: 0.74902,\n b: 0.847059,\n },\n tomato: {\n r: 1,\n g: 0.388235,\n b: 0.278431,\n },\n transparent: {\n r: 0,\n g: 0,\n b: 0,\n a: 0,\n },\n turquoise: {\n r: 0.25098,\n g: 0.878431,\n b: 0.815686,\n },\n violet: {\n r: 0.933333,\n g: 0.509804,\n b: 0.933333,\n },\n wheat: {\n r: 0.960784,\n g: 0.870588,\n b: 0.701961,\n },\n white: {\n r: 1,\n g: 1,\n b: 1,\n },\n whitesmoke: {\n r: 0.960784,\n g: 0.960784,\n b: 0.960784,\n },\n yellow: {\n r: 1,\n g: 1,\n b: 0,\n },\n yellowgreen: {\n r: 0.603922,\n g: 0.803922,\n b: 0.196078,\n },\n};\n","import { ColorRGBA64 } from \"./color-rgba-64.js\";\nimport { normalize } from \"./math-utilities.js\";\nimport { namedColorsConfigs } from \"./named-colors.js\";\n// Matches rgb(R, G, B) where R, G, and B are integers [0 - 255]\nconst webRGBRegex = /^rgb\\(\\s*((?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|\\d{1,2})\\s*,\\s*){2}(?:25[0-5]|2[0-4]\\d|1\\d\\d|\\d{1,2})\\s*)\\)$/i;\n// Matches rgb(R, G, B, A) where R, G, and B are integers [0 - 255] and A is [0-1] floating\nconst webRGBARegex = /^rgba\\(\\s*((?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|\\d{1,2})\\s*,\\s*){3}(?:0|1|0?\\.\\d*)\\s*)\\)$/i;\n// Matches #RGB and #RRGGBB, where R, G, and B are [0-9] or [A-F]\nconst hexRGBRegex = /^#((?:[0-9a-f]{6}|[0-9a-f]{3}))$/i;\n// Matches #RGB and #RRGGBBAA, where R, G, B, and A are [0-9] or [A-F]\nconst hexRGBARegex = /^#((?:[0-9a-f]{8}|[0-9a-f]{4}))$/i;\n/**\n * Test if a color matches #RRGGBB or #RGB\n * @public\n */\nexport function isColorStringHexRGB(raw) {\n return hexRGBRegex.test(raw);\n}\n/**\n * Test if a color matches #AARRGGBB or #ARGB\n * @public\n */\nexport function isColorStringHexARGB(raw) {\n return hexRGBARegex.test(raw);\n}\n/**\n * Test if a color matches #RRGGBBAA or #RGBA\n * @public\n */\nexport function isColorStringHexRGBA(raw) {\n return isColorStringHexARGB(raw); // No way to differentiate these two formats, so just use the same test\n}\n/**\n * Test if a color matches rgb(rr, gg, bb)\n * @public\n */\nexport function isColorStringWebRGB(raw) {\n return webRGBRegex.test(raw);\n}\n/**\n * Test if a color matches rgba(rr, gg, bb, aa)\n *\n * @public\n */\nexport function isColorStringWebRGBA(raw) {\n return webRGBARegex.test(raw);\n}\n/**\n * Tests whether a color is in {@link @microsoft/fast-colors#NamedColors}.\n * @param raw - the color name to test\n * @public\n */\nexport function isColorNamed(raw) {\n return namedColorsConfigs.hasOwnProperty(raw);\n}\n/**\n * Converts a hexadecimal color string to a {@link @microsoft/fast-colors#ColorRGBA64}.\n * @param raw - a color string in the form of \"#RRGGBB\" or \"#RGB\"\n * @example\n * ```ts\n * parseColorHexRGBA(\"#FF0000\");\n * parseColorHexRGBA(\"#F00\");\n * ```\n * @public\n */\nexport function parseColorHexRGB(raw) {\n const result = hexRGBRegex.exec(raw);\n if (result === null) {\n return null;\n }\n let digits = result[1];\n if (digits.length === 3) {\n const r = digits.charAt(0);\n const g = digits.charAt(1);\n const b = digits.charAt(2);\n digits = r.concat(r, g, g, b, b);\n }\n const rawInt = parseInt(digits, 16);\n if (isNaN(rawInt)) {\n return null;\n }\n // Note the use of >>> rather than >> as we want JS to manipulate these as unsigned numbers\n return new ColorRGBA64(normalize((rawInt & 0xff0000) >>> 16, 0, 255), normalize((rawInt & 0x00ff00) >>> 8, 0, 255), normalize(rawInt & 0x0000ff, 0, 255), 1);\n}\n/**\n * Converts a hexadecimal color string to a {@link @microsoft/fast-colors#ColorRGBA64}.\n * @param raw - a color string in the form of \"#AARRGGBB\" or \"#ARGB\"\n * @example\n * ```ts\n * parseColorHexRGBA(\"#AAFF0000\");\n * parseColorHexRGBA(\"#AF00\");\n * ```\n * @public\n */\nexport function parseColorHexARGB(raw) {\n const result = hexRGBARegex.exec(raw);\n if (result === null) {\n return null;\n }\n let digits = result[1];\n if (digits.length === 4) {\n const a = digits.charAt(0);\n const r = digits.charAt(1);\n const g = digits.charAt(2);\n const b = digits.charAt(3);\n digits = a.concat(a, r, r, g, g, b, b);\n }\n const rawInt = parseInt(digits, 16);\n if (isNaN(rawInt)) {\n return null;\n }\n // Note the use of >>> rather than >> as we want JS to manipulate these as unsigned numbers\n return new ColorRGBA64(normalize((rawInt & 0x00ff0000) >>> 16, 0, 255), normalize((rawInt & 0x0000ff00) >>> 8, 0, 255), normalize(rawInt & 0x000000ff, 0, 255), normalize((rawInt & 0xff000000) >>> 24, 0, 255));\n}\n/**\n * Converts a hexadecimal color string to a {@link @microsoft/fast-colors#ColorRGBA64}.\n * @param raw - a color string in the form of \"#RRGGBBAA\" or \"#RGBA\"\n * @example\n * ```ts\n * parseColorHexRGBA(\"#FF0000AA\");\n * parseColorHexRGBA(\"#F00A\");\n * ```\n * @public\n */\nexport function parseColorHexRGBA(raw) {\n const result = hexRGBARegex.exec(raw);\n if (result === null) {\n return null;\n }\n let digits = result[1];\n if (digits.length === 4) {\n const r = digits.charAt(0);\n const g = digits.charAt(1);\n const b = digits.charAt(2);\n const a = digits.charAt(3);\n digits = r.concat(r, g, g, b, b, a, a);\n }\n const rawInt = parseInt(digits, 16);\n if (isNaN(rawInt)) {\n return null;\n }\n // Note the use of >>> rather than >> as we want JS to manipulate these as unsigned numbers\n return new ColorRGBA64(normalize((rawInt & 0xff000000) >>> 24, 0, 255), normalize((rawInt & 0x00ff0000) >>> 16, 0, 255), normalize((rawInt & 0x0000ff00) >>> 8, 0, 255), normalize(rawInt & 0x000000ff, 0, 255));\n}\n/**\n * Converts a rgb color string to a {@link @microsoft/fast-colors#ColorRGBA64}.\n * @param raw - a color string format \"rgba(RR,GG,BB)\" where RR,GG,BB are [0,255]\n * @example\n * ```ts\n * parseColorWebRGB(\"rgba(255, 0, 0\");\n * ```\n * @public\n */\nexport function parseColorWebRGB(raw) {\n const result = webRGBRegex.exec(raw);\n if (result === null) {\n return null;\n }\n const split = result[1].split(\",\");\n return new ColorRGBA64(normalize(Number(split[0]), 0, 255), normalize(Number(split[1]), 0, 255), normalize(Number(split[2]), 0, 255), 1);\n}\n/**\n * Converts a rgba color string to a {@link @microsoft/fast-colors#ColorRGBA64}.\n * @param raw - a color string format \"rgba(RR,GG,BB,a)\" where RR,GG,BB are [0,255] and a is [0,1]\n * @example\n * ```ts\n * parseColorWebRGBA(\"rgba(255, 0, 0, 1\");\n * ```\n * @public\n */\nexport function parseColorWebRGBA(raw) {\n const result = webRGBARegex.exec(raw);\n if (result === null) {\n return null;\n }\n const split = result[1].split(\",\");\n if (split.length === 4) {\n return new ColorRGBA64(normalize(Number(split[0]), 0, 255), normalize(Number(split[1]), 0, 255), normalize(Number(split[2]), 0, 255), Number(split[3]));\n }\n return null;\n}\n/**\n * Converts a named color to a {@link @microsoft/fast-colors#ColorRGBA64}.\n * @param raw - a {@link https://www.w3schools.com/colors/colors_names.asp | CSS color name}.\n * @example\n * ```ts\n * parseColorNamed(\"red\");\n * ```\n * @public\n */\nexport function parseColorNamed(raw) {\n // const rawLower: typeof raw = raw.toLowerCase() : raw.toString();\n const config = namedColorsConfigs[raw.toLowerCase()];\n return config\n ? new ColorRGBA64(config.r, config.g, config.b, config.hasOwnProperty(\"a\") ? config.a : void 0)\n : null;\n}\n/**\n *\n Expects any of the following and attempts to determine which is being used\n * #RRGGBB, #AARRGGBB, rgb(RR,GG,BB) rgba(RR,GG,BB,a),\n * or any of the {@link https://www.w3schools.com/colors/colors_names.asp | CSS color names}.\n * @param raw - the color string to parse\n * @public\n */\nexport function parseColor(raw) {\n const rawLower = raw.toLowerCase();\n return isColorStringHexRGB(rawLower)\n ? parseColorHexRGB(rawLower)\n : isColorStringHexRGBA(rawLower)\n ? parseColorHexARGB(rawLower)\n : isColorStringWebRGB(rawLower)\n ? parseColorWebRGB(rawLower)\n : isColorStringWebRGBA(rawLower)\n ? parseColorWebRGBA(rawLower)\n : isColorNamed(rawLower)\n ? parseColorNamed(rawLower)\n : null;\n}\n","import { Observable } from \"../observation/observable.js\";\nimport { DOM } from \"../dom.js\";\nimport { createMetadataLocator } from \"../platform.js\";\n/**\n * Metadata used to configure a custom attribute's behavior.\n * @public\n */\nexport const AttributeConfiguration = Object.freeze({\n /**\n * Locates all attribute configurations associated with a type.\n */\n locate: createMetadataLocator(),\n});\n/**\n * A {@link ValueConverter} that converts to and from `boolean` values.\n * @remarks\n * Used automatically when the `boolean` {@link AttributeMode} is selected.\n * @public\n */\nexport const booleanConverter = {\n toView(value) {\n return value ? \"true\" : \"false\";\n },\n fromView(value) {\n if (value === null ||\n value === void 0 ||\n value === \"false\" ||\n value === false ||\n value === 0) {\n return false;\n }\n return true;\n },\n};\n/**\n * A {@link ValueConverter} that converts to and from `number` values.\n * @remarks\n * This converter allows for nullable numbers, returning `null` if the\n * input was `null`, `undefined`, or `NaN`.\n * @public\n */\nexport const nullableNumberConverter = {\n toView(value) {\n if (value === null || value === undefined) {\n return null;\n }\n const number = value * 1;\n return isNaN(number) ? null : number.toString();\n },\n fromView(value) {\n if (value === null || value === undefined) {\n return null;\n }\n const number = value * 1;\n return isNaN(number) ? null : number;\n },\n};\n/**\n * An implementation of {@link Accessor} that supports reactivity,\n * change callbacks, attribute reflection, and type conversion for\n * custom elements.\n * @public\n */\nexport class AttributeDefinition {\n /**\n * Creates an instance of AttributeDefinition.\n * @param Owner - The class constructor that owns this attribute.\n * @param name - The name of the property associated with the attribute.\n * @param attribute - The name of the attribute in HTML.\n * @param mode - The {@link AttributeMode} that describes the behavior of this attribute.\n * @param converter - A {@link ValueConverter} that integrates with the property getter/setter\n * to convert values to and from a DOM string.\n */\n constructor(Owner, name, attribute = name.toLowerCase(), mode = \"reflect\", converter) {\n this.guards = new Set();\n this.Owner = Owner;\n this.name = name;\n this.attribute = attribute;\n this.mode = mode;\n this.converter = converter;\n this.fieldName = `_${name}`;\n this.callbackName = `${name}Changed`;\n this.hasCallback = this.callbackName in Owner.prototype;\n if (mode === \"boolean\" && converter === void 0) {\n this.converter = booleanConverter;\n }\n }\n /**\n * Sets the value of the attribute/property on the source element.\n * @param source - The source element to access.\n * @param value - The value to set the attribute/property to.\n */\n setValue(source, newValue) {\n const oldValue = source[this.fieldName];\n const converter = this.converter;\n if (converter !== void 0) {\n newValue = converter.fromView(newValue);\n }\n if (oldValue !== newValue) {\n source[this.fieldName] = newValue;\n this.tryReflectToAttribute(source);\n if (this.hasCallback) {\n source[this.callbackName](oldValue, newValue);\n }\n source.$fastController.notify(this.name);\n }\n }\n /**\n * Gets the value of the attribute/property on the source element.\n * @param source - The source element to access.\n */\n getValue(source) {\n Observable.track(source, this.name);\n return source[this.fieldName];\n }\n /** @internal */\n onAttributeChangedCallback(element, value) {\n if (this.guards.has(element)) {\n return;\n }\n this.guards.add(element);\n this.setValue(element, value);\n this.guards.delete(element);\n }\n tryReflectToAttribute(element) {\n const mode = this.mode;\n const guards = this.guards;\n if (guards.has(element) || mode === \"fromView\") {\n return;\n }\n DOM.queueUpdate(() => {\n guards.add(element);\n const latestValue = element[this.fieldName];\n switch (mode) {\n case \"reflect\":\n const converter = this.converter;\n DOM.setAttribute(element, this.attribute, converter !== void 0 ? converter.toView(latestValue) : latestValue);\n break;\n case \"boolean\":\n DOM.setBooleanAttribute(element, this.attribute, latestValue);\n break;\n }\n guards.delete(element);\n });\n }\n /**\n * Collects all attribute definitions associated with the owner.\n * @param Owner - The class constructor to collect attribute for.\n * @param attributeLists - Any existing attributes to collect and merge with those associated with the owner.\n * @internal\n */\n static collect(Owner, ...attributeLists) {\n const attributes = [];\n attributeLists.push(AttributeConfiguration.locate(Owner));\n for (let i = 0, ii = attributeLists.length; i < ii; ++i) {\n const list = attributeLists[i];\n if (list === void 0) {\n continue;\n }\n for (let j = 0, jj = list.length; j < jj; ++j) {\n const config = list[j];\n if (typeof config === \"string\") {\n attributes.push(new AttributeDefinition(Owner, config));\n }\n else {\n attributes.push(new AttributeDefinition(Owner, config.property, config.attribute, config.mode, config.converter));\n }\n }\n }\n return attributes;\n }\n}\nexport function attr(configOrTarget, prop) {\n let config;\n function decorator($target, $prop) {\n if (arguments.length > 1) {\n // Non invocation:\n // - @attr\n // Invocation with or w/o opts:\n // - @attr()\n // - @attr({...opts})\n config.property = $prop;\n }\n AttributeConfiguration.locate($target.constructor).push(config);\n }\n if (arguments.length > 1) {\n // Non invocation:\n // - @attr\n config = {};\n decorator(configOrTarget, prop);\n return;\n }\n // Invocation with or w/o opts:\n // - @attr()\n // - @attr({...opts})\n config = configOrTarget === void 0 ? {} : configOrTarget;\n return decorator;\n}\n","import { FAST } from \"../platform.js\";\nimport { Observable } from \"../observation/observable.js\";\nimport { ElementStyles } from \"../styles/element-styles.js\";\nimport { AttributeDefinition } from \"./attributes.js\";\nconst defaultShadowOptions = { mode: \"open\" };\nconst defaultElementOptions = {};\nconst fastRegistry = FAST.getById(4 /* elementRegistry */, () => {\n const typeToDefinition = new Map();\n return Object.freeze({\n register(definition) {\n if (typeToDefinition.has(definition.type)) {\n return false;\n }\n typeToDefinition.set(definition.type, definition);\n return true;\n },\n getByType(key) {\n return typeToDefinition.get(key);\n },\n });\n});\n/**\n * Defines metadata for a FASTElement.\n * @public\n */\nexport class FASTElementDefinition {\n /**\n * Creates an instance of FASTElementDefinition.\n * @param type - The type this definition is being created for.\n * @param nameOrConfig - The name of the element to define or a config object\n * that describes the element to define.\n */\n constructor(type, nameOrConfig = type.definition) {\n if (typeof nameOrConfig === \"string\") {\n nameOrConfig = { name: nameOrConfig };\n }\n this.type = type;\n this.name = nameOrConfig.name;\n this.template = nameOrConfig.template;\n const attributes = AttributeDefinition.collect(type, nameOrConfig.attributes);\n const observedAttributes = new Array(attributes.length);\n const propertyLookup = {};\n const attributeLookup = {};\n for (let i = 0, ii = attributes.length; i < ii; ++i) {\n const current = attributes[i];\n observedAttributes[i] = current.attribute;\n propertyLookup[current.name] = current;\n attributeLookup[current.attribute] = current;\n }\n this.attributes = attributes;\n this.observedAttributes = observedAttributes;\n this.propertyLookup = propertyLookup;\n this.attributeLookup = attributeLookup;\n this.shadowOptions =\n nameOrConfig.shadowOptions === void 0\n ? defaultShadowOptions\n : nameOrConfig.shadowOptions === null\n ? void 0\n : Object.assign(Object.assign({}, defaultShadowOptions), nameOrConfig.shadowOptions);\n this.elementOptions =\n nameOrConfig.elementOptions === void 0\n ? defaultElementOptions\n : Object.assign(Object.assign({}, defaultElementOptions), nameOrConfig.elementOptions);\n this.styles =\n nameOrConfig.styles === void 0\n ? void 0\n : Array.isArray(nameOrConfig.styles)\n ? ElementStyles.create(nameOrConfig.styles)\n : nameOrConfig.styles instanceof ElementStyles\n ? nameOrConfig.styles\n : ElementStyles.create([nameOrConfig.styles]);\n }\n /**\n * Indicates if this element has been defined in at least one registry.\n */\n get isDefined() {\n return !!fastRegistry.getByType(this.type);\n }\n /**\n * Defines a custom element based on this definition.\n * @param registry - The element registry to define the element in.\n */\n define(registry = customElements) {\n const type = this.type;\n if (fastRegistry.register(this)) {\n const attributes = this.attributes;\n const proto = type.prototype;\n for (let i = 0, ii = attributes.length; i < ii; ++i) {\n Observable.defineProperty(proto, attributes[i]);\n }\n Reflect.defineProperty(type, \"observedAttributes\", {\n value: this.observedAttributes,\n enumerable: true,\n });\n }\n if (!registry.get(this.name)) {\n registry.define(this.name, type, this.elementOptions);\n }\n return this;\n }\n}\n/**\n * Gets the element definition associated with the specified type.\n * @param type - The custom element type to retrieve the definition for.\n */\nFASTElementDefinition.forType = fastRegistry.getByType;\n","import { DOM } from \"../dom.js\";\nimport { PropertyChangeNotifier } from \"../observation/notifier.js\";\nimport { defaultExecutionContext, Observable } from \"../observation/observable.js\";\nimport { FASTElementDefinition } from \"./fast-definitions.js\";\nconst shadowRoots = new WeakMap();\nconst defaultEventOptions = {\n bubbles: true,\n composed: true,\n cancelable: true,\n};\nfunction getShadowRoot(element) {\n return element.shadowRoot || shadowRoots.get(element) || null;\n}\n/**\n * Controls the lifecycle and rendering of a `FASTElement`.\n * @public\n */\nexport class Controller extends PropertyChangeNotifier {\n /**\n * Creates a Controller to control the specified element.\n * @param element - The element to be controlled by this controller.\n * @param definition - The element definition metadata that instructs this\n * controller in how to handle rendering and other platform integrations.\n * @internal\n */\n constructor(element, definition) {\n super(element);\n this.boundObservables = null;\n this.behaviors = null;\n this.needsInitialization = true;\n this._template = null;\n this._styles = null;\n this._isConnected = false;\n /**\n * This allows Observable.getNotifier(...) to return the Controller\n * when the notifier for the Controller itself is being requested. The\n * result is that the Observable system does not need to create a separate\n * instance of Notifier for observables on the Controller. The component and\n * the controller will now share the same notifier, removing one-object construct\n * per web component instance.\n */\n this.$fastController = this;\n /**\n * The view associated with the custom element.\n * @remarks\n * If `null` then the element is managing its own rendering.\n */\n this.view = null;\n this.element = element;\n this.definition = definition;\n const shadowOptions = definition.shadowOptions;\n if (shadowOptions !== void 0) {\n const shadowRoot = element.attachShadow(shadowOptions);\n if (shadowOptions.mode === \"closed\") {\n shadowRoots.set(element, shadowRoot);\n }\n }\n // Capture any observable values that were set by the binding engine before\n // the browser upgraded the element. Then delete the property since it will\n // shadow the getter/setter that is required to make the observable operate.\n // Later, in the connect callback, we'll re-apply the values.\n const accessors = Observable.getAccessors(element);\n if (accessors.length > 0) {\n const boundObservables = (this.boundObservables = Object.create(null));\n for (let i = 0, ii = accessors.length; i < ii; ++i) {\n const propertyName = accessors[i].name;\n const value = element[propertyName];\n if (value !== void 0) {\n delete element[propertyName];\n boundObservables[propertyName] = value;\n }\n }\n }\n }\n /**\n * Indicates whether or not the custom element has been\n * connected to the document.\n */\n get isConnected() {\n Observable.track(this, \"isConnected\");\n return this._isConnected;\n }\n setIsConnected(value) {\n this._isConnected = value;\n Observable.notify(this, \"isConnected\");\n }\n /**\n * Gets/sets the template used to render the component.\n * @remarks\n * This value can only be accurately read after connect but can be set at any time.\n */\n get template() {\n return this._template;\n }\n set template(value) {\n if (this._template === value) {\n return;\n }\n this._template = value;\n if (!this.needsInitialization) {\n this.renderTemplate(value);\n }\n }\n /**\n * Gets/sets the primary styles used for the component.\n * @remarks\n * This value can only be accurately read after connect but can be set at any time.\n */\n get styles() {\n return this._styles;\n }\n set styles(value) {\n if (this._styles === value) {\n return;\n }\n if (this._styles !== null) {\n this.removeStyles(this._styles);\n }\n this._styles = value;\n if (!this.needsInitialization && value !== null) {\n this.addStyles(value);\n }\n }\n /**\n * Adds styles to this element. Providing an HTMLStyleElement will attach the element instance to the shadowRoot.\n * @param styles - The styles to add.\n */\n addStyles(styles) {\n const target = getShadowRoot(this.element) ||\n this.element.getRootNode();\n if (styles instanceof HTMLStyleElement) {\n target.append(styles);\n }\n else if (!styles.isAttachedTo(target)) {\n const sourceBehaviors = styles.behaviors;\n styles.addStylesTo(target);\n if (sourceBehaviors !== null) {\n this.addBehaviors(sourceBehaviors);\n }\n }\n }\n /**\n * Removes styles from this element. Providing an HTMLStyleElement will detach the element instance from the shadowRoot.\n * @param styles - the styles to remove.\n */\n removeStyles(styles) {\n const target = getShadowRoot(this.element) ||\n this.element.getRootNode();\n if (styles instanceof HTMLStyleElement) {\n target.removeChild(styles);\n }\n else if (styles.isAttachedTo(target)) {\n const sourceBehaviors = styles.behaviors;\n styles.removeStylesFrom(target);\n if (sourceBehaviors !== null) {\n this.removeBehaviors(sourceBehaviors);\n }\n }\n }\n /**\n * Adds behaviors to this element.\n * @param behaviors - The behaviors to add.\n */\n addBehaviors(behaviors) {\n const targetBehaviors = this.behaviors || (this.behaviors = new Map());\n const length = behaviors.length;\n const behaviorsToBind = [];\n for (let i = 0; i < length; ++i) {\n const behavior = behaviors[i];\n if (targetBehaviors.has(behavior)) {\n targetBehaviors.set(behavior, targetBehaviors.get(behavior) + 1);\n }\n else {\n targetBehaviors.set(behavior, 1);\n behaviorsToBind.push(behavior);\n }\n }\n if (this._isConnected) {\n const element = this.element;\n for (let i = 0; i < behaviorsToBind.length; ++i) {\n behaviorsToBind[i].bind(element, defaultExecutionContext);\n }\n }\n }\n /**\n * Removes behaviors from this element.\n * @param behaviors - The behaviors to remove.\n * @param force - Forces unbinding of behaviors.\n */\n removeBehaviors(behaviors, force = false) {\n const targetBehaviors = this.behaviors;\n if (targetBehaviors === null) {\n return;\n }\n const length = behaviors.length;\n const behaviorsToUnbind = [];\n for (let i = 0; i < length; ++i) {\n const behavior = behaviors[i];\n if (targetBehaviors.has(behavior)) {\n const count = targetBehaviors.get(behavior) - 1;\n count === 0 || force\n ? targetBehaviors.delete(behavior) && behaviorsToUnbind.push(behavior)\n : targetBehaviors.set(behavior, count);\n }\n }\n if (this._isConnected) {\n const element = this.element;\n for (let i = 0; i < behaviorsToUnbind.length; ++i) {\n behaviorsToUnbind[i].unbind(element);\n }\n }\n }\n /**\n * Runs connected lifecycle behavior on the associated element.\n */\n onConnectedCallback() {\n if (this._isConnected) {\n return;\n }\n const element = this.element;\n if (this.needsInitialization) {\n this.finishInitialization();\n }\n else if (this.view !== null) {\n this.view.bind(element, defaultExecutionContext);\n }\n const behaviors = this.behaviors;\n if (behaviors !== null) {\n for (const [behavior] of behaviors) {\n behavior.bind(element, defaultExecutionContext);\n }\n }\n this.setIsConnected(true);\n }\n /**\n * Runs disconnected lifecycle behavior on the associated element.\n */\n onDisconnectedCallback() {\n if (!this._isConnected) {\n return;\n }\n this.setIsConnected(false);\n const view = this.view;\n if (view !== null) {\n view.unbind();\n }\n const behaviors = this.behaviors;\n if (behaviors !== null) {\n const element = this.element;\n for (const [behavior] of behaviors) {\n behavior.unbind(element);\n }\n }\n }\n /**\n * Runs the attribute changed callback for the associated element.\n * @param name - The name of the attribute that changed.\n * @param oldValue - The previous value of the attribute.\n * @param newValue - The new value of the attribute.\n */\n onAttributeChangedCallback(name, oldValue, newValue) {\n const attrDef = this.definition.attributeLookup[name];\n if (attrDef !== void 0) {\n attrDef.onAttributeChangedCallback(this.element, newValue);\n }\n }\n /**\n * Emits a custom HTML event.\n * @param type - The type name of the event.\n * @param detail - The event detail object to send with the event.\n * @param options - The event options. By default bubbles and composed.\n * @remarks\n * Only emits events if connected.\n */\n emit(type, detail, options) {\n if (this._isConnected) {\n return this.element.dispatchEvent(new CustomEvent(type, Object.assign(Object.assign({ detail }, defaultEventOptions), options)));\n }\n return false;\n }\n finishInitialization() {\n const element = this.element;\n const boundObservables = this.boundObservables;\n // If we have any observables that were bound, re-apply their values.\n if (boundObservables !== null) {\n const propertyNames = Object.keys(boundObservables);\n for (let i = 0, ii = propertyNames.length; i < ii; ++i) {\n const propertyName = propertyNames[i];\n element[propertyName] = boundObservables[propertyName];\n }\n this.boundObservables = null;\n }\n const definition = this.definition;\n // 1. Template overrides take top precedence.\n if (this._template === null) {\n if (this.element.resolveTemplate) {\n // 2. Allow for element instance overrides next.\n this._template = this.element.resolveTemplate();\n }\n else if (definition.template) {\n // 3. Default to the static definition.\n this._template = definition.template || null;\n }\n }\n // If we have a template after the above process, render it.\n // If there's no template, then the element author has opted into\n // custom rendering and they will managed the shadow root's content themselves.\n if (this._template !== null) {\n this.renderTemplate(this._template);\n }\n // 1. Styles overrides take top precedence.\n if (this._styles === null) {\n if (this.element.resolveStyles) {\n // 2. Allow for element instance overrides next.\n this._styles = this.element.resolveStyles();\n }\n else if (definition.styles) {\n // 3. Default to the static definition.\n this._styles = definition.styles || null;\n }\n }\n // If we have styles after the above process, add them.\n if (this._styles !== null) {\n this.addStyles(this._styles);\n }\n this.needsInitialization = false;\n }\n renderTemplate(template) {\n const element = this.element;\n // When getting the host to render to, we start by looking\n // up the shadow root. If there isn't one, then that means\n // we're doing a Light DOM render to the element's direct children.\n const host = getShadowRoot(element) || element;\n if (this.view !== null) {\n // If there's already a view, we need to unbind and remove through dispose.\n this.view.dispose();\n this.view = null;\n }\n else if (!this.needsInitialization) {\n // If there was previous custom rendering, we need to clear out the host.\n DOM.removeChildNodes(host);\n }\n if (template) {\n // If a new template was provided, render it.\n this.view = template.render(element, host, element);\n }\n }\n /**\n * Locates or creates a controller for the specified element.\n * @param element - The element to return the controller for.\n * @remarks\n * The specified element must have a {@link FASTElementDefinition}\n * registered either through the use of the {@link customElement}\n * decorator or a call to `FASTElement.define`.\n */\n static forCustomElement(element) {\n const controller = element.$fastController;\n if (controller !== void 0) {\n return controller;\n }\n const definition = FASTElementDefinition.forType(element.constructor);\n if (definition === void 0) {\n throw new Error(\"Missing FASTElement definition.\");\n }\n return (element.$fastController = new Controller(element, definition));\n }\n}\n","import { Controller } from \"./controller.js\";\nimport { FASTElementDefinition, } from \"./fast-definitions.js\";\n/* eslint-disable-next-line @typescript-eslint/explicit-function-return-type */\nfunction createFASTElement(BaseType) {\n return class extends BaseType {\n constructor() {\n /* eslint-disable-next-line */\n super();\n Controller.forCustomElement(this);\n }\n $emit(type, detail, options) {\n return this.$fastController.emit(type, detail, options);\n }\n connectedCallback() {\n this.$fastController.onConnectedCallback();\n }\n disconnectedCallback() {\n this.$fastController.onDisconnectedCallback();\n }\n attributeChangedCallback(name, oldValue, newValue) {\n this.$fastController.onAttributeChangedCallback(name, oldValue, newValue);\n }\n };\n}\n/**\n * A minimal base class for FASTElements that also provides\n * static helpers for working with FASTElements.\n * @public\n */\nexport const FASTElement = Object.assign(createFASTElement(HTMLElement), {\n /**\n * Creates a new FASTElement base class inherited from the\n * provided base type.\n * @param BaseType - The base element type to inherit from.\n */\n from(BaseType) {\n return createFASTElement(BaseType);\n },\n /**\n * Defines a platform custom element based on the provided type and definition.\n * @param type - The custom element type to define.\n * @param nameOrDef - The name of the element to define or a definition object\n * that describes the element to define.\n */\n define(type, nameOrDef) {\n return new FASTElementDefinition(type, nameOrDef).define().type;\n },\n});\n/**\n * Decorator: Defines a platform custom element based on `FASTElement`.\n * @param nameOrDef - The name of the element to define or a definition object\n * that describes the element to define.\n * @public\n */\nexport function customElement(nameOrDef) {\n /* eslint-disable-next-line @typescript-eslint/explicit-function-return-type */\n return function (type) {\n new FASTElementDefinition(type, nameOrDef).define();\n };\n}\n","import { $global } from \"./platform.js\";\nconst updateQueue = $global.FAST.getById(1 /* updateQueue */, () => {\n const tasks = [];\n const pendingErrors = [];\n function throwFirstError() {\n if (pendingErrors.length) {\n throw pendingErrors.shift();\n }\n }\n function tryRunTask(task) {\n try {\n task.call();\n }\n catch (error) {\n pendingErrors.push(error);\n setTimeout(throwFirstError, 0);\n }\n }\n function process() {\n const capacity = 1024;\n let index = 0;\n while (index < tasks.length) {\n tryRunTask(tasks[index]);\n index++;\n // Prevent leaking memory for long chains of recursive calls to `DOM.queueUpdate`.\n // If we call `DOM.queueUpdate` within a task scheduled by `DOM.queueUpdate`, the queue will\n // grow, but to avoid an O(n) walk for every task we execute, we don't\n // shift tasks off the queue after they have been executed.\n // Instead, we periodically shift 1024 tasks off the queue.\n if (index > capacity) {\n // Manually shift all values starting at the index back to the\n // beginning of the queue.\n for (let scan = 0, newLength = tasks.length - index; scan < newLength; scan++) {\n tasks[scan] = tasks[scan + index];\n }\n tasks.length -= index;\n index = 0;\n }\n }\n tasks.length = 0;\n }\n function enqueue(callable) {\n if (tasks.length < 1) {\n $global.requestAnimationFrame(process);\n }\n tasks.push(callable);\n }\n return Object.freeze({\n enqueue,\n process,\n });\n});\n/* eslint-disable */\nconst fastHTMLPolicy = $global.trustedTypes.createPolicy(\"fast-html\", {\n createHTML: html => html,\n});\n/* eslint-enable */\nlet htmlPolicy = fastHTMLPolicy;\nconst marker = `fast-${Math.random().toString(36).substring(2, 8)}`;\n/** @internal */\nexport const _interpolationStart = `${marker}{`;\n/** @internal */\nexport const _interpolationEnd = `}${marker}`;\n/**\n * Common DOM APIs.\n * @public\n */\nexport const DOM = Object.freeze({\n /**\n * Indicates whether the DOM supports the adoptedStyleSheets feature.\n */\n supportsAdoptedStyleSheets: Array.isArray(document.adoptedStyleSheets) &&\n \"replace\" in CSSStyleSheet.prototype,\n /**\n * Sets the HTML trusted types policy used by the templating engine.\n * @param policy - The policy to set for HTML.\n * @remarks\n * This API can only be called once, for security reasons. It should be\n * called by the application developer at the start of their program.\n */\n setHTMLPolicy(policy) {\n if (htmlPolicy !== fastHTMLPolicy) {\n throw new Error(\"The HTML policy can only be set once.\");\n }\n htmlPolicy = policy;\n },\n /**\n * Turns a string into trusted HTML using the configured trusted types policy.\n * @param html - The string to turn into trusted HTML.\n * @remarks\n * Used internally by the template engine when creating templates\n * and setting innerHTML.\n */\n createHTML(html) {\n return htmlPolicy.createHTML(html);\n },\n /**\n * Determines if the provided node is a template marker used by the runtime.\n * @param node - The node to test.\n */\n isMarker(node) {\n return node && node.nodeType === 8 && node.data.startsWith(marker);\n },\n /**\n * Given a marker node, extract the {@link HTMLDirective} index from the placeholder.\n * @param node - The marker node to extract the index from.\n */\n extractDirectiveIndexFromMarker(node) {\n return parseInt(node.data.replace(`${marker}:`, \"\"));\n },\n /**\n * Creates a placeholder string suitable for marking out a location *within*\n * an attribute value or HTML content.\n * @param index - The directive index to create the placeholder for.\n * @remarks\n * Used internally by binding directives.\n */\n createInterpolationPlaceholder(index) {\n return `${_interpolationStart}${index}${_interpolationEnd}`;\n },\n /**\n * Creates a placeholder that manifests itself as an attribute on an\n * element.\n * @param attributeName - The name of the custom attribute.\n * @param index - The directive index to create the placeholder for.\n * @remarks\n * Used internally by attribute directives such as `ref`, `slotted`, and `children`.\n */\n createCustomAttributePlaceholder(attributeName, index) {\n return `${attributeName}=\"${this.createInterpolationPlaceholder(index)}\"`;\n },\n /**\n * Creates a placeholder that manifests itself as a marker within the DOM structure.\n * @param index - The directive index to create the placeholder for.\n * @remarks\n * Used internally by structural directives such as `repeat`.\n */\n createBlockPlaceholder(index) {\n return `<!--${marker}:${index}-->`;\n },\n /**\n * Schedules DOM update work in the next async batch.\n * @param callable - The callable function or object to queue.\n */\n queueUpdate: updateQueue.enqueue,\n /**\n * Immediately processes all work previously scheduled\n * through queueUpdate.\n * @remarks\n * This also forces nextUpdate promises\n * to resolve.\n */\n processUpdates: updateQueue.process,\n /**\n * Resolves with the next DOM update.\n */\n nextUpdate() {\n return new Promise(updateQueue.enqueue);\n },\n /**\n * Sets an attribute value on an element.\n * @param element - The element to set the attribute value on.\n * @param attributeName - The attribute name to set.\n * @param value - The value of the attribute to set.\n * @remarks\n * If the value is `null` or `undefined`, the attribute is removed, otherwise\n * it is set to the provided value using the standard `setAttribute` API.\n */\n setAttribute(element, attributeName, value) {\n if (value === null || value === undefined) {\n element.removeAttribute(attributeName);\n }\n else {\n element.setAttribute(attributeName, value);\n }\n },\n /**\n * Sets a boolean attribute value.\n * @param element - The element to set the boolean attribute value on.\n * @param attributeName - The attribute name to set.\n * @param value - The value of the attribute to set.\n * @remarks\n * If the value is true, the attribute is added; otherwise it is removed.\n */\n setBooleanAttribute(element, attributeName, value) {\n value\n ? element.setAttribute(attributeName, \"\")\n : element.removeAttribute(attributeName);\n },\n /**\n * Removes all the child nodes of the provided parent node.\n * @param parent - The node to remove the children from.\n */\n removeChildNodes(parent) {\n for (let child = parent.firstChild; child !== null; child = parent.firstChild) {\n parent.removeChild(child);\n }\n },\n /**\n * Creates a TreeWalker configured to walk a template fragment.\n * @param fragment - The fragment to walk.\n */\n createTemplateWalker(fragment) {\n return document.createTreeWalker(fragment, 133, // element, text, comment\n null, false);\n },\n});\n","/**\n * An implementation of {@link Notifier} that efficiently keeps track of\n * subscribers interested in a specific change notification on an\n * observable source.\n *\n * @remarks\n * This set is optimized for the most common scenario of 1 or 2 subscribers.\n * With this in mind, it can store a subscriber in an internal field, allowing it to avoid Array#push operations.\n * If the set ever exceeds two subscribers, it upgrades to an array automatically.\n * @public\n */\nexport class SubscriberSet {\n /**\n * Creates an instance of SubscriberSet for the specified source.\n * @param source - The object source that subscribers will receive notifications from.\n * @param initialSubscriber - An initial subscriber to changes.\n */\n constructor(source, initialSubscriber) {\n this.sub1 = void 0;\n this.sub2 = void 0;\n this.spillover = void 0;\n this.source = source;\n this.sub1 = initialSubscriber;\n }\n /**\n * Checks whether the provided subscriber has been added to this set.\n * @param subscriber - The subscriber to test for inclusion in this set.\n */\n has(subscriber) {\n return this.spillover === void 0\n ? this.sub1 === subscriber || this.sub2 === subscriber\n : this.spillover.indexOf(subscriber) !== -1;\n }\n /**\n * Subscribes to notification of changes in an object's state.\n * @param subscriber - The object that is subscribing for change notification.\n */\n subscribe(subscriber) {\n const spillover = this.spillover;\n if (spillover === void 0) {\n if (this.has(subscriber)) {\n return;\n }\n if (this.sub1 === void 0) {\n this.sub1 = subscriber;\n return;\n }\n if (this.sub2 === void 0) {\n this.sub2 = subscriber;\n return;\n }\n this.spillover = [this.sub1, this.sub2, subscriber];\n this.sub1 = void 0;\n this.sub2 = void 0;\n }\n else {\n const index = spillover.indexOf(subscriber);\n if (index === -1) {\n spillover.push(subscriber);\n }\n }\n }\n /**\n * Unsubscribes from notification of changes in an object's state.\n * @param subscriber - The object that is unsubscribing from change notification.\n */\n unsubscribe(subscriber) {\n const spillover = this.spillover;\n if (spillover === void 0) {\n if (this.sub1 === subscriber) {\n this.sub1 = void 0;\n }\n else if (this.sub2 === subscriber) {\n this.sub2 = void 0;\n }\n }\n else {\n const index = spillover.indexOf(subscriber);\n if (index !== -1) {\n spillover.splice(index, 1);\n }\n }\n }\n /**\n * Notifies all subscribers.\n * @param args - Data passed along to subscribers during notification.\n */\n notify(args) {\n const spillover = this.spillover;\n const source = this.source;\n if (spillover === void 0) {\n const sub1 = this.sub1;\n const sub2 = this.sub2;\n if (sub1 !== void 0) {\n sub1.handleChange(source, args);\n }\n if (sub2 !== void 0) {\n sub2.handleChange(source, args);\n }\n }\n else {\n for (let i = 0, ii = spillover.length; i < ii; ++i) {\n spillover[i].handleChange(source, args);\n }\n }\n }\n}\n/**\n * An implementation of Notifier that allows subscribers to be notified\n * of individual property changes on an object.\n * @public\n */\nexport class PropertyChangeNotifier {\n /**\n * Creates an instance of PropertyChangeNotifier for the specified source.\n * @param source - The object source that subscribers will receive notifications from.\n */\n constructor(source) {\n this.subscribers = {};\n this.sourceSubscribers = null;\n this.source = source;\n }\n /**\n * Notifies all subscribers, based on the specified property.\n * @param propertyName - The property name, passed along to subscribers during notification.\n */\n notify(propertyName) {\n var _a;\n const subscribers = this.subscribers[propertyName];\n if (subscribers !== void 0) {\n subscribers.notify(propertyName);\n }\n (_a = this.sourceSubscribers) === null || _a === void 0 ? void 0 : _a.notify(propertyName);\n }\n /**\n * Subscribes to notification of changes in an object's state.\n * @param subscriber - The object that is subscribing for change notification.\n * @param propertyToWatch - The name of the property that the subscriber is interested in watching for changes.\n */\n subscribe(subscriber, propertyToWatch) {\n var _a;\n if (propertyToWatch) {\n let subscribers = this.subscribers[propertyToWatch];\n if (subscribers === void 0) {\n this.subscribers[propertyToWatch] = subscribers = new SubscriberSet(this.source);\n }\n subscribers.subscribe(subscriber);\n }\n else {\n this.sourceSubscribers =\n (_a = this.sourceSubscribers) !== null && _a !== void 0 ? _a : new SubscriberSet(this.source);\n this.sourceSubscribers.subscribe(subscriber);\n }\n }\n /**\n * Unsubscribes from notification of changes in an object's state.\n * @param subscriber - The object that is unsubscribing from change notification.\n * @param propertyToUnwatch - The name of the property that the subscriber is no longer interested in watching.\n */\n unsubscribe(subscriber, propertyToUnwatch) {\n var _a;\n if (propertyToUnwatch) {\n const subscribers = this.subscribers[propertyToUnwatch];\n if (subscribers !== void 0) {\n subscribers.unsubscribe(subscriber);\n }\n }\n else {\n (_a = this.sourceSubscribers) === null || _a === void 0 ? void 0 : _a.unsubscribe(subscriber);\n }\n }\n}\n","import { DOM } from \"../dom.js\";\nimport { createMetadataLocator, FAST } from \"../platform.js\";\nimport { PropertyChangeNotifier, SubscriberSet } from \"./notifier.js\";\n/**\n * Common Observable APIs.\n * @public\n */\nexport const Observable = FAST.getById(2 /* observable */, () => {\n const volatileRegex = /(:|&&|\\|\\||if)/;\n const notifierLookup = new WeakMap();\n const queueUpdate = DOM.queueUpdate;\n let watcher = void 0;\n let createArrayObserver = (array) => {\n throw new Error(\"Must call enableArrayObservation before observing arrays.\");\n };\n function getNotifier(source) {\n let found = source.$fastController || notifierLookup.get(source);\n if (found === void 0) {\n if (Array.isArray(source)) {\n found = createArrayObserver(source);\n }\n else {\n notifierLookup.set(source, (found = new PropertyChangeNotifier(source)));\n }\n }\n return found;\n }\n const getAccessors = createMetadataLocator();\n class DefaultObservableAccessor {\n constructor(name) {\n this.name = name;\n this.field = `_${name}`;\n this.callback = `${name}Changed`;\n }\n getValue(source) {\n if (watcher !== void 0) {\n watcher.watch(source, this.name);\n }\n return source[this.field];\n }\n setValue(source, newValue) {\n const field = this.field;\n const oldValue = source[field];\n if (oldValue !== newValue) {\n source[field] = newValue;\n const callback = source[this.callback];\n if (typeof callback === \"function\") {\n callback.call(source, oldValue, newValue);\n }\n getNotifier(source).notify(this.name);\n }\n }\n }\n class BindingObserverImplementation extends SubscriberSet {\n constructor(binding, initialSubscriber, isVolatileBinding = false) {\n super(binding, initialSubscriber);\n this.binding = binding;\n this.isVolatileBinding = isVolatileBinding;\n this.needsRefresh = true;\n this.needsQueue = true;\n this.first = this;\n this.last = null;\n this.propertySource = void 0;\n this.propertyName = void 0;\n this.notifier = void 0;\n this.next = void 0;\n }\n observe(source, context) {\n if (this.needsRefresh && this.last !== null) {\n this.disconnect();\n }\n const previousWatcher = watcher;\n watcher = this.needsRefresh ? this : void 0;\n this.needsRefresh = this.isVolatileBinding;\n const result = this.binding(source, context);\n watcher = previousWatcher;\n return result;\n }\n disconnect() {\n if (this.last !== null) {\n let current = this.first;\n while (current !== void 0) {\n current.notifier.unsubscribe(this, current.propertyName);\n current = current.next;\n }\n this.last = null;\n this.needsRefresh = this.needsQueue = true;\n }\n }\n watch(propertySource, propertyName) {\n const prev = this.last;\n const notifier = getNotifier(propertySource);\n const current = prev === null ? this.first : {};\n current.propertySource = propertySource;\n current.propertyName = propertyName;\n current.notifier = notifier;\n notifier.subscribe(this, propertyName);\n if (prev !== null) {\n if (!this.needsRefresh) {\n // Declaring the variable prior to assignment below circumvents\n // a bug in Angular's optimization process causing infinite recursion\n // of this watch() method. Details https://github.com/microsoft/fast/issues/4969\n let prevValue;\n watcher = void 0;\n /* eslint-disable-next-line */\n prevValue = prev.propertySource[prev.propertyName];\n /* eslint-disable-next-line @typescript-eslint/no-this-alias */\n watcher = this;\n if (propertySource === prevValue) {\n this.needsRefresh = true;\n }\n }\n prev.next = current;\n }\n this.last = current;\n }\n handleChange() {\n if (this.needsQueue) {\n this.needsQueue = false;\n queueUpdate(this);\n }\n }\n call() {\n if (this.last !== null) {\n this.needsQueue = true;\n this.notify(this);\n }\n }\n records() {\n let next = this.first;\n return {\n next: () => {\n const current = next;\n if (current === undefined) {\n return { value: void 0, done: true };\n }\n else {\n next = next.next;\n return {\n value: current,\n done: false,\n };\n }\n },\n [Symbol.iterator]: function () {\n return this;\n },\n };\n }\n }\n return Object.freeze({\n /**\n * @internal\n * @param factory - The factory used to create array observers.\n */\n setArrayObserverFactory(factory) {\n createArrayObserver = factory;\n },\n /**\n * Gets a notifier for an object or Array.\n * @param source - The object or Array to get the notifier for.\n */\n getNotifier,\n /**\n * Records a property change for a source object.\n * @param source - The object to record the change against.\n * @param propertyName - The property to track as changed.\n */\n track(source, propertyName) {\n if (watcher !== void 0) {\n watcher.watch(source, propertyName);\n }\n },\n /**\n * Notifies watchers that the currently executing property getter or function is volatile\n * with respect to its observable dependencies.\n */\n trackVolatile() {\n if (watcher !== void 0) {\n watcher.needsRefresh = true;\n }\n },\n /**\n * Notifies subscribers of a source object of changes.\n * @param source - the object to notify of changes.\n * @param args - The change args to pass to subscribers.\n */\n notify(source, args) {\n getNotifier(source).notify(args);\n },\n /**\n * Defines an observable property on an object or prototype.\n * @param target - The target object to define the observable on.\n * @param nameOrAccessor - The name of the property to define as observable;\n * or a custom accessor that specifies the property name and accessor implementation.\n */\n defineProperty(target, nameOrAccessor) {\n if (typeof nameOrAccessor === \"string\") {\n nameOrAccessor = new DefaultObservableAccessor(nameOrAccessor);\n }\n getAccessors(target).push(nameOrAccessor);\n Reflect.defineProperty(target, nameOrAccessor.name, {\n enumerable: true,\n get: function () {\n return nameOrAccessor.getValue(this);\n },\n set: function (newValue) {\n nameOrAccessor.setValue(this, newValue);\n },\n });\n },\n /**\n * Finds all the observable accessors defined on the target,\n * including its prototype chain.\n * @param target - The target object to search for accessor on.\n */\n getAccessors,\n /**\n * Creates a {@link BindingObserver} that can watch the\n * provided {@link Binding} for changes.\n * @param binding - The binding to observe.\n * @param initialSubscriber - An initial subscriber to changes in the binding value.\n * @param isVolatileBinding - Indicates whether the binding's dependency list must be re-evaluated on every value evaluation.\n */\n binding(binding, initialSubscriber, isVolatileBinding = this.isVolatileBinding(binding)) {\n return new BindingObserverImplementation(binding, initialSubscriber, isVolatileBinding);\n },\n /**\n * Determines whether a binding expression is volatile and needs to have its dependency list re-evaluated\n * on every evaluation of the value.\n * @param binding - The binding to inspect.\n */\n isVolatileBinding(binding) {\n return volatileRegex.test(binding.toString());\n },\n });\n});\n/**\n * Decorator: Defines an observable property on the target.\n * @param target - The target to define the observable on.\n * @param nameOrAccessor - The property name or accessor to define the observable as.\n * @public\n */\nexport function observable(target, nameOrAccessor) {\n Observable.defineProperty(target, nameOrAccessor);\n}\n/**\n * Decorator: Marks a property getter as having volatile observable dependencies.\n * @param target - The target that the property is defined on.\n * @param name - The property name.\n * @param name - The existing descriptor.\n * @public\n */\nexport function volatile(target, name, descriptor) {\n return Object.assign({}, descriptor, {\n get: function () {\n Observable.trackVolatile();\n return descriptor.get.apply(this);\n },\n });\n}\nconst contextEvent = FAST.getById(3 /* contextEvent */, () => {\n let current = null;\n return {\n get() {\n return current;\n },\n set(event) {\n current = event;\n },\n };\n});\n/**\n * Provides additional contextual information available to behaviors and expressions.\n * @public\n */\nexport class ExecutionContext {\n constructor() {\n /**\n * The index of the current item within a repeat context.\n */\n this.index = 0;\n /**\n * The length of the current collection within a repeat context.\n */\n this.length = 0;\n /**\n * The parent data object within a repeat context.\n */\n this.parent = null;\n /**\n * The parent execution context when in nested context scenarios.\n */\n this.parentContext = null;\n }\n /**\n * The current event within an event handler.\n */\n get event() {\n return contextEvent.get();\n }\n /**\n * Indicates whether the current item within a repeat context\n * has an even index.\n */\n get isEven() {\n return this.index % 2 === 0;\n }\n /**\n * Indicates whether the current item within a repeat context\n * has an odd index.\n */\n get isOdd() {\n return this.index % 2 !== 0;\n }\n /**\n * Indicates whether the current item within a repeat context\n * is the first item in the collection.\n */\n get isFirst() {\n return this.index === 0;\n }\n /**\n * Indicates whether the current item within a repeat context\n * is somewhere in the middle of the collection.\n */\n get isInMiddle() {\n return !this.isFirst && !this.isLast;\n }\n /**\n * Indicates whether the current item within a repeat context\n * is the last item in the collection.\n */\n get isLast() {\n return this.index === this.length - 1;\n }\n /**\n * Sets the event for the current execution context.\n * @param event - The event to set.\n * @internal\n */\n static setEvent(event) {\n contextEvent.set(event);\n }\n}\nObservable.defineProperty(ExecutionContext.prototype, \"index\");\nObservable.defineProperty(ExecutionContext.prototype, \"length\");\n/**\n * The default execution context used in binding expressions.\n * @public\n */\nexport const defaultExecutionContext = Object.seal(new ExecutionContext());\n","/**\n * A reference to globalThis, with support\n * for browsers that don't yet support the spec.\n * @public\n */\nexport const $global = (function () {\n if (typeof globalThis !== \"undefined\") {\n // We're running in a modern environment.\n return globalThis;\n }\n if (typeof global !== \"undefined\") {\n // We're running in NodeJS\n return global;\n }\n if (typeof self !== \"undefined\") {\n // We're running in a worker.\n return self;\n }\n if (typeof window !== \"undefined\") {\n // We're running in the browser's main thread.\n return window;\n }\n try {\n // Hopefully we never get here...\n // Not all environments allow eval and Function. Use only as a last resort:\n // eslint-disable-next-line no-new-func\n return new Function(\"return this\")();\n }\n catch (_a) {\n // If all fails, give up and create an object.\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n return {};\n }\n})();\n// API-only Polyfill for trustedTypes\nif ($global.trustedTypes === void 0) {\n $global.trustedTypes = { createPolicy: (n, r) => r };\n}\nconst propConfig = {\n configurable: false,\n enumerable: false,\n writable: false,\n};\nif ($global.FAST === void 0) {\n Reflect.defineProperty($global, \"FAST\", Object.assign({ value: Object.create(null) }, propConfig));\n}\n/**\n * The FAST global.\n * @internal\n */\nexport const FAST = $global.FAST;\nif (FAST.getById === void 0) {\n const storage = Object.create(null);\n Reflect.defineProperty(FAST, \"getById\", Object.assign({ value(id, initialize) {\n let found = storage[id];\n if (found === void 0) {\n found = initialize ? (storage[id] = initialize()) : null;\n }\n return found;\n } }, propConfig));\n}\n/**\n * A readonly, empty array.\n * @remarks\n * Typically returned by APIs that return arrays when there are\n * no actual items to return.\n * @internal\n */\nexport const emptyArray = Object.freeze([]);\n/**\n * Creates a function capable of locating metadata associated with a type.\n * @returns A metadata locator function.\n * @internal\n */\nexport function createMetadataLocator() {\n const metadataLookup = new WeakMap();\n return function (target) {\n let metadata = metadataLookup.get(target);\n if (metadata === void 0) {\n let currentTarget = Reflect.getPrototypeOf(target);\n while (metadata === void 0 && currentTarget !== null) {\n metadata = metadataLookup.get(currentTarget);\n currentTarget = Reflect.getPrototypeOf(currentTarget);\n }\n metadata = metadata === void 0 ? [] : metadata.slice(0);\n metadataLookup.set(target, metadata);\n }\n return metadata;\n };\n}\n","/**\n * Directive for use in {@link css}.\n *\n * @public\n */\nexport class CSSDirective {\n /**\n * Creates a CSS fragment to interpolate into the CSS document.\n * @returns - the string to interpolate into CSS\n */\n createCSS() {\n return \"\";\n }\n /**\n * Creates a behavior to bind to the host element.\n * @returns - the behavior to bind to the host element, or undefined.\n */\n createBehavior() {\n return undefined;\n }\n}\n","import { CSSDirective } from \"./css-directive.js\";\nimport { ElementStyles } from \"./element-styles.js\";\nfunction collectStyles(strings, values) {\n const styles = [];\n let cssString = \"\";\n const behaviors = [];\n for (let i = 0, ii = strings.length - 1; i < ii; ++i) {\n cssString += strings[i];\n let value = values[i];\n if (value instanceof CSSDirective) {\n const behavior = value.createBehavior();\n value = value.createCSS();\n if (behavior) {\n behaviors.push(behavior);\n }\n }\n if (value instanceof ElementStyles || value instanceof CSSStyleSheet) {\n if (cssString.trim() !== \"\") {\n styles.push(cssString);\n cssString = \"\";\n }\n styles.push(value);\n }\n else {\n cssString += value;\n }\n }\n cssString += strings[strings.length - 1];\n if (cssString.trim() !== \"\") {\n styles.push(cssString);\n }\n return {\n styles,\n behaviors,\n };\n}\n/**\n * Transforms a template literal string into styles.\n * @param strings - The string fragments that are interpolated with the values.\n * @param values - The values that are interpolated with the string fragments.\n * @remarks\n * The css helper supports interpolation of strings and ElementStyle instances.\n * @public\n */\nexport function css(strings, ...values) {\n const { styles, behaviors } = collectStyles(strings, values);\n const elementStyles = ElementStyles.create(styles);\n if (behaviors.length) {\n elementStyles.withBehaviors(...behaviors);\n }\n return elementStyles;\n}\nclass CSSPartial extends CSSDirective {\n constructor(styles, behaviors) {\n super();\n this.behaviors = behaviors;\n this.css = \"\";\n const stylesheets = styles.reduce((accumulated, current) => {\n if (typeof current === \"string\") {\n this.css += current;\n }\n else {\n accumulated.push(current);\n }\n return accumulated;\n }, []);\n if (stylesheets.length) {\n this.styles = ElementStyles.create(stylesheets);\n }\n }\n createBehavior() {\n return this;\n }\n createCSS() {\n return this.css;\n }\n bind(el) {\n if (this.styles) {\n el.$fastController.addStyles(this.styles);\n }\n if (this.behaviors.length) {\n el.$fastController.addBehaviors(this.behaviors);\n }\n }\n unbind(el) {\n if (this.styles) {\n el.$fastController.removeStyles(this.styles);\n }\n if (this.behaviors.length) {\n el.$fastController.removeBehaviors(this.behaviors);\n }\n }\n}\n/**\n * Transforms a template literal string into partial CSS.\n * @param strings - The string fragments that are interpolated with the values.\n * @param values - The values that are interpolated with the string fragments.\n * @public\n */\nexport function cssPartial(strings, ...values) {\n const { styles, behaviors } = collectStyles(strings, values);\n return new CSSPartial(styles, behaviors);\n}\n","import { DOM } from \"../dom.js\";\n/**\n * Represents styles that can be applied to a custom element.\n * @public\n */\nexport class ElementStyles {\n constructor() {\n this.targets = new WeakSet();\n }\n /** @internal */\n addStylesTo(target) {\n this.targets.add(target);\n }\n /** @internal */\n removeStylesFrom(target) {\n this.targets.delete(target);\n }\n /** @internal */\n isAttachedTo(target) {\n return this.targets.has(target);\n }\n /**\n * Associates behaviors with this set of styles.\n * @param behaviors - The behaviors to associate.\n */\n withBehaviors(...behaviors) {\n this.behaviors =\n this.behaviors === null ? behaviors : this.behaviors.concat(behaviors);\n return this;\n }\n}\n/**\n * Create ElementStyles from ComposableStyles.\n */\nElementStyles.create = (() => {\n if (DOM.supportsAdoptedStyleSheets) {\n const styleSheetCache = new Map();\n return (styles) => \n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n new AdoptedStyleSheetsStyles(styles, styleSheetCache);\n }\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n return (styles) => new StyleElementStyles(styles);\n})();\nfunction reduceStyles(styles) {\n return styles\n .map((x) => x instanceof ElementStyles ? reduceStyles(x.styles) : [x])\n .reduce((prev, curr) => prev.concat(curr), []);\n}\nfunction reduceBehaviors(styles) {\n return styles\n .map((x) => (x instanceof ElementStyles ? x.behaviors : null))\n .reduce((prev, curr) => {\n if (curr === null) {\n return prev;\n }\n if (prev === null) {\n prev = [];\n }\n return prev.concat(curr);\n }, null);\n}\nlet addAdoptedStyleSheets = (target, sheets) => {\n target.adoptedStyleSheets = [...target.adoptedStyleSheets, ...sheets];\n};\nlet removeAdoptedStyleSheets = (target, sheets) => {\n target.adoptedStyleSheets = target.adoptedStyleSheets.filter((x) => sheets.indexOf(x) === -1);\n};\nif (DOM.supportsAdoptedStyleSheets) {\n try {\n // Test if browser implementation uses FrozenArray.\n // If not, use push / splice to alter the stylesheets\n // in place. This circumvents a bug in Safari 16.4 where\n // periodically, assigning the array would previously\n // cause sheets to be removed.\n document.adoptedStyleSheets.push();\n document.adoptedStyleSheets.splice();\n addAdoptedStyleSheets = (target, sheets) => {\n target.adoptedStyleSheets.push(...sheets);\n };\n removeAdoptedStyleSheets = (target, sheets) => {\n for (const sheet of sheets) {\n const index = target.adoptedStyleSheets.indexOf(sheet);\n if (index !== -1) {\n target.adoptedStyleSheets.splice(index, 1);\n }\n }\n };\n }\n catch (e) {\n // Do nothing if an error is thrown, the default\n // case handles FrozenArray.\n }\n}\n/**\n * https://wicg.github.io/construct-stylesheets/\n * https://developers.google.com/web/updates/2019/02/constructable-stylesheets\n *\n * @internal\n */\nexport class AdoptedStyleSheetsStyles extends ElementStyles {\n constructor(styles, styleSheetCache) {\n super();\n this.styles = styles;\n this.styleSheetCache = styleSheetCache;\n this._styleSheets = void 0;\n this.behaviors = reduceBehaviors(styles);\n }\n get styleSheets() {\n if (this._styleSheets === void 0) {\n const styles = this.styles;\n const styleSheetCache = this.styleSheetCache;\n this._styleSheets = reduceStyles(styles).map((x) => {\n if (x instanceof CSSStyleSheet) {\n return x;\n }\n let sheet = styleSheetCache.get(x);\n if (sheet === void 0) {\n sheet = new CSSStyleSheet();\n sheet.replaceSync(x);\n styleSheetCache.set(x, sheet);\n }\n return sheet;\n });\n }\n return this._styleSheets;\n }\n addStylesTo(target) {\n addAdoptedStyleSheets(target, this.styleSheets);\n super.addStylesTo(target);\n }\n removeStylesFrom(target) {\n removeAdoptedStyleSheets(target, this.styleSheets);\n super.removeStylesFrom(target);\n }\n}\nlet styleClassId = 0;\nfunction getNextStyleClass() {\n return `fast-style-class-${++styleClassId}`;\n}\n/**\n * @internal\n */\nexport class StyleElementStyles extends ElementStyles {\n constructor(styles) {\n super();\n this.styles = styles;\n this.behaviors = null;\n this.behaviors = reduceBehaviors(styles);\n this.styleSheets = reduceStyles(styles);\n this.styleClass = getNextStyleClass();\n }\n addStylesTo(target) {\n const styleSheets = this.styleSheets;\n const styleClass = this.styleClass;\n target = this.normalizeTarget(target);\n for (let i = 0; i < styleSheets.length; i++) {\n const element = document.createElement(\"style\");\n element.innerHTML = styleSheets[i];\n element.className = styleClass;\n target.append(element);\n }\n super.addStylesTo(target);\n }\n removeStylesFrom(target) {\n target = this.normalizeTarget(target);\n const styles = target.querySelectorAll(`.${this.styleClass}`);\n for (let i = 0, ii = styles.length; i < ii; ++i) {\n target.removeChild(styles[i]);\n }\n super.removeStylesFrom(target);\n }\n isAttachedTo(target) {\n return super.isAttachedTo(this.normalizeTarget(target));\n }\n normalizeTarget(target) {\n return target === document ? document.body : target;\n }\n}\n","import { AttachedBehaviorHTMLDirective } from \"./html-directive.js\";\nimport { NodeObservationBehavior } from \"./node-observation.js\";\n/**\n * The runtime behavior for child node observation.\n * @public\n */\nexport class ChildrenBehavior extends NodeObservationBehavior {\n /**\n * Creates an instance of ChildrenBehavior.\n * @param target - The element target to observe children on.\n * @param options - The options to use when observing the element children.\n */\n constructor(target, options) {\n super(target, options);\n this.observer = null;\n options.childList = true;\n }\n /**\n * Begins observation of the nodes.\n */\n observe() {\n if (this.observer === null) {\n this.observer = new MutationObserver(this.handleEvent.bind(this));\n }\n this.observer.observe(this.target, this.options);\n }\n /**\n * Disconnects observation of the nodes.\n */\n disconnect() {\n this.observer.disconnect();\n }\n /**\n * Retrieves the nodes that should be assigned to the target.\n */\n getNodes() {\n if (\"subtree\" in this.options) {\n return Array.from(this.target.querySelectorAll(this.options.selector));\n }\n return Array.from(this.target.childNodes);\n }\n}\n/**\n * A directive that observes the `childNodes` of an element and updates a property\n * whenever they change.\n * @param propertyOrOptions - The options used to configure child node observation.\n * @public\n */\nexport function children(propertyOrOptions) {\n if (typeof propertyOrOptions === \"string\") {\n propertyOrOptions = {\n property: propertyOrOptions,\n };\n }\n return new AttachedBehaviorHTMLDirective(\"fast-children\", ChildrenBehavior, propertyOrOptions);\n}\n","import { DOM } from \"../dom.js\";\n/**\n * Instructs the template engine to apply behavior to a node.\n * @public\n */\nexport class HTMLDirective {\n constructor() {\n /**\n * The index of the DOM node to which the created behavior will apply.\n */\n this.targetIndex = 0;\n }\n}\n/**\n * A {@link HTMLDirective} that targets a named attribute or property on a node.\n * @public\n */\nexport class TargetedHTMLDirective extends HTMLDirective {\n constructor() {\n super(...arguments);\n /**\n * Creates a placeholder string based on the directive's index within the template.\n * @param index - The index of the directive within the template.\n */\n this.createPlaceholder = DOM.createInterpolationPlaceholder;\n }\n}\n/**\n * A directive that attaches special behavior to an element via a custom attribute.\n * @public\n */\nexport class AttachedBehaviorHTMLDirective extends HTMLDirective {\n /**\n *\n * @param name - The name of the behavior; used as a custom attribute on the element.\n * @param behavior - The behavior to instantiate and attach to the element.\n * @param options - Options to pass to the behavior during creation.\n */\n constructor(name, behavior, options) {\n super();\n this.name = name;\n this.behavior = behavior;\n this.options = options;\n }\n /**\n * Creates a placeholder string based on the directive's index within the template.\n * @param index - The index of the directive within the template.\n * @remarks\n * Creates a custom attribute placeholder.\n */\n createPlaceholder(index) {\n return DOM.createCustomAttributePlaceholder(this.name, index);\n }\n /**\n * Creates a behavior for the provided target node.\n * @param target - The node instance to create the behavior for.\n * @remarks\n * Creates an instance of the `behavior` type this directive was constructed with\n * and passes the target and options to that `behavior`'s constructor.\n */\n createBehavior(target) {\n return new this.behavior(target, this.options);\n }\n}\n","import { Observable } from \"../observation/observable.js\";\nimport { emptyArray } from \"../platform.js\";\n/**\n * Creates a function that can be used to filter a Node array, selecting only elements.\n * @param selector - An optional selector to restrict the filter to.\n * @public\n */\nexport function elements(selector) {\n if (selector) {\n return function (value, index, array) {\n return value.nodeType === 1 && value.matches(selector);\n };\n }\n return function (value, index, array) {\n return value.nodeType === 1;\n };\n}\n/**\n * A base class for node observation.\n * @internal\n */\nexport class NodeObservationBehavior {\n /**\n * Creates an instance of NodeObservationBehavior.\n * @param target - The target to assign the nodes property on.\n * @param options - The options to use in configuring node observation.\n */\n constructor(target, options) {\n this.target = target;\n this.options = options;\n this.source = null;\n }\n /**\n * Bind this behavior to the source.\n * @param source - The source to bind to.\n * @param context - The execution context that the binding is operating within.\n */\n bind(source) {\n const name = this.options.property;\n this.shouldUpdate = Observable.getAccessors(source).some((x) => x.name === name);\n this.source = source;\n this.updateTarget(this.computeNodes());\n if (this.shouldUpdate) {\n this.observe();\n }\n }\n /**\n * Unbinds this behavior from the source.\n * @param source - The source to unbind from.\n */\n unbind() {\n this.updateTarget(emptyArray);\n this.source = null;\n if (this.shouldUpdate) {\n this.disconnect();\n }\n }\n /** @internal */\n handleEvent() {\n this.updateTarget(this.computeNodes());\n }\n computeNodes() {\n let nodes = this.getNodes();\n if (this.options.filter !== void 0) {\n nodes = nodes.filter(this.options.filter);\n }\n return nodes;\n }\n updateTarget(value) {\n this.source[this.options.property] = value;\n }\n}\n","import { AttachedBehaviorHTMLDirective } from \"./html-directive.js\";\n/**\n * The runtime behavior for template references.\n * @public\n */\nexport class RefBehavior {\n /**\n * Creates an instance of RefBehavior.\n * @param target - The element to reference.\n * @param propertyName - The name of the property to assign the reference to.\n */\n constructor(target, propertyName) {\n this.target = target;\n this.propertyName = propertyName;\n }\n /**\n * Bind this behavior to the source.\n * @param source - The source to bind to.\n * @param context - The execution context that the binding is operating within.\n */\n bind(source) {\n source[this.propertyName] = this.target;\n }\n /**\n * Unbinds this behavior from the source.\n * @param source - The source to unbind from.\n */\n /* eslint-disable-next-line @typescript-eslint/no-empty-function */\n unbind() { }\n}\n/**\n * A directive that observes the updates a property with a reference to the element.\n * @param propertyName - The name of the property to assign the reference to.\n * @public\n */\nexport function ref(propertyName) {\n return new AttachedBehaviorHTMLDirective(\"fast-ref\", RefBehavior, propertyName);\n}\n","import { AttachedBehaviorHTMLDirective } from \"./html-directive.js\";\nimport { NodeObservationBehavior } from \"./node-observation.js\";\n/**\n * The runtime behavior for slotted node observation.\n * @public\n */\nexport class SlottedBehavior extends NodeObservationBehavior {\n /**\n * Creates an instance of SlottedBehavior.\n * @param target - The slot element target to observe.\n * @param options - The options to use when observing the slot.\n */\n constructor(target, options) {\n super(target, options);\n }\n /**\n * Begins observation of the nodes.\n */\n observe() {\n this.target.addEventListener(\"slotchange\", this);\n }\n /**\n * Disconnects observation of the nodes.\n */\n disconnect() {\n this.target.removeEventListener(\"slotchange\", this);\n }\n /**\n * Retrieves the nodes that should be assigned to the target.\n */\n getNodes() {\n return this.target.assignedNodes(this.options);\n }\n}\n/**\n * A directive that observes the `assignedNodes()` of a slot and updates a property\n * whenever they change.\n * @param propertyOrOptions - The options used to configure slotted node observation.\n * @public\n */\nexport function slotted(propertyOrOptions) {\n if (typeof propertyOrOptions === \"string\") {\n propertyOrOptions = { property: propertyOrOptions };\n }\n return new AttachedBehaviorHTMLDirective(\"fast-slotted\", SlottedBehavior, propertyOrOptions);\n}\n","import { DOM } from \"../dom.js\";\nimport { ExecutionContext, Observable, } from \"../observation/observable.js\";\nimport { TargetedHTMLDirective } from \"./html-directive.js\";\nfunction normalBind(source, context) {\n this.source = source;\n this.context = context;\n if (this.bindingObserver === null) {\n this.bindingObserver = Observable.binding(this.binding, this, this.isBindingVolatile);\n }\n this.updateTarget(this.bindingObserver.observe(source, context));\n}\nfunction triggerBind(source, context) {\n this.source = source;\n this.context = context;\n this.target.addEventListener(this.targetName, this);\n}\nfunction normalUnbind() {\n this.bindingObserver.disconnect();\n this.source = null;\n this.context = null;\n}\nfunction contentUnbind() {\n this.bindingObserver.disconnect();\n this.source = null;\n this.context = null;\n const view = this.target.$fastView;\n if (view !== void 0 && view.isComposed) {\n view.unbind();\n view.needsBindOnly = true;\n }\n}\nfunction triggerUnbind() {\n this.target.removeEventListener(this.targetName, this);\n this.source = null;\n this.context = null;\n}\nfunction updateAttributeTarget(value) {\n DOM.setAttribute(this.target, this.targetName, value);\n}\nfunction updateBooleanAttributeTarget(value) {\n DOM.setBooleanAttribute(this.target, this.targetName, value);\n}\nfunction updateContentTarget(value) {\n // If there's no actual value, then this equates to the\n // empty string for the purposes of content bindings.\n if (value === null || value === undefined) {\n value = \"\";\n }\n // If the value has a \"create\" method, then it's a template-like.\n if (value.create) {\n this.target.textContent = \"\";\n let view = this.target.$fastView;\n // If there's no previous view that we might be able to\n // reuse then create a new view from the template.\n if (view === void 0) {\n view = value.create();\n }\n else {\n // If there is a previous view, but it wasn't created\n // from the same template as the new value, then we\n // need to remove the old view if it's still in the DOM\n // and create a new view from the template.\n if (this.target.$fastTemplate !== value) {\n if (view.isComposed) {\n view.remove();\n view.unbind();\n }\n view = value.create();\n }\n }\n // It's possible that the value is the same as the previous template\n // and that there's actually no need to compose it.\n if (!view.isComposed) {\n view.isComposed = true;\n view.bind(this.source, this.context);\n view.insertBefore(this.target);\n this.target.$fastView = view;\n this.target.$fastTemplate = value;\n }\n else if (view.needsBindOnly) {\n view.needsBindOnly = false;\n view.bind(this.source, this.context);\n }\n }\n else {\n const view = this.target.$fastView;\n // If there is a view and it's currently composed into\n // the DOM, then we need to remove it.\n if (view !== void 0 && view.isComposed) {\n view.isComposed = false;\n view.remove();\n if (view.needsBindOnly) {\n view.needsBindOnly = false;\n }\n else {\n view.unbind();\n }\n }\n this.target.textContent = value;\n }\n}\nfunction updatePropertyTarget(value) {\n this.target[this.targetName] = value;\n}\nfunction updateClassTarget(value) {\n const classVersions = this.classVersions || Object.create(null);\n const target = this.target;\n let version = this.version || 0;\n // Add the classes, tracking the version at which they were added.\n if (value !== null && value !== undefined && value.length) {\n const names = value.split(/\\s+/);\n for (let i = 0, ii = names.length; i < ii; ++i) {\n const currentName = names[i];\n if (currentName === \"\") {\n continue;\n }\n classVersions[currentName] = version;\n target.classList.add(currentName);\n }\n }\n this.classVersions = classVersions;\n this.version = version + 1;\n // If this is the first call to add classes, there's no need to remove old ones.\n if (version === 0) {\n return;\n }\n // Remove classes from the previous version.\n version -= 1;\n for (const name in classVersions) {\n if (classVersions[name] === version) {\n target.classList.remove(name);\n }\n }\n}\n/**\n * A directive that configures data binding to element content and attributes.\n * @public\n */\nexport class HTMLBindingDirective extends TargetedHTMLDirective {\n /**\n * Creates an instance of BindingDirective.\n * @param binding - A binding that returns the data used to update the DOM.\n */\n constructor(binding) {\n super();\n this.binding = binding;\n this.bind = normalBind;\n this.unbind = normalUnbind;\n this.updateTarget = updateAttributeTarget;\n this.isBindingVolatile = Observable.isVolatileBinding(this.binding);\n }\n /**\n * Gets/sets the name of the attribute or property that this\n * binding is targeting.\n */\n get targetName() {\n return this.originalTargetName;\n }\n set targetName(value) {\n this.originalTargetName = value;\n if (value === void 0) {\n return;\n }\n switch (value[0]) {\n case \":\":\n this.cleanedTargetName = value.substr(1);\n this.updateTarget = updatePropertyTarget;\n if (this.cleanedTargetName === \"innerHTML\") {\n const binding = this.binding;\n this.binding = (s, c) => DOM.createHTML(binding(s, c));\n }\n break;\n case \"?\":\n this.cleanedTargetName = value.substr(1);\n this.updateTarget = updateBooleanAttributeTarget;\n break;\n case \"@\":\n this.cleanedTargetName = value.substr(1);\n this.bind = triggerBind;\n this.unbind = triggerUnbind;\n break;\n default:\n this.cleanedTargetName = value;\n if (value === \"class\") {\n this.updateTarget = updateClassTarget;\n }\n break;\n }\n }\n /**\n * Makes this binding target the content of an element rather than\n * a particular attribute or property.\n */\n targetAtContent() {\n this.updateTarget = updateContentTarget;\n this.unbind = contentUnbind;\n }\n /**\n * Creates the runtime BindingBehavior instance based on the configuration\n * information stored in the BindingDirective.\n * @param target - The target node that the binding behavior should attach to.\n */\n createBehavior(target) {\n /* eslint-disable-next-line @typescript-eslint/no-use-before-define */\n return new BindingBehavior(target, this.binding, this.isBindingVolatile, this.bind, this.unbind, this.updateTarget, this.cleanedTargetName);\n }\n}\n/**\n * A behavior that updates content and attributes based on a configured\n * BindingDirective.\n * @public\n */\nexport class BindingBehavior {\n /**\n * Creates an instance of BindingBehavior.\n * @param target - The target of the data updates.\n * @param binding - The binding that returns the latest value for an update.\n * @param isBindingVolatile - Indicates whether the binding has volatile dependencies.\n * @param bind - The operation to perform during binding.\n * @param unbind - The operation to perform during unbinding.\n * @param updateTarget - The operation to perform when updating.\n * @param targetName - The name of the target attribute or property to update.\n */\n constructor(target, binding, isBindingVolatile, bind, unbind, updateTarget, targetName) {\n /** @internal */\n this.source = null;\n /** @internal */\n this.context = null;\n /** @internal */\n this.bindingObserver = null;\n this.target = target;\n this.binding = binding;\n this.isBindingVolatile = isBindingVolatile;\n this.bind = bind;\n this.unbind = unbind;\n this.updateTarget = updateTarget;\n this.targetName = targetName;\n }\n /** @internal */\n handleChange() {\n this.updateTarget(this.bindingObserver.observe(this.source, this.context));\n }\n /** @internal */\n handleEvent(event) {\n ExecutionContext.setEvent(event);\n const result = this.binding(this.source, this.context);\n ExecutionContext.setEvent(null);\n if (result !== true) {\n event.preventDefault();\n }\n }\n}\n","import { _interpolationEnd, _interpolationStart, DOM } from \"../dom.js\";\nimport { HTMLBindingDirective } from \"./binding.js\";\nlet sharedContext = null;\nclass CompilationContext {\n addFactory(factory) {\n factory.targetIndex = this.targetIndex;\n this.behaviorFactories.push(factory);\n }\n captureContentBinding(directive) {\n directive.targetAtContent();\n this.addFactory(directive);\n }\n reset() {\n this.behaviorFactories = [];\n this.targetIndex = -1;\n }\n release() {\n /* eslint-disable-next-line @typescript-eslint/no-this-alias */\n sharedContext = this;\n }\n static borrow(directives) {\n const shareable = sharedContext || new CompilationContext();\n shareable.directives = directives;\n shareable.reset();\n sharedContext = null;\n return shareable;\n }\n}\nfunction createAggregateBinding(parts) {\n if (parts.length === 1) {\n return parts[0];\n }\n let targetName;\n const partCount = parts.length;\n const finalParts = parts.map((x) => {\n if (typeof x === \"string\") {\n return () => x;\n }\n targetName = x.targetName || targetName;\n return x.binding;\n });\n const binding = (scope, context) => {\n let output = \"\";\n for (let i = 0; i < partCount; ++i) {\n output += finalParts[i](scope, context);\n }\n return output;\n };\n const directive = new HTMLBindingDirective(binding);\n directive.targetName = targetName;\n return directive;\n}\nconst interpolationEndLength = _interpolationEnd.length;\nfunction parseContent(context, value) {\n const valueParts = value.split(_interpolationStart);\n if (valueParts.length === 1) {\n return null;\n }\n const bindingParts = [];\n for (let i = 0, ii = valueParts.length; i < ii; ++i) {\n const current = valueParts[i];\n const index = current.indexOf(_interpolationEnd);\n let literal;\n if (index === -1) {\n literal = current;\n }\n else {\n const directiveIndex = parseInt(current.substring(0, index));\n bindingParts.push(context.directives[directiveIndex]);\n literal = current.substring(index + interpolationEndLength);\n }\n if (literal !== \"\") {\n bindingParts.push(literal);\n }\n }\n return bindingParts;\n}\nfunction compileAttributes(context, node, includeBasicValues = false) {\n const attributes = node.attributes;\n for (let i = 0, ii = attributes.length; i < ii; ++i) {\n const attr = attributes[i];\n const attrValue = attr.value;\n const parseResult = parseContent(context, attrValue);\n let result = null;\n if (parseResult === null) {\n if (includeBasicValues) {\n result = new HTMLBindingDirective(() => attrValue);\n result.targetName = attr.name;\n }\n }\n else {\n result = createAggregateBinding(parseResult);\n }\n if (result !== null) {\n node.removeAttributeNode(attr);\n i--;\n ii--;\n context.addFactory(result);\n }\n }\n}\nfunction compileContent(context, node, walker) {\n const parseResult = parseContent(context, node.textContent);\n if (parseResult !== null) {\n let lastNode = node;\n for (let i = 0, ii = parseResult.length; i < ii; ++i) {\n const currentPart = parseResult[i];\n const currentNode = i === 0\n ? node\n : lastNode.parentNode.insertBefore(document.createTextNode(\"\"), lastNode.nextSibling);\n if (typeof currentPart === \"string\") {\n currentNode.textContent = currentPart;\n }\n else {\n currentNode.textContent = \" \";\n context.captureContentBinding(currentPart);\n }\n lastNode = currentNode;\n context.targetIndex++;\n if (currentNode !== node) {\n walker.nextNode();\n }\n }\n context.targetIndex--;\n }\n}\n/**\n * Compiles a template and associated directives into a raw compilation\n * result which include a cloneable DocumentFragment and factories capable\n * of attaching runtime behavior to nodes within the fragment.\n * @param template - The template to compile.\n * @param directives - The directives referenced by the template.\n * @remarks\n * The template that is provided for compilation is altered in-place\n * and cannot be compiled again. If the original template must be preserved,\n * it is recommended that you clone the original and pass the clone to this API.\n * @public\n */\nexport function compileTemplate(template, directives) {\n const fragment = template.content;\n // https://bugs.chromium.org/p/chromium/issues/detail?id=1111864\n document.adoptNode(fragment);\n const context = CompilationContext.borrow(directives);\n compileAttributes(context, template, true);\n const hostBehaviorFactories = context.behaviorFactories;\n context.reset();\n const walker = DOM.createTemplateWalker(fragment);\n let node;\n while ((node = walker.nextNode())) {\n context.targetIndex++;\n switch (node.nodeType) {\n case 1: // element node\n compileAttributes(context, node);\n break;\n case 3: // text node\n compileContent(context, node, walker);\n break;\n case 8: // comment\n if (DOM.isMarker(node)) {\n context.addFactory(directives[DOM.extractDirectiveIndexFromMarker(node)]);\n }\n }\n }\n let targetOffset = 0;\n if (\n // If the first node in a fragment is a marker, that means it's an unstable first node,\n // because something like a when, repeat, etc. could add nodes before the marker.\n // To mitigate this, we insert a stable first node. However, if we insert a node,\n // that will alter the result of the TreeWalker. So, we also need to offset the target index.\n DOM.isMarker(fragment.firstChild) ||\n // Or if there is only one node and a directive, it means the template's content\n // is *only* the directive. In that case, HTMLView.dispose() misses any nodes inserted by\n // the directive. Inserting a new node ensures proper disposal of nodes added by the directive.\n (fragment.childNodes.length === 1 && directives.length)) {\n fragment.insertBefore(document.createComment(\"\"), fragment.firstChild);\n targetOffset = -1;\n }\n const viewBehaviorFactories = context.behaviorFactories;\n context.release();\n return {\n fragment,\n viewBehaviorFactories,\n hostBehaviorFactories,\n targetOffset,\n };\n}\n","// A singleton Range instance used to efficiently remove ranges of DOM nodes.\n// See the implementation of HTMLView below for further details.\nconst range = document.createRange();\n/**\n * The standard View implementation, which also implements ElementView and SyntheticView.\n * @public\n */\nexport class HTMLView {\n /**\n * Constructs an instance of HTMLView.\n * @param fragment - The html fragment that contains the nodes for this view.\n * @param behaviors - The behaviors to be applied to this view.\n */\n constructor(fragment, behaviors) {\n this.fragment = fragment;\n this.behaviors = behaviors;\n /**\n * The data that the view is bound to.\n */\n this.source = null;\n /**\n * The execution context the view is running within.\n */\n this.context = null;\n this.firstChild = fragment.firstChild;\n this.lastChild = fragment.lastChild;\n }\n /**\n * Appends the view's DOM nodes to the referenced node.\n * @param node - The parent node to append the view's DOM nodes to.\n */\n appendTo(node) {\n node.appendChild(this.fragment);\n }\n /**\n * Inserts the view's DOM nodes before the referenced node.\n * @param node - The node to insert the view's DOM before.\n */\n insertBefore(node) {\n if (this.fragment.hasChildNodes()) {\n node.parentNode.insertBefore(this.fragment, node);\n }\n else {\n const end = this.lastChild;\n if (node.previousSibling === end)\n return;\n const parentNode = node.parentNode;\n let current = this.firstChild;\n let next;\n while (current !== end) {\n next = current.nextSibling;\n parentNode.insertBefore(current, node);\n current = next;\n }\n parentNode.insertBefore(end, node);\n }\n }\n /**\n * Removes the view's DOM nodes.\n * The nodes are not disposed and the view can later be re-inserted.\n */\n remove() {\n const fragment = this.fragment;\n const end = this.lastChild;\n let current = this.firstChild;\n let next;\n while (current !== end) {\n next = current.nextSibling;\n fragment.appendChild(current);\n current = next;\n }\n fragment.appendChild(end);\n }\n /**\n * Removes the view and unbinds its behaviors, disposing of DOM nodes afterward.\n * Once a view has been disposed, it cannot be inserted or bound again.\n */\n dispose() {\n const parent = this.firstChild.parentNode;\n const end = this.lastChild;\n let current = this.firstChild;\n let next;\n while (current !== end) {\n next = current.nextSibling;\n parent.removeChild(current);\n current = next;\n }\n parent.removeChild(end);\n const behaviors = this.behaviors;\n const oldSource = this.source;\n for (let i = 0, ii = behaviors.length; i < ii; ++i) {\n behaviors[i].unbind(oldSource);\n }\n }\n /**\n * Binds a view's behaviors to its binding source.\n * @param source - The binding source for the view's binding behaviors.\n * @param context - The execution context to run the behaviors within.\n */\n bind(source, context) {\n const behaviors = this.behaviors;\n if (this.source === source) {\n return;\n }\n else if (this.source !== null) {\n const oldSource = this.source;\n this.source = source;\n this.context = context;\n for (let i = 0, ii = behaviors.length; i < ii; ++i) {\n const current = behaviors[i];\n current.unbind(oldSource);\n current.bind(source, context);\n }\n }\n else {\n this.source = source;\n this.context = context;\n for (let i = 0, ii = behaviors.length; i < ii; ++i) {\n behaviors[i].bind(source, context);\n }\n }\n }\n /**\n * Unbinds a view's behaviors from its binding source.\n */\n unbind() {\n if (this.source === null) {\n return;\n }\n const behaviors = this.behaviors;\n const oldSource = this.source;\n for (let i = 0, ii = behaviors.length; i < ii; ++i) {\n behaviors[i].unbind(oldSource);\n }\n this.source = null;\n }\n /**\n * Efficiently disposes of a contiguous range of synthetic view instances.\n * @param views - A contiguous range of views to be disposed.\n */\n static disposeContiguousBatch(views) {\n if (views.length === 0) {\n return;\n }\n range.setStartBefore(views[0].firstChild);\n range.setEndAfter(views[views.length - 1].lastChild);\n range.deleteContents();\n for (let i = 0, ii = views.length; i < ii; ++i) {\n const view = views[i];\n const behaviors = view.behaviors;\n const oldSource = view.source;\n for (let j = 0, jj = behaviors.length; j < jj; ++j) {\n behaviors[j].unbind(oldSource);\n }\n }\n }\n}\n","import { DOM } from \"../dom.js\";\nimport { defaultExecutionContext } from \"../observation/observable.js\";\nimport { compileTemplate } from \"./compiler.js\";\nimport { HTMLView } from \"./view.js\";\nimport { HTMLDirective, TargetedHTMLDirective, } from \"./html-directive.js\";\nimport { HTMLBindingDirective } from \"./binding.js\";\n/**\n * A template capable of creating HTMLView instances or rendering directly to DOM.\n * @public\n */\n/* eslint-disable-next-line @typescript-eslint/no-unused-vars */\nexport class ViewTemplate {\n /**\n * Creates an instance of ViewTemplate.\n * @param html - The html representing what this template will instantiate, including placeholders for directives.\n * @param directives - The directives that will be connected to placeholders in the html.\n */\n constructor(html, directives) {\n this.behaviorCount = 0;\n this.hasHostBehaviors = false;\n this.fragment = null;\n this.targetOffset = 0;\n this.viewBehaviorFactories = null;\n this.hostBehaviorFactories = null;\n this.html = html;\n this.directives = directives;\n }\n /**\n * Creates an HTMLView instance based on this template definition.\n * @param hostBindingTarget - The element that host behaviors will be bound to.\n */\n create(hostBindingTarget) {\n if (this.fragment === null) {\n let template;\n const html = this.html;\n if (typeof html === \"string\") {\n template = document.createElement(\"template\");\n template.innerHTML = DOM.createHTML(html);\n const fec = template.content.firstElementChild;\n if (fec !== null && fec.tagName === \"TEMPLATE\") {\n template = fec;\n }\n }\n else {\n template = html;\n }\n const result = compileTemplate(template, this.directives);\n this.fragment = result.fragment;\n this.viewBehaviorFactories = result.viewBehaviorFactories;\n this.hostBehaviorFactories = result.hostBehaviorFactories;\n this.targetOffset = result.targetOffset;\n this.behaviorCount =\n this.viewBehaviorFactories.length + this.hostBehaviorFactories.length;\n this.hasHostBehaviors = this.hostBehaviorFactories.length > 0;\n }\n const fragment = this.fragment.cloneNode(true);\n const viewFactories = this.viewBehaviorFactories;\n const behaviors = new Array(this.behaviorCount);\n const walker = DOM.createTemplateWalker(fragment);\n let behaviorIndex = 0;\n let targetIndex = this.targetOffset;\n let node = walker.nextNode();\n for (let ii = viewFactories.length; behaviorIndex < ii; ++behaviorIndex) {\n const factory = viewFactories[behaviorIndex];\n const factoryIndex = factory.targetIndex;\n while (node !== null) {\n if (targetIndex === factoryIndex) {\n behaviors[behaviorIndex] = factory.createBehavior(node);\n break;\n }\n else {\n node = walker.nextNode();\n targetIndex++;\n }\n }\n }\n if (this.hasHostBehaviors) {\n const hostFactories = this.hostBehaviorFactories;\n for (let i = 0, ii = hostFactories.length; i < ii; ++i, ++behaviorIndex) {\n behaviors[behaviorIndex] = hostFactories[i].createBehavior(hostBindingTarget);\n }\n }\n return new HTMLView(fragment, behaviors);\n }\n /**\n * Creates an HTMLView from this template, binds it to the source, and then appends it to the host.\n * @param source - The data source to bind the template to.\n * @param host - The Element where the template will be rendered.\n * @param hostBindingTarget - An HTML element to target the host bindings at if different from the\n * host that the template is being attached to.\n */\n render(source, host, hostBindingTarget) {\n if (typeof host === \"string\") {\n host = document.getElementById(host);\n }\n if (hostBindingTarget === void 0) {\n hostBindingTarget = host;\n }\n const view = this.create(hostBindingTarget);\n view.bind(source, defaultExecutionContext);\n view.appendTo(host);\n return view;\n }\n}\n// Much thanks to LitHTML for working this out!\nconst lastAttributeNameRegex = \n/* eslint-disable-next-line no-control-regex */\n/([ \\x09\\x0a\\x0c\\x0d])([^\\0-\\x1F\\x7F-\\x9F \"'>=/]+)([ \\x09\\x0a\\x0c\\x0d]*=[ \\x09\\x0a\\x0c\\x0d]*(?:[^ \\x09\\x0a\\x0c\\x0d\"'`<>=]*|\"[^\"]*|'[^']*))$/;\n/**\n * Transforms a template literal string into a renderable ViewTemplate.\n * @param strings - The string fragments that are interpolated with the values.\n * @param values - The values that are interpolated with the string fragments.\n * @remarks\n * The html helper supports interpolation of strings, numbers, binding expressions,\n * other template instances, and Directive instances.\n * @public\n */\nexport function html(strings, ...values) {\n const directives = [];\n let html = \"\";\n for (let i = 0, ii = strings.length - 1; i < ii; ++i) {\n const currentString = strings[i];\n let value = values[i];\n html += currentString;\n if (value instanceof ViewTemplate) {\n const template = value;\n value = () => template;\n }\n if (typeof value === \"function\") {\n value = new HTMLBindingDirective(value);\n }\n if (value instanceof TargetedHTMLDirective) {\n const match = lastAttributeNameRegex.exec(currentString);\n if (match !== null) {\n value.targetName = match[2];\n }\n }\n if (value instanceof HTMLDirective) {\n // Since not all values are directives, we can't use i\n // as the index for the placeholder. Instead, we need to\n // use directives.length to get the next index.\n html += value.createPlaceholder(directives.length);\n directives.push(value);\n }\n else {\n html += value;\n }\n }\n html += strings[strings.length - 1];\n return new ViewTemplate(html, directives);\n}\n","import { ElementStyles, } from \"@microsoft/fast-element\";\nimport { DI, Registration } from \"../di/di.js\";\nfunction presentationKeyFromTag(tagName) {\n return `${tagName.toLowerCase()}:presentation`;\n}\nconst presentationRegistry = new Map();\n/**\n * An API gateway to component presentation features.\n * @public\n */\nexport const ComponentPresentation = Object.freeze({\n /**\n * Defines a component presentation for an element.\n * @param tagName - The element name to define the presentation for.\n * @param presentation - The presentation that will be applied to matching elements.\n * @param container - The dependency injection container to register the configuration in.\n * @public\n */\n define(tagName, presentation, container) {\n const key = presentationKeyFromTag(tagName);\n const existing = presentationRegistry.get(key);\n if (existing === void 0) {\n presentationRegistry.set(key, presentation);\n }\n else {\n // false indicates that we have more than one presentation\n // registered for a tagName and we must resolve through DI\n presentationRegistry.set(key, false);\n }\n container.register(Registration.instance(key, presentation));\n },\n /**\n * Finds a component presentation for the specified element name,\n * searching the DOM hierarchy starting from the provided element.\n * @param tagName - The name of the element to locate the presentation for.\n * @param element - The element to begin the search from.\n * @returns The component presentation or null if none is found.\n * @public\n */\n forTag(tagName, element) {\n const key = presentationKeyFromTag(tagName);\n const existing = presentationRegistry.get(key);\n if (existing === false) {\n const container = DI.findResponsibleContainer(element);\n return container.get(key);\n }\n return existing || null;\n },\n});\n/**\n * The default implementation of ComponentPresentation, used by FoundationElement.\n * @public\n */\nexport class DefaultComponentPresentation {\n /**\n * Creates an instance of DefaultComponentPresentation.\n * @param template - The template to apply to the element.\n * @param styles - The styles to apply to the element.\n * @public\n */\n constructor(template, styles) {\n this.template = template || null;\n this.styles =\n styles === void 0\n ? null\n : Array.isArray(styles)\n ? ElementStyles.create(styles)\n : styles instanceof ElementStyles\n ? styles\n : ElementStyles.create([styles]);\n }\n /**\n * Applies the presentation details to the specified element.\n * @param element - The element to apply the presentation details to.\n * @public\n */\n applyTo(element) {\n const controller = element.$fastController;\n if (controller.template === null) {\n controller.template = this.template;\n }\n if (controller.styles === null) {\n controller.styles = this.styles;\n }\n }\n}\n","import { composedParent } from \"./composed-parent.js\";\n/**\n * Determines if the reference element contains the test element in a \"composed\" DOM tree that\n * ignores shadow DOM boundaries.\n *\n * Returns true of the test element is a descendent of the reference, or exist in\n * a shadow DOM that is a logical descendent of the reference. Otherwise returns false.\n * @param reference - The element to test for containment against.\n * @param test - The element being tested for containment.\n *\n * @public\n */\nexport function composedContains(reference, test) {\n let current = test;\n while (current !== null) {\n if (current === reference) {\n return true;\n }\n current = composedParent(current);\n }\n return false;\n}\n","import { __decorate } from \"tslib\";\nimport { DOM, ElementStyles, FASTElement, observable, Observable, } from \"@microsoft/fast-element\";\nexport const defaultElement = document.createElement(\"div\");\nfunction isFastElement(element) {\n return element instanceof FASTElement;\n}\nclass QueuedStyleSheetTarget {\n setProperty(name, value) {\n DOM.queueUpdate(() => this.target.setProperty(name, value));\n }\n removeProperty(name) {\n DOM.queueUpdate(() => this.target.removeProperty(name));\n }\n}\n/**\n * Handles setting properties for a FASTElement using Constructable Stylesheets\n */\nclass ConstructableStyleSheetTarget extends QueuedStyleSheetTarget {\n constructor(source) {\n super();\n const sheet = new CSSStyleSheet();\n this.target = sheet.cssRules[sheet.insertRule(\":host{}\")].style;\n source.$fastController.addStyles(ElementStyles.create([sheet]));\n }\n}\nclass DocumentStyleSheetTarget extends QueuedStyleSheetTarget {\n constructor() {\n super();\n const sheet = new CSSStyleSheet();\n this.target = sheet.cssRules[sheet.insertRule(\":root{}\")].style;\n document.adoptedStyleSheets = [\n ...document.adoptedStyleSheets,\n sheet,\n ];\n }\n}\nclass HeadStyleElementStyleSheetTarget extends QueuedStyleSheetTarget {\n constructor() {\n super();\n this.style = document.createElement(\"style\");\n document.head.appendChild(this.style);\n const { sheet } = this.style;\n // Because the HTMLStyleElement has been appended,\n // there shouldn't exist a case where `sheet` is null,\n // but if-check it just in case.\n if (sheet) {\n // https://github.com/jsdom/jsdom uses https://github.com/NV/CSSOM for it's CSSOM implementation,\n // which implements the DOM Level 2 spec for CSSStyleSheet where insertRule() requires an index argument.\n const index = sheet.insertRule(\":root{}\", sheet.cssRules.length);\n this.target = sheet.cssRules[index].style;\n }\n }\n}\n/**\n * Handles setting properties for a FASTElement using an HTMLStyleElement\n */\nclass StyleElementStyleSheetTarget {\n constructor(target) {\n this.store = new Map();\n this.target = null;\n const controller = target.$fastController;\n this.style = document.createElement(\"style\");\n controller.addStyles(this.style);\n Observable.getNotifier(controller).subscribe(this, \"isConnected\");\n this.handleChange(controller, \"isConnected\");\n }\n targetChanged() {\n if (this.target !== null) {\n for (const [key, value] of this.store.entries()) {\n this.target.setProperty(key, value);\n }\n }\n }\n setProperty(name, value) {\n this.store.set(name, value);\n DOM.queueUpdate(() => {\n if (this.target !== null) {\n this.target.setProperty(name, value);\n }\n });\n }\n removeProperty(name) {\n this.store.delete(name);\n DOM.queueUpdate(() => {\n if (this.target !== null) {\n this.target.removeProperty(name);\n }\n });\n }\n handleChange(source, key) {\n // HTMLStyleElement.sheet is null if the element isn't connected to the DOM,\n // so this method reacts to changes in DOM connection for the element hosting\n // the HTMLStyleElement.\n //\n // All rules applied via the CSSOM also get cleared when the element disconnects,\n // so we need to add a new rule each time and populate it with the stored properties\n const { sheet } = this.style;\n if (sheet) {\n // Safari will throw if we try to use the return result of insertRule()\n // to index the rule inline, so store as a const prior to indexing.\n // https://github.com/jsdom/jsdom uses https://github.com/NV/CSSOM for it's CSSOM implementation,\n // which implements the DOM Level 2 spec for CSSStyleSheet where insertRule() requires an index argument.\n const index = sheet.insertRule(\":host{}\", sheet.cssRules.length);\n this.target = sheet.cssRules[index].style;\n }\n else {\n this.target = null;\n }\n }\n}\n__decorate([\n observable\n], StyleElementStyleSheetTarget.prototype, \"target\", void 0);\n/**\n * Handles setting properties for a normal HTMLElement\n */\nclass ElementStyleSheetTarget {\n constructor(source) {\n this.target = source.style;\n }\n setProperty(name, value) {\n DOM.queueUpdate(() => this.target.setProperty(name, value));\n }\n removeProperty(name) {\n DOM.queueUpdate(() => this.target.removeProperty(name));\n }\n}\n/**\n * Controls emission for default values. This control is capable\n * of emitting to multiple {@link PropertyTarget | PropertyTargets},\n * and only emits if it has at least one root.\n *\n * @internal\n */\nexport class RootStyleSheetTarget {\n setProperty(name, value) {\n RootStyleSheetTarget.properties[name] = value;\n for (const target of RootStyleSheetTarget.roots.values()) {\n PropertyTargetManager.getOrCreate(RootStyleSheetTarget.normalizeRoot(target)).setProperty(name, value);\n }\n }\n removeProperty(name) {\n delete RootStyleSheetTarget.properties[name];\n for (const target of RootStyleSheetTarget.roots.values()) {\n PropertyTargetManager.getOrCreate(RootStyleSheetTarget.normalizeRoot(target)).removeProperty(name);\n }\n }\n static registerRoot(root) {\n const { roots } = RootStyleSheetTarget;\n if (!roots.has(root)) {\n roots.add(root);\n const target = PropertyTargetManager.getOrCreate(this.normalizeRoot(root));\n for (const key in RootStyleSheetTarget.properties) {\n target.setProperty(key, RootStyleSheetTarget.properties[key]);\n }\n }\n }\n static unregisterRoot(root) {\n const { roots } = RootStyleSheetTarget;\n if (roots.has(root)) {\n roots.delete(root);\n const target = PropertyTargetManager.getOrCreate(RootStyleSheetTarget.normalizeRoot(root));\n for (const key in RootStyleSheetTarget.properties) {\n target.removeProperty(key);\n }\n }\n }\n /**\n * Returns the document when provided the default element,\n * otherwise is a no-op\n * @param root - the root to normalize\n */\n static normalizeRoot(root) {\n return root === defaultElement ? document : root;\n }\n}\nRootStyleSheetTarget.roots = new Set();\nRootStyleSheetTarget.properties = {};\n// Caches PropertyTarget instances\nconst propertyTargetCache = new WeakMap();\n// Use Constructable StyleSheets for FAST elements when supported, otherwise use\n// HTMLStyleElement instances\nconst propertyTargetCtor = DOM.supportsAdoptedStyleSheets\n ? ConstructableStyleSheetTarget\n : StyleElementStyleSheetTarget;\n/**\n * Manages creation and caching of PropertyTarget instances.\n *\n * @internal\n */\nexport const PropertyTargetManager = Object.freeze({\n getOrCreate(source) {\n if (propertyTargetCache.has(source)) {\n /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\n return propertyTargetCache.get(source);\n }\n let target;\n if (source === defaultElement) {\n target = new RootStyleSheetTarget();\n }\n else if (source instanceof Document) {\n target = DOM.supportsAdoptedStyleSheets\n ? new DocumentStyleSheetTarget()\n : new HeadStyleElementStyleSheetTarget();\n }\n else if (isFastElement(source)) {\n target = new propertyTargetCtor(source);\n }\n else {\n target = new ElementStyleSheetTarget(source);\n }\n propertyTargetCache.set(source, target);\n return target;\n },\n});\n","import { __decorate } from \"tslib\";\nimport { CSSDirective, defaultExecutionContext, FASTElement, observable, Observable, } from \"@microsoft/fast-element\";\nimport { composedParent } from \"../utilities/composed-parent.js\";\nimport { composedContains } from \"../utilities/composed-contains.js\";\nimport { PropertyTargetManager, RootStyleSheetTarget, } from \"./custom-property-manager.js\";\nimport { defaultElement } from \"./custom-property-manager.js\";\n/**\n * Implementation of {@link (DesignToken:interface)}\n */\nclass DesignTokenImpl extends CSSDirective {\n constructor(configuration) {\n super();\n this.subscribers = new WeakMap();\n this._appliedTo = new Set();\n this.name = configuration.name;\n if (configuration.cssCustomPropertyName !== null) {\n this.cssCustomProperty = `--${configuration.cssCustomPropertyName}`;\n this.cssVar = `var(${this.cssCustomProperty})`;\n }\n this.id = DesignTokenImpl.uniqueId();\n DesignTokenImpl.tokensById.set(this.id, this);\n }\n get appliedTo() {\n return [...this._appliedTo];\n }\n static from(nameOrConfig) {\n return new DesignTokenImpl({\n name: typeof nameOrConfig === \"string\" ? nameOrConfig : nameOrConfig.name,\n cssCustomPropertyName: typeof nameOrConfig === \"string\"\n ? nameOrConfig\n : nameOrConfig.cssCustomPropertyName === void 0\n ? nameOrConfig.name\n : nameOrConfig.cssCustomPropertyName,\n });\n }\n static isCSSDesignToken(token) {\n return typeof token.cssCustomProperty === \"string\";\n }\n static isDerivedDesignTokenValue(value) {\n return typeof value === \"function\";\n }\n /**\n * Gets a token by ID. Returns undefined if the token was not found.\n * @param id - The ID of the token\n * @returns\n */\n static getTokenById(id) {\n return DesignTokenImpl.tokensById.get(id);\n }\n getOrCreateSubscriberSet(target = this) {\n return (this.subscribers.get(target) ||\n (this.subscribers.set(target, new Set()) && this.subscribers.get(target)));\n }\n createCSS() {\n return this.cssVar || \"\";\n }\n getValueFor(element) {\n const value = DesignTokenNode.getOrCreate(element).get(this);\n if (value !== undefined) {\n return value;\n }\n throw new Error(`Value could not be retrieved for token named \"${this.name}\". Ensure the value is set for ${element} or an ancestor of ${element}.`);\n }\n setValueFor(element, value) {\n this._appliedTo.add(element);\n if (value instanceof DesignTokenImpl) {\n value = this.alias(value);\n }\n DesignTokenNode.getOrCreate(element).set(this, value);\n return this;\n }\n deleteValueFor(element) {\n this._appliedTo.delete(element);\n if (DesignTokenNode.existsFor(element)) {\n DesignTokenNode.getOrCreate(element).delete(this);\n }\n return this;\n }\n withDefault(value) {\n this.setValueFor(defaultElement, value);\n return this;\n }\n subscribe(subscriber, target) {\n const subscriberSet = this.getOrCreateSubscriberSet(target);\n if (target && !DesignTokenNode.existsFor(target)) {\n DesignTokenNode.getOrCreate(target);\n }\n if (!subscriberSet.has(subscriber)) {\n subscriberSet.add(subscriber);\n }\n }\n unsubscribe(subscriber, target) {\n const list = this.subscribers.get(target || this);\n if (list && list.has(subscriber)) {\n list.delete(subscriber);\n }\n }\n /**\n * Notifies subscribers that the value for an element has changed.\n * @param element - The element to emit a notification for\n */\n notify(element) {\n const record = Object.freeze({ token: this, target: element });\n if (this.subscribers.has(this)) {\n this.subscribers.get(this).forEach(sub => sub.handleChange(record));\n }\n if (this.subscribers.has(element)) {\n this.subscribers.get(element).forEach(sub => sub.handleChange(record));\n }\n }\n /**\n * Alias the token to the provided token.\n * @param token - the token to alias to\n */\n alias(token) {\n return ((target) => token.getValueFor(target));\n }\n}\nDesignTokenImpl.uniqueId = (() => {\n let id = 0;\n return () => {\n id++;\n return id.toString(16);\n };\n})();\n/**\n * Token storage by token ID\n */\nDesignTokenImpl.tokensById = new Map();\nclass CustomPropertyReflector {\n startReflection(token, target) {\n token.subscribe(this, target);\n this.handleChange({ token, target });\n }\n stopReflection(token, target) {\n token.unsubscribe(this, target);\n this.remove(token, target);\n }\n handleChange(record) {\n const { token, target } = record;\n this.add(token, target);\n }\n add(token, target) {\n PropertyTargetManager.getOrCreate(target).setProperty(token.cssCustomProperty, this.resolveCSSValue(DesignTokenNode.getOrCreate(target).get(token)));\n }\n remove(token, target) {\n PropertyTargetManager.getOrCreate(target).removeProperty(token.cssCustomProperty);\n }\n resolveCSSValue(value) {\n return value && typeof value.createCSS === \"function\" ? value.createCSS() : value;\n }\n}\n/**\n * A light wrapper around BindingObserver to handle value caching and\n * token notification\n */\nclass DesignTokenBindingObserver {\n constructor(source, token, node) {\n this.source = source;\n this.token = token;\n this.node = node;\n this.dependencies = new Set();\n this.observer = Observable.binding(source, this, false);\n // This is a little bit hacky because it's using internal APIs of BindingObserverImpl.\n // BindingObserverImpl queues updates to batch it's notifications which doesn't work for this\n // scenario because the DesignToken.getValueFor API is not async. Without this, using DesignToken.getValueFor()\n // after DesignToken.setValueFor() when setting a dependency of the value being retrieved can return a stale\n // value. Assigning .handleChange to .call forces immediate invocation of this classes handleChange() method,\n // allowing resolution of values synchronously.\n // TODO: https://github.com/microsoft/fast/issues/5110\n this.observer.handleChange = this.observer.call;\n this.handleChange();\n }\n disconnect() {\n this.observer.disconnect();\n }\n /**\n * @internal\n */\n handleChange() {\n this.node.store.set(this.token, this.observer.observe(this.node.target, defaultExecutionContext));\n }\n}\n/**\n * Stores resolved token/value pairs and notifies on changes\n */\nclass Store {\n constructor() {\n this.values = new Map();\n }\n set(token, value) {\n if (this.values.get(token) !== value) {\n this.values.set(token, value);\n Observable.getNotifier(this).notify(token.id);\n }\n }\n get(token) {\n Observable.track(this, token.id);\n return this.values.get(token);\n }\n delete(token) {\n this.values.delete(token);\n }\n all() {\n return this.values.entries();\n }\n}\nconst nodeCache = new WeakMap();\nconst childToParent = new WeakMap();\n/**\n * A node responsible for setting and getting token values,\n * emitting values to CSS custom properties, and maintaining\n * inheritance structures.\n */\nclass DesignTokenNode {\n constructor(target) {\n this.target = target;\n /**\n * Stores all resolved token values for a node\n */\n this.store = new Store();\n /**\n * All children assigned to the node\n */\n this.children = [];\n /**\n * All values explicitly assigned to the node in their raw form\n */\n this.assignedValues = new Map();\n /**\n * Tokens currently being reflected to CSS custom properties\n */\n this.reflecting = new Set();\n /**\n * Binding observers for assigned and inherited derived values.\n */\n this.bindingObservers = new Map();\n /**\n * Emits notifications to token when token values\n * change the DesignTokenNode\n */\n this.tokenValueChangeHandler = {\n handleChange: (source, arg) => {\n const token = DesignTokenImpl.getTokenById(arg);\n if (token) {\n // Notify any token subscribers\n token.notify(this.target);\n this.updateCSSTokenReflection(source, token);\n }\n },\n };\n nodeCache.set(target, this);\n // Map store change notifications to token change notifications\n Observable.getNotifier(this.store).subscribe(this.tokenValueChangeHandler);\n if (target instanceof FASTElement) {\n target.$fastController.addBehaviors([this]);\n }\n else if (target.isConnected) {\n this.bind();\n }\n }\n /**\n * Returns a DesignTokenNode for an element.\n * Creates a new instance if one does not already exist for a node,\n * otherwise returns the cached instance\n *\n * @param target - The HTML element to retrieve a DesignTokenNode for\n */\n static getOrCreate(target) {\n return nodeCache.get(target) || new DesignTokenNode(target);\n }\n /**\n * Determines if a DesignTokenNode has been created for a target\n * @param target - The element to test\n */\n static existsFor(target) {\n return nodeCache.has(target);\n }\n /**\n * Searches for and return the nearest parent DesignTokenNode.\n * Null is returned if no node is found or the node provided is for a default element.\n */\n static findParent(node) {\n if (!(defaultElement === node.target)) {\n let parent = composedParent(node.target);\n while (parent !== null) {\n if (nodeCache.has(parent)) {\n return nodeCache.get(parent);\n }\n parent = composedParent(parent);\n }\n return DesignTokenNode.getOrCreate(defaultElement);\n }\n return null;\n }\n /**\n * Finds the closest node with a value explicitly assigned for a token, otherwise null.\n * @param token - The token to look for\n * @param start - The node to start looking for value assignment\n * @returns\n */\n static findClosestAssignedNode(token, start) {\n let current = start;\n do {\n if (current.has(token)) {\n return current;\n }\n current = current.parent\n ? current.parent\n : current.target !== defaultElement\n ? DesignTokenNode.getOrCreate(defaultElement)\n : null;\n } while (current !== null);\n return null;\n }\n /**\n * The parent DesignTokenNode, or null.\n */\n get parent() {\n return childToParent.get(this) || null;\n }\n updateCSSTokenReflection(source, token) {\n if (DesignTokenImpl.isCSSDesignToken(token)) {\n const parent = this.parent;\n const reflecting = this.isReflecting(token);\n if (parent) {\n const parentValue = parent.get(token);\n const sourceValue = source.get(token);\n if (parentValue !== sourceValue && !reflecting) {\n this.reflectToCSS(token);\n }\n else if (parentValue === sourceValue && reflecting) {\n this.stopReflectToCSS(token);\n }\n }\n else if (!reflecting) {\n this.reflectToCSS(token);\n }\n }\n }\n /**\n * Checks if a token has been assigned an explicit value the node.\n * @param token - the token to check.\n */\n has(token) {\n return this.assignedValues.has(token);\n }\n /**\n * Gets the value of a token for a node\n * @param token - The token to retrieve the value for\n * @returns\n */\n get(token) {\n const value = this.store.get(token);\n if (value !== undefined) {\n return value;\n }\n const raw = this.getRaw(token);\n if (raw !== undefined) {\n this.hydrate(token, raw);\n return this.get(token);\n }\n }\n /**\n * Retrieves the raw assigned value of a token from the nearest assigned node.\n * @param token - The token to retrieve a raw value for\n * @returns\n */\n getRaw(token) {\n var _a;\n if (this.assignedValues.has(token)) {\n return this.assignedValues.get(token);\n }\n return (_a = DesignTokenNode.findClosestAssignedNode(token, this)) === null || _a === void 0 ? void 0 : _a.getRaw(token);\n }\n /**\n * Sets a token to a value for a node\n * @param token - The token to set\n * @param value - The value to set the token to\n */\n set(token, value) {\n if (DesignTokenImpl.isDerivedDesignTokenValue(this.assignedValues.get(token))) {\n this.tearDownBindingObserver(token);\n }\n this.assignedValues.set(token, value);\n if (DesignTokenImpl.isDerivedDesignTokenValue(value)) {\n this.setupBindingObserver(token, value);\n }\n else {\n this.store.set(token, value);\n }\n }\n /**\n * Deletes a token value for the node.\n * @param token - The token to delete the value for\n */\n delete(token) {\n this.assignedValues.delete(token);\n this.tearDownBindingObserver(token);\n const upstream = this.getRaw(token);\n if (upstream) {\n this.hydrate(token, upstream);\n }\n else {\n this.store.delete(token);\n }\n }\n /**\n * Invoked when the DesignTokenNode.target is attached to the document\n */\n bind() {\n const parent = DesignTokenNode.findParent(this);\n if (parent) {\n parent.appendChild(this);\n }\n for (const key of this.assignedValues.keys()) {\n key.notify(this.target);\n }\n }\n /**\n * Invoked when the DesignTokenNode.target is detached from the document\n */\n unbind() {\n if (this.parent) {\n const parent = childToParent.get(this);\n parent.removeChild(this);\n }\n }\n /**\n * Appends a child to a parent DesignTokenNode.\n * @param child - The child to append to the node\n */\n appendChild(child) {\n if (child.parent) {\n childToParent.get(child).removeChild(child);\n }\n const reParent = this.children.filter(x => child.contains(x));\n childToParent.set(child, this);\n this.children.push(child);\n reParent.forEach(x => child.appendChild(x));\n Observable.getNotifier(this.store).subscribe(child);\n // How can we not notify *every* subscriber?\n for (const [token, value] of this.store.all()) {\n child.hydrate(token, this.bindingObservers.has(token) ? this.getRaw(token) : value);\n }\n }\n /**\n * Removes a child from a node.\n * @param child - The child to remove.\n */\n removeChild(child) {\n const childIndex = this.children.indexOf(child);\n if (childIndex !== -1) {\n this.children.splice(childIndex, 1);\n }\n Observable.getNotifier(this.store).unsubscribe(child);\n return child.parent === this ? childToParent.delete(child) : false;\n }\n /**\n * Tests whether a provided node is contained by\n * the calling node.\n * @param test - The node to test\n */\n contains(test) {\n return composedContains(this.target, test.target);\n }\n /**\n * Instructs the node to reflect a design token for the provided token.\n * @param token - The design token to reflect\n */\n reflectToCSS(token) {\n if (!this.isReflecting(token)) {\n this.reflecting.add(token);\n DesignTokenNode.cssCustomPropertyReflector.startReflection(token, this.target);\n }\n }\n /**\n * Stops reflecting a DesignToken to CSS\n * @param token - The design token to stop reflecting\n */\n stopReflectToCSS(token) {\n if (this.isReflecting(token)) {\n this.reflecting.delete(token);\n DesignTokenNode.cssCustomPropertyReflector.stopReflection(token, this.target);\n }\n }\n /**\n * Determines if a token is being reflected to CSS for a node.\n * @param token - The token to check for reflection\n * @returns\n */\n isReflecting(token) {\n return this.reflecting.has(token);\n }\n /**\n * Handle changes to upstream tokens\n * @param source - The parent DesignTokenNode\n * @param property - The token ID that changed\n */\n handleChange(source, property) {\n const token = DesignTokenImpl.getTokenById(property);\n if (!token) {\n return;\n }\n this.hydrate(token, this.getRaw(token));\n this.updateCSSTokenReflection(this.store, token);\n }\n /**\n * Hydrates a token with a DesignTokenValue, making retrieval available.\n * @param token - The token to hydrate\n * @param value - The value to hydrate\n */\n hydrate(token, value) {\n if (!this.has(token)) {\n const observer = this.bindingObservers.get(token);\n if (DesignTokenImpl.isDerivedDesignTokenValue(value)) {\n if (observer) {\n // If the binding source doesn't match, we need\n // to update the binding\n if (observer.source !== value) {\n this.tearDownBindingObserver(token);\n this.setupBindingObserver(token, value);\n }\n }\n else {\n this.setupBindingObserver(token, value);\n }\n }\n else {\n if (observer) {\n this.tearDownBindingObserver(token);\n }\n this.store.set(token, value);\n }\n }\n }\n /**\n * Sets up a binding observer for a derived token value that notifies token\n * subscribers on change.\n *\n * @param token - The token to notify when the binding updates\n * @param source - The binding source\n */\n setupBindingObserver(token, source) {\n const binding = new DesignTokenBindingObserver(source, token, this);\n this.bindingObservers.set(token, binding);\n return binding;\n }\n /**\n * Tear down a binding observer for a token.\n */\n tearDownBindingObserver(token) {\n if (this.bindingObservers.has(token)) {\n this.bindingObservers.get(token).disconnect();\n this.bindingObservers.delete(token);\n return true;\n }\n return false;\n }\n}\n/**\n * Responsible for reflecting tokens to CSS custom properties\n */\nDesignTokenNode.cssCustomPropertyReflector = new CustomPropertyReflector();\n__decorate([\n observable\n], DesignTokenNode.prototype, \"children\", void 0);\nfunction create(nameOrConfig) {\n return DesignTokenImpl.from(nameOrConfig);\n}\n/* eslint-enable @typescript-eslint/no-unused-vars */\n/**\n * Factory object for creating {@link (DesignToken:interface)} instances.\n * @public\n */\nexport const DesignToken = Object.freeze({\n create,\n /**\n * Informs DesignToken that an HTMLElement for which tokens have\n * been set has been connected to the document.\n *\n * The browser does not provide a reliable mechanism to observe an HTMLElement's connectedness\n * in all scenarios, so invoking this method manually is necessary when:\n *\n * 1. Token values are set for an HTMLElement.\n * 2. The HTMLElement does not inherit from FASTElement.\n * 3. The HTMLElement is not connected to the document when token values are set.\n *\n * @param element - The element to notify\n * @returns - true if notification was successful, otherwise false.\n */\n notifyConnection(element) {\n if (!element.isConnected || !DesignTokenNode.existsFor(element)) {\n return false;\n }\n DesignTokenNode.getOrCreate(element).bind();\n return true;\n },\n /**\n * Informs DesignToken that an HTMLElement for which tokens have\n * been set has been disconnected to the document.\n *\n * The browser does not provide a reliable mechanism to observe an HTMLElement's connectedness\n * in all scenarios, so invoking this method manually is necessary when:\n *\n * 1. Token values are set for an HTMLElement.\n * 2. The HTMLElement does not inherit from FASTElement.\n *\n * @param element - The element to notify\n * @returns - true if notification was successful, otherwise false.\n */\n notifyDisconnection(element) {\n if (element.isConnected || !DesignTokenNode.existsFor(element)) {\n return false;\n }\n DesignTokenNode.getOrCreate(element).unbind();\n return true;\n },\n /**\n * Registers and element or document as a DesignToken root.\n * {@link CSSDesignToken | CSSDesignTokens} with default values assigned via\n * {@link (DesignToken:interface).withDefault} will emit CSS custom properties to all\n * registered roots.\n * @param target - The root to register\n */\n registerRoot(target = defaultElement) {\n RootStyleSheetTarget.registerRoot(target);\n },\n /**\n * Unregister an element or document as a DesignToken root.\n * @param target - The root to deregister\n */\n unregisterRoot(target = defaultElement) {\n RootStyleSheetTarget.unregisterRoot(target);\n },\n});\n/* eslint-enable @typescript-eslint/no-non-null-assertion */\n","/**\n * Big thanks to https://github.com/fkleuver and the https://github.com/aurelia/aurelia project\n * for the bulk of this code and many of the associated tests.\n */\nimport { emptyArray, FASTElement } from \"@microsoft/fast-element\";\n// Tiny polyfill for TypeScript's Reflect metadata API.\nconst metadataByTarget = new Map();\nif (!(\"metadata\" in Reflect)) {\n Reflect.metadata = function (key, value) {\n return function (target) {\n Reflect.defineMetadata(key, value, target);\n };\n };\n Reflect.defineMetadata = function (key, value, target) {\n let metadata = metadataByTarget.get(target);\n if (metadata === void 0) {\n metadataByTarget.set(target, (metadata = new Map()));\n }\n metadata.set(key, value);\n };\n Reflect.getOwnMetadata = function (key, target) {\n const metadata = metadataByTarget.get(target);\n if (metadata !== void 0) {\n return metadata.get(key);\n }\n return void 0;\n };\n}\n/**\n * A utility class used that constructs and registers resolvers for a dependency\n * injection container. Supports a standard set of object lifetimes.\n * @public\n */\nexport class ResolverBuilder {\n /**\n *\n * @param container - The container to create resolvers for.\n * @param key - The key to register resolvers under.\n */\n constructor(container, key) {\n this.container = container;\n this.key = key;\n }\n /**\n * Creates a resolver for an existing object instance.\n * @param value - The instance to resolve.\n * @returns The resolver.\n */\n instance(value) {\n return this.registerResolver(0 /* instance */, value);\n }\n /**\n * Creates a resolver that enforces a singleton lifetime.\n * @param value - The type to create and cache the singleton for.\n * @returns The resolver.\n */\n singleton(value) {\n return this.registerResolver(1 /* singleton */, value);\n }\n /**\n * Creates a resolver that creates a new instance for every dependency request.\n * @param value - The type to create instances of.\n * @returns - The resolver.\n */\n transient(value) {\n return this.registerResolver(2 /* transient */, value);\n }\n /**\n * Creates a resolver that invokes a callback function for every dependency resolution\n * request, allowing custom logic to return the dependency.\n * @param value - The callback to call during resolution.\n * @returns The resolver.\n */\n callback(value) {\n return this.registerResolver(3 /* callback */, value);\n }\n /**\n * Creates a resolver that invokes a callback function the first time that a dependency\n * resolution is requested. The returned value is then cached and provided for all\n * subsequent requests.\n * @param value - The callback to call during the first resolution.\n * @returns The resolver.\n */\n cachedCallback(value) {\n return this.registerResolver(3 /* callback */, cacheCallbackResult(value));\n }\n /**\n * Aliases the current key to a different key.\n * @param destinationKey - The key to point the alias to.\n * @returns The resolver.\n */\n aliasTo(destinationKey) {\n return this.registerResolver(5 /* alias */, destinationKey);\n }\n registerResolver(strategy, state) {\n const { container, key } = this;\n /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\n this.container = this.key = (void 0);\n return container.registerResolver(key, new ResolverImpl(key, strategy, state));\n }\n}\nfunction cloneArrayWithPossibleProps(source) {\n const clone = source.slice();\n const keys = Object.keys(source);\n const len = keys.length;\n let key;\n for (let i = 0; i < len; ++i) {\n key = keys[i];\n if (!isArrayIndex(key)) {\n clone[key] = source[key];\n }\n }\n return clone;\n}\n/**\n * A set of default resolvers useful in configuring a container.\n * @public\n */\nexport const DefaultResolver = Object.freeze({\n /**\n * Disables auto-registration and throws for all un-registered dependencies.\n * @param key - The key to create the resolver for.\n */\n none(key) {\n throw Error(`${key.toString()} not registered, did you forget to add @singleton()?`);\n },\n /**\n * Provides default singleton resolution behavior during auto-registration.\n * @param key - The key to create the resolver for.\n * @returns The resolver.\n */\n singleton(key) {\n return new ResolverImpl(key, 1 /* singleton */, key);\n },\n /**\n * Provides default transient resolution behavior during auto-registration.\n * @param key - The key to create the resolver for.\n * @returns The resolver.\n */\n transient(key) {\n return new ResolverImpl(key, 2 /* transient */, key);\n },\n});\n/**\n * Configuration for a dependency injection container.\n * @public\n */\nexport const ContainerConfiguration = Object.freeze({\n /**\n * The default configuration used when creating a DOM-disconnected container.\n * @remarks\n * The default creates a root container, with no parent container. It does not handle\n * owner requests and it uses singleton resolution behavior for auto-registration.\n */\n default: Object.freeze({\n parentLocator: () => null,\n responsibleForOwnerRequests: false,\n defaultResolver: DefaultResolver.singleton,\n }),\n});\nconst dependencyLookup = new Map();\nfunction getParamTypes(key) {\n return (Type) => {\n return Reflect.getOwnMetadata(key, Type);\n };\n}\nlet rootDOMContainer = null;\n/**\n * The gateway to dependency injection APIs.\n * @public\n */\nexport const DI = Object.freeze({\n /**\n * Creates a new dependency injection container.\n * @param config - The configuration for the container.\n * @returns A newly created dependency injection container.\n */\n createContainer(config) {\n return new ContainerImpl(null, Object.assign({}, ContainerConfiguration.default, config));\n },\n /**\n * Finds the dependency injection container responsible for providing dependencies\n * to the specified node.\n * @param node - The node to find the responsible container for.\n * @returns The container responsible for providing dependencies to the node.\n * @remarks\n * This will be the same as the parent container if the specified node\n * does not itself host a container configured with responsibleForOwnerRequests.\n */\n findResponsibleContainer(node) {\n const owned = node.$$container$$;\n if (owned && owned.responsibleForOwnerRequests) {\n return owned;\n }\n return DI.findParentContainer(node);\n },\n /**\n * Find the dependency injection container up the DOM tree from this node.\n * @param node - The node to find the parent container for.\n * @returns The parent container of this node.\n * @remarks\n * This will be the same as the responsible container if the specified node\n * does not itself host a container configured with responsibleForOwnerRequests.\n */\n findParentContainer(node) {\n const event = new CustomEvent(DILocateParentEventType, {\n bubbles: true,\n composed: true,\n cancelable: true,\n detail: { container: void 0 },\n });\n node.dispatchEvent(event);\n return event.detail.container || DI.getOrCreateDOMContainer();\n },\n /**\n * Returns a dependency injection container if one is explicitly owned by the specified\n * node. If one is not owned, then a new container is created and assigned to the node.\n * @param node - The node to find or create the container for.\n * @param config - The configuration for the container if one needs to be created.\n * @returns The located or created container.\n * @remarks\n * This API does not search for a responsible or parent container. It looks only for a container\n * directly defined on the specified node and creates one at that location if one does not\n * already exist.\n */\n getOrCreateDOMContainer(node, config) {\n if (!node) {\n return (rootDOMContainer ||\n (rootDOMContainer = new ContainerImpl(null, Object.assign({}, ContainerConfiguration.default, config, {\n parentLocator: () => null,\n }))));\n }\n return (node.$$container$$ ||\n new ContainerImpl(node, Object.assign({}, ContainerConfiguration.default, config, {\n parentLocator: DI.findParentContainer,\n })));\n },\n /**\n * Gets the \"design:paramtypes\" metadata for the specified type.\n * @param Type - The type to get the metadata for.\n * @returns The metadata array or undefined if no metadata is found.\n */\n getDesignParamtypes: getParamTypes(\"design:paramtypes\"),\n /**\n * Gets the \"di:paramtypes\" metadata for the specified type.\n * @param Type - The type to get the metadata for.\n * @returns The metadata array or undefined if no metadata is found.\n */\n getAnnotationParamtypes: getParamTypes(\"di:paramtypes\"),\n /**\n *\n * @param Type - Gets the \"di:paramtypes\" metadata for the specified type. If none is found,\n * an empty metadata array is created and added.\n * @returns The metadata array.\n */\n getOrCreateAnnotationParamTypes(Type) {\n let annotationParamtypes = this.getAnnotationParamtypes(Type);\n if (annotationParamtypes === void 0) {\n Reflect.defineMetadata(\"di:paramtypes\", (annotationParamtypes = []), Type);\n }\n return annotationParamtypes;\n },\n /**\n * Gets the dependency keys representing what is needed to instantiate the specified type.\n * @param Type - The type to get the dependencies for.\n * @returns An array of dependency keys.\n */\n getDependencies(Type) {\n // Note: Every detail of this getDependencies method is pretty deliberate at the moment, and probably not yet 100% tested from every possible angle,\n // so be careful with making changes here as it can have a huge impact on complex end user apps.\n // Preferably, only make changes to the dependency resolution process via a RFC.\n let dependencies = dependencyLookup.get(Type);\n if (dependencies === void 0) {\n // Type.length is the number of constructor parameters. If this is 0, it could mean the class has an empty constructor\n // but it could also mean the class has no constructor at all (in which case it inherits the constructor from the prototype).\n // Non-zero constructor length + no paramtypes means emitDecoratorMetadata is off, or the class has no decorator.\n // We're not doing anything with the above right now, but it's good to keep in mind for any future issues.\n const inject = Type.inject;\n if (inject === void 0) {\n // design:paramtypes is set by tsc when emitDecoratorMetadata is enabled.\n const designParamtypes = DI.getDesignParamtypes(Type);\n // di:paramtypes is set by the parameter decorator from DI.createInterface or by @inject\n const annotationParamtypes = DI.getAnnotationParamtypes(Type);\n if (designParamtypes === void 0) {\n if (annotationParamtypes === void 0) {\n // Only go up the prototype if neither static inject nor any of the paramtypes is defined, as\n // there is no sound way to merge a type's deps with its prototype's deps\n const Proto = Object.getPrototypeOf(Type);\n if (typeof Proto === \"function\" && Proto !== Function.prototype) {\n dependencies = cloneArrayWithPossibleProps(DI.getDependencies(Proto));\n }\n else {\n dependencies = [];\n }\n }\n else {\n // No design:paramtypes so just use the di:paramtypes\n dependencies = cloneArrayWithPossibleProps(annotationParamtypes);\n }\n }\n else if (annotationParamtypes === void 0) {\n // No di:paramtypes so just use the design:paramtypes\n dependencies = cloneArrayWithPossibleProps(designParamtypes);\n }\n else {\n // We've got both, so merge them (in case of conflict on same index, di:paramtypes take precedence)\n dependencies = cloneArrayWithPossibleProps(designParamtypes);\n let len = annotationParamtypes.length;\n let auAnnotationParamtype;\n for (let i = 0; i < len; ++i) {\n auAnnotationParamtype = annotationParamtypes[i];\n if (auAnnotationParamtype !== void 0) {\n dependencies[i] = auAnnotationParamtype;\n }\n }\n const keys = Object.keys(annotationParamtypes);\n len = keys.length;\n let key;\n for (let i = 0; i < len; ++i) {\n key = keys[i];\n if (!isArrayIndex(key)) {\n dependencies[key] = annotationParamtypes[key];\n }\n }\n }\n }\n else {\n // Ignore paramtypes if we have static inject\n dependencies = cloneArrayWithPossibleProps(inject);\n }\n dependencyLookup.set(Type, dependencies);\n }\n return dependencies;\n },\n /**\n * Defines a property on a web component class. The value of this property will\n * be resolved from the dependency injection container responsible for the element\n * instance, based on where it is connected in the DOM.\n * @param target - The target to define the property on.\n * @param propertyName - The name of the property to define.\n * @param key - The dependency injection key.\n * @param respectConnection - Indicates whether or not to update the property value if the\n * hosting component is disconnected and then re-connected at a different location in the DOM.\n * @remarks\n * The respectConnection option is only applicable to elements that descend from FASTElement.\n */\n defineProperty(target, propertyName, key, respectConnection = false) {\n const diPropertyKey = `$di_${propertyName}`;\n Reflect.defineProperty(target, propertyName, {\n get: function () {\n let value = this[diPropertyKey];\n if (value === void 0) {\n const container = this instanceof HTMLElement\n ? DI.findResponsibleContainer(this)\n : DI.getOrCreateDOMContainer();\n value = container.get(key);\n this[diPropertyKey] = value;\n if (respectConnection && this instanceof FASTElement) {\n const notifier = this.$fastController;\n const handleChange = () => {\n const newContainer = DI.findResponsibleContainer(this);\n const newValue = newContainer.get(key);\n const oldValue = this[diPropertyKey];\n if (newValue !== oldValue) {\n this[diPropertyKey] = value;\n notifier.notify(propertyName);\n }\n };\n notifier.subscribe({ handleChange }, \"isConnected\");\n }\n }\n return value;\n },\n });\n },\n /**\n * Creates a dependency injection key.\n * @param nameConfigOrCallback - A friendly name for the key or a lambda that configures a\n * default resolution for the dependency.\n * @param configuror - If a friendly name was provided for the first parameter, then an optional\n * lambda that configures a default resolution for the dependency can be provided second.\n * @returns The created key.\n * @remarks\n * The created key can be used as a property decorator or constructor parameter decorator,\n * in addition to its standard use in an inject array or through direct container APIs.\n */\n createInterface(nameConfigOrCallback, configuror) {\n const configure = typeof nameConfigOrCallback === \"function\"\n ? nameConfigOrCallback\n : configuror;\n const friendlyName = typeof nameConfigOrCallback === \"string\"\n ? nameConfigOrCallback\n : nameConfigOrCallback && \"friendlyName\" in nameConfigOrCallback\n ? nameConfigOrCallback.friendlyName || defaultFriendlyName\n : defaultFriendlyName;\n const respectConnection = typeof nameConfigOrCallback === \"string\"\n ? false\n : nameConfigOrCallback && \"respectConnection\" in nameConfigOrCallback\n ? nameConfigOrCallback.respectConnection || false\n : false;\n const Interface = function (target, property, index) {\n if (target == null || new.target !== undefined) {\n throw new Error(`No registration for interface: '${Interface.friendlyName}'`);\n }\n if (property) {\n DI.defineProperty(target, property, Interface, respectConnection);\n }\n else {\n const annotationParamtypes = DI.getOrCreateAnnotationParamTypes(target);\n annotationParamtypes[index] = Interface;\n }\n };\n Interface.$isInterface = true;\n Interface.friendlyName = friendlyName == null ? \"(anonymous)\" : friendlyName;\n if (configure != null) {\n Interface.register = function (container, key) {\n return configure(new ResolverBuilder(container, key !== null && key !== void 0 ? key : Interface));\n };\n }\n Interface.toString = function toString() {\n return `InterfaceSymbol<${Interface.friendlyName}>`;\n };\n return Interface;\n },\n /**\n * A decorator that specifies what to inject into its target.\n * @param dependencies - The dependencies to inject.\n * @returns The decorator to be applied to the target class.\n * @remarks\n * The decorator can be used to decorate a class, listing all of the classes dependencies.\n * Or it can be used to decorate a constructor paramter, indicating what to inject for that\n * parameter.\n * Or it can be used for a web component property, indicating what that property should resolve to.\n */\n inject(...dependencies) {\n return function (target, key, descriptor) {\n if (typeof descriptor === \"number\") {\n // It's a parameter decorator.\n const annotationParamtypes = DI.getOrCreateAnnotationParamTypes(target);\n const dep = dependencies[0];\n if (dep !== void 0) {\n annotationParamtypes[descriptor] = dep;\n }\n }\n else if (key) {\n DI.defineProperty(target, key, dependencies[0]);\n }\n else {\n const annotationParamtypes = descriptor\n ? DI.getOrCreateAnnotationParamTypes(descriptor.value)\n : DI.getOrCreateAnnotationParamTypes(target);\n let dep;\n for (let i = 0; i < dependencies.length; ++i) {\n dep = dependencies[i];\n if (dep !== void 0) {\n annotationParamtypes[i] = dep;\n }\n }\n }\n };\n },\n /**\n * Registers the `target` class as a transient dependency; each time the dependency is resolved\n * a new instance will be created.\n *\n * @param target - The class / constructor function to register as transient.\n * @returns The same class, with a static `register` method that takes a container and returns the appropriate resolver.\n *\n * @example\n * On an existing class\n * ```ts\n * class Foo { }\n * DI.transient(Foo);\n * ```\n *\n * @example\n * Inline declaration\n *\n * ```ts\n * const Foo = DI.transient(class { });\n * // Foo is now strongly typed with register\n * Foo.register(container);\n * ```\n *\n * @public\n */\n transient(target) {\n target.register = function register(container) {\n const registration = Registration.transient(target, target);\n return registration.register(container);\n };\n target.registerInRequestor = false;\n return target;\n },\n /**\n * Registers the `target` class as a singleton dependency; the class will only be created once. Each\n * consecutive time the dependency is resolved, the same instance will be returned.\n *\n * @param target - The class / constructor function to register as a singleton.\n * @returns The same class, with a static `register` method that takes a container and returns the appropriate resolver.\n * @example\n * On an existing class\n * ```ts\n * class Foo { }\n * DI.singleton(Foo);\n * ```\n *\n * @example\n * Inline declaration\n * ```ts\n * const Foo = DI.singleton(class { });\n * // Foo is now strongly typed with register\n * Foo.register(container);\n * ```\n *\n * @public\n */\n singleton(target, options = defaultSingletonOptions) {\n target.register = function register(container) {\n const registration = Registration.singleton(target, target);\n return registration.register(container);\n };\n target.registerInRequestor = options.scoped;\n return target;\n },\n});\n/**\n * The interface key that resolves the dependency injection container itself.\n * @public\n */\nexport const Container = DI.createInterface(\"Container\");\n/**\n * The interface key that resolves the service locator itself.\n * @public\n */\nexport const ServiceLocator = Container;\nfunction createResolver(getter) {\n return function (key) {\n const resolver = function (target, property, descriptor) {\n DI.inject(resolver)(target, property, descriptor);\n };\n resolver.$isResolver = true;\n resolver.resolve = function (handler, requestor) {\n return getter(key, handler, requestor);\n };\n return resolver;\n };\n}\n/**\n * A decorator that specifies what to inject into its target.\n * @param dependencies - The dependencies to inject.\n * @returns The decorator to be applied to the target class.\n * @remarks\n * The decorator can be used to decorate a class, listing all of the classes dependencies.\n * Or it can be used to decorate a constructor paramter, indicating what to inject for that\n * parameter.\n * Or it can be used for a web component property, indicating what that property should resolve to.\n *\n * @public\n */\nexport const inject = DI.inject;\nfunction transientDecorator(target) {\n return DI.transient(target);\n}\nexport function transient(target) {\n return target == null ? transientDecorator : transientDecorator(target);\n}\nconst defaultSingletonOptions = { scoped: false };\nfunction singletonDecorator(target) {\n return DI.singleton(target);\n}\n/**\n * @public\n */\nexport function singleton(targetOrOptions) {\n if (typeof targetOrOptions === \"function\") {\n return DI.singleton(targetOrOptions);\n }\n return function ($target) {\n return DI.singleton($target, targetOrOptions);\n };\n}\nfunction createAllResolver(getter) {\n return function (key, searchAncestors) {\n searchAncestors = !!searchAncestors;\n const resolver = function (target, property, descriptor) {\n DI.inject(resolver)(target, property, descriptor);\n };\n resolver.$isResolver = true;\n resolver.resolve = function (handler, requestor) {\n /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\n return getter(key, handler, requestor, searchAncestors);\n };\n return resolver;\n };\n}\n/**\n * A decorator and DI resolver that will resolve an array of all dependencies\n * registered with the specified key.\n * @param key - The key to resolve all dependencies for.\n * @param searchAncestors - [optional] Indicates whether to search ancestor containers.\n * @public\n */\nexport const all = createAllResolver((key, handler, requestor, searchAncestors) => requestor.getAll(key, searchAncestors));\n/**\n * A decorator that lazily injects a dependency depending on whether the `Key` is present at the time of function call.\n *\n * @example\n * You need to make your argument a function that returns the type, for example\n * ```ts\n * class Foo {\n * constructor( @lazy('random') public random: () => number )\n * }\n * const foo = container.get(Foo); // instanceof Foo\n * foo.random(); // throws\n * ```\n * would throw an exception because you haven't registered `'random'` before calling the method.\n * @example\n * This, would give you a new 'Math.random()' number each time.\n * ```ts\n * class Foo {\n * constructor( @lazy('random') public random: () => random )\n * }\n * container.register(Registration.callback('random', Math.random ));\n * container.get(Foo).random(); // some random number\n * container.get(Foo).random(); // another random number\n * ```\n *\n * `@lazy` does not manage the lifecycle of the underlying key. If you want a singleton, you have to register as a\n * `singleton`, `transient` would also behave as you would expect, providing you a new instance each time.\n *\n * @param key - The key to lazily resolve.\n * see {@link DI.createInterface} on interactions with interfaces\n *\n * @public\n */\nexport const lazy = createResolver((key, handler, requestor) => {\n return () => requestor.get(key);\n});\n/**\n * A decorator that allows you to optionally inject a dependency depending on whether the [[`Key`]] is present, for example:\n * @example\n * ```ts\n * class Foo {\n * constructor( @inject('mystring') public str: string = 'somestring' )\n * }\n * container.get(Foo); // throws\n * ```\n * would fail\n *\n * @example\n * ```ts\n * class Foo {\n * constructor( @optional('mystring') public str: string = 'somestring' )\n * }\n * container.get(Foo).str // somestring\n * ```\n * if you use it without a default it will inject `undefined`, so remember to mark your input type as\n * possibly `undefined`!\n *\n * @param key - The key to optionally resolve.\n * see {@link DI.createInterface} on interactions with interfaces\n *\n * @public\n */\nexport const optional = createResolver((key, handler, requestor) => {\n if (requestor.has(key, true)) {\n return requestor.get(key);\n }\n else {\n return undefined;\n }\n});\n/**\n * A decorator that tells the container not to try to inject a dependency.\n *\n * @public\n */\nexport function ignore(target, property, descriptor) {\n DI.inject(ignore)(target, property, descriptor);\n}\n// Hack: casting below used to prevent TS from generate a namespace which can't be commented\n// and results in documentation validation errors.\nignore.$isResolver = true;\nignore.resolve = () => undefined;\n/**\n * A decorator that indicates that a new instance should be injected scoped to the\n * container that requested the instance.\n * @param key - The dependency key for the new instance.\n * @remarks\n * This creates a resolver with an instance strategy pointing to the new instance, effectively\n * making this a singleton, scoped to the container or DOM's subtree.\n *\n * @public\n */\nexport const newInstanceForScope = createResolver((key, handler, requestor) => {\n const instance = createNewInstance(key, handler);\n const resolver = new ResolverImpl(key, 0 /* instance */, instance);\n requestor.registerResolver(key, resolver);\n return instance;\n});\n/**\n * A decorator that indicates that a new instance should be injected.\n * @param key - The dependency key for the new instance.\n * @remarks\n * The instance is not internally cached with a resolver as newInstanceForScope does.\n *\n * @public\n */\nexport const newInstanceOf = createResolver((key, handler, _requestor) => createNewInstance(key, handler));\nfunction createNewInstance(key, handler) {\n /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\n return handler.getFactory(key).construct(handler);\n}\n/** @internal */\nexport class ResolverImpl {\n constructor(key, strategy, state) {\n this.key = key;\n this.strategy = strategy;\n this.state = state;\n this.resolving = false;\n }\n get $isResolver() {\n return true;\n }\n register(container) {\n return container.registerResolver(this.key, this);\n }\n resolve(handler, requestor) {\n switch (this.strategy) {\n case 0 /* instance */:\n return this.state;\n case 1 /* singleton */: {\n if (this.resolving) {\n throw new Error(`Cyclic dependency found: ${this.state.name}`);\n }\n this.resolving = true;\n this.state = handler\n .getFactory(this.state)\n .construct(requestor);\n this.strategy = 0 /* instance */;\n this.resolving = false;\n return this.state;\n }\n case 2 /* transient */: {\n // Always create transients from the requesting container\n const factory = handler.getFactory(this.state);\n if (factory === null) {\n throw new Error(`Resolver for ${String(this.key)} returned a null factory`);\n }\n return factory.construct(requestor);\n }\n case 3 /* callback */:\n return this.state(handler, requestor, this);\n case 4 /* array */:\n return this.state[0].resolve(handler, requestor);\n case 5 /* alias */:\n return requestor.get(this.state);\n default:\n throw new Error(`Invalid resolver strategy specified: ${this.strategy}.`);\n }\n }\n getFactory(container) {\n var _a, _b, _c;\n switch (this.strategy) {\n case 1 /* singleton */:\n case 2 /* transient */:\n return container.getFactory(this.state);\n case 5 /* alias */:\n return (_c = (_b = (_a = container.getResolver(this.state)) === null || _a === void 0 ? void 0 : _a.getFactory) === null || _b === void 0 ? void 0 : _b.call(_a, container)) !== null && _c !== void 0 ? _c : null;\n default:\n return null;\n }\n }\n}\nfunction containerGetKey(d) {\n return this.get(d);\n}\nfunction transformInstance(inst, transform) {\n return transform(inst);\n}\n/** @internal */\nexport class FactoryImpl {\n constructor(Type, dependencies) {\n this.Type = Type;\n this.dependencies = dependencies;\n this.transformers = null;\n }\n construct(container, dynamicDependencies) {\n let instance;\n if (dynamicDependencies === void 0) {\n instance = new this.Type(...this.dependencies.map(containerGetKey, container));\n }\n else {\n instance = new this.Type(...this.dependencies.map(containerGetKey, container), ...dynamicDependencies);\n }\n if (this.transformers == null) {\n return instance;\n }\n return this.transformers.reduce(transformInstance, instance);\n }\n registerTransformer(transformer) {\n (this.transformers || (this.transformers = [])).push(transformer);\n }\n}\nconst containerResolver = {\n $isResolver: true,\n resolve(handler, requestor) {\n return requestor;\n },\n};\nfunction isRegistry(obj) {\n return typeof obj.register === \"function\";\n}\nfunction isSelfRegistry(obj) {\n return isRegistry(obj) && typeof obj.registerInRequestor === \"boolean\";\n}\nfunction isRegisterInRequester(obj) {\n return isSelfRegistry(obj) && obj.registerInRequestor;\n}\nfunction isClass(obj) {\n return obj.prototype !== void 0;\n}\nconst InstrinsicTypeNames = new Set([\n \"Array\",\n \"ArrayBuffer\",\n \"Boolean\",\n \"DataView\",\n \"Date\",\n \"Error\",\n \"EvalError\",\n \"Float32Array\",\n \"Float64Array\",\n \"Function\",\n \"Int8Array\",\n \"Int16Array\",\n \"Int32Array\",\n \"Map\",\n \"Number\",\n \"Object\",\n \"Promise\",\n \"RangeError\",\n \"ReferenceError\",\n \"RegExp\",\n \"Set\",\n \"SharedArrayBuffer\",\n \"String\",\n \"SyntaxError\",\n \"TypeError\",\n \"Uint8Array\",\n \"Uint8ClampedArray\",\n \"Uint16Array\",\n \"Uint32Array\",\n \"URIError\",\n \"WeakMap\",\n \"WeakSet\",\n]);\nconst DILocateParentEventType = \"__DI_LOCATE_PARENT__\";\nconst factories = new Map();\n/**\n * @internal\n */\nexport class ContainerImpl {\n constructor(owner, config) {\n this.owner = owner;\n this.config = config;\n this._parent = void 0;\n this.registerDepth = 0;\n this.context = null;\n if (owner !== null) {\n owner.$$container$$ = this;\n }\n this.resolvers = new Map();\n this.resolvers.set(Container, containerResolver);\n if (owner instanceof Node) {\n owner.addEventListener(DILocateParentEventType, (e) => {\n if (e.composedPath()[0] !== this.owner) {\n e.detail.container = this;\n e.stopImmediatePropagation();\n }\n });\n }\n }\n get parent() {\n if (this._parent === void 0) {\n this._parent = this.config.parentLocator(this.owner);\n }\n return this._parent;\n }\n get depth() {\n return this.parent === null ? 0 : this.parent.depth + 1;\n }\n get responsibleForOwnerRequests() {\n return this.config.responsibleForOwnerRequests;\n }\n registerWithContext(context, ...params) {\n this.context = context;\n this.register(...params);\n this.context = null;\n return this;\n }\n register(...params) {\n if (++this.registerDepth === 100) {\n throw new Error(\"Unable to autoregister dependency\");\n // Most likely cause is trying to register a plain object that does not have a\n // register method and is not a class constructor\n }\n let current;\n let keys;\n let value;\n let j;\n let jj;\n const context = this.context;\n for (let i = 0, ii = params.length; i < ii; ++i) {\n current = params[i];\n if (!isObject(current)) {\n continue;\n }\n if (isRegistry(current)) {\n current.register(this, context);\n }\n else if (isClass(current)) {\n Registration.singleton(current, current).register(this);\n }\n else {\n keys = Object.keys(current);\n j = 0;\n jj = keys.length;\n for (; j < jj; ++j) {\n value = current[keys[j]];\n if (!isObject(value)) {\n continue;\n }\n // note: we could remove this if-branch and call this.register directly\n // - the extra check is just a perf tweak to create fewer unnecessary arrays by the spread operator\n if (isRegistry(value)) {\n value.register(this, context);\n }\n else {\n this.register(value);\n }\n }\n }\n }\n --this.registerDepth;\n return this;\n }\n registerResolver(key, resolver) {\n validateKey(key);\n const resolvers = this.resolvers;\n const result = resolvers.get(key);\n if (result == null) {\n resolvers.set(key, resolver);\n }\n else if (result instanceof ResolverImpl &&\n result.strategy === 4 /* array */) {\n result.state.push(resolver);\n }\n else {\n resolvers.set(key, new ResolverImpl(key, 4 /* array */, [result, resolver]));\n }\n return resolver;\n }\n registerTransformer(key, transformer) {\n const resolver = this.getResolver(key);\n if (resolver == null) {\n return false;\n }\n if (resolver.getFactory) {\n const factory = resolver.getFactory(this);\n if (factory == null) {\n return false;\n }\n // This type cast is a bit of a hacky one, necessary due to the duplicity of IResolverLike.\n // Problem is that that interface's type arg can be of type Key, but the getFactory method only works on\n // type Constructable. So the return type of that optional method has this additional constraint, which\n // seems to confuse the type checker.\n factory.registerTransformer(transformer);\n return true;\n }\n return false;\n }\n getResolver(key, autoRegister = true) {\n validateKey(key);\n if (key.resolve !== void 0) {\n return key;\n }\n /* eslint-disable-next-line @typescript-eslint/no-this-alias */\n let current = this;\n let resolver;\n while (current != null) {\n resolver = current.resolvers.get(key);\n if (resolver == null) {\n if (current.parent == null) {\n const handler = isRegisterInRequester(key)\n ? this\n : current;\n return autoRegister ? this.jitRegister(key, handler) : null;\n }\n current = current.parent;\n }\n else {\n return resolver;\n }\n }\n return null;\n }\n has(key, searchAncestors = false) {\n return this.resolvers.has(key)\n ? true\n : searchAncestors && this.parent != null\n ? this.parent.has(key, true)\n : false;\n }\n get(key) {\n validateKey(key);\n if (key.$isResolver) {\n return key.resolve(this, this);\n }\n /* eslint-disable-next-line @typescript-eslint/no-this-alias */\n let current = this;\n let resolver;\n while (current != null) {\n resolver = current.resolvers.get(key);\n if (resolver == null) {\n if (current.parent == null) {\n const handler = isRegisterInRequester(key)\n ? this\n : current;\n resolver = this.jitRegister(key, handler);\n return resolver.resolve(current, this);\n }\n current = current.parent;\n }\n else {\n return resolver.resolve(current, this);\n }\n }\n throw new Error(`Unable to resolve key: ${String(key)}`);\n }\n getAll(key, searchAncestors = false) {\n validateKey(key);\n /* eslint-disable-next-line @typescript-eslint/no-this-alias */\n const requestor = this;\n let current = requestor;\n let resolver;\n if (searchAncestors) {\n let resolutions = emptyArray;\n while (current != null) {\n resolver = current.resolvers.get(key);\n if (resolver != null) {\n resolutions = resolutions.concat(\n /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\n buildAllResponse(resolver, current, requestor));\n }\n current = current.parent;\n }\n return resolutions;\n }\n else {\n while (current != null) {\n resolver = current.resolvers.get(key);\n if (resolver == null) {\n current = current.parent;\n if (current == null) {\n return emptyArray;\n }\n }\n else {\n return buildAllResponse(resolver, current, requestor);\n }\n }\n }\n return emptyArray;\n }\n getFactory(Type) {\n let factory = factories.get(Type);\n if (factory === void 0) {\n if (isNativeFunction(Type)) {\n throw new Error(`${Type.name} is a native function and therefore cannot be safely constructed by DI. If this is intentional, please use a callback or cachedCallback resolver.`);\n }\n factories.set(Type, (factory = new FactoryImpl(Type, DI.getDependencies(Type))));\n }\n return factory;\n }\n registerFactory(key, factory) {\n factories.set(key, factory);\n }\n createChild(config) {\n return new ContainerImpl(null, Object.assign({}, this.config, config, { parentLocator: () => this }));\n }\n jitRegister(keyAsValue, handler) {\n if (typeof keyAsValue !== \"function\") {\n throw new Error(`Attempted to jitRegister something that is not a constructor: '${keyAsValue}'. Did you forget to register this dependency?`);\n }\n if (InstrinsicTypeNames.has(keyAsValue.name)) {\n throw new Error(`Attempted to jitRegister an intrinsic type: ${keyAsValue.name}. Did you forget to add @inject(Key)`);\n }\n if (isRegistry(keyAsValue)) {\n const registrationResolver = keyAsValue.register(handler);\n if (!(registrationResolver instanceof Object) ||\n registrationResolver.resolve == null) {\n const newResolver = handler.resolvers.get(keyAsValue);\n if (newResolver != void 0) {\n return newResolver;\n }\n throw new Error(\"A valid resolver was not returned from the static register method\");\n }\n return registrationResolver;\n }\n else if (keyAsValue.$isInterface) {\n throw new Error(`Attempted to jitRegister an interface: ${keyAsValue.friendlyName}`);\n }\n else {\n const resolver = this.config.defaultResolver(keyAsValue, handler);\n handler.resolvers.set(keyAsValue, resolver);\n return resolver;\n }\n }\n}\nconst cache = new WeakMap();\nfunction cacheCallbackResult(fun) {\n return function (handler, requestor, resolver) {\n if (cache.has(resolver)) {\n return cache.get(resolver);\n }\n const t = fun(handler, requestor, resolver);\n cache.set(resolver, t);\n return t;\n };\n}\n/**\n * You can use the resulting Registration of any of the factory methods\n * to register with the container.\n *\n * @example\n * ```\n * class Foo {}\n * const container = DI.createContainer();\n * container.register(Registration.instance(Foo, new Foo()));\n * container.get(Foo);\n * ```\n *\n * @public\n */\nexport const Registration = Object.freeze({\n /**\n * Allows you to pass an instance.\n * Every time you request this {@link Key} you will get this instance back.\n *\n * @example\n * ```\n * Registration.instance(Foo, new Foo()));\n * ```\n *\n * @param key - The key to register the instance under.\n * @param value - The instance to return when the key is requested.\n */\n instance(key, value) {\n return new ResolverImpl(key, 0 /* instance */, value);\n },\n /**\n * Creates an instance from the class.\n * Every time you request this {@link Key} you will get the same one back.\n *\n * @example\n * ```\n * Registration.singleton(Foo, Foo);\n * ```\n *\n * @param key - The key to register the singleton under.\n * @param value - The class to instantiate as a singleton when first requested.\n */\n singleton(key, value) {\n return new ResolverImpl(key, 1 /* singleton */, value);\n },\n /**\n * Creates an instance from a class.\n * Every time you request this {@link Key} you will get a new instance.\n *\n * @example\n * ```\n * Registration.instance(Foo, Foo);\n * ```\n *\n * @param key - The key to register the instance type under.\n * @param value - The class to instantiate each time the key is requested.\n */\n transient(key, value) {\n return new ResolverImpl(key, 2 /* transient */, value);\n },\n /**\n * Delegates to a callback function to provide the dependency.\n * Every time you request this {@link Key} the callback will be invoked to provide\n * the dependency.\n *\n * @example\n * ```\n * Registration.callback(Foo, () => new Foo());\n * Registration.callback(Bar, (c: Container) => new Bar(c.get(Foo)));\n * ```\n *\n * @param key - The key to register the callback for.\n * @param callback - The function that is expected to return the dependency.\n */\n callback(key, callback) {\n return new ResolverImpl(key, 3 /* callback */, callback);\n },\n /**\n * Delegates to a callback function to provide the dependency and then caches the\n * dependency for future requests.\n *\n * @example\n * ```\n * Registration.cachedCallback(Foo, () => new Foo());\n * Registration.cachedCallback(Bar, (c: Container) => new Bar(c.get(Foo)));\n * ```\n *\n * @param key - The key to register the callback for.\n * @param callback - The function that is expected to return the dependency.\n * @remarks\n * If you pass the same Registration to another container, the same cached value will be used.\n * Should all references to the resolver returned be removed, the cache will expire.\n */\n cachedCallback(key, callback) {\n return new ResolverImpl(key, 3 /* callback */, cacheCallbackResult(callback));\n },\n /**\n * Creates an alternate {@link Key} to retrieve an instance by.\n *\n * @example\n * ```\n * Register.singleton(Foo, Foo)\n * Register.aliasTo(Foo, MyFoos);\n *\n * container.getAll(MyFoos) // contains an instance of Foo\n * ```\n *\n * @param originalKey - The original key that has been registered.\n * @param aliasKey - The alias to the original key.\n */\n aliasTo(originalKey, aliasKey) {\n return new ResolverImpl(aliasKey, 5 /* alias */, originalKey);\n },\n});\n/** @internal */\nexport function validateKey(key) {\n if (key === null || key === void 0) {\n throw new Error(\"key/value cannot be null or undefined. Are you trying to inject/register something that doesn't exist with DI?\");\n }\n}\nfunction buildAllResponse(resolver, handler, requestor) {\n if (resolver instanceof ResolverImpl &&\n resolver.strategy === 4 /* array */) {\n const state = resolver.state;\n let i = state.length;\n const results = new Array(i);\n while (i--) {\n results[i] = state[i].resolve(handler, requestor);\n }\n return results;\n }\n return [resolver.resolve(handler, requestor)];\n}\nconst defaultFriendlyName = \"(anonymous)\";\nfunction isObject(value) {\n return (typeof value === \"object\" && value !== null) || typeof value === \"function\";\n}\n/**\n * Determine whether the value is a native function.\n *\n * @param fn - The function to check.\n * @returns `true` is the function is a native function, otherwise `false`\n */\nconst isNativeFunction = (function () {\n const lookup = new WeakMap();\n let isNative = false;\n let sourceText = \"\";\n let i = 0;\n return function (fn) {\n isNative = lookup.get(fn);\n if (isNative === void 0) {\n sourceText = fn.toString();\n i = sourceText.length;\n // http://www.ecma-international.org/ecma-262/#prod-NativeFunction\n isNative =\n // 29 is the length of 'function () { [native code] }' which is the smallest length of a native function string\n i >= 29 &&\n // 100 seems to be a safe upper bound of the max length of a native function. In Chrome and FF it's 56, in Edge it's 61.\n i <= 100 &&\n // This whole heuristic *could* be tricked by a comment. Do we need to care about that?\n sourceText.charCodeAt(i - 1) === 0x7d && // }\n // TODO: the spec is a little vague about the precise constraints, so we do need to test this across various browsers to make sure just one whitespace is a safe assumption.\n sourceText.charCodeAt(i - 2) <= 0x20 && // whitespace\n sourceText.charCodeAt(i - 3) === 0x5d && // ]\n sourceText.charCodeAt(i - 4) === 0x65 && // e\n sourceText.charCodeAt(i - 5) === 0x64 && // d\n sourceText.charCodeAt(i - 6) === 0x6f && // o\n sourceText.charCodeAt(i - 7) === 0x63 && // c\n sourceText.charCodeAt(i - 8) === 0x20 && //\n sourceText.charCodeAt(i - 9) === 0x65 && // e\n sourceText.charCodeAt(i - 10) === 0x76 && // v\n sourceText.charCodeAt(i - 11) === 0x69 && // i\n sourceText.charCodeAt(i - 12) === 0x74 && // t\n sourceText.charCodeAt(i - 13) === 0x61 && // a\n sourceText.charCodeAt(i - 14) === 0x6e && // n\n sourceText.charCodeAt(i - 15) === 0x58; // [\n lookup.set(fn, isNative);\n }\n return isNative;\n };\n})();\nconst isNumericLookup = {};\nfunction isArrayIndex(value) {\n switch (typeof value) {\n case \"number\":\n return value >= 0 && (value | 0) === value;\n case \"string\": {\n const result = isNumericLookup[value];\n if (result !== void 0) {\n return result;\n }\n const length = value.length;\n if (length === 0) {\n return (isNumericLookup[value] = false);\n }\n let ch = 0;\n for (let i = 0; i < length; ++i) {\n ch = value.charCodeAt(i);\n if ((i === 0 && ch === 0x30 && length > 1) /* must not start with 0 */ ||\n ch < 0x30 /* 0 */ ||\n ch > 0x39 /* 9 */) {\n return (isNumericLookup[value] = false);\n }\n }\n return (isNumericLookup[value] = true);\n }\n default:\n return false;\n }\n}\n","import { __decorate } from \"tslib\";\nimport { FASTElement, observable } from \"@microsoft/fast-element\";\nimport { ComponentPresentation, DefaultComponentPresentation, } from \"../design-system/component-presentation.js\";\n/**\n * Defines a foundation element class that:\n * 1. Connects the element to its ComponentPresentation\n * 2. Allows resolving the element template from the instance or ComponentPresentation\n * 3. Allows resolving the element styles from the instance or ComponentPresentation\n *\n * @public\n */\nexport class FoundationElement extends FASTElement {\n constructor() {\n super(...arguments);\n this._presentation = void 0;\n }\n /**\n * A property which resolves the ComponentPresentation instance\n * for the current component.\n * @public\n */\n get $presentation() {\n if (this._presentation === void 0) {\n this._presentation = ComponentPresentation.forTag(this.tagName, this);\n }\n return this._presentation;\n }\n templateChanged() {\n if (this.template !== undefined) {\n this.$fastController.template = this.template;\n }\n }\n stylesChanged() {\n if (this.styles !== undefined) {\n this.$fastController.styles = this.styles;\n }\n }\n /**\n * The connected callback for this FASTElement.\n * @remarks\n * This method is invoked by the platform whenever this FoundationElement\n * becomes connected to the document.\n * @public\n */\n connectedCallback() {\n if (this.$presentation !== null) {\n this.$presentation.applyTo(this);\n }\n super.connectedCallback();\n }\n /**\n * Defines an element registry function with a set of element definition defaults.\n * @param elementDefinition - The definition of the element to create the registry\n * function for.\n * @public\n */\n static compose(elementDefinition) {\n return (overrideDefinition = {}) => new FoundationElementRegistry(this === FoundationElement\n ? class extends FoundationElement {\n }\n : this, elementDefinition, overrideDefinition);\n }\n}\n__decorate([\n observable\n], FoundationElement.prototype, \"template\", void 0);\n__decorate([\n observable\n], FoundationElement.prototype, \"styles\", void 0);\nfunction resolveOption(option, context, definition) {\n if (typeof option === \"function\") {\n return option(context, definition);\n }\n return option;\n}\n/**\n * Registry capable of defining presentation properties for a DOM Container hierarchy.\n *\n * @internal\n */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nexport class FoundationElementRegistry {\n constructor(type, elementDefinition, overrideDefinition) {\n this.type = type;\n this.elementDefinition = elementDefinition;\n this.overrideDefinition = overrideDefinition;\n this.definition = Object.assign(Object.assign({}, this.elementDefinition), this.overrideDefinition);\n }\n register(container, context) {\n const definition = this.definition;\n const overrideDefinition = this.overrideDefinition;\n const prefix = definition.prefix || context.elementPrefix;\n const name = `${prefix}-${definition.baseName}`;\n context.tryDefineElement({\n name,\n type: this.type,\n baseClass: this.elementDefinition.baseClass,\n callback: x => {\n const presentation = new DefaultComponentPresentation(resolveOption(definition.template, x, definition), resolveOption(definition.styles, x, definition));\n x.definePresentation(presentation);\n let shadowOptions = resolveOption(definition.shadowOptions, x, definition);\n if (x.shadowRootMode) {\n // If the design system has overridden the shadow root mode, we need special handling.\n if (shadowOptions) {\n // If there are shadow options present in the definition, then\n // either the component itself has specified an option or the\n // registry function has overridden it.\n if (!overrideDefinition.shadowOptions) {\n // There were shadow options provided by the component and not overridden by\n // the registry.\n shadowOptions.mode = x.shadowRootMode;\n }\n }\n else if (shadowOptions !== null) {\n // If the component author did not provide shadow options,\n // and did not null them out (light dom opt-in) then they\n // were relying on the FASTElement default. So, if the\n // design system provides a mode, we need to create the options\n // to override the default.\n shadowOptions = { mode: x.shadowRootMode };\n }\n }\n x.defineElement({\n elementOptions: resolveOption(definition.elementOptions, x, definition),\n shadowOptions,\n attributes: resolveOption(definition.attributes, x, definition),\n });\n },\n });\n }\n}\n/* eslint-enable @typescript-eslint/no-unused-vars */\n","import { html, ref } from \"@microsoft/fast-element\";\n/**\n * A mixin class implementing start and end elements.\n * These are generally used to decorate text elements with icons or other visual indicators.\n * @public\n */\nexport class StartEnd {\n handleStartContentChange() {\n this.startContainer.classList.toggle(\"start\", this.start.assignedNodes().length > 0);\n }\n handleEndContentChange() {\n this.endContainer.classList.toggle(\"end\", this.end.assignedNodes().length > 0);\n }\n}\n/**\n * The template for the end element.\n * For use with {@link StartEnd}\n *\n * @public\n */\nexport const endSlotTemplate = (context, definition) => html `\n <span\n part=\"end\"\n ${ref(\"endContainer\")}\n class=${x => (definition.end ? \"end\" : void 0)}\n >\n <slot name=\"end\" ${ref(\"end\")} @slotchange=\"${x => x.handleEndContentChange()}\">\n ${definition.end || \"\"}\n </slot>\n </span>\n`;\n/**\n * The template for the start element.\n * For use with {@link StartEnd}\n *\n * @public\n */\nexport const startSlotTemplate = (context, definition) => html `\n <span\n part=\"start\"\n ${ref(\"startContainer\")}\n class=\"${x => (definition.start ? \"start\" : void 0)}\"\n >\n <slot\n name=\"start\"\n ${ref(\"start\")}\n @slotchange=\"${x => x.handleStartContentChange()}\"\n >\n ${definition.start || \"\"}\n </slot>\n </span>\n`;\n/**\n * The template for the end element.\n * For use with {@link StartEnd}\n *\n * @public\n * @deprecated - use endSlotTemplate\n */\nexport const endTemplate = html `\n <span part=\"end\" ${ref(\"endContainer\")}>\n <slot\n name=\"end\"\n ${ref(\"end\")}\n @slotchange=\"${x => x.handleEndContentChange()}\"\n ></slot>\n </span>\n`;\n/**\n * The template for the start element.\n * For use with {@link StartEnd}\n *\n * @public\n * @deprecated - use startSlotTemplate\n */\nexport const startTemplate = html `\n <span part=\"start\" ${ref(\"startContainer\")}>\n <slot\n name=\"start\"\n ${ref(\"start\")}\n @slotchange=\"${x => x.handleStartContentChange()}\"\n ></slot>\n </span>\n`;\n","import { AttributeConfiguration } from \"@microsoft/fast-element\";\n/**\n * Apply mixins to a constructor.\n * Sourced from {@link https://www.typescriptlang.org/docs/handbook/mixins.html | TypeScript Documentation }.\n * @public\n */\nexport function applyMixins(derivedCtor, ...baseCtors) {\n const derivedAttributes = AttributeConfiguration.locate(derivedCtor);\n baseCtors.forEach(baseCtor => {\n Object.getOwnPropertyNames(baseCtor.prototype).forEach(name => {\n if (name !== \"constructor\") {\n Object.defineProperty(derivedCtor.prototype, name, \n /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\n Object.getOwnPropertyDescriptor(baseCtor.prototype, name));\n }\n });\n const baseAttributes = AttributeConfiguration.locate(baseCtor);\n baseAttributes.forEach(x => derivedAttributes.push(x));\n });\n}\n","/**\n * Retrieves the \"composed parent\" element of a node, ignoring DOM tree boundaries.\n * When the parent of a node is a shadow-root, it will return the host\n * element of the shadow root. Otherwise it will return the parent node or null if\n * no parent node exists.\n * @param element - The element for which to retrieve the composed parent\n *\n * @public\n */\nexport function composedParent(element) {\n const parentNode = element.parentElement;\n if (parentNode) {\n return parentNode;\n }\n else {\n const rootNode = element.getRootNode();\n if (rootNode.host instanceof HTMLElement) {\n // this is shadow-root\n return rootNode.host;\n }\n }\n return null;\n}\n","/**\n * An abstract behavior to react to media queries. Implementations should implement\n * the `constructListener` method to perform some action based on media query changes.\n *\n * @public\n */\nexport class MatchMediaBehavior {\n /**\n *\n * @param query - The media query to operate from.\n */\n constructor(query) {\n /**\n * The behavior needs to operate on element instances but elements might share a behavior instance.\n * To ensure proper attachment / detachment per instance, we construct a listener for\n * each bind invocation and cache the listeners by element reference.\n */\n this.listenerCache = new WeakMap();\n this.query = query;\n }\n /**\n * Binds the behavior to the element.\n * @param source - The element for which the behavior is bound.\n */\n bind(source) {\n const { query } = this;\n const listener = this.constructListener(source);\n // Invoke immediately to add if the query currently matches\n listener.bind(query)();\n query.addListener(listener);\n this.listenerCache.set(source, listener);\n }\n /**\n * Unbinds the behavior from the element.\n * @param source - The element for which the behavior is unbinding.\n */\n unbind(source) {\n const listener = this.listenerCache.get(source);\n if (listener) {\n this.query.removeListener(listener);\n this.listenerCache.delete(source);\n }\n }\n}\n/**\n * A behavior to add or remove a stylesheet from an element based on a media query. The behavior ensures that\n * styles are applied while the a query matches the environment and that styles are not applied if the query does\n * not match the environment.\n *\n * @public\n */\nexport class MatchMediaStyleSheetBehavior extends MatchMediaBehavior {\n /**\n * Constructs a {@link MatchMediaStyleSheetBehavior} instance.\n * @param query - The media query to operate from.\n * @param styles - The styles to coordinate with the query.\n */\n constructor(query, styles) {\n super(query);\n this.styles = styles;\n }\n /**\n * Defines a function to construct {@link MatchMediaStyleSheetBehavior | MatchMediaStyleSheetBehaviors} for\n * a provided query.\n * @param query - The media query to operate from.\n *\n * @public\n * @example\n *\n * ```ts\n * import { css } from \"@microsoft/fast-element\";\n * import { MatchMediaStyleSheetBehavior } from \"@microsoft/fast-foundation\";\n *\n * const landscapeBehavior = MatchMediaStyleSheetBehavior.with(\n * window.matchMedia(\"(orientation: landscape)\")\n * );\n * const styles = css`\n * :host {\n * width: 200px;\n * height: 400px;\n * }\n * `\n * .withBehaviors(landscapeBehavior(css`\n * :host {\n * width: 400px;\n * height: 200px;\n * }\n * `))\n * ```\n */\n static with(query) {\n return (styles) => {\n return new MatchMediaStyleSheetBehavior(query, styles);\n };\n }\n /**\n * Constructs a match-media listener for a provided element.\n * @param source - the element for which to attach or detach styles.\n * @internal\n */\n constructListener(source) {\n let attached = false;\n const styles = this.styles;\n return function listener() {\n const { matches } = this;\n if (matches && !attached) {\n source.$fastController.addStyles(styles);\n attached = matches;\n }\n else if (!matches && attached) {\n source.$fastController.removeStyles(styles);\n attached = matches;\n }\n };\n }\n /**\n * Unbinds the behavior from the element.\n * @param source - The element for which the behavior is unbinding.\n * @internal\n */\n unbind(source) {\n super.unbind(source);\n source.$fastController.removeStyles(this.styles);\n }\n}\n/**\n * This can be used to construct a behavior to apply a forced-colors only stylesheet.\n * @public\n */\nexport const forcedColorsStylesheetBehavior = MatchMediaStyleSheetBehavior.with(window.matchMedia(\"(forced-colors)\"));\n/**\n * This can be used to construct a behavior to apply a prefers color scheme: dark only stylesheet.\n * @public\n */\nexport const darkModeStylesheetBehavior = MatchMediaStyleSheetBehavior.with(window.matchMedia(\"(prefers-color-scheme: dark)\"));\n/**\n * This can be used to construct a behavior to apply a prefers color scheme: light only stylesheet.\n * @public\n */\nexport const lightModeStylesheetBehavior = MatchMediaStyleSheetBehavior.with(window.matchMedia(\"(prefers-color-scheme: light)\"));\n","/**\n * The CSS value for disabled cursors.\n * @public\n */\nexport const disabledCursor = \"not-allowed\";\n","/**\n * A CSS fragment to set `display: none;` when the host is hidden using the [hidden] attribute.\n * @public\n */\nexport const hidden = `:host([hidden]){display:none}`;\n/**\n * Applies a CSS display property.\n * Also adds CSS rules to not display the element when the [hidden] attribute is applied to the element.\n * @param display - The CSS display property value\n * @public\n */\nexport function display(displayValue) {\n return `${hidden}:host{display:${displayValue}}`;\n}\n","import { canUseFocusVisible } from \"@microsoft/fast-web-utilities\";\n/**\n * The string representing the focus selector to be used. Value\n * will be \"focus-visible\" when https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo\n * is supported and \"focus\" when it is not.\n *\n * @public\n */\nexport const focusVisible = canUseFocusVisible() ? \"focus-visible\" : \"focus\";\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","/**\n * Checks if the DOM is available to access and use\n */\nexport function canUseDOM() {\n return !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\n}\n","import { canUseDOM } from \"exenv-es6\";\n/**\n * A test that ensures that all arguments are HTML Elements\n */\nexport function isHTMLElement(...args) {\n return args.every((arg) => arg instanceof HTMLElement);\n}\n/**\n * Returns all displayed elements inside of a root node that match a provided selector\n */\nexport function getDisplayedNodes(rootNode, selector) {\n if (!rootNode || !selector || !isHTMLElement(rootNode)) {\n return;\n }\n const nodes = Array.from(rootNode.querySelectorAll(selector));\n // offsetParent will be null if the element isn't currently displayed,\n // so this will allow us to operate only on visible nodes\n return nodes.filter((node) => node.offsetParent !== null);\n}\n/**\n * Gets the numeric key code associated with a keyboard event. This method is for use with DOM level 3 events\n * that still use the deprecated keyCode property.\n */\nexport function getKeyCode(event) {\n return event === null ? null : event.which || event.keyCode || event.charCode;\n}\n/**\n * Returns the nonce used in the page, if any.\n *\n * Based on https://github.com/cssinjs/jss/blob/master/packages/jss/src/DomRenderer.js\n */\nfunction getNonce() {\n const node = document.querySelector('meta[property=\"csp-nonce\"]');\n if (node) {\n return node.getAttribute(\"content\");\n }\n else {\n return null;\n }\n}\n/**\n * Test if the document supports :focus-visible\n */\nlet _canUseFocusVisible;\nexport function canUseFocusVisible() {\n if (typeof _canUseFocusVisible === \"boolean\") {\n return _canUseFocusVisible;\n }\n if (!canUseDOM()) {\n _canUseFocusVisible = false;\n return _canUseFocusVisible;\n }\n // Check to see if the document supports the focus-visible element\n const styleElement = document.createElement(\"style\");\n // If nonces are present on the page, use it when creating the style element\n // to test focus-visible support.\n const styleNonce = getNonce();\n if (styleNonce !== null) {\n styleElement.setAttribute(\"nonce\", styleNonce);\n }\n document.head.appendChild(styleElement);\n try {\n styleElement.sheet.insertRule(\"foo:focus-visible {color:inherit}\", 0);\n _canUseFocusVisible = true;\n }\n catch (e) {\n _canUseFocusVisible = false;\n }\n finally {\n document.head.removeChild(styleElement);\n }\n return _canUseFocusVisible;\n}\nlet _canUseCssGrid;\nexport function canUseCssGrid() {\n if (typeof _canUseCssGrid === \"boolean\") {\n return _canUseCssGrid;\n }\n try {\n _canUseCssGrid = CSS.supports(\"display\", \"grid\");\n }\n catch (_a) {\n _canUseCssGrid = false;\n }\n return _canUseCssGrid;\n}\nexport function canUseForcedColors() {\n return (canUseDOM() &&\n (window.matchMedia(\"(forced-colors: none)\").matches ||\n window.matchMedia(\"(forced-colors: active)\").matches));\n}\nexport function resetDocumentCache() {\n _canUseCssGrid = undefined;\n _canUseFocusVisible = undefined;\n}\n/**\n * @deprecated Use 'canUseForcedColors' instead\n */\nexport const canUsedForcedColors = canUseForcedColors;\n","/**\n * Key Code values\n * @deprecated - KeyCodes are deprecated, use individual string key exports\n */\nexport var KeyCodes;\n(function (KeyCodes) {\n KeyCodes[KeyCodes[\"alt\"] = 18] = \"alt\";\n KeyCodes[KeyCodes[\"arrowDown\"] = 40] = \"arrowDown\";\n KeyCodes[KeyCodes[\"arrowLeft\"] = 37] = \"arrowLeft\";\n KeyCodes[KeyCodes[\"arrowRight\"] = 39] = \"arrowRight\";\n KeyCodes[KeyCodes[\"arrowUp\"] = 38] = \"arrowUp\";\n KeyCodes[KeyCodes[\"back\"] = 8] = \"back\";\n KeyCodes[KeyCodes[\"backSlash\"] = 220] = \"backSlash\";\n KeyCodes[KeyCodes[\"break\"] = 19] = \"break\";\n KeyCodes[KeyCodes[\"capsLock\"] = 20] = \"capsLock\";\n KeyCodes[KeyCodes[\"closeBracket\"] = 221] = \"closeBracket\";\n KeyCodes[KeyCodes[\"colon\"] = 186] = \"colon\";\n KeyCodes[KeyCodes[\"colon2\"] = 59] = \"colon2\";\n KeyCodes[KeyCodes[\"comma\"] = 188] = \"comma\";\n KeyCodes[KeyCodes[\"ctrl\"] = 17] = \"ctrl\";\n KeyCodes[KeyCodes[\"delete\"] = 46] = \"delete\";\n KeyCodes[KeyCodes[\"end\"] = 35] = \"end\";\n KeyCodes[KeyCodes[\"enter\"] = 13] = \"enter\";\n KeyCodes[KeyCodes[\"equals\"] = 187] = \"equals\";\n KeyCodes[KeyCodes[\"equals2\"] = 61] = \"equals2\";\n KeyCodes[KeyCodes[\"equals3\"] = 107] = \"equals3\";\n KeyCodes[KeyCodes[\"escape\"] = 27] = \"escape\";\n KeyCodes[KeyCodes[\"forwardSlash\"] = 191] = \"forwardSlash\";\n KeyCodes[KeyCodes[\"function1\"] = 112] = \"function1\";\n KeyCodes[KeyCodes[\"function10\"] = 121] = \"function10\";\n KeyCodes[KeyCodes[\"function11\"] = 122] = \"function11\";\n KeyCodes[KeyCodes[\"function12\"] = 123] = \"function12\";\n KeyCodes[KeyCodes[\"function2\"] = 113] = \"function2\";\n KeyCodes[KeyCodes[\"function3\"] = 114] = \"function3\";\n KeyCodes[KeyCodes[\"function4\"] = 115] = \"function4\";\n KeyCodes[KeyCodes[\"function5\"] = 116] = \"function5\";\n KeyCodes[KeyCodes[\"function6\"] = 117] = \"function6\";\n KeyCodes[KeyCodes[\"function7\"] = 118] = \"function7\";\n KeyCodes[KeyCodes[\"function8\"] = 119] = \"function8\";\n KeyCodes[KeyCodes[\"function9\"] = 120] = \"function9\";\n KeyCodes[KeyCodes[\"home\"] = 36] = \"home\";\n KeyCodes[KeyCodes[\"insert\"] = 45] = \"insert\";\n KeyCodes[KeyCodes[\"menu\"] = 93] = \"menu\";\n KeyCodes[KeyCodes[\"minus\"] = 189] = \"minus\";\n KeyCodes[KeyCodes[\"minus2\"] = 109] = \"minus2\";\n KeyCodes[KeyCodes[\"numLock\"] = 144] = \"numLock\";\n KeyCodes[KeyCodes[\"numPad0\"] = 96] = \"numPad0\";\n KeyCodes[KeyCodes[\"numPad1\"] = 97] = \"numPad1\";\n KeyCodes[KeyCodes[\"numPad2\"] = 98] = \"numPad2\";\n KeyCodes[KeyCodes[\"numPad3\"] = 99] = \"numPad3\";\n KeyCodes[KeyCodes[\"numPad4\"] = 100] = \"numPad4\";\n KeyCodes[KeyCodes[\"numPad5\"] = 101] = \"numPad5\";\n KeyCodes[KeyCodes[\"numPad6\"] = 102] = \"numPad6\";\n KeyCodes[KeyCodes[\"numPad7\"] = 103] = \"numPad7\";\n KeyCodes[KeyCodes[\"numPad8\"] = 104] = \"numPad8\";\n KeyCodes[KeyCodes[\"numPad9\"] = 105] = \"numPad9\";\n KeyCodes[KeyCodes[\"numPadDivide\"] = 111] = \"numPadDivide\";\n KeyCodes[KeyCodes[\"numPadDot\"] = 110] = \"numPadDot\";\n KeyCodes[KeyCodes[\"numPadMinus\"] = 109] = \"numPadMinus\";\n KeyCodes[KeyCodes[\"numPadMultiply\"] = 106] = \"numPadMultiply\";\n KeyCodes[KeyCodes[\"numPadPlus\"] = 107] = \"numPadPlus\";\n KeyCodes[KeyCodes[\"openBracket\"] = 219] = \"openBracket\";\n KeyCodes[KeyCodes[\"pageDown\"] = 34] = \"pageDown\";\n KeyCodes[KeyCodes[\"pageUp\"] = 33] = \"pageUp\";\n KeyCodes[KeyCodes[\"period\"] = 190] = \"period\";\n KeyCodes[KeyCodes[\"print\"] = 44] = \"print\";\n KeyCodes[KeyCodes[\"quote\"] = 222] = \"quote\";\n KeyCodes[KeyCodes[\"scrollLock\"] = 145] = \"scrollLock\";\n KeyCodes[KeyCodes[\"shift\"] = 16] = \"shift\";\n KeyCodes[KeyCodes[\"space\"] = 32] = \"space\";\n KeyCodes[KeyCodes[\"tab\"] = 9] = \"tab\";\n KeyCodes[KeyCodes[\"tilde\"] = 192] = \"tilde\";\n KeyCodes[KeyCodes[\"windowsLeft\"] = 91] = \"windowsLeft\";\n KeyCodes[KeyCodes[\"windowsOpera\"] = 219] = \"windowsOpera\";\n KeyCodes[KeyCodes[\"windowsRight\"] = 92] = \"windowsRight\";\n})(KeyCodes || (KeyCodes = {}));\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeAlt = 18;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeArrowDown = 40;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeArrowLeft = 37;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeArrowRight = 39;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeArrowUp = 38;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeBack = 8;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeBackSlash = 220;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeBreak = 19;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeCapsLock = 20;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeCloseBracket = 221;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeColon = 186;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeColon2 = 59; // Opera and Firefox\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeComma = 188;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeCtrl = 17;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeDelete = 46;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeEnd = 35;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeEnter = 13;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeEquals = 187;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeEquals2 = 61; // Opera\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeEquals3 = 107; // Firefox\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeEscape = 27;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeForwardSlash = 191;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeFunction1 = 112;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeFunction10 = 121;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeFunction11 = 122;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeFunction12 = 123;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeFunction2 = 113;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeFunction3 = 114;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeFunction4 = 115;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeFunction5 = 116;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeFunction6 = 117;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeFunction7 = 118;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeFunction8 = 119;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeFunction9 = 120;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeHome = 36;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeInsert = 45;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeMenu = 93;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeMinus = 189;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeMinus2 = 109; // Opera and Firefox\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeNumLock = 144;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeNumPad0 = 96;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeNumPad1 = 97;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeNumPad2 = 98;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeNumPad3 = 99;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeNumPad4 = 100;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeNumPad5 = 101;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeNumPad6 = 102;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeNumPad7 = 103;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeNumPad8 = 104;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeNumPad9 = 105;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeNumPadDivide = 111;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeNumPadDot = 110;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeNumPadMinus = 109;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeNumPadMultiply = 106;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeNumPadPlus = 107;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeOpenBracket = 219;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodePageDown = 34;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodePageUp = 33;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodePeriod = 190;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodePrint = 44;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeQuote = 222;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeScrollLock = 145;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeShift = 16;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeSpace = 32;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeTab = 9;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeTilde = 192;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeWindowsLeft = 91;\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeWindowsOpera = 219; // Opera\n/**\n * @deprecated - KeyCodes are deprecated, use string key exports\n */\nexport const keyCodeWindowsRight = 92;\n/**\n * String values for use with KeyboardEvent.key\n */\nexport const keyArrowDown = \"ArrowDown\";\nexport const keyArrowLeft = \"ArrowLeft\";\nexport const keyArrowRight = \"ArrowRight\";\nexport const keyArrowUp = \"ArrowUp\";\nexport const keyEnter = \"Enter\";\nexport const keyEscape = \"Escape\";\nexport const keyHome = \"Home\";\nexport const keyEnd = \"End\";\nexport const keyFunction2 = \"F2\";\nexport const keyPageDown = \"PageDown\";\nexport const keyPageUp = \"PageUp\";\nexport const keySpace = \" \";\nexport const keyTab = \"Tab\";\nexport const keyBackspace = \"Backspace\";\nexport const keyDelete = \"Delete\";\nexport const ArrowKeys = {\n ArrowDown: keyArrowDown,\n ArrowLeft: keyArrowLeft,\n ArrowRight: keyArrowRight,\n ArrowUp: keyArrowUp,\n};\n","/**\n * Expose ltr and rtl strings\n */\nexport var Direction;\n(function (Direction) {\n Direction[\"ltr\"] = \"ltr\";\n Direction[\"rtl\"] = \"rtl\";\n})(Direction || (Direction = {}));\n","/**\n * Define system colors for use in CSS stylesheets.\n *\n * https://drafts.csswg.org/css-color/#css-system-colors\n */\nexport var SystemColors;\n(function (SystemColors) {\n SystemColors[\"Canvas\"] = \"Canvas\";\n SystemColors[\"CanvasText\"] = \"CanvasText\";\n SystemColors[\"LinkText\"] = \"LinkText\";\n SystemColors[\"VisitedText\"] = \"VisitedText\";\n SystemColors[\"ActiveText\"] = \"ActiveText\";\n SystemColors[\"ButtonFace\"] = \"ButtonFace\";\n SystemColors[\"ButtonText\"] = \"ButtonText\";\n SystemColors[\"Field\"] = \"Field\";\n SystemColors[\"FieldText\"] = \"FieldText\";\n SystemColors[\"Highlight\"] = \"Highlight\";\n SystemColors[\"HighlightText\"] = \"HighlightText\";\n SystemColors[\"GrayText\"] = \"GrayText\";\n})(SystemColors || (SystemColors = {}));\n"],"names":[],"sourceRoot":""}
|