@bino-bi/bn-template-engine 1.0.0-alpha.0 → 1.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bn-template-engine/bn-template-engine.esm.js +1 -1
- package/dist/bn-template-engine/p-14318b0d.entry.js +1 -0
- package/dist/bn-template-engine/{p-c9f050bf.entry.js → p-2133e02b.entry.js} +1 -1
- package/dist/bn-template-engine/p-6b469808.entry.js +1 -0
- package/dist/bn-template-engine/p-7HSTE79g.js +1 -0
- package/dist/bn-template-engine/p-9b1288df.entry.js +1 -0
- package/dist/bn-template-engine/p-B4JfKvVT.js +1 -0
- package/dist/bn-template-engine/p-B_d-jp99.js +2 -0
- package/dist/bn-template-engine/p-Bi2wx-el.js +1 -0
- package/dist/bn-template-engine/p-CWiZks2h.js +1 -0
- package/dist/bn-template-engine/{p-BQp6ZPYW.js → p-DSXNgKLa.js} +1 -1
- package/dist/bn-template-engine/p-c2cbb8ea.entry.js +1 -0
- package/dist/bn-template-engine/p-e783733e.entry.js +1 -0
- package/dist/bn-template-engine/p-e94b4e31.entry.js +1 -0
- package/dist/bn-template-engine/p-fdb3e99a.entry.js +1 -0
- package/dist/cjs/bn-asset_21.cjs.entry.js +23906 -0
- package/dist/cjs/bn-grid.cjs.entry.js +6 -13
- package/dist/cjs/bn-image.cjs.entry.js +6 -13
- package/dist/cjs/bn-internationalization.cjs.entry.js +5 -7
- package/dist/cjs/bn-template-engine.cjs.js +2 -2
- package/dist/cjs/bn-template.cjs.entry.js +4 -6
- package/dist/cjs/bn-text.cjs.entry.js +10 -19
- package/dist/cjs/bn-tree.cjs.entry.js +11 -14
- package/dist/cjs/{context-protocol-BkYHFkXE.js → context-protocol-B_jipZpJ.js} +6 -2
- package/dist/cjs/editor-companion.cjs.entry.js +3 -3
- package/dist/cjs/{index-CScBFiS1.js → index-CDKG4xmO.js} +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/scaling-eyzCrFB8.js +329 -0
- package/dist/cjs/{withBodyObserver-B0_W1VOf.js → withBodyObserver-D7BKWN2N.js} +2 -2
- package/dist/cjs/{withHasError-Dspb3lIV.js → withHasError-Cl2gTQzA.js} +106 -2
- package/dist/{esm/luxon-DbyXf6dF.js → cjs/withStyled-V7xz_x1c.js} +1406 -1
- package/dist/collection/collection-manifest.json +2 -10
- package/dist/collection/components/bn-body/bn-body.css +1 -0
- package/dist/collection/components/bn-card/bn-card.css +2 -0
- package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +368 -130
- package/dist/collection/components/bn-chart-structure/ibcs-chart-structure.js +34 -10
- package/dist/collection/components/bn-chart-structure/utils/StructureChart.js +94 -11
- package/dist/collection/components/bn-chart-structure/utils/elements/Label.js +11 -0
- package/dist/collection/components/bn-chart-structure/utils/elements/StackedBar.js +8 -6
- package/dist/collection/components/bn-chart-structure/utils/model/styles/StructureChartStyle.js +4 -0
- package/dist/collection/components/bn-chart-time/bn-chart-time.css +1 -1
- package/dist/collection/components/bn-chart-time/bn-chart-time.js +172 -51
- package/dist/collection/components/bn-chart-time/ibcs-chart-time.js +22 -9
- package/dist/collection/components/bn-chart-time/utils/TimeChart.js +3 -3
- package/dist/collection/components/bn-chart-time/utils/elements/StackedColumn.js +3 -4
- package/dist/collection/components/bn-chart-time/utils/model/styles/TimeChartStyle.js +4 -0
- package/dist/collection/components/bn-dataset/bn-dataset.js +49 -2
- package/dist/collection/components/bn-datasource/bn-datasource.js +46 -3
- package/dist/collection/components/bn-layout-card/bn-layout-card.css +3 -2
- package/dist/collection/components/bn-layout-card/bn-layout-card.js +207 -32
- package/dist/collection/components/bn-layout-page/bn-layout-page.css +1 -3
- package/dist/collection/components/bn-layout-page/bn-layout-page.js +172 -43
- package/dist/collection/components/bn-message/bn-message.js +1 -1
- package/dist/collection/components/bn-page/bn-page.js +1 -1
- package/dist/collection/components/bn-scaling-group/bn-scaling-group.css +3 -0
- package/dist/collection/components/bn-scaling-group/bn-scaling-group.js +136 -0
- package/dist/collection/components/bn-table/bn-table.js +201 -55
- package/dist/collection/components/bn-table/ibcs-table.css +7 -5
- package/dist/collection/components/bn-table/ibcs-table.js +91 -5
- package/dist/collection/components/bn-table/utils/elements/CellBarChart.js +79 -31
- package/dist/collection/components/bn-table/utils/elements/TableRow.js +3 -1
- package/dist/collection/components/bn-table/utils/factories/tableDataSetFactory.js +12 -3
- package/dist/collection/components/bn-table/utils/helper/ColumnStatistics.js +9 -1
- package/dist/collection/components/bn-template/bn-template.js +1 -1
- package/dist/collection/components/bn-text/bn-text.js +1 -1
- package/dist/collection/components/bn-title/bn-title.js +1 -9
- package/dist/collection/components/bn-title/ibcs-title/ibcs-title.js +1 -1
- package/dist/collection/components/bn-tree/bn-tree.js +5 -1
- package/dist/collection/components/editor-companion/editor-companion.js +1 -1
- package/dist/collection/stores/componentStyles.js +2 -0
- package/dist/collection/stores/createScopedStores.js +3 -1
- package/dist/collection/utils/DateStringFactory.js +0 -1
- package/dist/collection/utils/constants.js +35 -5
- package/dist/collection/utils/contentDecoder.js +28 -0
- package/dist/collection/utils/layoutObserver.js +88 -0
- package/dist/collection/utils/parentDimensions.js +57 -10
- package/dist/collection/utils/stackColors.js +2 -2
- package/dist/collection/utils/validate.js +5 -2
- package/dist/collection/utils/withInheritedProps.js +152 -0
- package/dist/collection/utils/withScalingGroup.js +66 -0
- package/dist/components/DataFormatDigits.js +1 -1
- package/dist/components/DateStringFactory.js +1 -1
- package/dist/components/Order.js +1 -1
- package/dist/components/SVGVariancesStyleGroup.js +1 -1
- package/dist/components/bn-body2.js +1 -1
- package/dist/components/bn-card2.js +1 -1
- package/dist/components/bn-chart-structure.js +1 -1
- package/dist/components/bn-chart-time.js +1 -1
- package/dist/components/bn-dataset.js +1 -1
- package/dist/components/bn-datasource.js +1 -1
- package/dist/components/bn-layout-card.js +1 -1
- package/dist/components/bn-layout-page.js +1 -1
- package/dist/components/bn-message2.js +1 -1
- package/dist/components/bn-page2.js +1 -1
- package/dist/components/{test-runner-time.d.ts → bn-scaling-group.d.ts} +4 -4
- package/dist/components/bn-scaling-group.js +1 -0
- package/dist/components/bn-table.js +1 -1
- package/dist/components/bn-template.js +1 -1
- package/dist/components/bn-text.js +1 -1
- package/dist/components/bn-title2.js +1 -1
- package/dist/components/bn-tree.js +1 -1
- package/dist/components/contentDecoder.js +1 -0
- package/dist/components/context-protocol.js +1 -1
- package/dist/components/editor-companion.js +1 -1
- package/dist/components/emotion-hash.esm.js +1 -0
- package/dist/components/ibcs-chart-structure2.js +1 -1
- package/dist/components/ibcs-chart-time2.js +1 -1
- package/dist/components/ibcs-table2.js +1 -1
- package/dist/components/ibcs-title2.js +1 -1
- package/dist/components/ibcsRuleSet.js +1 -1
- package/dist/components/layoutObserver.js +1 -0
- package/dist/components/scaling.js +1 -1
- package/dist/components/validate.js +1 -1
- package/dist/components/withHasError.js +1 -1
- package/dist/components/withInheritedProps.js +1 -0
- package/dist/components/withStyled.js +1 -1
- package/dist/esm/bn-asset_21.entry.js +23884 -0
- package/dist/esm/bn-grid.entry.js +4 -11
- package/dist/esm/bn-image.entry.js +4 -11
- package/dist/esm/bn-internationalization.entry.js +4 -6
- package/dist/esm/bn-template-engine.js +3 -3
- package/dist/esm/bn-template.entry.js +3 -5
- package/dist/esm/bn-text.entry.js +6 -15
- package/dist/esm/bn-tree.entry.js +9 -12
- package/dist/esm/{context-protocol-DzeqZxg6.js → context-protocol-D-o_UZ33.js} +6 -2
- package/dist/esm/editor-companion.entry.js +3 -3
- package/dist/esm/{index-B27Ax6P_.js → index-B_d-jp99.js} +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/scaling-BzbiBnuN.js +324 -0
- package/dist/esm/{withBodyObserver-gZpZiEIK.js → withBodyObserver-AFk2wwHT.js} +2 -2
- package/dist/esm/{withHasError-C48fTE2k.js → withHasError-DW_vMDUp.js} +106 -2
- package/dist/{cjs/luxon-8hyy5YD7.js → esm/withStyled-5RqF8WBL.js} +1371 -2
- package/dist/types/components/bn-chart-structure/bn-chart-structure.d.ts +163 -110
- package/dist/types/components/bn-chart-structure/ibcs-chart-structure.d.ts +4 -3
- package/dist/types/components/bn-chart-structure/utils/StructureChart.d.ts +7 -0
- package/dist/types/components/bn-chart-structure/utils/elements/Label.d.ts +2 -0
- package/dist/types/components/bn-chart-structure/utils/model/styles/StructureChartStyle.d.ts +1 -0
- package/dist/types/components/bn-chart-time/bn-chart-time.d.ts +29 -12
- package/dist/types/components/bn-chart-time/ibcs-chart-time.d.ts +4 -3
- package/dist/types/components/bn-chart-time/utils/model/styles/TimeChartStyle.d.ts +1 -0
- package/dist/types/components/bn-dataset/bn-dataset.d.ts +6 -0
- package/dist/types/components/bn-datasource/bn-datasource.d.ts +8 -0
- package/dist/types/components/bn-layout-card/bn-layout-card.d.ts +153 -0
- package/dist/types/components/bn-layout-page/bn-layout-page.d.ts +160 -1
- package/dist/types/components/bn-scaling-group/bn-scaling-group.d.ts +37 -0
- package/dist/types/components/bn-table/bn-table.d.ts +32 -16
- package/dist/types/components/bn-table/ibcs-table.d.ts +20 -0
- package/dist/types/components/bn-table/utils/elements/Cell.d.ts +1 -0
- package/dist/types/components/bn-table/utils/elements/CellBarChart.d.ts +1 -0
- package/dist/types/components/bn-title/bn-title.d.ts +0 -1
- package/dist/types/components.d.ts +389 -443
- package/dist/types/context/context-protocol.d.ts +2 -1
- package/dist/types/stores/componentStyles.d.ts +2 -0
- package/dist/types/stores/createScopedStores.d.ts +1 -0
- package/dist/types/utils/constants.d.ts +23 -5
- package/dist/types/utils/contentDecoder.d.ts +12 -0
- package/dist/types/utils/layoutObserver.d.ts +27 -0
- package/dist/types/utils/parentDimensions.d.ts +7 -2
- package/dist/types/utils/validate.d.ts +1 -0
- package/dist/types/utils/withInheritedProps.d.ts +38 -0
- package/dist/types/utils/withScalingGroup.d.ts +14 -0
- package/package.json +3 -3
- package/readme.md +0 -1
- package/dist/bn-template-engine/assets/gpx/Chasing_Legends.gpx +0 -195076
- package/dist/bn-template-engine/assets/gpx/Fahrt_am_Nachmittag.gpx +0 -142007
- package/dist/bn-template-engine/assets/icons/gpx-finish.png +0 -0
- package/dist/bn-template-engine/assets/icons/gpx-shadow.png +0 -0
- package/dist/bn-template-engine/assets/icons/gpx-start.png +0 -0
- package/dist/bn-template-engine/assets/icons/marker-example.png +0 -0
- package/dist/bn-template-engine/assets/icons/pin-icon-end.png +0 -0
- package/dist/bn-template-engine/assets/icons/pin-icon-start.png +0 -0
- package/dist/bn-template-engine/assets/icons/pin-icon-wpt.png +0 -0
- package/dist/bn-template-engine/assets/icons/pin-shadow.png +0 -0
- package/dist/bn-template-engine/assets/icons/pin.png +0 -0
- package/dist/bn-template-engine/p--TeDldm8.js +0 -1
- package/dist/bn-template-engine/p-0e7dc113.entry.js +0 -1
- package/dist/bn-template-engine/p-1jFf17Vj.js +0 -1
- package/dist/bn-template-engine/p-264c6bad.entry.js +0 -1
- package/dist/bn-template-engine/p-326a0902.entry.js +0 -1
- package/dist/bn-template-engine/p-38a8bde3.entry.js +0 -1
- package/dist/bn-template-engine/p-577eafcd.entry.js +0 -1
- package/dist/bn-template-engine/p-5905cc43.entry.js +0 -1
- package/dist/bn-template-engine/p-5d155a72.entry.js +0 -1
- package/dist/bn-template-engine/p-65f8962a.entry.js +0 -1
- package/dist/bn-template-engine/p-6b8d1ebf.entry.js +0 -1
- package/dist/bn-template-engine/p-7995acb2.entry.js +0 -1
- package/dist/bn-template-engine/p-7afe431e.entry.js +0 -1
- package/dist/bn-template-engine/p-8014b1ac.entry.js +0 -1
- package/dist/bn-template-engine/p-80423fc8.entry.js +0 -1
- package/dist/bn-template-engine/p-91e74d42.entry.js +0 -1
- package/dist/bn-template-engine/p-930a9e29.entry.js +0 -1
- package/dist/bn-template-engine/p-93C9jL8R.js +0 -1
- package/dist/bn-template-engine/p-93ff8584.entry.js +0 -1
- package/dist/bn-template-engine/p-B0m0U4wJ.js +0 -1
- package/dist/bn-template-engine/p-B27Ax6P_.js +0 -2
- package/dist/bn-template-engine/p-B79VcHiT.js +0 -1
- package/dist/bn-template-engine/p-BBd0ZVLL.js +0 -1
- package/dist/bn-template-engine/p-BFTU3MAI.js +0 -1
- package/dist/bn-template-engine/p-BFatTBqh.js +0 -1
- package/dist/bn-template-engine/p-BYmPQYxx.js +0 -1
- package/dist/bn-template-engine/p-BhEQy-2D.js +0 -1
- package/dist/bn-template-engine/p-BtVfu16B.js +0 -1
- package/dist/bn-template-engine/p-CY1RzLjU.js +0 -1
- package/dist/bn-template-engine/p-CfWnag33.js +0 -1
- package/dist/bn-template-engine/p-CnI71OA9.js +0 -1
- package/dist/bn-template-engine/p-Cp4MVxCu.js +0 -1
- package/dist/bn-template-engine/p-DbyXf6dF.js +0 -1
- package/dist/bn-template-engine/p-TdL-LRR9.js +0 -1
- package/dist/bn-template-engine/p-_LBTIfNN.js +0 -1
- package/dist/bn-template-engine/p-a342cd3c.entry.js +0 -1
- package/dist/bn-template-engine/p-ad94cf63.entry.js +0 -1
- package/dist/bn-template-engine/p-bc37d750.entry.js +0 -1
- package/dist/bn-template-engine/p-d07a0ca3.entry.js +0 -1
- package/dist/bn-template-engine/p-e5f372af.entry.js +0 -1
- package/dist/bn-template-engine/p-e620028c.entry.js +0 -1
- package/dist/bn-template-engine/p-e81e116a.entry.js +0 -1
- package/dist/bn-template-engine/p-eca98070.entry.js +0 -1
- package/dist/bn-template-engine/p-ee6de950.entry.js +0 -1
- package/dist/bn-template-engine/p-efe0ef1e.entry.js +0 -1
- package/dist/bn-template-engine/p-f034f1b8.entry.js +0 -1
- package/dist/bn-template-engine/p-f1c1a8a3.entry.js +0 -1
- package/dist/bn-template-engine/p-fe573a1a.entry.js +0 -1
- package/dist/bn-template-engine/p-kMyLevYy.js +0 -1
- package/dist/cjs/DataFormatDigits-DmTbhF8q.js +0 -142
- package/dist/cjs/DateStringFactory-Dn0aRj2Y.js +0 -453
- package/dist/cjs/Order-B4NIqQWe.js +0 -129
- package/dist/cjs/SVGVariancesStyleGroup-Czizhngt.js +0 -7973
- package/dist/cjs/StringAdapter-0EbYMkR0.js +0 -136
- package/dist/cjs/_commonjsHelpers-BJu3ubxk.js +0 -10
- package/dist/cjs/alasql.min-C_nHTuEQ.js +0 -306
- package/dist/cjs/bn-asset.cjs.entry.js +0 -42
- package/dist/cjs/bn-body_3.cjs.entry.js +0 -413
- package/dist/cjs/bn-card.cjs.entry.js +0 -37
- package/dist/cjs/bn-chart-structure.cjs.entry.js +0 -705
- package/dist/cjs/bn-chart-time.cjs.entry.js +0 -987
- package/dist/cjs/bn-component-style.cjs.entry.js +0 -44
- package/dist/cjs/bn-context_5.cjs.entry.js +0 -3380
- package/dist/cjs/bn-dataset.cjs.entry.js +0 -278
- package/dist/cjs/bn-layout-card.cjs.entry.js +0 -128
- package/dist/cjs/bn-layout-page.cjs.entry.js +0 -142
- package/dist/cjs/bn-map.cjs.entry.js +0 -425
- package/dist/cjs/bn-message.cjs.entry.js +0 -52
- package/dist/cjs/componentRegister-C17UFNPh.js +0 -72
- package/dist/cjs/constants-DHqQXSSd.js +0 -158
- package/dist/cjs/formatter-DIJL_crx.js +0 -215
- package/dist/cjs/ibcs-chart-structure.cjs.entry.js +0 -2906
- package/dist/cjs/ibcs-chart-time.cjs.entry.js +0 -4140
- package/dist/cjs/ibcs-map.cjs.entry.js +0 -1075
- package/dist/cjs/ibcs-title.cjs.entry.js +0 -352
- package/dist/cjs/scaling-B23eOtsC.js +0 -67
- package/dist/cjs/test-runner-card.cjs.entry.js +0 -27
- package/dist/cjs/test-runner-chart-time.cjs.entry.js +0 -230
- package/dist/cjs/test-runner-chart.cjs.entry.js +0 -326
- package/dist/cjs/test-runner-map.cjs.entry.js +0 -1862
- package/dist/cjs/test-runner-table.cjs.entry.js +0 -477
- package/dist/cjs/test-runner-time.cjs.entry.js +0 -381
- package/dist/cjs/test-runner-title.cjs.entry.js +0 -115
- package/dist/cjs/withComponentStatus-BrxL7usr.js +0 -39
- package/dist/cjs/withComponentStyle-C6KHnZHt.js +0 -128
- package/dist/cjs/withDataset-ZdN-RRTx.js +0 -146
- package/dist/cjs/withStyled-Bf-stJTR.js +0 -567
- package/dist/cjs/withTranslation-Cz0M5maV.js +0 -77
- package/dist/collection/components/bn-map/bn-map.css +0 -4
- package/dist/collection/components/bn-map/bn-map.js +0 -725
- package/dist/collection/components/bn-map/ibcs-map/assets/gpx/Chasing_Legends.gpx +0 -195076
- package/dist/collection/components/bn-map/ibcs-map/assets/gpx/Fahrt_am_Nachmittag.gpx +0 -142007
- package/dist/collection/components/bn-map/ibcs-map/assets/icons/gpx-finish.png +0 -0
- package/dist/collection/components/bn-map/ibcs-map/assets/icons/gpx-shadow.png +0 -0
- package/dist/collection/components/bn-map/ibcs-map/assets/icons/gpx-start.png +0 -0
- package/dist/collection/components/bn-map/ibcs-map/assets/icons/marker-example.png +0 -0
- package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-icon-end.png +0 -0
- package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-icon-start.png +0 -0
- package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-icon-wpt.png +0 -0
- package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-shadow.png +0 -0
- package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin.png +0 -0
- package/dist/collection/components/bn-map/ibcs-map/ibcs-map.css +0 -674
- package/dist/collection/components/bn-map/ibcs-map/ibcs-map.js +0 -744
- package/dist/collection/components/bn-map/ibcs-map/utils/model/GeoJsonLayer.js +0 -9
- package/dist/collection/components/bn-map/ibcs-map/utils/model/GpxLayer.js +0 -13
- package/dist/collection/components/bn-map/ibcs-map/utils/model/Marker.js +0 -11
- package/dist/collection/components/bn-map/ibcs-map/utils/model/index.js +0 -2
- package/dist/collection/test-runner/test-runner-card.js +0 -36
- package/dist/collection/test-runner/test-runner-chart-time.js +0 -234
- package/dist/collection/test-runner/test-runner-chart.js +0 -364
- package/dist/collection/test-runner/test-runner-map.js +0 -1901
- package/dist/collection/test-runner/test-runner-table.js +0 -469
- package/dist/collection/test-runner/test-runner-time.js +0 -399
- package/dist/collection/test-runner/test-runner-title.js +0 -108
- package/dist/components/bn-map.d.ts +0 -11
- package/dist/components/bn-map.js +0 -1
- package/dist/components/componentRegister.js +0 -1
- package/dist/components/ibcs-map.d.ts +0 -11
- package/dist/components/ibcs-map.js +0 -1
- package/dist/components/ibcs-map2.js +0 -1
- package/dist/components/test-runner-card.d.ts +0 -11
- package/dist/components/test-runner-card.js +0 -1
- package/dist/components/test-runner-chart-time.d.ts +0 -11
- package/dist/components/test-runner-chart-time.js +0 -1
- package/dist/components/test-runner-chart.d.ts +0 -11
- package/dist/components/test-runner-chart.js +0 -1
- package/dist/components/test-runner-map.d.ts +0 -11
- package/dist/components/test-runner-map.js +0 -1
- package/dist/components/test-runner-table.d.ts +0 -11
- package/dist/components/test-runner-table.js +0 -1
- package/dist/components/test-runner-time.js +0 -1
- package/dist/components/test-runner-title.d.ts +0 -11
- package/dist/components/test-runner-title.js +0 -1
- package/dist/components/withDataset.js +0 -1
- package/dist/esm/DataFormatDigits-Dt6gpIiZ.js +0 -137
- package/dist/esm/DateStringFactory-_Qiv0IvF.js +0 -451
- package/dist/esm/Order-B4fpLe_f.js +0 -125
- package/dist/esm/SVGVariancesStyleGroup-DlWgvpzs.js +0 -7961
- package/dist/esm/StringAdapter-BLvo1Krl.js +0 -133
- package/dist/esm/_commonjsHelpers-BFTU3MAI.js +0 -7
- package/dist/esm/alasql.min-CWu4NkIt.js +0 -304
- package/dist/esm/bn-asset.entry.js +0 -40
- package/dist/esm/bn-body_3.entry.js +0 -409
- package/dist/esm/bn-card.entry.js +0 -35
- package/dist/esm/bn-chart-structure.entry.js +0 -703
- package/dist/esm/bn-chart-time.entry.js +0 -985
- package/dist/esm/bn-component-style.entry.js +0 -42
- package/dist/esm/bn-context_5.entry.js +0 -3374
- package/dist/esm/bn-dataset.entry.js +0 -276
- package/dist/esm/bn-layout-card.entry.js +0 -126
- package/dist/esm/bn-layout-page.entry.js +0 -140
- package/dist/esm/bn-map.entry.js +0 -423
- package/dist/esm/bn-message.entry.js +0 -50
- package/dist/esm/componentRegister-BtVfu16B.js +0 -72
- package/dist/esm/constants-kMyLevYy.js +0 -158
- package/dist/esm/formatter-DTMEZ6d8.js +0 -211
- package/dist/esm/ibcs-chart-structure.entry.js +0 -2904
- package/dist/esm/ibcs-chart-time.entry.js +0 -4138
- package/dist/esm/ibcs-map.entry.js +0 -1073
- package/dist/esm/ibcs-title.entry.js +0 -350
- package/dist/esm/scaling-BBd0ZVLL.js +0 -64
- package/dist/esm/test-runner-card.entry.js +0 -25
- package/dist/esm/test-runner-chart-time.entry.js +0 -228
- package/dist/esm/test-runner-chart.entry.js +0 -324
- package/dist/esm/test-runner-map.entry.js +0 -1860
- package/dist/esm/test-runner-table.entry.js +0 -475
- package/dist/esm/test-runner-time.entry.js +0 -379
- package/dist/esm/test-runner-title.entry.js +0 -113
- package/dist/esm/withComponentStatus-elELReKt.js +0 -37
- package/dist/esm/withComponentStyle-NaxfakAG.js +0 -126
- package/dist/esm/withDataset-BT2VQCsG.js +0 -144
- package/dist/esm/withStyled-CpUTv74m.js +0 -539
- package/dist/esm/withTranslation-Do4GhleK.js +0 -75
- package/dist/types/components/bn-map/bn-map.d.ts +0 -122
- package/dist/types/components/bn-map/ibcs-map/ibcs-map.d.ts +0 -73
- package/dist/types/components/bn-map/ibcs-map/utils/model/GeoJsonLayer.d.ts +0 -8
- package/dist/types/components/bn-map/ibcs-map/utils/model/GpxLayer.d.ts +0 -11
- package/dist/types/components/bn-map/ibcs-map/utils/model/Marker.d.ts +0 -9
- package/dist/types/components/bn-map/ibcs-map/utils/model/index.d.ts +0 -2
- package/dist/types/test-runner/test-runner-card.d.ts +0 -3
- package/dist/types/test-runner/test-runner-chart-time.d.ts +0 -3
- package/dist/types/test-runner/test-runner-chart.d.ts +0 -3
- package/dist/types/test-runner/test-runner-map.d.ts +0 -3
- package/dist/types/test-runner/test-runner-table.d.ts +0 -3
- package/dist/types/test-runner/test-runner-time.d.ts +0 -3
- package/dist/types/test-runner/test-runner-title.d.ts +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as e,H as i,g as s,f as n,d as r,e as a,F as o}from"./p-B_d-jp99.js";import{w as h,a as l,r as c}from"./p-B4JfKvVT.js";import{g as u,c as f,a as d,b as p}from"./p-Bi2wx-el.js";import{w as b}from"./p-DSXNgKLa.js";import{a as v,v as E,c as m,b as g,d as w,e as y,f as T,g as S,i as A,h as O,j as R,w as N,k as _,A as C,O as L,l as I,S as k,m as M,n as $,o as x,p as D,D as P,q as U,C as G,r as F,s as B,t as j,u as H,x as V,y as q,z as Y,B as W,E as X,F as z,I as J,T as K,M as Q,G as Z,H as tt,J as et,K as it,L as st,N as nt,P as rt,Q as at,R as ot,U as ht,V as lt}from"./p-CWiZks2h.js";import{a as ct,w as ut,g as ft,p as dt}from"./p-7HSTE79g.js";const pt=class{constructor(e){t(this,e),h(this),this.errors=l(this),b(this,(t=>{this.stores||(this.stores=u(this.element));try{const e=t.replace(/\s/g,"");this.stores.assets.set(this.name,e)}catch(e){console.error("Error parsing asset",e,t),this.stores.assets.set(this.name,void 0)}}))}render(){return e(i,{key:"dfec9f90136278bddab194479301aa3fa5bc1e72"})}get element(){return s(this)}};pt.style=":host{display:none}";const bt=class{constructor(e){t(this,e),h(this),this.errors=l(this),this.componentStyle=v(this)}getFontStyles(){return this.componentStyle((t=>{var e,i,s,n;return{"--bn-font-family":(null===(e=t.global)||void 0===e?void 0:e.fontFamily)||"'Noto Sans', sans-serif","--bn-font-size":`${(null===(i=t.global)||void 0===i?void 0:i.fontSizePx)||13.3333}px`,"--bn-font-color":(null===(s=t.global)||void 0===s?void 0:s.fontColor)||"#000000","--bn-font-background":(null===(n=t.global)||void 0===n?void 0:n.fontBackgroundColor)||"#ffffff"}}))}render(){return e(i,{key:"f43978af1c6658c6fa165093c3ada6b5f3b5986d",style:this.getFontStyles()},e("slot",{key:"b9c97432089676fc373b1d5ee59573ef5681a5c5"}))}get element(){return s(this)}};bt.style=':host{flex:1;min-height:0;position:relative;overflow:hidden;display:block;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);color:var(--bn-font-color, #000000)}';const vt=class{constructor(e){t(this,e),h(this),this.errors=l(this),this.componentStyle=v(this)}render(){return e(i,{key:"92bcbc010336d3a542c86e182831bbfddda2aa9b",style:this.prepareStyle()},e("slot",{key:"d836aa5443283df158dcb50345aee0df97f74a6e"}))}prepareStyle(){return{"font-family":this.componentStyle((t=>t.global.fontFamily)),"font-size":`${this.componentStyle((t=>t.global.fontSizePx))}px`,"--bn-font-family":this.componentStyle((t=>t.global.fontFamily))||"'Noto Sans', sans-serif","--bn-font-size":`${this.componentStyle((t=>t.global.fontSizePx))||13.3333}px`,"--bn-font-color":this.componentStyle((t=>t.global.fontColor))||"#000000","--bn-font-background":this.componentStyle((t=>t.global.fontBackgroundColor))||"#ffffff"}}get element(){return s(this)}};vt.style=':host{display:flex;flex-direction:column;justify-content:space-between;flex:1;min-height:0;padding:0.25em;margin:0.5em;background-origin:content-box;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);color:var(--bn-font-color, #000000)}:host(.border){box-sizing:border-box;-webkit-box-sizing:border-box;border:0.1em solid #ddd}div{color:var(--bn-font-color, black)}';const Et=t=>{let e,i;const r=()=>{"function"==typeof t.validateUnitScaling&&t.validateUnitScaling(t.unitScaling),"function"==typeof t.validatePercentageScaling&&t.validatePercentageScaling(t.percentageScaling)},a=t.connectedCallback;t.connectedCallback=()=>{const o=s(t);i=u(o),(()=>{const e=i.scalingGroups.state;for(const i of Object.keys(e))void 0!==e[i]?t.pixelPerUnitGroupMap.set(i,e[i]):t.pixelPerUnitGroupMap.delete(i)})(),r(),e=i.scalingGroups.on("set",((e,i)=>{void 0!==i?t.pixelPerUnitGroupMap.set(e,i):t.pixelPerUnitGroupMap.delete(e),r(),n(s(t))})),c(a,t)};const o=t.disconnectedCallback;t.disconnectedCallback=()=>{c(e),f(s(t)),c(o,t)}},mt="inherited-page",gt="bn-layout-page";function wt(t){return"inherited-closest"===t||t===mt}function yt(t,e){let i=t.parentNode;for(;i;){if(i instanceof HTMLElement){const t=i.nodeName.toLowerCase();if(e===mt){if(t===gt)return i}else if("bn-layout-card"===t||t===gt)return i}if(i.parentNode)i=i.parentNode;else{if(!(i instanceof ShadowRoot))break;i=i.host}}}const Tt=(t,e)=>{const i=new Map;let r,a=null;const o=t.connectedCallback;t.connectedCallback=()=>{(()=>{const o=s(t);i.clear();const h=[];for(const s of e){const e=t[s.propName];if("string"!=typeof e||!wt(e))continue;if(r||(r=yt(o,e)),!r)continue;const n=r.getAttribute(s.ancestorAttr);null!=n&&i.set(s.propName,n),h.push(s.ancestorAttr)}r&&h.length>0&&(a=new MutationObserver((()=>{for(const s of e){if(!wt(t[s.propName]))continue;const e=r.getAttribute(s.ancestorAttr);null!=e?i.set(s.propName,e):i.delete(s.propName)}n(t)})),a.observe(r,{attributes:!0,attributeFilter:h}))})(),c(o,t)};const h=t.disconnectedCallback;return t.disconnectedCallback=()=>{a&&(a.disconnect(),a=null),r=void 0,i.clear(),c(h,t)},(t,e)=>{if(wt(e))return i.get(t)}};function St(t,e,i=80){let s=null,n=!1,r=-1,a=-1;const o=function(t){var e;const i=t.parentElement;return(null===(e=null==i?void 0:i.assignedSlot)||void 0===e?void 0:e.parentElement)?i.assignedSlot.parentElement:i}(t);if(!o)return{disconnect(){}};const h=new ResizeObserver((t=>{var h;if(n)return;let l,c;const u=t[0];if(null===(h=null==u?void 0:u.contentBoxSize)||void 0===h?void 0:h.length){const t=u.contentBoxSize[0];l=t.inlineSize,c=t.blockSize}else l=o.clientWidth,c=o.clientHeight;Math.abs(l-r)<=2&&Math.abs(c-a)<=2||(r=l,a=c,null!=s&&clearTimeout(s),s=setTimeout((()=>{n||e()}),i))}));return h.observe(o),{disconnect(){n=!0,null!=s&&clearTimeout(s),h.disconnect()}}}const At=class{validateScenario(t){const e="ERR_scenarios";if(wt(t))return void this.errors.remove(e);const i=E(t);i.length>0?this.errors.addOrReplace({id:e,type:"warning",message:"scenarios: invalid value(s) '"+JSON.stringify(i)+"' are not supported."}):this.errors.remove(e)}validateVariances(t){const e="ERR_variances";if(wt(t))return void this.errors.remove(e);const i=m(t);i.length>0?this.errors.addOrReplace({id:e,type:"warning",message:"variances: invalid value(s) '"+JSON.stringify(i)+"' are not supported."}):this.errors.remove(e)}validateUnitScaling(t){const e="ERR_unitScaling";"auto"===(null==t?void 0:t.toString().trim().toLowerCase())||g(t)||this.pixelPerUnitGroupMap.has(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"unitScaling: invalid value(s) '"+t+"' are not supported."})}validatePercentageScaling(t){const e="ERR_percentageScaling";"auto"===(null==t?void 0:t.toString().trim().toLowerCase())||g(t)||this.pixelPerUnitGroupMap.has(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"percentageScaling: invalid value(s) '"+t+"' are not supported."})}validateLevel(t){const e="ERR_level";w(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"level: invalid value(s) '"+t+"' are not supported."})}validateOrderList(t){const e="ERR_order";if(wt(t))return void this.errors.remove(e);const i=y(t);i.length>0?this.errors.addOrReplace({id:e,type:"warning",message:"order: invalid value(s) '"+JSON.stringify(i)+"' are not supported."}):this.errors.remove(e)}validateOrderDirection(t){const e="ERR_orderDirection";wt(t)||T(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"orderDirection: invalid value '"+(null==t?void 0:t.toString())+"' is not supported."})}validateLimit(t){const e="ERR_limit";S(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"limit: invalid value '"+(null==t?void 0:t.toString())+"' is not supported."})}validateShowCategories(t){const e="ERR_showCategories";A(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"showCategories: invalid value(s) '"+(null==t?void 0:t.toString())+"' are not supported."})}validateMeasureScale(t){const e="ERR_measureScale";O(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"measureScale: invalid value '"+(null==t?void 0:t.toString())+"' is not supported."})}validateShowMeasureScale(t){const e="ERR_grouped";A(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"showMeasureScale: invalid value(s) '"+(null==t?void 0:t.toString())+"' are not supported."})}validateStack(t){const e="ERR_stack",i=R(t);i.length>0?this.errors.addOrReplace({id:e,type:"warning",message:i.join("; ")}):this.errors.remove(e)}validateScaling(t){if(null==t||""===t||"none"===t||"auto"===t)return void this.errors.remove("ERR_scale");const e=Number(t);isNaN(e)||e<=0?this.errors.addOrReplace({id:"ERR_scale",type:"warning",message:`Invalid scale value: "${t}". Use "none", "auto", or a positive number.`}):this.errors.remove("ERR_scale")}constructor(e){t(this,e),this.data=[],this.datasetMeta=null,this.appliedScaleFactor=1,this.layoutObserver=null,this._lastScaledParentHeight=0,this.chartTitle="",this.filter="",this.limit=0,this.showCategories="true",this.measureScale="greatest",this.showMeasureScale="false",this.measureUnit="",this.stack="",this.pixelPerUnitGroupMap=new Map,this._autoScaleGuard=!1,N(this),h(this),ct(this,((t,e)=>{this.data=e||[]}),((t,e)=>{this.datasetMeta=e})),this.chartTemplate=this.chartTemplate.bind(this),this.errors=l(this),Et(this),this.componentStyle=v(this),this.t=ut(this).t,this.resolveInherited=Tt(this,[{propName:"scenarios",ancestorAttr:"title-scenarios"},{propName:"variances",ancestorAttr:"title-variances"},{propName:"order",ancestorAttr:"title-order"},{propName:"orderDirection",ancestorAttr:"title-order-direction"}])}componentWillLoad(){this.validateScenario(this.scenarios),this.validateVariances(this.variances),this.validateUnitScaling(this.unitScaling),this.validateLevel(this.level),this.validateOrderDirection(this.orderDirection),this.validateOrderList(this.order),this.validateShowCategories(this.showCategories),this.validateMeasureScale(this.measureScale),this.validateShowMeasureScale(this.showMeasureScale),this.validateStack(this.stack),this.validateScaling(this.scale)}componentDidRender(){const{mode:t}=dt(this.scale);if("auto"!==t&&"empty"!==t)return this._autoScaleGuard=!1,void this.checkWidthOverflow();if(this._autoScaleGuard)return this._autoScaleGuard=!1,void this.checkWidthOverflow();const e=this.element,{height:i}=ft(e);if(i<=0)return void this.checkWidthOverflow();this._lastScaledParentHeight=i;const s=this.componentStyle((t=>{var e;return(null===(e=t.global)||void 0===e?void 0:e.fontSizePx)||13.3333})),n=e.scrollHeight,a=this.appliedScaleFactor;if(n<=i+1)return this.errors.remove("AUTO_scale"),void this.checkWidthOverflow();const o=Math.max(.3,a*(i-1)/n);Math.abs(o-a)<.01||(e.style.setProperty("--bn-font-size",s*o+"px"),"empty"===t?this.errors.addOrReplace({id:"AUTO_scale",type:"warning",message:`Auto-scaled chart by factor ${o.toFixed(3)}`}):this.errors.remove("AUTO_scale"),this._autoScaleGuard=!0,r((()=>{this.appliedScaleFactor=o}))),this.checkWidthOverflow()}componentDidLoad(){this.layoutObserver=St(this.element,(()=>{if(this._autoScaleGuard)return;const{height:t}=ft(this.element);t>0&&Math.abs(t-this._lastScaledParentHeight)>2&&(this._lastScaledParentHeight=t,n(this))})),requestAnimationFrame((()=>{requestAnimationFrame((()=>{if(this._autoScaleGuard)return;const{height:t}=ft(this.element);this._lastScaledParentHeight=t,n(this)}))}))}disconnectedCallback(){var t;null===(t=this.layoutObserver)||void 0===t||t.disconnect(),this.layoutObserver=null}checkWidthOverflow(){var t;const e="WARN_overflow",i=String(null!==(t=this.unitScaling)&&void 0!==t?t:"").trim().toLowerCase();if(""===i||"auto"===i)return void this.errors.remove(e);const s=ft(this.element);s.width>0&&this.element.scrollWidth>s.width+1?this.errors.addOrReplace({id:e,type:"error",message:`Chart exceeds available width (${this.element.scrollWidth}px > ${Math.round(s.width)}px). Reduce unit-scaling or set to "auto".`}):this.errors.remove(e)}prepareDimension(){const t=ft(this.element),e=this.prepareVariances();return this.canvasWidthSegmented=t.width/(1+e.length),{width:this.canvasWidthSegmented,height:t.height}}prepareScenarios(){var t,e,i,s;const n=this.resolveInherited("scenarios",this.scenarios);if(void 0!==n)return this.errors.remove("AUTO_scenarios"),n.split(",").map((t=>t.trim()));const r="auto"===(null===(t=this.scenarios)||void 0===t?void 0:t.trim().toLowerCase());return _(this.scenarios)||r?(null===(i=null===(e=this.datasetMeta)||void 0===e?void 0:e.availableScenarios)||void 0===i?void 0:i.length)>0?(r?this.errors.remove("AUTO_scenarios"):this.errors.addOrReplace({id:"AUTO_scenarios",type:"warning",message:`scenarios: not set, auto-detected: ${this.datasetMeta.availableScenarios.join(",")}`}),this.datasetMeta.availableScenarios):[]:(this.errors.remove("AUTO_scenarios"),null===(s=this.scenarios)||void 0===s?void 0:s.split(",").map((t=>t.trim())))}prepareVariances(){var t;const e=this.resolveInherited("variances",this.variances);return void 0!==e?e.split(",").map((t=>t.trim())):_(this.variances)?[]:null===(t=this.variances)||void 0===t?void 0:t.split(",").map((t=>t.trim()))}prepareHideCategories(t){return t>=1||"true"!==this.showCategories}prepareI18n(){const t=d,e=new Map([].map((t=>[t,this.t(".".concat(t))]))),i=new Map(t.map((t=>[t,this.t("global.".concat(t))])));return new Map([...i.entries(),...e.entries()])}preparePixelPerUnit(){var t;if(this.pixelPerUnitGroupMap.has(this.unitScaling))return this.errors.remove("AUTO_unitScaling"),this.pixelPerUnitGroupMap.get(this.unitScaling);if("auto"===(null===(t=this.unitScaling)||void 0===t?void 0:t.toString().trim().toLowerCase()))return this.errors.remove("AUTO_unitScaling"),0;const e=Number(this.unitScaling);return!isNaN(e)&&e>0?(this.errors.remove("AUTO_unitScaling"),e):(this.errors.addOrReplace({id:"AUTO_unitScaling",type:"warning",message:"unit-scaling: not set, auto-calculated to fit available space."}),0)}preparePixelPerPercentage(){var t;if(this.pixelPerUnitGroupMap.has(this.percentageScaling))return this.pixelPerUnitGroupMap.get(this.percentageScaling);if("auto"===(null===(t=this.percentageScaling)||void 0===t?void 0:t.toString().trim().toLowerCase()))return this.errors.remove("AUTO_percentageScaling"),0;const e=Number(this.percentageScaling);return!isNaN(e)&&e>0?(this.errors.remove("AUTO_percentageScaling"),100*e):(this.errors.addOrReplace({id:"AUTO_percentageScaling",type:"warning",message:"percentage-scaling: not set, auto-calculated to fit available space."}),0)}prepareLevel(){var t,e,i;const s="auto"===(null===(t=this.level)||void 0===t?void 0:t.trim().toLowerCase());return _(this.level)||s?(null===(e=this.datasetMeta)||void 0===e?void 0:e.suggestedLevel)?(s?this.errors.remove("AUTO_level"):this.errors.addOrReplace({id:"AUTO_level",type:"warning",message:`level: not set, auto-detected: ${this.datasetMeta.suggestedLevel}`}),C[this.datasetMeta.suggestedLevel.toUpperCase()]):void 0:(this.errors.remove("AUTO_level"),C[null===(i=this.level)||void 0===i?void 0:i.toUpperCase()])}prepareOrder(){var t;const e=this.resolveInherited("order",this.order),i=this.resolveInherited("orderDirection",this.orderDirection),s=null!=e?e:this.order,n=null!=i?i:this.orderDirection,r="auto"===(null==s?void 0:s.trim().toLowerCase());let a;return _(s)||r?(null===(t=this.datasetMeta)||void 0===t?void 0:t.suggestedOrder)?(r?this.errors.remove("AUTO_order"):this.errors.addOrReplace({id:"AUTO_order",type:"warning",message:`order: not set, auto-detected: ${this.datasetMeta.suggestedOrder}`}),a=this.datasetMeta.suggestedOrder):a=s:(this.errors.remove("AUTO_order"),a=s),{hierarchy:null==a?void 0:a.split(",").map((t=>I[null==t?void 0:t.toUpperCase()])),direction:L[null==n?void 0:n.toUpperCase()]}}prepareStyle(){const t=this.getEffectiveScaleFactor();return this.componentStyle((e=>{const i=e.global.fontSizePx*t;return{scaleFactors:{scenarioOffset:e["bn-chart-structure"].scaleFactors.scenarioOffset,scenarioLabelToBar:e["bn-chart-structure"].scaleFactors.scenarioLabelToBar,labelToBar:e["bn-chart-structure"].scaleFactors.labelToBar,labelToAxis:e["bn-chart-structure"].scaleFactors.labelToAxis,needleWidth:e["bn-chart-structure"].scaleFactors.needleWidth,needleHeadWidth:e["bn-chart-structure"].scaleFactors.needleHeadWidth,barWidth:e["bn-chart-structure"].scaleFactors.barWidth,varianceAxisLineWidth:e["bn-chart-structure"].scaleFactors.varianceAxisLineWidth,axisLineWidth:e["bn-chart-structure"].scaleFactors.axisLineWidth,auxiliaryLineWidth:e["bn-chart-structure"].scaleFactors.auxiliaryLineWidth,scenarioLineWidth:e["bn-chart-structure"].scaleFactors.scenarioLineWidth,markerWidth:e["bn-chart-structure"].scaleFactors.markerWidth,markerOffset:e["bn-chart-structure"].scaleFactors.markerOffset,categoryWidth:e["bn-chart-structure"].scaleFactors.categoryWidth,axisTickLength:e["bn-chart-structure"].scaleFactors.axisTickLength},fontStyles:{font:`${i}px ${e.global.fontFamily}`,size:i,color:e.global.fontColor,background:e.global.fontBackgroundColor,leading:1.8},axisStyles:e["bn-chart-structure"].axisStyles,barStyles:e["bn-chart-structure"].barStyles,varianceStyles:e["bn-chart-structure"].varianceStyles,padding:e["bn-chart-structure"].padding,pattern:null}}))}prepareChartTitle(t){return t>=1?"":this.chartTitle}prepareStackConfig(){if(_(this.stack))return this.errors.remove("WARN_stack_dimensions_scenarios"),null;try{const t=JSON.parse(this.stack),e=t.by,i="WARN_stack_dimensions_scenarios";if(e===k.DIMENSIONS){const t=this.prepareScenarios();t.length>1?this.errors.addOrReplace({id:i,type:"warning",message:`stack by dimensions: only the first scenario "${t[0]}" is used, the rest (${t.slice(1).join(", ")}) are discarded.`}):this.errors.remove(i)}else this.errors.remove(i);return{by:e,mode:t.mode||$.ABSOLUTE,order:t.order||M.DATASET}}catch(t){return this.errors.remove("WARN_stack_dimensions_scenarios"),null}}prepareFilter(){return 0===this.filter.length?"":this.filter}prepareLimit(){return Math.floor(Number(this.limit)||0)}getDataStructure(){return{IStructureChartDataRow:{operation:{type:"string",isOptional:!1,description:""},rowGroup:{type:"string",isOptional:!1,description:""},rowGroupIndex:{type:"number",isOptional:!1,description:""},category:{type:"string",isOptional:!1,description:""},categoryIndex:{type:"number",isOptional:!1,description:""},subCategory:{type:"string",isOptional:!1,description:""},subCategoryIndex:{type:"number",isOptional:!1,description:""},columnGroup:{type:"string",isOptional:!1,description:""},columnGroupIndex:{type:"number",isOptional:!1,description:""},columnSubGroup:{type:"string",isOptional:!1,description:""},columnSubGroupIndex:{type:"number",isOptional:!1,description:""},ac1:{type:"number",isOptional:!1,description:""},ac2:{type:"number",isOptional:!1,description:""},ac3:{type:"number",isOptional:!1,description:""},ac4:{type:"number",isOptional:!1,description:""},pp1:{type:"number",isOptional:!1,description:""},pp2:{type:"number",isOptional:!1,description:""},pp3:{type:"number",isOptional:!1,description:""},pp4:{type:"number",isOptional:!1,description:""},fc1:{type:"number",isOptional:!1,description:""},fc2:{type:"number",isOptional:!1,description:""},fc3:{type:"number",isOptional:!1,description:""},fc4:{type:"number",isOptional:!1,description:""},pl1:{type:"number",isOptional:!1,description:""},pl2:{type:"number",isOptional:!1,description:""},pl3:{type:"number",isOptional:!1,description:""},pl4:{type:"number",isOptional:!1,description:""}}}}prepareMeasureScale(){return _(this.measureScale)?"GREATEST":["_","k","M","G","T","P","E","Z","Y","m","μ","n","p","P","f","a","z","y"].includes(this.measureScale.trim())||"LEAST"===this.measureScale.trim().toUpperCase()?this.measureScale.trim():"GREATEST"}prepareShowMeasureScale(t){return 0===t&&"true"===this.showMeasureScale}prepareMeasureUnit(){return""===this.measureUnit||null==this.measureUnit?"":this.measureUnit}chartTemplate(t,i){const s=this.getEffectiveScaleFactor(),n=this.preparePixelPerUnit(),r=this.preparePixelPerPercentage(),a=this.prepareStackConfig(),o=this.prepareScenarios(),h=(null==a?void 0:a.by)===k.DIMENSIONS?o.slice(0,1):o;return e("ibcs-chart-structure",{data:this.data,chartTitle:this.prepareChartTitle(i),scenarios:h,variances:[t],hideCategories:this.prepareHideCategories(i),pixelPerUnit:n>0?n*s:0,pixelPerPercentage:r>0?r*s:0,limit:this.prepareLimit(),styles:this.prepareStyle(),i18n:this.prepareI18n(),order:this.prepareOrder(),level:this.prepareLevel(),filter:this.prepareFilter(),"measure-scale":this.prepareMeasureScale(),"measure-unit":this.prepareMeasureUnit(),showMeasureScale:this.prepareShowMeasureScale(i),stackConfig:a,parentDimensions:this.prepareDimension()})}getEffectiveScaleFactor(){const{mode:t,factor:e}=dt(this.scale);return"factor"===t?e:"auto"===t||"empty"===t?this.appliedScaleFactor:1}getFontStyles(){const t=this.getEffectiveScaleFactor();return this.componentStyle((e=>{var i,s,n,r;const a=(null===(i=e.global)||void 0===i?void 0:i.fontSizePx)||13.3333;return{"--bn-font-family":(null===(s=e.global)||void 0===s?void 0:s.fontFamily)||"'Noto Sans', sans-serif","--bn-font-size":a*t+"px","--bn-font-color":(null===(n=e.global)||void 0===n?void 0:n.fontColor)||"#000000","--bn-font-background":(null===(r=e.global)||void 0===r?void 0:r.fontBackgroundColor)||"#ffffff"}}))}render(){let t=[""];const s=this.prepareVariances();s.length>0&&(t=[...t,...s]);const n=this.getFontStyles();return e(i,{key:"6e3c0b035ad3290f3b8ceb8ca7dc931ea30ae910",style:n},e("div",{key:"89c5625eabe1b87648fba55f6642d7af0231449d",class:"container"},t.map(this.chartTemplate)))}get element(){return s(this)}static get watchers(){return{scenarios:[{validateScenario:0}],variances:[{validateVariances:0}],unitScaling:[{validateUnitScaling:0}],percentageScaling:[{validatePercentageScaling:0}],level:[{validateLevel:0}],order:[{validateOrderList:0}],orderDirection:[{validateOrderDirection:0}],limit:[{validateLimit:0}],showCategories:[{validateShowCategories:0}],measureScale:[{validateMeasureScale:0}],showMeasureScale:[{validateShowMeasureScale:0}],stack:[{validateStack:0}],scale:[{validateScaling:0}]}}};At.style=':host{display:inline-block;position:relative;overflow:hidden}.container{display:flex;flex-direction:row}.background-image{display:flex;flex-wrap:wrap;justify-content:flex-end}.categories{text-align:right;font-size:var(--bn-font-size, 1em);font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);color:var(--bn-font-color, black)}.label-bg{fill:var(--bn-font-background, white);opacity:0.7}.label-text{text-align:right;font-size:var(--bn-font-size, 1em);font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);color:var(--bn-font-color, black)}.axis-title{text-align:center;font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);color:var(--bn-font-color, black)}.axis-ac{stroke:black;stroke-width:0.1em}.axis-pp{stroke:grey;stroke-width:0.1em}.axis-fc{stroke:black;stroke-dasharray:2;stroke-width:0.1em}.axis-pl{stroke:white;stroke-width:0.1em;outline-offset:0em;outline:0.1em solid black}canvas{image-rendering:-moz-crisp-edges;image-rendering:-webkit-crisp-edges;image-rendering:pixelated;image-rendering:crisp-edges}.measure{font-weight:bold}span{display:inline-block}.hidePatternContainer{height:0;width:0}div{float:left}.warning{font-size:0.8em;font-style:italic}.footer{margin:0.2em;font-size:0.6em}.footer-hide{margin:0.2em;font-size:0.6em;opacity:0}';class Ot{constructor(t){this.type="",this.base="",this.delta="",this.direction="",this.isValid=!1;const e=/(d|dr)(pl\d|ac\d|fc\d|pp\d)_(pl\d|ac\d|fc\d|pp\d)_(pos|neg|neu)/;if(e.test(t)){const i=e.exec(t);null!=i&&(this.type=String(i[1]),this.base=String(i[2]),this.delta=String(i[3]),this.direction=String(i[4]),this.isValid=!0)}}}var Rt;!function(t){t.OPERATION="operation",t.ROWGROUP="rowGroup",t.ROWGROUPINDEX="rowGroupIndex",t.CURRENTROW="currentRow",t.CATEGORY="category",t.CATEGORYINDEX="categoryIndex",t.SUBCATEGORY="subCategory",t.SUBCATEGORYINDEX="subCategoryIndex",t.COLUMNGROUP="columnGroup",t.COLUMNGROUPINDEX="columnIndex",t.COLUMNSUBGROUP="columnSubGroup",t.COLUMNSUBGROUPINDEX="columnSubGroupIndex",t.AC1="ac1",t.AC2="ac2",t.AC3="ac3",t.AC4="ac4",t.PP1="pp1",t.PP2="pp2",t.PP3="pp3",t.PP4="pp4",t.FC1="fc1",t.FC2="fc2",t.FC3="fc3",t.FC4="fc4",t.PL1="pl1",t.PL2="pl2",t.PL3="pl3",t.PL4="pl4",t.TOTALROWCOUNT="totalRowCnt",t.ROWNR="rowNr",t.TYPE="type"}(Rt||(Rt={}));var Nt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function _t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ct,Lt,It={},kt=_t(function(){if(Ct)return It;Ct=1;var t={};return Object.defineProperty(It,"__esModule",{value:!0}),It.default=function(e,i){void 0===i&&(i={});var s=JSON.stringify({text:e,options:i});if(t[s])return t[s];i.font=i.font||"Times",i.fontSize=i.fontSize||"16px",i.fontWeight=i.fontWeight||"normal",i.width=i.width||"auto";var n=function(t,e){var i=document.createElement("div"),s=document.createTextNode(t);return i.appendChild(s),i.style.fontFamily=e.font,i.style.fontSize=e.fontSize,i.style.fontWeight=e.fontWeight,i.style.position="absolute",i.style.visibility="hidden",i.style.left="-999px",i.style.top="-999px",i.style.width=e.width,i.style.height="auto",document.body.appendChild(i),i}(e,i),r={width:n.offsetWidth,height:n.offsetHeight};return function(t){t.parentNode.removeChild(t)}(n),t[s]=r,r},It}());class Mt{static number(t,e="decimal",i=1,s=0,n=1){return(t/n).toLocaleString("de-DE",{style:e,useGrouping:!0,maximumFractionDigits:i,minimumFractionDigits:s}).replace(/\s+(%)/g,"$1").replace(/\s/g,this.postfixSeperator).replace(/\./g,this.tsdDelimiter)}static translateScenarioLabel(t,e){if(null==t)return"";const i=new Ot(t);if(!i.isValid)return`${e.get(t)||t}`;let s,n;return Rt.AC1===i.base?(s=e.get("dr"===i.type?"ibcssymbol_delta_ac_relative":"ibcssymbol_delta_ac"),n=e.get(i.delta)||i.delta):(s=e.get("dr"===i.type?"ibcssymbol_delta_generic_relative":"ibcssymbol_delta_generic"),n=`${e.get(i.base)||i.base} - ${e.get(i.delta)||i.delta}`),void 0===s&&(s="{%}"),`${s.replace("{%}",n)}`}static getMaxWidthOfArrayItems(t,e,i){return kt(t.map((t=>Mt.translateScenarioLabel(t,e))).reduce(((t,e)=>t.length<e.length?e:t),""),{font:i.fontStyles.font,fontSize:i.fontStyles.size+"px"}).width}}Mt.tsdDelimiter=".",Mt.postfixSeperator=",",function(t){t.ROWGROUP="rowGroup",t.ROWGROUPINDEX="rowGroupIndex",t.CATEGORY="category",t.CATEGORYINDEX="categoryIndex",t.SUBCATEGORY="subCategory",t.SUBCATEGORYINDEX="subCategoryIndex"}(Lt||(Lt={}));const $t=class{validateScenario(t){const e="ERR_scenarios";if(wt(t))return void this.errors.remove(e);const i=E(t);i.length>0?this.errors.addOrReplace({id:e,type:"warning",message:"scenarios: invalid value(s) '"+JSON.stringify(i)+"' are not supported."}):this.errors.remove(e)}validateVariances(t){const e="ERR_variances";if(wt(t))return void this.errors.remove(e);const i=m(t);i.length>0?this.errors.addOrReplace({id:e,type:"warning",message:"variances: invalid value(s) '"+JSON.stringify(i)+"' are not supported."}):this.errors.remove(e)}validateLeftSync(t){const e="ERR_syncSpaceLeft";g(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"syncSpaceLeft: invalid value(s) '"+t+"' are not supported."})}validateLimit(t){const e="ERR_limit";S(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"limit: invalid value '"+(null==t?void 0:t.toString())+"' is not supported."})}validateUnitScaling(t){const e="ERR_unitScaling";"auto"===(null==t?void 0:t.toString().trim().toLowerCase())||g(t)||this.pixelPerUnitGroupMap.has(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"unitScaling: invalid value(s) '"+t+"' are not supported."})}validatePercentageScaling(t){const e="ERR_percentageScaling";"auto"===(null==t?void 0:t.toString().trim().toLowerCase())||g(t)||this.pixelPerUnitGroupMap.has(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"percentageScaling: invalid value(s) '"+t+"' are not supported."})}validateLevel(t){const e="ERR_level";w(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"level: invalid value(s) '"+t+"' are not supported."})}validateOrderList(t){const e="ERR_order";if(wt(t))return void this.errors.remove(e);const i=y(t);i.length>0?this.errors.addOrReplace({id:e,type:"warning",message:"order: invalid value(s) '"+JSON.stringify(i)+"' are not supported."}):this.errors.remove(e)}validateOrderDirection(t){const e="ERR_orderDirection";wt(t)||T(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"orderDirection: invalid value '"+(null==t?void 0:t.toString())+"' is not supported."})}validateDateInterval(t){const e="ERR_dateInterval";x(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"dateInterval: invalid value '"+(null==t?void 0:t.toString())+"' is not supported."})}validateChartMode(t){const e="ERR_chartMode";["bar","line","auto"].includes(null==t?void 0:t.toLowerCase())?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"chartMode: invalid value '"+(null==t?void 0:t.toString())+"' is not supported. Valid values are: bar, line, auto."})}validateMaxBars(t){const e="ERR_maxBars";!S(t)||t<1?this.errors.addOrReplace({id:e,type:"warning",message:"maxBars: invalid value '"+(null==t?void 0:t.toString())+"' is not supported. Must be a positive integer."}):this.errors.remove(e)}validateStack(t){const e="ERR_stack",i=R(t);i.length>0?this.errors.addOrReplace({id:e,type:"warning",message:i.join("; ")}):this.errors.remove(e)}validateScaling(t){if(null==t||""===t||"none"===t||"auto"===t)return void this.errors.remove("ERR_scale");const e=Number(t);isNaN(e)||e<=0?this.errors.addOrReplace({id:"ERR_scale",type:"warning",message:`Invalid scale value: "${t}". Use "none", "auto", or a positive number.`}):this.errors.remove("ERR_scale")}validateAxisLabelsMode(t){const e="ERR_axisLabelsMode";D(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"axisLabelsMode: invalid value '"+(null==t?void 0:t.toString())+"' is not supported."})}validateLineFullWidth(t){const e="ERR_lineFullWidth";A(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"lineFullWidth: invalid value(s) '"+(null==t?void 0:t.toString())+"' are not supported."})}validateShowCategories(t){const e="ERR_showCategories";A(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"showCategories: invalid value(s) '"+(null==t?void 0:t.toString())+"' are not supported."})}validateMeasureScale(t){const e="ERR_measureScale";O(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"measureScale: invalid value '"+(null==t?void 0:t.toString())+"' is not supported."})}validateShowMeasureScale(t){const e="ERR_grouped";A(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"showMeasureScale: invalid value(s) '"+(null==t?void 0:t.toString())+"' are not supported."})}validateShowOverlayAvg(t){const e="ERR_grouped";A(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"showOverlayAvg: invalid value(s) '"+(null==t?void 0:t.toString())+"' are not supported."})}validateShowOverlayMedian(t){const e="ERR_grouped";A(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"showOverlayMedian: invalid value(s) '"+(null==t?void 0:t.toString())+"' are not supported."})}constructor(e){t(this,e),this.data=[],this.datasetMeta=null,this.appliedScaleFactor=1,this.layoutObserver=null,this.chartTitle="",this.filter="",this.syncSpaceLeft=-1,this.limit=0,this.chartMode="bar",this.maxBars=28,this.stack="",this.intervalSpanLimit=28,this.lineFullWidth="true",this.showCategories="true",this.measureScale="greatest",this.showMeasureScale="false",this.showOverlayAvg="true",this.showOverlayMedian="false",this.measureUnit="",this.pixelPerUnitGroupMap=new Map,this._autoScaleGuard=!1,this._lastObservedWidth=0,N(this),h(this),ct(this,((t,e)=>{this.data=e||[]}),((t,e)=>{this.datasetMeta=e})),this.chartTemplate=this.chartTemplate.bind(this),this.errors=l(this),Et(this),this.componentStyle=v(this),this.t=ut(this).t,this.resolveInherited=Tt(this,[{propName:"scenarios",ancestorAttr:"title-scenarios"},{propName:"variances",ancestorAttr:"title-variances"},{propName:"order",ancestorAttr:"title-order"},{propName:"orderDirection",ancestorAttr:"title-order-direction"}])}componentWillLoad(){this.validateScenario(this.scenarios),this.validateVariances(this.variances),this.validateUnitScaling(this.unitScaling),this.validateLimit(this.limit),this.validateLevel(this.level),this.validateOrderDirection(this.orderDirection),this.validateOrderList(this.order),this.validateLeftSync(this.syncSpaceLeft),this.validateDateInterval(this.dateInterval),this.validateAxisLabelsMode(this.axisLabelsMode),this.validateLineFullWidth(this.lineFullWidth),this.validateShowCategories(this.showCategories),this.validateMeasureScale(this.measureScale),this.validateShowMeasureScale(this.showMeasureScale),this.validateShowOverlayAvg(this.showOverlayAvg),this.validateShowOverlayMedian(this.showOverlayMedian),this.validateChartMode(this.chartMode),this.validateMaxBars(this.maxBars),this.validateStack(this.stack),this.validateScaling(this.scale)}componentDidRender(){const{mode:t}=dt(this.scale);if("auto"!==t&&"empty"!==t){this._autoScaleGuard=!1;const t=ft(this.element),e="WARN_overflow";return void(t.width>0&&this.element.scrollWidth>t.width+1?this.errors.addOrReplace({id:e,type:"warning",message:"Chart exceeds available space and will be cut off. Check unit-scaling value."}):this.errors.remove(e))}if(this._autoScaleGuard)return void(this._autoScaleGuard=!1);const e=this.element,{width:i}=ft(e);if(i<=0)return;this._lastObservedWidth=i;const s=this.componentStyle((t=>{var e;return(null===(e=t.global)||void 0===e?void 0:e.fontSizePx)||13.3333})),n=e.scrollWidth,a=this.appliedScaleFactor;if(n<=i+1)return void this.errors.remove("AUTO_scale");const o=Math.max(.3,a*(i-1)/n);Math.abs(o-a)<.01||(e.style.setProperty("--bn-font-size",s*o+"px"),"empty"===t?this.errors.addOrReplace({id:"AUTO_scale",type:"warning",message:`Auto-scaled chart by factor ${o.toFixed(3)}`}):this.errors.remove("AUTO_scale"),this._autoScaleGuard=!0,r((()=>{this.appliedScaleFactor=o})))}componentDidLoad(){this.layoutObserver=St(this.element,(()=>{if(this._autoScaleGuard)return;const{width:t}=ft(this.element);t>0&&Math.abs(t-this._lastObservedWidth)>2&&(this._lastObservedWidth=t,n(this))})),requestAnimationFrame((()=>{requestAnimationFrame((()=>{if(this._autoScaleGuard)return;const{width:t}=ft(this.element);this._lastObservedWidth=t,n(this)}))}))}disconnectedCallback(){var t;null===(t=this.layoutObserver)||void 0===t||t.disconnect(),this.layoutObserver=null}prepareDimension(){const t=ft(this.element),e=this.prepareScenarios(),i=this.prepareVariances();return this.canvasWidthSegmented=t.width/(e.length+i.length||1),{width:this.canvasWidthSegmented,height:t.height}}prepareScenarios(){var t,e,i,s;const n=this.resolveInherited("scenarios",this.scenarios);if(void 0!==n)return this.errors.remove("AUTO_scenarios"),n.split(",").map((t=>t.trim()));const r="auto"===(null===(t=this.scenarios)||void 0===t?void 0:t.trim().toLowerCase());return _(this.scenarios)||r?(null===(i=null===(e=this.datasetMeta)||void 0===e?void 0:e.availableScenarios)||void 0===i?void 0:i.length)>0?(r?this.errors.remove("AUTO_scenarios"):this.errors.addOrReplace({id:"AUTO_scenarios",type:"warning",message:`scenarios: not set, auto-detected: ${this.datasetMeta.availableScenarios.join(",")}`}),this.datasetMeta.availableScenarios):[]:(this.errors.remove("AUTO_scenarios"),null===(s=this.scenarios)||void 0===s?void 0:s.split(",").map((t=>t.trim())))}prepareAvg(){return"true"===this.showOverlayAvg}prepareMedian(){return"true"===this.showOverlayMedian}prepareVariances(){var t;const e=this.resolveInherited("variances",this.variances);return void 0!==e?e.split(",").map((t=>t.trim())):_(this.variances)?[]:null===(t=this.variances)||void 0===t?void 0:t.split(",").map((t=>t.trim()))}prepareHideAxisLabels(t){return t>=1||"true"!==this.showCategories}prepareI18n(){const t=d,e=new Map([].map((t=>[t,this.t(".".concat(t))]))),i=new Map(t.map((t=>[t,this.t("global.".concat(t))])));return new Map([...i.entries(),...e.entries()])}preparePixelPerUnit(){var t;if(this.pixelPerUnitGroupMap.has(this.unitScaling))return this.errors.remove("AUTO_unitScaling"),this.pixelPerUnitGroupMap.get(this.unitScaling);if("auto"===(null===(t=this.unitScaling)||void 0===t?void 0:t.toString().trim().toLowerCase()))return this.errors.remove("AUTO_unitScaling"),0;const e=Number(this.unitScaling);return!isNaN(e)&&e>0?(this.errors.remove("AUTO_unitScaling"),e):(this.errors.addOrReplace({id:"AUTO_unitScaling",type:"warning",message:"unit-scaling: not set, auto-calculated to fit available space."}),0)}preparePixelPerPercentage(){var t;if(this.pixelPerUnitGroupMap.has(this.percentageScaling))return this.pixelPerUnitGroupMap.get(this.percentageScaling);if("auto"===(null===(t=this.percentageScaling)||void 0===t?void 0:t.toString().trim().toLowerCase()))return this.errors.remove("AUTO_percentageScaling"),0;const e=Number(this.percentageScaling);return!isNaN(e)&&e>0?(this.errors.remove("AUTO_percentageScaling"),100*e):(this.errors.addOrReplace({id:"AUTO_percentageScaling",type:"warning",message:"percentage-scaling: not set, auto-calculated to fit available space."}),0)}prepareLevel(){var t,e,i;const s="auto"===(null===(t=this.level)||void 0===t?void 0:t.trim().toLowerCase());return _(this.level)||s?(null===(e=this.datasetMeta)||void 0===e?void 0:e.suggestedLevel)?(s?this.errors.remove("AUTO_level"):this.errors.addOrReplace({id:"AUTO_level",type:"warning",message:`level: not set, auto-detected: ${this.datasetMeta.suggestedLevel}`}),Lt[this.datasetMeta.suggestedLevel.toUpperCase()]):void 0:(this.errors.remove("AUTO_level"),Lt[null===(i=this.level)||void 0===i?void 0:i.toUpperCase()])}prepareOrder(){var t,e,i;const s=this.resolveInherited("order",this.order),n=this.resolveInherited("orderDirection",this.orderDirection),r=null!=s?s:this.order,a=null!=n?n:this.orderDirection;let o=(_(this.level)||"auto"===(null===(t=this.level)||void 0===t?void 0:t.trim().toLowerCase()))&&(null===(e=this.datasetMeta)||void 0===e?void 0:e.suggestedLevel)?this.datasetMeta.suggestedLevel:this.level;const h="auto"===(null==r?void 0:r.trim().toLowerCase());return _(r)||h?(null===(i=this.datasetMeta)||void 0===i?void 0:i.suggestedLevel)&&(h?this.errors.remove("AUTO_order"):this.errors.addOrReplace({id:"AUTO_order",type:"warning",message:`order: not set, auto-detected: ${o}`})):(this.errors.remove("AUTO_order"),"levelindex"===(null==r?void 0:r.toLocaleLowerCase())&&(o+="Index")),{hierarchy:[I[null==o?void 0:o.toUpperCase()]],direction:L[null==a?void 0:a.toUpperCase()]}}prepareStyle(){const t=this.getEffectiveScaleFactor();return this.componentStyle((e=>{const i=e.global.fontSizePx*t;return{scaleFactors:{scenarioOffset:e["bn-chart-time"].scaleFactors.scenarioOffset,scenarioLabelToColumn:e["bn-chart-time"].scaleFactors.scenarioLabelToColumn,labelToColumn:.3,labelToColum:e["bn-chart-time"].scaleFactors.labelToColum,labelToAxis:e["bn-chart-time"].scaleFactors.labelToAxis,needleWidth:e["bn-chart-time"].scaleFactors.needleWidth,needleHeadWidth:e["bn-chart-time"].scaleFactors.needleHeadWidth,columnWidth:e["bn-chart-time"].scaleFactors.columnWidth,varianceAxisLineWidth:e["bn-chart-time"].scaleFactors.varianceAxisLineWidth,axisLineWidth:e["bn-chart-time"].scaleFactors.axisLineWidth,auxiliaryLineWidth:e["bn-chart-time"].scaleFactors.auxiliaryLineWidth,scenarioLineWidth:e["bn-chart-time"].scaleFactors.scenarioLineWidth,markerWidth:e["bn-chart-time"].scaleFactors.markerWidth,markerOffset:e["bn-chart-time"].scaleFactors.markerOffset,categoryWidth:e["bn-chart-time"].scaleFactors.categoryWidth,axisTickLength:e["bn-chart-time"].scaleFactors.axisTickLength},fontStyles:{font:`${i}px ${e.global.fontFamily}`,size:i,color:e.global.fontColor,background:e.global.fontBackgroundColor,leading:1.8},axisStyles:e["bn-chart-time"].axisStyles,barStyles:e["bn-chart-time"].barStyles,varianceStyles:e["bn-chart-time"].varianceStyles,stackColors:e["bn-chart-time"].stackColors,padding:e["bn-chart-time"].padding,pattern:null}}))}prepareLeftSideOffset(t,e){return this.syncSpaceLeft>-1?this.syncSpaceLeft:Mt.getMaxWidthOfArrayItems([...this.prepareVariances(),...this.prepareScenarios(),this.chartTitle],t,e)}prepareChartTitle(t){return t>=1?"":this.chartTitle}prepareLimit(){return Math.floor(Number(this.limit)||0)}prepareDateInterval(){var t,e,i;const s="auto"===(null===(t=this.dateInterval)||void 0===t?void 0:t.trim().toLowerCase());return _(this.dateInterval)||s?(null===(e=this.datasetMeta)||void 0===e?void 0:e.suggestedDateInterval)?(s?this.errors.remove("AUTO_dateInterval"):this.errors.addOrReplace({id:"AUTO_dateInterval",type:"warning",message:`dateInterval: not set, auto-detected: ${this.datasetMeta.suggestedDateInterval}`}),P[this.datasetMeta.suggestedDateInterval.toUpperCase()]):s?P.AUTO:void 0:(this.errors.remove("AUTO_dateInterval"),P[null===(i=this.dateInterval)||void 0===i?void 0:i.toUpperCase()])}prepareIntervalSpanLimit(){return this.intervalSpanLimit}prepareAxisLabelsMode(){var t;return U[null===(t=this.axisLabelsMode)||void 0===t?void 0:t.toUpperCase()]}prepareFilter(){return 0===this.filter.length?"":this.filter}getDataStructure(){return{ITimeChartDataRow:{setName:{type:"string",isOptional:!1,description:""},date:{type:"string",isOptional:!1,description:""},operation:{type:"string",isOptional:!1,description:""},rowGroup:{type:"string",isOptional:!1,description:""},rowGroupIndex:{type:"number",isOptional:!1,description:""},category:{type:"string",isOptional:!1,description:""},categoryIndex:{type:"number",isOptional:!1,description:""},subCategory:{type:"string",isOptional:!1,description:""},subCategoryIndex:{type:"number",isOptional:!1,description:""},columnGroup:{type:"string",isOptional:!1,description:""},columnGroupIndex:{type:"number",isOptional:!1,description:""},columnSubGroup:{type:"string",isOptional:!1,description:""},columnSubGroupIndex:{type:"number",isOptional:!1,description:""},ac1:{type:"number",isOptional:!1,description:""},ac2:{type:"number",isOptional:!1,description:""},ac3:{type:"number",isOptional:!1,description:""},ac4:{type:"number",isOptional:!1,description:""},pp1:{type:"number",isOptional:!1,description:""},pp2:{type:"number",isOptional:!1,description:""},pp3:{type:"number",isOptional:!1,description:""},pp4:{type:"number",isOptional:!1,description:""},fc1:{type:"number",isOptional:!1,description:""},fc2:{type:"number",isOptional:!1,description:""},fc3:{type:"number",isOptional:!1,description:""},fc4:{type:"number",isOptional:!1,description:""},pl1:{type:"number",isOptional:!1,description:""},pl2:{type:"number",isOptional:!1,description:""},pl3:{type:"number",isOptional:!1,description:""},pl4:{type:"number",isOptional:!1,description:""}}}}prepareMeasureScale(){return _(this.measureScale)?"GREATEST":["_","k","M","G","T","P","E","Z","Y","m","μ","n","p","P","f","a","z","y"].includes(this.measureScale.trim())||"LEAST"===this.measureScale.trim().toUpperCase()?this.measureScale.trim():"GREATEST"}prepareShowMeasureScale(t){return 0===t&&"true"===this.showMeasureScale}prepareMeasureUnit(){return""===this.measureUnit||null==this.measureUnit?"":this.measureUnit}prepareStackConfig(){if(_(this.stack))return this.errors.remove("WARN_stack_dimensions_scenarios"),null;try{const t=JSON.parse(this.stack),e=t.by,i="WARN_stack_dimensions_scenarios";if(e===k.DIMENSIONS){const t=this.prepareScenarios();t.length>1?this.errors.addOrReplace({id:i,type:"warning",message:`stack by dimensions: only the first scenario "${t[0]}" is used, the rest (${t.slice(1).join(", ")}) are discarded.`}):this.errors.remove(i)}else this.errors.remove(i);return{by:e,mode:t.mode||$.ABSOLUTE,order:t.order||M.DATASET}}catch(t){return this.errors.remove("WARN_stack_dimensions_scenarios"),null}}prepareLineFullWidth(){return"true"===this.lineFullWidth}prepareChartMode(){var t;const e=null===(t=this.chartMode)||void 0===t?void 0:t.toLowerCase();return"line"===e?G.LINE:"auto"===e?G.AUTO:G.BAR}prepareMaxBars(){return Math.floor(Number(this.maxBars)||28)}chartTemplate(t,i){const s=this.prepareI18n(),n=this.prepareStyle(),r=ft(this.element).width,a=this.getEffectiveScaleFactor(),o=this.preparePixelPerUnit(),h=this.preparePixelPerPercentage(),l=this.prepareStackConfig(),c=this.prepareScenarios(),u=(null==l?void 0:l.by)===k.DIMENSIONS?c.slice(0,1):c;return e("ibcs-chart-time",{data:this.data,chartTitle:this.prepareChartTitle(i),scenarios:u,variances:[t],hideAxisLabels:this.prepareHideAxisLabels(i),pixelPerUnit:o>0?o*a:0,pixelPerPercentage:h>0?h*a:0,limit:this.prepareLimit(),leftSideOffsetForHorizontalSync:this.prepareLeftSideOffset(s,n),styles:n,i18n:s,order:this.prepareOrder(),level:this.prepareLevel(),dateInterval:this.prepareDateInterval(),intervalSpanLimit:this.prepareIntervalSpanLimit(),axisLabelsMode:this.prepareAxisLabelsMode(),filter:this.prepareFilter(),"measure-scale":this.prepareMeasureScale(),"measure-unit":this.prepareMeasureUnit(),showOverlayAvg:this.prepareAvg(),showOverlayMedian:this.prepareMedian(),showMeasureScale:this.prepareShowMeasureScale(i),chartMode:this.prepareChartMode(),maxBars:this.prepareMaxBars(),stackConfig:l,lineFullWidth:this.prepareLineFullWidth(),containerWidth:r,parentDimensions:this.prepareDimension()})}getEffectiveScaleFactor(){const{mode:t,factor:e}=dt(this.scale);return"factor"===t?e:"auto"===t||"empty"===t?this.appliedScaleFactor:1}getFontStyles(){const t=this.getEffectiveScaleFactor();return this.componentStyle((e=>{var i,s,n,r;const a=(null===(i=e.global)||void 0===i?void 0:i.fontSizePx)||13.3333;return{"--bn-font-family":(null===(s=e.global)||void 0===s?void 0:s.fontFamily)||"'Noto Sans', sans-serif","--bn-font-size":a*t+"px","--bn-font-color":(null===(n=e.global)||void 0===n?void 0:n.fontColor)||"#000000","--bn-font-background":(null===(r=e.global)||void 0===r?void 0:r.fontBackgroundColor)||"#ffffff"}}))}render(){let t=[""];const s=this.prepareVariances();s.length>0&&(t=[...t,...s]);const n=this.getFontStyles();return e(i,{key:"b061b712f63444756de97d0e393ae6a5add489de",style:n},e("div",{key:"8fadffb1b89d6dd3588028cb500f844a4ff8c5fa",class:"container"},t.map(this.chartTemplate)))}get element(){return s(this)}static get watchers(){return{scenarios:[{validateScenario:0}],variances:[{validateVariances:0}],syncSpaceLeft:[{validateLeftSync:0}],limit:[{validateLimit:0}],unitScaling:[{validateUnitScaling:0}],percentageScaling:[{validatePercentageScaling:0}],level:[{validateLevel:0}],order:[{validateOrderList:0}],orderDirection:[{validateOrderDirection:0}],dateInterval:[{validateDateInterval:0}],chartMode:[{validateChartMode:0}],maxBars:[{validateMaxBars:0}],stack:[{validateStack:0}],scale:[{validateScaling:0}],axisLabelsMode:[{validateAxisLabelsMode:0}],lineFullWidth:[{validateLineFullWidth:0}],showCategories:[{validateShowCategories:0}],measureScale:[{validateMeasureScale:0}],showMeasureScale:[{validateShowMeasureScale:0}],showOverlayAvg:[{validateShowOverlayAvg:0}],showOverlayMedian:[{validateShowOverlayMedian:0}]}}};$t.style=":host{display:inline-block;position:relative;overflow:hidden}.container{display:flex;flex-direction:column-reverse}.background-image{display:flex;flex-wrap:wrap;justify-content:flex-end}";const xt=class{constructor(e){t(this,e),this.name="_default",h(this),this.errors=l(this),b(this,(t=>{this.stores||(this.stores=u(this.element));try{const e=JSON.parse(t);this.stores.componentStyles.set(this.name,e),this.errors.remove("JSON_PARSE")}catch(t){this.errors.addOrReplace({id:"JSON_PARSE",type:"error",message:`bn-component-style: Failed to parse JSON body — ${t.message}`}),console.error(t)}}))}render(){return e(i,{key:"e9298c6ce5b0b51260165e78dcf19efdef0646f9"})}get element(){return s(this)}};xt.style="bn-component-style{display:none}";const Dt=class{constructor(e){t(this,e),this.currentPageUpdate=void 0,h(this),this.errors=l(this)}setLocale(t){this.stores.context.state.locale=t}connectedCallback(){this.stores=p(this.element),this.locale&&(this.stores.context.state.locale=this.locale),this.currentPageUpdate=setTimeout((()=>{this.element.querySelectorAll("bn-page, bn-layout-page").forEach(((t,e)=>{if("bn-layout-page"===t.localName)t.setAttribute("page-number",(e+1).toString());else{const i=t.querySelector("bn-footer");i&&i.setAttribute("page-number",(e+1).toString())}}))}),250)}disconnectedCallback(){this.currentPageUpdate&&clearTimeout(this.currentPageUpdate)}componentWillLoad(){}componentDidLoad(){}componentShouldUpdate(){}componentWillRender(){}componentDidRender(){}componentWillUpdate(){}componentDidUpdate(){}render(){return e(i,{key:"b92019b909e271225baca2cf740c8301e324164e"},e("slot",{key:"87bac4bb29bca32d961afe31355dc1bd48fff0f8"}))}get element(){return s(this)}static get watchers(){return{locale:[{setLocale:0}]}}};Dt.style=":host{display:block}";const Pt=["ac1","ac2","ac3","ac4","pp1","pp2","pp3","pp4","fc1","fc2","fc3","fc4","pl1","pl2","pl3","pl4"],Ut=["rowGroup","category","subCategory","columnGroup","columnSubGroup"];function Gt(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}function Ft(t){const e=Array.from(t);return{distinctValues:e,count:e.length,hasData:e.length>0}}var Bt,jt,Ht,Vt={exports:{}},qt=(Bt||(Bt=1,Ht=Vt.exports,(jt=Vt).exports=function(){let t=function(e,i,s,n){if(i=i||[],"function"!=typeof importScripts&&t.webworker){var r=t.lastid++;return t.buffer[r]=s,void t.webworker.postMessage({id:r,sql:e,params:i})}return 0===arguments.length?new U.Select({columns:[new U.Column({columnid:"*"})],from:[new U.ParamValue({param:0})]}):1===arguments.length&&e.constructor===Array?t.promise(e):("function"==typeof i&&(n=s,s=i,i=[]),"object"!=typeof i&&(i=[i]),"string"==typeof e&&"#"===e[0]&&"object"==typeof document?e=document.querySelector(e).textContent:"object"==typeof e&&e instanceof HTMLElement?e=e.textContent:"function"==typeof e&&(e=e.toString(),e=(/\/\*([\S\s]+)\*\//m.exec(e)||["","Function given as SQL. Plese Provide SQL string or have a /* ... */ syle comment with SQL in the function."])[1]),t.exec(e,i,s,n))};t.version="4.16.0",t.build="develop-42f0e181",t.debug=void 0;var e=function(){return null},i=function(){var e=function(t,e,i,s){for(i=i||{},s=t.length;s--;i[t[s]]=e);return i},i=[2,17],s=[1,112],n=[1,106],r=[1,107],a=[1,108],o=[1,109],h=[1,110],c=[1,111],u=[1,6],f=[1,42],d=[1,80],p=[1,103],b=[1,77],v=[1,97],E=[1,96],m=[1,69],g=[1,105],w=[1,86],y=[1,64],T=[1,71],S=[1,85],A=[1,66],O=[1,70],R=[1,68],N=[1,61],_=[1,74],C=[1,62],L=[1,67],I=[1,84],k=[1,78],M=[1,87],$=[1,88],x=[1,99],D=[1,82],P=[1,83],U=[1,81],G=[1,89],F=[1,90],B=[1,91],j=[1,92],H=[1,93],V=[1,94],q=[1,95],Y=[1,101],W=[1,65],X=[1,79],z=[1,72],J=[1,100],K=[1,63],Q=[1,73],Z=[1,116],tt=[1,115],et=[14,339,639,798],it=[14,339,343,639,798],st=[1,123],nt=[1,125],rt=[1,124],at=[1,126],ot=[1,127],ht=[1,128],lt=[1,129],ct=[139,388,447],ut=[1,137],ft=[1,136],dt=[1,144],pt=[1,174],bt=[1,189],vt=[1,192],Et=[1,185],mt=[1,195],gt=[1,199],wt=[1,170],yt=[1,196],Tt=[1,181],St=[1,183],At=[1,188],Ot=[1,197],Rt=[1,186],Nt=[1,214],_t=[1,215],Ct=[1,187],Lt=[1,176],It=[1,177],kt=[1,207],Mt=[1,202],$t=[1,203],xt=[1,179],Dt=[1,208],Pt=[1,209],Ut=[1,210],Gt=[1,211],Ft=[1,212],Bt=[1,213],jt=[1,216],Ht=[1,217],Vt=[1,190],qt=[1,191],Yt=[1,193],Wt=[1,194],Xt=[1,200],zt=[1,206],Jt=[1,198],Kt=[1,201],Qt=[1,184],Zt=[1,182],te=[1,205],ee=[1,218],ie=[2,4,5,6,7,8,9,152,161,190,335],se=[2,499],ne=[1,222],re=[1,227],ae=[1,236],oe=[1,234],he=[14,76,83,103,108,127,137,171,177,178,192,207,252,271,273,339,343,503,639,798],le=[1,241],ce=[14,76,83,127,271,273,339,343,503,639,798],ue=[2,248],fe=[1,244],de=[1,246],pe=[1,245],be=[2,4,5,6,7,8,9,14,76,81,82,83,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,192,194,196,207,266,267,304,313,314,315,316,317,318,319,320,339,343,457,461,503,639,798],ve=[2,4,5,6,7,8,9,14,57,76,78,81,82,83,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],Ee=[1,273],me=[1,280],ge=[1,281],we=[1,286],ye=[1,291],Te=[1,296],Se=[1,295],Ae=[2,4,5,6,7,8,9,14,76,82,83,103,108,116,127,137,140,141,146,152,154,158,161,163,165,171,177,178,188,189,190,192,207,229,252,266,267,271,273,281,292,293,294,298,299,301,304,313,314,315,316,317,318,319,320,322,323,324,325,326,327,328,329,330,331,332,335,336,339,343,345,350,457,461,503,639,798],Oe=[2,172],Re=[1,307],Ne=[14,78,83,339,343,466,639,798],_e=[2,4,5,6,7,8,9,14,57,76,78,81,82,83,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,202,207,215,217,242,243,244,245,246,247,248,249,250,251,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,330,333,335,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,378,379,391,403,404,407,408,423,426,433,437,438,439,440,441,442,443,445,446,454,455,457,461,463,466,471,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,552,553,554,555,639,798],Ce=[2,4,5,6,7,8,9,14,57,76,82,96,133,155,165,198,294,295,322,339,368,372,373,433,437,438,441,443,445,446,454,455,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,545,546,555,639,798],Le=[1,595],Ie=[1,597],ke=[1,598],Me=[2,4,5,6,7,8,9],$e=[2,531],xe=[1,604],De=[1,615],Pe=[1,618],Ue=[1,619],Ge=[14,82,83,96,141,146,155,198,329,339,343,509,639,798],Fe=[14,78,339,343,639,798],Be=[2,602],je=[1,637],He=[2,4,5,6,7,8,9,165],Ve=[1,675],qe=[1,647],Ye=[1,681],We=[1,682],Xe=[1,655],ze=[1,666],Je=[1,653],Ke=[1,661],Qe=[1,654],Ze=[1,662],ti=[1,664],ei=[1,656],ii=[1,657],si=[1,676],ni=[1,673],ri=[1,674],ai=[1,650],oi=[1,652],hi=[1,644],li=[1,645],ci=[1,646],ui=[1,648],fi=[1,649],di=[1,651],pi=[1,658],bi=[1,659],vi=[1,663],Ei=[1,665],mi=[1,667],gi=[1,668],wi=[1,669],yi=[1,670],Ti=[1,671],Si=[1,677],Ai=[1,678],Oi=[1,679],Ri=[1,680],Ni=[1,690],_i=[1,687],Ci=[2,4,5,6,7,8,9,14,57,76,78,81,83,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],Li=[2,298],Ii=[2,4,5,6,7,8,9,14,57,76,78,81,82,83,96,103,105,108,109,116,121,124,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],ki=[2,296],Mi=[2,297],$i=[2,4,5,6,7,8,9,14,57,76,78,81,82,83,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,250,251,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,330,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,378,391,403,404,407,408,433,437,438,441,443,445,446,454,455,457,461,463,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],xi=[2,380],Di=[2,4,5,6,7,8,9,14,57,76,78,81,82,83,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,250,251,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,330,333,335,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,378,379,391,403,404,407,408,433,437,438,441,443,445,446,454,455,457,461,463,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],Pi=[1,706],Ui=[1,716],Gi=[2,4,5,6,7,8,9,14,57,76,78,81,82,83,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,250,251,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,463,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],Fi=[1,733],Bi=[1,735],ji=[1,736],Hi=[1,726],Vi=[1,744],qi=[1,743],Yi=[2,4,5,6,7,8,9,14,76,78,83,103,108,127,137,171,177,178,215,217,242,243,244,245,246,247,248,249,250,251,252,271,273,339,343,503,639,798],Wi=[14,76,78,83,103,108,127,137,171,177,178,215,217,242,243,244,245,246,247,248,249,250,251,252,271,273,339,343,503,639,798],Xi=[1,760],zi=[2,203],Ji=[1,769],Ki=[14,76,83,103,108,127,137,171,177,178,192,252,271,273,339,343,503,639,798],Qi=[2,173],Zi=[1,772],ts=[2,4,5,6,7,8,9,121,229,281],es=[14,76,83,271,273,339,343,503,639,798],is=[2,260],ss=[1,776],ns=[82,198],rs=[1,795],as=[1,814],os=[1,794],hs=[1,793],ls=[1,788],cs=[1,789],us=[1,791],fs=[1,792],ds=[1,796],ps=[1,797],bs=[1,798],vs=[1,799],Es=[1,800],ms=[1,801],gs=[1,802],ws=[1,803],ys=[1,804],Ts=[1,805],Ss=[1,806],As=[1,807],Os=[1,808],Rs=[1,809],Ns=[1,810],_s=[1,811],Cs=[1,813],Ls=[1,815],Is=[1,816],ks=[1,817],Ms=[1,818],$s=[1,819],xs=[1,820],Ds=[1,821],Ps=[1,824],Us=[1,825],Gs=[1,826],Fs=[1,827],Bs=[1,828],js=[1,829],Hs=[1,830],Vs=[1,831],qs=[1,832],Ys=[1,833],Ws=[1,835],Xs=[1,836],zs=[1,834],Js=[78,82,96,198],Ks=[14,82,96,137,152,154,155,158,161,190,198,335,339,343,378,379,457,461,503,639,798],Qs=[14,78,83,163,196,250,330,339,343,378,391,403,404,407,408,639,798],Zs=[1,855],tn=[14,78,83,333,339,343,639,798],en=[1,856],sn=[1,863],nn=[1,864],rn=[1,868],an=[14,78,83,339,343,639,798],on=[2,4,5,6,7,8,9,82,140,141,146,152,154,158,161,163,165,188,189,190,229,266,267,281,292,293,294,298,299,301,304,313,314,315,316,317,318,319,320,322,323,324,325,326,327,328,329,330,331,332,335,336,345,350,457,461],hn=[14,76,83,103,108,116,127,137,171,177,178,192,207,252,271,273,339,343,503,639,798],ln=[2,4,5,6,7,8,9,14,76,82,83,103,108,116,127,137,140,141,146,152,154,158,161,163,165,171,173,177,178,188,189,190,192,194,196,204,207,229,252,266,267,271,273,281,292,293,294,298,299,301,304,313,314,315,316,317,318,319,320,322,323,324,325,326,327,328,329,330,331,332,335,336,339,343,345,350,457,461,503,639,798],cn=[2,4,5,6,7,8,9,141,329],un=[1,905],fn=[14,78,81,83,339,343,639,798],dn=[2,780],pn=[14,78,81,83,141,148,150,154,161,339,343,457,461,639,798],bn=[2,1235],vn=[14,78,81,83,148,150,154,161,339,343,457,461,639,798],En=[14,78,81,83,148,150,154,339,343,457,461,639,798],mn=[14,78,83,148,150,339,343,639,798],gn=[14,82,83,96,141,155,198,329,339,343,509,639,798],wn=[368,372,373],yn=[2,806],Tn=[1,930],Sn=[1,931],An=[1,932],On=[1,933],Rn=[1,942],Nn=[1,941],_n=[2,759],Cn=[1,945],Ln=[173,175,367],In=[2,465],kn=[1,999],Mn=[2,4,5,6,7,8,9,82,140,165,293,322,323,324,325,326],$n=[1,1017],xn=[1,1016],Dn=[2,4,5,6,7,8,9,14,57,76,78,81,82,83,96,103,105,108,109,116,121,127,131,133,137,138,139,140,141,143,144,146,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,346,347,348,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],Pn=[2,4,5,6,7,8,9,14,57,76,78,81,82,83,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,345,346,347,348,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],Un=[2,396],Gn=[1,1028],Fn=[339,341,343],Bn=[78,333],jn=[78,333,463],Hn=[1,1036],Vn=[2,4,5,6,7,8,9,14,57,76,78,81,82,83,96,103,105,108,109,116,121,124,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,463,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],qn=[78,463],Yn=[1,1055],Wn=[1,1054],Xn=[1,1062],zn=[14,76,83,103,108,127,137,171,177,178,252,271,273,339,343,503,639,798],Jn=[2,183],Kn=[1,1075],Qn=[1,1085],Zn=[14,76,83,339,343,503,639,798],tr=[2,271],er=[1,1088],ir=[1,1089],sr=[1,1098],nr=[1,1099],rr=[1,1100],ar=[2,4,5,6,7,8,9,14,76,78,81,82,83,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,207,266,267,304,313,314,315,316,317,318,319,320,339,343,457,461,503,639,798],or=[1,1153],hr=[1,1152],lr=[1,1167],cr=[1,1166],ur=[1,1174],fr=[14,76,78,83,103,108,116,127,137,171,177,178,192,207,252,271,273,339,343,503,639,798],dr=[14,76,83,127,171,177,178,271,273,339,343,503,639,798],pr=[2,83],br=[2,345],vr=[1,1192],Er=[1,1208],mr=[14,82,83,96,155,198,339,343,509,639,798],gr=[1,1228],wr=[1,1227],yr=[1,1226],Tr=[2,4,5,6,7,8,9,14,57,76,78,81,82,83,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,250,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,330,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,378,391,403,404,407,408,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],Sr=[1,1243],Ar=[2,4,5,6,7,8,9,14,57,76,78,81,82,83,96,103,105,108,109,116,121,127,131,133,137,138,139,140,141,143,144,146,148,149,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,346,347,348,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],Or=[2,4,5,6,7,8,9,14,57,76,78,81,82,83,96,103,105,108,109,116,121,127,131,133,137,138,139,140,141,143,144,146,148,149,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,346,348,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],Rr=[2,4,5,6,7,8,9,14,57,76,78,81,82,83,96,103,105,108,109,116,121,127,131,133,137,138,139,140,141,142,143,144,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,346,347,348,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],Nr=[2,4,5,6,7,8,9,14,57,76,78,81,82,83,96,103,105,108,109,116,121,127,131,133,137,138,139,140,141,143,144,146,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,346,347,348,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],_r=[2,4,5,6,7,8,9,14,57,76,78,81,82,83,96,103,105,108,109,116,127,131,133,137,138,139,140,141,143,144,146,148,149,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,347,353,354,355,356,357,358,359,363,364,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],Cr=[2,427],Lr=[2,4,5,6,7,8,9,14,57,76,78,81,82,83,96,103,105,108,116,127,131,137,138,139,140,141,143,144,146,152,154,155,157,158,159,161,165,171,173,175,177,178,179,180,181,182,184,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,347,363,364,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],Ir=[2,317],kr=[9,83],Mr=[2,349],$r=[1,1261],xr=[2,293],Dr=[2,4,5,6,7,8,9,14,57,76,78,81,82,83,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,463,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],Pr=[14,83,339,343,639,798],Ur=[1,1287],Gr=[14,82,83,152,154,161,190,335,339,343,457,461,503,639,798],Fr=[14,78,83,339,341,343,503,639,798],Br=[1,1305],jr=[1,1308],Hr=[2,1143],Vr=[14,76,83,127,137,171,177,178,252,271,273,339,343,503,639,798],qr=[1,1314],Yr=[1,1315],Wr=[14,76,78,83,103,108,127,137,171,177,178,192,207,252,271,273,339,343,503,639,798],Xr=[2,4,5,6,7,8,9,76,81,82,83,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,194,196,266,267,304,313,314,315,316,317,318,319,320,457,461],zr=[2,4,5,6,7,8,9,76,78,81,82,83,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,194,196,266,267,304,313,314,315,316,317,318,319,320,457,461],Jr=[2,1137],Kr=[2,4,5,6,7,8,9,76,78,81,82,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,194,196,266,267,304,313,314,315,316,317,318,319,320,457,461],Qr=[1,1366],Zr=[14,76,78,83,103,108,127,137,171,177,178,215,217,242,243,244,245,246,247,248,249,252,271,273,339,343,503,639,798],ta=[2,515],ea=[1,1369],ia=[14,78,83,137,339,341,343,503,639,798],sa=[124,125,133],na=[2,619],ra=[1,1399],aa=[81,148],oa=[2,766],ha=[1,1416],la=[1,1417],ca=[2,4,5,6,7,8,9,14,57,76,81,82,96,133,155,165,198,250,294,295,322,339,343,368,372,373,433,437,438,441,443,445,446,454,455,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,545,546,555,639,798],ua=[1,1446],fa=[2,351],da=[1,1463],pa=[78,83],ba=[1,1472],va=[14,339,341,343,503,639,798],Ea=[14,76,83,127,171,177,178,252,271,273,339,343,503,639,798],ma=[2,234],ga=[1,1482],wa=[1,1486],ya=[1,1490],Ta=[1,1491],Sa=[1,1493],Aa=[1,1494],Oa=[1,1495],Ra=[1,1496],Na=[1,1497],_a=[1,1498],Ca=[1,1499],La=[1,1500],Ia=[1,1507],ka=[9,14,76,78,83,271,273,339,343,503,639,798],Ma=[1,1531],$a=[83,127],xa=[2,236],Da=[1,1627],Pa=[1,1643],Ua=[1,1645],Ga=[2,4,5,6,7,8,9,82,152,154,161,165,190,293,322,323,324,325,326,335,457,461],Fa=[1,1684],Ba=[1,1686],ja=[1,1687],Ha=[1,1683],Va=[1,1682],qa=[1,1681],Ya=[1,1688],Wa=[1,1678],Xa=[1,1679],za=[1,1680],Ja=[1,1710],Ka=[2,4,5,6,7,8,9,14,57,76,82,96,133,155,165,198,294,295,322,339,343,368,372,373,433,437,438,441,443,445,446,454,455,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,545,546,555,639,798],Qa=[1,1733],Za=[1,1732],to=[1,1788],eo=[1,1789],io=[1,1787],so=[1,1803],no=[1,1805],ro=[1,1802],ao=[1,1804],oo=[196,202,403,404,407],ho=[2,543],lo=[1,1810],co=[1,1827],uo=[1,1849],fo=[1,1856],po=[14,76,78,83,127,171,177,178,259,271,273,339,343,503,639,798],bo=[4,14,269,339,343,378,391,639,798],vo=[2,246],Eo=[1,1893],mo=[14,76,83,339,343,452,503,639,798],go=[14,78,83,163,196,330,339,343,378,391,403,404,407,408,639,798],wo=[2,549],yo=[1,1909],To=[1,1959],So=[1,1958],Ao=[1,1980],Oo=[1,1991],Ro=[1,1990],No=[1,1992],_o=[1,1993],Co=[1,2e3],Lo=[1,2017],Io=[14,78,83,250,339,343,639,798],ko={trace:function(){},yy:{},symbols_:{error:2,Literal:3,LITERAL:4,BRALITERAL:5,KEY:6,OPEN:7,CLOSE:8,SEPARATOR:9,NonReserved:10,LiteralWithSpaces:11,main:12,Statements:13,EOF:14,Statements_group0:15,AStatement:16,ExplainStatement:17,EXPLAIN:18,QUERY:19,PLAN:20,Statement:21,AlterTable:22,AttachDatabase:23,Call:24,CreateDatabase:25,CreateIndex:26,CreateGraph:27,CreateTable:28,CreateView:29,CreateEdge:30,CreateVertex:31,Declare:32,Delete:33,DetachDatabase:34,DropDatabase:35,DropIndex:36,DropTable:37,DropView:38,If:39,Insert:40,Merge:41,Reindex:42,RenameTable:43,Select:44,ShowCreateTable:45,ShowColumns:46,ShowDatabases:47,ShowIndex:48,ShowTables:49,TruncateTable:50,WithSelect:51,CreateTrigger:52,DropTrigger:53,BeginTransaction:54,CommitTransaction:55,RollbackTransaction:56,EndTransaction:57,UseDatabase:58,Update:59,JavaScript:60,Source:61,Assert:62,While:63,Continue:64,Break:65,BeginEnd:66,Print:67,Require:68,SetVariable:69,ExpressionStatement:70,AddRule:71,Query:72,Echo:73,CreateFunction:74,CreateAggregate:75,WITH:76,WithTablesList:77,COMMA:78,WithTable:79,RECURSIVE:80,AS:81,LPAR:82,RPAR:83,ColumnsList:84,SelectClause:85,Select_option0:86,IntoClause:87,FromClause:88,Select_option1:89,WhereClause:90,GroupClause:91,UnionClause:92,OrderClause:93,LimitClause:94,ParenthesizedSelect:95,SEARCH:96,Select_repetition0:97,Select_option2:98,SelectWithoutOrderOrLimit:99,SelectWithoutOrderOrLimit_option0:100,SelectWithoutOrderOrLimit_option1:101,PivotClause:102,PIVOT:103,Expression:104,FOR:105,PivotClause_option0:106,PivotClause_option1:107,UNPIVOT:108,IN:109,PivotClause_option2:110,PivotClause2:111,AsList:112,AsLiteral:113,AsPart:114,RemoveClause:115,REMOVE:116,RemoveClause_option0:117,RemoveColumnsList:118,RemoveColumn:119,Column:120,LIKE:121,StringValue:122,ArrowDot:123,ARROW:124,DOT:125,SearchSelector:126,ORDER:127,BY:128,OrderExpressionsList:129,SearchSelector_option0:130,DOTDOT:131,CARET:132,EQ:133,SearchSelector_repetition_plus0:134,SearchSelector_repetition_plus1:135,SearchSelector_option1:136,WHERE:137,OF:138,CLASS:139,NUMBER:140,STRING:141,SLASH:142,VERTEX:143,EDGE:144,EXCLAMATION:145,SHARP:146,MODULO:147,GT:148,LT:149,GTGT:150,LTLT:151,DOLLAR:152,Json:153,AT:154,SET:155,SetColumnsList:156,TO:157,VALUE:158,ROW:159,ExprList:160,COLON:161,PlusStar:162,NOT:163,SearchSelector_repetition2:164,IF:165,SearchSelector_repetition3:166,Aggregator:167,SearchSelector_repetition4:168,SearchSelector_group0:169,SearchSelector_repetition5:170,UNION:171,SearchSelectorList:172,ALL:173,SearchSelector_repetition6:174,ANY:175,SearchSelector_repetition7:176,INTERSECT:177,EXCEPT:178,AND:179,OR:180,PATH:181,RETURN:182,ResultColumns:183,REPEAT:184,SearchSelector_repetition8:185,SearchSelectorList_repetition0:186,SearchSelectorList_repetition1:187,PLUS:188,STAR:189,QUESTION:190,SearchFrom:191,FROM:192,SelectModifier:193,DISTINCT:194,TopClause:195,UNIQUE:196,SelectClause_option0:197,SELECT:198,COLUMN:199,MATRIX:200,TEXTSTRING:201,INDEX:202,RECORDSET:203,TOP:204,NumValue:205,TopClause_option0:206,INTO:207,Table:208,FuncValue:209,ParamValue:210,VarValue:211,FromTablesList:212,JoinTablesList:213,ApplyClause:214,CROSS:215,APPLY:216,OUTER:217,FromTable:218,FromTable_option0:219,FromTable_option1:220,FromTable_option2:221,FromTable_option3:222,INDEXED:223,FromTable_option4:224,FromTable_option5:225,FromTable_option6:226,FromString:227,FromTable_option7:228,INSERTED:229,FromTableAlias:230,TargetTable:231,JoinTable:232,JoinMode:233,JoinTableAs:234,OnClause:235,JoinTableAs_option0:236,JoinTableAs_option1:237,JoinTableAs_option2:238,JoinTableAs_option3:239,JoinTableAs_option4:240,JoinModeMode:241,NATURAL:242,JOIN:243,INNER:244,LEFT:245,RIGHT:246,FULL:247,SEMI:248,ANTI:249,ON:250,USING:251,GROUP:252,GroupExpressionsList:253,HavingClause:254,ROLLUP:255,CUBE:256,GroupExpression:257,GROUPING:258,HAVING:259,UnionOp:260,UnionableSelect:261,CORRESPONDING:262,OrderExpression:263,NullsOrder:264,NULLS:265,FIRST:266,LAST:267,DIRECTION:268,COLLATE:269,NOCASE:270,LIMIT:271,OffsetClause:272,OFFSET:273,LimitClause_option0:274,FETCH:275,LimitClause_option1:276,LimitClause_option2:277,LimitClause_option3:278,ResultColumn:279,Star:280,DELETED:281,AggrValue:282,Op:283,LogicValue:284,NullValue:285,ExistsValue:286,CaseValue:287,CastClause:288,ArrayValue:289,NewClause:290,Expression_group0:291,CURRENT_TIMESTAMP:292,CURRENT_DATE:293,JAVASCRIPT:294,CREATE:295,FUNCTION:296,AGGREGATE:297,NEW:298,CAST:299,ColumnType:300,CONVERT:301,PrimitiveValue:302,OverClause:303,GROUP_CONCAT:304,GroupConcatOrderClause:305,GroupConcatSeparatorClause:306,OVER:307,OverClause_option0:308,OverClause_option1:309,OverPartitionClause:310,PARTITION:311,OverOrderByClause:312,SUM:313,TOTAL:314,COUNT:315,MIN:316,MAX:317,AVG:318,AGGR:319,ARRAY:320,FuncValue_option0:321,REPLACE:322,DATEADD:323,DATEDIFF:324,TIMESTAMPDIFF:325,INTERVAL:326,TRUE:327,FALSE:328,NSTRING:329,NULL:330,EXISTS:331,ARRAYLBRA:332,RBRA:333,ParamValue_group0:334,BRAQUESTION:335,CASE:336,WhensList:337,ElseClause:338,END:339,When:340,WHEN:341,THEN:342,ELSE:343,REGEXP:344,TILDA:345,GLOB:346,ESCAPE:347,NOT_LIKE:348,BARBAR:349,MINUS:350,AMPERSAND:351,BAR:352,GE:353,LE:354,EQEQ:355,EQEQEQ:356,NE:357,NEEQEQ:358,NEEQEQEQ:359,CondOp:360,AllSome:361,ColFunc:362,BETWEEN:363,NOT_BETWEEN:364,IS:365,DOUBLECOLON:366,SOME:367,UPDATE:368,OutputClause:369,SetColumn:370,SetColumn_group0:371,DELETE:372,INSERT:373,Into:374,Values:375,ValuesListsList:376,IGNORE:377,DEFAULT:378,VALUES:379,ValuesList:380,Value:381,DateValue:382,TemporaryClause:383,TableClass:384,IfNotExists:385,CreateTableDefClause:386,CreateTableOptionsClause:387,TABLE:388,CreateTableOptions:389,CreateTableOption:390,IDENTITY:391,TEMP:392,ColumnDefsList:393,ConstraintsList:394,Constraint:395,ConstraintName:396,PrimaryKey:397,ForeignKey:398,UniqueKey:399,IndexKey:400,Check:401,CONSTRAINT:402,CHECK:403,PRIMARY:404,PrimaryKey_option0:405,ColsList:406,FOREIGN:407,REFERENCES:408,ForeignKey_option0:409,OnReferentialActions:410,ParColsList:411,OnDeleteClause:412,OnUpdateClause:413,ReferentialAction:414,CASCADE:415,RESTRICT:416,NO:417,ACTION:418,UniqueKey_option0:419,UniqueKey_option1:420,ColumnDef:421,ColumnConstraintsClause:422,ColumnConstraints:423,SingularColumnType:424,NumberMax:425,ENUM:426,MAXNUM:427,ColumnConstraintsList:428,ColumnConstraint:429,ParLiteral:430,ColumnConstraint_option0:431,ColumnConstraint_option1:432,DROP:433,DropTable_group0:434,IfExists:435,TablesList:436,ALTER:437,RENAME:438,ADD:439,MODIFY:440,ATTACH:441,DATABASE:442,DETACH:443,AsClause:444,USE:445,SHOW:446,VIEW:447,CreateView_option0:448,CreateView_option1:449,SubqueryRestriction:450,READ:451,ONLY:452,OPTION:453,SOURCE:454,ASSERT:455,JsonObject:456,ATLBRA:457,JsonArray:458,JsonValue:459,JsonPrimitiveValue:460,LCUR:461,JsonPropertiesList:462,RCUR:463,JsonElementsList:464,JsonProperty:465,COLONDASH:466,OnOff:467,SetPropsList:468,AtDollar:469,SetProp:470,OFF:471,COMMIT:472,TRANSACTION:473,ROLLBACK:474,BEGIN:475,ElseStatement:476,WHILE:477,CONTINUE:478,ITERATE:479,BREAK:480,LEAVE:481,PRINT:482,REQUIRE:483,StringValuesList:484,PluginsList:485,Plugin:486,ECHO:487,DECLARE:488,DeclaresList:489,DeclareItem:490,TRUNCATE:491,MERGE:492,MergeInto:493,MergeUsing:494,MergeOn:495,MergeMatchedList:496,MergeMatched:497,MergeNotMatched:498,MATCHED:499,MergeMatchedAction:500,MergeNotMatchedAction:501,TARGET:502,OUTPUT:503,CreateVertex_option0:504,CreateVertex_option1:505,CreateVertex_option2:506,CreateVertexSet:507,SharpValue:508,CONTENT:509,CreateEdge_option0:510,GRAPH:511,GraphList:512,GraphVertexEdge:513,GraphElement:514,GraphVertexEdge_option0:515,GraphVertexEdge_option1:516,GraphElementVar:517,GraphVertexEdge_option2:518,GraphVertexEdge_option3:519,GraphVertexEdge_option4:520,GraphVar:521,GraphAsClause:522,GraphAtClause:523,GraphElement2:524,GraphElement2_option0:525,GraphElement2_option1:526,GraphElement2_option2:527,GraphElement2_option3:528,GraphElement_option0:529,GraphElement_option1:530,GraphElement_option2:531,SharpLiteral:532,GraphElement_option3:533,GraphElement_option4:534,GraphElement_option5:535,ColonLiteral:536,DeleteVertex:537,DeleteVertex_option0:538,DeleteEdge:539,DeleteEdge_option0:540,DeleteEdge_option1:541,DeleteEdge_option2:542,Term:543,TermsList:544,QUESTIONDASH:545,CALL:546,TRIGGER:547,BeforeAfter:548,InsertDeleteUpdate:549,CreateTrigger_option0:550,CreateTrigger_option1:551,BEFORE:552,AFTER:553,INSTEAD:554,REINDEX:555,A:556,ABSENT:557,ABSOLUTE:558,ACCORDING:559,ADA:560,ADMIN:561,ALWAYS:562,ASC:563,ASSERTION:564,ASSIGNMENT:565,ATTRIBUTE:566,ATTRIBUTES:567,BASE64:568,BERNOULLI:569,BLOCKED:570,BOM:571,BREADTH:572,C:573,CATALOG:574,CATALOG_NAME:575,CHAIN:576,CHARACTERISTICS:577,CHARACTERS:578,CHARACTER_SET_CATALOG:579,CHARACTER_SET_NAME:580,CHARACTER_SET_SCHEMA:581,CLASS_ORIGIN:582,COBOL:583,COLLATION:584,COLLATION_CATALOG:585,COLLATION_NAME:586,COLLATION_SCHEMA:587,COLUMNS:588,COLUMN_NAME:589,COMMAND_FUNCTION:590,COMMAND_FUNCTION_CODE:591,COMMITTED:592,CONDITION_NUMBER:593,CONNECTION:594,CONNECTION_NAME:595,CONSTRAINTS:596,CONSTRAINT_CATALOG:597,CONSTRAINT_NAME:598,CONSTRAINT_SCHEMA:599,CONSTRUCTOR:600,CONTROL:601,CURSOR_NAME:602,DATA:603,DATETIME_INTERVAL_CODE:604,DATETIME_INTERVAL_PRECISION:605,DB:606,DEFAULTS:607,DEFERRABLE:608,DEFERRED:609,DEFINED:610,DEFINER:611,DEGREE:612,DEPTH:613,DERIVED:614,DESC:615,DESCRIPTOR:616,DIAGNOSTICS:617,DISPATCH:618,DOCUMENT:619,DOMAIN:620,DYNAMIC_FUNCTION:621,DYNAMIC_FUNCTION_CODE:622,EMPTY:623,ENCODING:624,ENFORCED:625,EXCLUDE:626,EXCLUDING:627,EXPRESSION:628,FILE:629,FINAL:630,FLAG:631,FOLLOWING:632,FORTRAN:633,FOUND:634,FS:635,G:636,GENERAL:637,GENERATED:638,GO:639,GOTO:640,GRANTED:641,HEX:642,HIERARCHY:643,ID:644,IMMEDIATE:645,IMMEDIATELY:646,IMPLEMENTATION:647,INCLUDING:648,INCREMENT:649,INDENT:650,INITIALLY:651,INPUT:652,INSTANCE:653,INSTANTIABLE:654,INTEGRITY:655,INVOKER:656,ISOLATION:657,K:658,KEY_MEMBER:659,KEY_TYPE:660,LENGTH:661,LEVEL:662,LIBRARY:663,LINK:664,LOCATION:665,LOCATOR:666,M:667,MAP:668,MAPPING:669,MAXVALUE:670,MESSAGE_LENGTH:671,MESSAGE_OCTET_LENGTH:672,MESSAGE_TEXT:673,MINVALUE:674,MORE:675,MUMPS:676,NAME:677,NAMES:678,NAMESPACE:679,NESTING:680,NEXT:681,NFC:682,NFD:683,NFKC:684,NFKD:685,NIL:686,NORMALIZED:687,NULLABLE:688,OBJECT:689,OCTETS:690,OPTIONS:691,ORDERING:692,ORDINALITY:693,OTHERS:694,OVERRIDING:695,P:696,PAD:697,PARAMETER_MODE:698,PARAMETER_NAME:699,PARAMETER_ORDINAL_POSITION:700,PARAMETER_SPECIFIC_CATALOG:701,PARAMETER_SPECIFIC_NAME:702,PARAMETER_SPECIFIC_SCHEMA:703,PARTIAL:704,PASCAL:705,PASSING:706,PASSTHROUGH:707,PERMISSION:708,PLACING:709,PLI:710,PRECEDING:711,PRESERVE:712,PRIOR:713,PRIVILEGES:714,PUBLIC:715,RECOVERY:716,RELATIVE:717,REPEATABLE:718,REQUIRING:719,RESPECT:720,RESTART:721,RESTORE:722,RETURNED_CARDINALITY:723,RETURNED_LENGTH:724,RETURNED_OCTET_LENGTH:725,RETURNED_SQLSTATE:726,RETURNING:727,ROLE:728,ROUTINE:729,ROUTINE_CATALOG:730,ROUTINE_NAME:731,ROUTINE_SCHEMA:732,ROW_COUNT:733,SCALE:734,SCHEMA:735,SCHEMA_NAME:736,SCOPE_CATALOG:737,SCOPE_NAME:738,SCOPE_SCHEMA:739,SECTION:740,SECURITY:741,SELECTIVE:742,SELF:743,SEQUENCE:744,SERIALIZABLE:745,SERVER:746,SERVER_NAME:747,SESSION:748,SETS:749,SIMPLE:750,SIZE:751,SPACE:752,SPECIFIC_NAME:753,STANDALONE:754,STATE:755,STATEMENT:756,STRIP:757,STRUCTURE:758,STYLE:759,SUBCLASS_ORIGIN:760,T:761,TABLE_NAME:762,TEMPORARY:763,TIES:764,TOKEN:765,TOP_LEVEL_COUNT:766,TRANSACTIONS_COMMITTED:767,TRANSACTIONS_ROLLED_BACK:768,TRANSACTION_ACTIVE:769,TRANSFORM:770,TRANSFORMS:771,TRIGGER_CATALOG:772,TRIGGER_NAME:773,TRIGGER_SCHEMA:774,TYPE:775,UNBOUNDED:776,UNCOMMITTED:777,UNDER:778,UNLINK:779,UNNAMED:780,UNTYPED:781,URI:782,USAGE:783,USER_DEFINED_TYPE_CATALOG:784,USER_DEFINED_TYPE_CODE:785,USER_DEFINED_TYPE_NAME:786,USER_DEFINED_TYPE_SCHEMA:787,VALID:788,VERSION:789,WHITESPACE:790,WORK:791,WRAPPER:792,WRITE:793,XMLDECLARATION:794,XMLSCHEMA:795,YES:796,ZONE:797,SEMICOLON:798,PERCENT:799,ROWS:800,FuncValue_option0_group0:801,$accept:0,$end:1},terminals_:{2:"error",4:"LITERAL",5:"BRALITERAL",6:"KEY",7:"OPEN",8:"CLOSE",9:"SEPARATOR",14:"EOF",18:"EXPLAIN",19:"QUERY",20:"PLAN",57:"EndTransaction",76:"WITH",78:"COMMA",80:"RECURSIVE",81:"AS",82:"LPAR",83:"RPAR",96:"SEARCH",103:"PIVOT",105:"FOR",108:"UNPIVOT",109:"IN",116:"REMOVE",121:"LIKE",124:"ARROW",125:"DOT",127:"ORDER",128:"BY",131:"DOTDOT",132:"CARET",133:"EQ",137:"WHERE",138:"OF",139:"CLASS",140:"NUMBER",141:"STRING",142:"SLASH",143:"VERTEX",144:"EDGE",145:"EXCLAMATION",146:"SHARP",147:"MODULO",148:"GT",149:"LT",150:"GTGT",151:"LTLT",152:"DOLLAR",154:"AT",155:"SET",157:"TO",158:"VALUE",159:"ROW",161:"COLON",163:"NOT",165:"IF",171:"UNION",173:"ALL",175:"ANY",177:"INTERSECT",178:"EXCEPT",179:"AND",180:"OR",181:"PATH",182:"RETURN",184:"REPEAT",188:"PLUS",189:"STAR",190:"QUESTION",192:"FROM",194:"DISTINCT",196:"UNIQUE",198:"SELECT",199:"COLUMN",200:"MATRIX",201:"TEXTSTRING",202:"INDEX",203:"RECORDSET",204:"TOP",207:"INTO",215:"CROSS",216:"APPLY",217:"OUTER",223:"INDEXED",229:"INSERTED",242:"NATURAL",243:"JOIN",244:"INNER",245:"LEFT",246:"RIGHT",247:"FULL",248:"SEMI",249:"ANTI",250:"ON",251:"USING",252:"GROUP",255:"ROLLUP",256:"CUBE",258:"GROUPING",259:"HAVING",262:"CORRESPONDING",265:"NULLS",266:"FIRST",267:"LAST",268:"DIRECTION",269:"COLLATE",270:"NOCASE",271:"LIMIT",273:"OFFSET",275:"FETCH",281:"DELETED",292:"CURRENT_TIMESTAMP",293:"CURRENT_DATE",294:"JAVASCRIPT",295:"CREATE",296:"FUNCTION",297:"AGGREGATE",298:"NEW",299:"CAST",301:"CONVERT",304:"GROUP_CONCAT",307:"OVER",311:"PARTITION",313:"SUM",314:"TOTAL",315:"COUNT",316:"MIN",317:"MAX",318:"AVG",319:"AGGR",320:"ARRAY",322:"REPLACE",323:"DATEADD",324:"DATEDIFF",325:"TIMESTAMPDIFF",326:"INTERVAL",327:"TRUE",328:"FALSE",329:"NSTRING",330:"NULL",331:"EXISTS",332:"ARRAYLBRA",333:"RBRA",335:"BRAQUESTION",336:"CASE",339:"END",341:"WHEN",342:"THEN",343:"ELSE",344:"REGEXP",345:"TILDA",346:"GLOB",347:"ESCAPE",348:"NOT_LIKE",349:"BARBAR",350:"MINUS",351:"AMPERSAND",352:"BAR",353:"GE",354:"LE",355:"EQEQ",356:"EQEQEQ",357:"NE",358:"NEEQEQ",359:"NEEQEQEQ",363:"BETWEEN",364:"NOT_BETWEEN",365:"IS",366:"DOUBLECOLON",367:"SOME",368:"UPDATE",372:"DELETE",373:"INSERT",377:"IGNORE",378:"DEFAULT",379:"VALUES",382:"DateValue",388:"TABLE",391:"IDENTITY",392:"TEMP",402:"CONSTRAINT",403:"CHECK",404:"PRIMARY",407:"FOREIGN",408:"REFERENCES",415:"CASCADE",416:"RESTRICT",417:"NO",418:"ACTION",423:"ColumnConstraints",426:"ENUM",427:"MAXNUM",433:"DROP",437:"ALTER",438:"RENAME",439:"ADD",440:"MODIFY",441:"ATTACH",442:"DATABASE",443:"DETACH",445:"USE",446:"SHOW",447:"VIEW",451:"READ",452:"ONLY",453:"OPTION",454:"SOURCE",455:"ASSERT",457:"ATLBRA",461:"LCUR",463:"RCUR",466:"COLONDASH",471:"OFF",472:"COMMIT",473:"TRANSACTION",474:"ROLLBACK",475:"BEGIN",477:"WHILE",478:"CONTINUE",479:"ITERATE",480:"BREAK",481:"LEAVE",482:"PRINT",483:"REQUIRE",487:"ECHO",488:"DECLARE",491:"TRUNCATE",492:"MERGE",499:"MATCHED",502:"TARGET",503:"OUTPUT",509:"CONTENT",511:"GRAPH",545:"QUESTIONDASH",546:"CALL",547:"TRIGGER",552:"BEFORE",553:"AFTER",554:"INSTEAD",555:"REINDEX",556:"A",557:"ABSENT",558:"ABSOLUTE",559:"ACCORDING",560:"ADA",561:"ADMIN",562:"ALWAYS",563:"ASC",564:"ASSERTION",565:"ASSIGNMENT",566:"ATTRIBUTE",567:"ATTRIBUTES",568:"BASE64",569:"BERNOULLI",570:"BLOCKED",571:"BOM",572:"BREADTH",573:"C",574:"CATALOG",575:"CATALOG_NAME",576:"CHAIN",577:"CHARACTERISTICS",578:"CHARACTERS",579:"CHARACTER_SET_CATALOG",580:"CHARACTER_SET_NAME",581:"CHARACTER_SET_SCHEMA",582:"CLASS_ORIGIN",583:"COBOL",584:"COLLATION",585:"COLLATION_CATALOG",586:"COLLATION_NAME",587:"COLLATION_SCHEMA",588:"COLUMNS",589:"COLUMN_NAME",590:"COMMAND_FUNCTION",591:"COMMAND_FUNCTION_CODE",592:"COMMITTED",593:"CONDITION_NUMBER",594:"CONNECTION",595:"CONNECTION_NAME",596:"CONSTRAINTS",597:"CONSTRAINT_CATALOG",598:"CONSTRAINT_NAME",599:"CONSTRAINT_SCHEMA",600:"CONSTRUCTOR",601:"CONTROL",602:"CURSOR_NAME",603:"DATA",604:"DATETIME_INTERVAL_CODE",605:"DATETIME_INTERVAL_PRECISION",606:"DB",607:"DEFAULTS",608:"DEFERRABLE",609:"DEFERRED",610:"DEFINED",611:"DEFINER",612:"DEGREE",613:"DEPTH",614:"DERIVED",615:"DESC",616:"DESCRIPTOR",617:"DIAGNOSTICS",618:"DISPATCH",619:"DOCUMENT",620:"DOMAIN",621:"DYNAMIC_FUNCTION",622:"DYNAMIC_FUNCTION_CODE",623:"EMPTY",624:"ENCODING",625:"ENFORCED",626:"EXCLUDE",627:"EXCLUDING",628:"EXPRESSION",629:"FILE",630:"FINAL",631:"FLAG",632:"FOLLOWING",633:"FORTRAN",634:"FOUND",635:"FS",636:"G",637:"GENERAL",638:"GENERATED",639:"GO",640:"GOTO",641:"GRANTED",642:"HEX",643:"HIERARCHY",644:"ID",645:"IMMEDIATE",646:"IMMEDIATELY",647:"IMPLEMENTATION",648:"INCLUDING",649:"INCREMENT",650:"INDENT",651:"INITIALLY",652:"INPUT",653:"INSTANCE",654:"INSTANTIABLE",655:"INTEGRITY",656:"INVOKER",657:"ISOLATION",658:"K",659:"KEY_MEMBER",660:"KEY_TYPE",661:"LENGTH",662:"LEVEL",663:"LIBRARY",664:"LINK",665:"LOCATION",666:"LOCATOR",667:"M",668:"MAP",669:"MAPPING",670:"MAXVALUE",671:"MESSAGE_LENGTH",672:"MESSAGE_OCTET_LENGTH",673:"MESSAGE_TEXT",674:"MINVALUE",675:"MORE",676:"MUMPS",677:"NAME",678:"NAMES",679:"NAMESPACE",680:"NESTING",681:"NEXT",682:"NFC",683:"NFD",684:"NFKC",685:"NFKD",686:"NIL",687:"NORMALIZED",688:"NULLABLE",689:"OBJECT",690:"OCTETS",691:"OPTIONS",692:"ORDERING",693:"ORDINALITY",694:"OTHERS",695:"OVERRIDING",696:"P",697:"PAD",698:"PARAMETER_MODE",699:"PARAMETER_NAME",700:"PARAMETER_ORDINAL_POSITION",701:"PARAMETER_SPECIFIC_CATALOG",702:"PARAMETER_SPECIFIC_NAME",703:"PARAMETER_SPECIFIC_SCHEMA",704:"PARTIAL",705:"PASCAL",706:"PASSING",707:"PASSTHROUGH",708:"PERMISSION",709:"PLACING",710:"PLI",711:"PRECEDING",712:"PRESERVE",713:"PRIOR",714:"PRIVILEGES",715:"PUBLIC",716:"RECOVERY",717:"RELATIVE",718:"REPEATABLE",719:"REQUIRING",720:"RESPECT",721:"RESTART",722:"RESTORE",723:"RETURNED_CARDINALITY",724:"RETURNED_LENGTH",725:"RETURNED_OCTET_LENGTH",726:"RETURNED_SQLSTATE",727:"RETURNING",728:"ROLE",729:"ROUTINE",730:"ROUTINE_CATALOG",731:"ROUTINE_NAME",732:"ROUTINE_SCHEMA",733:"ROW_COUNT",734:"SCALE",735:"SCHEMA",736:"SCHEMA_NAME",737:"SCOPE_CATALOG",738:"SCOPE_NAME",739:"SCOPE_SCHEMA",740:"SECTION",741:"SECURITY",742:"SELECTIVE",743:"SELF",744:"SEQUENCE",745:"SERIALIZABLE",746:"SERVER",747:"SERVER_NAME",748:"SESSION",749:"SETS",750:"SIMPLE",751:"SIZE",752:"SPACE",753:"SPECIFIC_NAME",754:"STANDALONE",755:"STATE",756:"STATEMENT",757:"STRIP",758:"STRUCTURE",759:"STYLE",760:"SUBCLASS_ORIGIN",761:"T",762:"TABLE_NAME",763:"TEMPORARY",764:"TIES",765:"TOKEN",766:"TOP_LEVEL_COUNT",767:"TRANSACTIONS_COMMITTED",768:"TRANSACTIONS_ROLLED_BACK",769:"TRANSACTION_ACTIVE",770:"TRANSFORM",771:"TRANSFORMS",772:"TRIGGER_CATALOG",773:"TRIGGER_NAME",774:"TRIGGER_SCHEMA",775:"TYPE",776:"UNBOUNDED",777:"UNCOMMITTED",778:"UNDER",779:"UNLINK",780:"UNNAMED",781:"UNTYPED",782:"URI",783:"USAGE",784:"USER_DEFINED_TYPE_CATALOG",785:"USER_DEFINED_TYPE_CODE",786:"USER_DEFINED_TYPE_NAME",787:"USER_DEFINED_TYPE_SCHEMA",788:"VALID",789:"VERSION",790:"WHITESPACE",791:"WORK",792:"WRAPPER",793:"WRITE",794:"XMLDECLARATION",795:"XMLSCHEMA",796:"YES",797:"ZONE",798:"SEMICOLON",799:"PERCENT",800:"ROWS"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,2],[11,1],[11,2],[12,2],[13,3],[13,1],[13,1],[17,2],[17,4],[16,1],[21,0],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[51,3],[77,3],[77,4],[77,1],[77,2],[79,5],[79,8],[44,10],[44,4],[44,4],[99,8],[95,3],[102,8],[102,11],[111,4],[113,2],[113,1],[112,3],[112,1],[114,1],[114,3],[115,3],[118,3],[118,1],[119,1],[119,2],[123,1],[123,1],[126,1],[126,5],[126,5],[126,1],[126,2],[126,1],[126,2],[126,2],[126,3],[126,4],[126,4],[126,4],[126,4],[126,4],[126,1],[126,1],[126,1],[126,1],[126,1],[126,1],[126,2],[126,2],[126,2],[126,1],[126,1],[126,1],[126,1],[126,1],[126,1],[126,2],[126,3],[126,4],[126,3],[126,1],[126,4],[126,2],[126,2],[126,4],[126,4],[126,4],[126,4],[126,4],[126,5],[126,4],[126,4],[126,4],[126,4],[126,4],[126,4],[126,4],[126,4],[126,6],[172,3],[172,1],[162,1],[162,1],[162,1],[191,2],[85,4],[85,4],[85,4],[85,3],[193,1],[193,2],[193,2],[193,2],[193,2],[193,2],[193,2],[193,2],[195,3],[195,4],[195,0],[87,0],[87,2],[87,2],[87,2],[87,2],[87,2],[88,2],[88,3],[88,5],[88,5],[88,0],[214,6],[214,7],[214,6],[214,7],[212,1],[212,3],[218,4],[218,3],[218,2],[218,3],[218,2],[218,2],[218,2],[218,2],[218,1],[230,1],[230,2],[227,1],[208,3],[208,1],[231,1],[231,1],[213,2],[213,2],[213,1],[213,1],[232,3],[234,2],[234,3],[234,2],[234,4],[234,2],[234,2],[233,1],[233,2],[241,1],[241,2],[241,2],[241,3],[241,2],[241,3],[241,2],[241,3],[241,2],[241,2],[241,2],[235,2],[235,2],[235,4],[235,0],[90,0],[90,2],[91,0],[91,4],[91,6],[91,6],[253,1],[253,3],[257,5],[257,4],[257,4],[257,1],[254,0],[254,2],[92,0],[92,2],[260,1],[260,2],[260,1],[260,1],[260,2],[260,3],[260,2],[260,2],[261,1],[261,1],[93,0],[93,3],[129,1],[129,3],[264,2],[264,2],[263,1],[263,2],[263,3],[263,3],[263,4],[94,0],[94,3],[94,8],[272,0],[272,2],[183,3],[183,1],[279,3],[279,2],[279,3],[279,2],[279,3],[279,2],[279,1],[280,5],[280,3],[280,3],[280,3],[280,1],[120,5],[120,3],[120,3],[120,3],[120,3],[120,4],[120,1],[120,1],[120,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,3],[104,3],[104,3],[104,1],[104,1],[104,1],[60,1],[74,5],[75,5],[290,2],[290,2],[288,6],[288,8],[288,6],[288,8],[302,1],[302,1],[302,1],[302,1],[302,1],[302,1],[302,1],[302,1],[282,5],[282,6],[282,6],[282,6],[282,7],[303,0],[303,5],[310,3],[312,3],[305,0],[305,3],[306,0],[306,2],[167,1],[167,1],[167,1],[167,1],[167,1],[167,1],[167,1],[167,1],[167,1],[167,1],[167,1],[209,6],[209,4],[209,4],[209,4],[209,3],[209,8],[209,8],[209,8],[209,8],[209,8],[209,3],[160,1],[160,3],[205,1],[284,1],[284,1],[122,1],[122,1],[285,1],[211,2],[286,4],[289,3],[210,2],[210,2],[210,1],[210,1],[287,5],[287,4],[337,2],[337,1],[340,4],[338,2],[338,0],[283,3],[283,3],[283,3],[283,3],[283,5],[283,3],[283,5],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,5],[283,3],[283,3],[283,3],[283,5],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,6],[283,6],[283,3],[283,3],[283,2],[283,2],[283,2],[283,2],[283,2],[283,3],[283,5],[283,6],[283,5],[283,6],[283,4],[283,5],[283,3],[283,4],[283,3],[283,4],[283,3],[283,3],[283,3],[283,3],[283,3],[362,1],[362,1],[362,4],[360,1],[360,1],[360,1],[360,1],[360,1],[360,1],[361,1],[361,1],[361,1],[59,7],[59,5],[156,1],[156,3],[370,3],[370,4],[33,6],[33,4],[40,6],[40,5],[40,7],[40,6],[40,10],[40,9],[40,6],[40,9],[40,8],[40,7],[40,6],[40,5],[40,6],[40,9],[40,8],[40,5],[40,7],[40,8],[40,6],[375,1],[375,1],[374,0],[374,1],[376,3],[376,1],[376,1],[376,5],[376,3],[376,3],[380,1],[380,3],[381,1],[381,1],[381,1],[381,1],[381,1],[381,1],[84,1],[84,3],[28,9],[28,5],[384,1],[384,1],[387,0],[387,1],[389,2],[389,1],[390,1],[390,3],[390,3],[390,3],[383,0],[383,1],[385,0],[385,3],[386,3],[386,1],[386,2],[394,1],[394,3],[395,2],[395,2],[395,2],[395,2],[395,2],[396,0],[396,2],[401,4],[397,6],[398,9],[411,3],[410,0],[410,1],[410,1],[410,2],[410,2],[412,3],[413,3],[414,1],[414,2],[414,2],[414,1],[414,2],[399,6],[400,5],[406,1],[406,1],[406,3],[406,3],[393,1],[393,3],[421,3],[421,2],[421,1],[424,6],[424,4],[424,1],[424,4],[300,2],[300,1],[425,1],[425,1],[422,0],[422,1],[428,2],[428,1],[430,3],[429,2],[429,6],[429,4],[429,6],[429,1],[429,2],[429,4],[429,2],[429,1],[429,2],[429,1],[429,1],[429,3],[429,5],[37,4],[436,3],[436,1],[435,0],[435,2],[22,6],[22,6],[22,6],[22,8],[22,6],[43,5],[23,4],[23,7],[23,6],[23,9],[34,3],[25,4],[25,6],[25,9],[25,6],[444,0],[444,2],[58,3],[58,2],[35,4],[35,5],[35,5],[26,8],[26,9],[36,3],[47,2],[47,4],[47,3],[47,5],[49,2],[49,4],[49,4],[49,6],[46,4],[46,6],[48,4],[48,6],[45,4],[45,6],[29,11],[29,8],[450,3],[450,3],[450,5],[38,4],[70,2],[61,2],[62,2],[62,2],[62,4],[153,4],[153,2],[153,2],[153,2],[153,2],[153,1],[153,2],[153,2],[459,1],[459,1],[460,1],[460,2],[460,1],[460,1],[460,1],[460,1],[460,1],[460,1],[460,3],[456,3],[456,4],[456,2],[458,2],[458,3],[458,1],[462,3],[462,1],[465,3],[465,3],[465,3],[465,3],[465,3],[465,3],[464,3],[464,1],[69,4],[69,3],[69,4],[69,5],[69,5],[69,6],[469,1],[469,1],[468,3],[468,2],[470,1],[470,1],[470,3],[467,1],[467,1],[55,2],[56,2],[54,2],[39,4],[39,3],[476,2],[63,3],[64,1],[64,1],[65,1],[65,1],[66,3],[67,2],[67,2],[68,2],[68,2],[486,1],[486,1],[73,2],[484,3],[484,1],[485,3],[485,1],[32,2],[489,1],[489,3],[490,3],[490,4],[490,5],[490,6],[50,3],[41,6],[493,1],[493,2],[494,2],[494,4],[495,2],[496,2],[496,2],[496,1],[496,1],[497,4],[497,6],[500,1],[500,3],[498,5],[498,7],[498,7],[498,9],[498,7],[498,9],[501,3],[501,6],[501,3],[501,6],[369,0],[369,2],[369,5],[369,4],[369,7],[31,6],[508,2],[507,0],[507,2],[507,2],[507,1],[30,8],[27,3],[27,4],[512,3],[512,1],[513,3],[513,7],[513,6],[513,3],[513,4],[517,1],[517,1],[521,2],[522,3],[523,2],[524,4],[514,4],[514,3],[514,2],[514,1],[536,2],[532,2],[532,2],[537,4],[539,6],[71,3],[71,2],[544,3],[544,1],[543,1],[543,4],[72,2],[24,2],[52,9],[52,8],[52,9],[548,0],[548,1],[548,1],[548,1],[548,2],[549,1],[549,1],[549,1],[53,3],[42,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[15,1],[15,1],[86,0],[86,1],[89,0],[89,1],[97,0],[97,2],[98,0],[98,1],[100,0],[100,1],[101,0],[101,1],[106,0],[106,1],[107,0],[107,1],[110,0],[110,1],[117,0],[117,1],[130,0],[130,1],[134,1],[134,2],[135,1],[135,2],[136,0],[136,1],[164,0],[164,2],[166,0],[166,2],[168,0],[168,2],[169,1],[169,1],[170,0],[170,2],[174,0],[174,2],[176,0],[176,2],[185,0],[185,2],[186,0],[186,2],[187,0],[187,2],[197,0],[197,1],[206,0],[206,1],[219,0],[219,1],[220,0],[220,1],[221,0],[221,1],[222,0],[222,1],[224,0],[224,1],[225,0],[225,1],[226,0],[226,1],[228,0],[228,1],[236,0],[236,1],[237,0],[237,1],[238,0],[238,1],[239,0],[239,1],[240,0],[240,1],[274,0],[274,1],[276,0],[276,1],[277,0],[277,1],[278,0],[278,1],[291,1],[291,1],[308,0],[308,1],[309,0],[309,1],[801,1],[801,1],[321,0],[321,1],[334,1],[334,1],[371,1],[371,1],[405,0],[405,1],[409,0],[409,1],[419,0],[419,1],[420,0],[420,1],[431,0],[431,1],[432,0],[432,1],[434,1],[434,1],[448,0],[448,1],[449,0],[449,1],[504,0],[504,1],[505,0],[505,1],[506,0],[506,1],[510,0],[510,1],[515,0],[515,1],[516,0],[516,1],[518,0],[518,1],[519,0],[519,1],[520,0],[520,1],[525,0],[525,1],[526,0],[526,1],[527,0],[527,1],[528,0],[528,1],[529,0],[529,1],[530,0],[530,1],[531,0],[531,1],[533,0],[533,1],[534,0],[534,1],[535,0],[535,1],[538,0],[538,2],[540,0],[540,2],[541,0],[541,2],[542,0],[542,2],[550,0],[550,1],[551,0],[551,1]],performAction:function(e,i,s,n,r,a){var o=a.length-1;switch(r){case 1:this.$=t.options.casesensitive?a[o]:a[o].toLowerCase();break;case 2:this.$=l(a[o].substr(1,a[o].length-2));break;case 3:case 4:case 5:case 6:case 7:this.$=a[o].toLowerCase();break;case 8:case 87:case 88:case 96:case 157:case 199:case 200:case 204:case 205:case 245:case 284:case 299:case 300:case 301:case 302:case 303:case 304:case 305:case 306:case 307:case 308:case 309:case 310:case 311:case 312:case 315:case 316:case 332:case 333:case 334:case 335:case 336:case 337:case 350:case 395:case 461:case 462:case 463:case 464:case 465:case 466:case 544:case 577:case 581:case 583:case 658:case 659:case 660:case 661:case 662:case 663:case 668:case 670:case 671:case 680:case 699:case 700:case 765:case 780:case 781:case 783:case 784:case 790:case 791:case 320:case 458:case 459:case 554:case 555:case 709:this.$=a[o];break;case 9:this.$=a[o]?a[o-1]+" "+a[o]:a[o-1];break;case 10:return new n.Statements({statements:a[o-1]});case 11:this.$=a[o-2],a[o]&&a[o-2].push(a[o]);break;case 12:case 13:case 75:case 90:case 95:case 153:case 188:case 208:case 209:case 240:case 262:case 277:case 375:case 393:case 472:case 502:case 503:case 507:case 515:case 563:case 564:case 601:case 688:case 698:case 724:case 726:case 728:case 743:case 744:case 774:case 798:case 536:case 567:case 1113:case 1115:this.$=[a[o]];break;case 14:case 15:this.$=a[o],a[o].explain=!0;break;case 16:this.$=a[o],n.exists&&(this.$.exists=n.exists),delete n.exists,n.queries&&(this.$.queries=n.queries),delete n.queries;break;case 17:case 172:case 183:case 233:case 234:case 236:case 246:case 248:case 260:case 271:case 274:case 345:case 349:case 351:case 396:case 519:case 529:case 531:case 543:case 602:case 173:case 766:case 580:case 619:this.$=void 0;break;case 72:this.$=new n.WithSelect({withs:a[o-1],select:a[o]});break;case 73:case 600:case 276:case 537:case 568:case 687:case 697:case 723:case 725:case 729:case 376:a[o-2].push(a[o]),this.$=a[o-2];break;case 74:a[o].recursive=!0,a[o-3].push(a[o]),this.$=a[o-3];break;case 76:a[o].recursive=!0,this.$=[a[o]];break;case 77:this.$={name:a[o-4],select:a[o-1]};break;case 78:this.$={name:a[o-7],columns:a[o-5],select:a[o-1]};break;case 79:n.extend(this.$,a[o-9]),n.extend(this.$,a[o-8]),n.extend(this.$,a[o-7]),n.extend(this.$,a[o-6]),n.extend(this.$,a[o-5]),n.extend(this.$,a[o-4]),n.extend(this.$,a[o-3]),n.extend(this.$,a[o-2]),n.extend(this.$,a[o-1]),n.extend(this.$,a[o]),this.$=a[o-9],n.exists&&(this.$.exists=n.exists.slice());break;case 80:n.extend(this.$,a[o-3]),n.extend(this.$,a[o-2]),n.extend(this.$,a[o-1]),n.extend(this.$,a[o]),this.$=a[o-3],n.exists&&(this.$.exists=n.exists.slice());break;case 81:this.$=new n.Search({selectors:a[o-2],from:a[o]}),n.extend(this.$,a[o-1]);break;case 82:n.extend(this.$,a[o-7]),n.extend(this.$,a[o-6]),n.extend(this.$,a[o-5]),n.extend(this.$,a[o-4]),n.extend(this.$,a[o-3]),n.extend(this.$,a[o-2]),n.extend(this.$,a[o-1]),n.extend(this.$,a[o]),this.$=a[o-7],n.exists&&(this.$.exists=n.exists.slice());break;case 83:case 86:case 548:case 584:case 620:case 654:case 672:case 673:case 676:case 701:case 460:this.$=a[o-1];break;case 84:this.$={pivot:{expr:a[o-5],columnid:a[o-3],inlist:a[o-2],as:a[o]}};break;case 85:this.$={unpivot:{tocolumnid:a[o-8],forcolumnid:a[o-6],inlist:a[o-3],as:a[o]}};break;case 89:case 94:case 773:case 797:case 152:this.$=a[o-2],this.$.push(a[o]);break;case 91:this.$={expr:a[o]};break;case 92:this.$={expr:a[o-2],as:a[o]};break;case 93:this.$={removecolumns:a[o]};break;case 97:this.$={like:a[o]};break;case 100:case 114:this.$={srchid:"PROP",args:[a[o]]};break;case 101:this.$={srchid:"ORDERBY",args:a[o-1]};break;case 102:var h=a[o-1];h||(h="ASC"),this.$={srchid:"ORDERBY",args:[{expression:new n.Column({columnid:"_"}),direction:h}]};break;case 103:this.$={srchid:"PARENT"};break;case 104:this.$={srchid:"APROP",args:[a[o]]};break;case 105:this.$={selid:"ROOT"};break;case 106:this.$={srchid:"EQ",args:[a[o]]};break;case 107:this.$={srchid:"LIKE",args:[a[o]]};break;case 108:case 109:this.$={selid:"WITH",args:a[o-1]};break;case 110:this.$={srchid:a[o-3].toUpperCase(),args:a[o-1]};break;case 111:this.$={srchid:"WHERE",args:[a[o-1]]};break;case 112:this.$={selid:"OF",args:[a[o-1]]};break;case 113:this.$={srchid:"CLASS",args:[a[o-1]]};break;case 115:this.$={srchid:"NAME",args:[a[o].substr(1,a[o].length-2)]};break;case 116:this.$={srchid:"CHILD"};break;case 117:this.$={srchid:"VERTEX"};break;case 118:this.$={srchid:"EDGE"};break;case 119:this.$={srchid:"REF"};break;case 120:this.$={srchid:"SHARP",args:[a[o]]};break;case 121:this.$={srchid:"ATTR",args:typeof a[o]>"u"?void 0:[a[o]]};break;case 122:this.$={srchid:"ATTR"};break;case 123:this.$={srchid:"OUT"};break;case 124:this.$={srchid:"IN"};break;case 125:this.$={srchid:"OUTOUT"};break;case 126:this.$={srchid:"ININ"};break;case 127:this.$={srchid:"CONTENT"};break;case 128:this.$={srchid:"EX",args:[new n.Json({value:a[o]})]};break;case 129:this.$={srchid:"AT",args:[a[o]]};break;case 130:this.$={srchid:"AS",args:[a[o]]};break;case 131:this.$={srchid:"SET",args:a[o-1]};break;case 132:this.$={selid:"TO",args:[a[o]]};break;case 133:this.$={srchid:"VALUE"};break;case 134:this.$={srchid:"ROW",args:a[o-1]};break;case 135:this.$={srchid:"CLASS",args:[a[o]]};break;case 136:this.$={selid:a[o],args:[a[o-1]]};break;case 137:this.$={selid:"NOT",args:a[o-1]};break;case 138:this.$={selid:"IF",args:a[o-1]};break;case 139:this.$={selid:a[o-3],args:a[o-1]};break;case 140:this.$={selid:"DISTINCT",args:a[o-1]};break;case 141:this.$={selid:"UNION",args:a[o-1]};break;case 142:this.$={selid:"UNIONALL",args:a[o-1]};break;case 143:this.$={selid:"ALL",args:[a[o-1]]};break;case 144:this.$={selid:"ANY",args:[a[o-1]]};break;case 145:this.$={selid:"INTERSECT",args:a[o-1]};break;case 146:this.$={selid:"EXCEPT",args:a[o-1]};break;case 147:this.$={selid:"AND",args:a[o-1]};break;case 148:this.$={selid:"OR",args:a[o-1]};break;case 149:this.$={selid:"PATH",args:[a[o-1]]};break;case 150:this.$={srchid:"RETURN",args:a[o-1]};break;case 151:this.$={selid:"REPEAT",sels:a[o-3],args:a[o-1]};break;case 154:this.$="PLUS";break;case 155:this.$="STAR";break;case 156:this.$="QUESTION";break;case 158:case 159:this.$=new n.Select({columns:a[o],distinct:!0}),n.extend(this.$,a[o-3]),n.extend(this.$,a[o-1]);break;case 160:this.$=new n.Select({columns:a[o],all:!0}),n.extend(this.$,a[o-3]),n.extend(this.$,a[o-1]);break;case 161:a[o]?(this.$=new n.Select({columns:a[o]}),n.extend(this.$,a[o-2]),n.extend(this.$,a[o-1])):this.$=new n.Select({columns:[new n.Column({columnid:"_"})],modifier:"COLUMN"});break;case 162:this.$="SELECT"==a[o]?void 0:{modifier:a[o]};break;case 163:this.$={modifier:"VALUE"};break;case 164:this.$={modifier:"ROW"};break;case 165:this.$={modifier:"COLUMN"};break;case 166:this.$={modifier:"MATRIX"};break;case 167:this.$={modifier:"TEXTSTRING"};break;case 168:this.$={modifier:"INDEX"};break;case 169:this.$={modifier:"RECORDSET"};break;case 170:this.$={top:a[o-1],percent:typeof a[o]<"u"||void 0};break;case 171:this.$={top:a[o-1]};break;case 174:case 175:case 176:case 177:case 736:case 737:this.$={into:a[o]};break;case 178:var c=(d=(d=a[o]).substr(1,d.length-2)).substr(-3).toUpperCase(),u=d.substr(-4).toUpperCase();"#"==d[0]?this.$={into:new n.FuncValue({funcid:"HTML",args:[new n.StringValue({value:d}),new n.Json({value:{headers:!0}})]})}:"XLS"==c||"CSV"==c||"TAB"==c?this.$={into:new n.FuncValue({funcid:c,args:[new n.StringValue({value:d}),new n.Json({value:{headers:!0}})]})}:("XLSX"==u||"JSON"==u)&&(this.$={into:new n.FuncValue({funcid:u,args:[new n.StringValue({value:d}),new n.Json({value:{headers:!0}})]})});break;case 179:this.$={from:a[o]};break;case 180:this.$={from:a[o-1],joins:a[o]};break;case 181:var f=a[o-2];a[o].forEach((t=>{var e=new n.Join({joinmode:"CROSS"});t.tableid?e.table=new n.Table({databaseid:t.databaseid,tableid:t.tableid}):t instanceof n.Select?e.select=t:t instanceof n.Search?e.search=t:t instanceof n.ParamValue?e.param=t:t instanceof n.VarValue?e.variable=t.variable:t instanceof n.FuncValue?e.func=t:t instanceof n.Json&&(e.json=t),t.as&&(e.as=t.as),f.push(e)})),this.$={from:a[o-3],joins:f};break;case 182:this.$={from:a[o-2],joins:a[o-1]};break;case 184:this.$=new n.Apply({select:a[o-2],applymode:"CROSS",as:a[o]});break;case 185:this.$=new n.Apply({select:a[o-3],applymode:"CROSS",as:a[o]});break;case 186:this.$=new n.Apply({select:a[o-2],applymode:"OUTER",as:a[o]});break;case 187:this.$=new n.Apply({select:a[o-3],applymode:"OUTER",as:a[o]});break;case 189:case 241:case 473:case 565:case 566:case 263:case 505:case 506:case 508:case 516:this.$=a[o-2],a[o-2].push(a[o]);break;case 190:this.$=a[o-2],this.$.as=a[o]||"default";break;case 191:this.$=new n.Json({value:a[o-2]}),a[o-2].as=a[o];break;case 192:this.$=a[o-1],a[o]&&(a[o-1].as=a[o]);break;case 193:case 674:case 677:this.$=a[o-2];break;case 194:case 195:case 196:case 197:this.$=a[o-1],a[o-1].as=a[o]||"default";break;case 198:this.$={inserted:!0};break;case 201:var d,p;if(c=(d=(d=a[o]).substr(1,d.length-2)).substr(-3).toUpperCase(),u=d.substr(-4).toUpperCase(),"#"==d[0])p=new n.FuncValue({funcid:"HTML",args:[new n.StringValue({value:d}),new n.Json({value:{headers:!0}})]});else if("XLS"==c||"CSV"==c||"TAB"==c)p=new n.FuncValue({funcid:c,args:[new n.StringValue({value:d}),new n.Json({value:{headers:!0}})]});else{if("XLSX"!=u&&"JSON"!=u)throw new Error("Unknown string in FROM clause");p=new n.FuncValue({funcid:u,args:[new n.StringValue({value:d}),new n.Json({value:{headers:!0}})]})}this.$=p;break;case 202:this.$="INFORMATION_SCHEMA"==a[o-2]?new n.FuncValue({funcid:a[o-2],args:[new n.StringValue({value:a[o]})]}):new n.Table({databaseid:a[o-2],tableid:a[o]});break;case 203:this.$=new n.Table({tableid:a[o]});break;case 206:case 207:this.$=a[o-1],a[o-1].push(a[o]);break;case 210:this.$=new n.Join(a[o-2]),n.extend(this.$,a[o-1]),n.extend(this.$,a[o]);break;case 211:this.$={table:a[o-1]},a[o]&&(this.$.as=a[o]);break;case 212:this.$={json:new n.Json({value:a[o-2],as:a[o]})};break;case 213:this.$={param:a[o-1],as:a[o]};break;case 214:this.$={select:a[o-2],as:a[o]};break;case 215:this.$={func:a[o-1],as:a[o]||"default"};break;case 216:this.$={variable:a[o-1],as:a[o]||"default"};break;case 217:this.$={joinmode:a[o]};break;case 218:this.$={joinmode:a[o-1],natural:!0};break;case 219:case 220:this.$="INNER";break;case 221:case 222:this.$="LEFT";break;case 223:case 224:this.$="RIGHT";break;case 225:case 226:this.$="OUTER";break;case 227:this.$="SEMI";break;case 228:this.$="ANTI";break;case 229:this.$="CROSS";break;case 230:case 740:this.$={on:a[o]};break;case 231:case 738:this.$={using:a[o]};break;case 232:case 739:this.$={using:a[o-1]};break;case 235:this.$={where:new n.Expression({expression:a[o]})};break;case 237:this.$={group:a[o-1]},n.extend(this.$,a[o]);break;case 238:this.$={group:[new n.GroupExpression({type:"ROLLUP",group:a[o-3]})]},n.extend(this.$,a[o]);break;case 239:this.$={group:[new n.GroupExpression({type:"CUBE",group:a[o-3]})]},n.extend(this.$,a[o]);break;case 242:this.$=new n.GroupExpression({type:"GROUPING SETS",group:a[o-1]});break;case 243:this.$=new n.GroupExpression({type:"ROLLUP",group:a[o-1]});break;case 244:this.$=new n.GroupExpression({type:"CUBE",group:a[o-1]});break;case 247:this.$={having:a[o]};break;case 249:this.$={},this.$[a[o-1].op]=a[o],a[o-1].corresponding&&(this.$.corresponding=!0);break;case 250:n.queriesStack||(n.queriesStack=[]),n.queriesStack.push(n.queries||[]),n.queries=[],this.$={op:"union"};break;case 251:n.queriesStack||(n.queriesStack=[]),n.queriesStack.push(n.queries||[]),n.queries=[],this.$={op:"unionall"};break;case 252:n.queriesStack||(n.queriesStack=[]),n.queriesStack.push(n.queries||[]),n.queries=[],this.$={op:"except"};break;case 253:n.queriesStack||(n.queriesStack=[]),n.queriesStack.push(n.queries||[]),n.queries=[],this.$={op:"intersect"};break;case 254:n.queriesStack||(n.queriesStack=[]),n.queriesStack.push(n.queries||[]),n.queries=[],this.$={op:"union",corresponding:!0};break;case 255:n.queriesStack||(n.queriesStack=[]),n.queriesStack.push(n.queries||[]),n.queries=[],this.$={op:"unionall",corresponding:!0};break;case 256:n.queriesStack||(n.queriesStack=[]),n.queriesStack.push(n.queries||[]),n.queries=[],this.$={op:"except",corresponding:!0};break;case 257:n.queriesStack||(n.queriesStack=[]),n.queriesStack.push(n.queries||[]),n.queries=[],this.$={op:"intersect",corresponding:!0};break;case 258:case 259:n.queriesStack&&n.queriesStack.length>0&&(n.queries&&n.queries.length>0&&(a[o].queries=n.queries),n.queries=n.queriesStack.pop()),this.$=a[o];break;case 261:case 348:this.$={order:a[o]};break;case 264:this.$={nullsOrder:"FIRST"};break;case 265:this.$={nullsOrder:"LAST"};break;case 266:this.$=new n.Expression({expression:a[o],direction:"ASC"});break;case 267:this.$=new n.Expression({expression:a[o-1],direction:a[o].toUpperCase()});break;case 268:this.$=new n.Expression({expression:a[o-2],direction:a[o-1].toUpperCase()}),n.extend(this.$,a[o]);break;case 269:this.$=new n.Expression({expression:a[o-2],direction:"ASC",nocase:!0});break;case 270:this.$=new n.Expression({expression:a[o-3],direction:a[o].toUpperCase(),nocase:!0});break;case 272:this.$={limit:a[o-1]},n.extend(this.$,a[o]);break;case 273:this.$={limit:a[o-2],offset:a[o-6]};break;case 275:this.$={offset:a[o]};break;case 278:case 280:a[o-2].as=a[o],this.$=a[o-2];break;case 279:case 281:a[o-1].as=a[o],this.$=a[o-1];break;case 282:a[o-2].as=a[o].value,this.$=a[o-2];break;case 283:a[o-1].as=a[o].value,this.$=a[o-1];break;case 285:this.$=new n.Column({columid:a[o],tableid:a[o-2],databaseid:a[o-4]});break;case 286:case 293:case 294:this.$=new n.Column({columnid:a[o],tableid:a[o-2]});break;case 287:case 291:this.$=new n.Column({columnid:a[o],tableid:"INSERTED"});break;case 288:case 292:this.$=new n.Column({columnid:a[o],tableid:"DELETED"});break;case 289:case 298:this.$=new n.Column({columnid:a[o]});break;case 290:this.$=new n.Column({columnid:a[o],tableid:a[o-2],databaseid:a[o-4]});break;case 295:this.$=new n.Column({columnid:"@"+a[o],tableid:a[o-3]});break;case 296:this.$=new n.Column({columnid:"inserted"});break;case 297:this.$=new n.Column({columnid:"deleted"});break;case 313:this.$=new n.DomainValueValue;break;case 314:this.$=new n.Json({value:a[o]});break;case 317:case 318:case 319:n.queries||(n.queries=[]),n.queries.push(a[o-1]),a[o-1].queriesidx=n.queries.length,this.$=a[o-1];break;case 321:case 338:this.$=new n.FuncValue({funcid:"CURRENT_TIMESTAMP"});break;case 322:case 339:this.$=new n.FuncValue({funcid:"CURRENT_DATE"});break;case 323:this.$=new n.JavaScript({value:a[o].substr(2,a[o].length-4)});break;case 324:this.$=new n.JavaScript({value:'alasql.fn["'+a[o-2]+'"] = '+a[o].substr(2,a[o].length-4)});break;case 325:this.$=new n.JavaScript({value:'alasql.aggr["'+a[o-2]+'"] = '+a[o].substr(2,a[o].length-4)});break;case 326:this.$=new n.FuncValue({funcid:a[o],newid:!0});break;case 327:this.$=a[o],n.extend(this.$,{newid:!0});break;case 328:this.$=new n.Convert({expression:a[o-3]}),n.extend(this.$,a[o-1]);break;case 329:this.$=new n.Convert({expression:a[o-5],style:a[o-1]}),n.extend(this.$,a[o-3]);break;case 330:this.$=new n.Convert({expression:a[o-1]}),n.extend(this.$,a[o-3]);break;case 331:this.$=new n.Convert({expression:a[o-3],style:a[o-1]}),n.extend(this.$,a[o-5]);break;case 340:this.$=a[o-2].length>1&&("MAX"==a[o-4].toUpperCase()||"MIN"==a[o-4].toUpperCase())?new n.FuncValue({funcid:a[o-4],args:a[o-2]}):new n.AggrValue({aggregatorid:a[o-4].toUpperCase(),expression:a[o-2].pop(),over:a[o]});break;case 341:this.$=new n.AggrValue({aggregatorid:a[o-5].toUpperCase(),expression:a[o-2],distinct:!0,over:a[o]});break;case 342:this.$=new n.AggrValue({aggregatorid:a[o-5].toUpperCase(),expression:a[o-2],over:a[o]});break;case 343:this.$=new n.AggrValue({aggregatorid:"REDUCE",funcid:"GROUP_CONCAT",expression:a[o-3],order:a[o-2],separator:a[o-1]});break;case 344:this.$=new n.AggrValue({aggregatorid:"REDUCE",funcid:"GROUP_CONCAT",expression:a[o-3],distinct:!0,order:a[o-2],separator:a[o-1]});break;case 346:this.$=new n.Over,n.extend(this.$,a[o-2]),n.extend(this.$,a[o-1]);break;case 347:this.$={partition:a[o]};break;case 352:var b=a[o].substring(1,a[o].length-1);b=b.replace(/\\n/g,"\n").replace(/\\t/g,"\t").replace(/\\r/g,"\r").replace(/\\\\/g,"\\"),this.$=b;break;case 353:this.$="SUM";break;case 354:this.$="TOTAL";break;case 355:this.$="COUNT";break;case 356:this.$="MIN";break;case 357:case 579:this.$="MAX";break;case 358:this.$="AVG";break;case 359:this.$="FIRST";break;case 360:this.$="LAST";break;case 361:this.$="AGGR";break;case 362:this.$="ARRAY";break;case 363:this.$="GROUP_CONCAT";break;case 364:var v=a[o-5],E=a[o-2];this.$=E.length>1&&("MIN"==v.toUpperCase()||"MAX"==v.toUpperCase())?new n.FuncValue({funcid:v,args:E,over:a[o]}):t.aggr[a[o-5]]?new n.AggrValue({aggregatorid:"REDUCE",funcid:v,expression:E[0],args:E,distinct:"DISTINCT"==a[o-3],over:a[o]}):new n.FuncValue({funcid:v,args:E,over:a[o]});break;case 365:this.$=new n.FuncValue({funcid:a[o-3],over:a[o]});break;case 366:this.$=new n.FuncValue({funcid:"IIF",args:a[o-1]});break;case 367:this.$=new n.FuncValue({funcid:"REPLACE",args:a[o-1]});break;case 368:this.$=new n.FuncValue({funcid:a[o-2]});break;case 369:this.$=new n.FuncValue({funcid:"DATEADD",args:[new n.StringValue({value:a[o-5]}),a[o-3],a[o-1]]});break;case 370:this.$=new n.FuncValue({funcid:"DATEADD",args:[a[o-5],a[o-3],a[o-1]]});break;case 371:this.$=new n.FuncValue({funcid:"DATEDIFF",args:[new n.StringValue({value:a[o-5]}),a[o-3],a[o-1]]});break;case 372:this.$=new n.FuncValue({funcid:"DATEDIFF",args:[a[o-5],a[o-3],a[o-1]]});break;case 373:this.$=new n.FuncValue({funcid:"TIMESTAMPDIFF",args:[new n.StringValue({value:a[o-5]}),a[o-3],a[o-1]]});break;case 374:this.$=new n.FuncValue({funcid:"INTERVAL",args:[a[o-1],new n.StringValue({value:a[o].toLowerCase()})]});break;case 377:this.$=new n.NumValue({value:+a[o]});break;case 378:this.$=new n.LogicValue({value:!0});break;case 379:this.$=new n.LogicValue({value:!1});break;case 380:this.$=new n.StringValue({value:a[o].substr(1,a[o].length-2).replace(/(\\\')/g,"'").replace(/(\'\')/g,"'")});break;case 381:this.$=new n.StringValue({value:a[o].substr(2,a[o].length-3).replace(/(\\\')/g,"'").replace(/(\'\')/g,"'")});break;case 382:this.$=new n.NullValue({value:void 0});break;case 383:this.$=new n.VarValue({variable:a[o]});break;case 384:n.exists||(n.exists=[]),this.$=new n.ExistsValue({value:a[o-1],existsidx:n.exists.length}),n.exists.push(a[o-1]);break;case 385:this.$=new n.ArrayValue({value:a[o-1]});break;case 386:case 387:this.$=new n.ParamValue({param:a[o]});break;case 388:typeof n.question>"u"&&(n.question=0),this.$=new n.ParamValue({param:n.question++});break;case 389:typeof n.question>"u"&&(n.question=0),this.$=new n.ParamValue({param:n.question++,array:!0});break;case 390:this.$=new n.CaseValue({expression:a[o-3],whens:a[o-2],elses:a[o-1]});break;case 391:this.$=new n.CaseValue({whens:a[o-2],elses:a[o-1]});break;case 392:case 741:case 742:this.$=a[o-1],this.$.push(a[o]);break;case 394:this.$={when:a[o-2],then:a[o]};break;case 397:case 398:this.$=new n.Op({left:a[o-2],op:"REGEXP",right:a[o]});break;case 399:this.$=new n.Op({left:a[o-2],op:"GLOB",right:a[o]});break;case 400:this.$=new n.Op({left:a[o-2],op:"LIKE",right:a[o]});break;case 401:this.$=new n.Op({left:a[o-4],op:"LIKE",right:a[o-2],escape:a[o]});break;case 402:this.$=new n.Op({left:a[o-2],op:"NOT LIKE",right:a[o]});break;case 403:this.$=new n.Op({left:a[o-4],op:"NOT LIKE",right:a[o-2],escape:a[o]});break;case 404:this.$=new n.Op({left:a[o-2],op:"||",right:a[o]});break;case 405:this.$=new n.Op({left:a[o-2],op:"+",right:a[o]});break;case 406:this.$=new n.Op({left:a[o-2],op:"-",right:a[o]});break;case 407:this.$=new n.Op({left:a[o-2],op:"*",right:a[o]});break;case 408:this.$=new n.Op({left:a[o-2],op:"/",right:a[o]});break;case 409:this.$=new n.Op({left:a[o-2],op:"%",right:a[o]});break;case 410:this.$=new n.Op({left:a[o-2],op:"^",right:a[o]});break;case 411:this.$=new n.Op({left:a[o-2],op:">>",right:a[o]});break;case 412:this.$=new n.Op({left:a[o-2],op:"<<",right:a[o]});break;case 413:this.$=new n.Op({left:a[o-2],op:"&",right:a[o]});break;case 414:this.$=new n.Op({left:a[o-2],op:"|",right:a[o]});break;case 415:case 416:case 418:this.$=new n.Op({left:a[o-2],op:"->",right:a[o]});break;case 417:this.$=new n.Op({left:a[o-4],op:"->",right:a[o-1]});break;case 419:case 420:case 422:this.$=new n.Op({left:a[o-2],op:"!",right:a[o]});break;case 421:this.$=new n.Op({left:a[o-4],op:"!",right:a[o-1]});break;case 423:this.$=new n.Op({left:a[o-2],op:">",right:a[o]});break;case 424:this.$=new n.Op({left:a[o-2],op:">=",right:a[o]});break;case 425:this.$=new n.Op({left:a[o-2],op:"<",right:a[o]});break;case 426:this.$=new n.Op({left:a[o-2],op:"<=",right:a[o]});break;case 427:this.$=new n.Op({left:a[o-2],op:"=",right:a[o]});break;case 428:this.$=new n.Op({left:a[o-2],op:"==",right:a[o]});break;case 429:this.$=new n.Op({left:a[o-2],op:"===",right:a[o]});break;case 430:this.$=new n.Op({left:a[o-2],op:"!=",right:a[o]});break;case 431:this.$=new n.Op({left:a[o-2],op:"!==",right:a[o]});break;case 432:this.$=new n.Op({left:a[o-2],op:"!===",right:a[o]});break;case 433:n.queries||(n.queries=[]);var m=n.queries.slice();n.queries=[],m.length>0&&(a[o-1].queries=m),n.queries.push(a[o-1]),this.$=new n.Op({left:a[o-5],op:a[o-4],allsome:a[o-3],right:a[o-1],queriesidx:n.queries.length-1});break;case 434:this.$=new n.Op({left:a[o-5],op:a[o-4],allsome:a[o-3],right:a[o-1]});break;case 435:this.$=new n.Op("BETWEEN1"==a[o-2].op?"AND"==a[o-2].left.op?{left:a[o-2].left.left,op:"AND",right:new n.Op({left:a[o-2].left.right,op:"BETWEEN",right1:a[o-2].right,right2:a[o]})}:{left:a[o-2].left,op:"BETWEEN",right1:a[o-2].right,right2:a[o]}:"NOT BETWEEN1"==a[o-2].op?"AND"==a[o-2].left.op?{left:a[o-2].left.left,op:"AND",right:new n.Op({left:a[o-2].left.right,op:"NOT BETWEEN",right1:a[o-2].right,right2:a[o]})}:{left:a[o-2].left,op:"NOT BETWEEN",right1:a[o-2].right,right2:a[o]}:{left:a[o-2],op:"AND",right:a[o]});break;case 436:this.$=new n.Op({left:a[o-2],op:"OR",right:a[o]});break;case 437:this.$=new n.UniOp({op:"NOT",right:a[o]});break;case 438:this.$=new n.UniOp({op:"-",right:a[o]});break;case 439:this.$=new n.UniOp({op:"+",right:a[o]});break;case 440:this.$=new n.UniOp({op:"~",right:a[o]});break;case 441:this.$=new n.UniOp({op:"#",right:a[o]});break;case 442:this.$=new n.UniOp({right:a[o-1]});break;case 443:n.queries||(n.queries=[]),m=n.queries.slice(),n.queries=[],m.length>0&&(a[o-1].queries=m),n.queries.push(a[o-1]),this.$=new n.Op({left:a[o-4],op:"IN",right:a[o-1],queriesidx:n.queries.length-1});break;case 444:n.queries||(n.queries=[]),m=n.queries.slice(),n.queries=[],m.length>0&&(a[o-1].queries=m),n.queries.push(a[o-1]),this.$=new n.Op({left:a[o-5],op:"NOT IN",right:a[o-1],queriesidx:n.queries.length-1});break;case 445:this.$=new n.Op({left:a[o-4],op:"IN",right:a[o-1]});break;case 446:this.$=new n.Op({left:a[o-5],op:"NOT IN",right:a[o-1]});break;case 447:this.$=new n.Op({left:a[o-3],op:"IN",right:[]});break;case 448:this.$=new n.Op({left:a[o-4],op:"NOT IN",right:[]});break;case 449:case 451:this.$=new n.Op({left:a[o-2],op:"IN",right:a[o]});break;case 450:case 452:this.$=new n.Op({left:a[o-3],op:"NOT IN",right:a[o]});break;case 453:this.$=new n.Op({left:a[o-2],op:"BETWEEN1",right:a[o]});break;case 454:this.$=new n.Op({left:a[o-2],op:"NOT BETWEEN1",right:a[o]});break;case 455:this.$=new n.Op({op:"IS",left:a[o-2],right:a[o]});break;case 456:this.$=new n.Op({op:"IS",left:a[o-2],right:new n.UniOp({op:"NOT",right:new n.NullValue({value:void 0})})});break;case 457:this.$=new n.Convert({expression:a[o-2]}),n.extend(this.$,a[o]);break;case 467:this.$="ALL";break;case 468:this.$="SOME";break;case 469:this.$="ANY";break;case 470:this.$=new n.Update({table:a[o-5],columns:a[o-3],where:a[o-1]}),n.extend(this.$,a[o]);break;case 471:this.$=new n.Update({table:a[o-3],columns:a[o-1]}),n.extend(this.$,a[o]);break;case 474:this.$=new n.SetColumn({column:a[o-2],expression:a[o]});break;case 475:this.$=new n.SetColumn({variable:a[o-2],expression:a[o],method:a[o-3]});break;case 476:this.$=new n.Delete({table:a[o-3],where:a[o-1]}),n.extend(this.$,a[o]);break;case 477:this.$=new n.Delete({table:a[o-1]}),n.extend(this.$,a[o]);break;case 478:this.$=new n.Insert({into:a[o-3],values:a[o-1]}),n.extend(this.$,a[o]);break;case 479:this.$=new n.Insert({into:a[o-2],values:a[o-1]}),n.extend(this.$,a[o]);break;case 480:this.$=new n.Insert({into:a[o-3],values:a[o-1],ignore:!0}),n.extend(this.$,a[o]);break;case 481:this.$=new n.Insert({into:a[o-2],values:a[o-1],ignore:!0}),n.extend(this.$,a[o]);break;case 482:this.$=new n.Insert({into:a[o-6],columns:a[o-4],values:a[o-1],ignore:!0}),n.extend(this.$,a[o]);break;case 483:this.$=new n.Insert({into:a[o-5],columns:a[o-3],values:a[o-1],ignore:!0}),n.extend(this.$,a[o]);break;case 484:this.$=new n.Insert({into:a[o-2],select:a[o-1],ignore:!0}),n.extend(this.$,a[o]);break;case 485:this.$=new n.Insert({into:a[o-5],columns:a[o-3],select:a[o-1],ignore:!0}),n.extend(this.$,a[o]);break;case 486:case 488:this.$=new n.Insert({into:a[o-3],values:a[o-1],orreplace:!0}),n.extend(this.$,a[o]);break;case 487:case 489:this.$=new n.Insert({into:a[o-2],values:a[o-1],orreplace:!0}),n.extend(this.$,a[o]);break;case 490:this.$=new n.Insert({into:a[o-3],default:!0}),n.extend(this.$,a[o]);break;case 491:this.$=new n.Insert({into:a[o-6],columns:a[o-4],values:a[o-1]}),n.extend(this.$,a[o]);break;case 492:this.$=new n.Insert({into:a[o-5],columns:a[o-3],values:a[o-1]}),n.extend(this.$,a[o]);break;case 493:this.$=new n.Insert({into:a[o-2],select:a[o-1]}),n.extend(this.$,a[o]);break;case 494:this.$=new n.Insert({into:a[o-2],select:a[o-1],orreplace:!0}),n.extend(this.$,a[o]);break;case 495:this.$=new n.Insert({into:a[o-5],columns:a[o-3],select:a[o-1]}),n.extend(this.$,a[o]);break;case 496:this.$=new n.Insert({into:a[o-3],setcolumns:a[o-1]}),n.extend(this.$,a[o]);break;case 501:this.$=[a[o-1]];break;case 504:this.$=a[o-4],a[o-4].push(a[o-1]);break;case 517:this.$=new n.CreateTable({table:a[o-4]}),n.extend(this.$,a[o-7]),n.extend(this.$,a[o-6]),n.extend(this.$,a[o-5]),n.extend(this.$,a[o-2]),n.extend(this.$,a[o]);break;case 518:this.$=new n.CreateTable({table:a[o]}),n.extend(this.$,a[o-3]),n.extend(this.$,a[o-2]),n.extend(this.$,a[o-1]);break;case 520:this.$={class:!0};break;case 530:this.$={temporary:!0};break;case 532:this.$={ifnotexists:!0};break;case 533:this.$={columns:a[o-2],constraints:a[o]};break;case 534:this.$={columns:a[o]};break;case 535:this.$={as:a[o]};break;case 538:case 539:case 540:case 541:case 542:a[o].constraintid=a[o-1],this.$=a[o];break;case 545:this.$={type:"CHECK",expression:a[o-1]};break;case 546:this.$={type:"PRIMARY KEY",columns:a[o-1],clustered:(a[o-3]+"").toUpperCase()};break;case 547:this.$={type:"FOREIGN KEY",columns:a[o-5],fktable:a[o-2],fkcolumns:a[o-1]},n.extend(this.$,a[o]);break;case 549:case 675:this.$={};break;case 550:this.$={ondelete:a[o]};break;case 551:case 597:this.$={onupdate:a[o]};break;case 552:this.$={ondelete:a[o-1],onupdate:a[o]};break;case 553:this.$={ondelete:a[o],onupdate:a[o-1]};break;case 556:this.$="CASCADE";break;case 557:this.$="SET NULL";break;case 558:this.$="SET DEFAULT";break;case 559:this.$="RESTRICT";break;case 560:this.$="NO ACTION";break;case 561:this.$={type:"UNIQUE",columns:a[o-1],clustered:(a[o-3]+"").toUpperCase()};break;case 562:this.$={type:"INDEX",indexid:a[o-3],columns:a[o-1]};break;case 569:this.$=new n.ColumnDef({columnid:a[o-2]}),n.extend(this.$,a[o-1]),n.extend(this.$,a[o]);break;case 570:this.$=new n.ColumnDef({columnid:a[o-1]}),n.extend(this.$,a[o]);break;case 571:this.$=new n.ColumnDef({columnid:a[o],dbtypeid:""});break;case 572:this.$={dbtypeid:a[o-5],dbsize:a[o-3],dbprecision:+a[o-1]};break;case 573:this.$={dbtypeid:a[o-3],dbsize:a[o-1]};break;case 574:this.$={dbtypeid:a[o]};break;case 575:this.$={dbtypeid:"ENUM",enumvalues:a[o-1]};break;case 576:this.$=a[o-1],a[o-1].dbtypeid+="["+a[o]+"]";break;case 578:case 792:this.$=+a[o];break;case 582:n.extend(a[o-1],a[o]),this.$=a[o-1];break;case 585:this.$={primarykey:!0};break;case 586:case 587:this.$={foreignkey:{table:a[o-2],columnid:a[o-1]}},n.extend(this.$.foreignkey,a[o]);break;case 588:this.$={identity:{value:a[o-3],step:a[o-1]}};break;case 589:this.$={identity:{value:1,step:1}};break;case 590:case 592:this.$={default:a[o]};break;case 591:this.$={default:a[o-1]};break;case 593:this.$={null:!0};break;case 594:this.$={notnull:!0};break;case 595:this.$={check:a[o]};break;case 596:this.$={unique:!0};break;case 598:this.$={onupdate:a[o-1]};break;case 599:this.$=new n.DropTable({tables:a[o],type:a[o-2]}),n.extend(this.$,a[o-1]);break;case 603:this.$={ifexists:!0};break;case 604:this.$=new n.AlterTable({table:a[o-3],renameto:a[o]});break;case 605:this.$=new n.AlterTable({table:a[o-3],addcolumn:a[o]});break;case 606:this.$=new n.AlterTable({table:a[o-3],modifycolumn:a[o]});break;case 607:this.$=new n.AlterTable({table:a[o-5],renamecolumn:a[o-2],to:a[o]});break;case 608:this.$=new n.AlterTable({table:a[o-3],dropcolumn:a[o]});break;case 609:this.$=new n.AlterTable({table:a[o-2],renameto:a[o]});break;case 610:this.$=new n.AttachDatabase({databaseid:a[o],engineid:a[o-2].toUpperCase()});break;case 611:this.$=new n.AttachDatabase({databaseid:a[o-3],engineid:a[o-5].toUpperCase(),args:a[o-1]});break;case 612:this.$=new n.AttachDatabase({databaseid:a[o-2],engineid:a[o-4].toUpperCase(),as:a[o]});break;case 613:this.$=new n.AttachDatabase({databaseid:a[o-5],engineid:a[o-7].toUpperCase(),as:a[o],args:a[o-3]});break;case 614:this.$=new n.DetachDatabase({databaseid:a[o]});break;case 615:this.$=new n.CreateDatabase({databaseid:a[o]}),n.extend(this.$,a[o]);break;case 616:this.$=new n.CreateDatabase({engineid:a[o-4].toUpperCase(),databaseid:a[o-1],as:a[o]}),n.extend(this.$,a[o-2]);break;case 617:this.$=new n.CreateDatabase({engineid:a[o-7].toUpperCase(),databaseid:a[o-4],args:a[o-2],as:a[o]}),n.extend(this.$,a[o-5]);break;case 618:this.$=new n.CreateDatabase({engineid:a[o-4].toUpperCase(),as:a[o],args:[a[o-1]]}),n.extend(this.$,a[o-2]);break;case 621:case 622:this.$=new n.UseDatabase({databaseid:a[o]});break;case 623:this.$=new n.DropDatabase({databaseid:a[o]}),n.extend(this.$,a[o-1]);break;case 624:case 625:this.$=new n.DropDatabase({databaseid:a[o],engineid:a[o-3].toUpperCase()}),n.extend(this.$,a[o-1]);break;case 626:this.$=new n.CreateIndex({indexid:a[o-5],table:a[o-3],columns:a[o-1]});break;case 627:this.$=new n.CreateIndex({indexid:a[o-5],table:a[o-3],columns:a[o-1],unique:!0});break;case 628:this.$=new n.DropIndex({indexid:a[o]});break;case 629:this.$=new n.ShowDatabases;break;case 630:this.$=new n.ShowDatabases({like:a[o]});break;case 631:this.$=new n.ShowDatabases({engineid:a[o-1].toUpperCase()});break;case 632:this.$=new n.ShowDatabases({engineid:a[o-3].toUpperCase(),like:a[o]});break;case 633:this.$=new n.ShowTables;break;case 634:this.$=new n.ShowTables({like:a[o]});break;case 635:this.$=new n.ShowTables({databaseid:a[o]});break;case 636:this.$=new n.ShowTables({like:a[o],databaseid:a[o-2]});break;case 637:this.$=new n.ShowColumns({table:a[o]});break;case 638:this.$=new n.ShowColumns({table:a[o-2],databaseid:a[o]});break;case 639:this.$=new n.ShowIndex({table:a[o]});break;case 640:this.$=new n.ShowIndex({table:a[o-2],databaseid:a[o]});break;case 641:this.$=new n.ShowCreateTable({table:a[o]});break;case 642:this.$=new n.ShowCreateTable({table:a[o-2],databaseid:a[o]});break;case 643:this.$=new n.CreateTable({table:a[o-6],view:!0,select:a[o-1],viewcolumns:a[o-4]}),n.extend(this.$,a[o-9]),n.extend(this.$,a[o-7]);break;case 644:this.$=new n.CreateTable({table:a[o-3],view:!0,select:a[o-1]}),n.extend(this.$,a[o-6]),n.extend(this.$,a[o-4]);break;case 648:this.$=new n.DropTable({tables:a[o],view:!0}),n.extend(this.$,a[o-1]);break;case 649:case 802:this.$=new n.ExpressionStatement({expression:a[o]});break;case 650:this.$=new n.Source({url:a[o].value});break;case 651:this.$=new n.Assert({value:a[o]});break;case 652:this.$=new n.Assert({value:a[o].value});break;case 653:this.$=new n.Assert({value:a[o],message:a[o-2]});break;case 655:case 667:case 669:this.$=a[o].value;break;case 656:case 664:this.$=+a[o].value;break;case 657:this.$=!!a[o].value;break;case 665:this.$=-a[o].value;break;case 666:this.$=""+a[o].value;break;case 678:case 1095:case 1119:case 1121:case 1123:case 1127:case 1129:case 1131:case 1133:case 1135:case 1137:this.$=[];break;case 679:n.extend(a[o-2],a[o]),this.$=a[o-2];break;case 681:this.$={},this.$[a[o-2].substr(1,a[o-2].length-2)]=a[o];break;case 682:case 683:this.$={},this.$[a[o-2]]=a[o];break;case 684:this.$={},this.$[a[o-2].substr(1,a[o-2].length-2)]=-a[o].value;break;case 685:case 686:this.$={},this.$[a[o-2]]=-a[o].value;break;case 689:this.$=new n.SetVariable({variable:a[o-2].toLowerCase(),value:a[o]});break;case 690:this.$=new n.SetVariable({variable:a[o-1].toLowerCase(),value:a[o]});break;case 691:this.$=new n.SetVariable({variable:a[o-2],expression:a[o]});break;case 692:this.$=new n.SetVariable({variable:a[o-3],props:a[o-2],expression:a[o]});break;case 693:this.$=new n.SetVariable({variable:a[o-2],expression:a[o],method:a[o-3]});break;case 694:this.$=new n.SetVariable({variable:a[o-3],props:a[o-2],expression:a[o],method:a[o-4]});break;case 695:this.$="@";break;case 696:this.$="$";break;case 702:this.$=!0;break;case 703:this.$=!1;break;case 704:this.$=new n.CommitTransaction;break;case 705:this.$=new n.RollbackTransaction;break;case 706:this.$=new n.BeginTransaction;break;case 707:this.$=new n.If({expression:a[o-2],thenstat:a[o-1],elsestat:a[o]}),a[o-1].exists&&(this.$.exists=a[o-1].exists),a[o-1].queries&&(this.$.queries=a[o-1].queries);break;case 708:this.$=new n.If({expression:a[o-1],thenstat:a[o]}),a[o].exists&&(this.$.exists=a[o].exists),a[o].queries&&(this.$.queries=a[o].queries);break;case 710:this.$=new n.While({expression:a[o-1],loopstat:a[o]}),a[o].exists&&(this.$.exists=a[o].exists),a[o].queries&&(this.$.queries=a[o].queries);break;case 711:case 712:this.$=new n.Continue;break;case 713:case 714:this.$=new n.Break;break;case 715:this.$=new n.BeginEnd({statements:a[o-1]});break;case 716:this.$=new n.Print({exprs:a[o]});break;case 717:this.$=new n.Print({select:a[o]});break;case 718:this.$=new n.Require({paths:a[o]});break;case 719:this.$=new n.Require({plugins:a[o]});break;case 720:case 721:this.$=a[o].toUpperCase();break;case 722:this.$=new n.Echo({expr:a[o]});break;case 727:this.$=new n.Declare({declares:a[o]});break;case 730:this.$={variable:a[o-1]},n.extend(this.$,a[o]);break;case 731:this.$={variable:a[o-2]},n.extend(this.$,a[o]);break;case 732:this.$={variable:a[o-3],expression:a[o]},n.extend(this.$,a[o-2]);break;case 733:this.$={variable:a[o-4],expression:a[o]},n.extend(this.$,a[o-2]);break;case 734:this.$=new n.TruncateTable({table:a[o]});break;case 735:this.$=new n.Merge,n.extend(this.$,a[o-4]),n.extend(this.$,a[o-3]),n.extend(this.$,a[o-2]),n.extend(this.$,{matches:a[o-1]}),n.extend(this.$,a[o]);break;case 745:this.$={matched:!0,action:a[o]};break;case 746:this.$={matched:!0,expr:a[o-2],action:a[o]};break;case 747:this.$={delete:!0};break;case 748:this.$={update:a[o]};break;case 749:case 750:this.$={matched:!1,bytarget:!0,action:a[o]};break;case 751:case 752:this.$={matched:!1,bytarget:!0,expr:a[o-2],action:a[o]};break;case 753:this.$={matched:!1,bysource:!0,action:a[o]};break;case 754:this.$={matched:!1,bysource:!0,expr:a[o-2],action:a[o]};break;case 755:this.$={insert:!0,values:a[o]};break;case 756:this.$={insert:!0,values:a[o],columns:a[o-3]};break;case 757:this.$={insert:!0,defaultvalues:!0};break;case 758:this.$={insert:!0,defaultvalues:!0,columns:a[o-3]};break;case 760:this.$={output:{columns:a[o]}};break;case 761:this.$={output:{columns:a[o-3],intovar:a[o],method:a[o-1]}};break;case 762:this.$={output:{columns:a[o-2],intotable:a[o]}};break;case 763:this.$={output:{columns:a[o-5],intotable:a[o-3],intocolumns:a[o-1]}};break;case 764:this.$=new n.CreateVertex({class:a[o-3],sharp:a[o-2],name:a[o-1]}),n.extend(this.$,a[o]);break;case 767:this.$={sets:a[o]};break;case 768:this.$={content:a[o]};break;case 769:this.$={select:a[o]};break;case 770:this.$=new n.CreateEdge({from:a[o-3],to:a[o-1],name:a[o-5]}),n.extend(this.$,a[o]);break;case 771:this.$=new n.CreateGraph({graph:a[o]});break;case 772:this.$=new n.CreateGraph({from:a[o]});break;case 775:this.$=a[o-2],a[o-1]&&(this.$.json=new n.Json({value:a[o-1]})),a[o]&&(this.$.as=a[o]);break;case 776:this.$={source:a[o-6],target:a[o]},a[o-3]&&(this.$.json=new n.Json({value:a[o-3]})),a[o-2]&&(this.$.as=a[o-2]),n.extend(this.$,a[o-4]);break;case 777:this.$={source:a[o-5],target:a[o]},a[o-2]&&(this.$.json=new n.Json({value:a[o-3]})),a[o-1]&&(this.$.as=a[o-2]);break;case 778:this.$={source:a[o-2],target:a[o]};break;case 782:this.$={vars:a[o],method:a[o-1]};break;case 785:case 786:var g=a[o-1];this.$={prop:a[o-3],sharp:a[o-2],name:typeof g>"u"?void 0:g.substr(1,g.length-2),class:a[o]};break;case 787:var w=a[o-1];this.$={sharp:a[o-2],name:typeof w>"u"?void 0:w.substr(1,w.length-2),class:a[o]};break;case 788:var y=a[o-1];this.$={name:typeof y>"u"?void 0:y.substr(1,y.length-2),class:a[o]};break;case 789:this.$={class:a[o]};break;case 795:this.$=new n.AddRule({left:a[o-2],right:a[o]});break;case 796:this.$=new n.AddRule({right:a[o]});break;case 799:this.$={termid:a[o]};break;case 800:this.$={termid:a[o-3],args:a[o-1]};break;case 803:this.$=new n.CreateTrigger({trigger:a[o-6],when:a[o-5],action:a[o-4],table:a[o-2],statement:a[o]}),a[o].exists&&(this.$.exists=a[o].exists),a[o].queries&&(this.$.queries=a[o].queries);break;case 804:this.$=new n.CreateTrigger({trigger:a[o-5],when:a[o-4],action:a[o-3],table:a[o-1],funcid:a[o]});break;case 805:this.$=new n.CreateTrigger({trigger:a[o-6],when:a[o-4],action:a[o-3],table:a[o-5],statement:a[o]}),a[o].exists&&(this.$.exists=a[o].exists),a[o].queries&&(this.$.queries=a[o].queries);break;case 806:case 807:case 809:this.$="AFTER";break;case 808:this.$="BEFORE";break;case 810:this.$="INSTEADOF";break;case 811:this.$="INSERT";break;case 812:this.$="DELETE";break;case 813:this.$="UPDATE";break;case 814:this.$=new n.DropTrigger({trigger:a[o]});break;case 815:this.$=new n.Reindex({indexid:a[o]});break;case 1096:case 1114:case 1116:case 1120:case 1122:case 1124:case 1128:case 1130:case 1132:case 1134:case 1136:case 1138:a[o-1].push(a[o])}},table:[e([14,639,798],i,{12:1,13:2,16:3,17:4,21:5,22:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:18,34:19,35:20,36:21,37:22,38:23,39:24,40:25,41:26,42:27,43:28,44:29,45:30,46:31,47:32,48:33,49:34,50:35,51:36,52:37,53:38,54:39,55:40,56:41,58:43,59:44,60:45,61:46,62:47,63:48,64:49,65:50,66:51,67:52,68:53,69:54,70:55,71:56,72:57,73:58,74:59,75:60,85:75,95:76,543:98,193:102,3:104,2:s,4:n,5:r,6:a,7:o,8:h,9:c,18:u,57:f,76:d,82:p,96:b,133:v,155:E,165:m,198:g,294:w,295:y,322:T,368:S,372:A,373:O,433:R,437:N,438:_,441:C,443:L,445:I,446:k,454:M,455:$,466:x,472:D,474:P,475:U,477:G,478:F,479:B,480:j,481:H,482:V,483:q,487:Y,488:W,491:X,492:z,545:J,546:K,555:Q}),{1:[3]},{14:[1,113],15:114,639:Z,798:tt},e(et,[2,12]),e(et,[2,13]),e(it,[2,16]),e(et,i,{21:5,22:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:18,34:19,35:20,36:21,37:22,38:23,39:24,40:25,41:26,42:27,43:28,44:29,45:30,46:31,47:32,48:33,49:34,50:35,51:36,52:37,53:38,54:39,55:40,56:41,58:43,59:44,60:45,61:46,62:47,63:48,64:49,65:50,66:51,67:52,68:53,69:54,70:55,71:56,72:57,73:58,74:59,75:60,85:75,95:76,543:98,193:102,3:104,16:117,2:s,4:n,5:r,6:a,7:o,8:h,9:c,19:[1,118],57:f,76:d,82:p,96:b,133:v,155:E,165:m,198:g,294:w,295:y,322:T,368:S,372:A,373:O,433:R,437:N,438:_,441:C,443:L,445:I,446:k,454:M,455:$,466:x,472:D,474:P,475:U,477:G,478:F,479:B,480:j,481:H,482:V,483:q,487:Y,488:W,491:X,492:z,545:J,546:K,555:Q}),e(it,[2,18]),e(it,[2,19]),e(it,[2,20]),e(it,[2,21]),e(it,[2,22]),e(it,[2,23]),e(it,[2,24]),e(it,[2,25]),e(it,[2,26]),e(it,[2,27]),e(it,[2,28]),e(it,[2,29]),e(it,[2,30]),e(it,[2,31]),e(it,[2,32]),e(it,[2,33]),e(it,[2,34]),e(it,[2,35]),e(it,[2,36]),e(it,[2,37]),e(it,[2,38]),e(it,[2,39]),e(it,[2,40]),e(it,[2,41]),e(it,[2,42]),e(it,[2,43]),e(it,[2,44]),e(it,[2,45]),e(it,[2,46]),e(it,[2,47]),e(it,[2,48]),e(it,[2,49]),e(it,[2,50]),e(it,[2,51]),e(it,[2,52]),e(it,[2,53]),e(it,[2,54]),e(it,[2,55]),e(it,[2,56]),e(it,[2,57]),e(it,[2,58]),e(it,[2,59]),e(it,[2,60]),e(it,[2,61]),e(it,[2,62]),e(it,[2,63]),e(it,[2,64]),e(it,[2,65]),e(it,[2,66]),e(it,[2,67]),e(it,[2,68]),e(it,[2,69]),e(it,[2,70]),e(it,[2,71]),{388:[1,119]},{2:s,3:120,4:n,5:r,6:a,7:o,8:h,9:c},{2:s,3:122,4:n,5:r,6:a,7:o,8:h,9:c,165:st,209:121,293:nt,322:rt,323:at,324:ot,325:ht,326:lt},e(ct,[2,529],{3:131,383:135,2:s,4:n,5:r,6:a,7:o,8:h,9:c,143:ut,144:ft,196:[1,133],202:[1,132],296:[1,139],297:[1,140],392:[1,141],442:[1,130],511:[1,134],547:[1,138]}),{154:dt,489:142,490:143},{192:[1,145]},{442:[1,146]},{2:s,3:148,4:n,5:r,6:a,7:o,8:h,9:c,139:[1,154],202:[1,149],388:[1,153],434:150,442:[1,147],447:[1,151],547:[1,152]},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:155,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(ie,se,{374:219,180:[1,221],207:ne,377:[1,220]}),e(ie,se,{374:223,207:ne}),{2:s,3:235,4:n,5:r,6:a,7:o,8:h,9:c,82:re,141:ae,152:mt,153:228,154:gt,161:yt,165:st,190:Ot,207:[1,226],208:229,209:231,210:230,211:232,218:225,227:233,229:oe,293:nt,322:rt,323:at,324:ot,325:ht,326:lt,335:Jt,456:204,457:te,461:ee,493:224},{2:s,3:237,4:n,5:r,6:a,7:o,8:h,9:c},{388:[1,238]},e(he,[2,1091],{86:239,115:240,116:le}),e(ce,ue,{92:242,260:243,171:fe,177:de,178:pe}),e(be,[2,1095],{97:247}),{2:s,3:251,4:n,5:r,6:a,7:o,8:h,9:c,199:[1,249],202:[1,252],295:[1,248],388:[1,253],442:[1,250]},{388:[1,254]},{2:s,3:258,4:n,5:r,6:a,7:o,8:h,9:c,77:255,79:256,80:[1,257]},e([339,639,798],i,{16:3,17:4,21:5,22:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:18,34:19,35:20,36:21,37:22,38:23,39:24,40:25,41:26,42:27,43:28,44:29,45:30,46:31,47:32,48:33,49:34,50:35,51:36,52:37,53:38,54:39,55:40,56:41,58:43,59:44,60:45,61:46,62:47,63:48,64:49,65:50,66:51,67:52,68:53,69:54,70:55,71:56,72:57,73:58,74:59,75:60,85:75,95:76,543:98,193:102,3:104,13:260,2:s,4:n,5:r,6:a,7:o,8:h,9:c,18:u,57:f,76:d,82:p,96:b,133:v,155:E,165:m,198:g,294:w,295:y,322:T,368:S,372:A,373:O,433:R,437:N,438:_,441:C,443:L,445:I,446:k,454:M,455:$,466:x,472:D,473:[1,259],474:P,475:U,477:G,478:F,479:B,480:j,481:H,482:V,483:q,487:Y,488:W,491:X,492:z,545:J,546:K,555:Q}),{473:[1,261]},{473:[1,262]},{2:s,3:264,4:n,5:r,6:a,7:o,8:h,9:c,442:[1,263]},{2:s,3:268,4:n,5:r,6:a,7:o,8:h,9:c,152:mt,161:yt,190:Ot,208:266,210:267,231:265,335:Jt},e(ve,[2,323]),{122:269,141:vt,329:Yt},{2:s,3:122,4:n,5:r,6:a,7:o,8:h,9:c,122:275,140:bt,141:[1,272],152:mt,153:270,154:Ee,161:yt,165:st,190:Ot,205:274,209:279,210:278,284:276,285:277,292:me,293:ge,302:271,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,335:Jt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:282,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(it,[2,711]),e(it,[2,712]),e(it,[2,713]),e(it,[2,714]),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,44:284,60:175,82:we,85:75,95:76,96:b,104:285,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,160:283,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,193:102,198:g,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:292,4:n,5:r,6:a,7:o,8:h,9:c,122:289,141:vt,329:Yt,484:287,485:288,486:290,487:ye},{2:s,3:293,4:n,5:r,6:a,7:o,8:h,9:c,152:Te,154:Se,469:294},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:297,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{466:[1,298]},{2:s,3:104,4:n,5:r,6:a,7:o,8:h,9:c,543:300,544:299},{2:s,3:122,4:n,5:r,6:a,7:o,8:h,9:c,165:st,209:301,293:nt,322:rt,323:at,324:ot,325:ht,326:lt},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:302,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(Ae,Oe,{195:306,173:[1,305],194:[1,303],196:[1,304],204:Re}),{44:308,82:p,85:75,95:76,96:b,193:102,198:g},e(Ne,[2,799],{82:[1,309]}),e([2,4,5,6,7,8,9,14,76,82,83,103,108,116,127,137,140,141,146,152,154,161,163,165,171,173,177,178,188,189,190,192,194,196,204,207,229,252,266,267,271,273,281,292,293,294,298,299,301,304,313,314,315,316,317,318,319,320,322,323,324,325,326,327,328,329,330,331,332,335,336,339,343,345,350,457,461,503,639,798],[2,162],{158:[1,310],159:[1,311],199:[1,312],200:[1,313],201:[1,314],202:[1,315],203:[1,316]}),e(_e,[2,1]),e(_e,[2,2]),e(_e,[2,3]),e(_e,[2,4]),e(_e,[2,5]),e(_e,[2,6]),{6:[1,434],7:[1,473],8:[1,350],9:[1,533],10:317,127:[1,476],140:[1,469],181:[1,494],229:[1,426],265:[1,468],266:[1,402],267:[1,437],271:[1,441],281:[1,383],377:[1,417],415:[1,340],416:[1,511],418:[1,322],439:[1,324],447:[1,582],451:[1,503],453:[1,474],454:[1,542],471:[1,472],473:[1,558],478:[1,370],499:[1,448],503:[1,480],509:[1,369],552:[1,334],553:[1,326],554:[1,429],556:[1,318],557:[1,319],558:[1,320],559:[1,321],560:[1,323],561:[1,325],562:[1,327],563:[1,328],564:[1,329],565:[1,330],566:[1,331],567:[1,332],568:[1,333],569:[1,335],570:[1,336],571:[1,337],572:[1,338],573:[1,339],574:[1,341],575:[1,342],576:[1,343],577:[1,344],578:[1,345],579:[1,346],580:[1,347],581:[1,348],582:[1,349],583:[1,351],584:[1,352],585:[1,353],586:[1,354],587:[1,355],588:[1,356],589:[1,357],590:[1,358],591:[1,359],592:[1,360],593:[1,361],594:[1,362],595:[1,363],596:[1,364],597:[1,365],598:[1,366],599:[1,367],600:[1,368],601:[1,371],602:[1,372],603:[1,373],604:[1,374],605:[1,375],606:[1,376],607:[1,377],608:[1,378],609:[1,379],610:[1,380],611:[1,381],612:[1,382],613:[1,384],614:[1,385],615:[1,386],616:[1,387],617:[1,388],618:[1,389],619:[1,390],620:[1,391],621:[1,392],622:[1,393],623:[1,394],624:[1,395],625:[1,396],626:[1,397],627:[1,398],628:[1,399],629:[1,400],630:[1,401],631:[1,403],632:[1,404],633:[1,405],634:[1,406],635:[1,407],636:[1,408],637:[1,409],638:[1,410],639:[1,411],640:[1,412],641:[1,413],642:[1,414],643:[1,415],644:[1,416],645:[1,418],646:[1,419],647:[1,420],648:[1,421],649:[1,422],650:[1,423],651:[1,424],652:[1,425],653:[1,427],654:[1,428],655:[1,430],656:[1,431],657:[1,432],658:[1,433],659:[1,435],660:[1,436],661:[1,438],662:[1,439],663:[1,440],664:[1,442],665:[1,443],666:[1,444],667:[1,445],668:[1,446],669:[1,447],670:[1,449],671:[1,450],672:[1,451],673:[1,452],674:[1,453],675:[1,454],676:[1,455],677:[1,456],678:[1,457],679:[1,458],680:[1,459],681:[1,460],682:[1,461],683:[1,462],684:[1,463],685:[1,464],686:[1,465],687:[1,466],688:[1,467],689:[1,470],690:[1,471],691:[1,475],692:[1,477],693:[1,478],694:[1,479],695:[1,481],696:[1,482],697:[1,483],698:[1,484],699:[1,485],700:[1,486],701:[1,487],702:[1,488],703:[1,489],704:[1,490],705:[1,491],706:[1,492],707:[1,493],708:[1,495],709:[1,496],710:[1,497],711:[1,498],712:[1,499],713:[1,500],714:[1,501],715:[1,502],716:[1,504],717:[1,505],718:[1,506],719:[1,507],720:[1,508],721:[1,509],722:[1,510],723:[1,512],724:[1,513],725:[1,514],726:[1,515],727:[1,516],728:[1,517],729:[1,518],730:[1,519],731:[1,520],732:[1,521],733:[1,522],734:[1,523],735:[1,524],736:[1,525],737:[1,526],738:[1,527],739:[1,528],740:[1,529],741:[1,530],742:[1,531],743:[1,532],744:[1,534],745:[1,535],746:[1,536],747:[1,537],748:[1,538],749:[1,539],750:[1,540],751:[1,541],752:[1,543],753:[1,544],754:[1,545],755:[1,546],756:[1,547],757:[1,548],758:[1,549],759:[1,550],760:[1,551],761:[1,552],762:[1,553],763:[1,554],764:[1,555],765:[1,556],766:[1,557],767:[1,559],768:[1,560],769:[1,561],770:[1,562],771:[1,563],772:[1,564],773:[1,565],774:[1,566],775:[1,567],776:[1,568],777:[1,569],778:[1,570],779:[1,571],780:[1,572],781:[1,573],782:[1,574],783:[1,575],784:[1,576],785:[1,577],786:[1,578],787:[1,579],788:[1,580],789:[1,581],790:[1,583],791:[1,584],792:[1,585],793:[1,586],794:[1,587],795:[1,588],796:[1,589],797:[1,590]},{1:[2,10]},e(et,i,{21:5,22:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:18,34:19,35:20,36:21,37:22,38:23,39:24,40:25,41:26,42:27,43:28,44:29,45:30,46:31,47:32,48:33,49:34,50:35,51:36,52:37,53:38,54:39,55:40,56:41,58:43,59:44,60:45,61:46,62:47,63:48,64:49,65:50,66:51,67:52,68:53,69:54,70:55,71:56,72:57,73:58,74:59,75:60,85:75,95:76,543:98,193:102,3:104,16:591,2:s,4:n,5:r,6:a,7:o,8:h,9:c,57:f,76:d,82:p,96:b,133:v,155:E,165:m,198:g,294:w,295:y,322:T,368:S,372:A,373:O,433:R,437:N,438:_,441:C,443:L,445:I,446:k,454:M,455:$,466:x,472:D,474:P,475:U,477:G,478:F,479:B,480:j,481:H,482:V,483:q,487:Y,488:W,491:X,492:z,545:J,546:K,555:Q}),e(Ce,[2,1089]),e(Ce,[2,1090]),e(et,[2,14]),{20:[1,592]},{2:s,3:268,4:n,5:r,6:a,7:o,8:h,9:c,208:593},{442:[1,594]},e(it,[2,802]),{82:Le},{82:[1,596]},{82:Ie},{82:ke},{82:[1,599]},{82:[1,600]},{82:[1,601]},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:602,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(Me,$e,{385:603,165:xe}),{442:[1,605]},{2:s,3:606,4:n,5:r,6:a,7:o,8:h,9:c},{202:[1,607]},{2:s,3:613,4:n,5:r,6:a,7:o,8:h,9:c,141:De,146:Pe,152:Te,154:Se,161:Ue,192:[1,609],469:620,512:608,513:610,514:611,517:612,521:617,532:614,536:616},{139:[1,624],384:621,388:[1,623],447:[1,622]},{122:626,141:vt,192:[2,1215],329:Yt,510:625},e(Ge,[2,1209],{504:627,3:628,2:s,4:n,5:r,6:a,7:o,8:h,9:c}),{2:s,3:629,4:n,5:r,6:a,7:o,8:h,9:c},{4:[1,630]},{4:[1,631]},e(ct,[2,530]),e(it,[2,727],{78:[1,632]}),e(Fe,[2,728]),{2:s,3:633,4:n,5:r,6:a,7:o,8:h,9:c},{2:s,3:268,4:n,5:r,6:a,7:o,8:h,9:c,152:mt,161:yt,190:Ot,208:266,210:267,231:634,335:Jt},{2:s,3:635,4:n,5:r,6:a,7:o,8:h,9:c},e(Me,Be,{435:636,165:je}),{442:[1,638]},{2:s,3:639,4:n,5:r,6:a,7:o,8:h,9:c},e(Me,Be,{435:640,165:je}),e(Me,Be,{435:641,165:je}),{2:s,3:642,4:n,5:r,6:a,7:o,8:h,9:c},e(He,[2,1203]),e(He,[2,1204]),e(it,i,{21:5,22:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:18,34:19,35:20,36:21,37:22,38:23,39:24,40:25,41:26,42:27,43:28,44:29,45:30,46:31,47:32,48:33,49:34,50:35,51:36,52:37,53:38,54:39,55:40,56:41,58:43,59:44,60:45,61:46,62:47,63:48,64:49,65:50,66:51,67:52,68:53,69:54,70:55,71:56,72:57,73:58,74:59,75:60,85:75,95:76,543:98,193:102,3:104,16:643,123:660,360:672,2:s,4:n,5:r,6:a,7:o,8:h,9:c,57:f,76:d,82:p,96:b,109:Ve,121:qe,124:Ye,125:We,132:Xe,133:ze,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,155:E,163:si,165:m,179:ni,180:ri,188:ai,189:oi,198:g,294:w,295:y,322:T,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,363:Si,364:Ai,365:Oi,366:Ri,368:S,372:A,373:O,433:R,437:N,438:_,441:C,443:L,445:I,446:k,454:M,455:$,466:x,472:D,474:P,475:U,477:G,478:F,479:B,480:j,481:H,482:V,483:q,487:Y,488:W,491:X,492:z,545:J,546:K,555:Q}),e(ve,[2,299]),e(ve,[2,300]),e(ve,[2,301]),e(ve,[2,302]),e(ve,[2,303]),e(ve,[2,304]),e(ve,[2,305]),e(ve,[2,306]),e(ve,[2,307]),e(ve,[2,308]),e(ve,[2,309]),e(ve,[2,310]),e(ve,[2,311]),e(ve,[2,312]),e(ve,[2,313]),e(ve,[2,314]),e(ve,[2,315]),e(ve,[2,316]),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,30:689,31:688,40:684,44:683,60:175,82:we,85:75,95:76,96:b,104:686,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,193:102,198:g,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,291:685,292:Lt,293:It,294:w,295:Ni,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:_i,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,373:O,456:204,457:te,461:ee},e(ve,[2,320]),e(ve,[2,321]),e(Ci,[2,322],{82:ke}),{82:[1,691]},{82:[1,692]},e([2,4,5,6,7,8,9,14,57,76,78,81,83,96,103,105,108,109,116,121,124,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],Li,{82:Le,125:[1,693]}),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:694,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:695,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:696,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:697,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:698,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(Ii,ki,{125:[1,699]}),e(Ii,Mi,{125:[1,700]}),e(ve,[2,289]),e([2,4,5,6,7,8,9,14,57,76,78,81,82,83,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,229,242,243,244,245,246,247,248,249,250,251,252,259,266,267,268,269,271,273,275,281,292,293,294,295,298,299,301,304,313,314,315,316,317,318,319,320,322,323,324,325,326,327,328,329,330,331,332,333,335,336,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,378,391,403,404,407,408,433,437,438,441,443,445,446,452,454,455,457,461,463,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798,799,800],[2,377]),e($i,[2,378]),e($i,[2,379]),e($i,xi),e($i,[2,381]),e([2,4,5,6,7,8,9,14,57,76,78,81,82,83,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,250,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,330,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,378,391,403,404,407,408,433,437,438,441,443,445,446,454,455,457,461,463,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],[2,382]),{2:s,3:702,4:n,5:r,6:a,7:o,8:h,9:c,140:[1,703],334:701},{2:s,3:704,4:n,5:r,6:a,7:o,8:h,9:c},e(Di,[2,388]),e(Di,[2,389]),{2:s,3:705,4:n,5:r,6:a,7:o,8:h,9:c,82:Pi,122:707,140:bt,141:vt,152:mt,161:yt,190:Ot,205:708,210:710,284:709,327:Vt,328:qt,329:Yt,335:Jt,456:711,461:ee},{82:[1,712]},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:713,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,337:714,340:715,341:Ui,345:Qt,350:Zt,456:204,457:te,461:ee},{82:[1,717]},{82:[1,718]},e(Gi,[2,659]),{2:s,3:734,4:n,5:r,6:a,7:o,8:h,9:c,82:Fi,120:729,122:727,140:bt,141:vt,152:mt,153:723,154:Ee,161:yt,165:st,190:Ot,205:725,209:732,210:731,229:Bi,281:ji,284:728,285:730,293:nt,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,333:[1,721],335:Jt,350:Hi,456:204,457:te,458:719,459:722,460:724,461:ee,464:720},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:285,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,160:737,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:738,4:n,5:r,6:a,7:o,8:h,9:c,165:st,209:739,293:nt,322:rt,323:at,324:ot,325:ht,326:lt},{82:[2,353]},{82:[2,354]},{82:[2,355]},{82:[2,356]},{82:[2,357]},{82:[2,358]},{82:[2,359]},{82:[2,360]},{82:[2,361]},{82:[2,362]},{2:s,3:745,4:n,5:r,6:a,7:o,8:h,9:c,140:Vi,141:qi,462:740,463:[1,741],465:742},{2:s,3:268,4:n,5:r,6:a,7:o,8:h,9:c,152:mt,161:yt,190:Ot,208:266,210:267,231:746,335:Jt},e(ie,se,{374:747,207:ne}),{322:[1,748]},e(ie,[2,500]),{2:s,3:268,4:n,5:r,6:a,7:o,8:h,9:c,152:mt,161:yt,190:Ot,208:266,210:267,231:749,335:Jt},{251:[1,751],494:750},{251:[2,736]},{2:s,3:235,4:n,5:r,6:a,7:o,8:h,9:c,82:re,141:ae,152:mt,153:228,154:gt,161:yt,165:st,190:Ot,208:229,209:231,210:230,211:232,218:752,227:233,229:oe,293:nt,322:rt,323:at,324:ot,325:ht,326:lt,335:Jt,456:204,457:te,461:ee},{44:753,82:p,85:75,95:76,96:b,193:102,198:g},e(Yi,[2,1145],{220:754,81:[1,755]}),e(Wi,[2,1149],{222:756,230:758,3:759,2:s,4:n,5:r,6:a,7:o,8:h,9:c,81:Xi,163:[1,757]}),e(Wi,[2,1151],{3:759,224:761,230:762,2:s,4:n,5:r,6:a,7:o,8:h,9:c,81:Xi}),e(Wi,[2,1153],{3:759,225:763,230:764,2:s,4:n,5:r,6:a,7:o,8:h,9:c,81:Xi}),e(Wi,[2,1155],{3:759,226:765,230:766,2:s,4:n,5:r,6:a,7:o,8:h,9:c,81:Xi}),e(Wi,[2,1157],{3:759,228:767,230:768,2:s,4:n,5:r,6:a,7:o,8:h,9:c,81:Xi}),e(Wi,[2,198]),e([2,4,5,6,7,8,9,14,76,78,81,83,103,108,127,137,163,171,177,178,192,215,217,242,243,244,245,246,247,248,249,250,251,252,271,273,339,343,503,639,798],zi,{82:Le,125:Ji}),e([2,4,5,6,7,8,9,14,76,78,81,83,103,108,127,137,171,177,178,215,217,242,243,244,245,246,247,248,249,250,251,252,271,273,339,343,503,639,798],[2,201]),e(it,[2,815]),{2:s,3:268,4:n,5:r,6:a,7:o,8:h,9:c,208:770},e(Ki,Qi,{87:771,207:Zi}),e(he,[2,1092]),e(ts,[2,1109],{117:773,199:[1,774]}),e(es,is,{93:775,127:ss}),{82:p,85:780,95:779,99:778,193:102,198:g,261:777},e(ns,[2,250],{173:[1,781],262:[1,782]}),e(ns,[2,252],{262:[1,783]}),e(ns,[2,253],{262:[1,784]}),e([14,83,192,339,343,503,639,798],Qi,{456:204,87:785,126:786,3:787,123:790,153:812,167:822,169:823,2:s,4:n,5:r,6:a,7:o,8:h,9:c,76:rs,81:as,82:os,121:hs,124:Ye,125:We,127:ls,131:cs,132:us,133:fs,137:ds,138:ps,139:bs,140:vs,141:Es,142:ms,143:gs,144:ws,145:ys,146:Ts,147:Ss,148:As,149:Os,150:Rs,151:Ns,152:_s,154:Cs,155:Ls,157:Is,158:ks,159:Ms,161:$s,163:xs,165:Ds,171:Ps,173:Us,175:Gs,177:Fs,178:Bs,179:js,180:Hs,181:Vs,182:qs,184:Ys,194:Ws,196:Xs,207:Zi,266:Nt,267:_t,304:zs,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,457:te,461:ee}),{388:[1,837]},{192:[1,838]},e(it,[2,629],{121:[1,839]}),{442:[1,840]},{192:[1,841]},e(it,[2,633],{121:[1,842],192:[1,843]}),{2:s,3:268,4:n,5:r,6:a,7:o,8:h,9:c,208:844},{44:845,78:[1,846],82:p,85:75,95:76,96:b,193:102,198:g},e(Js,[2,75]),{2:s,3:258,4:n,5:r,6:a,7:o,8:h,9:c,79:847},{81:[1,848],82:[1,849]},e(it,[2,706]),{15:114,339:[1,850],639:Z,798:tt},e(it,[2,704]),e(it,[2,705]),{2:s,3:851,4:n,5:r,6:a,7:o,8:h,9:c},e(it,[2,622]),{155:[1,852]},e(Ks,[2,204]),e(Ks,[2,205]),e([2,4,5,6,7,8,9,14,57,76,78,81,82,83,96,105,133,137,152,154,155,157,158,161,163,165,190,192,196,198,250,294,295,322,330,335,339,343,368,372,373,378,379,391,403,404,407,408,433,437,438,439,440,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,545,546,552,553,554,555,639,798],zi,{125:Ji}),e(it,[2,650]),e(it,[2,651]),e(it,[2,652]),e(it,xi,{78:[1,853]}),{82:Pi,122:707,140:bt,141:vt,152:mt,161:yt,190:Ot,205:708,210:710,284:709,327:Vt,328:qt,329:Yt,335:Jt,456:711,461:ee},e(Qs,[2,332]),e(Qs,[2,333]),e(Qs,[2,334]),e(Qs,[2,335]),e(Qs,[2,336]),e(Qs,[2,337]),e(Qs,[2,338]),e(Qs,[2,339],{82:ke}),e(it,i,{21:5,22:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:18,34:19,35:20,36:21,37:22,38:23,39:24,40:25,41:26,42:27,43:28,44:29,45:30,46:31,47:32,48:33,49:34,50:35,51:36,52:37,53:38,54:39,55:40,56:41,58:43,59:44,60:45,61:46,62:47,63:48,64:49,65:50,66:51,67:52,68:53,69:54,70:55,71:56,72:57,73:58,74:59,75:60,85:75,95:76,543:98,193:102,3:104,123:660,360:672,16:854,2:s,4:n,5:r,6:a,7:o,8:h,9:c,57:f,76:d,82:p,96:b,109:Ve,121:qe,124:Ye,125:We,132:Xe,133:ze,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,155:E,163:si,165:m,179:ni,180:ri,188:ai,189:oi,198:g,294:w,295:y,322:T,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,363:Si,364:Ai,365:Oi,366:Ri,368:S,372:A,373:O,433:R,437:N,438:_,441:C,443:L,445:I,446:k,454:M,455:$,466:x,472:D,474:P,475:U,477:G,478:F,479:B,480:j,481:H,482:V,483:q,487:Y,488:W,491:X,492:z,545:J,546:K,555:Q}),e(it,[2,716],{78:Zs}),e(it,[2,717]),e(tn,[2,375],{123:660,360:672,109:Ve,121:qe,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,363:Si,364:Ai,365:Oi,366:Ri}),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,30:689,31:688,40:684,44:857,60:175,82:we,85:75,95:76,96:b,104:686,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,193:102,198:g,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,291:685,292:Lt,293:It,294:w,295:Ni,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:_i,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,373:O,456:204,457:te,461:ee},e(it,[2,718],{78:[1,858]}),e(it,[2,719],{78:[1,859]}),e(Fe,[2,724]),e(Fe,[2,726]),e(Fe,[2,720]),e(Fe,[2,721]),{123:865,124:Ye,125:We,133:[1,860],250:sn,467:861,468:862,471:nn},{2:s,3:866,4:n,5:r,6:a,7:o,8:h,9:c},e(Me,[2,695]),e(Me,[2,696]),e(it,[2,649],{123:660,360:672,109:Ve,121:qe,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,363:Si,364:Ai,365:Oi,366:Ri}),{2:s,3:104,4:n,5:r,6:a,7:o,8:h,9:c,543:300,544:867},e(it,[2,796],{78:rn}),e(an,[2,798]),e(it,[2,801]),e(it,[2,722],{123:660,360:672,109:Ve,121:qe,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,363:Si,364:Ai,365:Oi,366:Ri}),e(on,Oe,{195:869,204:Re}),e(on,Oe,{195:870,204:Re}),e(on,Oe,{195:871,204:Re}),e(hn,[2,1139],{282:156,209:157,283:158,120:159,280:160,205:161,284:162,122:163,285:164,210:165,211:166,286:167,287:168,288:169,153:171,289:172,290:173,60:175,167:178,3:180,456:204,197:872,183:873,279:874,104:875,2:s,4:n,5:r,6:a,7:o,8:h,9:c,82:pt,140:bt,141:vt,146:Et,152:mt,154:gt,158:wt,161:yt,163:Tt,165:st,188:St,189:At,190:Ot,229:Rt,266:Nt,267:_t,281:Ct,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,457:te,461:ee}),{82:[1,877],140:bt,205:876},{83:[1,878]},{2:s,3:104,4:n,5:r,6:a,7:o,8:h,9:c,543:300,544:879},e(ln,[2,163]),e(ln,[2,164]),e(ln,[2,165]),e(ln,[2,166]),e(ln,[2,167]),e(ln,[2,168]),e(ln,[2,169]),e(_e,[2,7]),e(_e,[2,816]),e(_e,[2,817]),e(_e,[2,818]),e(_e,[2,819]),e(_e,[2,820]),e(_e,[2,821]),e(_e,[2,822]),e(_e,[2,823]),e(_e,[2,824]),e(_e,[2,825]),e(_e,[2,826]),e(_e,[2,827]),e(_e,[2,828]),e(_e,[2,829]),e(_e,[2,830]),e(_e,[2,831]),e(_e,[2,832]),e(_e,[2,833]),e(_e,[2,834]),e(_e,[2,835]),e(_e,[2,836]),e(_e,[2,837]),e(_e,[2,838]),e(_e,[2,839]),e(_e,[2,840]),e(_e,[2,841]),e(_e,[2,842]),e(_e,[2,843]),e(_e,[2,844]),e(_e,[2,845]),e(_e,[2,846]),e(_e,[2,847]),e(_e,[2,848]),e(_e,[2,849]),e(_e,[2,850]),e(_e,[2,851]),e(_e,[2,852]),e(_e,[2,853]),e(_e,[2,854]),e(_e,[2,855]),e(_e,[2,856]),e(_e,[2,857]),e(_e,[2,858]),e(_e,[2,859]),e(_e,[2,860]),e(_e,[2,861]),e(_e,[2,862]),e(_e,[2,863]),e(_e,[2,864]),e(_e,[2,865]),e(_e,[2,866]),e(_e,[2,867]),e(_e,[2,868]),e(_e,[2,869]),e(_e,[2,870]),e(_e,[2,871]),e(_e,[2,872]),e(_e,[2,873]),e(_e,[2,874]),e(_e,[2,875]),e(_e,[2,876]),e(_e,[2,877]),e(_e,[2,878]),e(_e,[2,879]),e(_e,[2,880]),e(_e,[2,881]),e(_e,[2,882]),e(_e,[2,883]),e(_e,[2,884]),e(_e,[2,885]),e(_e,[2,886]),e(_e,[2,887]),e(_e,[2,888]),e(_e,[2,889]),e(_e,[2,890]),e(_e,[2,891]),e(_e,[2,892]),e(_e,[2,893]),e(_e,[2,894]),e(_e,[2,895]),e(_e,[2,896]),e(_e,[2,897]),e(_e,[2,898]),e(_e,[2,899]),e(_e,[2,900]),e(_e,[2,901]),e(_e,[2,902]),e(_e,[2,903]),e(_e,[2,904]),e(_e,[2,905]),e(_e,[2,906]),e(_e,[2,907]),e(_e,[2,908]),e(_e,[2,909]),e(_e,[2,910]),e(_e,[2,911]),e(_e,[2,912]),e(_e,[2,913]),e(_e,[2,914]),e(_e,[2,915]),e(_e,[2,916]),e(_e,[2,917]),e(_e,[2,918]),e(_e,[2,919]),e(_e,[2,920]),e(_e,[2,921]),e(_e,[2,922]),e(_e,[2,923]),e(_e,[2,924]),e(_e,[2,925]),e(_e,[2,926]),e(_e,[2,927]),e(_e,[2,928]),e(_e,[2,929]),e(_e,[2,930]),e(_e,[2,931]),e(_e,[2,932]),e(_e,[2,933]),e(_e,[2,934]),e(_e,[2,935]),e(_e,[2,936]),e(_e,[2,937]),e(_e,[2,938]),e(_e,[2,939]),e(_e,[2,940]),e(_e,[2,941]),e(_e,[2,942]),e(_e,[2,943]),e(_e,[2,944]),e(_e,[2,945]),e(_e,[2,946]),e(_e,[2,947]),e(_e,[2,948]),e(_e,[2,949]),e(_e,[2,950]),e(_e,[2,951]),e(_e,[2,952]),e(_e,[2,953]),e(_e,[2,954]),e(_e,[2,955]),e(_e,[2,956]),e(_e,[2,957]),e(_e,[2,958]),e(_e,[2,959]),e(_e,[2,960]),e(_e,[2,961]),e(_e,[2,962]),e(_e,[2,963]),e(_e,[2,964]),e(_e,[2,965]),e(_e,[2,966]),e(_e,[2,967]),e(_e,[2,968]),e(_e,[2,969]),e(_e,[2,970]),e(_e,[2,971]),e(_e,[2,972]),e(_e,[2,973]),e(_e,[2,974]),e(_e,[2,975]),e(_e,[2,976]),e(_e,[2,977]),e(_e,[2,978]),e(_e,[2,979]),e(_e,[2,980]),e(_e,[2,981]),e(_e,[2,982]),e(_e,[2,983]),e(_e,[2,984]),e(_e,[2,985]),e(_e,[2,986]),e(_e,[2,987]),e(_e,[2,988]),e(_e,[2,989]),e(_e,[2,990]),e(_e,[2,991]),e(_e,[2,992]),e(_e,[2,993]),e(_e,[2,994]),e(_e,[2,995]),e(_e,[2,996]),e(_e,[2,997]),e(_e,[2,998]),e(_e,[2,999]),e(_e,[2,1e3]),e(_e,[2,1001]),e(_e,[2,1002]),e(_e,[2,1003]),e(_e,[2,1004]),e(_e,[2,1005]),e(_e,[2,1006]),e(_e,[2,1007]),e(_e,[2,1008]),e(_e,[2,1009]),e(_e,[2,1010]),e(_e,[2,1011]),e(_e,[2,1012]),e(_e,[2,1013]),e(_e,[2,1014]),e(_e,[2,1015]),e(_e,[2,1016]),e(_e,[2,1017]),e(_e,[2,1018]),e(_e,[2,1019]),e(_e,[2,1020]),e(_e,[2,1021]),e(_e,[2,1022]),e(_e,[2,1023]),e(_e,[2,1024]),e(_e,[2,1025]),e(_e,[2,1026]),e(_e,[2,1027]),e(_e,[2,1028]),e(_e,[2,1029]),e(_e,[2,1030]),e(_e,[2,1031]),e(_e,[2,1032]),e(_e,[2,1033]),e(_e,[2,1034]),e(_e,[2,1035]),e(_e,[2,1036]),e(_e,[2,1037]),e(_e,[2,1038]),e(_e,[2,1039]),e(_e,[2,1040]),e(_e,[2,1041]),e(_e,[2,1042]),e(_e,[2,1043]),e(_e,[2,1044]),e(_e,[2,1045]),e(_e,[2,1046]),e(_e,[2,1047]),e(_e,[2,1048]),e(_e,[2,1049]),e(_e,[2,1050]),e(_e,[2,1051]),e(_e,[2,1052]),e(_e,[2,1053]),e(_e,[2,1054]),e(_e,[2,1055]),e(_e,[2,1056]),e(_e,[2,1057]),e(_e,[2,1058]),e(_e,[2,1059]),e(_e,[2,1060]),e(_e,[2,1061]),e(_e,[2,1062]),e(_e,[2,1063]),e(_e,[2,1064]),e(_e,[2,1065]),e(_e,[2,1066]),e(_e,[2,1067]),e(_e,[2,1068]),e(_e,[2,1069]),e(_e,[2,1070]),e(_e,[2,1071]),e(_e,[2,1072]),e(_e,[2,1073]),e(_e,[2,1074]),e(_e,[2,1075]),e(_e,[2,1076]),e(_e,[2,1077]),e(_e,[2,1078]),e(_e,[2,1079]),e(_e,[2,1080]),e(_e,[2,1081]),e(_e,[2,1082]),e(_e,[2,1083]),e(_e,[2,1084]),e(_e,[2,1085]),e(_e,[2,1086]),e(_e,[2,1087]),e(_e,[2,1088]),e(et,[2,11]),e(et,i,{21:5,22:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:18,34:19,35:20,36:21,37:22,38:23,39:24,40:25,41:26,42:27,43:28,44:29,45:30,46:31,47:32,48:33,49:34,50:35,51:36,52:37,53:38,54:39,55:40,56:41,58:43,59:44,60:45,61:46,62:47,63:48,64:49,65:50,66:51,67:52,68:53,69:54,70:55,71:56,72:57,73:58,74:59,75:60,85:75,95:76,543:98,193:102,3:104,16:880,2:s,4:n,5:r,6:a,7:o,8:h,9:c,57:f,76:d,82:p,96:b,133:v,155:E,165:m,198:g,294:w,295:y,322:T,368:S,372:A,373:O,433:R,437:N,438:_,441:C,443:L,445:I,446:k,454:M,455:$,466:x,472:D,474:P,475:U,477:G,478:F,479:B,480:j,481:H,482:V,483:q,487:Y,488:W,491:X,492:z,545:J,546:K,555:Q}),{433:[1,884],438:[1,881],439:[1,882],440:[1,883]},{2:s,3:885,4:n,5:r,6:a,7:o,8:h,9:c},e(on,[2,1185],{321:886,801:888,83:[1,887],173:[1,890],194:[1,889]}),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:285,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,160:891,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:285,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,160:892,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{83:[1,893]},{2:s,3:894,4:n,5:r,6:a,7:o,8:h,9:c,141:[1,895]},{2:s,3:896,4:n,5:r,6:a,7:o,8:h,9:c,141:[1,897]},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:898,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:899,4:n,5:r,6:a,7:o,8:h,9:c,109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},{2:s,3:900,4:n,5:r,6:a,7:o,8:h,9:c},{163:[1,901]},e(cn,$e,{385:902,165:xe}),{250:[1,903]},{2:s,3:904,4:n,5:r,6:a,7:o,8:h,9:c},e(it,[2,771],{78:un}),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:906,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(an,[2,774]),e(fn,[2,1217],{456:204,515:907,153:908,148:dn,150:dn,154:Ee,457:te,461:ee}),{148:[1,909],150:[1,910]},e(pn,bn,{529:912,532:913,82:[1,911],146:Pe}),e(vn,[2,1241],{533:914,141:[1,915]}),e(En,[2,1245],{535:916,536:917,161:Ue}),e(En,[2,789]),e(mn,[2,781]),{2:s,3:918,4:n,5:r,6:a,7:o,8:h,9:c,140:[1,919]},{2:s,3:920,4:n,5:r,6:a,7:o,8:h,9:c},{2:s,3:921,4:n,5:r,6:a,7:o,8:h,9:c},e(Me,$e,{385:922,165:xe}),e(Me,$e,{385:923,165:xe}),e(He,[2,519]),e(He,[2,520]),{192:[1,924]},{192:[2,1216]},e(gn,[2,1211],{505:925,508:926,146:[1,927]}),e(Ge,[2,1210]),e(wn,yn,{548:928,105:Tn,250:[1,929],552:Sn,553:An,554:On}),{81:[1,934]},{81:[1,935]},{154:dt,490:936},{4:Rn,11:940,81:[1,938],300:937,424:939,426:Nn},e(it,_n,{369:944,137:[1,943],503:Cn}),e(it,[2,614]),{2:s,3:946,4:n,5:r,6:a,7:o,8:h,9:c},{331:[1,947]},e(cn,Be,{435:948,165:je}),e(it,[2,628]),{2:s,3:268,4:n,5:r,6:a,7:o,8:h,9:c,208:950,436:949},{2:s,3:268,4:n,5:r,6:a,7:o,8:h,9:c,208:950,436:951},e(it,[2,814]),e(et,[2,708],{476:952,343:[1,953]}),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:954,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:955,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:956,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:957,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:958,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:959,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:960,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:961,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:962,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:963,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:964,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:965,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:966,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:967,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:968,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:969,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:970,4:n,5:r,6:a,7:o,8:h,9:c,82:[1,972],140:bt,165:st,205:971,209:973,293:nt,322:rt,323:at,324:ot,325:ht,326:lt},{2:s,3:974,4:n,5:r,6:a,7:o,8:h,9:c,82:[1,976],140:bt,165:st,205:975,209:977,293:nt,322:rt,323:at,324:ot,325:ht,326:lt},e(Ln,[2,461],{282:156,209:157,283:158,120:159,280:160,205:161,284:162,122:163,285:164,210:165,211:166,286:167,287:168,288:169,153:171,289:172,290:173,60:175,167:178,3:180,456:204,104:978,2:s,4:n,5:r,6:a,7:o,8:h,9:c,82:pt,140:bt,141:vt,146:Et,152:mt,154:gt,158:wt,161:yt,163:Tt,165:st,188:St,189:At,190:Ot,229:Rt,266:Nt,267:_t,281:Ct,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,457:te,461:ee}),e(Ln,[2,462],{282:156,209:157,283:158,120:159,280:160,205:161,284:162,122:163,285:164,210:165,211:166,286:167,287:168,288:169,153:171,289:172,290:173,60:175,167:178,3:180,456:204,104:979,2:s,4:n,5:r,6:a,7:o,8:h,9:c,82:pt,140:bt,141:vt,146:Et,152:mt,154:gt,158:wt,161:yt,163:Tt,165:st,188:St,189:At,190:Ot,229:Rt,266:Nt,267:_t,281:Ct,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,457:te,461:ee}),e(Ln,[2,463],{282:156,209:157,283:158,120:159,280:160,205:161,284:162,122:163,285:164,210:165,211:166,286:167,287:168,288:169,153:171,289:172,290:173,60:175,167:178,3:180,456:204,104:980,2:s,4:n,5:r,6:a,7:o,8:h,9:c,82:pt,140:bt,141:vt,146:Et,152:mt,154:gt,158:wt,161:yt,163:Tt,165:st,188:St,189:At,190:Ot,229:Rt,266:Nt,267:_t,281:Ct,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,457:te,461:ee}),e(Ln,[2,464],{282:156,209:157,283:158,120:159,280:160,205:161,284:162,122:163,285:164,210:165,211:166,286:167,287:168,288:169,153:171,289:172,290:173,60:175,167:178,3:180,456:204,104:981,2:s,4:n,5:r,6:a,7:o,8:h,9:c,82:pt,140:bt,141:vt,146:Et,152:mt,154:gt,158:wt,161:yt,163:Tt,165:st,188:St,189:At,190:Ot,229:Rt,266:Nt,267:_t,281:Ct,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,457:te,461:ee}),e(Ln,In,{282:156,209:157,283:158,120:159,280:160,205:161,284:162,122:163,285:164,210:165,211:166,286:167,287:168,288:169,153:171,289:172,290:173,60:175,167:178,3:180,456:204,104:982,2:s,4:n,5:r,6:a,7:o,8:h,9:c,82:pt,140:bt,141:vt,146:Et,152:mt,154:gt,158:wt,161:yt,163:Tt,165:st,188:St,189:At,190:Ot,229:Rt,266:Nt,267:_t,281:Ct,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,457:te,461:ee}),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:983,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:984,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(Ln,[2,466],{282:156,209:157,283:158,120:159,280:160,205:161,284:162,122:163,285:164,210:165,211:166,286:167,287:168,288:169,153:171,289:172,290:173,60:175,167:178,3:180,456:204,104:985,2:s,4:n,5:r,6:a,7:o,8:h,9:c,82:pt,140:bt,141:vt,146:Et,152:mt,154:gt,158:wt,161:yt,163:Tt,165:st,188:St,189:At,190:Ot,229:Rt,266:Nt,267:_t,281:Ct,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,457:te,461:ee}),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:986,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:987,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{173:[1,989],175:[1,991],361:988,367:[1,990]},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:992,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:993,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:734,4:n,5:r,6:a,7:o,8:h,9:c,82:[1,994],120:997,154:kn,165:st,209:998,211:996,229:Bi,281:ji,293:nt,322:rt,323:at,324:ot,325:ht,326:lt,362:995},{109:[1,1e3],330:[1,1001]},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1002,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1003,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1004,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{4:Rn,11:940,300:1005,424:939,426:Nn},e(Mn,[2,98]),e(Mn,[2,99]),{83:[1,1006]},{83:[1,1007]},{83:[1,1008]},{83:[1,1009],109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},e(ie,se,{374:223,82:Ie,207:ne}),{83:[2,1177]},{83:[2,1178]},{143:ut,144:ft},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:285,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,160:1010,161:yt,163:Tt,165:st,167:178,173:[1,1012],188:St,189:At,190:Ot,194:[1,1011],205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1013,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,194:[1,1014],205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:1015,4:n,5:r,6:a,7:o,8:h,9:c,154:$n,158:xn,189:[1,1018]},e([2,4,5,6,7,8,9,14,57,76,78,81,82,83,96,103,105,108,109,116,127,131,137,138,139,140,141,143,144,146,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,347,363,364,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],[2,437],{123:660,360:672,121:qe,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,365:Oi}),e(Dn,[2,438],{123:660,360:672,124:Ye,125:We,132:Xe,142:Je,145:Ke,147:Qe,189:oi,345:li,349:fi}),e(Dn,[2,439],{123:660,360:672,124:Ye,125:We,132:Xe,142:Je,145:Ke,147:Qe,189:oi,345:li,349:fi}),e(Pn,[2,440],{123:660,360:672,349:fi}),e(Pn,[2,441],{123:660,360:672,349:fi}),{2:s,3:1019,4:n,5:r,6:a,7:o,8:h,9:c,189:[1,1020]},{2:s,3:1021,4:n,5:r,6:a,7:o,8:h,9:c,189:[1,1022]},e(Di,[2,386]),e(Di,[2,1187]),e(Di,[2,1188]),e(Di,[2,387]),e([2,4,5,6,7,8,9,14,57,76,78,81,82,83,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,250,251,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],[2,383]),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1023,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(Gi,[2,655]),e(Gi,[2,656]),e(Gi,[2,657]),e(Gi,[2,658]),e(Gi,[2,660]),{44:1024,82:p,85:75,95:76,96:b,193:102,198:g},{109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,337:1025,340:715,341:Ui,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},{338:1026,339:Un,340:1027,341:Ui,343:Gn},e(Fn,[2,393]),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1029,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1030,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{4:Rn,11:940,300:1031,424:939,426:Nn},e(Gi,[2,661]),{78:[1,1033],333:[1,1032]},e(Gi,[2,678]),e(Bn,[2,688]),e(jn,[2,662]),e(jn,[2,663]),e(jn,[2,664]),{140:bt,205:1034},e(jn,[2,666]),e(jn,[2,667]),e(jn,[2,668]),e(jn,[2,669]),e(jn,[2,670]),e(jn,[2,671]),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1035,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e([2,4,5,6,7,8,9,14,57,76,78,81,83,96,103,105,108,109,116,121,124,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,463,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],Li,{82:Le,125:Hn}),e(Vn,ki,{125:[1,1037]}),e(Vn,Mi,{125:[1,1038]}),{78:Zs,333:[1,1039]},e(Ci,[2,326],{82:Le}),e(ve,[2,327]),{78:[1,1041],463:[1,1040]},e(Gi,[2,675]),e(qn,[2,680]),{161:[1,1042],466:[1,1043]},{161:[1,1044],466:[1,1045]},{161:[1,1046],466:[1,1047]},{44:1052,82:[1,1051],85:75,95:76,96:b,152:mt,153:1056,154:Ee,155:[1,1053],158:Yn,161:yt,190:Ot,193:102,198:g,210:1057,335:Jt,375:1048,376:1049,378:[1,1050],379:Wn,456:204,457:te,461:ee},{2:s,3:268,4:n,5:r,6:a,7:o,8:h,9:c,152:mt,161:yt,190:Ot,208:266,210:267,231:1058,335:Jt},e(ie,se,{374:1059,207:ne}),{82:Xn,152:mt,153:1056,154:Ee,158:Yn,161:yt,190:Ot,210:1057,335:Jt,375:1060,376:1061,379:Wn,456:204,457:te,461:ee},{250:[1,1064],495:1063},{2:s,3:235,4:n,5:r,6:a,7:o,8:h,9:c,82:[1,1066],141:ae,152:mt,153:228,154:gt,161:yt,165:st,190:Ot,208:229,209:231,210:230,211:232,218:1065,227:233,229:oe,293:nt,322:rt,323:at,324:ot,325:ht,326:lt,335:Jt,456:204,457:te,461:ee},{251:[2,737]},{83:[1,1067]},e(Wi,[2,1147],{221:1068,3:1069,2:s,4:n,5:r,6:a,7:o,8:h,9:c}),e(Yi,[2,1146]),e(Wi,[2,192]),{223:[1,1070]},e(Wi,[2,1150]),e(Wi,[2,199]),{2:s,3:1071,4:n,5:r,6:a,7:o,8:h,9:c},e(Wi,[2,194]),e(Wi,[2,1152]),e(Wi,[2,195]),e(Wi,[2,1154]),e(Wi,[2,196]),e(Wi,[2,1156]),e(Wi,[2,197]),e(Wi,[2,1158]),{2:s,3:1072,4:n,5:r,6:a,7:o,8:h,9:c},{157:[1,1073]},e(zn,Jn,{88:1074,192:Kn}),{2:s,3:235,4:n,5:r,6:a,7:o,8:h,9:c,141:[1,1080],152:mt,154:[1,1081],161:yt,165:st,190:Ot,208:1076,209:1077,210:1078,211:1079,293:nt,322:rt,323:at,324:ot,325:ht,326:lt,335:Jt},{2:s,3:1086,4:n,5:r,6:a,7:o,8:h,9:c,118:1082,119:1083,120:1084,121:Qn,229:Bi,281:ji},e(ts,[2,1110]),e(Zn,tr,{94:1087,271:er,273:ir}),{128:[1,1090]},e(ce,[2,249]),e(ce,[2,258]),e(ce,[2,259]),e(he,[2,1099],{100:1091,115:1092,116:le}),e(ns,[2,251],{262:[1,1093]}),e(ns,[2,254]),e(ns,[2,256]),e(ns,[2,257]),e(Zn,[2,1097],{98:1094,191:1095,192:[1,1096]}),e(be,[2,1096],{162:1097,188:sr,189:nr,190:rr}),e([2,4,5,6,7,8,9,14,76,78,81,83,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,207,266,267,304,313,314,315,316,317,318,319,320,339,343,457,461,503,639,798],[2,100],{82:[1,1101]}),{128:[1,1102]},e(ar,[2,103]),{2:s,3:1103,4:n,5:r,6:a,7:o,8:h,9:c},e(ar,[2,105]),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1104,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1105,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:787,4:n,5:r,6:a,7:o,8:h,9:c,76:rs,81:as,82:os,121:hs,123:790,124:Ye,125:We,126:1107,127:ls,131:cs,132:us,133:fs,134:1106,137:ds,138:ps,139:bs,140:vs,141:Es,142:ms,143:gs,144:ws,145:ys,146:Ts,147:Ss,148:As,149:Os,150:Rs,151:Ns,152:_s,153:812,154:Cs,155:Ls,157:Is,158:ks,159:Ms,161:$s,163:xs,165:Ds,167:822,169:823,171:Ps,173:Us,175:Gs,177:Fs,178:Bs,179:js,180:Hs,181:Vs,182:qs,184:Ys,194:Ws,196:Xs,266:Nt,267:_t,304:zs,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,456:204,457:te,461:ee},{82:[1,1108]},{82:[1,1109]},{82:[1,1110]},{82:[1,1111]},e(ar,[2,114]),e(ar,[2,115]),e(ar,[2,116]),e(ar,[2,117]),e(ar,[2,118]),e(ar,[2,119]),{2:s,3:1112,4:n,5:r,6:a,7:o,8:h,9:c},{2:s,3:1113,4:n,5:r,6:a,7:o,8:h,9:c,142:[1,1114]},e(ar,[2,123]),e(ar,[2,124]),e(ar,[2,125]),e(ar,[2,126]),e(ar,[2,127]),e(ar,[2,128]),{2:s,3:1115,4:n,5:r,6:a,7:o,8:h,9:c,82:Pi,122:707,140:bt,141:vt,152:mt,161:yt,190:Ot,205:708,210:710,284:709,327:Vt,328:qt,329:Yt,335:Jt,456:711,461:ee},{154:[1,1116]},{82:[1,1117]},{154:[1,1118]},e(ar,[2,133]),{82:[1,1119]},{2:s,3:1120,4:n,5:r,6:a,7:o,8:h,9:c},{82:[1,1121]},{82:[1,1122]},{82:[1,1123]},{82:[1,1124]},{82:[1,1125],173:[1,1126]},{82:[1,1127]},{82:[1,1128]},{82:[1,1129]},{82:[1,1130]},{82:[1,1131]},{82:[1,1132]},{82:[1,1133]},{82:[1,1134]},{82:[1,1135]},{82:[2,363]},{82:[2,1125]},{82:[2,1126]},{2:s,3:268,4:n,5:r,6:a,7:o,8:h,9:c,208:1136},{2:s,3:268,4:n,5:r,6:a,7:o,8:h,9:c,208:1137},{122:1138,141:vt,329:Yt},e(it,[2,631],{121:[1,1139]}),{2:s,3:268,4:n,5:r,6:a,7:o,8:h,9:c,208:1140},{122:1141,141:vt,329:Yt},{2:s,3:1142,4:n,5:r,6:a,7:o,8:h,9:c},e(it,[2,734]),e(it,[2,72]),{2:s,3:258,4:n,5:r,6:a,7:o,8:h,9:c,79:1143,80:[1,1144]},e(Js,[2,76]),{82:[1,1145]},{2:s,3:1086,4:n,5:r,6:a,7:o,8:h,9:c,84:1146,120:1147,229:Bi,281:ji},e(it,[2,715]),e(it,[2,621]),{2:s,3:1086,4:n,5:r,6:a,7:o,8:h,9:c,120:1150,152:or,154:hr,156:1148,229:Bi,281:ji,370:1149,371:1151},{153:1154,154:Ee,456:204,457:te,461:ee},e(it,[2,710]),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1155,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(Ln,In,{282:156,209:157,283:158,120:159,280:160,205:161,284:162,122:163,285:164,210:165,211:166,286:167,287:168,288:169,153:171,289:172,290:173,60:175,167:178,3:180,456:204,104:1156,2:s,4:n,5:r,6:a,7:o,8:h,9:c,82:pt,140:bt,141:vt,146:Et,152:mt,154:gt,158:wt,161:yt,163:Tt,165:st,188:St,189:At,190:Ot,229:Rt,266:Nt,267:_t,281:Ct,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,457:te,461:ee}),{83:[1,1157]},{122:1158,141:vt,329:Yt},{2:s,3:292,4:n,5:r,6:a,7:o,8:h,9:c,486:1159,487:ye},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1161,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,250:sn,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee,467:1160,471:nn},e(it,[2,690]),{123:1163,124:Ye,125:We,133:[1,1162]},e(it,[2,702]),e(it,[2,703]),{2:s,3:1165,4:n,5:r,6:a,7:o,8:h,9:c,82:lr,140:cr,470:1164},{123:865,124:Ye,125:We,133:[1,1168],468:1169},e(it,[2,795],{78:rn}),{2:s,3:104,4:n,5:r,6:a,7:o,8:h,9:c,543:1170},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:875,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,183:1171,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,279:874,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:875,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,183:1172,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,279:874,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:875,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,183:1173,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,279:874,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(hn,[2,161]),e(hn,[2,1140],{78:ur}),e(fr,[2,277]),e(fr,[2,284],{123:660,360:672,3:1176,122:1178,2:s,4:n,5:r,6:a,7:o,8:h,9:c,81:[1,1175],109:Ve,121:qe,124:Ye,125:We,132:Xe,133:en,140:[1,1177],141:vt,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,329:Yt,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,363:Si,364:Ai,365:Oi,366:Ri}),e(Ae,[2,1141],{206:1179,799:[1,1180]}),{140:bt,205:1181},e(dr,pr),{78:rn,83:[1,1182]},e(et,[2,15]),{157:[1,1183],199:[1,1184]},{199:[1,1185]},{199:[1,1186]},{199:[1,1187]},e(it,[2,610],{81:[1,1189],82:[1,1188]}),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:285,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,160:1190,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e($i,br,{303:1191,307:vr}),e(on,[2,1186]),e(on,[2,1183]),e(on,[2,1184]),{78:Zs,83:[1,1193]},{78:Zs,83:[1,1194]},e($i,[2,368]),{78:[1,1195]},{78:[1,1196]},{78:[1,1197]},{78:[1,1198]},{78:[1,1199],109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},e($i,[2,374]),e(it,[2,615]),{331:[1,1200]},{2:s,3:1201,4:n,5:r,6:a,7:o,8:h,9:c,122:1202,141:vt,329:Yt},{2:s,3:268,4:n,5:r,6:a,7:o,8:h,9:c,208:1203},{250:[1,1204]},{2:s,3:613,4:n,5:r,6:a,7:o,8:h,9:c,141:De,146:Pe,152:Te,154:Se,161:Ue,469:620,513:1205,514:611,517:612,521:617,532:614,536:616},e(it,[2,772],{123:660,360:672,109:Ve,121:qe,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,363:Si,364:Ai,365:Oi,366:Ri}),e(an,[2,1219],{516:1206,522:1207,81:Er}),e(fn,[2,1218]),{2:s,3:1211,4:n,5:r,6:a,7:o,8:h,9:c,141:De,146:Pe,153:1210,154:Ee,161:Ue,456:204,457:te,461:ee,514:1209,532:614,536:616},{2:s,3:1211,4:n,5:r,6:a,7:o,8:h,9:c,141:De,146:Pe,152:Te,154:Se,161:Ue,469:620,514:1213,517:1212,521:617,532:614,536:616},{2:s,3:613,4:n,5:r,6:a,7:o,8:h,9:c,141:De,146:Pe,152:Te,154:Se,161:Ue,469:620,512:1214,513:610,514:611,517:612,521:617,532:614,536:616},e(vn,[2,1237],{530:1215,141:[1,1216]}),e(pn,[2,1236]),e(En,[2,1243],{534:1217,536:1218,161:Ue}),e(vn,[2,1242]),e(En,[2,788]),e(En,[2,1246]),e(pn,[2,791]),e(pn,[2,792]),e(En,[2,790]),e(mn,[2,782]),{2:s,3:268,4:n,5:r,6:a,7:o,8:h,9:c,208:1219},{2:s,3:268,4:n,5:r,6:a,7:o,8:h,9:c,208:1220},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1221,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(mr,[2,1213],{506:1222,122:1223,141:vt,329:Yt}),e(gn,[2,1212]),{2:s,3:1224,4:n,5:r,6:a,7:o,8:h,9:c},{368:gr,372:wr,373:yr,549:1225},{2:s,3:268,4:n,5:r,6:a,7:o,8:h,9:c,208:1229},e(wn,[2,807]),e(wn,[2,808]),e(wn,[2,809]),{138:[1,1230]},{294:[1,1231]},{294:[1,1232]},e(Fe,[2,729]),e(Fe,[2,730],{133:[1,1233]}),{4:Rn,11:940,300:1234,424:939,426:Nn},e([2,4,6,7,8,9,14,57,76,78,81,82,83,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,250,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,330,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,378,391,403,404,407,408,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],[2,577],{5:[1,1235]}),e([2,5,6,7,8,9,14,57,76,78,81,83,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,250,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,330,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,378,391,403,404,407,408,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],[2,574],{4:[1,1237],82:[1,1236]}),{82:[1,1238]},e(Tr,[2,8]),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1239,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(it,[2,477]),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:875,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,183:1240,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,279:874,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(it,[2,623]),e(cn,[2,603]),{2:s,3:1241,4:n,5:r,6:a,7:o,8:h,9:c,122:1242,141:vt,329:Yt},e(it,[2,599],{78:Sr}),e(Fe,[2,601]),e(it,[2,648],{78:Sr}),e(it,[2,707]),e(it,i,{21:5,22:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:18,34:19,35:20,36:21,37:22,38:23,39:24,40:25,41:26,42:27,43:28,44:29,45:30,46:31,47:32,48:33,49:34,50:35,51:36,52:37,53:38,54:39,55:40,56:41,58:43,59:44,60:45,61:46,62:47,63:48,64:49,65:50,66:51,67:52,68:53,69:54,70:55,71:56,72:57,73:58,74:59,75:60,85:75,95:76,543:98,193:102,3:104,16:1244,2:s,4:n,5:r,6:a,7:o,8:h,9:c,57:f,76:d,82:p,96:b,133:v,155:E,165:m,198:g,294:w,295:y,322:T,368:S,372:A,373:O,433:R,437:N,438:_,441:C,443:L,445:I,446:k,454:M,455:$,466:x,472:D,474:P,475:U,477:G,478:F,479:B,480:j,481:H,482:V,483:q,487:Y,488:W,491:X,492:z,545:J,546:K,555:Q}),e(Ar,[2,397],{123:660,360:672,124:Ye,125:We,132:Xe,142:Je,145:Ke,147:Qe,150:ei,151:ii,188:ai,189:oi,345:li,349:fi,350:di,351:pi,352:bi}),e(Pn,[2,398],{123:660,360:672,349:fi}),e(Ar,[2,399],{123:660,360:672,124:Ye,125:We,132:Xe,142:Je,145:Ke,147:Qe,150:ei,151:ii,188:ai,189:oi,345:li,349:fi,350:di,351:pi,352:bi}),e(Or,[2,400],{123:660,360:672,124:Ye,125:We,132:Xe,142:Je,145:Ke,147:Qe,150:ei,151:ii,188:ai,189:oi,345:li,347:[1,1245],349:fi,350:di,351:pi,352:bi}),e(Or,[2,402],{123:660,360:672,124:Ye,125:We,132:Xe,142:Je,145:Ke,147:Qe,150:ei,151:ii,188:ai,189:oi,345:li,347:[1,1246],349:fi,350:di,351:pi,352:bi}),e(ve,[2,404],{123:660,360:672}),e(Dn,[2,405],{123:660,360:672,124:Ye,125:We,132:Xe,142:Je,145:Ke,147:Qe,189:oi,345:li,349:fi}),e(Dn,[2,406],{123:660,360:672,124:Ye,125:We,132:Xe,142:Je,145:Ke,147:Qe,189:oi,345:li,349:fi}),e(Rr,[2,407],{123:660,360:672,124:Ye,125:We,132:Xe,145:Ke,345:li,349:fi}),e(Rr,[2,408],{123:660,360:672,124:Ye,125:We,132:Xe,145:Ke,345:li,349:fi}),e(Rr,[2,409],{123:660,360:672,124:Ye,125:We,132:Xe,145:Ke,345:li,349:fi}),e([2,4,5,6,7,8,9,14,57,76,78,81,82,83,96,103,105,108,109,116,121,127,131,132,133,137,138,139,140,141,142,143,144,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,346,347,348,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],[2,410],{123:660,360:672,124:Ye,125:We,145:Ke,345:li,349:fi}),e(Nr,[2,411],{123:660,360:672,124:Ye,125:We,132:Xe,142:Je,145:Ke,147:Qe,188:ai,189:oi,345:li,349:fi,350:di}),e(Nr,[2,412],{123:660,360:672,124:Ye,125:We,132:Xe,142:Je,145:Ke,147:Qe,188:ai,189:oi,345:li,349:fi,350:di}),e(Nr,[2,413],{123:660,360:672,124:Ye,125:We,132:Xe,142:Je,145:Ke,147:Qe,188:ai,189:oi,345:li,349:fi,350:di}),e(Nr,[2,414],{123:660,360:672,124:Ye,125:We,132:Xe,142:Je,145:Ke,147:Qe,188:ai,189:oi,345:li,349:fi,350:di}),e(Ci,[2,415],{82:Le}),e(ve,[2,416]),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1247,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(ve,[2,418]),e(Ci,[2,419],{82:Le}),e(ve,[2,420]),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1248,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(ve,[2,422]),e(_r,[2,423],{123:660,360:672,121:qe,124:Ye,125:We,132:Xe,142:Je,145:Ke,147:Qe,150:ei,151:ii,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,365:Oi}),e(_r,[2,424],{123:660,360:672,121:qe,124:Ye,125:We,132:Xe,142:Je,145:Ke,147:Qe,150:ei,151:ii,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,365:Oi}),e(_r,[2,425],{123:660,360:672,121:qe,124:Ye,125:We,132:Xe,142:Je,145:Ke,147:Qe,150:ei,151:ii,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,365:Oi}),e(_r,[2,426],{123:660,360:672,121:qe,124:Ye,125:We,132:Xe,142:Je,145:Ke,147:Qe,150:ei,151:ii,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,365:Oi}),e([2,4,5,6,7,8,9,14,57,76,82,96,109,133,148,149,155,163,165,179,180,198,294,295,322,339,343,353,354,355,356,357,358,359,363,364,366,368,372,373,433,437,438,441,443,445,446,454,455,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,545,546,555,639,798],Cr,{123:660,360:672,121:qe,124:Ye,125:We,132:Xe,142:Je,145:Ke,147:Qe,150:ei,151:ii,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,365:Oi}),e(_r,[2,428],{123:660,360:672,121:qe,124:Ye,125:We,132:Xe,142:Je,145:Ke,147:Qe,150:ei,151:ii,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,365:Oi}),e(_r,[2,429],{123:660,360:672,121:qe,124:Ye,125:We,132:Xe,142:Je,145:Ke,147:Qe,150:ei,151:ii,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,365:Oi}),e(_r,[2,430],{123:660,360:672,121:qe,124:Ye,125:We,132:Xe,142:Je,145:Ke,147:Qe,150:ei,151:ii,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,365:Oi}),e(_r,[2,431],{123:660,360:672,121:qe,124:Ye,125:We,132:Xe,142:Je,145:Ke,147:Qe,150:ei,151:ii,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,365:Oi}),e(_r,[2,432],{123:660,360:672,121:qe,124:Ye,125:We,132:Xe,142:Je,145:Ke,147:Qe,150:ei,151:ii,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,365:Oi}),{82:[1,1249]},{82:[2,467]},{82:[2,468]},{82:[2,469]},e(Lr,[2,435],{123:660,360:672,109:Ve,121:qe,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,365:Oi}),e([2,4,5,6,7,8,9,14,57,76,78,81,82,83,96,103,105,108,116,127,131,137,138,139,140,141,143,144,146,152,154,155,157,158,159,161,165,171,173,175,177,178,180,181,182,184,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,347,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],[2,436],{123:660,360:672,109:Ve,121:qe,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,363:Si,364:Ai,365:Oi}),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,44:1250,60:175,82:we,83:[1,1252],85:75,95:76,96:b,104:285,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,160:1251,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,193:102,198:g,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(ve,[2,449]),e(ve,[2,451]),e(ve,[2,458]),e(ve,[2,459]),{2:s,3:705,4:n,5:r,6:a,7:o,8:h,9:c,82:[1,1253]},{2:s,3:734,4:n,5:r,6:a,7:o,8:h,9:c,82:[1,1254],120:997,154:kn,165:st,209:998,211:1256,229:Bi,281:ji,293:nt,322:rt,323:at,324:ot,325:ht,326:lt,362:1255},e(ve,[2,456]),e(Lr,[2,453],{123:660,360:672,109:Ve,121:qe,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,365:Oi}),e(Lr,[2,454],{123:660,360:672,109:Ve,121:qe,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,365:Oi}),e([2,4,5,6,7,8,9,14,57,76,78,81,82,83,96,103,105,108,109,116,127,131,133,137,138,139,140,141,143,144,146,148,149,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,347,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],[2,455],{123:660,360:672,121:qe,124:Ye,125:We,132:Xe,142:Je,145:Ke,147:Qe,150:ei,151:ii,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi}),e(ve,[2,457]),e(ve,Ir),e(ve,[2,318]),e(ve,[2,319]),e(ve,[2,442]),{78:Zs,83:[1,1257]},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1258,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1259,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(kr,Mr,{123:660,360:672,305:1260,109:Ve,121:qe,124:Ye,125:We,127:$r,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,363:Si,364:Ai,365:Oi,366:Ri}),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1262,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(ve,xr),e(Dr,[2,294]),{2:s,3:1264,4:n,5:r,6:a,7:o,8:h,9:c},e(ve,[2,286]),e(Dr,[2,291]),e(ve,[2,287]),e(Dr,[2,292]),e(ve,[2,288]),{83:[1,1265],109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},{83:[1,1266]},{338:1267,339:Un,340:1027,341:Ui,343:Gn},{339:[1,1268]},e(Fn,[2,392]),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1269,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,342:[1,1270],344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},{81:[1,1271],109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},{78:[1,1272]},e(Gi,[2,676]),{2:s,3:734,4:n,5:r,6:a,7:o,8:h,9:c,82:Fi,120:729,122:727,140:bt,141:vt,152:mt,153:723,154:Ee,161:yt,165:st,190:Ot,205:725,209:732,210:731,229:Bi,281:ji,284:728,285:730,293:nt,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,333:[1,1273],335:Jt,350:Hi,456:204,457:te,459:1274,460:724,461:ee},e(jn,[2,665]),{83:[1,1275],109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},{2:s,3:1276,4:n,5:r,6:a,7:o,8:h,9:c,154:$n,158:xn},{2:s,3:1019,4:n,5:r,6:a,7:o,8:h,9:c},{2:s,3:1021,4:n,5:r,6:a,7:o,8:h,9:c},e(ve,[2,385]),e(Gi,[2,673]),{2:s,3:745,4:n,5:r,6:a,7:o,8:h,9:c,140:Vi,141:qi,463:[1,1277],465:1278},{2:s,3:734,4:n,5:r,6:a,7:o,8:h,9:c,82:Fi,120:729,122:727,140:bt,141:vt,152:mt,153:723,154:Ee,161:yt,165:st,190:Ot,205:725,209:732,210:731,229:Bi,281:ji,284:728,285:730,293:nt,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,335:Jt,350:Hi,456:204,457:te,459:1279,460:724,461:ee},{140:bt,205:1280},{2:s,3:734,4:n,5:r,6:a,7:o,8:h,9:c,82:Fi,120:729,122:727,140:bt,141:vt,152:mt,153:723,154:Ee,161:yt,165:st,190:Ot,205:725,209:732,210:731,229:Bi,281:ji,284:728,285:730,293:nt,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,335:Jt,350:Hi,456:204,457:te,459:1281,460:724,461:ee},{140:bt,205:1282},{2:s,3:734,4:n,5:r,6:a,7:o,8:h,9:c,82:Fi,120:729,122:727,140:bt,141:vt,152:mt,153:723,154:Ee,161:yt,165:st,190:Ot,205:725,209:732,210:731,229:Bi,281:ji,284:728,285:730,293:nt,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,335:Jt,350:Hi,456:204,457:te,459:1283,460:724,461:ee},{140:bt,205:1284},{82:Xn,152:mt,153:1056,154:Ee,161:yt,190:Ot,210:1057,335:Jt,376:1285,456:204,457:te,461:ee},e(Pr,_n,{369:1286,78:Ur,503:Cn}),{158:Yn,375:1288,379:Wn},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,44:308,60:175,82:we,84:1289,85:75,95:76,96:b,104:1292,120:1291,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,193:102,198:g,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,380:1290,456:204,457:te,461:ee},e(Pr,_n,{369:1293,503:Cn}),{2:s,3:1086,4:n,5:r,6:a,7:o,8:h,9:c,120:1150,152:or,154:hr,156:1294,229:Bi,281:ji,370:1149,371:1151},e(Gr,[2,497]),e(Gr,[2,498]),e(Fr,[2,502]),e(Fr,[2,503]),{44:1298,82:[1,1297],85:75,95:76,96:b,152:mt,153:1056,154:Ee,158:Yn,161:yt,190:Ot,193:102,198:g,210:1057,335:Jt,375:1295,376:1296,379:Wn,456:204,457:te,461:ee},{2:s,3:268,4:n,5:r,6:a,7:o,8:h,9:c,152:mt,161:yt,190:Ot,208:266,210:267,231:1299,335:Jt},{82:Xn,152:mt,153:1056,154:Ee,161:yt,190:Ot,210:1057,335:Jt,376:1300,456:204,457:te,461:ee},e(Pr,_n,{369:1301,78:Ur,503:Cn}),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1292,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,380:1290,456:204,457:te,461:ee},{341:Br,496:1302,497:1303,498:1304},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1306,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{250:[2,738]},{2:s,3:235,4:n,5:r,6:a,7:o,8:h,9:c,44:753,82:jr,85:75,95:76,96:b,141:ae,152:mt,153:228,154:gt,161:yt,165:st,190:Ot,193:102,198:g,208:229,209:231,210:230,211:232,218:1307,227:233,229:oe,293:nt,322:rt,323:at,324:ot,325:ht,326:lt,335:Jt,456:204,457:te,461:ee},e(Wi,Hr,{3:759,219:1309,230:1310,2:s,4:n,5:r,6:a,7:o,8:h,9:c,81:Xi}),e(Wi,[2,191]),e(Wi,[2,1148]),e(Wi,[2,193]),e(Wi,[2,200]),e([2,4,5,6,7,8,9,14,57,76,78,81,82,83,96,103,105,108,127,133,137,152,154,155,157,158,161,163,165,171,177,178,190,192,196,198,215,217,242,243,244,245,246,247,248,249,250,251,252,271,273,294,295,322,330,335,339,343,368,372,373,378,379,391,403,404,407,408,433,437,438,439,440,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,545,546,552,553,554,555,639,798],[2,202]),{2:s,3:1311,4:n,5:r,6:a,7:o,8:h,9:c},e(Vr,[2,1093],{89:1312,102:1313,103:qr,108:Yr}),{2:s,3:235,4:n,5:r,6:a,7:o,8:h,9:c,82:[1,1317],141:ae,152:mt,153:228,154:gt,161:yt,165:st,190:Ot,208:229,209:231,210:230,211:232,212:1316,218:1318,227:233,229:oe,293:nt,322:rt,323:at,324:ot,325:ht,326:lt,335:Jt,456:204,457:te,461:ee},e(Ki,[2,174]),e(Ki,[2,175]),e(Ki,[2,176]),e(Ki,[2,177]),e(Ki,[2,178]),{2:s,3:705,4:n,5:r,6:a,7:o,8:h,9:c},e(he,[2,93],{78:[1,1319]}),e(Wr,[2,95]),e(Wr,[2,96]),{122:1320,141:vt,329:Yt},e([14,76,78,83,103,108,127,133,137,171,177,178,192,207,215,217,242,243,244,245,246,247,248,249,252,271,273,339,343,503,639,798],Li,{125:Hn}),e(Zn,[2,80]),{140:bt,205:1321},{140:bt,205:1322},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1325,120:159,122:163,129:1323,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,263:1324,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(Ki,Qi,{87:1326,207:Zi}),e(he,[2,1100]),e(ns,[2,255]),e(Zn,[2,81]),e(Zn,[2,1098]),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1327,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(ar,[2,136]),e(ar,[2,154]),e(ar,[2,155]),e(ar,[2,156]),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,83:[2,1117],104:285,120:159,122:163,136:1328,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,160:1329,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{82:[1,1330]},e(ar,[2,104]),e([2,4,5,6,7,8,9,14,76,78,81,82,83,127,131,133,137,138,139,140,141,143,144,146,148,149,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,190,192,194,196,207,266,267,304,313,314,315,316,317,318,319,320,339,343,457,461,503,639,798],[2,106],{123:660,360:672,109:Ve,121:qe,124:Ye,125:We,132:Xe,142:Je,145:Ke,147:Qe,150:ei,151:ii,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,363:Si,364:Ai,365:Oi,366:Ri}),e([2,4,5,6,7,8,9,14,76,78,81,82,83,121,127,131,133,137,138,139,140,141,143,144,146,148,149,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,190,192,194,196,207,266,267,304,313,314,315,316,317,318,319,320,339,343,457,461,503,639,798],[2,107],{123:660,360:672,109:Ve,124:Ye,125:We,132:Xe,142:Je,145:Ke,147:Qe,150:ei,151:ii,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,363:Si,364:Ai,365:Oi,366:Ri}),{2:s,3:787,4:n,5:r,6:a,7:o,8:h,9:c,76:rs,81:as,82:os,83:[1,1331],121:hs,123:790,124:Ye,125:We,126:1332,127:ls,131:cs,132:us,133:fs,137:ds,138:ps,139:bs,140:vs,141:Es,142:ms,143:gs,144:ws,145:ys,146:Ts,147:Ss,148:As,149:Os,150:Rs,151:Ns,152:_s,153:812,154:Cs,155:Ls,157:Is,158:ks,159:Ms,161:$s,163:xs,165:Ds,167:822,169:823,171:Ps,173:Us,175:Gs,177:Fs,178:Bs,179:js,180:Hs,181:Vs,182:qs,184:Ys,194:Ws,196:Xs,266:Nt,267:_t,304:zs,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,456:204,457:te,461:ee},e(Xr,[2,1113],{162:1097,188:sr,189:nr,190:rr}),{2:s,3:787,4:n,5:r,6:a,7:o,8:h,9:c,76:rs,81:as,82:os,121:hs,123:790,124:Ye,125:We,126:1334,127:ls,131:cs,132:us,133:fs,135:1333,137:ds,138:ps,139:bs,140:vs,141:Es,142:ms,143:gs,144:ws,145:ys,146:Ts,147:Ss,148:As,149:Os,150:Rs,151:Ns,152:_s,153:812,154:Cs,155:Ls,157:Is,158:ks,159:Ms,161:$s,163:xs,165:Ds,167:822,169:823,171:Ps,173:Us,175:Gs,177:Fs,178:Bs,179:js,180:Hs,181:Vs,182:qs,184:Ys,194:Ws,196:Xs,266:Nt,267:_t,304:zs,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1335,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1336,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:1337,4:n,5:r,6:a,7:o,8:h,9:c},e(ar,[2,120]),e(ar,[2,121]),e(ar,[2,122]),e(ar,[2,129]),{2:s,3:1338,4:n,5:r,6:a,7:o,8:h,9:c},{2:s,3:1086,4:n,5:r,6:a,7:o,8:h,9:c,120:1150,152:or,154:hr,156:1339,229:Bi,281:ji,370:1149,371:1151},{2:s,3:1340,4:n,5:r,6:a,7:o,8:h,9:c},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:285,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,160:1341,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(ar,[2,135]),e(Xr,[2,1119],{164:1342}),e(Xr,[2,1121],{166:1343}),e(Xr,[2,1123],{168:1344}),e(Xr,[2,1127],{170:1345}),e(zr,Jr,{172:1346,187:1347}),{82:[1,1348]},e(Xr,[2,1129],{174:1349}),e(Xr,[2,1131],{176:1350}),e(zr,Jr,{187:1347,172:1351}),e(zr,Jr,{187:1347,172:1352}),e(zr,Jr,{187:1347,172:1353}),e(zr,Jr,{187:1347,172:1354}),{2:s,3:787,4:n,5:r,6:a,7:o,8:h,9:c,76:rs,81:as,82:os,121:hs,123:790,124:Ye,125:We,126:1355,127:ls,131:cs,132:us,133:fs,137:ds,138:ps,139:bs,140:vs,141:Es,142:ms,143:gs,144:ws,145:ys,146:Ts,147:Ss,148:As,149:Os,150:Rs,151:Ns,152:_s,153:812,154:Cs,155:Ls,157:Is,158:ks,159:Ms,161:$s,163:xs,165:Ds,167:822,169:823,171:Ps,173:Us,175:Gs,177:Fs,178:Bs,179:js,180:Hs,181:Vs,182:qs,184:Ys,194:Ws,196:Xs,266:Nt,267:_t,304:zs,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:875,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,183:1356,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,279:874,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(Kr,[2,1133],{185:1357}),e(it,[2,641],{192:[1,1358]}),e(it,[2,637],{192:[1,1359]}),e(it,[2,630]),{122:1360,141:vt,329:Yt},e(it,[2,639],{192:[1,1361]}),e(it,[2,634]),e(it,[2,635],{121:[1,1362]}),e(Js,[2,73]),{2:s,3:258,4:n,5:r,6:a,7:o,8:h,9:c,79:1363},{44:1364,82:p,85:75,95:76,96:b,193:102,198:g},{78:Qr,83:[1,1365]},e(Zr,ta),e(it,_n,{369:1368,78:ea,137:[1,1367],503:Cn}),e(ia,[2,472]),{133:[1,1370]},{2:s,3:1371,4:n,5:r,6:a,7:o,8:h,9:c},e(Me,[2,1189]),e(Me,[2,1190]),e(it,[2,653]),e(tn,[2,376],{123:660,360:672,109:Ve,121:qe,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,363:Si,364:Ai,365:Oi,366:Ri}),e(_r,Cr,{123:660,360:672,121:qe,124:Ye,125:We,132:Xe,142:Je,145:Ke,147:Qe,150:ei,151:ii,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,365:Oi}),e([14,78,83,109,121,124,125,127,132,133,142,145,147,148,149,150,151,163,171,177,178,179,180,188,189,271,273,339,343,344,345,346,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,639,798],Ir),e(Fe,[2,723]),e(Fe,[2,725]),e(it,[2,689]),e(it,[2,691],{123:660,360:672,109:Ve,121:qe,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,363:Si,364:Ai,365:Oi,366:Ri}),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1372,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:1165,4:n,5:r,6:a,7:o,8:h,9:c,82:lr,140:cr,470:1373},e(sa,[2,698]),e(sa,[2,699]),e(sa,[2,700]),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1374,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1375,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{123:1163,124:Ye,125:We,133:[1,1376]},e(an,[2,797]),e(hn,[2,158],{78:ur}),e(hn,[2,159],{78:ur}),e(hn,[2,160],{78:ur}),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:875,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,279:1377,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:1378,4:n,5:r,6:a,7:o,8:h,9:c,122:1380,140:[1,1379],141:vt,329:Yt},e(fr,[2,279]),e(fr,[2,281]),e(fr,[2,283]),e(Ae,[2,170]),e(Ae,[2,1142]),{83:[1,1381]},e(Ne,[2,800]),{2:s,3:1382,4:n,5:r,6:a,7:o,8:h,9:c},{2:s,3:1383,4:n,5:r,6:a,7:o,8:h,9:c},{2:s,3:1385,4:n,5:r,6:a,7:o,8:h,9:c,421:1384},{2:s,3:1385,4:n,5:r,6:a,7:o,8:h,9:c,421:1386},{2:s,3:1387,4:n,5:r,6:a,7:o,8:h,9:c},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:285,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,160:1388,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:1389,4:n,5:r,6:a,7:o,8:h,9:c},{78:Zs,83:[1,1390]},e($i,[2,365]),{82:[1,1391]},e($i,[2,366]),e($i,[2,367]),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1392,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1393,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1394,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1395,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1396,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(cn,[2,532]),e(it,na,{444:1397,81:ra,82:[1,1398]}),e(it,na,{444:1400,81:ra}),{82:[1,1401]},{2:s,3:268,4:n,5:r,6:a,7:o,8:h,9:c,208:1402},e(an,[2,773]),e(an,[2,775]),e(an,[2,1220]),{152:Te,154:Se,469:1403},e(aa,[2,1221],{456:204,518:1404,153:1405,154:Ee,457:te,461:ee}),{81:Er,148:[2,1225],520:1406,522:1407},e([14,78,81,83,141,148,154,161,339,343,457,461,639,798],bn,{529:912,532:913,146:Pe}),e(an,[2,778]),e(an,dn),{78:un,83:[1,1408]},e(En,[2,1239],{531:1409,536:1410,161:Ue}),e(vn,[2,1238]),e(En,[2,787]),e(En,[2,1244]),e(it,[2,518],{82:[1,1411]}),{81:[1,1413],82:[1,1412]},{109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,157:[1,1414],163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},e(Pr,oa,{85:75,95:76,193:102,507:1415,44:1418,82:p,96:b,155:ha,198:g,509:la}),e(mr,[2,1214]),e(gn,[2,765]),{250:[1,1419]},e(ca,[2,811]),e(ca,[2,812]),e(ca,[2,813]),e(wn,yn,{548:1420,105:Tn,552:Sn,553:An,554:On}),e(wn,[2,810]),e(it,[2,324]),e(it,[2,325]),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1421,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(Fe,[2,731],{133:[1,1422]}),e(Tr,[2,576]),{140:[1,1424],425:1423,427:[1,1425]},e(Tr,[2,9]),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1292,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,380:1426,456:204,457:te,461:ee},e(it,_n,{123:660,360:672,369:1427,109:Ve,121:qe,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,363:Si,364:Ai,365:Oi,366:Ri,503:Cn}),e(Pr,[2,760],{78:ur,207:[1,1428]}),e(it,[2,624]),e(it,[2,625]),{2:s,3:268,4:n,5:r,6:a,7:o,8:h,9:c,208:1429},e(it,[2,709]),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1430,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1431,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{83:[1,1432],109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},{83:[1,1433],109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,44:1434,60:175,82:we,85:75,95:76,96:b,104:285,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,160:1435,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,193:102,198:g,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{83:[1,1436]},{78:Zs,83:[1,1437]},e(ve,[2,447]),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1438,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,44:1439,60:175,82:we,83:[1,1441],85:75,95:76,96:b,104:285,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,160:1440,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,193:102,198:g,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(ve,[2,450]),e(ve,[2,452]),e(ve,br,{303:1442,307:vr}),{83:[1,1443],109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},{83:[1,1444],109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},{9:ua,83:fa,306:1445},{128:[1,1447]},e(kr,Mr,{123:660,360:672,305:1448,109:Ve,121:qe,124:Ye,125:We,127:$r,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,363:Si,364:Ai,365:Oi,366:Ri}),{2:s,3:1449,4:n,5:r,6:a,7:o,8:h,9:c,189:[1,1450]},e(Dr,[2,295]),e(Gi,[2,654]),e(ve,[2,384]),{339:[1,1451]},e(ve,[2,391]),{109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,339:[2,395],344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1452,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{4:Rn,11:940,300:1453,424:939,426:Nn},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1454,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(Gi,[2,677]),e(Bn,[2,687]),e(jn,[2,672]),e(Dr,xr),e(Gi,[2,674]),e(qn,[2,679]),e(qn,[2,681]),e(qn,[2,684]),e(qn,[2,682]),e(qn,[2,685]),e(qn,[2,683]),e(qn,[2,686]),e(Pr,_n,{369:1456,78:Ur,503:Cn}),e(Pr,[2,479]),{82:[1,1457],152:mt,153:1458,154:Ee,161:yt,190:Ot,210:1459,335:Jt,456:204,457:te,461:ee},e(Pr,_n,{369:1460,503:Cn}),{78:Qr,83:[1,1461]},{78:da,83:[1,1462]},e([78,83,109,121,124,125,132,133,142,145,147,148,149,150,151,163,179,180,188,189,344,345,346,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366],ta),e(pa,[2,507],{123:660,360:672,109:Ve,121:qe,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,363:Si,364:Ai,365:Oi,366:Ri}),e(Pr,[2,493]),e(Pr,_n,{369:1464,78:ea,503:Cn}),{82:Xn,152:mt,153:1056,154:Ee,161:yt,190:Ot,210:1057,335:Jt,376:1465,456:204,457:te,461:ee},e(Pr,_n,{369:1466,78:Ur,503:Cn}),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,44:308,60:175,82:we,84:1467,85:75,95:76,96:b,104:1292,120:1291,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,193:102,198:g,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,380:1290,456:204,457:te,461:ee},e(Pr,_n,{369:1468,503:Cn}),{44:1471,82:ba,85:75,95:76,96:b,152:mt,153:1056,154:Ee,158:Yn,161:yt,190:Ot,193:102,198:g,210:1057,335:Jt,375:1469,376:1470,379:Wn,456:204,457:te,461:ee},e(Pr,_n,{369:1473,78:Ur,503:Cn}),e(Pr,[2,489]),e(it,_n,{369:1474,497:1475,498:1476,341:Br,503:Cn}),e(va,[2,743]),e(va,[2,744]),{163:[1,1478],499:[1,1477]},{109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,341:[2,740],344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},{83:[1,1479]},{44:1480,82:p,85:75,95:76,96:b,193:102,198:g},e(Wi,[2,190]),e(Wi,[2,1144]),e(it,[2,609]),e(Ea,ma,{90:1481,137:ga}),e(Vr,[2,1094]),{82:[1,1483]},{82:[1,1484]},e(zn,[2,179],{213:1485,232:1487,214:1488,233:1489,241:1492,78:wa,215:ya,217:Ta,242:Sa,243:Aa,244:Oa,245:Ra,246:Na,247:_a,248:Ca,249:La}),{2:s,3:235,4:n,5:r,6:a,7:o,8:h,9:c,44:753,82:jr,85:75,95:76,96:b,141:ae,152:mt,153:228,154:gt,161:yt,165:st,190:Ot,193:102,198:g,208:229,209:231,210:230,211:232,212:1501,218:1318,227:233,229:oe,293:nt,322:rt,323:at,324:ot,325:ht,326:lt,335:Jt,456:204,457:te,461:ee},e(Zr,[2,188]),{2:s,3:1086,4:n,5:r,6:a,7:o,8:h,9:c,119:1502,120:1084,121:Qn,229:Bi,281:ji},e(Wr,[2,97]),e(Zn,[2,274],{272:1503,273:[1,1504]}),{274:1505,275:[2,1169],800:[1,1506]},e(es,[2,261],{78:Ia}),e(ka,[2,262]),e(ka,[2,266],{123:660,360:672,109:Ve,121:qe,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,268:[1,1508],269:[1,1509],344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,363:Si,364:Ai,365:Oi,366:Ri}),e(zn,Jn,{88:1510,192:Kn}),e(Zn,[2,157],{123:660,360:672,109:Ve,121:qe,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,363:Si,364:Ai,365:Oi,366:Ri}),{83:[1,1511]},{78:Zs,83:[2,1118]},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,83:[2,1111],104:1325,120:159,122:163,129:1512,130:1513,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,263:1324,266:Nt,267:_t,268:[1,1514],280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(ar,[2,108]),e(Xr,[2,1114],{162:1097,188:sr,189:nr,190:rr}),{2:s,3:787,4:n,5:r,6:a,7:o,8:h,9:c,76:rs,81:as,82:os,83:[1,1515],121:hs,123:790,124:Ye,125:We,126:1516,127:ls,131:cs,132:us,133:fs,137:ds,138:ps,139:bs,140:vs,141:Es,142:ms,143:gs,144:ws,145:ys,146:Ts,147:Ss,148:As,149:Os,150:Rs,151:Ns,152:_s,153:812,154:Cs,155:Ls,157:Is,158:ks,159:Ms,161:$s,163:xs,165:Ds,167:822,169:823,171:Ps,173:Us,175:Gs,177:Fs,178:Bs,179:js,180:Hs,181:Vs,182:qs,184:Ys,194:Ws,196:Xs,266:Nt,267:_t,304:zs,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,456:204,457:te,461:ee},e(Xr,[2,1115],{162:1097,188:sr,189:nr,190:rr}),{83:[1,1517],109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},{83:[1,1518],109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},{83:[1,1519]},e(ar,[2,130]),{78:ea,83:[1,1520]},e(ar,[2,132]),{78:Zs,83:[1,1521]},{2:s,3:787,4:n,5:r,6:a,7:o,8:h,9:c,76:rs,81:as,82:os,83:[1,1522],121:hs,123:790,124:Ye,125:We,126:1523,127:ls,131:cs,132:us,133:fs,137:ds,138:ps,139:bs,140:vs,141:Es,142:ms,143:gs,144:ws,145:ys,146:Ts,147:Ss,148:As,149:Os,150:Rs,151:Ns,152:_s,153:812,154:Cs,155:Ls,157:Is,158:ks,159:Ms,161:$s,163:xs,165:Ds,167:822,169:823,171:Ps,173:Us,175:Gs,177:Fs,178:Bs,179:js,180:Hs,181:Vs,182:qs,184:Ys,194:Ws,196:Xs,266:Nt,267:_t,304:zs,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,456:204,457:te,461:ee},{2:s,3:787,4:n,5:r,6:a,7:o,8:h,9:c,76:rs,81:as,82:os,83:[1,1524],121:hs,123:790,124:Ye,125:We,126:1525,127:ls,131:cs,132:us,133:fs,137:ds,138:ps,139:bs,140:vs,141:Es,142:ms,143:gs,144:ws,145:ys,146:Ts,147:Ss,148:As,149:Os,150:Rs,151:Ns,152:_s,153:812,154:Cs,155:Ls,157:Is,158:ks,159:Ms,161:$s,163:xs,165:Ds,167:822,169:823,171:Ps,173:Us,175:Gs,177:Fs,178:Bs,179:js,180:Hs,181:Vs,182:qs,184:Ys,194:Ws,196:Xs,266:Nt,267:_t,304:zs,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,456:204,457:te,461:ee},{2:s,3:787,4:n,5:r,6:a,7:o,8:h,9:c,76:rs,81:as,82:os,83:[1,1526],121:hs,123:790,124:Ye,125:We,126:1527,127:ls,131:cs,132:us,133:fs,137:ds,138:ps,139:bs,140:vs,141:Es,142:ms,143:gs,144:ws,145:ys,146:Ts,147:Ss,148:As,149:Os,150:Rs,151:Ns,152:_s,153:812,154:Cs,155:Ls,157:Is,158:ks,159:Ms,161:$s,163:xs,165:Ds,167:822,169:823,171:Ps,173:Us,175:Gs,177:Fs,178:Bs,179:js,180:Hs,181:Vs,182:qs,184:Ys,194:Ws,196:Xs,266:Nt,267:_t,304:zs,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,456:204,457:te,461:ee},{2:s,3:787,4:n,5:r,6:a,7:o,8:h,9:c,76:rs,81:as,82:os,83:[1,1528],121:hs,123:790,124:Ye,125:We,126:1529,127:ls,131:cs,132:us,133:fs,137:ds,138:ps,139:bs,140:vs,141:Es,142:ms,143:gs,144:ws,145:ys,146:Ts,147:Ss,148:As,149:Os,150:Rs,151:Ns,152:_s,153:812,154:Cs,155:Ls,157:Is,158:ks,159:Ms,161:$s,163:xs,165:Ds,167:822,169:823,171:Ps,173:Us,175:Gs,177:Fs,178:Bs,179:js,180:Hs,181:Vs,182:qs,184:Ys,194:Ws,196:Xs,266:Nt,267:_t,304:zs,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,456:204,457:te,461:ee},{78:Ma,83:[1,1530]},e(pa,[2,153],{456:204,3:787,123:790,153:812,167:822,169:823,126:1532,2:s,4:n,5:r,6:a,7:o,8:h,9:c,76:rs,81:as,82:os,121:hs,124:Ye,125:We,127:ls,131:cs,132:us,133:fs,137:ds,138:ps,139:bs,140:vs,141:Es,142:ms,143:gs,144:ws,145:ys,146:Ts,147:Ss,148:As,149:Os,150:Rs,151:Ns,152:_s,154:Cs,155:Ls,157:Is,158:ks,159:Ms,161:$s,163:xs,165:Ds,171:Ps,173:Us,175:Gs,177:Fs,178:Bs,179:js,180:Hs,181:Vs,182:qs,184:Ys,194:Ws,196:Xs,266:Nt,267:_t,304:zs,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,457:te,461:ee}),e(zr,Jr,{187:1347,172:1533}),{2:s,3:787,4:n,5:r,6:a,7:o,8:h,9:c,76:rs,81:as,82:os,83:[1,1534],121:hs,123:790,124:Ye,125:We,126:1535,127:ls,131:cs,132:us,133:fs,137:ds,138:ps,139:bs,140:vs,141:Es,142:ms,143:gs,144:ws,145:ys,146:Ts,147:Ss,148:As,149:Os,150:Rs,151:Ns,152:_s,153:812,154:Cs,155:Ls,157:Is,158:ks,159:Ms,161:$s,163:xs,165:Ds,167:822,169:823,171:Ps,173:Us,175:Gs,177:Fs,178:Bs,179:js,180:Hs,181:Vs,182:qs,184:Ys,194:Ws,196:Xs,266:Nt,267:_t,304:zs,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,456:204,457:te,461:ee},{2:s,3:787,4:n,5:r,6:a,7:o,8:h,9:c,76:rs,81:as,82:os,83:[1,1536],121:hs,123:790,124:Ye,125:We,126:1537,127:ls,131:cs,132:us,133:fs,137:ds,138:ps,139:bs,140:vs,141:Es,142:ms,143:gs,144:ws,145:ys,146:Ts,147:Ss,148:As,149:Os,150:Rs,151:Ns,152:_s,153:812,154:Cs,155:Ls,157:Is,158:ks,159:Ms,161:$s,163:xs,165:Ds,167:822,169:823,171:Ps,173:Us,175:Gs,177:Fs,178:Bs,179:js,180:Hs,181:Vs,182:qs,184:Ys,194:Ws,196:Xs,266:Nt,267:_t,304:zs,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,456:204,457:te,461:ee},{78:Ma,83:[1,1538]},{78:Ma,83:[1,1539]},{78:Ma,83:[1,1540]},{78:Ma,83:[1,1541]},{83:[1,1542],162:1097,188:sr,189:nr,190:rr},{78:ur,83:[1,1543]},{2:s,3:787,4:n,5:r,6:a,7:o,8:h,9:c,76:rs,78:[1,1544],81:as,82:os,121:hs,123:790,124:Ye,125:We,126:1545,127:ls,131:cs,132:us,133:fs,137:ds,138:ps,139:bs,140:vs,141:Es,142:ms,143:gs,144:ws,145:ys,146:Ts,147:Ss,148:As,149:Os,150:Rs,151:Ns,152:_s,153:812,154:Cs,155:Ls,157:Is,158:ks,159:Ms,161:$s,163:xs,165:Ds,167:822,169:823,171:Ps,173:Us,175:Gs,177:Fs,178:Bs,179:js,180:Hs,181:Vs,182:qs,184:Ys,194:Ws,196:Xs,266:Nt,267:_t,304:zs,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,456:204,457:te,461:ee},{2:s,3:1546,4:n,5:r,6:a,7:o,8:h,9:c},{2:s,3:1547,4:n,5:r,6:a,7:o,8:h,9:c},e(it,[2,632]),{2:s,3:1548,4:n,5:r,6:a,7:o,8:h,9:c},{122:1549,141:vt,329:Yt},e(Js,[2,74]),{83:[1,1550]},{81:[1,1551]},{2:s,3:1086,4:n,5:r,6:a,7:o,8:h,9:c,120:1552,229:Bi,281:ji},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1553,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(it,[2,471]),{2:s,3:1086,4:n,5:r,6:a,7:o,8:h,9:c,120:1150,152:or,154:hr,229:Bi,281:ji,370:1554,371:1151},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1555,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{133:[1,1556]},e(it,[2,692],{123:660,360:672,109:Ve,121:qe,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,363:Si,364:Ai,365:Oi,366:Ri}),e(sa,[2,697]),{83:[1,1557],109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},e(it,[2,693],{123:660,360:672,109:Ve,121:qe,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,363:Si,364:Ai,365:Oi,366:Ri}),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1558,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(fr,[2,276]),e(fr,[2,278]),e(fr,[2,280]),e(fr,[2,282]),e(Ae,[2,171]),e(it,[2,604]),{157:[1,1559]},e(it,[2,605]),e(an,[2,571],{424:939,11:940,300:1560,4:Rn,423:[1,1561],426:Nn}),e(it,[2,606]),e(it,[2,608]),{78:Zs,83:[1,1562]},e(it,[2,612]),e($i,br,{303:1563,307:vr}),e($a,[2,1179],{308:1564,310:1565,311:[1,1566]}),{78:[1,1567],109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},{78:[1,1568],109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},{78:[1,1569],109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},{78:[1,1570],109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},{78:[1,1571],109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},e(it,[2,616]),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:285,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,160:1572,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:1573,4:n,5:r,6:a,7:o,8:h,9:c},e(it,[2,618]),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1325,120:159,122:163,129:1574,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,263:1324,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{82:[1,1575]},{2:s,3:1576,4:n,5:r,6:a,7:o,8:h,9:c},{81:Er,148:[2,1223],519:1577,522:1578},e(aa,[2,1222]),{148:[1,1579]},{148:[2,1226]},e(an,[2,779]),e(En,[2,786]),e(En,[2,1240]),{2:s,3:1385,4:n,5:r,6:a,7:o,8:h,9:c,81:[1,1582],386:1580,393:1581,421:1583},{2:s,3:1086,4:n,5:r,6:a,7:o,8:h,9:c,84:1584,120:1147,229:Bi,281:ji},{44:1585,82:p,85:75,95:76,96:b,193:102,198:g},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1586,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(Pr,[2,764]),{2:s,3:1086,4:n,5:r,6:a,7:o,8:h,9:c,120:1150,152:or,154:hr,156:1587,229:Bi,281:ji,370:1149,371:1151},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:285,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,160:1588,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(Pr,[2,769]),{2:s,3:268,4:n,5:r,6:a,7:o,8:h,9:c,208:1589},{368:gr,372:wr,373:yr,549:1590},e(Fe,[2,732],{123:660,360:672,109:Ve,121:qe,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,363:Si,364:Ai,365:Oi,366:Ri}),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1591,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{78:[1,1592],83:[1,1593]},e(pa,[2,578]),e(pa,[2,579]),{78:da,83:[1,1594]},e(it,[2,476]),{2:s,3:268,4:n,5:r,6:a,7:o,8:h,9:c,152:Te,154:Se,208:1596,469:1595},e(Fe,[2,600]),e(Ar,[2,401],{123:660,360:672,124:Ye,125:We,132:Xe,142:Je,145:Ke,147:Qe,150:ei,151:ii,188:ai,189:oi,345:li,349:fi,350:di,351:pi,352:bi}),e(Ar,[2,403],{123:660,360:672,124:Ye,125:We,132:Xe,142:Je,145:Ke,147:Qe,150:ei,151:ii,188:ai,189:oi,345:li,349:fi,350:di,351:pi,352:bi}),e(ve,[2,417]),e(ve,[2,421]),{83:[1,1597]},{78:Zs,83:[1,1598]},e(ve,[2,443]),e(ve,[2,445]),{83:[1,1599],109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},{83:[1,1600]},{78:Zs,83:[1,1601]},e(ve,[2,448]),e(ve,[2,340]),e(ve,br,{303:1602,307:vr}),e(ve,br,{303:1603,307:vr}),{83:[1,1604]},{141:[1,1605]},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1325,120:159,122:163,129:1606,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,263:1324,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{9:ua,83:fa,306:1607},e(Dr,[2,290]),e(ve,[2,285]),e(ve,[2,390]),e(Fn,[2,394],{123:660,360:672,109:Ve,121:qe,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,363:Si,364:Ai,365:Oi,366:Ri}),{78:[1,1609],83:[1,1608]},{78:[1,1611],83:[1,1610],109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},{2:s,3:1449,4:n,5:r,6:a,7:o,8:h,9:c},e(Pr,[2,478]),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1292,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,380:1612,456:204,457:te,461:ee},e(Fr,[2,505]),e(Fr,[2,506]),e(Pr,[2,490]),{44:1615,82:ba,85:75,95:76,96:b,152:mt,153:1056,154:Ee,158:Yn,161:yt,190:Ot,193:102,198:g,210:1057,335:Jt,375:1613,376:1614,379:Wn,456:204,457:te,461:ee},e(Fr,[2,501]),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1616,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(Pr,[2,496]),e(Pr,_n,{369:1617,78:Ur,503:Cn}),e(Pr,[2,481]),{78:Qr,83:[1,1618]},e(Pr,[2,484]),{82:Xn,152:mt,153:1056,154:Ee,161:yt,190:Ot,210:1057,335:Jt,376:1619,456:204,457:te,461:ee},e(Pr,_n,{369:1620,78:Ur,503:Cn}),e(Pr,_n,{369:1621,503:Cn}),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,44:308,60:175,82:we,85:75,95:76,96:b,104:1292,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,193:102,198:g,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,380:1290,456:204,457:te,461:ee},e(Pr,[2,488]),e(it,[2,735]),e(va,[2,741]),e(va,[2,742]),{179:[1,1623],342:[1,1622]},{499:[1,1624]},{250:[2,739]},{83:[1,1625]},e(dr,xa,{91:1626,252:Da}),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1628,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1629,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:1630,4:n,5:r,6:a,7:o,8:h,9:c},e(zn,[2,180],{233:1489,241:1492,232:1632,214:1633,78:[1,1631],215:ya,217:Ta,242:Sa,243:Aa,244:Oa,245:Ra,246:Na,247:_a,248:Ca,249:La}),{2:s,3:235,4:n,5:r,6:a,7:o,8:h,9:c,82:re,141:ae,152:mt,153:228,154:gt,161:yt,165:st,190:Ot,208:229,209:231,210:230,211:232,218:1634,227:233,229:oe,293:nt,322:rt,323:at,324:ot,325:ht,326:lt,335:Jt,456:204,457:te,461:ee},e(Zr,[2,208]),e(Zr,[2,209]),{2:s,3:235,4:n,5:r,6:a,7:o,8:h,9:c,82:[1,1639],152:mt,153:1637,154:gt,161:yt,165:st,190:Ot,208:1636,209:1640,210:1638,211:1641,234:1635,293:nt,322:rt,323:at,324:ot,325:ht,326:lt,335:Jt,456:204,457:te,461:ee},{216:[1,1642],243:Pa},{216:[1,1644],243:Ua},e(Ga,[2,217]),{215:[1,1648],217:[1,1647],241:1646,243:Aa,244:Oa,245:Ra,246:Na,247:_a,248:Ca,249:La},e(Ga,[2,219]),{243:[1,1649]},{217:[1,1651],243:[1,1650]},{217:[1,1653],243:[1,1652]},{217:[1,1654]},{243:[1,1655]},{243:[1,1656]},{78:wa,213:1657,214:1488,215:ya,217:Ta,232:1487,233:1489,241:1492,242:Sa,243:Aa,244:Oa,245:Ra,246:Na,247:_a,248:Ca,249:La},e(Wr,[2,94]),e(Zn,[2,272]),{140:bt,205:1658},{275:[1,1659]},{275:[2,1170]},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1325,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,263:1660,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(ka,[2,267],{264:1661,265:[1,1662]}),{270:[1,1663]},e(Vr,[2,1101],{101:1664,102:1665,103:qr,108:Yr}),e(ar,[2,110]),{78:Ia,83:[1,1666]},{83:[1,1667]},{83:[2,1112]},e(ar,[2,109]),e(Xr,[2,1116],{162:1097,188:sr,189:nr,190:rr}),e(ar,[2,111]),e(ar,[2,112]),e(ar,[2,113]),e(ar,[2,131]),e(ar,[2,134]),e(ar,[2,137]),e(Xr,[2,1120],{162:1097,188:sr,189:nr,190:rr}),e(ar,[2,138]),e(Xr,[2,1122],{162:1097,188:sr,189:nr,190:rr}),e(ar,[2,139]),e(Xr,[2,1124],{162:1097,188:sr,189:nr,190:rr}),e(ar,[2,140]),e(Xr,[2,1128],{162:1097,188:sr,189:nr,190:rr}),e(ar,[2,141]),e(zr,[2,1135],{186:1668}),e(zr,[2,1138],{162:1097,188:sr,189:nr,190:rr}),{78:Ma,83:[1,1669]},e(ar,[2,143]),e(Xr,[2,1130],{162:1097,188:sr,189:nr,190:rr}),e(ar,[2,144]),e(Xr,[2,1132],{162:1097,188:sr,189:nr,190:rr}),e(ar,[2,145]),e(ar,[2,146]),e(ar,[2,147]),e(ar,[2,148]),e(ar,[2,149]),e(ar,[2,150]),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:285,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,160:1670,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(Kr,[2,1134],{162:1097,188:sr,189:nr,190:rr}),e(it,[2,642]),e(it,[2,638]),e(it,[2,640]),e(it,[2,636]),e(Js,[2,77]),{82:[1,1671]},e(Zr,[2,516]),e(it,_n,{123:660,360:672,369:1672,109:Ve,121:qe,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,363:Si,364:Ai,365:Oi,366:Ri,503:Cn}),e(ia,[2,473]),e(ia,[2,474],{123:660,360:672,109:Ve,121:qe,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,363:Si,364:Ai,365:Oi,366:Ri}),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1673,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(sa,[2,701]),e(it,[2,694],{123:660,360:672,109:Ve,121:qe,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,363:Si,364:Ai,365:Oi,366:Ri}),{2:s,3:1674,4:n,5:r,6:a,7:o,8:h,9:c},e(an,[2,580],{422:1675,428:1676,429:1677,401:1685,163:Fa,196:Ba,250:ja,330:Ha,378:Va,391:qa,403:Ya,404:Wa,407:Xa,408:za}),e(an,[2,570]),e(it,[2,611],{81:[1,1689]}),e($i,[2,364]),{83:[2,1181],127:[1,1692],309:1690,312:1691},e($a,[2,1180]),{128:[1,1693]},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1694,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1695,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1696,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1697,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1698,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{78:Zs,83:[1,1699]},e(it,[2,620]),{78:Ia,83:[1,1700]},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1325,120:159,122:163,129:1701,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,263:1324,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e([14,78,83,148,339,343,639,798],[2,783]),{148:[1,1702]},{148:[2,1224]},{2:s,3:1211,4:n,5:r,6:a,7:o,8:h,9:c,141:De,146:Pe,152:Te,154:Se,161:Ue,469:620,514:1213,517:1703,521:617,532:614,536:616},{83:[1,1704]},{78:[1,1705],83:[2,534]},{44:1706,82:p,85:75,95:76,96:b,193:102,198:g},e(pa,[2,567]),{78:Qr,83:[1,1707]},e(it,[2,1207],{449:1708,450:1709,76:Ja}),e(Pr,oa,{85:75,95:76,193:102,123:660,360:672,44:1418,507:1711,82:p,96:b,109:Ve,121:qe,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,155:ha,163:si,179:ni,180:ri,188:ai,189:oi,198:g,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,363:Si,364:Ai,365:Oi,366:Ri,509:la}),e(Pr,[2,767],{78:ea}),e(Pr,[2,768],{78:Zs}),e([14,57,76,82,96,133,155,165,198,294,295,322,339,343,368,372,373,433,437,438,441,443,445,446,454,455,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,545,546,555,639,798],[2,1255],{550:1712,3:1713,2:s,4:n,5:r,6:a,7:o,8:h,9:c,81:[1,1714]}),e(Ka,[2,1257],{551:1715,81:[1,1716]}),e(Fe,[2,733],{123:660,360:672,109:Ve,121:qe,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,363:Si,364:Ai,365:Oi,366:Ri}),{140:[1,1717]},e(Tr,[2,573]),e(Tr,[2,575]),{2:s,3:1718,4:n,5:r,6:a,7:o,8:h,9:c},e(Pr,[2,762],{82:[1,1719]}),e(ve,[2,433]),e(ve,[2,434]),e(ve,[2,460]),e(ve,[2,444]),e(ve,[2,446]),e(ve,[2,341]),e(ve,[2,342]),e(ve,[2,343]),{83:[2,352]},e(kr,[2,350],{78:Ia}),{83:[1,1720]},e(ve,[2,328]),{140:[1,1721]},e(ve,[2,330]),{140:[1,1722]},{78:da,83:[1,1723]},{82:Xn,152:mt,153:1056,154:Ee,161:yt,190:Ot,210:1057,335:Jt,376:1724,456:204,457:te,461:ee},e(Pr,_n,{369:1725,78:Ur,503:Cn}),e(Pr,_n,{369:1726,503:Cn}),e(pa,[2,508],{123:660,360:672,109:Ve,121:qe,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,363:Si,364:Ai,365:Oi,366:Ri}),e(Pr,[2,480]),{44:1729,82:ba,85:75,95:76,96:b,152:mt,153:1056,154:Ee,158:Yn,161:yt,190:Ot,193:102,198:g,210:1057,335:Jt,375:1727,376:1728,379:Wn,456:204,457:te,461:ee},e(Pr,_n,{369:1730,78:Ur,503:Cn}),e(Pr,[2,487]),e(Pr,[2,494]),{368:Qa,372:Za,500:1731},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1734,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{128:[1,1736],179:[1,1737],342:[1,1735]},e([78,215,217,242,243,244,245,246,247,248,249],Hr,{3:759,219:1309,230:1310,2:s,4:n,5:r,6:a,7:o,8:h,9:c,81:Xi,83:pr,127:pr,171:pr,177:pr,178:pr,271:pr,273:pr}),e(ce,ue,{260:243,92:1738,171:fe,177:de,178:pe}),{128:[1,1739]},e(Ea,[2,235],{123:660,360:672,109:Ve,121:qe,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,363:Si,364:Ai,365:Oi,366:Ri}),{105:[1,1740],109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},{105:[1,1741]},{2:s,3:235,4:n,5:r,6:a,7:o,8:h,9:c,82:re,141:ae,152:mt,153:228,154:gt,161:yt,165:st,190:Ot,208:229,209:231,210:230,211:232,212:1742,218:1318,227:233,229:oe,293:nt,322:rt,323:at,324:ot,325:ht,326:lt,335:Jt,456:204,457:te,461:ee},e(Zr,[2,206]),e(Zr,[2,207]),e(Zr,[2,189]),e(Zr,[2,233],{235:1743,250:[1,1744],251:[1,1745]}),e(Wi,[2,1159],{3:759,236:1746,230:1747,2:s,4:n,5:r,6:a,7:o,8:h,9:c,81:Xi}),e(Yi,[2,1161],{237:1748,81:[1,1749]}),{2:s,3:759,4:n,5:r,6:a,7:o,8:h,9:c,81:Xi,230:1750},{44:1751,82:p,85:75,95:76,96:b,193:102,198:g},e(Wi,[2,1165],{3:759,239:1752,230:1753,2:s,4:n,5:r,6:a,7:o,8:h,9:c,81:Xi}),e(Wi,[2,1167],{3:759,240:1754,230:1755,2:s,4:n,5:r,6:a,7:o,8:h,9:c,81:Xi}),{82:[1,1756]},e(Ga,[2,229]),{82:[1,1757]},e(Ga,[2,225]),e(Ga,[2,218]),{243:Ua},{243:Pa},e(Ga,[2,220]),e(Ga,[2,221]),{243:[1,1758]},e(Ga,[2,223]),{243:[1,1759]},{243:[1,1760]},e(Ga,[2,227]),e(Ga,[2,228]),{83:[1,1761],214:1633,215:ya,217:Ta,232:1632,233:1489,241:1492,242:Sa,243:Aa,244:Oa,245:Ra,246:Na,247:_a,248:Ca,249:La},e(Zn,[2,275]),{140:[2,1171],276:1762,681:[1,1763]},e(ka,[2,263]),e(ka,[2,268]),{266:[1,1764],267:[1,1765]},e(ka,[2,269],{268:[1,1766]}),e(Ea,ma,{90:1767,137:ga}),e(Vr,[2,1102]),e(ar,[2,101]),e(ar,[2,102]),e(pa,[2,152],{456:204,3:787,123:790,153:812,167:822,169:823,126:1768,2:s,4:n,5:r,6:a,7:o,8:h,9:c,76:rs,81:as,82:os,121:hs,124:Ye,125:We,127:ls,131:cs,132:us,133:fs,137:ds,138:ps,139:bs,140:vs,141:Es,142:ms,143:gs,144:ws,145:ys,146:Ts,147:Ss,148:As,149:Os,150:Rs,151:Ns,152:_s,154:Cs,155:Ls,157:Is,158:ks,159:Ms,161:$s,163:xs,165:Ds,171:Ps,173:Us,175:Gs,177:Fs,178:Bs,179:js,180:Hs,181:Vs,182:qs,184:Ys,194:Ws,196:Xs,266:Nt,267:_t,304:zs,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,457:te,461:ee}),e(ar,[2,142]),{78:Zs,83:[1,1769]},{44:1770,82:p,85:75,95:76,96:b,193:102,198:g},e(it,[2,470]),e(ia,[2,475],{123:660,360:672,109:Ve,121:qe,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,363:Si,364:Ai,365:Oi,366:Ri}),e(it,[2,607]),e(an,[2,569]),e(an,[2,581],{401:1685,429:1771,163:Fa,196:Ba,250:ja,330:Ha,378:Va,391:qa,403:Ya,404:Wa,407:Xa,408:za}),e(Qs,[2,583]),{6:[1,1772]},{6:[1,1773]},{2:s,3:268,4:n,5:r,6:a,7:o,8:h,9:c,208:1774},e(Qs,[2,589],{82:[1,1775]}),{2:s,3:122,4:n,5:r,6:a,7:o,8:h,9:c,82:[1,1777],122:275,140:bt,141:vt,152:mt,161:yt,165:st,190:Ot,205:274,209:1778,210:278,284:276,285:277,292:me,293:ge,302:1776,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,335:Jt},e(Qs,[2,593]),{330:[1,1779]},e(Qs,[2,595]),e(Qs,[2,596]),{368:[1,1780]},{82:[1,1781]},{2:s,3:1782,4:n,5:r,6:a,7:o,8:h,9:c},{83:[1,1783]},{83:[2,1182]},{128:[1,1784]},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1790,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,253:1785,255:to,256:eo,257:1786,258:io,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{83:[1,1791],109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},{83:[1,1792],109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},{83:[1,1793],109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},{83:[1,1794],109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},{83:[1,1795],109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},e(it,na,{444:1796,81:ra}),e(it,[2,626]),{78:Ia,83:[1,1797]},{2:s,3:1211,4:n,5:r,6:a,7:o,8:h,9:c,141:De,146:Pe,152:Te,154:Se,161:Ue,469:620,514:1213,517:1798,521:617,532:614,536:616},e(an,[2,777]),e(it,[2,521],{387:1799,389:1800,390:1801,4:so,269:no,378:ro,391:ao}),e(oo,ho,{3:1385,394:1806,421:1807,395:1808,396:1809,2:s,4:n,5:r,6:a,7:o,8:h,9:c,402:lo}),{83:[2,535]},{81:[1,1811]},e(it,[2,644]),e(it,[2,1208]),{403:[1,1813],451:[1,1812]},e(Pr,[2,770]),e(it,i,{21:5,22:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:18,34:19,35:20,36:21,37:22,38:23,39:24,40:25,41:26,42:27,43:28,44:29,45:30,46:31,47:32,48:33,49:34,50:35,51:36,52:37,53:38,54:39,55:40,56:41,58:43,59:44,60:45,61:46,62:47,63:48,64:49,65:50,66:51,67:52,68:53,69:54,70:55,71:56,72:57,73:58,74:59,75:60,85:75,95:76,543:98,193:102,3:104,16:1814,2:s,4:n,5:r,6:a,7:o,8:h,9:c,57:f,76:d,82:p,96:b,133:v,155:E,165:m,198:g,294:w,295:y,322:T,368:S,372:A,373:O,433:R,437:N,438:_,441:C,443:L,445:I,446:k,454:M,455:$,466:x,472:D,474:P,475:U,477:G,478:F,479:B,480:j,481:H,482:V,483:q,487:Y,488:W,491:X,492:z,545:J,546:K,555:Q}),e(it,[2,804]),e(Ka,[2,1256]),e(it,i,{21:5,22:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:18,34:19,35:20,36:21,37:22,38:23,39:24,40:25,41:26,42:27,43:28,44:29,45:30,46:31,47:32,48:33,49:34,50:35,51:36,52:37,53:38,54:39,55:40,56:41,58:43,59:44,60:45,61:46,62:47,63:48,64:49,65:50,66:51,67:52,68:53,69:54,70:55,71:56,72:57,73:58,74:59,75:60,85:75,95:76,543:98,193:102,3:104,16:1815,2:s,4:n,5:r,6:a,7:o,8:h,9:c,57:f,76:d,82:p,96:b,133:v,155:E,165:m,198:g,294:w,295:y,322:T,368:S,372:A,373:O,433:R,437:N,438:_,441:C,443:L,445:I,446:k,454:M,455:$,466:x,472:D,474:P,475:U,477:G,478:F,479:B,480:j,481:H,482:V,483:q,487:Y,488:W,491:X,492:z,545:J,546:K,555:Q}),e(Ka,[2,1258]),{83:[1,1816]},e(Pr,[2,761]),{2:s,3:1086,4:n,5:r,6:a,7:o,8:h,9:c,84:1817,120:1147,229:Bi,281:ji},e(ve,[2,344]),{83:[1,1818]},{83:[1,1819]},e(Fr,[2,504]),e(Pr,_n,{369:1820,78:Ur,503:Cn}),e(Pr,[2,492]),e(Pr,[2,495]),{82:Xn,152:mt,153:1056,154:Ee,161:yt,190:Ot,210:1057,335:Jt,376:1821,456:204,457:te,461:ee},e(Pr,_n,{369:1822,78:Ur,503:Cn}),e(Pr,_n,{369:1823,503:Cn}),e(Pr,[2,486]),e(va,[2,745]),e(va,[2,747]),{155:[1,1824]},{109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,342:[1,1825],344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},{373:co,501:1826},{454:[1,1829],502:[1,1828]},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1830,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(es,is,{93:1831,127:ss}),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1790,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,253:1832,255:to,256:eo,257:1786,258:io,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:1833,4:n,5:r,6:a,7:o,8:h,9:c},{2:s,3:1834,4:n,5:r,6:a,7:o,8:h,9:c},e(zn,[2,181],{78:wa}),e(Zr,[2,210]),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1835,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:1086,4:n,5:r,6:a,7:o,8:h,9:c,82:[1,1837],84:1836,120:1147,229:Bi,281:ji},e(Wi,[2,211]),e(Wi,[2,1160]),e(Wi,[2,1163],{238:1838,3:1839,2:s,4:n,5:r,6:a,7:o,8:h,9:c}),e(Yi,[2,1162]),e(Wi,[2,213]),{83:[1,1840]},e(Wi,[2,215]),e(Wi,[2,1166]),e(Wi,[2,216]),e(Wi,[2,1168]),{44:1841,82:p,85:75,95:76,96:b,193:102,198:g},{44:1842,82:p,85:75,95:76,96:b,193:102,198:g},e(Ga,[2,222]),e(Ga,[2,224]),e(Ga,[2,226]),e(zn,[2,182]),{140:bt,205:1843},{140:[2,1172]},e(ka,[2,264]),e(ka,[2,265]),e(ka,[2,270]),e(dr,xa,{91:1844,252:Da}),e(zr,[2,1136],{162:1097,188:sr,189:nr,190:rr}),e(ar,[2,151]),{83:[1,1845]},e(Qs,[2,582]),e(Qs,[2,585]),{408:[1,1846]},e(Qs,[2,1201],{432:1847,430:1848,82:uo}),{140:bt,205:1850},e(Qs,[2,590]),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1851,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(Qs,[2,592]),e(Qs,[2,594]),{2:s,3:122,4:n,5:r,6:a,7:o,8:h,9:c,82:[1,1853],122:275,140:bt,141:vt,152:mt,161:yt,165:st,190:Ot,205:274,209:279,210:278,284:276,285:277,292:me,293:ge,302:1852,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,335:Jt},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1854,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(it,[2,613]),e($i,[2,346]),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1325,120:159,122:163,129:1855,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,263:1324,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e($a,[2,347],{78:fo}),e(po,[2,240]),{155:[1,1857]},{82:[1,1858]},{82:[1,1859]},e(po,[2,245],{123:660,360:672,109:Ve,121:qe,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,363:Si,364:Ai,365:Oi,366:Ri}),e($i,[2,369]),e($i,[2,370]),e($i,[2,371]),e($i,[2,372]),e($i,[2,373]),e(it,[2,617]),e(it,[2,627]),e(an,[2,776]),e(it,[2,517]),e(it,[2,522],{390:1860,4:so,269:no,378:ro,391:ao}),e(bo,[2,524]),e(bo,[2,525]),{133:[1,1861]},{133:[1,1862]},{133:[1,1863]},{78:[1,1864],83:[2,533]},e(pa,[2,568]),e(pa,[2,536]),{196:[1,1872],202:[1,1873],397:1865,398:1866,399:1867,400:1868,401:1869,403:Ya,404:[1,1870],407:[1,1871]},{2:s,3:1874,4:n,5:r,6:a,7:o,8:h,9:c},{44:1875,82:p,85:75,95:76,96:b,193:102,198:g},{452:[1,1876]},{453:[1,1877]},e(it,[2,803]),e(it,[2,805]),e(Tr,[2,572]),{78:Qr,83:[1,1878]},e(ve,[2,329]),e(ve,[2,331]),e(Pr,[2,491]),e(Pr,_n,{369:1879,78:Ur,503:Cn}),e(Pr,[2,483]),e(Pr,[2,485]),{2:s,3:1086,4:n,5:r,6:a,7:o,8:h,9:c,120:1150,152:or,154:hr,156:1880,229:Bi,281:ji,370:1149,371:1151},{368:Qa,372:Za,500:1881},e(va,[2,749]),{82:[1,1883],378:[1,1884],379:[1,1882]},{179:[1,1886],342:[1,1885]},{179:[1,1888],342:[1,1887]},{109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,342:[1,1889],344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},e(Zn,tr,{94:1890,271:er,273:ir}),e([14,83,127,171,177,178,271,273,339,343,503,639,798],vo,{254:1891,76:[1,1892],78:fo,259:Eo}),{83:[2,1103],106:1894,109:[1,1896],111:1895},{109:[1,1897]},e(Zr,[2,230],{123:660,360:672,109:Ve,121:qe,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,363:Si,364:Ai,365:Oi,366:Ri}),e([14,76,83,103,108,127,137,171,177,178,215,217,242,243,244,245,246,247,248,249,252,271,273,339,343,503,639,798],[2,231],{78:Qr}),{2:s,3:1086,4:n,5:r,6:a,7:o,8:h,9:c,84:1898,120:1147,229:Bi,281:ji},e(Wi,[2,212]),e(Wi,[2,1164]),{2:s,3:759,4:n,5:r,6:a,7:o,8:h,9:c,81:Xi,230:1899},{83:[1,1900]},{83:[1,1901]},e(mo,[2,1173],{277:1902,800:[1,1903]}),e(ce,ue,{260:243,92:1904,171:fe,177:de,178:pe}),e(Js,[2,78]),{2:s,3:268,4:n,5:r,6:a,7:o,8:h,9:c,208:1905},e(go,wo,{410:1906,412:1907,413:1908,250:yo}),e(Qs,[2,1202]),{2:s,3:1910,4:n,5:r,6:a,7:o,8:h,9:c},{78:[1,1911]},{83:[1,1912],109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},e(Qs,[2,597]),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1913,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{83:[1,1914],109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},{78:Ia,83:[2,348]},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1790,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,255:to,256:eo,257:1915,258:io,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{82:[1,1916]},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1790,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,253:1917,255:to,256:eo,257:1786,258:io,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1790,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,253:1918,255:to,256:eo,257:1786,258:io,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},e(bo,[2,523]),{2:s,3:1919,4:n,5:r,6:a,7:o,8:h,9:c},{140:bt,205:1920},{2:s,3:1921,4:n,5:r,6:a,7:o,8:h,9:c},e(oo,ho,{396:1809,395:1922,402:lo}),e(an,[2,538]),e(an,[2,539]),e(an,[2,540]),e(an,[2,541]),e(an,[2,542]),{6:[1,1923]},{6:[1,1924]},e([2,4,5,7,8,9,82],[2,1195],{419:1925,6:[1,1926]}),{2:s,3:1927,4:n,5:r,6:a,7:o,8:h,9:c},e(oo,[2,544]),e(it,[2,1205],{448:1928,450:1929,76:Ja}),e(it,[2,645]),e(it,[2,646],{402:[1,1930]}),e(Pr,[2,763]),e(Pr,[2,482]),e(va,[2,748],{78:ea}),e(va,[2,746]),{82:Xn,152:mt,153:1056,154:Ee,161:yt,190:Ot,210:1057,335:Jt,376:1931,456:204,457:te,461:ee},{2:s,3:1086,4:n,5:r,6:a,7:o,8:h,9:c,84:1932,120:1147,229:Bi,281:ji},{379:[1,1933]},{373:co,501:1934},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1935,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{373:co,501:1936},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1937,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{373:co,501:1938},e(Zn,[2,79]),e(dr,[2,237]),{255:[1,1939],256:[1,1940]},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1941,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{83:[1,1942]},{83:[2,1104]},{82:[1,1943]},{82:[1,1944]},{78:Qr,83:[1,1945]},e(Wi,[2,214]),{2:s,3:1946,4:n,5:r,6:a,7:o,8:h,9:c,81:[1,1947]},{2:s,3:1948,4:n,5:r,6:a,7:o,8:h,9:c,81:[1,1949]},e(Zn,[2,1175],{278:1950,452:[1,1951]}),e(mo,[2,1174]),e(ce,[2,82]),e(Qs,[2,1199],{431:1952,430:1953,82:uo}),e(Qs,[2,587]),e(go,[2,550],{413:1954,250:[1,1955]}),e(go,[2,551],{412:1956,250:[1,1957]}),{368:To,372:So},{83:[1,1960]},{140:bt,205:1961},e(Qs,[2,591]),{83:[1,1962],109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},e(Qs,[2,545]),e(po,[2,241]),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1790,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,253:1963,255:to,256:eo,257:1786,258:io,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{78:fo,83:[1,1964]},{78:fo,83:[1,1965]},e(bo,[2,526]),e(bo,[2,527]),e(bo,[2,528]),e(pa,[2,537]),{2:s,3:1967,4:n,5:r,6:a,7:o,8:h,9:c,82:[2,1191],405:1966},{82:[1,1968]},{2:s,3:1970,4:n,5:r,6:a,7:o,8:h,9:c,82:[2,1197],420:1969},e([2,4,5,6,7,8,9,82],[2,1196]),{82:[1,1971]},e(it,[2,643]),e(it,[2,1206]),e(oo,ho,{396:1809,395:1972,402:lo}),e(va,[2,755],{78:Ur}),{78:Qr,83:[1,1973]},e(va,[2,757]),e(va,[2,750]),{109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,342:[1,1974],344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},e(va,[2,753]),{109:Ve,121:qe,123:660,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,342:[1,1975],344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,360:672,363:Si,364:Ai,365:Oi,366:Ri},e(va,[2,751]),e(dr,vo,{254:1976,259:Eo}),e(dr,vo,{254:1977,259:Eo}),e(dr,[2,247],{123:660,360:672,109:Ve,121:qe,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,363:Si,364:Ai,365:Oi,366:Ri}),e(Vr,[2,1105],{107:1978,113:1979,3:1981,2:s,4:n,5:r,6:a,7:o,8:h,9:c,81:Ao}),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1984,112:1982,114:1983,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:1086,4:n,5:r,6:a,7:o,8:h,9:c,84:1985,120:1147,229:Bi,281:ji},e(Zr,[2,232]),e(Zr,[2,184]),{2:s,3:1986,4:n,5:r,6:a,7:o,8:h,9:c},e(Zr,[2,186]),{2:s,3:1987,4:n,5:r,6:a,7:o,8:h,9:c},e(Zn,[2,273]),e(Zn,[2,1176]),e(go,wo,{412:1907,413:1908,410:1988,250:yo}),e(Qs,[2,1200]),e(Qs,[2,552]),{368:To},e(Qs,[2,553]),{372:So},{155:Oo,414:1989,415:Ro,416:No,417:_o},{155:Oo,414:1994,415:Ro,416:No,417:_o},e(Qs,[2,584]),{83:[1,1995]},e(Qs,[2,598]),{78:fo,83:[1,1996]},e(po,[2,243]),e(po,[2,244]),{82:[1,1997]},{82:[2,1192]},{2:s,3:1999,4:n,5:r,6:a,7:o,8:h,9:c,141:Co,406:1998},{82:[1,2001]},{82:[2,1198]},{2:s,3:1999,4:n,5:r,6:a,7:o,8:h,9:c,141:Co,406:2002},e(it,[2,647]),{378:[1,2004],379:[1,2003]},{373:co,501:2005},{368:Qa,372:Za,500:2006},e(dr,[2,238]),e(dr,[2,239]),e(Vr,[2,84]),e(Vr,[2,1106]),{2:s,3:2007,4:n,5:r,6:a,7:o,8:h,9:c},e(Vr,[2,88]),{78:[1,2009],83:[1,2008]},e(pa,[2,90]),e(pa,[2,91],{123:660,360:672,81:[1,2010],109:Ve,121:qe,124:Ye,125:We,132:Xe,133:en,142:Je,145:Ke,147:Qe,148:Ze,149:ti,150:ei,151:ii,163:si,179:ni,180:ri,188:ai,189:oi,344:hi,345:li,346:ci,348:ui,349:fi,350:di,351:pi,352:bi,353:vi,354:Ei,355:mi,356:gi,357:wi,358:yi,359:Ti,363:Si,364:Ai,365:Oi,366:Ri}),{78:Qr,83:[1,2011]},e(Zr,[2,185]),e(Zr,[2,187]),e(Qs,[2,586]),e(Qs,[2,554]),e(Qs,[2,556]),{330:[1,2012],378:[1,2013]},e(Qs,[2,559]),{418:[1,2014]},e(Qs,[2,555]),e(Qs,[2,588]),e(po,[2,242]),{2:s,3:1999,4:n,5:r,6:a,7:o,8:h,9:c,141:Co,406:2015},{78:Lo,83:[1,2016]},e(pa,[2,563]),e(pa,[2,564]),{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1325,120:159,122:163,129:2018,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,263:1324,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{78:Lo,83:[1,2019]},{82:Xn,152:mt,153:1056,154:Ee,161:yt,190:Ot,210:1057,335:Jt,376:2020,456:204,457:te,461:ee},{379:[1,2021]},e(va,[2,752]),e(va,[2,754]),e(Vr,[2,87]),{83:[2,86]},{2:s,3:180,4:n,5:r,6:a,7:o,8:h,9:c,60:175,82:pt,104:1984,114:2022,120:159,122:163,140:bt,141:vt,146:Et,152:mt,153:171,154:gt,158:wt,161:yt,163:Tt,165:st,167:178,188:St,189:At,190:Ot,205:161,209:157,210:165,211:166,229:Rt,266:Nt,267:_t,280:160,281:Ct,282:156,283:158,284:162,285:164,286:167,287:168,288:169,289:172,290:173,292:Lt,293:It,294:w,298:kt,299:Mt,301:$t,304:xt,313:Dt,314:Pt,315:Ut,316:Gt,317:Ft,318:Bt,319:jt,320:Ht,322:rt,323:at,324:ot,325:ht,326:lt,327:Vt,328:qt,329:Yt,330:Wt,331:Xt,332:zt,335:Jt,336:Kt,345:Qt,350:Zt,456:204,457:te,461:ee},{2:s,3:2023,4:n,5:r,6:a,7:o,8:h,9:c},{83:[1,2024]},e(Qs,[2,557]),e(Qs,[2,558]),e(Qs,[2,560]),{78:Lo,83:[1,2025]},{408:[1,2026]},{2:s,3:2027,4:n,5:r,6:a,7:o,8:h,9:c,141:[1,2028]},{78:Ia,83:[1,2029]},e(an,[2,562]),e(va,[2,756],{78:Ur}),e(va,[2,758]),e(pa,[2,89]),e(pa,[2,92]),e(Vr,[2,1107],{3:1981,110:2030,113:2031,2:s,4:n,5:r,6:a,7:o,8:h,9:c,81:Ao}),e(an,[2,546]),{2:s,3:268,4:n,5:r,6:a,7:o,8:h,9:c,208:2032},e(pa,[2,565]),e(pa,[2,566]),e(an,[2,561]),e(Vr,[2,85]),e(Vr,[2,1108]),e(Io,[2,1193],{409:2033,411:2034,82:[1,2035]}),e(an,wo,{412:1907,413:1908,410:2036,250:yo}),e(Io,[2,1194]),{2:s,3:1999,4:n,5:r,6:a,7:o,8:h,9:c,141:Co,406:2037},e(an,[2,547]),{78:Lo,83:[1,2038]},e(Io,[2,548])],defaultActions:{113:[2,10],208:[2,353],209:[2,354],210:[2,355],211:[2,356],212:[2,357],213:[2,358],214:[2,359],215:[2,360],216:[2,361],217:[2,362],225:[2,736],626:[2,1216],688:[2,1177],689:[2,1178],752:[2,737],834:[2,363],835:[2,1125],836:[2,1126],989:[2,467],990:[2,468],991:[2,469],1065:[2,738],1407:[2,1226],1479:[2,739],1506:[2,1170],1514:[2,1112],1578:[2,1224],1605:[2,352],1691:[2,1182],1706:[2,535],1763:[2,1172],1895:[2,1104],1967:[2,1192],1970:[2,1198],2008:[2,86]},parseError:function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)},parse:function(t){var e=this,i=[0],s=[null],n=[],r=this.table,a="",o=0,h=0,l=0,c=n.slice.call(arguments,1),u=Object.create(this.lexer),f={yy:{}};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(f.yy[d]=this.yy[d]);u.setInput(t,f.yy),f.yy.lexer=u,f.yy.parser=this,typeof u.yylloc>"u"&&(u.yylloc={});var p=u.yylloc;n.push(p);var b,v=u.options&&u.options.ranges;this.parseError="function"==typeof f.yy.parseError?f.yy.parseError:Object.getPrototypeOf(this).parseError;for(var E,m,g,w,y,T,S,A,O=function(){var t;return"number"!=typeof(t=u.lex()||1)&&(t=e.symbols_[t]||t),t},R={};;){if(this.defaultActions[g=i[i.length-1]]?w=this.defaultActions[g]:((null===E||typeof E>"u")&&(E=O()),w=r[g]&&r[g][E]),typeof w>"u"||!w.length||!w[0]){var N,_="",C=function(t){for(var e=i.length-1,s=0;;){if(2..toString()in r[t])return s;if(0===t||e<2)return!1;t=i[e-=2],++s}};if(l)1!==m&&(N=C(g));else{for(T in N=C(g),A=[],r[g])this.terminals_[T]&&T>2&&A.push("'"+this.terminals_[T]+"'");_=u.showPosition?"Parse error on line "+(o+1)+":\n"+u.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[E]||E)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==E?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(_,{text:u.match,token:this.terminals_[E]||E,line:u.yylineno,loc:p,expected:A,recoverable:!1!==N})}if(3==l){if(1===E||1===m)throw new Error(_||"Parsing halted while starting to recover from another error.");h=u.yyleng,a=u.yytext,o=u.yylineno,p=u.yylloc,E=O()}if(!1===N)throw new Error(_||"Parsing halted. No suitable error recovery rule available.");i.length=i.length-2*(b=N),s.length=s.length-b,n.length=n.length-b,m=2==E?null:E,E=2,w=r[g=i[i.length-1]]&&r[g][2],l=3}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+E);switch(w[0]){case 1:i.push(E),s.push(u.yytext),n.push(u.yylloc),i.push(w[1]),E=null,m?(E=m,m=null):(h=u.yyleng,a=u.yytext,o=u.yylineno,p=u.yylloc,l>0&&l--);break;case 2:if(R.$=s[s.length-(S=this.productions_[w[1]][1])],R._$={first_line:n[n.length-(S||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(S||1)].first_column,last_column:n[n.length-1].last_column},v&&(R._$.range=[n[n.length-(S||1)].range[0],n[n.length-1].range[1]]),typeof(y=this.performAction.apply(R,[a,h,o,f.yy,w[1],s,n].concat(c)))<"u")return y;S&&(i=i.slice(0,-1*S*2),s=s.slice(0,-1*S),n=n.slice(0,-1*S)),i.push(this.productions_[w[1]][0]),s.push(R.$),n.push(R._$),i.push(r[i[i.length-2]][i[i.length-1]]);break;case 3:return!0}}return!0}},Mo=["A","ABSENT","ABSOLUTE","ACCORDING","ACTION","ADA","ADD","ADMIN","AFTER","ALWAYS","ASC","ASSERTION","ASSIGNMENT","ATTRIBUTE","ATTRIBUTES","BASE64","BEFORE","BERNOULLI","BLOCKED","BOM","BREADTH","C","CASCADE","CATALOG","CATALOG_NAME","CHAIN","CHARACTERISTICS","CHARACTERS","CHARACTER_SET_CATALOG","CHARACTER_SET_NAME","CHARACTER_SET_SCHEMA","CLASS_ORIGIN","CLOSE","COBOL","COLLATION","COLLATION_CATALOG","COLLATION_NAME","COLLATION_SCHEMA","COLUMNS","COLUMN_NAME","COMMAND_FUNCTION","COMMAND_FUNCTION_CODE","COMMITTED","CONDITION_NUMBER","CONNECTION","CONNECTION_NAME","CONSTRAINTS","CONSTRAINT_CATALOG","CONSTRAINT_NAME","CONSTRAINT_SCHEMA","CONSTRUCTOR","CONTENT","CONTINUE","CONTROL","CURSOR_NAME","DATA","DATETIME_INTERVAL_CODE","DATETIME_INTERVAL_PRECISION","DB","DEFAULTS","DEFERRABLE","DEFERRED","DEFINED","DEFINER","DEGREE","DELETED","DEPTH","DERIVED","DESC","DESCRIPTOR","DIAGNOSTICS","DISPATCH","DOCUMENT","DOMAIN","DYNAMIC_FUNCTION","DYNAMIC_FUNCTION_CODE","EMPTY","ENCODING","ENFORCED","EXCLUDE","EXCLUDING","EXPRESSION","FILE","FINAL","FIRST","FLAG","FOLLOWING","FORTRAN","FOUND","FS","G","GENERAL","GENERATED","GO","GOTO","GRANTED","HEX","HIERARCHY","ID","IGNORE","IMMEDIATE","IMMEDIATELY","IMPLEMENTATION","INCLUDING","INCREMENT","INDENT","INITIALLY","INPUT","INSERTED","INSTANCE","INSTANTIABLE","INSTEAD","INTEGRITY","INVOKER","ISOLATION","K","KEY","KEY_MEMBER","KEY_TYPE","LAST","LENGTH","LEVEL","LIBRARY","LIMIT","LINK","LOCATION","LOCATOR","M","MAP","MAPPING","MATCHED","MAXVALUE","MESSAGE_LENGTH","MESSAGE_OCTET_LENGTH","MESSAGE_TEXT","MINVALUE","MORE","MUMPS","NAME","NAMES","NAMESPACE","NESTING","NEXT","NFC","NFD","NFKC","NFKD","NIL","NORMALIZED","NULLABLE","NULLS","NUMBER","OBJECT","OCTETS","OFF","OPEN","OPTION","OPTIONS","ORDER","ORDERING","ORDINALITY","OTHERS","OUTPUT","OVERRIDING","P","PAD","PARAMETER_MODE","PARAMETER_NAME","PARAMETER_ORDINAL_POSITION","PARAMETER_SPECIFIC_CATALOG","PARAMETER_SPECIFIC_NAME","PARAMETER_SPECIFIC_SCHEMA","PARTIAL","PASCAL","PASSING","PASSTHROUGH","PATH","PERMISSION","PLACING","PLI","PRECEDING","PRESERVE","PRIOR","PRIVILEGES","PUBLIC","READ","RECOVERY","RELATIVE","REPEATABLE","REQUIRING","RESPECT","RESTART","RESTORE","RESTRICT","RETURNED_CARDINALITY","RETURNED_LENGTH","RETURNED_OCTET_LENGTH","RETURNED_SQLSTATE","RETURNING","ROLE","ROUTINE","ROUTINE_CATALOG","ROUTINE_NAME","ROUTINE_SCHEMA","ROW_COUNT","SCALE","SCHEMA","SCHEMA_NAME","SCOPE_CATALOG","SCOPE_NAME","SCOPE_SCHEMA","SECTION","SECURITY","SELECTIVE","SELF","SEPARATOR","SEQUENCE","SERIALIZABLE","SERVER","SERVER_NAME","SESSION","SETS","SIMPLE","SIZE","SOURCE","SPACE","SPECIFIC_NAME","STANDALONE","STATE","STATEMENT","STRIP","STRUCTURE","STYLE","SUBCLASS_ORIGIN","T","TABLE_NAME","TEMPORARY","TIES","TOKEN","TOP_LEVEL_COUNT","TRANSACTION","TRANSACTIONS_COMMITTED","TRANSACTIONS_ROLLED_BACK","TRANSACTION_ACTIVE","TRANSFORM","TRANSFORMS","TRIGGER_CATALOG","TRIGGER_NAME","TRIGGER_SCHEMA","TYPE","UNBOUNDED","UNCOMMITTED","UNDER","UNLINK","UNNAMED","UNTYPED","URI","USAGE","USER_DEFINED_TYPE_CATALOG","USER_DEFINED_TYPE_CODE","USER_DEFINED_TYPE_NAME","USER_DEFINED_TYPE_SCHEMA","VALID","VERSION","VIEW","WHITESPACE","WORK","WRAPPER","WRITE","XMLDECLARATION","XMLSCHEMA","YES","ZONE"];function $o(){this.yy={}}return ko.parseError=function(t,e){if(!(e.expected&&e.expected.indexOf("'LITERAL'")>-1&&/[a-zA-Z_][a-zA-Z_0-9]*/.test(e.token)&&Mo.indexOf(e.token)>-1))throw new SyntaxError(t)},ko.lexer={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===s.length?this.yylloc.first_column:0)+s[s.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var i,s,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,i,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;r<n.length;r++)if((i=this._input.match(this.rules[n[r]]))&&(!e||i[0].length>e[0].length)){if(e=i,s=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,n[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,i){switch(i){case 0:return 294;case 1:return 335;case 2:return 457;case 3:return 332;case 4:case 5:return 5;case 6:case 7:return 329;case 8:case 9:return 141;case 10:return;case 11:break;case 12:return 349;case 13:case 258:return 352;case 14:return e.yytext="VALUE",96;case 15:return e.yytext="VALUE",198;case 16:return e.yytext="ROW",198;case 17:return e.yytext="COLUMN",198;case 18:return e.yytext="MATRIX",198;case 19:return e.yytext="INDEX",198;case 20:return e.yytext="RECORDSET",198;case 21:return e.yytext="TEXT",198;case 22:return e.yytext="SELECT",198;case 23:return 558;case 24:return 418;case 25:return 439;case 26:return 553;case 27:return 319;case 28:case 29:return 297;case 30:return 173;case 31:return 437;case 32:return 179;case 33:return 249;case 34:return 175;case 35:return 216;case 36:return 320;case 37:return 81;case 38:return 455;case 39:case 88:return 268;case 40:return 441;case 41:case 119:return 391;case 42:return 318;case 43:return 552;case 44:return 475;case 45:return 363;case 46:return 480;case 47:return 364;case 48:case 51:case 53:case 55:return 348;case 49:return 128;case 50:case 52:case 54:case 139:return 121;case 56:case 99:case 100:return 546;case 57:return 336;case 58:return 415;case 59:return 299;case 60:return 403;case 61:return 139;case 62:return 8;case 63:return 269;case 64:case 65:return 199;case 66:return 472;case 67:return 402;case 68:return 509;case 69:return 478;case 70:return 301;case 71:return 262;case 72:return 315;case 73:return 295;case 74:return 215;case 75:return 256;case 76:return 292;case 77:case 78:return 293;case 79:return"CURSOR";case 80:case 200:return 442;case 81:return 323;case 82:return 324;case 83:return 325;case 84:return 488;case 85:return 378;case 86:return 372;case 87:return 281;case 89:return 443;case 90:return 194;case 91:return 433;case 92:return 487;case 93:return 144;case 94:return 339;case 95:return 426;case 96:return 343;case 97:return 347;case 98:case 147:return 178;case 101:return 331;case 102:return 18;case 103:return 328;case 104:return 275;case 105:return 266;case 106:return 105;case 107:return 407;case 108:return 192;case 109:return 247;case 110:return 296;case 111:return 346;case 112:return 639;case 113:return 511;case 114:return 252;case 115:return 304;case 116:return 258;case 117:return 259;case 118:return 165;case 120:return 377;case 121:return 365;case 122:return 109;case 123:return 202;case 124:return 223;case 125:return 244;case 126:return 554;case 127:return 373;case 128:return 229;case 129:return 177;case 130:return 326;case 131:return 207;case 132:return 479;case 133:return 243;case 134:return 6;case 135:return 267;case 136:return"LET";case 137:return 481;case 138:return 245;case 140:return 271;case 141:return 499;case 142:return 200;case 143:return 317;case 144:return 427;case 145:return 316;case 146:return 492;case 148:return 440;case 149:return 242;case 150:return 681;case 151:return 298;case 152:return 270;case 153:return 417;case 154:return 163;case 155:return 330;case 156:return 265;case 157:return 471;case 158:return 250;case 159:return 452;case 160:return 138;case 161:return 273;case 162:return 7;case 163:return 453;case 164:return 180;case 165:return 127;case 166:return 217;case 167:return 503;case 168:return 307;case 169:return 181;case 170:return 311;case 171:return 799;case 172:return 103;case 173:return 20;case 174:return 404;case 175:return 482;case 176:return 713;case 177:return 19;case 178:return 451;case 179:return 203;case 180:return"REDUCE";case 181:return 80;case 182:return 408;case 183:return 344;case 184:return 555;case 185:return 717;case 186:return 116;case 187:return 438;case 188:return 184;case 189:return 322;case 190:return 416;case 191:return 483;case 192:return 722;case 193:case 194:return 182;case 195:return 246;case 196:return 474;case 197:return 255;case 198:return 159;case 199:return 800;case 201:return 96;case 202:return 248;case 203:return 9;case 204:case 205:return 155;case 206:return 446;case 207:return 367;case 208:return 454;case 209:return"STRATEGY";case 210:return"STORE";case 211:return 313;case 212:return 314;case 213:case 214:return 388;case 215:return 502;case 216:case 217:return 392;case 218:return 201;case 219:return 342;case 220:return"TIMEOUT";case 221:return 157;case 222:return 204;case 223:case 224:case 242:return 473;case 225:return 547;case 226:return 327;case 227:return 491;case 228:return 171;case 229:return 196;case 230:return 108;case 231:return 368;case 232:return 445;case 233:return 251;case 234:return 158;case 235:return 379;case 236:return 143;case 237:return 447;case 238:return 341;case 239:return 137;case 240:return 477;case 241:return 76;case 243:return 4;case 244:return 140;case 245:return 124;case 246:return 146;case 247:return 188;case 248:return 350;case 249:return 189;case 250:return 142;case 251:return 147;case 252:return 359;case 253:return 356;case 254:return 358;case 255:return 355;case 256:return 353;case 257:return 351;case 259:return 151;case 260:return 150;case 261:return 148;case 262:return 354;case 263:case 266:return 357;case 264:return 149;case 265:return 133;case 267:return 82;case 268:return 83;case 269:return 461;case 270:return 463;case 271:return 333;case 272:return 466;case 273:return 545;case 274:return 131;case 275:return 125;case 276:return 78;case 277:return 366;case 278:return 161;case 279:return 798;case 280:return 152;case 281:return 190;case 282:return 145;case 283:return 132;case 284:return 345;case 285:return 154;case 286:return 14;case 287:return"INVALID"}},rules:[/^(?:``([^\`])+``)/i,/^(?:\[\?\])/i,/^(?:@\[)/i,/^(?:ARRAY\[)/i,/^(?:\[([^\]'])*?\])/i,/^(?:`([^\`'])*?`)/i,/^(?:N(['](\\.|[^']|\\')*?['])+)/i,/^(?:X(['](\\.|[^']|\\')*?['])+)/i,/^(?:(['](\\.|[^']|\\')*?['])+)/i,/^(?:(["](\\.|[^"]|\\")*?["])+)/i,/^(?:--(.*?)($|\r\n|\r|\n))/i,/^(?:\s+)/i,/^(?:\|\|)/i,/^(?:\|)/i,/^(?:VALUE\s+OF\s+SEARCH\b)/i,/^(?:VALUE\s+OF\s+SELECT\b)/i,/^(?:ROW\s+OF\s+SELECT\b)/i,/^(?:COLUMN\s+OF\s+SELECT\b)/i,/^(?:MATRIX\s+OF\s+SELECT\b)/i,/^(?:INDEX\s+OF\s+SELECT\b)/i,/^(?:RECORDSET\s+OF\s+SELECT\b)/i,/^(?:TEXT\s+OF\s+SELECT\b)/i,/^(?:SELECT\b)/i,/^(?:ABSOLUTE\b)/i,/^(?:ACTION\b)/i,/^(?:ADD\b)/i,/^(?:AFTER\b)/i,/^(?:AGGR\b)/i,/^(?:AGGREGATE\b)/i,/^(?:AGGREGATOR\b)/i,/^(?:ALL\b)/i,/^(?:ALTER\b)/i,/^(?:AND\b)/i,/^(?:ANTI\b)/i,/^(?:ANY\b)/i,/^(?:APPLY\b)/i,/^(?:ARRAY\b)/i,/^(?:AS\b)/i,/^(?:ASSERT\b)/i,/^(?:ASC\b)/i,/^(?:ATTACH\b)/i,/^(?:AUTO(_)?INCREMENT\b)/i,/^(?:AVG\b)/i,/^(?:BEFORE\b)/i,/^(?:BEGIN\b)/i,/^(?:BETWEEN\b)/i,/^(?:BREAK\b)/i,/^(?:NOT\s+BETWEEN\b)/i,/^(?:NOT\s+LIKE\b)/i,/^(?:BY\b)/i,/^(?:~~\*)/i,/^(?:!~~\*)/i,/^(?:~~)/i,/^(?:!~~)/i,/^(?:ILIKE\b)/i,/^(?:NOT\s+ILIKE\b)/i,/^(?:CALL\b)/i,/^(?:CASE\b)/i,/^(?:CASCADE\b)/i,/^(?:CAST\b)/i,/^(?:CHECK\b)/i,/^(?:CLASS\b)/i,/^(?:CLOSE\b)/i,/^(?:COLLATE\b)/i,/^(?:COLUMN\b)/i,/^(?:COLUMNS\b)/i,/^(?:COMMIT\b)/i,/^(?:CONSTRAINT\b)/i,/^(?:CONTENT\b)/i,/^(?:CONTINUE\b)/i,/^(?:CONVERT\b)/i,/^(?:CORRESPONDING\b)/i,/^(?:COUNT\b)/i,/^(?:CREATE\b)/i,/^(?:CROSS\b)/i,/^(?:CUBE\b)/i,/^(?:CURRENT_TIMESTAMP\b)/i,/^(?:CURRENT_DATE\b)/i,/^(?:CURDATE\b)/i,/^(?:CURSOR\b)/i,/^(?:DATABASE(S)?)/i,/^(?:DATEADD\b)/i,/^(?:DATEDIFF\b)/i,/^(?:TIMESTAMPDIFF\b)/i,/^(?:DECLARE\b)/i,/^(?:DEFAULT\b)/i,/^(?:DELETE\b)/i,/^(?:DELETED\b)/i,/^(?:DESC\b)/i,/^(?:DETACH\b)/i,/^(?:DISTINCT\b)/i,/^(?:DROP\b)/i,/^(?:ECHO\b)/i,/^(?:EDGE\b)/i,/^(?:END\b)/i,/^(?:ENUM\b)/i,/^(?:ELSE\b)/i,/^(?:ESCAPE\b)/i,/^(?:EXCEPT\b)/i,/^(?:EXEC\b)/i,/^(?:EXECUTE\b)/i,/^(?:EXISTS\b)/i,/^(?:EXPLAIN\b)/i,/^(?:FALSE\b)/i,/^(?:FETCH\b)/i,/^(?:FIRST\b)/i,/^(?:FOR\b)/i,/^(?:FOREIGN\b)/i,/^(?:FROM\b)/i,/^(?:FULL\b)/i,/^(?:FUNCTION\b)/i,/^(?:GLOB\b)/i,/^(?:GO\b)/i,/^(?:GRAPH\b)/i,/^(?:GROUP\b)/i,/^(?:GROUP_CONCAT\b)/i,/^(?:GROUPING\b)/i,/^(?:HAVING\b)/i,/^(?:IF\b)/i,/^(?:IDENTITY\b)/i,/^(?:IGNORE\b)/i,/^(?:IS\b)/i,/^(?:IN\b)/i,/^(?:INDEX\b)/i,/^(?:INDEXED\b)/i,/^(?:INNER\b)/i,/^(?:INSTEAD\b)/i,/^(?:INSERT\b)/i,/^(?:INSERTED\b)/i,/^(?:INTERSECT\b)/i,/^(?:INTERVAL\b)/i,/^(?:INTO\b)/i,/^(?:ITERATE\b)/i,/^(?:JOIN\b)/i,/^(?:KEY\b)/i,/^(?:LAST\b)/i,/^(?:LET\b)/i,/^(?:LEAVE\b)/i,/^(?:LEFT\b)/i,/^(?:LIKE\b)/i,/^(?:LIMIT\b)/i,/^(?:MATCHED\b)/i,/^(?:MATRIX\b)/i,/^(?:MAX\s*(?=\())/i,/^(?:MAX\s*(?=(,|\))))/i,/^(?:MIN\s*(?=\())/i,/^(?:MERGE\b)/i,/^(?:MINUS\b)/i,/^(?:MODIFY\b)/i,/^(?:NATURAL\b)/i,/^(?:NEXT\b)/i,/^(?:NEW\b)/i,/^(?:NOCASE\b)/i,/^(?:NO\b)/i,/^(?:NOT\b)/i,/^(?:NULL\b)/i,/^(?:NULLS\b)/i,/^(?:OFF\b)/i,/^(?:ON\b)/i,/^(?:ONLY\b)/i,/^(?:OF\b)/i,/^(?:OFFSET\b)/i,/^(?:OPEN\b)/i,/^(?:OPTION\b)/i,/^(?:OR\b)/i,/^(?:ORDER\b)/i,/^(?:OUTER\b)/i,/^(?:OUTPUT\b)/i,/^(?:OVER\b)/i,/^(?:PATH\b)/i,/^(?:PARTITION\b)/i,/^(?:PERCENT\b)/i,/^(?:PIVOT\b)/i,/^(?:PLAN\b)/i,/^(?:PRIMARY\b)/i,/^(?:PRINT\b)/i,/^(?:PRIOR\b)/i,/^(?:QUERY\b)/i,/^(?:READ\b)/i,/^(?:RECORDSET\b)/i,/^(?:REDUCE\b)/i,/^(?:RECURSIVE\b)/i,/^(?:REFERENCES\b)/i,/^(?:REGEXP\b)/i,/^(?:REINDEX\b)/i,/^(?:RELATIVE\b)/i,/^(?:REMOVE\b)/i,/^(?:RENAME\b)/i,/^(?:REPEAT\b)/i,/^(?:REPLACE\b)/i,/^(?:RESTRICT\b)/i,/^(?:REQUIRE\b)/i,/^(?:RESTORE\b)/i,/^(?:RETURN\b)/i,/^(?:RETURNS\b)/i,/^(?:RIGHT\b)/i,/^(?:ROLLBACK\b)/i,/^(?:ROLLUP\b)/i,/^(?:ROW\b)/i,/^(?:ROWS\b)/i,/^(?:SCHEMA(S)?)/i,/^(?:SEARCH\b)/i,/^(?:SEMI\b)/i,/^(?:SEPARATOR\b)/i,/^(?:SET\b)/i,/^(?:SETS\b)/i,/^(?:SHOW\b)/i,/^(?:SOME\b)/i,/^(?:SOURCE\b)/i,/^(?:STRATEGY\b)/i,/^(?:STORE\b)/i,/^(?:SUM\b)/i,/^(?:TOTAL\b)/i,/^(?:TABLE\b)/i,/^(?:TABLES\b)/i,/^(?:TARGET\b)/i,/^(?:TEMP\b)/i,/^(?:TEMPORARY\b)/i,/^(?:TEXTSTRING\b)/i,/^(?:THEN\b)/i,/^(?:TIMEOUT\b)/i,/^(?:TO\b)/i,/^(?:TOP\b)/i,/^(?:TRAN\b)/i,/^(?:TRANSACTION\b)/i,/^(?:TRIGGER\b)/i,/^(?:TRUE\b)/i,/^(?:TRUNCATE\b)/i,/^(?:UNION\b)/i,/^(?:UNIQUE\b)/i,/^(?:UNPIVOT\b)/i,/^(?:UPDATE\b)/i,/^(?:USE\b)/i,/^(?:USING\b)/i,/^(?:VALUE\b)/i,/^(?:VALUES\b)/i,/^(?:VERTEX\b)/i,/^(?:VIEW\b)/i,/^(?:WHEN\b)/i,/^(?:WHERE\b)/i,/^(?:WHILE\b)/i,/^(?:WITH\b)/i,/^(?:WORK\b)/i,/^(?:[0-9]*[a-zA-Z_]+[a-zA-Z_0-9]*)/i,/^(?:(\d+\.?\d*|\.\d+)([eE][+-]?\d+)?(?![a-zA-Z_0-9]))/i,/^(?:->)/i,/^(?:#)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\*)/i,/^(?:\/)/i,/^(?:%)/i,/^(?:!===)/i,/^(?:===)/i,/^(?:!==)/i,/^(?:==)/i,/^(?:>=)/i,/^(?:&)/i,/^(?:\|)/i,/^(?:<<)/i,/^(?:>>)/i,/^(?:>)/i,/^(?:<=)/i,/^(?:<>)/i,/^(?:<)/i,/^(?:=)/i,/^(?:!=)/i,/^(?:\()/i,/^(?:\))/i,/^(?:\{)/i,/^(?:\})/i,/^(?:\])/i,/^(?::-)/i,/^(?:\?-)/i,/^(?:\.\.)/i,/^(?:\.)/i,/^(?:,)/i,/^(?:::)/i,/^(?::)/i,/^(?:;)/i,/^(?:\$)/i,/^(?:\?)/i,/^(?:!)/i,/^(?:\^)/i,/^(?:~)/i,/^(?:@)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287],inclusive:!0}}},$o.prototype=ko,ko.Parser=$o,new $o}();Ht.parser=i,Ht.Parser=i.Parser,Ht.parse=function(){return i.parse.apply(i,arguments)},Ht.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var e=null.readFileSync(null.normalize(t[1]),"utf8");return Ht.parser.parse(e)},e.main===jt&&Ht.main(process.argv.slice(1)),t.prettyflag=!1,t.pretty=function(e,i){var s=t.prettyflag;t.prettyflag=!i;var n=t.parse(e).toString();return t.prettyflag=s,n};var s=t.utils={};var n=function(t){return"(y="+t+",y===y?y:undefined)"};var r=function(t,e){return"(y="+t+',typeof y=="undefined"?undefined:'+e+")"};function a(){return!0}var o=s.escapeq=function(t){return(""+t).replace(/["'\\\n\r\u2028\u2029]/g,(function(t){switch(t){case'"':case"'":case"\\":return"\\"+t;case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029"}}))},h=s.undoubleq=function(t){return t.replace(/(\')/g,"''")},l=s.doubleq=function(t){return t.replace(/(\'\')/g,"\\'")};s.doubleqq=function(t){return t.replace(/'/g,"\\'")};var c=function(t){return"\ufeff"===t[0]&&(t=t.substr(1)),t};s.global=typeof self<"u"?self:typeof window<"u"?window:typeof Nt<"u"?Nt:Function("return this")(),s.isNativeFunction=function(t){return"function"==typeof t&&!!~t.toString().indexOf("[native code]")},s.isWebWorker=function(){try{return s.isNativeFunction(s.global.importScripts)}catch{return!1}}(),s.isNode=function(){try{return!(typeof process>"u"||!process.versions||!process.versions.node)}catch{return!1}}(),s.isBrowser=function(){try{return s.isNativeFunction(s.global.location.reload)}catch{return!1}}(),s.isBrowserify=s.isBrowser&&typeof process<"u"&&process.browser,s.isRequireJS=s.isBrowser&&"function"==typeof e.specified,s.isMeteor=typeof Meteor<"u"&&Meteor.release,s.isMeteorClient=s.isMeteorClient=s.isMeteor&&Meteor.isClient,s.isMeteorServer=s.isMeteor&&Meteor.isServer,s.isCordova="object"==typeof cordova,s.isReactNative=!1,s.hasIndexedDB=!!s.global.indexedDB,s.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)};let u=s.loadFile=function(t,e,i,n){var r;if(!s.isNode&&!s.isMeteorServer){if(s.isCordova)return void s.global.requestFileSystem(LocalFileSystem.PERSISTENT,0,(function(e){e.root.getFile(t,{create:!1},(function(t){t.file((function(t){var e=new FileReader;e.onloadend=function(){i(c(this.result))},e.readAsText(t)}))}))}));if("string"==typeof t)return"#"===t.substr(0,1)&&typeof document<"u"?(r=document.querySelector(t).textContent,void i(r)):void d(t,(t=>i(c(t))),n,e);if(t instanceof Event){var a=t.target.files,o=new FileReader;o.onload=function(t){i(c(t.target.result))},o.readAsText(a[0])}d(t,(t=>i(c(t))),n,e)}},f=typeof fetch<"u"?fetch:null;async function d(t,e,i,s){return s?p(t,e,i):await p(t,e,i)}function p(t,e,i){return f(t).then((t=>t.text())).then((t=>{e(t)})).catch((t=>{if(i)return i(t);throw console.error(t),t}))}s.loadBinaryFile=function(t,e,i,n=t=>{throw t}){if(!s.isNode&&!s.isMeteorServer)if("string"==typeof t){var r=new XMLHttpRequest;r.open("GET",t,e),r.responseType="arraybuffer",r.onload=function(){for(var t=new Uint8Array(r.response),e=[],s=0;s<t.length;++s)e[s]=String.fromCharCode(t[s]);i(e.join(""))},r.onerror=n,r.send()}else if(t instanceof Event){var a=t.target.files,o=new FileReader;o.onload=function(t){i(t.target.result)},o.onerror=n,o.readAsArrayBuffer(a[0])}else t instanceof Blob&&i(t)},s.removeFile=function(){if(!s.isNode)throw new Error("You can remove files only in Node.js and Apache Cordova")},s.deleteFile=function(){},s.autoExtFilename=function(t,e,i){return i=i||{},"string"!=typeof t||t.match(/^[A-Z]+:\/\/|\n|\..{2,6}$/i)||0===i.autoExt||!1===i.autoExt?t:t+"."+e},s.fileExists=function(){if(!s.isNode)throw new Error("You can use exists() only in Node.js or Apach Cordova")},s.saveFile=function(e,i,n,r){var a=1;if(void 0===e)a=i,n&&(a=n(a));else if(!s.isNode){var o={disableAutoBom:!1};t.utils.extend(o,r);var h=new Blob([i],{type:"text/plain;charset=utf-8"});Ot(h,e,o.disableAutoBom),n&&(a=n(a))}return a};var b=s.hash=function(t){for(var e=2166136261,i=t.length;i;)e^=t.charCodeAt(--i),e+=(e<<1)+(e<<4)+(e<<7)+(e<<8)+(e<<24);return e},v=s.arrayUnion=function(t,e){var i=e.slice(0);return t.forEach((function(t){i.indexOf(t)<0&&i.push(t)})),i},E=s.arrayDiff=function(t,e){return t.filter((function(t){return e.indexOf(t)<0}))},m=s.arrayIntersect=function(t,e){var i=[];return t.forEach((function(t){var s=!1;e.forEach((function(e){s=s||t===e})),s&&i.push(t)})),i},g=s.arrayUnionDeep=function(t,e){var i=e.slice(0);return t.forEach((function(t){var e=!1;i.forEach((function(i){e=e||S(t,i)})),e||i.push(t)})),i},w=s.arrayExceptDeep=function(t,e){var i=[];return t.forEach((function(t){var s=!1;e.forEach((function(e){s=s||S(t,e)})),s||i.push(t)})),i},y=s.arrayIntersectDeep=function(t,e){var i=[];return t.forEach((function(t){var s=!1;e.forEach((function(e){s=s||S(t,e,!0)})),s&&i.push(t)})),i},T=s.cloneDeep=function t(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Date)return new Date(e);if(e instanceof String)return e.toString();if(e instanceof Number)return+e;var i=new e.constructor;for(var s in e)e.hasOwnProperty(s)&&(i[s]=t(e[s]));return i},S=s.deepEqual=function(t,e){if(t===e)return!0;if("object"==typeof t&&null!==t&&"object"==typeof e&&null!==e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var i in t)if(!S(t[i],e[i]))return!1;return!0}return!1},A=s.distinctArray=function(t){for(var e={},i=0,s=t.length;i<s;i++)e["object"==typeof t[i]?Object.keys(t[i]).sort().map((function(e){return e+"`"+t[i][e]})).join("`"):t[i]]=t[i];var n=[];for(var r in e)n.push(e[r]);return n},O=s.extend=function(t,e){for(var i in t=t||{},e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t},R=s.getValueOf=function(t){return"object"==typeof t&&(t instanceof String||t instanceof Number)?t.valueOf():t},N=s.flatArray=function(e){if(!e||0===e.length)return[];if("object"==typeof e&&e instanceof t.Recordset)return e.data.map((function(t){return R(t[e.columns[0].columnid])}));var i=Object.keys(e[0])[0];return void 0===i?[]:e.map((function(t){return t[i]}))};s.arrayOfArrays=function(t){return t.map((function(t){var e=[];for(var i in t)e.push(t[i]);return e}))},Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),s.xlsnc=function(t){var e="";t>701&&(e=String.fromCharCode(65+(((t-26)/676|0)-1)%26),t%=676);var i=String.fromCharCode(65+t%26);return t>=26&&(t=(t/26|0)-1,i=String.fromCharCode(65+t%26)+i,t>26&&(t=(t/26|0)-1,i=String.fromCharCode(65+t%26)+i)),e+i},s.xlscn=function(t){var e=t.charCodeAt(0)-65;return t.length>1&&(e=26*(e+1)+t.charCodeAt(1)-65,t.length>2&&(e=26*(e+1)+t.charCodeAt(2)-65)),e},s.domEmptyChildren=function(t){for(var e=t.childNodes.length;e--;)t.removeChild(t.lastChild)};var _={};s.like=function(t,e,i=""){if(!_[t]){for(var s="^",n=0;n<t.length;){var r=t[n],a=n<t.length-1?t[n+1]:"";r===i?(s+="\\"+a,n++):"["===r&&"^"===a?(s+="[^",n++):"["===r||"]"===r?s+=r:"%"===r?s+="[\\s\\S]*":"_"===r?s+=".":"/.*+?|(){}".indexOf(r)>-1?s+="\\"+r:s+=r,n++}s+="$",_[t]=RegExp(s,"i")}return(""+(e??"")).search(_[t])>-1},s.glob=function(t,e){for(var i=0,s="^";i<e.length;){var n=e[i];"["===n&&"^"===(i<e.length-1?e[i+1]:"")?(s+="[^",i++):"["===n||"]"===n?s+=n:"*"===n?s+=".*":"?"===n?s+=".":"/.*+?|(){}".indexOf(n)>-1?s+="\\"+n:s+=n,i++}return s+="$",(""+(t||"")).toUpperCase().search(RegExp(s.toUpperCase()))>-1},s.findAlaSQLPath=function(){if(s.isWebWorker)return"";if(s.isMeteorClient)return"/packages/dist/";if(s.isMeteorServer)return"assets/packages/dist/";if(s.isNode)return"";if(s.isBrowser)for(var t=document.getElementsByTagName("script"),e=0;e<t.length;e++){if("alasql-worker.js"===t[e].src.substr(-16).toLowerCase())return t[e].src.substr(0,t[e].src.length-16);if("alasql-worker.min.js"===t[e].src.substr(-20).toLowerCase())return t[e].src.substr(0,t[e].src.length-20);if("alasql.js"===t[e].src.substr(-9).toLowerCase())return t[e].src.substr(0,t[e].src.length-9);if("alasql.min.js"===t[e].src.substr(-13).toLowerCase())return t[e].src.substr(0,t[e].src.length-13)}return""};var C=function(){var e=t.private.externalXlsxLib||s.global.XLSX||null;if(e)return e;if(!e)throw new Error("Please include the xlsx.js library");return e},L={str:/string|char$|text/i,int:/^int|int$/i,num:/float|double|real|^num|decimal|money/i,bool:/^bool/i,date:/^date|^time/i};function I(e){e&&t.options.cache&&e&&e.query&&e.query.data&&(e.query.data=[])}s.typeConverter=function(e,i){if(null==e)return e;if(!i)return t.options.csvStringToNumber&&"string"==typeof e&&e.length>0&&e==+e?+e:e;if(L.str.test(i))return String(e);if(L.int.test(i)){var s=parseInt(e,10);return isNaN(s)?e:s}if(L.num.test(i)){var n=parseFloat(e);return isNaN(n)?e:n}return L.bool.test(i)?"string"==typeof e?/^(true|1|yes)$/i.test(e):!!e:L.date.test(i)?e instanceof Date?e:new Date(e):e},t.path=t.utils.findAlaSQLPath(),t.utils.uncomment=function(t){for(var e,i=!1,s=!1,n=!1,r=0,a=(t=("__"+t+"__").split("")).length;r<a;r++)i?t[r]===e&&("\\"!==t[r-1]||"\\"===t[r-2])&&(i=!1):s?"*"===t[r]&&"/"===t[r+1]?(t[r]=t[r+1]="",s=!1,r++):t[r]="":n?(("\n"===t[r+1]||"\r"===t[r+1]||t.length-2===r)&&(n=!1),t[r]=""):'"'===t[r]||"'"===t[r]?(i=!0,e=t[r]):"["===t[r]&&"@"!==t[r-1]?(i=!0,e="]"):"-"===t[r]&&"-"===t[r+1]?(t[r]="",n=!0):"/"===t[r]&&"*"===t[r+1]&&(t[r]="",s=!0);return t.join("").slice(2,-2)},t.parser=i,t.parser.parseError=function(t){throw new Error("Have you used a reserved keyword without `escaping` it?\n"+t)},t.parse=function(e){return i.parse(t.utils.uncomment(e))},t.engines={},t.databases={},t.databasenum=0,t.options={errorlog:!1,valueof:!0,dropifnotexists:!1,datetimeformat:"sql",casesensitive:!0,logtarget:"output",logprompt:!0,progress:!1,modifier:void 0,columnlookup:10,autovertex:!0,usedbo:!0,autocommit:!0,cache:!0,tsql:!0,mysql:!0,postgres:!0,oracle:!0,sqlite:!0,orientdb:!0,nocount:!1,nan:!1,excel:{cellDates:!0},joinstar:"overwrite",loopbreak:1e5,maxCteIterations:1e3,dateAsString:!0,csvStringToNumber:!0},t.vars={},t.declares={},t.prompthistory=[],t.plugins={},t.from={},t.into={},t.fn={},t.aggr={},t.busy=0,t.MAXSQLCACHESIZE=1e4,t.DEFAULTDATABASEID="alasql",t.lastid=0,t.buffer={},t.private={externalXlsxLib:null},t.setXLSX=function(e){t.private.externalXlsxLib=e},t.use=function(e){if(e||(e=t.DEFAULTDATABASEID),t.useid!==e){if(void 0===t.databases[e])throw Error("Database does not exist: "+e);{t.useid=e;let i=t.databases[t.useid];t.tables=i.tables,i.resetSqlCache(),t.options.usedbo&&(t.databases.dbo=i)}}},t.autoval=function(e,i,s,n){var r=n?t.databases[n]:t.databases[t.useid];if(!r.tables[e])throw new Error("Tablename not found: "+e);if(!r.tables[e].identities[i])throw new Error("Colname not found: "+i);return s?r.tables[e].identities[i].value||null:r.tables[e].identities[i].value-r.tables[e].identities[i].step||null},t.exec=function(e,i,s,n){if("function"==typeof i&&(n=s,s=i,i={}),delete t.error,i=i||{},!t.options.errorlog)return t.dexec(t.useid,e,i,s,n);try{return t.dexec(t.useid,e,i,s,n)}catch(e){t.error=e,s&&s(null,t.error)}},t.dexec=function(e,i,s,n,r){var a=t.databases[e],o=b(i+"|joinstar:"+t.options.joinstar);if(t.options.cache){let t=a.sqlCache[o];if(t&&a.dbversion===t.dbversion){var h=t(s,n);return I(t),h}}let l=a.astCache[o];if(t.options.cache&&!l?(l=t.parse(i),l&&(a.astCache[o]=l)):l=t.parse(i),l.statements){if(0===l.statements.length)return 0;if(1===l.statements.length){if(l.statements[0].compile){var c=l.statements[0].compile(e,s);if(!c)return;return c.sql=i,c.dbversion=a.dbversion,t.options.cache&&(a.sqlCacheSize>t.MAXSQLCACHESIZE&&a.resetSqlCache(),a.sqlCacheSize++,a.sqlCache[o]=c),h=t.res=c(s,n,r),I(c),h}return t.precompile(l.statements[0],t.useid,s),t.res=l.statements[0].execute(e,s,n,r)}return n?void t.adrun(e,l,s,n,r):t.drun(e,l,s,n,r)}},t.drun=function(e,i,s,n,r){var a=t.useid;a!==e&&t.use(e);for(var o=[],h=0,l=i.statements.length;h<l;h++)if(i.statements[h])if(i.statements[h].compile){var c=i.statements[h].compile(t.useid);o.push(t.res=c(s,null,r))}else t.precompile(i.statements[h],t.useid,s),o.push(t.res=i.statements[h].execute(t.useid,s));return a!==e&&t.use(a),n&&n(o),t.res=o,o},t.adrun=function(e,i,s,n,r){var a=0,o=i.statements.length;!1!==t.options.progress&&t.options.progress(o,a++);var h=t.useid;h!==e&&t.use(e);var l=[];!function c(u){void 0!==u&&l.push(u);var f=i.statements.shift();return f?f.compile?(f.compile(t.useid)(s,c,r),void(!1!==t.options.progress&&t.options.progress(o,a++))):(t.precompile(i.statements[0],t.useid,s),f.execute(t.useid,s,c),void(!1!==t.options.progress&&t.options.progress(o,a++))):(h!==e&&t.use(h),void n(l))}()},t.compile=function(e,i){i=i||t.useid;let s=t.parse(e);if(1!==s.statements.length)throw new Error("Cannot compile, because number of statements in SQL is not equal to 1");var n=s.statements[0].compile(i);return n.promise=function(t){return new Promise((function(e,i){n(t,(function(t,s){s?i(s):e(t)}))}))},n},s.global.Promise||(s.global.Promise=Promise);var k=function(e,i,n,r){return new s.global.Promise((function(s,a){t(e,i,(function(e,i){i?a(i):(n&&r&&!1!==t.options.progress&&t.options.progress(n,r),s(e))}))}))};var M=function(t){if(!(t.length<1)){for(var e,i=[],n=0;n<t.length;n++){if("string"==typeof(e=t[n])&&(e=[e]),!s.isArray(e)||e.length<1||2<e.length)throw new Error("Error in .promise parameter");i.push({sql:e[0],params:e[1]||void 0,i:n,length:t.length})}return((t,e)=>{var i=e.resolve([]);return t.forEach((t=>{i=i.then((e=>k(t.sql,t.params,t.i,t.length).then((t=>[...e,t]))))})),i})(i,s.global.Promise)}};t.promise=function(t,e){if(typeof Promise>"u")throw new Error("Please include a Promise/A+ library");if("string"==typeof t)return k(t,e);if(!s.isArray(t)||t.length<1||typeof e<"u")throw new Error("Error in .promise parameters");return M(t)};var $=t.Database=function(e){var i=this;if(i===t)if(e){if(t.databases[e]=i=t.databases[e],!i)throw new Error(`Database ${e} not found`)}else i=t.databases.alasql,t.options.tsql&&(t.databases.tempdb=t.databases.alasql);return e||(e="db"+t.databasenum++),i.databaseid=e,t.databases[e]=i,i.dbversion=0,i.tables={},i.views={},i.triggers={},i.indices={},i.objects={},i.counter=0,i.resetSqlCache(),i};$.prototype.resetSqlCache=function(){this.sqlCache={},this.sqlCacheSize=0,this.astCache={}},$.prototype.exec=function(e,i,s){return t.dexec(this.databaseid,e,i,s)},$.prototype.autoval=function(e,i,s){return t.autoval(e,i,s,this.databaseid)},$.prototype.transaction=function(e){return e(new t.Transaction(this.databaseid))};class x{transactionid=Date.now();committed=!1;bank;constructor(e){this.databaseid=e,this.dbversion=t.databases[e].dbversion,this.bank=JSON.stringify(t.databases[e])}commit(){this.committed=!0,t.databases[this.databaseid].dbversion=Date.now(),delete this.bank}rollback(){if(this.committed)throw new Error("Transaction already commited");t.databases[this.databaseid]=JSON.parse(this.bank),delete this.bank}exec(e,i,s){return t.dexec(this.databaseid,e,i,s)}}x.prototype.executeSQL=x.prototype.exec,t.Transaction=x;var D=t.Table=function(t){this.data=[],this.columns=[],this.xcolumns={},this.inddefs={},this.indices={},this.uniqs={},this.uniqdefs={},this.identities={},this.checks=[],this.checkfns=[],this.beforeinsert={},this.afterinsert={},this.insteadofinsert={},this.beforedelete={},this.afterdelete={},this.insteadofdelete={},this.beforeupdate={},this.afterupdate={},this.insteadofupdate={},Object.assign(this,t)};D.prototype.indexColumns=function(){var t=this;t.xcolumns={},t.columns.forEach((function(e){t.xcolumns[e.columnid]=e}))};t.View=class{constructor(t){this.columns=[],this.xcolumns={},this.query=[],Object.assign(this,t)}};class P{constructor(e){this.alasql=t,this.columns=[],this.xcolumns={},this.selectGroup=[],this.groupColumns={},Object.assign(this,e)}}t.Recordset=class{constructor(t){Object.assign(this,t)}},t.Query=P;var U={extend:Object.assign,casesensitive:t.options.casesensitive,Base:class{constructor(t){Object.assign(this,t)}toString(){}toType(){}toJS(){}exec(){}compile(){}},compileParamValue:function(e,i,s,n,r,a){return function(o,h){var l=o[e];if(!Array.isArray(l)){var c=new Error(i+" requires an array for parameter "+e);if(h)return h(null,c);throw c}var u="__p"+e+"_"+Date.now(),f=t.databases[n||"alasql"];f.tables[u]=new t.Table({tableid:u}),f.tables[u].data=l;try{var d=r[a];r[a]=new U.Table({tableid:u,databaseid:f.databaseid});var p=r.compile(n);r[a]=d;var b=p(o,h);if(s){var v=f.tables[u].data;l.length=0,Array.prototype.push.apply(l,v)}return b}catch(t){if(h)return h(null,t);throw t}finally{delete f.tables[u]}}}};i.yy=t.yy=U,U.Statements=class{constructor(t){Object.assign(this,t)}toString(){return this.statements.map((t=>t.toString())).join("; ")}compile(t){const e=this.statements.map((e=>e.compile(t)));return 1===e.length?e[0]:(t,i)=>{const s=e.map((e=>e(t)));return i&&i(s),s}}},U.Search=class{constructor(t){Object.assign(this,t)}toString(){let t="SEARCH ";return this.selectors&&(t+=this.selectors.toString()),this.from&&(t+="FROM "+this.from.toString()),t}toJS(t){return`this.queriesfn[${this.queriesidx-1}](this.params,null,${t})`}compile(t){var e=t,i=(t,s)=>{var n;return this.#t(e,t,(function(t){n=V(i.query,t),s&&(n=s(n))})),n};return i.query={},i}#t(e,i,s){var n,r,a={},o=T(this.selectors);if(void 0!==o&&o.length>0&&(o&&o[0]&&"PROP"===o[0].srchid&&o[0].args&&o[0].args[0]&&("XML"===o[0].args[0].toUpperCase()?(a.mode="XML",o.shift()):"HTML"===o[0].args[0].toUpperCase()?(a.mode="HTML",o.shift()):"JSON"===o[0].args[0].toUpperCase()&&(a.mode="JSON",o.shift())),o.length>0&&"VALUE"===o[0].srchid&&(a.value=!0,o.shift())),this.from instanceof U.Column)r=t.databases[this.from.databaseid||e].tables[this.from.columnid].data;else if(this.from instanceof U.FuncValue&&t.from[this.from.funcid.toUpperCase()]){var h=this.from.args.map((function(e){var s=e.toJS();return new Function("params,alasql","var y;return "+s).bind(this)(i,t)}));r=t.from[this.from.funcid.toUpperCase()].apply(this,h)}else if(typeof this.from>"u")r=t.databases[e].objects;else{var l=new Function("params,alasql","var y;return "+this.from.toJS());r=l(i,t),"object"==typeof Mongo&&"object"!=typeof Mongo.Collection&&r instanceof Mongo.Collection&&(r=r.find().fetch())}if(n=void 0!==o&&o.length>0?function e(s,n,o){var h=s[n],l=t.options.loopbreak||1e5;if(h.selid){if("PATH"===h.selid){for(var c=[{node:o,stack:[]}],u={},f=t.databases[t.useid].objects;c.length>0;){var d=c.shift(),p=d.node,b=d.stack;if((I=e(h.args,0,p)).length>0){if(n+1+1>s.length)return b;var v=[];return b&&b.length>0&&b.forEach((function(t){v=v.concat(e(s,n+1,t))})),v}typeof u[p.$id]<"u"||(u[p.$id]=!0,p.$out&&p.$out.length>0&&p.$out.forEach((function(t){var e=f[t],i=b.concat(e);i.push(f[e.$out[0]]),c.push({node:f[e.$out[0]],stack:i})})))}return[]}if("NOT"===h.selid)return(m=e(h.args,0,o)).length>0?[]:n+1+1>s.length?[o]:e(s,n+1,o);if("DISTINCT"===h.selid){if(0===(m=typeof h.args>"u"||0===h.args.length?A(o):e(h.args,0,o)).length)return[];var E=A(m);return n+1+1>s.length?E:e(s,n+1,E)}if("AND"===h.selid)return E=!0,h.args.forEach((function(t){E=E&&e(t,0,o).length>0})),E?n+1+1>s.length?[o]:e(s,n+1,o):[];if("OR"===h.selid)return E=!1,h.args.forEach((function(t){E=E||e(t,0,o).length>0})),E?n+1+1>s.length?[o]:e(s,n+1,o):[];if("ALL"===h.selid)return 0===(m=e(h.args[0],0,o)).length?[]:n+1+1>s.length?m:e(s,n+1,m);if("ANY"===h.selid)return 0===(m=e(h.args[0],0,o)).length?[]:n+1+1>s.length?[m[0]]:e(s,n+1,[m[0]]);if("UNIONALL"===h.selid){var m=[];return h.args.forEach((function(t){m=m.concat(e(t,0,o))})),0===m.length?[]:n+1+1>s.length?m:e(s,n+1,m)}if("UNION"===h.selid){m=[];return h.args.forEach((function(t){m=m.concat(e(t,0,o))})),0===(m=A(m)).length?[]:n+1+1>s.length?m:e(s,n+1,m)}if("IF"===h.selid)return 0===(m=e(h.args,0,o)).length?[]:n+1+1>s.length?[o]:e(s,n+1,o);if("REPEAT"===h.selid){var g,w,y=h.args[0].value;w=h.args[1]?h.args[1].value:y,h.args[2]&&(g=h.args[2].variable);var T=[];if(0===y&&(n+1+1>s.length?T=[o]:(g&&(t.vars[g]=0),T=T.concat(e(s,n+1,o)))),w>0)for(var S=[{value:o,lvl:1}],O=0;S.length>0;){m=S[0];if(S.shift(),m.lvl<=w){g&&(t.vars[g]=m.lvl);var R=e(h.sels,0,m.value);R.forEach((function(t){S.push({value:t,lvl:m.lvl+1})})),m.lvl>=y&&(n+1+1>s.length?T=T.concat(R):R.forEach((function(t){T=T.concat(e(s,n+1,t))})))}if(++O>l)throw new Error("Infinite loop brake. Number of iterations = "+O)}return T}if("OF"===h.selid){if(n+1+1>s.length)return[o];var N=[];return Object.keys(o).forEach((function(i){t.vars[h.args[0].variable]=i,N=N.concat(e(s,n+1,o[i]))})),N}if("TO"===h.selid){var _=t.vars[h.args[0]],C=[];return(C=void 0!==_?_.slice(0):[]).push(o),n+1+1>s.length?[o]:(t.vars[h.args[0]]=C,N=e(s,n+1,o),t.vars[h.args[0]]=_,N)}if("ARRAY"===h.selid)return(m=e(h.args,0,o)).length>0?(L=m,n+1+1>s.length?[L]:e(s,n+1,L)):[];if("SUM"===h.selid){if(!((m=e(h.args,0,o)).length>0))return[];var L=m.reduce((function(t,e){return t+e}),0);return n+1+1>s.length?[L]:e(s,n+1,L)}if("AVG"===h.selid)return(m=e(h.args,0,o)).length>0?(L=m.reduce((function(t,e){return t+e}),0)/m.length,n+1+1>s.length?[L]:e(s,n+1,L)):[];if("COUNT"===h.selid)return(m=e(h.args,0,o)).length>0?(L=m.length,n+1+1>s.length?[L]:e(s,n+1,L)):[];if("FIRST"===h.selid)return(m=e(h.args,0,o)).length>0?(L=m[0],n+1+1>s.length?[L]:e(s,n+1,L)):[];if("LAST"===h.selid)return(m=e(h.args,0,o)).length>0?(L=m[m.length-1],n+1+1>s.length?[L]:e(s,n+1,L)):[];if("MIN"===h.selid)return 0===(m=e(h.args,0,o)).length?[]:(L=m.reduce((function(t,e){return Math.min(t,e)}),1/0),n+1+1>s.length?[L]:e(s,n+1,L));if("MAX"===h.selid)return 0===(m=e(h.args,0,o)).length?[]:(L=m.reduce((function(t,e){return Math.max(t,e)}),-1/0),n+1+1>s.length?[L]:e(s,n+1,L));if("PLUS"===h.selid){for(T=[],S=e(h.args,0,o).slice(),n+1+1>s.length?T=T.concat(S):S.forEach((function(t){T=T.concat(e(s,n+1,t))})),O=0;S.length>0;)if(m=S.shift(),m=e(h.args,0,m),S=S.concat(m),n+1+1>s.length?T=T.concat(m):m.forEach((function(t){var i=e(s,n+1,t);T=T.concat(i)})),++O>l)throw new Error("Infinite loop brake. Number of iterations = "+O);return T}if("STAR"===h.selid){for(T=[],T=e(s,n+1,o),S=e(h.args,0,o).slice(),n+1+1>s.length?T=T.concat(S):S.forEach((function(t){T=T.concat(e(s,n+1,t))})),O=0;S.length>0;)if(m=S[0],S.shift(),m=e(h.args,0,m),S=S.concat(m),n+1+1<=s.length&&m.forEach((function(t){T=T.concat(e(s,n+1,t))})),++O>l)throw new Error("Infinite loop brake. Number of iterations = "+O);return T}if("QUESTION"===h.selid)return T=(T=[]).concat(e(s,n+1,o)),m=e(h.args,0,o),n+1+1<=s.length&&m.forEach((function(t){T=T.concat(e(s,n+1,t))})),T;if("WITH"!==h.selid){if("ROOT"===h.selid)return n+1+1>s.length?[o]:e(s,n+1,r);throw new Error("Wrong selector "+h.selid)}if(0===(m=e(h.args,0,o)).length)return[];var I={status:1,values:m}}else{if(!h.srchid)throw new Error("Selector not found");I=t.srch[h.srchid.toUpperCase()](o,h.args,a,i)}if(typeof I>"u"&&(I={status:1,values:[o]}),E=[],1===I.status){var k=I.values;if(n+1+1>s.length)E=k;else for(O=0;O<I.values.length;O++)E=E.concat(e(s,n+1,k[O]))}return E}(o,0,r):r,this.into)if(this.into instanceof U.ParamValue)i[this.into.param]=n,s&&(n=s(n));else if(this.into instanceof U.VarValue)t.vars[this.into.variable]=n,s&&(n=s(n));else{var c,u;typeof this.into.args[0]<"u"&&(c=new Function("params,alasql","var y;return "+this.into.args[0].toJS())(i,t)),typeof this.into.args[1]<"u"&&(u=new Function("params,alasql","var y;return "+this.into.args[1].toJS())(i,t)),n=t.into[this.into.funcid.toUpperCase()](c,u,n,[],s)}else a.value&&n.length>0&&(n=n[0]),s&&(n=s(n));return n}},t.srch={PROP(t,e,i){if("XML"===i.mode){const i=t.children.filter((t=>t.name.toUpperCase()===e[0].toUpperCase()));return{status:i.length?1:-1,values:i}}return"object"!=typeof t||null===t||"object"!=typeof e||typeof t[e[0]]>"u"?{status:-1,values:[]}:{status:1,values:[t[e[0]]]}},APROP:(t,e)=>"object"!=typeof t||null===t||"object"!=typeof e||typeof t[e[0]]>"u"?{status:1,values:[void 0]}:{status:1,values:[t[e[0]]]},EQ(e,i,s,n){var r=i[0].toJS("x","");return e===new Function("x,alasql,params","return "+r)(e,t,n)?{status:1,values:[e]}:{status:-1,values:[]}},LIKE(e,i,s,n){var r=i[0].toJS("x",""),a=new Function("x,alasql,params","return "+r);return e.toUpperCase().match(new RegExp("^"+a(e,t,n).toUpperCase().replace(/%/g,".*").replace(/\?|_/g,".")+"$"),"g")?{status:1,values:[e]}:{status:-1,values:[]}},ATTR(t,e,i){if("XML"===i.mode)return typeof e>"u"?{status:1,values:[t.attributes]}:"object"==typeof t&&"object"==typeof t.attributes&&typeof t.attributes[e[0]]<"u"?{status:1,values:[t.attributes[e[0]]]}:{status:-1,values:[]};throw new Error("ATTR is not using in usual mode")},CONTENT(t,e,i){if("XML"!==i.mode)throw new Error("ATTR is not using in usual mode");return{status:1,values:[t.content]}},SHARP:(e,i)=>void 0!==e&&e===t.databases[t.useid].objects[i[0]]?{status:1,values:[e]}:{status:-1,values:[]},PARENT(){return console.error("PARENT not implemented",arguments),{status:-1,values:[]}},CHILD:(t,e,i)=>"object"==typeof t?Array.isArray(t)?{status:1,values:t}:"XML"===i.mode?{status:1,values:Object.keys(t.children).map((function(e){return t.children[e]}))}:{status:1,values:Object.keys(t).map((function(e){return t[e]}))}:{status:1,values:[]},KEYS:t=>"object"==typeof t&&null!==t?{status:1,values:Object.keys(t)}:{status:1,values:[]},WHERE(e,i,s,n){var r=i[0].toJS("x","");return new Function("x,alasql,params","return "+r)(e,t,n)?{status:1,values:[e]}:{status:-1,values:[]}},NAME:(t,e)=>t.name===e[0]?{status:1,values:[t]}:{status:-1,values:[]},CLASS:(t,e)=>t.$class==e?{status:1,values:[t]}:{status:-1,values:[]},VERTEX:t=>"VERTEX"===t.$node?{status:1,values:[t]}:{status:-1,values:[]},INSTANCEOF:(e,i)=>e instanceof t.fn[i[0]]?{status:1,values:[e]}:{status:-1,values:[]},EDGE:t=>"EDGE"===t.$node?{status:1,values:[t]}:{status:-1,values:[]},EX(e,i,s,n){var r=i[0].toJS("x","");return{status:1,values:[new Function("x,alasql,params","return "+r)(e,t,n)]}},RETURN(e,i,s,n){var r={};return i&&i.length>0&&i.forEach((function(i){var s=i.toJS("x",""),a=new Function("x,alasql,params","return "+s);typeof i.as>"u"&&(i.as=i.toString()),r[i.as]=a(e,t,n)})),{status:1,values:[r]}},REF:e=>({status:1,values:[t.databases[t.useid].objects[e]]}),OUT:e=>e.$out&&e.$out.length>0?{status:1,values:e.$out.map((function(e){return t.databases[t.useid].objects[e]}))}:{status:-1,values:[]},OUTOUT(e){if(e.$out&&e.$out.length>0){var i=[];return e.$out.forEach((function(e){var s=t.databases[t.useid].objects[e];s&&s.$out&&s.$out.length>0&&s.$out.forEach((function(e){i=i.concat(t.databases[t.useid].objects[e])}))})),{status:1,values:i}}return{status:-1,values:[]}},IN:e=>e.$in&&e.$in.length>0?{status:1,values:e.$in.map((function(e){return t.databases[t.useid].objects[e]}))}:{status:-1,values:[]},ININ(e){if(e.$in&&e.$in.length>0){var i=[];return e.$in.forEach((function(e){var s=t.databases[t.useid].objects[e];s&&s.$in&&s.$in.length>0&&s.$in.forEach((function(e){i=i.concat(t.databases[t.useid].objects[e])}))})),{status:1,values:i}}return{status:-1,values:[]}},AS:(e,i)=>(t.vars[i[0]]=e,{status:1,values:[e]}),AT:(e,i)=>({status:1,values:[t.vars[i[0]]]}),CLONEDEEP:t=>({status:1,values:[T(t)]}),SET(e,i,s,n){var r=i.map((function(t){return"@"===t.method?`alasql.vars[${JSON.stringify(t.variable)}]=`+t.expression.toJS("x",""):"$"===t.method?`params[${JSON.stringify(t.variable)}]=`+t.expression.toJS("x",""):`x[${JSON.stringify(t.column.columnid)}]=`+t.expression.toJS("x","")})).join(";");return new Function("x,params,alasql",r)(e,n,t),{status:1,values:[e]}},ROW(e,i,s,n){var r="var y;return [";return r+=i.map((t=>t.toJS("x",""))).join(","),r+="]",{status:1,values:[new Function("x,params,alasql",r)(e,n,t)]}},D3:t=>("VERTEX"!==t.$node&&"EDGE"===t.$node&&(t.source=t.$in[0],t.target=t.$out[0]),{status:1,values:[t]}),ORDERBY:(t,e)=>({status:1,values:t.sort(G(e))})};var G=function(e){if(e){if("function"==typeof e?.[0]?.expression){var i=e[0].expression;return function(t,e){var s=i(t),n=i(e);return s>n?1:s===n?0:-1}}var s="",n="";return e.forEach((function(e){var i="";if(e.expression instanceof U.NumValue&&(e.expression=self.columns[e.expression.value-1]),e.expression instanceof U.Column){var r=e.expression.columnid;t.options.valueof&&(i=".valueOf()"),e.nocase&&(i+=".toUpperCase()"),"_"===r?(s+="if(a"+i+("ASC"===e.direction?">":"<")+"b"+i+")return 1;",s+="if(a"+i+"==b"+i+"){"):s+=`if (\n\t\t\t\t\t\t\t(a[${JSON.stringify(r)}]||'')${i}\n\t\t\t\t\t\t\t${"ASC"===e.direction?">":"<"}\n\t\t\t\t\t\t\t(b[${JSON.stringify(r)}]||'')${i}\n\t\t\t\t\t\t) return 1;\n\n\t\t\t\t\t\tif(\n\t\t\t\t\t\t\t(a[${JSON.stringify(r)}]||'')${i}\n\t\t\t\t\t\t\t==\n\t\t\t\t\t\t\t(b[${JSON.stringify(r)}]||'')${i}\n\t\t\t\t\t\t){\n\t\t\t\t\t\t`}else i=".valueOf()",e.nocase&&(i+=".toUpperCase()"),s+=`\n\t\t\t\t\tif (\n\t\t\t\t\t\t(${e.toJS("a","")} || '')${i}\n\t\t\t\t\t\t${"ASC"===e.direction?">":"<"}\n\t\t\t\t\t\t(${e.toJS("b","")} || '')${i}\n\t\t\t\t\t) return 1;\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t(${e.toJS("a","")} || '')${i} ==\n\t\t\t\t\t\t(${e.toJS("b","")} || '')${i}\n\t\t\t\t\t) {`;n+="}"})),s+="return 0;",s+=n+"return -1",new Function("a,b",s)}};function F(t,e,i){if(e>=0){let s=i.sources[e];s.data=t,"function"==typeof s.data&&(s.getfn=s.data,s.dontcache=s.getfn.dontcache,["OUTER","RIGHT","ANTI"].includes(s.joinmode)&&(s.dontcache=!1),s.data={})}else i.queriesdata[-e-1]=N(t);if(i.sourceslen--,!(i.sourceslen>0))return B(i)}function B(e){var i,s=e.scope;if(j(e),e.data=[],e.xgroups={},e.groups=[],H(e,s,0),e.groupfn){if(e.data=[],0===e.groups.length&&0===e.allgroups.length){var n={};e.selectGroup.length>0&&e.selectGroup.forEach((function(t){n[t.nick]="COUNT"==t.aggregatorid||"SUM"==t.aggregatorid||"TOTAL"==t.aggregatorid?0:void 0})),e.groups=[n]}if(e.aggrKeys.length>0){var r="";e.aggrKeys.forEach((function(t){var e;e=t.args&&t.args.length>1?Array(t.args.length).fill("undefined").join(",")+",":"undefined,",r+=`\n\t\t\t\tg[${JSON.stringify(t.nick)}] = alasql.aggr[${JSON.stringify(t.funcid)}](${e}g[${JSON.stringify(t.nick)}],3); `}));var a=new Function("g,params,alasql","var y;"+r)}for(var o=0,h=e.groups.length;o<h;o++)if(n=e.groups[o],a&&a(n,e.params,t),!e.havingfn||e.havingfn(n,e.params,t)){var l=e.selectgfn(n,e.params,t);for(const t in e.groupColumns)if(e.groupColumns[t]!==t&&l[e.groupColumns[t]]&&!e.groupColumns[e.groupColumns[t]]){var c=e.groupColumns[t],u=!1;for(const i in e.groupColumns)if(i!==t&&e.groupColumns[i]===c&&l[i]){u=!0;break}u||delete l[e.groupColumns[t]]}e.data.push(l)}}if(function(t){if(t.distinct){for(var e={},i=Object.keys(t.data[0]||[]),s=0,n=t.data.length;s<n;s++)e[i.map((function(e){var i=t.data[s][e];return"object"==typeof i?JSON.stringify(i):i})).join("`")]=t.data[s];for(var r in t.data=[],e)t.data.push(e[r])}}(e),e.unionallfn){if(e.corresponding)e.unionallfn.query&&!e.unionallfn.query.modifier&&(e.unionallfn.query.modifier=void 0),p=e.unionallfn(e.params);else for(e.unionallfn.query&&!e.unionallfn.query.modifier&&(e.unionallfn.query.modifier="RECORDSET"),p=[],h=(b=e.unionallfn(e.params)).data.length,o=0;o<h;o++){var f={};if(e.columns.length){i=Math.min(e.columns.length,b.columns.length);for(var d=0;d<i;d++)f[e.columns[d].columnid]=b.data[o][b.columns[d].columnid]}else for(i=b.columns.length,d=0;d<i;d++)f[b.columns[d].columnid]=b.data[o][b.columns[d].columnid];p.push(f)}e.data=e.data.concat(p)}else if(e.unionfn){if(e.corresponding)e.unionfn.query&&!e.unionfn.query.modifier&&(e.unionfn.query.modifier="ARRAY"),p=e.unionfn(e.params);else for(e.unionfn.query&&!e.unionfn.query.modifier&&(e.unionfn.query.modifier="RECORDSET"),p=[],h=(b=e.unionfn(e.params)).data.length,o=0;o<h;o++){if(f={},e.columns.length)for(i=Math.min(e.columns.length,b.columns.length),d=0;d<i;d++)f[e.columns[d].columnid]=b.data[o][b.columns[d].columnid];else for(i=b.columns.length,d=0;d<i;d++)f[b.columns[d].columnid]=b.data[o][b.columns[d].columnid];p.push(f)}e.data=g(e.data,p)}else if(e.exceptfn){if(e.corresponding){e.exceptfn.query&&!e.exceptfn.query.modifier&&(e.exceptfn.query.modifier="ARRAY");var p=e.exceptfn(e.params)}else{var b;for(e.exceptfn.query&&!e.exceptfn.query.modifier&&(e.exceptfn.query.modifier="RECORDSET"),p=[],o=0,h=(b=e.exceptfn(e.params)).data.length;o<h;o++){for(f={},d=Math.min(e.columns.length,b.columns.length)-1;0<=d;d--)f[e.columns[d].columnid]=b.data[o][b.columns[d].columnid];p.push(f)}}e.data=w(e.data,p)}else if(e.intersectfn){if(e.corresponding)e.intersectfn.query&&!e.intersectfn.query.modifier&&(e.intersectfn.query.modifier=void 0),p=e.intersectfn(e.params);else for(e.intersectfn.query&&!e.intersectfn.query.modifier&&(e.intersectfn.query.modifier="RECORDSET"),p=[],h=(b=e.intersectfn(e.params)).data.length,o=0;o<h;o++){for(f={},i=Math.min(e.columns.length,b.columns.length),d=0;d<i;d++)f[e.columns[d].columnid]=b.data[o][b.columns[d].columnid];p.push(f)}e.data=y(e.data,p)}if(e.orderfn&&e.orderColumns&&(e.unionallfn||e.unionfn||e.exceptfn||e.intersectfn))for(o=0,h=e.data.length;o<h;o++)for(var v=0;v<e.orderColumns.length;v++){var E=e.orderColumns[v],m="$$$"+v;(f=e.data[o])[m]=E instanceof U.Column&&void 0!==f[E.columnid]?f[E.columnid]:void 0,0===o&&-1===e.removeKeys.indexOf(m)&&e.removeKeys.push(m)}if(e.orderfn){if(e.explain)var T=Date.now();e.data=e.data.sort(e.orderfn),e.explain&&e.explaination.push({explid:e.explid++,description:"QUERY BY",ms:Date.now()-T})}if(function(t){if(t.limit){var e=0;t.offset&&(e=(e=0|t.offset||0)<0?0:e),t.data=t.data.slice(e,t.percent?(t.data.length*t.limit/100|0)+e:(0|t.limit)+e)}}(e),typeof angular<"u"&&e.removeKeys.push("$$hashKey"),e.removeKeys.length>0){var S=e.removeKeys;if((i=S.length)>0)for(h=e.data.length,o=0;o<h;o++)for(d=0;d<i;d++)delete e.data[o][S[d]];e.columns.length>0&&(e.columns=e.columns.filter((function(t){var e=!1;return S.forEach((function(i){t.columnid==i&&(e=!0)})),!e})))}if(typeof e.removeLikeKeys<"u"&&e.removeLikeKeys.length>0){var A=e.removeLikeKeys;for(o=0,h=e.data.length;o<h;o++)for(var O in f=e.data[o])for(d=0;d<e.removeLikeKeys.length;d++)t.utils.like(e.removeLikeKeys[d],O)&&delete f[O];e.columns.length>0&&(e.columns=e.columns.filter((function(e){var i=!1;return A.forEach((function(s){t.utils.like(s,e.columnid)&&(i=!0)})),!i})))}if(e.pivotfn&&e.pivotfn(),e.unpivotfn&&e.unpivotfn(),e.intoallfn){var R=e.intoallfn(e.columns,e.cb,e.params,e.alasql);return R}if(e.intofn){for(h=e.data.length,o=0;o<h;o++)e.intofn(e.data[o],o,e.params,e.alasql);return e.cb&&e.cb(e.data.length,e.A,e.B),e.data.length}return R=e.data,e.cb&&(R=e.cb(e.data,e.A,e.B)),R}var j=function(e){for(var i=0,s=e.sources.length;i<s;i++){var n,r,a,o,h,l,c=e.sources[i];if(delete c.ix,i>0&&"ix"==c.optimization&&c.onleftfn&&c.onrightfn){if(c.databaseid&&t.databases[c.databaseid].tables[c.tableid]&&(t.databases[c.databaseid].tables[c.tableid].indices||(e.database.tables[c.tableid].indices={}),h=t.databases[c.databaseid].tables[c.tableid].indices[b(c.onrightfns+"`"+c.srcwherefns)],!t.databases[c.databaseid].tables[c.tableid].dirty&&h&&(c.ix=h)),!c.ix){for(c.ix={},n={},r=0,a=c.data.length;(o=c.data[r])||c.getfn&&(o=c.getfn(r))||r<a;){if(c.getfn&&!c.dontcache&&(c.data[r]=o),n[c.alias||c.tableid]=o,c.srcwherefn(n,e.params,t)){var u,f=c.onrightfn(n,e.params,t);(u=c.ix[f])||(u=c.ix[f]=[]),u.push(o)}r++}c.databaseid&&t.databases[c.databaseid].tables[c.tableid]&&(t.databases[c.databaseid].tables[c.tableid].indices[b(c.onrightfns+"`"+c.srcwherefns)]=c.ix)}}else if(c.wxleftfn){if(t.databases[c.databaseid].engineid||(h=t.databases[c.databaseid].tables[c.tableid].indices[b(c.wxleftfns+"`")]),!t.databases[c.databaseid].tables[c.tableid].dirty&&h)c.ix=h,c.data=c.ix[c.wxrightfn(null,e.params,t)];else{for(c.ix={},n={},r=0,a=c.data.length;(o=c.data[r])||c.getfn&&(o=c.getfn(r))||r<a;)c.getfn&&!c.dontcache&&(c.data[r]=o),n[c.alias||c.tableid]=c.data[r],f=c.wxleftfn(n,e.params,t),(u=c.ix[f])||(u=c.ix[f]=[]),u.push(c.data[r]),r++;t.databases[c.databaseid].engineid||(t.databases[c.databaseid].tables[c.tableid].indices[b(c.wxleftfns+"`")]=c.ix)}c.srcwherefns&&(c.data?(n={},c.data=c.data.filter((function(i){return n[c.alias]=i,c.srcwherefn(n,e.params,t)}))):c.data=[])}else if(c.srcwherefns&&!c.dontcache)if(c.data){for(n={},c.data=c.data.filter((function(i){return n[c.alias]=i,c.srcwherefn(n,e.params,t)})),n={},r=0,a=c.data.length,l=[];(o=c.data[r])||c.getfn&&(o=c.getfn(r))||r<a;)c.getfn&&!c.dontcache&&(c.data[r]=o),n[c.alias]=o,c.srcwherefn(n,e.params,t)&&l.push(o),r++;c.data=l}else c.data=[]}};function H(e,i,s){if(s>=e.sources.length)e.wherefn(i,e.params,t)&&(e.groupfn?e.groupfn(i,e.params,t):e.data.push(e.selectfn(i,e.params,t)));else if(e.sources[s].applyselect){var n=e.sources[s];n.applyselect(e.params,(function(t){if(t.length>0)for(var r=0;r<t.length;r++)i[n.alias]=t[r],H(e,i,s+1);else"OUTER"==n.applymode&&(i[n.alias]={},H(e,i,s+1))}),i)}else{let n=e.sources[s],l=e.sources[s+1],c=n.alias||n.tableid,u=!1,f=n.data,d=!1;(!n.getfn||n.getfn&&!n.dontcache)&&"RIGHT"!=n.joinmode&&"OUTER"!=n.joinmode&&"ANTI"!=n.joinmode&&"ix"==n.optimization&&(f=n.ix[n.onleftfn(i,e.params,t)]||[],d=!0);let p=0;if(typeof f>"u")throw new Error("Data source number "+s+" in undefined");let b,v=f.length;for(;(b=f[p])||!d&&n.getfn&&(b=n.getfn(p))||p<v;){!d&&n.getfn&&!n.dontcache&&(f[p]=b),i[c]=b;var r=!n.onleftfn;if(!r){var a=n.onleftfn(i,e.params,t),o=n.onrightfn(i,e.params,t);(a instanceof String||a instanceof Number)&&(a=a.valueOf()),(o instanceof String||o instanceof Number)&&(o=a.valueOf()),r=a==o}r&&n.onmiddlefn(i,e.params,t)&&("SEMI"!=n.joinmode&&"ANTI"!=n.joinmode&&H(e,i,s+1),"LEFT"!=n.joinmode&&"INNER"!=n.joinmode&&(b._rightjoin=!0),u=!0),p++}if(("LEFT"==n.joinmode||"OUTER"==n.joinmode||"SEMI"==n.joinmode)&&!u&&(i[c]={},H(e,i,s+1)),0==s)for(var h=s+1;h<e.sources.length;h++){if("OUTER"==l.joinmode||"RIGHT"==l.joinmode||"ANTI"==l.joinmode){i[n.alias]={};let t,s=0,r=l.data.length;for(;(t=l.data[s])||l.getfn&&(t=l.getfn(s))||s<r;)l.getfn&&!l.dontcache&&(l.data[s]=t),t._rightjoin?delete t._rightjoin:(i[l.alias]=t,H(e,i,h+1)),s++}n=e.sources[h],l=e.sources[h+1]}i[c]=void 0}}function V(e,i){if(typeof i>"u"||"number"==typeof i||"string"==typeof i||"boolean"==typeof i)return i;var s=e.modifier||t.options.modifier,n=e.columns;if(e.dirtyColumns&&i.length>0){for(var r={},a=Math.min(i.length,t.options.columnlookup||10)-1;0<=a;a--)for(var o in i[a])r[o]=!0;var h=Object.keys(r).map((function(t){return{columnid:t}}));if(n&&0!==n.length){var l={};n.forEach((function(t){l[t.columnid]=!0})),h.forEach((function(t){l[t.columnid]||n.push(t)}))}else n=h}else if(typeof n>"u"||0===n.length)if(i.length>0){for(r={},a=Math.min(i.length,t.options.columnlookup||10)-1;0<=a;a--)for(var o in i[a])r[o]=!0;n=Object.keys(r).map((function(t){return{columnid:t}}))}else n=[],e&&e.sources&&e.sources.forEach((t=>{t&&t.columns&&Array.isArray(t.columns)&&(n=n.concat(t.columns))}));switch(s){case"VALUE":if(0===i.length)return;const s=n&&n.length>0?n[0].columnid:Object.keys(i[0])[0];return i[0][s];case"ROW":return 0===i.length?void 0:Object.values(i[0]);case"COLUMN":if(0===i.length)return[];let r;r=n&&n.length>0?n[0].columnid:Object.keys(i[0])[0];let o=[];a=0;for(var c=i.length;a<c;a++)o.push(i[a][r]);return e.distinct&&(o=t.utils.distinctArray(o)),o;case"MATRIX":return 0===i.length?void 0:i.map((t=>n.map((e=>t[e.columnid]))));case"INDEX":if(0===i.length)return;const h=n&&n.length>0?n[0].columnid:Object.keys(i[0])[0],l=n&&n.length>1?n[1].columnid:Object.keys(i[0])[1];return i.reduce(((t,e)=>({...t,[e[h]]:e[l]})),{});case"RECORDSET":return new t.Recordset({columns:n,data:i});case"TEXTSTRING":if(0===i.length)return;const u=n&&n.length>0?n[0].columnid:Object.keys(i[0])[0];return i.map((t=>t[u])).join("\n");case"ALASQL_DETAILS":return{data:i,columns:n,length:i.length}}return i}function q(t,e,i){t.onleftfn||(t.onleftfns=e,t.onrightfns=i,t.onleftfn=new Function("p,params,alasql","var y;return "+e),t.onrightfn=new Function("p,params,alasql","var y;return "+i),t.optimization="ix")}function Y(t,e,i){var s="("+e+"=="+i+")";t.srcwherefns=t.srcwherefns?t.srcwherefns+"&&"+s:s}function W(t){var e=[];return function t(i){if(i){if(i instanceof U.Column)return void(i.tableid&&-1===e.indexOf(i.tableid)&&e.push(i.tableid));i instanceof U.Op&&(t(i.left),t(i.right))}}(t),e}function X(t){return t.funcid&&"GROUP_CONCAT"===t.funcid.toUpperCase()?`,${void 0!==t.separator?JSON.stringify(t.separator):"undefined"},${t.order&&t.order.length>0&&t.order[0].direction?JSON.stringify(t.order[0].direction):"undefined"}`:""}U.Select=class{constructor(t){Object.assign(this,t)}toString(){var e;return e="",this.explain&&(e+="EXPLAIN "),e+="SELECT ",this.modifier&&(e+=this.modifier+" "),this.distinct&&(e+="DISTINCT "),this.top&&(e+="TOP "+this.top.value+" ",this.percent&&(e+="PERCENT ")),e+=this.columns.map((function(t){var e;return e=t.toString(),typeof t.as<"u"&&(e+=" AS "+t.as),e})).join(", "),this.from&&(e+=" FROM "+this.from.map((function(t){var e;return e=t.toString(),t.as&&(e+=" AS "+t.as),e})).join(",")),this.joins&&(e+=this.joins.map((function(e){var i;if(i=" ",e.joinmode&&(i+=e.joinmode+" "),e.table)i+="JOIN "+e.table.toString();else if(e.select)i+="JOIN ("+e.select.toString()+")";else{if(!(e instanceof t.yy.Apply))throw new Error("Wrong type in JOIN mode");i+=e.toString()}return e.as&&(i+=" AS "+e.as),e.using&&(i+=" USING "+e.using.toString()),e.on&&(i+=" ON "+e.on.toString()),i})).join("")),this.where&&(e+=" WHERE "+this.where.toString()),this.group&&this.group.length>0&&(e+=" GROUP BY "+this.group.map((function(t){return t.toString()})).join(", ")),this.having&&(e+=" HAVING "+this.having.toString()),this.order&&this.order.length>0&&(e+=" ORDER BY "+this.order.map((function(t){return t.toString()})).join(", ")),this.limit&&(e+=" LIMIT "+this.limit.value),this.offset&&(e+=" OFFSET "+this.offset.value),this.union&&(e+=" UNION "+(this.corresponding?"CORRESPONDING ":"")+this.union.toString()),this.unionall&&(e+=" UNION ALL "+(this.corresponding?"CORRESPONDING ":"")+this.unionall.toString()),this.except&&(e+=" EXCEPT "+(this.corresponding?"CORRESPONDING ":"")+this.except.toString()),this.intersect&&(e+=" INTERSECT "+(this.corresponding?"CORRESPONDING ":"")+this.intersect.toString()),e}toJS(t){return"alasql.utils.flatArray(this.queriesfn["+(this.queriesidx-1)+"](this.params,null,"+t+"))[0]"}compile(e,i){var s=t.databases[e],n=new P;if(n.removeKeys=[],n.aggrKeys=[],n.explain=this.explain,n.explaination=[],n.explid=1,n.modifier=this.modifier,n.database=s,this.compileWhereExists(n),this.compileQueries(n),n.defcols=this.compileDefCols(n,e),n.fromfn=this.compileFrom(n),this.joins&&this.compileJoins(n),n.rownums=[],n.grouprownums=[],n.windowaggrs=[],this.into instanceof U.FuncValue&&"OBJECT"===this.into.funcid.toUpperCase()&&(n.intoObject=!0),this.compileSelectGroup0(n),this.group||n.selectGroup.length>0?n.selectgfns=this.compileSelectGroup1(n):n.selectfns=this.compileSelect1(n,i),this.compileRemoveColumns(n),this.where&&this.compileWhereJoins(n),n.wherefn=this.compileWhere(n),(this.group||n.selectGroup.length>0)&&(n.groupfn=this.compileGroup(n)),this.having&&(n.havingfn=this.compileHaving(n)),this.order&&(n.orderfn=this.compileOrder(n,i),n.orderColumns=this.orderColumns),this.group||n.selectGroup.length>0?n.selectgfn=this.compileSelectGroup2(n):n.selectfn=this.compileSelect2(n,i),n.distinct=this.distinct,this.pivot&&(n.pivotfn=this.compilePivot(n)),this.unpivot&&(n.pivotfn=this.compileUnpivot(n)),this.top?n.limit=this.top.value:this.limit&&(n.limit=this.limit.value,this.offset&&(n.offset=this.offset.value)),n.percent=this.percent,n.corresponding=this.corresponding,this.union?(n.unionfn=this.union.compile(e),!n.orderfn&&this.union.order&&(n.orderfn=this.union.compileOrder(n,i))):this.unionall?(n.unionallfn=this.unionall.compile(e),!n.orderfn&&this.unionall.order&&(n.orderfn=this.unionall.compileOrder(n,i))):this.except?(n.exceptfn=this.except.compile(e),!n.orderfn&&this.except.order&&(n.orderfn=this.except.compileOrder(n,i))):this.intersect&&(n.intersectfn=this.intersect.compile(e),!n.orderfn&&this.intersect.order&&(n.orderfn=this.intersect.compileOrder(n,i))),this.into){if(this.into instanceof U.Table)if(t.options.autocommit&&t.databases[this.into.databaseid||e].engineid)n.intoallfns=`return alasql\n\t\t\t\t\t\t\t\t.engines[${JSON.stringify(t.databases[this.into.databaseid||e].engineid)}]\n\t\t\t\t\t\t\t\t.intoTable(\n\t\t\t\t\t\t\t\t\t${JSON.stringify(this.into.databaseid||e)},\n\t\t\t\t\t\t\t\t\t${JSON.stringify(this.into.tableid)},\n\t\t\t\t\t\t\t\t\tthis.data,\n\t\t\t\t\t\t\t\t\tcolumns,\n\t\t\t\t\t\t\t\t\tcb\n\t\t\t\t\t\t\t\t);`;else{var r=this.into.tableid;n.intofns=`\n\t\t\t\t\t\tvar db = alasql.databases[${JSON.stringify(this.into.databaseid||e)}];\n\t\t\t\t\t\tvar table = db.tables[${JSON.stringify(r)}];\n\t\t\t\t\t\tvar converted = {};\n\t\t\t\t\t\tfor (var key in r) {\n\t\t\t\t\t\t\tvar colDef = table.xcolumns && table.xcolumns[key];\n\t\t\t\t\t\t\tconverted[key] = alasql.utils.typeConverter(r[key], colDef ? colDef.dbtypeid : null);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttable.data.push(converted);\n\t\t\t\t\t`}else if(this.into instanceof U.VarValue)n.intoallfns=`\n\t\t\t\t\talasql.vars[${JSON.stringify(this.into.variable)}]=this.data;\n\t\t\t\t\tres=this.data.length;\n\t\t\t\t\tif(cb) res = cb(res);\n\t\t\t\t\treturn res;\n\t\t\t\t`;else if(this.into instanceof U.FuncValue){var a=this.into.funcid.toUpperCase(),o="return alasql.into["+JSON.stringify(a)+"](";this.into.args&&this.into.args.length>0?(o+=this.into.args[0].toJS()+",",o+=this.into.args.length>1?this.into.args[1].toJS()+",":"undefined,"):o+="undefined, undefined,",n.intoallfns=o+"this.data,columns,cb)","OBJECT"===a&&(n.preserveArrayResult=!0)}else this.into instanceof U.ParamValue&&("string"==typeof this.into.param?n.intoallfns=`\n\t\t\t\t\t\tif(!params[${JSON.stringify(this.into.param)}]) params[${JSON.stringify(this.into.param)}]=[];\n\t\t\t\t\t\tparams[${JSON.stringify(this.into.param)}]=this.data;\n\t\t\t\t\t\tres=this.data.length;\n\t\t\t\t\t\tif(cb) res = cb(res);\n\t\t\t\t\t\treturn res;\n\t\t\t\t\t`:n.intofns=`params[${JSON.stringify(this.into.param)}].push(r)`);n.intofns?n.intofn=new Function("r,i,params,alasql","var y;"+n.intofns):n.intoallfns&&(n.intoallfn=new Function("columns,cb,params,alasql","var y;"+n.intoallfns))}var h=function(e,i,s){n.params=e;var r=function(e,i,s,n,r){e.sourceslen=e.sources.length;let a,o=e.sourceslen;if(e.query=e,e.A=n,e.B=r,e.cb=s,e.oldscope=i,e.subqueryCache={},e.queriesfn&&(e.sourceslen+=e.queriesfn.length,o+=e.queriesfn.length,e.queriesdata=[],e.queriesfn.forEach((function(t,i){t.query.params=e.params,F([],-i-1,e)}))),e.scope=i?T(i):{},e.sources.forEach((function(i,s){i.query=e;var n=i.datafn(e,e.params,F,s,t);typeof n<"u"&&((e.intofn||e.intoallfn)&&Array.isArray(n)&&!e.preserveArrayResult&&(n=n.length),a=n),i.queriesdata=e.queriesdata})),0==e.sources.length||0===o)try{a=B(e)}catch(t){if(s)return s(null,t);throw t}return a}(n,s,(function(t,e){if(e){if(i)return i(null,e);throw e}if(n.rownums.length>0)for(var s=0,r=t.length;s<r;s++)for(var a=0,o=n.rownums.length;a<o;a++)t[s][n.rownums[a]]=s+1;if(n.grouprownums&&n.grouprownums.length>0)for(a=0,o=n.grouprownums.length;a<o;a++){var h;h=(f=n.grouprownums[a]).partitionColumns&&f.partitionColumns.length>0?f.partitionColumns:[Object.keys(t[0]||{})[0]];var l=null,c=0;for(s=0,r=t.length;s<r;s++){var u=h.map((function(e){return t[s][e]})).join("|");0===s||u!==l?c=1:c++,t[s][f.as]=c,l=u}}if(n.windowaggrs&&n.windowaggrs.length>0)for(a=0,o=n.windowaggrs.length;a<o;a++){var f=n.windowaggrs[a],d={};for(s=0,r=t.length;s<r;s++)d[p=f.partitionColumns&&f.partitionColumns.length>0?f.partitionColumns.map((function(e){return t[s][e]})).join("|"):"__all__"]||(d[p]=[]),d[p].push(s);for(var p in d){var b,v=d[p],E=[],m=f.expression&&f.expression.columnid;if("COUNT"!==f.aggregatorid||m&&"*"!==m)for(var g=0;g<v.length;g++){var w=t[v[g]][m];null!=w&&E.push(w)}switch(f.aggregatorid){case"COUNT":b=m&&"*"!==m?E.length:v.length;break;case"SUM":b=E.reduce((function(t,e){return t+e}),0);break;case"AVG":b=E.length>0?E.reduce((function(t,e){return t+e}),0)/E.length:null;break;case"MAX":b=E.length>0?Math.max.apply(null,E):null;break;case"MIN":b=E.length>0?Math.min.apply(null,E):null}for(g=0;g<v.length;g++)t[v[g]][f.as]=b}}var y=V(n,t);return i&&i(y),y}));return r};return h.query=n,h}execute(t,e,i){return this.compile(t)(e,i)}compileWhereExists(t){this.exists&&(t.existsfn=this.exists.map((function(e){var i=e.compile(t.database.databaseid);return i.query.modifier="RECORDSET",i})))}compileQueries(t){if(!this.queries)return;t.queriesfn=this.queries.map((function(e){var i=e.compile(t.database.databaseid);return i.query.modifier="RECORDSET",i.query.isCorrelated=(t=>{if(!t.from)return!1;const e=new Set;t.from.forEach((t=>{t.tableid&&e.add(t.tableid),t.as&&e.add(t.as)}));const i=t=>{if(!t)return!1;if(t instanceof U.Column&&t.tableid&&!e.has(t.tableid))return!0;for(let e of Object.keys(t))if(t[e]&&"object"==typeof t[e]&&i(t[e]))return!0;return!1};return i(t.where)||i(t.columns)})(e),e.queries&&e.queries.length>0&&(i.query.queriesfn=e.queries.map((function(e){var i=e.compile(t.database.databaseid);return i.query.modifier="RECORDSET",i}))),i}))}},U.ExistsValue=class{constructor(t){Object.assign(this,t)}toString(){return"EXISTS("+this.value.toString()+")"}toType(){return"boolean"}toJS(t,e,i){return`!!this.existsfn[${this.existsidx}](params, null, ${t}).data.length`}},t.precompile=function(t,e,i){if(t){if(t.params=i,t.view&&t.select&&t.queries)return void(t.select.queries=t.queries);t.queries&&(t.queriesfn=t.queries.map((function(i){var s=i.compile(e||t.database.databaseid);return s.query.modifier="RECORDSET",s}))),t.exists&&(t.existsfn=t.exists.map((function(i){var s=i.compile(e||t.database.databaseid);return s.query.modifier="RECORDSET",s})))}},U.Select.prototype.compileFrom=function(e){e.sources=[],e.aliases={},this.from&&(this.from.forEach((i=>{const s=i.as||i.tableid;if(i instanceof U.Table)e.aliases[s]={tableid:i.tableid,databaseid:i.databaseid||e.database.databaseid,type:"table"};else if(i instanceof U.Select)e.aliases[s]={type:"subquery"};else if(i instanceof U.Search)e.aliases[s]={type:"subsearch"};else if(i instanceof U.ParamValue)e.aliases[s]={type:"paramvalue"};else if(i instanceof U.FuncValue)e.aliases[s]={type:"funcvalue"};else if(i instanceof U.VarValue)e.aliases[s]={type:"varvalue"};else if(i instanceof U.FromData)e.aliases[s]={type:"fromdata"};else if(i instanceof U.Json)e.aliases[s]={type:"json"};else{if(!i.inserted)throw new Error("Wrong table at FROM");e.aliases[s]={type:"inserted"}}const n={alias:s,databaseid:i.databaseid||e.database.databaseid,tableid:i.tableid,joinmode:"INNER",onmiddlefn:a,srcwherefns:"",srcwherefn:a};if(i instanceof U.Table)n.columns=t.databases[n.databaseid].tables[n.tableid].columns,n.datafn=t.options.autocommit&&t.databases[n.databaseid].engineid&&!t.databases[n.databaseid].tables[n.tableid].view?(t,e,i,s,r)=>r.engines[r.databases[n.databaseid].engineid].fromTable(n.databaseid,n.tableid,i,s,t):t.databases[n.databaseid].tables[n.tableid].view?(t,e,i,s,r)=>{let a=r.databases[n.databaseid].tables[n.tableid];!a.select&&a.viewSelect&&(a.select=a.viewSelect.compile(a.viewDatabaseid));let o=a.select(e);return i&&(o=i(o,s,t)),o}:(t,e,i,s,r)=>{let a=r.databases[n.databaseid].tables[n.tableid].data;return i&&(a=i(a,s,t)),a};else if(i instanceof U.Select)n.subquery=i.compile(e.database.databaseid),typeof n.subquery.query.modifier>"u"&&(n.subquery.query.modifier="RECORDSET"),n.columns=n.subquery.query.columns,n.datafn=(t,e,i,s)=>{let r;return n.subquery(t.params,(e=>{r=e.data,i&&(r=i(r,s,t))})),r};else if(i instanceof U.Search)n.subsearch=i,n.columns=[],n.datafn=(t,e,i,s)=>{let r;return n.subsearch.execute(t.database.databaseid,t.params,(e=>{r=e,i&&(r=i(r,s,t))})),r};else if(i instanceof U.ParamValue){let t=`var res = alasql.prepareFromData(params['${i.param}']`;i.array&&(t+=",true"),t+=");if(cb)res=cb(res,idx,query);return res",n.datafn=new Function("query,params,cb,idx,alasql",t)}else if(i.inserted){let t="var res = alasql.prepareFromData(alasql.inserted";i.array&&(t+=",true"),t+=");if(cb)res=cb(res,idx,query);return res",n.datafn=new Function("query,params,cb,idx,alasql",t)}else if(i instanceof U.Json){let t="var res = alasql.prepareFromData("+i.toJS();i.array&&(t+=",true"),t+=");if(cb)res=cb(res,idx,query);return res",n.datafn=new Function("query,params,cb,idx,alasql",t)}else if(i instanceof U.VarValue){let t=`var res = alasql.prepareFromData(alasql.vars['${i.variable}']`;i.array&&(t+=",true"),t+=");if(cb)res=cb(res,idx,query);return res",n.datafn=new Function("query,params,cb,idx,alasql",t)}else if(i instanceof U.FuncValue){let t="var res=alasql.from["+JSON.stringify(i.funcid.toUpperCase())+"](";i.args&&i.args.length>0?(t+=i.args[0]?i.args[0].toJS("query.oldscope")+",":"null,",t+=i.args[1]?i.args[1].toJS("query.oldscope")+",":"null,"):t+="null,null,",t+="cb,idx,query); return res",n.datafn=new Function("query,params,cb,idx,alasql",t)}else{if(!(i instanceof U.FromData))throw new Error("Wrong table at FROM");n.datafn=(t,e,s,n)=>{let r=i.data;return s&&(r=s(r,n,t)),r}}e.sources.push(n)})),e.defaultTableid=e.sources[0].alias)},t.prepareFromData=function(t,e){let i=t;if("string"==typeof t)i=t.split(/\r?\n/),e&&(i=i.map((t=>[t])));else if(e)i=t.map((t=>[t]));else if("object"==typeof t&&!Array.isArray(t))if(typeof Mongo<"u"&&typeof Mongo.Collection<"u"&&t instanceof Mongo.Collection)i=t.find().fetch();else{i=[];for(const e in t)t.hasOwnProperty(e)&&i.push([e,t[e]])}return i},U.Select.prototype.compileJoins=function(e){this.joins.forEach((i=>{let s,n,r;if("CROSS"===i.joinmode&&(i.joinmode="INNER"),i instanceof U.Apply)return r={alias:i.as,applymode:i.applymode,onmiddlefn:a,srcwherefns:"",srcwherefn:a,columns:[]},r.applyselect=i.select.compile(e.database.databaseid),r.columns=r.applyselect.query.columns,r.datafn=function(t,e,i,s){let n;return i&&(n=i(n,s,t)),n},void e.sources.push(r);if(i.table){if(s=i.table,r={alias:i.as||s.tableid,databaseid:s.databaseid||e.database.databaseid,tableid:s.tableid,joinmode:i.joinmode,onmiddlefn:a,srcwherefns:"",srcwherefn:a,columns:[]},!t.databases[r.databaseid].tables[r.tableid])throw new Error("Table '"+r.tableid+"' is not exists in database '"+r.databaseid+"'");r.columns=t.databases[r.databaseid].tables[r.tableid].columns,r.datafn=t.options.autocommit&&t.databases[r.databaseid].engineid?function(t,e,i,s,n){return n.engines[n.databases[r.databaseid].engineid].fromTable(r.databaseid,r.tableid,i,s,t)}:t.databases[r.databaseid].tables[r.tableid].view?function(t,e,i,s,n){let a=n.databases[r.databaseid].tables[r.tableid].select(e);return i&&(a=i(a,s,t)),a}:function(t,e,i,s,n){let a=n.databases[r.databaseid].tables[r.tableid].data;return i&&(a=i(a,s,t)),a},e.aliases[r.alias]={tableid:s.tableid,databaseid:s.databaseid||e.database.databaseid}}else if(i.select)s=i.select,r={alias:i.as,joinmode:i.joinmode,onmiddlefn:a,srcwherefns:"",srcwherefn:a,columns:[]},r.subquery=s.compile(e.database.databaseid),typeof r.subquery.query.modifier>"u"&&(r.subquery.query.modifier="RECORDSET"),r.columns=r.subquery.query.columns,r.datafn=function(t,e,i,s){r.data=r.subquery(t.params,null,i,s).data;let n=r.data;return i&&(n=i(n,s,t)),n},e.aliases[r.alias]={type:"subquery"};else if(i.param)r={alias:i.as,joinmode:i.joinmode,onmiddlefn:a,srcwherefns:"",srcwherefn:a},n="let res=alasql.prepareFromData(params['"+i.param.param+"']",i.array&&(n+=",true"),n+="); if(cb) res=cb(res, idx, query); return res",r.datafn=new Function("query,params,cb,idx, alasql",n),e.aliases[r.alias]={type:"paramvalue"};else if(i.variable)r={alias:i.as,joinmode:i.joinmode,onmiddlefn:a,srcwherefns:"",srcwherefn:a},n="let res=alasql.prepareFromData(alasql.vars['"+i.variable+"']",i.array&&(n+=", true"),n+="); if(cb)res=cb(res, idx, query);return res",r.datafn=new Function("query,params,cb,idx, alasql",n),e.aliases[r.alias]={type:"varvalue"};else if(i.func){r={alias:i.as,joinmode:i.joinmode,onmiddlefn:a,srcwherefns:"",srcwherefn:a};let t="let res=alasql.from["+JSON.stringify(i.func.funcid.toUpperCase())+"](";const s=i.func.args;s&&s.length>0?(t+=s[0]?s[0].toJS("query.oldscope")+", ":"null, ",t+=s[1]?s[1].toJS("query.oldscope")+", ":"null, "):t+="null, null, ",t+="cb, idx, query); return res",r.datafn=new Function("query, params, cb, idx, alasql",t),e.aliases[r.alias]={type:"funcvalue"}}const o=r.alias;if(i.natural){if(i.using||i.on)throw new Error("NATURAL JOIN cannot have USING or ON clauses");if(e.sources.length>0){const s=e.sources[e.sources.length-1],n=t.databases[s.databaseid].tables[s.tableid],a=t.databases[r.databaseid].tables[r.tableid];if(!n||!a)throw new Error("In this version of Alasql NATURAL JOIN works for tables with predefined columns only");{const t=n.columns.map((t=>t.columnid)),e=a.columns.map((t=>t.columnid));i.using=m(t,e).map((t=>({columnid:t})))}}}if(i.using){const t=e.sources[e.sources.length-1];r.onleftfns=i.using.map((e=>"p['"+(t.alias||t.tableid)+"']['"+e.columnid+"']")).join('+"`"+'),r.onleftfn=new Function("p,params,alasql","let y;return "+r.onleftfns),r.onrightfns=i.using.map((t=>"p['"+(r.alias||r.tableid)+"']['"+t.columnid+"']")).join('+"`"+'),r.onrightfn=new Function("p,params,alasql","let y;return "+r.onrightfns),r.optimization="ix"}else if(i.on)if(i.on instanceof U.Op&&"="===i.on.op&&!i.on.allsome){r.optimization="ix";let t="",s="",n="",a=!1;const h=i.on.left.toJS("p",e.defaultTableid,e.defcols),l=i.on.right.toJS("p",e.defaultTableid,e.defcols);h.indexOf("p['"+o+"']")>-1&&!(l.indexOf("p['"+o+"']")>-1)?(h.match(/p\['.*?'\]/g)||[]).every((t=>t==="p['"+o+"']"))?s=h:a=!0:!(h.indexOf("p['"+o+"']")>-1)&&l.indexOf("p['"+o+"']")>-1&&(l.match(/p\['.*?'\]/g)||[]).every((t=>t==="p['"+o+"']"))?t=h:a=!0,l.indexOf("p['"+o+"']")>-1&&!(h.indexOf("p['"+o+"']")>-1)?(l.match(/p\['.*?'\]/g)||[]).every((t=>t==="p['"+o+"']"))?s=l:a=!0:!(l.indexOf("p['"+o+"']")>-1)&&h.indexOf("p['"+o+"']")>-1&&(h.match(/p\['.*?'\]/g)||[]).every((t=>t==="p['"+o+"']"))?t=l:a=!0,a&&(s="",t="",n=i.on.toJS("p",e.defaultTableid,e.defcols),r.optimization="no"),r.onleftfns=t,r.onrightfns=s,r.onmiddlefns=n||"true",r.onleftfn=new Function("p,params,alasql","let y;return "+r.onleftfns),r.onrightfn=new Function("p,params,alasql","let y;return "+r.onrightfns),r.onmiddlefn=new Function("p,params,alasql","let y;return "+r.onmiddlefns)}else r.optimization="no",r.onmiddlefns=i.on.toJS("p",e.defaultTableid,e.defcols),r.onmiddlefn=new Function("p,params,alasql","let y;return "+i.on.toJS("p",e.defaultTableid,e.defcols));e.sources.push(r)}))},U.Select.prototype.compileWhere=function(t){if(this.where){if("function"==typeof this.where)return this.where;var e=this.where.toJS("p",t.defaultTableid,t.defcols);return t.wherefns=e,new Function("p,params,alasql","var y;return "+e)}return function(){return!0}},U.Select.prototype.compileWhereJoins=function(t){if(this.where&&!(t.sources.length<=1)){var e=t.sources.some((function(t,e){return e>0&&t.onleftfn}));if(!e){var i=function(t){var e=[];return function t(i){if(i){if(i.expression)return void t(i.expression);i instanceof U.Op&&("AND"===i.op?(t(i.left),t(i.right)):"="===i.op&&e.push(i))}}(t),e}(this.where),s={};t.sources.forEach((function(t,e){s[t.alias]=e})),i.forEach((function(e){if("="===e.op&&!e.allsome){var i=W(e.left),n=W(e.right),r=e.left.toJS("p",t.defaultTableid,t.defcols),a=e.right.toJS("p",t.defaultTableid,t.defcols);if(1===i.length&&1===n.length){var o=i[0],h=n[0];if(void 0===s[o]||void 0===s[h])return;var l=s[o],c=s[h];c>l?q(t.sources[c],r,a):l>c&&q(t.sources[l],a,r)}else 1===i.length&&0===n.length?void 0!==s[i[0]]&&Y(t.sources[s[i[0]]],r,a):0===i.length&&1===n.length&&void 0!==s[n[0]]&&Y(t.sources[s[n[0]]],r,a)}})),t.sources.forEach((function(t){t.srcwherefns&&(t.srcwherefn=new Function("p,params,alasql","var y;return "+t.srcwherefns))}))}}},U.Select.prototype.compileGroup=function(t){if(t.sources.length>0)var e=t.sources[0].alias;else e="";var i=t.defcols,s=[[]];this.group&&(s=et(this.group,t));var n=[];s.forEach((function(t){n=v(n,t)})),t.allgroups=n,t.ingroup=[];var r="";return s.forEach((function(s){r+="var g=this.xgroups[";var a=s.map((function(e){var i=e.split("\t")[0],s=e.split("\t")[1];return""===i?"1":(t.ingroup.push(i),s)}));0===a.length&&(a=["''"]),r+=a.join('+"`"+'),r+="];if(!g) {this.groups.push((g=this.xgroups[",r+=a.join('+"`"+'),r+="] = {",r+=s.map((function(t){var e=t.split("\t")[0],i=t.split("\t")[1];return""===e?"":"'"+e+"':"+i+","})).join("");var o=E(n,s);r+=o.map((function(t){return"'"+t.split("\t")[0]+"':null,"})).join("");var h="",l="";typeof t.groupStar<"u"&&(l+="for(var f in p['"+t.groupStar+"']) {g[f]=p['"+t.groupStar+"'][f];};"),r+=t.selectGroup.map((function(s){var n=s.expression.toJS("p",e,i),r=s.nick;let a=t=>t.args[0].toJS("p",e,i);if(s instanceof U.AggrValue){if(s.distinct&&(h+=",g['$$_VALUES_"+r+"']={},g['$$_VALUES_"+r+"']["+n+"]=true"),"SUM"===s.aggregatorid)return"funcid"in s.expression?(a(s.expression),`'${r}':(__alasql_tmp = ${n}, (__alasql_tmp instanceof Date) ? undefined : ((__alasql_tmp || typeof __alasql_tmp == 'number') ? __alasql_tmp : undefined)),`):`'${r}':(__alasql_tmp = ${n}, (__alasql_tmp instanceof Date) ? undefined : ((__alasql_tmp || typeof __alasql_tmp == 'number') ? __alasql_tmp : undefined)),`;if("TOTAL"===s.aggregatorid){if("funcid"in s.expression){let t=a(s.expression);return`'${r}':(${t}) || typeof ${t} == 'number' ?\n\t\t\t\t\t\t\t${t} : ${t} == 'string' && typeof Number(${t}) == 'number' ? Number(${t}) :\n\t\t\t\t\t\t\ttypeof ${t} == 'boolean' ? Number(${t}) : 0,`}return`'${r}':(${n})|| typeof ${n} == 'number' ?\n\t\t\t\t\t\t\t${n} : ${n} == 'string' && typeof Number(${n}) == 'number' ? Number(${n}) :\n\t\t\t\t\t\t\ttypeof ${n} === 'boolean' ? Number(${n}) : 0,`}if("FIRST"===s.aggregatorid||"LAST"===s.aggregatorid)return"'"+r+"':"+n+",";if("MIN"===s.aggregatorid)return"funcid"in s.expression?(a(s.expression),`'${r}': (__alasql_tmp = ${n}, __alasql_tmp !== null && (typeof __alasql_tmp == 'number' || typeof __alasql_tmp == 'bigint' || (typeof __alasql_tmp == 'object' && (typeof Number(__alasql_tmp) == 'number' || __alasql_tmp instanceof Date))) ? __alasql_tmp : undefined),`):`'${r}': (__alasql_tmp = ${n}, __alasql_tmp !== null && (typeof __alasql_tmp == 'number' || typeof __alasql_tmp == 'bigint' || (typeof __alasql_tmp == 'object' && (typeof Number(__alasql_tmp) == 'number' || __alasql_tmp instanceof Date))) ? __alasql_tmp : undefined),`;if("MAX"===s.aggregatorid)return"funcid"in s.expression?(a(s.expression),`'${r}': (__alasql_tmp = ${n}, __alasql_tmp !== null && (typeof __alasql_tmp == 'number' || typeof __alasql_tmp == 'bigint' || (typeof __alasql_tmp == 'object' && (typeof Number(__alasql_tmp) == 'number' || __alasql_tmp instanceof Date))) ? __alasql_tmp : undefined),`):`'${r}' : (${n} !== null && (typeof ${n} == 'number' || typeof ${n} == 'bigint') ? ${n} : ${n} !== null && typeof ${n} == 'object' ?\n\t\t\t\t\t\t\ttypeof Number(${n}) == 'number' ? ${n} : undefined : undefined),`;if("ARRAY"===s.aggregatorid)return`'${r}':[${n}],`;if("COUNT"===s.aggregatorid)return"*"===s.expression.columnid?`'${r}':1,`:`'${r}':(typeof ${n} == "undefined" || ${n} === null) ? 0 : 1,`;if("AVG"===s.aggregatorid)return t.removeKeys.push(`_SUM_${r}`),t.removeKeys.push(`_COUNT_${r}`),`'${r}':(function() { var t = ${n}; return (t instanceof Date) ? undefined : t; })(),'_SUM_${r}':(function() { var t = ${n}; return (t instanceof Date) ? undefined : (t || 0); })(),'_COUNT_${r}':(typeof ${n} == "undefined" || ${n} === null) ? 0 : 1,`;if("AGGR"===s.aggregatorid)return h+=`,g['${r}']=${s.expression.toJS("g",-1)}`,"";if("REDUCE"===s.aggregatorid){t.aggrKeys.push(s);const a=X(s);if(s.args&&s.args.length>1){let t=s.args.map((t=>t.toJS("p",e,i))).join(",");return`'${r}':alasql.aggr['${s.funcid}'](${t},undefined,1${a}),`}return`'${r}':alasql.aggr['${s.funcid}'](${n},undefined,1${a}),`}return""}return""})).join(""),r+="}"+h+",g));"+l+"} else {",r+=t.selectGroup.map((function(t){var s=t.nick,n=t.expression.toJS("p",e,i);let r=t=>t.args[0].toJS("p",e,i);if(t instanceof U.AggrValue){var a="",o="";if(t.distinct&&(a=`if(typeof ${n}!="undefined" && (!g['$$_VALUES_${s}'][${n}])) {`,o=`g['$$_VALUES_${s}'][${n}]=true;}`),"SUM"===t.aggregatorid){if("funcid"in t.expression){let e=r(t.expression);return a+`\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tconst __g_colas = g['${s}'];\n\t\t\t\t\t\t\t\t\tconst __typeof_colexp1 = typeof ${e};\n\t\t\t\t\t\t\t\t\tconst __colexp1 = ${e};\n\n\t\t\t\t\t\t\t\t\tif (__g_colas == null && ${e} == null) {\n\t\t\t\t\t\t\t\t\t\tg['${s}'] = undefined;\n\t\t\t\t\t\t\t\t\t} else if (typeof __g_colas === 'bigint' || typeof __colexp1 === 'bigint') {\n \t\t\t\t\t \tg['${s}'] = BigInt(__g_colas) + BigInt(__colexp);\n \t\t\t\t\t\t} else if ((typeof __g_colas !== 'object' && typeof __g_colas !== 'number' && __typeof_colexp1 !== 'object' && __typeof_colexp1 !== 'number') ||\n\t\t\t\t\t\t\t\t\t\t (__g_colas == null || (typeof __g_colas !== 'number' && typeof __g_colas !== 'object')) && (${e} == null || (__typeof_colexp1 !== 'number' && __typeof_colexp1 !== 'object'))) {\n\t\t\t\t\t\t\t\t\t\tg['${s}'] = undefined;\n\t\t\t\t\t\t\t\t\t} else if ((typeof __g_colas !== 'object' && typeof __g_colas !== 'number' && __typeof_colexp1 == 'number') ||\n\t\t\t\t\t\t\t\t\t\t\t (__g_colas == null && __typeof_colexp1 == 'number')) {\n\t\t\t\t\t\t\t\t\t\tg['${s}'] = ${n};\n\t\t\t\t\t\t\t\t\t} else if (typeof __g_colas == 'number' && ${e} == null) {\n\t\t\t\t\t\t\t\t\t\tg['${s}'] = __g_colas;\n\t\t\t\t\t\t\t\t\t} else if (__g_colas instanceof Date || __colexp1 instanceof Date) {\n\t\t\t\t\t\t\t\t\t\t// Date objects cause string concatenation with +=, return undefined instead\n\t\t\t\t\t\t\t\t\t\tg['${s}'] = undefined;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tg['${s}'] += ${n} || 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t`+o}return a+`\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tconst __g_colas = g['${s}'];\n\t\t\t\t\t\t\t\tconst __typeof_colexp = typeof ${n};\n\t\t\t\t\t\t\t\tconst __colexp = ${n};\n\n\t\t\t\t\t\t\t\tif (__g_colas == null && ${n} == null) {\n\t\t\t\t\t\t\t\t\tg['${s}'] = undefined;\n\t\t\t\t\t\t\t\t} else if (typeof __g_colas === 'bigint' || typeof __colexp === 'bigint') {\n \t\t\t\t\t g['${s}'] = BigInt(__g_colas) + BigInt(__colexp);\n \t\t\t\t\t} else if ((typeof __g_colas !== 'object' && typeof __g_colas !== 'number' && __typeof_colexp !== 'object' && __typeof_colexp !== 'number') ||\n\t\t\t\t\t\t\t\t\t\t (__g_colas == null || (typeof __g_colas !== 'number' && typeof __g_colas !== 'object')) && (${n} == null || (__typeof_colexp !== 'number' && __typeof_colexp !== 'object'))) {\n\t\t\t\t\t\t\t\tg['${s}'] = undefined;\n\t\t\t\t\t\t\t} else if (typeof __g_colas !== 'object' && typeof __g_colas !== 'number' && __typeof_colexp == 'number') {\n\t\t\t\t\t\t\t\tg['${s}'] = ${n};\n\t\t\t\t\t\t\t} else if (typeof __g_colas == 'number' && ${n} == null) {\n\t\t\t\t\t\t\t\tg['${s}'] = __g_colas;\n\t\t\t\t\t\t\t} else if (__g_colas == null && __typeof_colexp == 'number') {\n\t\t\t\t\t\t\t\tg['${s}'] = ${n};\n\t\t\t\t\t\t\t} else if (__g_colas instanceof Date || __colexp instanceof Date) {\n\t\t\t\t\t\t\t\t// Date objects cause string concatenation with +=, return undefined instead\n\t\t\t\t\t\t\t\tg['${s}'] = undefined;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tg['${s}'] += ${n} || 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t`+o}if("TOTAL"===t.aggregatorid)return"funcid"in t.expression?a+`{\n\t\t\t\t\t\t\t\t\tconst __g_colas = g['${s}'];\n\t\t\t\t\t\t\t\t\tconst __colexp1 = ${r(t.expression)};\n\t\t\t\t\t\t\t\t\tconst __typeof_g_colas = typeof __g_colas;\n\t\t\t\t\t\t\t\t\tconst __typeof_colexp1 = typeof __colexp1;\n\n\t\t\t\t\t\t\t\t\tif (__typeof_g_colas == 'string' && !isNaN(__g_colas) && typeof Number(__g_colas) == 'number' &&\n\t\t\t\t\t\t\t\t\t\t__typeof_colexp1 == 'string' && !isNaN(__colexp1) && typeof Number(__colexp1) == 'number') {\n\t\t\t\t\t\t\t\t\t\tg['${s}'] = Number(__g_colas) + Number(__colexp1);\n\t\t\t\t\t\t\t\t\t} else if (__typeof_g_colas === 'bigint' || __typeof_colexp1 === 'bigint') {\n \t\t\t\t\t\t\t \tg['${s}'] = BigInt(__g_colas || 0) + BigInt(__colexp1 || 0);\n \t\t\t\t\t\t\t\t} else if (__typeof_g_colas == 'string' && __typeof_colexp1 == 'string') {\n\t\t\t\t\t\t\t\t\t\tg['${s}'] = 0;\n\t\t\t\t\t\t\t\t\t} else if (__typeof_g_colas == 'string' && __typeof_colexp1 == 'number') {\n\t\t\t\t\t\t\t\t\t\tg['${s}'] = __colexp1;\n\t\t\t\t\t\t\t\t\t} else if (__typeof_colexp1 == 'string' && __typeof_g_colas == 'number') {\n\t\t\t\t\t\t\t\t\t\tg['${s}'] = __g_colas;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tg['${s}'] += __colexp1 || 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}`+o:a+`{\n\t\t\t\t\t\t\t\tconst __g_colas = g['${s}'];\n\t\t\t\t\t\t\t\tconst __colexp = ${n};\n\t\t\t\t\t\t\t\tconst __typeof_g_colas = typeof __g_colas;\n\t\t\t\t\t\t\t\tconst __typeof_colexp = typeof __colexp;\n\n\t\t\t\t\t\t\t\tif (__typeof_g_colas === 'string' && !isNaN(__g_colas) && typeof Number(__g_colas) === 'number' &&\n\t\t\t\t\t\t\t\t\t__typeof_colexp === 'string' && !isNaN(__colexp) && typeof Number(__colexp) === 'number') {\n\t\t\t\t\t\t\t\t\tg['${s}'] = Number(__g_colas) + Number(__colexp);\n\t\t\t\t\t\t\t\t} else if (__typeof_g_colas === 'bigint' || __typeof_colexp === 'bigint') {\n \t\t\t\t\t\t\t g['${s}'] = BigInt(__g_colas || 0) + BigInt(__colexp || 0);\n \t\t\t\t\t\t\t} else if (__typeof_g_colas === 'string' && __typeof_colexp === 'string') {\n\t\t\t\t\t\t\t\t\tg['${s}'] = 0;\n\t\t\t\t\t\t\t\t} else if (__typeof_g_colas === 'string' && __typeof_colexp === 'number') {\n\t\t\t\t\t\t\t\t\tg['${s}'] = __colexp;\n\t\t\t\t\t\t\t\t} else if (__typeof_colexp === 'string' && __typeof_g_colas === 'number') {\n\t\t\t\t\t\t\t\t\tg['${s}'] = __g_colas;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tg['${s}'] += __colexp || 0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t`+o;if("COUNT"===t.aggregatorid)return"*"===t.expression.columnid?`${a}\n\t\t\t\t\t\t\t\tg['${s}']++;\n\t\t\t\t\t\t\t\t${o}`:`${a}\n\t\t\t\t\t\t\tif(typeof ${n}!="undefined" && ${n} !== null) g['${s}']++;\n\t\t\t\t\t\t\t${o}`;if("ARRAY"===t.aggregatorid)return a+"g['"+s+"'].push("+n+");"+o;if("MIN"===t.aggregatorid){if("funcid"in t.expression){let e=r(t.expression);return a+`if ((g['${s}'] == null && ${e} !== null) ? y = ${n} : \n\t\t\t\t\t\t\t\t\t(g['${s}'] !== null && ${e} == null) ? y = g['${s}'] : \n\t\t\t\t\t\t\t\t\t((y = ${n}) < g['${s}'])) {\n\t\t\t\t\t\t\t\t\tif (typeof y == 'number' || typeof y == 'bigint') {\n\t\t\t\t\t\t\t\t\t g['${s}'] = y;\n\t\t\t\t\t\t\t\t\t} else if (typeof y == 'object' && y instanceof Date) {\n\t\t\t\t\t\t\t\t\t g['${s}'] = y;\n\t\t\t\t\t\t\t\t\t} else if (typeof y == 'object' && typeof Number(y) == 'number') {\n\t\t\t\t\t\t\t\t\t g['${s}'] = Number(y);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (g['${s}'] !== null && typeof g['${s}'] == 'object' && y instanceof Date) {\n\t\t\t\t\t\t\t\t\tg['${s}'] = g['${s}'];\n\t\t\t\t\t\t\t\t} else if (g['${s}'] !== null && typeof g['${s}'] == 'object') {\n\t\t\t\t\t\t\t\t\tg['${s}'] = Number(g['${s}']);\n\t\t\t\t\t\t\t\t}`+o}return a+`if((g['${s}'] == null && ${n}!== null) ? y = ${n} : \n\t\t\t\t\t\t\t\t(g['${s}']!== null && ${n} == null) ? y = g['${s}'] : \n\t\t\t\t\t\t\t\t((y=${n}) < g['${s}'])) { \n\t\t\t\t\t\t\t\tif(typeof y == 'number' || typeof y == 'bigint') {\n\t\t\t\t\t\t\t\t\tg['${s}'] = y;\n\t\t\t\t\t\t\t\t} else if(typeof y == 'object' && y instanceof Date) {\n\t\t\t\t\t\t\t\t\tg['${s}'] = y;\n\t\t\t\t\t\t\t\t} else if(typeof y == 'object' && typeof Number(y) == 'number') {\n\t\t\t\t\t\t\t\t\tg['${s}'] = Number(y);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if(g['${s}']!== null && typeof g['${s}'] == 'object' && y instanceof Date) {\n\t\t\t\t\t\t\t\tg['${s}'] = g['${s}'];\n\t\t\t\t\t\t\t} else if(g['${s}']!== null && typeof g['${s}'] == 'object') {\n\t\t\t\t\t\t\t\tg['${s}'] = Number(g['${s}']);\n\t\t\t\t\t\t\t}`+o}if("MAX"===t.aggregatorid){if("funcid"in t.expression){let e=r(t.expression);return a+`if ((g['${s}'] == null && ${e} !== null) ? y = ${n} : \n\t\t\t\t\t\t\t\t\t(g['${s}'] !== null && ${e} == null) ? y = g['${s}'] : \n\t\t\t\t\t\t\t\t\t((y = ${n}) > g['${s}'])) {\n\t\t\t\t\t\t\t\t\tif (typeof y == 'number' || typeof y == 'bigint') {\n\t\t\t\t\t\t\t\t\t g['${s}'] = y;\n\t\t\t\t\t\t\t\t\t} else if (typeof y == 'object' && y instanceof Date) {\n\t\t\t\t\t\t\t\t\t g['${s}'] = y;\n\t\t\t\t\t\t\t\t\t} else if (typeof y == 'object' && typeof Number(y) == 'number') {\n\t\t\t\t\t\t\t\t\t g['${s}'] = Number(y);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (g['${s}'] !== null && typeof g['${s}'] == 'object' && y instanceof Date) {\n\t\t\t\t\t\t\t\t\tg['${s}'] = g['${s}'];\n\t\t\t\t\t\t\t\t} else if (g['${s}'] !== null && typeof g['${s}'] == 'object') {\n\t\t\t\t\t\t\t\t\tg['${s}'] = Number(g['${s}']);\n\t\t\t\t\t\t\t\t}`+o}return a+`if ((g['${s}'] == null && ${n} !== null) ? y = ${n} : \n\t\t\t\t\t\t\t\t(g['${s}'] !== null && ${n} == null) ? y = g['${s}'] : \n\t\t\t\t\t\t\t\t((y = ${n}) > g['${s}'])) {\n\t\t\t\t\t\t\t\tif (typeof y == 'number' || typeof y == 'bigint') {\n\t\t\t\t\t\t\t\t g['${s}'] = y;\n\t\t\t\t\t\t\t\t} else if (typeof y == 'object' && y instanceof Date) {\n\t\t\t\t\t\t\t\t g['${s}'] = y;\n\t\t\t\t\t\t\t\t} else if (typeof y == 'object' && typeof Number(y) == 'number') {\n\t\t\t\t\t\t\t\t g['${s}'] = Number(y);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if (g['${s}'] !== null && typeof g['${s}'] == 'object' && y instanceof Date) {\n\t\t\t\t\t\t\t\tg['${s}'] = g['${s}'];\n\t\t\t\t\t\t\t} else if (g['${s}'] !== null && typeof g['${s}'] == 'object') {\n\t\t\t\t\t\t\t\tg['${s}'] = Number(g['${s}']);\n\t\t\t\t\t\t\t}`+o}if("FIRST"===t.aggregatorid)return"";if("LAST"===t.aggregatorid)return`${a}g['${s}']=${n};${o}`;if("AVG"===t.aggregatorid)return`${a}\n\t\t\t\t\t\t\ty= (${n});\n\t\t\t\t\t\t\tg['_COUNT_${s}'] += (typeof y == "undefined" || y === null) ? 0 : 1;\n\t\t\t\t\t\t\tif (y instanceof Date || (g['_SUM_${s}'] && g['_SUM_${s}'] instanceof Date)) {\n\t\t\t\t\t\t\t// AVG on Date objects doesn't make semantic sense - return undefined\n\t\t\t\t\t\t\tg['_SUM_${s}'] = undefined;\n\t\t\t\t\t\t\tg['${s}'] = undefined;\n\t\t\t\t\t\t\t} else if (typeof g['_SUM_${s}'] === 'bigint' || typeof y === 'bigint') {\n\t\t\t\t\t\t\t\tg['_SUM_${s}'] = BigInt(g['_SUM_${s}']);\n\t\t\t\t\t\t\t\tg['_SUM_${s}'] += BigInt(y || 0);\n \t\t\t\t\t\t\tg['${s}'] = BigInt(g['_SUM_${s}']) / BigInt(g['_COUNT_${s}']); \n \t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tg['_SUM_${s}'] += (y || 0);\n \t\t\t\t\t\t\tg['${s}'] = g['_SUM_${s}'] / g['_COUNT_${s}']; \n \t\t\t\t\t\t}\n\t\t\t\t\t\t\t${o}`;if("AGGR"===t.aggregatorid)return`${a}\n\t\t\t\t\t\t\tg['${s}']=${t.expression.toJS("g",-1)};\n\t\t\t\t\t\t\t${o}`;if("REDUCE"===t.aggregatorid){const r=X(t);if(t.args&&t.args.length>1){let n=t.args.map((t=>t.toJS("p",e,i))).join(",");return`${a}\n\t\t\t\t\t\t\t\tg['${s}'] = alasql.aggr.${t.funcid}(${n},g['${s}'],2${r});\n\t\t\t\t\t\t\t\t${o}`}return`${a}\n\t\t\t\t\t\t\t\tg['${s}'] = alasql.aggr.${t.funcid}(${n},g['${s}'],2${r});\n\t\t\t\t\t\t\t\t${o}`}return""}return""})).join(""),r+="}"})),new Function("p,params,alasql","var y;"+r)};var z=/^(SUM|MAX|MIN|FIRST|LAST|AVG|ARRAY|REDUCE|TOTAL)$/;function J(e,i,s){var n="",r=[],a={};return i.forEach((function(i){if(e.ixsources={},e.sources.forEach((function(t){e.ixsources[t.alias]=t})),e.ixsources[i])var h=e.ixsources[i].columns;s&&"json"==t.options.joinstar&&(n+="r['"+i+"']={};"),h&&h.length>0?h.forEach((function(h){const l=o(h.columnid);if(s&&"underscore"==t.options.joinstar)r.push("'"+i+"_"+l+"':p['"+i+"']['"+l+"']");else if(s&&"json"==t.options.joinstar)n+="r['"+i+"']['"+l+"']=p['"+i+"']['"+l+"'];";else{var c="p['"+i+"']['"+l+"']";if(a[h.columnid]){var u=c+" !== undefined ? "+c+" : "+a[h.columnid].value;r[a[h.columnid].id]=a[h.columnid].key+u,a[h.columnid].value=u}else{var f="'"+l+"':";r.push(f+c),a[h.columnid]={id:r.length-1,value:c,key:f}}}e.selectColumns[l]=!0;var d={columnid:h.columnid,dbtypeid:h.dbtypeid,dbsize:h.dbsize,dbprecision:h.dbprecision,dbenum:h.dbenum};e.columns.push(d),e.xcolumns[d.columnid]=d})):(n+=s&&"json"==t.options.joinstar?"r['"+o(i)+"']=p['"+o(i)+"'];":s&&"underscore"==t.options.joinstar?'var w=p["'+o(i)+'"];for(var k in w){r["'+o(i)+'_"+k]=w[k]};':'var w=p["'+o(i)+'"];for(var k in w){r[k]=w[k]};',e.dirtyColumns=!0)})),{s:r.join(","),sp:n}}U.Select.prototype.compileSelect1=function(e,i){var s=this;e.columns=[],e.xcolumns={},e.selectColumns={},e.dirtyColumns=!1;var r="var r={",a="",h=[];return this.columns.forEach((function(r){if(r instanceof U.Column)if("*"===r.columnid)if(r.func)a+="r=params['"+r.param+"'](p['"+e.sources[0].alias+"'],p,params,alasql);";else if(r.tableid)(l=J(e,[r.tableid],!1)).s&&(h=h.concat(l.s)),a+=l.sp;else{var l;(l=J(e,Object.keys(e.aliases),!0)).s&&(h=h.concat(l.s)),a+=l.sp}else{var c=r.tableid,u=r.databaseid||e.sources[0].databaseid||e.database.databaseid;if(c||(c=e.defcols[r.columnid]),c||(c=e.defaultTableid),"_"!==r.columnid)if(i&&i.length>1&&Array.isArray(i[0])&&i[0].length>=1&&i[0][0].hasOwnProperty("sheetid"))a='var r={};var w=p["'+c+'"];var cols=['+s.columns.map((function(t){return"'"+t.columnid+"'"})).join(",")+"];var colas=["+s.columns.map((function(t){return"'"+(t.as||t.columnid)+"'"})).join(",")+"];for (var i=0;i<Object.keys(p['"+c+"']).length;i++) for(var k=0;k<cols.length;k++){if (!r.hasOwnProperty(i)) r[i]={}; r[i][colas[k]]=w[i][cols[k]];}";else if(r.tableid||!(e.sources.length>1)||e.defcols[r.columnid]&&"-"!==e.defcols[r.columnid])h.push("'"+o(r.as||r.columnid)+"':p['"+c+"']['"+r.columnid+"']");else{var f=Object.keys(e.aliases).map((function(t){return"p['"+t+"']['"+r.columnid+"']"})).join(" ?? ");h.push("'"+o(r.as||r.columnid)+"':("+f+")")}else h.push("'"+o(r.as||r.columnid)+"':p['"+c+"']");if(e.selectColumns[o(r.as||r.columnid)]=!0,e.aliases[c]&&"table"===e.aliases[c].type){if(!t.databases[u].tables[e.aliases[c].tableid])throw new Error("Table '"+c+"' does not exist in database");var d=t.databases[u].tables[e.aliases[c].tableid].xcolumns;if(d&&t.databases[u].tables[e.aliases[c].tableid].columns.length>0){var p=d[r.columnid];if(void 0===p)throw new Error("Column does not exist: "+r.columnid);e.columns.push(b={columnid:r.as||r.columnid,dbtypeid:p.dbtypeid,dbsize:p.dbsize,dbpecision:p.dbprecision,dbenum:p.dbenum}),e.xcolumns[b.columnid]=b}else e.columns.push(b={columnid:r.as||r.columnid}),e.xcolumns[b.columnid]=b,e.dirtyColumns=!0}else e.columns.push(b={columnid:r.as||r.columnid}),e.xcolumns[b.columnid]=b}else if(r instanceof U.AggrValue){r.as||(r.as=o(r.toString())),r.over?e.windowaggrs.push({as:r.as,aggregatorid:r.aggregatorid,expression:r.expression,partitionColumns:r.over.partition?r.over.partition.map((function(t){return t.columnid||t.toString()})):[]}):(s.group||(s.group=[""]),z.test(r.aggregatorid)?h.push("'"+o(r.as)+"':"+n(r.expression.toJS("p",e.defaultTableid,e.defcols))):"COUNT"===r.aggregatorid&&h.push("'"+o(r.as)+"':1"));var b={columnid:r.as||r.columnid||r.toString()};e.columns.push(b),e.xcolumns[b.columnid]=b}else{var v=e.intoObject&&!r.as?function(t){if(!t||"->"!==t.op)return null;for(var e=[],i=t;i&&"->"===i.op;){if("string"==typeof i.right)e.unshift(i.right);else{if("number"!=typeof i.right)return null;e.unshift(i.right)}i=i.left}return i&&i.columnid?(e.unshift(i.columnid),e):null}(r):null;if(v&&v.length>1){for(var E=n(r.toJS("p",e.defaultTableid,e.defcols)),m=0;m<v.length-1;m++){var g=v.slice(0,m+1).map((function(t){return"['"+o(t)+"']"})).join("");a+="r"+g+" = r"+g+" || {};"}var w=v.map((function(t){return"['"+o(t)+"']"})).join("");a+="r"+w+" = "+E+";";var y=v[0];e.selectColumns[o(y)]=!0,e.xcolumns[(b={columnid:y}).columnid]||(e.columns.push(b),e.xcolumns[b.columnid]=b)}else h.push("'"+o(r.as||r.columnid||r.toString())+"':"+n(r.toJS("p",e.defaultTableid,e.defcols))),e.selectColumns[o(r.as||r.columnid||r.toString())]=!0,b={columnid:r.as||r.columnid||r.toString()},e.columns.push(b),e.xcolumns[b.columnid]=b}})),r+(h.join(",")+"};")+a},U.Select.prototype.compileSelect2=function(t,e){var i=t.selectfns;return this.orderColumns&&this.orderColumns.length>0&&!this.union&&!this.unionall&&!this.except&&!this.intersect&&this.orderColumns.forEach((function(s,n){var r="$$$"+n;i+=void 0!==s._useColumnIndex?"var keys=Object.keys(r);r['"+r+"']=r[keys["+s.columnIndex+"]];":s instanceof U.Column&&t.xcolumns[s.columnid]?"r['"+r+"']=r['"+s.columnid+"'];":s instanceof U.ParamValue&&t.xcolumns[e[s.param]]?"r['"+r+"']=r['"+e[s.param]+"'];":"r['"+r+"']="+s.toJS("p",t.defaultTableid,t.defcols)+";",t.removeKeys.push(r)})),new Function("p,params,alasql","var y;"+i+"return r")},U.Select.prototype.compileSelectGroup0=function(t){var e=this,i=null,s=null;e.group&&(i={},e.group.forEach((function(t,e){t instanceof U.Column&&t.columnid&&!t.tableid&&(i[t.columnid]=e)})),s={},e.columns.forEach((function(t){t instanceof U.Column&&t.columnid&&(s[t.columnid]=!0)}))),e.columns.forEach((function(n,r){if(n instanceof U.Column&&"*"===n.columnid)t.groupStar=n.tableid||"default";else{var a;a=o(n instanceof U.Column?n.columnid:n.toString(!0));for(var h=0;h<r;h++)if(a===e.columns[h].nick){a=e.columns[h].nick+":"+r;break}if(n.nick=a,e.group){var l=e.group.findIndex((function(t){return t.columnid===n.columnid&&t.tableid===n.tableid}));if(l>-1&&(e.group[l].nick=a),n.as&&i&&i.hasOwnProperty(n.as)&&!s[n.as]){var c=i[n.as],u=T(n);delete u.as,u.nick=a,e.group[c]=u}}n.funcid&&("ROWNUM"===n.funcid.toUpperCase()||"ROW_NUMBER"===n.funcid.toUpperCase())&&(n.over&&n.over.partition?t.grouprownums.push({as:n.as,partitionColumns:n.over.partition.map((function(t){return t.columnid||t.toString()}))}):t.rownums.push(n.as)),n.funcid&&"GROUP_ROW_NUMBER"===n.funcid.toUpperCase()&&t.grouprownums.push({as:n.as,columnIndex:0})}})),this.columns.forEach((function(e){e.findAggregator&&e.findAggregator(t)})),this.having&&this.having.findAggregator&&this.having.findAggregator(t)},U.Select.prototype.compileSelectGroup1=function(t){var e="var r = {};";return this.columns.forEach((function(i){if(i instanceof U.Column&&"*"===i.columnid)return e+="for(var k in g) {r[k]=g[k]};","";var s=i.as;void 0===s&&(s=i instanceof U.Column?o(i.columnid):i.nick),t.groupColumns[s]=i.nick,e+="r['"+s+"']=",e+=n(i.toJS("g",""))+";";for(var r=0;r<t.removeKeys.length;r++)if(t.removeKeys[r]===s){t.removeKeys.splice(r,1);break}})),e},U.Select.prototype.compileSelectGroup2=function(t){var e=this,i=t.selectgfns,s={};return e.group&&e.group.forEach((function(t){s[(t.tableid||"")+"\t"+t.columnid]=t})),e.columns.forEach((function(n){if(!(n instanceof U.Column&&"*"===n.columnid)){var r=null;n instanceof U.Column&&e.group&&(r=s[(n.tableid||"")+"\t"+n.columnid]),(null!==r||t.ingroup.indexOf(n.nick)>-1)&&(i+="r['"+(n.as||n.nick)+"']=g['"+(r&&r.nick||n.nick)+"'];")}})),this.orderColumns&&this.orderColumns.length>0&&!this.union&&!this.unionall&&!this.except&&!this.intersect&&this.orderColumns.forEach((function(e,s){var n="$$$"+s;i+=void 0!==e._useColumnIndex?"var keys=Object.keys(r);r['"+n+"']=r[keys["+e.columnIndex+"]];":e instanceof U.Column&&t.groupColumns[e.columnid]?"r['"+n+"']=r['"+e.columnid+"'];":"r['"+n+"']="+e.toJS("g","")+";",t.removeKeys.push(n)})),new Function("g,params,alasql","var y;"+i+"return r")},U.Select.prototype.compileRemoveColumns=function(t){typeof this.removecolumns<"u"&&(t.removeKeys=t.removeKeys.concat(this.removecolumns.filter((function(t){return typeof t.like>"u"})).map((function(t){return t.columnid}))),t.removeLikeKeys=this.removecolumns.filter((function(t){return typeof t.like<"u"})).map((function(t){return t.like.value})))},U.Select.prototype.compileHaving=function(t){if(this.having){var e=this.having.toJS("g",-1);return t.havingfns=e,new Function("g,params,alasql","var y;return "+e)}return function(){return!0}},U.Select.prototype.compileOrder=function(e,i){var s=this;if(s.orderColumns=[],this.order){if(this.order&&1==this.order.length&&this.order[0].expression&&"function"==typeof this.order[0].expression){var n=this.order[0].expression,r="FIRST"==this.order[0].nullsOrder?-1:"LAST"==this.order[0].nullsOrder?1:0;return function(t,e){var i=n(t),s=n(e);if(r){if(null==i)return null==s?0:r;if(null==s)return-r}return i>s?1:i==s?0:-1}}var a="",o="";return this.order.forEach((function(n,r){if(n.expression instanceof U.NumValue){if(n.expression.value<1)throw new Error(`Invalid column number ${n.expression.value}. Column numbers must be at least 1.`);var h=s.columns[n.expression.value-1];if(1===s.columns.length&&s.columns[0]instanceof U.Column&&"*"===s.columns[0].columnid)h={_useColumnIndex:!0,columnIndex:n.expression.value-1};else{if(n.expression.value>s.columns.length)throw new Error(`You are trying to order by column number ${n.expression.value} but you have only selected ${s.columns.length} columns.`);h instanceof U.Column&&"*"===h.columnid&&(h={_useColumnIndex:!0,columnIndex:n.expression.value-1})}}else h=n.expression instanceof U.StringValue?new U.Column({columnid:n.expression.value}):n.expression;s.orderColumns.push(h);var l,c="$$$"+r,u="";if(n.expression instanceof U.Column?l=n.expression.columnid:n.expression instanceof U.ParamValue?l=i[n.expression.param]:n.expression instanceof U.StringValue&&(l=n.expression.value),l)if(t.options.valueof)u=".valueOf()";else if(e.xcolumns[l]){var f=e.xcolumns[l].dbtypeid;("DATE"==f||"DATETIME"==f||"DATETIME2"==f||"STRING"==f||"NUMBER"==f)&&(u=".valueOf()")}n.nocase&&(u+=".toUpperCase()"),n.nullsOrder&&("FIRST"==n.nullsOrder?a+="if((a['"+c+"'] != null) && (b['"+c+"'] == null)) return 1;":"LAST"==n.nullsOrder&&(a+="if((a['"+c+"'] == null) && (b['"+c+"'] != null)) return 1;"),a+="if((a['"+c+"'] == null) == (b['"+c+"'] == null)) {",o+="}"),a+="if((a['"+c+"']||'')"+u+("ASC"==n.direction?">":"<")+"(b['"+c+"']||'')"+u+")return 1;",a+="if((a['"+c+"']||'')"+u+"==(b['"+c+"']||'')"+u+"){",o+="}"})),a+="return 0;",e.orderfns=a+=o+"return -1",new Function("a,b","var y;"+a)}},U.Select.prototype.compilePivot=function(){var e,i=this,s=i.pivot.columnid,n=i.pivot.expr.aggregatorid,r=i.pivot.inlist;if(null==(e=i.pivot.expr.expression.hasOwnProperty("columnid")?i.pivot.expr.expression.columnid:i.pivot.expr.expression.expression.columnid))throw"columnid not found";return r&&(r=r.map((function(t){return t.expr.columnid}))),function(){var i=this;if(!i.data||0===i.data.length)return void(i.columns=[]);var a=Object.keys(i.data[0]).filter((function(t){return t!==s&&t!==e})),o=[],h={},l={},c={},u=[];if(i.data.forEach((function(i){if(!r||-1!==r.indexOf(i[s])){var f=a.map((function(t){return null==i[t]?"":i[t]})).join("`"),d=l[f];d||(l[f]=d={},u.push(d),a.forEach((function(t){d[t]=i[t]}))),c[f]||(c[f]={});var p=i[s],b=i[e];if(c[f][p]?null!==b&&typeof b<"u"&&c[f][p]++:c[f][p]=null!==b&&typeof b<"u"?1:0,h[p]||(h[p]=!0,o.push(p)),"SUM"==n||"AVG"==n||"TOTAL"==n)null!==b&&typeof b<"u"?d[p]=typeof d[p]>"u"||null===d[p]?Number(b):d[p]+Number(b):typeof d[p]>"u"&&(d[p]=null);else if("COUNT"==n)"*"===e||null!==b&&typeof b<"u"?d[p]=(d[p]||0)+1:typeof d[p]>"u"&&(d[p]=0);else if("MIN"==n)null!==b&&typeof b<"u"?(typeof d[p]>"u"||null===d[p]||b<d[p])&&(d[p]=b):typeof d[p]>"u"&&(d[p]=null);else if("MAX"==n)null!==b&&typeof b<"u"?(typeof d[p]>"u"||null===d[p]||b>d[p])&&(d[p]=b):typeof d[p]>"u"&&(d[p]=null);else if("FIRST"==n)typeof d[p]>"u"&&(d[p]=b);else if("LAST"==n)d[p]=b;else{if(!t.aggr[n])throw new Error("Unknown aggregator in PIVOT clause: "+n);d[p]=typeof d[p]>"u"?t.aggr[n](b,void 0,1):t.aggr[n](b,d[p],2)}}})),"AVG"==n)for(var f in l){var d=l[f];for(var p in c[f])if(d.hasOwnProperty(p)&&null!==d[p]){var b=c[f][p];d[p]=b>0?d[p]/b:null}}i.data=u,r?o=r:o.sort();let v=i.columns.find((t=>t.columnid===e));if(!v&&i.sources&&i.sources.length>0){let s=i.sources[0].tableid,n=i.sources[0].databaseid;s&&n&&t.databases[n]?.tables?.[s]?.xcolumns&&(v=t.databases[n].tables[s].xcolumns[e])}v=v||{columnid:e,dbtypeid:"OBJECT"},i.columns=i.columns.filter((function(t){return a.includes(t.columnid)})),o.forEach((function(t){var e=T(v);e.columnid=t;const s=(v.dbtypeid||"OBJECT").toUpperCase(),r=["INT","INTEGER","SMALLINT","BIGINT","SERIAL","SMALLSERIAL","BIGSERIAL"],a=[...r,"NUMBER","FLOAT","DECIMAL","NUMERIC","MONEY"];"COUNT"===n?e.dbtypeid="INT":"AVG"===n?e.dbtypeid=r.includes(s)?v.dbtypeid:"FLOAT":"SUM"===n||"TOTAL"===n?e.dbtypeid=a.includes(s)?v.dbtypeid:"FLOAT":"MIN"===n||"MAX"===n||"FIRST"===n||"LAST"===n?e.dbtypeid=v.dbtypeid:e.dbtypeid||(e.dbtypeid="OBJECT"),i.columns.push(e)}))}},U.Select.prototype.compileUnpivot=function(t){var e=this,i=e.unpivot.tocolumnid,s=e.unpivot.forcolumnid,n=e.unpivot.inlist.map((function(t){return t.columnid}));return function(){var e=[],r=t.columns.map((function(t){return t.columnid})).filter((function(t){return-1==n.indexOf(t)&&t!=s&&t!=i}));t.data.forEach((function(t){n.forEach((function(n){var a={};r.forEach((function(e){a[e]=t[e]})),a[s]=n,a[i]=t[n],e.push(a)}))})),t.data=e}};const K=(t,e)=>{const i=[];let s=0;const n=t.length;for(let r=0;r<n+1;r++){const r=[];for(let i=0;i<n;i++){let n;t[i]instanceof U.Column?(t[i].nick=o(t[i].columnid),e.groupColumns[o(t[i].columnid)]=t[i].nick,n=`${t[i].nick}\t${t[i].toJS("p",e.sources[0].alias,e.defcols)}`):(e.groupColumns[o(t[i].toString())]=o(t[i].toString()),n=`${o(t[i].toString())}\t${t[i].toJS("p",e.sources[0].alias,e.defcols)}`),s&1<<i&&r.push(n)}i.push(r),s=1+(s<<1)}return i},Q=(t,e)=>{const i=[],s=t.length,n=1<<s;for(let r=0;r<n;r++){let n=[];for(let i=0;i<s;i++)r&1<<i&&(n=n.concat(et(t[i],e)));i.push(n)}return i},Z=(t,e)=>t.reduce(((t,i)=>t.concat(et(i,e))),[]),tt=(t,e)=>{const i=[];for(let s=0;s<t.length;s++)for(let n=0;n<e.length;n++)i.push(t[s].concat(e[n]));return i};function et(t,e){if(Array.isArray(t)){let i=[[]];for(let s=0;s<t.length;s++)if(t[s]instanceof U.Column)t[s].nick=o(t[s].nick?t[s].nick:t[s].columnid),e.groupColumns[t[s].nick]=t[s].nick,i=i.map((i=>i.concat(`${t[s].nick}\t${t[s].toJS("p",e.sources[0].alias,e.defcols)}`)));else if(t[s]instanceof U.FuncValue)e.groupColumns[o(t[s].toString())]=o(t[s].toString()),i=i.map((i=>i.concat(`${o(t[s].toString())}\t${t[s].toJS("p",e.sources[0].alias,e.defcols)}`)));else if(t[s]instanceof U.GroupExpression)if("ROLLUP"==t[s].type)i=tt(i,K(t[s].group,e));else if("CUBE"==t[s].type)i=tt(i,Q(t[s].group,e));else{if("GROUPING SETS"!=t[s].type)throw new Error("Unknown grouping function");i=tt(i,Z(t[s].group,e))}else i=""===t[s]?[["1\t1"]]:i.map((i=>i.concat(`${o(t[s].toString())}\t${t[s].toJS("p",e.sources[0].alias,e.defcols)}`)));return i}return t instanceof U.FuncValue?(e.groupColumns[o(t.toString())]=o(t.toString()),[`${t.toString()}\t${t.toJS("p",e.sources[0].alias,e.defcols)}`]):t instanceof U.Column?(t.nick=o(t.columnid),e.groupColumns[t.nick]=t.nick,[`${t.nick}\t${t.toJS("p",e.sources[0].alias,e.defcols)}`]):(e.groupColumns[o(t.toString())]=o(t.toString()),[`${o(t.toString())}\t${t.toJS("p",e.sources[0].alias,e.defcols)}`])}U.Select.prototype.compileDefCols=function(e,i){var s={".":{}};return this.from&&this.from.forEach((function(e){if(s["."][e.as||e.tableid]=!0,e instanceof U.Table){var n=e.as||e.tableid,r=t.databases[e.databaseid||i].tables[e.tableid];if(void 0===r)throw new Error("Table does not exist: "+e.tableid);r.columns&&r.columns.forEach((function(t){s[t.columnid]=s[t.columnid]?"-":n}))}else if(!(e instanceof U.Select||e instanceof U.Search||e instanceof U.ParamValue||e instanceof U.VarValue||e instanceof U.FuncValue||e instanceof U.FromData||e instanceof U.Json||e.inserted))throw new Error("Unknown type of FROM clause")})),this.joins&&this.joins.forEach((function(e){if(s["."][e.as||e.table.tableid]=!0,e.table){var n=e.as||e.table.tableid,r=e.table.databaseid||i,a=t.databases[r];if(void 0===a)throw new Error("Database does not exist: "+r);var o=a.tables[e.table.tableid];if(void 0===o)throw new Error("Table does not exist: "+e.table.tableid);o.columns&&o.columns.forEach((function(t){s[t.columnid]=s[t.columnid]?"-":n}))}else if(!e.select&&!e.param&&!e.func)throw new Error("Unknown type of FROM clause")})),s},U.Union=class{constructor(t){Object.assign(this,t)}toString(){return"UNION"}compile(t){return null}},U.Apply=class{constructor(t){Object.assign(this,t)}toString(){let t=`${this.applymode} APPLY (${this.select.toString()})`;return this.as&&(t+=` AS ${this.as}`),t}},U.Over=class{constructor(t){Object.assign(this,t)}toString(){let t="OVER (";return this.partition&&(t+=`PARTITION BY ${this.partition.toString()}`,this.order&&(t+=" ")),this.order&&(t+=`ORDER BY ${this.order.toString()}`),t+=")",t}};{const e=Object.assign;class i{constructor(t){e(this,t)}toString(){return this.expression.toString()}execute(e,i,s){if(this.expression){t.precompile(this,e,i);var n=new Function("params,alasql,p","var y;return "+this.expression.toJS("({})","",null)).bind(this)(i,t);return s&&(n=s(n)),n}}}class s{constructor(t){e(this,t)}toString(){var t=this.expression.toString();return this.order&&(t+=" "+this.order.toString()),this.nocase&&(t+=" COLLATE NOCASE"),this.direction&&(t+=" "+this.direction),t}findAggregator(t){this.expression.findAggregator&&this.expression.findAggregator(t)}toJS(t,e,i){return this.expression.reduced?"true":this.expression.toJS(t,e,i)}compile(t,e,i){return!!this.reduced||new Function("p","var y;return "+this.toJS(t,e,i))}}class n{constructor(t){e(this,t)}toString(){return"``"+this.value+"``"}toJS(){return"("+this.value+")"}execute(e,i,s){var n=1;return new Function("params,alasql,p",this.value)(i,t),s&&(n=s(n)),n}}class r{constructor(t){e(this,t)}toString(){var t=this.value;return this.value1&&(t=this.value1+"."+t),t}}class a{constructor(t){e(this,t)}toString(){var t=" ";return this.joinmode&&(t+=this.joinmode+" "),t+"JOIN "+this.table.toString()}}class h{constructor(t){e(this,t)}toString(){var t=this.tableid;return this.databaseid&&(t=this.databaseid+"."+t),t}}class l{constructor(t){e(this,t)}toString(){var t=this.viewid;return this.databaseid&&(t=this.databaseid+"."+t),t}}const c=new Set(["-","*","/","%","^","<<",">>","&","|"]),u=new Set(["||"]),f=/[\s.\-\[\]]/,d=new Set(["AND","OR","NOT","=","==","===","!=","!==","!===",">",">=","<","<=","IN","NOT IN","LIKE","NOT LIKE","REGEXP","GLOB","BETWEEN","NOT BETWEEN","IS NULL","IS NOT NULL"]);class p{constructor(t){e(this,t)}toString(){const t=this.left.toString();let e;return"IN"===this.op||"NOT IN"===this.op?`${t} ${this.op} (${this.right.toString()})`:this.allsome?`${t} ${this.op} ${this.allsome} (${this.right.toString()})`:"->"===this.op||"!"===this.op?(e=`${t}${this.op}`,"string"!=typeof this.right&&"number"!=typeof this.right?e+`(${this.right.toString()})`:e+this.right.toString()):"BETWEEN"===this.op||"NOT BETWEEN"===this.op?`${t} ${this.op} ${this.right1.toString()} AND ${this.right2.toString()}`:`${t} ${this.op} ${this.allsome?this.allsome+" ":""}${this.right.toString()}`}findAggregator(t){this.left&&this.left.findAggregator&&this.left.findAggregator(t),("BETWEEN"===this.op||"NOT BETWEEN"===this.op)&&(this.right1&&this.right1.findAggregator&&this.right1.findAggregator(t),this.right2&&this.right2.findAggregator&&this.right2.findAggregator(t)),this.right&&this.right.findAggregator&&!this.allsome&&this.right.findAggregator(t)}toType(t){if(c.has(this.op))return"number";if(u.has(this.op))return"string";if("+"===this.op){const e=this.left.toType(t),i=this.right.toType(t);if("string"===e||"string"===i)return"string";if("number"===e||"number"===i)return"number"}return d.has(this.op)||this.allsome?"boolean":this.op?"unknown":this.left.toType(t)}toJS(e,i,s){let n=[],r=this.op,a=!1,h=this,l=function(t){return t.toJS&&(t=t.toJS(e,i,s)),"y["+(n.push(t)-1)+"]"};var c,u=function(){return l(h.left)},f=function(){return l(h.right)};if("="===this.op)r="===";else if("<>"===this.op)r="!=";else if("OR"===this.op)r="||";else if("->"===this.op){const t=`(${u()} || {})`;if("string"==typeof this.right)c=`${t}["${o(this.right)}"]`;else if("number"==typeof this.right)c=`${t}[${this.right}]`;else if(this.right instanceof U.FuncValue){let e=[];this.right.args&&this.right.args.length>0&&(e=this.right.args.map(l)),c=`${t}[${JSON.stringify(this.right.funcid)}](${e.join(",")})`}else c=`${t}[${f()}]`}else if("!"===this.op)"string"==typeof this.right&&(c=`alasql.databases[alasql.useid].objects[${u()}]["${this.right}"]`);else if("IS"===this.op){const t=u(),e=f();c=this.right instanceof U.NullValue||"NOT"===this.right.op&&this.right.right instanceof U.NullValue?`((${t} == null) === (${e} == null))`:`((${t} == ${e}) || (${t} < 0 && true == ${e}))`}else if("=="===this.op)c=`alasql.utils.deepEqual(${u()}, ${f()})`;else if("==="===this.op||"!==="===this.op)c=`(${"!==="===this.op?"!":""}((${u()}).valueOf() === (${f()}).valueOf()))`;else if("!=="===this.op)c=`(!alasql.utils.deepEqual(${u()}, ${f()}))`;else if("||"===this.op)c=`(''+(${u()} || '') + (${f()} || ''))`;else if("LIKE"===this.op||"NOT LIKE"===this.op)c=`(${"NOT LIKE"===this.op?"!":""}alasql.utils.like(${f()}, ${u()}${this.escape?`, ${l(this.escape)}`:""}))`;else if("REGEXP"===this.op)c=`alasql.stdfn.REGEXP_LIKE(${u()}, ${f()})`;else if("GLOB"===this.op)c=`alasql.utils.glob(${u()}, ${f()})`;else if("BETWEEN"===this.op||"NOT BETWEEN"===this.op){const t=u();c=`(${"NOT BETWEEN"===this.op?"!":""}((${l(this.right1)} <= ${t}) && (${t} <= ${l(this.right2)})))`}else if("IN"===this.op)if(this.right instanceof U.Select){const t=`in${this.queriesidx}`,i=`(this.queriesfn[${this.queriesidx}].query && this.queriesfn[${this.queriesidx}].query.isCorrelated)`,s=`((this.subqueryCache = this.subqueryCache || {}, this.subqueryCache.${t} || (this.subqueryCache.${t} = new Set(alasql.utils.flatArray(this.queriesfn[${this.queriesidx}](params, null, ${e})).map(alasql.utils.getValueOf)))).has(alasql.utils.getValueOf(${u()})))`;c=`(${i} ? (alasql.utils.flatArray(this.queriesfn[${this.queriesidx}](params, null, ${e})).indexOf(alasql.utils.getValueOf(${u()})) > -1) : ${s})`}else if(Array.isArray(this.right))if(0===this.right.length)u(),c="false",a=!0;else if(!t.options.cache||this.right.some((t=>t instanceof U.ParamValue)))c=`(new Set([${this.right.map(l).join(",")}]).has(alasql.utils.getValueOf(${u()})))`;else{t.sets=t.sets||{};const e=this.right.map((t=>t.value)),i=e.join(",");t.sets[i]=t.sets[i]||new Set(e),c=`alasql.sets["${i}"].has(alasql.utils.getValueOf(${u()}))`}else c=`(${f()}.indexOf(${u()}) > -1)`;else if("NOT IN"===this.op)if(this.right instanceof U.Select){const t=`notIn${this.queriesidx}`,i=`(this.queriesfn[${this.queriesidx}].query && this.queriesfn[${this.queriesidx}].query.isCorrelated)`,s=`(!(this.subqueryCache = this.subqueryCache || {}, this.subqueryCache.${t} || (this.subqueryCache.${t} = new Set(alasql.utils.flatArray(this.queriesfn[${this.queriesidx}](params, null, ${e})).map(alasql.utils.getValueOf)))).has(alasql.utils.getValueOf(${u()})))`;c=`(${i} ? (alasql.utils.flatArray(this.queriesfn[${this.queriesidx}](params, null, ${e})).indexOf(alasql.utils.getValueOf(${u()})) < 0) : ${s})`}else if(Array.isArray(this.right))if(0===this.right.length)u(),c="true",a=!0;else if(!t.options.cache||this.right.some((t=>t instanceof U.ParamValue)))c=`(!(new Set([${this.right.map(l).join(",")}]).has(alasql.utils.getValueOf(${u()}))))`;else{t.sets=t.sets||{};const e=this.right.map((t=>t.value)),i=e.join(",");t.sets[i]=t.sets[i]||new Set(e),c=`!alasql.sets["${i}"].has(alasql.utils.getValueOf(${u()}))`}else c=`(${f()}.indexOf(${u()}) === -1)`;if("ALL"===this.allsome)if(this.right instanceof U.Select)c="alasql.utils.flatArray(this.query.queriesfn["+this.queriesidx+"](params,null,p))",c+=".every(function(b){return (",c+=u()+")"+r+"b})";else{if(!Array.isArray(this.right))throw new Error("NOT IN operator without SELECT");c=""+(1==this.right.length?l(this.right[0]):"["+this.right.map(l).join(",")+"]"),c+=".every(function(b){return (",c+=u()+")"+r+"b})"}if("SOME"===this.allsome||"ANY"===this.allsome)if(this.right instanceof U.Select)c="alasql.utils.flatArray(this.query.queriesfn["+this.queriesidx+"](params,null,p))",c+=".some(function(b){return (",c+=u()+")"+r+"b})";else{if(!Array.isArray(this.right))throw new Error("SOME/ANY operator without SELECT");c=""+(1==this.right.length?l(this.right[0]):"["+this.right.map(l).join(",")+"]"),c+=".some(function(b){return (",c+=u()+")"+r+"b})"}if("AND"===this.op){if(this.left.reduced){if(this.right.reduced)return"true";c=f()}else this.right.reduced&&(c=u());r="&&"}var d=c||"("+u()+r+f()+")",p="y=[("+n.join("), (")+")]";return a||"&&"===r||"||"===r||"IS"===r||"IS NULL"===r||"IS NOT NULL"===r?"("+p+", "+d+")":`(${p}, y.some(e => e == null || (typeof e === 'number' && isNaN(e))) ? void 0 : ${d})`}}class b{constructor(t){e(this,t)}toString(){return"@"+this.variable}toType(){return"unknown"}toJS(){return"alasql.vars['"+o(this.variable)+"']"}}class v{constructor(t){e(this,t)}toString(){return this.value.toString()}toType(){return"number"}toJS(){return""+this.value}}class E{constructor(t){e(this,t)}toString(){return"'"+this.value.toString()+"'"}toType(){return"string"}toJS(){return"'"+o(this.value)+"'"}}class m{constructor(t){e(this,t)}toString(){return"VALUE"}toType(){return"object"}toJS(t,e,i){return t}}class g{constructor(t){e(this,t)}toString(){return"ARRAY[]"}toType(){return"object"}toJS(t,e,i){return"[("+this.value.map((function(s){return s.toJS(t,e,i)})).join("), (")+")]"}}class w{constructor(t){e(this,t)}toString(){return this.value?"TRUE":"FALSE"}toType(){return"boolean"}toJS(){return this.value?"true":"false"}}class y{constructor(t){e(this,t)}toString(){return"NULL"}toJS(){return"undefined"}}class T{constructor(t){e(this,t)}toString(){return"$"+this.param}toJS(){return"string"==typeof this.param?"params['"+this.param+"']":"params["+this.param+"]"}}const S={"~":"~","-":"-","+":"+",NOT:"!"};class A{constructor(t){e(this,t)}toString(){const{op:t,right:e}=this,i=e.toString();switch(t){case"~":case"-":case"+":case"#":return t+i;case"NOT":return t+"("+i+")";default:return"("+i+")"}}findAggregator(t){this.right.findAggregator&&this.right.findAggregator(t)}toType(){switch(this.op){case"-":case"+":return"number";case"NOT":return"boolean";default:return"string"}}toJS(t,e,i){if(this.right instanceof O&&"#"===this.op)return`(alasql.databases[alasql.useid].objects['${this.right.columnid}'])`;const s=this.right.toJS(t,e,i);if(S.hasOwnProperty(this.op))return`(${S[this.op]}(${s}))`;if(null==this.op)return`(${s})`;throw new Error(`Unsupported operator: ${this.op}`)}}class O{constructor(t){e(this,t)}static needsBrackets(t){return null!=t&&(t==+t||f.test(t))}static wrapId(t){return O.needsBrackets(t)?"["+t+"]":t}toString(){const t=O.needsBrackets(this.columnid);let e=t?"["+this.columnid+"]":this.columnid;if(this.tableid){const i=t?"":".";e=O.wrapId(this.tableid)+i+e,this.databaseid&&(e=O.wrapId(this.databaseid)+"."+e)}return e}toJS(t,e,i){if(!this.tableid&&""===e&&!i)return"_"!==this.columnid?`${t}['${this.columnid}']`:"g"===t?"g['_']":t;if("g"===t)return`g['${this.nick||this.columnid}']`;if(this.tableid)return"_"!==this.columnid?`${t}['${this.tableid}']['${this.columnid}']`:"g"===t?"g['_']":`${t}['${this.tableid}']`;if(i){const s=i[this.columnid];if("-"===s)throw new Error(`Cannot resolve column "${this.columnid}" because it exists in two source tables`);return s?"_"!==this.columnid?`${t}['${s}']['${this.columnid}']`:`${t}['${s}']`:"_"!==this.columnid?`${t}['${this.tableid||e}']['${this.columnid}']`:`${t}['${this.tableid||e}']`}return-1===e?`${t}['${this.columnid}']`:"_"!==this.columnid?`${t}['${this.tableid||e}']['${this.columnid}']`:`${t}['${this.tableid||e}']`}}class R{constructor(t){e(this,t)}toString(){return`${"REDUCE"===this.aggregatorid?this.funcid.replace(it,""):this.aggregatorid}(${this.distinct?"DISTINCT ":""}${this.expression?this.expression.toString():""})${this.over?` ${this.over.toString()}`:""}`}findAggregator(t){if(this.over)return;let e=t.selectGroup.find((t=>t.toString()===this.toString()));e?this.aggrNick=e.nick:(this.nick||(this.nick=o(this.toString())+":"+t.selectGroup.length,t.removeKeys.includes(this.nick)||t.removeKeys.push(this.nick)),this.aggrNick=this.nick,t.selectGroup.push(this))}toType(){return["SUM","COUNT","AVG","MIN","MAX","AGGR","VAR","STDDEV","TOTAL"].includes(this.aggregatorid)?"number":"ARRAY"===this.aggregatorid?"array":this.expression.toType()}toJS(){var t=this.aggrNick||this.nick;return void 0===t&&(t=o(this.toString())),"g['"+t+"']"}}class N{constructor(t){e(this,t)}}N.prototype.toString=s.prototype.toString;class _{constructor(t){e(this,t)}toString(){return this.type+"("+this.group.toString()+")"}}e(U,{AggrValue:R,ArrayValue:g,Column:O,DomainValueValue:m,Expression:s,ExpressionStatement:i,GroupExpression:_,JavaScript:n,Join:a,Literal:r,LogicValue:w,NullValue:y,NumValue:v,Op:p,OrderExpression:N,ParamValue:T,StringValue:E,Table:h,UniOp:A,VarValue:b,View:l})}U.FromData=function(t){return U.extend(this,t)},U.FromData.prototype.toString=function(){return this.data?"DATA("+(1e16*Math.random()|0)+")":"?"},U.FromData.prototype.toJS=function(){},U.Select.prototype.exec=function(e,i){this.preparams&&(e=this.preparams.concat(e));var s=t.useid,n=t.databases[s],r=this.toString(),a=b(r),o=this.compile(s);if(o)return o.sql=r,o.dbversion=n.dbversion,n.sqlCacheSize>t.MAXSQLCACHESIZE&&n.resetSqlCache(),n.sqlCacheSize++,n.sqlCache[a]=o,t.res=o(e,i)},U.Select.prototype.Select=function(){var t=this,e=[];if(arguments.length>1)e=Array.prototype.slice.call(arguments);else{if(1!=arguments.length)throw new Error("Wrong number of arguments of Select() function");e=Array.isArray(arguments[0])?arguments[0]:[arguments[0]]}return t.columns=[],e.forEach((function(e){if("string"==typeof e)t.columns.push(new U.Column({columnid:e}));else if("function"==typeof e){var i=0;t.preparams?i=t.preparams.length:t.preparams=[],t.preparams.push(e),t.columns.push(new U.Column({columnid:"*",func:e,param:i}))}})),t},U.Select.prototype.From=function(t){var e=this;if(e.from||(e.from=[]),Array.isArray(t)){var i=0;e.preparams?i=e.preparams.length:e.preparams=[],e.preparams.push(t),e.from.push(new U.ParamValue({param:i}))}else{if("string"!=typeof t)throw new Error("Unknown arguments in From() function");e.from.push(new U.Table({tableid:t}))}return e},U.Select.prototype.OrderBy=function(){var t=this,e=[];if(t.order=[],0==arguments.length)e=["_"];else if(arguments.length>1)e=Array.prototype.slice.call(arguments);else{if(1!=arguments.length)throw new Error("Wrong number of arguments of Select() function");e=Array.isArray(arguments[0])?arguments[0]:[arguments[0]]}return e.length>0&&e.forEach((function(e){var i=new U.Column({columnid:e});"function"==typeof e&&(i=e),t.order.push(new U.OrderExpression({expression:i,direction:"ASC"}))})),t},U.Select.prototype.Top=function(t){return this.top=new U.NumValue({value:t}),this},U.Select.prototype.GroupBy=function(){var t=this,e=[];if(arguments.length>1)e=Array.prototype.slice.call(arguments);else{if(1!=arguments.length)throw new Error("Wrong number of arguments of Select() function");e=Array.isArray(arguments[0])?arguments[0]:[arguments[0]]}return t.group=[],e.forEach((function(e){var i=new U.Column({columnid:e});t.group.push(i)})),t},U.Select.prototype.Where=function(t){return"function"==typeof t&&(this.where=t),this},U.FuncValue=function(t){return Object.assign(this,t)};let it=/[^0-9A-Z_$]+/i;U.FuncValue.prototype.toString=function(){let e="";return t.fn[this.funcid]||t.aggr[this.funcid]?e+=this.funcid:(t.stdlib[this.funcid.toUpperCase()]||t.stdfn[this.funcid.toUpperCase()])&&(e+=this.funcid.toUpperCase().replace(it,"")),"CURRENT_TIMESTAMP"!==this.funcid&&(e+="(",this.args&&this.args.length>0&&(e+=this.args.map((function(t){return t.toString()})).join(",")),e+=")"),this.over&&(e+=" "+this.over.toString()),e},U.FuncValue.prototype.execute=function(e,i,s){let n=1;return t.precompile(this,e,i),new Function("params,alasql","var y;return "+this.toJS("","",null))(i,t),s&&(n=s(n)),n},U.FuncValue.prototype.findAggregator=function(t){this.args&&this.args.length>0&&this.args.forEach((function(e){e.findAggregator&&e.findAggregator(t)}))},U.FuncValue.prototype.toJS=function(e,i,s){var n="",r=this.funcid;return!t.fn[r]&&t.stdlib[r.toUpperCase()]?n+=this.args&&this.args.length>0?t.stdlib[r.toUpperCase()].apply(this,this.args.map((function(t){return t.toJS(e,i)}))):t.stdlib[r.toUpperCase()]():!t.fn[r]&&t.stdfn[r.toUpperCase()]?(this.newid&&(n+="new "),n+="alasql.stdfn["+JSON.stringify(this.funcid.toUpperCase())+"](",this.args&&this.args.length>0&&(n+=this.args.map((function(t){return t.toJS(e,i,s)})).join(",")),n+=")"):(this.newid&&(n+="new "),n+="alasql.fn["+JSON.stringify(this.funcid)+"](",this.args&&this.args.length>0&&(n+=this.args.map((function(t){return t.toJS(e,i,s)})).join(",")),n+=")"),n};var st=t.stdlib={},nt=t.stdfn={};st.ABS=function(t){return"Math.abs("+t+")"},st.CLONEDEEP=function(t){return"alasql.utils.cloneDeep("+t+")"},nt.CONCAT=function(){return Array.prototype.slice.call(arguments).join("")},st.EXP=function(t){return"Math.pow(Math.E,"+t+")"},st.IIF=function(t,e,i){if(3===arguments.length)return`((${t}) ? (${e}) : (${i}))`;throw new Error("Number of arguments of IFF is not equals to 3")},st.IFNULL=function(t,e){return`((typeof ${t} === "undefined" || ${t} === null) ? ${e} : ${t})`},st.INSTR=function(t,e){return`((${t}).indexOf(${e}) + 1)`},st.LEN=st.LENGTH=function(t){return r(t,"y.length")},st.LOWER=st.LCASE=function(t){return r(t,"String(y).toLowerCase()")},st.LTRIM=function(t){return r(t,'y.replace(/^[ ]+/,"")')},st.RTRIM=function(t){return r(t,'y.replace(/[ ]+$/,"")')},st.MAX=st.GREATEST=function(){return"["+Array.prototype.join.call(arguments,",")+"].reduce(function (a, b) { return a > b ? a : b; })"},st.MIN=st.LEAST=function(){return"["+Array.prototype.join.call(arguments,",")+"].reduce(function (a, b) { return a < b ? a : b; })"},st.SUBSTRING=st.SUBSTR=st.MID=function(t,e,i){return 2==arguments.length?r(t,"y.substr("+e+"-1)"):3==arguments.length?r(t,"y.substr("+e+"-1,"+i+")"):void 0},nt.REGEXP_LIKE=function(t,e,i){var s=e.replace(/\[\[:<:\]\]/g,"\\b").replace(/\[\[:>:\]\]/g,"\\b");return(t||"").search(RegExp(s,i))>-1},st.ISNULL=st.NULLIF=function(t,e){return"("+t+"=="+e+"?undefined:"+t+")"},st.POWER=function(t,e){return"Math.pow("+t+","+e+")"},st.RANDOM=function(t){return 0==arguments.length?"Math.random()":"(Math.random()*("+t+")|0)"},st.ROUND=function(t,e){return 2==arguments.length?"(__alasql_tmp = ("+t+'), (__alasql_tmp == null || (typeof __alasql_tmp === "string" && __alasql_tmp.trim() === "")) ? undefined : ((__alasql_tmp = Number(__alasql_tmp)), isNaN(__alasql_tmp) ? undefined : Math.round(__alasql_tmp*Math.pow(10,('+e+")))/Math.pow(10,("+e+"))))":"(__alasql_tmp = ("+t+'), (__alasql_tmp == null || (typeof __alasql_tmp === "string" && __alasql_tmp.trim() === "")) ? undefined : ((__alasql_tmp = Number(__alasql_tmp)), isNaN(__alasql_tmp) ? undefined : Math.round(__alasql_tmp)))'},st.CEIL=st.CEILING=function(t){return"Math.ceil("+t+")"},st.FLOOR=function(t){return"Math.floor("+t+")"},st.ROWNUM=function(){return"1"},st.ROW_NUMBER=function(){return"1"},st.GROUP_ROW_NUMBER=function(){return"1"},st.SQRT=function(t){return"Math.sqrt("+t+")"},st.TRIM=function(t){return r(t,"y.trim()")},st.UPPER=st.UCASE=function(t){return r(t,"String(y).toUpperCase()")},nt.CONCAT_WS=function(){var t=Array.prototype.slice.call(arguments);return(t=t.filter((t=>!(null===t||typeof t>"u")))).slice(1,t.length).join(t[0]||"")},t.aggr.group_concat=t.aggr.GROUP_CONCAT=function(t,e,i,s,n){if(void 0===s&&(s=","),1===i)return null==t?{values:[],separator:s,orderDirection:n}:{values:[t],separator:s,orderDirection:n};if(2===i)return null==t?e:null==e?{values:[t],separator:s,orderDirection:n}:("string"==typeof e&&(e={values:e.split(","),separator:",",orderDirection:void 0}),e.values.push(t),e);{if(null==e)return;if("string"==typeof e)return e;let t=e.values;if(0===t.length)return;if(e.orderDirection&&void 0!==e.orderDirection){let i="ASC"===e.orderDirection;t=t.slice().sort(((t,e)=>t===e?0:null==t?1:null==e?-1:"string"==typeof t&&"string"==typeof e?i?t.localeCompare(e):e.localeCompare(t):i?t<e?-1:1:e<t?-1:1))}return t.join(e.separator)}},t.aggr.median=t.aggr.MEDIAN=function(t,e,i){if(2===i)return null!==t&&e.push(t),e;if(1===i)return null===t?[]:[t];if(!e.length)return;let s=e.sort(((t,e)=>t>e?1:t<e?-1:0)),n=(s.length+1)/2,r=0|n,a=s[r-1];return n!==r&&("number"==typeof a||a instanceof Number)?(a+s[r])/2:a},t.aggr.QUART=function(t,e,i,s){if(2===i)return null!==t&&e.push(t),e;if(1===i)return null===t?[]:[t];if(!e.length)return e;s=s||1;var n=e.sort((function(t,e){return t===e?0:t>e?1:-1}));let r=s*(n.length+1)/4;return Number.isInteger(r)?n[r-1]:n[Math.floor(r)]},t.aggr.QUART2=function(e,i,s){return t.aggr.QUART(e,i,s,2)},t.aggr.QUART3=function(e,i,s){return t.aggr.QUART(e,i,s,3)},t.aggr.VAR=function(t,e,i){return 1===i?null===t?{sum:0,sumSq:0,count:0}:{sum:t,sumSq:t*t,count:1}:2===i?(null!==t&&(e.sum+=t,e.sumSq+=t*t,e.count++),e):e.count>1?(e.sumSq-e.sum*e.sum/e.count)/(e.count-1):0},t.aggr.STDEV=function(e,i,s){return 1===s||2===s?t.aggr.VAR(e,i,s):Math.sqrt(t.aggr.VAR(e,i,s))},t.aggr.STDEV=function(e,i,s){return 1===s||2===s?t.aggr.VAR(e,i,s):Math.sqrt(t.aggr.VAR(e,i,s))},t.aggr.VARP=function(t,e,i){if(1===i)return{count:1,sum:t,sumSq:t*t};if(2===i)return e.count++,e.sum+=t,e.sumSq+=t*t,e;if(e.count>0){const t=e.sum/e.count;return e.sumSq/e.count-t*t}return 0},t.aggr.STD=t.aggr.STDDEV=t.aggr.STDEVP=function(e,i,s){return 1==s||2==s?t.aggr.VARP(e,i,s):Math.sqrt(t.aggr.VARP(e,i,s))},t._aggrOriginal=t.aggr,t.aggr={},Object.keys(t._aggrOriginal).forEach((function(e){t.aggr[e]=function(i,s,n){if(!(3===n&&typeof s>"u"))return t._aggrOriginal[e].apply(null,arguments)}})),nt.REPLACE=function(t,e,i){return String(t??"").split(String(e??"")).join(String(i??""))};for(var rt=[],at=0;at<256;at++)rt[at]=(at<16?"0":"")+at.toString(16);nt.NEWID=nt.UUID=nt.GEN_RANDOM_UUID=function(){var t=4294967295*Math.random()|0,e=4294967295*Math.random()|0,i=4294967295*Math.random()|0,s=4294967295*Math.random()|0;return rt[255&t]+rt[t>>8&255]+rt[t>>16&255]+rt[t>>24&255]+"-"+rt[255&e]+rt[e>>8&255]+"-"+rt[e>>16&15|64]+rt[e>>24&255]+"-"+rt[63&i|128]+rt[i>>8&255]+"-"+rt[i>>16&255]+rt[i>>24&255]+rt[255&s]+rt[s>>8&255]+rt[s>>16&255]+rt[s>>24&255]},U.CaseValue=function(t){return Object.assign(this,t)},U.CaseValue.prototype.toString=function(){var t="CASE ";return this.expression&&(t+=this.expression.toString()),this.whens&&(t+=this.whens.map((function(t){return" WHEN "+t.when.toString()+" THEN "+t.then.toString()})).join()),t+" END"},U.CaseValue.prototype.findAggregator=function(t){this.expression&&this.expression.findAggregator&&this.expression.findAggregator(t),this.whens&&this.whens.length>0&&this.whens.forEach((function(e){e.when.findAggregator&&e.when.findAggregator(t),e.then.findAggregator&&e.then.findAggregator(t)})),this.elses&&this.elses.findAggregator&&this.elses.findAggregator(t)},U.CaseValue.prototype.toJS=function(t,e,i){let s=`(((${t}, params, alasql) => {\n let y, r;`;return this.expression?(s+=`let v = ${this.expression.toJS(t,e,i)};`,this.whens.forEach(((n,r)=>{const a=`v === ${n.when.toJS(t,e,i)}`,o=`r = ${n.then.toJS(t,e,i)}`;s+=`${0===r?"if":" else if"} (${a}) { ${o}; }`}))):this.whens.forEach(((n,r)=>{const a=n.when.toJS(t,e,i),o=`r = ${n.then.toJS(t,e,i)}`;s+=`${0===r?"if":" else if"} (${a}) { ${o}; }`})),this.elses&&(s+=` else { r = ${this.elses.toJS(t,e,i)}; }`),s+="; return r; }))("+t+", params, alasql)",s},U.Json=function(t){return Object.assign(this,t)},U.Json.prototype.toString=function(){var t="";return(t+=ot(this.value))+""};const ot=t.utils.JSONtoString=function(t){if("string"==typeof t)return`"${t}"`;if("number"==typeof t||"boolean"==typeof t)return String(t);if("bigint"==typeof t)return`${t.toString()}n`;if(Array.isArray(t))return`[${t.map((t=>ot(t))).join(",")}]`;if("object"==typeof t){if(!t.toJS||t instanceof U.Json){const e=[];for(const i in t){const s="string"==typeof i?`"${i}"`:String(i),n=ot(t[i]);e.push(`${s}:${n}`)}return`{${e.join(",")}}`}if(t.toString)return t.toString();throw new Error(`1: Cannot show JSON object ${JSON.stringify(t)}`)}throw new Error(`2: Cannot show JSON object ${JSON.stringify(t)}`)};function ht(t,e,i,s){var n="";if("string"==typeof t)n='"'+t+'"';else if("number"==typeof t)n="("+t+")";else if("boolean"==typeof t)n=t;else if("bigint"==typeof t)n=t.toString()+"n";else{if("object"!=typeof t)throw new Error("2Can not parse JSON object "+JSON.stringify(t));if(Array.isArray(t))n+=`[${t.map((t=>ht(t,e,i,s))).join(",")}]`;else if(!t.toJS||t instanceof U.Json){let r=[];for(const n in t){let a="string"==typeof n?`"${n}"`:n.toString(),o=ht(t[n],e,i,s);r.push(`${a}:${o}`)}n=`{${r.join(",")}}`}else{if(!t.toJS)throw new Error(`Cannot parse JSON object ${JSON.stringify(t)}`);n=t.toJS(e,i,s)}}return n}U.Json.prototype.toJS=function(t,e,i){return ht(this.value,t,e,i)},U.Convert=function(t){return Object.assign(this,t)},U.Convert.prototype.toString=function(){var t="CONVERT(";return t+=this.dbtypeid,typeof this.dbsize<"u"&&(t+="("+this.dbsize,this.dbprecision&&(t+=","+this.dbprecision),t+=")"),t+=","+this.expression.toString(),this.style&&(t+=","+this.style),t+")"},U.Convert.prototype.toJS=function(t,e,i){return`alasql.stdfn.CONVERT(${this.expression.toJS(t,e,i)}, {\n dbtypeid: "${this.dbtypeid}",\n dbsize: ${this.dbsize},\n dbprecision: ${this.dbprecision},\n style: ${this.style}\n })`},t.stdfn.CONVERT=function(t,e){var i,s=t,n=e.dbtypeid?.toUpperCase();if((e.style||"Date"==e.dbtypeid||["DATE","DATETIME","DATETIME2"].indexOf(n)>-1)&&(i=function(t){var e=t.getMonth()+1,i=t.getYear(),s=t.getFullYear(),n=t.getDate();return{month:e,year:i,fullYear:s,date:n,day:t.toString().substr(4,3),formattedDate:("0"+n).substr(-2),formattedMonth:("0"+e).substr(-2),formattedYear:("0"+i).substr(-2),formattedHour:("0"+t.getHours()).substr(-2),formattedMinutes:("0"+t.getMinutes()).substr(-2),formattedSeconds:("0"+t.getSeconds()).substr(-2),formattedMilliseconds:("00"+t.getMilliseconds()).substr(-3)}}(/\d{8}/.test(s)?new Date(+s.substr(0,4),+s.substr(4,2)-1,+s.substr(6,2)):ut(s))),e.style)switch(e.style){case 1:s=i.formattedMonth+"/"+i.formattedDate+"/"+i.formattedYear;break;case 2:s=i.formattedYear+"."+i.formattedMonth+"."+i.formattedDate;break;case 3:s=i.formattedDate+"/"+i.formattedMonth+"/"+i.formattedYear;break;case 4:s=i.formattedDate+"."+i.formattedMonth+"."+i.formattedYear;break;case 5:s=i.formattedDate+"-"+i.formattedMonth+"-"+i.formattedYear;break;case 6:s=i.formattedDate+" "+i.day.toLowerCase()+" "+i.formattedYear;break;case 7:s=i.day+" "+i.formattedDate+","+i.formattedYear;break;case 8:case 108:s=i.formattedHour+":"+i.formattedMinutes+":"+i.formattedSeconds;break;case 10:s=i.formattedMonth+"-"+i.formattedDate+"-"+i.formattedYear;break;case 11:s=i.formattedYear+"/"+i.formattedMonth+"/"+i.formattedDate;break;case 12:s=i.formattedYear+i.formattedMonth+i.formattedDate;break;case 101:s=i.formattedMonth+"/"+i.formattedDate+"/"+i.fullYear;break;case 102:s=i.fullYear+"."+i.formattedMonth+"."+i.formattedDate;break;case 103:s=i.formattedDate+"/"+i.formattedMonth+"/"+i.fullYear;break;case 104:s=i.formattedDate+"."+i.formattedMonth+"."+i.fullYear;break;case 105:s=i.formattedDate+"-"+i.formattedMonth+"-"+i.fullYear;break;case 106:s=i.formattedDate+" "+i.day.toLowerCase()+" "+i.fullYear;break;case 107:s=i.day+" "+i.formattedDate+","+i.fullYear;break;case 110:s=i.formattedMonth+"-"+i.formattedDate+"-"+i.fullYear;break;case 111:s=i.fullYear+"/"+i.formattedMonth+"/"+i.formattedDate;break;case 112:s=i.fullYear+i.formattedMonth+i.formattedDate;break;default:throw new Error("The CONVERT style "+e.style+" is not realized yet.")}switch(n){case"DATE":return`${i.formattedYear}.${i.formattedMonth}.${i.formattedDate}`;case"DATETIME":case"DATETIME2":return`${i.fullYear}.${i.formattedMonth}.${i.formattedDate} ${i.formattedHour}:${i.formattedMinutes}:${i.formattedSeconds}.${i.formattedMilliseconds}`;case"MONEY":return(0|(r=+s))+100*r%100/100;case"BOOLEAN":return!!s;case"INT":case"INTEGER":case"SMALLINT":case"BIGINT":case"SERIAL":case"SMALLSERIAL":case"BIGSERIAL":return 0|s;case"STRING":case"VARCHAR":case"NVARCHAR":case"CHARACTER VARIABLE":return e.dbsize?String(s).substr(0,e.dbsize):String(s);case"CHAR":case"CHARACTER":case"NCHAR":return(s+" ".repeat(e.dbsize)).substr(0,e.dbsize);case"NUMBER":case"FLOAT":case"DECIMAL":case"NUMERIC":var r=+s;return void 0!==e.dbsize&&(r=parseFloat(r.toPrecision(e.dbsize))),void 0!==e.dbprecision&&(r=parseFloat(r.toFixed(e.dbprecision))),r;case"JSON":if("object"==typeof s)return s;try{return JSON.parse(s)}catch{throw new Error("Cannot convert string to JSON")}default:return s}},U.ColumnDef=function(t){return Object.assign(this,t)},U.ColumnDef.prototype.toString=function(){let t=this.columnid;return this.dbtypeid&&(t+=" "+this.dbtypeid),this.dbsize&&(t+="("+this.dbsize,this.dbprecision&&(t+=","+this.dbprecision),t+=")"),this.primarykey&&(t+=" PRIMARY KEY"),this.notnull&&(t+=" NOT NULL"),t},U.CreateTable=function(t){return Object.assign(this,t)},U.CreateTable.prototype.toString=function(){let t=`CREATE${this.temporary?" TEMPORARY":""}${this.view?" VIEW":" "+(this.class?"CLASS":"TABLE")}${this.ifnotexists?" IF NOT EXISTS":""} ${this.table.toString()}`;return this.viewcolumns&&(t+=`(${this.viewcolumns.map((t=>t.toString())).join(",")})`),t+=this.as?` AS ${this.as}`:` (${this.columns.map((t=>t.toString())).join(",")})`,this.view&&this.select&&(t+=` AS ${this.select.toString()}`),t},U.CreateTable.prototype.execute=function(e,i,s){var n=t.databases[this.table.databaseid||e],r=this.table.tableid;if(!r)throw new Error("Table name is not defined");var a=this.columns,o=this.constraints||[];if(this.ifnotexists&&n.tables[r])return s?s(0):0;if(n.tables[r])throw new Error("Can not create table '"+r+"', because it already exists in the database '"+n.databaseid+"'");var h=n.tables[r]=new t.Table;this.class&&(h.isclass=!0);var l,c=[],u=[];if(a&&a.forEach((function(i){var s=i.dbtypeid;t.fn[s]||(s=s.toUpperCase()),["SERIAL","SMALLSERIAL","BIGSERIAL"].indexOf(s)>-1&&(i.identity={value:1,step:1});var n={columnid:i.columnid,dbtypeid:s,dbsize:i.dbsize,dbprecision:i.dbprecision,notnull:i.notnull,identity:i.identity};if(i.identity&&(h.identities[i.columnid]={value:+i.identity.value,step:+i.identity.step}),i.check&&h.checks.push({id:i.check.constrantid,fn:new Function("r,params,alasql","var y;return "+i.check.expression.toJS("r",""))}),i.default&&c.push(JSON.stringify(""+i.columnid)+":"+i.default.toJS("r","")),i.primarykey){var r=h.pk={};r.columns=[i.columnid],r.onrightfns=`r[${JSON.stringify(i.columnid)}]`,r.onrightfn=new Function("r","var y;return "+r.onrightfns),r.hh=b(r.onrightfns),h.uniqs[r.hh]={}}if(i.unique){var a={};h.uk=h.uk||[],h.uk.push(a),a.columns=[i.columnid],a.onrightfns=`r[${JSON.stringify(i.columnid)}]`,a.onrightfn=new Function("r","var y;return "+a.onrightfns),a.hh=b(a.onrightfns),h.uniqs[a.hh]={}}if(i.foreignkey){var o=i.foreignkey.table,l=t.databases[o.databaseid||e].tables[o.tableid];if(typeof o.columnid>"u"){if(!(l.pk.columns&&l.pk.columns.length>0))throw new Error("FOREIGN KEY allowed only to tables with PRIMARY KEYs");o.columnid=l.pk.columns[0]}n.foreignkey={tableid:o.tableid,columnid:o.columnid},h.checks.push({fn:function(t){var e={},s=t[i.columnid];if(null!=s&&("number"!=typeof s||!isNaN(s))){e[o.columnid]=s;var n=l.pk.onrightfn(e);if(!l.uniqs[l.pk.hh][n])throw new Error('Foreign key "'+s+'" not found in table "'+o.tableid+'"')}return!0},fk:!0})}i.onupdate&&u.push(`r[${JSON.stringify(i.columnid)}]=`+i.onupdate.toJS("r","")),h.columns.push(n),h.xcolumns[n.columnid]=n})),h.defaultfns=c.join(","),h.onupdatefns=u.join(";"),o.forEach((function(i){var s;if("PRIMARY KEY"===i.type){if(h.pk)throw new Error("Primary key already exists");var n=h.pk={};n.columns=i.columns,n.onrightfns=n.columns.map((function(t){return`r[${JSON.stringify(t)}]`})).join("+'`'+"),n.onrightfn=new Function("r","var y;return "+n.onrightfns),n.hh=b(n.onrightfns),h.uniqs[n.hh]={},n.columns.forEach((function(t){h.xcolumns[t]&&(h.xcolumns[t].primarykey=!0)}))}else if("CHECK"===i.type)s=new Function("r,params,alasql","var y;return "+i.expression.toJS("r",""));else if("UNIQUE"===i.type){var r={};h.uk=h.uk||[],h.uk.push(r),r.columns=i.columns,r.onrightfns=r.columns.map((function(t){return t.expression.toJS("r","")})).join("+'`'+"),r.onrightfn=new Function("r","var y;return "+r.onrightfns),r.hh=b(r.onrightfns),h.uniqs[r.hh]={}}else if("FOREIGN KEY"===i.type){var a=i.fktable;if(i.fkcolumns&&i.fkcolumns.length>0&&(a.fkcolumns=i.fkcolumns),typeof a.fkcolumns>"u"&&(a.fkcolumns=t.databases[a.databaseid||e].tables[a.tableid].pk.columns),a.columns=i.columns,a.fkcolumns.length>a.columns.length)throw new Error("Invalid foreign key on table "+h.tableid);a.columns.forEach((function(t,e){h.xcolumns[t]&&(h.xcolumns[t].foreignkey={tableid:a.tableid,columnid:a.fkcolumns[e],constraintid:i.constraintid})})),s=function(i){var s={};if(a.fkcolumns.forEach((function(t,e){var n=i[a.columns[e]];null!=n&&("number"!=typeof n||!isNaN(n))&&(s[t]=n)})),0===Object.keys(s).length)return!0;if(Object.keys(s).length!==a.columns.length)throw new Error("Invalid foreign key on table "+h.tableid);var n=t.databases[a.databaseid||e].tables[a.tableid],r=n.pk.onrightfn(s);if(!n.uniqs[n.pk.hh][r]){var o=a.columns.map((function(t){return i[t]}));throw new Error('Foreign key "'+o.join(", ")+'" not found in table "'+a.tableid+'"')}return!0}}s&&h.checks.push({fn:s,id:i.constraintid,fk:"FOREIGN KEY"===i.type})})),this.view&&this.viewcolumns){var f=this;this.viewcolumns.forEach((function(t,e){f.select.columns[e].as=t.columnid}))}return this.view&&this.select&&(h.view=!0,h.viewSelect=this.select,h.viewDatabaseid=this.table.databaseid||e),n.engineid?t.engines[n.engineid].createTable(this.table.databaseid||e,r,this.ifnotexists,s):(h.insert=function(s,n,r){var a=t.inserted;t.inserted=[s];var o=this;n&&r&&(r=!1);var h=!1,l=!1;for(var c in o.beforeinsert)(T=o.beforeinsert[c])&&!1===t.executeTrigger(T,e,s)&&(l=l||!0);if(!l){var u=!1;for(c in o.insteadofinsert)u=!0,(T=o.insteadofinsert[c])&&t.executeTrigger(T,e,s);if(!u){for(var f in o.identities){var d=o.identities[f];(typeof s[f]>"u"||null===s[f])&&(s[f]=d.value)}if(o.checks&&o.checks.length>0&&o.checks.forEach((function(e){if(!1===e.fn(s,{},t))throw new Error("Violation of CHECK constraint "+(e.id||""))})),o.columns.forEach((function(t){if(t.notnull&&typeof s[t.columnid]>"u")throw new Error("Wrong NULL value in NOT NULL column "+t.columnid)})),o.pk){var p=(m=o.pk).onrightfn(s);if(typeof o.uniqs[m.hh][p]<"u"){if(!n){if(r)return t.inserted=a,!1;throw new Error("Cannot insert record, because it already exists in primary key index")}h=o.uniqs[m.hh][p]}}if(o.uk&&o.uk.length)for(var b=0;b<o.uk.length;b++){var v=o.uk[b],E=v.onrightfn(s);if(typeof o.uniqs[v.hh][E]<"u"){if(!n){if(r)return t.inserted=a,!1;throw new Error("Cannot insert record, because it already exists in unique index")}h=o.uniqs[v.hh][E]}}if(h)o.update((function(t){for(var e in s)t[e]=s[e]}),o.data.indexOf(h),i);else{for(var f in o.data.push(s),o.identities)d=o.identities[f],typeof s[f]<"u"&&null!==s[f]&&+s[f]>=d.value?d.value=+s[f]+d.step:d.value+=d.step;var m;if(o.pk&&(p=(m=o.pk).onrightfn(s),o.uniqs[m.hh][p]=s),o.uk&&o.uk.length&&o.uk.forEach((function(t){var e=t.onrightfn(s);o.uniqs[t.hh][e]=s})),o.inddefs)for(var g in o.inddefs){var w=o.inddefs[g],y=w.hh;o.indices[y]&&(p=new Function("r,params,alasql","return "+w.rightfns)(s,i,t),o.indices[y][p]||(o.indices[y][p]=[]),o.indices[y][p].push(s))}}for(var c in o.afterinsert){var T;(T=o.afterinsert[c])&&t.executeTrigger(T,e,s)}t.inserted=a}}},h.delete=function(i){var s=this,n=s.data[i],r=!1;for(var a in s.beforedelete)(h=s.beforedelete[a])&&!1===t.executeTrigger(h,e,n)&&(r=r||!0);if(r)return!1;var o=!1;for(var a in s.insteadofdelete){var h;o=!0,(h=s.insteadofdelete[a])&&t.executeTrigger(h,e,n)}if(!o){if(this.pk){var l=this.pk,c=l.onrightfn(n);if(typeof this.uniqs[l.hh][c]>"u")throw new Error("Something wrong with primary key index on table");this.uniqs[l.hh][c]=void 0}s.uk&&s.uk.length&&s.uk.forEach((function(t){var e=t.onrightfn(n);if(typeof s.uniqs[t.hh][e]>"u")throw new Error("Something wrong with unique index on table");s.uniqs[t.hh][e]=void 0}))}},h.deleteall=function(){this.data.length=0,this.pk&&(this.uniqs[this.pk.hh]={}),h.uk&&h.uk.length&&h.uk.forEach((function(t){h.uniqs[t.hh]={}}))},h.update=function(i,s,n){var r,a=T(this.data[s]);if(this.pk&&((r=this.pk).pkaddr=r.onrightfn(a,n),typeof this.uniqs[r.hh][r.pkaddr]>"u")){this.uniqs[r.hh]={};for(var o=0;o<this.data.length;o++){var l=r.onrightfn(this.data[o]);this.uniqs[r.hh][l]=this.data[o]}r.pkaddr=r.onrightfn(a,n)}h.uk&&h.uk.length&&h.uk.forEach((function(t){if(t.ukaddr=t.onrightfn(a),typeof h.uniqs[t.hh][t.ukaddr]>"u"){h.uniqs[t.hh]={};for(var e=0;e<h.data.length;e++){var i=t.onrightfn(h.data[e]);h.uniqs[t.hh][i]=h.data[e]}t.ukaddr=t.onrightfn(a)}})),i(a,n,t);var c=!1;for(var u in h.beforeupdate)(d=h.beforeupdate[u])&&!1===t.executeTrigger(d,e,this.data[s],a)&&(c=c||!0);if(c)return!1;var f=!1;for(var u in h.insteadofupdate)f=!0,(d=h.insteadofupdate[u])&&t.executeTrigger(d,e,this.data[s],a);if(!f){if(h.checks&&h.checks.length>0&&h.checks.forEach((function(e){if(!1===e.fn(a,n,t))throw new Error("Violation of CHECK constraint "+(e.id||""))})),h.columns.forEach((function(t){if(t.notnull&&typeof a[t.columnid]>"u")throw new Error("Wrong NULL value in NOT NULL column "+t.columnid)})),this.pk&&(r.newpkaddr=r.onrightfn(a),typeof this.uniqs[r.hh][r.newpkaddr]<"u"&&r.newpkaddr!==r.pkaddr))throw new Error("Record already exists");for(var u in h.uk&&h.uk.length&&h.uk.forEach((function(t){if(t.newukaddr=t.onrightfn(a),typeof h.uniqs[t.hh][t.newukaddr]<"u"&&t.newukaddr!==t.ukaddr)throw new Error("Record already exists")})),this.pk&&(this.uniqs[r.hh][r.pkaddr]=void 0,this.uniqs[r.hh][r.newpkaddr]=a),h.uk&&h.uk.length&&h.uk.forEach((function(t){h.uniqs[t.hh][t.ukaddr]=void 0,h.uniqs[t.hh][t.newukaddr]=a})),this.data[s]=a,h.afterupdate){var d;(d=h.afterupdate[u])&&t.executeTrigger(d,e,this.data[s],a)}}},t.options.nocount||(l=1),s&&(l=s(l)),l)},t.fn.Date=Object,t.fn.Date=Date,t.fn.Number=Number,t.fn.String=String,t.fn.Boolean=Boolean,nt.EXTEND=t.utils.extend,nt.CHAR=String.fromCharCode.bind(String),nt.ASCII=function(t){return t.charCodeAt(0)},nt.COALESCE=function(){for(var t=0;t<arguments.length;t++)if(!(null===arguments[t]||typeof arguments[t]>"u"||"number"==typeof arguments[t]&&isNaN(arguments[t])))return arguments[t]},nt.USER=function(){return"alasql"},nt.OBJECT_ID=function(e){return!!t.tables[e]},nt.DATE=function(t){return isNaN(t)||8!==t.length?ut(t):new Date(+t.substr(0,4),+t.substr(4,2)-1,+t.substr(6,2))},nt.NOW=function(){if(t.options.dateAsString){var e=new Date,i=e.getFullYear()+"-"+("0"+(e.getMonth()+1)).substr(-2)+"-"+("0"+e.getDate()).substr(-2);return(i+=" "+("0"+e.getHours()).substr(-2)+":"+("0"+e.getMinutes()).substr(-2)+":"+("0"+e.getSeconds()).substr(-2))+"."+("00"+e.getMilliseconds()).substr(-3)}return new Date},nt.GETDATE=nt.NOW,nt.CURRENT_TIMESTAMP=nt.NOW,nt.CURDATE=nt.CURRENT_DATE=function(){var e=new Date;return e.setHours(0,0,0,0),t.options.dateAsString?e.getFullYear()+"-"+("0"+(e.getMonth()+1)).substr(-2)+"-"+("0"+e.getDate()).substr(-2):e},nt.SECOND=function(t){return(t=ut(t)).getSeconds()},nt.MINUTE=function(t){return(t=ut(t)).getMinutes()},nt.HOUR=function(t){return(t=ut(t)).getHours()},nt.DAYOFWEEK=nt.WEEKDAY=function(t){return(t=ut(t)).getDay()},nt.DAY=nt.DAYOFMONTH=function(t){return(t=ut(t)).getDate()},nt.MONTH=function(t){return(t=ut(t)).getMonth()+1},nt.YEAR=function(t){return(t=ut(t)).getFullYear()};var lt={year:31536e6,quarter:7884e6,month:2592e6,week:6048e5,day:864e5,dayofyear:864e5,weekday:864e5,hour:36e5,minute:6e4,second:1e3,millisecond:1,microsecond:.001};t.stdfn.DATEDIFF=function(t,e,i){return(ut(i).getTime()-ut(e).getTime())/lt[t.toLowerCase()]|0},t.stdfn.DATEADD=function(t,e,i){var s=ut(i);switch(t=t.toLowerCase()){case"year":s.setFullYear(s.getFullYear()+e);break;case"quarter":s.setMonth(s.getMonth()+3*e);break;case"month":s.setMonth(s.getMonth()+e);break;default:s=new Date(s.getTime()+e*lt[t])}return s},t.stdfn.INTERVAL=function(t,e){return t*lt[e.toLowerCase()]},t.stdfn.DATE_ADD=t.stdfn.ADDDATE=function(t,e){var i=ut(t).getTime()+e;return new Date(i)},t.stdfn.DATE_SUB=t.stdfn.SUBDATE=function(t,e){var i=ut(t).getTime()-e;return new Date(i)};var ct=/^\d{4}\.\d{2}\.\d{2} \d{2}:\d{2}:\d{2}/;function ut(t){return"string"==typeof t&&ct.test(t)&&(t=t.replace(".","-").replace(".","-")),new Date(t)}function ft(t,e,i){return t.map((function(t){for(var s={},n=0;n<i.length&&n<e.length;n++)s[i[n]]=t[e[n]];return s}))}function dt(t){var e=function(){this.message=t};return(e.prototype=Object.create(Error.prototype)).constructor=e,e}U.DropTable=function(t){return Object.assign(this,t)},U.DropTable.prototype.toString=function(){var t="DROP ";return t+=this.view?"VIEW":"TABLE",this.ifexists&&(t+=" IF EXISTS"),t+" "+this.tables.toString()},U.DropTable.prototype.execute=function(e,i,s){var n=this.ifexists,r=0,a=0,o=this.tables.length;return this.tables.forEach((function(i){var h=t.databases[i.databaseid||e],l=i.tableid;if(!n||n&&h.tables[l]){if(h.tables[l])h.engineid?t.engines[h.engineid].dropTable(i.databaseid||e,l,n,(function(t){delete h.tables[l],r+=t,++a==o&&s&&s(r)})):(delete h.tables[l],r++,++a==o&&s&&s(r));else if(!t.options.dropifnotexists)throw new Error(`Can not drop table ${JSON.stringify(i.tableid)} because it does not exist in the database.`)}else++a==o&&s&&s(r)})),r},U.TruncateTable=function(t){return Object.assign(this,t)},U.TruncateTable.prototype.toString=function(){return"TRUNCATE TABLE"+" "+this.table.toString()},U.TruncateTable.prototype.execute=function(e,i,s){var n=t.databases[this.table.databaseid||e],r=this.table.tableid;if(n.engineid)return t.engines[n.engineid].truncateTable(this.table.databaseid||e,r,this.ifexists,s);if(!n.tables[r])throw new Error("Cannot truncate table becaues it does not exist");return n.tables[r].data=[],s?s(0):0},U.CreateVertex=function(t){return Object.assign(this,t)},U.CreateVertex.prototype.toString=function(){var t="CREATE VERTEX ";return this.class&&(t+=this.class+" "),this.sharp&&(t+="#"+this.sharp+" "),this.sets?t+=this.sets.toString():this.content?t+=this.content.toString():this.select&&(t+=this.select.toString()),t},U.CreateVertex.prototype.toJS=function(t){return"this.queriesfn["+(this.queriesidx-1)+"](this.params,null,"+t+")"},U.CreateVertex.prototype.compile=function(e){var i=e,s=this.sharp;if(typeof this.name<"u")var n="x.name="+this.name.toJS(),r=new Function("x",n);if(this.sets&&this.sets.length>0){n=this.sets.map((function(t){return`x[${JSON.stringify(t.column.columnid)}]=`+t.expression.toJS("x","")})).join(";");var a=new Function("x,params,alasql",n)}return function(e,n){var o,h=t.databases[i],l={$id:typeof s<"u"?s:h.counter++,$node:"VERTEX"};return h.objects[l.$id]=l,o=l,r&&r(l),a&&a(l,e,t),n&&(o=n(o)),o}},U.CreateEdge=function(t){return Object.assign(this,t)},U.CreateEdge.prototype.toString=function(){var t="CREATE EDGE ";return this.class&&(t+=this.class+" "),t},U.CreateEdge.prototype.toJS=function(t){return"this.queriesfn["+(this.queriesidx-1)+"](this.params,null,"+t+")"},U.CreateEdge.prototype.compile=function(e){var i=e,s=new Function("params,alasql","var y;return "+this.from.toJS()),n=new Function("params,alasql","var y;return "+this.to.toJS());if(typeof this.name<"u")var r="x.name="+this.name.toJS(),a=new Function("x",r);if(this.sets&&this.sets.length>0){r=this.sets.map((function(t){return`x[${JSON.stringify(t.column.columnid)}]=`+t.expression.toJS("x","")})).join(";");var o=new Function("x,params,alasql","var y;"+r)}return(e,r)=>{let h=0,l=t.databases[i],c={$id:l.counter++,$node:"EDGE"},u=s(e,t),f=n(e,t);return c.$in=[u.$id],c.$out=[f.$id],u.$out=u.$out||[],u.$out.push(c.$id),f.$in=f.$in||[],f.$in.push(c.$id),l.objects[c.$id]=c,h=c,a?.(c),o?.(c,e,t),r?r(h):h}},U.CreateGraph=function(t){return Object.assign(this,t)},U.CreateGraph.prototype.toString=function(){var t="CREATE GRAPH ";return this.class&&(t+=this.class+" "),t},U.CreateGraph.prototype.execute=function(e,i,s){var n=[];return this.from&&t.from[this.from.funcid]&&(this.graph=t.from[this.from.funcid.toUpperCase()]),this.graph.forEach((s=>{if(s.source){let a={};void 0!==s.as&&(t.vars[s.as]=a),void 0!==s.prop&&(a.name=s.prop),void 0!==s.sharp&&(a.$id=s.sharp),void 0!==s.name&&(a.name=s.name),void 0!==s.class&&(a.$class=s.class);let o=t.databases[e];a.$id=void 0!==a.$id?a.$id:o.counter++,a.$node="EDGE",void 0!==s.json&&Object.assign(a,new Function("params, alasql",`return ${s.json.toJS()}`)(i,t));const h=(e,i)=>{let s,n;return e.vars?(n=t.vars[e.vars],s="object"==typeof n?n:o.objects[n]):(s=o.objects[e.sharp||e.prop],void 0===s&&t.options.autovertex&&(e.prop||e.name)&&(s=function(e){var i=t.databases[t.useid].objects;for(var s in i)if(i[s].name===e)return i[s]}(e.prop||e.name)||r(e))),i&&s&&typeof s.$out>"u"&&(s.$out=[]),!i&&s&&typeof s.$in>"u"&&(s.$in=[]),s};let l=h(s.source,!0),c=h(s.target,!1);if(a.$in=[l.$id],a.$out=[c.$id],l.$out.push(a.$id),c.$in.push(a.$id),o.objects[a.$id]=a,void 0!==a.$class){let i=t.databases[e].tables[a.$class];if(void 0===i)throw new Error("No such class. Please use CREATE CLASS");i.data.push(a)}n.push(a.$id)}else r(s)})),s&&(n=s(n)),n;function r(s){var r={};typeof s.as<"u"&&(t.vars[s.as]=r),typeof s.prop<"u"&&(r.$id=s.prop,r.name=s.prop),typeof s.sharp<"u"&&(r.$id=s.sharp),typeof s.name<"u"&&(r.name=s.name),typeof s.class<"u"&&(r.$class=s.class);var a=t.databases[e];if(typeof r.$id>"u"&&(r.$id=a.counter++),r.$node="VERTEX",typeof s.json<"u"&&O(r,new Function("params,alasql","var y;return "+s.json.toJS())(i,t)),a.objects[r.$id]=r,typeof r.$class<"u"){if(typeof t.databases[e].tables[r.$class]>"u")throw new Error("No such class. Pleace use CREATE CLASS");t.databases[e].tables[r.$class].data.push(r)}return n.push(r.$id),r}},U.CreateGraph.prototype.compile1=function(e){const i=e,s=new Function("params, alasql",`return ${this.from.toJS()}`),n=new Function("params, alasql",`return ${this.to.toJS()}`);let r,a;if(void 0!==this.name){const t=`x.name = ${this.name.toJS()}`;r=new Function("x",t)}if(this.sets&&this.sets.length>0){const t=this.sets.map((t=>`x[${JSON.stringify(t.column.columnid)}] = ${t.expression.toJS("x","")}`)).join(";");a=new Function("x, params, alasql",`var y; ${t}`)}return(e,o)=>{let h=0;const l=t.databases[i],c={$id:l.counter++,$node:"EDGE"},u=s(e,t),f=n(e,t);return c.$in=[u.$id],c.$out=[f.$id],u.$out=u.$out||[],u.$out.push(c.$id),f.$in=f.$in||[],f.$in.push(c.$id),l.objects[c.$id]=c,h=c,r&&r(c),a&&a(c,e,t),o&&(h=o(h)),h}},U.AlterTable=function(t){return Object.assign(this,t)},U.AlterTable.prototype.toString=function(){let t="ALTER TABLE "+this.table.toString();return this.renameto&&(t+=" RENAME TO "+this.renameto),t},U.AlterTable.prototype.execute=function(e,i,s){let n=t.databases[e];if(n.dbversion=Date.now(),this.renameto){var r=this.table.tableid,a=this.renameto;if(n.tables[a])throw new Error(`Can not rename a table "${r}" to "${a}" because the table with this name already exists`);if(a===r)throw new Error(`Can not rename a table "${r}" to itself`);return n.tables[a]=n.tables[r],delete n.tables[r],s&&s(1),1}if(this.addcolumn){if(n=t.databases[this.table.databaseid||e],n.dbversion++,(d=n.tables[f=this.table.tableid]).xcolumns[p=this.addcolumn.columnid])throw new Error(`Cannot add column "${p}" because it already exists in table "${f}"`);d.columns.push(o={columnid:p,dbtypeid:this.addcolumn.dbtypeid,dbsize:this.dbsize,dbprecision:this.dbprecision,dbenum:this.dbenum,defaultfns:null}),d.xcolumns[p]=o;for(let t=0,e=d.data.length;t<e;t++)d.data[t][p]=void 0;return s?s(1):1}if(this.modifycolumn){let i=t.databases[this.table.databaseid||e];if(i.dbversion++,!(d=i.tables[f=this.table.tableid]).xcolumns[p=this.modifycolumn.columnid])throw new Error(`Cannot modify column "${p}" because it was not found in table "${f}"`);return(o=d.xcolumns[p]).dbtypeid=this.dbtypeid,o.dbsize=this.dbsize,o.dbprecision=this.dbprecision,o.dbenum=this.dbenum,s?s(1):1}if(this.renamecolumn){let i=t.databases[this.table.databaseid||e];i.dbversion++;var o,h=this.to;if(!(d=i.tables[f=this.table.tableid]).xcolumns[p=this.renamecolumn])throw new Error('Column "'+p+'" is not found in the table "'+f+'"');if(d.xcolumns[h])throw new Error('Column "'+h+'" already exists in the table "'+f+'"');if(p!=h){for(var l=0;l<d.columns.length;l++)d.columns[l].columnid==p&&(d.columns[l].columnid=h);d.xcolumns[h]=d.xcolumns[p],delete d.xcolumns[p];for(var c=0,u=d.data.length;c<u;c++)d.data[c][h]=d.data[c][p],delete d.data[c][p];return d.data.length}return s?s(0):0}if(this.dropcolumn){let i=t.databases[this.table.databaseid||e];i.dbversion++;var f,d=i.tables[f=this.table.tableid],p=this.dropcolumn,b=!1;for(l=0;l<d.columns.length;l++)if(d.columns[l].columnid==p){b=!0,d.columns.splice(l,1);break}if(!b)throw new Error(`Cannot drop column "${p}" because it was not found in the table ${f}"`);for(delete d.xcolumns[p],c=0,u=d.data.length;c<u;c++)delete d.data[c][p];return s?s(d.data.length):d.data.length}throw Error("Unknown ALTER TABLE method")},U.CreateIndex=function(t){return Object.assign(this,t)},U.CreateIndex.prototype.toString=function(){var t="CREATE";return this.unique&&(t+=" UNIQUE"),(t+=" INDEX "+this.indexid+" ON "+this.table.toString())+"("+this.columns.toString()+")"},U.CreateIndex.prototype.execute=function(e,i,s){var n=t.databases[this.table.databaseid||e],r=this.table.tableid,a=n.tables[r],o=this.indexid;n.indices[o]=r;var h=this.columns.map((function(t){return t.expression.toJS("r","")})).join("+'`'+"),l=new Function("r,params,alasql","return "+h);if(this.unique){var c={};if(a.uk=a.uk||[],a.uk.push(c),c.columns=this.columns,c.onrightfns=h,c.onrightfn=l,c.hh=b(h),a.uniqdefs[o]={rightfns:h,hh:c.hh},a.uniqs[c.hh]={},a.data.length>0)for(var u=0,f=a.data.length;u<f;u++){var d=l(a.data[u],i,t);if(typeof a.uniqs[c.hh][d]<"u")throw new Error("Cannot create unique index with duplicate values");a.uniqs[c.hh][d]=a.data[u]}}else{var p=b(h);a.inddefs[o]={rightfns:h,hh:p},a.indices[p]={};var v=a.indices[p]={};if(a.data.length>0)for(u=0,f=a.data.length;u<f;u++)v[d=l(a.data[u],i,t)]||(v[d]=[]),v[d].push(a.data[u])}var E=1;return s&&(E=s(E)),E},U.Reindex=function(t){return Object.assign(this,t)},U.Reindex.prototype.toString=function(){return"REINDEX "+this.indexid},U.Reindex.prototype.execute=function(e,i,s){var n=t.databases[e];n.tables[n.indices[this.indexid]].indexColumns();var r=1;return s&&(r=s(r)),r},U.DropIndex=function(t){return Object.assign(this,t)},U.DropIndex.prototype.toString=function(){return"DROP INDEX"+this.indexid},U.DropIndex.prototype.compile=function(){return function(){return 1}},U.WithSelect=function(t){return Object.assign(this,t)},U.WithSelect.prototype.toString=function(){var t="WITH ";return(t+=this.withs.map((function(t){var e="";return t.columns&&(e="("+t.columns.map((function(t){return t.columnid})).join(", ")+")"),(t.recursive?"RECURSIVE ":"")+t.name+e+" AS ("+t.select.toString()+")"})).join(", ")+" ")+this.select.toString()},U.WithSelect.prototype.execute=function(e,i,s){var n=this,r=[];return n.withs.forEach((function(s){if(r.push(t.databases[e].tables[s.name]),s.recursive)!function(e,i,s){var n=t.options.maxCteIterations||1e3,r=t.databases[i],a=e.name,o=r.tables[a]=new D({tableid:a});o.data=[];var h,l,c,u=e.select;if(u.unionall)delete(h=Object.assign({},u)).unionall,l=u.unionall;else{if(!u.union)return o.data=u.execute(i,s),e.columns&&(o.data=renameColumns(o.data,e.columns)),o.data;delete(h=Object.assign({},u)).union,l=u.union}e.columns&&e.columns.length>0&&(c=e.columns.map((function(t){return t.columnid})));var f=new U.Select(h);f.modifier="ALASQL_DETAILS";var d=f.execute(i,s),p=d.columns.map((function(t){return t.columnid}));c||(c=p);var b=ft(d.data,p,c);o.data=b.slice();for(var v=b,E=b.slice(),m=0;v.length>0&&m<n;){m++,delete r.tables[a],(o=r.tables[a]=new D({tableid:a})).data=v;var g=new U.Select(l);g.modifier="ALASQL_DETAILS";var w=g.execute(i,s);if(!w.data||0===w.data.length)break;var y=w.columns.map((function(t){return t.columnid}));v=ft(w.data,y,c);for(var T=0;T<v.length;T++)E.push(v[T])}o.data=E}(s,e,i);else{var n=t.databases[e].tables[s.name]=new D({tableid:s.name});n.data=s.select.execute(e,i),s.columns&&(n.data=renameColumns(n.data,s.columns))}})),this.select.execute(e,i,(function(i){return n.withs.forEach((function(i,s){r[s]?t.databases[e].tables[i.name]=r[s]:delete t.databases[e].tables[i.name]})),s&&(i=s(i)),i}))},U.If=function(t){return Object.assign(this,t)},U.If.prototype.toString=function(){var t="IF ";return t+=this.expression.toString(),t+=" "+this.thenstat.toString(),this.elsestat&&(t+=" ELSE "+this.thenstat.toString()),t},U.If.prototype.execute=function(e,i,s){var n;return new Function("params,alasql,p","var y;return "+this.expression.toJS("({})","",null)).bind(this)(i,t)?n=this.thenstat.execute(e,i,s):this.elsestat?n=this.elsestat.execute(e,i,s):s&&(n=s(n)),n},U.BreakException=dt("BREAK"),U.ContinueException=dt("CONTINUE"),U.While=function(t){return Object.assign(this,t)},U.While.prototype.toString=function(){var t="WHILE ";return(t+=this.expression.toString())+" "+this.loopstat.toString()},U.While.prototype.execute=function(e,i,s){var n=this,r=[],a=new Function("params,alasql,p","var y;return "+this.expression.toJS());if(s){var o=!1,h=function(l){o?r.push(l):o=!0,setTimeout((function(){a(i,t)?n.loopstat.execute(e,i,h):r=s(r)}),0)};h()}else for(;a(i,t);)try{var l=n.loopstat.execute(e,i);r.push(l)}catch(t){if(t instanceof U.BreakException)break;if(t instanceof U.ContinueException)continue;throw t}return r},U.Break=function(t){return Object.assign(this,t)},U.Break.prototype.toString=function(){return"BREAK"},U.Break.prototype.execute=function(){throw new U.BreakException},U.Continue=function(t){return Object.assign(this,t)},U.Continue.prototype.toString=function(){return"CONTINUE"},U.Continue.prototype.execute=function(){throw new U.ContinueException},U.BeginEnd=function(t){return Object.assign(this,t)},U.BeginEnd.prototype.toString=function(){return"BEGIN "+this.statements.toString()+" END"},U.BeginEnd.prototype.execute=function(t,e,i){var s=this,n=[];if(i){let a=function(){s.statements[r].execute(t,e,(function(t){if(n.push(t),++r<s.statements.length)return a();i&&(n=i(n))}))};var r=0;a()}else for(var a=0;a<s.statements.length;a++){var o=s.statements[a].execute(t,e);n.push(o)}return n},U.Insert=function(t){return Object.assign(this,t)},U.Insert.prototype.toString=function(){var t="INSERT ";return this.orreplace&&(t+="OR REPLACE "),this.replaceonly&&(t="REPLACE "),this.ignore&&(t+="IGNORE "),t+="INTO "+this.into.toString(),this.columns&&(t+="("+this.columns.toString()+")"),this.values&&(t+=" VALUES "+this.values.map((function(t){return"("+t.toString()+")"})).join(",")),this.select&&(t+=" "+this.select.toString()),this.setcolumns&&(t+=" SET ",t+=this.setcolumns.map((t=>t.toString())).join(", ")),this.output&&(t+=" OUTPUT ",t+=this.output.columns.map((t=>t.toString())).join(", "),this.output.intovar?t+=" INTO "+this.output.method+this.output.intovar:this.output.intotable&&(t+=" INTO "+this.output.intotable.toString(),this.output.intocolumns&&(t+="("+this.output.intocolumns.map((t=>t.toString())).join(", ")+")"))),t},U.Insert.prototype.toJS=function(t){return"this.queriesfn["+(this.queriesidx-1)+"](this.params,null,"+t+")"},U.Insert.prototype.compile=function(e){var i=this;if(i.into instanceof U.ParamValue)return U.compileParamValue(i.into.param,"INSERT",!0,e,i,"into");var s=t.databases[e=i.into.databaseid||e],n=i.into.tableid,r=s.tables[n];if(!r)throw"Table '"+n+"' could not be found";var a,o=function(t,e,i){return`The number of values (${t}) does not match the number of ${i} (${e}). If using a subquery, use INSERT INTO ... SELECT instead of INSERT INTO ... VALUES (SELECT ...)`},h="",l="",c=(h="db.tables['"+n+"'].dirty=true;","var a,aa=[],x;");if(this.values){this.exists&&(this.existsfn=this.exists.map((function(t){var i=t.compile(e);return i.query.modifier="RECORDSET",i}))),this.queries&&(this.queriesfn=this.queries.map((function(t){var i=t.compile(e);return i.query.modifier="RECORDSET",i}))),i.values.forEach((function(a){var c=[];if(i.columns){if(a.length!==i.columns.length)throw new Error(o(a.length,i.columns.length,"columns"));i.columns.forEach((function(e,i){var s="'"+e.columnid+"':";r.xcolumns&&r.xcolumns[e.columnid]?["INT","FLOAT","NUMBER","MONEY"].indexOf(r.xcolumns[e.columnid].dbtypeid)>=0?s+="(x="+a[i].toJS()+",x==undefined?undefined:+x)":t.fn[r.xcolumns[e.columnid].dbtypeid]?(s+="(new "+r.xcolumns[e.columnid].dbtypeid+"(",s+=a[i].toJS(),s+="))"):s+=a[i].toJS():s+=a[i].toJS(),c.push(s)}))}else if(Array.isArray(a)&&r.columns&&r.columns.length>0){if(a.length!==r.columns.length)throw new Error(o(a.length,r.columns.length,"table columns"));r.columns.forEach((function(e,i){var s="'"+e.columnid+"':";["INT","FLOAT","NUMBER","MONEY"].indexOf(e.dbtypeid)>=0?s+="+"+a[i].toJS():t.fn[e.dbtypeid]?(s+="(new "+e.dbtypeid+"(",s+=a[i].toJS(),s+="))"):s+=a[i].toJS(),c.push(s)}))}else l=ht(a);s.tables[n].defaultfns&&c.unshift(s.tables[n].defaultfns),h+=l?"a="+l+";":"a={"+c.join(",")+"};",s.tables[n].isclass&&(h+="var db=alasql.databases['"+e+"'];",h+='a.$class="'+n+'";',h+="a.$id=db.counter++;",h+="db.objects[a.$id]=a;"),s.tables[n].insert?(h+="var db=alasql.databases['"+e+"'];",h+="var inserted=db.tables['"+n+"'].insert(a,"+(i.orreplace?"true":"false")+","+(i.ignore?"true":"false")+");",i.ignore&&(h+="if(inserted!==false){"),(i.output||i.ignore)&&(h+="aa.push(a);"),i.ignore&&(h+="}")):h+="aa.push(a);"})),a=c+h,s.tables[n].insert||(h+="alasql.databases['"+e+"'].tables['"+n+"'].data=alasql.databases['"+e+"'].tables['"+n+"'].data.concat(aa);"),i.output?(h+="var output = [];",h+="for(var i=0;i<aa.length;i++){",h+="var r = aa[i];",h+="var outputRow = {};",i.output.columns.forEach((function(t){h+="*"===t.columnid?"for(var key in r){ outputRow[key] = r[key]; }":"outputRow['"+(t.as||t.columnid)+"']=r['"+t.columnid+"'];"})),h+="output.push(outputRow);",h+="}",h+="return output;"):h+=s.tables[n].insert&&s.tables[n].isclass?"return a.$id;":i.ignore?"return aa.length;":"return "+i.values.length;var u=new Function("db, params, alasql","var y;"+c+h).bind(this)}else if(this.select){this.select.modifier="RECORDSET",this.queries&&(this.select.queries=this.queries);var f=this.select.compile(e);if(s.engineid&&t.engines[s.engineid].intoTable)return function(e,i){var r=f(e);return t.engines[s.engineid].intoTable(s.databaseid,n,r.data,null,i)};var d=new Function("r,db,params,alasql","var defaults={"+r.defaultfns+"};for(var key in defaults){if(!(key in r)){r[key]=defaults[key]}}return r");u=function(t,e,s){var r=f(e).data,a=[];if(t.tables[n].insert)for(var o=0,h=r.length;o<h;o++){var l=T(r[o]);d(l,t,e,s),t.tables[n].insert(l,i.orreplace,i.ignore),a.push(l)}else a=r,t.tables[n].data=t.tables[n].data.concat(r);if(i.output){var c=[];for(o=0;o<a.length;o++){l=a[o];var u={};i.output.columns.forEach((function(t){if("*"===t.columnid)for(var e in l)u[e]=l[e];else u[t.as||t.columnid]=l[t.columnid]})),c.push(u)}return c}if(!s.options.nocount)return r.length}}else if(this.default)u=new Function("db,params,alasql","db.tables['"+n+"'].data.push({"+r.defaultfns+"});return 1;");else{if(!this.setcolumns)throw new Error("Wrong INSERT parameters");var p=[],b=[];this.setcolumns.forEach((function(t){p.push(t.column),b.push(t.expression)}));var v=this.columns,E=this.values;this.columns=p,this.values=[b];try{return U.Insert.prototype.compile.call(this,e)}finally{this.columns=v,this.values=E}}if(s.engineid&&t.engines[s.engineid].intoTable&&t.options.autocommit)var m=function(e,i){var r=new Function("db,params,alasql","var y;"+a+"return aa;")(s,e,t);return t.engines[s.engineid].intoTable(s.databaseid,n,r,null,i)};else m=function(i,s){var r=t.databases[e];t.options.autocommit&&r.engineid&&t.engines[r.engineid].loadTableData(e,n);var a=u(r,i,t);return t.options.autocommit&&r.engineid&&t.engines[r.engineid].saveTableData(e,n),t.options.nocount&&(a=void 0),s&&s(a),a};return m},U.Insert.prototype.execute=function(t,e,i){return this.compile(t)(e,i)},U.CreateTrigger=function(t){return Object.assign(this,t)},U.CreateTrigger.prototype.toString=function(){var t="CREATE TRIGGER "+this.trigger+" ";return this.when&&(t+=this.when+" "),t+=this.action+" ON ",this.table.databaseid&&(t+=this.table.databaseid+"."),(t+=this.table.tableid+" ")+this.statement.toString()};const pt=["beforeinsert","afterinsert","insteadofinsert","beforedelete","afterdelete","insteadofdelete","beforeupdate","afterupdate","insteadofupdate"];function bt(t){var e="";if(void 0===t)e+="undefined";else if(Array.isArray(t)){e+="<style>",e+="table {border:1px black solid; border-collapse: collapse; border-spacing: 0px;}",e+="td,th {border:1px black solid; padding-left:5px; padding-right:5px}",e+="th {background-color: #EEE}",e+="</style>",e+="<table>";var i=[];for(var s in t[0])i.push(s);e+="<tr><th>#",i.forEach((function(t){e+="<th>"+t}));for(var n=0,r=t.length;n<r;n++)e+="<tr><th>"+(n+1),i.forEach((function(i){e+="<td> ",t[n][i]==+t[n][i]?(e+='<div style="text-align:right">',e+=typeof t[n][i]>"u"?"NULL":t[n][i],e+="</div>"):e+=typeof t[n][i]>"u"?"NULL":"string"==typeof t[n][i]?t[n][i]:ot(t[n][i])}));e+="</table>"}else e+="<p>"+ot(t)+"</p>";return e}function vt(t,e,i){if(!(i<=0)){var s=(e-t.scrollTop)/i*10;setTimeout((function(){t.scrollTop!==e&&(t.scrollTop=t.scrollTop+s,vt(t,e,i-10))}),10)}}U.CreateTrigger.prototype.execute=function(e,i,s){let n=1;const r=this.trigger,a=t.databases[e=this.table.databaseid||e],{tableid:o}=this.table,h={action:this.action,when:this.when,statement:this.statement,funcid:this.funcid,tableid:o};a.triggers[r]=h;const l=`${this.when}${this.action}`.toLowerCase();return pt.includes(l)&&(a.tables[o]=a.tables[o]||{},a.tables[o][l]=a.tables[o][l]||{},a.tables[o][l][r]=h),s&&(n=s(n)),n},U.DropTrigger=function(t){return Object.assign(this,t)},U.DropTrigger.prototype.toString=function(){return"DROP TRIGGER "+this.trigger},U.DropTrigger.prototype.execute=function(e,i,s){let n=0;const r=t.databases[e],a=this.trigger,o=r.triggers[a];if(!o)throw new Error("Trigger not found");{const{tableid:t}=o;if(!t)throw new Error("Trigger Table not found");n=1,pt.forEach((e=>{delete r.tables[t][e][a]})),delete r.triggers[a]}return s&&(n=s(n)),n},t.executeTrigger=function(e,i,...s){if(e){if(e.funcid)return t.fn[e.funcid](...s);if(e.statement)return e.statement.expression&&e.statement.expression.funcid?t.fn[e.statement.expression.funcid](...s):e.statement.execute(i)}},U.Delete=function(t){return Object.assign(this,t)},U.Delete.prototype.toString=function(){var t="DELETE FROM "+this.table.toString();return this.where&&(t+=" WHERE "+this.where.toString()),this.output&&(t+=" OUTPUT ",t+=this.output.columns.map((t=>t.toString())).join(", "),this.output.intovar?t+=" INTO "+this.output.method+this.output.intovar:this.output.intotable&&(t+=" INTO "+this.output.intotable.toString(),this.output.intocolumns&&(t+="("+this.output.intocolumns.map((t=>t.toString())).join(", ")+")"))),t},U.Delete.prototype.compile=function(e){var i=this;if(this.table instanceof U.ParamValue)return U.compileParamValue(this.table.param,"DELETE",!0,e,i,"table");var s,n=this.table.tableid,r=t.databases[e=this.table.databaseid||e];if(this.where){this.exists&&(this.existsfn=this.exists.map((function(t){var i=t.compile(e);return i.query.modifier="RECORDSET",i}))),this.queries&&(this.queriesfn=this.queries.map((function(t){var i=t.compile(e);return i.query.modifier="RECORDSET",i})));var a=new Function("r,params,alasql","var y;return ("+this.where.toJS("r","")+")").bind(this);s=function(s,o){if(r.engineid&&t.engines[r.engineid].deleteFromTable)return t.engines[r.engineid].deleteFromTable(e,n,a,s,o);t.options.autocommit&&r.engineid&&("LOCALSTORAGE"==r.engineid||"FILESTORAGE"==r.engineid)&&t.engines[r.engineid].loadTableData(e,n);for(var h=r.tables[n],l=h.data.length,c=[],u=[],f=0,d=h.data.length;f<d;f++)a(h.data[f],s,t)?((i.output||h.afterdelete)&&u.push(T(h.data[f])),h.delete&&h.delete(f,s,t)):c.push(h.data[f]);if(h.data=c,h.afterdelete)for(f=0;f<u.length;f++)for(var p in h.afterdelete){var b=h.afterdelete[p];b&&t.executeTrigger(b,e,u[f])}var v=l-h.data.length;if(i.output){var E=[];for(f=0;f<u.length;f++){var m=u[f],g={};i.output.columns.forEach((function(t){if("*"===t.columnid)for(var e in m)g[e]=m[e];else g[t.as||t.columnid]=m[t.columnid]})),E.push(g)}v=E}return t.options.autocommit&&r.engineid&&("LOCALSTORAGE"==r.engineid||"FILESTORAGE"==r.engineid)&&t.engines[r.engineid].saveTableData(e,n),o&&(v=o(v)),v}}else s=function(s,a){t.options.autocommit&&r.engineid&&t.engines[r.engineid].loadTableData(e,n);var o=r.tables[n];o.dirty=!0;var h=r.tables[n].data.length,l=[];for(var c in i.output&&(l=o.data.map((function(t){return T(t)}))),r.tables[n].data.length=0,r.tables[n].uniqs)r.tables[n].uniqs[c]={};for(var c in r.tables[n].indices)r.tables[n].indices[c]={};t.options.autocommit&&r.engineid&&t.engines[r.engineid].saveTableData(e,n);var u=h;if(i.output){for(var f=[],d=0;d<l.length;d++){var p=l[d],b={};i.output.columns.forEach((function(t){if("*"===t.columnid)for(var e in p)b[e]=p[e];else b[t.as||t.columnid]=p[t.columnid]})),f.push(b)}u=f}return a&&a(u),u};return s},U.Delete.prototype.execute=function(t,e,i){return this.compile(t)(e,i)},U.Update=function(t){return Object.assign(this,t)},U.Update.prototype.toString=function(){var t="UPDATE "+this.table.toString();return this.columns&&(t+=" SET "+this.columns.toString()),this.where&&(t+=" WHERE "+this.where.toString()),this.output&&(t+=" OUTPUT ",t+=this.output.columns.map((t=>t.toString())).join(", "),this.output.intovar?t+=" INTO "+this.output.method+this.output.intovar:this.output.intotable&&(t+=" INTO "+this.output.intotable.toString(),this.output.intocolumns&&(t+="("+this.output.intocolumns.map((t=>t.toString())).join(", ")+")"))),t},U.SetColumn=function(t){return Object.assign(this,t)},U.SetColumn.prototype.toString=function(){return this.column.toString()+"="+this.expression.toString()},U.Update.prototype.compile=function(e){var i=this;if(this.table instanceof U.ParamValue)return U.compileParamValue(this.table.param,"UPDATE",!1,e,i,"table");e=this.table.databaseid||e;var s=this.table.tableid;if(this.where){this.exists&&(this.existsfn=this.exists.map((function(t){var i=t.compile(e);return i.query.modifier="RECORDSET",i}))),this.queries&&(this.queriesfn=this.queries.map((function(t){var i=t.compile(e);return i.query.modifier="RECORDSET",i})));var n=new Function("r,params,alasql","var y;return "+this.where.toJS("r","")).bind(this)}var r=t.databases[e].tables[s].onupdatefns||"";r+=";",this.columns.forEach((function(t){r+="r['"+t.column.columnid+"']="+t.expression.toJS("r","")+";"}));var a=new Function("r,params,alasql","var y;"+r);return function(r,o){var h=t.databases[e];if(h.engineid&&t.engines[h.engineid].updateTable)return t.engines[h.engineid].updateTable(e,s,a,n,r,o);t.options.autocommit&&h.engineid&&t.engines[h.engineid].loadTableData(e,s);var l=h.tables[s];if(!l)throw new Error("Table '"+s+"' not exists");for(var c=0,u=[],f=0,d=l.data.length;f<d;f++)if(!n||n(l.data[f],r,t)){var p=i.output?T(l.data[f]):null;l.update?l.update(a,f,r):a(l.data[f],r,t),i.output&&u.push({deleted:p,inserted:T(l.data[f])}),c++}t.options.autocommit&&h.engineid&&t.engines[h.engineid].saveTableData(e,s);var b=c;if(i.output){var v=[];for(f=0;f<u.length;f++){var E=u[f].deleted,m=u[f].inserted,g={};i.output.columns.forEach((function(t){if("*"===t.columnid)for(var e in m)g[e]=m[e];else g[t.as||t.columnid]="DELETED"===t.tableid?E[t.columnid]:m[t.columnid]})),v.push(g)}b=v}return o&&o(b),b}},U.Update.prototype.execute=function(t,e,i){return this.compile(t)(e,i)},U.Merge=function(t){return Object.assign(this,t)},U.Merge.prototype.toString=function(){let t=`MERGE ${this.into.tableid} `;return this.into.as&&(t+=`AS ${this.into.as} `),t+=`USING ${this.using.tableid} `,this.using.as&&(t+=`AS ${this.using.as} `),t+=`ON ${this.on.toString()} `,this.matches.forEach((e=>{t+="WHEN ",e.matched||(t+="NOT "),t+="MATCHED ",e.bytarget&&(t+="BY TARGET "),e.bysource&&(t+="BY SOURCE "),e.expr&&(t+=`AND ${e.expr.toString()} `),t+="THEN ",e.action.delete&&(t+="DELETE "),e.action.insert&&(t+="INSERT ",e.action.columns&&(t+=`(${e.action.columns.toString()}) `),e.action.values&&(t+=`VALUES (${e.action.values.toString()}) `),e.action.defaultvalues&&(t+="DEFAULT VALUES ")),e.action.update&&(t+="UPDATE ",t+=e.action.update.map((t=>t.toString())).join(", ")+" ")})),t},U.Merge.prototype.execute=function(t,e,i){var s=1;return i&&(s=i(s)),s},U.CreateDatabase=function(t){return Object.assign(this,t)},U.CreateDatabase.prototype.toString=function(){let t="CREATE ";return this.engineid&&(t+=`${this.engineid} `),t+="DATABASE ",this.ifnotexists&&(t+="IF NOT EXISTS "),t+=`${this.databaseid} `,this.args&&this.args.length>0&&(t+=`(${this.args.map((t=>t.toString())).join(", ")}) `),this.as&&(t+=`AS ${this.as}`),t},U.CreateDatabase.prototype.execute=function(e,i,s){if(this.args&&this.args.length>0&&this.args.map((function(e){return new Function("params,alasql","var y;return "+e.toJS())(i,t)})),this.engineid)return t.engines[this.engineid].createDatabase(this.databaseid,this.args,this.ifnotexists,this.as,s);var n=this.databaseid;if(t.databases[n])throw new Error("Database '"+n+"' already exists");new t.Database(n);var r=1;return s?s(r):r},U.AttachDatabase=function(t){return Object.assign(this,t)},U.AttachDatabase.prototype.toString=function(t){let e="ATTACH";return this.engineid&&(e+=` ${this.engineid}`),e+=` DATABASE ${this.databaseid}`,t&&(e+="(",t.length>0&&(e+=t.map((t=>t.toString())).join(", ")),e+=")"),this.as&&(e+=` AS ${this.as}`),e},U.AttachDatabase.prototype.execute=function(e,i,s){if(!t.engines[this.engineid])throw new Error('Engine "'+this.engineid+'" is not defined.');return t.engines[this.engineid].attachDatabase(this.databaseid,this.as,this.args,i,s)},U.DetachDatabase=function(t){return Object.assign(this,t)},U.DetachDatabase.prototype.toString=function(){return"DETACH"+" DATABASE "+this.databaseid},U.DetachDatabase.prototype.execute=function(e,i,s){if(!t.databases[this.databaseid].engineid)throw new Error('Cannot detach database "'+this.engineid+'", because it was not attached.');var n,r=this.databaseid;if(r===t.DEFAULTDATABASEID)throw new Error("Drop of default database is prohibited");if(t.databases[r]){var a=t.databases[r].engineid&&"FILESTORAGE"==t.databases[r].engineid,o=t.databases[r].filename||"";delete t.databases[r],a&&(t.databases[r]={},t.databases[r].isDetached=!0,t.databases[r].filename=o),r===t.useid&&t.use(),n=1}else{if(!this.ifexists)throw new Error("Database '"+r+"' does not exist");n=0}return s&&s(n),n},U.UseDatabase=function(t){return Object.assign(this,t)},U.UseDatabase.prototype.toString=function(){return"USE DATABASE "+this.databaseid},U.UseDatabase.prototype.execute=function(e,i,s){var n=this.databaseid;if(!t.databases[n])throw new Error("Database '"+n+"' does not exist");t.use(n);return s&&s(1),1},U.DropDatabase=function(t){return Object.assign(this,t)},U.DropDatabase.prototype.toString=function(){var t="DROP";return this.ifexists&&(t+=" IF EXISTS"),t+" DATABASE "+this.databaseid},U.DropDatabase.prototype.execute=function(e,i,s){if(this.engineid)return t.engines[this.engineid].dropDatabase(this.databaseid,this.ifexists,s);let n;const r=this.databaseid;if(r===t.DEFAULTDATABASEID)throw new Error("Drop of default database is prohibited");if(t.databases[r]){if(t.databases[r].engineid)throw new Error(`Cannot drop database '${r}', because it is attached. Detach it.`);delete t.databases[r],r===t.useid&&t.use(),n=1}else{if(!this.ifexists)throw new Error(`Database '${r}' does not exist`);n=0}return s&&s(n),n},U.Declare=function(t){return Object.assign(this,t)},U.Declare.prototype.toString=function(){let t="DECLARE ";return this.declares&&this.declares.length>0&&(t+=this.declares.map((t=>{let e=`@${t.variable} ${t.dbtypeid}`;return t.dbsize&&(e+=`(${t.dbsize}`,t.dbprecision&&(e+=`,${t.dbprecision}`),e+=")"),t.expression&&(e+=` = ${t.expression.toString()}`),e})).join(",")),t},U.Declare.prototype.execute=function(e,i,s){var n=1,r=this;return r.declares&&r.declares.length>0&&r.declares.forEach((function(e){var s=e.dbtypeid;t.fn[s]||(s=s.toUpperCase()),t.declares[e.variable]={dbtypeid:s,dbsize:e.dbsize,dbprecision:e.dbprecision},e.expression&&(t.vars[e.variable]=new Function("params,alasql","return "+e.expression.toJS("({})","",null)).bind(r)(i,t),t.declares[e.variable]&&(t.vars[e.variable]=t.stdfn.CONVERT(t.vars[e.variable],t.declares[e.variable])))})),s&&(n=s(n)),n},U.ShowDatabases=function(t){return Object.assign(this,t)},U.ShowDatabases.prototype.toString=function(){var t="SHOW DATABASES";return this.like&&(t+="LIKE "+this.like.toString()),t},U.ShowDatabases.prototype.execute=function(e,i,s){if(this.engineid)return t.engines[this.engineid].showDatabases(this.like,s);var n=this,r=[];for(var a in t.databases)r.push({databaseid:a});return n.like&&r&&r.length>0&&(r=r.filter((function(e){return t.utils.like(n.like.value,e.databaseid)}))),s&&s(r),r},U.ShowTables=function(t){return Object.assign(this,t)},U.ShowTables.prototype.toString=function(){var t="SHOW TABLES";return this.databaseid&&(t+=" FROM "+this.databaseid),this.like&&(t+=" LIKE "+this.like.toString()),t},U.ShowTables.prototype.execute=function(e,i,s){var n=t.databases[this.databaseid||e],r=this,a=[];for(var o in n.tables)a.push({tableid:o});return r.like&&a&&a.length>0&&(a=a.filter((function(e){return t.utils.like(r.like.value,e.tableid)}))),s&&s(a),a},U.ShowColumns=function(t){return Object.assign(this,t)},U.ShowColumns.prototype.toString=function(){var t="SHOW COLUMNS";return this.table.tableid&&(t+=" FROM "+this.table.tableid),this.databaseid&&(t+=" FROM "+this.databaseid),t},U.ShowColumns.prototype.execute=function(e,i,s){var n=t.databases[this.table.databaseid||this.databaseid||e].tables[this.table.tableid];if(n&&n.columns){var r=n.columns.map((function(t){return{columnid:t.columnid,dbtypeid:t.dbtypeid,dbsize:t.dbsize}}));return s&&s(r),r}return s&&s([]),[]},U.ShowIndex=function(t){return Object.assign(this,t)},U.ShowIndex.prototype.toString=function(){var t="SHOW INDEX";return this.table.tableid&&(t+=" FROM "+this.table.tableid),this.databaseid&&(t+=" FROM "+this.databaseid),t},U.ShowIndex.prototype.execute=function(e,i,s){var n=t.databases[this.table.databaseid||this.databaseid||e].tables[this.table.tableid],r=[];if(n&&n.indices)for(var a in n.indices)r.push({hh:a,len:Object.keys(n.indices[a]).length});return s&&s(r),r},U.ShowCreateTable=function(t){return Object.assign(this,t)},U.ShowCreateTable.prototype.toString=function(){var t="SHOW CREATE TABLE "+this.table.tableid;return this.databaseid&&(t+=" FROM "+this.databaseid),t},U.ShowCreateTable.prototype.execute=function(e){var i=t.databases[this.databaseid||e].tables[this.table.tableid];if(i){var s="CREATE TABLE "+this.table.tableid+" (",n=[];return i.columns&&(i.columns.forEach((function(t){var e=t.columnid+" "+t.dbtypeid;t.dbsize&&(e+="("+t.dbsize+")"),t.primarykey&&(e+=" PRIMARY KEY"),n.push(e)})),s+=n.join(", ")),s+")"}throw new Error('There is no such table "'+this.table.tableid+'"')},U.SetVariable=function(t){return Object.assign(this,t)},U.SetVariable.prototype.toString=function(){var t="SET ";return typeof this.value<"u"&&(t+=this.variable.toUpperCase()+" "+(this.value?"ON":"OFF")),this.expression&&(t+=this.method+this.variable+" = "+this.expression.toString()),t},U.SetVariable.prototype.execute=function(e,i,s){if(typeof this.value<"u"){let e=this.value;"ON"===e?e=!0:"OFF"===e&&(e=!1),t.options[this.variable]=e}else if(this.expression){this.exists&&(this.existsfn=this.exists.map((t=>{let i=t.compile(e);return i.query&&!i.query.modifier&&(i.query.modifier="RECORDSET"),i}))),this.queries&&(this.queriesfn=this.queries.map((t=>{let i=t.compile(e);return i.query&&!i.query.modifier&&(i.query.modifier="RECORDSET"),i})));let s=new Function("params, alasql","return "+this.expression.toJS("({})","",null)).bind(this)(i,t);if(t.declares[this.variable]&&(s=t.stdfn.CONVERT(s,t.declares[this.variable])),this.props&&this.props.length>0){let e;e="@"===this.method?`alasql.vars['${this.variable}']`:`params['${this.variable}']`,this.props.forEach((t=>{e+="string"==typeof t?`['${t}']`:"number"==typeof t?`[${t}]`:`[${t.toJS()}]`})),new Function("value, params, alasql",`${e} = value`)(s,i,t)}else"@"===this.method?t.vars[this.variable]=s:i[this.variable]=s}let n=1;return s&&(n=s(n)),n},t.test=function(e,i,s){if(0!==arguments.length){var n=Date.now();if(1===arguments.length)return s(),void t.con.log(Date.now()-n);2===arguments.length&&(s=i,i=1);for(var r=0;r<i;r++)s();t.con.results[e]=Date.now()-n}else t.log(t.con.results)},t.log=function(e,i){var n,r=t.useid,a=t.options.logtarget;if(s.isNode&&(a="console"),n="string"==typeof e?t(e,i):e,"console"===a||s.isNode)"string"==typeof e&&t.options.logprompt&&console.log(r+">",e),Array.isArray(n)&&console.table?console.table(n):console.log(ot(n));else{var o;o="output"===a?document.getElementsByTagName("output")[0]:"string"==typeof a?document.getElementById(a):a;var h="";if("string"==typeof e&&t.options.logprompt&&(h+="<pre><code>"+t.pretty(e)+"</code></pre>"),Array.isArray(n))if(0===n.length)h+="<p>[ ]</p>";else if("object"!=typeof n[0]||Array.isArray(n[0]))for(var l=0,c=n.length;l<c;l++)h+="<p>"+bt(n[l])+"</p>";else h+=bt(n);else h+=bt(n);o.innerHTML+=h}},t.clear=function(){var e=t.options.logtarget;s.isNode||s.isMeteorServer?console.clear&&console.clear():("output"===e?document.getElementsByTagName("output")[0]:"string"==typeof e?document.getElementById(e):e).innerHTML=""},t.write=function(e){var i=t.options.logtarget;s.isNode||s.isMeteorServer?console.log&&console.log(e):("output"===i?document.getElementsByTagName("output")[0]:"string"==typeof i?document.getElementById(i):i).innerHTML+=e},t.prompt=function(e,i,n){if(s.isNode)throw new Error("The prompt not realized for Node.js");var r=0;if("string"==typeof e&&(e=document.getElementById(e)),"string"==typeof i&&(i=document.getElementById(i)),i.textContent=t.useid,n){t.prompthistory.push(n),r=t.prompthistory.length;try{var a=Date.now();t.log(n),t.write('<p style="color:blue">'+(Date.now()-a)+" ms</p>")}catch(e){t.write("<p>"+t.useid+"> <b>"+n+"</b></p>"),t.write('<p style="color:red">'+e+"<p>")}}var o=e.getBoundingClientRect().top+document.getElementsByTagName("body")[0].scrollTop;vt(document.getElementsByTagName("body")[0],o,500),e.onkeydown=function(s){if(13===s.which){var n=e.value,a=t.useid;e.value="",t.prompthistory.push(n),r=t.prompthistory.length;try{var o=Date.now();t.log(n),t.write('<p style="color:blue">'+(Date.now()-o)+" ms</p>")}catch(e){t.write("<p>"+a+"> "+t.pretty(n,!1)+"</p>"),t.write('<p style="color:red">'+e+"<p>")}e.focus(),i.textContent=t.useid;var h=e.getBoundingClientRect().top+document.getElementsByTagName("body")[0].scrollTop;vt(document.getElementsByTagName("body")[0],h,500)}else 38===s.which?(--r<0&&(r=0),t.prompthistory[r]&&(e.value=t.prompthistory[r],s.preventDefault())):40===s.which&&(++r>=t.prompthistory.length?(r=t.prompthistory.length,e.value=""):t.prompthistory[r]&&(e.value=t.prompthistory[r],s.preventDefault()))}},U.BeginTransaction=function(t){return Object.assign(this,t)},U.BeginTransaction.prototype.toString=function(){return"BEGIN TRANSACTION"},U.BeginTransaction.prototype.execute=function(e,i,s){var n=1;return t.databases[e].engineid?t.engines[t.databases[t.useid].engineid].begin(e,s):(s&&(n=s(n)),n)},U.CommitTransaction=function(t){return Object.assign(this,t)},U.CommitTransaction.prototype.toString=function(){return"COMMIT TRANSACTION"},U.CommitTransaction.prototype.execute=function(e,i,s){var n=1;return t.databases[e].engineid?t.engines[t.databases[t.useid].engineid].commit(e,s):(s&&(n=s(n)),n)},U.RollbackTransaction=function(t){return Object.assign(this,t)},U.RollbackTransaction.prototype.toString=function(){return"ROLLBACK TRANSACTION"},U.RollbackTransaction.prototype.execute=function(e,i,s){var n=1;return t.databases[e].engineid?t.engines[t.databases[e].engineid].rollback(e,s):(s&&(n=s(n)),n)},t.options.tsql&&(t.stdfn.OBJECT_ID=function(e,i){typeof i>"u"&&(i="T"),i=i.toUpperCase();var s=e.split("."),n=t.useid,r=s[0];2==s.length&&(n=s[0],r=s[1]);var a=t.databases[n].tables;for(var o in n=t.databases[n].databaseid,a)if(o==r)return a[o].view&&"V"==i||!a[o].view&&"T"==i?n+"."+o:void 0}),t.options.mysql&&(t.fn.TIMESTAMPDIFF=function(e,i,s){return t.stdfn.DATEDIFF(e,i,s)}),(t.options.mysql||t.options.sqlite)&&(t.from.INFORMATION_SCHEMA=function(e,i,s,n,r){if("VIEWS"==e||"TABLES"==e){var a=[];for(var o in t.databases){var h=t.databases[o].tables;for(var l in h)(h[l].view&&"VIEWS"==e||!h[l].view&&"TABLES"==e)&&a.push({TABLE_CATALOG:o,TABLE_NAME:l})}return s&&(a=s(a,n,r)),a}throw new Error("Unknown INFORMATION_SCHEMA table")}),t.into.SQL=function(e,i,s,n,r){var a;"object"==typeof e&&(i=e,e=void 0);var o={};if(t.utils.extend(o,i),typeof o.tableid>"u")throw new Error("Table for INSERT TO is not defined.");var l="";0===n.length&&"object"==typeof s[0]&&(n=Object.keys(s[0]).map((function(t){return{columnid:t}})));for(var c=0,u=s.length;c<u;c++)l+="INSERT INTO "+i.tableid+"(",l+=n.map((function(t){return t.columnid})).join(","),l+=") VALUES (",l+=n.map((function(t){var e=s[c][t.columnid];return null==e?"NULL":((t.typeid&&("STRING"===t.typeid||"VARCHAR"===t.typeid||"NVARCHAR"===t.typeid||"CHAR"===t.typeid||"NCHAR"===t.typeid)||"string"==typeof e)&&(e="'"+h(e)+"'"),e)})).join(","),l+=");\n";return e=t.utils.autoExtFilename(e,"sql",i),a=t.utils.saveFile(e,l),r&&(a=r(a)),a},t.into.HTML=function(e,i,s,n,r){var a=1;if("object"!=typeof document){var o={headers:!0};t.utils.extend(o,i);var h=document.querySelector(e);if(!h)throw new Error("Selected HTML element is not found");0===n.length&&"object"==typeof s[0]&&(n=Object.keys(s[0]).map((function(t){return{columnid:t}})));var l=document.createElement("table"),c=document.createElement("thead");if(l.appendChild(c),o.headers){for(var u=document.createElement("tr"),f=0;f<n.length;f++)(b=document.createElement("th")).textContent=n[f].columnid,u.appendChild(b);c.appendChild(u)}var d=document.createElement("tbody");l.appendChild(d);for(var p=0;p<s.length;p++){for(u=document.createElement("tr"),f=0;f<n.length;f++){var b;(b=document.createElement("td")).textContent=s[p][n[f].columnid],u.appendChild(b)}d.appendChild(u)}t.utils.domEmptyChildren(h),h.appendChild(l)}return r&&(a=r(a)),a},t.into.JSON=function(e,i,s,n,r){var a=1;"object"==typeof e&&(i=e,e=void 0);var o=JSON.stringify(s);return e=t.utils.autoExtFilename(e,"json",i),a=t.utils.saveFile(e,o),r&&(a=r(a)),a},t.into.OBJECT=function(e,i,s,n,r){var a;if("object"==typeof e&&(i=e,e=void 0),e){var o=JSON.stringify(s);e=t.utils.autoExtFilename(e,"json",i),a=t.utils.saveFile(e,o)}else a=s;return r&&(a=r(a)),a},t.into.TXT=function(e,i,s,n,r){0===n.length&&s.length>0&&(n=Object.keys(s[0]).map((function(t){return{columnid:t}}))),"object"==typeof e&&(i=e,e=void 0);var a=s.length,o="";if(s.length>0){var h=n[0].columnid;o+=s.map((function(t){return t[h]})).join("\n")}return e=t.utils.autoExtFilename(e,"txt",i),a=t.utils.saveFile(e,o),r&&(a=r(a)),a},t.into.TAB=t.into.TSV=function(e,i,s,n,r){var a={};return t.utils.extend(a,i),a.separator="\t",e=t.utils.autoExtFilename(e,"tab",i),a.autoExt=!1,t.into.CSV(e,a,s,n,r)},t.into.CSV=function(e,i,s,n,r){0===n.length&&s.length>0&&(n=Object.keys(s[0]).map((function(t){return{columnid:t}}))),"object"==typeof e&&(i=e,e=void 0);var a={headers:!0,separator:";",quote:'"',utf8Bom:!0};i&&!i.headers&&typeof i.headers<"u"&&(a.utf8Bom=!1),t.utils.extend(a,i);var o=s.length,h=a.utf8Bom?"\ufeff":"";return a.headers&&(h+=a.quote+n.map((function(t){return t.columnid.trim()})).join(a.quote+a.separator+a.quote)+a.quote+"\r\n"),s.forEach((function(t){h+=n.map((function(e){var i=t[e.columnid];return""!==a.quote&&(i=(i+"").replace(new RegExp("\\"+a.quote,"g"),a.quote+a.quote)),+i!=i&&(i=a.quote+i+a.quote),i})).join(a.separator)+"\r\n"})),e=t.utils.autoExtFilename(e,"csv",i),o=t.utils.saveFile(e,h,null,{disableAutoBom:!0}),r&&(o=r(o)),o},t.into.XLS=function(e,i,s,n,r){"object"==typeof e&&(i=e,e=void 0);var a={};i&&i.sheets&&(a=i.sheets);var o={headers:!0};typeof a.Sheet1<"u"?o=a[0]:typeof i<"u"&&(o=i),typeof o.sheetid>"u"&&(o.sheetid="Sheet1");var h=function(){var t='<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" \t\txmlns="http://www.w3.org/TR/REC-html40"><head> \t\t<meta charset="utf-8" /> \t\t\x3c!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets> ';if(t+=" <x:ExcelWorksheet><x:Name>"+o.sheetid+"</x:Name><x:WorksheetOptions><x:DisplayGridlines/> </x:WorksheetOptions> \t\t</x:ExcelWorksheet>",t+="</x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--\x3e</head>",t+="<body",typeof o.style<"u"&&(t+=' style="',t+="function"==typeof o.style?o.style(o):o.style,t+='"'),t+=">",t+="<table>",typeof o.caption<"u"){var e=o.caption;"string"==typeof e&&(e={title:e}),t+="<caption",typeof e.style<"u"&&(t+=' style="',t+="function"==typeof e.style?e.style(o,e):e.style,t+='" '),t+=">",t+=e.title,t+="</caption>"}return typeof o.columns<"u"?n=o.columns:0==n.length&&s.length>0&&"object"==typeof s[0]&&(n=Array.isArray(s[0])?s[0].map((function(t,e){return{columnid:e}})):Object.keys(s[0]).map((function(t){return{columnid:t}}))),n.forEach((function(t,e){typeof o.column<"u"&&O(t,o.column),typeof t.width>"u"&&(t.width=o.column&&"undefined"!=o.column.width?o.column.width:"120px"),"number"==typeof t.width&&(t.width=t.width+"px"),typeof t.columnid>"u"&&(t.columnid=e),typeof t.title>"u"&&(t.title=""+t.columnid.trim()),o.headers&&Array.isArray(o.headers)&&(t.title=o.headers[e])})),t+="<colgroups>",n.forEach((function(e){t+='<col style="width: '+e.width+'"></col>'})),t+="</colgroups>",o.headers&&(t+="<thead>",t+="<tr>",n.forEach((function(e,i){t+="<th ",typeof e.style<"u"&&(t+=' style="',t+="function"==typeof e.style?e.style(o,e,i):e.style,t+='" '),t+=">",typeof e.title<"u"&&(t+="function"==typeof e.title?e.title(o,e,i):e.title),t+="</th>"})),t+="</tr>",t+="</thead>"),t+="<tbody>",s&&s.length>0&&s.forEach((function(e,s){if(!(s>o.limit)){t+="<tr";var r={};O(r,o.row),o.rows&&o.rows[s]&&O(r,o.rows[s]),typeof r<"u"&&typeof r.style<"u"&&(t+=' style="',t+="function"==typeof r.style?r.style(o,e,s):r.style,t+='" '),t+=">",n.forEach((function(n,a){var h={};O(h,o.cell),O(h,r.cell),typeof o.column<"u"&&O(h,o.column.cell),O(h,n.cell),o.cells&&o.cells[s]&&o.cells[s][a]&&O(h,o.cells[s][a]);var l=e[n.columnid];"function"==typeof h.value&&(l=h.value(l,o,e,n,h,s,a));var c=h.typeid;"function"==typeof c&&(c=c(l,o,e,n,h,s,a)),typeof c>"u"&&("number"==typeof l?c="number":"string"==typeof l?c="string":"boolean"==typeof l?c="boolean":"object"==typeof l&&l instanceof Date&&(c="date"));var u="";"money"==c?u='mso-number-format:"\\#\\,\\#\\#0\\\\ _р_\\.";white-space:normal;':"number"==c?u=" ":"date"==c?u='mso-number-format:"Short Date";':i.types&&i.types[c]&&i.types[c].typestyle&&(u=i.types[c].typestyle),t+="<td style='"+(u=u||'mso-number-format:"\\@";')+"' ",typeof h.style<"u"&&(t+=' style="',t+="function"==typeof h.style?h.style(l,o,e,n,s,a):h.style,t+='" '),t+=">";var f=h.format;if(typeof l>"u")t+="";else if(typeof f<"u")if("function"==typeof f)t+=f(l);else{if("string"!=typeof f)throw new Error("Unknown format type. Should be function or string");t+=l}else t+="number"==c||"date"==c?l.toString():"money"==c?(+l).toFixed(2):l;t+="</td>"})),t+="</tr>"}})),t+="</tbody>",t+="</table>",t+="</body>",t+="</html>"}();e=t.utils.autoExtFilename(e,"xls",i);var l=t.utils.saveFile(e,h);return r&&(l=r(l)),l},t.into.XLSXML=function(e,i,s,n,r){i=i||{},"object"==typeof e&&(i=e,e=void 0);var a,o,h={};i&&i.sheets?(h=i.sheets,a=s,o=n):(h.Sheet1=i,a=[s],o=[n]),e=t.utils.autoExtFilename(e,"xls",i);var l=t.utils.saveFile(e,function(){function t(t){return null==t?"":String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}var e="",i=" </Styles>",s={},n=62;function r(t){var i="";for(var r in t){for(var a in i+="<"+r,t[r])i+=" ","x:"==a.substr(0,2)?i+=a:i+="ss:",i+=a+"="+JSON.stringify(t[r][a]);i+="/>"}var o=b(i);return s[o]||(s[o]={styleid:n},e+=`<Style ss:ID=${JSON.stringify("s"+n)}>`,e+=i.replace(/<\s*\/\s*Style /gi,"<"),e+="</Style>",n++),"s"+s[o].styleid}function l(t){try{return Object.values(t)}catch{return Object.keys(t).map((function(e){return t[e]}))}}var c=0;for(var u in h){var f=h[u],d=typeof f.dataidx<"u"?f.dataidx:c++,p=l(a[d]),v=void 0;typeof f.columns<"u"?v=f.columns:(void 0===(v=o[d])||0==v.length&&p.length>0)&&"object"==typeof p[0]&&(v=Array.isArray(p[0])?p[0].map((function(t,e){return{columnid:e}})):Object.keys(p[0]).map((function(t){return{columnid:t}}))),v.forEach((function(t,e){typeof f.column<"u"&&O(t,f.column),typeof t.width>"u"&&(t.width=f.column&&typeof f.column.width<"u"?f.column.width:120),"number"==typeof t.width&&(t.width=t.width),typeof t.columnid>"u"&&(t.columnid=e),typeof t.title>"u"&&(t.title=""+t.columnid.trim()),f.headers&&Array.isArray(f.headers)&&(t.title=f.headers[e])})),i+="<Worksheet ss:Name="+JSON.stringify(u)+'> \t \t\t\t<Table ss:ExpandedColumnCount="'+v.length+'" ss:ExpandedRowCount="'+((f.headers?1:0)+Math.min(p.length,f.limit||p.length))+'" x:FullColumns="1" \t \t\t\tx:FullRows="1" ss:DefaultColumnWidth="65" ss:DefaultRowHeight="15">',v.forEach((function(t,e){i+=`\n\t\t\t\t\t<Column \n\t\t\t\t\t\tss:Index="${e+1}" \n\t\t\t\t\t\tss:AutoFitWidth="0" \n\t\t\t\t\t\tss:Width=${JSON.stringify(""+t.width)}\n\t\t\t\t\t/>`})),f.headers&&(i+='<Row ss:AutoFitHeight="0">',v.forEach((function(e,s){if(i+="<Cell ",typeof e.style<"u"){var n={};O(n,"function"==typeof e.style?e.style(f,e,s):e.style),i+="ss:StyleID="+JSON.stringify(r(n))}i+='><Data ss:Type="String">',typeof e.title<"u"&&(i+=t("function"==typeof e.title?e.title(f,e,s):e.title)),i+="</Data></Cell>"})),i+="</Row>"),p&&p.length>0&&p.forEach((function(e,s){if(!(s>f.limit)){var n={};if(O(n,f.row),f.rows&&f.rows[s]&&O(n,f.rows[s]),i+="<Row ",typeof n<"u"){var a={};typeof n.style<"u"&&(O(a,"function"==typeof n.style?n.style(f,e,s):n.style),i+="ss:StyleID="+JSON.stringify(r(a)))}i+=">",v.forEach((function(a,o){var h={};O(h,f.cell),O(h,n.cell),typeof f.column<"u"&&O(h,f.column.cell),O(h,a.cell),f.cells&&f.cells[s]&&f.cells[s][o]&&O(h,f.cells[s][o]);var l=e[a.columnid];"function"==typeof h.value&&(l=h.value(l,f,e,a,h,s,o));var c=h.typeid;"function"==typeof c&&(c=c(l,f,e,a,h,s,o)),typeof c>"u"&&("number"==typeof l?c="number":"string"==typeof l?c="string":"boolean"==typeof l?c="boolean":"object"==typeof l&&l instanceof Date&&(c="date"));var u="String";"number"==c?u="Number":"date"==c&&(u="Date"),i+="<Cell ";var d={};typeof h.style<"u"&&(O(d,"function"==typeof h.style?h.style(l,f,e,a,s,o):h.style),i+="ss:StyleID="+JSON.stringify(r(d))),i+=">",i+="<Data ss:Type="+JSON.stringify(u)+">";var p=h.format;if(typeof l>"u")i+="";else if(typeof p<"u")if("function"==typeof p)i+=t(p(l));else{if("string"!=typeof p)throw new Error("Unknown format type. Should be function or string");i+=t(l)}else i+=t("number"==c||"date"==c?l.toString():"money"==c?(+l).toFixed(2):l);i+="</Data></Cell>"})),i+="</Row>"}})),i+="</Table></Worksheet>"}return'<?xml version="1.0"?> \t\t<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" \t\t xmlns:o="urn:schemas-microsoft-com:office:office" \t\t xmlns:x="urn:schemas-microsoft-com:office:excel" \t\t xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" \t\t xmlns:html="http://www.w3.org/TR/REC-html40"> \t\t <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office"> \t\t </DocumentProperties> \t\t <OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office"> \t\t <AllowPNG/> \t\t </OfficeDocumentSettings> \t\t <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel"> \t\t <ActiveSheet>0</ActiveSheet> \t\t </ExcelWorkbook> \t\t <Styles> \t\t <Style ss:ID="Default" ss:Name="Normal"> \t\t <Alignment ss:Vertical="Bottom"/> \t\t <Borders/> \t\t <Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="12" ss:Color="#000000"/> \t\t <Interior/> \t\t <NumberFormat/> \t\t <Protection/> \t\t </Style>'+e+(i+="</Workbook>")}());return r&&(l=r(l)),l},t.into.XLSX=function(e,i,n,r,a){var o=1;i=i||{},S(r,[{columnid:"_"}])&&(n=n.map((function(t){return t._})),r=void 0),e=t.utils.autoExtFilename(e,"xlsx",i);var h=C();"object"==typeof e&&(i=e,e=void 0);var l={SheetNames:[],Sheets:{}};return i.sourcefilename?t.utils.loadBinaryFile(i.sourcefilename,!!a,(function(e){l=h.read(e,{type:"binary",...t.options.excel,...i}),c(),a&&(o=a(o))})):(c(),a&&(o=a(o))),o;function c(){"object"==typeof i&&Array.isArray(i)?n&&n.length>0&&n.forEach((function(t,e){u(i[e],t,void 0,e+1)})):u(i,n,r,1),function(){var t;if(typeof e>"u")o=l;else if(t=C(),s.isNode||s.isMeteorServer)t.writeFile(l,e);else{var i=t.write(l,{bookType:"xlsx",bookSST:!1,type:"binary"});Ot(new Blob([function(t){for(var e=new ArrayBuffer(t.length),i=new Uint8Array(e),s=0;s!=t.length;++s)i[s]=255&t.charCodeAt(s);return e}(i)],{type:"application/octet-stream"}),e)}}()}function u(e,i,s,n){var r={sheetid:"Sheet "+n,headers:!0};t.utils.extend(r,e);var a=Object.keys(i).length;(!s||0==s.length)&&(s=a>0?Object.keys(i[0]).map((function(t){return{columnid:t}})):[]);var o={};l.SheetNames.indexOf(r.sheetid)>-1||(l.SheetNames.push(r.sheetid),l.Sheets[r.sheetid]={}),o=l.Sheets[r.sheetid];var h="A1";r.range&&(h=r.range);var c=t.utils.xlscn(h.match(/[A-Z]+/)[0]),u=+h.match(/[0-9]+/)[0]-1;if(l.Sheets[r.sheetid]["!ref"])var f=l.Sheets[r.sheetid]["!ref"],d=t.utils.xlscn(f.match(/[A-Z]+/)[0]),p=+f.match(/[0-9]+/)[0]-1;else d=1,p=1;var b=Math.max(c+s.length-1+(s.length?0:1),d),v=Math.max(u+a+2,p),E=u+1;l.Sheets[r.sheetid]["!ref"]="A1:"+t.utils.xlsnc(b)+v,r.headers&&(s.forEach((function(e,i){o[t.utils.xlsnc(c+i)+""+E]={v:e.columnid.trim()}})),E++);for(var m=0;m<a;m++)s.forEach((function(e,s){var n={v:i[m][e.columnid]};"number"==typeof i[m][e.columnid]?n.t="n":"string"==typeof i[m][e.columnid]?n.t="s":"boolean"==typeof i[m][e.columnid]?n.t="b":"object"==typeof i[m][e.columnid]&&i[m][e.columnid]instanceof Date&&(n.t="d"),o[t.utils.xlsnc(c+s)+""+E]=n})),E++}},t.from.METEOR=function(t,e,i,s,n){var r=t.find(e).fetch();return i&&(r=i(r,s,n)),r},t.from.TABLETOP=function(e,i,s,n,r){var a=[],o={headers:!0,simpleSheet:!0,key:e};return t.utils.extend(o,i),o.callback=function(t){a=t,s&&(a=s(a,n,r))},Tabletop.init(o),null},t.from.HTML=function(e,i,s,n,r){var a={};t.utils.extend(a,i);var o=document.querySelector(e);if(!o||"TABLE"!==o.tagName)throw new Error("Selected HTML element is not a TABLE");var h=[],l=a.headers;if(l&&!Array.isArray(l)){l=[];for(var c=o.querySelector("thead tr").children,u=0;u<c.length;u++)c.item(u).style&&"none"===c.item(u).style.display&&a.skipdisplaynone?l.push(void 0):l.push(c.item(u).textContent)}for(var f=o.querySelectorAll("tbody tr"),d=0;d<f.length;d++){var p=f.item(d).children,b={};for(u=0;u<p.length;u++)p.item(u).style&&"none"===p.item(u).style.display&&a.skipdisplaynone||(l?b[l[u]]=p.item(u).textContent:b[u]=p.item(u).textContent);h.push(b)}return s&&(h=s(h,n,r)),h},t.from.RANGE=function(t,e,i,s,n){for(var r=[],a=t;a<=e;a++)r.push(a);return i&&(r=i(r,s,n)),r},t.from.UNNEST=function(t,e,i,s,n){var r=t;return Array.isArray(r)||(r=[]),i&&(r=i(r,s,n)),r},t.from.FILE=function(e,i,s,n,r){var a;if("string"==typeof e)a=e;else{if(!(e instanceof Event))throw new Error("Wrong usage of FILE() function");a=e.target.files[0].name}var o=a.split("."),h=o[o.length-1].toUpperCase();if(t.from[h])return t.from[h](e,i,s,n,r);throw new Error("Cannot recognize file type for loading")},t.from.JSON=function(e,i,s,n,r){var a;return e=t.utils.autoExtFilename(e,"json",i),t.utils.loadFile(e,!!s,(function(t){a=JSON.parse(t),s&&(a=s(a,n,r))})),a};const Et=e=>function(i,s,n,r,a){let o=[];return i=t.utils.autoExtFilename(i,e,s),t.utils.loadFile(i,!!n,(function(t){t.split(/\r?\n/).forEach(((t,e)=>{const i=t.trim();if(""!==i)try{o.push(JSON.parse(i))}catch(t){throw new Error(`Could not parse JSON at line ${e}: ${t.toString()}`)}})),n&&(o=n(o,r,a))}),(t=>{const e=t instanceof Error?t:new Error(t);if(!a||!a.cb)throw e;a.cb(null,e)})),o};function mt(e,i,s,n,r,a){var o,h={};function l(e){return e&&!1===t.options.casesensitive?e.toLowerCase():e}function c(e,i,s){var n,r=[];if(typeof s.range>"u"?n=e.Sheets[i]["!ref"]:e.Sheets[i][n=s.range]&&(n=e.Sheets[i][n]),n){for(var a=n.split(":"),o=a[0].match(/[A-Z]+/)[0],h=+a[0].match(/[0-9]+/)[0],c=a[1].match(/[A-Z]+/)[0],u=+a[1].match(/[0-9]+/)[0],f={},d=t.utils.xlscn(o),p=t.utils.xlscn(c),b=d;b<=p;b++)f[m=t.utils.xlsnc(b)]=s.headers?l(e.Sheets[i][m+""+h]?e.Sheets[i][m+""+h].v:m):m;s.headers&&h++;for(var v=h;v<=u;v++){var E={};for(b=d;b<=p;b++){var m=t.utils.xlsnc(b);e.Sheets[i][m+""+v]&&(E[f[m]]=e.Sheets[i][m+""+v].v)}r.push(E)}}else r.push([]);return r.length>0&&r[r.length-1]&&0==Object.keys(r[r.length-1]).length&&r.pop(),r}return t.utils.extend(h,s=s||{}),typeof h.headers>"u"&&(h.headers=!0),i=t.utils.autoExtFilename(i,"xls",s),t.utils.loadBinaryFile(i,!!n,(function(i){if(i instanceof ArrayBuffer)var l=function(t){for(var e="",i=0,s=10240;i<t.byteLength/s;++i)e+=String.fromCharCode.apply(null,new Uint8Array(t.slice(i*s,i*s+s)));return e+String.fromCharCode.apply(null,new Uint8Array(t.slice(i*s)))}(i),u=e.read(btoa(l),{type:"base64",...t.options.excel,...s});else u=e.read(i,{type:"binary",...t.options.excel,...s});if("*"===h.sheetid||Array.isArray(h.sheetid)&&h.sheetid.length>0){o=[];for(var f="*"===h.sheetid?u.SheetNames:h.sheetid,d=0;d<f.length;d++){var p="*"===h.sheetid?f[d]:"number"==typeof f[d]?u.SheetNames[f[d]]:f[d];if(u.Sheets[p]){for(var b=c(u,p,h),v=0;v<b.length;v++)b[v]._sheet=p;o=o.concat(b)}}}else o=c(u,typeof h.sheetid>"u"?u.SheetNames[0]:"number"==typeof h.sheetid?u.SheetNames[h.sheetid]:h.sheetid,h);n&&(o=n(o,r,a))}),(function(t){if(!a||!a.cb)throw t;a.cb(null,t)})),o}function gt(t){return t=(t=t.trim()).replace(/<!--[\s\S]*?-->/g,""),{declaration:e(),root:i()};function e(){if(r(/^<\?xml\s*/)){for(var t={attributes:{}};!a()&&!o("?>");){var e=s();if(!e)return t;t.attributes[e.name]=e.value}return r(/\?>\s*/),t}}function i(){var t=r(/^<([\w-:.]+)\s*/);if(t){for(var e={name:t[1],attributes:{},children:[]};!(a()||o(">")||o("?>")||o("/>"));){var n=s();if(!n)return e;e.attributes[n.name]=n.value}if(r(/^\s*\/>\s*/))return e;r(/\??>\s*/),e.content=function(){var t=r(/^([^<]*)/);return t?t[1]:""}();for(var h;h=i();)e.children.push(h);return r(/^<\/[\w-:.]+>\s*/),e}}function s(){var t=r(/([\w:-]+)\s*=\s*("[^"]*"|'[^']*'|\w+)\s*/);if(t)return{name:t[1],value:n(t[2])}}function n(t){return t.replace(/^['"]|['"]$/g,"")}function r(e){var i=t.match(e);if(i)return t=t.slice(i[0].length),i}function a(){return 0==t.length}function o(e){return 0==t.indexOf(e)}}t.from.JSONL=Et("jsonl"),t.from.NDJSON=Et("ndjson"),t.from.TXT=function(e,i,s,n,r){var a;return e=t.utils.autoExtFilename(e,"txt",i),t.utils.loadFile(e,!!s,(function(t){""===(a=t.split(/\r?\n/))[a.length-1]&&a.pop();for(var e=0,i=a.length;e<i;e++)a[e]==+a[e]&&(a[e]=+a[e]),a[e]=[a[e]];s&&(a=s(a,n,r))})),a},t.from.TAB=t.from.TSV=function(e,i,s,n,r){return(i=i||{}).separator="\t",e=t.utils.autoExtFilename(e,"tab",i),i.autoext=!1,t.from.CSV(e,i,s,n,r)},t.from.CSV=function(e,i,s,n,r){e=""+e;var a={separator:",",quote:'"',headers:!0,raw:!1};t.utils.extend(a,i);var o,h=[];const l=!a.raw&&!r?.intofns;function c(t){return l&&void 0!==t&&0!==t.length&&t==+t?+t:t}function u(t){var e,i,l=a.separator.charCodeAt(0),u=a.quote.charCodeAt(0),f={},d={},p=[],b=t.length,v=0,E=0;function m(){if(v>=b)return d;if(i)return i=!1,f;var e=v;if(t.charCodeAt(e)===u){for(var s=e;s++<b;)if(t.charCodeAt(s)===u){if(t.charCodeAt(s+1)!==u)break;++s}return v=s+2,13===(n=t.charCodeAt(s+1))?(i=!0,10===t.charCodeAt(s+2)&&++v):10===n&&(i=!0),t.substring(e+1,s).replace(/""/g,'"')}for(;v<b;){var n,r=1;if(10===(n=t.charCodeAt(v++)))i=!0;else if(13===n)i=!0,10===t.charCodeAt(v)&&(++v,++r);else if(n!==l)continue;return t.substring(e,v-r)}return t.substring(e)}for(;(e=m())!==d;){for(var g=[];e!==f&&e!==d;)g.push(e.trim()),e=m();if(a.headers){if(0===E){if("boolean"==typeof a.headers)h=g;else if(Array.isArray(a.headers)){var w={};(h=a.headers).forEach((function(t,e){w[t]=c(g[e])})),p.push(w)}}else w={},h.forEach((function(t,e){w[t]=c(g[e])})),p.push(w);E++}else w={},g.forEach((function(t,e){w[e]=c(g[e])})),p.push(w)}if(o=p,a.headers&&r&&r.sources&&r.sources[n]){var y=r.sources[n].columns=[];h.forEach((function(t){y.push({columnid:t})}))}s&&(o=s(o,n,r))}return new RegExp("\n").test(e)?u(e):(e=t.utils.autoExtFilename(e,"csv",i),t.utils.loadFile(e,!!s,u,(t=>r.cb(null,t)))),o},t.from.XLS=function(e,i,s,n,r){return e=t.utils.autoExtFilename(e,"xls",i=i||{}),i.autoExt=!1,mt(C(),e,i,s,n,r)},t.from.XLSX=function(e,i,s,n,r){return e=t.utils.autoExtFilename(e,"xlsx",i=i||{}),i.autoExt=!1,mt(C(),e,i,s,n,r)},t.from.ODS=function(e,i,s,n,r){return e=t.utils.autoExtFilename(e,"ods",i=i||{}),i.autoExt=!1,mt(C(),e,i,s,n,r)},t.from.XML=function(e,i,s,n,r){var a;return t.utils.loadFile(e,!!s,(function(t){a=gt(t).root,s&&(a=s(a,n,r))})),a},t.from.GEXF=function(e,i,s){var n;return t("SEARCH FROM XML("+e+")",[],(function(t){n=t,s&&(n=s(n))})),n},U.Print=function(t){return Object.assign(this,t)},U.Print.prototype.toString=function(){var t="PRINT";return this.statement&&(t+=" "+this.statement.toString()),t},U.Print.prototype.execute=function(e,i,s){var n=this,r=1;if(t.precompile(this,e,i),this.exprs&&this.exprs.length>0){var a=this.exprs.map((function(e){var s=new Function("params,alasql,p","var y;return "+e.toJS("({})","",null)).bind(n)(i,t);return ot(s)}));console.log.apply(console,a)}else if(this.select){var o=this.select.execute(e,i);console.log(ot(o))}else console.log();return s&&(r=s(r)),r},U.Source=function(t){return Object.assign(this,t)},U.Source.prototype.toString=function(){var t="SOURCE";return this.url&&(t+=" '"+this.url+" '"),t},U.Source.prototype.execute=function(e,i,s){var n;return u(this.url,!!s,(function(e){return n=t(e),s&&(n=s(n)),n}),(function(t){throw t})),n},U.Require=function(t){return Object.assign(this,t)},U.Require.prototype.toString=function(){var t="REQUIRE";return this.paths&&this.paths.length>0&&(t+=this.paths.map((function(t){return t.toString()})).join(",")),this.plugins&&this.plugins.length>0&&(t+=this.plugins.map((function(t){return t.toUpperCase()})).join(",")),t},U.Require.prototype.execute=function(e,i,s){var n=this,r=0,a="";return this.paths&&this.paths.length>0?this.paths.forEach((function(e){u(e.value,!!s,(function(e){r++,a+=e,!(r<n.paths.length)&&(new Function("params,alasql",a)(i,t),s&&(r=s(r)))}))})):this.plugins&&this.plugins.length>0?this.plugins.forEach((function(e){t.plugins[e]||u(t.path+"/alasql-"+e.toLowerCase()+".js",!!s,(function(o){r++,a+=o,!(r<n.plugins.length)&&(new Function("params,alasql",a)(i,t),t.plugins[e]=!0,s&&(r=s(r)))}))})):s&&(r=s(r)),r},U.Assert=function(t){return Object.assign(this,t)},U.Source.prototype.toString=function(){var t="ASSERT";return this.value&&(t+=" "+JSON.stringify(this.value)),t},U.Assert.prototype.execute=function(){if(!S(t.res,this.value))throw new Error((this.message||"Assert wrong")+": "+JSON.stringify(t.res)+" == "+JSON.stringify(this.value));return 1};var wt=t.engines.INDEXEDDB=function(){};async function yt(t){const e=globalThis.indexedDB;if(!e)throw new Error("IndexedDB is not supported in this browser");if(e.databases)return(await e.databases()).find((e=>e.name===t))||0;const i=e.open(t);return new Promise((function(e,s){i.onsuccess=()=>{i.result.close(),e({name:t,version:i.result.version})},i.onupgradeneeded=t=>{t.target.transaction.abort(),e(0)},i.onerror=()=>{s(new Error("IndexedDB error"))},i.onblocked=()=>{e({name:t,version:i.result.version})}}))}wt.showDatabases=function(t,e){indexedDB.databases?indexedDB.databases().then((i=>{const s=[],n=t&&new RegExp(t.value.replace(/\%/g,".*"),"g");for(var r=0;r<i.length;r++)(!t||i[r].name.match(n))&&s.push({databaseid:i[r].name});e(s)})):e(null,new Error("SHOW DATABASE is not supported in this browser"))},wt.createDatabase=async function(t,e,i,s,n){const r=await yt(t).catch((t=>{if(n)return n(null,t),null;throw t}));if(null!==r)if(r){if(!i){const e=new Error(`IndexedDB: Cannot create new database "${t}" because it already exists`);if(n)return void n(null,e);throw e}n&&n(0)}else{const e=indexedDB.open(t,1);e.onsuccess=()=>{e.result.close(),n(1)}}},wt.dropDatabase=async function(t,e,i){const s=await yt(t).catch((t=>{if(i)return i(null,t),null;throw t}));if(null!==s)if(s)indexedDB.deleteDatabase(t).onsuccess=()=>{i&&i(1)};else{if(!e){if(i)return void i(null,new Error(`IndexedDB: Cannot drop database "${t}" because it does not exist`));throw new Error(`IndexedDB: Cannot drop database "${t}" because it does not exist`)}i&&i(0)}},wt.attachDatabase=async function(e,i,s,n,r){const a=await yt(e).catch((t=>{if(r)return r(null,t),null;throw t}));if(null===a)return;if(!a){const t=new Error(`IndexedDB: Cannot attach database "${e}" because it does not exist`);if(r)return void r(null,t);throw t}const o=await new Promise((t=>{const i=indexedDB.open(e);i.onsuccess=()=>{t(i.result.objectStoreNames),i.result.close()}})),h=new t.Database(i||e);h.engineid="INDEXEDDB",h.ixdbid=e,h.tables=[];for(var l=0;l<o.length;l++)h.tables[o[l]]={};r&&r(1)},wt.createTable=async function(e,i,s,n){const r=t.databases[e].ixdbid,a=await yt(r).catch((t=>{if(n)return n(null,t),null;throw t}));if(null===a)return;if(!a){const t=new Error('IndexedDB: Cannot create table in database "'+r+'" because it does not exist');if(n)return void n(null,t);throw t}const o=indexedDB.open(r,a.version+1);o.onupgradeneeded=function(){o.result.createObjectStore(i,{autoIncrement:!0})},o.onsuccess=function(){o.result.close(),n&&n(1)},o.onerror=t=>{n(null,t)},o.onblocked=function(){n(null,new Error(`Cannot create table "${i}" because database "${e}" is blocked`))}},wt.dropTable=async function(e,i,s,n){const r=t.databases[e].ixdbid,a=await yt(r).catch((t=>{if(n)return n(null,t),null;throw t}));if(null===a)return;if(!a){const t=new Error('IndexedDB: Cannot drop table in database "'+r+'" because it does not exist');if(n)return void n(null,t);throw t}const o=indexedDB.open(r,a.version+1);let h;o.onupgradeneeded=function(n){var r=o.result;r.objectStoreNames.contains(i)?(r.deleteObjectStore(i),delete t.databases[e].tables[i]):s||(h=new Error(`IndexedDB: Cannot drop table "${i}" because it does not exist`),n.target.transaction.abort())},o.onsuccess=function(){o.result.close(),n&&n(1)},o.onerror=function(t){n&&n(null,h||t)},o.onblocked=function(){n(null,new Error(`Cannot drop table "${i}" because database "${e}" is blocked`))}},wt.intoTable=function(e,i,s,n,r){const a=indexedDB.open(t.databases[e].ixdbid);var o=t.databases[e].tables[i];a.onupgradeneeded=t=>{t.target.transaction.abort();const s=new Error(`Cannot insert into table "${i}" because database "${e}" does not exist`);r&&r(null,s)},a.onsuccess=()=>{for(var n=a.result,h=n.transaction([i],"readwrite"),l=h.objectStore(i),c=0,u=s.length;c<u;c++)l.add(s[c]);h.oncomplete=function(){for(var i in n.close(),o.afterinsert)if(o.afterinsert[i]){var a=o.afterinsert[i];a.funcid?t.fn[a.funcid](s):a.statement&&a.statement.execute(e)}r&&r(u)}}},wt.fromTable=function(e,i,s,n,r){const a=indexedDB.open(t.databases[e].ixdbid);a.onupgradeneeded=t=>{t.target.transaction.abort();const n=new Error(`Cannot select from table "${i}" because database "${e}" does not exist`);s&&s(null,n)},a.onsuccess=()=>{const t=[],e=a.result,o=e.transaction([i]).objectStore(i).openCursor();o.onsuccess=()=>{const i=o.result;i?(t.push("object"==typeof i?i.value:{[i.key]:i.value}),i.continue()):(e.close(),s&&s(t,n,r))}}},wt.deleteFromTable=function(e,i,s,n,r){const a=indexedDB.open(t.databases[e].ixdbid);a.onsuccess=()=>{const e=a.result,o=e.transaction([i],"readwrite").objectStore(i).openCursor();let h=0;o.onsuccess=()=>{var i=o.result;i?((!s||s(i.value,n,t))&&(i.delete(),h++),i.continue()):(e.close(),r&&r(h))}}},wt.updateTable=function(e,i,s,n,r,a){const o=indexedDB.open(t.databases[e].ixdbid);o.onsuccess=function(){const t=o.result,e=t.transaction([i],"readwrite").objectStore(i).openCursor();let h=0;e.onsuccess=()=>{var i=e.result;if(i){if(!n||n(i.value,r)){var o=i.value;s(o,r),i.update(o),h++}i.continue()}else t.close(),a&&a(h)}}},wt.commit=function(t,e){return e?e(1):1},wt.begin=wt.commit,wt.rollback=function(t,e){return e?e(1):1};var Tt=t.engines.LOCALSTORAGE=function(){};Tt.get=function(t){var e=localStorage.getItem(t);if(!(typeof e>"u")){var i;try{i=JSON.parse(e)}catch{throw new Error("Cannot parse JSON object from localStorage"+e)}return i}},Tt.set=function(t,e){typeof e>"u"?localStorage.removeItem(t):localStorage.setItem(t,JSON.stringify(e))},Tt.storeTable=function(e,i){var s=t.databases[e],n=s.tables[i],r={};r.columns=n.columns,r.data=n.data,r.identities=n.identities,r.defaultfns=n.defaultfns,r.onupdatefns=n.onupdatefns,Tt.set(s.lsdbid+"."+i,r)},Tt.restoreTable=function(e,i){var s=t.databases[e],n=Tt.get(s.lsdbid+"."+i),r=new t.Table;for(var a in n)r[a]=n[a];return s.tables[i]=r,r.indexColumns(),r},Tt.removeTable=function(e,i){localStorage.removeItem(t.databases[e].lsdbid+"."+i)},Tt.createDatabase=function(t,e,i,s,n){var r=1,a=Tt.get("alasql");if(i&&a&&a.databases&&a.databases[t])r=0;else{if(a||(a={databases:{}}),a.databases&&a.databases[t])throw new Error('localStorage: Cannot create new database "'+t+'" because it already exists');a.databases[t]=!0,Tt.set("alasql",a),Tt.set(t,{databaseid:t,tables:{}})}return n&&(r=n(r)),r},Tt.dropDatabase=function(t,e,i){var s=1,n=Tt.get("alasql");if(e&&n&&n.databases&&!n.databases[t])s=0;else{if(!n){if(e)return i?i(0):0;throw new Error("There is no any AlaSQL databases in localStorage")}if(n.databases&&!n.databases[t])throw new Error('localStorage: Cannot drop database "'+t+'" because there is no such database');delete n.databases[t],Tt.set("alasql",n);var r=Tt.get(t);for(var a in r.tables)localStorage.removeItem(t+"."+a);localStorage.removeItem(t)}return i&&(s=i(s)),s},Tt.attachDatabase=function(e,i,s,n,r){var a=1;if(t.databases[i])throw new Error('Unable to attach database as "'+i+'" because it already exists');i||(i=e);var o=new t.Database(i);if(o.engineid="LOCALSTORAGE",o.lsdbid=e,o.tables=Tt.get(e).tables,!t.options.autocommit&&o.tables)for(var h in o.tables)Tt.restoreTable(i,h);return r&&(a=r(a)),a},Tt.showDatabases=function(t,e){var i=[],s=Tt.get("alasql");if(t)var n=new RegExp(t.value.replace(/%/g,".*"),"g");if(s&&s.databases){for(var r in s.databases)i.push({databaseid:r});t&&i&&i.length>0&&(i=i.filter((function(t){return t.databaseid.match(n)})))}return e&&(i=e(i)),i},Tt.createTable=function(e,i,s,n){var r=1,a=t.databases[e].lsdbid;if(Tt.get(a+"."+i)&&!s)throw new Error('Table "'+i+'" alsready exists in localStorage database "'+a+'"');var o=Tt.get(a);return o.tables[i]=!0,Tt.set(a,o),Tt.storeTable(e,i),n&&(r=n(r)),r},Tt.truncateTable=function(e,i,s,n){var r,a=1;if(r=t.options.autocommit?Tt.get(t.databases[e].lsdbid):t.databases[e],!s&&!r.tables[i])throw new Error('Cannot truncate table "'+i+'" in localStorage, because it does not exist');return Tt.restoreTable(e,i).data=[],Tt.storeTable(e,i),n&&(a=n(a)),a},Tt.dropTable=function(e,i,s,n){var r,a=1,o=t.databases[e].lsdbid;if(r=t.options.autocommit?Tt.get(o):t.databases[e],!s&&!r.tables[i])throw new Error('Cannot drop table "'+i+'" in localStorage, because it does not exist');return delete r.tables[i],Tt.set(o,r),Tt.removeTable(e,i),n&&(a=n(a)),a},Tt.fromTable=function(t,e,i,s,n){var r=Tt.restoreTable(t,e).data;return i&&(r=i(r,s,n)),r},Tt.intoTable=function(t,e,i,s,n){var r=i.length,a=Tt.restoreTable(t,e);for(var o in a.identities){var h=a.identities[o];for(var l in i)i[l][o]=h.value,h.value+=h.step}return a.data||(a.data=[]),a.data=a.data.concat(i),Tt.storeTable(t,e),n&&(r=n(r)),r},Tt.loadTableData=function(t,e){Tt.restoreTable(t,e)},Tt.saveTableData=function(e,i){var s=t.databases[e];Tt.storeTable(t.databases[e].lsdbid,i),s.tables[i].data=void 0},Tt.commit=function(e,i){var s=t.databases[e],n=t.databases[e].lsdbid,r={databaseid:n,tables:{}};if(s.tables)for(var a in s.tables)r.tables[a]=!0,Tt.storeTable(e,a);return Tt.set(n,r),i?i(1):1},Tt.begin=Tt.commit,Tt.rollback=function(){};var St=t.engines.SQLITE=function(){};St.createDatabase=function(){throw new Error("Connot create SQLITE database in memory. Attach it.")},St.dropDatabase=function(){throw new Error("This is impossible to drop SQLite database. Detach it.")},St.attachDatabase=function(e,i,s,n,r){if(t.databases[i])throw new Error('Unable to attach database as "'+i+'" because it already exists');if(s[0]&&s[0]instanceof U.StringValue||s[0]instanceof U.ParamValue){if(s[0]instanceof U.StringValue)var a=s[0].value;else s[0]instanceof U.ParamValue&&(a=n[s[0].param]);return t.utils.loadBinaryFile(a,!0,(function(s){var n=new t.Database(i||e);n.engineid="SQLITE",n.sqldbid=e;var a=n.sqldb=new SQL.Database(s);n.tables=[],a.exec("SELECT * FROM sqlite_master WHERE type='table'")[0].values.forEach((function(e){n.tables[e[1]]={};var i=n.tables[e[1]].columns=[],s=t.parse(e[4]).statements[0].columns;s&&s.length>0&&s.forEach((function(t){i.push(t)}))})),r(1)}),(function(){throw new Error('Cannot open SQLite database file "'+s[0].value+'"')})),1}throw new Error("Cannot attach SQLite database without a file")},St.fromTable=function(e,i,s,n,r){var a=t.databases[e].sqldb.exec("SELECT * FROM "+i),o=r.sources[n].columns=[];a[0].columns.length>0&&a[0].columns.forEach((function(t){o.push({columnid:t})}));var h=[];a[0].values.length>0&&a[0].values.forEach((function(t){var e={};o.forEach((function(i,s){e[i.columnid]=t[s]})),h.push(e)})),s&&s(h,n,r)},St.intoTable=function(e,i,s,n,r){for(var a=t.databases[e].sqldb,o=0,h=s.length;o<h;o++){var l="INSERT INTO "+i+" (",c=s[o],u=Object.keys(c);l+=u.join(","),l+=") VALUES (",l+=u.map((function(t){var e=c[t];return"string"==typeof e&&(e="'"+e+"'"),e})).join(","),a.exec(l+=")")}var f=h;return r&&r(f),f};var At=t.engines.FILESTORAGE=t.engines.FILE=function(){};if(At.createDatabase=function(e,i,s,n,r){var a=1,o=i[0].value;return t.utils.fileExists(o,(function(e){if(e){if(s)return a=0,r&&(a=r(a)),a;throw new Error("Cannot create new database file, because it already exists")}t.utils.saveFile(o,JSON.stringify({tables:{}}),(function(){r&&(a=r(a))}))})),a},At.dropDatabase=function(e,i,s){var n,r="";return"object"==typeof e&&e.value?r=e.value:(r=(t.databases[e]||{}).filename||"",delete t.databases[e]),t.utils.fileExists(r,(function(e){if(e)n=1,t.utils.deleteFile(r,(function(){n=1,s&&(n=s(n))}));else{if(!i)throw new Error("Cannot drop database file, because it does not exist");n=0,s&&(n=s(n))}})),n},At.attachDatabase=function(e,i,s,n,r){var a=1;if(t.databases[i])throw new Error('Unable to attach database as "'+i+'" because it already exists');var o=new t.Database(i||e);return o.engineid="FILESTORAGE",o.filename=s[0].value,u(o.filename,!!r,(function(e){try{o.data=JSON.parse(e)}catch{throw new Error("Data in FileStorage database are corrupted")}if(o.tables=o.data.tables,!t.options.autocommit&&o.tables)for(var i in o.tables)o.tables[i].data=o.data[i];r&&(a=r(a))})),a},At.createTable=function(e,i,s,n){var r=t.databases[e];if(r.data[i]&&!s)throw new Error('Table "'+i+'" alsready exists in the database "'+fsdbid+'"');var a=t.databases[e].tables[i];return r.data.tables[i]={columns:a.columns,defaultfns:a.defaultfns,onupdatefns:a.onupdatefns},r.data[i]=[],At.updateFile(e),n&&n(1),1},At.updateFile=function(e){var i=t.databases[e];i.issaving?i.postsave=!0:(i.issaving=!0,i.postsave=!1,t.utils.saveFile(i.filename,JSON.stringify(i.data),(function(){i.issaving=!1,i.postsave&&setTimeout((function(){At.updateFile(e)}),50)})))},At.dropTable=function(e,i,s,n){var r=t.databases[e];if(!s&&!r.tables[i])throw new Error('Cannot drop table "'+i+'" in fileStorage, because it does not exist');return delete r.tables[i],delete r.data.tables[i],delete r.data[i],At.updateFile(e),n&&n(1),1},At.fromTable=function(e,i,s,n,r){var a=t.databases[e].data[i];return s&&(a=s(a,n,r)),a},At.intoTable=function(e,i,s,n,r){var a=t.databases[e],o=s.length,h=a.data[i];return h||(h=[]),a.data[i]=h.concat(s),At.updateFile(e),r&&r(o),o},At.loadTableData=function(e,i){var s=t.databases[e];s.tables[i].data=s.data[i]},At.saveTableData=function(e,i){var s=t.databases[e];s.data[i]=s.tables[i].data,s.tables[i].data=null,At.updateFile(e)},At.commit=function(e,i){var s=t.databases[e];if(s.tables)for(var n in s.tables)s.data.tables[n]={columns:s.tables[n].columns,defaultfns:s.tables[n].defaultfns,onupdatefns:s.tables[n].onupdatefns},s.data[n]=s.tables[n].data;return At.updateFile(e),i?i(1):1},At.begin=At.commit,At.rollback=function(e,i){var s=1,n=t.databases[e];n.dbversion++,function r(){setTimeout((function(){if(n.issaving)return r();t.loadFile(n.filename,!!i,(function(r){for(var a in n.data=r,n.tables={},n.data.tables){var o=new t.Table({columns:n.data.tables[a].columns});O(o,n.data.tables[a]),n.tables[a]=o,t.options.autocommit||(n.tables[a].data=n.data[a]),n.tables[a].indexColumns()}delete t.databases[e],t.databases[e]=new t.Database(e),O(t.databases[e],n),t.databases[e].engineid="FILESTORAGE",t.databases[e].filename=n.filename,i&&(s=i(s))}))}),100)}()},s.isBrowser&&!s.isWebWorker){if(t=t||!1,!t)throw new Error("alasql was not found");t.worker=function(){throw new Error("Can find webworker in this enviroment")},typeof Worker<"u"&&(t.worker=function(e,i,s){if(!0===e&&(e=void 0),typeof e>"u")for(var n=document.getElementsByTagName("script"),r=0;r<n.length;r++){if("alasql-worker.js"===n[r].src.substr(-16).toLowerCase()){e=n[r].src.substr(0,n[r].src.length-16)+"alasql.js";break}if("alasql-worker.min.js"===n[r].src.substr(-20).toLowerCase()){e=n[r].src.substr(0,n[r].src.length-20)+"alasql.min.js";break}if("alasql.js"===n[r].src.substr(-9).toLowerCase()){e=n[r].src;break}if("alasql.min.js"===n[r].src.substr(-13).toLowerCase()){e=n[r].src.substr(0,n[r].src.length-13)+"alasql.min.js";break}}if(typeof e>"u")throw new Error("Path to alasql.js is not specified");if(!1!==e){var a="importScripts('";a+=e,a+="');self.onmessage = function(event) {alasql(event.data.sql,event.data.params, function(data){postMessage({id:event.data.id, data:data});});}";var o=new Blob([a],{type:"text/plain"});if(t.webworker=new Worker(URL.createObjectURL(o)),t.webworker.onmessage=function(e){var i=e.data.id;t.buffer[i](e.data.data),delete t.buffer[i]},t.webworker.onerror=function(t){throw t},arguments.length>1){var h="REQUIRE "+i.map((function(t){return'"'+t+'"'})).join(",");t(h,[],s)}}else if(!1===e)return void delete t.webworker});/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */var Ot=Ot||function(t){if(!(typeof t>"u"||typeof navigator<"u"&&/MSIE [1-9]\./.test(navigator.userAgent))){var e=function(){return t.URL||t.webkitURL||t},i=t.document.createElementNS("http://www.w3.org/1999/xhtml","a"),s="download"in i,n=/constructor/i.test(t.HTMLElement)||t.safari,r=/CriOS\/[\d]+/.test(navigator.userAgent),a=function(e){(t.setImmediate||t.setTimeout)((function(){throw e}),0)},o=function(t){setTimeout((function(){"string"==typeof t?e().revokeObjectURL(t):t.remove()}),4e4)},h=function(t){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob(["\ufeff",t],{type:t.type}):t},l=function(l,c,u){u||(l=h(l));var f,d=this,p="application/octet-stream"===l.type,b=function(){!function(t,e,i){for(var s=(e=[].concat(e)).length;s--;){var n=t["on"+e[s]];if("function"==typeof n)try{n.call(t,i||t)}catch(t){a(t)}}}(d,"writestart progress write writeend".split(" "))};if(d.readyState=d.INIT,s)return f=e().createObjectURL(l),void setTimeout((function(){i.href=f,i.download=c,function(t){var e=new MouseEvent("click");t.dispatchEvent(e)}(i),b(),o(f),d.readyState=d.DONE}));!function(){if((r||p&&n)&&t.FileReader){var i=new FileReader;return i.onloadend=function(){var e=r?i.result:i.result.replace(/^data:[^;]*;/,"data:attachment/file;");t.open(e,"_blank")||(t.location.href=e),e=void 0,d.readyState=d.DONE,b()},i.readAsDataURL(l),void(d.readyState=d.INIT)}f||(f=e().createObjectURL(l)),p?t.location.href=f:t.open(f,"_blank")||(t.location.href=f),d.readyState=d.DONE,b(),o(f)}()},c=l.prototype;return typeof navigator<"u"&&navigator.msSaveOrOpenBlob?function(t,e,i){return e=e||t.name||"download",i||(t=h(t)),navigator.msSaveOrOpenBlob(t,e)}:(c.abort=function(){},c.readyState=c.INIT=0,c.WRITING=1,c.DONE=2,c.error=c.onwritestart=c.onprogress=c.onwrite=c.onabort=c.onerror=c.onwriteend=null,function(t,e,i){return new l(t,e||t.name||"download",i)})}}(typeof self<"u"&&self||typeof window<"u"&&window||this.content);!!jt.exports&&(jt.exports.saveAs=Ot),(s.isCordova||s.isMeteorServer||s.isNode)&&console.log("It looks like you are using the browser version of AlaSQL. Please use the alasql.fs.js file instead."),t.utils.saveAs=Ot}return new $("alasql"),t.use("alasql"),t}()),Vt.exports),Yt=_t(qt),Wt=Uint8Array,Xt=Uint16Array,zt=Int32Array,Jt=new Wt([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Kt=new Wt([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Qt=new Wt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Zt=function(t,e){for(var i=new Xt(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var n=new zt(i[30]);for(s=1;s<30;++s)for(var r=i[s];r<i[s+1];++r)n[r]=r-i[s]<<5|s;return{b:i,r:n}},te=Zt(Jt,2),ee=te.b,ie=te.r;ee[28]=258,ie[258]=28;for(var se=Zt(Kt,0).b,ne=new Xt(32768),re=0;re<32768;++re){var ae=(43690&re)>>1|(21845&re)<<1;ne[re]=((65280&(ae=(61680&(ae=(52428&ae)>>2|(13107&ae)<<2))>>4|(3855&ae)<<4))>>8|(255&ae)<<8)>>1}var oe=function(t,e,i){for(var s=t.length,n=0,r=new Xt(e);n<s;++n)t[n]&&++r[t[n]-1];var a,o=new Xt(e);for(n=1;n<e;++n)o[n]=o[n-1]+r[n-1]<<1;if(i){a=new Xt(1<<e);var h=15-e;for(n=0;n<s;++n)if(t[n])for(var l=n<<4|t[n],c=e-t[n],u=o[t[n]-1]++<<c,f=u|(1<<c)-1;u<=f;++u)a[ne[u]>>h]=l}else for(a=new Xt(s),n=0;n<s;++n)t[n]&&(a[n]=ne[o[t[n]-1]++]>>15-t[n]);return a},he=new Wt(288);for(re=0;re<144;++re)he[re]=8;for(re=144;re<256;++re)he[re]=9;for(re=256;re<280;++re)he[re]=7;for(re=280;re<288;++re)he[re]=8;var le=new Wt(32);for(re=0;re<32;++re)le[re]=5;var ce=oe(he,9,1),ue=oe(le,5,1),fe=function(t){for(var e=t[0],i=1;i<t.length;++i)t[i]>e&&(e=t[i]);return e},de=function(t,e,i){var s=e/8|0;return(t[s]|t[s+1]<<8)>>(7&e)&i},pe=function(t,e){var i=e/8|0;return(t[i]|t[i+1]<<8|t[i+2]<<16)>>(7&e)},be=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],ve=function(t,e,i){var s=new Error(e||be[t]);if(s.code=t,Error.captureStackTrace&&Error.captureStackTrace(s,ve),!i)throw s;return s},Ee=new Wt(0);function me(t,e){var i,s,n=function(t){31==t[0]&&139==t[1]&&8==t[2]||ve(6,"invalid gzip data");var e=t[3],i=10;4&e&&(i+=2+(t[10]|t[11]<<8));for(var s=(e>>3&1)+(e>>4&1);s>0;s-=!t[i++]);return i+(2&e)}(t);return n+8>t.length&&ve(6,"invalid gzip data"),function(t,e,i,s){var n=t.length;if(!n||e.f&&!e.l)return i||new Wt(0);var r=!i,a=r||2!=e.i;r&&(i=new Wt(3*n));var o,h,l=function(t){var e=i.length;if(t>e){var s=new Wt(Math.max(2*e,t));s.set(i),i=s}},c=e.f||0,u=e.p||0,f=e.b||0,d=e.l,p=e.d,b=e.m,v=e.n,E=8*n;do{if(!d){c=de(t,u,1);var m=de(t,u+1,3);if(u+=3,!m){var g=t[(L=4+((u+7)/8|0))-4]|t[L-3]<<8,w=L+g;if(w>n){ve(0);break}a&&l(f+g),i.set(t.subarray(L,w),f),e.b=f+=g,e.p=u=8*w,e.f=c;continue}if(1==m)d=ce,p=ue,b=9,v=5;else if(2==m){var y=de(t,u,31)+257,T=de(t,u+10,15)+4,S=y+de(t,u+5,31)+1;u+=14;for(var A=new Wt(S),O=new Wt(19),R=0;R<T;++R)O[Qt[R]]=de(t,u+3*R,7);u+=3*T;var N=fe(O),_=(1<<N)-1,C=oe(O,N,1);for(R=0;R<S;){var L,I=C[de(t,u,_)];if(u+=15&I,(L=I>>4)<16)A[R++]=L;else{var k=0,M=0;for(16==L?(M=3+de(t,u,3),u+=2,k=A[R-1]):17==L?(M=3+de(t,u,7),u+=3):18==L&&(M=11+de(t,u,127),u+=7);M--;)A[R++]=k}}var $=A.subarray(0,y),x=A.subarray(y);b=fe($),v=fe(x),d=oe($,b,1),p=oe(x,v,1)}else ve(1);if(u>E){ve(0);break}}a&&l(f+131072);for(var D=(1<<b)-1,P=(1<<v)-1,U=u;;U=u){var G=(k=d[pe(t,u)&D])>>4;if((u+=15&k)>E){ve(0);break}if(k||ve(2),G<256)i[f++]=G;else{if(256==G){U=u,d=null;break}var F=G-254;G>264&&(F=de(t,u,(1<<(H=Jt[R=G-257]))-1)+ee[R],u+=H);var B=p[pe(t,u)&P],j=B>>4;if(B||ve(3),u+=15&B,x=se[j],j>3){var H=Kt[j];x+=pe(t,u)&(1<<H)-1,u+=H}if(u>E){ve(0);break}a&&l(f+131072);var V=f+F;if(f<x){var q=0-x,Y=Math.min(x,V);for(q+f<0&&ve(3);f<Y;++f)i[f]=s[q+f]}for(;f<V;++f)i[f]=i[f-x]}}e.l=d,e.p=U,e.b=f,e.f=c,d&&(c=1,e.m=b,e.d=p,e.n=v)}while(!c);return f!=i.length&&r?(o=i,(null==(h=f)||h>o.length)&&(h=o.length),new Wt(o.subarray(0,h))):i.subarray(0,f)}(t.subarray(n,-8),{i:2},new Wt(((i=t)[(s=i.length)-4]|i[s-3]<<8|i[s-2]<<16|i[s-1]<<24)>>>0),e)}var ge="undefined"!=typeof TextDecoder&&new TextDecoder;try{ge.decode(Ee,{stream:!0})}catch(t){}function we(t){return F(t)}function ye(t){const e=t.indexOf(":");if(-1===e)throw new Error("Invalid compressed format: missing ':' separator");const i=t.slice(0,e),s=t.slice(e+1),n=atob(s),r=new Uint8Array(n.length);for(let t=0;t<n.length;t++)r[t]=n.charCodeAt(t);const a=me(r);return{hash:i,json:(new TextDecoder).decode(a)}}const Te=class{constructor(e){t(this,e),this.datasources="",this.static=!1,this.raw=!0,this.lastBodyHash=null,h(this),this.errors=l(this),this.database=new Yt.Database,((t,e)=>{let i,n,r=[];const a=new MutationObserver((i=>{i.forEach((i=>{"datasources"===i.attributeName&&(r=(s(t).getAttribute("datasources")||"").split(","),r.forEach((t=>{e(t,n.datasources.get(t))})))}))})),o=t.connectedCallback;t.connectedCallback=()=>{const h=s(t);n=u(h),r=(h.getAttribute("datasources")||"").split(","),r.forEach((t=>{e(t,n.datasources.get(t))})),a.observe(h,{attributes:!0,attributeFilter:["datasources"]}),i=n.datasources.on("set",((t,i)=>{r.includes(t)&&e(t,i)})),c(o,t)};const h=t.disconnectedCallback;t.disconnectedCallback=()=>{a.disconnect(),c(i),f(s(t)),c(h,t)}})(this,((t,e)=>{this.database.tables[t]={data:e},this.executeQuery()})),b(this,(t=>{let e,i;if(!this.raw&&this.static)try{const s=ye(t);e=s.hash,i=s.json}catch(e){return void console.error("Error decoding compressed dataset",e,String(t).slice(0,200))}else e=we(t),i=t;e!==this.lastBodyHash&&(this.lastBodyHash=e,this.query=i,this.executeQuery())}))}executeQuery(){if(this.stores||(this.stores=u(this.element)),this.query&&this.name){let t;if(this.static)try{t=JSON.parse(this.query)}catch(e){console.error("Failed to parse static dataset",e),t=[]}else t=this.database.exec(this.query);this.latestResult!==t&&(this.latestResult=t,this.stores.datasets.set(this.name,t),this.stores.datasetsMeta.set(this.name,function(t){const e={};for(const t of Ut)e[t]=new Set;const i={};for(const t of Pt)i[t]={hasData:!1,min:null,max:null};const s=new Set;let n=null,r=null;const a=Array.isArray(t)?t:[];for(let t=0;t<a.length;t++){const o=a[t];if(null==o)continue;for(const t of Ut){const i=o[t];null!=i&&""!==i&&e[t].add(String(i))}for(const t of Pt){const e=o[t];if(Gt(e)){const s=i[t];s.hasData=!0,(null===s.min||e<s.min)&&(s.min=e),(null===s.max||e>s.max)&&(s.max=e)}}const h=o.date;if(null!=h&&""!==h){const t=String(h);s.add(t),(null===n||t<n)&&(n=t),(null===r||t>r)&&(r=t)}}const o=Pt.map((t=>({key:t,hasData:i[t].hasData,min:i[t].min,max:i[t].max}))),h=o.filter((t=>t.hasData)).map((t=>t.key)),l=Ft(e.rowGroup),c=Ft(e.category),u=Ft(e.subCategory),f=Ft(e.columnGroup),d=Ft(e.columnSubGroup),p={min:n,max:r,hasData:s.size>0,distinctCount:s.size};let b="category";return u.hasData?b="subCategory":c.hasData?b="category":l.hasData&&(b="rowGroup"),{rowCount:a.length,scenarios:o,availableScenarios:h,rowGroup:l,category:c,subCategory:u,columnGroup:f,columnSubGroup:d,dateRange:p,suggestedLevel:b,suggestedOrder:b,suggestedDateInterval:p.hasData?"auto":null,calculatedAt:Date.now()}}(t)))}}nameUpdated(){this.executeQuery()}render(){return e(i,{key:"3e8b6fbc52b5b5cbe0ae88d7aa1d259f86d63e1b"})}get element(){return s(this)}static get watchers(){return{name:[{nameUpdated:0}]}}};Te.style="bn-dataset{display:none}";const Se=class{constructor(e){t(this,e),this.raw=!0,this.lastHash=null,h(this),this.errors=l(this),b(this,(t=>{this.stores||(this.stores=u(this.element));try{let e,i;if(this.raw)e=we(t),i=t;else{const s=ye(t);e=s.hash,i=s.json}if(e===this.lastHash)return;this.lastHash=e;const s=JSON.parse(i);this.stores.datasources.set(this.name,s)}catch(e){console.error("Error parsing datasource",e,String(t).slice(0,200)),this.stores.datasources.set(this.name,[])}}))}render(){return e(i,{key:"43b691b07f63d12ad6c835dfb5d5bf6053b3bbf4"})}get element(){return s(this)}};Se.style="bn-datasource{display:none}";const Ae=class{constructor(e){t(this,e),this.pageNumber=null,this.displayPageNumber=!0,h(this),this.errors=l(this),this.componentStyle=v(this)}getFontStyles(){return this.componentStyle((t=>{var e,i,s,n;return{"--bn-font-family":(null===(e=t.global)||void 0===e?void 0:e.fontFamily)||"'Noto Sans', sans-serif","--bn-font-size":`${(null===(i=t.global)||void 0===i?void 0:i.fontSizePx)||13.3333}px`,"--bn-font-color":(null===(s=t.global)||void 0===s?void 0:s.fontColor)||"#000000","--bn-font-background":(null===(n=t.global)||void 0===n?void 0:n.fontBackgroundColor)||"#ffffff"}}))}isValidHttpUrl(t){let e;try{e=new URL(t)}catch(t){return!1}return"http:"===e.protocol||"https:"===e.protocol}prepareAssetUrl(t){return this.isValidHttpUrl(t)?t:`./assets/${t}.png`}render(){return e(i,{key:"c445ca8c8abde56b46564932a6fcd079aa1e640d",id:this.displayPageNumber||this.text||this.code?"container-page-footer":"container",style:this.getFontStyles()},e("div",{key:"2e5829597d228c78acbbbf130bfc440092456cb4",id:"footer-text"},null!=this.text?e("span",{class:"note"},this.text):""),e("div",{key:"a2c98bf85fc41fa0aebc35fded0528cd8ba4948f",id:"code"},null!=this.code?e("img",{class:"image",src:a(`${this.prepareAssetUrl(this.code)}`)}):""),e("div",{key:"e879c6ed16996d8b505d64426e2253f3057863f5",id:"page-number"},this.displayPageNumber?e("span",{class:"page"},this.pageNumber):""))}static get assetsDirs(){return["assets"]}get element(){return s(this)}};Ae.style=':host{padding:0.2em 0.5em;display:flex;flex-direction:row;justify-content:space-between;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);color:var(--bn-font-color, #000000)}:host(#container-page-footer){box-sizing:border-box;-webkit-box-sizing:border-box;border-top:0.1em solid #ddd}div#footer-text{font-size:0.6em;display:inline}div#code{flex:1;display:inline;text-align:right;padding-right:1em}div#page-number{font-size:0.6em;display:inline}.image{z-index:2;background-color:transparent;border:transparent;height:1.2em;width:auto}';const Oe=class{constructor(e){t(this,e),this.titleImage="",this.titleBusinessUnit="",this.titleOrder="category",this.titleOrderDirection="asc",this.titleDateFormat="none",this.titleDateLink="none",this.titleNamespace="_system",this.footerText="",this.cardLayout="full",this.cardCustomTemplate='"a b" "c d"',this.cardGridGap="0",this.cardFitToContent=!1,this.cardShowBorder=!0,this.templateMap=new Map([["split-vertical",'"a b"'],["split-horizontal",'"a" "b"'],["2x2",'"a b" "c d"'],["3x3",'"a b c" "d e f" "g h i"'],["4x4",'"a b c d" "e f g h" "i j k l" "m n o p"'],["1-over-2",'"a a" "b c"'],["2-over-1",'"a b" "c c"'],["1-over-3",'"a a a " "b c d"'],["3-over-1",'"a b c" "d d d"'],["custom-template",'"a b" "c c c"'],["gold3",'"a c" "b c"'],["gold4",'"a b c c" "d d c c"']]),this.errors=l(this),this.resolveInherited=Tt(this,[{propName:"titleScenarios",ancestorAttr:"title-scenarios"},{propName:"titleVariances",ancestorAttr:"title-variances"},{propName:"titleOrder",ancestorAttr:"title-order"},{propName:"titleOrderDirection",ancestorAttr:"title-order-direction"}])}connectedCallback(){this.stores=u(this.element),this.reflectInheritedAttrs()}getCommonStyles(){let t="100%";return!0===this.cardFitToContent&&(t="fit-content"),{display:"grid",height:t,width:"100%",gap:this.cardGridGap+"px"}}calculateFractions(t){const e=t.trim().split(/\s+/).length;return 0===e?"minmax(0, 1fr)":Array(e).fill("minmax(0, 1fr)").join(" ")}getGridTemplateColumns(t){const e=this.getTemplatePattern(t).match(/"[\w\d\s.]+"/g);return e&&0!==e.length?this.calculateFractions(e[0]):"minmax(0, 1fr)"}getGridTemplateRows(t){const e=this.getTemplatePattern(t).match(/"[\w\d\s.]+"/g),i=e?e.length:1;return this.cardFitToContent?Array(i).fill("auto").join(" "):Array(i).fill("minmax(0, 1fr)").join(" ")}getLayoutStyle(){return Object.assign(Object.assign({},this.getCommonStyles()),{"grid-template-areas":this.getTemplatePattern(this.cardLayout),"grid-template-columns":this.getGridTemplateColumns(this.cardLayout),"grid-template-rows":this.getGridTemplateRows(this.cardLayout)})}createDivAreaStyles(t){return t.map((t=>({display:"flex",overflow:"hidden","grid-area":t})))}getSlots(t){const i=this.createDivAreaStyles(t);return e(o,null,i.map(((t,i)=>e("div",{style:t},e("slot",{name:"card-slot-"+i})))))}extractSlotNames(t){if(null==t)return[];const e=t.match(/\b\w+\b/g);return e?Array.from(new Set(e)):[]}getTemplatePattern(t){return!1===this.templateMap.has(t)&&"custom-template"!==t?'"a"':"custom-template"===t?this.cardCustomTemplate:this.templateMap.get(t)}async getNumberOfSlot(t){const e=this.getTemplatePattern(t);return this.extractSlotNames(e).length}componentDidUpdate(){}setCardClass(){return!0===this.cardShowBorder?"card_box border":"card_box"}reflectInheritedAttrs(){const t=[{prop:"titleScenarios",attr:"title-scenarios"},{prop:"titleVariances",attr:"title-variances"},{prop:"titleOrder",attr:"title-order"},{prop:"titleOrderDirection",attr:"title-order-direction"}];for(const{prop:e,attr:i}of t){const t=this.resolveInherited(e,this[e]);void 0!==t&&this.element.setAttribute(i,t)}}prepareTitleImage(t){if(null==t||""===t)return"";const e=this.stores.assets.state;return t.startsWith("asset:")?e[t.substring(6)]:e[t]||t}render(){var t,i,s,n;const r=this.getLayoutStyle(),a=this.extractSlotNames(r["grid-template-areas"]);return e("bn-card",{key:"c39b6a8cf843b7b8d9b380215a3553288acd3647",styles:this.styles,class:this.setCardClass()},e("div",{key:"3206bff73cb01fad7223e3fd889e015992e535c6",class:"cardtitle"},e("bn-title",{key:"d410c817dd185a26bb7623dd3649c999516f706a",namespace:this.titleNamespace,"business-unit":this.titleBusinessUnit,scenarios:null!==(t=this.resolveInherited("titleScenarios",this.titleScenarios))&&void 0!==t?t:this.titleScenarios,variances:null!==(i=this.resolveInherited("titleVariances",this.titleVariances))&&void 0!==i?i:this.titleVariances,order:null!==(s=this.resolveInherited("titleOrder",this.titleOrder))&&void 0!==s?s:this.titleOrder,"order-direction":null!==(n=this.resolveInherited("titleOrderDirection",this.titleOrderDirection))&&void 0!==n?n:this.titleOrderDirection,measures:this.titleMeasures,"date-start":this.titleDateStart,"date-end":this.titleDateEnd,"date-format":this.titleDateFormat,"date-link":this.titleDateLink}),null!=this.titleImage&&""!==this.titleImage?e("img",{class:"image",src:this.prepareTitleImage(this.titleImage)}):""),e("bn-body",{key:"f56b1b70127cd2173e425cf723dbea2b62037d88"},e("div",{key:"e5766b5b28dd1d14fdbaf721baf72668502fcbec",style:r},this.getSlots(a))),e("bn-footer",{key:"bafb89f89c89aaf0e31fa754f0e834330b031627",text:this.footerText,"page-number":0,"display-page-number":"false"}))}get element(){return s(this)}};Oe.style=':host{background:var(--bn-font-background, white);color:var(--bn-font-color, black);font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);display:flex;flex-direction:column;width:100%;height:100%;overflow:hidden}.cardtitle{display:inline-flex}.image{margin-right:0.5em;margin-top:0.5em;z-index:2;background-color:transparent;border:transparent;height:4em;width:auto;display:inline}';const Re=class{constructor(e){t(this,e),this.messageText="",this.messageImage="",this.titleBusinessUnit="",this.titleOrder="category",this.titleOrderDirection="asc",this.titleDateFormat="none",this.titleDateLink="none",this.titleNamespace="_system",this.footerDisplayPageNumber=!0,this.pageLayout="full",this.pageCustomTemplate='"a b" "c d"',this.pageGridGap="0",this.pageFitToContent=!1,this.templateMap=new Map([["split-vertical",'"a b"'],["split-horizontal",'"a" "b"'],["2x2",'"a b" "c d"'],["3x3",'"a b c" "d e f" "g h i"'],["4x4",'"a b c d" "e f g h" "i j k l" "m n o p"'],["1-over-2",'"a a" "b c"'],["2-over-1",'"a b" "c c"'],["1-over-3",'"a a a " "b c d"'],["3-over-1",'"a b c" "d d d"'],["custom-template",'"a b" "c c c"'],["gold3",'"a c" "b c"'],["gold4",'"a b c c" "d d c c"']]),this.errors=l(this)}getCommonStyles(){let t="100%";return!0===this.pageFitToContent&&(t="fit-content"),{display:"grid",height:t,width:"100%",gap:this.pageGridGap+"px"}}getGridTemplateRows(t){const e=this.getTemplateAreas(t).match(/"[\w\d\s.]+"/g),i=e?e.length:1;return this.pageFitToContent?Array(i).fill("auto").join(" "):Array(i).fill("minmax(0, 1fr)").join(" ")}getLayoutStyle(){return Object.assign(Object.assign({},this.getCommonStyles()),{"grid-template-areas":this.getTemplateAreas(this.pageLayout),"grid-template-columns":this.getGridTemplateColumns(this.pageLayout),"grid-template-rows":this.getGridTemplateRows(this.pageLayout)})}createDivAreaStyles(t){return t.map((t=>({display:"flex",overflow:"hidden","grid-area":t})))}getSlots(t){const i=this.createDivAreaStyles(t);return e(o,null,i.map(((t,i)=>e("div",{style:t},e("slot",{name:"slot-"+i})))))}extractSlotNames(t){if(null==t)return[];const e=t.match(/\b\w+\b/g);return e?Array.from(new Set(e)):[]}getTemplateAreas(t){return!1===this.templateMap.has(t)&&"custom-template"!==t?'"a"':"custom-template"===t?this.pageCustomTemplate:this.templateMap.get(t)}calculateFractions(t){const e=t.trim().split(/\s+/).length;return 0===e?"minmax(0, 1fr)":Array(e).fill("minmax(0, 1fr)").join(" ")}getGridTemplateColumns(t){if(!1===this.templateMap.has(t)&&"custom-template"!==t)return"1fr";let e;e="custom-template"===t?this.pageCustomTemplate:this.templateMap.get(t);const i=e.match(/"[\w\d\s.]+"/g);return this.calculateFractions(i[0])}async getNumberOfSlot(t){const e=this.getTemplateAreas(t);return this.extractSlotNames(e).length}componentDidUpdate(){const t=this.element.closest("bn-context").getAttribute("render-orientation");if(t&&t!==this.pageOrientation){const t=this.element.shadowRoot.querySelector("bn-page"),e=this.element.closest("bn-layout-page");e&&t&&(t.style.transform="rotate(-90deg) translate(-100%)",t.style.transformOrigin="top left",e.style.width=`${t.clientHeight}px`,e.style.height=`${t.clientWidth}px`)}}render(){const t=this.getLayoutStyle(),i=this.extractSlotNames(t["grid-template-areas"]);return e("bn-page",{key:"958dbce3b000c62d287f6263fed495523786e28d",styles:this.styles,format:this.pageFormat,orientation:this.pageOrientation},e("bn-message",{key:"cdb559c63a0466ccaa1cd807d027dd127e3b3efe",text:this.messageText,image:this.messageImage}),e("bn-title",{key:"48fafd3fc8be7d49df4939bd5db63908b36e523f",namespace:this.titleNamespace,"business-unit":this.titleBusinessUnit,scenarios:this.titleScenarios,variances:this.titleVariances,order:this.titleOrder,"order-direction":this.titleOrderDirection,measures:this.titleMeasures,"date-start":this.titleDateStart,"date-end":this.titleDateEnd,"date-format":this.titleDateFormat,"date-link":this.titleDateLink}),e("bn-body",{key:"93c9f7b2c345c8bc6fdb20d35fa406ee919379eb"},e("div",{key:"64e4db5a7b6265bcd73b700227b5f033c99facdc",style:t},this.getSlots(i))),e("bn-footer",{key:"f7b69e9fcfbdde742a2d547f81c50dd78a3ed02f",text:this.footerText,"page-number":this.pageNumber,"display-page-number":this.footerDisplayPageNumber}))}get element(){return s(this)}};Re.style=':host{background:var(--bn-font-background, white);color:var(--bn-font-color, black);font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);display:block;overflow:hidden}';const Ne=class{constructor(e){t(this,e),h(this),this.errors=l(this),this.componentStyle=v(this)}connectedCallback(){this.stores=u(this.element)}getFontStyles(){return this.componentStyle((t=>{var e,i,s,n;return{"--bn-font-family":(null===(e=t.global)||void 0===e?void 0:e.fontFamily)||"'Noto Sans', sans-serif","--bn-font-size":`${(null===(i=t.global)||void 0===i?void 0:i.fontSizePx)||13.3333}px`,"--bn-font-color":(null===(s=t.global)||void 0===s?void 0:s.fontColor)||"#000000","--bn-font-background":(null===(n=t.global)||void 0===n?void 0:n.fontBackgroundColor)||"#ffffff"}}))}prepareAssetUrl(t){if(null==t||""===t)return"";const e=this.stores.assets.state;return t.startsWith("asset:")?e[t.substring(6)]:e[t]||t}render(){return e(i,{key:"bbe7f6098aa6f3a5495b36557b218a82ec2ccbca",id:this.text||this.image?"container-page-message":"container",style:this.getFontStyles()},e("div",{key:"d89297da5605b0ee1cc757b1771b6a48525a24e5",id:"message-text"},null!=this.text&&""!==this.text?e("span",{class:"note"},this.text):""),e("div",{key:"70bc74b0a8a5a39fdd2931cf86faada294142a26",id:"page-image"},null!=this.image&&""!==this.image?e("img",{class:"image",src:this.prepareAssetUrl(this.image)}):""))}static get assetsDirs(){return["assets"]}get element(){return s(this)}};Ne.style=':host{padding:0.2em 0.5em;display:flex;flex-direction:row;justify-content:space-between;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);color:var(--bn-font-color, #000000)}:host(#container-page-message){height:4.55em;box-sizing:border-box;-webkit-box-sizing:border-box;border-bottom:0.1em solid #ddd}div#message-text{font-size:1.4em;overflow:clip;display:inline}.image{z-index:2;background-color:transparent;border:transparent;height:4em;width:auto;display:inline}';const _e=["xga","hd","full-hd","4k","4k2k","a4","a3","a2","a1","a0","letter","legal"],Ce=["landscape","portrait"],Le=class{constructor(e){t(this,e),h(this),this.errors=l(this),this.componentStyle=v(this)}validateFormat(t){const e="ERR_format";_(t)||_e.includes(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:`format: invalid value '${t}' is not supported. Valid values: ${_e.join(", ")}`})}validateOrientation(t){const e="ERR_orientation";_(t)||Ce.includes(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:`orientation: invalid value '${t}' is not supported. Valid values: ${Ce.join(", ")}`})}render(){return e(i,{key:"b4d682a8f6e83f77c58236265eaf9d1327809c6f",format:this.format,orientation:this.orientation,style:this.prepareStyle()},e("slot",{key:"ef49c43c1f8926c4c968b752608627adbe330d6c"}))}prepareStyle(){return{"font-family":this.componentStyle((t=>t.global.fontFamily)),"font-size":`${this.componentStyle((t=>t.global.fontSizePx))}px`,"--bn-font-family":this.componentStyle((t=>t.global.fontFamily))||"'Noto Sans', sans-serif","--bn-font-size":`${this.componentStyle((t=>t.global.fontSizePx))||13.3333}px`,"--bn-font-color":this.componentStyle((t=>t.global.fontColor))||"#000000","--bn-font-background":this.componentStyle((t=>t.global.fontBackgroundColor))||"#ffffff"}}get element(){return s(this)}static get watchers(){return{format:[{validateFormat:0}],orientation:[{validateOrientation:0}]}}};Le.style=':host{background:var(--bn-font-background, white);color:var(--bn-font-color, black);font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);height:768px;width:1024px;display:flex;flex-direction:column;page-break-after:always;overflow:hidden}:host([format=xga]){height:768px;width:1024px}:host([format=xga][orientation=portrait]){height:1024px;width:768px}:host([format=xga][orientation=landscape]){height:768px;width:1024px}:host([format=hd]){height:720px;width:1280px}:host([format=hd][orientation=portrait]){height:1280px;width:720px}:host([format=hd][orientation=landscape]){height:720px;width:1280px}:host([format=full_hd]){height:1080px;width:1920px}:host([format=full_hd][orientation=portrait]){height:1920px;width:1080px}:host([format=full_hd][orientation=landscape]){height:1080px;width:1920px}:host([format="4k"]){height:2160px;width:3840px}:host([format="4k"][orientation=portrait]){height:3840px;width:2160px}:host([format="4k"][orientation=landscape]){height:2160px;width:3840px}:host([format="4k2k"]){height:2160px;width:4096px}:host([format="4k2k"][orientation=portrait]){height:4096px;width:2160px}:host([format="4k2k"][orientation=landscape]){height:2160px;width:4096px}:host([format=a6]){height:5.83in;width:4.13in}:host([format=a6][orientation=portrait]){height:5.83in;width:4.13in}:host([format=a6][orientation=landscape]){height:4.13in;width:5.83in}:host([format=a5]){height:8.27in;width:5.83in}:host([format=a5][orientation=portrait]){height:8.27in;width:5.83in}:host([format=a5][orientation=landscape]){height:5.83in;width:8.27in}:host([format=a4]){height:11.6in;width:8.17in}:host([format=a4][orientation=portrait]){height:11.6in;width:8.17in}:host([format=a4][orientation=landscape]){height:8.17in;width:11.6in}:host([format=a3]){height:16.54in;width:11.7in}:host([format=a3][orientation=portrait]){height:16.54in;width:11.7in}:host([format=a3][orientation=landscape]){height:11.7in;width:16.54in}:host([format=a2]){height:23.4in;width:16.54in}:host([format=a2][orientation=portrait]){height:23.4in;width:16.54in}:host([format=a2][orientation=landscape]){height:16.54in;width:23.4in}:host([format=a1]){height:33.1in;width:23.4in}:host([format=a1][orientation=portrait]){height:33.1in;width:23.4in}:host([format=a1][orientation=landscape]){height:23.4in;width:33.1in}:host([format=a0]){height:46.8in;width:33.1in}:host([format=a0][orientation=portrait]){height:46.8in;width:33.1in}:host([format=a0][orientation=landscape]){height:33.1in;width:46.8in}:host([format=letter]){height:11in;width:8.5in}:host([format=letter][orientation=portrait]){height:11in;width:8.5in}:host([format=letter][orientation=landscape]){height:8.5in;width:11in}:host([format=legal]){height:14in;width:8.5in}:host([format=legal][orientation=portrait]){height:14in;width:8.5in}:host([format=legal][orientation=landscape]){height:8.5in;width:14in}:host([format=tabloid]){height:17in;width:11in}:host([format=tabloid][orientation=portrait]){height:17in;width:11in}:host([format=tabloid][orientation=landscape]){height:11in;width:17in}:host([format=ledger]){height:11in;width:17in}:host([format=ledger][orientation=portrait]){height:17in;width:11in}:host([format=ledger][orientation=landscape]){height:11in;width:17in}';const Ie=class{constructor(e){t(this,e),h(this),this.errors=l(this)}connectedCallback(){this.stores=u(this.element),this.pushToStore()}onNameChange(t,e){e&&e!==t&&this.stores&&this.stores.scalingGroups.state[e]===this.value&&this.stores.scalingGroups.set(e,void 0),this.pushToStore()}onValueChange(){this.pushToStore()}pushToStore(){var t;if(!this.stores)return;const e=null===(t=this.name)||void 0===t?void 0:t.toString().trim();"auto"!==(null==e?void 0:e.toLowerCase())?(this.errors.remove("ERR_reserved_name"),e?(this.errors.remove("ERR_empty_name"),this.stores.scalingGroups.set(e,this.value)):this.errors.addOrReplace({id:"ERR_empty_name",type:"warning",message:"bn-scaling-group: name is required."})):this.errors.addOrReplace({id:"ERR_reserved_name",type:"warning",message:'bn-scaling-group: name "auto" is reserved and cannot be used.'})}render(){return e(i,{key:"5f38a91595cb1494b275d48345bf821fddb9b904"})}get element(){return s(this)}static get watchers(){return{name:[{onNameChange:0}],value:[{onValueChange:0}]}}};var ke,Me,$e,xe,De;Ie.style="bn-scaling-group{display:none}",function(t){t[t.ALL=-1]="ALL"}(ke||(ke={})),function(t){t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.DIRTY=1]="DIRTY"}(Me||(Me={})),function(t){t.LIST="list",t.SUM="sum",t.SUMNOTOTAL="sumnototal",t.OPT="opt",t.OPTNOTOTAL="optnototal"}($e||($e={})),function(t){t.ASC="asc",t.DESC="desc"}(xe||(xe={})),function(t){t.HEADER="HEADER",t.GROUPHEAD="GROUPHEAD",t.SEPERATORLINE="SEPERATORLINE",t.SUM="SUM",t.GROUPSUM="GROUP_SUM",t.DRILLELEMENT="DRILLELEMENT",t.STANDARD="STANDARD",t.PARTELEMENT="PARTELEMENT",t.ENTRY="ENTRY"}(De||(De={}));const Pe=class{validateScaling(t){if(null==t||""===t||"none"===t||"auto"===t)return void this.errors.remove("ERR_scale");const e=Number(t);isNaN(e)||e<=0?this.errors.addOrReplace({id:"ERR_scale",type:"warning",message:`Invalid scale value: "${t}". Use "none", "auto", or a positive number.`}):this.errors.remove("ERR_scale")}constructor(e){t(this,e),this.layoutObserver=null,this._lastScaledParentWidth=0,this.data=[],this.datasetMeta=null,this.appliedScaleFactor=1,this.tableTitle="",this.filter="",this.measureUnit="",this.barColumnWidth="w10",this.unitScaling=.01,this.percentageScaling=.5,this.pixelPerUnitGroupMap=new Map,this.dataFormat="decimal",this.grouped="false",this.showMeasureScale="false",this.showGroupTitle="true",this.type="list",this.limit=0,this.thereof="[]",this.partof="[]",this.order="category",this.orderDirection="asc",this.measureType="volume",this.measureScale="greatest",this.dataFormatDigitsDecimal=1,this.dataFormatDigitsPercent=2,this.categoryWidth="w15",this.columnthereof=null,this._autoScaleGuard=!1,N(this),h(this),this.errors=l(this),Et(this),this.componentStyle=v(this),ct(this,((t,e)=>{this.data=e||[]}),((t,e)=>{this.datasetMeta=e})),this.t=ut(this).t,this.resolveInherited=Tt(this,[{propName:"scenarios",ancestorAttr:"title-scenarios"},{propName:"variances",ancestorAttr:"title-variances"},{propName:"order",ancestorAttr:"title-order"},{propName:"orderDirection",ancestorAttr:"title-order-direction"}])}validateScenario(t){const e="ERR_scenarios";if(wt(t))return void this.errors.remove(e);const i=E(t);i.length>0?this.errors.addOrReplace({id:e,type:"warning",message:"scenarios: invalid value(s) '"+(null==i?void 0:i.toString())+"' are not supported."}):this.errors.remove(e)}validateVariances(t){const e="ERR_variances";if(wt(t))return void this.errors.remove(e);const i=m(t);i.length>0?this.errors.addOrReplace({id:e,type:"warning",message:"variances: invalid value(s) '"+JSON.stringify(i)+"' are not supported."}):this.errors.remove(e)}validateBarColumns(t){const e="ERR_barColumns";if(_(t))return void this.errors.remove(e);const i=m(t);i.length>0?this.errors.addOrReplace({id:e,type:"warning",message:"barColumns: invalid value(s) '"+JSON.stringify(i)+"' are not supported."}):this.errors.remove(e)}validateBarColumnWidth(t){const e="ERR_barColumnWidth";B(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"barColumnWidth: invalid value '"+t+"' is not supported."})}validateUnitScaling(t){const e="ERR_unitScaling";"auto"===(null==t?void 0:t.toString().trim().toLowerCase())||g(t)||this.pixelPerUnitGroupMap.has(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"unitScaling: invalid value '"+t+"' is not supported."})}validatePercentageScaling(t){const e="ERR_percentageScaling";"auto"===(null==t?void 0:t.toString().trim().toLowerCase())||g(t)||this.pixelPerUnitGroupMap.has(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"percentageScaling: invalid value '"+t+"' is not supported."})}validateDataFormat(t){const e="ERR_dataFormat";j(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"dataFormat: invalid value(s) '"+(null==t?void 0:t.toString())+"' are not supported."})}validateGrouped(t){const e="ERR_grouped";A(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"grouped: invalid value(s) '"+(null==t?void 0:t.toString())+"' are not supported."})}validateShowMeasureScale(t){const e="ERR_grouped";A(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"showMeasureScale: invalid value(s) '"+(null==t?void 0:t.toString())+"' are not supported."})}validateShowGroupTitle(t){const e="ERR_showGroupTitle";A(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"showGroupTitle: invalid value(s) '"+(null==t?void 0:t.toString())+"' are not supported."})}validateType(t){const e="ERR_type";H(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"type: invalid value(s) '"+(null==t?void 0:t.toString())+"' are not supported."})}validateLimit(t){const e="ERR_limit";S(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"order: invalid value '"+(null==t?void 0:t.toString())+"' is not supported."})}validateThereOf(t){const e="ERR_thereof",i=V(t);i.length>0?this.errors.addOrReplace({id:e,type:"warning",message:"ThereOf: invalid value(s) '"+JSON.stringify(i)+"' are not supported."}):this.errors.remove(e)}validatePartOf(t){const e="ERR_partof",i=q(t);i.length>0?this.errors.addOrReplace({id:e,type:"warning",message:"partof: invalid value(s) '"+JSON.stringify(i)+"' are not supported."}):this.errors.remove(e)}validateOrderList(t){const e="ERR_order";if(wt(t))return void this.errors.remove(e);const i=y(t);i.length>0?this.errors.addOrReplace({id:e,type:"warning",message:"order: invalid value(s) '"+JSON.stringify(i)+"' are not supported."}):this.errors.remove(e)}validateOrderDirection(t){const e="ERR_orderDirection";wt(t)||T(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"orderDirection: invalid value '"+(null==t?void 0:t.toString())+"' is not supported."})}validateMeasureType(t){const e="ERR_measureType";Y(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"measureType: invalid value '"+(null==t?void 0:t.toString())+"' is not supported."})}validateMeasureScale(t){const e="ERR_measureScale";O(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"measureScale: invalid value '"+(null==t?void 0:t.toString())+"' is not supported."})}validateDataFormatDigitsDecimal(t){const e="ERR_dataFormatDigitsDecimal";S(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"dataFormatDigitsDecimal: invalid value(s) '"+t+"' are not supported."})}validateDateFormatDigitsPercent(t){const e="ERR_dataFormatDigitsPercent";S(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"dataFormatDigitsPercent: invalid value(s) '"+t+"' are not supported."})}validateCategoryWidth(t){const e="ERR_categoryWidth";W(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"categoryWidth: invalid value(s) '"+t+"' are not supported."})}validateColumnThereOf(t){const e=X(t),i="ERR_categorythereof";e.length>0?this.errors.addOrReplace({id:i,type:"warning",message:"columnthereof: invalid value(s) '"+JSON.stringify(e)+"' are not supported."}):this.errors.remove(i)}componentWillLoad(){this.validateScenario(this.scenarios),this.validateVariances(this.variances),this.validateDataFormat(this.dataFormat),this.validateGrouped(this.grouped),this.validateShowGroupTitle(this.showGroupTitle),this.validateType(this.type),this.validateLimit(this.limit),this.validateThereOf(this.thereof),this.validatePartOf(this.partof),this.validateOrderDirection(this.orderDirection),this.validateOrderList(this.order),this.validateDataFormatDigitsDecimal(this.dataFormatDigitsDecimal),this.validateDateFormatDigitsPercent(this.dataFormatDigitsPercent),this.validateCategoryWidth(this.categoryWidth),this.validateMeasureType(this.measureType),this.validateMeasureScale(this.measureScale),this.validateColumnThereOf(this.columnthereof),this.validateShowMeasureScale(this.showMeasureScale),this.validateBarColumns(this.barColumns),this.validateBarColumnWidth(this.barColumnWidth),this.validateUnitScaling(this.unitScaling),this.validatePercentageScaling(this.percentageScaling),this.validateScaling(this.scale)}componentDidLoad(){this.layoutObserver=St(this.element,(()=>{if(this._autoScaleGuard)return;const{width:t}=ft(this.element);t>0&&Math.abs(t-this._lastScaledParentWidth)>2&&(this._lastScaledParentWidth=t,n(this))}))}disconnectedCallback(){var t;null===(t=this.layoutObserver)||void 0===t||t.disconnect(),this.layoutObserver=null,this.unsubscribe()}componentDidRender(){const{mode:t}=dt(this.scale);if("auto"!==t&&"empty"!==t)return void(this._autoScaleGuard=!1);if(this._autoScaleGuard)return void(this._autoScaleGuard=!1);const e=this.element,{width:i}=ft(e);if(i<=0)return;this._lastScaledParentWidth=i;const s=this.componentStyle((t=>{var e;return(null===(e=t.global)||void 0===e?void 0:e.fontSizePx)||13.3333})),n=e.scrollWidth,a=this.appliedScaleFactor;if(n<=i+1)return void this.errors.remove("AUTO_scale");const o=Math.max(.3,a*(i-1)/n);Math.abs(o-a)<.001||(e.style.setProperty("--bn-font-size",s*o+"px"),"empty"===t?this.errors.addOrReplace({id:"AUTO_scale",type:"warning",message:`Auto-scaled table by factor ${o.toFixed(3)}`}):this.errors.remove("AUTO_scale"),this._autoScaleGuard=!0,r((()=>{this.appliedScaleFactor=o})))}prepareDataFormat(){var t;return z[null===(t=this.dataFormat)||void 0===t?void 0:t.toUpperCase()]}prepareGrouped(){return"true"===this.grouped}prepareShowGroupTitle(){return"true"===this.showGroupTitle}prepareTableType(){var t;return $e[null===(t=this.type)||void 0===t?void 0:t.toUpperCase()]}prepareLimit(){return Math.floor(Number(this.limit)||0)}prepareThereOf(){return null==this.thereof||""===this.thereof.trim()?[]:JSON.parse(this.thereof)}preparePartOf(){return null==this.partof||""===this.partof.trim()?[]:JSON.parse(this.partof)}prepareOrder(){var t;const e=this.resolveInherited("order",this.order),i=this.resolveInherited("orderDirection",this.orderDirection),s=null!=e?e:this.order,n=null!=i?i:this.orderDirection,r="auto"===(null==s?void 0:s.trim().toLowerCase());let a=s;return r&&(null===(t=this.datasetMeta)||void 0===t?void 0:t.suggestedOrder)&&(a=this.datasetMeta.suggestedOrder),{hierarchy:a.split(",").map((t=>I[null==t?void 0:t.toUpperCase()])),direction:L[null==n?void 0:n.toUpperCase()]}}prepareI18nMode(){return J.META}prepareI18n(){const t=d,e=new Map(["in","category","operation","there_of","part_of","SUM_TOTAL"].map((t=>[t,this.t(".".concat(t))]))),i=new Map(t.map((t=>[t,this.t("global.".concat(t))])));return new Map([...i.entries(),...e.entries()])}prepareDataFormatDigits(){return{percent:this.dataFormatDigitsPercent,decimal:this.dataFormatDigitsDecimal}}prepareScenarios(){var t,e,i,s,n,r,a,o,h;const l=this.resolveInherited("scenarios",this.scenarios),c=this.resolveInherited("variances",this.variances);if(void 0!==l||void 0!==c){this.errors.remove("AUTO_scenarios");let e=[];return void 0!==l?e=e.concat(l.split(",")):_(this.scenarios)||(e=e.concat(this.scenarios.split(","))),void 0!==c?e=e.concat(c.split(",")):(null===(t=this.variances)||void 0===t?void 0:t.trim().length)>0&&(e=e.concat(this.variances.split(","))),e.map((t=>t.trim()))}const u="auto"===(null===(e=this.scenarios)||void 0===e?void 0:e.trim().toLowerCase());if((_(this.scenarios)||u)&&_(this.variances))return(null===(s=null===(i=this.datasetMeta)||void 0===i?void 0:i.availableScenarios)||void 0===s?void 0:s.length)>0?(u?this.errors.remove("AUTO_scenarios"):this.errors.addOrReplace({id:"AUTO_scenarios",type:"warning",message:`scenarios: not set, auto-detected: ${this.datasetMeta.availableScenarios.join(",")}`}),this.datasetMeta.availableScenarios):[];let f=[];return u||_(this.scenarios)?(null===(r=null===(n=this.datasetMeta)||void 0===n?void 0:n.availableScenarios)||void 0===r?void 0:r.length)>0&&(u?this.errors.remove("AUTO_scenarios"):this.errors.addOrReplace({id:"AUTO_scenarios",type:"warning",message:`scenarios: not set, auto-detected: ${this.datasetMeta.availableScenarios.join(",")}`}),f=f.concat(this.datasetMeta.availableScenarios)):(this.errors.remove("AUTO_scenarios"),f=f.concat(null===(a=this.scenarios)||void 0===a?void 0:a.split(","))),(null===(o=this.variances)||void 0===o?void 0:o.trim().length)>0&&(f=f.concat(null===(h=this.variances)||void 0===h?void 0:h.split(","))),f.map((t=>t.trim()))}prepareCategoryWidth(){var t;return _(this.categoryWidth)?K.INF:K[null===(t=this.categoryWidth)||void 0===t?void 0:t.toUpperCase()]}prepareMeasureScale(){return _(this.measureScale)?"GREATEST":["_","k","M","G","T","P","E","Z","Y","m","μ","n","p","P","f","a","z","y"].includes(this.measureScale.trim())||"LEAST"===this.measureScale.trim().toUpperCase()?this.measureScale.trim():"GREATEST"}prepareMeasureType(){var t;return _(this.measureType)?Q.VOLUME:Q[null===(t=this.measureType)||void 0===t?void 0:t.toUpperCase()]}prepareColumnThereOf(){if(null==this.columnthereof||""===this.columnthereof.trim())return new Map;const t=JSON.parse(this.columnthereof),e=new Map;for(const[i,s]of Object.entries(t))!1===e.has(s.scenario)&&e.set(s.scenario,[]),e.get(s.scenario).push(s);return e}prepareTableTitle(){return""===this.tableTitle||null==this.tableTitle?"SUM_TOTAL":this.tableTitle}prepareShowMeasureScale(){return"true"===this.showMeasureScale}prepareMeasureUnit(){return""===this.measureUnit||null==this.measureUnit?"":this.measureUnit}prepareFilter(){return 0===this.filter.length?"":this.filter}prepareBarColumnWidth(){var t;const e=null===(t=this.barColumnWidth)||void 0===t?void 0:t.toUpperCase(),i=tt[e];return i?Z[i]:Z[tt.W10]}prepareBarColumns(){return _(this.barColumns)?[]:this.barColumns.split(",").map((t=>t.trim()))}prepareUnitScaling(){var t;return this.pixelPerUnitGroupMap.has(this.unitScaling)?this.pixelPerUnitGroupMap.get(this.unitScaling):"auto"===(null===(t=this.unitScaling)||void 0===t?void 0:t.toString().trim().toLowerCase())?0:Number(this.unitScaling)}preparePercentageScaling(){var t;return this.pixelPerUnitGroupMap.has(this.percentageScaling)?this.pixelPerUnitGroupMap.get(this.percentageScaling):"auto"===(null===(t=this.percentageScaling)||void 0===t?void 0:t.toString().trim().toLowerCase())?0:Number(this.percentageScaling)}getDataStructure(){return{ITableDataRow:{setName:{type:"string",isOptional:!1,description:""},date:{type:"string",isOptional:!1,description:""},operation:{type:"string",isOptional:!1,description:""},rowGroup:{type:"string",isOptional:!1,description:""},rowGroupIndex:{type:"number",isOptional:!1,description:""},category:{type:"string",isOptional:!1,description:""},categoryIndex:{type:"number",isOptional:!1,description:""},subCategory:{type:"string",isOptional:!1,description:""},subCategoryIndex:{type:"number",isOptional:!1,description:""},columnGroup:{type:"string",isOptional:!1,description:""},columnGroupIndex:{type:"number",isOptional:!1,description:""},columnSubGroup:{type:"string",isOptional:!1,description:""},columnSubGroupIndex:{type:"number",isOptional:!1,description:""},ac1:{type:"number",isOptional:!1,description:""},ac2:{type:"number",isOptional:!1,description:""},ac3:{type:"number",isOptional:!1,description:""},ac4:{type:"number",isOptional:!1,description:""},pp1:{type:"number",isOptional:!1,description:""},pp2:{type:"number",isOptional:!1,description:""},pp3:{type:"number",isOptional:!1,description:""},pp4:{type:"number",isOptional:!1,description:""},fc1:{type:"number",isOptional:!1,description:""},fc2:{type:"number",isOptional:!1,description:""},fc3:{type:"number",isOptional:!1,description:""},fc4:{type:"number",isOptional:!1,description:""},pl1:{type:"number",isOptional:!1,description:""},pl2:{type:"number",isOptional:!1,description:""},pl3:{type:"number",isOptional:!1,description:""},pl4:{type:"number",isOptional:!1,description:""}}}}getEffectiveScaleFactor(){const{mode:t,factor:e}=dt(this.scale);return"factor"===t?e:"auto"===t||"empty"===t?this.appliedScaleFactor:1}getFontStyles(){const t=this.getEffectiveScaleFactor();return this.componentStyle((e=>{var i,s,n,r;const a=(null===(i=e.global)||void 0===i?void 0:i.fontSizePx)||13.3333;return{"--bn-font-family":(null===(s=e.global)||void 0===s?void 0:s.fontFamily)||"'Noto Sans', sans-serif","--bn-font-size":a*t+"px","--bn-font-color":(null===(n=e.global)||void 0===n?void 0:n.fontColor)||"#000000","--bn-font-background":(null===(r=e.global)||void 0===r?void 0:r.fontBackgroundColor)||"#ffffff"}}))}render(){const t=this.getFontStyles(),s=this.getEffectiveScaleFactor();return e(i,{key:"e42904db2c040bb184fd56582604d1f103add303",style:t},e("div",{key:"14465eef42e6d11a212624dde493dbd2a532862d"},e("ibcs-table",{key:"bd050eb7da1b698206e37fbf28a3496dc2ae328e",data:this.data,"table-title":this.prepareTableTitle(),scenarios:this.prepareScenarios(),"scenarios-data-format":this.prepareDataFormat(),grouped:this.prepareGrouped(),limit:this.prepareLimit(),showGroupTitle:this.prepareShowGroupTitle(),thereof:this.prepareThereOf(),partof:this.preparePartOf(),order:this.prepareOrder(),categorythereof:this.prepareColumnThereOf(),type:this.prepareTableType(),"category-width":this.prepareCategoryWidth(),dataFormatDigits:this.prepareDataFormatDigits(),i18n:this.prepareI18n(),"i18n-mode":this.prepareI18nMode(),"measure-scale":this.prepareMeasureScale(),"measure-type":this.prepareMeasureType(),"measure-unit":this.prepareMeasureUnit(),showMeasureScale:this.prepareShowMeasureScale(),filter:this.prepareFilter(),barColumns:this.prepareBarColumns(),barColumnMaxWidth:this.prepareBarColumnWidth(),unitScaling:this.prepareUnitScaling(),percentageScaling:this.preparePercentageScaling(),scaleFactor:s})))}get element(){return s(this)}static get watchers(){return{scale:[{validateScaling:0}],scenarios:[{validateScenario:0}],variances:[{validateVariances:0}],barColumns:[{validateBarColumns:0}],barColumnWidth:[{validateBarColumnWidth:0}],unitScaling:[{validateUnitScaling:0}],percentageScaling:[{validatePercentageScaling:0}],dataFormat:[{validateDataFormat:0}],grouped:[{validateGrouped:0}],showMeasureScale:[{validateShowMeasureScale:0}],showGroupTitle:[{validateShowGroupTitle:0}],type:[{validateType:0}],limit:[{validateLimit:0}],thereof:[{validateThereOf:0}],partof:[{validatePartOf:0}],order:[{validateOrderList:0}],orderDirection:[{validateOrderDirection:0}],measureType:[{validateMeasureType:0}],measureScale:[{validateMeasureScale:0}],dataFormatDigitsDecimal:[{validateDataFormatDigitsDecimal:0}],dataFormatDigitsPercent:[{validateDateFormatDigitsPercent:0}],categoryWidth:[{validateCategoryWidth:0}],columnthereof:[{validateColumnThereOf:0}]}}};Pe.style=":host{display:inline-block;position:relative;overflow:hidden}";const Ue=class{constructor(e){t(this,e),this.businessUnit="",this.order="category",this.orderDirection="asc",this.dateFormat="none",this.dateLink="none",N(this),h(this),this.t=ut(this).t,this.errors=l(this),this.componentStyle=v(this)}validateScenario(t){const e="ERR_scenarios",i=E(t);i.length>0?this.errors.addOrReplace({id:e,type:"warning",message:"scenarios: invalid value(s) '"+(null==i?void 0:i.toString())+"' are not supported."}):this.errors.remove(e)}validateVariances(t){const e="ERR_variances",i=m(t);i.length>0?this.errors.addOrReplace({id:e,type:"warning",message:"variances: invalid value(s) '"+(null==i?void 0:i.toString())+"' are not supported."}):this.errors.remove(e)}validateOrder(t){const e=y(t),i="ERR_order";e.length>0?this.errors.addOrReplace({id:i,type:"warning",message:"order: invalid value(s) '"+(null==e?void 0:e.toString())+"' are not supported."}):this.errors.remove(i)}validateOrderDirection(t){const e="ERR_orderDirection";T(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"orderDirection: invalid value '"+(null==t?void 0:t.toString())+"' is not supported."})}validateMeasures(t){const e="ERR_measures",i=et(t);i.length>0?this.errors.addOrReplace({id:e,type:"warning",message:"measures: invalid value(s) '"+(null==i?void 0:i.toString())+'\' are not supported. Valid format example: [{"name": "Bruttoumsatz", "unit": "mEUR"}]'}):this.errors.remove(e)}validateDateStart(t){const e="ERR_dateStart";it(t)||_(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"dateStart: invalid value '"+(null==t?void 0:t.toString())+"' is not supported."})}validateDateEnd(t){const e="ERR_dateEnd";it(t)||_(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"dateStart: invalid value '"+(null==t?void 0:t.toString())+"' is not supported."})}validateDateFormat(t){const e="ERR_dateFormat";x(t)||_(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"dateFormat: invalid value '"+(null==t?void 0:t.toString())+"' is not supported."})}validateDateLink(t){const e="ERR_dateLink";st(t)||_(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:"dateLink: invalid value '"+(null==t?void 0:t.toString())+"' is not supported."})}componentWillLoad(){this.validateScenario(this.scenarios),this.validateVariances(this.variances),this.validateMeasures(this.measures),this.validateDateStart(this.dateStart),this.validateDateEnd(this.dateEnd),this.validateDateFormat(this.dateFormat),this.validateDateLink(this.dateLink),this.validateOrderDirection(this.orderDirection),this.validateOrder(this.order)}prepareI18n(){const t=d,e=new Map(["SEPERATOR_WS","in","CONNECTOR_WS"].map((t=>[t,this.t(".".concat(t))]))),i=new Map(t.map((t=>[t,this.t("global.".concat(t))])));return new Map([...i.entries(),...e.entries()])}prepareI18nMode(){return J.META}prepareTitleOrder(){var t;return _(this.order)||_(this.orderDirection)?null:{hierarchy:this.order.split(",").map((t=>t.trim())),direction:L[null===(t=this.orderDirection)||void 0===t?void 0:t.toUpperCase()]}}prepareTitleTimePeriod(){var t,e;return _(this.dateStart)&&_(this.dateEnd)||_(this.dateLink)?null:{start:rt.fromISO(this.dateStart),end:rt.fromISO(this.dateEnd),format:P[null===(t=this.dateFormat)||void 0===t?void 0:t.toUpperCase()],link:nt[null===(e=this.dateLink)||void 0===e?void 0:e.toUpperCase()]}}prepareMeasures(){return _(this.measures)?[]:JSON.parse(this.measures)}prepareScenarios(){var t,e,i,s;if(_(this.scenarios)&&_(this.variances))return[];let n=[];return(null===(t=this.scenarios)||void 0===t?void 0:t.trim().length)>0&&(n=n.concat(null===(e=this.scenarios)||void 0===e?void 0:e.split(","))),(null===(i=this.variances)||void 0===i?void 0:i.trim().length)>0&&(n=n.concat(null===(s=this.variances)||void 0===s?void 0:s.split(","))),n.map((t=>t.trim()))}prepareBusinessUnit(){return _(this.businessUnit)||"null"===this.businessUnit?null:this.businessUnit}getFontStyles(){return this.componentStyle((t=>{var e,i,s,n;return{"--bn-font-family":(null===(e=t.global)||void 0===e?void 0:e.fontFamily)||"'Noto Sans', sans-serif","--bn-font-size":`${(null===(i=t.global)||void 0===i?void 0:i.fontSizePx)||13.3333}px`,"--bn-font-color":(null===(s=t.global)||void 0===s?void 0:s.fontColor)||"#000000","--bn-font-background":(null===(n=t.global)||void 0===n?void 0:n.fontBackgroundColor)||"#ffffff"}}))}render(){const t=this.getFontStyles();return e(i,{key:"e84349bd356bc6ac3a3f3dccad01b0ef7d818077",style:t},e("ibcs-title",{key:"cde3f65fff090e3ade3909a4d3c0b103e5b91ba5",businessUnit:this.prepareBusinessUnit(),scenarios:this.prepareScenarios(),measures:this.prepareMeasures(),timeperiod:this.prepareTitleTimePeriod(),order:this.prepareTitleOrder(),i18n:this.prepareI18n(),"i18n-mode":this.prepareI18nMode()}))}get element(){return s(this)}static get watchers(){return{scenarios:[{validateScenario:0}],variances:[{validateVariances:0}],order:[{validateOrder:0}],orderDirection:[{validateOrderDirection:0}],measures:[{validateMeasures:0}],dateStart:[{validateDateStart:0}],dateEnd:[{validateDateEnd:0}],dateFormat:[{validateDateFormat:0}],dateLink:[{validateDateLink:0}]}}};Ue.style=':host{padding:0.5em;margin-bottom:0.5em;box-sizing:border-box;-webkit-box-sizing:border-box;width:100%;display:block;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);color:var(--bn-font-color, #000000)}';const Ge={},Fe=[];function Be(t,e){if(Array.isArray(t))for(const i of t)Be(i,e);else if("object"!=typeof t)He(Object.getOwnPropertyNames(e)),Ge[t]=Object.assign(Ge[t]||{},e);else for(const e in t)Be(e,t[e])}function je(t){return Ge[t]||{}}function He(t){Fe.push(...t)}function Ve(t,e){let i;const s=t.length,n=[];for(i=0;i<s;i++)n.push(e(t[i]));return n}function qe(t){return t%360*Math.PI/180}function Ye(t){return t.charAt(0).toUpperCase()+t.slice(1)}function We(t,e,i,s){return null!=e&&null!=i||(s=s||t.bbox(),null==e?e=s.width/s.height*i:null==i&&(i=s.height/s.width*e)),{width:e,height:i}}function Xe(t,e){const i=t.origin;let s=null!=t.ox?t.ox:null!=t.originX?t.originX:"center",n=null!=t.oy?t.oy:null!=t.originY?t.originY:"center";null!=i&&([s,n]=Array.isArray(i)?i:"object"==typeof i?[i.x,i.y]:[i,i]);const r="string"==typeof s,a="string"==typeof n;if(r||a){const{height:t,width:i,x:o,y:h}=e.bbox();r&&(s=s.includes("left")?o:s.includes("right")?o+i:o+i/2),a&&(n=n.includes("top")?h:n.includes("bottom")?h+t:h+t/2)}return[s,n]}const ze=new Set(["desc","metadata","title"]),Je=t=>ze.has(t.nodeName),Ke=(t,e,i={})=>{const s={...e};for(const t in s)s[t].valueOf()===i[t]&&delete s[t];Object.keys(s).length?t.node.setAttribute("data-svgjs",JSON.stringify(s)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},Qe="http://www.w3.org/2000/svg",Ze="http://www.w3.org/2000/xmlns/",ti="http://www.w3.org/1999/xlink",ei={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};class ii{}const si={},ni="___SYMBOL___ROOT___";function ri(t,e=Qe){return ei.document.createElementNS(e,t)}function ai(t,e=!1){if(t instanceof ii)return t;if("object"==typeof t)return li(t);if(null==t)return new si[ni];if("string"==typeof t&&"<"!==t.trim().charAt(0))return li(ei.document.querySelector(t));const i=e?ei.document.createElement("div"):ri("svg");return i.innerHTML=t.trim(),t=li(i.firstElementChild),i.removeChild(i.firstElementChild),t}function oi(t,e){return e&&(e instanceof ei.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:ri(t)}function hi(t){if(!t)return null;if(t.instance instanceof ii)return t.instance;if("#document-fragment"===t.nodeName)return new si.Fragment(t);let e=Ye(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":si[e]||(e="Dom"),new si[e](t)}let li=hi;function ci(t,e=t.name,i=!1){return si[e]=t,i&&(si[ni]=t),He(Object.getOwnPropertyNames(t.prototype)),t}let ui=1e3;function fi(t){return"Svgjs"+Ye(t)+ui++}function di(t){for(let e=t.children.length-1;e>=0;e--)di(t.children[e]);return t.id?(t.id=fi(t.nodeName),t):t}function pi(t,e){let i,s;for(s=(t=Array.isArray(t)?t:[t]).length-1;s>=0;s--)for(i in e)t[s].prototype[i]=e[i]}function bi(t){return function(...e){const i=e[e.length-1];return!i||i.constructor!==Object||i instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(i)}}Be("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=ai(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=ai(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=ai(t)).before(this),this},insertAfter:function(t){return(t=ai(t)).after(this),this}});const vi=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,Ei=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,mi=/rgb\((\d+),(\d+),(\d+)\)/,gi=/(#[a-z_][a-z0-9\-_]*)/i,wi=/\)\s*,?\s*/,yi=/\s/g,Ti=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,Si=/^rgb\(/,Ai=/^(\s+)?$/,Oi=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Ri=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,Ni=/[\s,]+/,_i=/[MLHVCSQTAZ]/i;function Ci(t){const e=Math.round(t),i=Math.max(0,Math.min(255,e)).toString(16);return 1===i.length?"0"+i:i}function Li(t,e){for(let i=e.length;i--;)if(null==t[e[i]])return!1;return!0}function Ii(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}Be("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(Ni)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),Be("Dom",{css:function(t,e){const i={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);i[e[0]]=e[1]})),i;if(arguments.length<2){if(Array.isArray(t)){for(const e of t)i[e]=this.node.style.getPropertyValue(e);return i}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const e in t)this.node.style.setProperty(e,null==t[e]||Ai.test(t[e])?"":t[e])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||Ai.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),Be("Dom",{data:function(t,e,i){if(null==t)return this.data(Ve(function(t){let e;const i=t.length,s=[];for(e=0;e<i;e++)0===t[e].nodeName.indexOf("data-")&&s.push(t[e]);return s}(this.node.attributes),(t=>t.nodeName.slice(5))));if(t instanceof Array){const e={};for(const i of t)e[i]=this.data(i);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===i||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),Be("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class ki{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof ki||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",e){const{random:i,round:s,sin:n,PI:r}=Math;if("vibrant"===t){const t=24*i()+57,e=38*i()+45,s=360*i();return new ki(t,e,s,"lch")}if("sine"===t){const t=s(80*n(2*r*(e=null==e?i():e)/.5+.01)+150),a=s(50*n(2*r*e/.5+4.6)+200),o=s(100*n(2*r*e/.5+2.3)+150);return new ki(t,a,o)}if("pastel"===t){const t=8*i()+86,e=17*i()+9,s=360*i();return new ki(t,e,s,"lch")}if("dark"===t){const t=10+10*i(),e=50*i()+86,s=360*i();return new ki(t,e,s,"lch")}if("rgb"===t){const t=255*i(),e=255*i(),s=255*i();return new ki(t,e,s)}if("lab"===t){const t=100*i(),e=256*i()-128,s=256*i()-128;return new ki(t,e,s,"lab")}if("grey"===t){const t=255*i();return new ki(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(Ti.test(t)||Si.test(t))}cmyk(){const{_a:t,_b:e,_c:i}=this.rgb(),[s,n,r]=[t,e,i].map((t=>t/255)),a=Math.min(1-s,1-n,1-r);return 1===a?new ki(0,0,0,1,"cmyk"):new ki((1-s-a)/(1-a),(1-n-a)/(1-a),(1-r-a)/(1-a),a,"cmyk")}hsl(){const{_a:t,_b:e,_c:i}=this.rgb(),[s,n,r]=[t,e,i].map((t=>t/255)),a=Math.max(s,n,r),o=Math.min(s,n,r),h=(a+o)/2,l=a===o,c=a-o;return new ki(360*(l?0:a===s?((n-r)/c+(n<r?6:0))/6:a===n?((r-s)/c+2)/6:a===r?((s-n)/c+4)/6:0),100*(l?0:h>.5?c/(2-a-o):c/(a+o)),100*h,"hsl")}init(t=0,e=0,i=0,s=0,n="rgb"){if(t=t||0,this.space)for(const t in this.space)delete this[this.space[t]];if("number"==typeof t)n="string"==typeof s?s:n,s="string"==typeof s?0:s,Object.assign(this,{_a:t,_b:e,_c:i,_d:s,space:n});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const i=function(t,e){const i=Li(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:Li(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:Li(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:Li(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:Li(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:Li(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return i.space=e||i.space,i}(t,e);Object.assign(this,i)}else if("string"==typeof t)if(Si.test(t)){const e=t.replace(yi,""),[i,s,n]=mi.exec(e).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:i,_b:s,_c:n,_d:0,space:"rgb"})}else{if(!Ti.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,i,s,n]=Ei.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map(e);Object.assign(this,{_a:i,_b:s,_c:n,_d:0,space:"rgb"})}}const{_a:r,_b:a,_c:o,_d:h}=this;Object.assign(this,"rgb"===this.space?{r,g:a,b:o}:"xyz"===this.space?{x:r,y:a,z:o}:"hsl"===this.space?{h:r,s:a,l:o}:"lab"===this.space?{l:r,a,b:o}:"lch"===this.space?{l:r,c:a,h:o}:"cmyk"===this.space?{c:r,m:a,y:o,k:h}:{})}lab(){const{x:t,y:e,z:i}=this.xyz();return new ki(116*e-16,500*(t-e),200*(e-i),"lab")}lch(){const{l:t,a:e,b:i}=this.lab(),s=Math.sqrt(e**2+i**2);let n=180*Math.atan2(i,e)/Math.PI;return n<0&&(n*=-1,n=360-n),new ki(t,s,n,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:e,z:i}=this;if("lab"===this.space||"lch"===this.space){let{l:s,a:n,b:r}=this;if("lch"===this.space){const{c:t,h:e}=this,i=Math.PI/180;n=t*Math.cos(i*e),r=t*Math.sin(i*e)}const a=(s+16)/116,o=n/500+a,h=a-r/200,l=16/116,c=.008856,u=7.787;t=.95047*(o**3>c?o**3:(o-l)/u),e=1*(a**3>c?a**3:(a-l)/u),i=1.08883*(h**3>c?h**3:(h-l)/u)}const s=3.2406*t+-1.5372*e+-.4986*i,n=-.9689*t+1.8758*e+.0415*i,r=.0557*t+-.204*e+1.057*i,a=Math.pow,o=.0031308,h=s>o?1.055*a(s,1/2.4)-.055:12.92*s,l=n>o?1.055*a(n,1/2.4)-.055:12.92*n,c=r>o?1.055*a(r,1/2.4)-.055:12.92*r;return new ki(255*h,255*l,255*c)}if("hsl"===this.space){let{h:t,s:e,l:i}=this;if(t/=360,e/=100,i/=100,0===e)return i*=255,new ki(i,i,i);const s=i<.5?i*(1+e):i+e-i*e,n=2*i-s,r=255*Ii(n,s,t+1/3),a=255*Ii(n,s,t),o=255*Ii(n,s,t-1/3);return new ki(r,a,o)}if("cmyk"===this.space){const{c:t,m:e,y:i,k:s}=this,n=255*(1-Math.min(1,t*(1-s)+s)),r=255*(1-Math.min(1,e*(1-s)+s)),a=255*(1-Math.min(1,i*(1-s)+s));return new ki(n,r,a)}return this;var t}toArray(){const{_a:t,_b:e,_c:i,_d:s,space:n}=this;return[t,e,i,s,n]}toHex(){const[t,e,i]=this._clamped().map(Ci);return`#${t}${e}${i}`}toRgb(){const[t,e,i]=this._clamped();return`rgb(${t},${e},${i})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:e,_c:i}=this.rgb(),[s,n,r]=[t,e,i].map((t=>t/255)),a=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,o=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,h=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,l=(.4124*a+.3576*o+.1805*h)/.95047,c=(.2126*a+.7152*o+.0722*h)/1,u=(.0193*a+.1192*o+.9505*h)/1.08883,f=l>.008856?Math.pow(l,1/3):7.787*l+16/116,d=c>.008856?Math.pow(c,1/3):7.787*c+16/116,p=u>.008856?Math.pow(u,1/3):7.787*u+16/116;return new ki(f,d,p,"xyz")}_clamped(){const{_a:t,_b:e,_c:i}=this.rgb(),{max:s,min:n,round:r}=Math;return[t,e,i].map((t=>s(0,n(r(t),255))))}}class Mi{constructor(...t){this.init(...t)}clone(){return new Mi(this)}init(t,e){const i=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==i.x?0:i.x,this.y=null==i.y?0:i.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){xi.isMatrixLike(t)||(t=new xi(t));const{x:e,y:i}=this;return this.x=t.a*e+t.c*i+t.e,this.y=t.b*e+t.d*i+t.f,this}}function $i(t,e){return Math.abs(e-t)<1e-6}class xi{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,i=t.flip&&(e||"x"===t.flip)?-1:1,s=t.flip&&(e||"y"===t.flip)?-1:1,n=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,r=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,a=t.scale&&t.scale.length?t.scale[0]*i:isFinite(t.scale)?t.scale*i:isFinite(t.scaleX)?t.scaleX*i:i,o=t.scale&&t.scale.length?t.scale[1]*s:isFinite(t.scale)?t.scale*s:isFinite(t.scaleY)?t.scaleY*s:s,h=t.shear||0,l=t.rotate||t.theta||0,c=new Mi(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),u=c.x,f=c.y,d=new Mi(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=d.x,b=d.y,v=new Mi(t.translate||t.tx||t.translateX,t.ty||t.translateY),E=v.x,m=v.y,g=new Mi(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:a,scaleY:o,skewX:n,skewY:r,shear:h,theta:l,rx:g.x,ry:g.y,tx:E,ty:m,ox:u,oy:f,px:p,py:b}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,i){const s=t.b*e.a+t.d*e.b,n=t.a*e.c+t.c*e.d,r=t.b*e.c+t.d*e.d,a=t.e+t.a*e.e+t.c*e.f,o=t.f+t.b*e.e+t.d*e.f;return i.a=t.a*e.a+t.c*e.b,i.b=s,i.c=n,i.d=r,i.e=a,i.f=o,i}around(t,e,i){return this.clone().aroundO(t,e,i)}aroundO(t,e,i){const s=t||0,n=e||0;return this.translateO(-s,-n).lmultiplyO(i).translateO(s,n)}clone(){return new xi(this)}decompose(t=0,e=0){const i=this.a,s=this.b,n=this.c,r=this.d,a=this.e,o=this.f,h=i*r-s*n,l=h>0?1:-1,c=l*Math.sqrt(i*i+s*s),u=Math.atan2(l*s,l*i),f=180/Math.PI*u,d=Math.cos(u),p=Math.sin(u),b=(i*n+s*r)/h,v=n*c/(b*i-s)||r*c/(b*s+i);return{scaleX:c,scaleY:v,shear:b,rotate:f,translateX:a-t+t*d*c+e*(b*d*c-p*v),translateY:o-e+t*p*c+e*(b*p*c+d*v),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const e=new xi(t);return $i(this.a,e.a)&&$i(this.b,e.b)&&$i(this.c,e.c)&&$i(this.d,e.d)&&$i(this.e,e.e)&&$i(this.f,e.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(t){const e=xi.fromArray([1,0,0,1,0,0]);return t=t instanceof ss?t.matrixify():"string"==typeof t?xi.fromArray(t.split(Ni).map(parseFloat)):Array.isArray(t)?xi.fromArray(t):"object"==typeof t&&xi.isMatrixLike(t)?t:"object"==typeof t?(new xi).transform(t):6===arguments.length?xi.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,i=this.c,s=this.d,n=this.e,r=this.f,a=t*s-e*i;if(!a)throw new Error("Cannot invert "+this);const o=s/a,h=-e/a,l=-i/a,c=t/a,u=-(o*n+l*r),f=-(h*n+c*r);return this.a=o,this.b=h,this.c=l,this.d=c,this.e=u,this.f=f,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const e=t instanceof xi?t:new xi(t);return xi.matrixMultiply(e,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=t instanceof xi?t:new xi(t);return xi.matrixMultiply(this,e,this)}rotate(t,e,i){return this.clone().rotateO(t,e,i)}rotateO(t,e=0,i=0){t=qe(t);const s=Math.cos(t),n=Math.sin(t),{a:r,b:a,c:o,d:h,e:l,f:c}=this;return this.a=r*s-a*n,this.b=a*s+r*n,this.c=o*s-h*n,this.d=h*s+o*n,this.e=l*s-c*n+i*n-e*s+e,this.f=c*s+l*n-e*n-i*s+i,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,e=t,i=0,s=0){3===arguments.length&&(s=i,i=e,e=t);const{a:n,b:r,c:a,d:o,e:h,f:l}=this;return this.a=n*t,this.b=r*e,this.c=a*t,this.d=o*e,this.e=h*t-i*t+i,this.f=l*e-s*e+s,this}shear(t,e,i){return this.clone().shearO(t,e,i)}shearO(t,e=0,i=0){const{a:s,b:n,c:r,d:a,e:o,f:h}=this;return this.a=s+n*t,this.c=r+a*t,this.e=o+h*t-i*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,e=t,i=0,s=0){3===arguments.length&&(s=i,i=e,e=t),t=qe(t),e=qe(e);const n=Math.tan(t),r=Math.tan(e),{a,b:o,c:h,d:l,e:c,f:u}=this;return this.a=a+o*n,this.b=o+a*r,this.c=h+l*n,this.d=l+h*r,this.e=c+u*n-s*n,this.f=u+c*r-i*r,this}skewX(t,e,i){return this.skew(t,0,e,i)}skewY(t,e,i){return this.skew(0,t,e,i)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(xi.isMatrixLike(t))return new xi(t).multiplyO(this);const e=xi.formatTransforms(t),{x:i,y:s}=new Mi(e.ox,e.oy).transform(this),n=(new xi).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-i,-s).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(i,s);if(isFinite(e.px)||isFinite(e.py)){const t=new Mi(i,s).transform(n),r=isFinite(e.px)?e.px-t.x:0,a=isFinite(e.py)?e.py-t.y:0;n.translateO(r,a)}return n.translateO(e.tx,e.ty),n}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function Di(){if(!Di.nodes){const t=ai().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;Di.nodes={svg:t,path:e}}return Di.nodes.svg.node.parentNode||Di.nodes.svg.addTo(ei.document.body||ei.document.documentElement),Di.nodes}function Pi(t){return!(t.width||t.height||t.x||t.y)}ci(xi,"Matrix");class Ui{constructor(...t){this.init(...t)}addOffset(){return this.x+=ei.window.pageXOffset,this.y+=ei.window.pageYOffset,new Ui(this)}init(t){return t="string"==typeof t?t.split(Ni).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return Pi(this)}merge(t){const e=Math.min(this.x,t.x),i=Math.min(this.y,t.y),s=Math.max(this.x+this.width,t.x+t.width)-e,n=Math.max(this.y+this.height,t.y+t.height)-i;return new Ui(e,i,s,n)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof xi||(t=new xi(t));let e=1/0,i=-1/0,s=1/0,n=-1/0;return[new Mi(this.x,this.y),new Mi(this.x2,this.y),new Mi(this.x,this.y2),new Mi(this.x2,this.y2)].forEach((function(r){r=r.transform(t),e=Math.min(e,r.x),i=Math.max(i,r.x),s=Math.min(s,r.y),n=Math.max(n,r.y)})),new Ui(e,s,i-e,n-s)}}function Gi(t,e,i){let s;try{if(s=e(t.node),Pi(s)&&(n=t.node)!==ei.document&&!(ei.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===ei.document}).call(ei.document.documentElement,n))throw new Error("Element not in the dom")}catch(e){s=i(t)}var n;return s}Be({viewbox:{viewbox(t,e,i,s){return null==t?new Ui(this.attr("viewBox")):this.attr("viewBox",new Ui(t,e,i,s))},zoom(t,e){let{width:i,height:s}=this.attr(["width","height"]);if((i||s)&&"string"!=typeof i&&"string"!=typeof s||(i=this.node.clientWidth,s=this.node.clientHeight),!i||!s)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const n=this.viewbox(),r=i/n.width,a=s/n.height,o=Math.min(r,a);if(null==t)return o;let h=o/t;h===1/0&&(h=Number.MAX_SAFE_INTEGER/100),e=e||new Mi(i/2/r+n.x,s/2/a+n.y);const l=new Ui(n).transform(new xi({scale:h,origin:e}));return this.viewbox(l)}}}),ci(Ui,"Box");class Fi extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}}pi([Fi],{each(t,...e){return this.map("function"==typeof t?(e,i,s)=>t.call(e,e,i,s):i=>i[t](...e))},toArray(){return Array.prototype.concat.apply([],this)}});const Bi=["toArray","constructor","each"];function ji(t,e){return new Fi(Ve((e||ei.document).querySelectorAll(t),(function(t){return hi(t)})))}Fi.extend=function(t){t=t.reduce(((t,e)=>(Bi.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(...t){return this.each(e,...t)}),t)),{}),pi([Fi],t)};let Hi=0;const Vi={};function qi(t){let e=t.getEventHolder();return e===ei.window&&(e=Vi),e.events||(e.events={}),e.events}function Yi(t){return t.getEventTarget()}function Wi(t,e,i,s,n){const r=i.bind(s||t),a=ai(t),o=qi(a),h=Yi(a);e=Array.isArray(e)?e:e.split(Ni),i._svgjsListenerId||(i._svgjsListenerId=++Hi),e.forEach((function(t){const e=t.split(".")[0],s=t.split(".")[1]||"*";o[e]=o[e]||{},o[e][s]=o[e][s]||{},o[e][s][i._svgjsListenerId]=r,h.addEventListener(e,r,n||!1)}))}function Xi(t,e,i,s){const n=ai(t),r=qi(n),a=Yi(n);("function"!=typeof i||(i=i._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(Ni)).forEach((function(t){const e=t&&t.split(".")[0],o=t&&t.split(".")[1];let h,l;if(i)r[e]&&r[e][o||"*"]&&(a.removeEventListener(e,r[e][o||"*"][i],s||!1),delete r[e][o||"*"][i]);else if(e&&o){if(r[e]&&r[e][o]){for(l in r[e][o])Xi(a,[e,o].join("."),l);delete r[e][o]}}else if(o)for(t in r)for(h in r[t])o===h&&Xi(a,[t,o].join("."));else if(e){if(r[e]){for(h in r[e])Xi(a,[e,h].join("."));delete r[e]}}else{for(t in r)Xi(a,t);!function(t){let e=t.getEventHolder();e===ei.window&&(e=Vi),e.events&&(e.events={})}(n)}}))}class zi extends ii{addEventListener(){}dispatch(t,e,i){return function(t,e,i,s){const n=Yi(t);return e instanceof ei.window.Event||(e=new ei.window.CustomEvent(e,{detail:i,cancelable:!0,...s})),n.dispatchEvent(e),e}(this,t,e,i)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const i=e[t.type];for(const e in i)for(const s in i[e])i[e][s](t);return!t.defaultPrevented}fire(t,e,i){return this.dispatch(t,e,i),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,i){return Xi(this,t,e,i),this}on(t,e,i,s){return Wi(this,t,e,i,s),this}removeEventListener(){}}function Ji(){}ci(zi,"EventTarget");const Ki={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class Qi extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(Ni).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class Zi{constructor(...t){this.init(...t)}convert(t){return new Zi(this.value,t)}divide(t){return t=new Zi(t),new Zi(this/t,this.unit||t.unit)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(vi))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof Zi&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new Zi(t),new Zi(this-t,this.unit||t.unit)}plus(t){return t=new Zi(t),new Zi(this+t,this.unit||t.unit)}times(t){return t=new Zi(t),new Zi(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const ts=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),es=[];class is extends zi{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=ai(t)).removeNamespace&&this.node instanceof ei.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return ai(t).put(this,e)}children(){return new Fi(Ve(this.node.children,(function(t){return hi(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let i=this.node.cloneNode(t);return e&&(i=di(i)),new this.constructor(i)}each(t,e){const i=this.children();let s,n;for(s=0,n=i.length;s<n;s++)t.apply(i[s],[s,i]),e&&i[s].each(t,e);return this}element(t,e){return this.put(new is(ri(t),e))}first(){return hi(this.node.firstChild)}get(t){return hi(this.node.childNodes[t])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(t){return this.index(t)>=0}html(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=fi(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return hi(this.node.lastChild)}matches(t){const e=this.node,i=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return i&&i.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=hi(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=hi(e.node.parentNode));return e}put(t,e){return t=ai(t),this.add(t,e),t}putIn(t,e){return ai(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=ai(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const i=10**t,s=this.attr(e);for(const t in s)"number"==typeof s[t]&&(s[t]=Math.round(s[t]*i)/i);return this.attr(s),this}svg(t,e){return this.xml(t,e,Qe)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const i=e.index(this);return e.put(t,i).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,i){if("boolean"==typeof t&&(i=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();let i=this;if(null!=t){if(i=hi(i.node.cloneNode(!0)),e){const e=t(i);if(i=e||i,!1===e)return""}i.each((function(){const e=t(this),i=e||this;!1===e?this.remove():e&&this!==i&&this.replace(i)}),!0)}return e?i.node.outerHTML:i.node.innerHTML}e=null!=e&&e;const s=ri("wrapper",i),n=ei.document.createDocumentFragment();s.innerHTML=t;for(let t=s.children.length;t--;)n.appendChild(s.firstElementChild);const r=this.parent();return e?this.replace(n)&&r:this.add(n)}}pi(is,{attr:function(t,e,i){if(null==t){t={},e=this.node.attributes;for(const i of e)t[i.nodeName]=Oi.test(i.nodeValue)?parseFloat(i.nodeValue):i.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,e)=>(t[e]=this.attr(e),t)),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?Ki[t]:Oi.test(e)?parseFloat(e):e;"number"==typeof(e=es.reduce(((e,i)=>i(t,e,this)),e))?e=new Zi(e):ts.has(t)&&ki.isColor(e)?e=new ki(e):e.constructor===Array&&(e=new Qi(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof i?this.node.setAttributeNS(i,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return ji(t,this.node)},findOne:function(t){return hi(this.node.querySelector(t))}}),ci(is,"Dom");class ss extends is{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new Zi(t).plus(this.x()))}dy(t=0){return this.y(new Zi(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=ai(t));const i=new Fi;let s=this;for(;(s=s.parent())&&s.node!==ei.document&&"#document-fragment"!==s.nodeName&&(i.push(s),e||s.node!==t.node)&&(!e||!s.matches(t));)if(s.node===this.root().node)return null;return i}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(gi);return e?ai(e[1]):null}root(){const t=this.parent(si[ni]);return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const i=We(this,t,e);return this.width(new Zi(i.width)).height(new Zi(i.height))}width(t){return this.attr("width",t)}writeDataToDom(){return Ke(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}pi(ss,{bbox:function(){const t=Gi(this,(t=>t.getBBox()),(t=>{try{const e=t.clone().addTo(Di().svg).show(),i=e.node.getBBox();return e.remove(),i}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}}));return new Ui(t)},rbox:function(t){const e=Gi(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),i=new Ui(e);return t?i.transform(t.screenCTM().inverseO()):i.addOffset()},inside:function(t,e){const i=this.bbox();return t>i.x&&e>i.y&&t<i.x+i.width&&e<i.y+i.height},point:function(t,e){return new Mi(t,e).transformO(this.screenCTM().inverseO())},ctm:function(){return new xi(this.node.getCTM())},screenCTM:function(){try{if("function"==typeof this.isRoot&&!this.isRoot()){const t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new xi(e)}return new xi(this.node.getScreenCTM())}catch(t){return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new xi}}}),ci(ss,"Element");const ns={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"===e?t:t+"-"+e}};["fill","stroke"].forEach((function(t){const e={};let i;e[t]=function(e){if(void 0===e)return this.attr(t);if("string"==typeof e||e instanceof ki||ki.isRgb(e)||e instanceof ss)this.attr(t,e);else for(i=ns[t].length-1;i>=0;i--)null!=e[ns[t][i]]&&this.attr(ns.prefix(t,ns[t][i]),e[ns[t][i]]);return this},Be(["Element","Runner"],e)})),Be(["Element","Runner"],{matrix:function(t,e,i,s,n,r){return null==t?new xi(this):this.attr("transform",new xi(t,e,i,s,n,r))},rotate:function(t,e,i){return this.transform({rotate:t,ox:e,oy:i},!0)},skew:function(t,e,i,s){return this.transform(1===arguments.length||3===arguments.length?{skew:t,ox:e,oy:i}:{skew:[t,e],ox:i,oy:s},!0)},shear:function(t,e,i){return this.transform({shear:t,ox:e,oy:i},!0)},scale:function(t,e,i,s){return this.transform(1===arguments.length||3===arguments.length?{scale:t,ox:e,oy:i}:{scale:[t,e],ox:i,oy:s},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),Be("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new Zi(t)):this.rx(t).ry(e)}}),Be("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new Mi(this.node.getPointAtLength(t))}}),Be(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):this.attr("anchor"===t?"text-anchor":"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?"font-"+t:t,e)}}),Be("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),Be("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(wi).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(Ni).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(xi.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new xi)},toParent:function(t,e){if(this===t)return this;if(Je(this.node))return this.addTo(t,e);const i=this.screenCTM(),s=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(s.multiply(i)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new xi(this).decompose();return null==t?e:e[t]}xi.isMatrixLike(t)||(t={...t,origin:Xe(t,this)});const i=new xi(!0===e?this:e||!1).transform(t);return this.attr("transform",i)}});class rs extends ss{flatten(){return this.each((function(){if(this instanceof rs)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(i,s){return s[s.length-i-1].toParent(t,e)})),this.remove()}}ci(rs,"Container");class as extends rs{constructor(t,e=t){super(oi("defs",t),e)}flatten(){return this}ungroup(){return this}}ci(as,"Defs");class os extends ss{}function hs(t){return this.attr("rx",t)}function ls(t){return this.attr("ry",t)}function cs(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function us(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function fs(t){return this.attr("cx",t)}function ds(t){return this.attr("cy",t)}function ps(t){return null==t?2*this.rx():this.rx(new Zi(t).divide(2))}function bs(t){return null==t?2*this.ry():this.ry(new Zi(t).divide(2))}ci(os,"Shape");var vs=Object.freeze({__proto__:null,cx:fs,cy:ds,height:bs,rx:hs,ry:ls,width:ps,x:cs,y:us});class Es extends os{constructor(t,e=t){super(oi("ellipse",t),e)}size(t,e){const i=We(this,t,e);return this.rx(new Zi(i.width).divide(2)).ry(new Zi(i.height).divide(2))}}pi(Es,vs),Be("Container",{ellipse:bi((function(t=0,e=t){return this.put(new Es).size(t,e).move(0,0)}))}),ci(Es,"Ellipse");class ms extends is{constructor(t=ei.document.createDocumentFragment()){super(t)}xml(t,e,i){if("boolean"==typeof t&&(i=e,e=t,t=null),null==t||"function"==typeof t){const t=new is(ri("wrapper",i));return t.add(this.node.cloneNode(!0)),t.xml(!1,i)}return super.xml(t,!1,i)}}function gs(t,e){return this.attr("radialGradient"===(this._element||this).type?{fx:new Zi(t),fy:new Zi(e)}:{x1:new Zi(t),y1:new Zi(e)})}function ws(t,e){return this.attr("radialGradient"===(this._element||this).type?{cx:new Zi(t),cy:new Zi(e)}:{x2:new Zi(t),y2:new Zi(e)})}ci(ms,"Fragment");var ys=Object.freeze({__proto__:null,from:gs,to:ws});class Ts extends rs{constructor(t,e){super(oi(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,i){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,i)}bbox(){return new Ui}targets(){return ji("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}pi(Ts,ys),Be({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:bi((function(t,e){return this.put(new Ts(t)).update(e)}))}}),ci(Ts,"Gradient");class Ss extends rs{constructor(t,e=t){super(oi("pattern",t),e)}attr(t,e,i){return"transform"===t&&(t="patternTransform"),super.attr(t,e,i)}bbox(){return new Ui}targets(){return ji("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}Be({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:bi((function(t,e,i){return this.put(new Ss).update(i).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),ci(Ss,"Pattern");class As extends os{constructor(t,e=t){super(oi("image",t),e)}load(t,e){if(!t)return this;const i=new ei.window.Image;return Wi(i,"load",(function(t){const s=this.parent(Ss);0===this.width()&&0===this.height()&&this.size(i.width,i.height),s instanceof Ss&&0===s.width()&&0===s.height()&&s.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),Wi(i,"load error",(function(){Xi(i)})),this.attr("href",i.src=t,ti)}}es.push((function(t,e,i){return"fill"!==t&&"stroke"!==t||Ri.test(e)&&(e=i.root().defs().image(e)),e instanceof As&&(e=i.root().defs().pattern(0,0,(t=>{t.add(e)}))),e})),Be({Container:{image:bi((function(t,e){return this.put(new As).size(0,0).load(t,e)}))}}),ci(As,"Image");class Os extends Qi{bbox(){let t=-1/0,e=-1/0,i=1/0,s=1/0;return this.forEach((function(n){t=Math.max(n[0],t),e=Math.max(n[1],e),i=Math.min(n[0],i),s=Math.min(n[1],s)})),new Ui(i,s,t-i,e-s)}move(t,e){const i=this.bbox();if(t-=i.x,e-=i.y,!isNaN(t)&&!isNaN(e))for(let i=this.length-1;i>=0;i--)this[i]=[this[i][0]+t,this[i][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(Ni).map(parseFloat)).length%2!=0&&t.pop();for(let i=0,s=t.length;i<s;i+=2)e.push([t[i],t[i+1]]);return e}size(t,e){let i;const s=this.bbox();for(i=this.length-1;i>=0;i--)s.width&&(this[i][0]=(this[i][0]-s.x)*t/s.width+s.x),s.height&&(this[i][1]=(this[i][1]-s.y)*e/s.height+s.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,i=this.length;e<i;e++)t.push(this[e].join(","));return t.join(" ")}transform(t){return this.clone().transformO(t)}transformO(t){xi.isMatrixLike(t)||(t=new xi(t));for(let e=this.length;e--;){const[i,s]=this[e];this[e][0]=t.a*i+t.c*s+t.e,this[e][1]=t.b*i+t.d*s+t.f}return this}}var Rs=Object.freeze({__proto__:null,MorphArray:Os,height:function(t){const e=this.bbox();return null==t?e.height:this.size(e.width,t)},width:function(t){const e=this.bbox();return null==t?e.width:this.size(t,e.height)},x:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)},y:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}});let Ns=class extends os{constructor(t,e=t){super(oi("line",t),e)}array(){return new Os([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,e){return this.attr(this.array().move(t,e).toLine())}plot(t,e,i,s){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:i,y2:s}:new Os(t).toLine(),this.attr(t))}size(t,e){const i=We(this,t,e);return this.attr(this.array().size(i.width,i.height).toLine())}};pi(Ns,Rs),Be({Container:{line:bi((function(...t){return Ns.prototype.plot.apply(this.put(new Ns),null!=t[0]?t:[0,0,0,0])}))}}),ci(Ns,"Line");let _s=class extends rs{constructor(t,e=t){super(oi("marker",t),e)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,e){return this.attr("refX",t).attr("refY",e)}toString(){return"url(#"+this.id()+")"}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}width(t){return this.attr("markerWidth",t)}};function Cs(t,e){return function(i){return null==i?this[t]:(this[t]=i,e&&e.call(this),this)}}Be({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:bi((function(t,e,i){return this.put(new _s).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(i)}))},marker:{marker(t,e,i,s){let n=["marker"];return"all"!==t&&n.push(t),n=n.join("-"),t=arguments[1]instanceof _s?arguments[1]:this.defs().marker(e,i,s),this.attr(n,t)}}}),ci(_s,"Marker");const Ls={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,i,s){return function(n){return n<0?t>0?e/t*n:i>0?s/i*n:0:n>1?i<1?(1-s)/(1-i)*n+(s-i)/(1-i):t<1?(1-e)/(1-t)*n+(e-t)/(1-t):1:3*n*(1-n)**2*e+3*n**2*(1-n)*s+n**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let i=t;return"none"===e?--i:"both"===e&&++i,(s,n=!1)=>{let r=Math.floor(s*t);const a=s*r%1==0;return"start"!==e&&"both"!==e||++r,n&&a&&--r,s>=0&&r<0&&(r=0),s<=1&&r>i&&(r=i),r/i}}};class Is{done(){return!1}}class ks extends Is{constructor(t=">"){super(),this.ease=Ls[t]||t}step(t,e,i){return"number"!=typeof t?i<1?t:e:t+(e-t)*this.ease(i)}}class Ms extends Is{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,i,s){return this.stepper(t,e,i,s)}}function $s(){const t=(this._duration||500)/1e3,e=Math.PI,i=Math.log((this._overshoot||0)/100+1e-10),s=-i/Math.sqrt(e*e+i*i),n=3.9/(s*t);this.d=2*s*n,this.k=n*n}pi(class extends Ms{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,i,s){if("string"==typeof t)return t;if(s.done=i===1/0,i===1/0)return e;if(0===i)return t;i>100&&(i=16);const n=s.velocity||0,r=-this.d*n-this.k*(t-e),a=t+n*(i/=1e3)+r*i*i/2;return s.velocity=n+r*i,s.done=Math.abs(e-a)+Math.abs(n)<.002,s.done?e:a}},{duration:Cs("_duration",$s),overshoot:Cs("_overshoot",$s)}),pi(class extends Ms{constructor(t=.1,e=.01,i=0,s=1e3){super(),this.p(t).i(e).d(i).windup(s)}step(t,e,i,s){if("string"==typeof t)return t;if(s.done=i===1/0,i===1/0)return e;if(0===i)return t;const n=e-t;let r=(s.integral||0)+n*i;const a=(n-(s.error||0))/i,o=this._windup;return!1!==o&&(r=Math.max(-o,Math.min(r,o))),s.error=n,s.integral=r,s.done=Math.abs(n)<.001,s.done?e:t+(this.P*n+this.I*r+this.D*a)}},{windup:Cs("_windup"),p:Cs("P"),i:Cs("I"),d:Cs("D")});const xs={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},Ds={M:function(t,e,i){return e.x=i.x=t[0],e.y=i.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,i){return e.x=i.x,e.y=i.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},Ps="mlhvqtcsaz".split("");for(let t=0,e=Ps.length;t<e;++t)Ds[Ps[t]]=function(t){return function(e,i,s){if("H"===t)e[0]=e[0]+i.x;else if("V"===t)e[0]=e[0]+i.y;else if("A"===t)e[5]=e[5]+i.x,e[6]=e[6]+i.y;else for(let t=0,s=e.length;t<s;++t)e[t]=e[t]+(t%2?i.y:i.x);return Ds[t](e,i,s)}}(Ps[t].toUpperCase());function Us(t){return t.segment.length&&t.segment.length-1===xs[t.segment[0].toUpperCase()]}function Gs(t,e){t.inNumber&&Fs(t,!1);const i=_i.test(e);if(i)t.segment=[e];else{const e=t.lastCommand,i=e.toLowerCase();t.segment=["m"===i?e===i?"l":"L":e]}return t.inSegment=!0,t.lastCommand=t.segment[0],i}function Fs(t,e){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=e,t.number="",t.pointSeen=!1,t.hasExponent=!1,Us(t)&&Bs(t)}function Bs(t){t.inSegment=!1,t.absolute&&(t.segment=function(t){return Ds[t.segment[0]](t.segment.slice(1),t.p,t.p0)}(t)),t.segments.push(t.segment)}function js(t){if(!t.segment.length)return!1;const e="A"===t.segment[0].toUpperCase(),i=t.segment.length;return e&&(4===i||5===i)}function Hs(t){return"E"===t.lastToken.toUpperCase()}const Vs=new Set([" ",",","\t","\n","\r","\f"]);class qs extends Qi{bbox(){return Di().path.setAttribute("d",this.toString()),new Ui(Di.nodes.path.getBBox())}move(t,e){const i=this.bbox();if(t-=i.x,e-=i.y,!isNaN(t)&&!isNaN(e))for(let i,s=this.length-1;s>=0;s--)i=this[s][0],"M"===i||"L"===i||"T"===i?(this[s][1]+=t,this[s][2]+=e):"H"===i?this[s][1]+=t:"V"===i?this[s][1]+=e:"C"===i||"S"===i||"Q"===i?(this[s][1]+=t,this[s][2]+=e,this[s][3]+=t,this[s][4]+=e,"C"===i&&(this[s][5]+=t,this[s][6]+=e)):"A"===i&&(this[s][6]+=t,this[s][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let i=0,s="";const n={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new Mi,p:new Mi};for(;n.lastToken=s,s=t.charAt(i++);)if(n.inSegment||!Gs(n,s))if("."!==s)if(isNaN(parseInt(s)))if(Vs.has(s))n.inNumber&&Fs(n,!1);else if("-"!==s&&"+"!==s)if("E"!==s.toUpperCase()){if(_i.test(s)){if(n.inNumber)Fs(n,!1);else{if(!Us(n))throw new Error("parser Error");Bs(n)}--i}}else n.number+=s,n.hasExponent=!0;else{if(n.inNumber&&!Hs(n)){Fs(n,!1),--i;continue}n.number+=s,n.inNumber=!0}else{if("0"===n.number||js(n)){n.inNumber=!0,n.number=s,Fs(n,!0);continue}n.inNumber=!0,n.number+=s}else{if(n.pointSeen||n.hasExponent){Fs(n,!1),--i;continue}n.inNumber=!0,n.pointSeen=!0,n.number+=s}return n.inNumber&&Fs(n,!1),n.inSegment&&Us(n)&&Bs(n),n.segments}(t)}size(t,e){const i=this.bbox();let s,n;for(i.width=0===i.width?1:i.width,i.height=0===i.height?1:i.height,s=this.length-1;s>=0;s--)n=this[s][0],"M"===n||"L"===n||"T"===n?(this[s][1]=(this[s][1]-i.x)*t/i.width+i.x,this[s][2]=(this[s][2]-i.y)*e/i.height+i.y):"H"===n?this[s][1]=(this[s][1]-i.x)*t/i.width+i.x:"V"===n?this[s][1]=(this[s][1]-i.y)*e/i.height+i.y:"C"===n||"S"===n||"Q"===n?(this[s][1]=(this[s][1]-i.x)*t/i.width+i.x,this[s][2]=(this[s][2]-i.y)*e/i.height+i.y,this[s][3]=(this[s][3]-i.x)*t/i.width+i.x,this[s][4]=(this[s][4]-i.y)*e/i.height+i.y,"C"===n&&(this[s][5]=(this[s][5]-i.x)*t/i.width+i.x,this[s][6]=(this[s][6]-i.y)*e/i.height+i.y)):"A"===n&&(this[s][1]=this[s][1]*t/i.width,this[s][2]=this[s][2]*e/i.height,this[s][6]=(this[s][6]-i.x)*t/i.width+i.x,this[s][7]=(this[s][7]-i.y)*e/i.height+i.y);return this}toString(){return function(t){let e="";for(let i=0,s=t.length;i<s;i++)e+=t[i][0],null!=t[i][1]&&(e+=t[i][1],null!=t[i][2]&&(e+=" ",e+=t[i][2],null!=t[i][3]&&(e+=" ",e+=t[i][3],e+=" ",e+=t[i][4],null!=t[i][5]&&(e+=" ",e+=t[i][5],e+=" ",e+=t[i][6],null!=t[i][7]&&(e+=" ",e+=t[i][7])))));return e+" "}(this)}}const Ys=t=>{const e=typeof t;return"number"===e?Zi:"string"===e?ki.isColor(t)?ki:Ni.test(t)?_i.test(t)?qs:Qi:vi.test(t)?Zi:Xs:Qs.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?Qi:"object"===e?Ks:Xs};class Ws{constructor(t){this._stepper=t||new ks("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(Ys(t));let e=new this._type(t);return this._type===ki&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===Ks&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}class Xs{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class zs{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,zs.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}zs.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const Js=(t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0;class Ks{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let i=0,s=e.length;i<s;++i){if(e[i+1]===t[i+1]){if(e[i+1]===ki&&t[i+7]!==e[i+7]){const e=t[i+7],s=new ki(this.values.splice(i+3,5))[e]().toArray();this.values.splice(i+3,0,...s)}i+=e[i+2]+2;continue}if(!t[i+1])return this;const s=(new t[i+1]).toArray();e.splice(i,e[i+2]+3,t[i],t[i+1],t[i+2],...s),i+=e[i+2]+2}return this}init(t){if(this.values=[],Array.isArray(t))return void(this.values=t.slice());t=t||{};const e=[];for(const i in t){const s=Ys(t[i]),n=new s(t[i]).toArray();e.push([i,s,n.length,...n])}return e.sort(Js),this.values=e.reduce(((t,e)=>t.concat(e)),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const i=e.shift(),s=e.shift(),n=e.shift(),r=e.splice(0,n);t[i]=new s(r)}return t}}const Qs=[Xs,zs,Ks];class Zs extends os{constructor(t,e=t){super(oi("path",t),e)}array(){return this._array||(this._array=new qs(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new qs(t))}size(t,e){const i=We(this,t,e);return this.attr("d",this.array().size(i.width,i.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}Zs.prototype.MorphArray=qs,Be({Container:{path:bi((function(t){return this.put(new Zs).plot(t||new qs)}))}}),ci(Zs,"Path");var tn=Object.freeze({__proto__:null,array:function(){return this._array||(this._array=new Os(this.attr("points")))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("points",this.array().move(t,e))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new Os(t))},size:function(t,e){const i=We(this,t,e);return this.attr("points",this.array().size(i.width,i.height))}});class en extends os{constructor(t,e=t){super(oi("polygon",t),e)}}Be({Container:{polygon:bi((function(t){return this.put(new en).plot(t||new Os)}))}}),pi(en,Rs),pi(en,tn),ci(en,"Polygon");class sn extends os{constructor(t,e=t){super(oi("polyline",t),e)}}Be({Container:{polyline:bi((function(t){return this.put(new sn).plot(t||new Os)}))}}),pi(sn,Rs),pi(sn,tn),ci(sn,"Polyline");class nn extends os{constructor(t,e=t){super(oi("rect",t),e)}}pi(nn,{rx:hs,ry:ls}),Be({Container:{rect:bi((function(t,e){return this.put(new nn).size(t,e)}))}}),ci(nn,"Rect");class rn{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const an={nextDraw:null,frames:new rn,timeouts:new rn,immediates:new rn,timer:()=>ei.window.performance||ei.window.Date,transforms:[],frame(t){const e=an.frames.push({run:t});return null===an.nextDraw&&(an.nextDraw=ei.window.requestAnimationFrame(an._draw)),e},timeout(t,e){e=e||0;const i=an.timer().now()+e,s=an.timeouts.push({run:t,time:i});return null===an.nextDraw&&(an.nextDraw=ei.window.requestAnimationFrame(an._draw)),s},immediate(t){const e=an.immediates.push(t);return null===an.nextDraw&&(an.nextDraw=ei.window.requestAnimationFrame(an._draw)),e},cancelFrame(t){null!=t&&an.frames.remove(t)},clearTimeout(t){null!=t&&an.timeouts.remove(t)},cancelImmediate(t){null!=t&&an.immediates.remove(t)},_draw(t){let e=null;const i=an.timeouts.last();for(;(e=an.timeouts.shift())&&(t>=e.time?e.run():an.timeouts.push(e),e!==i););let s=null;const n=an.frames.last();for(;s!==n&&(s=an.frames.shift());)s.run(t);let r=null;for(;r=an.immediates.shift();)r();an.nextDraw=an.timeouts.first()||an.frames.first()?ei.window.requestAnimationFrame(an._draw):null}},on=function(t){const e=t.start,i=t.runner.duration();return{start:e,duration:i,end:e+i,runner:t.runner}},hn=function(){const t=ei.window;return(t.performance||t.Date).now()};class ln extends zi{constructor(t=hn){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const i=Math.abs(e);return this.speed(t?-i:i)}schedule(t,e,i){if(null==t)return this._runners.map(on);let s=0;const n=this.getEndTime();if(e=e||0,null==i||"last"===i||"after"===i)s=n;else if("absolute"===i||"start"===i)s=e,e=0;else if("now"===i)s=this._time;else if("relative"===i){const i=this.getRunnerInfoById(t.id);i&&(s=i.start+e,e=0)}else{if("with-last"!==i)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();s=t?t.start:this._time}}t.unschedule(),t.timeline(this);const r=t.persist(),a={persist:null===r?this._persist:r,start:s+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(a),this._runners.sort(((t,e)=>t.start-e.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return an.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=an.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let i=e-this._lastSourceTime;t&&(i=0);const s=this._speed*i+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=s,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let t=this._runners.length;t--;){const e=this._runners[t];this._time-e.start<=0&&e.runner.reset()}let n=!1;for(let t=0,e=this._runners.length;t<e;t++){const i=this._runners[t],r=i.runner;let a=s;const o=this._time-i.start;o<=0?n=!0:(o<a&&(a=o),r.active()&&(r.step(a).done?!0!==i.persist&&r.duration()-r.time()+this._time+i.persist<this._time&&(r.unschedule(),--t,--e):n=!0))}return n&&!(this._speed<0&&0===this._time)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}Be({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new ln,this._timeline):(this._timeline=t,this)}}});class cn extends zi{constructor(t){super(),this.id=cn.id++,t="function"==typeof(t=null==t?400:t)?new Ms(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof Ms,this._stepper=this._isDeclarative?t:new ks,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new xi,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,i){let s=1,n=!1,r=0;return e=e??0,i=i||"last","object"!=typeof(t=t??400)||t instanceof Is||(e=t.delay??e,i=t.when??i,n=t.swing||n,s=t.times??s,r=t.wait??r,t=t.duration??400),{duration:t,delay:e,swing:n,times:s,wait:r,when:i}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,e,i){const s=cn.sanitise(t,e,i),n=new cn(s.duration);return this._timeline&&n.timeline(this._timeline),this._element&&n.element(this._element),n.loop(s).schedule(s.delay,s.when)}clearTransform(){return this.transforms=new xi,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new ks(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,i){return"object"==typeof t&&(e=t.swing,i=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=i||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e);return Math.min(t+(this._time-t*e)/this._duration,this._times)}const i=Math.floor(t);return this.time(e*i+this._duration*(t%1))}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,i=this._duration,s=this._wait,n=this._swing,r=this._reverse;let a;if(null==t){const t=function(t){const e=n*Math.floor(t%(2*(s+i))/(s+i)),a=e&&!r||!e&&r,o=Math.pow(-1,a)*(t%(s+i))/i+a;return Math.max(Math.min(o,1),0)},o=this._times*(s+i)-s;return a=e<=0?Math.round(t(1e-5)):e<o?t(e):Math.round(t(o-1e-5)),a}const o=Math.floor(this.loops()),h=n&&o%2==0;return a=o+(h&&!r||r&&h?t:1-t),this.loops(a)}progress(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}queue(t,e,i,s){return this._queue.push({initialiser:t||Ji,runner:e||Ji,retarget:i,isTransform:s,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(t){return this._reverse=null==t?!this._reverse:t,this}schedule(t,e,i){if(t instanceof ln||(i=e,e=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,e,i),this}step(t){if(!this.enabled)return this;this._time+=t=null==t?16:t;const e=this.position(),i=this._lastPosition!==e&&this._time>=0;this._lastPosition=e;const s=this.duration(),n=this._lastTime<=0&&this._time>0,r=this._lastTime<s&&this._time>=s;this._lastTime=this._time,n&&this.fire("start",this);const a=this._isDeclarative;this.done=!a&&!r&&this._time>=s,this._reseted=!1;let o=!1;return(i||a)&&(this._initialise(i),this.transforms=new xi,o=this._run(a?t:e),this.fire("step",this)),this.done=this.done||o&&a,r&&this.fire("finished",this),this}time(t){return null==t?this._time:(this.step(t-this._time),this)}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,i=this._queue.length;e<i;++e){const i=this._queue[e],s=this._isDeclarative||!i.initialised&&t;t=!i.finished,s&&t&&(i.initialiser.call(this),i.initialised=!0)}}_rememberMorpher(t,e){if(this._history[t]={morpher:e,caller:this._queue[this._queue.length-1]},this._isDeclarative){const t=this.timeline();t&&t.play()}}_run(t){let e=!0;for(let i=0,s=this._queue.length;i<s;++i){const s=this._queue[i],n=s.runner.call(this,t);s.finished=s.finished||!0===n,e=e&&s.finished}return e}_tryRetarget(t,e,i){if(this._history[t]){if(!this._history[t].caller.initialised){const e=this._queue.indexOf(this._history[t].caller);return this._queue.splice(e,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget.call(this,e,i):this._history[t].morpher.to(e),this._history[t].caller.finished=!1;const s=this.timeline();return s&&s.play(),!0}return!1}}cn.id=0;class un{constructor(t=new xi,e=-1,i=!0){this.transforms=t,this.id=e,this.done=i}clearTransformsFromQueue(){}}pi([cn,un],{mergeWith(t){return new un(t.transforms.lmultiply(this.transforms),t.id)}});const fn=(t,e)=>t.lmultiplyO(e),dn=t=>t.transforms;function pn(){const t=this._transformationRunners.runners.map(dn).reduce(fn,new xi);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class bn{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new un).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,e){const i=this.ids.indexOf(t+1);return this.ids.splice(i,1,t+1),this.runners.splice(i,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;e<this.runners.length;++e){const i=this.runners[e];if(!(t&&i.done&&t.done)||i._timeline&&i._timeline._runnerIds.includes(i.id)||t._timeline&&t._timeline._runnerIds.includes(t.id))t=i;else{this.remove(i.id);const s=i.mergeWith(t);this.edit(t.id,s),t=s,--e}}return this}remove(t){const e=this.ids.indexOf(t+1);return this.ids.splice(e,1),this.runners.splice(e,1),this}}Be({Element:{animate(t,e,i){const s=cn.sanitise(t,e,i),n=this.timeline();return new cn(s.duration).loop(s).element(this).timeline(n.play()).schedule(s.delay,s.when)},delay(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter((e=>e.id<=t.id)).map(dn).reduce(fn,new xi)},_addRunner(t){this._transformationRunners.add(t),an.cancelImmediate(this._frameId),this._frameId=an.immediate(pn.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new bn).add(new un(new xi(this))))}}}),pi(cn,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,i){if("string"==typeof e)return this.styleAttr(t,{[e]:i});let s=e;if(this._tryRetarget(t,s))return this;let n=new Ws(this._stepper).to(s),r=Object.keys(s);return this.queue((function(){n=n.from(this.element()[t](r))}),(function(e){return this.element()[t](n.at(e).valueOf()),n.done()}),(function(e){const i=Object.keys(e),a=(o=r,i.filter((t=>!o.includes(t))));var o;if(a.length){const e=this.element()[t](a),i=new Ks(n.from()).valueOf();Object.assign(i,e),n.from(i)}const h=new Ks(n.to()).valueOf();Object.assign(h,e),n.to(h),r=i,s=e})),this._rememberMorpher(t,n),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let i=new Ws(this._stepper).to(new Zi(t));return this.queue((function(){i=i.from(this.element().zoom())}),(function(t){return this.element().zoom(i.at(t),e),i.done()}),(function(t,s){e=s,i.to(t)})),this._rememberMorpher("zoom",i),this},transform(t,e,i){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const s=xi.isMatrixLike(t);i=null!=t.affine?t.affine:null!=i?i:!s;const n=new Ws(this._stepper).type(i?zs:xi);let r,a,o,h,l;return this.queue((function(){a=a||this.element(),r=r||Xe(t,a),l=new xi(e?void 0:a),a._addRunner(this),e||a._clearTransformRunnersBefore(this)}),(function(c){e||this.clearTransform();const{x:u,y:f}=new Mi(r).transform(a._currentTransform(this));let d=new xi({...t,origin:[u,f]}),p=this._isDeclarative&&o?o:l;if(i){d=d.decompose(u,f),p=p.decompose(u,f);const t=d.rotate,e=p.rotate,i=[t-360,t,t+360],s=i.map((t=>Math.abs(t-e))),n=Math.min(...s),r=s.indexOf(n);d.rotate=i[r]}e&&(s||(d.rotate=t.rotate||0),this._isDeclarative&&h&&(p.rotate=h)),n.from(p),n.to(d);const b=n.at(c);return h=b.rotate,o=new xi(b),this.addTransform(o),a._addRunner(this),n.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(r=Xe(e,a)),t={...e,origin:r}}),!0),this._isDeclarative&&this._rememberMorpher("transform",n),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new Zi(e),this._tryRetarget(t,e))return this;const i=new Ws(this._stepper).to(e);let s=null;return this.queue((function(){s=this.element()[t](),i.from(s),i.to(s+e)}),(function(e){return this.element()[t](i.at(e)),i.done()}),(function(t){i.to(s+new Zi(t))})),this._rememberMorpher(t,i),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const i=new Ws(this._stepper).to(e);return this.queue((function(){i.from(this.element()[t]())}),(function(e){return this.element()[t](i.at(e)),i.done()})),this._rememberMorpher(t,i),this},_queueNumber(t,e){return this._queueObject(t,new Zi(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let i;return t&&e||(i=this._element.bbox()),t||(t=i.width/i.height*e),e||(e=i.height/i.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,i,s){if(4===arguments.length)return this.plot([t,e,i,s]);if(this._tryRetarget("plot",t))return this;const n=new Ws(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){n.from(this._element.array())}),(function(t){return this._element.plot(n.at(t)),n.done()})),this._rememberMorpher("plot",n),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,i,s){return this._queueObject("viewbox",new Ui(t,e,i,s))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),pi(cn,{rx:hs,ry:ls,from:gs,to:ws}),ci(cn,"Runner");class vn extends rs{constructor(t,e=t){super(oi("svg",t),e),this.namespace()}defs(){return this.isRoot()?hi(this.node.querySelector("defs"))||this.put(new as):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof ei.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:Qe,version:"1.1"}).attr("xmlns:xlink",ti,Ze):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,Ze).attr("xmlns:svgjs",null,Ze)}root(){return this.isRoot()?this:super.root()}}Be({Container:{nested:bi((function(){return this.put(new vn)}))}}),ci(vn,"Svg",!0);class En extends rs{constructor(t,e=t){super(oi("symbol",t),e)}}Be({Container:{symbol:bi((function(){return this.put(new En)}))}}),ci(En,"Symbol");var mn=Object.freeze({__proto__:null,amove:function(t,e){return this.ax(t).ay(e)},ax:function(t){return this.attr("x",t)},ay:function(t){return this.attr("y",t)},build:function(t){return this._build=!!t,this},center:function(t,e,i=this.bbox()){return this.cx(t,i).cy(e,i)},cx:function(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)},cy:function(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)},length:function(){return this.node.getComputedTextLength()},move:function(t,e,i=this.bbox()){return this.x(t,i).y(e,i)},plain:function(t){return!1===this._build&&this.clear(),this.node.appendChild(ei.document.createTextNode(t)),this},x:function(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)},y:function(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}});class gn extends os{constructor(t,e=t){super(oi("text",t),e),this.dom.leading=this.dom.leading??new Zi(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new Zi(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const i=this.dom.leading;this.each((function(s){if(Je(this.node))return;const n=ei.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=i*new Zi(n);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=r:(this.attr("dy",s?r+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new Zi(t.leading||1.3),this}writeDataToDom(){return Ke(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const e=this.node.childNodes;let i=0;t="";for(let s=0,n=e.length;s<n;++s)"textPath"===e[s].nodeName||Je(e[s])?0===s&&(i=s+1):(s!==i&&3!==e[s].nodeType&&!0===hi(e[s]).dom.newLined&&(t+="\n"),t+=e[s].textContent);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(let e=0,i=(t=(t+"").split("\n")).length;e<i;e++)this.newLine(t[e]);return this.build(!1).rebuild()}}pi(gn,mn),Be({Container:{text:bi((function(t=""){return this.put(new gn).text(t)})),plain:bi((function(t=""){return this.put(new gn).plain(t)}))}}),ci(gn,"Text");class wn extends os{constructor(t,e=t){super(oi("tspan",t),e),this._build=!1}dx(t){return this.attr("dx",t)}dy(t){return this.attr("dy",t)}newLine(){this.dom.newLined=!0;const t=this.parent();if(!(t instanceof gn))return this;const e=t.index(this),i=ei.window.getComputedStyle(this.node).getPropertyValue("font-size"),s=t.dom.leading*new Zi(i);return this.dy(e?s:0).attr("x",t.x())}text(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}}pi(wn,mn),Be({Tspan:{tspan:bi((function(t=""){const e=new wn;return this._build||this.clear(),this.put(e).text(t)}))},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),ci(wn,"Tspan");class yn extends os{constructor(t,e=t){super(oi("circle",t),e)}radius(t){return this.attr("r",t)}rx(t){return this.attr("r",t)}ry(t){return this.rx(t)}size(t){return this.radius(new Zi(t).divide(2))}}pi(yn,{x:cs,y:us,cx:fs,cy:ds,width:ps,height:bs}),Be({Container:{circle:bi((function(t=0){return this.put(new yn).size(t).move(0,0)}))}}),ci(yn,"Circle");class Tn extends rs{constructor(t,e=t){super(oi("clipPath",t),e)}remove(){return this.targets().forEach((function(t){t.unclip()})),super.remove()}targets(){return ji("svg [clip-path*="+this.id()+"]")}}Be({Container:{clip:bi((function(){return this.defs().put(new Tn)}))},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const e=t instanceof Tn?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),ci(Tn,"ClipPath");class Sn extends ss{constructor(t,e=t){super(oi("foreignObject",t),e)}}Be({Container:{foreignObject:bi((function(t,e){return this.put(new Sn).size(t,e)}))}}),ci(Sn,"ForeignObject");var An=Object.freeze({__proto__:null,dmove:function(t,e){return this.children().forEach((i=>{let s;try{s=i.node instanceof ei.window.SVGSVGElement?new Ui(i.attr(["x","y","width","height"])):i.bbox()}catch(t){return}const n=new xi(i),r=n.translate(t,e).transform(n.inverse()),a=new Mi(s.x,s.y).transform(r);i.move(a.x,a.y)})),this},dx:function(t){return this.dmove(t,0)},dy:function(t){return this.dmove(0,t)},height:function(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)},move:function(t=0,e=0,i=this.bbox()){return this.dmove(t-i.x,e-i.y)},size:function(t,e,i=this.bbox()){const s=We(this,t,e,i),n=s.width/i.width,r=s.height/i.height;return this.children().forEach((t=>{const e=new Mi(i).transform(new xi(t).inverse());t.scale(n,r,e.x,e.y)})),this},width:function(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)},x:function(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)},y:function(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}});class On extends rs{constructor(t,e=t){super(oi("g",t),e)}}pi(On,An),Be({Container:{group:bi((function(){return this.put(new On)}))}}),ci(On,"G");class Rn extends rs{constructor(t,e=t){super(oi("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,ti)}}pi(Rn,An),Be({Container:{link:bi((function(t){return this.put(new Rn).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const i=e.index(t);return e.add(this,i),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new Rn,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),ci(Rn,"A");class Nn extends rs{constructor(t,e=t){super(oi("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return ji("svg [mask*="+this.id()+"]")}}Be({Container:{mask:bi((function(){return this.defs().put(new Nn)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof Nn?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),ci(Nn,"Mask");class _n extends ss{constructor(t,e=t){super(oi("stop",t),e)}update(t){return("number"==typeof t||t instanceof Zi)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new Zi(t.offset)),this}}Be({Gradient:{stop:function(t,e,i){return this.put(new _n).update(t,e,i)}}}),ci(_n,"Stop");class Cn extends ss{constructor(t,e=t){super(oi("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,i={}){return this.rule("@font-face",{fontFamily:t,src:e,...i})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let i=t+"{";for(const t in e)i+=t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[t]+";";return i+="}",i}(t,e))}}Be("Dom",{style(t,e){return this.put(new Cn).rule(t,e)},fontface(t,e,i){return this.put(new Cn).font(t,e,i)}}),ci(Cn,"Style");class Ln extends gn{constructor(t,e=t){super(oi("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let i=null;return e&&(i=e.plot(t)),null==t?i:this}track(){return this.reference("href")}}Be({Container:{textPath:bi((function(t,e){return t instanceof gn||(t=this.text(t)),t.path(e)}))},Text:{path:bi((function(t,e=!0){const i=new Ln;let s;if(t instanceof Zs||(t=this.defs().path(t)),i.attr("href","#"+t,ti),e)for(;s=this.node.firstChild;)i.node.appendChild(s);return this.put(i)})),textPath(){return this.findOne("textPath")}},Path:{text:bi((function(t){return t instanceof gn||(t=(new gn).addTo(this.parent()).text(t)),t.path(this)})),targets(){return ji("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),Ln.prototype.MorphArray=qs,ci(Ln,"TextPath");class In extends os{constructor(t,e=t){super(oi("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,ti)}}Be({Container:{use:bi((function(t,e){return this.put(new In).use(t,e)}))}}),ci(In,"Use"),pi([vn,En,As,Ss,_s],je("viewbox")),pi([Ns,sn,en,Zs],je("marker")),pi(gn,je("Text")),pi(Zs,je("Path")),pi(as,je("Defs")),pi([gn,wn],je("Tspan")),pi([nn,Es,Ts,cn],je("radius")),pi(zi,je("EventTarget")),pi(is,je("Dom")),pi(ss,je("Element")),pi(os,je("Shape")),pi([rs,ms],je("Container")),pi(Ts,je("Gradient")),pi(cn,je("Runner")),Fi.extend([...new Set(Fe)]),function(t=[]){Qs.push(...[].concat(t))}([Zi,ki,Ui,xi,Qi,Os,qs,Mi]),pi(Qs,{to(t){return(new Ws).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,i,s,n){return this.fromArray(t.map((function(t,r){return s.step(t,e[r],i,n[r],n)})))}});let kn=class{constructor(t,e,i,s,n,r,a,o){this.categoryPosition={x:0,y:0},this.spacings={scenarioOffset:0,markerOffset:0,scenarioLabelToBar:0,labelToBar:0,labelToAxis:0,needleWidth:0,needleHeadWidth:0,barWidth:0,varianceAxisLineWidth:0,axisLineWidth:0,auxiliaryLineWidth:0,scenarioLineWidth:0,markerWidth:0,categoryWidth:0,axisTickLength:0},this.categoriesBoxOffset={width:0,height:0},this.padding=t,this.scaleFactors=e,this.fontSize=i,this.axisPosition={x:0,y:0},this.numberOfColumns=s,this.leftSideLengthSync=n,this.topSideLabelHeight=r>0?this.fontSize:0,this.leftSideLabelLength=this.calculateSideLabelLength(r,a,o),this.calculateSpacings(),this.calculateCategoryPosition(),this.calculateAxisPosition()}getBarPositionX(){return this.axisPosition.x}getBarCenterPositionY(t){return this.categoryPosition.y+this.spacings.scenarioOffset+t*this.spacings.categoryWidth}getBarPositionY(t,e){return e?this.getBarCenterPositionY(t):this.getBarCenterPositionY(t)-this.spacings.scenarioOffset}getCategoryPositionX(t){let e=this.spacings.labelToAxis;return t&&(e=-this.spacings.labelToAxis),this.getAxisPositionX()+e}getAxisTitlePositionX(){return this.axisPosition.x}getAxisTitlePositionY(){return this.axisPosition.y-this.spacings.labelToAxis}getNeedleWidth(){return this.spacings.needleWidth}getAxisPositionX(){return this.leftSideLabelLength+this.padding.left+this.spacings.labelToAxis}getAxisPositionY(){return this.padding.top+this.getAxisTitleOffset()}loadCategoriesBox(t){this.categoriesBoxOffset=t,this.calculateAxisPosition()}addOffsetByNegativeDataPoints(t,e,i,s){null!=t&&null!=t.value&&t.value<0&&(i&&t.isClipped()?this.axisPosition.x+=Math.abs(t.getClippedValue()*t.pixelPerUnit):this.axisPosition.x+=Math.abs(t.value*t.pixelPerUnit),this.axisPosition.x+=e,this.axisPosition.x+=this.spacings.labelToBar),this.axisPosition.x<s/2&&(this.axisPosition.x=s/2+this.spacings.labelToBar)}getLabelPositionX(t){let e=this.spacings.labelToBar;return t<0&&(e*=-1),this.axisPosition.x+t+e}getLabelPositionY(t){return this.axisPosition.y+t+this.spacings.labelToBar}getCategoryToAxisSpaceing(){return this.spacings.labelToAxis}getCategoryToTopSpaceing(){return this.spacings.scenarioOffset}getCategoryToBottomSpaceing(){return this.spacings.scenarioOffset}getAxisEndPositionY(){return this.getAxisPositionY()+(this.numberOfColumns+.5)*this.spacings.categoryWidth}getScenarioLabelPositionOffsetY(t){return t?.5*this.getBarWidth()+this.spacings.scenarioLabelToBar:-(.5*this.getBarWidth()+this.spacings.scenarioLabelToBar)}getBarWidth(){return this.spacings.barWidth}getMarkerPositionY(t,e){return e?this.getBarCenterPositionY(t)-this.spacings.markerOffset-.5*this.getBarWidth():this.getBarCenterPositionY(t)+this.spacings.markerOffset+.5*this.getBarWidth()}getMarkerPositionX(){return this.getBarPositionX()}getMarkerScenarioLabelPositionOffsetY(t){return t?-(.5*this.spacings.markerWidth+this.spacings.scenarioLabelToBar):this.spacings.scenarioLabelToBar+.5*this.spacings.markerWidth}getAxisEndPositionX(){return this.getAxisPositionX()}calculateSpacings(){this.spacings={scenarioOffset:this.fontSize*this.scaleFactors.scenarioOffset,markerOffset:this.fontSize*this.scaleFactors.markerOffset,scenarioLabelToBar:this.fontSize*this.scaleFactors.scenarioLabelToBar,labelToBar:this.fontSize*this.scaleFactors.labelToBar,labelToAxis:this.fontSize*this.scaleFactors.labelToAxis,needleWidth:this.fontSize*this.scaleFactors.needleWidth,needleHeadWidth:this.fontSize*this.scaleFactors.needleHeadWidth,barWidth:this.fontSize*this.scaleFactors.barWidth,varianceAxisLineWidth:this.fontSize*this.scaleFactors.varianceAxisLineWidth,axisLineWidth:this.fontSize*this.scaleFactors.axisLineWidth,auxiliaryLineWidth:this.fontSize*this.scaleFactors.auxiliaryLineWidth,scenarioLineWidth:this.fontSize*this.scaleFactors.scenarioLineWidth,markerWidth:this.fontSize*this.scaleFactors.markerWidth,categoryWidth:this.fontSize*this.scaleFactors.categoryWidth,axisTickLength:this.fontSize*this.scaleFactors.axisTickLength}}calculateCategoryPosition(){this.categoryPosition={x:this.padding.left,y:this.getAxisPositionY()+.5*this.spacings.categoryWidth}}calculateAxisPosition(){this.axisPosition={x:this.getAxisPositionX(),y:this.getAxisPositionY()}}recalculatePositions(){this.calculateCategoryPosition(),this.calculateAxisPosition()}getAxisTitleOffset(){return this.topSideLabelHeight}calculateSideLabelLength(t,e,i){if(this.leftSideLengthSync)return this.leftSideLengthSync;const s=t/2;let n=e;return s>n&&(n=s),i>n&&(n=i),n}},Mn=class{constructor(t){this.top=t.top,this.bottom=t.bottom,this.left=t.left,this.right=t.right}addBoxTopLeft(t){return this.top+=t.height|this.top,this.left+=t.width|this.top,this}},$n=class{constructor(t){const e=1*t,i=.7*t;this.bgOffset=(e-i)/2,this.markerUp={top:i/2+",0",left:"0,"+i,right:i+","+i},this.markerUpBackground={top:e/2+",0",left:"0,"+e,right:e+","+e},this.markerDown={bottom:i/2+","+i,left:"0,0",right:i+",0"},this.markerDownBackground={bottom:e/2+","+e,left:"0,0",right:e+",0"}}upMarkerPatternStrings(){return{background:this.markerUpBackground.left+" "+this.markerUpBackground.right+" "+this.markerUpBackground.top+" "+this.markerUpBackground.left,foreground:this.markerUp.left+" "+this.markerUp.right+" "+this.markerUp.top+" "+this.markerUp.left,bgOffset:this.bgOffset}}downMarkerPatternStrings(){return{background:this.markerDownBackground.left+" "+this.markerDownBackground.right+" "+this.markerDownBackground.bottom+" "+this.markerDownBackground.left,foreground:this.markerDown.left+" "+this.markerDown.right+" "+this.markerDown.bottom+" "+this.markerDown.left,bgOffset:this.bgOffset}}createPatternMapForStructureBar(){const t=new Map;return t.set("marker-up",this.upMarkerPatternStrings()),t.set("marker-down",this.downMarkerPatternStrings()),t}},xn=class{constructor(t){this.container=new vn,this.pattern=this.createFCPattern(this.container.group(),t),this.styles=t;let e=10;null!=t&&null!=t.fontStyles&&t.fontStyles.size&&(e=t.fontStyles.size),this.bgOffset=(1*e-.7*e)/2}createFCPattern(t,e){const i=e;return t.pattern(10,10,(function(t){t.rect(10,10).fill(i.barStyles.fc.fill),t.line(0,5,5,0).stroke({width:i.barStyles.fc.width,color:i.barStyles.fc.stroke,linecap:"square"}),t.line(5,10,10,5).stroke({width:i.barStyles.fc.width,color:i.barStyles.fc.stroke,linecap:"square"})})).id("pattern-structure-fc")}getFCPolygonPattern(){return{background:"",foreground:"",bgOffset:0,pattern:this.pattern}}toString(){return this.container.svg()}};var Dn,Pn,Un;!function(t){t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.DIRTY=1]="DIRTY"}(Dn||(Dn={})),function(t){t.RELATIVE="dr",t.ABSOLUTE="d",t.NONE=""}(Pn||(Pn={}));class Gn{constructor(t="",e=1){this.prefix=t,this.value=e}}!function(t){t[t.Y=1e24]="Y",t[t.Z=1e21]="Z",t[t.E=1e18]="E",t[t.P=1e15]="P",t[t.T=1e12]="T",t[t.G=1e9]="G",t[t.M=1e6]="M",t[t.k=1e3]="k",t[t.h=100]="h",t[t.da=10]="da",t[t.d=.1]="d",t[t.c=.01]="c",t[t.m=.001]="m",t[t.my=1e-6]="my",t[t.n=1e-9]="n",t[t.p=1e-12]="p",t[t.f=1e-15]="f",t[t.a=1e-18]="a",t[t.z=1e-21]="z",t[t.y=1e-24]="y"}(Un||(Un={}));class Fn{static calculateMeasureScale(t,e,i){var s;if("_"===i)return new Gn;if(null!=i&&[...this.unitsLeast,...this.unitsGreat].includes(i))return this.lookupPrefix(i);if(0===e.length)return new Gn;const n=`SELECT MAX(GREATEST(${e.filter((t=>3===t.length)).map((t=>"ABS("+t+")")).toString()})) as prefixvalue\n FROM ?`,r=`SELECT MIN(LEAST(${e.filter((t=>3===t.length)).map((t=>"ABS("+t+")")).toString()})) as prefixvalue\n FROM ?`;let a=n;"LEAST"===(null==i?void 0:i.toUpperCase())&&(a=r);const o=null===(s=Yt(a,[t])[0])||void 0===s?void 0:s.prefixvalue;return this.determinePrefix(Math.abs(o))}static determinePrefix(t){if(t>=1e3){const e=Math.floor(Math.floor(Math.abs(t)).toString().length/3),i=+Math.pow(1e3,e);return new Gn(this.unitsGreat[e-1],i)}if(t<=.001){const e=Math.floor(Math.abs(t).toString().length/3),i=1/Math.pow(1e3,e);return new Gn(this.unitsLeast[e-1],i)}return new Gn}static lookupPrefix(t){return new Gn(t,Un[t])}}Fn.unitsGreat=["k","M","G","T","P","E","Z","Y"],Fn.unitsLeast=["m","my","n","p","P","f","a","z","y"];class Bn{adapt(t){return at.adaptDefaultString(t)}default(){return""}}class jn{constructor(t,e){this.data=t,this.scenarios=e,this.variances=[],this.title="",this.hideCategories=!1,this.pixelPerUnit=10,this.pixelPerPercentage=50,this.limit=0,this.sortOrder=new ht(new Bn).default(),this.level=C.CATEGORY,this.filter="",this.measureScale=new Gn,this.measureUnit="",this.showMeasureScale=!0,this.dataFormatDigits={decimal:1,percent:2},this.stackConfig=null}}class Hn{constructor(t,e,i,s,n){this.dataRowAdapter=t,this.orderAdapter=e,this.stringAdapter=i,this.dataFormatDigitsAdapter=s,this.dataSet=n}adapt(t){const e=at.adaptArray(t.data,this.dataRowAdapter),i=at.adaptArray(t.scenarios,this.stringAdapter),s=new jn(e,i);return ot.isArray(t.variances)&&(s.variances=at.adaptArray(t.variances,this.stringAdapter)),ot.isString(t.title)&&(s.title=t.title),ot.isBoolean(t.hideCategories)&&(s.hideCategories=t.hideCategories),ot.isNumber(t.pixelPerUnit)&&(s.pixelPerUnit=t.pixelPerUnit),ot.isNumber(t.pixelPerPercentage)&&(s.pixelPerPercentage=t.pixelPerPercentage),ot.isNumber(t.limit)&&(s.limit=t.limit),ot.isExisting(t.sortOrder)&&(s.sortOrder=this.orderAdapter.adapt(t.sortOrder)),ot.isExisting(t.level)&&(s.level=t.level),ot.isString(t.filter)&&(s.filter=t.filter.trim()),ot.isExisting(t.measureScale)&&(s.measureScale=Fn.calculateMeasureScale(this.dataSet,s.scenarios,t.measureScale)),ot.isString(t.measureUnit)&&(s.measureUnit=t.measureUnit),ot.isBoolean(t.showMeasureScale)&&(s.showMeasureScale=t.showMeasureScale),ot.isExisting(t.dataFormatDigits)&&(s.dataFormatDigits=this.dataFormatDigitsAdapter.adapt(t.dataFormatDigits)),ot.isExisting(t.stackConfig)&&(s.stackConfig=t.stackConfig),s}default(){return new jn([],[])}}let Vn=class{constructor(t,e,i,s){this.value=t,this.scenario=e,this.pixelPerUnit=i||1,this.variance="neg"===s||s===Kn.NEG?Kn.NEG:"pos"===s||s===Kn.POS?Kn.POS:Kn.NEU}isEmpty(){return null==this.value||null==this.scenario}getScaledUnit(){return null==this.value?0:this.value*this.pixelPerUnit}getScaledPercentUnit(){return null==this.value?0:Math.abs(this.value)>1.45?this.value>=0?1.45*this.pixelPerUnit:-1.45*this.pixelPerUnit:this.value*this.pixelPerUnit}getVarianceStyle(){return null==this.value||this.value>=0?this.variance:Kn.NEU===this.variance?Kn.NEU:Kn.POS===this.variance?Kn.NEG:Kn.POS}isClipped(){return null!=this.value&&Math.abs(this.value)>1.45}getClippedValue(){return 145}getScenario(){var t;return null===(t=this.scenario)||void 0===t?void 0:t.slice(0,2)}};class qn{constructor(){this.operation="+"}addRowGroup(t,e){this.rowGroup=t,this.rowGroupIndex=e}addCategory(t,e){this.category=t,this.categoryIndex=e}addSubCategory(t,e){this.subCategory=t,this.subCategoryIndex=e}addColumnGroup(t,e){this.columnGroup=t,this.columnGroupIndex=e}addSubColumnGroup(t,e){this.columnSubGroup=t,this.columnSubGroupIndex=e}}class Yn{constructor(){}adapt(t){const e=new qn;return ot.isOperator(t.operation)&&(e.operation=t.operation),ot.isNumber(t.rowGroupIndex)&&ot.isString(t.rowGroup)&&e.addRowGroup(t.rowGroup,t.rowGroupIndex),ot.isNumber(t.categoryIndex)&&ot.isString(t.category)&&e.addCategory(t.category,t.categoryIndex),ot.isNumber(t.subCategoryIndex)&&ot.isString(t.subCategory)&&e.addSubCategory(t.subCategory,t.subCategoryIndex),ot.isNumber(t.columnGroupIndex)&&ot.isString(t.columnGroup)&&e.addColumnGroup(t.columnGroup,t.columnGroupIndex),ot.isNumber(t.columnSubGroupIndex)&&ot.isString(t.columnSubGroup)&&e.addSubColumnGroup(t.columnSubGroup,t.columnSubGroupIndex),this.setActualValues(t,e),this.setPlanValues(t,e),this.setPreviousPeriodValues(t,e),this.setForecastValues(t,e),e}default(){return new qn}setActualValues(t,e){ot.isNumber(t.ac1)&&(e.ac1=t.ac1),ot.isNumber(t.ac2)&&(e.ac2=t.ac2),ot.isNumber(t.ac3)&&(e.ac3=t.ac3),ot.isNumber(t.ac4)&&(e.ac4=t.ac4)}setPlanValues(t,e){ot.isNumber(t.pl1)&&(e.pl1=t.pl1),ot.isNumber(t.pl2)&&(e.pl2=t.pl2),ot.isNumber(t.pl3)&&(e.pl3=t.pl3),ot.isNumber(t.pl4)&&(e.pl4=t.pl4)}setPreviousPeriodValues(t,e){ot.isNumber(t.pp1)&&(e.pp1=t.pp1),ot.isNumber(t.pp2)&&(e.pp2=t.pp2),ot.isNumber(t.pp3)&&(e.pp3=t.pp3),ot.isNumber(t.pp4)&&(e.pp4=t.pp4)}setForecastValues(t,e){ot.isNumber(t.fc1)&&(e.fc1=t.fc1),ot.isNumber(t.fc2)&&(e.fc2=t.fc2),ot.isNumber(t.fc3)&&(e.fc3=t.fc3),ot.isNumber(t.fc4)&&(e.fc4=t.fc4)}}class Wn{constructor(t,e,i,s,n,r){this.scaleFactors=t,this.fontStyles=e,this.axisStyles=i,this.barStyles=s,this.varianceStyles=n,this.padding=r,this.pattern=new Map,this.stackColors=["#000000","#c0c0c0","#808080"]}}class Xn{constructor(t,e,i,s,n){this.scaleFactorsStructureChartAdapter=t,this.fontStyleAdapter=e,this.svgStyleGroupAdapter=i,this.svgVariancesStyleGroupAdapter=s,this.paddingadapter=n}adapt(t){const e=new Wn(this.scaleFactorsStructureChartAdapter.default(),this.fontStyleAdapter.default(),this.svgStyleGroupAdapter.default(),this.svgStyleGroupAdapter.default(),this.svgVariancesStyleGroupAdapter.default(),this.paddingadapter.default());return ot.isExisting(t)&&(ot.isExisting(t.scaleFactors)&&(e.scaleFactors=this.scaleFactorsStructureChartAdapter.adapt(t.scaleFactors)),ot.isExisting(t.fontStyles)&&(e.fontStyles=this.fontStyleAdapter.adapt(t.fontStyles)),ot.isExisting(t.axisStyles)&&(e.axisStyles=this.svgStyleGroupAdapter.adapt(t.axisStyles)),ot.isExisting(t.barStyles)&&(e.barStyles=this.svgStyleGroupAdapter.adapt(t.barStyles)),ot.isExisting(t.varianceStyles)&&(e.varianceStyles=this.svgVariancesStyleGroupAdapter.adapt(t.varianceStyles)),ot.isExisting(t.padding)&&(e.padding=this.paddingadapter.adapt(t.padding)),Array.isArray(t.stackColors)&&t.stackColors.length>0&&(e.stackColors=t.stackColors),e.pattern=new $n(e.fontStyles.size).createPatternMapForStructureBar()),e}default(){return new Wn(this.scaleFactorsStructureChartAdapter.default(),this.fontStyleAdapter.default(),this.svgStyleGroupAdapter.default(),this.svgStyleGroupAdapter.default(),this.svgVariancesStyleGroupAdapter.default(),this.paddingadapter.default())}}class zn{constructor(){this.scenarioOffset=.3,this.scenarioLabelToBar=.1,this.labelToBar=.3,this.labelToAxis=.3,this.needleWidth=.3,this.needleHeadWidth=.6,this.barWidth=1.2,this.varianceAxisLineWidth=.3,this.axisLineWidth=.1,this.auxiliaryLineWidth=.1,this.scenarioLineWidth=.2,this.markerWidth=.7,this.markerOffset=0,this.categoryWidth=1.9,this.axisTickLength=.3}}class Jn{adapt(t){const e=new zn;return ot.isNumber(t.scenarioOffset)&&(e.scenarioOffset=t.scenarioOffset),ot.isNumber(t.scenarioLabelToBar)&&(e.scenarioLabelToBar=t.scenarioLabelToBar),ot.isNumber(t.labelToBar)&&(e.labelToBar=t.labelToBar),ot.isNumber(t.labelToAxis)&&(e.labelToAxis=t.labelToAxis),ot.isNumber(t.needleWidth)&&(e.needleWidth=t.needleWidth),ot.isNumber(t.needleHeadWidth)&&(e.needleHeadWidth=t.needleHeadWidth),ot.isNumber(t.barWidth)&&(e.barWidth=t.barWidth),ot.isNumber(t.varianceAxisLineWidth)&&(e.varianceAxisLineWidth=t.varianceAxisLineWidth),ot.isNumber(t.axisLineWidth)&&(e.axisLineWidth=t.axisLineWidth),ot.isNumber(t.auxiliaryLineWidth)&&(e.auxiliaryLineWidth=t.auxiliaryLineWidth),ot.isNumber(t.scenarioLineWidth)&&(e.scenarioLineWidth=t.scenarioLineWidth),ot.isNumber(t.markerWidth)&&(e.markerWidth=t.markerWidth),ot.isNumber(t.markerOffset)&&(e.markerOffset=t.markerOffset),ot.isNumber(t.categoryWidth)&&(e.categoryWidth=t.categoryWidth),ot.isNumber(t.axisTickLength)&&(e.axisTickLength=t.axisTickLength),e}default(){return new zn}}var Kn,Qn;!function(t){t.AC1="ac1",t.PP1="pp1",t.FC1="fc1",t.PL1="pl1",t.AC2="ac2",t.PP2="pp2",t.FC2="fc2",t.PL2="pl2",t.AC3="ac3",t.PP3="pp3",t.FC3="fc3",t.PL3="pl3",t.AC4="ac4",t.PP4="pp4",t.FC4="fc4",t.PL4="pl4",t.POS="pos",t.NEG="neg",t.NEU="neu"}(Kn||(Kn={})),function(t){t.LIST="LIST",t.SUM="SUM",t.OPT="OPT"}(Qn||(Qn={}));const Zn=["pl","fc","pp","ac"];function tr(t){return t.replace(/\d+$/,"")}function er(t){return.299*parseInt(t.slice(1,3),16)+.587*parseInt(t.slice(3,5),16)+.114*parseInt(t.slice(5,7),16)>128?"#000000":"#ffffff"}var ir;!function(t){t[t.Left=0]="Left",t[t.Center=1]="Center",t[t.Right=2]="Right",t[t.Top=3]="Top",t[t.Bottom=4]="Bottom"}(ir||(ir={}));let sr=class{constructor(t,e,i,s,n,r,a,o){this.group=null,this.segmentFillColor=null,this.maxWidth=null,this.ID_SCENARIOLABEL="Label",this.CSS_CATEGORIES="categories",this.x=e,this.y=i,this.value=n,null!=t&&(this.group=t.group().id(this.createElementID(t.toString(),s))),this.styles=r,this.isVarianceLabel=!1,this.isRelativeLabel=!1,this.verticalHookLocation=a||ir.Top,this.horizontalHookLocation=o||ir.Left}setToVarianceLabel(){return this.isVarianceLabel=!0,this}setToRelativeVarianceLabel(){return this.isVarianceLabel=!0,this.isRelativeLabel=!0,this}setSegmentFill(t){return this.segmentFillColor=t,this}setMaxWidth(t){return this.maxWidth=t,this}updateGroup(t){return this.group=t,this}createElementID(t,e){return t+"_"+e+"_"+this.ID_SCENARIOLABEL}draw(t={percent:2,decimal:1},e=new Gn){var i;if(this.isEmpty())return this;const s=this.group;let n;const r=this.styles.fontStyles.background||"#ffffff";let a="",o="start";if(!1===Number.isNaN(Number(this.value))){let i=t.percent,s=t.percent,r=1,h="percent";!1===this.isRelativeLabel&&(i=t.decimal,s=t.decimal,r=e.value,h="decimal"),n=Mt.number(Number(this.value),h,i,s,r),Number(this.value)<0&&(o="end"),this.isVarianceLabel&&Number(this.value)>=0&&(a="+")}else n=""+this.value,o="start";const h=s.text(a+n);h.move(this.x,this.y);const l=h.bbox().w,c=h.bbox().h;return null!=this.maxWidth&&l>this.maxWidth?(null===(i=this.group)||void 0===i||i.remove(),this.group=null,this):(this.horizontalHookLocation===ir.Right?(o="end",h.move(h.x()-h.length(),h.y())):this.horizontalHookLocation===ir.Center&&(o="middle",h.move(h.x()-h.length()/2,h.y())),this.verticalHookLocation===ir.Center?h.move(h.x(),h.y()-c/2):this.verticalHookLocation===ir.Bottom&&h.move(h.x(),h.y()-c),h.font({anchor:o}),null!=this.segmentFillColor?h.fill(er(this.segmentFillColor)):null==s||s.rect(l,.9*c).stroke(r).fill(r).opacity(.7).move(h.x(),h.y()+.1*c).insertBefore(h),this)}isEmpty(){return null==this.value||""===this.value}setPos(t,e){return this.x=t,this.y=e,this}},nr=class{constructor(t,e,i,s){this.height=0,this.ID_AXIS="axis",this.ID_AXIS_TITLE="axis-title",this.CSS_AXIS_TITLE="categories",this.scenarioType=t.scenarioType,this.labelText=t.labelText||null,this.position=e,this.style=s,this.label=new sr(i,this.position.getAxisTitlePositionX(),this.position.getAxisTitlePositionY(),this.ID_AXIS_TITLE,this.labelText,this.style,ir.Bottom,ir.Center),this.svgGroup=i.group().id(this.ID_AXIS)}draw(){return this.labelText&&this.label.draw(),this.svgGroup.line(this.position.getAxisPositionX(),this.position.getAxisPositionY(),this.position.getAxisEndPositionX(),this.position.getAxisEndPositionY()).addClass(this.ID_AXIS+"-"+this.convertScenarioType()),this.height=this.svgGroup.height(),this}convertScenarioType(){return void 0===this.scenarioType||null==this.scenarioType?"default":`${this.scenarioType}`.slice(0,2)}};class rr{constructor(t,e,i,s,n,r,a,o=null){if(this.ID_DATA_PREFIX="DATA",this.ID_SCENARIO_PREFIX="SCENARIO",this.ID_RECT="RECT",this.FALLBACK_COLOUR="#000000",this.label=null,this.scenarioLabel=null,this.barGroup=null,this.isVarianceBar=!1,this.overflowConfig=null,this.isOverflowing=!1,this.overdriveWidth=0,this.dimensions={barLength:0,xPos:0,yPos:0,labelXPos:0,scenarioLabelXPos:0,scenarioLabelYPos:0,clipped:!1},this.hasData=!1,this.dataPoint=i,this.index=s,this.isPrimaryBar=n,this.position=t,this.barStyles=e.barStyles,this.overflowConfig=o,this.scenarioGroup=r,this.styles=e,null!=r&&(this.barGroup=r.group().id(r.toString()+"_"+this.ID_RECT)),!0!==(null==i?void 0:i.isEmpty())&&null!=i.value){this.hasData=!0;let e=ir.Left;i.value<0&&(e=ir.Right),this.dimensions=this.createDimensions(t,i,s,n),this.label=new sr(this.scenarioGroup,this.dimensions.labelXPos,this.dimensions.yPos,this.ID_DATA_PREFIX,i.value,this.styles,ir.Center,e),this.scenarioLabel=this.getScenarioLabel(a)}}setAsVariance(){var t;return this.isVarianceBar=!0,null===(t=this.label)||void 0===t||t.setToVarianceLabel(),this}isRelativeVariance(){var t;return this.isVarianceBar=!0,null===(t=this.label)||void 0===t||t.setToRelativeVarianceLabel(),this}updateLabelGroup(t){var e;return this.isEmpty()||null==t||null===(e=this.label)||void 0===e||e.updateGroup(t),this}draw(t={percent:2,decimal:1},e=new Gn){if(this.isEmpty()||null==this.dataPoint.getScenario())return this;let i=this.barStyles.getSVGStyle(this.dataPoint.getScenario());this.isVarianceBar&&(i=this.styles.varianceStyles.getSVGStyle(this.dataPoint.getVarianceStyle()));const s=this.convertToSVGStyle(i,"stroke");let n=this.convertToSVGStyle(i,"fill");const r=this.barStyles.getSVGStyle(this.dataPoint.getScenario()).fillpattern;if(null!=r){const t=this.styles.pattern.get(r);null!=t&&(n=t.pattern)}null!=this.barGroup&&(this.isOverflowing&&this.overflowConfig?this.drawOverdriveBar(n,s):this.barGroup.rect(this.dimensions.barLength,this.position.getBarWidth()).fill(n).stroke(s).cy(this.dimensions.yPos).x(this.dimensions.xPos)),this.drawBarDataLabel(t,e),this.drawScenarioLabel()}drawOverdriveBar(t,e){if(!this.barGroup||!this.overflowConfig)return;const i=this.position.getBarPositionX(),s=this.position.getBarWidth(),n=this.dimensions.barLength,{breakGap:r}=this.overflowConfig;this.dataPoint.getScaledUnit()<0?(this.barGroup.rect(n,s).fill(t).stroke(e).x(i-n).cy(this.dimensions.yPos),this.barGroup.rect(this.overdriveWidth,s).fill(t).stroke(e).x(i-n-r-this.overdriveWidth).cy(this.dimensions.yPos),this.drawBreakIndicator(i-n-r,r)):(this.barGroup.rect(n,s).fill(t).stroke(e).x(i).cy(this.dimensions.yPos),this.barGroup.rect(this.overdriveWidth,s).fill(t).stroke(e).x(i+n+r).cy(this.dimensions.yPos),this.drawBreakIndicator(i+n,r))}drawBreakIndicator(t,e){if(!this.barGroup)return;const i=this.position.getBarWidth(),s=this.dimensions.yPos-i/2,n=t+e/2,r=.35*e,a=i/3;let o=`M ${n-r} ${s}`;for(let t=0;t<3;t++)o+=` L ${n-r-.3*e} ${s+a*(t+.5)} L ${n-r} ${s+a*(t+1)}`;let h=`M ${n+r} ${s}`;for(let t=0;t<3;t++)h+=` L ${n+r+.3*e} ${s+a*(t+.5)} L ${n+r} ${s+a*(t+1)}`;this.barGroup.rect(e,i+2).fill("#ffffff").stroke("none").x(t).cy(this.dimensions.yPos),this.barGroup.path(o).fill("none").stroke({color:"#000000",width:1}),this.barGroup.path(h).fill("none").stroke({color:"#000000",width:1})}createDimensions(t,e,i,s){const n=e.getScaledUnit(),r=Math.abs(n);if(this.overflowConfig&&r>0){const a="ac"===e.getScenario()?this.overflowConfig.cutWidth:this.overflowConfig.cutWidth-this.overflowConfig.scenarioCutOffset;if(r>a){this.isOverflowing=!0;const{breakGap:e,overdriveZoneWidth:o,maxOverflow:h}=this.overflowConfig;this.overdriveWidth=h>0?(r-a)/h*o:0;const l=a+e+this.overdriveWidth;return n<0?{clipped:!1,barLength:a,xPos:t.getBarPositionX()-a,yPos:t.getBarPositionY(i,s),labelXPos:t.getLabelPositionX(-l),scenarioLabelXPos:t.getBarPositionX()-.5*a,scenarioLabelYPos:t.getBarPositionY(i,s)+t.getScenarioLabelPositionOffsetY(s)}:{clipped:!1,barLength:a,xPos:t.getBarPositionX(),yPos:t.getBarPositionY(i,s),labelXPos:t.getLabelPositionX(l),scenarioLabelXPos:t.getBarPositionX()+.5*a,scenarioLabelYPos:t.getBarPositionY(i,s)+t.getScenarioLabelPositionOffsetY(s)}}}return n<0?{clipped:!1,barLength:r,xPos:t.getBarPositionX()+n,yPos:t.getBarPositionY(i,s),labelXPos:this.position.getLabelPositionX(n),scenarioLabelXPos:this.position.getBarPositionX()-.5*r,scenarioLabelYPos:this.position.getBarPositionY(i,s)+this.position.getScenarioLabelPositionOffsetY(s)}:{clipped:!1,barLength:n,xPos:t.getBarPositionX(),yPos:t.getBarPositionY(i,s),labelXPos:this.position.getLabelPositionX(n),scenarioLabelXPos:this.position.getBarPositionX()+.5*r,scenarioLabelYPos:this.position.getBarPositionY(i,s)+this.position.getScenarioLabelPositionOffsetY(s)}}convertToSVGStyle(t,e){return null==t&&(t=[]),t.color=t[e]||this.FALLBACK_COLOUR,Object.assign({},t)}drawScenarioLabel(){null==this.scenarioLabel||this.scenarioLabel.isEmpty()||this.isVarianceBar||this.scenarioLabel.setPos(this.dimensions.scenarioLabelXPos,this.dimensions.scenarioLabelYPos).draw()}drawBarDataLabel(t,e=new Gn){var i;this.isPrimaryBar&&(null===(i=this.label)||void 0===i||i.draw(t,e))}isEmpty(){return!1===this.hasData||Number.isNaN(this.dataPoint.value)}getScenarioLabel(t){return new sr(this.scenarioGroup,-1,-1,this.ID_SCENARIO_PREFIX,t,this.styles,this.isPrimaryBar?ir.Top:ir.Bottom,ir.Center)}}let ar=class{constructor(t,e,i,s,n,r,a,o,h){this.ID_DATA_PREFIX="DATA",this.ID_SCENARIO_PREFIX="SCENARIO",this.FALLBACK_COLOUR="#000000",this.scenarioLabel=null,this._defaultMarkerPattern=null,this.dimensions={barLength:0,xPos:0,yPos:0,labelXPos:0,scenarioLabelXPos:0,scenarioLabelYPos:0,clipped:!1},this.hasData=!1,this.position=t,this.markerGroup=e||null,this.markerPattern=i||this._defaultMarkerPattern,this.styles=n,this.barStyles=n?n.barStyles:null,this.scenario=s,!0!==(null==r?void 0:r.isEmpty())&&(this.hasData=!0,this.dimensions=this.createMarkerDimensions(r,a,h),this.scenarioLabel=this.getScenarioLabel(o,n,h))}createMarkerDimensions(t,e,i){return t.getScaledUnit()<0?{clipped:!1,labelXPos:0,barLength:Math.abs(t.getScaledUnit()),xPos:this.position.getMarkerPositionX()-Math.abs(t.getScaledUnit()),yPos:this.position.getMarkerPositionY(e,i),scenarioLabelXPos:this.position.getMarkerPositionX()-Math.abs(t.getScaledUnit()),scenarioLabelYPos:this.position.getMarkerPositionY(e,i)+this.position.getMarkerScenarioLabelPositionOffsetY(i)}:{clipped:!1,labelXPos:0,barLength:t.getScaledUnit(),xPos:this.position.getMarkerPositionX()+t.getScaledUnit(),yPos:this.position.getMarkerPositionY(e,i),scenarioLabelXPos:this.position.getMarkerPositionX()+t.getScaledUnit(),scenarioLabelYPos:this.position.getMarkerPositionY(e,i)+this.position.getMarkerScenarioLabelPositionOffsetY(i)}}getScenarioLabel(t,e,i){return null==this.markerGroup?null:new sr(this.markerGroup,-1,-1,this.ID_DATA_PREFIX,t,e,i?ir.Bottom:ir.Top,ir.Center)}convertToSVGStyle(t,e){return null==t&&(t=[]),t.color=t[e]||this.FALLBACK_COLOUR,Object.assign({},t)}draw(){if(this.isEmpty())return this;const t=this.convertToSVGStyle(this.barStyles[this.getScenario()],"stroke");let e=this.convertToSVGStyle(this.barStyles[this.getScenario()],"fill");const i=this.barStyles[this.getScenario()];if(null!=i&&i.fillpattern){const t=this.styles.pattern.get(i.fillpattern);null!=t&&(e=t.pattern)}return this.markerGroup.polygon(this.markerPattern.background).fill("#ffffff").cy(this.dimensions.yPos).cx(this.dimensions.xPos),this.markerGroup.polygon(this.markerPattern.foreground).fill(e).stroke(t).cy(this.dimensions.yPos).cx(this.dimensions.xPos),null==this.scenarioLabel||this.scenarioLabel.isEmpty()||this.scenarioLabel.setPos(this.dimensions.scenarioLabelXPos,this.dimensions.scenarioLabelYPos).draw(),this}isEmpty(){return!1===this.hasData}getScenario(){var t;return null===(t=this.scenario)||void 0===t?void 0:t.slice(0,2)}},or=class{constructor(t,e,i,s,n){if(this.ID_DATA_PREFIX="DATA",this.ID_SCENARIO_PREFIX="SCENARIO",this.ID_RECT="RECT",this.FALLBACK_COLOUR="#000000",this.label=null,this.dimensions={barLength:0,xPos:0,yPos:0,labelXPos:0,scenarioLabelXPos:0,scenarioLabelYPos:0,clipped:!1},this.hasData=!1,this.dataPoint=i,this.index=s,this.position=t,this.barStyles=e.barStyles,this.scenarioGroup=n,this.styles=e,this.barGroup=n.group().id(n.toString()+"_"+this.ID_RECT),!0!==(null==i?void 0:i.isEmpty())&&null!=i.value){this.hasData=!0,this.dimensions=this.createDimensions(t,i,s);let e=ir.Left;i.value<0&&(e=ir.Right),this.label=new sr(this.scenarioGroup,this.dimensions.labelXPos,this.dimensions.yPos,this.ID_DATA_PREFIX,i.value,this.styles,ir.Center,e),this.label.setToRelativeVarianceLabel()}}updateLabelGroup(t){var e;return this.isEmpty()||null==t||null===(e=this.label)||void 0===e||e.updateGroup(t),this}draw(){var t;if(this.isEmpty())return this;if(null==this.dimensions)return this;const e=this.styles.varianceStyles.getSVGStyle(this.dataPoint.getVarianceStyle()),i=e.stroke;let s=e.fill;const n=this.barStyles[this.dataPoint.getScenario()];if(null!=n&&n.fillpattern){const t=this.styles.pattern.get(n.fillpattern);null!=t&&null!=t.pattern&&(s=t.pattern)}this.drawNeedleHead(s,i),this.barGroup.rect(this.dimensions.barLength,this.position.getNeedleWidth()).fill(s).stroke(i).cy(this.dimensions.yPos).x(this.dimensions.xPos),null===(t=this.label)||void 0===t||t.draw()}createDimensions(t,e,i){return e.getScaledPercentUnit()<0?{barLength:Math.abs(e.getScaledPercentUnit()),xPos:t.getBarPositionX()+e.getScaledPercentUnit(),yPos:t.getBarCenterPositionY(i),labelXPos:this.position.getLabelPositionX(e.getScaledPercentUnit()-this.position.getNeedleWidth()),clipped:e.isClipped(),scenarioLabelXPos:0,scenarioLabelYPos:0}:{barLength:e.getScaledPercentUnit(),xPos:t.getBarPositionX(),yPos:t.getBarCenterPositionY(i),labelXPos:this.position.getLabelPositionX(e.getScaledPercentUnit()+this.position.getNeedleWidth()),clipped:e.isClipped(),scenarioLabelXPos:0,scenarioLabelYPos:0}}drawNeedleHead(t,e){if(null===this.dimensions)return;const i=this.styles.varianceStyles.needleHeadColour,s=this.styles.varianceStyles.needleHeadColour;if(this.dimensions.clipped){let i="13,0 4,-5 4,5 13,0 8,0 0,-5 0,5 8,0";null!=this.dataPoint.value&&this.dataPoint.value<0&&(i="0,0 9,-5 9,5 0,0 5,0 13,-5 13,5 5,0"),this.barGroup.polygon(i).fill(t).cx(this.getHeadXPosition()).cy(this.dimensions.yPos).fill(t).stroke(e)}else this.barGroup.rect(2*this.position.getNeedleWidth(),2*this.position.getNeedleWidth()).cx(this.getHeadXPosition()).cy(this.dimensions.yPos).fill(i).stroke(s)}isEmpty(){return!1===this.hasData||Number.isNaN(this.dataPoint.value)}getHeadXPosition(){let t=this.dimensions.xPos;return null!=this.dataPoint.value&&this.dataPoint.value>0&&(t+=this.dimensions.barLength),t}};class hr{constructor(t,e,i,s,n,r,a,o,h,l,c){this.hasData=!1,this.position=t,this.styles=e,this.dataPoint=i,this.index=s,this.baselineValue=n,this.segmentIndex=a,this.stackMode=o,this.totalValue=h,this.group=c,this.barGroup=c.group().id(`stacked_bar_${s}_seg_${a}`),!0!==(null==i?void 0:i.isEmpty())&&null!=i.value&&(this.hasData=!0)}draw(t={percent:2,decimal:1},e=new Gn){if(!this.hasData||null==this.dataPoint.value)return;const i=this.dataPoint.value,s=this.dataPoint.pixelPerUnit,n=this.position.getBarPositionX(),r=this.position.getBarWidth();let a,o;if(this.stackMode===$.RELATIVE){const t=s;a=(0!==this.totalValue?Math.abs(i)/Math.abs(this.totalValue):0)*t,o=n+this.baselineValue/Math.abs(this.totalValue)*t}else a=Math.abs(i*s),o=n+this.baselineValue*s;const h=this.position.getBarPositionY(this.index,!0),l=this.styles.stackColors,c=l[this.segmentIndex%l.length],u={color:c},f={color:c,width:.5};this.barGroup.rect(Math.max(a,.5),r).fill(u).stroke(f).cy(h).x(o);const d=a-6;if(d>0){const s=o+a/2;if(this.stackMode===$.RELATIVE||this.stackMode===$.ABSOLUTE_RELATIVE){const e=(0!==this.totalValue?i/this.totalValue*100:0).toFixed(t.percent)+"%";new sr(this.group,s,h,"STACK_SEG",e,this.styles,ir.Center,ir.Center).setSegmentFill(c).setMaxWidth(d).draw()}else new sr(this.group,s,h,"STACK_SEG",i,this.styles,ir.Center,ir.Center).setSegmentFill(c).setMaxWidth(d).draw(t,e)}}drawTotalLabel(t={percent:2,decimal:1},e=new Gn){if(this.stackMode===$.RELATIVE)return;const i=this.position.getBarPositionX()+this.totalValue*this.dataPoint.pixelPerUnit+this.position.spacings.labelToBar,s=this.position.getBarPositionY(this.index,!0);new sr(this.group,i,s,"STACK_TOTAL",this.totalValue,this.styles,ir.Center,ir.Left).draw(t,e)}}let lr=class{constructor(t,e,i,s,n){this.overflowConfig=null,this.i18n=n;const r=e.group().id("Scenario1"),a=e.group().id("Scenario2").insertBefore(r);this.svgGroups={parent:e,scenario1:r,scenario2:a,scenario3:e.group().id("Scenario3"),scenario4:e.group().id("Scenario4"),scenario1Label:e.group().id("label")},this.styles=i,this.position=t,this.elementCnt=s}setOverflowConfig(t){this.overflowConfig=t}isLastDataPoint(t){return this.elementCnt-1===t}isFirsttDataPoint(t){return 0===t}createPrimaryBar(t,e){var i,s,n,r;const a=null===(s=null===(i=this.svgGroups)||void 0===i?void 0:i.scenario1)||void 0===s?void 0:s.group().id(""+e),o=null===(r=null===(n=this.svgGroups)||void 0===n?void 0:n.scenario1Label)||void 0===r?void 0:r.group().id(""+e);let h=null;return this.isLastDataPoint(e)&&(h=`${this.i18n.get(t.scenario)||t.scenario}`),new rr(this.position,this.styles,t,e,!0,a,h,this.overflowConfig).updateLabelGroup(o)}createVarianceBar(t,e){var i,s,n,r;const a=null===(s=null===(i=this.svgGroups)||void 0===i?void 0:i.scenario1)||void 0===s?void 0:s.group().id(""+e),o=null===(r=null===(n=this.svgGroups)||void 0===n?void 0:n.scenario1Label)||void 0===r?void 0:r.group().id(""+e);let h=null;return this.isLastDataPoint(e)&&(h=`${this.i18n.get(t.scenario)||t.scenario}`),new rr(this.position,this.styles,t,e,!0,a,h,this.overflowConfig).updateLabelGroup(o).setAsVariance()}createRelativeVarianceBar(t,e){var i,s,n,r;const a=null===(s=null===(i=this.svgGroups)||void 0===i?void 0:i.scenario1)||void 0===s?void 0:s.group().id(""+e),o=null===(r=null===(n=this.svgGroups)||void 0===n?void 0:n.scenario1Label)||void 0===r?void 0:r.group().id(""+e);return new or(this.position,this.styles,t,e,a).updateLabelGroup(o)}createSecondaryBar(t,e){var i,s;const n=null===(s=null===(i=this.svgGroups)||void 0===i?void 0:i.scenario2)||void 0===s?void 0:s.group().id(""+e);let r=null;return this.isFirsttDataPoint(e)&&(r=`${this.i18n.get(t.scenario)||t.scenario}`),new rr(this.position,this.styles,t,e,!1,n,r,this.overflowConfig)}createPrimaryMarker(t,e){var i,s;const n=null===(s=null===(i=this.svgGroups)||void 0===i?void 0:i.scenario3)||void 0===s?void 0:s.group().id(""+e),r=this.styles.pattern.get("marker-down")||{foreground:"0,0 1,0 1,1 0,1",background:"0,0 1,0 1,1 0,1",bgOffset:0};let a=null;return this.isFirstDataPoint(e)&&(a=`${this.i18n.get(t.scenario)||t.scenario}`),new ar(this.position,n,r,t.scenario,this.styles,t,e,a,!0)}createSecondaryMarker(t,e){var i,s;const n=null===(s=null===(i=this.svgGroups)||void 0===i?void 0:i.scenario4)||void 0===s?void 0:s.group().id(""+e),r=this.styles.pattern.get("marker-up")||{foreground:"0,0 1,0 1,1 0,1",background:"0,0 1,0 1,1 0,1",bgOffset:0};let a=null;return this.isLastDataPoint(e)&&(a=`${this.i18n.get(t.scenario)||t.scenario}`),new ar(this.position,n,r,t.scenario,this.styles,t,e,a,!1)}isFirstDataPoint(t){return 0===t}};class cr{constructor(){this._dateFormat={year:"YYYY",quarter:"Q[Q] YYYY",month:"MMM YYYY",locale:"[KW]WW YYYY",day:"DD.MM.YYYY"},this._dateLinkFormat={avg:"Ø[DATE]",interval:"[DATE]..[DATE]",start:".[DATE]",end:"[DATE].",ytd:"_[DATE]",ytg:"[DATE]_",cum:"[DATE]_[DATE]",mat:"~[DATE]",none:"[DATE]"},this._scenarioMap=new Map,this._fallBackScenario={name:"Series",group:"Series",colorIndex:10,sortIndex:120},this.createScenarioMapEntry("ac","AC",10,400),this.createScenarioMapEntry("fc","FC",30,300),this.createScenarioMapEntry("pl","PL",50,200),this.createScenarioMapEntry("bu","BU",50,200),this.createScenarioMapEntry("pp","PP",20,100),this.createScenarioMapEntry("py","PY",20,100),this.createScenarioMapEntry("dac","dAC",10,1400),this.createScenarioMapEntry("dfc","dFC",30,1300),this.createScenarioMapEntry("dpl","dPL",50,1200),this.createScenarioMapEntry("dbu","dBU",50,1200),this.createScenarioMapEntry("dpp","dPP",20,1100),this.createScenarioMapEntry("dpy","dPY",20,1100),this.createScenarioMapEntry("drac","drAC",10,2400),this.createScenarioMapEntry("drfc","drFC",30,2300),this.createScenarioMapEntry("drpl","drPL",50,2200),this.createScenarioMapEntry("drbu","drBU",50,2200),this.createScenarioMapEntry("drpp","drPP",20,2100),this.createScenarioMapEntry("drpy","drPY",20,2100)}createScenarioMapEntry(t,e,i,s){const n=e,r=i;[1,2,3,4].forEach((i=>{this._scenarioMap.set(t+i,{name:e+i,group:n,colorIndex:r,sortIndex:s+10*i})}))}getScenario(t){return this._scenarioMap.has(t)?this._scenarioMap.get(t):this._fallBackScenario}getScenarioGroup(t){return this._scenarioMap.has(t)?this._scenarioMap.get(t).name:this._fallBackScenario.name}getScenarioColorIndex(t){return this._scenarioMap.has(t)?this._scenarioMap.get(t).colorIndex:this._fallBackScenario.colorIndex}getScenarioSorIndex(t){const e=this.normalizeVarianceScenario(t);return this._scenarioMap.has(e)?this._scenarioMap.get(e).sortIndex:this._fallBackScenario.sortIndex}normalizeVarianceScenario(t){if(null==t)return"";const e=new Ot(t);return e.isValid?e.type+e.delta:t}}class ur{constructor(t,e,i){this.dataModel=[],this.variancesDataModel=[],this.title="",this.smallestDataPointValue=new Vn(0,Kn.AC1,1,Kn.NEU),this.highestDataPointValue=new Vn(0,Kn.AC1,1,Kn.NEU),this.smallestVarianceDataPointValue=new Vn(0,Kn.AC1,1,Kn.NEU),this.highestVarianceDataPointValue=new Vn(0,Kn.AC1,1,Kn.NEU),this.pixelPerUnit=1,this.pixelPerPercentage=1,this.hideCategories=!1,this.axisScenario=Kn.AC1,this.CSS_CATEGORIES="categories",this.preparedDataSet=[],this.state=Dn.DIRTY,this.titleLength=0,this.leftSideOffsetForHorizontalSync=0,this.limit=0,this.measureScale=new Gn,this.measureUnit="",this.dataFormatDigits={percent:2,decimal:1},this.stackConfig=null,this.overflowConfig=null,this.highestStackedTotal=0,this.initSQLFunctions(),this.ruleSet=t||new cr,this.i18n=this.createI18n(new Map),this.styles=i,this.setConfig(e),this.position=this.createElementPosition()}updatePosition(){this.position=this.createElementPosition()}createElementPosition(){this.titleLength=this.calculateTitleLength(0);let t=this.calculateLeftSideWidth(this.getVarianceType());const e=this.calculateCategoryWidth();return this.titleLength>t&&(t=this.titleLength),new kn(new Mn(this.styles.padding),this.styles.scaleFactors,this.styles.fontStyles.size,this.dataModel.length,this.leftSideOffsetForHorizontalSync,this.titleLength,t,e)}initSQLFunctions(){Yt.fn.transformOperator=function(t){return"-"===t?-1:1}}setStyles(t){this.styles=t}setConfig(t){var e;this.state=Dn.DIRTY,this.sortScenariosbyVisualisationRules(t),this.hideCategories=t.hideCategories||!1,this.limit=t.limit,this.pixelPerUnit=t.pixelPerUnit||1,this.pixelPerPercentage=t.pixelPerPercentage||100,this.setData([...t.data],t.filter),this.dataModel=this.populateModel(t.scenarios,t.level,t.sortOrder),t.stackConfig&&t.stackConfig.by!==k.SCENARIOS&&this.populateDimensionStackSegments(t.scenarios,t.stackConfig,t.level),this.variancesDataModel=this.populateVarianceModel(t.variances,this.dataModel),this.title=t.title||Mt.translateScenarioLabel(null===(e=null==t?void 0:t.variances)||void 0===e?void 0:e.toString(),this.i18n),this.smallestDataPointValue=this.findSmallestDataPointValue(this.dataModel),this.smallestVarianceDataPointValue=this.findSmallestDataPointValue(this.variancesDataModel),this.highestDataPointValue=this.findHighestDataPointValue(this.dataModel),this.highestVarianceDataPointValue=this.findHighestDataPointValue(this.variancesDataModel),this.axisScenario=this.setAxisScenario(t.variances),this.measureScale=t.measureScale,this.measureUnit=t.measureUnit,this.dataFormatDigits=t.dataFormatDigits,this.stackConfig=t.stackConfig,this.highestStackedTotal=this.findHighestStackedRowTotal(this.dataModel),this.updatePosition()}sortScenariosbyVisualisationRules(t){const e=this;t.scenarios.sort(((t,i)=>e.ruleSet.getScenarioSorIndex(t)-e.ruleSet.getScenarioSorIndex(i))).reverse()}setI18n(t){this.i18n=this.createI18n(t)}createI18n(t){this.state=Dn.DIRTY;const e=new Map([["SEPERATOR_WS",", "],["in","in"],["ORDER_asc","↑"],["ORDER_desc","↓"],["ac1","AC"],["pp1","PY"],["fc1","FC"],["pl1","PL"],["ac2","AC2"],["pp2","PY2"],["fc2","FC2"],["pl2","PL2"],["ac3","AC3"],["pp3","PY3"],["fc3","FC3"],["pl3","PL3"],["ac4","AC4"],["pp4","PY4"],["fc4","FC4"],["pl4","PL4"],["category"," "],["operation"," "],["there_of","davon"],["part_of","in % von"],["ibcssymbol_delta_ac","Δ{%}"],["ibcssymbol_delta_generic","Δ({%})"],["ibcssymbol_delta_ac_relative","Δ{%}%"],["ibcssymbol_delta_generic_relative","Δ({%})%"],["SUM_TOTAL","❖"]]);return new Map([...e,...t])}setData(t,e){if(null!=t)if(this.state=Dn.DIRTY,this.preparedDataSet.length=0,null!=e&&e.length>0)try{this.preparedDataSet=Yt(`SELECT * FROM ? WHERE ${e}`,[t])}catch(i){console.error("StructureChart: filter query failed, using unfiltered data",e,i),this.preparedDataSet=t}else this.preparedDataSet=t}getMaxBarValue(){var t,e;if(null!=this.stackConfig&&this.highestStackedTotal>0)return this.stackConfig.mode===$.RELATIVE?1:this.highestStackedTotal;const i=this.getVarianceType();return i===Pn.NONE&&null!=(null===(t=this.highestDataPointValue)||void 0===t?void 0:t.value)?Math.abs(this.highestDataPointValue.value):i===Pn.ABSOLUTE&&null!=(null===(e=this.highestVarianceDataPointValue)||void 0===e?void 0:e.value)?Math.abs(this.highestVarianceDataPointValue.value):0}getAllocatedCanvasWidth(){const t=this.position.getAxisPositionX(),e=this.calculateRightSideWidth(this.getVarianceType());let i=t+e+ +this.styles.padding.left+this.styles.padding.right;return e<this.titleLength/2&&(i+=this.titleLength/2),t<this.titleLength/2&&(i+=this.titleLength/2),i}getAllocatedCanvasHeight(){return(this.dataModel.length+1)*this.position.spacings.categoryWidth+this.styles.padding.top+this.styles.padding.bottom}patternToString(){return"<svg></svg>"}toString(){const t=new vn;return this.draw(t),t.id("drawCanvas"),t.width(this.getAllocatedCanvasWidth()),t.height(this.getAllocatedCanvasHeight()),t.svg()}draw(t){this.cleanSVGforRedraw(t),this.state===Dn.DIRTY&&(this.state=Dn.UP_TO_DATE),this.variancesDataModel&&this.variancesDataModel.length>0?(this.drawVarianceScenario(this.variancesDataModel,t),this.drawAxisAndLabels(this.variancesDataModel,t)):null!=this.stackConfig?(this.drawStackedScenarios(this.dataModel,t),this.drawStackedHeaders(this.dataModel,t),this.drawAxisAndLabels(this.dataModel,t)):(this.drawScenarios(this.dataModel,t),this.drawAxisAndLabels(this.dataModel,t))}setPattern(t,e){this.styles.pattern.set(t,e)}calculateTitleLength(t){const e=kt(this.title.length>7?this.title:"_______",{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"}).width;return e<t?t:e/2}getFooter(){return 1===this.measureScale.value&&""===this.measureUnit?" ":Mt.translateScenarioLabel("in",this.i18n)+" "+this.measureScale.prefix+this.measureUnit}setAxisScenario(t){let e=Kn.AC1;if(null!=t&&t.length>0){const i=new Ot(t.toString());i.isValid&&(e=i.delta)}return null===e&&(e=Kn.AC1),e}populateModel(t,e,i){var s;if(0===(null===(s=this.preparedDataSet)||void 0===s?void 0:s.length))return[];const n=[],r=this.createOrderStr(e,i),a=this.createSelectString(e,i),o=this.createGroupByStr(e,i),h=Yt(`SELECT ${a} ${t.length>0?","+t.map((t=>`SUM(${t} * transformOperator(operation)) as ${t}, COUNT(ISNULL(${t})) as ${t}_cnt`)).join(","):""} \n FROM ?\n GROUP BY ${o}\n ORDER BY ${r}`,[this.preparedDataSet]);return this.detectNaNCells(t,h),this.createDataRows(h,n,t),this.crateRESTRow(h,t,n),n}detectNaNCells(t,e){e.forEach((e=>(t.forEach((t=>{const i=new Ot(t);!0===i.isValid?0!==e[i.base+"_cnt"]&&0!==e[i.delta+"_cnt"]||(e[t]=Number.NaN):0===e[t+"_cnt"]&&(e[t]=Number.NaN)})),e)))}crateRESTRow(t,e,i){if(0===this.limit||this.limit>t.length)return;const s=[],n=t.slice(this.limit,t.length);this.createDataRows(n,s,e);const r=s.reduce((function(t,i){return{id:t.id,category:t.category,type:t.type,scenario1:new Vn(t.scenario1.value+i.scenario1.value,e[0],t.scenario1.pixelPerUnit,Kn.NEU),scenario2:new Vn(t.scenario2.value+i.scenario2.value,e[1],t.scenario2.pixelPerUnit,Kn.NEU),scenario3:new Vn(t.scenario3.value+i.scenario3.value,e[2],t.scenario3.pixelPerUnit,Kn.NEU),scenario4:new Vn(t.scenario4.value+i.scenario4.value,e[3],t.scenario4.pixelPerUnit,Kn.NEU)}}),{id:9999,category:"REST",type:Pn.NONE,scenario1:new Vn(0,e[0],this.pixelPerUnit,Kn.NEU),scenario2:new Vn(0,e[1],this.pixelPerUnit,Kn.NEU),scenario3:new Vn(0,e[2],this.pixelPerUnit,Kn.NEU),scenario4:new Vn(0,e[3],this.pixelPerUnit,Kn.NEU)});i.push(r)}createDataRows(t,e,i){let s=t;this.limit>0&&(s=t.slice(0,this.limit)),s.forEach(((t,s)=>{e.push({id:s,category:t.category,type:Pn.NONE,scenario1:new Vn(t[i[0]],i[0],this.pixelPerUnit,Kn.NEU),scenario2:new Vn(t[i[1]],i[1],this.pixelPerUnit,Kn.NEU),scenario3:new Vn(t[i[2]],i[2],this.pixelPerUnit,Kn.NEU),scenario4:new Vn(t[i[3]],i[3],this.pixelPerUnit,Kn.NEU)})}))}createOrderStr(t,e){let i=`${t.toLowerCase()}`;return e.hierarchy.length>=1&&(i=`${e.hierarchy.toString()} ${null==e?void 0:e.direction}`),i}createSelectString(t,e){return t===C.CATEGORY&&e.hierarchy.includes(I.CATEGORYINDEX)?`${I.CATEGORYINDEX}, ${C.CATEGORY} as category`:t===C.ROWGROUP&&e.hierarchy.includes(I.ROWGROUPINDEX)?`${I.ROWGROUPINDEX}, ${C.ROWGROUP} as category`:t===C.SUBCATEGORY&&e.hierarchy.includes(I.SUBCATEGORYINDEX)?`${I.SUBCATEGORYINDEX}, ${C.SUBCATEGORY} as category`:`${t.toString()} as category`}createGroupByStr(t,e){return t===C.CATEGORY&&e.hierarchy.includes(I.CATEGORYINDEX)?`${I.CATEGORYINDEX}, ${C.CATEGORY}`:t===C.ROWGROUP&&e.hierarchy.includes(I.ROWGROUPINDEX)?`${I.ROWGROUPINDEX}, ${C.ROWGROUP}`:t===C.SUBCATEGORY&&e.hierarchy.includes(I.SUBCATEGORYINDEX)?`${I.SUBCATEGORYINDEX}, ${C.SUBCATEGORY}`:`${t.toString()}`}calculateCategoryWidth(){if(this.hideCategories)return 5;let t=0;for(const e of this.dataModel){const i=kt(e.category,{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"});i.width>t&&(t=i.width)}return 1.1125*t}findSmallestDataPointValue(t){let e=new Vn(0,"default",this.pixelPerUnit,null);for(const i of t)for(const t of[i.scenario1,i.scenario2,i.scenario3,i.scenario4])null!=t&&null!=e.value&&t.value<e.value&&(e=t);return e}findHighestDataPointValue(t){let e=new Vn(0,"default",this.pixelPerUnit,null);for(const i of t)for(const t of[i.scenario1,i.scenario2,i.scenario3,i.scenario4])null!=t&&null!=e.value&&t.value>e.value&&(e=t);return e}findHighestStackedRowTotal(t){if(!this.stackConfig||0===t.length)return 0;const e=this.stackConfig.by===k.SCENARIOS;let i=0;for(const s of t){let t=0;if(e){const e=["scenario1","scenario2","scenario3","scenario4"],i=[];for(const t of e){const e=s[t];e&&!e.isEmpty()&&null!=e.value&&i.push({value:e.value,scenario:e.scenario})}if(new Set(i.map((t=>tr(t.scenario)))).size>1){const e=new Map;for(const t of i){const i=tr(t.scenario);e.set(i,(e.get(i)||0)+Math.abs(t.value))}t=Math.max(...e.values())}else t=i.reduce(((t,e)=>t+Math.abs(e.value)),0)}else s.stackSegments&&s.stackSegments.length>0&&(t=s.stackSegments.reduce(((t,e)=>t+Math.abs(e.value)),0));t>i&&(i=t)}return i}populateVarianceModel(t,e){const i=[];if(0===t.length)return i;let s=null;null!=e&&e.length>0&&(s=e[0]);for(const n in t){const r=new Ot(t[n]);if(r.isValid){const t=this.mapScenarios(r,s),n=r.direction;let a=this.pixelPerUnit;"dr"===r.type&&(a=this.pixelPerPercentage);for(const s in e)i.push({id:Number(s),category:e[s].category,type:"dr"===r.type?Pn.RELATIVE:Pn.ABSOLUTE,scenario1:new Vn(this.calculateVariance(r,e[s],t),r.base,a,n),scenario2:new Vn(null,null,null,null),scenario3:new Vn(null,null,null,null),scenario4:new Vn(null,null,null,null)})}}return i}calculateVariance(t,e,i){const s=i.get(t.base),n=i.get(t.delta);return null==s||null==n?null:t.type===Pn.RELATIVE?(e[s].value-e[n].value)/e[n].value:e[s].value-e[n].value}mapScenarios(t,e){const i=new Map;return null==e||["scenario1","scenario2","scenario3","scenario4"].forEach((s=>{e[s].scenario===t.delta?i.set(t.delta,s):e[s].scenario===t.base&&i.set(t.base,s)})),i}calculateTextBoxWidth(t){return kt(Mt.number(t,"decimal",1,0),{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"}).width}calculatePercentageTextBoxWidth(t){let e=0;return t>=0&&(e+=kt("+",{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"}).width),e+=kt(" %",{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"}).width,kt(Mt.number(t,"decimal",1,1),{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"}).width+e+e}cleanSVGforRedraw(t){t.clear()}drawAxisAndLabels(t,e){const i=e.group().id("AxisAndDateLables");let s=!1;this.hideCategories||t.forEach(((t,e)=>{t.type===Pn.RELATIVE&&(s=!0);let n=ir.Right,r=!0;t.scenario1.value<0&&(n=ir.Left,r=!1),new sr(i,this.position.getCategoryPositionX(r),this.position.getBarCenterPositionY(e),"",t.category,this.styles,ir.Center,n).draw()})),new nr({scenarioType:this.axisScenario,labelText:this.title,isRelative:s},this.position,i,this.styles).draw()}drawScenarios(t,e){const i=e.group().id("Scenarios"),s=new lr(this.position,i,this.styles,t.length,this.i18n);s.setOverflowConfig(this.overflowConfig),t.forEach(((t,e)=>{s.createPrimaryBar(t.scenario1,e).draw(this.dataFormatDigits,this.measureScale),s.createSecondaryBar(t.scenario2,e).draw(),s.createPrimaryMarker(t.scenario3,e).draw(),s.createSecondaryMarker(t.scenario4,e).draw()}))}drawVarianceScenario(t,e){const i=e.group().id("Scenarios"),s=new lr(this.position,i,this.styles,t.length,this.i18n);return s.setOverflowConfig(this.overflowConfig),t.forEach(((t,e)=>{t.type===Pn.RELATIVE?s.createRelativeVarianceBar(t.scenario1,e).draw():s.createVarianceBar(t.scenario1,e).draw(this.dataFormatDigits,this.measureScale)})),i}drawStackedScenarios(t,e){if(!this.stackConfig)return;const i=e.group().id("StackedScenarios"),s=this.stackConfig.by===k.SCENARIOS;t.forEach(((t,e)=>{const n=["scenario1","scenario2","scenario3","scenario4"],r=[];if(s)for(const e of n){const i=t[e];i&&!i.isEmpty()&&null!=i.value&&r.push({value:i.value,scenario:i.scenario,dataPoint:i})}else{const e=t.scenario1;e&&!e.isEmpty()&&null!=e.value&&r.push({value:e.value,scenario:e.scenario,dataPoint:e})}if(0!==r.length)if((s?new Set(r.map((t=>tr(t.scenario)))):new Set).size>1){const t=new Map;for(const e of r){const i=tr(e.scenario);t.has(i)||t.set(i,[]),t.get(i).push(e)}const s=[];for(const e of Zn)t.has(e)&&(s.push({prefix:e,segments:t.get(e)}),t.delete(e));for(const[e,i]of t)s.push({prefix:e,segments:i});s.forEach(((t,n)=>{const r=t.segments.reduce(((t,e)=>t+Math.abs(e.value)),0),a=s.length-1-n;let o=0,h=null;t.segments.forEach((t=>{const s=new hr(this.position,this.styles,t.dataPoint,e,o,t.scenario,a,this.stackConfig.mode,r,!0,i);s.draw(this.dataFormatDigits,this.measureScale),o+=Math.abs(t.value),h=s})),h&&h.drawTotalLabel(this.dataFormatDigits,this.measureScale)}))}else{let n=r;!s&&t.stackSegments&&t.stackSegments.length>0&&(n=t.stackSegments.map((t=>({value:t.value,scenario:t.label,dataPoint:t.dataPoint})))),"asc"===this.stackConfig.order?n.sort(((t,e)=>t.value-e.value)):"desc"===this.stackConfig.order&&n.sort(((t,e)=>e.value-t.value));const a=n.reduce(((t,e)=>t+Math.abs(e.value)),0);let o=0,h=null;n.forEach(((t,n)=>{const r=new hr(this.position,this.styles,t.dataPoint,e,o,t.scenario,n,this.stackConfig.mode,a,s,i);r.draw(this.dataFormatDigits,this.measureScale),o+=Math.abs(t.value),h=r})),h&&h.drawTotalLabel(this.dataFormatDigits,this.measureScale)}}))}drawStackedHeaders(t,e){if(!this.stackConfig||0===t.length)return;const i=this.stackConfig.by===k.SCENARIOS,s=e.group().id("StackedHeaders"),n=t[0];if(!i){const t=n.stackSegments;if(!t||0===t.length)return;const e=[...t];"asc"===this.stackConfig.order?e.sort(((t,e)=>t.value-e.value)):"desc"===this.stackConfig.order&&e.sort(((t,e)=>e.value-t.value));const i=e.reduce(((t,e)=>t+Math.abs(e.value)),0),r=this.position.getBarPositionX(),a=this.position.getAxisTitlePositionY();let o=0;return void e.forEach((t=>{const e=t.dataPoint.pixelPerUnit;let n;n=this.stackConfig.mode===$.RELATIVE?(0!==i?Math.abs(t.value)/i:0)*e:Math.abs(t.value*e);const h=r+o+n/2,l=this.i18n.get(t.label)||t.label;new sr(s,h,a,"STACK_HEADER",l,this.styles,ir.Bottom,ir.Center).draw(),o+=n}))}const r=["scenario1","scenario2","scenario3","scenario4"],a=[];for(const t of r){const e=n[t];e&&!e.isEmpty()&&null!=e.value&&a.push({value:e.value,scenario:e.scenario,dataPoint:e})}if(0===a.length)return;const o=new Set(a.map((t=>tr(t.scenario)))),h=this.position.getBarPositionX(),l=this.position.getAxisTitlePositionY();if(o.size>1){const t=new Map;for(const e of a){const i=tr(e.scenario);t.has(i)||t.set(i,[]),t.get(i).push(e)}const e=[];for(const i of Zn)t.has(i)&&(e.push({prefix:i,segments:t.get(i)}),t.delete(i));for(const[i,s]of t)e.push({prefix:i,segments:s});e.forEach((t=>{const e=t.segments.reduce(((t,e)=>t+Math.abs(e.value)),0),i=t.segments[0].dataPoint.pixelPerUnit,n=h+(this.stackConfig.mode===$.RELATIVE?i:e*i)/2,r=this.i18n.get(t.prefix+"1")||t.prefix.toUpperCase();new sr(s,n,l,"STACK_HEADER",r,this.styles,ir.Bottom,ir.Center).draw()}))}else{"asc"===this.stackConfig.order?a.sort(((t,e)=>t.value-e.value)):"desc"===this.stackConfig.order&&a.sort(((t,e)=>e.value-t.value));const t=a.reduce(((t,e)=>t+Math.abs(e.value)),0);let e=0;a.forEach((i=>{const n=i.dataPoint.pixelPerUnit;let r;r=this.stackConfig.mode===$.RELATIVE?(0!==t?Math.abs(i.value)/t:0)*n:Math.abs(i.value*n);const a=h+e+r/2,o=this.i18n.get(i.scenario)||i.scenario;new sr(s,a,l,"STACK_HEADER",o,this.styles,ir.Bottom,ir.Center).draw(),e+=r}))}}getVarianceType(){return this.variancesDataModel.length>0?this.variancesDataModel[0].type:Pn.NONE}calculateLeftSideWidth(t){var e,i,s;let n=0;const r=this.styles.fontStyles.size*this.styles.scaleFactors.labelToBar;if(Pn.NONE===t&&null!=(null===(e=this.smallestDataPointValue)||void 0===e?void 0:e.value)&&this.smallestDataPointValue.value<0){const t=this.calculateTextBoxWidth(this.smallestDataPointValue.value);n=Math.abs(this.smallestDataPointValue.getScaledUnit())+r+t}else if(Pn.RELATIVE===t&&null!=(null===(i=this.smallestVarianceDataPointValue)||void 0===i?void 0:i.value)&&this.smallestVarianceDataPointValue.value<0){const t=this.calculatePercentageTextBoxWidth(this.smallestVarianceDataPointValue.value);n=Math.abs(this.smallestVarianceDataPointValue.getScaledPercentUnit())+r+t}else if(Pn.ABSOLUTE===t&&null!=(null===(s=this.smallestVarianceDataPointValue)||void 0===s?void 0:s.value)&&this.smallestVarianceDataPointValue.value<0){const t=this.calculateTextBoxWidth(this.smallestVarianceDataPointValue.value);n=Math.abs(this.smallestVarianceDataPointValue.getScaledUnit())+r+t}return n<=this.titleLength?this.titleLength:n}calculateRightSideWidth(t){var e,i,s;if(null!=this.stackConfig&&this.highestStackedTotal>0){const t=this.styles.fontStyles.size*this.styles.scaleFactors.labelToBar;let e;e=this.stackConfig.mode===$.RELATIVE?this.pixelPerUnit:this.highestStackedTotal*this.pixelPerUnit;const i=this.calculateTextBoxWidth(this.highestStackedTotal);return Math.max(e+t+i,this.titleLength)}let n=0;const r=this.styles.fontStyles.size*this.styles.scaleFactors.labelToBar;if(Pn.NONE===t&&null!=(null===(e=this.highestDataPointValue)||void 0===e?void 0:e.value)&&this.highestDataPointValue.value>=0){const t=this.calculateTextBoxWidth(this.highestDataPointValue.value);n=Math.abs(this.highestDataPointValue.getScaledUnit())+r+t}else if(Pn.RELATIVE===t&&null!=(null===(i=this.highestVarianceDataPointValue)||void 0===i?void 0:i.value)&&this.highestVarianceDataPointValue.value>=0){const t=this.calculatePercentageTextBoxWidth(this.highestVarianceDataPointValue.value);n=Math.abs(this.highestVarianceDataPointValue.getScaledPercentUnit())+r+t}else if(Pn.ABSOLUTE===t&&null!=(null===(s=this.highestVarianceDataPointValue)||void 0===s?void 0:s.value)&&this.highestVarianceDataPointValue.value>=0){const t=this.calculateTextBoxWidth(this.highestVarianceDataPointValue.value);n=Math.abs(this.highestVarianceDataPointValue.getScaledUnit())+r+t}return n<=this.titleLength?this.titleLength:n}populateDimensionStackSegments(t,e,i){var s;if(0===(null===(s=this.preparedDataSet)||void 0===s?void 0:s.length)||0===t.length)return;const n={[C.ROWGROUP]:"category",[C.ROWGROUPINDEX]:"category",[C.CATEGORY]:"subCategory",[C.CATEGORYINDEX]:"subCategory"}[i];if(!n)return;const r=i.toString(),a=t[0],o=Yt(`SELECT [${r}] as displayGroup, [${n}] as stackLabel, SUM([${a}] * transformOperator(operation)) as stackValue FROM ? GROUP BY [${r}], [${n}]`,[this.preparedDataSet]),h=new Map;for(const t of o){const e=t.displayGroup;h.has(e)||h.set(e,[]),null!=t.stackValue&&null!=t.stackLabel&&h.get(e).push({label:t.stackLabel,value:t.stackValue})}for(const t of this.dataModel){const e=h.get(t.category);t.stackSegments=e&&e.length>0?e.map((t=>({label:t.label,value:t.value,dataPoint:new Vn(t.value,a,this.pixelPerUnit,Kn.NEU)}))):[]}}hasNoData(){return 0===this.dataModel.length}setAvailableWidth(t){if(this.pixelPerUnit<=0||t<=0)this.overflowConfig=null;else if(null==this.stackConfig){if(this.overflowConfig=this.calculateOverflowConfig(t),this.overflowConfig){const{cutWidth:t,overdriveZoneWidth:e,breakGap:i}=this.overflowConfig,s=t+e+i;this.variancesDataModel&&this.variancesDataModel.length>0?(this.highestVarianceDataPointValue.getScaledUnit()>t&&(this.highestVarianceDataPointValue=new Vn(s,this.highestVarianceDataPointValue.scenario,1,this.highestVarianceDataPointValue.variance)),null!=this.smallestVarianceDataPointValue.value&&Math.abs(this.smallestVarianceDataPointValue.getScaledUnit())>t&&(this.smallestVarianceDataPointValue=new Vn(-s,this.smallestVarianceDataPointValue.scenario,1,this.smallestVarianceDataPointValue.variance))):(this.highestDataPointValue.getScaledUnit()>t&&(this.highestDataPointValue=new Vn(s,this.highestDataPointValue.scenario,1,this.highestDataPointValue.variance)),null!=this.smallestDataPointValue.value&&Math.abs(this.smallestDataPointValue.getScaledUnit())>t&&(this.smallestDataPointValue=new Vn(-s,this.smallestDataPointValue.scenario,1,this.smallestDataPointValue.variance))),this.updatePosition()}}else this.overflowConfig=null}calculateOverflowConfig(t){const e=this.variancesDataModel&&this.variancesDataModel.length>0;if(this.getVarianceType()===Pn.RELATIVE)return null;const i=e?this.highestVarianceDataPointValue:this.highestDataPointValue,s=e?this.smallestVarianceDataPointValue:this.smallestDataPointValue,n=i.getScaledUnit(),r=null!=s.value?Math.abs(s.getScaledUnit()):0,a=Math.max(n,r);if(a<=0)return null;const o=this.styles.fontStyles.size,h=o*this.styles.scaleFactors.labelToBar,l=1.5*o,c=.3*o,u=.8*o,f=t-this.position.getAxisPositionX()-this.styles.padding.left-this.styles.padding.right-h-this.calculateTextBoxWidth(i.value||0)-l-c;if(f<=u)return null;const d=f-u;return a<=d?null:{cutWidth:f,overdriveZoneWidth:l,breakGap:c,maxOverflow:a-d,scenarioCutOffset:u}}}class fr{constructor(t=2,e=1){this.percent=t,this.decimal=e}}class dr{adapt(t){const e=new fr;return ot.isNumber(t.percent)&&(e.percent=t.percent),ot.isNumber(t.decimal)&&(e.decimal=t.decimal),e}default(){return new fr}}class pr{constructor(){this.font="16px Arial",this.size=16,this.color="#000000",this.background="#ffffff",this.leading=1.8}}class br{adapt(t){const e=new pr;return ot.isString(t.font)&&(e.font=t.font),ot.isNumber(t.size)&&(e.size=t.size),ot.isString(t.color)&&(e.color=t.color),ot.isString(t.background)&&(e.background=t.background),ot.isNumber(t.leading)&&(e.leading=t.leading),e}default(){return new pr}}class vr{constructor(t,e,i,s){this.ac=t,this.fc=e,this.pp=i,this.pl=s}getSVGStyle(t){return"ac"===t?this.ac:"fc"===t?this.fc:"pp"===t?this.pp:"pl"===t?this.pl:this.ac}}class Er{constructor(t){this.svgStyleAdapter=t}adapt(t){const e=new vr(this.svgStyleAdapter.defaultAC(),this.svgStyleAdapter.defaultFC(),this.svgStyleAdapter.defaultPP(),this.svgStyleAdapter.defaultPL());return ot.isExisting(t.ac)&&(e.ac=this.svgStyleAdapter.adapt(t.ac)),ot.isExisting(t.fc)&&(e.fc=this.svgStyleAdapter.adapt(t.fc)),ot.isExisting(t.pp)&&(e.pp=this.svgStyleAdapter.adapt(t.pp)),ot.isExisting(t.pl)&&(e.pl=this.svgStyleAdapter.adapt(t.pl)),e}default(){return new vr(this.svgStyleAdapter.defaultAC(),this.svgStyleAdapter.defaultFC(),this.svgStyleAdapter.defaultPP(),this.svgStyleAdapter.defaultPL())}}let mr=class{constructor(){this.top=10,this.left=10,this.right=10,this.bottom=10}};class gr{adapt(t){const e=new mr;return ot.isNumber(t.top)&&(e.top=t.top),ot.isNumber(t.left)&&(e.left=t.left),ot.isNumber(t.right)&&(e.right=t.right),ot.isNumber(t.bottom)&&(e.bottom=t.bottom),e}default(){return new mr}}class wr{constructor(t="#000000",e="#000000",i=.1){this.stroke=t,this.fill=e,this.width=i}}class yr{adapt(t){const e=new wr(t.stroke,t.fill,t.width);return ot.isString(t.fillpattern)&&(e.fillpattern=t.fillpattern),ot.isString(t.dasharray)&&(e.dasharray=t.dasharray),e}default(){return new wr("#000000","#000000",.3)}defaultAC(){return new wr("#000000","#000000",.3)}defaultFC(){const t=new wr("#000000","#000000",.3);return t.dasharray="10 5 5 5",t.fillpattern="fc",t}defaultPP(){return new wr("#999999","#999999",.3)}defaultPL(){return new wr("#000000","#ffffff",.3)}defaultPos(){return new wr("#00ff00","#00ff00",.3)}defaultNeg(){return new wr("#ff0000","#ff0000",.3)}defaultNeu(){return new wr("#999999","#999999",.3)}}class Tr{constructor(t,e,i){this.pos=t,this.neg=e,this.neu=i,this.needleHeadColour="#000000"}getSVGStyle(t){return"pos"===t?this.pos:"neg"===t?this.neg:this.neu}}class Sr{constructor(t){this.svgStyleAdapter=t}adapt(t){const e=new Tr(this.svgStyleAdapter.defaultPos(),this.svgStyleAdapter.defaultNeg(),this.svgStyleAdapter.defaultNeu());return ot.isExisting(t.pos)&&(e.pos=this.svgStyleAdapter.adapt(t.pos)),ot.isExisting(t.neg)&&(e.neg=this.svgStyleAdapter.adapt(t.neg)),ot.isExisting(t.pp)&&(e.neu=this.svgStyleAdapter.adapt(t.neu)),ot.isString(t.needleHeadColour)&&(e.needleHeadColour=t.needleHeadColour),e}default(){return new Tr(this.svgStyleAdapter.defaultPos(),this.svgStyleAdapter.defaultNeg(),this.svgStyleAdapter.defaultNeu())}}const Ar=class{constructor(e){t(this,e),this.data=[],this.chartTitle="",this.scenarios=[],this.variances=[],this.hideCategories=!1,this.pixelPerUnit=10,this.pixelPerPercentage=50,this.limit=0,this.i18n=new Map,this.order={hierarchy:[],direction:L.ASC},this.level=C.CATEGORY,this.filter="",this.measureScale="_",this.measureUnit="",this.showMeasureScale=!0,this.dataFormatDigits={percent:2,decimal:1},this.stackConfig=null,this.parentDimensions={width:0,height:0}}render(){var t,s,n;if(void 0===this.chart)return e(i,null);if(this.chart.hasNoData()){const t=this.i18n.get("NO_DATA")||"==No Data==";return e(i,null,e("p",{class:"warning"},t))}return e(i,null,e("div",{innerHTML:null===(t=this.pattern)||void 0===t?void 0:t.toString(),class:"hidePatternContainer"}),e("div",{class:this.showMeasureScale?"footer":"footer-hide"},null===(s=this.chart)||void 0===s?void 0:s.getFooter()),e("div",{innerHTML:null===(n=this.chart)||void 0===n?void 0:n.toString()}))}async componentWillLoad(){var t;const e=this.prepareConfig(),i=this.prepareStyle();this.chart=new ur(new cr,e,i),this.chart.setI18n(this.i18n),this.autoFitScaling(e,i),this.chart.setAvailableWidth((null===(t=this.parentDimensions)||void 0===t?void 0:t.width)||0),this.pattern=new xn(this.chart.styles),this.chart.setPattern("fc",this.pattern.getFCPolygonPattern())}async componentWillUpdate(){var t;if(null==this.chart)return;const e=this.prepareConfig(),i=this.prepareStyle();this.chart.setI18n(this.i18n),this.chart.setStyles(i),this.chart.setConfig(e),this.autoFitScaling(e,i),this.chart.setAvailableWidth((null===(t=this.parentDimensions)||void 0===t?void 0:t.width)||0),this.pattern=new xn(this.chart.styles),this.chart.setPattern("fc",this.pattern.getFCPolygonPattern())}autoFitScaling(t,e){var i;const s=t.pixelPerUnit<=0,n=t.pixelPerPercentage<=0;if(!s&&!n)return;const r=null===(i=this.parentDimensions)||void 0===i?void 0:i.width;if(!r||r<=0)return s&&(t.pixelPerUnit=1),n&&(t.pixelPerPercentage=50),this.chart=new ur(new cr,t,e),void this.chart.setI18n(this.i18n);s&&(t.pixelPerUnit=1),n&&(t.pixelPerPercentage=1),this.chart=new ur(new cr,t,e),this.chart.setI18n(this.i18n),this.chart.toString();const a=this.chart.getAllocatedCanvasWidth();if(a<=0)return;const o=this.chart.getMaxBarValue();s&&(t.pixelPerUnit=o>0?Math.max(.001,(r-(a-o))/o):.9*r/a),n&&(t.pixelPerPercentage=.9*r/a),this.chart=new ur(new cr,t,e),this.chart.setI18n(this.i18n)}async componentWillRender(){}componentDidLoad(){}componentDidUpdate(){}prepareConfig(){return new Hn(new Yn,new ht(new Bn),new Bn,new dr,this.data).adapt({data:this.data,scenarios:this.scenarios,variances:this.variances,title:this.chartTitle,hideCategories:this.hideCategories,pixelPerUnit:this.pixelPerUnit,pixelPerPercentage:this.pixelPerPercentage,level:this.level,limit:this.limit,sortOrder:this.order,filter:this.filter,measureScale:this.measureScale,measureUnit:this.measureUnit,showMeasureScale:this.showMeasureScale,dataFormatDigits:this.dataFormatDigits,stackConfig:this.stackConfig})}prepareStyle(){return new Xn(new Jn,new br,new Er(new yr),new Sr(new yr),new gr).adapt(this.styles)}get element(){return s(this)}};Ar.style=':host{display:inline-block;position:relative;overflow:hidden}.container{display:flex;flex-direction:row}.background-image{display:flex;flex-wrap:wrap;justify-content:flex-end}.categories{text-align:right;font-size:var(--bn-font-size, 1em);font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);color:var(--bn-font-color, black)}.label-bg{fill:var(--bn-font-background, white);opacity:0.7}.label-text{text-align:right;font-size:var(--bn-font-size, 1em);font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);color:var(--bn-font-color, black)}.axis-title{text-align:center;font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);color:var(--bn-font-color, black)}.axis-ac{stroke:black;stroke-width:0.1em}.axis-pp{stroke:grey;stroke-width:0.1em}.axis-fc{stroke:black;stroke-dasharray:2;stroke-width:0.1em}.axis-pl{stroke:white;stroke-width:0.1em;outline-offset:0em;outline:0.1em solid black}canvas{image-rendering:-moz-crisp-edges;image-rendering:-webkit-crisp-edges;image-rendering:pixelated;image-rendering:crisp-edges}.measure{font-weight:bold}span{display:inline-block}.hidePatternContainer{height:0;width:0}div{float:left}.warning{font-size:0.8em;font-style:italic}.footer{margin:0.2em;font-size:0.6em}.footer-hide{margin:0.2em;font-size:0.6em;opacity:0}';class Or{constructor(){this.scenarioOffset=.3,this.scenarioLabelToColumn=.3,this.labelToColumn=.3,this.labelToAxis=.3,this.needleWidth=.3,this.needleHeadWidth=.6,this.columnWidth=2,this.varianceAxisLineWidth=.3,this.axisLineWidth=.1,this.auxiliaryLineWidth=.1,this.scenarioLineWidth=.2,this.markerWidth=.7,this.markerOffset=0,this.categoryWidth=3,this.axisTickLength=.3}}class Rr{adapt(t){const e=new Or;return ot.isNumber(t.scenarioOffset)&&(e.scenarioOffset=t.scenarioOffset),ot.isNumber(t.scenarioLabelToColumn)&&(e.scenarioLabelToColumn=t.scenarioLabelToColumn),ot.isNumber(t.labelToColumn)&&(e.labelToColumn=t.labelToColumn),ot.isNumber(t.labelToAxis)&&(e.labelToAxis=t.labelToAxis),ot.isNumber(t.needleWidth)&&(e.needleWidth=t.needleWidth),ot.isNumber(t.needleHeadWidth)&&(e.needleHeadWidth=t.needleHeadWidth),ot.isNumber(t.columnWidth)&&(e.columnWidth=t.columnWidth),ot.isNumber(t.varianceAxisLineWidth)&&(e.varianceAxisLineWidth=t.varianceAxisLineWidth),ot.isNumber(t.axisLineWidth)&&(e.axisLineWidth=t.axisLineWidth),ot.isNumber(t.auxiliaryLineWidth)&&(e.auxiliaryLineWidth=t.auxiliaryLineWidth),ot.isNumber(t.scenarioLineWidth)&&(e.scenarioLineWidth=t.scenarioLineWidth),ot.isNumber(t.markerWidth)&&(e.markerWidth=t.markerWidth),ot.isNumber(t.markerOffset)&&(e.markerOffset=t.markerOffset),ot.isNumber(t.categoryWidth)&&(e.categoryWidth=t.categoryWidth),ot.isNumber(t.axisTickLength)&&(e.axisTickLength=t.axisTickLength),e}default(){return new Or}}class Nr{constructor(t,e,i,s,n,r,a){this.categoryPosition={x:0,y:0},this.spacings=new Or,this.categoriesBoxOffset={width:0,height:0},this.padding=t,this.scaleFactors=e,this.fontStlye=i,this.dataLabelHeight=this.caluculateDataLabelHeight(),this.axisPosition={x:0,y:0},this.columnValue={min:s,max:n},this.numberOfColumns=r,this.leftSideLabelLength=a,this.calculateSpacings(),this.calculateCategoryPosition(),this.calculateAxisPosition()}caluculateDataLabelHeight(){return 1.1*kt("123456789",{font:this.fontStlye.font,fontSize:this.fontStlye.size+"px"}).height}getColumnCenterPositionX(t){return this.categoryPosition.y+this.spacings.scenarioOffset+t*this.spacings.categoryWidth+this.leftSideLabelLength+.5*this.spacings.columnWidth}getAxisPositionY(t){let e=this.columnValue.max.getScaledUnit();return t&&(e=this.columnValue.max.getScaledPercentUnit()+this.getNeedleWidth()),e+this.dataLabelHeight+this.spacings.labelToAxis+this.padding.top}getAxisPositionX(){return this.padding.left+this.leftSideLabelLength}getColumnPositionX(t,e){return e?this.getColumnCenterPositionX(t):this.getColumnCenterPositionX(t)-this.spacings.scenarioOffset}getColumnPositionY(){return this.columnValue.max.getScaledUnit()+this.dataLabelHeight+this.spacings.labelToColumn+this.padding.top}getNeedlePositionY(){return this.columnValue.max.getScaledPercentUnit()+this.dataLabelHeight+this.spacings.labelToColumn+this.getNeedleWidth()+this.padding.top}getMarkerPositionX(t,e){return e?this.getColumnCenterPositionX(t)-this.spacings.markerOffset-.5*this.getColumnWidth():this.getColumnCenterPositionX(t)+this.spacings.markerOffset+.5*this.getColumnWidth()}getMarkerPositionY(){return this.getColumnPositionY()}getAxisTitlePositionX(t){const e=t.width();return this.axisPosition.x-e}getAxisTitlePositionY(t,e){let i=this.columnValue.max.getScaledUnit();return e&&(i=this.columnValue.max.getScaledPercentUnit()),t?i+this.dataLabelHeight+this.spacings.labelToAxis:i}getColumnDataLabelPositionY(t){const e=this.spacings.labelToColumn;return t<0?this.getColumnPositionY()+Math.abs(t)+e:this.getColumnPositionY()-t-e}getNeedleDataLabelPositionY(t){const e=this.spacings.labelToColumn;return t<0?this.getNeedlePositionY()+Math.abs(t)+e+2*this.getNeedleWidth():this.getNeedlePositionY()-t-e-2*this.getNeedleWidth()}getAxisEndPositionX(){return this.getAxisPositionX()+(this.numberOfColumns+.5)*this.spacings.categoryWidth}getColumnWidth(){return this.spacings.columnWidth}getNeedleWidth(){return this.spacings.needleWidth}getNeedleHeadWidth(){return this.spacings.needleHeadWidth}getScenarioLabelPositionOffsetX(t){return t?.5*this.getColumnWidth()+this.spacings.scenarioLabelToColumn:-(.5*this.getColumnWidth()+this.spacings.scenarioLabelToColumn)}calculateSpacings(){this.spacings={scenarioOffset:this.fontStlye.size*this.scaleFactors.scenarioOffset,scenarioLabelToColumn:this.fontStlye.size*this.scaleFactors.scenarioLabelToColumn,markerOffset:this.fontStlye.size*this.scaleFactors.markerOffset,labelToColumn:this.fontStlye.size*this.scaleFactors.labelToColumn,labelToAxis:this.fontStlye.size*this.scaleFactors.labelToAxis,needleWidth:this.fontStlye.size*this.scaleFactors.needleWidth,needleHeadWidth:this.fontStlye.size*this.scaleFactors.needleHeadWidth,columnWidth:this.fontStlye.size*this.scaleFactors.columnWidth,varianceAxisLineWidth:this.fontStlye.size*this.scaleFactors.varianceAxisLineWidth,axisLineWidth:this.fontStlye.size*this.scaleFactors.axisLineWidth,auxiliaryLineWidth:this.fontStlye.size*this.scaleFactors.auxiliaryLineWidth,scenarioLineWidth:this.fontStlye.size*this.scaleFactors.scenarioLineWidth,markerWidth:this.fontStlye.size*this.scaleFactors.markerWidth,categoryWidth:this.fontStlye.size*this.scaleFactors.categoryWidth,axisTickLength:this.fontStlye.size*this.scaleFactors.axisTickLength}}calculateCategoryPosition(){this.categoryPosition={x:this.padding.left+.5*this.spacings.columnWidth,y:this.padding.top}}calculateAxisPosition(){this.axisPosition={x:this.getAxisPositionX(),y:this.getAxisPositionY(!1)}}getMarkerScenarioLabelPositionOffsetX(t){return t?this.spacings.labelToColumn-this.fontStlye.size:this.spacings.labelToColumn+.5*this.spacings.markerWidth}}class _r{constructor(t){this.top=t.top,this.bottom=t.bottom,this.left=t.left,this.right=t.right}addBoxTopLeft(t){return this.top+=t.height|this.top,this.left+=t.width|this.top,this}}class Cr{constructor(t){const e=1*t,i=.7*t;this.bgOffset=(e-i)/2,this.markerUp={top:i/2+",0",left:"0,"+i,right:i+","+i},this.markerUpBackground={top:e/2+",0",left:"0,"+e,right:e+","+e},this.markerDown={bottom:i/2+","+i,left:"0,0",right:i+",0"},this.markerDownBackground={bottom:e/2+","+e,left:"0,0",right:e+",0"},this.markerRight={bottom:"0,"+i,top:"0,0",right:i+","+i/2},this.markerRightBackground={bottom:"0,"+e,top:"0,0",right:e+","+e/2},this.markerLeft={bottom:i+","+i,top:i+",0",left:"0,"+i/2},this.markerLeftBackground={bottom:e+","+e,top:e+",0",Left:"0,"+e/2}}upMarkerPatternStrings(){return{background:this.markerUpBackground.left+" "+this.markerUpBackground.right+" "+this.markerUpBackground.top+" "+this.markerUpBackground.left,foreground:this.markerUp.left+" "+this.markerUp.right+" "+this.markerUp.top+" "+this.markerUp.left,bgOffset:this.bgOffset}}downMarkerPatternStrings(){return{background:this.markerDownBackground.left+" "+this.markerDownBackground.right+" "+this.markerDownBackground.bottom+" "+this.markerDownBackground.left,foreground:this.markerDown.left+" "+this.markerDown.right+" "+this.markerDown.bottom+" "+this.markerDown.left,bgOffset:this.bgOffset}}rightMarkerPatternStrings(){return{background:this.markerRightBackground.top+" "+this.markerRightBackground.right+" "+this.markerRightBackground.bottom+" "+this.markerRightBackground.top,foreground:this.markerRight.top+" "+this.markerRight.right+" "+this.markerRight.bottom+" "+this.markerRight.top,bgOffset:this.bgOffset}}leftMarkerPatternStrings(){return{background:this.markerLeftBackground.top+" "+this.markerLeftBackground.Left+" "+this.markerLeftBackground.bottom+" "+this.markerLeftBackground.top,foreground:this.markerLeft.top+" "+this.markerLeft.left+" "+this.markerLeft.bottom+" "+this.markerLeft.top,bgOffset:this.bgOffset}}createPatternMapForStructureBar(){const t=new Map;return t.set("marker-up",this.upMarkerPatternStrings()),t.set("marker-down",this.downMarkerPatternStrings()),t.set("marker-right",this.rightMarkerPatternStrings()),t.set("marker-left",this.leftMarkerPatternStrings()),t}}class Lr{constructor(t){this.container=new vn,this.pattern=this.createFCPattern(this.container.group(),t),this.styles=t;let e=10;null!=t&&null!=t.fontStyles&&t.fontStyles.size&&(e=t.fontStyles.size),this.bgOffset=(1*e-.7*e)/2}createFCPattern(t,e){const i=e;return t.pattern(10,10,(function(t){t.rect(10,10).fill(i.barStyles.fc.fill),t.line(0,5,5,0).stroke({width:i.barStyles.fc.width,color:i.barStyles.fc.stroke,linecap:"square"}),t.line(5,10,10,5).stroke({width:i.barStyles.fc.width,color:i.barStyles.fc.stroke,linecap:"square"})})).id("pattern-time-fc")}getFCPolygonPattern(){return{background:"",foreground:"",bgOffset:0,pattern:this.pattern}}toString(){return this.container.svg()}}var Ir;!function(t){t[t.Left=0]="Left",t[t.Center=1]="Center",t[t.Right=2]="Right",t[t.Top=3]="Top",t[t.Bottom=4]="Bottom"}(Ir||(Ir={}));class kr{constructor(t,e,i,s,n,r,a,o){this.ID_SCENARIOLABEL="Label",this.CSS_CATEGORIES="categories",this.isRelativeLabel=!1,this.segmentFillColor=null,this.x=e,this.y=i,this.value=n,this.group=t.group().id(this.createElementID(t.toString(),s)),this.styles=r,this.isVarianceLabel=!1,this.verticalHookLocation=a||Ir.Top,this.horizontalHookLocation=o||Ir.Left}setToVarianceLabel(){return this.isVarianceLabel=!0,this}setToRelativeVarianceLabel(){return this.isVarianceLabel=!0,this.isRelativeLabel=!0,this}setSegmentFill(t){return this.segmentFillColor=t,this}updateGroup(t){return this.group=t,this}draw(t=!0,e={percent:2,decimal:1},i=new Gn){if(this.isEmpty())return this;const s=this.group;let n,r="";if(!1===Number.isNaN(Number(this.value))){let t="percent",s=e.percent,a=e.percent,o=1;!1===this.isRelativeLabel&&(s=e.decimal,a=e.decimal,o=i.value,t="decimal"),n=Mt.number(Number(this.value),t,s,a,o),this.isVarianceLabel&&Number(this.value)>=0&&(r="+")}else n=""+this.value;const a=this.drawLabel(s,r+n);return!1===t&&(a.addClass("hide"),s.addClass("hide")),this}isEmpty(){return null==this.value||""===this.value}setPos(t,e){return this.x=t,this.y=e,this}forceStringTypeDraw(){return this.drawLabel(this.group,""+this.value),this}drawLabel(t,e){const i=this.styles.fontStyles.background||"#ffffff";let s="start";const n=t.text(e);n.move(this.x,this.y);const r=n.bbox().w,a=n.bbox().h;let o=0,h=0;const l=n.x();let c=n.y();return this.horizontalHookLocation===Ir.Left?(s="left",o=n.x()):this.horizontalHookLocation===Ir.Center?(s="middle",o=n.x()-(r+2)/2):this.horizontalHookLocation===Ir.Right&&(s="end",o=n.x()-r),this.verticalHookLocation===Ir.Center?(c=n.y()-1.2*a/2,h=c+.2*a):this.verticalHookLocation===Ir.Top?(c-=a/4,h=c+.2*a):this.verticalHookLocation===Ir.Bottom&&(c-=a,h=c+.2*a),n.move(l,c),n.font({anchor:s}),null!=this.segmentFillColor?n.fill(er(this.segmentFillColor)):t.rect(r+2,.8*a).stroke(i).fill(i).opacity(.9).move(o-1,h).insertBefore(n),n}createElementID(t,e){return t+"_"+e+"_"+this.ID_SCENARIOLABEL}}const Mr={ac:1,pp:2,fc:3,pl:4};var $r,xr,Dr;!function(t){t[t.Above=0]="Above",t[t.Below=1]="Below",t[t.Left=2]="Left",t[t.Right=3]="Right"}($r||($r={}));class Pr{constructor(){this.labels=[],this.scenarioLabels=[]}clear(){this.labels=[],this.scenarioLabels=[]}register(t){this.labels.push(t)}hasCollision(t){return this.labels.some((e=>this.intersects(t,e)))}getOptimalPlacement(t,e,i,s,n,r,a,o){const h=Mr[a]||99,l=r/2;for(const r of o){const a=this.calculatePlacementForDirection(t,e,i,s,n,l,8,r);if(!this.hasCollision(a.bounds))return a}for(const r of o){const a=this.calculatePlacementForDirection(t,e,i,s,n,l,8,r);if(!this.collidesWithHigherPriority(a.bounds,h))return a}return null}calculatePlacementForDirection(t,e,i,s,n,r,a,o){let h,l,c,u,f,d;switch(o){case $r.Above:h=t,l=e-r-a,c=Ir.Bottom,u=Ir.Center,f=t-i/2,d=e-r-a-s;break;case $r.Below:h=t,l=e+r+a,c=Ir.Top,u=Ir.Center,f=t-i/2,d=e+r+a-s/4;break;case $r.Left:h=t-r-a,l=e,c=Ir.Center,u=Ir.Right,f=t-r-a-i,d=e-.6*s;break;case $r.Right:h=t+r+a,l=e,c=Ir.Center,u=Ir.Left,f=t+r+a,d=e-.6*s}return{labelX:h,labelY:l,verticalHook:c,horizontalHook:u,bounds:{x:f,y:d,width:i,height:s,pointIndex:n,preferredHook:c}}}collidesWithHigherPriority(t,e){return this.labels.some((i=>!!i.scenarioType&&((Mr[i.scenarioType]||99)<e&&this.intersects(t,i))))}shouldHideScenarioLabel(t,e,i,s=20){const n=Mr[i]||99;return!(n<=1)&&this.scenarioLabels.some((i=>{if((Mr[i.scenarioType]||99)>=n)return!1;const r=Math.abs(e-i.y),a=Math.abs(t-i.x);return r<s&&a<s}))}registerScenarioLabel(t,e,i){this.scenarioLabels.push({x:t,y:e,scenarioType:i})}intersects(t,e){return!(t.x+t.width<e.x||e.x+e.width<t.x||t.y+t.height<e.y||e.y+e.height<t.y)}getLabelCount(){return this.labels.length}}class Ur{constructor(t,e,i,s){this.value=t,this.scenario=e,this.pixelPerUnit=i||1,this.variance="neg"===s||s===xr.NEG?xr.NEG:"pos"===s||s===xr.POS?xr.POS:xr.NEU}isEmpty(){return void 0===this.value||null==this.scenario}getScaledUnit(){return null==this.value?0:this.value*this.pixelPerUnit}getScaledPercentUnit(){return null==this.value?0:this.value>1.45?1.45*this.pixelPerUnit:this.value<-1.45?-1.45*this.pixelPerUnit:this.value*this.pixelPerUnit}getVarianceStyle(){return null==this.value||this.value>=0?this.variance:xr.NEU===this.variance?xr.NEU:xr.POS===this.variance?xr.NEG:xr.POS}isClipped(){return null!=this.value&&Math.abs(this.value)>1.45}getClippedValue(){return 145}getScenario(){var t;return null===(t=this.scenario)||void 0===t?void 0:t.slice(0,2)}}class Gr{constructor(){this.operation="+"}addRowGroup(t,e){this.rowGroup=t,this.rowGroupIndex=e}addCategory(t,e){this.category=t,this.categoryIndex=e}addSubCategory(t,e){this.subCategory=t,this.subCategoryIndex=e}addColumnGroup(t,e){this.columnGroup=t,this.columnGroupIndex=e}addSubColumnGroup(t,e){this.columnSubGroup=t,this.columnSubGroupIndex=e}}class Fr{constructor(){}adapt(t){const e=new Gr;return ot.isString(t.date)&&(e.date=this.parseDateString(t.date)),ot.isOperator(t.operation)&&(e.operation=t.operation),ot.isNumber(t.rowGroupIndex)&&ot.isString(t.rowGroup)&&e.addRowGroup(t.rowGroup,t.rowGroupIndex),ot.isNumber(t.categoryIndex)&&ot.isString(t.category)&&e.addCategory(t.category,t.categoryIndex),ot.isNumber(t.subCategoryIndex)&&ot.isString(t.subCategory)&&e.addSubCategory(t.subCategory,t.subCategoryIndex),ot.isNumber(t.columnGroupIndex)&&ot.isString(t.columnGroup)&&e.addColumnGroup(t.columnGroup,t.columnGroupIndex),ot.isNumber(t.columnSubGroupIndex)&&ot.isString(t.columnSubGroup)&&e.addSubColumnGroup(t.columnSubGroup,t.columnSubGroupIndex),this.setActualValues(t,e),this.setPlanValues(t,e),this.setPreviousPeriodValues(t,e),this.setForecastValues(t,e),e}parseDateString(t){const e=rt.fromISO(t);if(e.isValid)return e;console.warn(`TimeChartDataRow: invalid date value '${t}' — skipping row`)}default(){return new Gr}setActualValues(t,e){ot.isNumber(t.ac1)&&(e.ac1=t.ac1),ot.isNumber(t.ac2)&&(e.ac2=t.ac2),ot.isNumber(t.ac3)&&(e.ac3=t.ac3),ot.isNumber(t.ac4)&&(e.ac4=t.ac4)}setPlanValues(t,e){ot.isNumber(t.pl1)&&(e.pl1=t.pl1),ot.isNumber(t.pl2)&&(e.pl2=t.pl2),ot.isNumber(t.pl3)&&(e.pl3=t.pl3),ot.isNumber(t.pl4)&&(e.pl4=t.pl4)}setPreviousPeriodValues(t,e){ot.isNumber(t.pp1)&&(e.pp1=t.pp1),ot.isNumber(t.pp2)&&(e.pp2=t.pp2),ot.isNumber(t.pp3)&&(e.pp3=t.pp3),ot.isNumber(t.pp4)&&(e.pp4=t.pp4)}setForecastValues(t,e){ot.isNumber(t.fc1)&&(e.fc1=t.fc1),ot.isNumber(t.fc2)&&(e.fc2=t.fc2),ot.isNumber(t.fc3)&&(e.fc3=t.fc3),ot.isNumber(t.fc4)&&(e.fc4=t.fc4)}}class Br{constructor(t,e,i,s,n,r){this.scaleFactors=t,this.fontStyles=e,this.axisStyles=i,this.barStyles=s,this.varianceStyles=n,this.padding=r,this.pattern=new Map,this.stackColors=["#000000","#c0c0c0","#808080"]}}class jr{constructor(t,e,i,s,n){this.scaleFactorsStructureChartAdapter=t,this.fontStyleAdapter=e,this.svgStyleGroupAdapter=i,this.svgVariancesStyleGroupAdapter=s,this.paddingadapter=n}adapt(t){const e=new Br(this.scaleFactorsStructureChartAdapter.default(),this.fontStyleAdapter.default(),this.svgStyleGroupAdapter.default(),this.svgStyleGroupAdapter.default(),this.svgVariancesStyleGroupAdapter.default(),this.paddingadapter.default());return ot.isExisting(t)&&(ot.isExisting(t.scaleFactors)&&(e.scaleFactors=this.scaleFactorsStructureChartAdapter.adapt(t.scaleFactors)),ot.isExisting(t.fontStyles)&&(e.fontStyles=this.fontStyleAdapter.adapt(t.fontStyles)),ot.isExisting(t.axisStyles)&&(e.axisStyles=this.svgStyleGroupAdapter.adapt(t.axisStyles)),ot.isExisting(t.barStyles)&&(e.barStyles=this.svgStyleGroupAdapter.adapt(t.barStyles)),ot.isExisting(t.varianceStyles)&&(e.varianceStyles=this.svgVariancesStyleGroupAdapter.adapt(t.varianceStyles)),ot.isExisting(t.padding)&&(e.padding=this.paddingadapter.adapt(t.padding)),Array.isArray(t.stackColors)&&t.stackColors.length>0&&(e.stackColors=t.stackColors),e.pattern=new Cr(e.fontStyles.size).createPatternMapForStructureBar()),e}default(){return new Br(this.scaleFactorsStructureChartAdapter.default(),this.fontStyleAdapter.default(),this.svgStyleGroupAdapter.default(),this.svgStyleGroupAdapter.default(),this.svgVariancesStyleGroupAdapter.default(),this.paddingadapter.default())}}!function(t){t.AC1="ac1",t.PP1="pp1",t.FC1="fc1",t.PL1="pl1",t.AC2="ac2",t.PP2="pp2",t.FC2="fc2",t.PL2="pl2",t.AC3="ac3",t.PP3="pp3",t.FC3="fc3",t.PL3="pl3",t.AC4="ac4",t.PP4="pp4",t.FC4="fc4",t.PL4="pl4",t.POS="pos",t.NEG="neg",t.NEU="neu"}(xr||(xr={})),function(t){t.LIST="LIST",t.SUM="SUM",t.OPT="OPT"}(Dr||(Dr={}));class Hr{constructor(t,e,i){this.ID_AXIS="axis",this.CSS_AXIS_TITLE="categories",this.scenarioType=t.scenarioType,this.labelText=t.labelText||null,this.isRelative=t.isRelative||!1,this.position=e,this.svgGroup=i.group().id(this.ID_AXIS)}drawAxisTitle(t,e){null==e&&(e=""),t.text(e).addClass(this.CSS_AXIS_TITLE).attr("text-anchor","middle").move(this.position.getAxisTitlePositionX(t),this.position.getAxisTitlePositionY(!0,this.isRelative))}draw(){return this.labelText&&this.drawAxisTitle(this.svgGroup,this.labelText),this.svgGroup.line(this.position.getAxisPositionX(),this.position.getAxisPositionY(this.isRelative),this.position.getAxisEndPositionX(),this.position.getAxisPositionY(this.isRelative)).addClass(this.ID_AXIS+"-"+this.convertScenarioType()),this}convertScenarioType(){return void 0===this.scenarioType||null==this.scenarioType?"default":`${this.scenarioType}`.slice(0,2)}}class Vr{constructor(t,e,i,s,n,r,a,o=null){this.ID_DATA_PREFIX="DATA",this.ID_SCENARIO_PREFIX="SCENARIO",this.ID_RECT="RECT",this.FALLBACK_COLOUR="#000000",this.label=null,this.scenarioLabel=null,this.isVarianceColumn=!1,this.overflowConfig=null,this.isOverflowing=!1,this.overdriveHeight=0,this.dimensions={columnLength:0,xPos:0,yPos:0,labelYPos:0,scenarioLabelXPos:0,scenarioLabelYPos:0,clipped:!1},this.hasData=!1,this.dataPoint=i,this.index=s,this.isPrimaryColumn=n,this.position=t,this.columnBarStyles=e.barStyles,this.overflowConfig=o,this.scenarioGroup=r,this.styles=e,this.columnGroup=r.group().id(r.toString()+"_"+this.ID_RECT),!0!==(null==i?void 0:i.isEmpty())&&(this.hasData=!0,this.dimensions=this.createDimensions(i,s,n),this.label=this.getDataLabel(i),this.scenarioLabel=this.getScenarioLabel(a))}setAsVariance(){var t;return this.isVarianceColumn=!0,null===(t=this.label)||void 0===t||t.setToVarianceLabel(),this}updateLabelGroup(t){var e;return this.isEmpty()||null===(e=this.label)||void 0===e||e.updateGroup(t),this}draw(t={percent:2,decimal:1},e=new Gn){if(this.isEmpty())return this;const i=this.getScenarioStyle(),s=this.convertToSVGStyle(i,"stroke"),n=this.getFillStyle(i);null!=this.columnGroup&&(this.isOverflowing&&this.overflowConfig?this.drawOverdriveBar(n,s):this.columnGroup.rect(this.position.getColumnWidth(),this.dimensions.columnLength).fill(n).stroke(s).y(this.dimensions.yPos).cx(this.dimensions.xPos)),this.drawColumnDataLabel(t,e),this.drawScenarioLabel()}drawOverdriveBar(t,e){if(!this.columnGroup||!this.overflowConfig)return;const i=this.position.getColumnPositionY(),s=this.position.getColumnWidth(),n=this.dimensions.columnLength,{breakGap:r}=this.overflowConfig,a=i-n;this.columnGroup.rect(s,n).fill(t).stroke(e).y(a).cx(this.dimensions.xPos);const o=a-r-this.overdriveHeight;this.columnGroup.rect(s,this.overdriveHeight).fill(t).stroke(e).y(o).cx(this.dimensions.xPos),this.drawBreakIndicator(a,r)}drawBreakIndicator(t,e){if(!this.columnGroup)return;const i=this.position.getColumnWidth(),s=this.dimensions.xPos-i/2,n=t-e/2,r=.35*e,a=i/3;let o=`M ${s} ${n-r}`;for(let t=0;t<3;t++)o+=` L ${s+a*(t+.5)} ${n-r-.3*e} L ${s+a*(t+1)} ${n-r}`;let h=`M ${s} ${n+r}`;for(let t=0;t<3;t++)h+=` L ${s+a*(t+.5)} ${n+r+.3*e} L ${s+a*(t+1)} ${n+r}`;this.columnGroup.rect(i+2,e).fill("#ffffff").stroke("none").y(t-e).cx(this.dimensions.xPos),this.columnGroup.path(o).fill("none").stroke({color:"#000000",width:1}),this.columnGroup.path(h).fill("none").stroke({color:"#000000",width:1})}createDimensions(t,e,i){const s=t.getScaledUnit();if(this.overflowConfig&&s>0){const n="ac"===t.getScenario()?this.overflowConfig.cutHeight:this.overflowConfig.cutHeight-this.overflowConfig.scenarioCutOffset;if(s>n){this.isOverflowing=!0;const{breakGap:t,overdriveZoneHeight:r,maxOverflow:a}=this.overflowConfig;this.overdriveHeight=a>0?(s-n)/a*r:0;const o=n+t+this.overdriveHeight,h=this.position.getColumnPositionY();return{clipped:!1,columnLength:n,xPos:this.position.getColumnPositionX(e,i),yPos:h-n,labelYPos:h-o-this.position.spacings.labelToColumn,scenarioLabelXPos:this.position.getColumnPositionX(e,i)+this.position.getScenarioLabelPositionOffsetX(i),scenarioLabelYPos:h-.5*n}}}return s<0?{clipped:!1,columnLength:Math.abs(s),xPos:this.position.getColumnPositionX(e,i),yPos:this.position.getColumnPositionY(),labelYPos:this.position.getColumnDataLabelPositionY(s),scenarioLabelXPos:this.position.getColumnPositionX(e,i)+this.position.getScenarioLabelPositionOffsetX(i),scenarioLabelYPos:this.position.getColumnPositionY()+.5*Math.abs(s)}:{clipped:!1,columnLength:s,xPos:this.position.getColumnPositionX(e,i),yPos:this.position.getColumnPositionY()-s,labelYPos:this.position.getColumnDataLabelPositionY(s),scenarioLabelXPos:this.position.getColumnPositionX(e,i)+this.position.getScenarioLabelPositionOffsetX(i),scenarioLabelYPos:this.position.getColumnPositionY()-.5*Math.abs(s)}}getDataLabel(t){let e=Ir.Bottom;null!=t.value&&t.value<0&&(e=Ir.Top);const i=this.isOverflowing?this.dimensions.labelYPos:this.position.getColumnDataLabelPositionY(this.dataPoint.getScaledUnit());return new kr(this.scenarioGroup,this.position.getColumnCenterPositionX(this.index),i,this.ID_DATA_PREFIX,t.value,this.styles,e,Ir.Center)}getScenarioLabel(t){return new kr(this.scenarioGroup,-1,-1,this.ID_SCENARIO_PREFIX,t,this.styles,Ir.Center,this.isPrimaryColumn?Ir.Left:Ir.Right)}convertToSVGStyle(t,e){return null==t&&(t=[]),t.color=t[e]||this.FALLBACK_COLOUR,Object.assign({},t)}drawScenarioLabel(){null==this.scenarioLabel||this.scenarioLabel.isEmpty()||this.isVarianceColumn||this.scenarioLabel.setPos(this.dimensions.scenarioLabelXPos,this.dimensions.scenarioLabelYPos).draw(!0)}drawColumnDataLabel(t,e=new Gn){var i;null===(i=this.label)||void 0===i||i.draw(this.isPrimaryColumn,t,e)}getFillStyle(t){var e,i,s,n;const r=this.columnBarStyles[this.dataPoint.getScenario()];return(null==r?void 0:r.fillpattern)&&(null===(e=this.styles.pattern.get(r.fillpattern))||void 0===e?void 0:e.pattern)?null===(n=null===(s=null===(i=this.styles)||void 0===i?void 0:i.pattern)||void 0===s?void 0:s.get(r.fillpattern))||void 0===n?void 0:n.pattern:this.convertToSVGStyle(t,"fill")}getScenarioStyle(){var t;return this.isVarianceColumn?null===(t=this.styles)||void 0===t?void 0:t.varianceStyles.getSVGStyle(this.dataPoint.getVarianceStyle()):this.columnBarStyles[this.dataPoint.getScenario()]}isEmpty(){return!1===this.hasData||Number.isNaN(this.dataPoint.value)}}class qr{constructor(t,e,i,s,n,r,a,o,h){this.ID_DATA_PREFIX="DATA",this.ID_SCENARIO_PREFIX="SCENARIO",this.FALLBACK_COLOUR="#000000",this.scenarioLabel=null,this._defaultMarkerPattern=null,this.dimensions={columnLength:0,xPos:0,yPos:0,labelYPos:0,scenarioLabelXPos:0,scenarioLabelYPos:0,clipped:!1},this.hasData=!1,this.position=t,this.markerGroup=e||null,this.markerPattern=i||this._defaultMarkerPattern,this.styles=n,this.barStyles=n?n.barStyles:null,this.scenario=s,!0!==(null==r?void 0:r.isEmpty())&&(this.hasData=!0,this.dimensions=this.createMarkerDimensions(r,a,h),this.scenarioLabel=this.getScenarioLabel(o,n,h))}draw(){if(this.isEmpty())return this;const t=this.convertToSVGStyle(this.barStyles[this.getScenario()],"stroke");let e=this.convertToSVGStyle(this.barStyles[this.getScenario()],"fill");const i=this.barStyles[this.getScenario()];if(null!=i&&i.fillpattern){const t=this.styles.pattern.get(i.fillpattern);null!=t&&(e=t.pattern)}return this.markerGroup.polygon(this.markerPattern.background).fill("#ffffff").cy(this.dimensions.yPos-this.dimensions.columnLength).cx(this.dimensions.xPos),this.markerGroup.polygon(this.markerPattern.foreground).fill(e).stroke(t).cy(this.dimensions.yPos-this.dimensions.columnLength).cx(this.dimensions.xPos),null==this.scenarioLabel||this.scenarioLabel.isEmpty()||this.scenarioLabel.setPos(this.dimensions.scenarioLabelXPos,this.dimensions.scenarioLabelYPos).draw(),this}createMarkerDimensions(t,e,i){return t.getScaledUnit()<0?{clipped:!1,labelYPos:0,columnLength:t.getScaledUnit(),xPos:this.position.getMarkerPositionX(e,i),yPos:this.position.getMarkerPositionY(),scenarioLabelXPos:this.position.getMarkerPositionX(e,i)+this.position.getMarkerScenarioLabelPositionOffsetX(i),scenarioLabelYPos:this.position.getMarkerPositionY()+Math.abs(t.getScaledUnit())}:{clipped:!1,labelYPos:0,columnLength:t.getScaledUnit(),xPos:this.position.getMarkerPositionX(e,i),yPos:this.position.getMarkerPositionY(),scenarioLabelXPos:this.position.getMarkerPositionX(e,i)+this.position.getMarkerScenarioLabelPositionOffsetX(i),scenarioLabelYPos:this.position.getMarkerPositionY()-Math.abs(t.getScaledUnit())}}getScenarioLabel(t,e,i){return null==this.markerGroup?null:new kr(this.markerGroup,-1,-1,this.ID_DATA_PREFIX,t,e,Ir.Center,i?Ir.Right:Ir.Left)}convertToSVGStyle(t,e){return null==t&&(t=[]),t.color=t[e]||this.FALLBACK_COLOUR,Object.assign({},t)}isEmpty(){return!1===this.hasData}getScenario(){var t;return null===(t=this.scenario)||void 0===t?void 0:t.slice(0,2)}}class Yr{constructor(t,e,i,s,n){this.ID_DATA_PREFIX="DATA",this.ID_SCENARIO_PREFIX="SCENARIO",this.ID_RECT="RECT",this.FALLBACK_COLOUR="#000000",this.dataLabel=null,this.dimensions={columnLength:0,xPos:0,yPos:0,labelYPos:0,scenarioLabelXPos:0,scenarioLabelYPos:0,clipped:!1},this.hasData=!1,this.dataPoint=i,this.index=s,this.position=t,this.barStyles=e.barStyles,this.scenarioGroup=n,this.styles=e,this.barGroup=n.group().id(n.toString()+"_"+this.ID_RECT),!0!==(null==i?void 0:i.isEmpty())&&(this.hasData=!0,this.dimensions=this.createDimensions(t,i,s),this.dataLabel=new kr(this.scenarioGroup,this.position.getColumnCenterPositionX(this.index),this.position.getNeedleDataLabelPositionY(this.dataPoint.getScaledPercentUnit()),this.ID_DATA_PREFIX,i.value,this.styles,Ir.Center,Ir.Center),this.dataLabel.setToRelativeVarianceLabel())}updateLabelGroup(t){var e;return this.isEmpty()||null===(e=this.dataLabel)||void 0===e||e.updateGroup(t),this}draw(){var t;if(this.isEmpty())return this;const e=this.styles.varianceStyles[this.dataPoint.getVarianceStyle()],i=this.convertToSVGStyle(e,"stroke");let s=this.convertToSVGStyle(e,"fill");const n=this.convertToSVGStyle(this.styles.varianceStyles.ac,"stroke"),r=this.convertToSVGStyle(this.styles.varianceStyles.ac,"fill"),a=this.barStyles[this.dataPoint.getScenario()];if(null!=a&&a.fillpattern){const t=this.styles.pattern.get(a.fillpattern);null!=t&&(s=t.pattern)}this.dimensions.clipped?this.createClippedNeedleHead(s,i):this.createNeedleHead(n,r),this.barGroup.rect(this.position.getNeedleWidth(),this.dimensions.columnLength).cx(this.dimensions.xPos).y(this.dimensions.yPos).fill(s).stroke(i),null===(t=this.dataLabel)||void 0===t||t.draw()}createDimensions(t,e,i){return e.getScaledPercentUnit()<0?{labelYPos:0,scenarioLabelXPos:0,scenarioLabelYPos:0,columnLength:Math.abs(e.getScaledPercentUnit()),xPos:t.getColumnCenterPositionX(i),yPos:t.getNeedlePositionY(),clipped:e.isClipped()}:{columnLength:e.getScaledPercentUnit(),xPos:t.getColumnCenterPositionX(i),yPos:t.getNeedlePositionY()-e.getScaledPercentUnit(),labelYPos:0,scenarioLabelXPos:0,scenarioLabelYPos:0,clipped:e.isClipped()}}convertToSVGStyle(t,e){return null==t&&(t=[]),t.color=t[e]||this.FALLBACK_COLOUR,Object.assign({},t)}createClippedNeedleHead(t,e){const i=this.barGroup.polygon("0,0 5,9 -5,9 0,0 0,5 5,13 -5,13 0,5").fill(t).cx(this.dimensions.xPos).cy(this.getHeadYPosition()).fill(t).stroke(e);null!=this.dataPoint.value&&this.dataPoint.value<0&&i.flip("y")}createNeedleHead(t,e){this.barGroup.rect(2*this.position.getNeedleWidth(),this.position.getNeedleHeadWidth()).cx(this.dimensions.xPos).cy(this.getHeadYPosition()).fill(t).stroke(e)}isEmpty(){return!1===this.hasData||Number.isNaN(this.dataPoint.value)}getHeadYPosition(){let t=this.dimensions.yPos;return null!=this.dataPoint.value&&this.dataPoint.value<0&&(t+=this.dimensions.columnLength),t}}const Wr={ac:{markerFill:"#000000",markerStroke:"#000000",lineColor:"#000000"},pp:{markerFill:"#999999",markerStroke:"#999999",lineColor:"#999999"},fc:{markerFill:"#ffffff",markerStroke:"#000000",lineColor:"#000000",lineDashArray:"4,4"},pl:{markerFill:"#ffffff",markerStroke:"#000000",lineColor:"#000000"}};class Xr{constructor(t,e,i,s,n,r,a,o,h=null){this.MARKER_SIZE=8,this.LINE_WIDTH=2,this.ID_LINE_PREFIX="LINE",this.ID_MARKER_PREFIX="MARKER",this.ID_LABEL_PREFIX="LABEL",this.ESTIMATED_LABEL_WIDTH=56,this.ESTIMATED_LABEL_HEIGHT=24,this.position=t,this.styles=e,this.dataPoints=i,this.scenarioGroup=s,this.labelGroup=n,this.scenarioName=r,this.scenarioLabel=a,this.collisionManager=h}draw(t={percent:2,decimal:1},e=new Gn){return this.drawGeometry(),this.drawLabels(t,e),this}drawGeometry(){if(0===this.dataPoints.length)return this;const t=this.getLineStyle();return this.drawLines(t),this.drawMarkers(t),this}drawLabels(t={percent:2,decimal:1},e=new Gn){return 0===this.dataPoints.length||(this.drawScenarioLabel(),this.drawValueLabels(t,e)),this}getLineStyle(){var t,e;const i=(null===(e=null===(t=this.scenarioName)||void 0===t?void 0:t.slice(0,2))||void 0===e?void 0:e.toLowerCase())||"ac";return Wr[i]||Wr.ac}getScenarioVariant(){var t;const e=parseInt((null===(t=this.scenarioName)||void 0===t?void 0:t.slice(-1))||"1",10);return isNaN(e)?1:Math.min(Math.max(e,1),4)}drawSquareMarker(t,e,i,s){const n=this.MARKER_SIZE/2;t.rect(this.MARKER_SIZE,this.MARKER_SIZE).fill(s.markerFill).stroke({color:s.markerStroke,width:1}).move(e-n,i-n)}drawCircleMarker(t,e,i,s){t.circle(this.MARKER_SIZE).fill(s.markerFill).stroke({color:s.markerStroke,width:1}).center(e,i)}drawTriangleMarker(t,e,i,s){const n=this.MARKER_SIZE/2;t.polygon(`${e},${i-n} ${e-n},${i+n} ${e+n},${i+n}`).fill(s.markerFill).stroke({color:s.markerStroke,width:1})}drawDiamondMarker(t,e,i,s){const n=this.MARKER_SIZE/2;t.polygon(`${e},${i-n} ${e+n},${i} ${e},${i+n} ${e-n},${i}`).fill(s.markerFill).stroke({color:s.markerStroke,width:1})}drawLines(t){const e=this.scenarioGroup.group().id(this.ID_LINE_PREFIX);for(let i=1;i<this.dataPoints.length;i++){const s=this.dataPoints[i-1],n=this.dataPoints[i];if(s.dataPoint.isEmpty()||n.dataPoint.isEmpty())continue;const r=this.position.getColumnCenterPositionX(s.index),a=this.position.getColumnPositionY()-s.dataPoint.getScaledUnit(),o=this.position.getColumnCenterPositionX(n.index),h=this.position.getColumnPositionY()-n.dataPoint.getScaledUnit(),l=e.line([[r,a],[o,h]]).stroke({color:t.lineColor,width:this.LINE_WIDTH,linecap:"round"}).fill("none");t.lineDashArray&&l.attr("stroke-dasharray",t.lineDashArray)}}drawMarkers(t){const e=this.scenarioGroup.group().id(this.ID_MARKER_PREFIX),i=this.getScenarioVariant();for(const s of this.dataPoints){if(s.dataPoint.isEmpty())continue;const n=this.position.getColumnCenterPositionX(s.index),r=this.position.getColumnPositionY()-s.dataPoint.getScaledUnit();switch(i){case 2:this.drawCircleMarker(e,n,r,t);break;case 3:this.drawTriangleMarker(e,n,r,t);break;case 4:this.drawDiamondMarker(e,n,r,t);break;default:this.drawSquareMarker(e,n,r,t)}}}getLabelPositionPriority(t){const e=this.dataPoints[t];let i=null;for(let e=t+1;e<this.dataPoints.length;e++)if(!this.dataPoints[e].dataPoint.isEmpty()){i=this.dataPoints[e];break}let s=null;for(let e=t-1;e>=0;e--)if(!this.dataPoints[e].dataPoint.isEmpty()){s=this.dataPoints[e];break}const n=e.dataPoint.getScaledUnit();return s&&i&&s.dataPoint.getScaledUnit()>n&&i.dataPoint.getScaledUnit()>n?[$r.Below,$r.Left,$r.Right,$r.Above]:[$r.Above,$r.Left,$r.Right,$r.Below]}getScenarioType(){var t,e;return(null===(e=null===(t=this.scenarioName)||void 0===t?void 0:t.slice(0,2))||void 0===e?void 0:e.toLowerCase())||"ac"}drawValueLabels(t,e){const i=this.getScenarioType();for(let s=0;s<this.dataPoints.length;s++){const n=this.dataPoints[s];if(n.dataPoint.isEmpty()||null===n.dataPoint.value)continue;const r=this.position.getColumnCenterPositionX(n.index),a=this.position.getColumnPositionY()-n.dataPoint.getScaledUnit();let o=r,h=a-this.MARKER_SIZE/2-2,l=Ir.Bottom,c=Ir.Center;if(this.collisionManager){const t=this.getLabelPositionPriority(s),e=this.collisionManager.getOptimalPlacement(r,a,this.ESTIMATED_LABEL_WIDTH,this.ESTIMATED_LABEL_HEIGHT,n.index,this.MARKER_SIZE,i,t);if(null===e)continue;o=e.labelX,h=e.labelY,l=e.verticalHook,c=e.horizontalHook;const u=Object.assign(Object.assign({},e.bounds),{scenarioType:i});this.collisionManager.register(u)}new kr(this.labelGroup,o,h,this.ID_LABEL_PREFIX,n.dataPoint.value,this.styles,l,c).draw(!0,t,e)}}drawScenarioLabel(){if(!this.scenarioLabel)return;let t=null;for(let e=this.dataPoints.length-1;e>=0;e--)if(!this.dataPoints[e].dataPoint.isEmpty()){t=this.dataPoints[e];break}if(!t)return;const e=this.position.getColumnCenterPositionX(t.index)+this.MARKER_SIZE+4,i=this.position.getColumnPositionY()-t.dataPoint.getScaledUnit(),s=this.getScenarioType();if(this.collisionManager){if(this.collisionManager.shouldHideScenarioLabel(e,i,s))return;this.collisionManager.registerScenarioLabel(e,i,s)}new kr(this.labelGroup,e,i,"SCENARIO_LABEL",this.scenarioLabel,this.styles,Ir.Center,Ir.Left).forceStringTypeDraw()}}class zr{constructor(t,e,i,s,n,r,a,o,h,l,c){this.hasData=!1,this.position=t,this.styles=e,this.dataPoint=i,this.index=s,this.baselineValue=n,this.segmentIndex=a,this.stackMode=o,this.totalValue=h,this.group=c,this.columnGroup=c.group().id(`stacked_col_${s}_seg_${a}`),!0!==(null==i?void 0:i.isEmpty())&&null!=i.value&&(this.hasData=!0)}draw(t={percent:2,decimal:1},e=new Gn){if(!this.hasData||null==this.dataPoint.value)return;const i=this.dataPoint.value,s=this.dataPoint.pixelPerUnit;let n,r;const a=this.position.getColumnPositionY();if(this.stackMode===$.RELATIVE){const t=s;n=(0!==this.totalValue?Math.abs(i)/Math.abs(this.totalValue):0)*t,r=a-this.baselineValue/Math.abs(this.totalValue)*t-n}else n=Math.abs(i*s),r=a-this.baselineValue*s-n;const o=this.position.getColumnCenterPositionX(this.index),h=this.position.getColumnWidth(),l=this.styles.stackColors,c=l[this.segmentIndex%l.length],u={color:c},f={color:c,width:.5};if(this.columnGroup.rect(h,Math.max(n,.5)).fill(u).stroke(f).y(r).cx(o),n>=18){const s=r+n/2;if(this.stackMode===$.RELATIVE||this.stackMode===$.ABSOLUTE_RELATIVE){const e=(0!==this.totalValue?i/this.totalValue*100:0).toFixed(t.percent)+"%";new kr(this.group,o,s,"STACK_SEG",e,this.styles,Ir.Center,Ir.Center).setSegmentFill(c).forceStringTypeDraw()}else new kr(this.group,o,s,"STACK_SEG",i,this.styles,Ir.Center,Ir.Center).setSegmentFill(c).draw(!0,t,e)}}drawTotalLabel(t={percent:2,decimal:1},e=new Gn){if(this.stackMode===$.RELATIVE)return;const i=this.position.getColumnCenterPositionX(this.index),s=this.position.getColumnPositionY();new kr(this.group,i,s-this.totalValue*this.dataPoint.pixelPerUnit-this.position.spacings.labelToColumn,"STACK_TOTAL",this.totalValue,this.styles,Ir.Bottom,Ir.Center).draw(!0,t,e)}}const Jr={ac:{fill:"#000000",opacity:.3,lineColor:"#000000"},pp:{fill:"#999999",opacity:.3,lineColor:"#999999"},fc:{fill:"#000000",opacity:.2,lineColor:"#000000",dashArray:"4,4"},pl:{fill:"#000000",opacity:.1,lineColor:"#000000"}},Kr=[{fill:"#000000",opacity:.3},{fill:"#555555",opacity:.25},{fill:"#999999",opacity:.2},{fill:"#bbbbbb",opacity:.15},{fill:"#dddddd",opacity:.1}];class Qr{constructor(t,e,i,s,n,r){this.group=t.group().id(`area_fill_${n}`),this.upperPoints=e,this.lowerPoints=i,this.scenarioType=s,this.segmentIndex=n,this.isScenarioStack=r}draw(){if(this.upperPoints.length<2||this.lowerPoints.length<2)return;let t,e,i=`M ${this.upperPoints[0].x},${this.upperPoints[0].y}`;for(let t=1;t<this.upperPoints.length;t++)i+=` L ${this.upperPoints[t].x},${this.upperPoints[t].y}`;for(let t=this.lowerPoints.length-1;t>=0;t--)i+=` L ${this.lowerPoints[t].x},${this.lowerPoints[t].y}`;if(i+=" Z",this.isScenarioStack&&this.scenarioType){const i=this.scenarioType.slice(0,2).toLowerCase(),s=Jr[i]||Jr.ac;t=s.fill,e=s.opacity}else{const i=Math.min(this.segmentIndex,Kr.length-1);t=Kr[i].fill,e=Kr[i].opacity}this.group.path(i).fill(t).opacity(e).stroke("none")}drawBoundaryLine(){if(this.upperPoints.length<2)return;let t,e="#000000";if(this.isScenarioStack&&this.scenarioType){const i=this.scenarioType.slice(0,2).toLowerCase(),s=Jr[i]||Jr.ac;e=s.lineColor,t=s.dashArray}const i=this.group.polyline(this.upperPoints.map((t=>[t.x,t.y]))).fill("none").stroke({color:e,width:1.5});t&&i.attr("stroke-dasharray",t)}}class Zr{constructor(t,e,i,s,n,r,a,o){this.ID_DATA_PREFIX="DATA",this.ID_SCENARIO_PREFIX="SCENARIO",this.ID_RECT="RECT",this.FALLBACK_COLOUR="#000000",this.label=null,this.scenarioLabel=null,this.isVarianceLine=!1,this.dimensions={columnLength:0,xPos:0,yPos:0,labelYPos:0,scenarioLabelXPos:0,scenarioLabelYPos:0,clipped:!1},this.previousDimensions={columnLength:0,xPos:0,yPos:0,labelYPos:0,scenarioLabelXPos:0,scenarioLabelYPos:0,clipped:!1},this.hasData=!1,this.dataPoint=i,this.index=n,this.isPrimaryLine=r,this.position=t,this.LineBarStyles=e.barStyles,this.scenarioGroup=a,this.styles=e,this.LineGroup=a.group().id(a.toString()+"_"+this.ID_RECT),!0!==(null==i?void 0:i.isEmpty())&&(this.hasData=!0,this.dimensions=this.createDimensions(i,n,r),this.label=this.getDataLabel(i),this.scenarioLabel=this.getScenarioLabel(o)),this.previousDimensions=this.createDimensions(s,n-1,r)}setAsVariance(){var t;return this.isVarianceLine=!0,null===(t=this.label)||void 0===t||t.setToVarianceLabel(),this}updateLabelGroup(t){var e;return this.isEmpty()||null===(e=this.label)||void 0===e||e.updateGroup(t),this}draw(t={percent:2,decimal:1},e=new Gn){if(this.isEmpty())return this;const i=this.getScenarioStyle(),s=this.getFillStyle(i);null!=this.LineGroup&&this.LineGroup.line([[this.previousDimensions.xPos,this.previousDimensions.yPos],[this.dimensions.xPos,this.dimensions.yPos]]).fill(s).stroke({color:"#f06",width:3,linecap:"round"}),this.drawLineDataLabel(t,e),this.drawScenarioLabel()}createDimensions(t,e,i){return{clipped:!1,columnLength:t.getScaledUnit(),xPos:this.position.getColumnPositionX(e,i),yPos:this.position.getColumnPositionY()-t.getScaledUnit(),labelYPos:this.position.getColumnDataLabelPositionY(t.getScaledUnit()),scenarioLabelXPos:this.position.getColumnPositionX(e,i)+this.position.getScenarioLabelPositionOffsetX(i),scenarioLabelYPos:this.position.getColumnPositionY()-t.getScaledUnit()}}getDataLabel(t){let e=Ir.Bottom;return null!=t.value&&t.value<0&&(e=Ir.Top),new kr(this.scenarioGroup,this.position.getColumnCenterPositionX(this.index),this.position.getColumnDataLabelPositionY(this.dataPoint.getScaledUnit()),this.ID_DATA_PREFIX,t.value,this.styles,e,Ir.Center)}getScenarioLabel(t){return new kr(this.scenarioGroup,0,0,this.ID_SCENARIO_PREFIX,t,this.styles,Ir.Bottom,Ir.Left)}convertToSVGStyle(t,e){return null==t&&(t=[]),t.color=t[e]||this.FALLBACK_COLOUR,Object.assign({},t)}drawScenarioLabel(){null==this.scenarioLabel||this.scenarioLabel.isEmpty()||this.isVarianceLine||this.scenarioLabel.setPos(this.dimensions.scenarioLabelXPos,this.dimensions.scenarioLabelYPos).draw(!0)}drawLineDataLabel(t,e=new Gn){var i;null===(i=this.label)||void 0===i||i.draw(this.isPrimaryLine,t,e)}getFillStyle(t){var e,i,s,n;const r=this.LineBarStyles[this.dataPoint.getScenario()];return(null==r?void 0:r.fillpattern)&&(null===(e=this.styles.pattern.get(r.fillpattern))||void 0===e?void 0:e.pattern)?null===(n=null===(s=null===(i=this.styles)||void 0===i?void 0:i.pattern)||void 0===s?void 0:s.get(r.fillpattern))||void 0===n?void 0:n.pattern:this.convertToSVGStyle(t,"fill")}getScenarioStyle(){var t;return this.isVarianceLine?null===(t=this.styles)||void 0===t?void 0:t.varianceStyles.getSVGStyle(this.dataPoint.getVarianceStyle()):this.LineBarStyles[this.dataPoint.getScenario()]}isEmpty(){return!1===this.hasData||Number.isNaN(this.dataPoint.value)}}class ta{constructor(t,e,i,s,n){this.pixelPerUnit=1,this.collisionManager=null,this.overflowConfig=null,this.i18n=n;const r=e.group().id("Scenario1"),a=e.group().id("Scenario2").insertBefore(r);this.svgGroups={parent:e,scenario1:r,scenario2:a,scenario3:e.group().id("Scenario3"),scenario4:e.group().id("Scenario4"),scenario1Label:e.group().id("label")},this.styles=i,this.position=t,this.elementCnt=s}setOverflowConfig(t){this.overflowConfig=t}createLine(t,e,i,s){const n=this.svgGroups.scenario1.group().id(""+s),r=this.svgGroups.scenario1Label.group().id(""+s);let a=null;return this.isLastDataPoint(s-1)&&(a=t),new Zr(this.position,this.styles,e,i,s,!1,n,a).updateLabelGroup(r)}createPrimaryBar(t,e){const i=this.svgGroups.scenario1.group().id(""+e),s=this.svgGroups.scenario1Label.group().id(""+e);let n=null;return this.isLastDataPoint(e)&&(n=`${this.i18n.get(t.scenario)||t.scenario}`),new Vr(this.position,this.styles,t,e,!0,i,n,this.overflowConfig).updateLabelGroup(s)}createVarianceBar(t,e){const i=this.svgGroups.scenario1.group().id(""+e),s=this.svgGroups.scenario1Label.group().id(""+e);let n=null;return this.isLastDataPoint(e)&&(n=`${this.i18n.get(t.scenario)||t.scenario}`),new Vr(this.position,this.styles,t,e,!0,i,n,this.overflowConfig).updateLabelGroup(s).setAsVariance()}createRelativeVarianceBar(t,e){const i=this.svgGroups.scenario1.group().id(""+e),s=this.svgGroups.scenario1Label.group().id(""+e);return new Yr(this.position,this.styles,t,e,i).updateLabelGroup(s)}createSecondaryBar(t,e){const i=this.svgGroups.scenario2.group().id(""+e);let s=null;return this.isFirstDataPoint(e)&&(s=`${this.i18n.get(t.scenario)||t.scenario}`),new Vr(this.position,this.styles,t,e,!1,i,s,this.overflowConfig)}createPrimaryMarker(t,e){const i=this.svgGroups.scenario3.group().id(""+e),s=this.styles.pattern.get("marker-right")||{foreground:"#000000",background:"#ffffff",bgOffset:0};let n=null;return this.isFirstDataPoint(e)&&(n=`${this.i18n.get(t.scenario)||t.scenario}`),new qr(this.position,i,s,t.scenario,this.styles,t,e,n,!0)}createSecondaryMarker(t,e){const i=this.svgGroups.scenario4.group().id(""+e),s=this.styles.pattern.get("marker-left")||{foreground:"#000000",background:"#ffffff",bgOffset:0};let n=null;return this.isLastDataPoint(e)&&(n=`${this.i18n.get(t.scenario)||t.scenario}`),new qr(this.position,i,s,t.scenario,this.styles,t,e,n,!1)}isLastDataPoint(t){return this.elementCnt-1===t}isFirstDataPoint(t){return 0===t}setCollisionManager(t){this.collisionManager=t}moveLabelsToFront(){this.svgGroups.scenario1Label.front()}createLineSeries(t,e){const i=this.svgGroups.parent.group().id("LineSeries_"+e),s=this.svgGroups.scenario1Label.group().id("LineSeries_Label_"+e),n=`${this.i18n.get(e)||e}`;return new Xr(this.position,this.styles,t,i,s,e,n,this.i18n,this.collisionManager)}}var ea,ia;!function(t){t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.DIRTY=1]="DIRTY"}(ea||(ea={})),function(t){t.RELATIVE="dr",t.ABSOLUTE="d",t.NONE=""}(ia||(ia={}));class sa{constructor(t,e,i,s=0){this.CSS_CATEGORIES="categories",this.dataModel=[],this.variancesDataModel=[],this.title="",this.smallestDataPointValue=new Ur(0,xr.AC1,1,xr.NEU),this.highestDataPointValue=new Ur(0,xr.AC1,1,xr.NEU),this.smallestVarianceDataPointValue=new Ur(0,xr.AC1,1,xr.NEU),this.highestVarianceDataPointValue=new Ur(0,xr.AC1,1,xr.NEU),this.pixelPerUnit=1,this.pixelPerPercentage=1,this.hideAxisLabels=!1,this.axisScenario=xr.AC1,this.preparedDataSet=[],this.axisCategoryArea={width:0,height:0},this.scenariosArea={width:0,height:0},this.state=ea.DIRTY,this.i18n=new Map,this.leftSideOffsetForHorizontalSync=-1,this.dateInterval=P.DAY,this.locale="de",this.axisLabelsMode=U.SMART,this.intervalSpanLimit=32,this.measureScale=new Gn,this.measureUnit="",this.dataFormatDigits={percent:2,decimal:1},this.showOverlayMedian=!1,this.showOverlayAvg=!1,this.chartMode=G.BAR,this.maxBars=28,this.stackConfig=null,this.lineFullWidth=!0,this.availableWidth=0,this.overflowConfig=null,this.lastScenarios=[],this.initSQLFunctions(),this.ruleSet=t||new cr,this.i18n=this.createI18n(new Map),this.styles=i,this.availableWidth=s,this.setConfig(e),this.position=this.createElementPosition(e.scenarios)}updatePosition(t){this.position=this.createElementPosition(t)}initSQLFunctions(){Yt.fn.transformOperator=function(t){return"-"===t?-1:1},Yt.fn.normalizeDate=function(t,e){if(void 0!==t&&t.isValid)return t.startOf(e)}}setStyles(t){this.styles=t}setAvailableWidth(t){this.availableWidth=t}setAvailableHeight(t){this.pixelPerUnit<=0||t<=0?this.overflowConfig=null:null==this.stackConfig&&this.determineEffectiveChartMode()===G.BAR?(this.overflowConfig=this.calculateOverflowConfig(t),this.overflowConfig&&this.updatePosition(this.lastScenarios)):this.overflowConfig=null}calculateOverflowConfig(t){const e=(this.isVarianceChart()?this.highestVarianceDataPointValue:this.highestDataPointValue).getScaledUnit();if(e<=0)return null;const i=this.styles.fontStyles.size,s=1.5*i,n=.3*i,r=t-(this.position.dataLabelHeight+this.position.spacings.labelToColumn+this.position.padding.top+this.position.padding.bottom+this.position.spacings.labelToAxis+i)-s-n,a=.8*i;if(r<=a)return null;const o=r-a;return e<=o?null:{cutHeight:r,overdriveZoneHeight:s,breakGap:n,maxOverflow:e-o,scenarioCutOffset:a}}setConfig(t){var e;this.state=ea.DIRTY,this.sortScenariosbyVisualisationRules(t),this.setData([...t.data],t.filter),this.hideAxisLabels=t.hideAxisLabels||!1,this.pixelPerUnit=t.pixelPerUnit,this.pixelPerPercentage=t.pixelPerPercentage,this.axisLabelsMode=t.axisLabelsMode,this.intervalSpanLimit=t.intervalSpanLimit,this.dateInterval=this.findDateInterval(t.dateInterval),this.dataModel=this.populateModel(t.scenarios,this.dateInterval,t.level,t.sortOrder),this.variancesDataModel=this.populateVarianceModel(t.variances,this.dataModel),this.title=t.title||Mt.translateScenarioLabel(null===(e=null==t?void 0:t.variances)||void 0===e?void 0:e.toString(),this.i18n),this.smallestDataPointValue=this.findSmallestDataPointValue(this.dataModel),this.smallestVarianceDataPointValue=this.findSmallestDataPointValue(this.variancesDataModel),this.highestDataPointValue=this.findHighestDataPointValue(this.dataModel),this.highestVarianceDataPointValue=this.findHighestDataPointValue(this.variancesDataModel),this.axisScenario=this.setAxisScenario(t.variances),this.leftSideOffsetForHorizontalSync=t.leftSideOffsetForHorizontalSync,this.measureScale=t.measureScale,this.measureUnit=t.measureUnit,this.dataFormatDigits=t.dataFormatDigits,this.showOverlayMedian=t.showOverlayMedian,this.showOverlayAvg=t.showOverlayAvg,this.chartMode=t.chartMode,this.maxBars=t.maxBars,this.stackConfig=t.stackConfig,this.lineFullWidth=t.lineFullWidth,this.lastScenarios=t.scenarios,this.updatePosition(t.scenarios)}getFooter(){return 1===this.measureScale.value&&""===this.measureUnit?" ":Mt.translateScenarioLabel("in",this.i18n)+" "+this.measureScale.prefix+this.measureUnit}sortScenariosbyVisualisationRules(t){const e=this;t.scenarios.sort(((t,i)=>e.ruleSet.getScenarioSorIndex(t)-e.ruleSet.getScenarioSorIndex(i))).reverse()}setI18n(t){this.i18n=this.createI18n(t)}setData(t,e){if(null!=t)if(this.state=ea.DIRTY,this.preparedDataSet.length=0,null!=e&&e.length>0)try{this.preparedDataSet=Yt(`SELECT * FROM ? WHERE ${e}`,[t])}catch(i){console.error("TimeChart: filter query failed, using unfiltered data",e,i),this.preparedDataSet=t}else this.preparedDataSet=t}getAllocatedCanvasWidth(){const t=this.position.getAxisEndPositionX(),e=3*this.styles.fontStyles.size,i=Math.max(this.axisCategoryArea.width,this.scenariosArea.width);return Math.max(t+e,i>0?i+this.position.leftSideLabelLength:0)}getAllocatedCanvasHeight(){if(null==this.smallestVarianceDataPointValue.value||null==this.highestVarianceDataPointValue.value||null==this.smallestDataPointValue.value||null==this.highestDataPointValue.value)return 0;const t=this.isVarianceChart()&&this.variancesDataModel.some((t=>t.type===ia.RELATIVE)),e=this.position.getAxisPositionY(t),i=this.position.spacings.labelToAxis+this.position.dataLabelHeight+this.styles.padding.bottom;let s;if(this.isOnSameAxisSide())s=e+i;else{const t=this.isVarianceChart()?this.smallestVarianceDataPointValue:this.smallestDataPointValue;s=e+Math.abs(t.getScaledUnit())+this.position.spacings.labelToColumn+this.position.dataLabelHeight+i}const n=this.isOnSameAxisSide();return Math.max(s,n?this.axisCategoryArea.height+this.scenariosArea.height:this.scenariosArea.height)}toString(){const t=new vn;return this.draw(t),t.id("drawCanvas"),t.width(this.getAllocatedCanvasWidth()),t.height(this.getAllocatedCanvasHeight()),t.attr("overflow","visible"),t.svg()}draw(t){this.cleanSVGforRedraw(t),this.state===ea.DIRTY&&(this.state=ea.UP_TO_DATE),this.isVarianceChart()?(this.drawVarianceScenario(this.variancesDataModel,t),this.drawAxisAndLabels(this.variancesDataModel,t)):null!=this.stackConfig?this.determineEffectiveChartMode()===G.LINE?(this.drawStackedAreaScenarios(this.dataModel,t),this.drawAxisAndLabelsForLineChart(this.dataModel,t)):(this.drawStackedScenarios(this.dataModel,t),this.drawStackedHeaders(this.dataModel,t),this.drawAxisAndLabels(this.dataModel,t)):this.determineEffectiveChartMode()===G.LINE?(this.drawLineScenarios(this.dataModel,t),this.drawAxisAndLabelsForLineChart(this.dataModel,t)):(this.drawScenarios(this.dataModel,t),this.drawOverlayLayer(this.dataModel,t),this.drawAxisAndLabels(this.dataModel,t))}determineEffectiveChartMode(){return this.chartMode===G.LINE||this.chartMode===G.AUTO&&this.dataModel.length>this.maxBars?G.LINE:G.BAR}setPattern(t,e){this.styles.pattern.set(t,e)}hasNoData(){return 0===this.dataModel.length}isOnSameAxisSide(){return null!=this.smallestVarianceDataPointValue.value&&null!=this.highestVarianceDataPointValue.value&&null!=this.smallestDataPointValue.value&&null!=this.highestDataPointValue.value&&(this.isVarianceChart()?Math.sign(this.smallestVarianceDataPointValue.value)===Math.sign(this.highestVarianceDataPointValue.value)||0===this.smallestDataPointValue.value&&1===Math.sign(this.highestDataPointValue.value):Math.sign(this.smallestDataPointValue.value)===Math.sign(this.highestDataPointValue.value)||0===this.smallestDataPointValue.value&&1===Math.sign(this.highestDataPointValue.value))}createI18n(t){this.state=ea.DIRTY;const e=new Map([["SEPERATOR_WS",", "],["in","in"],["ORDER_asc","↑"],["ORDER_desc","↓"],["ac1","AC"],["pp1","PY"],["fc1","FC"],["pl1","PL"],["ac2","AC2"],["pp2","PY2"],["fc2","FC2"],["pl2","PL2"],["ac3","AC3"],["pp3","PY3"],["fc3","FC3"],["pl3","PL3"],["ac4","AC4"],["pp4","PY4"],["fc4","FC4"],["pl4","PL4"],["category"," "],["operation"," "],["there_of","davon"],["part_of","in % von"],["ibcssymbol_delta_ac","Δ{%}"],["ibcssymbol_delta_generic","Δ({%})"],["ibcssymbol_delta_ac_relative","Δ{%}%"],["ibcssymbol_delta_generic_relative","Δ({%})%"],["SUM_TOTAL","❖"]]);return new Map([...e,...t])}createElementPosition(t){let e;const i=kt(t.filter(((t,e)=>1===e||2===e)).map((t=>Mt.translateScenarioLabel(t,this.i18n))).reduce(((t,e)=>t.length<e.length?e:t),""),{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"}).width,s=this.calculateTitleLength(this.leftSideOffsetForHorizontalSync);let n,r;if(e=i>s?i:s,null!=this.position&&(e+=this.position.spacings.labelToColumn),this.leftSideOffsetForHorizontalSync>-1&&(e=this.leftSideOffsetForHorizontalSync),this.isVarianceChart()?(n=this.smallestVarianceDataPointValue,r=this.highestVarianceDataPointValue):(n=this.smallestDataPointValue,r=this.highestDataPointValue),this.overflowConfig){const{cutHeight:t,overdriveZoneHeight:e,breakGap:i}=this.overflowConfig;r=new Ur(t+e+i,r.scenario,1,r.variance)}let a=this.styles.scaleFactors;const o=this.determineEffectiveChartMode();if(this.lineFullWidth&&this.availableWidth>0&&this.dataModel.length>0&&!this.isVarianceChart()&&o===G.LINE){const t=this.styles.fontStyles.size,i=this.styles.padding,s=this.styles.scaleFactors,n=this.availableWidth-(i.left+i.right+t*s.scenarioOffset+e+t*s.columnWidth);if(n>0){const e=Math.max(n/this.dataModel.length/t,1.2*s.columnWidth),i=new Or;Object.assign(i,s),i.categoryWidth=e,a=i}}return new Nr(new _r(this.styles.padding),a,this.styles.fontStyles,n,r,this.dataModel.length,e)}calculateTitleLength(t){let e="_______";e.length<this.title.length&&(e=this.title);const i=kt(e,{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"}).width;return i<t?t:i}setAxisScenario(t){let e=xr.AC1;if(null!=t&&t.length>0){const i=new Ot(t.toString());i.isValid&&(e=i.delta)}return null===e&&(e=xr.AC1),e}populateModel(t,e,i,s){var n;if(0===(null===(n=this.preparedDataSet)||void 0===n?void 0:n.length))return[];let r=this.queryDataSet(e,"","");return this.detectNaNCells(t,r),r=this.leftOuterJoinDates(r,e),this.createDataRows(r,t)}detectNaNCells(t,e){e.forEach((e=>(t.forEach((t=>{const i=new Ot(t);!0===i.isValid?0!==e[i.base+"_cnt"]&&0!==e[i.delta+"_cnt"]||(e[t]=Number.NaN):0===e[t+"_cnt"]&&(e[t]=Number.NaN)})),e)))}findDateInterval(t){var e,i,s;if(t!==P.AUTO)return t;const n=this.queryMinMaxDates();let r=P.DAY;return null!=(null===(e=n[0])||void 0===e?void 0:e.mindate)&&(r=(new lt).calculateDistanceType(null===(i=n[0])||void 0===i?void 0:i.mindate,null===(s=n[0])||void 0===s?void 0:s.maxdate,this.intervalSpanLimit)),r}queryMinMaxDates(){var t,e,i,s;const n=Yt("SELECT MAX(date) as maxdate, MIN(date) as mindate FROM ?",[this.preparedDataSet]);return null!=(null===(t=n[0])||void 0===t?void 0:t.mindate)&&(n[0].mindate=rt.fromMillis(null===(e=n[0])||void 0===e?void 0:e.mindate)),null!=(null===(i=n[0])||void 0===i?void 0:i.maxdate)&&(n[0].maxdate=rt.fromMillis(null===(s=n[0])||void 0===s?void 0:s.maxdate)),n}queryDataSet(t,e,i){const s=`normalizeDate([date], '${t}' , '${this.locale}') as calcdate`;return Yt(`SELECT p.calcdate ${e},\n ${["ac1","ac2","ac3","ac4","pp1","pp2","pp3","pp4","fc1","fc2","fc3","fc4","pl1","pl2","pl3","pl4"].map((t=>`SUM(${t} * transformOperator(operation)) as ${t}, COUNT(ISNULL(${t})) as ${t}_cnt`)).join(",")} \n \n FROM (SELECT ${s} ${e},\n ac1,\n ac2,\n ac3,\n ac4,\n pp1,\n pp2,\n pp3,\n pp4,\n fc1,\n fc2,\n fc3,\n fc4,\n pl1,\n pl2,\n pl3,\n pl4\n FROM ?) as p\n GROUP BY calcdate ${i}\n ORDER BY calcdate asc`,[this.preparedDataSet])}createDataRows(t,e){const i=[];return t.forEach(((t,s)=>{i.push({id:s,category:t.category,type:ia.NONE,date:t.calcdate,scenario1:new Ur(t[e[0]],e[0],this.pixelPerUnit,xr.NEU),scenario2:new Ur(t[e[1]],e[1],this.pixelPerUnit,xr.NEU),scenario3:new Ur(t[e[2]],e[2],this.pixelPerUnit,xr.NEU),scenario4:new Ur(t[e[3]],e[3],this.pixelPerUnit,xr.NEU)})})),i}findSmallestDataPointValue(t){const e=this.isVarianceChart()?this.pixelPerPercentage:this.pixelPerUnit;let i=new Ur(0,"default",e,xr.NEU);for(const e of t)for(const t of[e.scenario1,e.scenario2,e.scenario3,e.scenario4])t&&null!=t.value&&t.value<Number(i.value)&&(i=t);return i}findHighestDataPointValue(t){const e=this.isVarianceChart()?this.pixelPerPercentage:this.pixelPerUnit;let i=new Ur(0,"default",e,xr.NEU);for(const e of t)for(const t of[e.scenario1,e.scenario2,e.scenario3,e.scenario4])null!=t&&t.value>Number(i.value)&&(i=t);return i}populateVarianceModel(t,e){const i=[];if(null==t||0===t.length)return i;let s=null;null!=e&&e.length>0&&(s=e[0]);for(const n in t){const r=new Ot(t[n]);if(r.isValid){const t=this.mapScenarios(r,s),n=r.direction,a="dr"===r.type?this.pixelPerPercentage:this.pixelPerUnit;for(const s in e)i.push({id:Number(s),category:e[s].category,type:"dr"===r.type?ia.RELATIVE:ia.ABSOLUTE,date:e[s].date,scenario1:new Ur(this.calculateVariance(r,e[s],t),r.delta,a,n),scenario2:new Ur(null,null,null,null),scenario3:new Ur(null,null,null,null),scenario4:new Ur(null,null,null,null)})}}return i}calculateVariance(t,e,i){const s=i.get(t.base),n=i.get(t.delta);return null==s||null==n||null==e[s].value||null==e[n].value?null:t.type===ia.RELATIVE?(e[s].value-e[n].value)/e[n].value:e[s].value-e[n].value}mapScenarios(t,e){const i=new Map;return null==e||["scenario1","scenario2","scenario3","scenario4"].forEach((s=>{e[s].scenario===t.delta?i.set(t.delta,s):e[s].scenario===t.base&&i.set(t.base,s)})),i}cleanSVGforRedraw(t){t.clear()}isVarianceChart(){return this.variancesDataModel&&this.variancesDataModel.length>0}createDateFactory(){return new lt}drawAxisAndLabels(t,e){const i=this.createDateFactory(),s=e.group().id("AxisAndDateLables");let n=!1;if(!1===this.hideAxisLabels)t.forEach(((t,e)=>{let r=Ir.Top,a=this.position.spacings.labelToAxis;t.scenario1.value<0&&(r=Ir.Bottom,a*=-1),t.type===ia.RELATIVE&&(n=!0);let o=i.getDateString(t.date,this.dateInterval);this.axisLabelsMode===U.SMART?(o=i.getSmartDateString(t.date,this.dateInterval),0===e&&this.dateInterval!==P.YEAR&&(o=i.getShortDateString(t.date,this.dateInterval))):this.axisLabelsMode===U.SHORT&&(o=i.getShortDateString(t.date,this.dateInterval)),new kr(s,this.position.getColumnCenterPositionX(e),this.position.getAxisPositionY(n)+a,"",o,this.styles,r,Ir.Center).forceStringTypeDraw()}));else{const e=null==t?void 0:t[0];e&&e.type===ia.RELATIVE&&(n=!0)}new Hr({scenarioType:this.axisScenario,labelText:this.title,isRelative:n},this.position,s).draw(),this.axisCategoryArea={height:s.height(),width:s.width()}}drawScenarios(t,e){const i=e.group().id("Scenarios"),s=new ta(this.position,i,this.styles,t.length,this.i18n);s.setOverflowConfig(this.overflowConfig);let n=!1;t.forEach(((t,e)=>{s.createPrimaryBar(t.scenario1,e).draw(this.dataFormatDigits,this.measureScale),s.createSecondaryBar(t.scenario2,e).draw(),s.createPrimaryMarker(t.scenario3,e).draw(),s.createSecondaryMarker(t.scenario4,e).draw(),!1===t.scenario1.isEmpty()&&(n=!0)}));let r=0;!1===n&&(r=this.isOnSameAxisSide()?this.position.dataLabelHeight:2*this.position.dataLabelHeight),this.scenariosArea={height:i.height()+this.styles.padding.top+this.styles.padding.bottom+r,width:i.width()+this.position.spacings.columnWidth}}drawLineScenarios(t,e){var i,s;const n=e.group().id("LineScenarios"),r=new Pr,a=new ta(this.position,n,this.styles,t.length,this.i18n);a.setCollisionManager(r);const o=["ac1","pp1","fc1","pl1"],h=[[],[],[],[]];t.forEach(((t,e)=>{["scenario1","scenario2","scenario3","scenario4"].forEach(((i,s)=>{t[i]&&h[s].push({dataPoint:t[i],index:e})}))}));const l=[];for(let t=0;t<h.length;t++){const e=h[t];if(e.length>0&&e.some((t=>!t.dataPoint.isEmpty()))){const n=(null===(s=null===(i=e[0])||void 0===i?void 0:i.dataPoint)||void 0===s?void 0:s.scenario)||o[t],r=n.slice(0,2).toLowerCase();l.push({points:e,scenarioName:n,scenarioType:r})}}l.sort(((t,e)=>(Mr[e.scenarioType]||99)-(Mr[t.scenarioType]||99)));const c=[];for(const t of l){const e=a.createLineSeries(t.points,t.scenarioName);c.push({series:e,scenarioType:t.scenarioType})}for(const t of c)t.series.drawGeometry();a.moveLabelsToFront();const u=[...c].sort(((t,e)=>(Mr[t.scenarioType]||99)-(Mr[e.scenarioType]||99)));for(const t of u)t.series.drawLabels(this.dataFormatDigits,this.measureScale);const f=this.position.getColumnPositionY();this.scenariosArea={height:Math.max(n.height()+this.styles.padding.top,f)+this.styles.padding.bottom,width:n.width()+this.position.spacings.columnWidth}}drawAxisAndLabelsForLineChart(t,e){const i=this.createDateFactory(),s=e.group().id("AxisAndDateLabelsLine"),n=!1,r=t.length-1;!1===this.hideAxisLabels&&t.forEach(((e,a)=>{if(!this.shouldShowLineChartAxisLabel(t,a))return;let o,h=Ir.Top,l=this.position.spacings.labelToAxis;e.scenario1.value<0&&(h=Ir.Bottom,l*=-1),this.lineFullWidth&&this.availableWidth>0?this.axisLabelsMode===U.SMART?(o=i.getSmartDateString(e.date,this.dateInterval),0===a&&this.dateInterval!==P.YEAR&&(o=i.getShortDateString(e.date,this.dateInterval))):o=this.axisLabelsMode===U.SHORT?i.getShortDateString(e.date,this.dateInterval):i.getDateString(e.date,this.dateInterval):o=i.getShortDateString(e.date,this.dateInterval),new kr(s,this.position.getColumnCenterPositionX(a),this.position.getAxisPositionY(n)+l,"",o,this.styles,h,Ir.Center).forceStringTypeDraw(),a>0&&a<r&&this.isYearChange(t,a)&&this.drawYearSeparatorLine(s,a,n)})),new Hr({scenarioType:this.axisScenario,labelText:this.title,isRelative:n},this.position,s).draw(),this.axisCategoryArea={height:s.height(),width:s.width()}}shouldShowLineChartAxisLabel(t,e){return!!(this.lineFullWidth&&this.availableWidth>0)||(0===e||e===t.length-1||this.isYearChange(t,e))}isYearChange(t,e){var i,s;if(0===e)return!1;const n=null===(i=t[e])||void 0===i?void 0:i.date,r=null===(s=t[e-1])||void 0===s?void 0:s.date;return!(!n||!r)&&n.year!==r.year}drawYearSeparatorLine(t,e,i){const s=this.position.getColumnCenterPositionX(e)-this.position.spacings.columnWidth/2,n=this.position.columnValue.max.getScaledUnit()+this.position.dataLabelHeight,r=this.position.getAxisPositionY(i)-n,a=this.position.getAxisPositionY(i);t.line([[s,r],[s,a]]).stroke({color:"#999999",width:1,dasharray:"4,4"}).attr("stroke-dasharray","4,4")}drawVarianceScenario(t,e){const i=e.group().id("Scenarios"),s=new ta(this.position,i,this.styles,t.length,this.i18n);return s.setOverflowConfig(this.overflowConfig),t.forEach(((t,e)=>{t.type===ia.RELATIVE?s.createRelativeVarianceBar(t.scenario1,e).draw():s.createVarianceBar(t.scenario1,e).draw(this.dataFormatDigits,this.measureScale)})),this.scenariosArea={height:i.height()+this.styles.padding.top+this.styles.padding.bottom,width:i.width()+this.position.spacings.columnWidth},i}drawStackedScenarios(t,e){if(!this.stackConfig)return;const i=e.group().id("StackedScenarios"),s=this.stackConfig.by===k.SCENARIOS;t.forEach(((t,e)=>{const n=["scenario1","scenario2","scenario3","scenario4"],r=[];if(s)for(const e of n){const i=t[e];i&&!i.isEmpty()&&null!=i.value&&r.push({value:i.value,scenario:i.scenario,dataPoint:i})}else{const e=t.scenario1;e&&!e.isEmpty()&&null!=e.value&&r.push({value:e.value,scenario:e.scenario,dataPoint:e})}if(0!==r.length)if((s?new Set(r.map((t=>tr(t.scenario)))):new Set).size>1){const t=new Map;for(const e of r){const i=tr(e.scenario);t.has(i)||t.set(i,[]),t.get(i).push(e)}const s=[];for(const e of Zn)t.has(e)&&(s.push({prefix:e,segments:t.get(e)}),t.delete(e));for(const[e,i]of t)s.push({prefix:e,segments:i});s.forEach(((t,n)=>{const r=t.segments.reduce(((t,e)=>t+Math.abs(e.value)),0),a=s.length-1-n;let o=0,h=null;t.segments.forEach((t=>{const s=new zr(this.position,this.styles,t.dataPoint,e,o,t.scenario,a,this.stackConfig.mode,r,!0,i);s.draw(this.dataFormatDigits,this.measureScale),o+=Math.abs(t.value),h=s})),h&&h.drawTotalLabel(this.dataFormatDigits,this.measureScale)}))}else{"asc"===this.stackConfig.order?r.sort(((t,e)=>t.value-e.value)):"desc"===this.stackConfig.order&&r.sort(((t,e)=>e.value-t.value));const t=r.reduce(((t,e)=>t+Math.abs(e.value)),0);let n=0,a=null;r.forEach(((r,o)=>{const h=new zr(this.position,this.styles,r.dataPoint,e,n,r.scenario,o,this.stackConfig.mode,t,s,i);h.draw(this.dataFormatDigits,this.measureScale),n+=Math.abs(r.value),a=h})),a&&a.drawTotalLabel(this.dataFormatDigits,this.measureScale)}})),this.scenariosArea={height:i.height()+this.styles.padding.top+this.styles.padding.bottom,width:i.width()+this.position.spacings.columnWidth}}drawStackedHeaders(t,e){if(!this.stackConfig||0===t.length)return;if(this.stackConfig.by!==k.SCENARIOS)return;const i=e.group().id("StackedHeaders"),s=t[0],n=["scenario1","scenario2","scenario3","scenario4"],r=[];for(const t of n){const e=s[t];e&&!e.isEmpty()&&null!=e.value&&r.push({value:e.value,scenario:e.scenario,dataPoint:e})}if(0===r.length)return;const a=new Set(r.map((t=>tr(t.scenario)))),o=this.position.getColumnPositionY(),h=this.position.getColumnCenterPositionX(0)-this.position.getColumnWidth()/2-this.position.spacings.labelToColumn;if(a.size>1){const t=new Map;for(const e of r){const i=tr(e.scenario);t.has(i)||t.set(i,[]),t.get(i).push(e)}const e=[];for(const i of Zn)t.has(i)&&(e.push({prefix:i,segments:t.get(i)}),t.delete(i));for(const[i,s]of t)e.push({prefix:i,segments:s});e.forEach((t=>{const e=t.segments.reduce(((t,e)=>t+Math.abs(e.value)),0),s=t.segments[0].dataPoint.pixelPerUnit,n=o-(this.stackConfig.mode===$.RELATIVE?s:e*s)/2,r=this.i18n.get(t.prefix+"1")||t.prefix.toUpperCase();new kr(i,h,n,"STACK_HEADER",r,this.styles,Ir.Center,Ir.Right).forceStringTypeDraw()}))}else{"asc"===this.stackConfig.order?r.sort(((t,e)=>t.value-e.value)):"desc"===this.stackConfig.order&&r.sort(((t,e)=>e.value-t.value));const t=r.reduce(((t,e)=>t+Math.abs(e.value)),0),e=r[0].dataPoint.pixelPerUnit;let s=0;r.forEach((n=>{let r;r=this.stackConfig.mode===$.RELATIVE?(0!==t?Math.abs(n.value)/t:0)*e:Math.abs(n.value*e);const a=o-s-r/2,l=this.i18n.get(n.scenario)||n.scenario;new kr(i,h,a,"STACK_HEADER",l,this.styles,Ir.Center,Ir.Right).forceStringTypeDraw(),s+=r}))}}drawStackedAreaScenarios(t,e){if(!this.stackConfig)return;const i=e.group().id("StackedAreaScenarios"),s=this.stackConfig.by===k.SCENARIOS,n=this.stackConfig.mode,r=["scenario1","scenario2","scenario3","scenario4"];if(0===(s?r.filter((e=>t.some((t=>t[e]&&!t[e].isEmpty())))).length:1))return;const a=[],o=[],h=[];for(const e of r)t.some((t=>t[e]&&!t[e].isEmpty()))&&h.push(e);for(let e=0;e<h.length;e++){const i=h[e],s=[];for(let r=0;r<t.length;r++){const o=t[r][i],l=o&&!o.isEmpty()&&null!=o.value?o.value:0,c=e>0?a[e-1][r]:0;if(n===$.RELATIVE){const e=h.reduce(((e,i)=>{const s=t[r][i];return e+(s&&!s.isEmpty()&&null!=s.value?Math.abs(s.value):0)}),0),i=0!==e?Math.abs(l)/e:0;s.push(c+i)}else s.push(c+l)}a.push(s);const r=t[0][i];o.push((null==r?void 0:r.scenario)||"ac1")}const l=this.position.getColumnPositionY(),c=this.pixelPerUnit,u=t=>t.map(((t,e)=>({x:this.position.getColumnCenterPositionX(e),y:l-t*c}))),f=t.map(((t,e)=>({x:this.position.getColumnCenterPositionX(e),y:l})));for(let t=0;t<a.length;t++){const e=u(a[t]),n=0===t?f:u(a[t-1]),r=new Qr(i,e,n,s?o[t]:null,t,s);r.draw(),r.drawBoundaryLine()}this.scenariosArea={height:i.height()+this.styles.padding.top+this.styles.padding.bottom,width:i.width()+this.position.spacings.columnWidth}}drawOverlayLayer(t,e){const i=e.group().id("Overlay"),s=new ta(this.position,i,this.styles,t.length,this.i18n);if(!0===this.showOverlayAvg){let e=null;const i=function(t){const e=t.reduce(((t,e)=>{var i;return t+((null===(i=e.scenario1)||void 0===i?void 0:i.value)||0)}),0),i=t.filter((t=>{var e;return void 0!==(null===(e=t.scenario1)||void 0===e?void 0:e.value)})).length,s=i>0?e/i:0,n=Object.assign(Object.assign({},t[0]),{scenario1:new Ur(s,t[0].scenario1.scenario,t[0].scenario1.pixelPerUnit,t[0].scenario1.variance)}),r=Object.assign(Object.assign({},t[t.length-1]),{scenario1:new Ur(s,t[t.length-1].scenario1.scenario,t[t.length-1].scenario1.pixelPerUnit,t[t.length-1].scenario1.variance)});return[n,...t.map((t=>Object.assign(Object.assign({},t),{scenario1:new Ur(s,t.scenario1.scenario,t.scenario1.pixelPerUnit,t.scenario1.variance)}))),r]}(t);i.forEach(((t,i)=>{null!=e&&s.createLine(`Ø ${this.i18n.get(t.scenario1.scenario)||t.scenario1.scenario}`,t.scenario1,e,i-1).draw(this.dataFormatDigits,this.measureScale),e=t.scenario1}))}if(!0===this.showOverlayMedian){let e=null;const i=function(t){const e=t.map((t=>{var e;return null===(e=t.scenario1)||void 0===e?void 0:e.value})).filter((t=>void 0!==t)).sort(((t,e)=>t-e)),i=e.length%2==0?(e[e.length/2-1]+e[e.length/2])/2:e[Math.floor(e.length/2)],s=Object.assign(Object.assign({},t[0]),{scenario1:new Ur(i,t[0].scenario1.scenario,t[0].scenario1.pixelPerUnit,t[0].scenario1.variance)}),n=Object.assign(Object.assign({},t[t.length-1]),{scenario1:new Ur(i,t[t.length-1].scenario1.scenario,t[t.length-1].scenario1.pixelPerUnit,t[t.length-1].scenario1.variance)});return[s,...t.map((t=>Object.assign(Object.assign({},t),{scenario1:new Ur(i,t.scenario1.scenario,t.scenario1.pixelPerUnit,t.scenario1.variance)}))),n]}(t);i.forEach(((t,i)=>{null!=e&&s.createLine(`Mdn ${this.i18n.get(t.scenario1.scenario)||t.scenario1.scenario}`,t.scenario1,e,i-1).draw(this.dataFormatDigits,this.measureScale),e=t.scenario1}))}}leftOuterJoinDates(t,e){const i=rt.max(...t.map((function(t){return t.calcdate}))),s=rt.min(...t.map((function(t){return t.calcdate}))),n=(new lt).datesBetween(s,i,e,this.intervalSpanLimit),r=new Map;return n.forEach(((t,e)=>{r.set(t.toISO(),{id:e,calcdate:t,category:null,ac1:null,ac2:null,ac3:null,ac4:null,pp1:null,pp2:null,pp3:null,pp4:null,fc1:null,fc2:null,fc3:null,fc4:null,pl1:null,pl2:null,pl3:null,pl4:null,isEmpty:!0})})),t.forEach((t=>{const e=t.calcdate.toISO(),i=r.get(e);i&&i.isEmpty&&r.set(e,{id:i.id,calcdate:t.calcdate,category:t.category,ac1:t.ac1,ac2:t.ac2,ac3:t.ac3,ac4:t.ac4,pp1:t.pp1,pp2:t.pp2,pp3:t.pp3,pp4:t.pp4,fc1:t.fc1,fc2:t.fc2,fc3:t.fc3,fc4:t.fc4,pl1:t.pl1,pl2:t.pl2,pl3:t.pl3,pl4:t.pl4,isEmpty:!1})})),Array.from(r.values())}}class na{constructor(t,e){this.data=t,this.scenarios=e,this.variances=[],this.title="",this.hideAxisLabels=!1,this.pixelPerUnit=10,this.pixelPerPercentage=50,this.limit=0,this.sortOrder=new ht(new Bn).default(),this.level=C.CATEGORY,this.leftSideOffsetForHorizontalSync=-1,this.dateInterval=P.AUTO,this.axisLabelsMode=U.SMART,this.intervalSpanLimit=28,this.filter="",this.measureScale=new Gn,this.measureUnit="",this.showMeasureScale=!0,this.dataFormatDigits={decimal:1,percent:2},this.showOverlayMedian=!0,this.showOverlayAvg=!0,this.chartMode=G.BAR,this.maxBars=28,this.stackConfig=null,this.lineFullWidth=!0}}class ra{constructor(t,e,i,s,n){this.dataRowAdapter=t,this.orderAdapter=e,this.stringAdapter=i,this.dataFormatDigitsAdapter=s,this.dataSet=n}adapt(t){const e=at.adaptArray(t.data,this.dataRowAdapter),i=at.adaptArray(t.scenarios,this.stringAdapter),s=new na(e,i);return ot.isArray(t.variances)&&(s.variances=at.adaptArray(t.variances,this.stringAdapter)),ot.isString(t.title)&&(s.title=t.title),ot.isBoolean(t.hideAxisLabels)&&(s.hideAxisLabels=t.hideAxisLabels),ot.isNumber(t.pixelPerUnit)&&(s.pixelPerUnit=t.pixelPerUnit),ot.isNumber(t.pixelPerPercentage)&&(s.pixelPerPercentage=t.pixelPerPercentage),ot.isNumber(t.limit)&&(s.limit=t.limit),ot.isExisting(t.sortOrder)&&(s.sortOrder=this.orderAdapter.adapt(t.sortOrder)),ot.isExisting(t.level)&&(s.level=t.level),ot.isExisting(t.dateInterval)&&(s.dateInterval=t.dateInterval),ot.isExisting(t.axisLabelsMode)&&(s.axisLabelsMode=t.axisLabelsMode),ot.isNumber(t.leftSideOffsetForHorizontalSync)&&(s.leftSideOffsetForHorizontalSync=t.leftSideOffsetForHorizontalSync),ot.isNumber(t.intervalSpanLimit)&&(s.intervalSpanLimit=t.intervalSpanLimit),ot.isString(t.filter)&&(s.filter=t.filter),ot.isExisting(t.measureScale)&&(s.measureScale=Fn.calculateMeasureScale(this.dataSet,s.scenarios,t.measureScale)),ot.isString(t.measureUnit)&&(s.measureUnit=t.measureUnit),ot.isBoolean(t.showMeasureScale)&&(s.showMeasureScale=t.showMeasureScale),ot.isExisting(t.dataFormatDigits)&&(s.dataFormatDigits=this.dataFormatDigitsAdapter.adapt(t.dataFormatDigits)),ot.isBoolean(t.showOverlayAvg)&&(s.showOverlayAvg=t.showOverlayAvg),ot.isBoolean(t.showOverlayMedian)&&(s.showOverlayMedian=t.showOverlayMedian),ot.isExisting(t.chartMode)&&(s.chartMode=t.chartMode),ot.isNumber(t.maxBars)&&(s.maxBars=t.maxBars),ot.isExisting(t.stackConfig)&&(s.stackConfig=t.stackConfig),ot.isBoolean(t.lineFullWidth)&&(s.lineFullWidth=t.lineFullWidth),s}default(){return new na([],[])}}const aa=class{constructor(e){t(this,e),this.data=[],this.scenarios=[],this.variances=[],this.hideAxisLabels=!1,this.pixelPerUnit=2,this.pixelPerPercentage=50,this.limit=0,this.leftSideOffsetForHorizontalSync=-1,this.i18n=new Map,this.order={hierarchy:[],direction:L.ASC},this.level=C.CATEGORY,this.dateInterval=P.AUTO,this.intervalSpanLimit=28,this.axisLabelsMode=U.SMART,this.filter="",this.measureScale="_",this.measureUnit="",this.showMeasureScale=!0,this.showOverlayMedian=!1,this.showOverlayAvg=!1,this.chartMode=G.BAR,this.maxBars=28,this.stackConfig=null,this.lineFullWidth=!0,this.containerWidth=0,this.dataFormatDigits={percent:2,decimal:1},this.parentDimensions={width:0,height:0}}render(){var t,s,n;if(void 0===this.chart)return e(i,null);if(this.chart.hasNoData()){const t=this.i18n.get("NO_DATA")||"==No Data==";return e(i,null,e("p",{class:"warning"},t))}return e(i,null,e("div",{innerHTML:null===(t=this.pattern)||void 0===t?void 0:t.toString(),class:"hidePatternContainer"}),e("div",{class:this.showMeasureScale?"footer":"footer-hide"},null===(s=this.chart)||void 0===s?void 0:s.getFooter()),e("div",{innerHTML:null===(n=this.chart)||void 0===n?void 0:n.toString()}))}async componentWillLoad(){var t;const e=this.prepareConfig(),i=this.prepareStyle(),s=this.containerWidth||0;this.chart=new sa(new cr,e,i,s),this.chart.setI18n(this.i18n),this.autoFitScaling(e,i),this.chart.setAvailableHeight((null===(t=this.parentDimensions)||void 0===t?void 0:t.height)||0),this.pattern=new Lr(this.chart.styles),this.chart.setPattern("fc",this.pattern.getFCPolygonPattern())}async componentWillUpdate(){var t;if(null==this.chart)return;const e=this.prepareConfig(),i=this.prepareStyle();this.chart.setI18n(this.i18n),this.chart.setStyles(i),this.chart.setAvailableWidth(this.containerWidth||0),this.chart.setConfig(e),this.autoFitScaling(e,i),this.chart.setAvailableHeight((null===(t=this.parentDimensions)||void 0===t?void 0:t.height)||0),this.pattern=new Lr(this.chart.styles),this.chart.setPattern("fc",this.pattern.getFCPolygonPattern())}autoFitScaling(t,e){var i;const s=t.pixelPerUnit<=0,n=t.pixelPerPercentage<=0;if(!s&&!n)return;const r=null===(i=this.parentDimensions)||void 0===i?void 0:i.height,a=this.containerWidth||0;if(!r||r<=0)return s&&(t.pixelPerUnit=1),n&&(t.pixelPerPercentage=50),this.chart=new sa(new cr,t,e,a),void this.chart.setI18n(this.i18n);s&&(t.pixelPerUnit=1),n&&(t.pixelPerPercentage=1),this.chart=new sa(new cr,t,e,a),this.chart.setI18n(this.i18n),this.chart.toString();const o=this.chart.getAllocatedCanvasHeight();if(o<=0)return;const h=.9*r/o;s&&(t.pixelPerUnit=h),n&&(t.pixelPerPercentage=h),this.chart=new sa(new cr,t,e,a),this.chart.setI18n(this.i18n)}async componentWillRender(){}componentDidLoad(){}componentDidUpdate(){}prepareConfig(){return new ra(new Fr,new ht(new Bn),new Bn,new dr,this.data).adapt({data:this.data,scenarios:this.scenarios,variances:this.variances,title:this.chartTitle,hideAxisLabels:this.hideAxisLabels,pixelPerUnit:this.pixelPerUnit,pixelPerPercentage:this.pixelPerPercentage,level:this.level,dateInterval:this.dateInterval,axisLabelsMode:this.axisLabelsMode,limit:this.limit,sortOrder:this.order,leftSideOffsetForHorizontalSync:this.leftSideOffsetForHorizontalSync,intervalSpanLimit:this.intervalSpanLimit,filter:this.filter,measureScale:this.measureScale,measureUnit:this.measureUnit,showMeasureScale:this.showMeasureScale,dataFormatDigits:this.dataFormatDigits,showOverlayMedian:this.showOverlayMedian,showOverlayAvg:this.showOverlayAvg,chartMode:this.chartMode,maxBars:this.maxBars,stackConfig:this.stackConfig,lineFullWidth:this.lineFullWidth})}prepareStyle(){return new jr(new Rr,new br,new Er(new yr),new Sr(new yr),new gr).adapt(this.styles)}get element(){return s(this)}};aa.style=':host{position:relative;display:inline-block}.categories{text-align:right;font-size:var(--bn-font-size, 1em);font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);color:var(--bn-font-color, black)}.label-bg{fill:var(--bn-font-background, white);opacity:0.7}.label-text{text-align:right;font-size:var(--bn-font-size, 1em);font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);color:var(--bn-font-color, black)}.axis-title{text-align:center;font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);color:var(--bn-font-color, black)}.axis-default{stroke:black;stroke-width:0.1em}.axis-ac{stroke:black;stroke-width:0.1em}.axis-pp{stroke:grey;stroke-width:0.1em}.axis-fc{stroke:black;stroke-dasharray:2;stroke-width:0.1em}.axis-pl{stroke:white;stroke-width:0.1em;outline-offset:0em;outline:0.1em solid black}canvas{image-rendering:-moz-crisp-edges;image-rendering:-webkit-crisp-edges;image-rendering:pixelated;image-rendering:crisp-edges}.measure{font-weight:bold}span{display:inline-block}.hidePatternContainer{height:0;width:0}div{float:left}.hide{opacity:0}.footer{margin:0.2em;font-size:0.6em}.footer-hide{margin:0.2em;font-size:0.6em;opacity:0}';class oa{constructor(t,e,i,s,n,r,a,o,h){this.prefixStyle="prefix",this.isBarChart=!1,this.key=t,this.index=e,this.value=i,this.prefix=r||"",this.cssStyle=s||"",this.prefixStyle=a||"prefix",this.type=n,this.mark=void 0,this.colSpan=o||1,this.measureScale=h||1}getAsHeaderList(){if(null==this.value)return[""];const t=[];for(const e of this.value.toString().split("<br/>"))t.push(e);return t}draw(t){let e=this.value;if("undefined"===e||void 0===e||null==e)return"";if(Number.isNaN(Number(e)))return e;if(""===this.type||void 0===this.type||null==this.type)return e;let i=t.percent,s=t.percent;return"decimal"===this.type&&(e=+e/this.measureScale,i=t.decimal,s=t.decimal),Mt.number(Number(e),this.type,i,s)}drawPrefix(){return null==this.prefix?"":this.prefix}}class ha{constructor(t,e,i){this.index=t,this.groupindex=e,this.type=i,this.cssStyle=this.initCssStyle(),this.elements=[]}initCssStyle(){switch(this.type){case De.HEADER:return"groupheader";case De.SEPERATORLINE:return"";case De.DRILLELEMENT:return"ofit";case De.PARTELEMENT:return"partof";case De.STANDARD:return"";case De.SUM:return"sum";default:return""}}getCells(){return this.elements}createElement(t,e,i,s,n,r,a,o,h,l=!1,c){let u=r;"category"===e&&null!=o&&(u=`category-${o.toString()}`),this.type===De.HEADER?u="headerlabel":this.type===De.SEPERATORLINE&&(u=e),this.type===De.PARTELEMENT&&("percent"===s&&(t="-"),"category"!==e&&"operation"!==e&&(s="percent",u="")),"-"===t&&(u="");let f="prefix-first";a&&(f="prefix-second"),i&&(u=`${u} ${i}`);const d=new oa(e,this.elements.length,t,u,s,n,f,1,h);d.isBarChart=l,d.columnStats=c,this.elements.push(d)}}const la={positive:{stroke:"#008f96",fill:"#008f96",fillpattern:"solid"},negative:{stroke:"#ff0000",fill:"#ff0000",fillpattern:"solid"},neutral:{stroke:"#808080",fill:"#808080",fillpattern:"outlined"},scenarios:{ac:{stroke:"#404040",fill:"#404040",fillpattern:"solid"},pp:{stroke:"#A6A6A6",fill:"#A6A6A6",fillpattern:"solid"},fc:{stroke:"#404040",fill:"#ffffff",fillpattern:"hatched"},pl:{stroke:"#404040",fill:"#ffffff",fillpattern:"outlined"}},fontColor:"#000000",fontSize:11,fontFamily:"'Noto Sans', sans-serif",unitScaling:.01,percentageScaling:.5,scaleFactor:1},ca="#666666";function ua(t,e){return`pattern-${t}-${e.replace("#","")}`}const fa=({styles:t})=>{const i=t.scaleFactor,s=6*i,n=[{id:ua("pos",t.positive.stroke),stroke:t.positive.stroke,fill:t.positive.fill},{id:ua("neg",t.negative.stroke),stroke:t.negative.stroke,fill:t.negative.fill},{id:ua("neu",t.neutral.stroke),stroke:t.neutral.stroke,fill:t.neutral.fill}];return e("defs",null,n.map((t=>e("pattern",{id:t.id,patternUnits:"userSpaceOnUse",width:s,height:s},e("rect",{width:s,height:s,fill:"#ffffff"}),e("line",{x1:"0",y1:s,x2:s,y2:"0",stroke:t.stroke,"stroke-width":1.5*i})))))};function da(t,e,i=1){let s,n;const r=t>=0?"+":"";if(e)return s=100*t,r+Math.round(s).toString()+"%";{let e;return s=t/i,n=Math.abs(s),e=n>=1e9?(s/1e9).toFixed(n>=1e10?0:1)+"B":n>=1e6?(s/1e6).toFixed(n>=1e7?0:1)+"M":n>=1e3?(s/1e3).toFixed(n>=1e4?0:1)+"K":s.toFixed(n>=10?0:1),e=e.replace(/\.0([KMB]?)$/,"$1"),r+e}}function pa(t){const e=t.slice(0,2).toLowerCase();return["ac","pp","fc","pl"].includes(e)}function ba(t){const e=t.slice(0,2).toLowerCase();return"pp"===e?"pp":"fc"===e?"fc":"pl"===e?"pl":"ac"}function va(t,e,i,s){return pa(t)?function(t,e){const i=ba(t);return e.scenarios[i]}(t,s):function(t,e,i){const s=t>=0;return e?s?i.positive:i.negative:s?i.negative:i.positive}(e,i,s)}const Ea=t=>{const{value:i,scenario:s,columnStats:n,height:r,isPositiveGood:a,formattedValue:o,measureScale:h,maxBarWidth:l=10,styles:c=la}=t,u=c.scaleFactor,f=c.fontSize,d=38*u,p=l*f,b=4*u,v=.15*p,E=p-b-v,m=Math.abs(i)*c.unitScaling*f,g=m>E,w=Math.max(0,n.absMax*c.unitScaling*f-E),y=Math.max(0,m-E),T=w>0?y/w*v:0,S=n.min<0,A=n.max>0,O=S?p:0,R=(S?d:0)+(O+(A?p:0))+(A?d:0),N=2*u,_=r-2*N,C=(S?d:0)+O,L=N,I=i>=0,k=va(s,i,a,c),M=function(t,e){const i=t.fillpattern;return"hatched"===i?`url(#${ua(e,t.stroke)})`:"outlined"===i?"transparent":t.fill}(k,pa(s)?ba(s):a?I?"pos":"neg":I?"neg":"pos"),{stroke:$,strokeWidth:x}="outlined"===(D=k).fillpattern?{stroke:D.stroke,strokeWidth:1.5}:{stroke:"none",strokeWidth:0};var D;const P=o||da(i,!1,h),U=g?E:m,G=g?E+b+T:m,F=I?C+G+4*u:C-G-4*u,B=I?"start":"end";return e("svg",{width:R,height:r,class:"cell-bar-chart absolute-variance",style:{overflow:"visible"}},e(fa,{styles:c}),e("line",{x1:C,y1:0,x2:C,y2:r,stroke:ca,"stroke-width":1*u}),U>0&&e("rect",{x:I?C:C-U,y:L,width:U,height:_,fill:M,stroke:$,"stroke-width":x*u}),g&&T>0&&e("rect",{x:I?C+E+b:C-E-b-T,y:L,width:T,height:_,fill:M,stroke:$,"stroke-width":x*u}),g&&function(t,i,s,n,r){const a=t+i/2,o=.35*i,h=n/3,l=.3*i;let c=`M ${a-o} ${s}`;for(let t=0;t<3;t++)c+=` L ${a-o-l} ${s+h*(t+.5)} L ${a-o} ${s+h*(t+1)}`;let u=`M ${a+o} ${s}`;for(let t=0;t<3;t++)u+=` L ${a+o+l} ${s+h*(t+.5)} L ${a+o} ${s+h*(t+1)}`;return[e("rect",{x:t,y:s-1,width:i,height:n+2,fill:"#ffffff"}),e("path",{d:c,fill:"none",stroke:"#000000","stroke-width":1*r}),e("path",{d:u,fill:"none",stroke:"#000000","stroke-width":1*r})]}(I?C+E:C-E-b,b,L,_,u),e("text",{x:F,y:r/2,dy:"0.35em","text-anchor":B,fill:c.fontColor,"font-size":f,"font-family":c.fontFamily},P))},ma=t=>{const{value:i,scenario:s,columnStats:n,height:r,isPositiveGood:a,formattedValue:o,measureScale:h,maxBarWidth:l=10,styles:c=la}=t,u=c.scaleFactor,f=c.fontSize,d=Math.round(.67*l*f),p=5*u,b=n.min<0?d+p:0,v=b+(n.max>0?d+p:0),E=v+45*u,m=b,g=r/2,w=100*Math.abs(i)*c.percentageScaling*f,y=w>d,T=Math.min(w,d),S=i>=0,A=S?m+T:m-T,O=va(s,i,a,c),R=3*u,N=o||da(i,!0,h),_=v+4*u;return e("svg",{width:E,height:r,class:"cell-bar-chart relative-variance",style:{overflow:"visible"}},e("line",{x1:m,y1:0,x2:m,y2:r,stroke:ca,"stroke-width":1*u}),!y&&e("circle",{cx:A,cy:g,r:R,fill:c.fontColor}),e("line",{x1:m,y1:g,x2:A,y2:g,stroke:O.fill,"stroke-width":2*u}),y&&S&&e("polygon",{points:`${m+d},${g} ${m+d-6*u},${g-3*u} ${m+d-6*u},${g+3*u}`,fill:O.fill}),y&&!S&&e("polygon",{points:`${m-d},${g} ${m-d+6*u},${g-3*u} ${m-d+6*u},${g+3*u}`,fill:O.fill}),e("text",{x:_,y:r/2,dy:"0.35em","text-anchor":"start",fill:c.fontColor,"font-size":f,"font-style":"italic","font-family":c.fontFamily},N))},ga=t=>{const{value:i,columnStats:s,isRelative:n,styles:r=la}=t;return null==i||isNaN(i)||!s||0===s.absMax?e("span",{class:"bar-chart-empty",style:{color:r.fontColor,fontStyle:"italic"}},"-"):e(n?ma:Ea,Object.assign({},t))};class wa{constructor(t){Yt.fn.transformOperator=function(t){return"-"===t?-1:1},this.groups=[Rt.CATEGORY,Rt.CATEGORYINDEX],$e.OPT!==t.type&&$e.OPTNOTOTAL!==t.type||this.groups.unshift(Rt.OPERATION),t.grouped&&(this.groups.push(Rt.ROWGROUP),this.groups.push(Rt.ROWGROUPINDEX))}toString(){return this.groups.map((t=>`${t}`)).toString()}noCategory(){return this.groups.filter((t=>t!==Rt.CATEGORY))}toArray(){return this.groups}}class ya{constructor(t,e){this.hasPartOf=!1,this.config=t,this.i18n=e}execute(t){if(0===t.length)return[];const e=[],i=[],s=[],n=this.config.scenarios.map((t=>this.translateScenarioSQL(t,!1,this.config.type))).toString(),r=this.config.scenarios.map((t=>this.translateScenarioSQL(t,!0,this.config.type))).toString(),a=this.getRelativeScenarios(),o=new wa(this.config),h=this.config.grouped?[Rt.ROWGROUP,Rt.ROWGROUPINDEX]:[];let l=["",""];return this.config.sortOrder.hierarchy.length>0&&(l=this.createOrderString(this.config.sortOrder)),this.hasPartOf=this.checkConfigForPartOf(),Yt(`SELECT COUNT(DISTINCT ${Rt.CATEGORY}) as ${Rt.TOTALROWCOUNT} ${h.length>0?","+h:""}\n FROM ? ${h.length>0?"GROUP BY "+h:""} \n ORDER BY ${l[0]}`,[t]).forEach((t=>{const s=t.rowGroup&&t.rowGroup.length>0?`WHERE ${Rt.ROWGROUP} = '${t.rowGroup}'`:"";let a="";this.config.limit&&(a=`LIMIT ${this.config.limit}`),this.createGroupHeaderRow(t,e),this.createDataRow(e,t,o,n,s,l,a),this.createRestRow(t,e,o,n,s,l),this.createGroupSumRow(e,i,t,r,l)})),this.createTotalSumRow(e,i,r),e.forEach((e=>{try{s.push(Yt(e,[t]))}catch(t){console.error("DataQuery: SQL query execution failed",e,t)}})),this.detectNaNCells(this.config.scenarios,s),this.createThereOfDrillRows(n,l,t,s),this.createPartOfDrillRows(n,l,i,t,s),this.createThereOfDrillColumns(this.config.categoryThereOf,t,s),this.calculateColumnGroupRest(s,this.config.categoryThereOf),this.calculateRelativeVariances(s,a),s}detectNaNCells(t,e){e.forEach((e=>{e.map((e=>(t.forEach((t=>{const i=new Ot(t);!0===i.isValid?0!==e[i.base+"_cnt"]&&0!==e[i.delta+"_cnt"]||(e[t]=Number.NaN):0===e[t+"_cnt"]&&(e[t]=Number.NaN)})),e)))}))}createPartOfDrillRows(t,e,i,s,n){if(null==this.config.partOf||0===this.config.partOf.length||this.config.type===$e.LIST||null==s||0===s.length)return;const r=this.createPartOfQuery(t,e);let a=[];r.forEach((function(t){a.push(...Yt(t,[s]))}));const o=this.exctractScenarioNames(t),h=[];i.forEach((function(t){h.push(...Yt(t,[s]))}));const l=new Map;h.forEach((t=>l.set(t[Rt.ROWGROUP],t))),a=this.reduceResDrillByCategoryGroups(a,o),a.forEach((function(t){o.forEach((e=>{try{t[e]=t[e]/l.get(t[Rt.ROWGROUP])[e]}catch(i){console.error("DataQuery: partOf drill row calculation failed",e,i),t[e]=Number.NaN}}))})),this.injectDrillRowsToResultRows(a,n)}createRestRow(t,e,i,s,n,r){t.totalRowCnt-this.config.limit>0&&0!==this.config.limit&&e.push(`SELECT ${Rt.ROWNR}, 1 as ${Rt.ROWGROUPINDEX} , 'ENTRY' as ${Rt.TYPE}, 'NO_GROUP' as ${Rt.ROWGROUP}, 'REST' as ${Rt.CATEGORY} , SUM(ac1) as ac1, SUM(pp1) as pp1, SUM(dpp1_ac1_pos) as dpp1_ac1_pos, SUM(drpp1_ac1_pos) as drpp1_ac1_pos, SUM(dr_pp1) as dr_pp1 FROM (SELECT ROWNUM() AS ${Rt.ROWNR}, ${e.length} as ${Rt.ROWGROUPINDEX} , 'ENTRY' as ${Rt.TYPE}, '${t.rowGroup||"NO_GROUP"}' as ${Rt.ROWGROUP}, ${i} ${s.length>0?",".concat(s):""} FROM ? ${n} GROUP BY ${i} ORDER BY ${r[0]}) t WHERE t.rowNr > ${this.config.limit}`)}createDataRow(t,e,i,s,n,r,a){t.push(`SELECT ROWNUM() AS ${Rt.ROWNR},\n ${t.length} as ${Rt.ROWGROUPINDEX},\n 'ENTRY' as ${Rt.TYPE},\n '${e.rowGroup||"NO_GROUP"}' as ${Rt.ROWGROUP},\n '${Rt.CATEGORYINDEX}',\n ${i} ${s.length>0?",".concat(s):""}\n FROM ? ${n}\n GROUP BY ${i}\n ORDER BY ${r[0]} ${a}`)}createGroupHeaderRow(t,e){!0===this.config.grouped&&e.push(`SELECT ROWNUM() AS ${Rt.ROWNR},\n ${e.length} as ${Rt.ROWGROUPINDEX},\n 'GROUPHEAD' as ${Rt.TYPE},\n '${t.rowGroup}' as ${Rt.ROWGROUP} ${this.config.showGroupTitle?`,'${t.rowGroup}' as ${Rt.CATEGORY}`:""}\n FROM ?\n GROUP BY '1'`)}createGroupSumRow(t,e,i,s,n){!0!==this.config.grouped||$e.SUM!==this.config.type&&$e.SUMNOTOTAL!==this.config.type&&$e.OPT!==this.config.type&&$e.OPTNOTOTAL!==this.config.type||(t.push(`SELECT ${t.length} as ${Rt.ROWGROUPINDEX},\n '=' as ${Rt.OPERATION},\n '${i.rowGroup}' as ${Rt.ROWGROUP},\n ROWNUM() AS ${Rt.ROWNR},\n 'GROUP_SUM' as ${Rt.TYPE} ${s.length>0?",".concat(s):""}\n FROM ?\n WHERE ${Rt.ROWGROUP} = '${i.rowGroup}'\n ORDER BY ${n[0]} `),e.push(`SELECT ${t.length} as ${Rt.ROWGROUPINDEX},\n '=' as ${Rt.OPERATION},\n '${i.rowGroup}' as ${Rt.ROWGROUP},\n ROWNUM() AS ${Rt.ROWNR},\n 'GROUP_SUM' as ${Rt.TYPE} ${s.length>0?",".concat(s):""}\n FROM ?\n WHERE ${Rt.ROWGROUP} = '${i.rowGroup}'\n ORDER BY ${n[0]} `))}createTotalSumRow(t,e,i){if($e.SUM===this.config.type||$e.OPT===this.config.type){const e=`${this.hasPartOf&&!1===this.config.grouped?`${this.i18n.get("SUM_TOTAL")||"SUM_TOTAL"} `:""}${this.config.title}`;t.push(`SELECT ${t.length} as ${Rt.ROWGROUPINDEX},\n '${e}' as ${Rt.ROWGROUP},\n '=' as ${Rt.OPERATION},\n 'SUM' as ${Rt.TYPE} ${i.length>0?",".concat(i):""}\n FROM ? `)}e.push(`SELECT ${t.length} as ${Rt.ROWGROUPINDEX},\n 'SUM_TOTAL' as ${Rt.ROWGROUP},\n '=' as ${Rt.OPERATION},\n 'SUM' as ${Rt.TYPE} ${i.length>0?",".concat(i):""}\n FROM ? `)}reduceResDrillByCategoryGroups(t,e){const i=new Map;return t.forEach((function(t){const s=t.rowNr+t.rowGroup+t.type+t.category;if(i.has(s)){const n=i.get(s);e.forEach((e=>{try{n[e]+=t[e]}catch(t){console.error("DataQuery: drill row aggregation failed",e,t)}}))}else i.set(s,t)})),[...i.values()]}injectDrillRowsToResultRows(t,e){const i=new Map;if(!0===this.config.grouped)t.forEach((function(t){e.forEach((function(e){const s=e.findIndex((e=>e.category===t.category&&e.rowGroup===t.rowGroup));if(s>=0){if(i.has(`${t.category}_${t.rowGroup}`)){const e=i.get(`${t.category}_${t.rowGroup}`)||0;i.set(`${t.category}_${t.rowGroup}`,e+1)}else i.set(`${t.category}_${t.rowGroup}`,1);t[Rt.ROWNR]=i.get(`${t.category}_${t.rowGroup}`),e.splice(s+t[Rt.ROWNR],0,t)}}))}));else{const s=this.findDuplicateSubCategories(t);t.forEach((function(t){e.forEach((function(e){const n=e.findIndex((e=>null!=e.category&&e.category===t.category));if(n>=0){if(i.has(`${t.category}`)){const e=i.get(`${t.category}`)||0;i.set(`${t.category}`,e+1)}else i.set(`${t.category}`,1);(1===t[Rt.ROWNR]||s.includes(t.subCategory))&&(t.subCategory=`${t.subCategory} (${t.rowGroup})`),e.splice(n+t[Rt.ROWNR],0,t)}}))}))}}createThereOfDrillRows(t,e,i,s){if(void 0===this.config.thereOf||0===this.config.thereOf.length)return;const n=[],r=[];this.config.thereOf.forEach((i=>{let s=!0,r="1 <> 1 OR ( ";null!=i.category&&0!==i.category.length&&i.category.trim()&&(r+=` ${Rt.CATEGORY} = '${i.category}'`,s=!1),null!=i.rowGroup&&0!==i.rowGroup.length&&i.rowGroup.trim()&&(r+=` ${s?"":"AND"} ${Rt.ROWGROUP} = '${i.rowGroup}'`,s=!1),null!=i.subCategory&&0!==i.subCategory.length&&i.subCategory.trim()&&(r+=` ${s?"":"AND"} ${Rt.SUBCATEGORY} = '${i.subCategory}'`),r+=")",n.push(`SELECT ROWNUM() AS ${Rt.ROWNR},\n null as operation,\n 'DRILLELEMENT' as ${Rt.TYPE},\n ${Rt.CATEGORY},\n ${Rt.SUBCATEGORY},\n ${Rt.ROWGROUP} as ${Rt.ROWGROUP},\n ${t}\n FROM ?\n WHERE ${r}\n GROUP BY ${Rt.ROWGROUP}, ${Rt.CATEGORY}, ${Rt.SUBCATEGORY}\n ORDER BY ${e[1]}`)})),n.forEach((function(t){r.push(...Yt(t,[i]))})),this.injectDrillRowsToResultRows(r,s)}calculateRelativeVariances(t,e){t.forEach((t=>{t.forEach((t=>{"GROUPHEAD"!==t[Rt.TYPE]&&e.forEach(((e,i)=>{t[i]=t[i]/t[e]}))}))}))}calculateColumnGroupRest(t,e){if(null==e||0===e.size)return;const i=new Map,s=new Map;e.forEach(((t,e)=>{const n=t,r=[];for(const t of n)r.push(`${e}##${t.name}`);i.set(e,r),s.set(`${e}##REST`,!1)})),t.forEach((t=>{t.forEach((t=>{"GROUPHEAD"!==t[Rt.TYPE]&&i.forEach(((e,i)=>{let n=0;e.forEach((e=>{void 0!==t[e]&&(n+=t[e])})),t[`${i}##REST`]=t[i]-n,0!==t[`${i}##REST`]&&s.set(`${i}##REST`,!0)}))}))}));const n=Array.from(s.entries()).filter((([t,e])=>!e)).map((([t])=>t));t.forEach((t=>{t.forEach((t=>{for(const e of n)delete t[e]}))}))}getRelativeScenarios(){const t=new Map;return this.config.scenarios.forEach((e=>{const i=this.createRelativeScenario(e);null!=i&&t.set(i.key,i.value)})),t}translateScenarioSQL(t,e,i){const s=new Ot(t);return $e.OPT===i||$e.OPTNOTOTAL===i?s.isValid?"dr"===s.type?`SUM(${s.base} - ${s.delta}) as ${t}, SUM(${s.delta}) as dr_${s.delta}`:`SUM(${s.base} - ${s.delta}) as ${t}`:e?`SUM(${t} * transformOperator(operation)) as ${t}, COUNT(ISNULL(${t})) as ${t}_cnt`:`SUM(${t}) as ${t}, COUNT(ISNULL(${t})) as ${t}_cnt`:s.isValid?"dr"===s.type?`SUM((${s.base} * transformOperator(operation)) - (${s.delta} * transformOperator(operation))) as ${t}, SUM(${s.delta} * transformOperator(operation)) as dr_${s.delta}`:`SUM((${s.base} * transformOperator(operation))- (${s.delta} * transformOperator(operation))) as ${t}`:`SUM(${t} * transformOperator(operation)) as ${t}, COUNT(ISNULL(${t})) as ${t}_cnt`}createOrderString(t){return[`${t.hierarchy.toString()} ${t.direction}`,`${t.hierarchy.toString()} ${xe.ASC===t.direction?xe.DESC:xe.ASC}`]}createRelativeScenario(t){const e=new Ot(t);return e.isValid&&"dr"===e.type?{key:`${t}`,value:`dr_${e.delta}`}:null}exctractScenarioNames(t){const e=[];return t.split(",").forEach((t=>t.length>=2?e.push(t.split("as")[1].trim()):null)),e}findDuplicateSubCategories(t){const e=t.map((t=>({count:1,subCategory:t.subCategory}))).reduce(((t,e)=>(t[e.subCategory]=(t[e.subCategory]||0)+e.count,t)),{});return Object.keys(e).filter((t=>e[t]>1))}createPartOfQuery(t,e){var i;const s=[];let n="1 <> 1 ",r=` ${Rt.ROWGROUP}`,a="ROWNUM()";return null===(i=this.config.partOf)||void 0===i||i.forEach((t=>{n+=`OR (${Rt.CATEGORY} = '${t.category}'`,null!=t.rowGroup&&0!==t.rowGroup.length&&t.rowGroup.trim()&&(n+=`and ${Rt.ROWGROUP} = '${t.rowGroup}'`),!1===this.config.grouped&&(r=` 'SUM_TOTAL' as ${Rt.ROWGROUP} `,a="1"),n+=")"})),s.push(`SELECT ${a} AS ${Rt.ROWNR},\n 'PARTELEMENT' as ${Rt.TYPE},\n ${Rt.CATEGORY},\n ${r},\n ${t}\n FROM ?\n WHERE ${n}\n GROUP BY ${Rt.ROWGROUP}, ${Rt.CATEGORY}, ${Rt.TYPE}\n ORDER BY ${e[1]}`),s}checkConfigForPartOf(){return null!=this.config.partOf&&0!==this.config.partOf.length}createThereOfDrillColumns(t,e,i){if(null==t||0===t.size)return;const s=[],n=[];t.forEach(((t,e)=>{let i="1 <> 1 ";t.forEach((t=>{i+=` or columnGroup = '${t.name}' `})),s.push(`SELECT 'ENTRY' as rowlevel,\n 'COLUMNGROUP' as columnlevel,\n rowGroup,\n category,\n columnGroup,\n '${e}' as scenario,\n sum(${e} * transformOperator(operation)) as val\n FROM ?\n WHERE ${i}\n GROUP BY rowlevel, rowGroup, category, columnGroup, scenario`),s.push(`SELECT 'ENTRY' as rowlevel,\n 'SUBGROUP' as columnlevel,\n rowGroup,\n category,\n columnGroup,\n columnSubGroup,\n '${e}' as scenario,\n sum(${e} * transformOperator(operation)) as val\n FROM ?\n WHERE ${i}\n GROUP BY rowlevel, rowGroup, category, columnGroup, columnSubGroup, scenario`),s.push(`SELECT 'DRILLELEMENT' as rowlevel,\n 'COLUMNGROUP' as columnlevel,\n rowGroup,\n category,\n subCategory,\n columnGroup,\n '${e}' as scenario,\n sum(${e} * transformOperator(operation)) as val\n FROM ?\n WHERE ${i}\n GROUP BY rowlevel, rowGroup, category, subCategory, columnGroup, scenario`),s.push(`SELECT 'DRILLELEMENT' as rowlevel,\n 'SUBGROUP' as columnlevel,\n rowGroup,\n category,\n subCategory,\n columnGroup,\n columnSubGroup,\n '${e}' as scenario,\n sum(${e} * transformOperator(operation)) as val\n FROM ?\n WHERE ${i}\n GROUP BY rowlevel, rowGroup, category, subCategory, columnGroup, columnSubGroup, scenario`),s.push(`SELECT 'GROUP_SUM' as rowlevel,\n 'COLUMNGROUP' as columnlevel,\n rowGroup,\n columnGroup,\n '${e}' as scenario,\n sum(${e} * transformOperator(operation)) as val\n FROM ?\n WHERE ${i}\n GROUP BY rowlevel, rowGroup, columnGroup, scenario`),s.push(`SELECT 'GROUP_SUM' as rowlevel,\n 'SUBGROUP' as columnlevel,\n rowGroup,\n columnGroup,\n columnSubGroup,\n '${e}' as scenario,\n sum(${e} * transformOperator(operation)) as val\n FROM ?\n WHERE ${i}\n GROUP BY rowlevel, rowGroup, columnGroup, columnSubGroup, scenario`),s.push(`SELECT 'SUM' as rowlevel,\n 'COLUMNGROUP' as columnlevel,\n columnGroup,\n '${e}' as scenario,\n sum(${e} * transformOperator(operation)) as val\n FROM ?\n WHERE ${i}\n GROUP BY rowlevel, columnGroup, scenario`),s.push(`SELECT 'SUM' as rowlevel,\n 'SUBGROUP' as columnlevel,\n columnGroup,\n columnSubGroup,\n '${e}' as scenario,\n sum(${e} * transformOperator(operation)) as val\n FROM ?\n WHERE ${i}\n GROUP BY rowlevel, columnGroup, columnSubGroup, scenario`)}));for(const t of s)n.push(...Yt(t,[e]));this.injectDrillColumnsToResultRows(n,i)}injectDrillColumnsToResultRows(t,e){const i="##";for(const s of t)for(const t of e)for(const e of t)e.type===s.rowlevel&&("ENTRY"===s.rowlevel?"COLUMNGROUP"===s.columnlevel&&e.category===s.category?e[s.scenario+i+s.columnGroup]=s.val:"SUBGROUP"===s.columnlevel&&e.category===s.category&&(e[s.scenario+i+s.columnGroup+i+s.columnSubGroup]=s.val):"DRILLELEMENT"===s.rowlevel?"COLUMNGROUP"===s.columnlevel&&e.category===s.category&&e.subCategory===s.subCategory?e[s.scenario+i+s.columnGroup]=s.val:"SUBGROUP"===s.columnlevel&&e.category===s.category&&e.subCategory===s.subCategory?e[s.scenario+i+s.columnGroup+i+s.columnSubGroup]=s.val:"COLUMNGROUP"===s.columnlevel&&e.category===s.category&&e.subCategory===`${s.subCategory} (${s.rowGroup})`?e[s.scenario+i+s.columnGroup]=s.val:"SUBGROUP"===s.columnlevel&&e.category===s.category&&e.subCategory===`${s.subCategory} (${s.rowGroup})`&&(e[s.scenario+i+s.columnGroup+i+s.columnSubGroup]=s.val):("SUM"===s.rowlevel||"GROUP_SUM"===s.rowlevel)&&("COLUMNGROUP"===s.columnlevel&&e.category===s.category&&e.subCategory===s.subCategory&&(e[s.scenario+i+s.columnGroup]=s.val),"SUBGROUP"===s.columnlevel&&e.category===s.category&&e.subCategory===s.subCategory&&(e[s.scenario+i+s.columnGroup+i+s.columnSubGroup]=s.val)))}}class Ta{constructor(){this.normalizedHeader=[]}createHeader(t,e,i,s,n,r){const a=[];this.normalizedHeader=this.normalizeHeader(t,e);const o=new ha(0,0,De.HEADER),h=new ha(1,0,De.SEPERATORLINE);for(const t of this.normalizedHeader)o.createElement(Mt.translateScenarioLabel(t.name,i),t.type,this.createColumnType(t),null,this.setHeaderPrefix(t,i,s,n,r),null,null,null,null),h.createElement(null,t.type,this.createColumnType(t),null,null,null,null,null,null);return a.push(o),a.push(h),a}setHeaderPrefix(t,e,i,s,n){let r="";return"category"===t.name&&n&&(0===i.prefix.length&&0===s.length||(r=Mt.translateScenarioLabel("in",e)+" "+i.prefix+s)),t.order&&(r+=Mt.translateScenarioLabel("ORDER_"+t.order,e)),r}normalizeHeader(t,e){let i=[{name:Rt.CATEGORY,group:Rt.CATEGORY,type:Rt.CATEGORY,order:void 0}];return $e.OPT!==t&&$e.OPTNOTOTAL!==t||(i=[{name:Rt.OPERATION,group:Rt.OPERATION,type:Rt.OPERATION,order:void 0},{name:Rt.CATEGORY,group:Rt.CATEGORY,type:Rt.CATEGORY,order:void 0}]),[...i,...e]}createBodyRows(t,e,i){const s=[];let n=-1;const r=new ya(t,e).execute(i),a=this.calculateColumnStatistics(r,t.barColumns);for(const i of r)n+=1,s.push(...this.createRow(t.i18n,e,t.scenariosUnitType,i,n,-1,t.categoryWidth,t.measureScale,t.barColumns,a));return s}calculateColumnStatistics(t,e){const i=new Map;if(!e||0===e.length)return i;const s=new Map;for(const t of e)i.set(t,{min:1/0,max:-1/0,absMax:0,median:0}),s.set(t,[]);for(const n of t)for(const t of n)for(const n of e){const e=this.extractColumnValue(t,n);if(null!==e&&!isNaN(e)){const t=i.get(n);t.min=Math.min(t.min,e),t.max=Math.max(t.max,e),s.get(n).push(Math.abs(e))}}for(const[t,e]of i){e.min!==1/0&&e.max!==-1/0||(e.min=0,e.max=0),e.absMax=Math.max(Math.abs(e.min),Math.abs(e.max));const n=s.get(t);if(n.length>0){n.sort(((t,e)=>t-e));const t=Math.floor(n.length/2);e.median=n.length%2==0?(n[t-1]+n[t])/2:n[t]}i.set(t,e)}return i}extractColumnValue(t,e){if(void 0!==t[e]){const i=Number(t[e]);return isNaN(i)?null:i}for(const i of Object.keys(t))if(i===e||i.endsWith("##"+e)||i===e+"##"+e){const e=Number(t[i]);if(!isNaN(e))return e}return null}createRow(t,e,i,s,n,r,a,o,h,l){var c;const u=[];for(const f of s){const d=f[Rt.ROWGROUP],p=f[Rt.SUBCATEGORY],b=f[Rt.TYPE],v=f[Rt.ROWNR]>=2,E=this.createDetailRow(b,r+=1,n,s.length);for(const s of this.normalizedHeader){const n=this.getRawDataRowElement(f,s),r=null!==(c=null==h?void 0:h.includes(s.type))&&void 0!==c&&c,u=r?null==l?void 0:l.get(s.type):void 0;E.createElement(this.translateSumCellLabel(t,e,n,d,p,b,s.type),s.type,this.createColumnType(s),this.setCellType(s.type,i),this.translateCellPrefix(e,b,s.type),this.translateScenarioCSS(s.type,n),v,a,null==o?void 0:o.value,r,u)}u.push(E)}return u}getRawDataRowElement(t,e){return e.name===e.group&&e.name===e.type?t[e.name]:e.name===e.group&&e.name!==e.type?t[e.type+"##"+e.name]:t[e.type+"##"+e.group+"##"+e.name]}createDetailRow(t,e,i,s){switch(t){case De.GROUPHEAD:return new ha(e,i,De.HEADER);case De.SUM:case De.GROUPSUM:return new ha(s+2,i,De.SUM);case De.DRILLELEMENT:return new ha(s+2,i,De.DRILLELEMENT);case De.PARTELEMENT:return new ha(s+2,i,De.PARTELEMENT);default:return new ha(e,i,De.STANDARD)}}translateSumCellLabel(t,e,i,s,n,r,a){return!1===Number.isNaN(Number(i))||this.isOperationColumn(a)?i:this.isGroupHeadCategory(r,a)||this.isEntryCategory(r,a)?t===J.ALL?`${e.get(i)||i}`:i:this.isDrillElementCategory(r,a)?t===J.ALL?`${e.get(n)||n}`:`${n}`:this.isPartElementCategory(r,a)?t===J.ALL||"SUM_TOTAL"===s?`${e.get(s)||s}`:`${s}`:this.isSumElementCategory(r,a)?t===J.ALL||"SUM_TOTAL"===s?`${e.get(s)||s}`:s:"GROUPHEAD"===r&&null==i?i:Number.isNaN(Number(i))?"-":Number(i)}isOperationColumn(t){return"operation"===t}translateScenarioCSS(t,e){const i=new Ot(t);let s="pos";return e<0&&(s="neg"),i.isValid?s+"_"+i.direction+("dr"===i.type?" relative_variance":""):t}setCellType(t,e){if("category"===t)return"";let i;const s=new Ot(t);return e===z.PERCENT?(i="percent",s.isValid&&"d"===s.type&&(i="decimal")):(i="decimal",s.isValid&&"dr"===s.type&&(i="percent")),i}isDrillElementCategory(t,e){return"DRILLELEMENT"===t&&"category"===e}isPartElementCategory(t,e){return"PARTELEMENT"===t&&"category"===e}isSumElementCategory(t,e){return("GROUP_SUM"===t||"SUM"===t)&&"category"===e}isEntryCategory(t,e){return"ENTRY"===t&&"category"===e}isGroupHeadCategory(t,e){return"GROUPHEAD"===t&&"category"===e}translateCellPrefix(t,e,i){return this.isOperationColumn(i)||this.isGroupHeadCategory(e,i)||this.isEntryCategory(e,i)?null:this.isDrillElementCategory(e,i)?`${t.get("there_of")} `:this.isPartElementCategory(e,i)?`${t.get("part_of")} `:null}createColumnType(t){return t.name===t.group&&t.name===t.type?"base":t.name===t.group?"columnGroup":"columnSubGroup"}}class Sa{constructor(t,e,i){this.data=[],this.headerRows=[],this.bodyRows=[],this.ruleSet=t||new cr,this.dataSetFactory=new Ta,this.config=this.initConfig(i),this.i18n=this.initI18n(new Map),this.setData(e,i.filter),this.state=Me.DIRTY}setI18n(t){this.i18n=this.initI18n(t)}initI18n(t){const e=new Map([["",""],["SEPERATOR_WS",", "],["in","in"],["ORDER_asc","↑"],["ORDER_desc","↓"],["ac1","AC"],["pp1","PY"],["fc1","FC"],["pl1","PL"],["ac2","AC2"],["pp2","PY2"],["fc2","FC2"],["pl2","PL2"],["ac3","AC3"],["pp3","PY3"],["fc3","FC3"],["pl3","PL3"],["ac4","AC4"],["pp4","PY4"],["fc4","FC4"],["pl4","PL4"],["in","in"],["category"," "],["operation"," "],["there_of","davon"],["part_of","in % von"],["ibcssymbol_delta_ac","Δ{%}"],["ibcssymbol_delta_generic","Δ({%})"],["ibcssymbol_delta_ac_relative","Δ{%}%"],["ibcssymbol_delta_generic_relative","Δ({%})%"],["SUM_TOTAL","❖"]]);return this.state=Me.DIRTY,new Map([...e,...t||new Map])}initConfig(t){this.state=Me.DIRTY;const e=t,i=this;return t.scenarios.sort(((t,e)=>i.ruleSet.getScenarioSorIndex(t)-i.ruleSet.getScenarioSorIndex(e))),e}setConfig(t){this.config=this.initConfig(t)}setData(t,e){if(null==t)return;if(null!=e&&e.length>0)try{this.data=Yt(`SELECT * FROM ? WHERE ${e}`,[t])}catch(i){console.error("Table: filter query failed, using unfiltered data",e,i),this.data=t}else this.data=t;const i=this.normalizeScenarios(this.config.scenarios,this.config.categoryThereOf,this.config.sortOrder);this.headerRows=this.dataSetFactory.createHeader(this.config.type,i,this.i18n,this.config.measureScale,this.config.measureUnit,this.config.showMeasureScale),this.bodyRows=this.dataSetFactory.createBodyRows(this.config,this.i18n,this.data),this.state=Me.UP_TO_DATE}update(){const t=this.normalizeScenarios(this.config.scenarios,this.config.categoryThereOf,this.config.sortOrder);this.headerRows=this.dataSetFactory.createHeader(this.config.type,t,this.i18n,this.config.measureScale,this.config.measureUnit,this.config.showMeasureScale),this.bodyRows=this.dataSetFactory.createBodyRows(this.config,this.i18n,this.data),this.state=Me.UP_TO_DATE}getHeader(){return this.state===Me.DIRTY&&this.update(),this.headerRows}getBody(){return this.state===Me.DIRTY&&this.update(),this.bodyRows}normalizeScenarios(t,e,i){var s;const n=[];for(const r of t){if(null==e?void 0:e.has(r)){const t=e.get(r);for(const e of t){n.push({name:e.name,group:e.name,type:r,order:void 0});for(const t of e.subGroups)n.push({name:t,group:e.name,type:r,order:void 0})}n.push({name:"REST",group:"REST",type:r,order:void 0})}let t;(null===(s=null==i?void 0:i.hierarchy)||void 0===s?void 0:s.at(0))===r&&(t=i.direction),n.push({name:r,group:r,type:r,order:t})}return n}hasNoData(){return 0===this.data.length}}class Aa{constructor(){this.title="",this.scenarios=[],this.scenariosUnitType=z.DECIMAL,this.grouped=!1,this.showGroupTitle=!0,this.thereOf=[],this.categoryThereOf=new Map,this.partOf=[],this.sortOrder=new ht(new Bn).default(),this.type=$e.LIST,this.limit=0,this.i18n=J.ALL,this.categoryWidth=K.W25,this.measureScale=new Gn,this.measureUnit="",this.measureType=Q.VOLUME,this.showMeasureScale=!0,this.filter="",this.barColumns=[]}}class Oa{constructor(t,e,i,s){this.tableDrillGroupAdapter=t,this.stringAdapter=e,this.orderAdapter=i,this.dataSet=s}adapt(t){const e=new Aa;return ot.isString(t.title)&&(e.title=t.title),ot.isArray(t.scenarios)&&(e.scenarios=at.adaptArray(t.scenarios,this.stringAdapter)),ot.isExisting(t.scenariosUnitType)&&(e.scenariosUnitType=t.scenariosUnitType),ot.isBoolean(t.grouped)&&(e.grouped=t.grouped),ot.isBoolean(t.showGroupTitle)&&(e.showGroupTitle=t.showGroupTitle),ot.isBoolean(t.showMeasureScale)&&(e.showMeasureScale=t.showMeasureScale),ot.isArray(t.thereOf)&&(e.thereOf=at.adaptArray(t.thereOf,this.tableDrillGroupAdapter)),ot.isExisting(t.categoryThereOf)&&(e.categoryThereOf=t.categoryThereOf),ot.isArray(t.partOf)&&(e.partOf=at.adaptArray(t.partOf,this.tableDrillGroupAdapter)),ot.isExisting(t.order)&&(e.sortOrder=this.orderAdapter.adapt(t.order)),ot.isExisting(t.type)&&(e.type=t.type),ot.isNumber(t.limit)&&(e.limit=t.limit),ot.isExisting(t.i18n)&&(e.i18n=t.i18n),ot.isExisting(t.categoryWidth)&&(e.categoryWidth=t.categoryWidth),ot.isExisting(t.measureScale)&&(e.measureScale=Fn.calculateMeasureScale(this.dataSet,e.scenarios,t.measureScale)),ot.isExisting(t.measureType)&&(e.measureType=t.measureType),ot.isString(t.measureUnit)&&(e.measureUnit=t.measureUnit),ot.isString(t.filter)&&(e.filter=t.filter.trim()),ot.isArray(t.barColumns)&&(e.barColumns=t.barColumns),e}default(){return new Aa}}class Ra{constructor(){this.rowGroup="",this.category="",this.subCategory="",this.partOf=""}}class Na{constructor(){}adapt(t){const e=new Ra;return ot.isString(t.rowGroup)&&(e.rowGroup=t.rowGroup),ot.isString(t.category)&&(e.category=t.category),ot.isString(t.subCategory)&&(e.subCategory=t.subCategory),ot.isString(t.partOf)&&(e.partOf=t.partOf),e}default(){return new Ra}}class _a{constructor(){this.operation="+"}addRowGroup(t,e){this.rowGroup=t,this.rowGroupIndex=e}addCategory(t,e){this.category=t,this.categoryIndex=e}addSubCategory(t,e){this.subCategory=t,this.subCategoryIndex=e}addColumnGroup(t,e){this.columnGroup=t,this.columnGroupIndex=e}addSubColumnGroup(t,e){this.columnSubGroup=t,this.columnSubGroupIndex=e}}class Ca{constructor(){}adapt(t){const e=new _a;return ot.isOperator(t.operation)&&(e.operation=t.operation),ot.isNumber(t.rowGroupIndex)&&ot.isString(t.rowGroup)&&e.addRowGroup(t.rowGroup,t.rowGroupIndex),ot.isNumber(t.categoryIndex)&&ot.isString(t.category)&&e.addCategory(t.category,t.categoryIndex),ot.isNumber(t.subCategoryIndex)&&ot.isString(t.subCategory)&&e.addSubCategory(t.subCategory,t.subCategoryIndex),ot.isNumber(t.columnGroupIndex)&&ot.isString(t.columnGroup)&&e.addColumnGroup(t.columnGroup,t.columnGroupIndex),ot.isNumber(t.columnSubGroupIndex)&&ot.isString(t.columnSubGroup)&&e.addSubColumnGroup(t.columnSubGroup,t.columnSubGroupIndex),this.setActualValues(t,e),this.setPlanValues(t,e),this.setPreviousPeriodValues(t,e),this.setForecastValues(t,e),e}default(){return new _a}setActualValues(t,e){ot.isNumber(t.ac1)&&(e.ac1=t.ac1),ot.isNumber(t.ac2)&&(e.ac2=t.ac2),ot.isNumber(t.ac3)&&(e.ac3=t.ac3),ot.isNumber(t.ac4)&&(e.ac4=t.ac4)}setPlanValues(t,e){ot.isNumber(t.pp1)&&(e.pp1=t.pp1),ot.isNumber(t.pp2)&&(e.pp2=t.pp2),ot.isNumber(t.pp3)&&(e.pp3=t.pp3),ot.isNumber(t.pp4)&&(e.pp4=t.pp4)}setPreviousPeriodValues(t,e){ot.isNumber(t.pl1)&&(e.pl1=t.pl1),ot.isNumber(t.pl2)&&(e.pl2=t.pl2),ot.isNumber(t.pl3)&&(e.pl3=t.pl3),ot.isNumber(t.pl4)&&(e.pl4=t.pl4)}setForecastValues(t,e){ot.isNumber(t.fc1)&&(e.fc1=t.fc1),ot.isNumber(t.fc2)&&(e.fc2=t.fc2),ot.isNumber(t.fc3)&&(e.fc3=t.fc3),ot.isNumber(t.fc4)&&(e.fc4=t.fc4)}}const La=class{constructor(e){t(this,e),this.data=[],this.tableTitle="SUM_TOTAL",this.scenarios=[],this.scenariosDataFormat=z.DECIMAL,this.grouped=!1,this.limit=0,this.showGroupTitle=!0,this.thereof=[],this.partof=[],this.order={hierarchy:[],direction:xe.ASC},this.categorythereof=new Map,this.type=$e.LIST,this.categoryWidth=K.INF,this.dataFormatDigits={percent:2,decimal:1},this.i18n=new Map,this.i18nMode=J.ALL,this.measureScale="_",this.measureUnit="",this.showMeasureScale=!0,this.measureType=Q.VOLUME,this.filter="",this.barColumns=[],this.barColumnMaxWidth=30,this.unitScaling=.01,this.percentageScaling=.5,this.scaleFactor=1,this.componentDataFormatDigits=new fr,this.componentStyle=v(this)}render(){return e(i,null,(()=>{if(void 0!==this.table){if(this.table.hasNoData()){const t=this.i18n.get("NO_DATA")||"==No Data==";return e("p",{class:"warning"},t)}return e("table",null,e("thead",null,this.table.getHeader().map((t=>e("tr",{class:t.cssStyle},t.getCells().map((t=>e("th",{colSpan:t.colSpan,class:t.cssStyle},t.getAsHeaderList().map(((i,s,n)=>e("span",null,s===n.length-1?e("span",{class:" "===i?"table-footer":""},i,t.drawPrefix()," "):e("span",null,i,t.drawPrefix(),e("br",null)))))))))))),e("tbody",null,this.table.getBody().map((t=>e("tr",{class:t.cssStyle},null==t?void 0:t.getCells().map((i=>e("td",{colSpan:i.colSpan,class:i.type?`${i.cssStyle} ${i.type}`:i.cssStyle},null!=i.prefix?e("span",{class:i.cssStyle+" "+i.prefixStyle},i.drawPrefix()):"",i.isBarChart&&i.columnStats&&t.type!==De.SUM?e(ga,{value:i.value,scenario:i.key,columnStats:i.columnStats,height:18*this.scaleFactor,isRelative:i.key.startsWith("dr"),isPositiveGood:i.key.endsWith("_pos"),measureScale:i.measureScale,maxBarWidth:this.barColumnMaxWidth,styles:this.barChartStyles}):i.draw(this.componentDataFormatDigits)))))))))}})())}componentWillRender(){const t=this.prepareConfig(),e=this.prepareData();this.componentDataFormatDigits=(new dr).adapt(this.dataFormatDigits),this.table=new Sa(new cr,e,t),this.table.setI18n(this.i18n),this.barChartStyles=this.prepareBarChartStyles()}prepareConfig(){return new Oa(new Na,new Bn,new ht(new Bn),this.data).adapt({title:this.tableTitle,scenarios:this.scenarios,scenariosUnitType:this.scenariosDataFormat,grouped:this.grouped,showGroupTitle:this.showGroupTitle,thereOf:this.thereof,partOf:this.partof,categoryThereOf:this.categorythereof,order:this.order,type:this.type,limit:this.limit,i18n:this.i18nMode,categoryWidth:this.categoryWidth,measureScale:this.measureScale,measureUnit:this.measureUnit,measureType:this.measureType,showMeasureScale:this.showMeasureScale,filter:this.filter,barColumns:this.barColumns})}prepareData(){return at.adaptArray(this.data,new Ca)}prepareBarChartStyles(){return this.componentStyle((t=>{var e,i,s,n,r,a,o,h,l,c,u,f,d,p,b,v,E,m,g,w,y,T,S,A,O,R;const N=null===(e=t["bn-chart-time"])||void 0===e?void 0:e.varianceStyles,_=null===(i=t["bn-chart-time"])||void 0===i?void 0:i.barStyles;return{positive:{stroke:(null===(s=null==N?void 0:N.pos)||void 0===s?void 0:s.stroke)||"#008f96",fill:(null===(n=null==N?void 0:N.pos)||void 0===n?void 0:n.fill)||"#008f96",fillpattern:(null===(r=null==N?void 0:N.pos)||void 0===r?void 0:r.fillpattern)||"solid"},negative:{stroke:(null===(a=null==N?void 0:N.neg)||void 0===a?void 0:a.stroke)||"#ff0000",fill:(null===(o=null==N?void 0:N.neg)||void 0===o?void 0:o.fill)||"#ff0000",fillpattern:(null===(h=null==N?void 0:N.neg)||void 0===h?void 0:h.fillpattern)||"solid"},neutral:{stroke:(null===(l=null==N?void 0:N.neu)||void 0===l?void 0:l.stroke)||"#808080",fill:(null===(c=null==N?void 0:N.neu)||void 0===c?void 0:c.fill)||"#808080",fillpattern:(null===(u=null==N?void 0:N.neu)||void 0===u?void 0:u.fillpattern)||"outlined"},scenarios:{ac:{stroke:(null===(f=null==_?void 0:_.ac)||void 0===f?void 0:f.stroke)||"#404040",fill:(null===(d=null==_?void 0:_.ac)||void 0===d?void 0:d.fill)||"#404040",fillpattern:(null===(p=null==_?void 0:_.ac)||void 0===p?void 0:p.fillpattern)||"solid"},pp:{stroke:(null===(b=null==_?void 0:_.pp)||void 0===b?void 0:b.stroke)||"#A6A6A6",fill:(null===(v=null==_?void 0:_.pp)||void 0===v?void 0:v.fill)||"#A6A6A6",fillpattern:(null===(E=null==_?void 0:_.pp)||void 0===E?void 0:E.fillpattern)||"solid"},fc:{stroke:(null===(m=null==_?void 0:_.fc)||void 0===m?void 0:m.stroke)||"#404040",fill:(null===(g=null==_?void 0:_.fc)||void 0===g?void 0:g.fill)||"#ffffff",fillpattern:(null===(w=null==_?void 0:_.fc)||void 0===w?void 0:w.fillpattern)||"hatched"},pl:{stroke:(null===(y=null==_?void 0:_.pl)||void 0===y?void 0:y.stroke)||"#404040",fill:(null===(T=null==_?void 0:_.pl)||void 0===T?void 0:T.fill)||"#ffffff",fillpattern:(null===(S=null==_?void 0:_.pl)||void 0===S?void 0:S.fillpattern)||"outlined"}},fontColor:(null===(A=t.global)||void 0===A?void 0:A.fontColor)||"#000000",fontSize:.85*((null===(O=t.global)||void 0===O?void 0:O.fontSizePx)||13.3333)*this.scaleFactor,fontFamily:(null===(R=t.global)||void 0===R?void 0:R.fontFamily)||"'Noto Sans', sans-serif",unitScaling:this.unitScaling>0?this.unitScaling:this.autoUnitScaling(),percentageScaling:this.percentageScaling>0?this.percentageScaling:this.autoPercentageScaling(),scaleFactor:this.scaleFactor}}))}autoUnitScaling(){const t=this.componentStyle((t=>{var e;return.85*((null===(e=t.global)||void 0===e?void 0:e.fontSizePx)||13.3333)*this.scaleFactor})),e=this.barColumnMaxWidth*t*.8,i=this.getMaxAbsValue();return i<=0||t<=0?.01:e/(i*t)}autoPercentageScaling(){const t=this.componentStyle((t=>{var e;return.85*((null===(e=t.global)||void 0===e?void 0:e.fontSizePx)||13.3333)*this.scaleFactor})),e=.8*Math.round(.67*this.barColumnMaxWidth*t),i=this.getMaxRelativeValue();return i<=0||t<=0?.5:e/(i*t)}getMaxAbsValue(){if(!this.table)return 0;let t=0;for(const e of this.table.getBody())if(e.type!==De.SUM)for(const i of e.getCells())i.isBarChart&&i.columnStats&&!i.key.startsWith("dr")&&(t=Math.max(t,i.columnStats.absMax));return t}getMaxRelativeValue(){if(!this.table)return 0;let t=0;for(const e of this.table.getBody())if(e.type!==De.SUM)for(const i of e.getCells())i.isBarChart&&i.columnStats&&i.key.startsWith("dr")&&(t=Math.max(t,100*i.columnStats.absMax));return t}get element(){return s(this)}};La.style=':host{position:relative;display:inline-block}table{background-color:var(--bn-font-background, white);font-size:var(--bn-font-size, 1em);color:var(--bn-font-color, black);font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);border-spacing:0.3em 0}thead{border-style:none}tr:first-child td{border-top:none;padding-top:0.5em}td.ac1,td.ac2,td.ac3,td.ac4,td.pp1,td.pp2,td.pp3,td.pp4,td.pl1,td.pl2,td.pl3,td.pl4,td.fc1,td.fc2,td.fc3,td.fc4,td.share,td.variance,td.pos_pos,td.pos_neg,td.neg_pos,td.neg_neg,td.pos_neutral,td.neg_neutral{text-align:right}.category-w100{min-width:100em;max-width:100em}.category-w50{min-width:50em;max-width:50em}.category-w25{min-width:25em;max-width:25em}.category-w20{min-width:20em;max-width:20em}.category-w15{min-width:15em;max-width:15em}.category-w10{min-width:10em;max-width:10em}.category-w5{min-width:5em;max-width:5em}.prefix-second{color:transparent;font-style:normal}.prefix-first{font-style:normal}th{border-bottom:0.1em solid black;text-align:right;font-weight:normal;vertical-align:text-top}td.columnGroup,th.columnGroup{font-size:0.6em}td.columnSubGroup,th.columnSubGroup{font-size:0.6em;border-spacing:0em 0;font-style:italic}td.base,th.base{font-style:normal}th.ofit,td.ofit,tr.ofit,th.partof,td.partof,tr.partof{font-size:0.6em;font-style:italic}td.ofit,td.partof{font-size:0.6em;font-style:italic}th.ofit td,tr.ofit td,th.partof td,tr.partof td{border-top:0em solid black;padding-left:1em}th.ofit share,th.partof share,tr.share td{border-top:0em solid black}th.share,tr.share,td.share{font-size:0.6em;font-style:italic}th.filler{border-bottom:0em solid black;text-align:right}td.filler{border-top:0em none !important;border-bottom:0em none;text-align:right}th.group{text-align:center;border-spacing:1em 0}th.headerlabel{border-bottom:0em none black;padding-bottom:0em}td.variance:after{content:"%"}td.relative_variance{font-style:italic}td.percent{font-style:italic;text-align:right}td.decimal{text-align:right}td.pos_pos{color:#008f96}td.neg_pos{color:#ff0000}td.pos_neg{color:#ff0000}td.neg_neg{color:#008f96}td.pos_pos:before{content:"+"}td.pos_neg:before{content:"+"}td.pos_neu:before{content:"+"}th.ac1,th.ac2,th.ac3,th.ac4{padding-top:0em;border-bottom:0.3em solid black}th.pp1,th.pp2,th.pp3,th.pp4{padding-top:0em;border-bottom:0.3em solid grey}th.pl1,th.pl2,th.pl3,th.pl4{padding-top:0em;border-bottom:0.3em double black}th.fc1,th.fc2,th.fc3,th.fc4{border-bottom:0.3em solid;border-image:repeating-linear-gradient(-45deg, white, white, black, white, white 0.3em) 2}td.colsum{font-weight:bold}th.colsum{padding-top:0em;font-weight:bold}tr.sum td{border-top:0.1em solid black;font-weight:bold;padding-bottom:0.5em}tr.groupheader td{border-top:0em dotted #ddd;padding-top:0.5em;font-weight:bold;font-style:italic}tr.begingroup td{border-top:0em dotted #ddd;padding-top:0.5em}th.begin-group{padding-left:0.75em}th.end-group{padding-left:0.75em}td{box-sizing:border-box;-webkit-box-sizing:border-box;border-top:0.1em dashed #ddd;padding-left:0.5em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.table-footer{font-size:0.6em}.cell-bar-chart{display:inline-block;vertical-align:middle}.bar-chart-empty{color:#999}td:has(.cell-bar-chart){padding:0 0.25em;vertical-align:middle}td:has(.cell-bar-chart).pos_pos:before,td:has(.cell-bar-chart).pos_neg:before,td:has(.cell-bar-chart).pos_neu:before{content:none}td:has(.cell-bar-chart).variance:after{content:none}';class Ia{constructor(){}createMeasures(t,e,i){if(this.allMeasuresUseSameUnit(t)){const s=t.length;let n="",r="";for(let a=0;a<s;a++){let o="";a>0&&(o=e.get("SEPERATOR_WS")),s>1&&a===s-1&&(o=e.get("CONNECTOR_WS")),i===J.ALL?(n=(e.get(n)||n)+o+(e.get(t[a].name)||t[a].name),r=e.get(t[a].unit)||t[a].unit):(n=n+o+t[a].name,r=t[a].unit)}return[{name:n,unit:r}]}return t}createDimension(t,e,i,s,n){let r="";void 0!==e&&(r=(new lt).getDateLinkString(e.start,e.end,e.link,e.format,n));return r+t.map((t=>{let e="";return null!=i&&null!=i.hierarchy&&i.hierarchy.find((e=>e===t))&&(e=s.get("asc"===i.direction?"ORDER_asc":"ORDER_desc")),"".concat(" ",Mt.translateScenarioLabel(t,s),e)})).toString()}allMeasuresUseSameUnit(t){const e=new Map;return t.forEach((function(t){e.set(t.unit,!0)})),1===e.size}}class ka{constructor(){this.businessunit="",this.measures=[],this.scenarios=[],this.i18nMode=J.ALL,this.intervalSpanLimit=32}}class Ma{constructor(t,e,i,s){this.measureEntryAdapter=t,this.timePeriodAdapter=e,this.orderAdapter=i,this.stringAdapter=s}adapt(t){const e=new ka;return ot.isString(t.businessunit)&&(e.businessunit=t.businessunit),ot.isArray(t.measures)&&(e.measures=at.adaptArray(t.measures,this.measureEntryAdapter)),ot.isArray(t.scenarios)&&(e.scenarios=at.adaptArray(t.scenarios,this.stringAdapter)),ot.isExisting(t.timeperiod)&&(e.timeperiod=this.timePeriodAdapter.adapt(t.timeperiod)),ot.isNumber(t.intervalSpanLimit)&&(e.intervalSpanLimit=t.intervalSpanLimit),ot.isExisting(t.i18nMode)&&(e.i18nMode=t.i18nMode),ot.isExisting(t.order)&&(e.order=this.orderAdapter.adapt(t.order)),e}default(){return new ka}}var $a;!function(t){t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.DIRTY=1]="DIRTY"}($a||($a={}));class xa{constructor(t){this.i18n=new Map,this.unit="",this.measures=[],this.dimension="",this.config=new ka,this.state=$a.DIRTY,this.ruleSet=t||new cr,this.dataSetFactory=new Ia,this.state=$a.DIRTY,this.setI18n(new Map)}setI18n(t){this.state=$a.DIRTY;const e=new Map([["SEPERATOR_WS",", "],["in","in"],["ORDER_asc","↑"],["ORDER_desc","↓"],["ac1","AC"],["pp1","PY"],["fc1","FC"],["pl1","PL"],["ac2","AC2"],["pp2","PY2"],["fc2","FC2"],["pl2","PL2"],["ac3","AC3"],["pp3","PY3"],["fc3","FC3"],["pp3","PL3"],["ac4","AC4"],["py4","PY4"],["fc4","FC4"],["pp4","PL4"],["category"," "],["operation"," "],["there_of","davon"],["part_of","in % von"],["ibcssymbol_delta_ac","Δ{%}"],["ibcssymbol_delta_generic","Δ({%})"],["ibcssymbol_delta_ac_relative","Δ{%}%"],["ibcssymbol_delta_generic_relative","Δ({%})%"],["SUM_TOTAL","❖"],["CONNECTOR_WS"," und "]]);this.i18n=new Map([...e,...t||new Map])}update(){return $a.DIRTY===this.state&&(this.unit=this.config.businessunit,this.measures=this.dataSetFactory.createMeasures(this.config.measures,this.i18n,this.config.i18nMode),this.dimension=this.dataSetFactory.createDimension(this.config.scenarios,this.config.timeperiod,this.config.order,this.i18n,this.config.intervalSpanLimit),this.state=$a.UP_TO_DATE),this}setConfig(t){this.config=this.initConfig(t)}initConfig(t){this.state=$a.DIRTY;const e=t,i=this;return t.scenarios.sort(((t,e)=>i.ruleSet.getScenarioSorIndex(t)-i.ruleSet.getScenarioSorIndex(e))),e}}class Da{constructor(t="",e=""){this.name=t,this.unit=e}}class Pa{construnctor(){}adapt(t){const e=new Da;return ot.isString(t.name)&&(e.name=t.name),ot.isString(t.unit)&&(e.unit=t.unit),e}default(){return new Da("","")}}class Ua{constructor(t=rt.now(),e=rt.now(),i=P.AUTO,s=nt.AUTO){this.start=t,this.end=e,this.format=i,this.link=s}}class Ga{construnctor(){}adapt(t){const e=new Ua;return ot.isDate(t.start)&&(e.start=t.start),ot.isDate(t.end)&&(e.end=t.end),ot.isExisting(t.format)&&(e.format=t.format),ot.isExisting(t.link)&&(e.link=t.link),e}default(){return new Ua}}const Fa=class{constructor(e){t(this,e),this.businessUnit="",this.scenarios=[],this.measures=[],this.intervalSpanLimit=28,this.order={hierarchy:[],direction:L.ASC},this.i18n=new Map,this.i18nMode=J.ALL,this.title=new xa(new cr)}async setBusinessUnit(t){this.businessUnit=t}async setProps(t){Object.keys(t).forEach((e=>{this[e]=t[e]}))}render(){return e("div",{key:"600bdc33e6e2c46d7c71b6298dbee3d40cebe78d"},e("div",{key:"1da86f465a1ac9ccf271d05a27877883bc19b060"},this.title.unit),e("div",{key:"10335b3352dda9eeb1d18087a3ddfc02c10be5de"},this.title.measures.map(((t,i)=>e("span",null,this.isFirstElement(i)?this.title.i18n.get("SEPERATOR_WS"):"",e("span",{class:"measure"},t.name)," ",t.unit?this.title.i18n.get("in"):""," ",t.unit)))),e("div",{key:"ad37b2198d6a901a2f35738cadcdff6874837ab9"},this.title.dimension))}componentWillLoad(){const t=this.prepareConfig();this.title=new xa(new cr),this.title.setI18n(this.i18n),this.title.setConfig(t)}componentWillUpdate(){const t=this.prepareConfig();this.title.setI18n(this.i18n),this.title.setConfig(t)}componentWillRender(){this.title.update()}isFirstElement(t){return 0!==t}prepareConfig(){return new Ma(new Pa,new Ga,new ht(new Bn),new Bn).adapt({businessunit:this.businessUnit,measures:this.measures,scenarios:this.scenarios,timeperiod:this.timeperiod,intervalSpanLimit:this.intervalSpanLimit,i18nMode:this.i18nMode,order:this.order})}};Fa.style=':host{display:block;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);color:var(--bn-font-color, #000000)}.measure{font-weight:bold}div{background-color:var(--bn-font-background, white);color:var(--bn-font-color, black)}';export{pt as bn_asset,bt as bn_body,vt as bn_card,At as bn_chart_structure,$t as bn_chart_time,xt as bn_component_style,Dt as bn_context,Te as bn_dataset,Se as bn_datasource,Ae as bn_footer,Oe as bn_layout_card,Re as bn_layout_page,Ne as bn_message,Le as bn_page,Ie as bn_scaling_group,Pe as bn_table,Ue as bn_title,Ar as ibcs_chart_structure,aa as ibcs_chart_time,La as ibcs_table,Fa as ibcs_title}
|