ooxml-ui 1.34.0 → 1.36.0
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/custom-elements.json +14 -1
- package/dist/chart/format-pane-analysis.d.ts +0 -1
- package/dist/chart/format-pane-effects.d.ts +0 -1
- package/dist/chart/format-pane-fill-kinds.d.ts +0 -1
- package/dist/chart/format-pane-fill-line.d.ts +0 -1
- package/dist/chart/format-pane-targets.d.ts +0 -1
- package/dist/chart/format-pane-text.d.ts +0 -1
- package/dist/chrome/tab-drag.d.ts +27 -0
- package/dist/chrome/tab-drag.d.ts.map +1 -0
- package/dist/chrome/tab-strip.d.ts +25 -1
- package/dist/chrome/tab-strip.d.ts.map +1 -1
- package/dist/{chunk-CDC5MAZS.js → chunk-6VF4FEMY.js} +1 -1
- package/dist/chunk-7RRN2GPO.js +19 -0
- package/dist/{chunk-3AOIYE3R.js → chunk-7ST5QRD5.js} +1 -1
- package/dist/{chunk-6TS7ASDJ.js → chunk-C4KI635Q.js} +2 -17
- package/dist/{chunk-CALEXPBD.js → chunk-GZNBWWJ5.js} +840 -51
- package/dist/{chunk-KYXSQFDB.js → chunk-QAX4FAB7.js} +139 -4
- package/dist/{chunk-SWDVBUBW.js → chunk-Z4DML5NW.js} +3 -3
- package/dist/controls.d.ts +1 -1
- package/dist/controls.d.ts.map +1 -1
- package/dist/controls.js +1 -1
- package/dist/docx/building-blocks-actions.d.ts +2 -2
- package/dist/docx/editable-region-view.d.ts +4 -0
- package/dist/docx/editor-chrome.d.ts +1 -1
- package/dist/docx/editor-core.d.ts +4 -0
- package/dist/docx/editor-plugins.d.ts +3 -0
- package/dist/docx/file-commands.d.ts +5 -0
- package/dist/docx/format-dialogs.d.ts +6 -1
- package/dist/docx/insert-controller.d.ts +5 -0
- package/dist/docx/list-commands.d.ts +3 -1
- package/dist/docx/list-marker-display.d.ts +1 -1
- package/dist/docx/locales/en-app.d.ts +0 -1
- package/dist/docx/locales/en-ribbon.d.ts +51 -0
- package/dist/docx/locales/en.d.ts +51 -1
- package/dist/docx/localization-strings.d.ts +51 -1
- package/dist/docx/paragraph-styles.d.ts +1 -1
- package/dist/docx/print-picture.d.ts +4 -0
- package/dist/docx/protection-controls.d.ts +4 -0
- package/dist/docx/restrict-editing-pane.d.ts +14 -0
- package/dist/docx/ribbon-action.d.ts +4 -0
- package/dist/docx/ribbon-icons.d.ts +1 -0
- package/dist/docx/search-controller.d.ts +12 -5
- package/dist/docx/search-document.d.ts +32 -0
- package/dist/docx.js +1227 -390
- package/dist/export/pdf-embedded-font.d.ts +65 -0
- package/dist/export/pdf-fonts.d.ts +14 -0
- package/dist/export/pdf-vector.d.ts +84 -0
- package/dist/image-native-size.d.ts +43 -0
- package/dist/image-native-size.d.ts.map +1 -0
- package/dist/index.js +5 -5
- package/dist/picture-artistic-filters.d.ts +9 -0
- package/dist/picture-artistic-filters.d.ts.map +1 -0
- package/dist/picture-artistic-preview.d.ts +3 -0
- package/dist/picture-artistic-preview.d.ts.map +1 -0
- package/dist/picture-effects.d.ts +3 -1
- package/dist/picture-effects.d.ts.map +1 -0
- package/dist/picture-paint.d.ts +23 -0
- package/dist/picture-paint.d.ts.map +1 -0
- package/dist/picture-pixels.d.ts +11 -0
- package/dist/picture-pixels.d.ts.map +1 -0
- package/dist/picture-standard-filter.d.ts +6 -0
- package/dist/picture-standard-filter.d.ts.map +1 -0
- package/dist/picture-view.d.ts +10 -0
- package/dist/picture-view.d.ts.map +1 -0
- package/dist/pptx/ai/bridge-factory.d.ts +4 -1
- package/dist/pptx/ai/bridge-factory.d.ts.map +1 -1
- package/dist/pptx/ai/config.d.ts +1 -1
- package/dist/pptx/ai/config.d.ts.map +1 -1
- package/dist/pptx/ai/host.cjs +36 -36
- package/dist/pptx/ai/host.mjs +1 -1
- package/dist/pptx/ai/index.cjs +50 -43
- package/dist/pptx/ai/index.mjs +10 -3
- package/dist/pptx/ai/system-prompt.d.ts +1 -1
- package/dist/pptx/ai/system-prompt.d.ts.map +1 -1
- package/dist/pptx/ai/tool-summary.d.ts.map +1 -1
- package/dist/pptx/ai/tools/mcp-registry.d.ts.map +1 -1
- package/dist/pptx/{chart-3d-view-scene-HNL4NWJT.mjs → chart-3d-view-scene-BKNMGRGO.mjs} +3 -25
- package/dist/pptx/{chart-3d-view-scene-OPVBTZL5.cjs → chart-3d-view-scene-V55XPBBF.cjs} +39 -61
- package/dist/pptx/{chunk-KGDMMWIY.mjs → chunk-2AK5MS6H.mjs} +11 -0
- package/dist/pptx/{chunk-M55PNMFQ.cjs → chunk-4OKSYRYA.cjs} +11 -0
- package/dist/pptx/{chunk-CH4Z6H6C.mjs → chunk-4RSRCNRM.mjs} +1192 -382
- package/dist/pptx/{chunk-TDIJHLS5.cjs → chunk-6JJD3LFT.cjs} +1532 -715
- package/dist/pptx/{chunk-46HIE4IE.cjs → chunk-CRV7G4GC.cjs} +8 -0
- package/dist/pptx/{chunk-S3L5NNCK.cjs → chunk-FROIGMTI.cjs} +1 -1
- package/dist/pptx/{chunk-S5I64Y55.cjs → chunk-HIRBPTML.cjs} +12 -12
- package/dist/pptx/{chunk-D4LJJ7Z7.cjs → chunk-KJICUZXM.cjs} +171 -540
- package/dist/pptx/{chunk-7DT3UJQB.mjs → chunk-KNCCSPAV.mjs} +7 -3
- package/dist/pptx/{chunk-RZVEPTLN.mjs → chunk-QK6LJT3K.mjs} +140 -529
- package/dist/pptx/{chunk-ZS5EVODY.cjs → chunk-SI7GQYSL.cjs} +52 -48
- package/dist/pptx/{chunk-LCCRLB7Q.mjs → chunk-UHDWWRTX.mjs} +1 -1
- package/dist/pptx/{chunk-6MEBLCNK.mjs → chunk-WQI3NLMY.mjs} +8 -0
- package/dist/pptx/{chunk-SPOECCPV.mjs → chunk-WZHYA2B3.mjs} +1 -1
- package/dist/pptx/dom/elements/smartart.d.ts.map +1 -1
- package/dist/pptx/dom/index.cjs +427 -427
- package/dist/pptx/dom/index.mjs +10 -10
- package/dist/pptx/export/html2canvas-clone.cjs +6 -6
- package/dist/pptx/export/html2canvas-clone.mjs +1 -1
- package/dist/pptx/i18n/index.cjs +6 -6
- package/dist/pptx/i18n/index.mjs +1 -1
- package/dist/pptx/i18n/translations-en.d.ts.map +1 -1
- package/dist/pptx/index.cjs +3361 -3353
- package/dist/pptx/index.mjs +5 -5
- package/dist/pptx/render/chart-3d-projection.d.ts +5 -54
- package/dist/pptx/render/chart-3d-projection.d.ts.map +1 -1
- package/dist/pptx/render/chart-3d-shading.d.ts +7 -10
- package/dist/pptx/render/chart-3d-shading.d.ts.map +1 -1
- package/dist/pptx/render/chart-combo-stock.cjs +3 -3
- package/dist/pptx/render/chart-combo-stock.mjs +1 -1
- package/dist/pptx/render/chart-funnel-sunburst.d.ts +1 -1
- package/dist/pptx/render/chart-funnel-sunburst.d.ts.map +1 -1
- package/dist/pptx/render/chart-map-projection.d.ts +2 -37
- package/dist/pptx/render/chart-map-projection.d.ts.map +1 -1
- package/dist/pptx/render/chart-overlays.cjs +7 -7
- package/dist/pptx/render/chart-overlays.mjs +1 -1
- package/dist/pptx/render/chart-region-map-alias.d.ts +1 -11
- package/dist/pptx/render/chart-region-map-alias.d.ts.map +1 -1
- package/dist/pptx/render/chart-region-map-colors.d.ts +1 -3
- package/dist/pptx/render/chart-region-map-colors.d.ts.map +1 -1
- package/dist/pptx/render/chart-region-map-data.d.ts +2 -44
- package/dist/pptx/render/chart-region-map-data.d.ts.map +1 -1
- package/dist/pptx/render/chart-region-map-view.d.ts.map +1 -1
- package/dist/pptx/render/chart-surface-treemap.cjs +4 -4
- package/dist/pptx/render/chart-surface-treemap.mjs +1 -1
- package/dist/pptx/render/chart-view-model-types.d.ts +2 -0
- package/dist/pptx/render/chart-view-model-types.d.ts.map +1 -1
- package/dist/pptx/render/chart-view-model.cjs +44 -44
- package/dist/pptx/render/chart-view-model.mjs +1 -1
- package/dist/pptx/render/chart-waterfall-map.cjs +6 -6
- package/dist/pptx/render/chart-waterfall-map.mjs +1 -1
- package/dist/pptx/render/controller/custom-shows-controller.d.ts +93 -0
- package/dist/pptx/render/controller/custom-shows-controller.d.ts.map +1 -0
- package/dist/pptx/render/controller/index.d.ts +2 -0
- package/dist/pptx/render/controller/index.d.ts.map +1 -1
- package/dist/pptx/render/custom-shows.d.ts +10 -2
- package/dist/pptx/render/custom-shows.d.ts.map +1 -1
- package/dist/pptx/render/editor-key-target.d.ts.map +1 -1
- package/dist/pptx/render/image-effect-filter-values.d.ts +1 -10
- package/dist/pptx/render/image-effect-filter-values.d.ts.map +1 -1
- package/dist/pptx/render/image-effects.d.ts +1 -0
- package/dist/pptx/render/image-effects.d.ts.map +1 -1
- package/dist/pptx/render/image-native-size.d.ts +1 -42
- package/dist/pptx/render/image-native-size.d.ts.map +1 -1
- package/dist/pptx/render/image-tiling.d.ts.map +1 -1
- package/dist/pptx/render/index.d.ts +1 -1
- package/dist/pptx/render/index.d.ts.map +1 -1
- package/dist/pptx/render/render-cache.d.ts +1 -3
- package/dist/pptx/render/render-cache.d.ts.map +1 -1
- package/dist/pptx/render/smartart-drawing.d.ts +3 -0
- package/dist/pptx/render/smartart-drawing.d.ts.map +1 -1
- package/dist/pptx/render/smartart-picture-image.d.ts +9 -0
- package/dist/pptx/render/smartart-picture-image.d.ts.map +1 -0
- package/dist/pptx/render/smartart-reflow-to-shapes.d.ts.map +1 -1
- package/dist/pptx/{smartart-insert-preview-RQUFRLSV.mjs → smartart-insert-preview-JH5TXECK.mjs} +6 -6
- package/dist/pptx/{smartart-insert-preview-YKNB37GE.cjs → smartart-insert-preview-QWROEVZL.cjs} +7 -7
- package/dist/render-cache.d.ts +4 -0
- package/dist/render-cache.d.ts.map +1 -0
- package/dist/smartart/smartart-paint.d.ts +2 -1
- package/dist/smartart/smartart-picture.d.ts +4 -3
- package/dist/smartart/smartart-text-pane-tools.d.ts +0 -1
- package/dist/smartart.d.ts +3 -0
- package/dist/smartart.js +1 -1
- package/dist/teams.js +2 -2
- package/dist/theme-bridge.d.ts +0 -1
- package/dist/theme.d.ts +0 -1
- package/dist/touch-targets.d.ts +0 -1
- package/dist/visio/binding.d.ts +2 -1
- package/dist/visio/canvas-editing.d.ts +2 -0
- package/dist/visio/controller.d.ts +3 -0
- package/dist/visio/pdf-path.d.ts +37 -0
- package/dist/visio/pdf-svg-gradient.d.ts +23 -0
- package/dist/visio/pdf-svg-style.d.ts +20 -0
- package/dist/visio/pdf-svg-text.d.ts +8 -0
- package/dist/visio/pdf-svg.d.ts +22 -0
- package/dist/visio/ribbon-action.d.ts +47 -5
- package/dist/visio/ribbon-arrange.d.ts +9 -0
- package/dist/visio/ribbon-contextual-formats.d.ts +18 -0
- package/dist/visio/ribbon-org-chart.d.ts +7 -0
- package/dist/visio/ribbon-router.d.ts +18 -0
- package/dist/visio/ribbon-shape-format.d.ts +7 -0
- package/dist/visio/ribbon-size-fields.d.ts +5 -0
- package/dist/visio/ribbon-swimlane.d.ts +9 -0
- package/dist/visio/ribbon-themes.d.ts +13 -3
- package/dist/visio/ribbon.d.ts +5 -1
- package/dist/visio/shapes-files-ui.d.ts +1 -1
- package/dist/visio/template-thumbnails.d.ts +10 -0
- package/dist/visio/viewer-backstage.d.ts +9 -3
- package/dist/visio/viewer-chart-editor.d.ts +2 -1
- package/dist/visio/viewer-contextual-tabs.d.ts +21 -0
- package/dist/visio/viewer-diagram-parts.d.ts +9 -1
- package/dist/visio/viewer-element.d.ts +10 -0
- package/dist/visio/viewer-export.d.ts +1 -6
- package/dist/visio/viewer-file-commands.d.ts +6 -1
- package/dist/visio/viewer-guides.d.ts +8 -1
- package/dist/visio/viewer-inline-size.d.ts +15 -0
- package/dist/visio/viewer-insert-dialog.d.ts +1 -0
- package/dist/visio/viewer-new-drawing.d.ts +3 -2
- package/dist/visio/viewer-org-chart.d.ts +19 -0
- package/dist/visio/viewer-pdf-options.d.ts +26 -0
- package/dist/visio/viewer-pdf.d.ts +47 -0
- package/dist/visio/viewer-picture-format.d.ts +20 -0
- package/dist/visio/viewer-resize-handles.d.ts +13 -1
- package/dist/visio/viewer-swimlanes.d.ts +34 -0
- package/dist/visio.js +4079 -742
- package/dist/xlsx/dialogs/audit-dialogs.d.ts +9 -0
- package/dist/xlsx/dialogs/custom-autofilter.d.ts +12 -0
- package/dist/xlsx/dialogs/custom-lists.d.ts +6 -0
- package/dist/xlsx/dialogs/filter-dates.d.ts +4 -0
- package/dist/xlsx/dialogs/help-dialogs.d.ts +2 -2
- package/dist/xlsx/dialogs/sort-dialog.d.ts +3 -3
- package/dist/xlsx/dialogs/text-to-columns.d.ts +0 -7
- package/dist/xlsx/dialogs/top10-filter.d.ts +5 -0
- package/dist/xlsx/dialogs/watch-window.d.ts +4 -0
- package/dist/xlsx/grid/audit-layer.d.ts +3 -0
- package/dist/xlsx/grid/filter-buttons.d.ts +11 -0
- package/dist/xlsx/grid/filter-menu.d.ts +10 -0
- package/dist/xlsx/grid/filter-presets.d.ts +19 -0
- package/dist/xlsx/grid/grid-view.d.ts +23 -1
- package/dist/xlsx/grid/pane-chrome.d.ts +2 -0
- package/dist/xlsx/grid/split-bars.d.ts +2 -0
- package/dist/xlsx/grid/styles.d.ts +1 -1
- package/dist/xlsx/sheet-tabs/drag.d.ts +1 -2
- package/dist/xlsx.js +1991 -450
- package/package.json +2 -2
|
@@ -6,28 +6,29 @@ var chunkWSTWYZFM_cjs = require('./chunk-WSTWYZFM.cjs');
|
|
|
6
6
|
var chunkX7FS7XHU_cjs = require('./chunk-X7FS7XHU.cjs');
|
|
7
7
|
var chunkXFQ2RD4I_cjs = require('./chunk-XFQ2RD4I.cjs');
|
|
8
8
|
var chunk52LKIMK3_cjs = require('./chunk-52LKIMK3.cjs');
|
|
9
|
-
var
|
|
9
|
+
var chunkHIRBPTML_cjs = require('./chunk-HIRBPTML.cjs');
|
|
10
10
|
var chunkWBGU7BWD_cjs = require('./chunk-WBGU7BWD.cjs');
|
|
11
11
|
var chunkFFWLDANS_cjs = require('./chunk-FFWLDANS.cjs');
|
|
12
12
|
var chunkZJFN5POF_cjs = require('./chunk-ZJFN5POF.cjs');
|
|
13
13
|
var chunkCWWL7MCL_cjs = require('./chunk-CWWL7MCL.cjs');
|
|
14
14
|
var chunkWB25PCHQ_cjs = require('./chunk-WB25PCHQ.cjs');
|
|
15
15
|
var chunkUSBRSEJK_cjs = require('./chunk-USBRSEJK.cjs');
|
|
16
|
-
var
|
|
16
|
+
var chunkKJICUZXM_cjs = require('./chunk-KJICUZXM.cjs');
|
|
17
17
|
var chunkFOE75Z6N_cjs = require('./chunk-FOE75Z6N.cjs');
|
|
18
18
|
var chunkNTXHQHCS_cjs = require('./chunk-NTXHQHCS.cjs');
|
|
19
|
-
var
|
|
19
|
+
var chunkFROIGMTI_cjs = require('./chunk-FROIGMTI.cjs');
|
|
20
20
|
var chunk3CYWRMYZ_cjs = require('./chunk-3CYWRMYZ.cjs');
|
|
21
21
|
var chunkEW5DW5KR_cjs = require('./chunk-EW5DW5KR.cjs');
|
|
22
22
|
var chunkUPN5FFKP_cjs = require('./chunk-UPN5FFKP.cjs');
|
|
23
23
|
var chunkOJFD3SHS_cjs = require('./chunk-OJFD3SHS.cjs');
|
|
24
24
|
var chunk3ESFHUZI_cjs = require('./chunk-3ESFHUZI.cjs');
|
|
25
25
|
var chunkU47LRWDT_cjs = require('./chunk-U47LRWDT.cjs');
|
|
26
|
-
var
|
|
26
|
+
var chunkCRV7G4GC_cjs = require('./chunk-CRV7G4GC.cjs');
|
|
27
27
|
var chunk3RIGT7H6_cjs = require('./chunk-3RIGT7H6.cjs');
|
|
28
28
|
var chunkPBZWDEXQ_cjs = require('./chunk-PBZWDEXQ.cjs');
|
|
29
29
|
var pptx = require('ooxml-core/pptx');
|
|
30
30
|
var color = require('ooxml-core/color');
|
|
31
|
+
var geometry = require('ooxml-core/geometry');
|
|
31
32
|
var text$1 = require('ooxml-core/text');
|
|
32
33
|
var drawingml = require('ooxml-core/drawingml');
|
|
33
34
|
var textSegmentParagraphBreak = require('ooxml-core/pptx/editor/render/text-segment-paragraph-break');
|
|
@@ -42,7 +43,6 @@ var tableCellEdit = require('ooxml-core/pptx/editor/render/table-cell-edit');
|
|
|
42
43
|
var tableDataGridOps = require('ooxml-core/pptx/editor/render/table-data-grid-ops');
|
|
43
44
|
var tableCellMerge = require('ooxml-core/pptx/editor/render/table-cell-merge');
|
|
44
45
|
var clone = require('ooxml-core/pptx/editor/render/clone');
|
|
45
|
-
var geometry = require('ooxml-core/geometry');
|
|
46
46
|
var groupOps = require('ooxml-core/pptx/editor/render/group-ops');
|
|
47
47
|
var slideBackgroundPatch = require('ooxml-core/pptx/editor/render/slide-background-patch');
|
|
48
48
|
var elementOperations = require('ooxml-core/pptx/editor/render/element-operations');
|
|
@@ -53,6 +53,7 @@ var collaborationSync = require('ooxml-core/pptx/editor/render/collaboration-syn
|
|
|
53
53
|
var embedding = require('ooxml-core/embedding');
|
|
54
54
|
var collaborationDeparture = require('ooxml-core/pptx/editor/render/collaboration-departure');
|
|
55
55
|
var collaborationTextSnapshotPositions = require('ooxml-core/pptx/editor/render/collaboration-text-snapshot-positions');
|
|
56
|
+
var customShowOperations = require('ooxml-core/pptx/editor/render/custom-show-operations');
|
|
56
57
|
var sectionOperations = require('ooxml-core/pptx/editor/render/section-operations');
|
|
57
58
|
var slideOperations = require('ooxml-core/pptx/editor/render/slide-operations');
|
|
58
59
|
var bulletAutonum = require('ooxml-core/pptx/editor/render/bullet-autonum');
|
|
@@ -1632,18 +1633,18 @@ function getComputedStrokeStyle(element) {
|
|
|
1632
1633
|
return { ...NO_STROKE, ...joins };
|
|
1633
1634
|
}
|
|
1634
1635
|
const borderWidth = width;
|
|
1635
|
-
const borderStyle =
|
|
1636
|
-
|
|
1636
|
+
const borderStyle = chunkKJICUZXM_cjs.getCssBorderDashStyle(
|
|
1637
|
+
chunkKJICUZXM_cjs.normalizeStrokeDashType(style.strokeDash),
|
|
1637
1638
|
style.compoundLine
|
|
1638
1639
|
);
|
|
1639
|
-
const rawColor = style.strokeColor ??
|
|
1640
|
-
const borderColor = style.strokeOpacity === void 0 ? rawColor :
|
|
1640
|
+
const rawColor = style.strokeColor ?? chunkKJICUZXM_cjs.DEFAULT_STROKE_COLOR;
|
|
1641
|
+
const borderColor = style.strokeOpacity === void 0 ? rawColor : chunkKJICUZXM_cjs.colorWithOpacity(chunkKJICUZXM_cjs.normalizeHexColor(rawColor, chunkKJICUZXM_cjs.DEFAULT_STROKE_COLOR), style.strokeOpacity);
|
|
1641
1642
|
return {
|
|
1642
1643
|
borderWidth,
|
|
1643
|
-
cssBorderWidth:
|
|
1644
|
+
cssBorderWidth: chunkFROIGMTI_cjs.screenStrokeWidth(borderWidth),
|
|
1644
1645
|
borderStyle,
|
|
1645
1646
|
borderColor,
|
|
1646
|
-
border:
|
|
1647
|
+
border: chunkFROIGMTI_cjs.screenBorder(borderWidth, borderStyle ?? "solid", borderColor),
|
|
1647
1648
|
...joins
|
|
1648
1649
|
};
|
|
1649
1650
|
}
|
|
@@ -1655,7 +1656,7 @@ function buildRectPathGradientDef(stops, id, focalPoint, fillToRect) {
|
|
|
1655
1656
|
color: stop.color,
|
|
1656
1657
|
...typeof stop.opacity === "number" ? { opacity: stop.opacity } : {}
|
|
1657
1658
|
}));
|
|
1658
|
-
const markup =
|
|
1659
|
+
const markup = chunkKJICUZXM_cjs.buildRectPathGradientSvg(rectStops, focalPoint, fillToRect);
|
|
1659
1660
|
return { kind: "rectPath", id, href: `data:image/svg+xml,${encodeURIComponent(markup)}` };
|
|
1660
1661
|
}
|
|
1661
1662
|
function rectPathGradientMarkup(def) {
|
|
@@ -1669,9 +1670,9 @@ function buildSvgStrokePatternDef(style, elementId) {
|
|
|
1669
1670
|
if (!style || style.strokeFillMode !== "pattern" || !style.strokePatternPreset) {
|
|
1670
1671
|
return void 0;
|
|
1671
1672
|
}
|
|
1672
|
-
const fg =
|
|
1673
|
-
const bg =
|
|
1674
|
-
const tile8 =
|
|
1673
|
+
const fg = chunkKJICUZXM_cjs.normalizeHexColor(style.strokeColor, "#000000");
|
|
1674
|
+
const bg = chunkKJICUZXM_cjs.normalizeHexColor(style.strokePatternBackgroundColor, "#ffffff");
|
|
1675
|
+
const tile8 = chunkKJICUZXM_cjs.getPatternTile(style.strokePatternPreset, fg, bg);
|
|
1675
1676
|
if (!tile8) {
|
|
1676
1677
|
return void 0;
|
|
1677
1678
|
}
|
|
@@ -1694,7 +1695,7 @@ function svgGradientId(elementId, suffix = "grad") {
|
|
|
1694
1695
|
return `pptx-${suffix}-${seed}`;
|
|
1695
1696
|
}
|
|
1696
1697
|
function toSvgStops(stops) {
|
|
1697
|
-
return
|
|
1698
|
+
return chunkKJICUZXM_cjs.sanitizeGradientStops(stops).map((stop) => ({
|
|
1698
1699
|
offset: round4(stop.position / 100),
|
|
1699
1700
|
color: stop.color,
|
|
1700
1701
|
...typeof stop.opacity === "number" ? { opacity: round4(stop.opacity) } : {}
|
|
@@ -1721,7 +1722,7 @@ function buildFromSource(source, id) {
|
|
|
1721
1722
|
if ((source.pathType || "circle") === "rect") {
|
|
1722
1723
|
return buildRectPathGradientDef(stops, id, source.focalPoint, source.fillToRect);
|
|
1723
1724
|
}
|
|
1724
|
-
const { cx, cy } =
|
|
1725
|
+
const { cx, cy } = chunkKJICUZXM_cjs.computeGradientCenter(source.fillToRect, source.focalPoint);
|
|
1725
1726
|
const fx2 = cx / 100;
|
|
1726
1727
|
const fy = cy / 100;
|
|
1727
1728
|
const r = Math.hypot(Math.max(fx2, 1 - fx2), Math.max(fy, 1 - fy));
|
|
@@ -1863,12 +1864,12 @@ function getPresetShapeVectorGeometry(shapeType, width, height, adjustments) {
|
|
|
1863
1864
|
function outlineStrands(compoundLine, strokeWidth) {
|
|
1864
1865
|
const offsets2 = getCompoundLineOffsets(compoundLine, strokeWidth);
|
|
1865
1866
|
if (offsets2.length <= 1) {
|
|
1866
|
-
return [{ strokeWidth, cssStrokeWidth:
|
|
1867
|
+
return [{ strokeWidth, cssStrokeWidth: chunkFROIGMTI_cjs.screenStrokeWidth(strokeWidth), offset: 0 }];
|
|
1867
1868
|
}
|
|
1868
1869
|
const widths = getCompoundLineWidths(compoundLine, strokeWidth);
|
|
1869
1870
|
return offsets2.map((offset, idx) => {
|
|
1870
1871
|
const width = widths[idx] ?? strokeWidth;
|
|
1871
|
-
return { strokeWidth: width, cssStrokeWidth:
|
|
1872
|
+
return { strokeWidth: width, cssStrokeWidth: chunkFROIGMTI_cjs.screenStrokeWidth(width), offset };
|
|
1872
1873
|
});
|
|
1873
1874
|
}
|
|
1874
1875
|
function needsCenteredStrokeOverlay(element, style, declaredWidth) {
|
|
@@ -1894,7 +1895,7 @@ function clipEdgeBleed(element, d, style) {
|
|
|
1894
1895
|
return edge ? {
|
|
1895
1896
|
d: edge,
|
|
1896
1897
|
strokeWidth: 1,
|
|
1897
|
-
cssStrokeWidth: `max(1px, calc(2 * var(${
|
|
1898
|
+
cssStrokeWidth: `max(1px, calc(2 * var(${chunkFROIGMTI_cjs.DEVICE_PX_VAR}, 0px)))`,
|
|
1898
1899
|
offset: 0
|
|
1899
1900
|
} : void 0;
|
|
1900
1901
|
}
|
|
@@ -1917,7 +1918,7 @@ function straddlingStrokeWidth(element) {
|
|
|
1917
1918
|
if (!needsCenteredStrokeOverlay(element, style, width)) {
|
|
1918
1919
|
return 0;
|
|
1919
1920
|
}
|
|
1920
|
-
const dash =
|
|
1921
|
+
const dash = chunkKJICUZXM_cjs.normalizeStrokeDashType(style?.strokeDash);
|
|
1921
1922
|
return !dash || dash === "solid" ? width : 0;
|
|
1922
1923
|
}
|
|
1923
1924
|
function outlineStrokeJoin(element) {
|
|
@@ -1947,7 +1948,7 @@ function buildStrokeOutline(element) {
|
|
|
1947
1948
|
}
|
|
1948
1949
|
const lineWidth = declaredWidth > 0 ? declaredWidth : DEFAULT_OPEN_PRESET_STROKE_WIDTH;
|
|
1949
1950
|
const strokeWidth = insetOnClip ? lineWidth * 2 : lineWidth;
|
|
1950
|
-
const stroke = paint ? svgGradientFillRef(paint) :
|
|
1951
|
+
const stroke = paint ? svgGradientFillRef(paint) : chunkKJICUZXM_cjs.colorWithOpacity(style?.strokeColor ?? chunkKJICUZXM_cjs.DEFAULT_STROKE_COLOR, style?.strokeOpacity);
|
|
1951
1952
|
const strands = outlineStrands(style?.compoundLine, strokeWidth);
|
|
1952
1953
|
const bleed = !openPresetD ? clipEdgeBleed(element, d, style) : void 0;
|
|
1953
1954
|
return {
|
|
@@ -1957,8 +1958,8 @@ function buildStrokeOutline(element) {
|
|
|
1957
1958
|
stroke,
|
|
1958
1959
|
strokeWidth,
|
|
1959
1960
|
strands: bleed ? [...strands, bleed] : strands,
|
|
1960
|
-
dashArray:
|
|
1961
|
-
|
|
1961
|
+
dashArray: chunkKJICUZXM_cjs.getSvgStrokeDasharray(
|
|
1962
|
+
chunkKJICUZXM_cjs.normalizeStrokeDashType(style?.strokeDash),
|
|
1962
1963
|
Math.max(lineWidth, 1),
|
|
1963
1964
|
style?.customDashSegments
|
|
1964
1965
|
),
|
|
@@ -2101,8 +2102,8 @@ function hexToRgb(hex2) {
|
|
|
2101
2102
|
};
|
|
2102
2103
|
}
|
|
2103
2104
|
function rgbToHex(r, g, b) {
|
|
2104
|
-
const
|
|
2105
|
-
return `#${
|
|
2105
|
+
const clamp11 = (v) => Math.max(0, Math.min(255, Math.round(v)));
|
|
2106
|
+
return `#${clamp11(r).toString(16).padStart(2, "0")}${clamp11(g).toString(16).padStart(2, "0")}${clamp11(b).toString(16).padStart(2, "0")}`;
|
|
2106
2107
|
}
|
|
2107
2108
|
function rgbToHsl(r, g, b) {
|
|
2108
2109
|
const rn = r / 255;
|
|
@@ -2349,7 +2350,7 @@ function getAnimationColorBaseStyle(element, options = {}) {
|
|
|
2349
2350
|
}
|
|
2350
2351
|
const style = {};
|
|
2351
2352
|
if (options.animatesFill) {
|
|
2352
|
-
const fill3 =
|
|
2353
|
+
const fill3 = chunkKJICUZXM_cjs.getComputedFillStyle(element, options.parentGroupFill);
|
|
2353
2354
|
style[ANIMATION_COLOR_BASE_PROPERTIES.fill] = fill3?.backgroundColor ?? element.shapeStyle?.fillColor ?? "currentColor";
|
|
2354
2355
|
}
|
|
2355
2356
|
if (options.animatesStroke) {
|
|
@@ -2461,28 +2462,8 @@ function isImageTiled(element) {
|
|
|
2461
2462
|
return typeof element.tileScaleX === "number" || typeof element.tileScaleY === "number" || typeof element.tileOffsetX === "number" || typeof element.tileOffsetY === "number" || element.tileFlip !== void 0 && element.tileFlip !== "none" || element.tileAlignment !== void 0;
|
|
2462
2463
|
}
|
|
2463
2464
|
function tileAlignmentPercentages(alignment) {
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
return { x: 0, y: 0 };
|
|
2467
|
-
case "t":
|
|
2468
|
-
return { x: 50, y: 0 };
|
|
2469
|
-
case "tr":
|
|
2470
|
-
return { x: 100, y: 0 };
|
|
2471
|
-
case "l":
|
|
2472
|
-
return { x: 0, y: 50 };
|
|
2473
|
-
case "ctr":
|
|
2474
|
-
return { x: 50, y: 50 };
|
|
2475
|
-
case "r":
|
|
2476
|
-
return { x: 100, y: 50 };
|
|
2477
|
-
case "bl":
|
|
2478
|
-
return { x: 0, y: 100 };
|
|
2479
|
-
case "b":
|
|
2480
|
-
return { x: 50, y: 100 };
|
|
2481
|
-
case "br":
|
|
2482
|
-
return { x: 100, y: 100 };
|
|
2483
|
-
default:
|
|
2484
|
-
return { x: 0, y: 0 };
|
|
2485
|
-
}
|
|
2465
|
+
const point = geometry.pictureTileAlignment(alignment);
|
|
2466
|
+
return { x: point.x * 100, y: point.y * 100 };
|
|
2486
2467
|
}
|
|
2487
2468
|
function tileAxisPosition(percent4, offsetPx) {
|
|
2488
2469
|
if (offsetPx === 0) {
|
|
@@ -2554,7 +2535,7 @@ function getImageTilingStyle(element, nativeSize) {
|
|
|
2554
2535
|
return style;
|
|
2555
2536
|
}
|
|
2556
2537
|
|
|
2557
|
-
// src/
|
|
2538
|
+
// src/image-native-size.ts
|
|
2558
2539
|
var CACHE_MAX = 128;
|
|
2559
2540
|
var cacheEpoch = 0;
|
|
2560
2541
|
var sizeCache = /* @__PURE__ */ new Map();
|
|
@@ -2588,7 +2569,7 @@ function probeNativeImageSize(src) {
|
|
|
2588
2569
|
}).then((size2) => {
|
|
2589
2570
|
if (pendingProbes.get(src) === probe) pendingProbes.delete(src);
|
|
2590
2571
|
if (size2 && epoch === cacheEpoch) {
|
|
2591
|
-
|
|
2572
|
+
chunkKJICUZXM_cjs.setBoundedRenderCache(sizeCache, src, size2, CACHE_MAX);
|
|
2592
2573
|
}
|
|
2593
2574
|
return size2;
|
|
2594
2575
|
});
|
|
@@ -2614,7 +2595,7 @@ function resolveGroupChildFill(child, parentGroupFill) {
|
|
|
2614
2595
|
if (!parentGroupFill || !pptx.hasShapeProperties(child) || child.shapeStyle?.fillMode !== "group") {
|
|
2615
2596
|
return void 0;
|
|
2616
2597
|
}
|
|
2617
|
-
return
|
|
2598
|
+
return chunkKJICUZXM_cjs.getComputedFillStyle(child, parentGroupFill);
|
|
2618
2599
|
}
|
|
2619
2600
|
function getFrameInverseTransform(element) {
|
|
2620
2601
|
const transforms = [];
|
|
@@ -2666,9 +2647,9 @@ function parseDrawingColorChoice(colorNode, schemeColorOverrides) {
|
|
|
2666
2647
|
}
|
|
2667
2648
|
if (colorNode["a:scrgbClr"]) {
|
|
2668
2649
|
const scrgb = colorNode["a:scrgbClr"];
|
|
2669
|
-
const red =
|
|
2670
|
-
const green =
|
|
2671
|
-
const blue =
|
|
2650
|
+
const red = chunkKJICUZXM_cjs.parseDrawingPercent(scrgb["@_r"]);
|
|
2651
|
+
const green = chunkKJICUZXM_cjs.parseDrawingPercent(scrgb["@_g"]);
|
|
2652
|
+
const blue = chunkKJICUZXM_cjs.parseDrawingPercent(scrgb["@_b"]);
|
|
2672
2653
|
if (red !== void 0 && green !== void 0 && blue !== void 0) {
|
|
2673
2654
|
const toHex2 = (value) => Math.min(255, Math.max(0, Math.round(value))).toString(16).padStart(2, "0").toUpperCase();
|
|
2674
2655
|
const base2 = `#${toHex2(red * 255)}${toHex2(green * 255)}${toHex2(blue * 255)}`;
|
|
@@ -2708,8 +2689,8 @@ function parseDrawingColorChoice(colorNode, schemeColorOverrides) {
|
|
|
2708
2689
|
const lumRaw = Number.parseFloat(String(hslNode["@_lum"] ?? ""));
|
|
2709
2690
|
if (Number.isFinite(hueRaw) && Number.isFinite(satRaw) && Number.isFinite(lumRaw)) {
|
|
2710
2691
|
const h = hueRaw / 6e4;
|
|
2711
|
-
const s =
|
|
2712
|
-
const l =
|
|
2692
|
+
const s = chunkKJICUZXM_cjs.clampUnitInterval(satRaw / 1e5);
|
|
2693
|
+
const l = chunkKJICUZXM_cjs.clampUnitInterval(lumRaw / 1e5);
|
|
2713
2694
|
const rgb = pptx.hslToRgb(h, s, l);
|
|
2714
2695
|
const toHex2 = (value) => Math.min(255, Math.max(0, Math.round(value))).toString(16).padStart(2, "0").toUpperCase();
|
|
2715
2696
|
const base2 = `#${toHex2(rgb.r)}${toHex2(rgb.g)}${toHex2(rgb.b)}`;
|
|
@@ -2749,11 +2730,11 @@ function parseDrawingColorOpacity(colorNode) {
|
|
|
2749
2730
|
if (!colorChoice) {
|
|
2750
2731
|
return void 0;
|
|
2751
2732
|
}
|
|
2752
|
-
const alpha =
|
|
2753
|
-
const alphaMod =
|
|
2733
|
+
const alpha = chunkKJICUZXM_cjs.parseDrawingPercent(colorChoice["a:alpha"]?.["@_val"]);
|
|
2734
|
+
const alphaMod = chunkKJICUZXM_cjs.parseDrawingPercent(
|
|
2754
2735
|
colorChoice["a:alphaMod"]?.["@_val"]
|
|
2755
2736
|
);
|
|
2756
|
-
const alphaOff =
|
|
2737
|
+
const alphaOff = chunkKJICUZXM_cjs.parseDrawingPercent(
|
|
2757
2738
|
colorChoice["a:alphaOff"]?.["@_val"]
|
|
2758
2739
|
);
|
|
2759
2740
|
if (alpha === void 0 && alphaMod === void 0 && alphaOff === void 0) {
|
|
@@ -2766,7 +2747,7 @@ function parseDrawingColorOpacity(colorNode) {
|
|
|
2766
2747
|
if (alphaOff !== void 0) {
|
|
2767
2748
|
opacity += alphaOff;
|
|
2768
2749
|
}
|
|
2769
|
-
return
|
|
2750
|
+
return chunkKJICUZXM_cjs.clampUnitInterval(opacity);
|
|
2770
2751
|
}
|
|
2771
2752
|
function splitRunByScriptFont(text4, fonts, baseFontFamily, nestedDecoration) {
|
|
2772
2753
|
const pieces = text$1.segmentByFont(text4, fonts);
|
|
@@ -2796,6 +2777,219 @@ function getFrameEffectStyle(element) {
|
|
|
2796
2777
|
return style;
|
|
2797
2778
|
}
|
|
2798
2779
|
|
|
2780
|
+
// src/picture-artistic-filters.ts
|
|
2781
|
+
var clamp = (value, min, max) => Math.min(max, Math.max(min, value));
|
|
2782
|
+
function buildDiscreteTable(steps) {
|
|
2783
|
+
const values = [];
|
|
2784
|
+
for (let i = 0; i < steps; i++) {
|
|
2785
|
+
const v = Math.round(i / (steps - 1) * 100) / 100;
|
|
2786
|
+
const count = Math.ceil(256 / steps);
|
|
2787
|
+
for (let j = 0; j < count; j++) {
|
|
2788
|
+
values.push(v);
|
|
2789
|
+
}
|
|
2790
|
+
}
|
|
2791
|
+
return values.slice(0, 256).join(" ");
|
|
2792
|
+
}
|
|
2793
|
+
function buildArtisticFilterMarkup(effectName, radius) {
|
|
2794
|
+
const normalizedRadius = clamp(radius, 0, 100) / 100;
|
|
2795
|
+
switch (effectName) {
|
|
2796
|
+
case "artisticFilmGrain":
|
|
2797
|
+
case "filmGrain": {
|
|
2798
|
+
const freq = 0.5 + normalizedRadius * 0.5;
|
|
2799
|
+
const opacity = 0.15 + normalizedRadius * 0.25;
|
|
2800
|
+
return `<feTurbulence type="fractalNoise" baseFrequency="${freq}" numOctaves="4" seed="1" stitchTiles="stitch" result="grain"/><feColorMatrix in="grain" type="saturate" values="0" result="grainGray"/><feBlend in="SourceGraphic" in2="grainGray" mode="overlay"/><feComponentTransfer><feFuncR type="linear" slope="${1 + opacity * 0.3}" intercept="${opacity * 0.02}"/><feFuncG type="linear" slope="${1 + opacity * 0.3}" intercept="${opacity * 0.02}"/><feFuncB type="linear" slope="${1 + opacity * 0.3}" intercept="${opacity * 0.02}"/></feComponentTransfer>`;
|
|
2801
|
+
}
|
|
2802
|
+
case "artisticCutout":
|
|
2803
|
+
case "cutout": {
|
|
2804
|
+
const steps = Math.max(2, Math.round(4 + normalizedRadius * 4));
|
|
2805
|
+
const tableValues = buildDiscreteTable(steps);
|
|
2806
|
+
return `<feComponentTransfer><feFuncR type="discrete" tableValues="${tableValues}"/><feFuncG type="discrete" tableValues="${tableValues}"/><feFuncB type="discrete" tableValues="${tableValues}"/></feComponentTransfer>`;
|
|
2807
|
+
}
|
|
2808
|
+
case "artisticCement":
|
|
2809
|
+
case "cement": {
|
|
2810
|
+
const freq = 1.5 + normalizedRadius * 2.5;
|
|
2811
|
+
const desat = Math.max(0, 0.4 - normalizedRadius * 0.3);
|
|
2812
|
+
return `<feColorMatrix type="saturate" values="${desat}" result="desat"/><feTurbulence type="fractalNoise" baseFrequency="${freq}" numOctaves="5" seed="2" stitchTiles="stitch" result="cementNoise"/><feColorMatrix in="cementNoise" type="saturate" values="0" result="cementGray"/><feBlend in="desat" in2="cementGray" mode="multiply"/><feComponentTransfer><feFuncR type="linear" slope="1.2" intercept="0"/><feFuncG type="linear" slope="1.2" intercept="0"/><feFuncB type="linear" slope="1.2" intercept="0"/></feComponentTransfer>`;
|
|
2813
|
+
}
|
|
2814
|
+
case "artisticTexturizer":
|
|
2815
|
+
case "texturizer": {
|
|
2816
|
+
const freq = 2 + normalizedRadius * 3;
|
|
2817
|
+
return `<feTurbulence type="fractalNoise" baseFrequency="${freq}" numOctaves="3" seed="3" stitchTiles="stitch" result="texNoise"/><feColorMatrix in="texNoise" type="saturate" values="0" result="texGray"/><feBlend in="SourceGraphic" in2="texGray" mode="overlay"/><feComponentTransfer><feFuncR type="linear" slope="1.1" intercept="0.02"/><feFuncG type="linear" slope="1.1" intercept="0.02"/><feFuncB type="linear" slope="1.1" intercept="0.02"/></feComponentTransfer>`;
|
|
2818
|
+
}
|
|
2819
|
+
case "artisticCrisscrossEtching":
|
|
2820
|
+
case "crisscrossEtching": {
|
|
2821
|
+
const freq = 0.08 + normalizedRadius * 0.12;
|
|
2822
|
+
return `<feColorMatrix type="saturate" values="0" result="gray"/><feTurbulence type="turbulence" baseFrequency="${freq} ${freq * 3}" numOctaves="1" seed="7" result="lines"/><feColorMatrix in="lines" type="saturate" values="0" result="linesGray"/><feBlend in="gray" in2="linesGray" mode="multiply"/><feComponentTransfer><feFuncR type="linear" slope="1.3" intercept="-0.05"/><feFuncG type="linear" slope="1.3" intercept="-0.05"/><feFuncB type="linear" slope="1.3" intercept="-0.05"/></feComponentTransfer>`;
|
|
2823
|
+
}
|
|
2824
|
+
case "artisticMosaic":
|
|
2825
|
+
case "artisticMosaicBubbles":
|
|
2826
|
+
case "artisticMosiaicBubbles":
|
|
2827
|
+
case "mosaicBubbles":
|
|
2828
|
+
case "mosaic": {
|
|
2829
|
+
const blurAmount = Math.max(2, Math.round(radius * 0.8));
|
|
2830
|
+
const freq = 0.02 + normalizedRadius * 0.03;
|
|
2831
|
+
return `<feGaussianBlur in="SourceGraphic" stdDeviation="${blurAmount}" result="blurred"/><feTurbulence type="turbulence" baseFrequency="${freq}" numOctaves="1" seed="4" result="cells"/><feDisplacementMap in="blurred" in2="cells" scale="${blurAmount * 0.5}" xChannelSelector="R" yChannelSelector="G" result="mosaic"/><feComponentTransfer in="mosaic"><feFuncR type="linear" slope="1.05" intercept="0"/><feFuncG type="linear" slope="1.05" intercept="0"/><feFuncB type="linear" slope="1.05" intercept="0"/></feComponentTransfer>`;
|
|
2832
|
+
}
|
|
2833
|
+
case "artisticGlowEdges":
|
|
2834
|
+
case "glowEdges":
|
|
2835
|
+
case "glow_edges": {
|
|
2836
|
+
const edgeBlur = Math.max(1, Math.round(normalizedRadius * 3));
|
|
2837
|
+
return `<feColorMatrix type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0" result="inverted"/><feGaussianBlur in="inverted" stdDeviation="${edgeBlur}" result="blurredInv"/><feBlend in="SourceGraphic" in2="blurredInv" mode="screen"/><feComponentTransfer><feFuncR type="linear" slope="2" intercept="-0.3"/><feFuncG type="linear" slope="2" intercept="-0.3"/><feFuncB type="linear" slope="2" intercept="-0.3"/></feComponentTransfer>`;
|
|
2838
|
+
}
|
|
2839
|
+
case "artisticChalkSketch":
|
|
2840
|
+
case "chalkSketch":
|
|
2841
|
+
case "chalk": {
|
|
2842
|
+
const freq = 1 + normalizedRadius * 2;
|
|
2843
|
+
const desat = Math.max(0, 0.2 - normalizedRadius * 0.2);
|
|
2844
|
+
return `<feColorMatrix type="saturate" values="${desat}" result="gray"/><feTurbulence type="fractalNoise" baseFrequency="${freq}" numOctaves="4" seed="5" stitchTiles="stitch" result="chalkTex"/><feColorMatrix in="chalkTex" type="saturate" values="0" result="chalkGray"/><feBlend in="gray" in2="chalkGray" mode="overlay"/><feComponentTransfer><feFuncR type="linear" slope="1.5" intercept="0.05"/><feFuncG type="linear" slope="1.5" intercept="0.05"/><feFuncB type="linear" slope="1.5" intercept="0.05"/></feComponentTransfer>`;
|
|
2845
|
+
}
|
|
2846
|
+
case "artisticPencilSketch":
|
|
2847
|
+
case "pencilSketch": {
|
|
2848
|
+
const blurAmt = Math.max(3, Math.round(4 + normalizedRadius * 8));
|
|
2849
|
+
return `<feColorMatrix type="saturate" values="0" result="gray"/><feColorMatrix in="gray" type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0" result="invGray"/><feGaussianBlur in="invGray" stdDeviation="${blurAmt}" result="blurInv"/><feBlend in="blurInv" in2="gray" mode="screen" result="sketch"/><feComponentTransfer in="sketch"><feFuncR type="linear" slope="1.6" intercept="-0.15"/><feFuncG type="linear" slope="1.6" intercept="-0.15"/><feFuncB type="linear" slope="1.6" intercept="-0.15"/></feComponentTransfer>`;
|
|
2850
|
+
}
|
|
2851
|
+
case "artisticPencilGrayscale":
|
|
2852
|
+
case "pencilGrayscale":
|
|
2853
|
+
case "grayPencil": {
|
|
2854
|
+
const sharpenBlur = Math.max(0.5, 1 + normalizedRadius * 2);
|
|
2855
|
+
return `<feColorMatrix type="saturate" values="0" result="gray"/><feGaussianBlur in="gray" stdDeviation="${sharpenBlur}" result="grayBlur"/><feComposite in="gray" in2="grayBlur" operator="arithmetic" k1="0" k2="1.5" k3="-0.5" k4="0"/>`;
|
|
2856
|
+
}
|
|
2857
|
+
default:
|
|
2858
|
+
return void 0;
|
|
2859
|
+
}
|
|
2860
|
+
}
|
|
2861
|
+
var normalizeRadius01 = (radius) => clamp(radius / 100, 0, 1);
|
|
2862
|
+
function buildSimpleArtisticCss(effect, radius) {
|
|
2863
|
+
switch (effect) {
|
|
2864
|
+
case "blur":
|
|
2865
|
+
case "glassEffect":
|
|
2866
|
+
return `blur(${Math.min(radius, 20)}px)`;
|
|
2867
|
+
case "artisticBlur":
|
|
2868
|
+
return `blur(${Math.min(radius, 20)}px)`;
|
|
2869
|
+
case "artisticGaussianBlur":
|
|
2870
|
+
return `blur(${Math.min(Math.round(radius * 1.2), 24)}px)`;
|
|
2871
|
+
case "lineDrawing":
|
|
2872
|
+
return "grayscale(100%) contrast(150%)";
|
|
2873
|
+
case "artisticLineDrawing":
|
|
2874
|
+
return "grayscale(100%) contrast(150%)";
|
|
2875
|
+
case "paintStrokes":
|
|
2876
|
+
case "watercolorSponge":
|
|
2877
|
+
return `blur(${Math.min(radius, 8)}px) saturate(140%) brightness(105%)`;
|
|
2878
|
+
case "artisticPaintStrokes":
|
|
2879
|
+
return `blur(${Math.min(radius, 8)}px) saturate(140%) brightness(105%)`;
|
|
2880
|
+
case "artisticWatercolorSponge":
|
|
2881
|
+
return `blur(${Math.min(radius, 8)}px) saturate(150%) brightness(108%)`;
|
|
2882
|
+
case "artisticPaint":
|
|
2883
|
+
case "paint":
|
|
2884
|
+
return `blur(${Math.min(radius, 5)}px) saturate(160%) contrast(110%)`;
|
|
2885
|
+
case "artisticPaintBrush":
|
|
2886
|
+
case "paintBrush":
|
|
2887
|
+
return `blur(${Math.min(radius, 6)}px) saturate(130%)`;
|
|
2888
|
+
case "photocopy":
|
|
2889
|
+
return "grayscale(100%) contrast(200%) brightness(120%)";
|
|
2890
|
+
case "artisticPhotocopy":
|
|
2891
|
+
return "grayscale(100%) contrast(200%) brightness(120%)";
|
|
2892
|
+
case "pastelsSmooth":
|
|
2893
|
+
case "pastels":
|
|
2894
|
+
return `blur(${Math.min(radius, 6)}px) saturate(85%) brightness(105%)`;
|
|
2895
|
+
case "artisticPastelsSmooth":
|
|
2896
|
+
case "artisticPastels":
|
|
2897
|
+
return `blur(${Math.min(radius, 6)}px) saturate(85%) brightness(105%)`;
|
|
2898
|
+
case "artisticMarker":
|
|
2899
|
+
case "marker":
|
|
2900
|
+
return "contrast(130%) saturate(150%)";
|
|
2901
|
+
case "artisticPlasticWrap":
|
|
2902
|
+
case "plasticWrap":
|
|
2903
|
+
return "contrast(150%) brightness(115%) saturate(80%)";
|
|
2904
|
+
case "artisticLightScreen":
|
|
2905
|
+
case "lightScreen":
|
|
2906
|
+
return `brightness(${1.2 + normalizeRadius01(radius) * 0.3}) saturate(${Math.max(
|
|
2907
|
+
0.5,
|
|
2908
|
+
0.8 - normalizeRadius01(radius) * 0.3
|
|
2909
|
+
)})`;
|
|
2910
|
+
case "artisticGlowDiffused":
|
|
2911
|
+
case "glowDiffused":
|
|
2912
|
+
return `blur(${Math.min(radius, 6)}px) brightness(${1.15 + normalizeRadius01(radius) * 0.15})`;
|
|
2913
|
+
case "artisticSharpenEdges":
|
|
2914
|
+
case "sharpen":
|
|
2915
|
+
return "contrast(160%) brightness(105%)";
|
|
2916
|
+
case "glass":
|
|
2917
|
+
case "artisticGlass":
|
|
2918
|
+
return `blur(${Math.min(radius, 6)}px) brightness(110%)`;
|
|
2919
|
+
// Inspector-gallery entries with no DrawingML counterpart. Without these
|
|
2920
|
+
// they fell through to the generic default below, so picking Sepia or
|
|
2921
|
+
// Grayscale in the gallery previewed the effect but rendered a near no-op.
|
|
2922
|
+
case "sepia":
|
|
2923
|
+
return "sepia(100%)";
|
|
2924
|
+
case "grayscale":
|
|
2925
|
+
return "grayscale(100%)";
|
|
2926
|
+
default:
|
|
2927
|
+
return "contrast(105%) saturate(105%)";
|
|
2928
|
+
}
|
|
2929
|
+
}
|
|
2930
|
+
var ARTISTIC_PREVIEW_EFFECTS = /* @__PURE__ */ new Set([
|
|
2931
|
+
"artisticBlur",
|
|
2932
|
+
"artisticCement",
|
|
2933
|
+
"artisticChalkSketch",
|
|
2934
|
+
"artisticCrisscrossEtching",
|
|
2935
|
+
"artisticCutout",
|
|
2936
|
+
"artisticFilmGrain",
|
|
2937
|
+
"artisticGaussianBlur",
|
|
2938
|
+
"artisticGlass",
|
|
2939
|
+
"artisticGlowDiffused",
|
|
2940
|
+
"artisticGlowEdges",
|
|
2941
|
+
"artisticLightScreen",
|
|
2942
|
+
"artisticLineDrawing",
|
|
2943
|
+
"artisticMarker",
|
|
2944
|
+
"artisticMosaic",
|
|
2945
|
+
"artisticMosaicBubbles",
|
|
2946
|
+
"artisticMosiaicBubbles",
|
|
2947
|
+
"artisticPaint",
|
|
2948
|
+
"artisticPaintBrush",
|
|
2949
|
+
"artisticPaintStrokes",
|
|
2950
|
+
"artisticPastels",
|
|
2951
|
+
"artisticPastelsSmooth",
|
|
2952
|
+
"artisticPencilGrayscale",
|
|
2953
|
+
"artisticPencilSketch",
|
|
2954
|
+
"artisticPhotocopy",
|
|
2955
|
+
"artisticPlasticWrap",
|
|
2956
|
+
"artisticSharpenEdges",
|
|
2957
|
+
"artisticTexturizer",
|
|
2958
|
+
"artisticWatercolorSponge",
|
|
2959
|
+
"blur",
|
|
2960
|
+
"cement",
|
|
2961
|
+
"chalk",
|
|
2962
|
+
"chalkSketch",
|
|
2963
|
+
"crisscrossEtching",
|
|
2964
|
+
"cutout",
|
|
2965
|
+
"filmGrain",
|
|
2966
|
+
"glass",
|
|
2967
|
+
"glassEffect",
|
|
2968
|
+
"glowDiffused",
|
|
2969
|
+
"glowEdges",
|
|
2970
|
+
"glow_edges",
|
|
2971
|
+
"grayPencil",
|
|
2972
|
+
"grayscale",
|
|
2973
|
+
"lightScreen",
|
|
2974
|
+
"lineDrawing",
|
|
2975
|
+
"marker",
|
|
2976
|
+
"mosaic",
|
|
2977
|
+
"mosaicBubbles",
|
|
2978
|
+
"paint",
|
|
2979
|
+
"paintBrush",
|
|
2980
|
+
"paintStrokes",
|
|
2981
|
+
"pastels",
|
|
2982
|
+
"pastelsSmooth",
|
|
2983
|
+
"pencilGrayscale",
|
|
2984
|
+
"pencilSketch",
|
|
2985
|
+
"photocopy",
|
|
2986
|
+
"plasticWrap",
|
|
2987
|
+
"sepia",
|
|
2988
|
+
"sharpen",
|
|
2989
|
+
"texturizer",
|
|
2990
|
+
"watercolorSponge"
|
|
2991
|
+
]);
|
|
2992
|
+
|
|
2799
2993
|
// src/pptx/render/image-effect-corrections.ts
|
|
2800
2994
|
function sameCorrection(live4, baked) {
|
|
2801
2995
|
if (!live4 || !baked) {
|
|
@@ -2819,7 +3013,7 @@ function renderedImageCorrections(effects) {
|
|
|
2819
3013
|
...isLive("colorSaturation") ? { colorSaturation: effects.colorSaturation } : {}
|
|
2820
3014
|
};
|
|
2821
3015
|
}
|
|
2822
|
-
function
|
|
3016
|
+
function clamp2(v, lo, hi) {
|
|
2823
3017
|
return v < lo ? lo : v > hi ? hi : v;
|
|
2824
3018
|
}
|
|
2825
3019
|
var NEUTRAL_COLOR_TEMP_K = 6500;
|
|
@@ -2829,7 +3023,7 @@ function buildColorTemperatureCss(colorTempK) {
|
|
|
2829
3023
|
if (diff === 0) {
|
|
2830
3024
|
return void 0;
|
|
2831
3025
|
}
|
|
2832
|
-
const strength =
|
|
3026
|
+
const strength = clamp2(Math.abs(diff) / COLOR_TEMP_RANGE_K, 0, 1);
|
|
2833
3027
|
if (diff < 0) {
|
|
2834
3028
|
const sepiaPct = Math.round(strength * 40);
|
|
2835
3029
|
const hueDeg2 = Math.round(strength * 15);
|
|
@@ -2861,7 +3055,7 @@ function getImageCorrectionsFilterTokens(imageEffects) {
|
|
|
2861
3055
|
}
|
|
2862
3056
|
const sharpenSoftenAmount = effects.sharpenSoften?.amount;
|
|
2863
3057
|
if (typeof sharpenSoftenAmount === "number" && sharpenSoftenAmount < 0) {
|
|
2864
|
-
const strength =
|
|
3058
|
+
const strength = clamp2(Math.abs(sharpenSoftenAmount) / 1e5, 0, 1);
|
|
2865
3059
|
tokens.push(`blur(${(strength * 3).toFixed(2)}px)`);
|
|
2866
3060
|
}
|
|
2867
3061
|
return tokens;
|
|
@@ -2879,24 +3073,11 @@ function getImageSharpenFilter(effects, elementId) {
|
|
|
2879
3073
|
if (typeof amount !== "number" || amount <= 0) {
|
|
2880
3074
|
return void 0;
|
|
2881
3075
|
}
|
|
2882
|
-
const strength =
|
|
3076
|
+
const strength = clamp2(amount / 1e5, 0, 1);
|
|
2883
3077
|
const id = getImageSharpenFilterId(elementId);
|
|
2884
3078
|
const filterMarkup = `<feConvolveMatrix order="3" kernelMatrix="${buildSharpenKernel(strength)}" preserveAlpha="true"/>`;
|
|
2885
3079
|
return { id, cssReference: `url(#${id})`, filterMarkup };
|
|
2886
3080
|
}
|
|
2887
|
-
|
|
2888
|
-
// src/pptx/render/image-effect-filter-values.ts
|
|
2889
|
-
function clamp2(value, minimum, maximum) {
|
|
2890
|
-
return Math.min(maximum, Math.max(minimum, value));
|
|
2891
|
-
}
|
|
2892
|
-
function buildImageBiLevelTable(threshold) {
|
|
2893
|
-
const cutoff = clamp2(threshold, 0, 100);
|
|
2894
|
-
return Array.from({ length: 101 }, (_, index) => index >= cutoff ? "1" : "0").join(" ");
|
|
2895
|
-
}
|
|
2896
|
-
function buildImageLuminanceTransfer(amount) {
|
|
2897
|
-
const normalized = clamp2(amount / 100, -1, 1);
|
|
2898
|
-
return normalized >= 0 ? { slope: 1 - normalized, intercept: normalized } : { slope: 1 + normalized, intercept: 0 };
|
|
2899
|
-
}
|
|
2900
3081
|
function getImageFillOverlayFilterId(elementId) {
|
|
2901
3082
|
return `imgoverlay-${elementId}`;
|
|
2902
3083
|
}
|
|
@@ -2958,7 +3139,7 @@ function buildPatternOverlayTile(pattern) {
|
|
|
2958
3139
|
if (!pattern) {
|
|
2959
3140
|
return void 0;
|
|
2960
3141
|
}
|
|
2961
|
-
const tile8 =
|
|
3142
|
+
const tile8 = chunkKJICUZXM_cjs.getPatternTile(
|
|
2962
3143
|
pattern.preset,
|
|
2963
3144
|
pattern.foreground ?? "#000000",
|
|
2964
3145
|
pattern.background ?? "#ffffff"
|
|
@@ -3012,9 +3193,6 @@ function getImageFillOverlayFilter(element, elementId = pptx.isImageLikeElement(
|
|
|
3012
3193
|
function clamp3(v, lo, hi) {
|
|
3013
3194
|
return v < lo ? lo : v > hi ? hi : v;
|
|
3014
3195
|
}
|
|
3015
|
-
function normalizeRadius01(radius) {
|
|
3016
|
-
return clamp3(radius / 100, 0, 1);
|
|
3017
|
-
}
|
|
3018
3196
|
function getEffects2(element) {
|
|
3019
3197
|
if (!pptx.isImageLikeElement(element)) {
|
|
3020
3198
|
return void 0;
|
|
@@ -3121,74 +3299,6 @@ function getImageFilterCss(element, options) {
|
|
|
3121
3299
|
return filters.length > 0 ? filters.join(" ") : void 0;
|
|
3122
3300
|
}
|
|
3123
3301
|
var getImageEffectsFilter = getImageFilterCss;
|
|
3124
|
-
function buildSimpleArtisticCss(effect, radius) {
|
|
3125
|
-
switch (effect) {
|
|
3126
|
-
case "blur":
|
|
3127
|
-
case "glassEffect":
|
|
3128
|
-
return `blur(${Math.min(radius, 20)}px)`;
|
|
3129
|
-
case "artisticBlur":
|
|
3130
|
-
return `blur(${Math.min(radius, 20)}px)`;
|
|
3131
|
-
case "artisticGaussianBlur":
|
|
3132
|
-
return `blur(${Math.min(Math.round(radius * 1.2), 24)}px)`;
|
|
3133
|
-
case "lineDrawing":
|
|
3134
|
-
return "grayscale(100%) contrast(150%)";
|
|
3135
|
-
case "artisticLineDrawing":
|
|
3136
|
-
return "grayscale(100%) contrast(150%)";
|
|
3137
|
-
case "paintStrokes":
|
|
3138
|
-
case "watercolorSponge":
|
|
3139
|
-
return `blur(${Math.min(radius, 8)}px) saturate(140%) brightness(105%)`;
|
|
3140
|
-
case "artisticPaintStrokes":
|
|
3141
|
-
return `blur(${Math.min(radius, 8)}px) saturate(140%) brightness(105%)`;
|
|
3142
|
-
case "artisticWatercolorSponge":
|
|
3143
|
-
return `blur(${Math.min(radius, 8)}px) saturate(150%) brightness(108%)`;
|
|
3144
|
-
case "artisticPaint":
|
|
3145
|
-
case "paint":
|
|
3146
|
-
return `blur(${Math.min(radius, 5)}px) saturate(160%) contrast(110%)`;
|
|
3147
|
-
case "artisticPaintBrush":
|
|
3148
|
-
case "paintBrush":
|
|
3149
|
-
return `blur(${Math.min(radius, 6)}px) saturate(130%)`;
|
|
3150
|
-
case "photocopy":
|
|
3151
|
-
return "grayscale(100%) contrast(200%) brightness(120%)";
|
|
3152
|
-
case "artisticPhotocopy":
|
|
3153
|
-
return "grayscale(100%) contrast(200%) brightness(120%)";
|
|
3154
|
-
case "pastelsSmooth":
|
|
3155
|
-
case "pastels":
|
|
3156
|
-
return `blur(${Math.min(radius, 6)}px) saturate(85%) brightness(105%)`;
|
|
3157
|
-
case "artisticPastelsSmooth":
|
|
3158
|
-
case "artisticPastels":
|
|
3159
|
-
return `blur(${Math.min(radius, 6)}px) saturate(85%) brightness(105%)`;
|
|
3160
|
-
case "artisticMarker":
|
|
3161
|
-
case "marker":
|
|
3162
|
-
return "contrast(130%) saturate(150%)";
|
|
3163
|
-
case "artisticPlasticWrap":
|
|
3164
|
-
case "plasticWrap":
|
|
3165
|
-
return "contrast(150%) brightness(115%) saturate(80%)";
|
|
3166
|
-
case "artisticLightScreen":
|
|
3167
|
-
case "lightScreen":
|
|
3168
|
-
return `brightness(${1.2 + normalizeRadius01(radius) * 0.3}) saturate(${Math.max(
|
|
3169
|
-
0.5,
|
|
3170
|
-
0.8 - normalizeRadius01(radius) * 0.3
|
|
3171
|
-
)})`;
|
|
3172
|
-
case "artisticGlowDiffused":
|
|
3173
|
-
case "glowDiffused":
|
|
3174
|
-
return `blur(${Math.min(radius, 6)}px) brightness(${1.15 + normalizeRadius01(radius) * 0.15})`;
|
|
3175
|
-
case "artisticSharpenEdges":
|
|
3176
|
-
case "sharpen":
|
|
3177
|
-
return "contrast(160%) brightness(105%)";
|
|
3178
|
-
case "glass":
|
|
3179
|
-
case "artisticGlass":
|
|
3180
|
-
return `blur(${Math.min(radius, 6)}px) brightness(110%)`;
|
|
3181
|
-
// Inspector-gallery entries with no DrawingML counterpart. Without these
|
|
3182
|
-
// they fell through to the generic default below, so picking Sepia or
|
|
3183
|
-
// Grayscale in the gallery previewed the effect but rendered a near no-op.
|
|
3184
|
-
case "sepia":
|
|
3185
|
-
return "sepia(100%)";
|
|
3186
|
-
case "grayscale":
|
|
3187
|
-
return "grayscale(100%)";
|
|
3188
|
-
default:
|
|
3189
|
-
return "contrast(105%) saturate(105%)";
|
|
3190
|
-
}
|
|
3191
|
-
}
|
|
3192
3302
|
function getImageEffectsOpacity(element) {
|
|
3193
3303
|
const effects = getEffects2(element);
|
|
3194
3304
|
if (!effects) {
|
|
@@ -3283,7 +3393,7 @@ function buildImageAlphaFilterMarkup(effects) {
|
|
|
3283
3393
|
}
|
|
3284
3394
|
if (typeof effects.biLevel === "number") {
|
|
3285
3395
|
next((inp, out) => `<feColorMatrix in="${inp}" result="${out}" type="saturate" values="0"/>`);
|
|
3286
|
-
const tbl = buildImageBiLevelTable(effects.biLevel);
|
|
3396
|
+
const tbl = drawingml.buildImageBiLevelTable(effects.biLevel);
|
|
3287
3397
|
next(
|
|
3288
3398
|
(inp, out) => `<feComponentTransfer in="${inp}" result="${out}"><feFuncR type="discrete" tableValues="${tbl}"/><feFuncG type="discrete" tableValues="${tbl}"/><feFuncB type="discrete" tableValues="${tbl}"/></feComponentTransfer>`
|
|
3289
3399
|
);
|
|
@@ -3304,7 +3414,7 @@ function buildImageAlphaFilterMarkup(effects) {
|
|
|
3304
3414
|
);
|
|
3305
3415
|
}
|
|
3306
3416
|
if (effects.hsl && typeof effects.hsl.lum === "number") {
|
|
3307
|
-
const { slope, intercept } = buildImageLuminanceTransfer(effects.hsl.lum);
|
|
3417
|
+
const { slope, intercept } = drawingml.buildImageLuminanceTransfer(effects.hsl.lum);
|
|
3308
3418
|
next(
|
|
3309
3419
|
(inp, out) => `<feComponentTransfer in="${inp}" result="${out}"><feFuncR type="linear" slope="${slope}" intercept="${intercept}"/><feFuncG type="linear" slope="${slope}" intercept="${intercept}"/><feFuncB type="linear" slope="${slope}" intercept="${intercept}"/></feComponentTransfer>`
|
|
3310
3420
|
);
|
|
@@ -3315,7 +3425,7 @@ function buildImageAlphaFilterMarkup(effects) {
|
|
|
3315
3425
|
);
|
|
3316
3426
|
}
|
|
3317
3427
|
if (effects.tint && typeof effects.tint.amt === "number") {
|
|
3318
|
-
const { slope, intercept } = buildImageLuminanceTransfer(effects.tint.amt);
|
|
3428
|
+
const { slope, intercept } = drawingml.buildImageLuminanceTransfer(effects.tint.amt);
|
|
3319
3429
|
next(
|
|
3320
3430
|
(inp, out) => `<feComponentTransfer in="${inp}" result="${out}"><feFuncR type="linear" slope="${slope}" intercept="${intercept}"/><feFuncG type="linear" slope="${slope}" intercept="${intercept}"/><feFuncB type="linear" slope="${slope}" intercept="${intercept}"/></feComponentTransfer>`
|
|
3321
3431
|
);
|
|
@@ -3340,85 +3450,6 @@ function getImageAlphaFilter(element, elementId = pptx.isImageLikeElement(elemen
|
|
|
3340
3450
|
const id = getImageAlphaFilterId(elementId);
|
|
3341
3451
|
return { id, cssReference: `url(#${id})`, filterMarkup: markup };
|
|
3342
3452
|
}
|
|
3343
|
-
function buildDiscreteTable(steps) {
|
|
3344
|
-
const values = [];
|
|
3345
|
-
for (let i = 0; i < steps; i++) {
|
|
3346
|
-
const v = Math.round(i / (steps - 1) * 100) / 100;
|
|
3347
|
-
const count = Math.ceil(256 / steps);
|
|
3348
|
-
for (let j = 0; j < count; j++) {
|
|
3349
|
-
values.push(v);
|
|
3350
|
-
}
|
|
3351
|
-
}
|
|
3352
|
-
return values.slice(0, 256).join(" ");
|
|
3353
|
-
}
|
|
3354
|
-
function buildArtisticFilterMarkup(effectName, radius) {
|
|
3355
|
-
const normalizedRadius = clamp3(radius, 0, 100) / 100;
|
|
3356
|
-
switch (effectName) {
|
|
3357
|
-
case "artisticFilmGrain":
|
|
3358
|
-
case "filmGrain": {
|
|
3359
|
-
const freq = 0.5 + normalizedRadius * 0.5;
|
|
3360
|
-
const opacity = 0.15 + normalizedRadius * 0.25;
|
|
3361
|
-
return `<feTurbulence type="fractalNoise" baseFrequency="${freq}" numOctaves="4" seed="1" stitchTiles="stitch" result="grain"/><feColorMatrix in="grain" type="saturate" values="0" result="grainGray"/><feBlend in="SourceGraphic" in2="grainGray" mode="overlay"/><feComponentTransfer><feFuncR type="linear" slope="${1 + opacity * 0.3}" intercept="${opacity * 0.02}"/><feFuncG type="linear" slope="${1 + opacity * 0.3}" intercept="${opacity * 0.02}"/><feFuncB type="linear" slope="${1 + opacity * 0.3}" intercept="${opacity * 0.02}"/></feComponentTransfer>`;
|
|
3362
|
-
}
|
|
3363
|
-
case "artisticCutout":
|
|
3364
|
-
case "cutout": {
|
|
3365
|
-
const steps = Math.max(2, Math.round(4 + normalizedRadius * 4));
|
|
3366
|
-
const tableValues = buildDiscreteTable(steps);
|
|
3367
|
-
return `<feComponentTransfer><feFuncR type="discrete" tableValues="${tableValues}"/><feFuncG type="discrete" tableValues="${tableValues}"/><feFuncB type="discrete" tableValues="${tableValues}"/></feComponentTransfer>`;
|
|
3368
|
-
}
|
|
3369
|
-
case "artisticCement":
|
|
3370
|
-
case "cement": {
|
|
3371
|
-
const freq = 1.5 + normalizedRadius * 2.5;
|
|
3372
|
-
const desat = Math.max(0, 0.4 - normalizedRadius * 0.3);
|
|
3373
|
-
return `<feColorMatrix type="saturate" values="${desat}" result="desat"/><feTurbulence type="fractalNoise" baseFrequency="${freq}" numOctaves="5" seed="2" stitchTiles="stitch" result="cementNoise"/><feColorMatrix in="cementNoise" type="saturate" values="0" result="cementGray"/><feBlend in="desat" in2="cementGray" mode="multiply"/><feComponentTransfer><feFuncR type="linear" slope="1.2" intercept="0"/><feFuncG type="linear" slope="1.2" intercept="0"/><feFuncB type="linear" slope="1.2" intercept="0"/></feComponentTransfer>`;
|
|
3374
|
-
}
|
|
3375
|
-
case "artisticTexturizer":
|
|
3376
|
-
case "texturizer": {
|
|
3377
|
-
const freq = 2 + normalizedRadius * 3;
|
|
3378
|
-
return `<feTurbulence type="fractalNoise" baseFrequency="${freq}" numOctaves="3" seed="3" stitchTiles="stitch" result="texNoise"/><feColorMatrix in="texNoise" type="saturate" values="0" result="texGray"/><feBlend in="SourceGraphic" in2="texGray" mode="overlay"/><feComponentTransfer><feFuncR type="linear" slope="1.1" intercept="0.02"/><feFuncG type="linear" slope="1.1" intercept="0.02"/><feFuncB type="linear" slope="1.1" intercept="0.02"/></feComponentTransfer>`;
|
|
3379
|
-
}
|
|
3380
|
-
case "artisticCrisscrossEtching":
|
|
3381
|
-
case "crisscrossEtching": {
|
|
3382
|
-
const freq = 0.08 + normalizedRadius * 0.12;
|
|
3383
|
-
return `<feColorMatrix type="saturate" values="0" result="gray"/><feTurbulence type="turbulence" baseFrequency="${freq} ${freq * 3}" numOctaves="1" seed="7" result="lines"/><feColorMatrix in="lines" type="saturate" values="0" result="linesGray"/><feBlend in="gray" in2="linesGray" mode="multiply"/><feComponentTransfer><feFuncR type="linear" slope="1.3" intercept="-0.05"/><feFuncG type="linear" slope="1.3" intercept="-0.05"/><feFuncB type="linear" slope="1.3" intercept="-0.05"/></feComponentTransfer>`;
|
|
3384
|
-
}
|
|
3385
|
-
case "artisticMosaic":
|
|
3386
|
-
case "artisticMosaicBubbles":
|
|
3387
|
-
case "artisticMosiaicBubbles":
|
|
3388
|
-
case "mosaicBubbles":
|
|
3389
|
-
case "mosaic": {
|
|
3390
|
-
const blurAmount = Math.max(2, Math.round(radius * 0.8));
|
|
3391
|
-
const freq = 0.02 + normalizedRadius * 0.03;
|
|
3392
|
-
return `<feGaussianBlur in="SourceGraphic" stdDeviation="${blurAmount}" result="blurred"/><feTurbulence type="turbulence" baseFrequency="${freq}" numOctaves="1" seed="4" result="cells"/><feDisplacementMap in="blurred" in2="cells" scale="${blurAmount * 0.5}" xChannelSelector="R" yChannelSelector="G" result="mosaic"/><feComponentTransfer in="mosaic"><feFuncR type="linear" slope="1.05" intercept="0"/><feFuncG type="linear" slope="1.05" intercept="0"/><feFuncB type="linear" slope="1.05" intercept="0"/></feComponentTransfer>`;
|
|
3393
|
-
}
|
|
3394
|
-
case "artisticGlowEdges":
|
|
3395
|
-
case "glowEdges":
|
|
3396
|
-
case "glow_edges": {
|
|
3397
|
-
const edgeBlur = Math.max(1, Math.round(normalizedRadius * 3));
|
|
3398
|
-
return `<feColorMatrix type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0" result="inverted"/><feGaussianBlur in="inverted" stdDeviation="${edgeBlur}" result="blurredInv"/><feBlend in="SourceGraphic" in2="blurredInv" mode="screen"/><feComponentTransfer><feFuncR type="linear" slope="2" intercept="-0.3"/><feFuncG type="linear" slope="2" intercept="-0.3"/><feFuncB type="linear" slope="2" intercept="-0.3"/></feComponentTransfer>`;
|
|
3399
|
-
}
|
|
3400
|
-
case "artisticChalkSketch":
|
|
3401
|
-
case "chalkSketch":
|
|
3402
|
-
case "chalk": {
|
|
3403
|
-
const freq = 1 + normalizedRadius * 2;
|
|
3404
|
-
const desat = Math.max(0, 0.2 - normalizedRadius * 0.2);
|
|
3405
|
-
return `<feColorMatrix type="saturate" values="${desat}" result="gray"/><feTurbulence type="fractalNoise" baseFrequency="${freq}" numOctaves="4" seed="5" stitchTiles="stitch" result="chalkTex"/><feColorMatrix in="chalkTex" type="saturate" values="0" result="chalkGray"/><feBlend in="gray" in2="chalkGray" mode="overlay"/><feComponentTransfer><feFuncR type="linear" slope="1.5" intercept="0.05"/><feFuncG type="linear" slope="1.5" intercept="0.05"/><feFuncB type="linear" slope="1.5" intercept="0.05"/></feComponentTransfer>`;
|
|
3406
|
-
}
|
|
3407
|
-
case "artisticPencilSketch":
|
|
3408
|
-
case "pencilSketch": {
|
|
3409
|
-
const blurAmt = Math.max(3, Math.round(4 + normalizedRadius * 8));
|
|
3410
|
-
return `<feColorMatrix type="saturate" values="0" result="gray"/><feColorMatrix in="gray" type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0" result="invGray"/><feGaussianBlur in="invGray" stdDeviation="${blurAmt}" result="blurInv"/><feBlend in="blurInv" in2="gray" mode="screen" result="sketch"/><feComponentTransfer in="sketch"><feFuncR type="linear" slope="1.6" intercept="-0.15"/><feFuncG type="linear" slope="1.6" intercept="-0.15"/><feFuncB type="linear" slope="1.6" intercept="-0.15"/></feComponentTransfer>`;
|
|
3411
|
-
}
|
|
3412
|
-
case "artisticPencilGrayscale":
|
|
3413
|
-
case "pencilGrayscale":
|
|
3414
|
-
case "grayPencil": {
|
|
3415
|
-
const sharpenBlur = Math.max(0.5, 1 + normalizedRadius * 2);
|
|
3416
|
-
return `<feColorMatrix type="saturate" values="0" result="gray"/><feGaussianBlur in="gray" stdDeviation="${sharpenBlur}" result="grayBlur"/><feComposite in="gray" in2="grayBlur" operator="arithmetic" k1="0" k2="1.5" k3="-0.5" k4="0"/>`;
|
|
3417
|
-
}
|
|
3418
|
-
default:
|
|
3419
|
-
return void 0;
|
|
3420
|
-
}
|
|
3421
|
-
}
|
|
3422
3453
|
function getArtisticImageFilter(element, elementId = pptx.isImageLikeElement(element) ? element.id : "") {
|
|
3423
3454
|
const effects = getEffects2(element);
|
|
3424
3455
|
if (!isArtisticEffectRendered(effects) || !needsSvgArtisticFilter(effects.artisticEffect)) {
|
|
@@ -6654,10 +6685,10 @@ function getMeasureCtx() {
|
|
|
6654
6685
|
return measureCtx;
|
|
6655
6686
|
}
|
|
6656
6687
|
function envelopeFontSizePx(font) {
|
|
6657
|
-
return font.fontSizePx && font.fontSizePx > 0 ? font.fontSizePx :
|
|
6688
|
+
return font.fontSizePx && font.fontSizePx > 0 ? font.fontSizePx : chunkKJICUZXM_cjs.DEFAULT_TEXT_FONT_SIZE;
|
|
6658
6689
|
}
|
|
6659
6690
|
function toCanvasFont(font, sizePx = envelopeFontSizePx(font)) {
|
|
6660
|
-
const family2 = font.fontFamily ||
|
|
6691
|
+
const family2 = font.fontFamily || chunkKJICUZXM_cjs.DEFAULT_FONT_FAMILY;
|
|
6661
6692
|
return `${fontStyleShorthand(family2, font.italic)}${fontWeightShorthand(family2, font.bold)}${sizePx}px ${family2}`;
|
|
6662
6693
|
}
|
|
6663
6694
|
function enableKerning(ctx) {
|
|
@@ -6824,8 +6855,8 @@ function envelopeWrapWidth(boxWidth, body) {
|
|
|
6824
6855
|
if (!body || body.textWrap === "none") {
|
|
6825
6856
|
return void 0;
|
|
6826
6857
|
}
|
|
6827
|
-
const left = body.bodyInsetLeft ??
|
|
6828
|
-
const right = body.bodyInsetRight ??
|
|
6858
|
+
const left = body.bodyInsetLeft ?? chunkKJICUZXM_cjs.DEFAULT_BODY_INSET_LR_PX;
|
|
6859
|
+
const right = body.bodyInsetRight ?? chunkKJICUZXM_cjs.DEFAULT_BODY_INSET_LR_PX;
|
|
6829
6860
|
return Math.max(0, boxWidth - left - right);
|
|
6830
6861
|
}
|
|
6831
6862
|
function sumAdvances(items) {
|
|
@@ -6836,11 +6867,11 @@ function wrapPiece(items, maxWidth) {
|
|
|
6836
6867
|
let row = [];
|
|
6837
6868
|
let rowWidth = 0;
|
|
6838
6869
|
let rowHasWord = false;
|
|
6839
|
-
let
|
|
6870
|
+
let pending3 = [];
|
|
6840
6871
|
let i = 0;
|
|
6841
6872
|
while (i < items.length) {
|
|
6842
6873
|
if (WHITESPACE_RE.test(items[i].char)) {
|
|
6843
|
-
|
|
6874
|
+
pending3.push(items[i]);
|
|
6844
6875
|
i++;
|
|
6845
6876
|
continue;
|
|
6846
6877
|
}
|
|
@@ -6850,19 +6881,19 @@ function wrapPiece(items, maxWidth) {
|
|
|
6850
6881
|
i++;
|
|
6851
6882
|
}
|
|
6852
6883
|
const wordWidth = sumAdvances(word);
|
|
6853
|
-
const pendingWidth = sumAdvances(
|
|
6884
|
+
const pendingWidth = sumAdvances(pending3);
|
|
6854
6885
|
if (rowHasWord && rowWidth + pendingWidth + wordWidth > maxWidth + FIT_EPSILON) {
|
|
6855
6886
|
rows.push(row);
|
|
6856
6887
|
row = word;
|
|
6857
6888
|
rowWidth = wordWidth;
|
|
6858
6889
|
} else {
|
|
6859
|
-
row.push(...
|
|
6890
|
+
row.push(...pending3, ...word);
|
|
6860
6891
|
rowWidth += pendingWidth + wordWidth;
|
|
6861
6892
|
}
|
|
6862
6893
|
rowHasWord = true;
|
|
6863
|
-
|
|
6894
|
+
pending3 = [];
|
|
6864
6895
|
}
|
|
6865
|
-
row.push(...
|
|
6896
|
+
row.push(...pending3);
|
|
6866
6897
|
rows.push(row);
|
|
6867
6898
|
return rows;
|
|
6868
6899
|
}
|
|
@@ -7641,13 +7672,13 @@ var EmbeddedFontCandidates = class {
|
|
|
7641
7672
|
* from before the list was fully released never touches a later
|
|
7642
7673
|
* registration of the same list.
|
|
7643
7674
|
*/
|
|
7644
|
-
add(list,
|
|
7675
|
+
add(list, keyOf2) {
|
|
7645
7676
|
let registration = this.registrations.get(list);
|
|
7646
7677
|
if (!registration) {
|
|
7647
7678
|
registration = { keys: /* @__PURE__ */ new Set(), owners: 0 };
|
|
7648
7679
|
this.registrations.set(list, registration);
|
|
7649
7680
|
for (const font of list) {
|
|
7650
|
-
const key =
|
|
7681
|
+
const key = keyOf2(font);
|
|
7651
7682
|
if (key === void 0) {
|
|
7652
7683
|
continue;
|
|
7653
7684
|
}
|
|
@@ -7714,7 +7745,7 @@ var EmbeddedFontCandidates = class {
|
|
|
7714
7745
|
}
|
|
7715
7746
|
}
|
|
7716
7747
|
};
|
|
7717
|
-
function createEmbeddedOutlineFontsSlot(
|
|
7748
|
+
function createEmbeddedOutlineFontsSlot(cache2) {
|
|
7718
7749
|
let current;
|
|
7719
7750
|
let releaseCurrent;
|
|
7720
7751
|
const release = () => {
|
|
@@ -7733,7 +7764,7 @@ function createEmbeddedOutlineFontsSlot(cache) {
|
|
|
7733
7764
|
return;
|
|
7734
7765
|
}
|
|
7735
7766
|
current = fonts;
|
|
7736
|
-
releaseCurrent =
|
|
7767
|
+
releaseCurrent = cache2.registerEmbeddedFonts(fonts);
|
|
7737
7768
|
},
|
|
7738
7769
|
release
|
|
7739
7770
|
};
|
|
@@ -7801,14 +7832,14 @@ function extractGlyphOutlineCommands(font, char, x, y, fontSizePx) {
|
|
|
7801
7832
|
return void 0;
|
|
7802
7833
|
}
|
|
7803
7834
|
}
|
|
7804
|
-
function createGlyphOutlineLookup(
|
|
7835
|
+
function createGlyphOutlineLookup(cache2) {
|
|
7805
7836
|
return (char, font, x, y) => {
|
|
7806
7837
|
if (WHITESPACE_RE3.test(char)) {
|
|
7807
7838
|
return [];
|
|
7808
7839
|
}
|
|
7809
|
-
const parsed =
|
|
7840
|
+
const parsed = cache2.get(font.fontFamily, font.bold, font.italic);
|
|
7810
7841
|
if (parsed) {
|
|
7811
|
-
const size2 = font.fontSizePx && font.fontSizePx > 0 ? font.fontSizePx :
|
|
7842
|
+
const size2 = font.fontSizePx && font.fontSizePx > 0 ? font.fontSizePx : chunkKJICUZXM_cjs.DEFAULT_TEXT_FONT_SIZE;
|
|
7812
7843
|
const commands = extractGlyphOutlineCommands(parsed, char, x, y, size2);
|
|
7813
7844
|
if (commands) {
|
|
7814
7845
|
return commands;
|
|
@@ -8648,7 +8679,7 @@ var COMBO_SERIES_TYPE_OPTIONS = [
|
|
|
8648
8679
|
function patchChartData(data, patch) {
|
|
8649
8680
|
const { chartType, ...rest } = patch;
|
|
8650
8681
|
if (chartType === "pareto") {
|
|
8651
|
-
return { ...
|
|
8682
|
+
return { ...chunkKJICUZXM_cjs.applyParetoConversion(data), ...rest };
|
|
8652
8683
|
}
|
|
8653
8684
|
if (chartType && chartType !== data.chartType) {
|
|
8654
8685
|
const adapted = pptx.chartDataChangeType(data, chartType);
|
|
@@ -8710,8 +8741,8 @@ function buildParetoInsertData() {
|
|
|
8710
8741
|
layout: "histogram",
|
|
8711
8742
|
binCount: PARETO_BIN_COUNT
|
|
8712
8743
|
};
|
|
8713
|
-
const bins =
|
|
8714
|
-
const ordered =
|
|
8744
|
+
const bins = chunkKJICUZXM_cjs.computeHistogramBins(PARETO_VALUES, histogramOptions);
|
|
8745
|
+
const ordered = chunkKJICUZXM_cjs.orderParetoEntries(
|
|
8715
8746
|
bins.map((bin, index) => ({ value: bin.value, label: bin.label, sourcePointIndex: index }))
|
|
8716
8747
|
);
|
|
8717
8748
|
return {
|
|
@@ -8724,7 +8755,7 @@ function buildParetoInsertData() {
|
|
|
8724
8755
|
},
|
|
8725
8756
|
{
|
|
8726
8757
|
name: "Cumulative %",
|
|
8727
|
-
values:
|
|
8758
|
+
values: chunkKJICUZXM_cjs.cumulativePercentOfTotal(ordered.map((entry6) => entry6.value)),
|
|
8728
8759
|
histogramOptions: { layout: "pareto" }
|
|
8729
8760
|
}
|
|
8730
8761
|
]
|
|
@@ -8987,7 +9018,7 @@ var FILL_PATTERN_LABEL_KEYS = {
|
|
|
8987
9018
|
trellis: "pptx.fillPatterns.trellis",
|
|
8988
9019
|
zigZag: "pptx.fillPatterns.zigZag"
|
|
8989
9020
|
};
|
|
8990
|
-
var PATTERN_PRESET_OPTIONS =
|
|
9021
|
+
var PATTERN_PRESET_OPTIONS = chunkKJICUZXM_cjs.OOXML_PATTERN_PRESETS.map(
|
|
8991
9022
|
(value) => ({ value, labelKey: FILL_PATTERN_LABEL_KEYS[value] })
|
|
8992
9023
|
);
|
|
8993
9024
|
|
|
@@ -9119,14 +9150,14 @@ function setDataLabelsRangeCache(series, pointIndex, text4) {
|
|
|
9119
9150
|
if (!range || pointIndex < 0) {
|
|
9120
9151
|
return series;
|
|
9121
9152
|
}
|
|
9122
|
-
const
|
|
9123
|
-
while (
|
|
9124
|
-
|
|
9153
|
+
const cache2 = [...range.cache];
|
|
9154
|
+
while (cache2.length <= pointIndex) {
|
|
9155
|
+
cache2.push("");
|
|
9125
9156
|
}
|
|
9126
|
-
|
|
9157
|
+
cache2[pointIndex] = text4;
|
|
9127
9158
|
return {
|
|
9128
9159
|
...series,
|
|
9129
|
-
dataLabelOptions: { ...series.dataLabelOptions, dataLabelsRange: { ...range, cache } }
|
|
9160
|
+
dataLabelOptions: { ...series.dataLabelOptions, dataLabelsRange: { ...range, cache: cache2 } }
|
|
9130
9161
|
};
|
|
9131
9162
|
}
|
|
9132
9163
|
var labelKeyOf = (id) => `pptx.chart.style${id[0].toUpperCase()}${id.slice(1)}`;
|
|
@@ -9233,7 +9264,7 @@ function applyChartElementToggle(chartData, key, checked) {
|
|
|
9233
9264
|
style: { ...chartData.style, ...chartDataLabelsTogglePatch(chartData.style, checked) }
|
|
9234
9265
|
});
|
|
9235
9266
|
case "gridlines":
|
|
9236
|
-
return patchChartData(chartData,
|
|
9267
|
+
return patchChartData(chartData, chunkKJICUZXM_cjs.chartGridlinesPatch(chartData, checked));
|
|
9237
9268
|
case "axes":
|
|
9238
9269
|
return patchChartData(chartData, chartAxesVisibilityPatch(chartData, checked));
|
|
9239
9270
|
case "axisTitles":
|
|
@@ -9272,7 +9303,7 @@ function buildElements(chartData) {
|
|
|
9272
9303
|
{
|
|
9273
9304
|
key: "gridlines",
|
|
9274
9305
|
labelKey: "pptx.chart.showGridlines",
|
|
9275
|
-
checked:
|
|
9306
|
+
checked: chunkKJICUZXM_cjs.chartGridlinesState(chartData)
|
|
9276
9307
|
},
|
|
9277
9308
|
{
|
|
9278
9309
|
key: "dataLabels",
|
|
@@ -11316,17 +11347,17 @@ function chartEventPathElements(event) {
|
|
|
11316
11347
|
}
|
|
11317
11348
|
function findChartPartElementInEvent(event) {
|
|
11318
11349
|
for (const el of chartEventPathElements(event)) {
|
|
11319
|
-
if (el.getAttribute(
|
|
11350
|
+
if (el.getAttribute(chunkHIRBPTML_cjs.CHART_PART_ATTR) !== null) {
|
|
11320
11351
|
return el;
|
|
11321
11352
|
}
|
|
11322
11353
|
}
|
|
11323
11354
|
return null;
|
|
11324
11355
|
}
|
|
11325
11356
|
function findChartPartInEvent(event) {
|
|
11326
|
-
return
|
|
11357
|
+
return chunkHIRBPTML_cjs.chartPartFromElement(findChartPartElementInEvent(event));
|
|
11327
11358
|
}
|
|
11328
11359
|
function isChartTitleEvent(event) {
|
|
11329
|
-
return findChartPartElementInEvent(event)?.getAttribute(
|
|
11360
|
+
return findChartPartElementInEvent(event)?.getAttribute(chunkHIRBPTML_cjs.CHART_PART_ATTR) === "title";
|
|
11330
11361
|
}
|
|
11331
11362
|
|
|
11332
11363
|
// src/pptx/render/chart-format/chart-format-hit-test.ts
|
|
@@ -11334,7 +11365,7 @@ function inBox(p, box) {
|
|
|
11334
11365
|
return p.x >= box.left && p.x <= box.right && p.y >= box.top && p.y <= box.bottom;
|
|
11335
11366
|
}
|
|
11336
11367
|
function hitsText(p, texts) {
|
|
11337
|
-
return (texts ?? []).some((text4) => !text4.transform && inBox(p,
|
|
11368
|
+
return (texts ?? []).some((text4) => !text4.transform && inBox(p, chunkKJICUZXM_cjs.chartTextBox(text4)));
|
|
11338
11369
|
}
|
|
11339
11370
|
function nearLine(p, line4, tolerance) {
|
|
11340
11371
|
const dx = line4.x2 - line4.x1;
|
|
@@ -11347,7 +11378,7 @@ function nearLine(p, line4, tolerance) {
|
|
|
11347
11378
|
}
|
|
11348
11379
|
function chartFormatTargetAtPoint(vm, data, point) {
|
|
11349
11380
|
if (data.style?.hasLegend !== false && vm.legend.length > 0) {
|
|
11350
|
-
const hitLegend =
|
|
11381
|
+
const hitLegend = chunkKJICUZXM_cjs.computeChartLegendLayout(vm).some(
|
|
11351
11382
|
(item4) => inBox(point, {
|
|
11352
11383
|
left: item4.x - 3,
|
|
11353
11384
|
top: item4.y - 9,
|
|
@@ -11362,12 +11393,12 @@ function chartFormatTargetAtPoint(vm, data, point) {
|
|
|
11362
11393
|
if (data.style?.hasDataLabels && hitsText(point, vm.dataLabels)) {
|
|
11363
11394
|
return "dataLabels";
|
|
11364
11395
|
}
|
|
11365
|
-
const valueAxis =
|
|
11366
|
-
const categoryAxis =
|
|
11396
|
+
const valueAxis = chunkKJICUZXM_cjs.chartAxisIndex(data, ["valAx"]);
|
|
11397
|
+
const categoryAxis = chunkKJICUZXM_cjs.chartAxisIndex(data, ["catAx", "dateAx"]);
|
|
11367
11398
|
if (valueAxis >= 0 && hitsText(point, vm.axisLabels)) {
|
|
11368
11399
|
return `axis:${valueAxis}`;
|
|
11369
11400
|
}
|
|
11370
|
-
const secondaryValue =
|
|
11401
|
+
const secondaryValue = chunkKJICUZXM_cjs.chartAxisIndex(data, ["valAx"], 1);
|
|
11371
11402
|
if (secondaryValue >= 0 && hitsText(point, vm.secondaryAxisLabels)) {
|
|
11372
11403
|
return `axis:${secondaryValue}`;
|
|
11373
11404
|
}
|
|
@@ -11379,7 +11410,7 @@ function chartFormatTargetAtPoint(vm, data, point) {
|
|
|
11379
11410
|
return `majorGridlines:${valueAxis}`;
|
|
11380
11411
|
}
|
|
11381
11412
|
}
|
|
11382
|
-
const bounds =
|
|
11413
|
+
const bounds = chunkKJICUZXM_cjs.chartPlotBounds(vm);
|
|
11383
11414
|
if (bounds && inBox(point, bounds)) {
|
|
11384
11415
|
return "plotArea";
|
|
11385
11416
|
}
|
|
@@ -11408,7 +11439,7 @@ function chartPartUnderPointer(event, host2) {
|
|
|
11408
11439
|
if (!host2.contains(node)) {
|
|
11409
11440
|
continue;
|
|
11410
11441
|
}
|
|
11411
|
-
const part = node.closest(`[${
|
|
11442
|
+
const part = node.closest(`[${chunkHIRBPTML_cjs.CHART_PART_ATTR}]`);
|
|
11412
11443
|
if (part) {
|
|
11413
11444
|
return part;
|
|
11414
11445
|
}
|
|
@@ -11433,12 +11464,12 @@ function chartFormatTargetFromEvent(event, host2, element) {
|
|
|
11433
11464
|
return "chartArea";
|
|
11434
11465
|
}
|
|
11435
11466
|
const part = findChartPartElementInEvent(event) ?? chartPartUnderPointer(event, host2);
|
|
11436
|
-
const role = part?.getAttribute(
|
|
11467
|
+
const role = part?.getAttribute(chunkHIRBPTML_cjs.CHART_PART_ATTR);
|
|
11437
11468
|
if (role === "title") {
|
|
11438
11469
|
return "title";
|
|
11439
11470
|
}
|
|
11440
11471
|
if (role === "dataPoint" || role === "series") {
|
|
11441
|
-
const series = Number(part?.getAttribute(
|
|
11472
|
+
const series = Number(part?.getAttribute(chunkHIRBPTML_cjs.CHART_PART_SERIES_ATTR));
|
|
11442
11473
|
if (Number.isInteger(series) && element.chartData.series[series]) {
|
|
11443
11474
|
return `series:${series}`;
|
|
11444
11475
|
}
|
|
@@ -11447,7 +11478,7 @@ function chartFormatTargetFromEvent(event, host2, element) {
|
|
|
11447
11478
|
if (!svg2) {
|
|
11448
11479
|
return "chartArea";
|
|
11449
11480
|
}
|
|
11450
|
-
const vm =
|
|
11481
|
+
const vm = chunkKJICUZXM_cjs.buildChartViewModel(element);
|
|
11451
11482
|
return chartFormatTargetAtPoint(
|
|
11452
11483
|
vm,
|
|
11453
11484
|
element.chartData,
|
|
@@ -11913,14 +11944,14 @@ function advanceChartMarkDrag(state, clientX, clientY, rect3) {
|
|
|
11913
11944
|
return null;
|
|
11914
11945
|
}
|
|
11915
11946
|
const travelled = Math.hypot(clientX - state.startClientX, clientY - state.startClientY);
|
|
11916
|
-
if (!state.moved && travelled <
|
|
11947
|
+
if (!state.moved && travelled < chunkHIRBPTML_cjs.CHART_DRAG_THRESHOLD_PX) {
|
|
11917
11948
|
return null;
|
|
11918
11949
|
}
|
|
11919
11950
|
if (rect3.width === 0 || rect3.height === 0) {
|
|
11920
11951
|
return null;
|
|
11921
11952
|
}
|
|
11922
11953
|
state.moved = true;
|
|
11923
|
-
const pointer = clientPointToViewBox(clientX, clientY, rect3, state.svgWidth, state.svgHeight), value =
|
|
11954
|
+
const pointer = clientPointToViewBox(clientX, clientY, rect3, state.svgWidth, state.svgHeight), value = chunkHIRBPTML_cjs.resolveChartDragValue(state.geometry, pointer), chartData = chunkHIRBPTML_cjs.withChartPointValue(
|
|
11924
11955
|
state.baseChartData,
|
|
11925
11956
|
state.part.seriesIndex,
|
|
11926
11957
|
state.part.pointIndex,
|
|
@@ -12943,9 +12974,9 @@ function buildAnimationTimelineRows(animations, anchors = []) {
|
|
|
12943
12974
|
}));
|
|
12944
12975
|
return [...editorRows, ...nativeRows].sort((a, b) => a.order - b.order);
|
|
12945
12976
|
}
|
|
12946
|
-
function reorderAnimationTimelineRows(rows,
|
|
12977
|
+
function reorderAnimationTimelineRows(rows, sourceKey2, targetIndex) {
|
|
12947
12978
|
const sorted = [...rows].sort((a, b) => a.order - b.order);
|
|
12948
|
-
const sourceIndex = sorted.findIndex((row) => row.key ===
|
|
12979
|
+
const sourceIndex = sorted.findIndex((row) => row.key === sourceKey2);
|
|
12949
12980
|
if (sourceIndex < 0 || targetIndex < 0 || targetIndex >= sorted.length || sourceIndex === targetIndex) {
|
|
12950
12981
|
return sorted.map((row, i) => ({ ...row, order: i }));
|
|
12951
12982
|
}
|
|
@@ -13374,8 +13405,8 @@ function revealedElementStyles(groups, step2) {
|
|
|
13374
13405
|
function pendingElementStyles(groups, step2) {
|
|
13375
13406
|
const result = /* @__PURE__ */ new Map();
|
|
13376
13407
|
const clamped = clampStep(step2, groups.length);
|
|
13377
|
-
const
|
|
13378
|
-
for (const group of
|
|
13408
|
+
const pending3 = groups.slice(clamped);
|
|
13409
|
+
for (const group of pending3) {
|
|
13379
13410
|
for (const animation of group.animations) {
|
|
13380
13411
|
const hidden = initialHiddenStyle(animation);
|
|
13381
13412
|
if (Object.keys(hidden).length > 0 && !result.has(animation.elementId)) {
|
|
@@ -23000,7 +23031,7 @@ function borderToCss(border, resolve) {
|
|
|
23000
23031
|
const width = border.width ?? 1;
|
|
23001
23032
|
const dash = ooxmlDashToCssBorderStyle(border.dash);
|
|
23002
23033
|
const color = border.color ?? resolve(border.fill) ?? "#000000";
|
|
23003
|
-
return
|
|
23034
|
+
return chunkFROIGMTI_cjs.screenBorder(width, dash, color);
|
|
23004
23035
|
}
|
|
23005
23036
|
function collectSections(entry6, tableData, pos) {
|
|
23006
23037
|
const { rowIndex, cellIndex, rowCount, columnCount } = pos;
|
|
@@ -23289,8 +23320,8 @@ function hexToRgb2(hex2) {
|
|
|
23289
23320
|
};
|
|
23290
23321
|
}
|
|
23291
23322
|
function rgbToHex2(r, g, b) {
|
|
23292
|
-
const
|
|
23293
|
-
return `#${
|
|
23323
|
+
const clamp11 = (v) => Math.max(0, Math.min(255, Math.round(v)));
|
|
23324
|
+
return `#${clamp11(r).toString(16).padStart(2, "0").toUpperCase()}${clamp11(g).toString(16).padStart(2, "0").toUpperCase()}${clamp11(b).toString(16).padStart(2, "0").toUpperCase()}`;
|
|
23294
23325
|
}
|
|
23295
23326
|
function tintColor(hex2, tintFactor) {
|
|
23296
23327
|
const { r, g, b } = hexToRgb2(hex2);
|
|
@@ -23349,7 +23380,7 @@ function gradientCssFromFill(fill3, colorScheme) {
|
|
|
23349
23380
|
position: stop.position
|
|
23350
23381
|
}))
|
|
23351
23382
|
};
|
|
23352
|
-
return
|
|
23383
|
+
return chunkKJICUZXM_cjs.buildGradientCss(shapeLike);
|
|
23353
23384
|
}
|
|
23354
23385
|
function applyStyleFill(fill3, colorScheme, css, fallback) {
|
|
23355
23386
|
if (fill3?.noFill) {
|
|
@@ -23375,13 +23406,13 @@ function applyStyleFill(fill3, colorScheme, css, fallback) {
|
|
|
23375
23406
|
}
|
|
23376
23407
|
}
|
|
23377
23408
|
if (fill3?.pattern) {
|
|
23378
|
-
const fg =
|
|
23409
|
+
const fg = chunkKJICUZXM_cjs.normalizeHexColor(
|
|
23379
23410
|
resolveStyleFillColor(fill3.pattern.foreground, colorScheme),
|
|
23380
23411
|
"#000000"
|
|
23381
|
-
), bg =
|
|
23412
|
+
), bg = chunkKJICUZXM_cjs.normalizeHexColor(
|
|
23382
23413
|
resolveStyleFillColor(fill3.pattern.background, colorScheme),
|
|
23383
23414
|
"#ffffff"
|
|
23384
|
-
), svg2 =
|
|
23415
|
+
), svg2 = chunkKJICUZXM_cjs.getPatternSvg(fill3.pattern.preset, fg, bg);
|
|
23385
23416
|
clearBackground(css);
|
|
23386
23417
|
if (svg2) {
|
|
23387
23418
|
css.backgroundImage = `url("data:image/svg+xml,${encodeURIComponent(svg2)}")`;
|
|
@@ -23390,7 +23421,7 @@ function applyStyleFill(fill3, colorScheme, css, fallback) {
|
|
|
23390
23421
|
return true;
|
|
23391
23422
|
}
|
|
23392
23423
|
const resolved2 = resolveStyleFillColor(fill3, colorScheme);
|
|
23393
|
-
const color = (resolved2 && fill3?.alpha !== void 0 ?
|
|
23424
|
+
const color = (resolved2 && fill3?.alpha !== void 0 ? chunkKJICUZXM_cjs.colorWithOpacity(resolved2, fill3.alpha / 1e5) : resolved2) ?? fallback;
|
|
23394
23425
|
if (color) {
|
|
23395
23426
|
layerSolidColor(css, color);
|
|
23396
23427
|
return true;
|
|
@@ -23774,8 +23805,8 @@ function getMeasureContext() {
|
|
|
23774
23805
|
return measureContext2;
|
|
23775
23806
|
}
|
|
23776
23807
|
function toCanvasFont2(font) {
|
|
23777
|
-
const size2 = font.fontSizePx && font.fontSizePx > 0 ? font.fontSizePx :
|
|
23778
|
-
const family2 = font.fontFamily ||
|
|
23808
|
+
const size2 = font.fontSizePx && font.fontSizePx > 0 ? font.fontSizePx : chunkKJICUZXM_cjs.DEFAULT_TEXT_FONT_SIZE;
|
|
23809
|
+
const family2 = font.fontFamily || chunkKJICUZXM_cjs.DEFAULT_FONT_FAMILY;
|
|
23779
23810
|
return `${fontStyleShorthand(family2, font.italic)}${fontWeightShorthand(family2, font.bold)}${size2}px ${family2}`;
|
|
23780
23811
|
}
|
|
23781
23812
|
function advancesOf(ctx, canvasFont, chars) {
|
|
@@ -23968,7 +23999,7 @@ function resolveTextOutlineDashCss(s, fillColor) {
|
|
|
23968
23999
|
if (s.textFillGradient || s.textFillPattern || s.textFillBlipUrl || s.highlightColor) {
|
|
23969
24000
|
return void 0;
|
|
23970
24001
|
}
|
|
23971
|
-
const strokeColor =
|
|
24002
|
+
const strokeColor = chunkKJICUZXM_cjs.normalizeHexColor(s.textOutlineColor, fillColor ?? "#000000");
|
|
23972
24003
|
return {
|
|
23973
24004
|
WebkitTextStroke: `${width}px transparent`,
|
|
23974
24005
|
WebkitTextFillColor: s.textFillNone ? "transparent" : fillColor ?? "currentColor",
|
|
@@ -24138,13 +24169,13 @@ function applyExtraRunProps(style, s, text4, font) {
|
|
|
24138
24169
|
style.fontKerning = fontKerning;
|
|
24139
24170
|
}
|
|
24140
24171
|
if (s.highlightColor) {
|
|
24141
|
-
style.backgroundColor =
|
|
24172
|
+
style.backgroundColor = chunkKJICUZXM_cjs.normalizeHexColor(s.highlightColor, "transparent");
|
|
24142
24173
|
}
|
|
24143
24174
|
if (s.underlineColor) {
|
|
24144
|
-
style.textDecorationColor =
|
|
24175
|
+
style.textDecorationColor = chunkKJICUZXM_cjs.normalizeHexColor(s.underlineColor);
|
|
24145
24176
|
}
|
|
24146
24177
|
if (s.textOutlineWidth) {
|
|
24147
|
-
style.WebkitTextStroke = s.textOutlineColor ? `${s.textOutlineWidth}px ${
|
|
24178
|
+
style.WebkitTextStroke = s.textOutlineColor ? `${s.textOutlineWidth}px ${chunkKJICUZXM_cjs.normalizeHexColor(s.textOutlineColor, "#000000")}` : `${s.textOutlineWidth}px currentColor`;
|
|
24148
24179
|
style.paintOrder = "stroke fill";
|
|
24149
24180
|
}
|
|
24150
24181
|
if (s.textCaps === "all") {
|
|
@@ -24185,7 +24216,7 @@ function segmentStyleToCss(seg, fontScale = 1, context = {}) {
|
|
|
24185
24216
|
if (s.color) {
|
|
24186
24217
|
style.color = textRunColor(s.color, s.colorRef?.alpha);
|
|
24187
24218
|
} else if (s.hyperlink) {
|
|
24188
|
-
style.color =
|
|
24219
|
+
style.color = chunkKJICUZXM_cjs.HYPERLINK_COLOR;
|
|
24189
24220
|
}
|
|
24190
24221
|
const renderedFamily = typeof style.fontFamily === "string" ? style.fontFamily : context.blockFont?.fontFamily;
|
|
24191
24222
|
style.fontWeight = fontWeightAttribute(renderedFamily, s.bold) ?? "normal";
|
|
@@ -24298,9 +24329,9 @@ function cellPatternFillCss(style) {
|
|
|
24298
24329
|
if (style.fillMode !== "pattern" || !style.patternFillPreset) {
|
|
24299
24330
|
return null;
|
|
24300
24331
|
}
|
|
24301
|
-
const fg =
|
|
24302
|
-
const bg =
|
|
24303
|
-
const svgMarkup =
|
|
24332
|
+
const fg = chunkKJICUZXM_cjs.normalizeHexColor(style.patternFillForeground, "#000000");
|
|
24333
|
+
const bg = chunkKJICUZXM_cjs.normalizeHexColor(style.patternFillBackground, "#ffffff");
|
|
24334
|
+
const svgMarkup = chunkKJICUZXM_cjs.getPatternSvg(style.patternFillPreset, fg, bg);
|
|
24304
24335
|
if (svgMarkup) {
|
|
24305
24336
|
const encoded = encodeURIComponent(svgMarkup);
|
|
24306
24337
|
return {
|
|
@@ -24471,7 +24502,7 @@ function cellStyleToCss(style) {
|
|
|
24471
24502
|
const w = edge.width ?? 1;
|
|
24472
24503
|
const c = edge.color ?? style.borderColor ?? "#000000";
|
|
24473
24504
|
const s = ooxmlDashToCssBorderStyle(edge.dash);
|
|
24474
|
-
css[edge.prefix] =
|
|
24505
|
+
css[edge.prefix] = chunkFROIGMTI_cjs.screenBorder(w, s, c);
|
|
24475
24506
|
}
|
|
24476
24507
|
}
|
|
24477
24508
|
Object.assign(css, cellPaddingCss(style));
|
|
@@ -24691,7 +24722,7 @@ function tableCellCss(tableData, cell, position, context, base2) {
|
|
|
24691
24722
|
);
|
|
24692
24723
|
const css = { ...base2, ...band, ...cellStyleToCss(cell?.style) };
|
|
24693
24724
|
if (css.color === void 0) {
|
|
24694
|
-
css.color =
|
|
24725
|
+
css.color = chunkKJICUZXM_cjs.DEFAULT_TEXT_COLOR;
|
|
24695
24726
|
}
|
|
24696
24727
|
const result = { ...TABLE_CELL_TEXT_DEFAULTS, ...css };
|
|
24697
24728
|
applyTableCellFontWeight(result);
|
|
@@ -25059,7 +25090,7 @@ var GRADIENT_TYPE_OPTIONS = [
|
|
|
25059
25090
|
{ value: "linear", i18nKey: "pptx.table.gradientLinear" },
|
|
25060
25091
|
{ value: "radial", i18nKey: "pptx.table.gradientRadial" }
|
|
25061
25092
|
];
|
|
25062
|
-
var PATTERN_OPTIONS =
|
|
25093
|
+
var PATTERN_OPTIONS = chunkKJICUZXM_cjs.OOXML_PATTERN_PRESETS.slice(0, 20);
|
|
25063
25094
|
|
|
25064
25095
|
// src/pptx/render/table-resize.ts
|
|
25065
25096
|
var MIN_COLUMN_PROPORTION = 0.03;
|
|
@@ -25804,10 +25835,10 @@ function imageFitTransformParts(el) {
|
|
|
25804
25835
|
return { placement: "", crop: "" };
|
|
25805
25836
|
}
|
|
25806
25837
|
return fitTransformsFromInsets({
|
|
25807
|
-
cropLeft:
|
|
25808
|
-
cropTop:
|
|
25809
|
-
cropRight:
|
|
25810
|
-
cropBottom:
|
|
25838
|
+
cropLeft: chunkKJICUZXM_cjs.clampCropValue(el.cropLeft),
|
|
25839
|
+
cropTop: chunkKJICUZXM_cjs.clampCropValue(el.cropTop),
|
|
25840
|
+
cropRight: chunkKJICUZXM_cjs.clampCropValue(el.cropRight),
|
|
25841
|
+
cropBottom: chunkKJICUZXM_cjs.clampCropValue(el.cropBottom),
|
|
25811
25842
|
fillRectLeft: el.fillRectLeft ?? 0,
|
|
25812
25843
|
fillRectTop: el.fillRectTop ?? 0,
|
|
25813
25844
|
fillRectRight: el.fillRectRight ?? 0,
|
|
@@ -25831,10 +25862,10 @@ function fitTransformsFromInsets(insets) {
|
|
|
25831
25862
|
if (hasCrop2) {
|
|
25832
25863
|
const horizontalScale = cropLeft + cropRight >= 0.99 ? 0.99 / (cropLeft + cropRight) : 1;
|
|
25833
25864
|
const verticalScale = cropTop + cropBottom >= 0.99 ? 0.99 / (cropTop + cropBottom) : 1;
|
|
25834
|
-
cropLeft =
|
|
25835
|
-
cropRight =
|
|
25836
|
-
cropTop =
|
|
25837
|
-
cropBottom =
|
|
25865
|
+
cropLeft = chunkKJICUZXM_cjs.clampCropValue(cropLeft * horizontalScale);
|
|
25866
|
+
cropRight = chunkKJICUZXM_cjs.clampCropValue(cropRight * horizontalScale);
|
|
25867
|
+
cropTop = chunkKJICUZXM_cjs.clampCropValue(cropTop * verticalScale);
|
|
25868
|
+
cropBottom = chunkKJICUZXM_cjs.clampCropValue(cropBottom * verticalScale);
|
|
25838
25869
|
const remainingWidth = Math.max(0.01, 1 - cropLeft - cropRight);
|
|
25839
25870
|
const remainingHeight = Math.max(0.01, 1 - cropTop - cropBottom);
|
|
25840
25871
|
const tx = Math.round(-cropLeft / remainingWidth * 1e4) / 100;
|
|
@@ -25949,7 +25980,7 @@ function resolveShadeToTitleBackgroundImage(slide, slideWidthPx, slideHeightPx)
|
|
|
25949
25980
|
if (stops.length === 0) {
|
|
25950
25981
|
return void 0;
|
|
25951
25982
|
}
|
|
25952
|
-
return
|
|
25983
|
+
return chunkKJICUZXM_cjs.buildRectPathGradientImage(stops, void 0, fillToRect);
|
|
25953
25984
|
}
|
|
25954
25985
|
|
|
25955
25986
|
// src/pptx/render/slide-background.ts
|
|
@@ -25971,7 +26002,7 @@ function getSlideBackgroundStyle(slide, slideSize) {
|
|
|
25971
26002
|
style["background-repeat"] = "no-repeat";
|
|
25972
26003
|
}
|
|
25973
26004
|
} else if (pattern) {
|
|
25974
|
-
const svg2 =
|
|
26005
|
+
const svg2 = chunkKJICUZXM_cjs.getPatternSvg(
|
|
25975
26006
|
pattern.preset,
|
|
25976
26007
|
pattern.fgColor ?? solid ?? "#000000",
|
|
25977
26008
|
pattern.bgColor ?? DEFAULT_SLIDE_BACKGROUND
|
|
@@ -26867,10 +26898,10 @@ function createRecoveryScheduler(options) {
|
|
|
26867
26898
|
}
|
|
26868
26899
|
}
|
|
26869
26900
|
if (disposed) return;
|
|
26870
|
-
const
|
|
26871
|
-
inFlight =
|
|
26901
|
+
const pending3 = write();
|
|
26902
|
+
inFlight = pending3;
|
|
26872
26903
|
try {
|
|
26873
|
-
return await
|
|
26904
|
+
return await pending3;
|
|
26874
26905
|
} finally {
|
|
26875
26906
|
inFlight = void 0;
|
|
26876
26907
|
}
|
|
@@ -27012,11 +27043,11 @@ function createAutosaveController(deps) {
|
|
|
27012
27043
|
while (inFlight) {
|
|
27013
27044
|
await inFlight;
|
|
27014
27045
|
}
|
|
27015
|
-
const
|
|
27046
|
+
const pending3 = scheduler.run(run).then(() => {
|
|
27016
27047
|
});
|
|
27017
|
-
inFlight =
|
|
27048
|
+
inFlight = pending3;
|
|
27018
27049
|
try {
|
|
27019
|
-
await
|
|
27050
|
+
await pending3;
|
|
27020
27051
|
} finally {
|
|
27021
27052
|
inFlight = null;
|
|
27022
27053
|
}
|
|
@@ -28290,6 +28321,175 @@ function createCollaborationSessionController(deps) {
|
|
|
28290
28321
|
}
|
|
28291
28322
|
};
|
|
28292
28323
|
}
|
|
28324
|
+
function slideTitle(slide) {
|
|
28325
|
+
for (const element of slide.elements) {
|
|
28326
|
+
const text4 = "text" in element && typeof element.text === "string" ? element.text.trim() : "";
|
|
28327
|
+
if (text4) {
|
|
28328
|
+
return text4.split(/\r?\n/)[0].slice(0, 60);
|
|
28329
|
+
}
|
|
28330
|
+
}
|
|
28331
|
+
return "";
|
|
28332
|
+
}
|
|
28333
|
+
function createCustomShowsController(initial, selectedId = null) {
|
|
28334
|
+
const first = initial.find((s) => s.id === selectedId) ?? initial[0];
|
|
28335
|
+
const store = chunk3RIGT7H6_cjs.createControllerStore({
|
|
28336
|
+
shows: initial.map((s) => ({ ...s, slideRIds: [...s.slideRIds] })),
|
|
28337
|
+
removedIds: [],
|
|
28338
|
+
selectedId: first?.id ?? null,
|
|
28339
|
+
leftSelected: [],
|
|
28340
|
+
rightSelected: []
|
|
28341
|
+
});
|
|
28342
|
+
const clearSelection = { leftSelected: [], rightSelected: [] };
|
|
28343
|
+
const edit = (recipe) => store.update((state) => {
|
|
28344
|
+
const selected = state.shows.find((s) => s.id === state.selectedId);
|
|
28345
|
+
const patch = selected ? recipe(state, selected) : void 0;
|
|
28346
|
+
return patch ? { ...state, ...patch } : state;
|
|
28347
|
+
});
|
|
28348
|
+
const move = (direction) => edit((state, show) => {
|
|
28349
|
+
const occupied = new Set(state.rightSelected);
|
|
28350
|
+
let shows = state.shows;
|
|
28351
|
+
for (const position of [...occupied].sort((x, y) => direction * (y - x))) {
|
|
28352
|
+
const target = position + direction;
|
|
28353
|
+
if (target < 0 || target >= show.slideRIds.length || occupied.has(target)) {
|
|
28354
|
+
continue;
|
|
28355
|
+
}
|
|
28356
|
+
shows = customShowOperations.moveCustomShowSlide(shows, show.id, position, target).shows;
|
|
28357
|
+
occupied.delete(position);
|
|
28358
|
+
occupied.add(target);
|
|
28359
|
+
}
|
|
28360
|
+
return { shows, rightSelected: [...occupied].sort((x, y) => x - y) };
|
|
28361
|
+
});
|
|
28362
|
+
const addSlides = (rIds) => edit(
|
|
28363
|
+
(state, show) => rIds.length === 0 ? void 0 : {
|
|
28364
|
+
shows: customShowOperations.addSlidesToCustomShow(state.shows, show.id, rIds).shows,
|
|
28365
|
+
...clearSelection
|
|
28366
|
+
}
|
|
28367
|
+
);
|
|
28368
|
+
return {
|
|
28369
|
+
getSnapshot: store.getSnapshot,
|
|
28370
|
+
subscribe: store.subscribe,
|
|
28371
|
+
create(name) {
|
|
28372
|
+
store.update((state) => {
|
|
28373
|
+
const r = customShowOperations.createCustomShow(state.shows, name);
|
|
28374
|
+
return { ...state, shows: r.shows, selectedId: r.show?.id ?? null, ...clearSelection };
|
|
28375
|
+
});
|
|
28376
|
+
},
|
|
28377
|
+
copySelected(name) {
|
|
28378
|
+
store.update((state) => {
|
|
28379
|
+
const r = state.selectedId ? customShowOperations.copyCustomShow(state.shows, state.selectedId, name) : void 0;
|
|
28380
|
+
return r?.show ? { ...state, shows: r.shows, selectedId: r.show.id, ...clearSelection } : state;
|
|
28381
|
+
});
|
|
28382
|
+
},
|
|
28383
|
+
removeSelected() {
|
|
28384
|
+
store.update((state) => {
|
|
28385
|
+
if (!state.selectedId) {
|
|
28386
|
+
return state;
|
|
28387
|
+
}
|
|
28388
|
+
const index = state.shows.findIndex((s) => s.id === state.selectedId);
|
|
28389
|
+
const r = customShowOperations.deleteCustomShow(state.shows, state.selectedId);
|
|
28390
|
+
const neighbour = r.shows[Math.min(index, r.shows.length - 1)];
|
|
28391
|
+
return {
|
|
28392
|
+
...state,
|
|
28393
|
+
shows: r.shows,
|
|
28394
|
+
removedIds: [...state.removedIds, state.selectedId],
|
|
28395
|
+
selectedId: neighbour?.id ?? null,
|
|
28396
|
+
...clearSelection
|
|
28397
|
+
};
|
|
28398
|
+
});
|
|
28399
|
+
},
|
|
28400
|
+
rename(name) {
|
|
28401
|
+
edit((state, show) => ({ shows: customShowOperations.renameCustomShow(state.shows, show.id, name).shows }));
|
|
28402
|
+
},
|
|
28403
|
+
select(id) {
|
|
28404
|
+
store.update(
|
|
28405
|
+
(state) => state.selectedId === id ? state : { ...state, selectedId: id, ...clearSelection }
|
|
28406
|
+
);
|
|
28407
|
+
},
|
|
28408
|
+
toggleLeft(rId) {
|
|
28409
|
+
store.update((state) => ({
|
|
28410
|
+
...state,
|
|
28411
|
+
leftSelected: state.leftSelected.includes(rId) ? state.leftSelected.filter((r) => r !== rId) : [...state.leftSelected, rId]
|
|
28412
|
+
}));
|
|
28413
|
+
},
|
|
28414
|
+
toggleRight(position) {
|
|
28415
|
+
store.update((state) => ({
|
|
28416
|
+
...state,
|
|
28417
|
+
rightSelected: state.rightSelected.includes(position) ? state.rightSelected.filter((p) => p !== position) : [...state.rightSelected, position]
|
|
28418
|
+
}));
|
|
28419
|
+
},
|
|
28420
|
+
addSelected(slides) {
|
|
28421
|
+
const chosen = new Set(store.getSnapshot().leftSelected);
|
|
28422
|
+
addSlides(slides.filter((slide) => chosen.has(slide.rId)).map((slide) => slide.rId));
|
|
28423
|
+
},
|
|
28424
|
+
addSlide: (rId) => addSlides([rId]),
|
|
28425
|
+
removeSelectedSlides() {
|
|
28426
|
+
edit(
|
|
28427
|
+
(state, show) => state.rightSelected.length === 0 ? void 0 : {
|
|
28428
|
+
shows: customShowOperations.removeSlidesFromCustomShow(state.shows, show.id, state.rightSelected).shows,
|
|
28429
|
+
rightSelected: []
|
|
28430
|
+
}
|
|
28431
|
+
);
|
|
28432
|
+
},
|
|
28433
|
+
moveUp: () => move(-1),
|
|
28434
|
+
moveDown: () => move(1),
|
|
28435
|
+
view(slides) {
|
|
28436
|
+
const state = store.getSnapshot();
|
|
28437
|
+
const selected = state.shows.find((s) => s.id === state.selectedId);
|
|
28438
|
+
const byRId = new Map(slides.map((slide, i) => [slide.rId, { slide, number: i + 1 }]));
|
|
28439
|
+
const row = (rId, selectedRow, position) => {
|
|
28440
|
+
const entry6 = byRId.get(rId);
|
|
28441
|
+
return {
|
|
28442
|
+
rId,
|
|
28443
|
+
number: entry6?.number ?? 0,
|
|
28444
|
+
title: entry6 ? slideTitle(entry6.slide) : "",
|
|
28445
|
+
selected: selectedRow,
|
|
28446
|
+
...position === void 0 ? {} : { position }
|
|
28447
|
+
};
|
|
28448
|
+
};
|
|
28449
|
+
const showRows = (selected?.slideRIds ?? []).flatMap(
|
|
28450
|
+
(rId, position) => byRId.has(rId) ? [row(rId, state.rightSelected.includes(position), position)] : []
|
|
28451
|
+
);
|
|
28452
|
+
const positions2 = state.rightSelected;
|
|
28453
|
+
const last = (selected?.slideRIds.length ?? 0) - 1;
|
|
28454
|
+
return {
|
|
28455
|
+
shows: state.shows.map((s) => ({
|
|
28456
|
+
id: s.id,
|
|
28457
|
+
name: s.name,
|
|
28458
|
+
slideCount: s.slideRIds.length,
|
|
28459
|
+
selected: s.id === state.selectedId
|
|
28460
|
+
})),
|
|
28461
|
+
selected: selected ? { id: selected.id, name: selected.name } : null,
|
|
28462
|
+
presentationSlides: slides.map(
|
|
28463
|
+
(slide) => row(slide.rId, state.leftSelected.includes(slide.rId))
|
|
28464
|
+
),
|
|
28465
|
+
showSlides: showRows,
|
|
28466
|
+
canEdit: selected !== void 0,
|
|
28467
|
+
canAdd: selected !== void 0 && state.leftSelected.length > 0,
|
|
28468
|
+
canRemoveSlides: positions2.length > 0,
|
|
28469
|
+
canMoveUp: positions2.length > 0 && Math.min(...positions2) > 0,
|
|
28470
|
+
canMoveDown: positions2.length > 0 && Math.max(...positions2) < last
|
|
28471
|
+
};
|
|
28472
|
+
},
|
|
28473
|
+
result(slides) {
|
|
28474
|
+
const state = store.getSnapshot();
|
|
28475
|
+
let current = [...slides];
|
|
28476
|
+
let changed = false;
|
|
28477
|
+
const kept = new Set(state.shows.map((show) => show.id));
|
|
28478
|
+
for (const id of state.removedIds.filter((removed) => !kept.has(removed))) {
|
|
28479
|
+
const cleared2 = customShowOperations.clearCustomShowActions(current, id);
|
|
28480
|
+
if (cleared2.cleared > 0) {
|
|
28481
|
+
current = cleared2.slides;
|
|
28482
|
+
changed = true;
|
|
28483
|
+
}
|
|
28484
|
+
}
|
|
28485
|
+
return {
|
|
28486
|
+
shows: state.shows.map((s) => ({ ...s, slideRIds: [...s.slideRIds] })),
|
|
28487
|
+
slides: changed ? current : void 0,
|
|
28488
|
+
removedIds: state.removedIds
|
|
28489
|
+
};
|
|
28490
|
+
}
|
|
28491
|
+
};
|
|
28492
|
+
}
|
|
28293
28493
|
var TEMPLATE_REF_WIDTH_EMU = 12192e3;
|
|
28294
28494
|
var TEMPLATE_REF_HEIGHT_EMU = 6858e3;
|
|
28295
28495
|
var DEFAULT_SLIDE_WIDTH_PX = 1280;
|
|
@@ -28331,7 +28531,7 @@ function createTemplateContext(options = {}) {
|
|
|
28331
28531
|
const scheme = { ...pptx.DEFAULT_SCHEME_COLOR_MAP, ...options.scheme ?? {} };
|
|
28332
28532
|
let counter = 0;
|
|
28333
28533
|
const idFor = options.idFor ?? ((index) => `template-el-${Date.now()}-${index}`);
|
|
28334
|
-
const dictionary =
|
|
28534
|
+
const dictionary = chunkCRV7G4GC_cjs.translationsEn;
|
|
28335
28535
|
const translate = options.translate ?? ((key) => dictionary[key] ?? key);
|
|
28336
28536
|
return {
|
|
28337
28537
|
scheme,
|
|
@@ -29349,12 +29549,12 @@ function buildRunTabLines(text4, ctx, nestedDecoration, measure2 = (t2) => measu
|
|
|
29349
29549
|
// src/pptx/render/paragraph-run-enrich.ts
|
|
29350
29550
|
function resolveRunExtrasContext(input) {
|
|
29351
29551
|
const { seg, runFont, blockFont, blockScriptStyle, tabStops, defaultTabSize, rtl } = input;
|
|
29352
|
-
const baseFontFamily = runFont.fontFamily ?? blockFont.fontFamily ??
|
|
29552
|
+
const baseFontFamily = runFont.fontFamily ?? blockFont.fontFamily ?? chunkKJICUZXM_cjs.DEFAULT_FONT_FAMILY;
|
|
29353
29553
|
const scriptFonts = text$1.resolveScriptFontSet(seg.style, blockScriptStyle, baseFontFamily);
|
|
29354
29554
|
const tabContext = tabStops && tabStops.length > 0 ? buildTabContext(
|
|
29355
29555
|
tabStops,
|
|
29356
29556
|
defaultTabSize,
|
|
29357
|
-
runFont.fontSizePx ?? blockFont.fontSizePx ??
|
|
29557
|
+
runFont.fontSizePx ?? blockFont.fontSizePx ?? chunkKJICUZXM_cjs.DEFAULT_TEXT_FONT_SIZE,
|
|
29358
29558
|
baseFontFamily,
|
|
29359
29559
|
Boolean(seg.style?.bold),
|
|
29360
29560
|
Boolean(seg.style?.italic),
|
|
@@ -29386,7 +29586,7 @@ function resolveRunReflection(segStyle, blockFont) {
|
|
|
29386
29586
|
if (!segStyle) {
|
|
29387
29587
|
return void 0;
|
|
29388
29588
|
}
|
|
29389
|
-
const height = typeof segStyle.fontSize === "number" ? segStyle.fontSize : blockFont.fontSizePx ??
|
|
29589
|
+
const height = typeof segStyle.fontSize === "number" ? segStyle.fontSize : blockFont.fontSizePx ?? chunkKJICUZXM_cjs.DEFAULT_TEXT_FONT_SIZE;
|
|
29390
29590
|
return getTextReflectionWrapperStyle(segStyle, height);
|
|
29391
29591
|
}
|
|
29392
29592
|
function applyRunReflection(run, reflection2) {
|
|
@@ -29553,7 +29753,7 @@ function buildTextShadowCss(style) {
|
|
|
29553
29753
|
const ox = style.textShadowOffsetX ?? 0;
|
|
29554
29754
|
const oy = style.textShadowOffsetY ?? 0;
|
|
29555
29755
|
const blur = style.textShadowBlur ?? 4;
|
|
29556
|
-
const color =
|
|
29756
|
+
const color = chunkKJICUZXM_cjs.normalizeHexColor(style.textShadowColor, "#000000");
|
|
29557
29757
|
const opacity = style.textShadowOpacity ?? 0.5;
|
|
29558
29758
|
const r = parseInt(color.slice(1, 3), 16);
|
|
29559
29759
|
const g = parseInt(color.slice(3, 5), 16);
|
|
@@ -29566,7 +29766,7 @@ function buildTextShadowCss(style) {
|
|
|
29566
29766
|
const dirRad = dir * Math.PI / 180;
|
|
29567
29767
|
const psOx = Math.round(Math.cos(dirRad) * dist2 * 100) / 100;
|
|
29568
29768
|
const psOy = Math.round(Math.sin(dirRad) * dist2 * 100) / 100;
|
|
29569
|
-
const psColor =
|
|
29769
|
+
const psColor = chunkKJICUZXM_cjs.normalizeHexColor(style.textPresetShadowColor, "#000000");
|
|
29570
29770
|
const psOpacity = style.textPresetShadowOpacity ?? 0.5;
|
|
29571
29771
|
const psR = parseInt(psColor.slice(1, 3), 16);
|
|
29572
29772
|
const psG = parseInt(psColor.slice(3, 5), 16);
|
|
@@ -29583,7 +29783,7 @@ function buildTextInnerShadowCss(style) {
|
|
|
29583
29783
|
const ox = style.textInnerShadowOffsetX ?? 0;
|
|
29584
29784
|
const oy = style.textInnerShadowOffsetY ?? 0;
|
|
29585
29785
|
const blur = style.textInnerShadowBlur ?? 3;
|
|
29586
|
-
const color =
|
|
29786
|
+
const color = chunkKJICUZXM_cjs.normalizeHexColor(style.textInnerShadowColor, "#000000");
|
|
29587
29787
|
const opacity = style.textInnerShadowOpacity ?? 0.5;
|
|
29588
29788
|
const r = parseInt(color.slice(1, 3), 16);
|
|
29589
29789
|
const g = parseInt(color.slice(3, 5), 16);
|
|
@@ -29630,7 +29830,7 @@ function buildTextGlowFilter(style) {
|
|
|
29630
29830
|
return void 0;
|
|
29631
29831
|
}
|
|
29632
29832
|
const radius = style.textGlowRadius ?? 6;
|
|
29633
|
-
const color =
|
|
29833
|
+
const color = chunkKJICUZXM_cjs.normalizeHexColor(style.textGlowColor, "#ffff00");
|
|
29634
29834
|
const opacity = style.textGlowOpacity ?? 0.6;
|
|
29635
29835
|
const r = parseInt(color.slice(1, 3), 16);
|
|
29636
29836
|
const g = parseInt(color.slice(3, 5), 16);
|
|
@@ -29658,9 +29858,9 @@ function buildTextFillCss(style) {
|
|
|
29658
29858
|
};
|
|
29659
29859
|
}
|
|
29660
29860
|
if (style.textFillPattern) {
|
|
29661
|
-
const fg =
|
|
29662
|
-
const bg =
|
|
29663
|
-
const svgPattern =
|
|
29861
|
+
const fg = chunkKJICUZXM_cjs.normalizeHexColor(style.textFillPatternForeground, "#000000");
|
|
29862
|
+
const bg = chunkKJICUZXM_cjs.normalizeHexColor(style.textFillPatternBackground, "#ffffff");
|
|
29863
|
+
const svgPattern = chunkKJICUZXM_cjs.getPatternSvg(style.textFillPattern, fg, bg);
|
|
29664
29864
|
if (svgPattern) {
|
|
29665
29865
|
const encoded = encodeURIComponent(svgPattern);
|
|
29666
29866
|
return {
|
|
@@ -29805,15 +30005,15 @@ function resolveRunRuby(segment, baseFontSizePx, blockFont, baseColor) {
|
|
|
29805
30005
|
return void 0;
|
|
29806
30006
|
}
|
|
29807
30007
|
const authoredFamily = segment.rubyStyle?.fontFamily ?? segment.style?.fontFamily;
|
|
29808
|
-
const baseSize = Number.isFinite(baseFontSizePx) ? baseFontSizePx :
|
|
30008
|
+
const baseSize = Number.isFinite(baseFontSizePx) ? baseFontSizePx : chunkKJICUZXM_cjs.DEFAULT_TEXT_FONT_SIZE;
|
|
29809
30009
|
const style = {
|
|
29810
30010
|
fontSize: `${segment.rubyFontSize ?? baseSize * RUBY_SIZE_RATIO}px`,
|
|
29811
|
-
fontFamily: authoredFamily ? pptx.getSubstituteFontFamily(authoredFamily) : blockFont.fontFamily ??
|
|
30011
|
+
fontFamily: authoredFamily ? pptx.getSubstituteFontFamily(authoredFamily) : blockFont.fontFamily ?? chunkKJICUZXM_cjs.DEFAULT_FONT_FAMILY,
|
|
29812
30012
|
textAlign: rubyTextAlign(segment.rubyAlignment)
|
|
29813
30013
|
};
|
|
29814
30014
|
const color = segment.rubyStyle?.color;
|
|
29815
30015
|
if (color) {
|
|
29816
|
-
style.color =
|
|
30016
|
+
style.color = chunkKJICUZXM_cjs.normalizeHexColor(color, baseColor);
|
|
29817
30017
|
}
|
|
29818
30018
|
return { text: text4, style };
|
|
29819
30019
|
}
|
|
@@ -29886,7 +30086,7 @@ function buildParagraphRuns(input) {
|
|
|
29886
30086
|
bodyFontSizeRaw,
|
|
29887
30087
|
fontScale
|
|
29888
30088
|
);
|
|
29889
|
-
const fallbackFontSize = strutFontSize ?? blockFont.fontSizePx ??
|
|
30089
|
+
const fallbackFontSize = strutFontSize ?? blockFont.fontSizePx ?? chunkKJICUZXM_cjs.DEFAULT_TEXT_FONT_SIZE;
|
|
29890
30090
|
equationStyle.fontSize = `${fallbackFontSize}px`;
|
|
29891
30091
|
}
|
|
29892
30092
|
runs.push({
|
|
@@ -29923,7 +30123,7 @@ function buildParagraphRuns(input) {
|
|
|
29923
30123
|
});
|
|
29924
30124
|
const ruby = resolveRunRuby(
|
|
29925
30125
|
seg,
|
|
29926
|
-
typeof seg.style?.fontSize === "number" ? seg.style.fontSize : blockFont.fontSizePx ??
|
|
30126
|
+
typeof seg.style?.fontSize === "number" ? seg.style.fontSize : blockFont.fontSizePx ?? chunkKJICUZXM_cjs.DEFAULT_TEXT_FONT_SIZE,
|
|
29927
30127
|
blockFont,
|
|
29928
30128
|
typeof style.color === "string" ? style.color : void 0
|
|
29929
30129
|
);
|
|
@@ -30023,8 +30223,8 @@ function buildParagraphs(element, fieldContext, segmentOverrides, options) {
|
|
|
30023
30223
|
}
|
|
30024
30224
|
const fontScale = resolveAutoFitFontScale(element.textStyle);
|
|
30025
30225
|
const blockFont = {
|
|
30026
|
-
fontFamily: element.textStyle?.fontFamily ? pptx.getSubstituteFontFamily(element.textStyle.fontFamily) :
|
|
30027
|
-
fontSizePx: (element.textStyle?.fontSize ||
|
|
30226
|
+
fontFamily: element.textStyle?.fontFamily ? pptx.getSubstituteFontFamily(element.textStyle.fontFamily) : chunkKJICUZXM_cjs.DEFAULT_FONT_FAMILY,
|
|
30227
|
+
fontSizePx: (element.textStyle?.fontSize || chunkKJICUZXM_cjs.DEFAULT_TEXT_FONT_SIZE) * fontScale
|
|
30028
30228
|
};
|
|
30029
30229
|
const blockScriptStyle = element.textStyle;
|
|
30030
30230
|
const tabStops = element.textStyle?.tabStops;
|
|
@@ -32958,17 +33158,17 @@ function hasItalicRuns(element) {
|
|
|
32958
33158
|
);
|
|
32959
33159
|
}
|
|
32960
33160
|
function buildTextBlockStyle(element, options = {}) {
|
|
32961
|
-
const fallbackColor = options.fallbackColor ??
|
|
33161
|
+
const fallbackColor = options.fallbackColor ?? chunkKJICUZXM_cjs.DEFAULT_TEXT_COLOR;
|
|
32962
33162
|
if (!pptx.hasTextProperties(element)) {
|
|
32963
33163
|
return { color: fallbackColor };
|
|
32964
33164
|
}
|
|
32965
33165
|
const ts = element.textStyle;
|
|
32966
33166
|
const italic = hasItalicRuns(element);
|
|
32967
33167
|
const isRtl = ts?.rtl === true;
|
|
32968
|
-
const bodyTop = ts?.bodyInsetTop ??
|
|
32969
|
-
const bodyBottom = ts?.bodyInsetBottom ??
|
|
32970
|
-
const bodyLeft = ts?.bodyInsetLeft ??
|
|
32971
|
-
const bodyRight = ts?.bodyInsetRight ??
|
|
33168
|
+
const bodyTop = ts?.bodyInsetTop ?? chunkKJICUZXM_cjs.DEFAULT_BODY_INSET_TB_PX;
|
|
33169
|
+
const bodyBottom = ts?.bodyInsetBottom ?? chunkKJICUZXM_cjs.DEFAULT_BODY_INSET_TB_PX;
|
|
33170
|
+
const bodyLeft = ts?.bodyInsetLeft ?? chunkKJICUZXM_cjs.DEFAULT_BODY_INSET_LR_PX;
|
|
33171
|
+
const bodyRight = ts?.bodyInsetRight ?? chunkKJICUZXM_cjs.DEFAULT_BODY_INSET_LR_PX;
|
|
32972
33172
|
const hasParagraphIndents = (element.paragraphIndents?.length ?? 0) > 0;
|
|
32973
33173
|
const bodyIndent = hasParagraphIndents ? 0 : ts?.paragraphIndent || 0;
|
|
32974
33174
|
const bodyMarginLeft = hasParagraphIndents ? 0 : ts?.paragraphMarginLeft || 0;
|
|
@@ -32998,17 +33198,17 @@ function buildTextBlockStyle(element, options = {}) {
|
|
|
32998
33198
|
style.transformOrigin = "center";
|
|
32999
33199
|
}
|
|
33000
33200
|
}
|
|
33001
|
-
style.color = ts?.hyperlink ?
|
|
33201
|
+
style.color = ts?.hyperlink ? chunkKJICUZXM_cjs.normalizeHexColor(ts?.color, chunkKJICUZXM_cjs.HYPERLINK_COLOR) : chunkKJICUZXM_cjs.normalizeHexColor(ts?.color, fallbackColor);
|
|
33002
33202
|
if (!hasTextSegments && ts?.highlightColor) {
|
|
33003
|
-
style.backgroundColor =
|
|
33203
|
+
style.backgroundColor = chunkKJICUZXM_cjs.normalizeHexColor(ts.highlightColor, void 0);
|
|
33004
33204
|
}
|
|
33005
33205
|
style.textAlign = resolveCssTextAlign(ts?.align, isRtl) ?? "left";
|
|
33006
33206
|
style.direction = toCssVerticalDirection(ts?.textDirection) ?? (isRtl ? "rtl" : bodyLayoutStyle?.direction ?? "ltr");
|
|
33007
33207
|
if (isRtl) {
|
|
33008
33208
|
style.unicodeBidi = "plaintext";
|
|
33009
33209
|
}
|
|
33010
|
-
style.fontSize = ts?.fontSize ||
|
|
33011
|
-
style.fontFamily = ts?.fontFamily ? pptx.getSubstituteFontFamily(ts.fontFamily, pptx.parsePanoseString(ts.latinFontPanose)) :
|
|
33210
|
+
style.fontSize = ts?.fontSize || chunkKJICUZXM_cjs.DEFAULT_TEXT_FONT_SIZE;
|
|
33211
|
+
style.fontFamily = ts?.fontFamily ? pptx.getSubstituteFontFamily(ts.fontFamily, pptx.parsePanoseString(ts.latinFontPanose)) : chunkKJICUZXM_cjs.DEFAULT_FONT_FAMILY;
|
|
33012
33212
|
style.fontWeight = resolveFontWeight(ts?.fontFamily, ts?.bold);
|
|
33013
33213
|
style.fontStyle = resolveFontItalic(ts?.fontFamily, ts?.italic) ? "italic" : "normal";
|
|
33014
33214
|
style.textDecorationLine = decorations.length > 0 ? decorations.join(" ") : "none";
|
|
@@ -33048,7 +33248,7 @@ function buildTextBlockStyle(element, options = {}) {
|
|
|
33048
33248
|
text: element.text ?? "",
|
|
33049
33249
|
width: element.width,
|
|
33050
33250
|
height: element.height,
|
|
33051
|
-
defaultFontSize:
|
|
33251
|
+
defaultFontSize: chunkKJICUZXM_cjs.DEFAULT_TEXT_FONT_SIZE
|
|
33052
33252
|
});
|
|
33053
33253
|
if (autoFit.fontSize !== void 0) {
|
|
33054
33254
|
style.fontSize = autoFit.fontSize;
|
|
@@ -33056,7 +33256,7 @@ function buildTextBlockStyle(element, options = {}) {
|
|
|
33056
33256
|
if (autoFit.lineHeight !== void 0) {
|
|
33057
33257
|
style.lineHeight = autoFit.lineHeight;
|
|
33058
33258
|
}
|
|
33059
|
-
const fontSizePx = typeof style.fontSize === "number" ? style.fontSize :
|
|
33259
|
+
const fontSizePx = typeof style.fontSize === "number" ? style.fontSize : chunkKJICUZXM_cjs.DEFAULT_TEXT_FONT_SIZE;
|
|
33060
33260
|
const lineHeightPx = lineHeightToPx(fontSizePx, style.lineHeight);
|
|
33061
33261
|
const contentHeightPx = element.height - style.paddingTop - style.paddingBottom;
|
|
33062
33262
|
Object.assign(style, resolveVertOverflowEllipsisStyle(ts, contentHeightPx, lineHeightPx));
|
|
@@ -36506,9 +36706,9 @@ function connectorHitStrokeWidth(strokeWidth) {
|
|
|
36506
36706
|
function buildConnectorGeometry(element, zIndex, routing) {
|
|
36507
36707
|
const ss = pptx.hasShapeProperties(element) ? element.shapeStyle : void 0;
|
|
36508
36708
|
const strokeWidth = Math.max(0, ss?.strokeWidth ?? 2);
|
|
36509
|
-
const strokeColor = ss?.strokeColor ??
|
|
36709
|
+
const strokeColor = ss?.strokeColor ?? chunkKJICUZXM_cjs.DEFAULT_STROKE_COLOR;
|
|
36510
36710
|
const strokeOpacity = ss?.strokeOpacity ?? 1;
|
|
36511
|
-
const dashArray =
|
|
36711
|
+
const dashArray = chunkKJICUZXM_cjs.buildDashArray(ss?.strokeDash, strokeWidth, ss?.customDashSegments);
|
|
36512
36712
|
const strokeLinecap = svgLineCap(ss?.lineCap);
|
|
36513
36713
|
const compoundOffsets = getCompoundLineOffsets(ss?.compoundLine, strokeWidth);
|
|
36514
36714
|
const compoundWidths = getCompoundLineWidths(ss?.compoundLine, strokeWidth);
|
|
@@ -37433,7 +37633,7 @@ function observeExternalCollaborationReadiness(session, options) {
|
|
|
37433
37633
|
function createPresencePublisher(awareness, identity10) {
|
|
37434
37634
|
const local = { activeSlideIndex: 0, cursorX: 0, cursorY: 0 };
|
|
37435
37635
|
let lastBroadcast = 0;
|
|
37436
|
-
let
|
|
37636
|
+
let pending3 = null;
|
|
37437
37637
|
function publish() {
|
|
37438
37638
|
awareness.setLocalStateField("presence", {
|
|
37439
37639
|
userName: identity10.userName,
|
|
@@ -37459,32 +37659,32 @@ function createPresencePublisher(awareness, identity10) {
|
|
|
37459
37659
|
Object.assign(local, patch);
|
|
37460
37660
|
const elapsed = Date.now() - lastBroadcast;
|
|
37461
37661
|
if (elapsed >= BROADCAST_THROTTLE_MS) {
|
|
37462
|
-
if (
|
|
37463
|
-
clearTimeout(
|
|
37464
|
-
|
|
37662
|
+
if (pending3 !== null) {
|
|
37663
|
+
clearTimeout(pending3);
|
|
37664
|
+
pending3 = null;
|
|
37465
37665
|
}
|
|
37466
37666
|
lastBroadcast = Date.now();
|
|
37467
37667
|
publish();
|
|
37468
|
-
} else if (
|
|
37469
|
-
|
|
37470
|
-
|
|
37668
|
+
} else if (pending3 === null) {
|
|
37669
|
+
pending3 = setTimeout(() => {
|
|
37670
|
+
pending3 = null;
|
|
37471
37671
|
lastBroadcast = Date.now();
|
|
37472
37672
|
publish();
|
|
37473
37673
|
}, BROADCAST_THROTTLE_MS - elapsed);
|
|
37474
37674
|
}
|
|
37475
37675
|
}
|
|
37476
37676
|
function flush() {
|
|
37477
|
-
if (
|
|
37478
|
-
clearTimeout(
|
|
37479
|
-
|
|
37677
|
+
if (pending3 !== null) {
|
|
37678
|
+
clearTimeout(pending3);
|
|
37679
|
+
pending3 = null;
|
|
37480
37680
|
}
|
|
37481
37681
|
lastBroadcast = Date.now();
|
|
37482
37682
|
publish();
|
|
37483
37683
|
}
|
|
37484
37684
|
function dispose() {
|
|
37485
|
-
if (
|
|
37486
|
-
clearTimeout(
|
|
37487
|
-
|
|
37685
|
+
if (pending3 !== null) {
|
|
37686
|
+
clearTimeout(pending3);
|
|
37687
|
+
pending3 = null;
|
|
37488
37688
|
}
|
|
37489
37689
|
}
|
|
37490
37690
|
publish();
|
|
@@ -37731,7 +37931,7 @@ function createCollaborationTextTarget({
|
|
|
37731
37931
|
var LIVE_PATCH_THROTTLE_MS = 50;
|
|
37732
37932
|
function createCollaborationLivePatcher(options = {}) {
|
|
37733
37933
|
const throttleMs = options.throttleMs ?? LIVE_PATCH_THROTTLE_MS;
|
|
37734
|
-
const
|
|
37934
|
+
const pending3 = /* @__PURE__ */ new Map();
|
|
37735
37935
|
let doc = null;
|
|
37736
37936
|
let factories = null;
|
|
37737
37937
|
let timer = null;
|
|
@@ -37758,12 +37958,12 @@ function createCollaborationLivePatcher(options = {}) {
|
|
|
37758
37958
|
const writePending = () => {
|
|
37759
37959
|
const activeDoc = doc;
|
|
37760
37960
|
const activeFactories = factories;
|
|
37761
|
-
if (!activeDoc || !activeFactories ||
|
|
37762
|
-
|
|
37961
|
+
if (!activeDoc || !activeFactories || pending3.size === 0) {
|
|
37962
|
+
pending3.clear();
|
|
37763
37963
|
return;
|
|
37764
37964
|
}
|
|
37765
|
-
const patches = [...
|
|
37766
|
-
|
|
37965
|
+
const patches = [...pending3.values()];
|
|
37966
|
+
pending3.clear();
|
|
37767
37967
|
lastWriteAt = Date.now();
|
|
37768
37968
|
try {
|
|
37769
37969
|
activeDoc.transact(() => {
|
|
@@ -37797,10 +37997,10 @@ function createCollaborationLivePatcher(options = {}) {
|
|
|
37797
37997
|
return null;
|
|
37798
37998
|
}
|
|
37799
37999
|
const key = keyFor(slideId, elementId);
|
|
37800
|
-
let entry6 =
|
|
38000
|
+
let entry6 = pending3.get(key);
|
|
37801
38001
|
if (!entry6) {
|
|
37802
38002
|
entry6 = { slideId, elementId };
|
|
37803
|
-
|
|
38003
|
+
pending3.set(key, entry6);
|
|
37804
38004
|
}
|
|
37805
38005
|
return entry6;
|
|
37806
38006
|
};
|
|
@@ -37819,7 +38019,7 @@ function createCollaborationLivePatcher(options = {}) {
|
|
|
37819
38019
|
if (!isWritable()) {
|
|
37820
38020
|
return void 0;
|
|
37821
38021
|
}
|
|
37822
|
-
const queued =
|
|
38022
|
+
const queued = pending3.get(key);
|
|
37823
38023
|
if (queued) {
|
|
37824
38024
|
delete queued.text;
|
|
37825
38025
|
}
|
|
@@ -37858,7 +38058,7 @@ function createCollaborationLivePatcher(options = {}) {
|
|
|
37858
38058
|
return;
|
|
37859
38059
|
}
|
|
37860
38060
|
cancelTimer();
|
|
37861
|
-
|
|
38061
|
+
pending3.clear();
|
|
37862
38062
|
doc = nextDoc;
|
|
37863
38063
|
factories = nextFactories;
|
|
37864
38064
|
immediate = nextImmediate;
|
|
@@ -37894,7 +38094,7 @@ function createCollaborationLivePatcher(options = {}) {
|
|
|
37894
38094
|
},
|
|
37895
38095
|
dispose() {
|
|
37896
38096
|
cancelTimer();
|
|
37897
|
-
|
|
38097
|
+
pending3.clear();
|
|
37898
38098
|
doc = null;
|
|
37899
38099
|
factories = null;
|
|
37900
38100
|
retireTextSessions();
|
|
@@ -38060,7 +38260,7 @@ function resolveCollaborationNativeRange(range, previous, current) {
|
|
|
38060
38260
|
function observeCollaborationInlineInput(root, getSeed, apply6, settled) {
|
|
38061
38261
|
let disposed = false;
|
|
38062
38262
|
let composing = false;
|
|
38063
|
-
let
|
|
38263
|
+
let pending3 = false;
|
|
38064
38264
|
let range;
|
|
38065
38265
|
const capture = (event) => {
|
|
38066
38266
|
const target = event?.getTargetRanges?.()[0];
|
|
@@ -38078,10 +38278,10 @@ function observeCollaborationInlineInput(root, getSeed, apply6, settled) {
|
|
|
38078
38278
|
if (!composing) {
|
|
38079
38279
|
capture(event);
|
|
38080
38280
|
}
|
|
38081
|
-
|
|
38281
|
+
pending3 = true;
|
|
38082
38282
|
queueMicrotask(() => {
|
|
38083
|
-
if (!disposed && !composing &&
|
|
38084
|
-
|
|
38283
|
+
if (!disposed && !composing && pending3) {
|
|
38284
|
+
pending3 = false;
|
|
38085
38285
|
settled();
|
|
38086
38286
|
}
|
|
38087
38287
|
});
|
|
@@ -38090,7 +38290,7 @@ function observeCollaborationInlineInput(root, getSeed, apply6, settled) {
|
|
|
38090
38290
|
if (composing || disposed) {
|
|
38091
38291
|
return;
|
|
38092
38292
|
}
|
|
38093
|
-
|
|
38293
|
+
pending3 = false;
|
|
38094
38294
|
const replacement = range;
|
|
38095
38295
|
range = void 0;
|
|
38096
38296
|
apply6(replacement);
|
|
@@ -38116,8 +38316,8 @@ function observeCollaborationInlineInput(root, getSeed, apply6, settled) {
|
|
|
38116
38316
|
root.addEventListener("compositionstart", start, true);
|
|
38117
38317
|
root.addEventListener("compositionend", end, true);
|
|
38118
38318
|
return {
|
|
38119
|
-
blocked: () => composing ||
|
|
38120
|
-
reason: () => composing ? "composition-active" :
|
|
38319
|
+
blocked: () => composing || pending3,
|
|
38320
|
+
reason: () => composing ? "composition-active" : pending3 ? "input-active" : void 0,
|
|
38121
38321
|
dispose() {
|
|
38122
38322
|
disposed = true;
|
|
38123
38323
|
root.removeEventListener("beforeinput", before, true);
|
|
@@ -42957,7 +43157,7 @@ function drawingShapeMeshOpacity(shape) {
|
|
|
42957
43157
|
// src/pptx/render/svg-text-lines.ts
|
|
42958
43158
|
var LINE_HEIGHT_RATIO = 1.2;
|
|
42959
43159
|
function centeredSvgTextLines(text4, fontSize, options = {}) {
|
|
42960
|
-
const lines = options.maxWidth !== void 0 ?
|
|
43160
|
+
const lines = options.maxWidth !== void 0 ? chunkKJICUZXM_cjs.wrapTextByEstimatedWidth(text4, options.maxWidth, fontSize) : text4.split("\n").filter((line4) => line4.length > 0);
|
|
42961
43161
|
const centerY = options.centerY ?? 0;
|
|
42962
43162
|
if (lines.length === 0) {
|
|
42963
43163
|
return [{ text: "", y: centerY }];
|
|
@@ -42969,6 +43169,647 @@ function centeredSvgTextLines(text4, fontSize, options = {}) {
|
|
|
42969
43169
|
y: blockTop + lineHeight / 2 + index * lineHeight
|
|
42970
43170
|
}));
|
|
42971
43171
|
}
|
|
43172
|
+
|
|
43173
|
+
// src/picture-artistic-preview.ts
|
|
43174
|
+
var NS = "http://www.w3.org/2000/svg";
|
|
43175
|
+
function artisticPictureNodes(doc, name, radius) {
|
|
43176
|
+
if (!ARTISTIC_PREVIEW_EFFECTS.has(name) || !Number.isFinite(radius) || radius < 0 || radius > 100)
|
|
43177
|
+
return void 0;
|
|
43178
|
+
const markup = buildArtisticFilterMarkup(name, radius);
|
|
43179
|
+
if (markup) {
|
|
43180
|
+
const holder = doc.createElementNS(NS, "svg");
|
|
43181
|
+
holder.innerHTML = markup;
|
|
43182
|
+
return Array.from(holder.children);
|
|
43183
|
+
}
|
|
43184
|
+
const css = buildSimpleArtisticCss(name, radius);
|
|
43185
|
+
if (!css) return void 0;
|
|
43186
|
+
const nodes = [];
|
|
43187
|
+
for (const match of css.matchAll(/([a-z-]+)\(([-\d.]+)(%|px|deg)?\)/g)) {
|
|
43188
|
+
const effect = match[1], value = Number(match[2]) / (match[3] === "%" ? 100 : 1);
|
|
43189
|
+
let node;
|
|
43190
|
+
if (effect === "blur") {
|
|
43191
|
+
node = doc.createElementNS(NS, "feGaussianBlur");
|
|
43192
|
+
node.setAttribute("stdDeviation", String(value));
|
|
43193
|
+
} else if (effect === "saturate" || effect === "grayscale") {
|
|
43194
|
+
node = doc.createElementNS(NS, "feColorMatrix");
|
|
43195
|
+
node.setAttribute("type", "saturate");
|
|
43196
|
+
node.setAttribute("values", String(effect === "grayscale" ? 1 - value : value));
|
|
43197
|
+
} else if (effect === "brightness" || effect === "contrast") {
|
|
43198
|
+
node = doc.createElementNS(NS, "feComponentTransfer");
|
|
43199
|
+
for (const ch of ["R", "G", "B"]) {
|
|
43200
|
+
const fn = doc.createElementNS(NS, `feFunc${ch}`);
|
|
43201
|
+
fn.setAttribute("type", "linear");
|
|
43202
|
+
fn.setAttribute("slope", String(value));
|
|
43203
|
+
fn.setAttribute("intercept", String(effect === "contrast" ? (1 - value) / 2 : 0));
|
|
43204
|
+
node.append(fn);
|
|
43205
|
+
}
|
|
43206
|
+
} else if (effect === "sepia") {
|
|
43207
|
+
node = doc.createElementNS(NS, "feColorMatrix");
|
|
43208
|
+
node.setAttribute("type", "matrix");
|
|
43209
|
+
node.setAttribute(
|
|
43210
|
+
"values",
|
|
43211
|
+
"0.393 0.769 0.189 0 0 0.349 0.686 0.168 0 0 0.272 0.534 0.131 0 0 0 0 0 1 0"
|
|
43212
|
+
);
|
|
43213
|
+
} else return void 0;
|
|
43214
|
+
nodes.push(node);
|
|
43215
|
+
}
|
|
43216
|
+
return nodes.length ? nodes : void 0;
|
|
43217
|
+
}
|
|
43218
|
+
var NS2 = "http://www.w3.org/2000/svg";
|
|
43219
|
+
var thresholdTable = (n) => Array.from({ length: 256 }, (_, i) => i / 255 >= n ? "1" : "0").join(" ");
|
|
43220
|
+
function standardPictureFilter(doc, effect, scheme = {}, prefix = "picture") {
|
|
43221
|
+
const nodes = [];
|
|
43222
|
+
const node = (name, attributes = {}) => {
|
|
43223
|
+
const item4 = doc.createElementNS(NS2, name);
|
|
43224
|
+
for (const [key, value2] of Object.entries(attributes)) item4.setAttribute(key, String(value2));
|
|
43225
|
+
return item4;
|
|
43226
|
+
};
|
|
43227
|
+
const transfer = (channels, attributes) => {
|
|
43228
|
+
const item4 = node("feComponentTransfer");
|
|
43229
|
+
for (const channel of channels) item4.append(node(`feFunc${channel}`, attributes));
|
|
43230
|
+
nodes.push(item4);
|
|
43231
|
+
};
|
|
43232
|
+
const value = effect.values ?? {};
|
|
43233
|
+
const colors = effect.colors?.map((color$1) => {
|
|
43234
|
+
const resolved2 = drawingml.resolveDrawingColor(color$1, { scheme: (name) => scheme[name] });
|
|
43235
|
+
const rgb = resolved2 ? color.hexToRgbChannels(resolved2.hex) : void 0;
|
|
43236
|
+
return rgb && resolved2 ? { r: rgb.r / 255, g: rgb.g / 255, b: rgb.b / 255, a: resolved2.alpha } : void 0;
|
|
43237
|
+
});
|
|
43238
|
+
switch (effect.name) {
|
|
43239
|
+
case "alphaInv":
|
|
43240
|
+
transfer(["A"], { type: "linear", slope: -1, intercept: 1 });
|
|
43241
|
+
{
|
|
43242
|
+
const c = colors?.[0] ?? { r: 0, g: 0, b: 0, a: 1 };
|
|
43243
|
+
nodes.push(
|
|
43244
|
+
node("feColorMatrix", {
|
|
43245
|
+
type: "matrix",
|
|
43246
|
+
values: `0 0 0 0 ${c.r} 0 0 0 0 ${c.g} 0 0 0 0 ${c.b} 0 0 0 ${c.a} 0`
|
|
43247
|
+
})
|
|
43248
|
+
);
|
|
43249
|
+
}
|
|
43250
|
+
break;
|
|
43251
|
+
case "alphaCeiling":
|
|
43252
|
+
transfer(["A"], { type: "discrete", tableValues: ["0", ...Array(255).fill("1")].join(" ") });
|
|
43253
|
+
break;
|
|
43254
|
+
case "alphaFloor":
|
|
43255
|
+
transfer(["A"], { type: "discrete", tableValues: [...Array(255).fill("0"), "1"].join(" ") });
|
|
43256
|
+
break;
|
|
43257
|
+
case "alphaRepl":
|
|
43258
|
+
transfer(["A"], { type: "linear", slope: 0, intercept: value.amount ?? 1 });
|
|
43259
|
+
break;
|
|
43260
|
+
case "alphaMod":
|
|
43261
|
+
transfer(["A"], { type: "gamma", amplitude: value.amount ?? 1, exponent: 2, offset: 0 });
|
|
43262
|
+
break;
|
|
43263
|
+
case "alphaBiLevel":
|
|
43264
|
+
transfer(["A"], {
|
|
43265
|
+
type: "discrete",
|
|
43266
|
+
tableValues: thresholdTable(value.threshold ?? 0)
|
|
43267
|
+
});
|
|
43268
|
+
break;
|
|
43269
|
+
case "biLevel":
|
|
43270
|
+
nodes.push(node("feColorMatrix", { type: "saturate", values: 0 }));
|
|
43271
|
+
transfer(["R", "G", "B"], {
|
|
43272
|
+
type: "discrete",
|
|
43273
|
+
tableValues: thresholdTable(value.threshold ?? 0)
|
|
43274
|
+
});
|
|
43275
|
+
break;
|
|
43276
|
+
case "blur":
|
|
43277
|
+
nodes.push(node("feGaussianBlur", { stdDeviation: (value.radiusEmu ?? 0) / 3 }));
|
|
43278
|
+
break;
|
|
43279
|
+
case "hsl":
|
|
43280
|
+
case "tint":
|
|
43281
|
+
if (value.hue !== void 0)
|
|
43282
|
+
nodes.push(node("feColorMatrix", { type: "hueRotate", values: value.hue }));
|
|
43283
|
+
if (value.saturation !== void 0)
|
|
43284
|
+
nodes.push(
|
|
43285
|
+
node("feColorMatrix", { type: "saturate", values: Math.max(0, 1 + value.saturation) })
|
|
43286
|
+
);
|
|
43287
|
+
if (value.luminance !== void 0 || value.amount !== void 0) {
|
|
43288
|
+
const x = drawingml.buildImageLuminanceTransfer((value.luminance ?? value.amount ?? 0) * 100);
|
|
43289
|
+
transfer(["R", "G", "B"], { type: "linear", slope: x.slope, intercept: x.intercept });
|
|
43290
|
+
}
|
|
43291
|
+
break;
|
|
43292
|
+
case "duotone": {
|
|
43293
|
+
const a = colors?.[0], b = colors?.[1];
|
|
43294
|
+
if (!a || !b) return { nodes: [], unapplied: "duotone:colour" };
|
|
43295
|
+
nodes.push(node("feColorMatrix", { type: "saturate", values: 0 }));
|
|
43296
|
+
const map = node("feComponentTransfer");
|
|
43297
|
+
for (const channel of ["R", "G", "B"]) {
|
|
43298
|
+
const key = channel.toLowerCase();
|
|
43299
|
+
map.append(
|
|
43300
|
+
node(`feFunc${channel}`, { type: "linear", slope: b[key] - a[key], intercept: a[key] })
|
|
43301
|
+
);
|
|
43302
|
+
}
|
|
43303
|
+
nodes.push(map);
|
|
43304
|
+
if (a.a !== 1 || b.a !== 1) return { nodes, unapplied: "duotone:colour-alpha" };
|
|
43305
|
+
break;
|
|
43306
|
+
}
|
|
43307
|
+
case "clrRepl": {
|
|
43308
|
+
const c = colors?.[0];
|
|
43309
|
+
if (!c) return { nodes: [], unapplied: "clrRepl:colour" };
|
|
43310
|
+
nodes.push(
|
|
43311
|
+
node("feColorMatrix", {
|
|
43312
|
+
type: "matrix",
|
|
43313
|
+
values: `0 0 0 0 ${c.r} 0 0 0 0 ${c.g} 0 0 0 0 ${c.b} 0 0 0 ${c.a} 0`
|
|
43314
|
+
})
|
|
43315
|
+
);
|
|
43316
|
+
break;
|
|
43317
|
+
}
|
|
43318
|
+
case "clrChange": {
|
|
43319
|
+
const a = colors?.[0], b = colors?.[1];
|
|
43320
|
+
if (!a || !b) return { nodes: [], unapplied: "clrChange:colour" };
|
|
43321
|
+
if (effect.useAlpha !== false && a.a !== 1)
|
|
43322
|
+
return { nodes: [], unapplied: "clrChange:source-alpha" };
|
|
43323
|
+
const opaque = node("feComponentTransfer", {
|
|
43324
|
+
in: "PICTURE_INPUT",
|
|
43325
|
+
result: `${prefix}-opaque`
|
|
43326
|
+
});
|
|
43327
|
+
opaque.append(node("feFuncA", { type: "linear", slope: 0, intercept: 1 }));
|
|
43328
|
+
nodes.push(opaque);
|
|
43329
|
+
const from = node("feFlood", {
|
|
43330
|
+
"flood-color": `rgb(${a.r * 255},${a.g * 255},${a.b * 255})`,
|
|
43331
|
+
result: `${prefix}-key`
|
|
43332
|
+
});
|
|
43333
|
+
nodes.push(from);
|
|
43334
|
+
nodes.push(
|
|
43335
|
+
node("feBlend", {
|
|
43336
|
+
in: `${prefix}-opaque`,
|
|
43337
|
+
in2: `${prefix}-key`,
|
|
43338
|
+
mode: "difference",
|
|
43339
|
+
result: `${prefix}-distance`
|
|
43340
|
+
})
|
|
43341
|
+
);
|
|
43342
|
+
nodes.push(
|
|
43343
|
+
node("feColorMatrix", {
|
|
43344
|
+
in: `${prefix}-distance`,
|
|
43345
|
+
type: "matrix",
|
|
43346
|
+
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0"
|
|
43347
|
+
})
|
|
43348
|
+
);
|
|
43349
|
+
transfer(["A"], { type: "discrete", tableValues: ["1", ...Array(255).fill("0")].join(" ") });
|
|
43350
|
+
nodes[nodes.length - 1].setAttribute("result", `${prefix}-mask`);
|
|
43351
|
+
nodes.push(
|
|
43352
|
+
node("feColorMatrix", {
|
|
43353
|
+
in: "PICTURE_INPUT",
|
|
43354
|
+
type: "matrix",
|
|
43355
|
+
values: `0 0 0 0 ${b.r} 0 0 0 0 ${b.g} 0 0 0 0 ${b.b} 0 0 0 ${b.a} 0`,
|
|
43356
|
+
result: `${prefix}-replacement`
|
|
43357
|
+
})
|
|
43358
|
+
);
|
|
43359
|
+
nodes.push(
|
|
43360
|
+
node("feComposite", {
|
|
43361
|
+
in: `${prefix}-replacement`,
|
|
43362
|
+
in2: `${prefix}-mask`,
|
|
43363
|
+
operator: "in",
|
|
43364
|
+
result: `${prefix}-matched`
|
|
43365
|
+
})
|
|
43366
|
+
);
|
|
43367
|
+
nodes.push(
|
|
43368
|
+
node("feComposite", {
|
|
43369
|
+
in: "PICTURE_INPUT",
|
|
43370
|
+
in2: `${prefix}-mask`,
|
|
43371
|
+
operator: "out",
|
|
43372
|
+
result: `${prefix}-rest`
|
|
43373
|
+
})
|
|
43374
|
+
);
|
|
43375
|
+
nodes.push(
|
|
43376
|
+
node("feComposite", { in: `${prefix}-matched`, in2: `${prefix}-rest`, operator: "over" })
|
|
43377
|
+
);
|
|
43378
|
+
break;
|
|
43379
|
+
}
|
|
43380
|
+
}
|
|
43381
|
+
return { nodes };
|
|
43382
|
+
}
|
|
43383
|
+
var NS3 = "http://www.w3.org/2000/svg";
|
|
43384
|
+
var serial = 0;
|
|
43385
|
+
function pictureEffectFilter(doc, defs, effects, scheme = {}) {
|
|
43386
|
+
const filter = doc.createElementNS(NS3, "filter");
|
|
43387
|
+
filter.id = `office-picture-effects-${++serial}`;
|
|
43388
|
+
filter.setAttribute("color-interpolation-filters", "sRGB");
|
|
43389
|
+
const unapplied = [];
|
|
43390
|
+
const approximated = [];
|
|
43391
|
+
let previous = "SourceGraphic", step2 = 0;
|
|
43392
|
+
for (const effect of effects) {
|
|
43393
|
+
if (effect.kind === "unsupported") {
|
|
43394
|
+
unapplied.push(effect.name);
|
|
43395
|
+
continue;
|
|
43396
|
+
}
|
|
43397
|
+
if (effect.kind === "artistic") {
|
|
43398
|
+
if (effect.unhandled?.length) unapplied.push(...effect.unhandled);
|
|
43399
|
+
if (effect.baked) continue;
|
|
43400
|
+
const nodes = artisticPictureNodes(doc, effect.name, effect.radius);
|
|
43401
|
+
if (!nodes) {
|
|
43402
|
+
unapplied.push(effect.name);
|
|
43403
|
+
continue;
|
|
43404
|
+
}
|
|
43405
|
+
approximated.push(effect.name);
|
|
43406
|
+
const input = previous;
|
|
43407
|
+
const names = new Map(
|
|
43408
|
+
nodes.flatMap(
|
|
43409
|
+
(node) => node.hasAttribute("result") ? [[node.getAttribute("result"), `${filter.id}-art${step2++}`]] : []
|
|
43410
|
+
)
|
|
43411
|
+
);
|
|
43412
|
+
for (const node of nodes) {
|
|
43413
|
+
for (const attribute of ["in", "in2"]) {
|
|
43414
|
+
const ref = node.getAttribute(attribute);
|
|
43415
|
+
if (ref === "SourceGraphic") node.setAttribute(attribute, input);
|
|
43416
|
+
else if (ref && names.has(ref)) node.setAttribute(attribute, names.get(ref));
|
|
43417
|
+
}
|
|
43418
|
+
const result = node.getAttribute("result");
|
|
43419
|
+
if (result && names.has(result)) node.setAttribute("result", names.get(result));
|
|
43420
|
+
else node.setAttribute("result", `${filter.id}-r${step2++}`);
|
|
43421
|
+
if (!node.hasAttribute("in") && !["feTurbulence", "feFlood"].includes(node.localName))
|
|
43422
|
+
node.setAttribute("in", previous);
|
|
43423
|
+
previous = node.getAttribute("result");
|
|
43424
|
+
filter.append(node);
|
|
43425
|
+
}
|
|
43426
|
+
continue;
|
|
43427
|
+
}
|
|
43428
|
+
if (effect.kind === "standard") {
|
|
43429
|
+
const result = standardPictureFilter(doc, effect, scheme, `${filter.id}-${step2++}`);
|
|
43430
|
+
if (result.unapplied) unapplied.push(result.unapplied);
|
|
43431
|
+
if (["hsl", "tint", "clrChange"].includes(effect.name)) approximated.push(effect.name);
|
|
43432
|
+
const input = previous;
|
|
43433
|
+
for (const item4 of result.nodes) {
|
|
43434
|
+
if (item4.getAttribute("in") === "PICTURE_INPUT") item4.setAttribute("in", input);
|
|
43435
|
+
else if (!item4.hasAttribute("in") && item4.localName !== "feFlood")
|
|
43436
|
+
item4.setAttribute("in", previous);
|
|
43437
|
+
if (!item4.hasAttribute("result")) item4.setAttribute("result", `${filter.id}-r${step2++}`);
|
|
43438
|
+
previous = item4.getAttribute("result");
|
|
43439
|
+
filter.append(item4);
|
|
43440
|
+
}
|
|
43441
|
+
continue;
|
|
43442
|
+
}
|
|
43443
|
+
if (effect.kind === "grayscale") {
|
|
43444
|
+
const node = doc.createElementNS(NS3, "feColorMatrix");
|
|
43445
|
+
node.setAttribute("type", "saturate");
|
|
43446
|
+
node.setAttribute("values", "0");
|
|
43447
|
+
node.setAttribute("in", previous);
|
|
43448
|
+
node.setAttribute("result", `${filter.id}-r${step2++}`);
|
|
43449
|
+
previous = node.getAttribute("result");
|
|
43450
|
+
filter.append(node);
|
|
43451
|
+
} else {
|
|
43452
|
+
const transfer = doc.createElementNS(NS3, "feComponentTransfer");
|
|
43453
|
+
if (effect.kind === "alphaModFix") {
|
|
43454
|
+
const channel = doc.createElementNS(NS3, "feFuncA");
|
|
43455
|
+
channel.setAttribute("type", "linear");
|
|
43456
|
+
channel.setAttribute("slope", String(effect.amount));
|
|
43457
|
+
transfer.append(channel);
|
|
43458
|
+
} else {
|
|
43459
|
+
const { slope, intercept } = drawingml.pictureLuminanceTransfer(effect.brightness, effect.contrast);
|
|
43460
|
+
for (const name of ["R", "G", "B"]) {
|
|
43461
|
+
const channel = doc.createElementNS(NS3, `feFunc${name}`);
|
|
43462
|
+
channel.setAttribute("type", "linear");
|
|
43463
|
+
channel.setAttribute("slope", String(slope));
|
|
43464
|
+
channel.setAttribute("intercept", String(intercept));
|
|
43465
|
+
transfer.append(channel);
|
|
43466
|
+
}
|
|
43467
|
+
}
|
|
43468
|
+
transfer.setAttribute("in", previous);
|
|
43469
|
+
transfer.setAttribute("result", `${filter.id}-r${step2++}`);
|
|
43470
|
+
previous = transfer.getAttribute("result");
|
|
43471
|
+
filter.append(transfer);
|
|
43472
|
+
}
|
|
43473
|
+
}
|
|
43474
|
+
if (!filter.childNodes.length) return { unapplied };
|
|
43475
|
+
defs.append(filter);
|
|
43476
|
+
return {
|
|
43477
|
+
filter: `url(#${filter.id})`,
|
|
43478
|
+
unapplied,
|
|
43479
|
+
...approximated.length ? { approximated } : {}
|
|
43480
|
+
};
|
|
43481
|
+
}
|
|
43482
|
+
|
|
43483
|
+
// src/picture-pixels.ts
|
|
43484
|
+
var cache = /* @__PURE__ */ new Map();
|
|
43485
|
+
var pending = /* @__PURE__ */ new Map();
|
|
43486
|
+
var keyOf = (url, effects, scheme) => JSON.stringify([url, effects, scheme]);
|
|
43487
|
+
var needsPicturePixels = (effects) => effects.some(
|
|
43488
|
+
(e) => e.kind === "standard" && (e.name === "hsl" || e.name === "tint" || e.name === "blur")
|
|
43489
|
+
);
|
|
43490
|
+
function cachedPicturePixels(url, effects, scheme = {}) {
|
|
43491
|
+
const value = cache.get(keyOf(url, effects, scheme));
|
|
43492
|
+
return value ? JSON.parse(value) : void 0;
|
|
43493
|
+
}
|
|
43494
|
+
function probePicturePixels(doc, url, effects, scheme = {}) {
|
|
43495
|
+
const key = keyOf(url, effects, scheme);
|
|
43496
|
+
const cached = cachedPicturePixels(url, effects, scheme);
|
|
43497
|
+
if (cached) return Promise.resolve(cached);
|
|
43498
|
+
const running = pending.get(key);
|
|
43499
|
+
if (running) return running;
|
|
43500
|
+
const load = (source) => new Promise((resolve, reject) => {
|
|
43501
|
+
const image = doc.createElement("img");
|
|
43502
|
+
image.onload = () => resolve(image);
|
|
43503
|
+
image.onerror = () => reject(new Error("Picture decode failed"));
|
|
43504
|
+
image.src = source;
|
|
43505
|
+
});
|
|
43506
|
+
const task = (async () => {
|
|
43507
|
+
const source = await load(url);
|
|
43508
|
+
const canvas = doc.createElement("canvas");
|
|
43509
|
+
canvas.width = source.naturalWidth;
|
|
43510
|
+
canvas.height = source.naturalHeight;
|
|
43511
|
+
if (!canvas.width || !canvas.height || canvas.width * canvas.height > 16777216)
|
|
43512
|
+
return void 0;
|
|
43513
|
+
const context = canvas.getContext("2d");
|
|
43514
|
+
if (!context) return void 0;
|
|
43515
|
+
context.drawImage(source, 0, 0);
|
|
43516
|
+
let dataUrl = canvas.toDataURL("image/png");
|
|
43517
|
+
let queue = [];
|
|
43518
|
+
const flush = async () => {
|
|
43519
|
+
if (!queue.length) return;
|
|
43520
|
+
const ns = "http://www.w3.org/2000/svg";
|
|
43521
|
+
const svg2 = doc.createElementNS(ns, "svg");
|
|
43522
|
+
svg2.setAttribute("xmlns", ns);
|
|
43523
|
+
svg2.setAttribute("width", String(canvas.width));
|
|
43524
|
+
svg2.setAttribute("height", String(canvas.height));
|
|
43525
|
+
const defs = doc.createElementNS(ns, "defs");
|
|
43526
|
+
svg2.append(defs);
|
|
43527
|
+
const result2 = pictureEffectFilter(doc, defs, queue, scheme);
|
|
43528
|
+
const image = doc.createElementNS(ns, "image");
|
|
43529
|
+
image.setAttribute("href", dataUrl);
|
|
43530
|
+
image.setAttribute("width", String(canvas.width));
|
|
43531
|
+
image.setAttribute("height", String(canvas.height));
|
|
43532
|
+
if (result2.filter) image.setAttribute("filter", result2.filter);
|
|
43533
|
+
svg2.append(image);
|
|
43534
|
+
const flattened = await load(`data:image/svg+xml,${encodeURIComponent(svg2.outerHTML)}`);
|
|
43535
|
+
context.clearRect(0, 0, canvas.width, canvas.height);
|
|
43536
|
+
context.drawImage(flattened, 0, 0);
|
|
43537
|
+
dataUrl = canvas.toDataURL("image/png");
|
|
43538
|
+
queue = [];
|
|
43539
|
+
};
|
|
43540
|
+
for (const effect of effects) {
|
|
43541
|
+
if (effect.kind === "standard" && (effect.name === "hsl" || effect.name === "tint")) {
|
|
43542
|
+
await flush();
|
|
43543
|
+
const image = context.getImageData(0, 0, canvas.width, canvas.height);
|
|
43544
|
+
drawingml.applyPictureHslPixels(image.data, effect);
|
|
43545
|
+
context.putImageData(image, 0, 0);
|
|
43546
|
+
dataUrl = canvas.toDataURL("image/png");
|
|
43547
|
+
} else queue.push(effect);
|
|
43548
|
+
}
|
|
43549
|
+
await flush();
|
|
43550
|
+
const result = { url: dataUrl, width: canvas.width, height: canvas.height };
|
|
43551
|
+
chunkKJICUZXM_cjs.setBoundedRenderCache(cache, key, JSON.stringify(result), 64);
|
|
43552
|
+
return result;
|
|
43553
|
+
})().catch(() => void 0).finally(() => pending.delete(key));
|
|
43554
|
+
pending.set(key, task);
|
|
43555
|
+
return task;
|
|
43556
|
+
}
|
|
43557
|
+
var NS4 = "http://www.w3.org/2000/svg";
|
|
43558
|
+
var serial2 = 0;
|
|
43559
|
+
function picturePaint(doc, defs, fill3, media, context = { width: 1, height: 1 }) {
|
|
43560
|
+
if (fill3.unsupportedPicture?.length)
|
|
43561
|
+
return { paint: "#d1d5db", unapplied: fill3.unsupportedPicture };
|
|
43562
|
+
const source = typeof media === "string" ? { url: media } : { ...media };
|
|
43563
|
+
const pattern = doc.createElementNS(NS4, "pattern");
|
|
43564
|
+
pattern.id = `office-picture-${++serial2}`;
|
|
43565
|
+
pattern.setAttribute("patternUnits", "userSpaceOnUse");
|
|
43566
|
+
const unapplied = [];
|
|
43567
|
+
const crop = { cropLeft: 0, cropTop: 0, cropRight: 0, cropBottom: 0, ...fill3.crop };
|
|
43568
|
+
const spanX = 1 - crop.cropLeft - crop.cropRight, spanY = 1 - crop.cropTop - crop.cropBottom;
|
|
43569
|
+
const counter = fill3.layout?.rotWithShape === false ? geometry.pictureFillCounterTransform(
|
|
43570
|
+
context.width,
|
|
43571
|
+
context.height,
|
|
43572
|
+
context.rotation,
|
|
43573
|
+
context.flipHorizontal,
|
|
43574
|
+
context.flipVertical
|
|
43575
|
+
) : void 0;
|
|
43576
|
+
if (counter) pattern.setAttribute("patternTransform", counter);
|
|
43577
|
+
const originalEffects = fill3.effects ?? [];
|
|
43578
|
+
const pixelCache = needsPicturePixels(originalEffects) ? cachedPicturePixels(source.url, originalEffects, context.scheme) : void 0;
|
|
43579
|
+
const images = [];
|
|
43580
|
+
const effects = pictureEffectFilter(doc, defs, originalEffects, context.scheme);
|
|
43581
|
+
let pixelReady = Boolean(pixelCache);
|
|
43582
|
+
if (pixelCache) {
|
|
43583
|
+
source.url = pixelCache.url;
|
|
43584
|
+
source.width = pixelCache.width;
|
|
43585
|
+
source.height = pixelCache.height;
|
|
43586
|
+
pattern.dataset.pixelEffectsReady = "true";
|
|
43587
|
+
} else if (needsPicturePixels(originalEffects))
|
|
43588
|
+
void probePicturePixels(doc, source.url, originalEffects, context.scheme).then((result) => {
|
|
43589
|
+
if (!result) return;
|
|
43590
|
+
source.url = result.url;
|
|
43591
|
+
pixelReady = true;
|
|
43592
|
+
for (const image of images) {
|
|
43593
|
+
image.setAttribute("href", result.url);
|
|
43594
|
+
image.removeAttribute("filter");
|
|
43595
|
+
}
|
|
43596
|
+
pattern.dataset.pixelEffectsReady = "true";
|
|
43597
|
+
});
|
|
43598
|
+
unapplied.push(...effects.unapplied);
|
|
43599
|
+
if (effects.approximated?.length)
|
|
43600
|
+
pattern.dataset.approximatedPictureEffects = effects.approximated.join(",");
|
|
43601
|
+
const appendImage = (parent, x, y, width, height) => {
|
|
43602
|
+
const image = doc.createElementNS(NS4, "image");
|
|
43603
|
+
for (const [key, value] of Object.entries({ x, y, width, height }))
|
|
43604
|
+
image.setAttribute(key, String(value));
|
|
43605
|
+
image.setAttribute("href", source.url);
|
|
43606
|
+
images.push(image);
|
|
43607
|
+
image.setAttribute("preserveAspectRatio", "none");
|
|
43608
|
+
if (effects.filter && !pixelReady) image.setAttribute("filter", effects.filter);
|
|
43609
|
+
parent.append(image);
|
|
43610
|
+
};
|
|
43611
|
+
if (spanX <= 0 || spanY <= 0) {
|
|
43612
|
+
unapplied.push("invalid-crop");
|
|
43613
|
+
pattern.dataset.unapplied = "invalid-crop";
|
|
43614
|
+
} else if (fill3.layout?.tile) {
|
|
43615
|
+
pattern.setAttribute("patternContentUnits", "userSpaceOnUse");
|
|
43616
|
+
const paint = (size3) => {
|
|
43617
|
+
if (!size3) {
|
|
43618
|
+
unapplied.push("tile-image-size");
|
|
43619
|
+
pattern.dataset.unapplied = "tile-image-size";
|
|
43620
|
+
return;
|
|
43621
|
+
}
|
|
43622
|
+
const tile8 = fill3.layout.tile;
|
|
43623
|
+
const cell = geometry.pictureTileGeometry(
|
|
43624
|
+
context,
|
|
43625
|
+
// Office scales the uncropped bitmap to set the tile period; srcRect
|
|
43626
|
+
// expands its image inside that fixed cell (native PowerPoint probe).
|
|
43627
|
+
size3,
|
|
43628
|
+
tile8,
|
|
43629
|
+
fill3.layout?.dpi
|
|
43630
|
+
);
|
|
43631
|
+
if (!cell) {
|
|
43632
|
+
unapplied.push("invalid-tile");
|
|
43633
|
+
pattern.dataset.unapplied = "invalid-tile";
|
|
43634
|
+
return;
|
|
43635
|
+
}
|
|
43636
|
+
pattern.replaceChildren();
|
|
43637
|
+
for (const [key, value] of Object.entries({
|
|
43638
|
+
x: cell.x,
|
|
43639
|
+
y: cell.y,
|
|
43640
|
+
width: cell.width * cell.columns,
|
|
43641
|
+
height: cell.height * cell.rows
|
|
43642
|
+
}))
|
|
43643
|
+
pattern.setAttribute(key, String(value));
|
|
43644
|
+
for (let row = 0; row < cell.rows; row++)
|
|
43645
|
+
for (let col = 0; col < cell.columns; col++) {
|
|
43646
|
+
const clip = doc.createElementNS(NS4, "clipPath");
|
|
43647
|
+
clip.id = `office-picture-clip-${++serial2}`;
|
|
43648
|
+
const rect3 = doc.createElementNS(NS4, "rect");
|
|
43649
|
+
rect3.setAttribute("width", String(cell.width));
|
|
43650
|
+
rect3.setAttribute("height", String(cell.height));
|
|
43651
|
+
clip.append(rect3);
|
|
43652
|
+
defs.append(clip);
|
|
43653
|
+
const group = doc.createElementNS(NS4, "g");
|
|
43654
|
+
group.setAttribute(
|
|
43655
|
+
"transform",
|
|
43656
|
+
`translate(${(col + col % 2) * cell.width} ${(row + row % 2) * cell.height}) scale(${col % 2 ? -1 : 1} ${row % 2 ? -1 : 1})`
|
|
43657
|
+
);
|
|
43658
|
+
group.setAttribute("clip-path", `url(#${clip.id})`);
|
|
43659
|
+
const image = geometry.imageRectFromCrop(
|
|
43660
|
+
{ x: 0, y: 0, width: cell.width, height: cell.height },
|
|
43661
|
+
crop
|
|
43662
|
+
);
|
|
43663
|
+
appendImage(group, image.x, image.y, image.width, image.height);
|
|
43664
|
+
pattern.append(group);
|
|
43665
|
+
}
|
|
43666
|
+
pattern.dataset.ready = "true";
|
|
43667
|
+
};
|
|
43668
|
+
const size2 = source.width && source.height ? { width: source.width, height: source.height } : getCachedNativeImageSize(source.url);
|
|
43669
|
+
if (size2) paint(size2);
|
|
43670
|
+
else void probeNativeImageSize(source.url).then(paint);
|
|
43671
|
+
} else {
|
|
43672
|
+
pattern.setAttribute("width", String(context.width));
|
|
43673
|
+
pattern.setAttribute("height", String(context.height));
|
|
43674
|
+
pattern.setAttribute("patternContentUnits", "objectBoundingBox");
|
|
43675
|
+
const insets = fill3.layout?.fillRect ?? { l: 0, t: 0, r: 0, b: 0 };
|
|
43676
|
+
const frame = {
|
|
43677
|
+
x: insets.l,
|
|
43678
|
+
y: insets.t,
|
|
43679
|
+
width: 1 - insets.l - insets.r,
|
|
43680
|
+
height: 1 - insets.t - insets.b
|
|
43681
|
+
};
|
|
43682
|
+
if (frame.width <= 0 || frame.height <= 0) {
|
|
43683
|
+
unapplied.push("invalid-fillRect");
|
|
43684
|
+
pattern.dataset.unapplied = "invalid-fillRect";
|
|
43685
|
+
} else {
|
|
43686
|
+
const rect3 = geometry.imageRectFromCrop(frame, crop);
|
|
43687
|
+
const clip = doc.createElementNS(NS4, "clipPath");
|
|
43688
|
+
clip.id = `office-picture-clip-${++serial2}`;
|
|
43689
|
+
clip.setAttribute("clipPathUnits", "userSpaceOnUse");
|
|
43690
|
+
const box = doc.createElementNS(NS4, "rect");
|
|
43691
|
+
for (const [key, value] of Object.entries(frame)) box.setAttribute(key, String(value));
|
|
43692
|
+
clip.append(box);
|
|
43693
|
+
defs.append(clip);
|
|
43694
|
+
const group = doc.createElementNS(NS4, "g");
|
|
43695
|
+
group.setAttribute("clip-path", `url(#${clip.id})`);
|
|
43696
|
+
appendImage(group, rect3.x, rect3.y, rect3.width, rect3.height);
|
|
43697
|
+
pattern.append(group);
|
|
43698
|
+
}
|
|
43699
|
+
}
|
|
43700
|
+
defs.append(pattern);
|
|
43701
|
+
return {
|
|
43702
|
+
paint: `url(#${pattern.id})`,
|
|
43703
|
+
unapplied,
|
|
43704
|
+
...effects.approximated?.length ? { approximated: effects.approximated } : {}
|
|
43705
|
+
};
|
|
43706
|
+
}
|
|
43707
|
+
|
|
43708
|
+
// src/picture-view.ts
|
|
43709
|
+
function pictureSvg(doc, fill3, url, width, height, context = {}) {
|
|
43710
|
+
const ns = "http://www.w3.org/2000/svg";
|
|
43711
|
+
const svg2 = doc.createElementNS(ns, "svg");
|
|
43712
|
+
svg2.setAttribute("width", String(width));
|
|
43713
|
+
svg2.setAttribute("height", String(height));
|
|
43714
|
+
svg2.setAttribute("viewBox", `0 0 ${width} ${height}`);
|
|
43715
|
+
svg2.style.width = "100%";
|
|
43716
|
+
svg2.style.height = "100%";
|
|
43717
|
+
const defs = doc.createElementNS(ns, "defs");
|
|
43718
|
+
svg2.append(defs);
|
|
43719
|
+
const result = picturePaint(doc, defs, fill3, url, { width, height, ...context });
|
|
43720
|
+
const rect3 = doc.createElementNS(ns, "rect");
|
|
43721
|
+
rect3.setAttribute("width", String(width));
|
|
43722
|
+
rect3.setAttribute("height", String(height));
|
|
43723
|
+
rect3.setAttribute("fill", result.paint);
|
|
43724
|
+
svg2.append(rect3);
|
|
43725
|
+
if (result.unapplied.length) svg2.dataset.unappliedPictureEffects = result.unapplied.join(",");
|
|
43726
|
+
if (result.approximated?.length)
|
|
43727
|
+
svg2.dataset.approximatedPictureEffects = result.approximated.join(",");
|
|
43728
|
+
return svg2;
|
|
43729
|
+
}
|
|
43730
|
+
|
|
43731
|
+
// src/pptx/render/smartart-picture-image.ts
|
|
43732
|
+
var needsSmartArtPictureRefresh = (shape) => Boolean(
|
|
43733
|
+
shape.fillImageUrl && (needsPicturePixels(shape.pictureFill?.effects ?? []) || shape.pictureFill?.layout?.tile && !(shape.fillImageWidth && shape.fillImageHeight))
|
|
43734
|
+
);
|
|
43735
|
+
var pendingImages = /* @__PURE__ */ new WeakMap();
|
|
43736
|
+
var sourceKey = (shape) => JSON.stringify([
|
|
43737
|
+
shape.fillImageUrl,
|
|
43738
|
+
shape.pictureFill,
|
|
43739
|
+
shape.width,
|
|
43740
|
+
shape.height,
|
|
43741
|
+
shape.rotation,
|
|
43742
|
+
shape.flipHorizontal,
|
|
43743
|
+
shape.flipVertical,
|
|
43744
|
+
shape.shapeType,
|
|
43745
|
+
shape.shapeAdjustments
|
|
43746
|
+
]);
|
|
43747
|
+
function refreshSmartArtPictureImage(event, source) {
|
|
43748
|
+
const image = event.currentTarget;
|
|
43749
|
+
if (!image || image.localName !== "image" || !source || !needsSmartArtPictureRefresh(source))
|
|
43750
|
+
return;
|
|
43751
|
+
const key = sourceKey(source);
|
|
43752
|
+
const originalHref = image.getAttribute("href");
|
|
43753
|
+
const previous = pendingImages.get(image);
|
|
43754
|
+
if (previous?.key === key && previous.href === originalHref) return;
|
|
43755
|
+
const state = { key, href: originalHref };
|
|
43756
|
+
pendingImages.set(image, state);
|
|
43757
|
+
const pixels2 = needsPicturePixels(source.pictureFill?.effects ?? []);
|
|
43758
|
+
const ready = pixels2 ? probePicturePixels(
|
|
43759
|
+
image.ownerDocument,
|
|
43760
|
+
source.fillImageUrl,
|
|
43761
|
+
source.pictureFill.effects ?? []
|
|
43762
|
+
) : probeNativeImageSize(source.fillImageUrl);
|
|
43763
|
+
void ready.then((result) => {
|
|
43764
|
+
if (!result || !image.isConnected || image.getAttribute("href") !== originalHref || pendingImages.get(image) !== state || sourceKey(source) !== key)
|
|
43765
|
+
return;
|
|
43766
|
+
image.setAttribute("data-office-picture-paint-ready", "true");
|
|
43767
|
+
if (pixels2) image.setAttribute("data-office-picture-pixels-ready", "true");
|
|
43768
|
+
const url = smartArtPictureImage(source);
|
|
43769
|
+
state.href = url ?? originalHref;
|
|
43770
|
+
if (url && image.getAttribute("href") !== url) image.setAttribute("href", url);
|
|
43771
|
+
});
|
|
43772
|
+
}
|
|
43773
|
+
function smartArtPictureImage(shape) {
|
|
43774
|
+
const url = shape.fillImageUrl;
|
|
43775
|
+
if (!url?.startsWith("data:") || !shape.pictureFill || typeof document === "undefined")
|
|
43776
|
+
return url;
|
|
43777
|
+
const size2 = cachedPicturePixels(url, shape.pictureFill.effects ?? []) ?? getCachedNativeImageSize(url);
|
|
43778
|
+
const width = shape.fillImageWidth ?? size2?.width;
|
|
43779
|
+
const height = shape.fillImageHeight ?? size2?.height;
|
|
43780
|
+
if (shape.pictureFill.layout?.tile && !(width && height)) return url;
|
|
43781
|
+
const svg2 = pictureSvg(
|
|
43782
|
+
document,
|
|
43783
|
+
shape.pictureFill,
|
|
43784
|
+
{
|
|
43785
|
+
url,
|
|
43786
|
+
...width ? { width } : {},
|
|
43787
|
+
...height ? { height } : {}
|
|
43788
|
+
},
|
|
43789
|
+
shape.width,
|
|
43790
|
+
shape.height,
|
|
43791
|
+
{
|
|
43792
|
+
rotation: shape.rotation,
|
|
43793
|
+
flipHorizontal: shape.flipHorizontal,
|
|
43794
|
+
flipVertical: shape.flipVertical
|
|
43795
|
+
}
|
|
43796
|
+
);
|
|
43797
|
+
svg2.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
43798
|
+
const geometry = getPresetShapeVectorGeometry(
|
|
43799
|
+
shape.shapeType,
|
|
43800
|
+
shape.width,
|
|
43801
|
+
shape.height,
|
|
43802
|
+
shape.shapeAdjustments
|
|
43803
|
+
);
|
|
43804
|
+
const rectangle = svg2.lastElementChild;
|
|
43805
|
+
if (geometry && rectangle) {
|
|
43806
|
+
const path = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
43807
|
+
path.setAttribute("d", geometry.d);
|
|
43808
|
+
path.setAttribute("fill", rectangle.getAttribute("fill") ?? "none");
|
|
43809
|
+
rectangle.replaceWith(path);
|
|
43810
|
+
}
|
|
43811
|
+
return `data:image/svg+xml,${encodeURIComponent(svg2.outerHTML)}`;
|
|
43812
|
+
}
|
|
42972
43813
|
function computeDrawingViewBox(shapes) {
|
|
42973
43814
|
return diagram.computeDiagramDrawingBounds(
|
|
42974
43815
|
shapes.map((shape) => ({
|
|
@@ -43113,7 +43954,8 @@ function projectDrawingShapes(elementId, shapes, viewBox, palette, style) {
|
|
|
43113
43954
|
stroke,
|
|
43114
43955
|
strokeWidth: shape.strokeWidth ?? sw,
|
|
43115
43956
|
transform,
|
|
43116
|
-
imageUrl: shape
|
|
43957
|
+
imageUrl: smartArtPictureImage(shape),
|
|
43958
|
+
...needsSmartArtPictureRefresh(shape) ? { pictureSource: shape } : {},
|
|
43117
43959
|
textLines: shape.text ? centeredSvgTextLines(shape.text, fontSize, {
|
|
43118
43960
|
maxWidth: textWrapWidth,
|
|
43119
43961
|
centerY: textCenterY,
|
|
@@ -43594,8 +44436,6 @@ function routeEditLayerPointerToNodes(layer) {
|
|
|
43594
44436
|
layer.removeEventListener("mousemove", onMouseMove, true);
|
|
43595
44437
|
};
|
|
43596
44438
|
}
|
|
43597
|
-
|
|
43598
|
-
// src/pptx/render/smartart-reflow-to-shapes.ts
|
|
43599
44439
|
function polygonBounds(points) {
|
|
43600
44440
|
const pairs = points.trim().split(/\s+/u);
|
|
43601
44441
|
let minX = Infinity;
|
|
@@ -43698,6 +44538,10 @@ function rebuildDrawingShapesIfCleared(smartArtData, layout, palette, style, ele
|
|
|
43698
44538
|
if (shapes === void 0 || shapes.length > 0 || smartArtData.nodes.length === 0) {
|
|
43699
44539
|
return smartArtData;
|
|
43700
44540
|
}
|
|
44541
|
+
const pictures = pptx.reflowSmartArtPictures(smartArtData, box.width, box.height);
|
|
44542
|
+
if (pictures) {
|
|
44543
|
+
return { ...smartArtData, drawingShapes: pptx.applySmartArtQuickStyle3d(pictures, smartArtData) };
|
|
44544
|
+
}
|
|
43701
44545
|
const layoutResult = computeSmartArtElementLayout(
|
|
43702
44546
|
{ ...smartArtData, layout },
|
|
43703
44547
|
smartArtData.nodes,
|
|
@@ -43759,7 +44603,7 @@ function buildObliqueLabels(layout, input) {
|
|
|
43759
44603
|
const { w, h, d } = layout.box;
|
|
43760
44604
|
const span = layout.range.max - layout.range.min;
|
|
43761
44605
|
const fontSize = input.fontSize;
|
|
43762
|
-
for (const v of
|
|
44606
|
+
for (const v of chunkKJICUZXM_cjs.axisTickValues({ ...layout.range, span })) {
|
|
43763
44607
|
const p = (v - layout.range.min) * layout.valueScale;
|
|
43764
44608
|
if (layout.horizontal) {
|
|
43765
44609
|
const at = screen2(layout, p, 0, 0);
|
|
@@ -43905,22 +44749,22 @@ function computeObliqueBarLayout(element, vm) {
|
|
|
43905
44749
|
const rotX = (chartData.view3D?.rotX ?? 15) * Math.PI / 180;
|
|
43906
44750
|
const rotY = (chartData.view3D?.rotY ?? 20) * Math.PI / 180;
|
|
43907
44751
|
const shear = { x: Math.sin(rotY), y: -Math.sin(rotX) };
|
|
43908
|
-
const gapWidth = (chartData.barGapWidth ??
|
|
44752
|
+
const gapWidth = (chartData.barGapWidth ?? chunkKJICUZXM_cjs.DEFAULT_BAR_GAP_WIDTH) / 100;
|
|
43909
44753
|
const gapDepth = (chartData.gapDepth ?? DEFAULT_GAP_DEPTH) / 100;
|
|
43910
44754
|
const slots = grouping === "clustered" ? nSer : 1;
|
|
43911
44755
|
const rows = grouping === "standard" ? nSer : 1;
|
|
43912
44756
|
const labelFont = vm.axisLabels[0]?.fontSize ?? 16;
|
|
43913
44757
|
const catLabels = chartData.categories.length > 0 ? chartData.categories : Array.from({ length: nCat }, (_, i) => String(i + 1));
|
|
43914
|
-
const widest = (texts) => texts.reduce((m, t2) => Math.max(m,
|
|
44758
|
+
const widest = (texts) => texts.reduce((m, t2) => Math.max(m, chunkKJICUZXM_cjs.estimateTextWidth(t2, labelFont)), 0);
|
|
43915
44759
|
const top = vm.title ? TOP_WITH_TITLE : TOP_NO_TITLE;
|
|
43916
44760
|
const hasBottomLegend = chartData.style?.hasLegend !== false && (chartData.style?.legendPosition ?? "b") === "b";
|
|
43917
44761
|
const bottom = vm.svgHeight - (hasBottomLegend ? BOTTOM_WITH_LEGEND : BOTTOM_NO_LEGEND);
|
|
43918
44762
|
const regionH = Math.max(1, bottom - top);
|
|
43919
44763
|
const provisional = valueRange(chartData, grouping, nCat, regionH);
|
|
43920
|
-
const valueTexts =
|
|
44764
|
+
const valueTexts = chunkKJICUZXM_cjs.axisTickValues({
|
|
43921
44765
|
...provisional,
|
|
43922
44766
|
span: provisional.max - provisional.min
|
|
43923
|
-
}).map((v) =>
|
|
44767
|
+
}).map((v) => chunkHIRBPTML_cjs.formatValueLabel(chartData, grouping, v));
|
|
43924
44768
|
const leftBand = (horizontal ? widest(catLabels) : widest(valueTexts)) + (horizontal ? OBLIQUE_CATEGORY_LABEL_GAP : OBLIQUE_VALUE_LABEL_GAP);
|
|
43925
44769
|
const seriesLabelW = grouping === "standard" && !horizontal ? widest(chartData.series.map((s) => s.name)) : 0;
|
|
43926
44770
|
const seriesOverhang = (depth2) => seriesLabelW > 0 ? Math.max(0, OBLIQUE_CATEGORY_LABEL_GAP + seriesLabelW - depth2 * shear.x / (2 * rows)) : 0;
|
|
@@ -43976,13 +44820,13 @@ function computeObliqueBarLayout(element, vm) {
|
|
|
43976
44820
|
gridlines: [],
|
|
43977
44821
|
labels: []
|
|
43978
44822
|
};
|
|
43979
|
-
layout.bars =
|
|
43980
|
-
layout.gridlines =
|
|
44823
|
+
layout.bars = chunkHIRBPTML_cjs.buildBars(chartData, vm, layout, { nCat, slots, rows, gapWidth, gapDepth });
|
|
44824
|
+
layout.gridlines = chunkHIRBPTML_cjs.buildGridlines(layout);
|
|
43981
44825
|
layout.labels = buildObliqueLabels(layout, {
|
|
43982
44826
|
fontSize: labelFont,
|
|
43983
44827
|
categories: catLabels,
|
|
43984
44828
|
seriesNames: chartData.series.map((s) => s.name),
|
|
43985
|
-
valueText: (v) =>
|
|
44829
|
+
valueText: (v) => chunkHIRBPTML_cjs.formatValueLabel(chartData, grouping, v)
|
|
43986
44830
|
});
|
|
43987
44831
|
return layout;
|
|
43988
44832
|
}
|
|
@@ -43995,7 +44839,7 @@ function buildPerspGridlines(box, range, horizontal) {
|
|
|
43995
44839
|
{ from: [w, 0, 0], to: [w, 0, d] }
|
|
43996
44840
|
];
|
|
43997
44841
|
const span = range.max - range.min;
|
|
43998
|
-
for (const v of
|
|
44842
|
+
for (const v of chunkKJICUZXM_cjs.axisTickValues({ ...range, span })) {
|
|
43999
44843
|
const t2 = (v - range.min) / span;
|
|
44000
44844
|
if (horizontal) {
|
|
44001
44845
|
const x = t2 * w;
|
|
@@ -44021,11 +44865,11 @@ function buildPerspLabels(layout, input) {
|
|
|
44021
44865
|
const span = range.max - range.min;
|
|
44022
44866
|
const labels = [];
|
|
44023
44867
|
const fontSize = input.fontSize;
|
|
44024
|
-
for (const v of
|
|
44868
|
+
for (const v of chunkKJICUZXM_cjs.axisTickValues({ ...range, span })) {
|
|
44025
44869
|
const t2 = (v - range.min) / span;
|
|
44026
|
-
const text4 = input.percent ? `${Math.round(v * 100)}%` :
|
|
44870
|
+
const text4 = input.percent ? `${Math.round(v * 100)}%` : chunkKJICUZXM_cjs.formatAxisValueWithUnits(v, input.valueAxis);
|
|
44027
44871
|
if (layout.horizontal) {
|
|
44028
|
-
const at =
|
|
44872
|
+
const at = chunkHIRBPTML_cjs.perspToScreen(view2, [t2 * w, 0, 0]);
|
|
44029
44873
|
labels.push({
|
|
44030
44874
|
role: "value",
|
|
44031
44875
|
text: text4,
|
|
@@ -44035,7 +44879,7 @@ function buildPerspLabels(layout, input) {
|
|
|
44035
44879
|
fontSize
|
|
44036
44880
|
});
|
|
44037
44881
|
} else {
|
|
44038
|
-
const at =
|
|
44882
|
+
const at = chunkHIRBPTML_cjs.perspToScreen(view2, [0, t2 * h, 0]);
|
|
44039
44883
|
labels.push({ role: "value", text: text4, x: at.x - VALUE_GAP2, y: at.y, anchor: "end", fontSize });
|
|
44040
44884
|
}
|
|
44041
44885
|
}
|
|
@@ -44045,7 +44889,7 @@ function buildPerspLabels(layout, input) {
|
|
|
44045
44889
|
return;
|
|
44046
44890
|
}
|
|
44047
44891
|
if (layout.horizontal) {
|
|
44048
|
-
const at2 =
|
|
44892
|
+
const at2 = chunkHIRBPTML_cjs.perspToScreen(view2, [0, pos, 0]);
|
|
44049
44893
|
labels.push({
|
|
44050
44894
|
role: "category",
|
|
44051
44895
|
text: text4,
|
|
@@ -44056,7 +44900,7 @@ function buildPerspLabels(layout, input) {
|
|
|
44056
44900
|
});
|
|
44057
44901
|
return;
|
|
44058
44902
|
}
|
|
44059
|
-
const at =
|
|
44903
|
+
const at = chunkHIRBPTML_cjs.perspToScreen(view2, [pos, 0, 0]);
|
|
44060
44904
|
labels.push({
|
|
44061
44905
|
role: "category",
|
|
44062
44906
|
text: text4,
|
|
@@ -44069,7 +44913,7 @@ function buildPerspLabels(layout, input) {
|
|
|
44069
44913
|
const rows = input.seriesNames.length;
|
|
44070
44914
|
input.seriesNames.forEach((text4, s) => {
|
|
44071
44915
|
const z = layout.kind === "surface" ? rows > 1 ? s / (rows - 1) * d : d / 2 : (s + 0.5) / rows * d;
|
|
44072
|
-
const at =
|
|
44916
|
+
const at = chunkHIRBPTML_cjs.perspToScreen(view2, [w, 0, z]);
|
|
44073
44917
|
labels.push({
|
|
44074
44918
|
role: "series",
|
|
44075
44919
|
text: text4,
|
|
@@ -44162,7 +45006,7 @@ function computePerspChartLayout(element, vm, options = {}) {
|
|
|
44162
45006
|
const valAx = chartData.axes?.find((a) => a.axisType === "valAx");
|
|
44163
45007
|
const midCat = (valAx?.crossBetween ?? (kind === "area" || kind === "surface" ? "midCat" : "between")) === "midCat";
|
|
44164
45008
|
const view3D = chartData.view3D;
|
|
44165
|
-
const gapWidth = (chartData.barGapWidth ??
|
|
45009
|
+
const gapWidth = (chartData.barGapWidth ?? chunkKJICUZXM_cjs.DEFAULT_BAR_GAP_WIDTH) / 100;
|
|
44166
45010
|
const gapDepth = (chartData.gapDepth ?? DEFAULT_GAP_DEPTH2) / 100;
|
|
44167
45011
|
const slot = 1 / nCat;
|
|
44168
45012
|
const rows = kind === "surface" ? nSer : grouping === "standard" ? nSer : 1;
|
|
@@ -44175,9 +45019,9 @@ function computePerspChartLayout(element, vm, options = {}) {
|
|
|
44175
45019
|
const valueExtent = horizontal ? 1 : baseHeight * heightScale;
|
|
44176
45020
|
const catExtent = horizontal ? HORIZONTAL_CATEGORY_EXTENT * heightScale : 1;
|
|
44177
45021
|
const box = horizontal ? { w: valueExtent, h: catExtent, d } : { w: 1, h: valueExtent, d };
|
|
44178
|
-
const camera = options.oblique ?
|
|
45022
|
+
const camera = options.oblique ? chunkHIRBPTML_cjs.perspObliqueCameraFor(box, view3D?.rotX ?? 15, view3D?.rotY ?? 20) : chunkHIRBPTML_cjs.perspCameraFor(box, view3D?.rotX ?? 15, view3D?.rotY ?? 20, view3D?.perspective ?? void 0);
|
|
44179
45023
|
const hasLegend = chartData.style?.hasLegend !== false && (chartData.style?.legendPosition ?? "b") === "b";
|
|
44180
|
-
const view2 =
|
|
45024
|
+
const view2 = chunkHIRBPTML_cjs.fitPerspView(camera, {
|
|
44181
45025
|
left: RECT_LEFT,
|
|
44182
45026
|
right: vm.svgWidth - (rows > 1 ? RECT_RIGHT_WITH_SERIES : RECT_RIGHT_NO_SERIES),
|
|
44183
45027
|
top: vm.title ? RECT_TOP_WITH_TITLE : RECT_TOP_NO_TITLE,
|
|
@@ -44222,46 +45066,6 @@ function computePerspChartLayout(element, vm, options = {}) {
|
|
|
44222
45066
|
return layout;
|
|
44223
45067
|
}
|
|
44224
45068
|
|
|
44225
|
-
// src/pptx/render/chart-3d-projection.ts
|
|
44226
|
-
var DEFAULT_ROT_X = 15;
|
|
44227
|
-
var DEFAULT_ROT_Y = 20;
|
|
44228
|
-
var DEFAULT_PIE_ROT_X = 30;
|
|
44229
|
-
var DEFAULT_PIE_ROT_Y = 0;
|
|
44230
|
-
var DEFAULT_PERSPECTIVE_DEG = 30;
|
|
44231
|
-
var PERSPECTIVE_MAX_DEG = 120;
|
|
44232
|
-
var FOV_MIN = 15;
|
|
44233
|
-
var FOV_MAX = 75;
|
|
44234
|
-
function clamp7(value, min, max) {
|
|
44235
|
-
return Math.min(Math.max(value, min), max);
|
|
44236
|
-
}
|
|
44237
|
-
function resolvePerspectiveFov(perspectiveDeg) {
|
|
44238
|
-
const perspective2 = clamp7(perspectiveDeg ?? DEFAULT_PERSPECTIVE_DEG, 0, PERSPECTIVE_MAX_DEG);
|
|
44239
|
-
return FOV_MIN + perspective2 / PERSPECTIVE_MAX_DEG * (FOV_MAX - FOV_MIN);
|
|
44240
|
-
}
|
|
44241
|
-
function resolveChart3DProjection(chartType, view3D) {
|
|
44242
|
-
const isPie = chartType === "pie3D";
|
|
44243
|
-
const rotXDeg = view3D?.rotX ?? (isPie ? DEFAULT_PIE_ROT_X : DEFAULT_ROT_X);
|
|
44244
|
-
const rotYDeg = view3D?.rotY ?? (isPie ? DEFAULT_PIE_ROT_Y : DEFAULT_ROT_Y);
|
|
44245
|
-
const rAngAx = view3D?.rAngAx ?? chartType === "bar3D";
|
|
44246
|
-
if (rAngAx) {
|
|
44247
|
-
const rx = rotXDeg * Math.PI / 180;
|
|
44248
|
-
const ry = rotYDeg * Math.PI / 180;
|
|
44249
|
-
return {
|
|
44250
|
-
mode: "oblique",
|
|
44251
|
-
shearX: Math.sin(ry),
|
|
44252
|
-
shearY: -Math.sin(rx),
|
|
44253
|
-
rotXDeg,
|
|
44254
|
-
rotYDeg
|
|
44255
|
-
};
|
|
44256
|
-
}
|
|
44257
|
-
return {
|
|
44258
|
-
mode: "perspective",
|
|
44259
|
-
rotXDeg,
|
|
44260
|
-
rotYDeg,
|
|
44261
|
-
fovDeg: resolvePerspectiveFov(view3D?.perspective)
|
|
44262
|
-
};
|
|
44263
|
-
}
|
|
44264
|
-
|
|
44265
45069
|
// src/pptx/render/chart-3d-spec.ts
|
|
44266
45070
|
var CHART_3D_TYPES = /* @__PURE__ */ new Set([
|
|
44267
45071
|
"bar3D",
|
|
@@ -44276,7 +45080,7 @@ function buildBarGeometry(element, vm) {
|
|
|
44276
45080
|
}
|
|
44277
45081
|
var PERSP_BOX_TYPES = /* @__PURE__ */ new Set(["line3D", "area3D", "surface", "bar3D"]);
|
|
44278
45082
|
function buildPieGeometry(element, vm) {
|
|
44279
|
-
const layout =
|
|
45083
|
+
const layout = chunkHIRBPTML_cjs.computePieChartLayout(element, chunkHIRBPTML_cjs.widenPieViewModel(vm, element));
|
|
44280
45084
|
return layout ? { kind: "pie", layout } : null;
|
|
44281
45085
|
}
|
|
44282
45086
|
function buildPerspGeometry(element, vm, oblique) {
|
|
@@ -44296,8 +45100,8 @@ function buildChart3DSpecForElement(element) {
|
|
|
44296
45100
|
if (!chartData || !is3DChartType(chartType)) {
|
|
44297
45101
|
return null;
|
|
44298
45102
|
}
|
|
44299
|
-
const vm =
|
|
44300
|
-
const projection = resolveChart3DProjection(chartType, chartData.view3D);
|
|
45103
|
+
const vm = chunkKJICUZXM_cjs.buildChartViewModel(element);
|
|
45104
|
+
const projection = chart.resolveChart3DProjection(chartType, chartData.view3D);
|
|
44301
45105
|
const geometry = chartType === "bar3D" && projection.mode === "oblique" ? buildBarGeometry(element, vm) : PERSP_BOX_TYPES.has(chartType) && (projection.mode === "perspective" || chartType !== "bar3D") ? buildPerspGeometry(element, vm, projection.mode === "oblique") : chartType === "pie3D" ? buildPieGeometry(element, vm) : null;
|
|
44302
45106
|
if (!geometry) {
|
|
44303
45107
|
return null;
|
|
@@ -44689,7 +45493,7 @@ function buildSurfaceLabels(cols, rows, categoryLabels, seriesNames, maxCat = 8,
|
|
|
44689
45493
|
var DEFAULT_ELEVATION_DEG = 15;
|
|
44690
45494
|
var DEFAULT_AZIMUTH_DEG = 20;
|
|
44691
45495
|
var RADIUS_FACTOR = Math.sqrt(0.8 ** 2 + 0.7 ** 2 + 0.8 ** 2);
|
|
44692
|
-
function
|
|
45496
|
+
function clamp7(value, min, max) {
|
|
44693
45497
|
return Math.min(Math.max(value, min), max);
|
|
44694
45498
|
}
|
|
44695
45499
|
function normalizeAzimuth(deg3) {
|
|
@@ -44705,7 +45509,7 @@ function computeCameraPlacement(cols, rows, view3D) {
|
|
|
44705
45509
|
return { position: [dist2 * 0.8, dist2 * 0.7, dist2 * 0.8], target };
|
|
44706
45510
|
}
|
|
44707
45511
|
const radius = dist2 * RADIUS_FACTOR;
|
|
44708
|
-
const elevationDeg =
|
|
45512
|
+
const elevationDeg = clamp7(view3D.rotX ?? DEFAULT_ELEVATION_DEG, -89, 89);
|
|
44709
45513
|
const azimuthDeg = normalizeAzimuth(view3D.rotY ?? DEFAULT_AZIMUTH_DEG);
|
|
44710
45514
|
const phi = (90 - elevationDeg) * Math.PI / 180;
|
|
44711
45515
|
const theta = azimuthDeg * Math.PI / 180;
|
|
@@ -44782,7 +45586,7 @@ function inspectorNumber(value, fallback = 0) {
|
|
|
44782
45586
|
const source = typeof value === "number" && Number.isFinite(value) ? value : fallback;
|
|
44783
45587
|
return Math.round(source * 100) / 100;
|
|
44784
45588
|
}
|
|
44785
|
-
function
|
|
45589
|
+
function clamp8(v, lo, hi) {
|
|
44786
45590
|
return Math.max(lo, Math.min(hi, v));
|
|
44787
45591
|
}
|
|
44788
45592
|
function shapeStyleMergePatch(el, changes) {
|
|
@@ -44828,7 +45632,7 @@ function outerShadowStyle(state) {
|
|
|
44828
45632
|
const angleRad = state.angle * Math.PI / 180;
|
|
44829
45633
|
return {
|
|
44830
45634
|
shadowColor: state.color,
|
|
44831
|
-
shadowOpacity:
|
|
45635
|
+
shadowOpacity: clamp8(state.opacity, 0, 1),
|
|
44832
45636
|
shadowBlur: Math.max(0, state.blur),
|
|
44833
45637
|
shadowAngle: state.angle,
|
|
44834
45638
|
shadowDistance: Math.max(0, state.distance),
|
|
@@ -44856,7 +45660,7 @@ function disableInnerShadowPatch(el) {
|
|
|
44856
45660
|
function innerShadowStyle(state) {
|
|
44857
45661
|
return {
|
|
44858
45662
|
innerShadowColor: state.color,
|
|
44859
|
-
innerShadowOpacity:
|
|
45663
|
+
innerShadowOpacity: clamp8(state.opacity, 0, 1),
|
|
44860
45664
|
innerShadowBlur: Math.max(0, state.blur),
|
|
44861
45665
|
innerShadowOffsetX: state.offsetX,
|
|
44862
45666
|
innerShadowOffsetY: state.offsetY
|
|
@@ -44912,7 +45716,7 @@ function glowStyle(state) {
|
|
|
44912
45716
|
return {
|
|
44913
45717
|
glowColor: state.color,
|
|
44914
45718
|
glowRadius: Math.max(0, state.radius),
|
|
44915
|
-
glowOpacity:
|
|
45719
|
+
glowOpacity: clamp9(state.opacity, 0, 1)
|
|
44916
45720
|
};
|
|
44917
45721
|
}
|
|
44918
45722
|
function updateGlowPatch(el, changes) {
|
|
@@ -44922,8 +45726,8 @@ function updateGlowPatch(el, changes) {
|
|
|
44922
45726
|
function reflectionStyle(state) {
|
|
44923
45727
|
return {
|
|
44924
45728
|
reflectionBlurRadius: Math.max(0, state.blurRadius),
|
|
44925
|
-
reflectionStartOpacity:
|
|
44926
|
-
reflectionEndOpacity:
|
|
45729
|
+
reflectionStartOpacity: clamp9(state.startOpacity, 0, 100),
|
|
45730
|
+
reflectionEndOpacity: clamp9(state.endOpacity, 0, 100),
|
|
44927
45731
|
reflectionDistance: Math.max(0, state.distance),
|
|
44928
45732
|
reflectionDirection: state.direction
|
|
44929
45733
|
};
|
|
@@ -44951,7 +45755,7 @@ function enableSoftEdgePatch(el, radius) {
|
|
|
44951
45755
|
function disableSoftEdgePatch(el) {
|
|
44952
45756
|
return shapeStyleMergePatch2(el, { softEdgeRadius: 0 });
|
|
44953
45757
|
}
|
|
44954
|
-
function
|
|
45758
|
+
function clamp9(v, lo, hi) {
|
|
44955
45759
|
return Math.max(lo, Math.min(hi, v));
|
|
44956
45760
|
}
|
|
44957
45761
|
|
|
@@ -45989,7 +46793,7 @@ function colorField2(section2, key) {
|
|
|
45989
46793
|
kind: "color",
|
|
45990
46794
|
labelKey: "pptx.textEffects.color",
|
|
45991
46795
|
testId: fxId(section2, "color"),
|
|
45992
|
-
read: (ts) =>
|
|
46796
|
+
read: (ts) => chunkKJICUZXM_cjs.normalizeHexColor(ts?.[key], ON_DEFAULTS[key]),
|
|
45993
46797
|
write: (_ts, v) => ({ [key]: String(v) })
|
|
45994
46798
|
};
|
|
45995
46799
|
}
|
|
@@ -46430,17 +47234,11 @@ function pptxLoadErrorMessage(error, t2) {
|
|
|
46430
47234
|
}
|
|
46431
47235
|
return error instanceof Error ? error.message : String(error);
|
|
46432
47236
|
}
|
|
46433
|
-
|
|
46434
|
-
|
|
46435
|
-
function generateCustomShowId() {
|
|
46436
|
-
const c = globalThis.crypto;
|
|
46437
|
-
if (c && typeof c.randomUUID === "function") {
|
|
46438
|
-
return `show-${c.randomUUID()}`;
|
|
46439
|
-
}
|
|
46440
|
-
return `show-${Date.now()}-${Math.random().toString(36).slice(2)}`;
|
|
47237
|
+
function generateCustomShowId(existing = []) {
|
|
47238
|
+
return customShowOperations.nextCustomShowId(existing.map(({ id }) => ({ id, name: "", slideRIds: [] })));
|
|
46441
47239
|
}
|
|
46442
|
-
function
|
|
46443
|
-
return { id: generateCustomShowId(), name: name.trim(), slideIds: [...slideIds] };
|
|
47240
|
+
function createCustomShow2(name, slideIds, existing = []) {
|
|
47241
|
+
return { id: generateCustomShowId(existing), name: name.trim(), slideIds: [...slideIds] };
|
|
46444
47242
|
}
|
|
46445
47243
|
|
|
46446
47244
|
// src/pptx/render/slide-size.ts
|
|
@@ -49375,8 +50173,19 @@ function asElement(target) {
|
|
|
49375
50173
|
}
|
|
49376
50174
|
return element;
|
|
49377
50175
|
}
|
|
50176
|
+
function deepTarget(target) {
|
|
50177
|
+
let current = target;
|
|
50178
|
+
for (let depth = 0; depth < 8; depth++) {
|
|
50179
|
+
const inner3 = current?.shadowRoot?.activeElement;
|
|
50180
|
+
if (!inner3 || typeof inner3.tagName !== "string") {
|
|
50181
|
+
break;
|
|
50182
|
+
}
|
|
50183
|
+
current = inner3;
|
|
50184
|
+
}
|
|
50185
|
+
return current;
|
|
50186
|
+
}
|
|
49378
50187
|
function isEditorTextInputTarget(target) {
|
|
49379
|
-
const element = asElement(target);
|
|
50188
|
+
const element = asElement(deepTarget(target));
|
|
49380
50189
|
if (!element) {
|
|
49381
50190
|
return false;
|
|
49382
50191
|
}
|
|
@@ -51169,7 +51978,7 @@ function getCachedResult(key) {
|
|
|
51169
51978
|
return colorChangeCache.get(key);
|
|
51170
51979
|
}
|
|
51171
51980
|
function setCachedResult(key, dataUrl) {
|
|
51172
|
-
|
|
51981
|
+
chunkKJICUZXM_cjs.setBoundedRenderCache(colorChangeCache, key, dataUrl, CACHE_MAX2);
|
|
51173
51982
|
}
|
|
51174
51983
|
function clearColorChangeCache() {
|
|
51175
51984
|
colorChangeCache.clear();
|
|
@@ -51192,7 +52001,7 @@ async function resolveColorChangedImageSource(src, clrChange) {
|
|
|
51192
52001
|
if (cached) {
|
|
51193
52002
|
return cached;
|
|
51194
52003
|
}
|
|
51195
|
-
const epoch =
|
|
52004
|
+
const epoch = chunkKJICUZXM_cjs.getPptxRenderCacheEpoch();
|
|
51196
52005
|
try {
|
|
51197
52006
|
const result = await applyColorChange(
|
|
51198
52007
|
src,
|
|
@@ -51201,7 +52010,7 @@ async function resolveColorChangedImageSource(src, clrChange) {
|
|
|
51201
52010
|
tolerance,
|
|
51202
52011
|
Boolean(clrChange.clrToTransparent)
|
|
51203
52012
|
);
|
|
51204
|
-
if (epoch ===
|
|
52013
|
+
if (epoch === chunkKJICUZXM_cjs.getPptxRenderCacheEpoch()) setCachedResult(key, result.dataUrl);
|
|
51205
52014
|
return result.dataUrl;
|
|
51206
52015
|
} catch {
|
|
51207
52016
|
return src;
|
|
@@ -51279,7 +52088,7 @@ function getDuotoneCachedResult(key) {
|
|
|
51279
52088
|
return duotoneCache.get(key);
|
|
51280
52089
|
}
|
|
51281
52090
|
function setDuotoneCachedResult(key, dataUrl) {
|
|
51282
|
-
|
|
52091
|
+
chunkKJICUZXM_cjs.setBoundedRenderCache(duotoneCache, key, dataUrl, DUOTONE_CACHE_MAX);
|
|
51283
52092
|
}
|
|
51284
52093
|
function clearDuotoneCache() {
|
|
51285
52094
|
duotoneCache.clear();
|
|
@@ -51329,9 +52138,9 @@ var DUOTONE_PRESETS = [
|
|
|
51329
52138
|
|
|
51330
52139
|
// src/pptx/render/render-cache-lifecycle.ts
|
|
51331
52140
|
function releasePptxRenderCaches() {
|
|
51332
|
-
|
|
52141
|
+
chunkKJICUZXM_cjs.invalidatePptxRenderCacheEpoch();
|
|
51333
52142
|
clearNativeImageSizeCache();
|
|
51334
|
-
|
|
52143
|
+
chunkKJICUZXM_cjs.clearBarFacePicturePixelCache();
|
|
51335
52144
|
clearColorChangeCache();
|
|
51336
52145
|
clearDuotoneCache();
|
|
51337
52146
|
}
|
|
@@ -53396,12 +54205,12 @@ function insertChartPreviewSvg(doc, value, size2, tile8, translate) {
|
|
|
53396
54205
|
}
|
|
53397
54206
|
);
|
|
53398
54207
|
const data = element.chartData;
|
|
53399
|
-
if (!data ||
|
|
53400
|
-
const kind =
|
|
54208
|
+
if (!data || chunkKJICUZXM_cjs.resolveChartKind(data.chartType) === "unsupported") return "";
|
|
54209
|
+
const kind = chunkKJICUZXM_cjs.resolveChartKind(data.chartType);
|
|
53401
54210
|
const square = kind === "pie" || kind === "doughnut" || kind === "radar" || kind === "regionMap";
|
|
53402
|
-
const svg2 =
|
|
54211
|
+
const svg2 = chunkHIRBPTML_cjs.renderChartViewModelSvg(
|
|
53403
54212
|
doc,
|
|
53404
|
-
|
|
54213
|
+
chunkKJICUZXM_cjs.buildChartViewModel({ ...element, chartData: chunkKJICUZXM_cjs.withResolvedPalette(data) }),
|
|
53405
54214
|
square ? "xMidYMid meet" : "none",
|
|
53406
54215
|
translate
|
|
53407
54216
|
);
|
|
@@ -53880,7 +54689,7 @@ function trimmedMediaDurationMs(trimStartMs, trimEndMs, durationMs) {
|
|
|
53880
54689
|
}
|
|
53881
54690
|
|
|
53882
54691
|
// src/pptx/render/media-trim-timeline.ts
|
|
53883
|
-
function
|
|
54692
|
+
function clamp10(value, minimum, maximum) {
|
|
53884
54693
|
return Math.min(maximum, Math.max(minimum, value));
|
|
53885
54694
|
}
|
|
53886
54695
|
function formatMediaTime(seconds) {
|
|
@@ -53893,42 +54702,42 @@ function formatMediaTime(seconds) {
|
|
|
53893
54702
|
}
|
|
53894
54703
|
function mediaTrimEndSeconds(durationSeconds, trimEndMs) {
|
|
53895
54704
|
const duration = Math.max(0, durationSeconds);
|
|
53896
|
-
return trimEndMs > 0 ?
|
|
54705
|
+
return trimEndMs > 0 ? clamp10(duration - trimEndMs / 1e3, 0, duration) : duration;
|
|
53897
54706
|
}
|
|
53898
54707
|
function mediaTrimEndMsFromSeconds(durationSeconds, endSeconds) {
|
|
53899
54708
|
const duration = Math.max(0, durationSeconds);
|
|
53900
|
-
return Math.max(0, duration -
|
|
54709
|
+
return Math.max(0, duration - clamp10(endSeconds, 0, duration)) * 1e3;
|
|
53901
54710
|
}
|
|
53902
54711
|
function mediaTimeFromPointer(clientX, barLeft, barWidth, durationSeconds) {
|
|
53903
54712
|
if (barWidth <= 0 || durationSeconds <= 0) {
|
|
53904
54713
|
return 0;
|
|
53905
54714
|
}
|
|
53906
|
-
return
|
|
54715
|
+
return clamp10((clientX - barLeft) / barWidth, 0, 1) * durationSeconds;
|
|
53907
54716
|
}
|
|
53908
54717
|
function mediaTimelineGeometry(durationSeconds, trimStartMs, trimEndMs, currentTimeSeconds) {
|
|
53909
54718
|
const duration = durationSeconds > 0 ? durationSeconds : 1;
|
|
53910
|
-
const startSeconds =
|
|
54719
|
+
const startSeconds = clamp10(trimStartMs / 1e3, 0, duration);
|
|
53911
54720
|
const requestedEnd = trimEndMs > 0 ? duration - trimEndMs / 1e3 : duration;
|
|
53912
|
-
const endSeconds =
|
|
54721
|
+
const endSeconds = clamp10(requestedEnd, startSeconds, duration);
|
|
53913
54722
|
return {
|
|
53914
54723
|
startPercent: startSeconds / duration * 100,
|
|
53915
54724
|
endPercent: endSeconds / duration * 100,
|
|
53916
|
-
playheadPercent:
|
|
54725
|
+
playheadPercent: clamp10(currentTimeSeconds / duration * 100, 0, 100)
|
|
53917
54726
|
};
|
|
53918
54727
|
}
|
|
53919
54728
|
function mediaTrimRangeForDrag(handle, pointerTimeSeconds, durationSeconds, trimStartMs, trimEndMs, minimumGapSeconds = 0.1) {
|
|
53920
54729
|
const duration = Math.max(0, durationSeconds);
|
|
53921
|
-
const startSeconds =
|
|
53922
|
-
const endSeconds = trimEndMs > 0 ?
|
|
54730
|
+
const startSeconds = clamp10(trimStartMs / 1e3, 0, duration);
|
|
54731
|
+
const endSeconds = trimEndMs > 0 ? clamp10(duration - trimEndMs / 1e3, 0, duration) : duration;
|
|
53923
54732
|
if (handle === "start") {
|
|
53924
54733
|
const latestStart = Math.max(0, endSeconds - minimumGapSeconds);
|
|
53925
54734
|
return {
|
|
53926
|
-
trimStartMs:
|
|
54735
|
+
trimStartMs: clamp10(pointerTimeSeconds, 0, latestStart) * 1e3,
|
|
53927
54736
|
trimEndMs
|
|
53928
54737
|
};
|
|
53929
54738
|
}
|
|
53930
54739
|
const earliestEnd = Math.min(duration, startSeconds + minimumGapSeconds);
|
|
53931
|
-
const newEndSeconds =
|
|
54740
|
+
const newEndSeconds = clamp10(pointerTimeSeconds, earliestEnd, duration);
|
|
53932
54741
|
return {
|
|
53933
54742
|
trimStartMs,
|
|
53934
54743
|
trimEndMs: (duration - newEndSeconds) * 1e3
|
|
@@ -54385,13 +55194,13 @@ function attachEditorImagePaste(root, options) {
|
|
|
54385
55194
|
if (previousTabIndex === null) {
|
|
54386
55195
|
root.tabIndex = 0;
|
|
54387
55196
|
}
|
|
54388
|
-
const
|
|
55197
|
+
const pending3 = /* @__PURE__ */ new Set();
|
|
54389
55198
|
let disposed = false;
|
|
54390
55199
|
const cancelPending = () => {
|
|
54391
|
-
for (const abort of
|
|
55200
|
+
for (const abort of pending3) {
|
|
54392
55201
|
abort.abort();
|
|
54393
55202
|
}
|
|
54394
|
-
|
|
55203
|
+
pending3.clear();
|
|
54395
55204
|
};
|
|
54396
55205
|
const onFocusIn = (event) => {
|
|
54397
55206
|
const canvas = options.getCanvas();
|
|
@@ -54421,9 +55230,9 @@ function attachEditorImagePaste(root, options) {
|
|
|
54421
55230
|
}
|
|
54422
55231
|
event.preventDefault();
|
|
54423
55232
|
const abort = new AbortController();
|
|
54424
|
-
|
|
55233
|
+
pending3.add(abort);
|
|
54425
55234
|
void chunkZJFN5POF_cjs.createImageElementFromFile(file, target.canvasSize, abort.signal).then((element) => {
|
|
54426
|
-
|
|
55235
|
+
pending3.delete(abort);
|
|
54427
55236
|
if (!element || disposed || abort.signal.aborted || !root.isConnected) {
|
|
54428
55237
|
return;
|
|
54429
55238
|
}
|
|
@@ -57534,9 +58343,9 @@ function resolveAuthoredSlideRange(selection, slideCount) {
|
|
|
57534
58343
|
if (typeof from !== "number" || typeof to !== "number" || !Number.isFinite(from) || !Number.isFinite(to)) {
|
|
57535
58344
|
return void 0;
|
|
57536
58345
|
}
|
|
57537
|
-
const
|
|
57538
|
-
const clampedFrom =
|
|
57539
|
-
const clampedTo =
|
|
58346
|
+
const clamp11 = (value) => Math.min(Math.max(Math.round(value), 1), slideCount);
|
|
58347
|
+
const clampedFrom = clamp11(from);
|
|
58348
|
+
const clampedTo = clamp11(to);
|
|
57540
58349
|
return {
|
|
57541
58350
|
fromIndex: Math.min(clampedFrom, clampedTo) - 1,
|
|
57542
58351
|
toIndex: Math.max(clampedFrom, clampedTo) - 1
|
|
@@ -61473,7 +62282,7 @@ function axisTitle(current, show) {
|
|
|
61473
62282
|
return show ? current || chart.CHART_QUICK_LAYOUT_AXIS_TITLE : void 0;
|
|
61474
62283
|
}
|
|
61475
62284
|
function applyChartQuickLayout(chartData, layout) {
|
|
61476
|
-
const withGrid = patchChartData(chartData,
|
|
62285
|
+
const withGrid = patchChartData(chartData, chunkKJICUZXM_cjs.chartGridlinesPatch(chartData, layout.majorGridlines));
|
|
61477
62286
|
const axes = (withGrid.axes ?? []).map((axis) => {
|
|
61478
62287
|
if (axis.axisType === "valAx") {
|
|
61479
62288
|
return {
|
|
@@ -61527,7 +62336,7 @@ function matchesLayout(chartData, layout) {
|
|
|
61527
62336
|
const legend = style.hasLegend ? style.legendPosition ?? "r" : null;
|
|
61528
62337
|
const isBar = chartData.chartType === "bar" || chartData.chartType === "bar3D";
|
|
61529
62338
|
const barMatches = !isBar || (chartData.barGapWidth ?? 150) === layout.gapWidth && (chartData.barOverlap ?? 0) === layout.overlap;
|
|
61530
|
-
return barMatches && Boolean(style.hasTitle) === layout.title && legend === layout.legend && Boolean(style.hasDataLabels) === layout.dataLabels && Boolean(chartData.dataTable) === layout.dataTable && Boolean(catAxis?.titleText) === layout.catAxisTitle && Boolean(valAxis?.titleText) === layout.valAxisTitle &&
|
|
62339
|
+
return barMatches && Boolean(style.hasTitle) === layout.title && legend === layout.legend && Boolean(style.hasDataLabels) === layout.dataLabels && Boolean(chartData.dataTable) === layout.dataTable && Boolean(catAxis?.titleText) === layout.catAxisTitle && Boolean(valAxis?.titleText) === layout.valAxisTitle && chunkKJICUZXM_cjs.chartGridlinesState(chartData) === layout.majorGridlines && Boolean(valAxis?.minorGridlines) === layout.minorGridlines && !valAxis?.deleted === layout.valueAxis;
|
|
61531
62340
|
}
|
|
61532
62341
|
var CHART_QUICK_LAYOUT_GALLERY = {
|
|
61533
62342
|
build(ctx) {
|
|
@@ -63265,14 +64074,14 @@ function shadowMatches(style, spec5) {
|
|
|
63265
64074
|
}
|
|
63266
64075
|
function tileEffects(spec5) {
|
|
63267
64076
|
const { x, y } = shadowOffsets(spec5.distEmu, spec5.dir);
|
|
63268
|
-
const
|
|
64077
|
+
const clamp11 = (v) => Math.max(-4, Math.min(4, v * 0.6));
|
|
63269
64078
|
return {
|
|
63270
64079
|
shadow: {
|
|
63271
64080
|
color: "#000000",
|
|
63272
64081
|
opacity: Math.min(0.8, (spec5.alpha ?? 1e5) / 1e5 + 0.25),
|
|
63273
64082
|
blur: Math.min(6, spec5.blurEmu / EMU_PER_PX6 / 1.5),
|
|
63274
|
-
dx:
|
|
63275
|
-
dy:
|
|
64083
|
+
dx: clamp11(x),
|
|
64084
|
+
dy: clamp11(y) + (spec5.sy !== void 0 && spec5.sy < 0 ? 3 : 0),
|
|
63276
64085
|
inner: spec5.kind === "inner"
|
|
63277
64086
|
}
|
|
63278
64087
|
};
|
|
@@ -64532,7 +65341,7 @@ var SMARTART_LAYOUTS_GALLERY = {
|
|
|
64532
65341
|
const data = element?.type === "smartArt" ? element.smartArtData : void 0;
|
|
64533
65342
|
const current = data?.resolvedLayoutType ?? "list";
|
|
64534
65343
|
const accent1 = galleryColorScheme(ctx).accent1;
|
|
64535
|
-
const
|
|
65344
|
+
const pending3 = smartArtBuiltinLayouts() === void 0;
|
|
64536
65345
|
return {
|
|
64537
65346
|
id: "smartArtLayouts",
|
|
64538
65347
|
labelKey: "pptx.gallery.smartArtLayouts.title",
|
|
@@ -64554,7 +65363,7 @@ var SMARTART_LAYOUTS_GALLERY = {
|
|
|
64554
65363
|
},
|
|
64555
65364
|
...namedLayoutSections(accent1, data?.layoutDefinition?.uniqueId)
|
|
64556
65365
|
],
|
|
64557
|
-
...
|
|
65366
|
+
...pending3 && {
|
|
64558
65367
|
ready: preloadSmartArtBuiltinLayouts().then(
|
|
64559
65368
|
(library) => library ? SMARTART_LAYOUTS_GALLERY.build(ctx) : void 0
|
|
64560
65369
|
)
|
|
@@ -66186,9 +66995,9 @@ function effectFilter(style, id) {
|
|
|
66186
66995
|
merge.push('<feMergeNode in="glow"/>');
|
|
66187
66996
|
}
|
|
66188
66997
|
if (style.textShadowColor) {
|
|
66189
|
-
const
|
|
66998
|
+
const clamp11 = (v) => Math.max(-2, Math.min(2, (v ?? 0) / 2));
|
|
66190
66999
|
parts.push(
|
|
66191
|
-
`<feDropShadow dx="${num13(
|
|
67000
|
+
`<feDropShadow dx="${num13(clamp11(style.textShadowOffsetX))}" dy="${num13(clamp11(style.textShadowOffsetY))}" stdDeviation="${num13(Math.min(1.5, (style.textShadowBlur ?? 2) / 4))}" flood-color="${safeColor(style.textShadowColor, "#000000")}" flood-opacity="${num13(style.textShadowOpacity ?? 1)}" result="shadow"/>`
|
|
66192
67001
|
);
|
|
66193
67002
|
merge.push('<feMergeNode in="shadow"/>');
|
|
66194
67003
|
} else {
|
|
@@ -67941,19 +68750,19 @@ function cursorForTool(tool) {
|
|
|
67941
68750
|
|
|
67942
68751
|
// src/pptx/render/animation-opacity-playback.ts
|
|
67943
68752
|
var stacks = /* @__PURE__ */ new WeakMap();
|
|
67944
|
-
var
|
|
68753
|
+
var pending2 = /* @__PURE__ */ new WeakMap();
|
|
67945
68754
|
function resetOpacitySetPlayback(timers) {
|
|
67946
68755
|
stacks.delete(timers);
|
|
67947
|
-
|
|
68756
|
+
pending2.delete(timers);
|
|
67948
68757
|
}
|
|
67949
68758
|
function finishOpacitySetSteps(group, ctx) {
|
|
67950
|
-
for (const step2 of group.steps)
|
|
68759
|
+
for (const step2 of group.steps) pending2.get(ctx.timers)?.get(step2)?.();
|
|
67951
68760
|
}
|
|
67952
68761
|
function applyOpacitySetSteps(group, ctx) {
|
|
67953
68762
|
const targets = stacks.get(ctx.timers) ?? /* @__PURE__ */ new Map();
|
|
67954
68763
|
stacks.set(ctx.timers, targets);
|
|
67955
|
-
const completions =
|
|
67956
|
-
|
|
68764
|
+
const completions = pending2.get(ctx.timers) ?? /* @__PURE__ */ new Map();
|
|
68765
|
+
pending2.set(ctx.timers, completions);
|
|
67957
68766
|
for (const step2 of group.steps) {
|
|
67958
68767
|
const set = step2.opacitySet;
|
|
67959
68768
|
if (!set || !step2.elementId) continue;
|
|
@@ -68194,15 +69003,15 @@ function driveBuildReveal(controller, group, ctx) {
|
|
|
68194
69003
|
}
|
|
68195
69004
|
return next;
|
|
68196
69005
|
});
|
|
68197
|
-
let
|
|
69006
|
+
let pending3 = false;
|
|
68198
69007
|
for (const id of buildIds) {
|
|
68199
69008
|
const build7 = states.get(id)?.build;
|
|
68200
69009
|
if (build7 && build7.progress < 1) {
|
|
68201
|
-
|
|
69010
|
+
pending3 = true;
|
|
68202
69011
|
break;
|
|
68203
69012
|
}
|
|
68204
69013
|
}
|
|
68205
|
-
ctx.buildHandle.current =
|
|
69014
|
+
ctx.buildHandle.current = pending3 ? requestAnimationFrame(tick) : null;
|
|
68206
69015
|
};
|
|
68207
69016
|
tick();
|
|
68208
69017
|
}
|
|
@@ -68690,7 +69499,7 @@ function isSeriesUsingSecondaryAxis(chartData, seriesIndex) {
|
|
|
68690
69499
|
if (!series) {
|
|
68691
69500
|
return false;
|
|
68692
69501
|
}
|
|
68693
|
-
return
|
|
69502
|
+
return chunkKJICUZXM_cjs.isSeriesOnSecondaryAxis(series, chartData.axes);
|
|
68694
69503
|
}
|
|
68695
69504
|
function resolveSecondaryAxisId(chartData, useSecondary) {
|
|
68696
69505
|
const axPos = useSecondary ? "r" : "l";
|
|
@@ -69349,14 +70158,14 @@ async function buildForeignObjectSvgBody(element, doc, options) {
|
|
|
69349
70158
|
backgroundColor,
|
|
69350
70159
|
readComputedStyle = (el) => window.getComputedStyle(el)
|
|
69351
70160
|
} = options;
|
|
69352
|
-
await
|
|
70161
|
+
await chunkFROIGMTI_cjs.settleThreeViews(element);
|
|
69353
70162
|
const clone = element.cloneNode(true);
|
|
69354
|
-
|
|
70163
|
+
chunkFROIGMTI_cjs.withAuthoredStrokeWidths(
|
|
69355
70164
|
element,
|
|
69356
70165
|
() => inlineComputedStylesOnClone(element, clone, readComputedStyle)
|
|
69357
70166
|
);
|
|
69358
|
-
|
|
69359
|
-
|
|
70167
|
+
chunkFROIGMTI_cjs.snapshotThreeViewsIntoClone(element, clone);
|
|
70168
|
+
chunkFROIGMTI_cjs.prepareExportClone(clone);
|
|
69360
70169
|
const [{ allEmbedded: imagesEmbedded }, externalFonts] = await Promise.all([
|
|
69361
70170
|
embedImagesOnClone(clone),
|
|
69362
70171
|
collectExternalFontFaceCss(doc, fetchAsDataUrl)
|
|
@@ -74988,12 +75797,12 @@ function attachViewerHyperlinks(root, navigation) {
|
|
|
74988
75797
|
};
|
|
74989
75798
|
}
|
|
74990
75799
|
function createSlidePackageClipboard(initialHost) {
|
|
74991
|
-
let host2 = initialHost, disposed = false,
|
|
75800
|
+
let host2 = initialHost, disposed = false, pending3 = false;
|
|
74992
75801
|
const retiredHandlers = /* @__PURE__ */ new Set();
|
|
74993
75802
|
const mediaUrls = /* @__PURE__ */ new Set();
|
|
74994
75803
|
const snapshot = () => {
|
|
74995
75804
|
if (disposed) throw new Error("Presentation is closed");
|
|
74996
|
-
if (
|
|
75805
|
+
if (pending3) throw new Error("Another clipboard operation is in progress");
|
|
74997
75806
|
const value = host2.getSnapshot();
|
|
74998
75807
|
if (!value) throw new Error("Open a presentation first");
|
|
74999
75808
|
return value;
|
|
@@ -75010,7 +75819,7 @@ function createSlidePackageClipboard(initialHost) {
|
|
|
75010
75819
|
const slides = templateEditing.buildSaveSlides(before.slides, before.templateElementsBySlideId).map(
|
|
75011
75820
|
clone.cloneSlide
|
|
75012
75821
|
);
|
|
75013
|
-
|
|
75822
|
+
pending3 = true;
|
|
75014
75823
|
try {
|
|
75015
75824
|
const text4 = before.handler.save(slides).then((bytes) => pptx.createSlideClipboardPackage(bytes, indexes)).then(pptx.serializeSlidePackageClipboard);
|
|
75016
75825
|
if (typeof ClipboardItem === "undefined" || !ClipboardItem.supports?.(pptx.SLIDE_PACKAGE_CLIPBOARD_MIME) || !clipboard.write) {
|
|
@@ -75032,7 +75841,7 @@ function createSlidePackageClipboard(initialHost) {
|
|
|
75032
75841
|
const settled = await Promise.allSettled([write, text4]);
|
|
75033
75842
|
for (const result of settled) if (result.status === "rejected") throw result.reason;
|
|
75034
75843
|
} finally {
|
|
75035
|
-
|
|
75844
|
+
pending3 = false;
|
|
75036
75845
|
}
|
|
75037
75846
|
},
|
|
75038
75847
|
async paste(insertAt) {
|
|
@@ -75040,7 +75849,7 @@ function createSlidePackageClipboard(initialHost) {
|
|
|
75040
75849
|
if (before.editable === false) throw new Error("Presentation is read-only");
|
|
75041
75850
|
const clipboard = globalThis.navigator?.clipboard;
|
|
75042
75851
|
if (!clipboard?.readText) throw new Error("System clipboard is unavailable in this browser");
|
|
75043
|
-
|
|
75852
|
+
pending3 = true;
|
|
75044
75853
|
let handler, committed = false;
|
|
75045
75854
|
const urls = [];
|
|
75046
75855
|
try {
|
|
@@ -75097,7 +75906,7 @@ function createSlidePackageClipboard(initialHost) {
|
|
|
75097
75906
|
for (const url of urls) mediaUrls.add(url);
|
|
75098
75907
|
committed = true;
|
|
75099
75908
|
} finally {
|
|
75100
|
-
|
|
75909
|
+
pending3 = false;
|
|
75101
75910
|
if (!committed) {
|
|
75102
75911
|
handler?.dispose();
|
|
75103
75912
|
for (const url of urls) URL.revokeObjectURL(url);
|
|
@@ -75201,15 +76010,15 @@ var INITIAL_FIND_REPLACE_SESSION = Object.freeze({
|
|
|
75201
76010
|
function search(slides, session) {
|
|
75202
76011
|
return session.query ? findReplace.findInSlides(slides, session.query, session.options) : [];
|
|
75203
76012
|
}
|
|
75204
|
-
function cursorAfterReplace(
|
|
76013
|
+
function cursorAfterReplace(pending3, count) {
|
|
75205
76014
|
if (count === 0) {
|
|
75206
76015
|
return -1;
|
|
75207
76016
|
}
|
|
75208
|
-
if (
|
|
76017
|
+
if (pending3.scope === "all") {
|
|
75209
76018
|
return 0;
|
|
75210
76019
|
}
|
|
75211
|
-
const created = Math.max(0, count - (
|
|
75212
|
-
return (
|
|
76020
|
+
const created = Math.max(0, count - (pending3.count - 1));
|
|
76021
|
+
return (pending3.index + created) % count;
|
|
75213
76022
|
}
|
|
75214
76023
|
function reduceFindReplaceSession(session, event) {
|
|
75215
76024
|
switch (event.type) {
|
|
@@ -75245,15 +76054,15 @@ function reduceFindReplaceSession(session, event) {
|
|
|
75245
76054
|
}
|
|
75246
76055
|
};
|
|
75247
76056
|
case "slidesChanged": {
|
|
75248
|
-
const
|
|
75249
|
-
if (!
|
|
76057
|
+
const pending3 = session.pendingRefind;
|
|
76058
|
+
if (!pending3 || event.slides === pending3.base) {
|
|
75250
76059
|
return session;
|
|
75251
76060
|
}
|
|
75252
76061
|
const matches = search(event.slides, session);
|
|
75253
76062
|
return {
|
|
75254
76063
|
...session,
|
|
75255
76064
|
matches,
|
|
75256
|
-
current: cursorAfterReplace(
|
|
76065
|
+
current: cursorAfterReplace(pending3, matches.length),
|
|
75257
76066
|
pendingRefind: null
|
|
75258
76067
|
};
|
|
75259
76068
|
}
|
|
@@ -78870,13 +79679,13 @@ function chartSpaceFormatSource(space, options = {}) {
|
|
|
78870
79679
|
labelOptions: labels
|
|
78871
79680
|
};
|
|
78872
79681
|
}
|
|
78873
|
-
var chartFormatLocale = (value) => i18n.normalizeLocale(value,
|
|
79682
|
+
var chartFormatLocale = (value) => i18n.normalizeLocale(value, chunkCRV7G4GC_cjs.CHART_FORMAT_LOCALES, "en");
|
|
78874
79683
|
function chartFormatTranslator(locale, override) {
|
|
78875
|
-
const strings =
|
|
79684
|
+
const strings = chunkCRV7G4GC_cjs.CHART_FORMAT_STRINGS[chartFormatLocale(locale)];
|
|
78876
79685
|
return (key, params, fallback) => {
|
|
78877
79686
|
const own = override?.(key, params, fallback);
|
|
78878
79687
|
if (own && own !== key) return own;
|
|
78879
|
-
return strings[key] ??
|
|
79688
|
+
return strings[key] ?? chunkCRV7G4GC_cjs.CHART_FORMAT_STRINGS.en[key] ?? key;
|
|
78880
79689
|
};
|
|
78881
79690
|
}
|
|
78882
79691
|
|
|
@@ -83971,7 +84780,7 @@ function definePptxInsertSmartArtDialog(registry2) {
|
|
|
83971
84780
|
if (this.#live || this.#draw) {
|
|
83972
84781
|
return;
|
|
83973
84782
|
}
|
|
83974
|
-
this.#live = import('./smartart-insert-preview-
|
|
84783
|
+
this.#live = import('./smartart-insert-preview-QWROEVZL.cjs').then((module) => {
|
|
83975
84784
|
if (this.#draw || !this.#picker) {
|
|
83976
84785
|
return;
|
|
83977
84786
|
}
|
|
@@ -86903,21 +87712,21 @@ ${text4(UNSUPPORTED)}` } : {}
|
|
|
86903
87712
|
return;
|
|
86904
87713
|
}
|
|
86905
87714
|
const columns = [];
|
|
86906
|
-
let
|
|
87715
|
+
let pending3 = [];
|
|
86907
87716
|
const flush = () => {
|
|
86908
|
-
for (let start = 0; start <
|
|
86909
|
-
columns.push(stack(...
|
|
87717
|
+
for (let start = 0; start < pending3.length; start += 3) {
|
|
87718
|
+
columns.push(stack(...pending3.slice(start, start + 3)));
|
|
86910
87719
|
}
|
|
86911
|
-
|
|
87720
|
+
pending3 = [];
|
|
86912
87721
|
};
|
|
86913
87722
|
for (const item4 of items) {
|
|
86914
87723
|
if (item4 === freeformStack) {
|
|
86915
87724
|
flush();
|
|
86916
87725
|
columns.push(item4);
|
|
86917
87726
|
} else if (stackKids.has(item4)) {
|
|
86918
|
-
|
|
87727
|
+
pending3.push(...stackKids.get(item4).filter((kid) => !kid.hidden));
|
|
86919
87728
|
} else if (!item4.hidden) {
|
|
86920
|
-
|
|
87729
|
+
pending3.push(item4);
|
|
86921
87730
|
}
|
|
86922
87731
|
}
|
|
86923
87732
|
flush();
|
|
@@ -88823,9 +89632,9 @@ function officeTitleBarState(state, placement) {
|
|
|
88823
89632
|
const available = state.autosave.toggleAvailable !== false;
|
|
88824
89633
|
const items = resolveTitleBarStrip(state, placement).map((item4) => {
|
|
88825
89634
|
const label2 = t2(item4.id === "save" ? "pptx.titleBar.save" : item4.labelKey);
|
|
88826
|
-
const
|
|
88827
|
-
const tooltip =
|
|
88828
|
-
action:
|
|
89635
|
+
const pending3 = item4.id === "undo" ? state.history.undoLabel : item4.id === "redo" ? state.history.redoLabel : null;
|
|
89636
|
+
const tooltip = pending3 ? t2(item4.id === "undo" ? "pptx.toolbar.undoAction" : "pptx.toolbar.redoAction", {
|
|
89637
|
+
action: pending3
|
|
88829
89638
|
}) : label2;
|
|
88830
89639
|
return {
|
|
88831
89640
|
id: item4.id,
|
|
@@ -89524,7 +90333,7 @@ function applyChart3DDrag(bridge, detail) {
|
|
|
89524
90333
|
return;
|
|
89525
90334
|
}
|
|
89526
90335
|
bridge.commitChartData(
|
|
89527
|
-
|
|
90336
|
+
chunkHIRBPTML_cjs.withChartPointValue(bridge.chartData, part.seriesIndex, part.pointIndex, value)
|
|
89528
90337
|
);
|
|
89529
90338
|
}
|
|
89530
90339
|
function detailOf(event) {
|
|
@@ -90027,7 +90836,7 @@ function calculateNotesPageLayout(slideWidth, slideHeight) {
|
|
|
90027
90836
|
};
|
|
90028
90837
|
}
|
|
90029
90838
|
function wrapNotesText(text4, maxWidth, fontSize) {
|
|
90030
|
-
return
|
|
90839
|
+
return chunkKJICUZXM_cjs.wrapTextByEstimatedWidth(text4, maxWidth, fontSize, { keepBlankLines: true });
|
|
90031
90840
|
}
|
|
90032
90841
|
function calculateContinuationPageMaxLines() {
|
|
90033
90842
|
const contentHeight = NOTES_PAGE_H - 2 * NOTES_MARGIN;
|
|
@@ -91588,6 +92397,174 @@ Object.defineProperty(exports, "parseHex", {
|
|
|
91588
92397
|
enumerable: true,
|
|
91589
92398
|
get: function () { return color.parseHex; }
|
|
91590
92399
|
});
|
|
92400
|
+
Object.defineProperty(exports, "CANVAS_SENTINEL", {
|
|
92401
|
+
enumerable: true,
|
|
92402
|
+
get: function () { return geometry.CANVAS_SENTINEL; }
|
|
92403
|
+
});
|
|
92404
|
+
Object.defineProperty(exports, "PADDING_DEFAULT", {
|
|
92405
|
+
enumerable: true,
|
|
92406
|
+
get: function () { return geometry.PADDING_DEFAULT; }
|
|
92407
|
+
});
|
|
92408
|
+
Object.defineProperty(exports, "RESIZE_HANDLES", {
|
|
92409
|
+
enumerable: true,
|
|
92410
|
+
get: function () { return geometry.RESIZE_HANDLES; }
|
|
92411
|
+
});
|
|
92412
|
+
Object.defineProperty(exports, "RESIZE_HANDLE_GEOMETRY", {
|
|
92413
|
+
enumerable: true,
|
|
92414
|
+
get: function () { return geometry.RESIZE_HANDLE_GEOMETRY; }
|
|
92415
|
+
});
|
|
92416
|
+
Object.defineProperty(exports, "ROTATE_STEM_PX", {
|
|
92417
|
+
enumerable: true,
|
|
92418
|
+
get: function () { return geometry.ROTATE_STEM_PX; }
|
|
92419
|
+
});
|
|
92420
|
+
Object.defineProperty(exports, "ROUTING_PADDING_DEFAULT", {
|
|
92421
|
+
enumerable: true,
|
|
92422
|
+
get: function () { return geometry.ROUTING_PADDING_DEFAULT; }
|
|
92423
|
+
});
|
|
92424
|
+
Object.defineProperty(exports, "SNAP_THRESHOLD", {
|
|
92425
|
+
enumerable: true,
|
|
92426
|
+
get: function () { return geometry.SNAP_THRESHOLD; }
|
|
92427
|
+
});
|
|
92428
|
+
Object.defineProperty(exports, "aStarOrthogonal", {
|
|
92429
|
+
enumerable: true,
|
|
92430
|
+
get: function () { return geometry.aStarOrthogonal; }
|
|
92431
|
+
});
|
|
92432
|
+
Object.defineProperty(exports, "alignElements", {
|
|
92433
|
+
enumerable: true,
|
|
92434
|
+
get: function () { return geometry.alignElements; }
|
|
92435
|
+
});
|
|
92436
|
+
Object.defineProperty(exports, "applyDragDelta", {
|
|
92437
|
+
enumerable: true,
|
|
92438
|
+
get: function () { return geometry.applyDragDelta; }
|
|
92439
|
+
});
|
|
92440
|
+
Object.defineProperty(exports, "applyResize", {
|
|
92441
|
+
enumerable: true,
|
|
92442
|
+
get: function () { return geometry.applyResize; }
|
|
92443
|
+
});
|
|
92444
|
+
Object.defineProperty(exports, "boxCenter", {
|
|
92445
|
+
enumerable: true,
|
|
92446
|
+
get: function () { return geometry.boxCenter; }
|
|
92447
|
+
});
|
|
92448
|
+
Object.defineProperty(exports, "buildGraphNodes", {
|
|
92449
|
+
enumerable: true,
|
|
92450
|
+
get: function () { return geometry.buildGraphNodes; }
|
|
92451
|
+
});
|
|
92452
|
+
Object.defineProperty(exports, "computeAlign", {
|
|
92453
|
+
enumerable: true,
|
|
92454
|
+
get: function () { return geometry.computeAlign; }
|
|
92455
|
+
});
|
|
92456
|
+
Object.defineProperty(exports, "computeDistribute", {
|
|
92457
|
+
enumerable: true,
|
|
92458
|
+
get: function () { return geometry.computeDistribute; }
|
|
92459
|
+
});
|
|
92460
|
+
Object.defineProperty(exports, "computeRotation", {
|
|
92461
|
+
enumerable: true,
|
|
92462
|
+
get: function () { return geometry.computeRotation; }
|
|
92463
|
+
});
|
|
92464
|
+
Object.defineProperty(exports, "computeSnap", {
|
|
92465
|
+
enumerable: true,
|
|
92466
|
+
get: function () { return geometry.computeSnap; }
|
|
92467
|
+
});
|
|
92468
|
+
Object.defineProperty(exports, "computeSnapToShape", {
|
|
92469
|
+
enumerable: true,
|
|
92470
|
+
get: function () { return geometry.computeSnapToShape; }
|
|
92471
|
+
});
|
|
92472
|
+
Object.defineProperty(exports, "createRotationDrag", {
|
|
92473
|
+
enumerable: true,
|
|
92474
|
+
get: function () { return geometry.createRotationDrag; }
|
|
92475
|
+
});
|
|
92476
|
+
Object.defineProperty(exports, "cropUpdateFromRects", {
|
|
92477
|
+
enumerable: true,
|
|
92478
|
+
get: function () { return geometry.cropUpdateFromRects; }
|
|
92479
|
+
});
|
|
92480
|
+
Object.defineProperty(exports, "directPathClear", {
|
|
92481
|
+
enumerable: true,
|
|
92482
|
+
get: function () { return geometry.directPathClear; }
|
|
92483
|
+
});
|
|
92484
|
+
Object.defineProperty(exports, "distributeElements", {
|
|
92485
|
+
enumerable: true,
|
|
92486
|
+
get: function () { return geometry.distributeElements; }
|
|
92487
|
+
});
|
|
92488
|
+
Object.defineProperty(exports, "heuristic", {
|
|
92489
|
+
enumerable: true,
|
|
92490
|
+
get: function () { return geometry.heuristic; }
|
|
92491
|
+
});
|
|
92492
|
+
Object.defineProperty(exports, "imageRectFromCrop", {
|
|
92493
|
+
enumerable: true,
|
|
92494
|
+
get: function () { return geometry.imageRectFromCrop; }
|
|
92495
|
+
});
|
|
92496
|
+
Object.defineProperty(exports, "inflateRect", {
|
|
92497
|
+
enumerable: true,
|
|
92498
|
+
get: function () { return geometry.inflateRect; }
|
|
92499
|
+
});
|
|
92500
|
+
Object.defineProperty(exports, "isCornerHandle", {
|
|
92501
|
+
enumerable: true,
|
|
92502
|
+
get: function () { return geometry.isCornerHandle; }
|
|
92503
|
+
});
|
|
92504
|
+
Object.defineProperty(exports, "lockResizeAspect", {
|
|
92505
|
+
enumerable: true,
|
|
92506
|
+
get: function () { return geometry.lockResizeAspect; }
|
|
92507
|
+
});
|
|
92508
|
+
Object.defineProperty(exports, "pointInRect", {
|
|
92509
|
+
enumerable: true,
|
|
92510
|
+
get: function () { return geometry.pointInRect; }
|
|
92511
|
+
});
|
|
92512
|
+
Object.defineProperty(exports, "pointKey", {
|
|
92513
|
+
enumerable: true,
|
|
92514
|
+
get: function () { return geometry.pointKey; }
|
|
92515
|
+
});
|
|
92516
|
+
Object.defineProperty(exports, "resolveAlignReferenceBox", {
|
|
92517
|
+
enumerable: true,
|
|
92518
|
+
get: function () { return geometry.resolveAlignReferenceBox; }
|
|
92519
|
+
});
|
|
92520
|
+
Object.defineProperty(exports, "rotateDelta", {
|
|
92521
|
+
enumerable: true,
|
|
92522
|
+
get: function () { return geometry.rotateDelta; }
|
|
92523
|
+
});
|
|
92524
|
+
Object.defineProperty(exports, "routeConnector", {
|
|
92525
|
+
enumerable: true,
|
|
92526
|
+
get: function () { return geometry.routeConnector; }
|
|
92527
|
+
});
|
|
92528
|
+
Object.defineProperty(exports, "routeOrthogonalConnector", {
|
|
92529
|
+
enumerable: true,
|
|
92530
|
+
get: function () { return geometry.routeOrthogonalConnector; }
|
|
92531
|
+
});
|
|
92532
|
+
Object.defineProperty(exports, "segmentIntersectsRect", {
|
|
92533
|
+
enumerable: true,
|
|
92534
|
+
get: function () { return geometry.segmentIntersectsRect; }
|
|
92535
|
+
});
|
|
92536
|
+
Object.defineProperty(exports, "simplifyPath", {
|
|
92537
|
+
enumerable: true,
|
|
92538
|
+
get: function () { return geometry.simplifyPath; }
|
|
92539
|
+
});
|
|
92540
|
+
Object.defineProperty(exports, "snapAngle", {
|
|
92541
|
+
enumerable: true,
|
|
92542
|
+
get: function () { return geometry.snapAngle; }
|
|
92543
|
+
});
|
|
92544
|
+
Object.defineProperty(exports, "snapBox", {
|
|
92545
|
+
enumerable: true,
|
|
92546
|
+
get: function () { return geometry.snapBox; }
|
|
92547
|
+
});
|
|
92548
|
+
Object.defineProperty(exports, "snapToGridStep", {
|
|
92549
|
+
enumerable: true,
|
|
92550
|
+
get: function () { return geometry.snapToGridStep; }
|
|
92551
|
+
});
|
|
92552
|
+
Object.defineProperty(exports, "snapValue", {
|
|
92553
|
+
enumerable: true,
|
|
92554
|
+
get: function () { return geometry.snapValue; }
|
|
92555
|
+
});
|
|
92556
|
+
Object.defineProperty(exports, "usesSlideReference", {
|
|
92557
|
+
enumerable: true,
|
|
92558
|
+
get: function () { return geometry.usesSlideReference; }
|
|
92559
|
+
});
|
|
92560
|
+
Object.defineProperty(exports, "waypointsToPathD", {
|
|
92561
|
+
enumerable: true,
|
|
92562
|
+
get: function () { return geometry.waypointsToPathD; }
|
|
92563
|
+
});
|
|
92564
|
+
Object.defineProperty(exports, "waypointsToPathData", {
|
|
92565
|
+
enumerable: true,
|
|
92566
|
+
get: function () { return geometry.waypointsToPathData; }
|
|
92567
|
+
});
|
|
91591
92568
|
Object.defineProperty(exports, "buildLeaderString", {
|
|
91592
92569
|
enumerable: true,
|
|
91593
92570
|
get: function () { return text$1.buildLeaderString; }
|
|
@@ -91620,6 +92597,14 @@ Object.defineProperty(exports, "segmentByScript", {
|
|
|
91620
92597
|
enumerable: true,
|
|
91621
92598
|
get: function () { return text$1.segmentByScript; }
|
|
91622
92599
|
});
|
|
92600
|
+
Object.defineProperty(exports, "buildImageBiLevelTable", {
|
|
92601
|
+
enumerable: true,
|
|
92602
|
+
get: function () { return drawingml.buildImageBiLevelTable; }
|
|
92603
|
+
});
|
|
92604
|
+
Object.defineProperty(exports, "buildImageLuminanceTransfer", {
|
|
92605
|
+
enumerable: true,
|
|
92606
|
+
get: function () { return drawingml.buildImageLuminanceTransfer; }
|
|
92607
|
+
});
|
|
91623
92608
|
Object.defineProperty(exports, "isParagraphSeparatorSegment", {
|
|
91624
92609
|
enumerable: true,
|
|
91625
92610
|
get: function () { return textSegmentParagraphBreak.isParagraphSeparatorSegment; }
|
|
@@ -91880,174 +92865,6 @@ Object.defineProperty(exports, "cloneXmlObject", {
|
|
|
91880
92865
|
enumerable: true,
|
|
91881
92866
|
get: function () { return clone.cloneXmlObject; }
|
|
91882
92867
|
});
|
|
91883
|
-
Object.defineProperty(exports, "CANVAS_SENTINEL", {
|
|
91884
|
-
enumerable: true,
|
|
91885
|
-
get: function () { return geometry.CANVAS_SENTINEL; }
|
|
91886
|
-
});
|
|
91887
|
-
Object.defineProperty(exports, "PADDING_DEFAULT", {
|
|
91888
|
-
enumerable: true,
|
|
91889
|
-
get: function () { return geometry.PADDING_DEFAULT; }
|
|
91890
|
-
});
|
|
91891
|
-
Object.defineProperty(exports, "RESIZE_HANDLES", {
|
|
91892
|
-
enumerable: true,
|
|
91893
|
-
get: function () { return geometry.RESIZE_HANDLES; }
|
|
91894
|
-
});
|
|
91895
|
-
Object.defineProperty(exports, "RESIZE_HANDLE_GEOMETRY", {
|
|
91896
|
-
enumerable: true,
|
|
91897
|
-
get: function () { return geometry.RESIZE_HANDLE_GEOMETRY; }
|
|
91898
|
-
});
|
|
91899
|
-
Object.defineProperty(exports, "ROTATE_STEM_PX", {
|
|
91900
|
-
enumerable: true,
|
|
91901
|
-
get: function () { return geometry.ROTATE_STEM_PX; }
|
|
91902
|
-
});
|
|
91903
|
-
Object.defineProperty(exports, "ROUTING_PADDING_DEFAULT", {
|
|
91904
|
-
enumerable: true,
|
|
91905
|
-
get: function () { return geometry.ROUTING_PADDING_DEFAULT; }
|
|
91906
|
-
});
|
|
91907
|
-
Object.defineProperty(exports, "SNAP_THRESHOLD", {
|
|
91908
|
-
enumerable: true,
|
|
91909
|
-
get: function () { return geometry.SNAP_THRESHOLD; }
|
|
91910
|
-
});
|
|
91911
|
-
Object.defineProperty(exports, "aStarOrthogonal", {
|
|
91912
|
-
enumerable: true,
|
|
91913
|
-
get: function () { return geometry.aStarOrthogonal; }
|
|
91914
|
-
});
|
|
91915
|
-
Object.defineProperty(exports, "alignElements", {
|
|
91916
|
-
enumerable: true,
|
|
91917
|
-
get: function () { return geometry.alignElements; }
|
|
91918
|
-
});
|
|
91919
|
-
Object.defineProperty(exports, "applyDragDelta", {
|
|
91920
|
-
enumerable: true,
|
|
91921
|
-
get: function () { return geometry.applyDragDelta; }
|
|
91922
|
-
});
|
|
91923
|
-
Object.defineProperty(exports, "applyResize", {
|
|
91924
|
-
enumerable: true,
|
|
91925
|
-
get: function () { return geometry.applyResize; }
|
|
91926
|
-
});
|
|
91927
|
-
Object.defineProperty(exports, "boxCenter", {
|
|
91928
|
-
enumerable: true,
|
|
91929
|
-
get: function () { return geometry.boxCenter; }
|
|
91930
|
-
});
|
|
91931
|
-
Object.defineProperty(exports, "buildGraphNodes", {
|
|
91932
|
-
enumerable: true,
|
|
91933
|
-
get: function () { return geometry.buildGraphNodes; }
|
|
91934
|
-
});
|
|
91935
|
-
Object.defineProperty(exports, "computeAlign", {
|
|
91936
|
-
enumerable: true,
|
|
91937
|
-
get: function () { return geometry.computeAlign; }
|
|
91938
|
-
});
|
|
91939
|
-
Object.defineProperty(exports, "computeDistribute", {
|
|
91940
|
-
enumerable: true,
|
|
91941
|
-
get: function () { return geometry.computeDistribute; }
|
|
91942
|
-
});
|
|
91943
|
-
Object.defineProperty(exports, "computeRotation", {
|
|
91944
|
-
enumerable: true,
|
|
91945
|
-
get: function () { return geometry.computeRotation; }
|
|
91946
|
-
});
|
|
91947
|
-
Object.defineProperty(exports, "computeSnap", {
|
|
91948
|
-
enumerable: true,
|
|
91949
|
-
get: function () { return geometry.computeSnap; }
|
|
91950
|
-
});
|
|
91951
|
-
Object.defineProperty(exports, "computeSnapToShape", {
|
|
91952
|
-
enumerable: true,
|
|
91953
|
-
get: function () { return geometry.computeSnapToShape; }
|
|
91954
|
-
});
|
|
91955
|
-
Object.defineProperty(exports, "createRotationDrag", {
|
|
91956
|
-
enumerable: true,
|
|
91957
|
-
get: function () { return geometry.createRotationDrag; }
|
|
91958
|
-
});
|
|
91959
|
-
Object.defineProperty(exports, "cropUpdateFromRects", {
|
|
91960
|
-
enumerable: true,
|
|
91961
|
-
get: function () { return geometry.cropUpdateFromRects; }
|
|
91962
|
-
});
|
|
91963
|
-
Object.defineProperty(exports, "directPathClear", {
|
|
91964
|
-
enumerable: true,
|
|
91965
|
-
get: function () { return geometry.directPathClear; }
|
|
91966
|
-
});
|
|
91967
|
-
Object.defineProperty(exports, "distributeElements", {
|
|
91968
|
-
enumerable: true,
|
|
91969
|
-
get: function () { return geometry.distributeElements; }
|
|
91970
|
-
});
|
|
91971
|
-
Object.defineProperty(exports, "heuristic", {
|
|
91972
|
-
enumerable: true,
|
|
91973
|
-
get: function () { return geometry.heuristic; }
|
|
91974
|
-
});
|
|
91975
|
-
Object.defineProperty(exports, "imageRectFromCrop", {
|
|
91976
|
-
enumerable: true,
|
|
91977
|
-
get: function () { return geometry.imageRectFromCrop; }
|
|
91978
|
-
});
|
|
91979
|
-
Object.defineProperty(exports, "inflateRect", {
|
|
91980
|
-
enumerable: true,
|
|
91981
|
-
get: function () { return geometry.inflateRect; }
|
|
91982
|
-
});
|
|
91983
|
-
Object.defineProperty(exports, "isCornerHandle", {
|
|
91984
|
-
enumerable: true,
|
|
91985
|
-
get: function () { return geometry.isCornerHandle; }
|
|
91986
|
-
});
|
|
91987
|
-
Object.defineProperty(exports, "lockResizeAspect", {
|
|
91988
|
-
enumerable: true,
|
|
91989
|
-
get: function () { return geometry.lockResizeAspect; }
|
|
91990
|
-
});
|
|
91991
|
-
Object.defineProperty(exports, "pointInRect", {
|
|
91992
|
-
enumerable: true,
|
|
91993
|
-
get: function () { return geometry.pointInRect; }
|
|
91994
|
-
});
|
|
91995
|
-
Object.defineProperty(exports, "pointKey", {
|
|
91996
|
-
enumerable: true,
|
|
91997
|
-
get: function () { return geometry.pointKey; }
|
|
91998
|
-
});
|
|
91999
|
-
Object.defineProperty(exports, "resolveAlignReferenceBox", {
|
|
92000
|
-
enumerable: true,
|
|
92001
|
-
get: function () { return geometry.resolveAlignReferenceBox; }
|
|
92002
|
-
});
|
|
92003
|
-
Object.defineProperty(exports, "rotateDelta", {
|
|
92004
|
-
enumerable: true,
|
|
92005
|
-
get: function () { return geometry.rotateDelta; }
|
|
92006
|
-
});
|
|
92007
|
-
Object.defineProperty(exports, "routeConnector", {
|
|
92008
|
-
enumerable: true,
|
|
92009
|
-
get: function () { return geometry.routeConnector; }
|
|
92010
|
-
});
|
|
92011
|
-
Object.defineProperty(exports, "routeOrthogonalConnector", {
|
|
92012
|
-
enumerable: true,
|
|
92013
|
-
get: function () { return geometry.routeOrthogonalConnector; }
|
|
92014
|
-
});
|
|
92015
|
-
Object.defineProperty(exports, "segmentIntersectsRect", {
|
|
92016
|
-
enumerable: true,
|
|
92017
|
-
get: function () { return geometry.segmentIntersectsRect; }
|
|
92018
|
-
});
|
|
92019
|
-
Object.defineProperty(exports, "simplifyPath", {
|
|
92020
|
-
enumerable: true,
|
|
92021
|
-
get: function () { return geometry.simplifyPath; }
|
|
92022
|
-
});
|
|
92023
|
-
Object.defineProperty(exports, "snapAngle", {
|
|
92024
|
-
enumerable: true,
|
|
92025
|
-
get: function () { return geometry.snapAngle; }
|
|
92026
|
-
});
|
|
92027
|
-
Object.defineProperty(exports, "snapBox", {
|
|
92028
|
-
enumerable: true,
|
|
92029
|
-
get: function () { return geometry.snapBox; }
|
|
92030
|
-
});
|
|
92031
|
-
Object.defineProperty(exports, "snapToGridStep", {
|
|
92032
|
-
enumerable: true,
|
|
92033
|
-
get: function () { return geometry.snapToGridStep; }
|
|
92034
|
-
});
|
|
92035
|
-
Object.defineProperty(exports, "snapValue", {
|
|
92036
|
-
enumerable: true,
|
|
92037
|
-
get: function () { return geometry.snapValue; }
|
|
92038
|
-
});
|
|
92039
|
-
Object.defineProperty(exports, "usesSlideReference", {
|
|
92040
|
-
enumerable: true,
|
|
92041
|
-
get: function () { return geometry.usesSlideReference; }
|
|
92042
|
-
});
|
|
92043
|
-
Object.defineProperty(exports, "waypointsToPathD", {
|
|
92044
|
-
enumerable: true,
|
|
92045
|
-
get: function () { return geometry.waypointsToPathD; }
|
|
92046
|
-
});
|
|
92047
|
-
Object.defineProperty(exports, "waypointsToPathData", {
|
|
92048
|
-
enumerable: true,
|
|
92049
|
-
get: function () { return geometry.waypointsToPathData; }
|
|
92050
|
-
});
|
|
92051
92868
|
Object.defineProperty(exports, "groupElements", {
|
|
92052
92869
|
enumerable: true,
|
|
92053
92870
|
get: function () { return groupOps.groupElements; }
|
|
@@ -93601,9 +94418,7 @@ exports.buildHyperlinkPatch = buildHyperlinkPatch;
|
|
|
93601
94418
|
exports.buildIdatChunk = buildIdatChunk;
|
|
93602
94419
|
exports.buildIendChunk = buildIendChunk;
|
|
93603
94420
|
exports.buildIhdrChunk = buildIhdrChunk;
|
|
93604
|
-
exports.buildImageBiLevelTable = buildImageBiLevelTable;
|
|
93605
94421
|
exports.buildImageFitTransform = buildImageFitTransform;
|
|
93606
|
-
exports.buildImageLuminanceTransfer = buildImageLuminanceTransfer;
|
|
93607
94422
|
exports.buildInkGroupStrokes = buildInkGroupStrokes;
|
|
93608
94423
|
exports.buildInlineListStylePatch = buildInlineListStylePatch;
|
|
93609
94424
|
exports.buildInlineStyleText = buildInlineStyleText;
|
|
@@ -93926,7 +94741,8 @@ exports.createCollaborationHistory = createCollaborationHistory;
|
|
|
93926
94741
|
exports.createCollaborationLivePatcher = createCollaborationLivePatcher;
|
|
93927
94742
|
exports.createCollaborationSessionController = createCollaborationSessionController;
|
|
93928
94743
|
exports.createCollaborationStateReporter = createCollaborationStateReporter;
|
|
93929
|
-
exports.createCustomShow =
|
|
94744
|
+
exports.createCustomShow = createCustomShow2;
|
|
94745
|
+
exports.createCustomShowsController = createCustomShowsController;
|
|
93930
94746
|
exports.createCustomizationController = createCustomizationController;
|
|
93931
94747
|
exports.createDeckStyleHost = createDeckStyleHost;
|
|
93932
94748
|
exports.createDefaultChartElement = createDefaultChartElement;
|
|
@@ -94915,6 +95731,7 @@ exports.reflectionStyle = reflectionStyle;
|
|
|
94915
95731
|
exports.reflowRibbon = reflowRibbon;
|
|
94916
95732
|
exports.reflowSmartArtData = reflowSmartArtData;
|
|
94917
95733
|
exports.reflowToDrawingShapes = reflowToDrawingShapes;
|
|
95734
|
+
exports.refreshSmartArtPictureImage = refreshSmartArtPictureImage;
|
|
94918
95735
|
exports.regionArea = regionArea;
|
|
94919
95736
|
exports.registerCollaborationTeardown = registerCollaborationTeardown;
|
|
94920
95737
|
exports.registerCrossSlideAudio = registerCrossSlideAudio;
|