@trebco/treb 36.1.4 → 37.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api-config.json +1 -1
- package/build/package.json +119 -0
- package/build/treb-base-types/src/api_types.d.ts +11 -0
- package/build/treb-base-types/src/api_types.js +22 -0
- package/build/treb-base-types/src/api_types.js.map +1 -0
- package/build/treb-base-types/src/area-utils.d.ts +9 -0
- package/build/treb-base-types/src/area-utils.js +50 -0
- package/build/treb-base-types/src/area-utils.js.map +1 -0
- package/build/treb-base-types/src/area.d.ts +182 -0
- package/build/treb-base-types/src/area.js +715 -0
- package/build/treb-base-types/src/area.js.map +1 -0
- package/build/treb-base-types/src/basic_types.d.ts +20 -0
- package/build/treb-base-types/src/basic_types.js +22 -0
- package/build/treb-base-types/src/basic_types.js.map +1 -0
- package/build/treb-base-types/src/cell.d.ts +167 -0
- package/build/treb-base-types/src/cell.js +432 -0
- package/build/treb-base-types/src/cell.js.map +1 -0
- package/build/treb-base-types/src/cells.d.ts +251 -0
- package/build/treb-base-types/src/cells.js +1136 -0
- package/build/treb-base-types/src/cells.js.map +1 -0
- package/build/treb-base-types/src/color.d.ts +35 -0
- package/build/treb-base-types/src/color.js +162 -0
- package/build/treb-base-types/src/color.js.map +1 -0
- package/build/treb-base-types/src/dom-utilities.d.ts +70 -0
- package/build/treb-base-types/src/dom-utilities.js +144 -0
- package/build/treb-base-types/src/dom-utilities.js.map +1 -0
- package/build/treb-base-types/src/evaluate-options.d.ts +35 -0
- package/build/treb-base-types/src/evaluate-options.js +22 -0
- package/build/treb-base-types/src/evaluate-options.js.map +1 -0
- package/build/treb-base-types/src/font-stack.d.ts +37 -0
- package/build/treb-base-types/src/font-stack.js +93 -0
- package/build/treb-base-types/src/font-stack.js.map +1 -0
- package/build/treb-base-types/src/gradient.d.ts +18 -0
- package/build/treb-base-types/src/gradient.js +86 -0
- package/build/treb-base-types/src/gradient.js.map +1 -0
- package/build/treb-base-types/src/import.d.ts +48 -0
- package/build/treb-base-types/src/import.js +22 -0
- package/build/treb-base-types/src/import.js.map +1 -0
- package/build/treb-base-types/src/index-standalone.d.ts +6 -0
- package/build/treb-base-types/src/index-standalone.js +27 -0
- package/build/treb-base-types/src/index-standalone.js.map +1 -0
- package/build/treb-base-types/src/index.d.ts +22 -0
- package/build/treb-base-types/src/index.js +45 -0
- package/build/treb-base-types/src/index.js.map +1 -0
- package/build/treb-base-types/src/layout.d.ts +22 -0
- package/build/treb-base-types/src/layout.js +22 -0
- package/build/treb-base-types/src/layout.js.map +1 -0
- package/build/treb-base-types/src/localization.d.ts +37 -0
- package/build/treb-base-types/src/localization.js +157 -0
- package/build/treb-base-types/src/localization.js.map +1 -0
- package/build/treb-base-types/src/rectangle.d.ts +51 -0
- package/build/treb-base-types/src/rectangle.js +123 -0
- package/build/treb-base-types/src/rectangle.js.map +1 -0
- package/build/treb-base-types/src/render_text.d.ts +34 -0
- package/build/treb-base-types/src/render_text.js +22 -0
- package/build/treb-base-types/src/render_text.js.map +1 -0
- package/build/treb-base-types/src/style.d.ts +214 -0
- package/build/treb-base-types/src/style.js +373 -0
- package/build/treb-base-types/src/style.js.map +1 -0
- package/build/treb-base-types/src/table.d.ts +58 -0
- package/build/treb-base-types/src/table.js +27 -0
- package/build/treb-base-types/src/table.js.map +1 -0
- package/build/treb-base-types/src/text_part.d.ts +26 -0
- package/build/treb-base-types/src/text_part.js +47 -0
- package/build/treb-base-types/src/text_part.js.map +1 -0
- package/build/treb-base-types/src/theme.d.ts +120 -0
- package/build/treb-base-types/src/theme.js +460 -0
- package/build/treb-base-types/src/theme.js.map +1 -0
- package/build/treb-base-types/src/union.d.ts +73 -0
- package/build/treb-base-types/src/union.js +61 -0
- package/build/treb-base-types/src/union.js.map +1 -0
- package/build/treb-base-types/src/value-type.d.ts +86 -0
- package/build/treb-base-types/src/value-type.js +168 -0
- package/build/treb-base-types/src/value-type.js.map +1 -0
- package/build/treb-base-types/src/worker-proxy.d.ts +95 -0
- package/build/treb-base-types/src/worker-proxy.js +221 -0
- package/build/treb-base-types/src/worker-proxy.js.map +1 -0
- package/build/treb-calculator/src/calculator.d.ts +249 -0
- package/build/treb-calculator/src/calculator.js +2755 -0
- package/build/treb-calculator/src/calculator.js.map +1 -0
- package/build/treb-calculator/src/complex-math.d.ts +75 -0
- package/build/treb-calculator/src/complex-math.js +559 -0
- package/build/treb-calculator/src/complex-math.js.map +1 -0
- package/build/treb-calculator/src/dag/array-vertex.d.ts +71 -0
- package/build/treb-calculator/src/dag/array-vertex.js +156 -0
- package/build/treb-calculator/src/dag/array-vertex.js.map +1 -0
- package/build/treb-calculator/src/dag/calculation_leaf_vertex.d.ts +48 -0
- package/build/treb-calculator/src/dag/calculation_leaf_vertex.js +84 -0
- package/build/treb-calculator/src/dag/calculation_leaf_vertex.js.map +1 -0
- package/build/treb-calculator/src/dag/graph.d.ts +134 -0
- package/build/treb-calculator/src/dag/graph.js +842 -0
- package/build/treb-calculator/src/dag/graph.js.map +1 -0
- package/build/treb-calculator/src/dag/spreadsheet_vertex.d.ts +58 -0
- package/build/treb-calculator/src/dag/spreadsheet_vertex.js +232 -0
- package/build/treb-calculator/src/dag/spreadsheet_vertex.js.map +1 -0
- package/build/treb-calculator/src/dag/spreadsheet_vertex_base.d.ts +20 -0
- package/build/treb-calculator/src/dag/spreadsheet_vertex_base.js +25 -0
- package/build/treb-calculator/src/dag/spreadsheet_vertex_base.js.map +1 -0
- package/build/treb-calculator/src/dag/state_leaf_vertex.d.ts +43 -0
- package/build/treb-calculator/src/dag/state_leaf_vertex.js +81 -0
- package/build/treb-calculator/src/dag/state_leaf_vertex.js.map +1 -0
- package/build/treb-calculator/src/dag/vertex.d.ts +71 -0
- package/build/treb-calculator/src/dag/vertex.js +274 -0
- package/build/treb-calculator/src/dag/vertex.js.map +1 -0
- package/build/treb-calculator/src/descriptors.d.ts +189 -0
- package/build/treb-calculator/src/descriptors.js +22 -0
- package/build/treb-calculator/src/descriptors.js.map +1 -0
- package/build/treb-calculator/src/expression-calculator.d.ts +127 -0
- package/build/treb-calculator/src/expression-calculator.js +1033 -0
- package/build/treb-calculator/src/expression-calculator.js.map +1 -0
- package/build/treb-calculator/src/function-error.d.ts +35 -0
- package/build/treb-calculator/src/function-error.js +85 -0
- package/build/treb-calculator/src/function-error.js.map +1 -0
- package/build/treb-calculator/src/function-library.d.ts +22 -0
- package/build/treb-calculator/src/function-library.js +96 -0
- package/build/treb-calculator/src/function-library.js.map +1 -0
- package/build/treb-calculator/src/functions/base-functions.d.ts +7 -0
- package/build/treb-calculator/src/functions/base-functions.js +2611 -0
- package/build/treb-calculator/src/functions/base-functions.js.map +1 -0
- package/build/treb-calculator/src/functions/beta.d.ts +17 -0
- package/build/treb-calculator/src/functions/beta.js +201 -0
- package/build/treb-calculator/src/functions/beta.js.map +1 -0
- package/build/treb-calculator/src/functions/checkbox.d.ts +3 -0
- package/build/treb-calculator/src/functions/checkbox.js +128 -0
- package/build/treb-calculator/src/functions/checkbox.js.map +1 -0
- package/build/treb-calculator/src/functions/complex-functions.d.ts +2 -0
- package/build/treb-calculator/src/functions/complex-functions.js +217 -0
- package/build/treb-calculator/src/functions/complex-functions.js.map +1 -0
- package/build/treb-calculator/src/functions/date-utils.d.ts +3 -0
- package/build/treb-calculator/src/functions/date-utils.js +59 -0
- package/build/treb-calculator/src/functions/date-utils.js.map +1 -0
- package/build/treb-calculator/src/functions/finance-functions.d.ts +2 -0
- package/build/treb-calculator/src/functions/finance-functions.js +547 -0
- package/build/treb-calculator/src/functions/finance-functions.js.map +1 -0
- package/build/treb-calculator/src/functions/fp.d.ts +2 -0
- package/build/treb-calculator/src/functions/fp.js +463 -0
- package/build/treb-calculator/src/functions/fp.js.map +1 -0
- package/build/treb-calculator/src/functions/function-utilities.d.ts +2 -0
- package/build/treb-calculator/src/functions/function-utilities.js +36 -0
- package/build/treb-calculator/src/functions/function-utilities.js.map +1 -0
- package/build/treb-calculator/src/functions/gamma.d.ts +20 -0
- package/build/treb-calculator/src/functions/gamma.js +142 -0
- package/build/treb-calculator/src/functions/gamma.js.map +1 -0
- package/build/treb-calculator/src/functions/information-functions.d.ts +2 -0
- package/build/treb-calculator/src/functions/information-functions.js +71 -0
- package/build/treb-calculator/src/functions/information-functions.js.map +1 -0
- package/build/treb-calculator/src/functions/lambda-functions.d.ts +2 -0
- package/build/treb-calculator/src/functions/lambda-functions.js +85 -0
- package/build/treb-calculator/src/functions/lambda-functions.js.map +1 -0
- package/build/treb-calculator/src/functions/matrix-functions.d.ts +2 -0
- package/build/treb-calculator/src/functions/matrix-functions.js +144 -0
- package/build/treb-calculator/src/functions/matrix-functions.js.map +1 -0
- package/build/treb-calculator/src/functions/normal.d.ts +2 -0
- package/build/treb-calculator/src/functions/normal.js +32 -0
- package/build/treb-calculator/src/functions/normal.js.map +1 -0
- package/build/treb-calculator/src/functions/regex-functions.d.ts +2 -0
- package/build/treb-calculator/src/functions/regex-functions.js +188 -0
- package/build/treb-calculator/src/functions/regex-functions.js.map +1 -0
- package/build/treb-calculator/src/functions/sparkline.d.ts +37 -0
- package/build/treb-calculator/src/functions/sparkline.js +264 -0
- package/build/treb-calculator/src/functions/sparkline.js.map +1 -0
- package/build/treb-calculator/src/functions/statistics-functions.d.ts +6 -0
- package/build/treb-calculator/src/functions/statistics-functions.js +989 -0
- package/build/treb-calculator/src/functions/statistics-functions.js.map +1 -0
- package/build/treb-calculator/src/functions/students-t.d.ts +3 -0
- package/build/treb-calculator/src/functions/students-t.js +64 -0
- package/build/treb-calculator/src/functions/students-t.js.map +1 -0
- package/build/treb-calculator/src/functions/text-functions.d.ts +3 -0
- package/build/treb-calculator/src/functions/text-functions.js +320 -0
- package/build/treb-calculator/src/functions/text-functions.js.map +1 -0
- package/build/treb-calculator/src/index.d.ts +2 -0
- package/build/treb-calculator/src/index.js +22 -0
- package/build/treb-calculator/src/index.js.map +1 -0
- package/build/treb-calculator/src/notifier-types.d.ts +26 -0
- package/build/treb-calculator/src/notifier-types.js +22 -0
- package/build/treb-calculator/src/notifier-types.js.map +1 -0
- package/build/treb-calculator/src/primitives.d.ts +15 -0
- package/build/treb-calculator/src/primitives.js +398 -0
- package/build/treb-calculator/src/primitives.js.map +1 -0
- package/build/treb-calculator/src/utilities.d.ts +68 -0
- package/build/treb-calculator/src/utilities.js +324 -0
- package/build/treb-calculator/src/utilities.js.map +1 -0
- package/build/treb-charts/src/chart-functions.d.ts +8 -0
- package/build/treb-charts/src/chart-functions.js +209 -0
- package/build/treb-charts/src/chart-functions.js.map +1 -0
- package/build/treb-charts/src/chart-types.d.ts +233 -0
- package/build/treb-charts/src/chart-types.js +57 -0
- package/build/treb-charts/src/chart-types.js.map +1 -0
- package/build/treb-charts/src/chart-utils.d.ts +106 -0
- package/build/treb-charts/src/chart-utils.js +1060 -0
- package/build/treb-charts/src/chart-utils.js.map +1 -0
- package/build/treb-charts/src/chart.d.ts +23 -0
- package/build/treb-charts/src/chart.js +94 -0
- package/build/treb-charts/src/chart.js.map +1 -0
- package/build/treb-charts/src/default-chart-renderer.d.ts +16 -0
- package/build/treb-charts/src/default-chart-renderer.js +533 -0
- package/build/treb-charts/src/default-chart-renderer.js.map +1 -0
- package/build/treb-charts/src/index.d.ts +5 -0
- package/build/treb-charts/src/index.js +24 -0
- package/build/treb-charts/src/index.js.map +1 -0
- package/build/treb-charts/src/main.d.ts +1 -0
- package/build/treb-charts/src/main.js +34 -0
- package/build/treb-charts/src/main.js.map +1 -0
- package/build/treb-charts/src/quicksort.d.ts +1 -0
- package/build/treb-charts/src/quicksort.js +49 -0
- package/build/treb-charts/src/quicksort.js.map +1 -0
- package/build/treb-charts/src/rectangle.d.ts +18 -0
- package/build/treb-charts/src/rectangle.js +41 -0
- package/build/treb-charts/src/rectangle.js.map +1 -0
- package/build/treb-charts/src/renderer-type.d.ts +24 -0
- package/build/treb-charts/src/renderer-type.js +22 -0
- package/build/treb-charts/src/renderer-type.js.map +1 -0
- package/build/treb-charts/src/renderer.d.ts +127 -0
- package/build/treb-charts/src/renderer.js +1518 -0
- package/build/treb-charts/src/renderer.js.map +1 -0
- package/build/treb-charts/src/util.d.ts +18 -0
- package/build/treb-charts/src/util.js +71 -0
- package/build/treb-charts/src/util.js.map +1 -0
- package/build/treb-data-model/src/annotation.d.ts +167 -0
- package/build/treb-data-model/src/annotation.js +120 -0
- package/build/treb-data-model/src/annotation.js.map +1 -0
- package/build/treb-data-model/src/conditional_format.d.ts +155 -0
- package/build/treb-data-model/src/conditional_format.js +62 -0
- package/build/treb-data-model/src/conditional_format.js.map +1 -0
- package/build/treb-data-model/src/data-validation.d.ts +28 -0
- package/build/treb-data-model/src/data-validation.js +22 -0
- package/build/treb-data-model/src/data-validation.js.map +1 -0
- package/build/treb-data-model/src/data_model.d.ts +173 -0
- package/build/treb-data-model/src/data_model.js +637 -0
- package/build/treb-data-model/src/data_model.js.map +1 -0
- package/build/treb-data-model/src/index.d.ts +13 -0
- package/build/treb-data-model/src/index.js +28 -0
- package/build/treb-data-model/src/index.js.map +1 -0
- package/build/treb-data-model/src/language-model.d.ts +22 -0
- package/build/treb-data-model/src/language-model.js +22 -0
- package/build/treb-data-model/src/language-model.js.map +1 -0
- package/build/treb-data-model/src/named.d.ts +124 -0
- package/build/treb-data-model/src/named.js +372 -0
- package/build/treb-data-model/src/named.js.map +1 -0
- package/build/treb-data-model/src/serialize_options.d.ts +49 -0
- package/build/treb-data-model/src/serialize_options.js +22 -0
- package/build/treb-data-model/src/serialize_options.js.map +1 -0
- package/build/treb-data-model/src/sheet.d.ts +499 -0
- package/build/treb-data-model/src/sheet.js +2904 -0
- package/build/treb-data-model/src/sheet.js.map +1 -0
- package/build/treb-data-model/src/sheet_collection.d.ts +58 -0
- package/build/treb-data-model/src/sheet_collection.js +112 -0
- package/build/treb-data-model/src/sheet_collection.js.map +1 -0
- package/build/treb-data-model/src/sheet_selection.d.ts +42 -0
- package/build/treb-data-model/src/sheet_selection.js +39 -0
- package/build/treb-data-model/src/sheet_selection.js.map +1 -0
- package/build/treb-data-model/src/sheet_types.d.ts +104 -0
- package/build/treb-data-model/src/sheet_types.js +22 -0
- package/build/treb-data-model/src/sheet_types.js.map +1 -0
- package/build/treb-data-model/src/types.d.ts +59 -0
- package/build/treb-data-model/src/types.js +22 -0
- package/build/treb-data-model/src/types.js.map +1 -0
- package/build/treb-embed/src/custom-element/spreadsheet-constructor.d.ts +75 -0
- package/build/treb-embed/src/custom-element/spreadsheet-constructor.js +1144 -0
- package/build/treb-embed/src/custom-element/spreadsheet-constructor.js.map +1 -0
- package/build/treb-embed/src/custom-element/treb-global.d.ts +36 -0
- package/build/treb-embed/src/custom-element/treb-global.js +64 -0
- package/build/treb-embed/src/custom-element/treb-global.js.map +1 -0
- package/build/treb-embed/src/custom-element/treb-spreadsheet-element.d.ts +1 -0
- package/build/treb-embed/src/custom-element/treb-spreadsheet-element.js +61 -0
- package/build/treb-embed/src/custom-element/treb-spreadsheet-element.js.map +1 -0
- package/build/treb-embed/src/embedded-spreadsheet.d.ts +1358 -0
- package/build/treb-embed/src/embedded-spreadsheet.js +5205 -0
- package/build/treb-embed/src/embedded-spreadsheet.js.map +1 -0
- package/build/treb-embed/src/index.d.ts +12 -0
- package/build/treb-embed/src/index.js +34 -0
- package/build/treb-embed/src/index.js.map +1 -0
- package/build/treb-embed/src/options.d.ts +266 -0
- package/build/treb-embed/src/options.js +56 -0
- package/build/treb-embed/src/options.js.map +1 -0
- package/build/treb-embed/src/plugin.d.ts +9 -0
- package/build/treb-embed/src/plugin.js +22 -0
- package/build/treb-embed/src/plugin.js.map +1 -0
- package/build/treb-embed/src/progress-dialog.d.ts +49 -0
- package/build/treb-embed/src/progress-dialog.js +178 -0
- package/build/treb-embed/src/progress-dialog.js.map +1 -0
- package/build/treb-embed/src/selection-state.d.ts +15 -0
- package/build/treb-embed/src/selection-state.js +22 -0
- package/build/treb-embed/src/selection-state.js.map +1 -0
- package/build/treb-embed/src/spinner.d.ts +8 -0
- package/build/treb-embed/src/spinner.js +40 -0
- package/build/treb-embed/src/spinner.js.map +1 -0
- package/build/treb-embed/src/toolbar-message.d.ts +72 -0
- package/build/treb-embed/src/toolbar-message.js +22 -0
- package/build/treb-embed/src/toolbar-message.js.map +1 -0
- package/build/treb-embed/src/types.d.ts +185 -0
- package/build/treb-embed/src/types.js +45 -0
- package/build/treb-embed/src/types.js.map +1 -0
- package/build/treb-embed/tsconfig.tsbuildinfo +1 -0
- package/build/treb-export/src/address-type.d.ts +34 -0
- package/build/treb-export/src/address-type.js +53 -0
- package/build/treb-export/src/address-type.js.map +1 -0
- package/build/treb-export/src/base-template.d.ts +1 -0
- package/build/treb-export/src/base-template.js +22 -0
- package/build/treb-export/src/base-template.js.map +1 -0
- package/build/treb-export/src/column-width.d.ts +2 -0
- package/build/treb-export/src/column-width.js +80 -0
- package/build/treb-export/src/column-width.js.map +1 -0
- package/build/treb-export/src/drawing/bubble-chart-template.d.ts +514 -0
- package/build/treb-export/src/drawing/bubble-chart-template.js +544 -0
- package/build/treb-export/src/drawing/bubble-chart-template.js.map +1 -0
- package/build/treb-export/src/drawing/chart-template-components2.d.ts +365 -0
- package/build/treb-export/src/drawing/chart-template-components2.js +386 -0
- package/build/treb-export/src/drawing/chart-template-components2.js.map +1 -0
- package/build/treb-export/src/drawing/chart.d.ts +26 -0
- package/build/treb-export/src/drawing/chart.js +247 -0
- package/build/treb-export/src/drawing/chart.js.map +1 -0
- package/build/treb-export/src/drawing/column-chart-template2.d.ts +490 -0
- package/build/treb-export/src/drawing/column-chart-template2.js +518 -0
- package/build/treb-export/src/drawing/column-chart-template2.js.map +1 -0
- package/build/treb-export/src/drawing/donut-chart-template2.d.ts +272 -0
- package/build/treb-export/src/drawing/donut-chart-template2.js +293 -0
- package/build/treb-export/src/drawing/donut-chart-template2.js.map +1 -0
- package/build/treb-export/src/drawing/drawing.d.ts +49 -0
- package/build/treb-export/src/drawing/drawing.js +193 -0
- package/build/treb-export/src/drawing/drawing.js.map +1 -0
- package/build/treb-export/src/drawing/embedded-image.d.ts +12 -0
- package/build/treb-export/src/drawing/embedded-image.js +54 -0
- package/build/treb-export/src/drawing/embedded-image.js.map +1 -0
- package/build/treb-export/src/drawing/scatter-chart-template2.d.ts +520 -0
- package/build/treb-export/src/drawing/scatter-chart-template2.js +551 -0
- package/build/treb-export/src/drawing/scatter-chart-template2.js.map +1 -0
- package/build/treb-export/src/export.d.ts +72 -0
- package/build/treb-export/src/export.js +2039 -0
- package/build/treb-export/src/export.js.map +1 -0
- package/build/treb-export/src/import-export-messages.d.ts +31 -0
- package/build/treb-export/src/import-export-messages.js +22 -0
- package/build/treb-export/src/import-export-messages.js.map +1 -0
- package/build/treb-export/src/import.d.ts +33 -0
- package/build/treb-export/src/import.js +1258 -0
- package/build/treb-export/src/import.js.map +1 -0
- package/build/treb-export/src/index.worker.d.ts +1 -0
- package/build/treb-export/src/index.worker.js +93 -0
- package/build/treb-export/src/index.worker.js.map +1 -0
- package/build/treb-export/src/metadata.d.ts +51 -0
- package/build/treb-export/src/metadata.js +153 -0
- package/build/treb-export/src/metadata.js.map +1 -0
- package/build/treb-export/src/ooxml.d.ts +7 -0
- package/build/treb-export/src/ooxml.js +41 -0
- package/build/treb-export/src/ooxml.js.map +1 -0
- package/build/treb-export/src/relationship.d.ts +8 -0
- package/build/treb-export/src/relationship.js +27 -0
- package/build/treb-export/src/relationship.js.map +1 -0
- package/build/treb-export/src/shared-strings.d.ts +11 -0
- package/build/treb-export/src/shared-strings.js +105 -0
- package/build/treb-export/src/shared-strings.js.map +1 -0
- package/build/treb-export/src/template-2.d.ts +1 -0
- package/build/treb-export/src/template-2.js +22 -0
- package/build/treb-export/src/template-2.js.map +1 -0
- package/build/treb-export/src/unescape_xml.d.ts +1 -0
- package/build/treb-export/src/unescape_xml.js +61 -0
- package/build/treb-export/src/unescape_xml.js.map +1 -0
- package/build/treb-export/src/workbook-sheet.d.ts +75 -0
- package/build/treb-export/src/workbook-sheet.js +128 -0
- package/build/treb-export/src/workbook-sheet.js.map +1 -0
- package/build/treb-export/src/workbook-style.d.ts +110 -0
- package/build/treb-export/src/workbook-style.js +1134 -0
- package/build/treb-export/src/workbook-style.js.map +1 -0
- package/build/treb-export/src/workbook-theme.d.ts +13 -0
- package/build/treb-export/src/workbook-theme.js +85 -0
- package/build/treb-export/src/workbook-theme.js.map +1 -0
- package/build/treb-export/src/workbook.d.ts +123 -0
- package/build/treb-export/src/workbook.js +644 -0
- package/build/treb-export/src/workbook.js.map +1 -0
- package/build/treb-export/src/xml-test.d.ts +9 -0
- package/build/treb-export/src/xml-test.js +52 -0
- package/build/treb-export/src/xml-test.js.map +1 -0
- package/build/treb-export/src/xml-utils.d.ts +76 -0
- package/build/treb-export/src/xml-utils.js +223 -0
- package/build/treb-export/src/xml-utils.js.map +1 -0
- package/build/treb-export/src/zip-wrapper.d.ts +22 -0
- package/build/treb-export/src/zip-wrapper.js +93 -0
- package/build/treb-export/src/zip-wrapper.js.map +1 -0
- package/build/treb-format/src/format.d.ts +130 -0
- package/build/treb-format/src/format.js +805 -0
- package/build/treb-format/src/format.js.map +1 -0
- package/build/treb-format/src/format_cache.d.ts +55 -0
- package/build/treb-format/src/format_cache.js +166 -0
- package/build/treb-format/src/format_cache.js.map +1 -0
- package/build/treb-format/src/format_parser.d.ts +70 -0
- package/build/treb-format/src/format_parser.js +618 -0
- package/build/treb-format/src/format_parser.js.map +1 -0
- package/build/treb-format/src/index.d.ts +4 -0
- package/build/treb-format/src/index.js +25 -0
- package/build/treb-format/src/index.js.map +1 -0
- package/build/treb-format/src/number_format_section.d.ts +58 -0
- package/build/treb-format/src/number_format_section.js +78 -0
- package/build/treb-format/src/number_format_section.js.map +1 -0
- package/build/treb-format/src/value_parser.d.ts +48 -0
- package/build/treb-format/src/value_parser.js +244 -0
- package/build/treb-format/src/value_parser.js.map +1 -0
- package/build/treb-grid/src/editors/autocomplete.d.ts +39 -0
- package/build/treb-grid/src/editors/autocomplete.js +316 -0
- package/build/treb-grid/src/editors/autocomplete.js.map +1 -0
- package/build/treb-grid/src/editors/autocomplete_matcher.d.ts +74 -0
- package/build/treb-grid/src/editors/autocomplete_matcher.js +212 -0
- package/build/treb-grid/src/editors/autocomplete_matcher.js.map +1 -0
- package/build/treb-grid/src/editors/editor.d.ts +214 -0
- package/build/treb-grid/src/editors/editor.js +879 -0
- package/build/treb-grid/src/editors/editor.js.map +1 -0
- package/build/treb-grid/src/editors/external_editor.d.ts +11 -0
- package/build/treb-grid/src/editors/external_editor.js +118 -0
- package/build/treb-grid/src/editors/external_editor.js.map +1 -0
- package/build/treb-grid/src/editors/formula_bar.d.ts +85 -0
- package/build/treb-grid/src/editors/formula_bar.js +444 -0
- package/build/treb-grid/src/editors/formula_bar.js.map +1 -0
- package/build/treb-grid/src/editors/overlay_editor.d.ts +85 -0
- package/build/treb-grid/src/editors/overlay_editor.js +353 -0
- package/build/treb-grid/src/editors/overlay_editor.js.map +1 -0
- package/build/treb-grid/src/index.d.ts +12 -0
- package/build/treb-grid/src/index.js +28 -0
- package/build/treb-grid/src/index.js.map +1 -0
- package/build/treb-grid/src/layout/base_layout.d.ts +346 -0
- package/build/treb-grid/src/layout/base_layout.js +2050 -0
- package/build/treb-grid/src/layout/base_layout.js.map +1 -0
- package/build/treb-grid/src/layout/grid_layout.d.ts +19 -0
- package/build/treb-grid/src/layout/grid_layout.js +235 -0
- package/build/treb-grid/src/layout/grid_layout.js.map +1 -0
- package/build/treb-grid/src/layout/mock-layout.d.ts +10 -0
- package/build/treb-grid/src/layout/mock-layout.js +37 -0
- package/build/treb-grid/src/layout/mock-layout.js.map +1 -0
- package/build/treb-grid/src/render/selection-renderer.d.ts +97 -0
- package/build/treb-grid/src/render/selection-renderer.js +315 -0
- package/build/treb-grid/src/render/selection-renderer.js.map +1 -0
- package/build/treb-grid/src/render/svg_header_overlay.d.ts +20 -0
- package/build/treb-grid/src/render/svg_header_overlay.js +76 -0
- package/build/treb-grid/src/render/svg_header_overlay.js.map +1 -0
- package/build/treb-grid/src/render/svg_selection_block.d.ts +27 -0
- package/build/treb-grid/src/render/svg_selection_block.js +106 -0
- package/build/treb-grid/src/render/svg_selection_block.js.map +1 -0
- package/build/treb-grid/src/render/tile_renderer.d.ts +121 -0
- package/build/treb-grid/src/render/tile_renderer.js +1609 -0
- package/build/treb-grid/src/render/tile_renderer.js.map +1 -0
- package/build/treb-grid/src/types/border_constants.d.ts +9 -0
- package/build/treb-grid/src/types/border_constants.js +34 -0
- package/build/treb-grid/src/types/border_constants.js.map +1 -0
- package/build/treb-grid/src/types/clipboard_data.d.ts +11 -0
- package/build/treb-grid/src/types/clipboard_data.js +22 -0
- package/build/treb-grid/src/types/clipboard_data.js.map +1 -0
- package/build/treb-grid/src/types/clipboard_data2.d.ts +46 -0
- package/build/treb-grid/src/types/clipboard_data2.js +22 -0
- package/build/treb-grid/src/types/clipboard_data2.js.map +1 -0
- package/build/treb-grid/src/types/drag_mask.d.ts +10 -0
- package/build/treb-grid/src/types/drag_mask.js +78 -0
- package/build/treb-grid/src/types/drag_mask.js.map +1 -0
- package/build/treb-grid/src/types/external_editor_config.d.ts +33 -0
- package/build/treb-grid/src/types/external_editor_config.js +22 -0
- package/build/treb-grid/src/types/external_editor_config.js.map +1 -0
- package/build/treb-grid/src/types/grid.d.ts +806 -0
- package/build/treb-grid/src/types/grid.js +6410 -0
- package/build/treb-grid/src/types/grid.js.map +1 -0
- package/build/treb-grid/src/types/grid_base.d.ts +442 -0
- package/build/treb-grid/src/types/grid_base.js +3523 -0
- package/build/treb-grid/src/types/grid_base.js.map +1 -0
- package/build/treb-grid/src/types/grid_command.d.ts +408 -0
- package/build/treb-grid/src/types/grid_command.js +75 -0
- package/build/treb-grid/src/types/grid_command.js.map +1 -0
- package/build/treb-grid/src/types/grid_events.d.ts +93 -0
- package/build/treb-grid/src/types/grid_events.js +36 -0
- package/build/treb-grid/src/types/grid_events.js.map +1 -0
- package/build/treb-grid/src/types/grid_options.d.ts +50 -0
- package/build/treb-grid/src/types/grid_options.js +34 -0
- package/build/treb-grid/src/types/grid_options.js.map +1 -0
- package/build/treb-grid/src/types/scale-control.d.ts +21 -0
- package/build/treb-grid/src/types/scale-control.js +148 -0
- package/build/treb-grid/src/types/scale-control.js.map +1 -0
- package/build/treb-grid/src/types/set_range_options.d.ts +24 -0
- package/build/treb-grid/src/types/set_range_options.js +22 -0
- package/build/treb-grid/src/types/set_range_options.js.map +1 -0
- package/build/treb-grid/src/types/tab_bar.d.ts +84 -0
- package/build/treb-grid/src/types/tab_bar.js +426 -0
- package/build/treb-grid/src/types/tab_bar.js.map +1 -0
- package/build/treb-grid/src/types/tile.d.ts +29 -0
- package/build/treb-grid/src/types/tile.js +22 -0
- package/build/treb-grid/src/types/tile.js.map +1 -0
- package/build/treb-grid/src/types/update_flags.d.ts +48 -0
- package/build/treb-grid/src/types/update_flags.js +22 -0
- package/build/treb-grid/src/types/update_flags.js.map +1 -0
- package/build/treb-grid/src/util/fontmetrics.d.ts +21 -0
- package/build/treb-grid/src/util/fontmetrics.js +82 -0
- package/build/treb-grid/src/util/fontmetrics.js.map +1 -0
- package/build/treb-grid/src/util/ua.d.ts +33 -0
- package/build/treb-grid/src/util/ua.js +86 -0
- package/build/treb-grid/src/util/ua.js.map +1 -0
- package/build/treb-parser/src/csv-parser.d.ts +13 -0
- package/build/treb-parser/src/csv-parser.js +107 -0
- package/build/treb-parser/src/csv-parser.js.map +1 -0
- package/build/treb-parser/src/index.d.ts +4 -0
- package/build/treb-parser/src/index.js +25 -0
- package/build/treb-parser/src/index.js.map +1 -0
- package/build/treb-parser/src/md-parser.d.ts +97 -0
- package/build/treb-parser/src/md-parser.js +403 -0
- package/build/treb-parser/src/md-parser.js.map +1 -0
- package/build/treb-parser/src/parser-types.d.ts +345 -0
- package/build/treb-parser/src/parser-types.js +53 -0
- package/build/treb-parser/src/parser-types.js.map +1 -0
- package/build/treb-parser/src/parser.d.ts +422 -0
- package/build/treb-parser/src/parser.js +2418 -0
- package/build/treb-parser/src/parser.js.map +1 -0
- package/build/treb-utils/src/event_source.d.ts +34 -0
- package/build/treb-utils/src/event_source.js +110 -0
- package/build/treb-utils/src/event_source.js.map +1 -0
- package/build/treb-utils/src/ievent_source.d.ts +9 -0
- package/build/treb-utils/src/ievent_source.js +22 -0
- package/build/treb-utils/src/ievent_source.js.map +1 -0
- package/build/treb-utils/src/index.d.ts +6 -0
- package/build/treb-utils/src/index.js +30 -0
- package/build/treb-utils/src/index.js.map +1 -0
- package/build/treb-utils/src/measurement.d.ts +42 -0
- package/build/treb-utils/src/measurement.js +145 -0
- package/build/treb-utils/src/measurement.js.map +1 -0
- package/build/treb-utils/src/scale.d.ts +16 -0
- package/build/treb-utils/src/scale.js +106 -0
- package/build/treb-utils/src/scale.js.map +1 -0
- package/build/treb-utils/src/serialize_html.d.ts +5 -0
- package/build/treb-utils/src/serialize_html.js +128 -0
- package/build/treb-utils/src/serialize_html.js.map +1 -0
- package/build/treb-utils/src/validate_uri.d.ts +20 -0
- package/build/treb-utils/src/validate_uri.js +55 -0
- package/build/treb-utils/src/validate_uri.js.map +1 -0
- package/dist/{chunk-Z4XFMZ2X.mjs → chunk-E35ONJUS.mjs} +1 -1
- package/dist/treb-export-worker.mjs +2 -2
- package/dist/treb-spreadsheet.mjs +4 -4
- package/dist/treb.d.ts +1 -1
- package/esbuild-composite.mjs +5 -1
- package/package.json +67 -3
- package/treb-embed/src/custom-element/spreadsheet-constructor.ts +7 -3
- package/treb-embed/src/embedded-spreadsheet.ts +1 -1
- package/treb-grid/src/types/grid_options.ts +1 -1
- package/tsproject.json +1 -2
- package/dist/chunk-43DLP2OX.mjs +0 -11
- package/dist/chunk-4CKS56PE.mjs +0 -11
- package/dist/chunk-75PARUQE.mjs +0 -11
- package/dist/chunk-7QD63AZS.mjs +0 -24601
- package/dist/chunk-A55ARVRD.mjs +0 -11
- package/dist/chunk-DESAKYW4.mjs +0 -11
- package/dist/chunk-EQ2R5W6P.mjs +0 -24565
- package/dist/chunk-IYJU2J6D.mjs +0 -24601
- package/dist/chunk-KSJFPGXT.mjs +0 -11
- package/dist/chunk-MQK4DNXI.mjs +0 -11
- package/dist/chunk-ORQFKLXM.mjs +0 -24601
- package/dist/chunk-SFDNNDHY.mjs +0 -11
- package/dist/chunk-T47DX5MI.mjs +0 -11
- package/dist/chunk-T6ILBVEX.mjs +0 -11
- package/dist/chunk-TPRCDYYG.mjs +0 -11
- package/dist/chunk-YAHNOOHO.mjs +0 -11
- package/dist/chunk-YLCFKX2G.mjs +0 -24601
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* This file is part of TREB.
|
|
3
|
+
*
|
|
4
|
+
* TREB is free software: you can redistribute it and/or modify it under the
|
|
5
|
+
* terms of the GNU General Public License as published by the Free Software
|
|
6
|
+
* Foundation, either version 3 of the License, or (at your option) any
|
|
7
|
+
* later version.
|
|
8
|
+
*
|
|
9
|
+
* TREB is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
10
|
+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
11
|
+
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
12
|
+
* details.
|
|
13
|
+
*
|
|
14
|
+
* You should have received a copy of the GNU General Public License along
|
|
15
|
+
* with TREB. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
+
*
|
|
17
|
+
* Copyright 2022-2026 trebco, llc.
|
|
18
|
+
* info@treb.app
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
import { Rectangle } from 'treb-base-types';
|
|
22
|
+
import { SVGSelectionBlock } from './svg_selection_block';
|
|
23
|
+
import { HeaderOverlay, Orientation } from './svg_header_overlay';
|
|
24
|
+
// const SVGNS = 'http://www.w3.org/2000/svg';
|
|
25
|
+
export class SelectionRenderer {
|
|
26
|
+
theme;
|
|
27
|
+
layout;
|
|
28
|
+
model;
|
|
29
|
+
view;
|
|
30
|
+
primary_selection;
|
|
31
|
+
additional_selections;
|
|
32
|
+
nub_rectangle = new Rectangle(-1, -1, 0, 0);
|
|
33
|
+
// tmp
|
|
34
|
+
cached_additional_selections = '';
|
|
35
|
+
grid_selections = [];
|
|
36
|
+
row_header_selections = [];
|
|
37
|
+
column_header_selections = [];
|
|
38
|
+
corner_selections = [];
|
|
39
|
+
row_overlay;
|
|
40
|
+
column_overlay;
|
|
41
|
+
corner_row_overlay;
|
|
42
|
+
corner_column_overlay;
|
|
43
|
+
constructor(theme, layout, model, view, primary_selection,
|
|
44
|
+
// private highlight_selection: GridSelection,
|
|
45
|
+
additional_selections) {
|
|
46
|
+
this.theme = theme;
|
|
47
|
+
this.layout = layout;
|
|
48
|
+
this.model = model;
|
|
49
|
+
this.view = view;
|
|
50
|
+
this.primary_selection = primary_selection;
|
|
51
|
+
this.additional_selections = additional_selections;
|
|
52
|
+
}
|
|
53
|
+
Initialize() {
|
|
54
|
+
// create header overlays
|
|
55
|
+
this.row_overlay =
|
|
56
|
+
new HeaderOverlay(this.theme, this.layout.row_header_selection, Orientation.Horizontal);
|
|
57
|
+
this.column_overlay =
|
|
58
|
+
new HeaderOverlay(this.theme, this.layout.column_header_selection, Orientation.Vertical);
|
|
59
|
+
this.corner_row_overlay =
|
|
60
|
+
new HeaderOverlay(this.theme, this.layout.corner_selection, Orientation.Horizontal);
|
|
61
|
+
this.corner_column_overlay =
|
|
62
|
+
new HeaderOverlay(this.theme, this.layout.corner_selection, Orientation.Vertical);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* we cache blocks that have inline style information. if style
|
|
66
|
+
* information updates we will have to flush the cache and rebuild.
|
|
67
|
+
* /
|
|
68
|
+
public Flush() {
|
|
69
|
+
|
|
70
|
+
// clean up, then call initialize to reconstruct
|
|
71
|
+
|
|
72
|
+
for (const overlay of [
|
|
73
|
+
this.row_overlay,
|
|
74
|
+
this.column_overlay,
|
|
75
|
+
this.corner_row_overlay,
|
|
76
|
+
this.corner_column_overlay,
|
|
77
|
+
]) {
|
|
78
|
+
overlay.Remove();
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
this.Initialize();
|
|
82
|
+
|
|
83
|
+
// selections: remove nodes from DOM, if connected, before cleaning up
|
|
84
|
+
|
|
85
|
+
for (const group of [
|
|
86
|
+
this.grid_selections,
|
|
87
|
+
this.row_header_selections,
|
|
88
|
+
this.column_header_selections,
|
|
89
|
+
this.corner_selections,
|
|
90
|
+
]) {
|
|
91
|
+
for (const block of group) {
|
|
92
|
+
|
|
93
|
+
// IE11 requires parentNode; seems to work in chrome/ffx,
|
|
94
|
+
// so unify (was originally using parentElement)
|
|
95
|
+
|
|
96
|
+
if (block.g.parentNode) {
|
|
97
|
+
block.g.parentNode.removeChild(block.g);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
this.grid_selections = [];
|
|
103
|
+
this.row_header_selections = [];
|
|
104
|
+
this.column_header_selections = [];
|
|
105
|
+
this.corner_selections = [];
|
|
106
|
+
|
|
107
|
+
}
|
|
108
|
+
*/
|
|
109
|
+
/**
|
|
110
|
+
* renders all (primary and additional) selections. selections are painted
|
|
111
|
+
* on a separate canvas which overlays the grid. unlike grid/header layers,
|
|
112
|
+
* the selection canvas is transparent (alpha = true, which is default, so
|
|
113
|
+
* omitted).
|
|
114
|
+
*
|
|
115
|
+
* updated for svg selections. erase is now required, so parameter is removed.
|
|
116
|
+
* update: add an optional (default true) parameter to re-render additional
|
|
117
|
+
* selections; this will support cache for selections that don't change.
|
|
118
|
+
*/
|
|
119
|
+
RenderSelections(show_primary_selection = true, rerender = true) {
|
|
120
|
+
// this is a dumb way of doing this... it's also error prone,
|
|
121
|
+
// because it needs to track all the function exits (there are
|
|
122
|
+
// two, atm)
|
|
123
|
+
const cache_primary_empty = this.primary_selection.empty;
|
|
124
|
+
if (!show_primary_selection) {
|
|
125
|
+
this.primary_selection.empty = true;
|
|
126
|
+
}
|
|
127
|
+
// temp (we could change the signature and just take an array)
|
|
128
|
+
const aggregate = [this.primary_selection].concat(this.additional_selections);
|
|
129
|
+
this.RenderSelectionGroup(aggregate, this.layout.grid_selection, undefined, undefined, this.grid_selections, undefined, rerender);
|
|
130
|
+
// this is the layout rect for row/column header highlights (primary selection only)
|
|
131
|
+
let header_selection_rect = new Rectangle(-1, -1, 0, 0);
|
|
132
|
+
if (!this.primary_selection.empty) {
|
|
133
|
+
const area = this.view.active_sheet.RealArea(this.primary_selection.area);
|
|
134
|
+
header_selection_rect =
|
|
135
|
+
this.layout.CellAddressToRectangle(area.start).Combine(this.layout.CellAddressToRectangle(area.end));
|
|
136
|
+
}
|
|
137
|
+
// highlight row header (if visible)
|
|
138
|
+
if (!this.primary_selection.empty && this.layout.header_offset.y > 2) {
|
|
139
|
+
this.row_overlay.Show(header_selection_rect.left, 0, header_selection_rect.width, this.layout.header_offset.y);
|
|
140
|
+
this.corner_row_overlay.Show(header_selection_rect.left + this.layout.header_offset.x, 0, header_selection_rect.width, this.layout.header_offset.y);
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
this.row_overlay.Hide();
|
|
144
|
+
this.corner_row_overlay.Hide();
|
|
145
|
+
}
|
|
146
|
+
// highlight column header (if visible)
|
|
147
|
+
if (!this.primary_selection.empty && this.layout.header_offset.x > 2) {
|
|
148
|
+
this.column_overlay.Show(0, header_selection_rect.top, this.layout.header_offset.x, header_selection_rect.height);
|
|
149
|
+
this.corner_column_overlay.Show(0, header_selection_rect.top + this.layout.header_offset.y, this.layout.header_offset.x, header_selection_rect.height);
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
this.column_overlay.Hide();
|
|
153
|
+
this.corner_column_overlay.Hide();
|
|
154
|
+
}
|
|
155
|
+
if (!this.view.active_sheet.freeze.columns && !this.view.active_sheet.freeze.rows) {
|
|
156
|
+
this.primary_selection.empty = cache_primary_empty;
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
// check visibility for selections in frozen rows, columns
|
|
160
|
+
const visible_row = [];
|
|
161
|
+
const visible_column = [];
|
|
162
|
+
if (this.primary_selection.empty) {
|
|
163
|
+
visible_row.push(false);
|
|
164
|
+
visible_column.push(false);
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
const start = this.primary_selection.area.start;
|
|
168
|
+
visible_row.push((start.row <= this.view.active_sheet.freeze.rows) ||
|
|
169
|
+
(start.row === Infinity));
|
|
170
|
+
visible_column.push((start.column <= this.view.active_sheet.freeze.columns) ||
|
|
171
|
+
(start.column === Infinity));
|
|
172
|
+
}
|
|
173
|
+
for (const { area } of this.additional_selections) {
|
|
174
|
+
visible_row.push((area.start.row <= this.view.active_sheet.freeze.rows) ||
|
|
175
|
+
(area.start.row === Infinity));
|
|
176
|
+
visible_column.push((area.start.column <= this.view.active_sheet.freeze.columns) ||
|
|
177
|
+
(area.start.column === Infinity));
|
|
178
|
+
}
|
|
179
|
+
// selections...
|
|
180
|
+
if (this.view.active_sheet.freeze.rows) {
|
|
181
|
+
this.RenderSelectionGroup(aggregate, this.layout.row_header_selection, visible_row, undefined, this.row_header_selections, { x: 0, y: this.layout.header_offset.y });
|
|
182
|
+
}
|
|
183
|
+
if (this.view.active_sheet.freeze.columns) {
|
|
184
|
+
this.RenderSelectionGroup(aggregate, this.layout.column_header_selection, visible_column, undefined, this.column_header_selections, { x: this.layout.header_offset.x, y: 0 });
|
|
185
|
+
}
|
|
186
|
+
if (this.view.active_sheet.freeze.rows && this.view.active_sheet.freeze.columns) {
|
|
187
|
+
this.RenderSelectionGroup(aggregate, this.layout.corner_selection, visible_column, visible_row, this.corner_selections, { ...this.layout.header_offset });
|
|
188
|
+
}
|
|
189
|
+
this.primary_selection.empty = cache_primary_empty;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* render a group of selections, optionally gated on one or two boolean
|
|
193
|
+
* arrays (used to check if the selection is within some bounds)
|
|
194
|
+
*/
|
|
195
|
+
RenderSelectionGroup(aggregate, node, visible_a, visible_b, group, offset, rerender = true) {
|
|
196
|
+
for (let i = 0; i < aggregate.length; i++) {
|
|
197
|
+
const sheet_match = (!aggregate[i].area.start.sheet_id) ||
|
|
198
|
+
(aggregate[i].area.start.sheet_id === this.view.active_sheet.id);
|
|
199
|
+
if (sheet_match && !aggregate[i].empty && (!visible_a || visible_a[i]) && (!visible_b || visible_b[i])) {
|
|
200
|
+
if (rerender || !aggregate[i].rendered) {
|
|
201
|
+
const block = this.EnsureGridSelectionBlock(node, group, i, offset);
|
|
202
|
+
this.RenderSVGSelection(aggregate[i], block, i);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
if (group[i])
|
|
207
|
+
group[i].Show(false);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
for (let i = aggregate.length; i < group.length; i++) {
|
|
211
|
+
if (group[i])
|
|
212
|
+
group[i].Show(false);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* create or return existing node. supports changing the offset,
|
|
217
|
+
* as that may be variable.
|
|
218
|
+
*
|
|
219
|
+
* FIXME: now that this is in a single method, could inline?
|
|
220
|
+
*/
|
|
221
|
+
EnsureGridSelectionBlock(node, node_set, index, offset) {
|
|
222
|
+
// ensure the selection
|
|
223
|
+
let selection_block = node_set[index];
|
|
224
|
+
if (!selection_block) {
|
|
225
|
+
selection_block = new SVGSelectionBlock(!index, this.theme, undefined, node);
|
|
226
|
+
node_set[index] = selection_block;
|
|
227
|
+
if (index) {
|
|
228
|
+
// alternate, should indicate a different way
|
|
229
|
+
// we're adding a node to contain alternate selections just so that
|
|
230
|
+
// we can use 1n, 2n, 3n indexing in CSS... although nth-of-type looks
|
|
231
|
+
// like it might help, it won't. it doesn't mean nth-instance.
|
|
232
|
+
let group = node.querySelector('.alternate-selections');
|
|
233
|
+
if (!group) {
|
|
234
|
+
group = this.layout.DOM.SVG('g', 'alternate-selections');
|
|
235
|
+
node.appendChild(group);
|
|
236
|
+
}
|
|
237
|
+
group?.appendChild(selection_block.g);
|
|
238
|
+
}
|
|
239
|
+
else {
|
|
240
|
+
// primary
|
|
241
|
+
node.appendChild(selection_block.g);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
if (offset)
|
|
245
|
+
selection_block.Offset(offset);
|
|
246
|
+
return selection_block;
|
|
247
|
+
}
|
|
248
|
+
ClampEnd(address) {
|
|
249
|
+
// NOTE: column/row can be infinity, but min handles that properly
|
|
250
|
+
return {
|
|
251
|
+
row: Math.min(address.row, this.view.active_sheet.rows - 1),
|
|
252
|
+
column: Math.min(address.column, this.view.active_sheet.columns - 1),
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* testing an SVG selection. index replaces primary; primary is always index 0.
|
|
257
|
+
*/
|
|
258
|
+
RenderSVGSelection(selection, block, index = 0) {
|
|
259
|
+
const area = this.view.active_sheet.RealArea(selection.area, true);
|
|
260
|
+
let rect = this.layout.CellAddressToRectangle(area.start);
|
|
261
|
+
if (area.count > 1) {
|
|
262
|
+
rect = rect.Combine(this.layout.CellAddressToRectangle(area.end));
|
|
263
|
+
}
|
|
264
|
+
else if (index) {
|
|
265
|
+
// update: select merge areas for alternate selections when single
|
|
266
|
+
const data = this.view.active_sheet.CellData(selection.target);
|
|
267
|
+
if (data.merge_area) {
|
|
268
|
+
rect = this.layout.CellAddressToRectangle(data.merge_area.start);
|
|
269
|
+
rect = rect.Combine(this.layout.CellAddressToRectangle(data.merge_area.end));
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
// nub select target wants the base rectangle (not offset for tiles)
|
|
273
|
+
// FIXME: parameterize size
|
|
274
|
+
if (!index) {
|
|
275
|
+
this.nub_rectangle = new Rectangle(rect.left + rect.width - 6, rect.top + rect.height - 6, 11, 11);
|
|
276
|
+
}
|
|
277
|
+
else {
|
|
278
|
+
// block.SetThemeColor(index - 1);
|
|
279
|
+
}
|
|
280
|
+
// FIXME: with giant selection svg, we should clip the selection rect
|
|
281
|
+
// to visible to prevent giant rects/paths
|
|
282
|
+
// when not showing headers...
|
|
283
|
+
if (rect.top === 0 && this.layout.header_offset.y <= 1) {
|
|
284
|
+
rect.top = 1;
|
|
285
|
+
rect.height -= 1;
|
|
286
|
+
}
|
|
287
|
+
if (rect.left === 0 && this.layout.header_offset.x <= 1) {
|
|
288
|
+
rect.left = 1;
|
|
289
|
+
rect.width -= 1;
|
|
290
|
+
}
|
|
291
|
+
// don't render if the rect is <= 0 height or width (cells are hidden)
|
|
292
|
+
if (rect.height <= 0 || rect.height <= 0) {
|
|
293
|
+
block.Show(false);
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
// FIXME: this could be wrapped up in one call
|
|
297
|
+
block.SetOutline(rect, !!index);
|
|
298
|
+
if (!index) {
|
|
299
|
+
// get the target rect (primary only)
|
|
300
|
+
let target_rect = this.layout.CellAddressToRectangle(selection.target);
|
|
301
|
+
const data = this.view.active_sheet.CellData(selection.target);
|
|
302
|
+
if (data.merge_area) {
|
|
303
|
+
target_rect = this.layout.CellAddressToRectangle(data.merge_area.start);
|
|
304
|
+
target_rect = target_rect.Combine(this.layout.CellAddressToRectangle(data.merge_area.end));
|
|
305
|
+
}
|
|
306
|
+
block.SetFill(target_rect, rect);
|
|
307
|
+
block.SetNub(rect);
|
|
308
|
+
}
|
|
309
|
+
else {
|
|
310
|
+
selection.rendered = true;
|
|
311
|
+
}
|
|
312
|
+
block.Show();
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
//# sourceMappingURL=selection-renderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selection-renderer.js","sourceRoot":"","sources":["../../../../treb-grid/src/render/selection-renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGlE,8CAA8C;AAE9C,MAAM,OAAO,iBAAiB;IAkBhB;IACA;IACA;IACA;I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,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YAC/D,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;gBACpB,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,sBAAsB,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;gBACxE,WAAW,GAAG,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,sBAAsB,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;YAC7F,CAAC;YAED,KAAK,CAAC,OAAO,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;YACjC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACrB,CAAC;aACI,CAAC;YACJ,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAC;QAC5B,CAAC;QAED,KAAK,CAAC,IAAI,EAAE,CAAC;IAEf,CAAC;CAEF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type Theme } from 'treb-base-types';
|
|
2
|
+
export declare enum Orientation {
|
|
3
|
+
Horizontal = 0,
|
|
4
|
+
Vertical = 1
|
|
5
|
+
}
|
|
6
|
+
export declare class HeaderOverlay {
|
|
7
|
+
private theme;
|
|
8
|
+
private container;
|
|
9
|
+
private orientation;
|
|
10
|
+
private g;
|
|
11
|
+
private overlay;
|
|
12
|
+
private highlight;
|
|
13
|
+
constructor(theme: Theme, container: SVGElement, orientation: Orientation);
|
|
14
|
+
/**
|
|
15
|
+
* remove from DOM, prior to cleanup
|
|
16
|
+
*/
|
|
17
|
+
Remove(): void;
|
|
18
|
+
Hide(): void;
|
|
19
|
+
Show(x: number, y: number, width: number, height: number): void;
|
|
20
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* This file is part of TREB.
|
|
3
|
+
*
|
|
4
|
+
* TREB is free software: you can redistribute it and/or modify it under the
|
|
5
|
+
* terms of the GNU General Public License as published by the Free Software
|
|
6
|
+
* Foundation, either version 3 of the License, or (at your option) any
|
|
7
|
+
* later version.
|
|
8
|
+
*
|
|
9
|
+
* TREB is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
10
|
+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
11
|
+
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
12
|
+
* details.
|
|
13
|
+
*
|
|
14
|
+
* You should have received a copy of the GNU General Public License along
|
|
15
|
+
* with TREB. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
+
*
|
|
17
|
+
* Copyright 2022-2026 trebco, llc.
|
|
18
|
+
* info@treb.app
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
import { DOMContext } from 'treb-base-types';
|
|
22
|
+
export var Orientation;
|
|
23
|
+
(function (Orientation) {
|
|
24
|
+
Orientation[Orientation["Horizontal"] = 0] = "Horizontal";
|
|
25
|
+
Orientation[Orientation["Vertical"] = 1] = "Vertical";
|
|
26
|
+
})(Orientation || (Orientation = {}));
|
|
27
|
+
export class HeaderOverlay {
|
|
28
|
+
theme;
|
|
29
|
+
container;
|
|
30
|
+
orientation;
|
|
31
|
+
g;
|
|
32
|
+
overlay;
|
|
33
|
+
highlight;
|
|
34
|
+
constructor(theme, container, orientation) {
|
|
35
|
+
this.theme = theme;
|
|
36
|
+
this.container = container;
|
|
37
|
+
this.orientation = orientation;
|
|
38
|
+
const DOM = DOMContext.GetInstance(container.ownerDocument);
|
|
39
|
+
this.g = DOM.SVG('g', 'treb-header-overlay');
|
|
40
|
+
this.overlay = DOM.SVG('rect', 'treb-overlay');
|
|
41
|
+
this.highlight = DOM.SVG('rect', 'treb-highlight');
|
|
42
|
+
this.g.style.display = 'none';
|
|
43
|
+
this.g.appendChild(this.highlight);
|
|
44
|
+
this.g.appendChild(this.overlay);
|
|
45
|
+
container.appendChild(this.g);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* remove from DOM, prior to cleanup
|
|
49
|
+
*/
|
|
50
|
+
Remove() {
|
|
51
|
+
this.container.removeChild(this.g);
|
|
52
|
+
}
|
|
53
|
+
Hide() {
|
|
54
|
+
this.g.style.display = 'none';
|
|
55
|
+
}
|
|
56
|
+
Show(x, y, width, height) {
|
|
57
|
+
this.overlay.setAttribute('x', x.toString());
|
|
58
|
+
this.overlay.setAttribute('y', y.toString());
|
|
59
|
+
this.overlay.setAttribute('width', width.toString());
|
|
60
|
+
this.overlay.setAttribute('height', height.toString());
|
|
61
|
+
if (this.orientation === Orientation.Horizontal) {
|
|
62
|
+
this.highlight.setAttribute('x', x.toString());
|
|
63
|
+
this.highlight.setAttribute('y', (y + height - 2).toString());
|
|
64
|
+
this.highlight.setAttribute('width', width.toString());
|
|
65
|
+
this.highlight.setAttribute('height', '2');
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
this.highlight.setAttribute('x', (x + width - 2).toString());
|
|
69
|
+
this.highlight.setAttribute('y', y.toString());
|
|
70
|
+
this.highlight.setAttribute('width', '2');
|
|
71
|
+
this.highlight.setAttribute('height', height.toString());
|
|
72
|
+
}
|
|
73
|
+
this.g.style.display = 'block';
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=svg_header_overlay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svg_header_overlay.js","sourceRoot":"","sources":["../../../../treb-grid/src/render/svg_header_overlay.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,UAAU,EAAc,MAAM,iBAAiB,CAAC;AAEzD,MAAM,CAAN,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,yDAAU,CAAA;IACV,qDAAQ,CAAA;AACV,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB;AAED,MAAM,OAAO,aAAa;IAOZ;IACA;IACA;IAPJ,CAAC,CAAc;IACf,OAAO,CAAiB;IACxB,SAAS,C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canvas overlaid over the tile canvases --
|
|
4
|
+
* broke android chrome, hard. so we are switching to an svg overlay (seems
|
|
5
|
+
* ok on android chrome, at least for now).
|
|
6
|
+
*
|
|
7
|
+
* this class wraps up some of the svg-specific stuff, particularly setting
|
|
8
|
+
* attributes.
|
|
9
|
+
*/
|
|
10
|
+
export interface SelectionOffset {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
}
|
|
14
|
+
export declare class SVGSelectionBlock {
|
|
15
|
+
private theme;
|
|
16
|
+
private offset;
|
|
17
|
+
g: SVGGElement;
|
|
18
|
+
outline: SVGRectElement;
|
|
19
|
+
fill?: SVGElement;
|
|
20
|
+
nub?: SVGRectElement;
|
|
21
|
+
constructor(primary: boolean, theme: Theme, offset: SelectionOffset | undefined, node: SVGElement);
|
|
22
|
+
Offset(offset: SelectionOffset): void;
|
|
23
|
+
Show(show?: boolean): void;
|
|
24
|
+
SetOutline(rect: Rectangle, fill?: boolean): void;
|
|
25
|
+
SetFill(inside: Rectangle, outside: Rectangle): void;
|
|
26
|
+
SetNub(rect: Rectangle): void;
|
|
27
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* This file is part of TREB.
|
|
3
|
+
*
|
|
4
|
+
* TREB is free software: you can redistribute it and/or modify it under the
|
|
5
|
+
* terms of the GNU General Public License as published by the Free Software
|
|
6
|
+
* Foundation, either version 3 of the License, or (at your option) any
|
|
7
|
+
* later version.
|
|
8
|
+
*
|
|
9
|
+
* TREB is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
10
|
+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
11
|
+
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
12
|
+
* details.
|
|
13
|
+
*
|
|
14
|
+
* You should have received a copy of the GNU General Public License along
|
|
15
|
+
* with TREB. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
+
*
|
|
17
|
+
* Copyright 2022-2026 trebco, llc.
|
|
18
|
+
* info@treb.app
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
import { DOMContext } from 'treb-base-types';
|
|
22
|
+
export class SVGSelectionBlock {
|
|
23
|
+
theme;
|
|
24
|
+
offset;
|
|
25
|
+
g;
|
|
26
|
+
outline;
|
|
27
|
+
fill; // SVGPathElement;
|
|
28
|
+
nub;
|
|
29
|
+
constructor(primary, theme, offset = { x: 0, y: 0 }, node) {
|
|
30
|
+
this.theme = theme;
|
|
31
|
+
this.offset = offset;
|
|
32
|
+
const DOM = DOMContext.GetInstance(node.ownerDocument);
|
|
33
|
+
this.g = DOM.SVG('g');
|
|
34
|
+
this.g.setAttribute('transform', `translate(${offset.x}, ${offset.y})`);
|
|
35
|
+
this.outline = DOM.SVG('rect', 'treb-selection-outline');
|
|
36
|
+
if (primary) {
|
|
37
|
+
this.g.setAttribute('class', 'selection primary-selection');
|
|
38
|
+
// primary selections have a separate fill, plus the nub. separate
|
|
39
|
+
// fill because the "target" is unfilled.
|
|
40
|
+
this.fill = DOM.SVG('path', 'treb-selection-fill');
|
|
41
|
+
this.nub = DOM.SVG('rect', 'treb-selection-nub');
|
|
42
|
+
this.g.appendChild(this.fill);
|
|
43
|
+
this.g.appendChild(this.outline);
|
|
44
|
+
this.g.appendChild(this.nub);
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
this.g.setAttribute('class', 'selection alternate-selection');
|
|
48
|
+
// secondary selections. fill is not used, we just fill the rect
|
|
49
|
+
// UPDATE: adding the fill, for styling purposes; we can set color,
|
|
50
|
+
// and use currentColor, but we can't set opacity separately so we
|
|
51
|
+
// need another node. which is a waste, but ergonomics ftw!
|
|
52
|
+
this.fill = DOM.SVG('rect', 'treb-selection-fill');
|
|
53
|
+
// this.SetThemeColor(0);
|
|
54
|
+
// if (theme.additional_selection_line_dash_array) {
|
|
55
|
+
// this.outline.setAttribute('stroke-dasharray', theme.additional_selection_line_dash_array);
|
|
56
|
+
// }
|
|
57
|
+
this.g.appendChild(this.fill);
|
|
58
|
+
this.g.appendChild(this.outline);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
Offset(offset) {
|
|
62
|
+
this.g.setAttribute('transform', `translate(${offset.x}, ${offset.y})`);
|
|
63
|
+
}
|
|
64
|
+
Show(show = true) {
|
|
65
|
+
this.g.style.display = show ? 'block' : 'none';
|
|
66
|
+
}
|
|
67
|
+
SetOutline(rect, fill = false) {
|
|
68
|
+
this.outline.setAttribute('x', (rect.left - 1).toString());
|
|
69
|
+
this.outline.setAttribute('y', (rect.top - 1).toString());
|
|
70
|
+
this.outline.setAttribute('width', (rect.width + 1).toString());
|
|
71
|
+
this.outline.setAttribute('height', (rect.height + 1).toString());
|
|
72
|
+
if (fill && this.fill) {
|
|
73
|
+
this.fill.setAttribute('x', (rect.left).toString());
|
|
74
|
+
this.fill.setAttribute('y', (rect.top).toString());
|
|
75
|
+
this.fill.setAttribute('width', (rect.width).toString());
|
|
76
|
+
this.fill.setAttribute('height', (rect.height).toString());
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
SetFill(inside, outside) {
|
|
80
|
+
if (!this.fill)
|
|
81
|
+
return;
|
|
82
|
+
const d = [];
|
|
83
|
+
// inner
|
|
84
|
+
d.push('M' + inside.left + ' ' + inside.top);
|
|
85
|
+
d.push('L' + inside.left + ' ' + inside.bottom);
|
|
86
|
+
d.push('L' + inside.right + ' ' + inside.bottom);
|
|
87
|
+
d.push('L' + inside.right + ' ' + inside.top);
|
|
88
|
+
d.push('Z');
|
|
89
|
+
// outer, reverse direction
|
|
90
|
+
d.push('M' + outside.left + ' ' + outside.top);
|
|
91
|
+
d.push('L' + outside.right + ' ' + outside.top);
|
|
92
|
+
d.push('L' + outside.right + ' ' + outside.bottom);
|
|
93
|
+
d.push('L' + outside.left + ' ' + outside.bottom);
|
|
94
|
+
d.push('Z');
|
|
95
|
+
this.fill.setAttribute('d', d.join(' '));
|
|
96
|
+
}
|
|
97
|
+
SetNub(rect) {
|
|
98
|
+
if (!this.nub)
|
|
99
|
+
return;
|
|
100
|
+
this.nub.setAttribute('x', (rect.left + rect.width - 4).toString());
|
|
101
|
+
this.nub.setAttribute('y', (rect.top + rect.height - 4).toString());
|
|
102
|
+
this.nub.setAttribute('width', '7');
|
|
103
|
+
this.nub.setAttribute('height', '7');
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=svg_selection_block.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svg_selection_block.js","sourceRoot":"","sources":["../../../../treb-grid/src/render/svg_selection_block.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAA8B,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAgBzE,MAAM,OAAO,iBAAiB;IAQP;IACA;IAPd,CAAC,CAAc;IACf,OAAO,CAAiB;IACxB,IAAI,CAAc,CAAC,kBAAkB;IACrC,GAAG,CAAkB;IAE5B,YAAa,OAAgB,EACR,KAAY,EACZ,SAA0B,EAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAC,EAC9C,IAAgB;QAFR,UAAK,GAAL,KAAK,CAAO;QACZ,WAAM,GAAN,MAAM,CAAgC;QAGzD,MAAM,GAAG,GAAG,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAEvD,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACtB,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,WAAW,EAAE,aAAa,MAAM,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;QAExE,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAC;QAEzD,IAAI,OAAO,EAAE,CAAC;YAEZ,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,OAAO,EAAE,6BAA6B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