pptx-react-viewer 4.75.0 → 4.77.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.
Files changed (123) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/{AiChatPanel-6ML3VLIX.mjs → AiChatPanel-7BPX44IR.mjs} +1 -1
  3. package/dist/AiChatPanel-7BPX44IR.mjs.br +0 -0
  4. package/dist/AiChatPanel-7BPX44IR.mjs.gz +0 -0
  5. package/dist/{AiChatPanel-4V7QB5Z3.js → AiChatPanel-YJ5R7PPW.js} +19 -19
  6. package/dist/AiChatPanel-YJ5R7PPW.js.br +0 -0
  7. package/dist/AiChatPanel-YJ5R7PPW.js.gz +0 -0
  8. package/dist/ai.js +2 -2
  9. package/dist/ai.js.br +2 -3
  10. package/dist/ai.js.gz +0 -0
  11. package/dist/ai.mjs +1 -1
  12. package/dist/ai.mjs.br +0 -0
  13. package/dist/ai.mjs.gz +0 -0
  14. package/dist/{chunk-P2IEKYVG.js → chunk-3T5NEBOR.js} +2 -2
  15. package/dist/chunk-3T5NEBOR.js.br +0 -0
  16. package/dist/chunk-3T5NEBOR.js.gz +0 -0
  17. package/dist/{chunk-3AZ6ESJU.js → chunk-5CJHRYFK.js} +1666 -1249
  18. package/dist/chunk-5CJHRYFK.js.br +0 -0
  19. package/dist/chunk-5CJHRYFK.js.gz +0 -0
  20. package/dist/{chunk-6GFSF2ML.js → chunk-AIA7CY5U.js} +4 -29
  21. package/dist/chunk-AIA7CY5U.js.br +0 -0
  22. package/dist/chunk-AIA7CY5U.js.gz +0 -0
  23. package/dist/{chunk-AZLOOFU2.mjs → chunk-I5WQFYAK.mjs} +680 -273
  24. package/dist/chunk-I5WQFYAK.mjs.br +0 -0
  25. package/dist/chunk-I5WQFYAK.mjs.gz +0 -0
  26. package/dist/{chunk-RMEWSJZU.mjs → chunk-J4NOGC3R.mjs} +1 -1
  27. package/dist/chunk-J4NOGC3R.mjs.br +0 -0
  28. package/dist/chunk-J4NOGC3R.mjs.gz +0 -0
  29. package/dist/{chunk-Y53EC3JU.mjs → chunk-JB37G6GW.mjs} +1 -1
  30. package/dist/chunk-JB37G6GW.mjs.br +0 -0
  31. package/dist/chunk-JB37G6GW.mjs.gz +0 -0
  32. package/dist/{chunk-DE4Y5F4T.mjs → chunk-MMBLGDHD.mjs} +556 -375
  33. package/dist/chunk-MMBLGDHD.mjs.br +0 -0
  34. package/dist/chunk-MMBLGDHD.mjs.gz +0 -0
  35. package/dist/{chunk-N3YK2BCA.mjs → chunk-N6BJW23K.mjs} +5 -30
  36. package/dist/chunk-N6BJW23K.mjs.br +0 -0
  37. package/dist/chunk-N6BJW23K.mjs.gz +0 -0
  38. package/dist/{chunk-RJRDE3C2.js → chunk-USEEERPE.js} +1107 -926
  39. package/dist/chunk-USEEERPE.js.br +0 -0
  40. package/dist/chunk-USEEERPE.js.gz +0 -0
  41. package/dist/{chunk-MU3BIZ2U.js → chunk-VCNDY7HS.js} +1 -1
  42. package/dist/chunk-VCNDY7HS.js.br +0 -0
  43. package/dist/chunk-VCNDY7HS.js.gz +0 -0
  44. package/dist/i18n/de.cjs +5 -0
  45. package/dist/i18n/de.cjs.br +0 -0
  46. package/dist/i18n/de.cjs.gz +0 -0
  47. package/dist/i18n/de.mjs +5 -0
  48. package/dist/i18n/de.mjs.br +0 -0
  49. package/dist/i18n/de.mjs.gz +0 -0
  50. package/dist/i18n/es.cjs +5 -0
  51. package/dist/i18n/es.cjs.br +0 -0
  52. package/dist/i18n/es.cjs.gz +0 -0
  53. package/dist/i18n/es.mjs +5 -0
  54. package/dist/i18n/es.mjs.br +0 -0
  55. package/dist/i18n/es.mjs.gz +0 -0
  56. package/dist/i18n/fr.cjs +5 -0
  57. package/dist/i18n/fr.cjs.br +0 -0
  58. package/dist/i18n/fr.cjs.gz +0 -0
  59. package/dist/i18n/fr.mjs +5 -0
  60. package/dist/i18n/fr.mjs.br +0 -0
  61. package/dist/i18n/fr.mjs.gz +0 -0
  62. package/dist/i18n/zh-CN.cjs +5 -0
  63. package/dist/i18n/zh-CN.cjs.br +0 -0
  64. package/dist/i18n/zh-CN.cjs.gz +0 -0
  65. package/dist/i18n/zh-CN.mjs +5 -0
  66. package/dist/i18n/zh-CN.mjs.br +0 -0
  67. package/dist/i18n/zh-CN.mjs.gz +0 -0
  68. package/dist/index.d.ts +59 -8
  69. package/dist/index.js +29 -29
  70. package/dist/index.js.br +0 -0
  71. package/dist/index.js.gz +0 -0
  72. package/dist/index.mjs +5 -5
  73. package/dist/index.mjs.br +0 -0
  74. package/dist/index.mjs.gz +0 -0
  75. package/dist/internals.d.ts +51 -24
  76. package/dist/internals.js +82 -82
  77. package/dist/internals.js.br +0 -0
  78. package/dist/internals.js.gz +0 -0
  79. package/dist/internals.mjs +3 -3
  80. package/dist/internals.mjs.br +0 -0
  81. package/dist/internals.mjs.gz +0 -0
  82. package/dist/no-i18next.d.ts +59 -8
  83. package/dist/no-i18next.js +28 -28
  84. package/dist/no-i18next.js.br +0 -0
  85. package/dist/no-i18next.js.gz +0 -0
  86. package/dist/no-i18next.mjs +4 -4
  87. package/dist/no-i18next.mjs.br +0 -0
  88. package/dist/no-i18next.mjs.gz +0 -0
  89. package/dist/pptx-viewer.css +1 -1
  90. package/dist/pptx-viewer.css.br +0 -0
  91. package/dist/pptx-viewer.css.gz +0 -0
  92. package/dist/viewer/index.d.ts +20 -1
  93. package/dist/viewer/index.js +22 -22
  94. package/dist/viewer/index.js.br +0 -0
  95. package/dist/viewer/index.js.gz +0 -0
  96. package/dist/viewer/index.mjs +5 -5
  97. package/dist/viewer/index.mjs.br +5 -4
  98. package/dist/viewer/index.mjs.gz +0 -0
  99. package/package.json +3 -3
  100. package/dist/AiChatPanel-4V7QB5Z3.js.br +0 -0
  101. package/dist/AiChatPanel-4V7QB5Z3.js.gz +0 -0
  102. package/dist/AiChatPanel-6ML3VLIX.mjs.br +0 -0
  103. package/dist/AiChatPanel-6ML3VLIX.mjs.gz +0 -0
  104. package/dist/chunk-3AZ6ESJU.js.br +0 -0
  105. package/dist/chunk-3AZ6ESJU.js.gz +0 -0
  106. package/dist/chunk-6GFSF2ML.js.br +0 -0
  107. package/dist/chunk-6GFSF2ML.js.gz +0 -0
  108. package/dist/chunk-AZLOOFU2.mjs.br +0 -0
  109. package/dist/chunk-AZLOOFU2.mjs.gz +0 -0
  110. package/dist/chunk-DE4Y5F4T.mjs.br +0 -0
  111. package/dist/chunk-DE4Y5F4T.mjs.gz +0 -0
  112. package/dist/chunk-MU3BIZ2U.js.br +0 -0
  113. package/dist/chunk-MU3BIZ2U.js.gz +0 -0
  114. package/dist/chunk-N3YK2BCA.mjs.br +0 -0
  115. package/dist/chunk-N3YK2BCA.mjs.gz +0 -0
  116. package/dist/chunk-P2IEKYVG.js.br +0 -0
  117. package/dist/chunk-P2IEKYVG.js.gz +0 -0
  118. package/dist/chunk-RJRDE3C2.js.br +0 -0
  119. package/dist/chunk-RJRDE3C2.js.gz +0 -0
  120. package/dist/chunk-RMEWSJZU.mjs.br +0 -0
  121. package/dist/chunk-RMEWSJZU.mjs.gz +0 -0
  122. package/dist/chunk-Y53EC3JU.mjs.br +0 -0
  123. package/dist/chunk-Y53EC3JU.mjs.gz +0 -0
@@ -1,9 +1,9 @@
1
- import { aiAssistants, AiChatPanelLazy } from './chunk-RMEWSJZU.mjs';
2
- import { useCollaboration, useVirtualizedSlides, StaticElementRenderer, useModalDismissDrag, useToolbarVisibility, useViewerOptionsContext, InlineCollaborationContext, SlideBackgroundImageLayer, ElementRenderer, withDisplayName, ResizeHandles, imgSrc, renderStrokeView, useChartFormatContext, useController, useViewerOptions, useReadOnlyRecommendationState, useCompatibilityToastsState, useReducedMotion, useViewerState, useIsMobile, useResizablePanels, useDerivedSlideState, useZoomViewport, useEditorHistory, usePresentationSetup, useTouchGestures, useViewerDialogs, useClearSelectionOnSlideChange, useEditorOperations, useViewerIntegration, useViewPreferencesSync, useLayoutSwitching, Rendering3DFlagsContext, CollaborationProvider, ChartFormatContext, useSheetDismissDrag, playAnimationSound, ViewerOptionsStoreContext, scopeLayoutOptionsToActiveSlide, createReviewCommentsHost, ChartPartSelectionProvider, useKeyboardInsets, ViewerOptionsContext, useReportOnChange, useCollaborationDocumentSync, useFollowMode, useBroadcastFollower, useSwipeNavigation, RemoteSelectionOverlay, CollaborationCursorOverlay, detectTargetType, parseEmailUrl, parseSlideFromUrl, ACTION_VERB_MAP, PresentationTransitionOverlay, downloadBlob, useChartPartSelection, resolveSmartArtDataPalette, DUOTONE_PRESETS, getSlideTransitionAnimations, SLIDE_TRANSITION_KEYFRAMES } from './chunk-AZLOOFU2.mjs';
3
- import { useTranslation, DEFAULT_SECTION_GROUP_ID, cn, getShapeAdjustmentHandleDescriptors, isConnectorOrLineElement, SLIDE_NAV_THUMBNAIL_WIDTH, TOOLBAR_SECTIONS, GRID_SIZE, getElementTransformWithoutRotation, getElementTransform, MIN_ELEMENT_SIZE, UNGROUPED_SECTION_ID, registeredHostI18next, PptxI18nContext, ViewerLocaleControlsContext, hasCopyableFormat, ViewerI18nContext, useRegisteredHostI18next, hostInstanceLanguage, BUILT_IN_ENGLISH, isPpactionUrl, parsePpactionUrl, SHORTCUT_REFERENCE_ITEMS, safeOpenUrl, isUrlSafe, computeHandoutLayout, getPrintableArea, generateNoteLineCount, normalizeHexColor, getElementLabel, TABLE_STYLE_PRESETS, SHAPE_PRESETS, sanitizeGradientStops, SLIDE_TRANSITION_OPTIONS, formatCommentTimestamp, ANIMATION_PRESET_OPTIONS, clampCropValue, CONNECTOR_ARROW_OPTIONS, ARROW_SIZE_OPTIONS, DEFAULT_FILL_COLOR, startMotionPathPreview, startPreviewAnimation, stopPreviewAnimation, getPatternSvg, DEFAULT_STROKE_COLOR, openNativeEyeDropper } from './chunk-N3YK2BCA.mjs';
4
- import { ANIMATION_DIRECTION_LABEL_KEYS, buildQuickStylesGallery, editorThumbnailWidth, EDITOR_THUMBNAIL_WIDTH, buildSlideTemplateContent, SLIDE_TEMPLATES, homeLaunchers, attachRibbonOverflow, isPanelVisible, resolveStageEdgeBleeds, parentSelection, slideSpaceElement, isGroupMember, motionPathFor, setMotionPath, RULER_THICKNESS, shouldShowElementHandles, deviceStrokeStageStyle, slideThumbnailLayout, buildPreviewElements, deriveSlideFieldContext, slideThumbnailTransitionBadge, slideThumbnailTransitionBadgeStyle, editorThumbnailStep, resolveSlidePaneClick, SLIDE_VIRTUALIZATION_THRESHOLD, buildSectionContextMenuEntries, buildSlidePaneContextMenuEntries, slidePaneViewItems, activateModalFocus, visibleContextualTabs, resolveActiveRibbonTab, visibleRibbonAddIns, isDialogAvailable, resolveReadOnlyBadge, READ_ONLY_BADGE_ATTR, resolveScreenTip, RIBBON_ADD_IN_TAB_ATTR, contextualTabLabelKey, RIBBON_CONTEXTUAL_TAB_ATTR, buildTabRowActionsState, isFeatureEnabled, TAB_ROW_ACTION_CLASSES, tabRowActionsAttributes, buildTitleBarState, backstageNavEntries, BACKSTAGE_NAV, openPlacesLabels, listBackstageRecentFiles, BACKSTAGE_BACK_CLASSES, BACKSTAGE_NAV_CLASSES, CLOUD_OPEN_ACCEPT, DEFAULT_INSERT_CHART_KIND, FREEFORM_TOOL_IDS, isDrawingToolVisible, textFontSizePtToPx, withHomeGalleries, drawingHomeControls, homeGalleryControls, homeGalleryApply, shapeOutlineChange, shapeFillChange, editingHomeControls, arrangeHomeControls, arrangePainterHomeControls, arrangeAlignAction, DESIGN_RIBBON_GROUPS, FIXED_TAB_GALLERIES, DESIGN_RIBBON_COMMANDS, designCommandState, CONTEXTUAL_TAB_GROUPS, attachEditorImagePaste, authorConnectorBetweenSites, findEraserHitElementId, generateTicks, rulerDragToGuidePosition, resolveElementInteractivity, buildChartQuickActionsDescriptor, applyChartElementToggle, CHART_QUICK_ACTION_BUTTON_SIZE, applyChartStylePreset, hideChartSeries, restoreFilteredSeries, buildCropOverlay, CROP_HANDLE_ARIA_KEY, getActiveXControlOverlayView, buildCommentMarkers, COMMENT_MARKER_SIZE, collectConnectorSiteCandidates, getConnectorEndpointHandles, findConnectorSiteNear, motionPathToSvgD, motionPathEndPixel, isEditableMotionPath, setMotionPathEnd, canEditElementPoints, getSlideBackgroundStyle, sectionAddAfterSlideIndex, EMPTY_RESOLVED_CUSTOMIZATION, getRegionRenderer, formatBackstageDate, formatBackstageSize, ViewerRegionHost, BACKSTAGE_TEMPLATES, customizeBackstageCards, backstageCardsFor, connectedServicesLabels, DEFAULT_VIEWER_PROFILE, readStoredViewerPrefs, resolveProfileInitial, AVATAR_COLOR_SWATCHES, clipboardHomeControls, slidesHomeControls, resolveInsertSlideLayout, resolveDefaultFontFamily, textFontSizePxToPt, getInlineEditorSelectionResult, selectedParagraphBulletKind, elementBulletKind, selectionBulletKind, fontPickerHomeControls, fontHomeControls, nextToggleValue, RIBBON_GROUP_ATTR, paragraphHomeAlign, paragraphHomeControls, paragraphHomeAction, arrangeShapeHomeControls, strokeWidthOf, canSetStrokeWidth, canUngroupSelection, canGroupSelection, buildRibbonGallery, readRibbonTransitionDraft, SLIDE_SHOW_COMMAND_GROUPS, buildRecordRibbon, trackActiveComment, commentCounts, findCommentLocation, buildReviewRibbon, buildHelpRibbon, galleryTextLabel, pictureSizeHomeControls, chartSelectionHomeControls, dispatchChartSelectionRequest, buildFreeformShapeElement, buildLiveInkStrokeView, beginCropDrag, CONNECTOR_SITE_SNAP_PX, resolveConnectorEndpointUpdate, withConnectorEndpointUpdate, getShapeConnectionSites, FreeformToolSession, attachOverlayKeyboard, EditPointsSession, EDIT_POINTS_STYLE, createCloudDocumentController, resolveCloudDocumentView, createSaveProgressController, resolveCollaborationConfig, resolveViewerRootOptions, installSvgIdScope, buildUserFontFaceStyles, resolveThemeCatalogEntry, THEME_CATALOG, writeStoredViewerPrefs, openPptxFile, readBackstageRecentFile, isEditingAllowed, resolveAutosaveActivation, viewerOptionsToPreferences, applyPreferenceToOptions, resolveHistoryDepth, attachViewerHyperlinks, shouldConfirmExternalHyperlink, confirmExternalHyperlinkDialog, applyAutoCorrectToEdit, resolveImageResolutionScale, resolveEffectiveGoogleFonts, resolveAllowExternalContent, resolveAutosaveIntervalMs, resolveAutosaveIntervalSeconds, saveFailureMessage, withSaveFailureToast, createSlidePackageClipboard, shouldShowAutosaveRecoveryPrompt, resolveOptionRootClasses, RIBBON_SCOPE_ATTR, resolve3DRenderingFlags, resolveSlideSizeSelection, hiddenSlideCue, editorThumbnailHeight, HIDDEN_SLIDE_SLASH_GRADIENT, HIDDEN_SLIDE_LABEL_KEY, MIN_TOUCH_TARGET_PX, getLocalStorageUsageSummary, saveViewerProfile, confirmDeleteDialog, clearAllLocalViewerData, getSelectionTextStyleFlags, TEXT_DECORATION_FLAGS, dispatchCropRequest, applyRibbonGalleryItem, ribbonTransitionsDraftPatch, ribbonTransitionUpdates, ribbonTransitionsSoundChange, ribbonTransitionStockSoundUrl, playSlideTransitionPreview, playAnimationRibbonPreview, SLIDE_SHOW_OPTIONS, createViewerOptionsStore, subtitleSettingsFromOptions, subtitleSettingsLabels, isReviewCommentCommand, runReviewCommentCommand, hasTiltData, RULER_FONT_SIZE, toElementAxes, dragCropHandle, panCropImage, clientToSlidePoint, EDIT_POINTS_TARGET_ATTR, themeToCssVars, createCustomizationController, resolveEffectiveHiddenActions, pruneExpiredAutosaveSnapshots, createDeckStyleHost, galleryDeckView, tableLayoutCells, commitsThroughDeckStyle, resetChartFormatTarget, savedPresentationRevision, isCleanAfterSave, masterViewCrudActions, promptNameDialog, applyMasterViewCrudAction, masterViewCrudFailureKey, forgetStepsUsingRemovedParts, EDITOR_CHROME_CSS, ribbonCustomizationCss, applyMotionPathPreset, resetSlideLayoutPath, templateSchemeFromTheme, createBackstagePresentation, playFeedbackSound, shouldDiscardAutosaveOnSuccessfulSave, deleteAutosaveSnapshot, dispatchReadOnlyBannerIntent, readOnlyBannerState, buildFieldSubstitutionContext, setMasterViewBackgroundColor, canUseClipboard, runProgramNoticeStackStyle, observeElementHeight, printPropertiesFrameSlides, printPropertiesSlidesPerPage, PASTE_SPECIAL_OPTIONS, findCanvasElementNode, isHeaderFooterDateTextVisible, isHeaderFooterHeaderTextVisible, isHeaderFooterFooterTextVisible, getDensePanelTouchTargetPx, shouldStickyActionRow, buildJoinCollaborationConfig, buildCreateCollaborationConfig, generateBroadcastRoomId, DEFAULT_BROADCAST_SERVER_URL, buildBroadcastViewerUrl, resolveTransportForServerUrl, updateSubtitleSettings, overlayPointerInput, pushRecentColor, mruColorsPatch, shouldClearAutosaveCacheOnClose, clearAutosaveSnapshots, canCropElement, cropSessionChanged, cancelCropUpdate, startCropSession, masterViewBackgroundColor, openExternalHyperlinkConfirmed, resolvePresentationAction, isPresentationAdvanceClick, toggleBlackboard, PRESENT_TOOLBAR_CLASSES, resolveEditPointsAvailability, isCurrentLayout, EXPANDED_MAX_HEIGHT, statusBarState, statusBarViewMode, saveProgressStatus, formatVersionTimestamp, formatRelativeTime, scanAvailableFontFamilies, convertOmmlToLatex, compileLatexEquation, convertLatexToOmml, EQUATION_TEMPLATES, createCustomShowsController, resolveDefaultPrintSettings, HANDOUT_OPTIONS, effectiveOrientation, computeSlideCount, estimatePageCount, computeSlideIndices, bindPptxOptionsDialog, optionsBlockSlot, optionsPaneSlot, DEFAULT_QUICK_ACCESS_COMMAND_IDS, AI_OPTIONS_CATEGORY, buildCollaborationShareUrl, buildActiveSessionUsers, slideClipboardLabels, sorterPasteInsertAt, SORTER_MIN_ZOOM, SORTER_ZOOM_STEP, SORTER_MAX_ZOOM, canGoPrevious, formatSlideCounter, READING_VIEW_COUNTER_ATTR, canGoNext, READING_VIEW_ATTR, listenForOutlineViewDismiss, OUTLINE_LEVEL_ATTR, OUTLINE_SLIDE_ATTR, OUTLINE_ROW_ATTR, OUTLINE_VIEW_ATTR, mobileElapsedSince, nextPresentedSlide, presenterPrevDisabled, presenterNextDisabled, formatMobileElapsed, mobileSlideCounter, presenterPaneAdvancesOnClick, presenterTimerProgress, PRESENTER_CONSOLE_CLASSES, formatElapsed, createCollaborationStateReporter, buildCollaborationState, writeBackReport, cropModeKeyAction, isEditPointsEnabled, findReplacementAvailability, PRESENTATION_HIT_TEST_CSS, PRESENTATION_STAGE_ATTRIBUTE, transitionTemplateElements, buildStrokePathD, cursorForTool, annotationOverlayZIndex, presentationInkPath, resolveNotesSchematicBodyFontSizePx, PRESENTER_NAVIGATOR_LABEL_KEYS, getPresentationContextMenuSections, CONTEXT_MENU_PRESENTATION_LAYER, presentationViewItems, subtitleRecognitionLanguage, getSpeechRecognitionCtor, mergeCaptionResults, customizeContextMenuEntries, buildContextMenuEntries, contextMenuViewItems, customizeCanvasContextMenuEntries, buildCanvasContextMenuEntries, buildLayoutPreviewGeometry, scaleSlidesForSizeChange, slideSizeToCanvasPx, resolveSelectionPaneRename, themeEditorLabels, resolveNotesSegments, defaultRichEnabled, segmentsToEditorHtml, DEBOUNCE_MS, createPlainNotesSegments, parseSegmentsFromRichEditor, segmentsToPlainText, getCurrentParagraphIndex, segmentsToParagraphs, paragraphsToSegments, MAX_INDENT_LEVEL, INDENT_PX as INDENT_PX$1, buildNotesPrintHtml, dispatchStatusBarIntent, toggleSheet, describeElementChange, sanitizeMathMl, compileEquationTemplateMathMl, computeAllNotesPages, getNotesPrintableArea, CUSTOM_FONT_ACCEPT, TOOLBAR_TABS, SHORTCUT_REFERENCE_ITEMS as SHORTCUT_REFERENCE_ITEMS$1, availableQuickAccessCommands, addQuickAccessCommand, removeQuickAccessCommand, moveQuickAccessCommand, resolveViewerAddinRows, createSlideSorterState, sorterSelectionIndexes, selectSorterSlide, applySorterAction, sorterGridColumns, sorterMenuContext, buildSlideSorterContextMenuEntries, slideSorterContextMenuLabel, openReadingView, applyReadingViewCommand, createPresentationKeyBuffer, readingViewFitScale, READING_VIEW_STAGE_ATTR, buildOutline, applyOutlineEdit, mapOutlineKey, notesSegmentsToSpans, erasePresentationInkAt, movePresenterPointer, appendPresentationInkPoint, presenterConsoleAction, presenterConsoleViewState, NOTES_FONT_SIZE_DEFAULT, formatTime, NOTES_FONT_SIZE_MIN, clampNotesFontSize, NOTES_FONT_SIZE_STEP, NOTES_FONT_SIZE_MAX, masterViewPseudoSlide, PRESENTATION_ANIM_TRIGGER_ATTRIBUTE, computeAnchoredPopupPosition, applyTableStyleDelete, applyTableStyleMapChange, registerCustomFont, QUICK_ACCESS_COMMAND_CATALOG, handleReadingViewKey, visibleTemplateElements, MERGE_SHAPES_MENU_ITEMS, hasMultipleSelectedTableCells, isElementLocked, ELEMENT_GEOMETRY_SECTIONS, mergeSlideTransition, slideBackgroundClearState, slideBackgroundClearPatch, effectiveDirection, TRIGGER_OPTIONS, effectiveTimingCurve, getAfterAnimationState, mapSlideSorterKey, isEditorTextInputTarget, clampSorterZoom, elementLockTogglePatch, resolveInspectorSections, inspectorTogglePatch, buildTableDataGrid, getDenseGridLayoutPlan, appendTableElementRow, removeLastTableElementRow, appendTableElementColumn, removeLastTableElementColumn, removeTableElementColumn, removeTableElementRow, setTableElementCellText, applyTableStylePreset, tableStyleAssignmentUpdate, evenColumnWidths, redistributeColumnWidth, evenRowHeights, inspectorNumber, patchChartData, collapseChartTitleRunsForEdit, chartGridlinesState, chartGridlinesPatch, seriesSecondaryAxisPatch, setDataLabelsRangeCache, imageResetPatch, imageResetState, canInteractWithElement, buildOleObjectNamePatch, strokeColorChange, shouldShowAccessibilitySection, withFrameSlides, withSlidesPerPage, schemaLabel, THEME_COLOR_SLOT_LABEL_KEYS, SLIDE_SIZE_PRESETS, TRANSITION_ORIENTATION_TYPES, clampTransitionNumber, TRANSITION_SPEED_OPTIONS, TRANSITION_MORPH_OPTIONS, flattenTagCollections, resolveTemplateBackgroundRows, commentMentionQuery, matchCommentMentionAuthors, buildAnimationTimelineRows, clearMotionPath, setTrigger, setTriggerBookmark, getEffectSoundState, setEffectSound, setEffectStockSound, setAfterAnimation, setAfterAnimationColor, directionValuesFor, buildAnimationTimelineBars, motionPathPresetIdForPath, MOTION_PATH_FAMILIES, motionPathPresetsByFamily, motionPathPresetLabelKey, motionPathFamilyLabelKey, EFFECT_SOUND_CATALOGUE, listMediaBookmarkOptions, selectedBookmarkOptionValue, inspectorFieldPatch, describeTableStyleEditor, TABLE_STYLE_EDITOR_PARTS, computeMergeCellRight, computeMergeCellDown, computeSplitCell, resolveDisplayedChartType, CHART_TYPE_OPTIONS, chartDataLabelsTogglePatch, BAR3D_SHAPE_OPTIONS, bar3DShapePatch, RADAR_STYLE_OPTIONS, radarStylePatch, SURFACE_WIREFRAME_OPTIONS, surfaceWireframePatch, isSeriesUsingSecondaryAxis, seriesColorClearState, listChartUserShapeRows, withChartUserShapeAdded, createDefaultChartUserShape, withChartUserShapeRowRemoved, withChartUserShapeRowTextUpdated, rebuildDrawingShapesIfCleared, SMARTART_COLOR_SCHEME_LABEL_KEYS, SMARTART_STYLE_LABEL_KEYS, cropResetState, cropResetPatch, ARTISTIC_EFFECTS, mediaTrimEndSeconds, trimmedMediaDurationMs, mediaTrimEndAbsoluteMs, mediaTrimResetState, mediaTrimEndMsFromAbsoluteMs, mediaTrimResetPatch, buildOleEditDialogDescriptor, buildOleContentUpdatePatch, applyTextStyleUpdate, buildThemeColorSwatchGrid, themeColorGridView, recentColorsGridView, getNonVisualDescriptionFields, resolveActionType, ELEMENT_ACTION_TYPE_OPTIONS, canCommitActionType, slideSizeFromPreset, withSlideSizeOrientation, TRANSITION_DIR_ARROWS, buildDirectionGrid, updateTagInCollections, deleteTagFromCollections, addTagToCollections, commentTextSegments, COMMENT_MENTION_CLASS, COMMENT_MENTION_ATTRIBUTE, insertCommentMention, reorderAnimationTimelineRows, applyAnimationTimelineOrder, getEffectSoundAsset, animationEffectLabel, TABLE_STYLE_BORDER_SIDES, applyTableStyleFieldEdit, withCellStyle, LBL as LBL$1, SEL as SEL$1, FILL_MODE_OPTIONS as FILL_MODE_OPTIONS$1, SECTION_HEADING, NUM as NUM$1, getChartUserShapeGroupTransform, withChartUserShapeGroupChildAdded, createDefaultChartUserShapeGroupChild, withChartUserShapeRowUpdated, getChartUserShapeRowChartBox, withChartUserShapeRowFlipUpdated, withChartUserShapeRowRotationUpdated, withChartUserShapeRowChartBoxUpdated, smartArtLayoutSwitchPatch, mediaTrimEndMsFromSeconds, validateMediaTrimRange, OFFICE_COLOR_SWATCHES, officeColorSwatchLabel, PATTERN_PRESET_OPTIONS as PATTERN_PRESET_OPTIONS$1, SHAPE_LINE_SECTIONS, shapeQuickStylePatch, SHAPE_EFFECT_SECTIONS, createLiveColorInput, themeColorGridCommit, TEXT_BOX_SECTIONS, buildTextWarpGallery, TEXT_WARP_PRESETS, text3dPtToEmu, text3dEmuToPt, MATERIAL_PRESETS, toSlideIndex, TABLE_STYLE_BORDER_SIDE_LABEL_KEYS, TABLE_STYLE_DASH_PRESETS, GRADIENT_TYPE_OPTIONS as GRADIENT_TYPE_OPTIONS$1, PATTERN_OPTIONS, FILL_PATTERN_LABEL_KEYS, quickStyleShapeStyle, textWarpStyle, toggleText3dExtrusion, BEVEL_PRESETS, cropFit, cropFill, cropToAspectRatio } from 'ooxml-ui/pptx';
1
+ import { aiAssistants, AiChatPanelLazy } from './chunk-J4NOGC3R.mjs';
2
+ import { ElementRenderErrorReportingContext, useCollaboration, useVirtualizedSlides, StaticElementRenderer, useModalDismissDrag, useToolbarVisibility, useViewerOptionsContext, useController, InlineCollaborationContext, SlideBackgroundImageLayer, ElementRenderer, withDisplayName, ResizeHandles, imgSrc, renderStrokeView, ElementRenderErrorScope, useChartFormatContext, useViewerOptions, useReadOnlyRecommendationState, useCompatibilityToastsState, useReducedMotion, useViewerState, useIsMobile, useResizablePanels, useDerivedSlideState, useZoomViewport, useEditorHistory, usePresentationSetup, useTouchGestures, useViewerDialogs, useClearSelectionOnSlideChange, useEditorOperations, useViewerIntegration, useViewPreferencesSync, useLayoutSwitching, Rendering3DFlagsContext, CollaborationProvider, ChartFormatContext, useSheetDismissDrag, playAnimationSound, ViewerOptionsStoreContext, scopeLayoutOptionsToActiveSlide, createReviewCommentsHost, ChartPartSelectionProvider, useKeyboardInsets, ViewerOptionsContext, useReportOnChange, useCollaborationDocumentSync, useFollowMode, useBroadcastFollower, useSwipeNavigation, RemoteSelectionOverlay, CollaborationCursorOverlay, detectHyperlinkTargetType, parseHyperlinkEmailUrl, parseHyperlinkSlideNumber, PresentationTransitionOverlay, downloadBlob, useChartPartSelection, resolveSmartArtDataPalette, DUOTONE_PRESETS, getSlideTransitionAnimations, SLIDE_TRANSITION_KEYFRAMES } from './chunk-I5WQFYAK.mjs';
3
+ import { useTranslation, DEFAULT_SECTION_GROUP_ID, cn, getShapeAdjustmentHandleDescriptors, isConnectorOrLineElement, SLIDE_NAV_THUMBNAIL_WIDTH, TOOLBAR_SECTIONS, GRID_SIZE, getElementTransformWithoutRotation, getElementTransform, MIN_ELEMENT_SIZE, UNGROUPED_SECTION_ID, registeredHostI18next, PptxI18nContext, ViewerLocaleControlsContext, hasCopyableFormat, ViewerI18nContext, useRegisteredHostI18next, hostInstanceLanguage, BUILT_IN_ENGLISH, isPpactionUrl, parsePpactionUrl, SHORTCUT_REFERENCE_ITEMS, safeOpenUrl, isUrlSafe, computeHandoutLayout, getPrintableArea, generateNoteLineCount, normalizeHexColor, getElementLabel, TABLE_STYLE_PRESETS, SHAPE_PRESETS, sanitizeGradientStops, SLIDE_TRANSITION_OPTIONS, formatCommentTimestamp, ANIMATION_PRESET_OPTIONS, clampCropValue, CONNECTOR_ARROW_OPTIONS, ARROW_SIZE_OPTIONS, DEFAULT_FILL_COLOR, startMotionPathPreview, startPreviewAnimation, stopPreviewAnimation, getPatternSvg, DEFAULT_STROKE_COLOR, openNativeEyeDropper } from './chunk-N6BJW23K.mjs';
4
+ import { ANIMATION_DIRECTION_LABEL_KEYS, buildQuickStylesGallery, editorThumbnailWidth, EDITOR_THUMBNAIL_WIDTH, buildSlideTemplateContent, SLIDE_TEMPLATES, homeLaunchers, attachRibbonOverflow, isPanelVisible, resolveStageEdgeBleeds, parentSelection, slideSpaceElement, isGroupMember, motionPathFor, setMotionPath, RULER_THICKNESS, shouldShowElementHandles, deviceStrokeStageStyle, slideThumbnailLayout, buildPreviewElements, deriveSlideFieldContext, slideThumbnailTransitionBadge, slideThumbnailTransitionBadgeStyle, editorThumbnailStep, resolveSlidePaneClick, SLIDE_VIRTUALIZATION_THRESHOLD, buildSectionContextMenuEntries, buildSlidePaneContextMenuEntries, slidePaneViewItems, activateModalFocus, visibleContextualTabs, resolveActiveRibbonTab, visibleRibbonAddIns, createRibbonDisplayController, RIBBON_DISPLAY_REVEAL_LABEL_KEY, isDialogAvailable, resolveReadOnlyBadge, READ_ONLY_BADGE_ATTR, resolveScreenTip, RIBBON_ADD_IN_TAB_ATTR, contextualTabLabelKey, RIBBON_CONTEXTUAL_TAB_ATTR, buildTabRowActionsState, isFeatureEnabled, TAB_ROW_ACTION_CLASSES, tabRowActionsAttributes, RIBBON_DISPLAY_OPTIONS_LABEL_KEY, buildTitleBarState, backstageNavEntries, BACKSTAGE_NAV, openPlacesLabels, listBackstageRecentFiles, BACKSTAGE_BACK_CLASSES, BACKSTAGE_NAV_CLASSES, CLOUD_OPEN_ACCEPT, DEFAULT_INSERT_CHART_KIND, FREEFORM_TOOL_IDS, isDrawingToolVisible, textFontSizePtToPx, withHomeGalleries, drawingHomeControls, homeGalleryControls, homeGalleryApply, shapeOutlineChange, shapeFillChange, editingHomeControls, arrangeHomeControls, arrangePainterHomeControls, arrangeAlignAction, DESIGN_RIBBON_GROUPS, FIXED_TAB_GALLERIES, DESIGN_RIBBON_COMMANDS, designCommandState, CONTEXTUAL_TAB_GROUPS, attachEditorImagePaste, findTextHighlightsByElement, authorConnectorBetweenSites, findEraserHitElementId, generateTicks, rulerDragToGuidePosition, resolveElementInteractivity, buildChartQuickActionsDescriptor, applyChartElementToggle, CHART_QUICK_ACTION_BUTTON_SIZE, applyChartStylePreset, hideChartSeries, restoreFilteredSeries, buildCropOverlay, CROP_HANDLE_ARIA_KEY, getActiveXControlOverlayView, buildCommentMarkers, COMMENT_MARKER_SIZE, collectConnectorSiteCandidates, getConnectorEndpointHandles, findConnectorSiteNear, motionPathToSvgD, motionPathEndPixel, isEditableMotionPath, setMotionPathEnd, canEditElementPoints, getSlideBackgroundStyle, sectionAddAfterSlideIndex, EMPTY_RESOLVED_CUSTOMIZATION, getRegionRenderer, formatBackstageDate, formatBackstageSize, ViewerRegionHost, BACKSTAGE_TEMPLATES, customizeBackstageCards, backstageCardsFor, connectedServicesLabels, DEFAULT_VIEWER_PROFILE, readStoredViewerPrefs, resolveProfileInitial, AVATAR_COLOR_SWATCHES, clipboardHomeControls, slidesHomeControls, resolveInsertSlideLayout, resolveDefaultFontFamily, textFontSizePxToPt, getInlineEditorSelectionResult, selectedParagraphBulletKind, elementBulletKind, selectionBulletKind, fontPickerHomeControls, fontHomeControls, nextToggleValue, RIBBON_GROUP_ATTR, paragraphHomeAlign, paragraphHomeControls, paragraphHomeAction, arrangeShapeHomeControls, strokeWidthOf, canSetStrokeWidth, canUngroupSelection, canGroupSelection, buildRibbonGallery, readRibbonTransitionDraft, SLIDE_SHOW_COMMAND_GROUPS, buildRecordRibbon, trackActiveComment, commentCounts, findCommentLocation, buildReviewRibbon, buildHelpRibbon, galleryTextLabel, pictureSizeHomeControls, chartSelectionHomeControls, dispatchChartSelectionRequest, buildFreeformShapeElement, buildLiveInkStrokeView, beginCropDrag, CONNECTOR_SITE_SNAP_PX, resolveConnectorEndpointUpdate, withConnectorEndpointUpdate, getShapeConnectionSites, FreeformToolSession, attachOverlayKeyboard, EditPointsSession, EDIT_POINTS_STYLE, createCloudDocumentController, resolveCloudDocumentView, createSaveProgressController, resolveCollaborationConfig, resolveViewerRootOptions, installSvgIdScope, buildUserFontFaceStyles, resolveThemeCatalogEntry, THEME_CATALOG, writeStoredViewerPrefs, openPptxFile, readBackstageRecentFile, isEditingAllowed, resolveAutosaveActivation, viewerOptionsToPreferences, applyPreferenceToOptions, resolveHistoryDepth, attachViewerHyperlinks, shouldConfirmExternalHyperlink, confirmExternalHyperlinkDialog, applyAutoCorrectToEdit, resolveImageResolutionScale, resolveEffectiveGoogleFonts, resolveAllowExternalContent, resolveAutosaveIntervalMs, resolveAutosaveIntervalSeconds, saveFailureMessage, withSaveFailureToast, shouldDiscardAutosaveOnSuccessfulSave, deleteAutosaveSnapshot, createSlidePackageClipboard, shouldShowAutosaveRecoveryPrompt, resolveOptionRootClasses, RIBBON_SCOPE_ATTR, resolve3DRenderingFlags, resolveSlideSizeSelection, hiddenSlideCue, editorThumbnailHeight, HIDDEN_SLIDE_SLASH_GRADIENT, HIDDEN_SLIDE_LABEL_KEY, MIN_TOUCH_TARGET_PX, getLocalStorageUsageSummary, saveViewerProfile, confirmDeleteDialog, clearAllLocalViewerData, getSelectionTextStyleFlags, TEXT_DECORATION_FLAGS, dispatchCropRequest, applyRibbonGalleryItem, ribbonTransitionsDraftPatch, ribbonTransitionUpdates, ribbonTransitionsSoundChange, ribbonTransitionStockSoundUrl, playSlideTransitionPreview, playAnimationRibbonPreview, SLIDE_SHOW_OPTIONS, createViewerOptionsStore, subtitleSettingsFromOptions, subtitleSettingsLabels, isReviewCommentCommand, runReviewCommentCommand, hasTiltData, RULER_FONT_SIZE, toElementAxes, dragCropHandle, panCropImage, clientToSlidePoint, EDIT_POINTS_TARGET_ATTR, themeToCssVars, createCustomizationController, resolveEffectiveHiddenActions, RIBBON_AUTO_COLLAPSE_MEDIA, pruneExpiredAutosaveSnapshots, createDeckStyleHost, galleryDeckView, tableLayoutCells, commitsThroughDeckStyle, resetChartFormatTarget, savedPresentationRevision, isCleanAfterSave, masterViewCrudActions, promptNameDialog, applyMasterViewCrudAction, masterViewCrudFailureKey, forgetStepsUsingRemovedParts, EDITOR_CHROME_CSS, ribbonCustomizationCss, applyMotionPathPreset, resetSlideLayoutPath, templateSchemeFromTheme, createBackstagePresentation, playFeedbackSound, dispatchReadOnlyBannerIntent, readOnlyBannerState, buildFieldSubstitutionContext, setMasterViewBackgroundColor, canUseClipboard, runProgramNoticeStackStyle, observeElementHeight, printPropertiesFrameSlides, printPropertiesSlidesPerPage, PASTE_SPECIAL_OPTIONS, findCanvasElementNode, isHeaderFooterDateTextVisible, isHeaderFooterHeaderTextVisible, isHeaderFooterFooterTextVisible, getDensePanelTouchTargetPx, shouldStickyActionRow, buildJoinCollaborationConfig, buildCreateCollaborationConfig, generateBroadcastRoomId, DEFAULT_BROADCAST_SERVER_URL, buildBroadcastViewerUrl, resolveTransportForServerUrl, updateSubtitleSettings, overlayPointerInput, pushRecentColor, mruColorsPatch, shouldClearAutosaveCacheOnClose, clearAutosaveSnapshots, canCropElement, cropSessionChanged, cancelCropUpdate, startCropSession, masterViewBackgroundColor, openExternalHyperlinkConfirmed, resolvePresentationAction, isPresentationAdvanceClick, toggleBlackboard, PRESENT_TOOLBAR_CLASSES, resolveEditPointsAvailability, isCurrentLayout, EXPANDED_MAX_HEIGHT, statusBarState, statusBarViewMode, saveProgressStatus, formatVersionTimestamp, formatRelativeTime, getPasswordStrength, validatePasswordPair, documentPropertiesChanged, appPropertiesChanged, scanAvailableFontFamilies, convertOmmlToLatex, compileLatexEquation, convertLatexToOmml, EQUATION_TEMPLATES, HYPERLINK_ACTION_VERB_MAP, applySlideShowSettingsPatch, createCustomShowsController, resolveDefaultPrintSettings, HANDOUT_OPTIONS, effectiveOrientation, computeSlideCount, estimatePageCount, computeSlideIndices, bindPptxOptionsDialog, optionsBlockSlot, optionsPaneSlot, DEFAULT_QUICK_ACCESS_COMMAND_IDS, AI_OPTIONS_CATEGORY, buildCollaborationShareUrl, buildActiveSessionUsers, slideClipboardLabels, sorterPasteInsertAt, SORTER_MIN_ZOOM, SORTER_ZOOM_STEP, SORTER_MAX_ZOOM, canGoPrevious, formatSlideCounter, READING_VIEW_COUNTER_ATTR, canGoNext, READING_VIEW_ATTR, listenForOutlineViewDismiss, OUTLINE_LEVEL_ATTR, OUTLINE_SLIDE_ATTR, OUTLINE_ROW_ATTR, OUTLINE_VIEW_ATTR, mobileElapsedSince, nextPresentedSlide, presenterPrevDisabled, presenterNextDisabled, formatMobileElapsed, mobileSlideCounter, presenterPaneAdvancesOnClick, presenterTimerProgress, PRESENTER_CONSOLE_CLASSES, formatElapsed, createCollaborationStateReporter, buildCollaborationState, writeBackReport, cropModeKeyAction, isEditPointsEnabled, findReplacementAvailability, transitionTemplateElements, buildStrokePathD, cursorForTool, annotationOverlayZIndex, presentationInkPath, resolveNotesSchematicBodyFontSizePx, PRESENTER_NAVIGATOR_LABEL_KEYS, getPresentationContextMenuSections, CONTEXT_MENU_PRESENTATION_LAYER, presentationViewItems, subtitleRecognitionLanguage, getSpeechRecognitionCtor, mergeCaptionResults, customizeContextMenuEntries, buildContextMenuEntries, contextMenuViewItems, customizeCanvasContextMenuEntries, buildCanvasContextMenuEntries, buildLayoutPreviewGeometry, scaleSlidesForSizeChange, slideSizeToCanvasPx, resolveSelectionPaneRename, themeEditorLabels, resolveNotesSegments, defaultRichEnabled, segmentsToEditorHtml, DEBOUNCE_MS, createPlainNotesSegments, parseSegmentsFromRichEditor, segmentsToPlainText, getCurrentParagraphIndex, segmentsToParagraphs, paragraphsToSegments, MAX_INDENT_LEVEL, INDENT_PX as INDENT_PX$1, buildNotesPrintHtml, dispatchStatusBarIntent, toggleSheet, describeElementChange, sanitizeMathMl, compileEquationTemplateMathMl, computeAllNotesPages, getNotesPrintableArea, CUSTOM_FONT_ACCEPT, TOOLBAR_TABS, SHORTCUT_REFERENCE_ITEMS as SHORTCUT_REFERENCE_ITEMS$1, availableQuickAccessCommands, addQuickAccessCommand, removeQuickAccessCommand, moveQuickAccessCommand, resolveViewerAddinRows, createSlideSorterState, sorterSelectionIndexes, selectSorterSlide, applySorterAction, sorterGridColumns, sorterMenuContext, buildSlideSorterContextMenuEntries, slideSorterContextMenuLabel, openReadingView, applyReadingViewCommand, createPresentationKeyBuffer, readingViewFitScale, READING_VIEW_STAGE_ATTR, buildOutline, applyOutlineEdit, mapOutlineKey, notesSegmentsToSpans, erasePresentationInkAt, movePresenterPointer, appendPresentationInkPoint, presenterConsoleAction, presenterConsoleViewState, NOTES_FONT_SIZE_DEFAULT, formatTime, NOTES_FONT_SIZE_MIN, clampNotesFontSize, NOTES_FONT_SIZE_STEP, NOTES_FONT_SIZE_MAX, masterViewPseudoSlide, PRESENTATION_HIT_TEST_CSS, PRESENTATION_STAGE_ATTRIBUTE, computeAnchoredPopupPosition, applyTableStyleDelete, applyTableStyleMapChange, registerCustomFont, QUICK_ACCESS_COMMAND_CATALOG, handleReadingViewKey, visibleTemplateElements, PRESENTATION_ANIM_TRIGGER_ATTRIBUTE, MERGE_SHAPES_MENU_ITEMS, hasMultipleSelectedTableCells, isElementLocked, ELEMENT_GEOMETRY_SECTIONS, mergeSlideTransition, slideBackgroundClearState, slideBackgroundClearPatch, effectiveDirection, TRIGGER_OPTIONS, effectiveTimingCurve, getAfterAnimationState, mapSlideSorterKey, isEditorTextInputTarget, clampSorterZoom, elementLockTogglePatch, resolveInspectorSections, inspectorTogglePatch, buildTableDataGrid, getDenseGridLayoutPlan, appendTableElementRow, removeLastTableElementRow, appendTableElementColumn, removeLastTableElementColumn, removeTableElementColumn, removeTableElementRow, setTableElementCellText, applyTableStylePreset, tableStyleAssignmentUpdate, evenColumnWidths, redistributeColumnWidth, evenRowHeights, inspectorNumber, patchChartData, collapseChartTitleRunsForEdit, chartGridlinesState, chartGridlinesPatch, seriesSecondaryAxisPatch, setDataLabelsRangeCache, imageResetPatch, imageResetState, canInteractWithElement, buildOleObjectNamePatch, strokeColorChange, shouldShowAccessibilitySection, withFrameSlides, withSlidesPerPage, schemaLabel, THEME_COLOR_SLOT_LABEL_KEYS, SLIDE_SIZE_PRESETS, TRANSITION_ORIENTATION_TYPES, clampTransitionNumber, TRANSITION_SPEED_OPTIONS, TRANSITION_MORPH_OPTIONS, flattenTagCollections, resolveTemplateBackgroundRows, commentMentionQuery, matchCommentMentionAuthors, buildAnimationTimelineRows, clearMotionPath, setTrigger, setTriggerBookmark, getEffectSoundState, setEffectSound, setEffectStockSound, setAfterAnimation, setAfterAnimationColor, directionValuesFor, buildAnimationTimelineBars, motionPathPresetIdForPath, MOTION_PATH_FAMILIES, motionPathPresetsByFamily, motionPathPresetLabelKey, motionPathFamilyLabelKey, EFFECT_SOUND_CATALOGUE, listMediaBookmarkOptions, selectedBookmarkOptionValue, inspectorFieldPatch, describeTableStyleEditor, TABLE_STYLE_EDITOR_PARTS, computeMergeCellRight, computeMergeCellDown, computeSplitCell, resolveDisplayedChartType, CHART_TYPE_OPTIONS, chartDataLabelsTogglePatch, BAR3D_SHAPE_OPTIONS, bar3DShapePatch, RADAR_STYLE_OPTIONS, radarStylePatch, SURFACE_WIREFRAME_OPTIONS, surfaceWireframePatch, isSeriesUsingSecondaryAxis, seriesColorClearState, listChartUserShapeRows, withChartUserShapeAdded, createDefaultChartUserShape, withChartUserShapeRowRemoved, withChartUserShapeRowTextUpdated, rebuildDrawingShapesIfCleared, SMARTART_COLOR_SCHEME_LABEL_KEYS, SMARTART_STYLE_LABEL_KEYS, cropResetState, cropResetPatch, ARTISTIC_EFFECTS, mediaTrimEndSeconds, trimmedMediaDurationMs, mediaTrimEndAbsoluteMs, mediaTrimResetState, mediaTrimEndMsFromAbsoluteMs, mediaTrimResetPatch, buildOleEditDialogDescriptor, buildOleContentUpdatePatch, applyTextStyleUpdate, buildThemeColorSwatchGrid, themeColorGridView, recentColorsGridView, getNonVisualDescriptionFields, resolveActionType, ELEMENT_ACTION_TYPE_OPTIONS, canCommitActionType, slideSizeFromPreset, withSlideSizeOrientation, TRANSITION_DIR_ARROWS, buildDirectionGrid, updateTagInCollections, deleteTagFromCollections, addTagToCollections, commentTextSegments, COMMENT_MENTION_CLASS, COMMENT_MENTION_ATTRIBUTE, insertCommentMention, reorderAnimationTimelineRows, applyAnimationTimelineOrder, getEffectSoundAsset, animationEffectLabel, TABLE_STYLE_BORDER_SIDES, applyTableStyleFieldEdit, withCellStyle, LBL as LBL$1, SEL as SEL$1, FILL_MODE_OPTIONS as FILL_MODE_OPTIONS$1, SECTION_HEADING, NUM as NUM$1, getChartUserShapeGroupTransform, withChartUserShapeGroupChildAdded, createDefaultChartUserShapeGroupChild, withChartUserShapeRowUpdated, getChartUserShapeRowChartBox, withChartUserShapeRowFlipUpdated, withChartUserShapeRowRotationUpdated, withChartUserShapeRowChartBoxUpdated, smartArtLayoutSwitchPatch, mediaTrimEndMsFromSeconds, validateMediaTrimRange, OFFICE_COLOR_SWATCHES, officeColorSwatchLabel, PATTERN_PRESET_OPTIONS as PATTERN_PRESET_OPTIONS$1, SHAPE_LINE_SECTIONS, shapeQuickStylePatch, SHAPE_EFFECT_SECTIONS, createLiveColorInput, themeColorGridCommit, TEXT_BOX_SECTIONS, buildTextWarpGallery, TEXT_WARP_PRESETS, text3dPtToEmu, text3dEmuToPt, MATERIAL_PRESETS, toSlideIndex, TABLE_STYLE_BORDER_SIDE_LABEL_KEYS, TABLE_STYLE_DASH_PRESETS, GRADIENT_TYPE_OPTIONS as GRADIENT_TYPE_OPTIONS$1, PATTERN_OPTIONS, FILL_PATTERN_LABEL_KEYS, quickStyleShapeStyle, textWarpStyle, toggleText3dExtrusion, BEVEL_PRESETS, cropFit, cropFill, cropToAspectRatio } from 'ooxml-ui/pptx';
5
5
  export { THEME_CATALOG, defaultCssVars, defaultRadius, defaultThemeColors, resolveThemeCatalogEntry, themeToCssVars, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius } from 'ooxml-ui/pptx';
6
- import React108, { createContext, useContext, useRef, useMemo, useCallback, useEffect, useState, Fragment as Fragment$1, useLayoutEffect, forwardRef, useSyncExternalStore, useReducer, useId, useDeferredValue } from 'react';
6
+ import React108, { createContext, useContext, useMemo, useRef, useCallback, useEffect, useState, Fragment as Fragment$1, useLayoutEffect, forwardRef, useSyncExternalStore, useReducer, useId, useDeferredValue } from 'react';
7
7
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
8
8
  import { LuArrowDown, LuArrowUp, LuArrowRight, LuArrowLeft, LuArrowDownRight, LuArrowDownLeft, LuArrowUpRight, LuArrowUpLeft, LuPlus, LuX, LuPanelLeft, LuPanelRight, LuSparkles, LuSettings, LuFolderOpen, LuType, LuPalette, LuFilter, LuPaintbrush, LuChevronDown, LuClipboardCopy, LuShapes, LuLayoutGrid, LuWand, LuPresentation, LuTextCursorInput, LuFile, LuEllipsis, LuUserRound, LuUpload, LuShare2, LuPrinter, LuDownload, LuSave, LuInfo, LuFilePlus2, LuHouse, LuCopy, LuFileJson, LuBox, LuVideo, LuFileImage, LuFileText, LuDatabase, LuPlay, LuClock3, LuShieldAlert, LuLock, LuUser, LuHardDrive, LuLogIn, LuMessageSquare, LuEyeOff, LuChevronRight, LuMonitor, LuClock, LuRadio, LuCaptions, LuCheck, LuImage, LuSearch, LuHistory, LuCalendarDays, LuHash, LuText, LuCast, LuShieldCheck, LuPanelLeftClose, LuTrash2, LuEye, LuLoader, LuSignature, LuTriangleAlert, LuPenTool, LuWifi, LuWifiOff, LuUsers, LuMinus, LuChevronLeft, LuPause, LuCaseSensitive, LuChevronUp, LuReplace, LuGripVertical, LuGrid2X2, LuStickyNote, LuList, LuBug, LuMove, LuCopyPlus, LuClipboardPaste, LuLayers, LuSettings2, LuLockOpen, LuPencil, LuReply, LuMoveRight, LuRotateCw, LuScissors, LuBookmark, LuPipette } from 'react-icons/lu';
9
9
  import { createPortal } from 'react-dom';
@@ -46,7 +46,8 @@ function SlideThumbnailImpl({
46
46
  canvasSize,
47
47
  previewWidth,
48
48
  fieldContext,
49
- tableStyleContext
49
+ tableStyleContext,
50
+ onElementRenderError
50
51
  }) {
51
52
  const safeCanvasWidth = Math.max(canvasSize.width, 1);
52
53
  const safeCanvasHeight = Math.max(canvasSize.height, 1);
@@ -93,7 +94,8 @@ function SlideThumbnailImpl({
93
94
  allSlides: [slide],
94
95
  zIndex: index,
95
96
  fieldContext: slideFieldContext,
96
- tableStyleContext
97
+ tableStyleContext,
98
+ onElementRenderError
97
99
  },
98
100
  element.id
99
101
  ))
@@ -114,6 +116,9 @@ function SlideThumbnailImpl({
114
116
  );
115
117
  }
116
118
  function slideThumbnailPropsEqual(prev, next) {
119
+ if (prev.onElementRenderError !== next.onElementRenderError) {
120
+ return false;
121
+ }
117
122
  if (prev.previewWidth !== next.previewWidth) {
118
123
  return false;
119
124
  }
@@ -986,7 +991,13 @@ function useSlidePaneCallbacks(onMoveSlide, onRenameSection, onToggleSectionColl
986
991
  }
987
992
  var EMPTY_TEMPLATE_ELEMENTS = [];
988
993
  var VIRTUALIZATION_THRESHOLD = SLIDE_VIRTUALIZATION_THRESHOLD;
989
- function SlidesPaneSidebar({
994
+ function SlidesPaneSidebar(props) {
995
+ const inherited = useContext(ElementRenderErrorReportingContext);
996
+ const reporter = props.onElementRenderError ?? inherited?.onElementRenderError;
997
+ const errorReporting = useMemo(() => ({ onElementRenderError: reporter }), [reporter]);
998
+ return /* @__PURE__ */ jsx(ElementRenderErrorReportingContext.Provider, { value: errorReporting, children: /* @__PURE__ */ jsx(SlidesPaneSidebarContent, { ...props }) });
999
+ }
1000
+ function SlidesPaneSidebarContent({
990
1001
  slides,
991
1002
  templateElementsBySlideId,
992
1003
  activeSlideIndex,
@@ -1356,7 +1367,8 @@ var PREVIEW_SCALE = PREVIEW_TILE_WIDTH / PREVIEW_CANVAS_WIDTH;
1356
1367
  var PREVIEW_TILE_HEIGHT = Math.round(PREVIEW_CANVAS_HEIGHT * PREVIEW_SCALE);
1357
1368
  function SlideTemplatePreview({
1358
1369
  templateId,
1359
- scheme
1370
+ scheme,
1371
+ onElementRenderError
1360
1372
  }) {
1361
1373
  const previewSlide = useMemo(() => {
1362
1374
  const content = buildSlideTemplateContent(templateId, {
@@ -1400,7 +1412,8 @@ function SlideTemplatePreview({
1400
1412
  element,
1401
1413
  activeSlide: previewSlide,
1402
1414
  allSlides: [previewSlide],
1403
- zIndex: index
1415
+ zIndex: index,
1416
+ onElementRenderError
1404
1417
  },
1405
1418
  element.id
1406
1419
  ))
@@ -1584,6 +1597,60 @@ function SlideTemplateGalleryDialog({
1584
1597
  )
1585
1598
  ] });
1586
1599
  }
1600
+ var RIBBON_SURFACE = '[data-pptx-chrome="ribbon"], [data-pptx-chrome="ribbon-reveal"]';
1601
+ var RIBBON_MENU_SURFACE = '[data-pptx-chrome="ribbon-display-options"], [data-pptx-chrome="ribbon-display-menu"]';
1602
+ function useRibbonDisplayController(input) {
1603
+ const { ribbonDisplay, collapseRibbonAutomatically, rootRef } = input;
1604
+ const onChangeRef = useRef(input.onRibbonDisplayChange);
1605
+ onChangeRef.current = input.onRibbonDisplayChange;
1606
+ const [controller] = useState(
1607
+ () => createRibbonDisplayController({
1608
+ initial: ribbonDisplay,
1609
+ onChange: (mode) => onChangeRef.current?.(mode)
1610
+ })
1611
+ );
1612
+ useEffect(() => {
1613
+ controller.setMode(ribbonDisplay);
1614
+ }, [controller, ribbonDisplay]);
1615
+ useEffect(() => {
1616
+ controller.setAutoCollapse(collapseRibbonAutomatically);
1617
+ }, [controller, collapseRibbonAutomatically]);
1618
+ useEffect(() => {
1619
+ const query = globalThis.matchMedia?.(RIBBON_AUTO_COLLAPSE_MEDIA);
1620
+ const sync = () => controller.setShortViewport(query?.matches ?? false);
1621
+ sync();
1622
+ query?.addEventListener("change", sync);
1623
+ return () => query?.removeEventListener("change", sync);
1624
+ }, [controller]);
1625
+ useEffect(() => {
1626
+ const onPointerDown = (event) => {
1627
+ const target = event.target instanceof Element ? event.target : null;
1628
+ if (!target?.closest(RIBBON_SURFACE)) {
1629
+ controller.dismiss();
1630
+ } else if (!target.closest(RIBBON_MENU_SURFACE)) {
1631
+ controller.setMenuOpen(false);
1632
+ }
1633
+ };
1634
+ const onKeyDown = (event) => {
1635
+ const target = event.target;
1636
+ const root = rootRef.current;
1637
+ if (target === document.body || root && target instanceof Node && root.contains(target)) {
1638
+ controller.handleKeydown(event);
1639
+ }
1640
+ };
1641
+ document.addEventListener("pointerdown", onPointerDown);
1642
+ document.addEventListener("keydown", onKeyDown);
1643
+ return () => {
1644
+ document.removeEventListener("pointerdown", onPointerDown);
1645
+ document.removeEventListener("keydown", onKeyDown);
1646
+ };
1647
+ }, [controller, rootRef]);
1648
+ return controller;
1649
+ }
1650
+ function useRibbonDisplayFallback(controller) {
1651
+ const [own] = useState(() => createRibbonDisplayController());
1652
+ return controller ?? own;
1653
+ }
1587
1654
  function useHostEvent(ref, type, handler) {
1588
1655
  useEffect(() => {
1589
1656
  const host = ref.current;
@@ -2827,7 +2894,7 @@ function AccountPage() {
2827
2894
  refreshUsage();
2828
2895
  setTimeout(() => setCleared(false), 4e3);
2829
2896
  };
2830
- const version = "4.75.0" ;
2897
+ const version = "4.77.0" ;
2831
2898
  return /* @__PURE__ */ jsxs("div", { className: "mt-8 max-w-[700px] space-y-6", children: [
2832
2899
  /* @__PURE__ */ jsxs("section", { className: cardClass, children: [
2833
2900
  /* @__PURE__ */ jsxs("h2", { className: "flex items-center gap-2 text-sm font-semibold", children: [
@@ -4909,6 +4976,111 @@ function RibbonAddInSection({ tab }) {
4909
4976
  }, [tab]);
4910
4977
  return /* @__PURE__ */ jsx("pptx-ui-ribbon-add-in", { ref });
4911
4978
  }
4979
+ var RIBBON_PEEK_ROOT_CLASS = 'absolute inset-x-0 top-0 z-[35] border-b border-border bg-background shadow-[0_8px_20px_rgb(0_0_0/0.2)] before:absolute before:inset-0 before:-z-10 before:bg-card before:content-[""]';
4980
+ var RIBBON_OVERLAY_CLASS = 'absolute inset-x-0 top-full z-[35] border-b border-border bg-background shadow-[0_8px_20px_rgb(0_0_0/0.2)] before:absolute before:inset-0 before:-z-10 before:bg-card before:content-[""]';
4981
+ function RibbonRevealStrip({
4982
+ ribbon
4983
+ }) {
4984
+ const { t } = useTranslation();
4985
+ const label = t(RIBBON_DISPLAY_REVEAL_LABEL_KEY);
4986
+ return /* @__PURE__ */ jsx(
4987
+ "button",
4988
+ {
4989
+ type: "button",
4990
+ "data-pptx-chrome": "ribbon-reveal",
4991
+ "aria-label": label,
4992
+ title: label,
4993
+ onClick: () => ribbon.reveal(),
4994
+ className: "flex h-[14px] w-full shrink-0 items-center justify-center border-b border-border bg-card text-[14px] leading-none tracking-[2px] text-muted-foreground hover:bg-accent hover:text-foreground",
4995
+ children: "\xB7\xB7\xB7"
4996
+ }
4997
+ );
4998
+ }
4999
+ function RibbonDisplayButton({
5000
+ ribbon,
5001
+ state
5002
+ }) {
5003
+ const { t } = useTranslation();
5004
+ const label = t(RIBBON_DISPLAY_OPTIONS_LABEL_KEY);
5005
+ return /* @__PURE__ */ jsx(
5006
+ "button",
5007
+ {
5008
+ type: "button",
5009
+ "aria-haspopup": "menu",
5010
+ "aria-expanded": state.menuOpen,
5011
+ "aria-label": label,
5012
+ title: label,
5013
+ "data-pptx-chrome": "ribbon-display-options",
5014
+ onClick: () => ribbon.toggleMenu(),
5015
+ className: cn(
5016
+ "mx-1 inline-flex h-[22px] w-[22px] shrink-0 items-center justify-center rounded-sm text-muted-foreground hover:bg-accent hover:text-foreground",
5017
+ state.menuOpen && "bg-accent text-foreground"
5018
+ ),
5019
+ children: /* @__PURE__ */ jsx(
5020
+ "svg",
5021
+ {
5022
+ viewBox: "0 0 16 16",
5023
+ width: "12",
5024
+ height: "12",
5025
+ fill: "none",
5026
+ stroke: "currentColor",
5027
+ strokeWidth: 1.5,
5028
+ strokeLinecap: "round",
5029
+ strokeLinejoin: "round",
5030
+ "aria-hidden": "true",
5031
+ className: cn(state.effectiveMode === "tabs" && "rotate-180"),
5032
+ children: /* @__PURE__ */ jsx("path", { d: "m4 6 4 4 4-4" })
5033
+ }
5034
+ )
5035
+ }
5036
+ );
5037
+ }
5038
+ function RibbonDisplayMenu({
5039
+ ribbon,
5040
+ state
5041
+ }) {
5042
+ const { t } = useTranslation();
5043
+ return /* @__PURE__ */ jsx("div", { className: "relative h-0", children: /* @__PURE__ */ jsx(
5044
+ "div",
5045
+ {
5046
+ role: "menu",
5047
+ "aria-label": t(RIBBON_DISPLAY_OPTIONS_LABEL_KEY),
5048
+ "data-pptx-chrome": "ribbon-display-menu",
5049
+ className: "absolute right-1.5 top-0.5 z-50 flex min-w-[200px] flex-col gap-0.5 rounded-md border border-border bg-popover p-1 text-[12px] shadow-lg",
5050
+ children: state.menu.map((item) => /* @__PURE__ */ jsxs(
5051
+ "button",
5052
+ {
5053
+ type: "button",
5054
+ role: "menuitemradio",
5055
+ "aria-checked": item.checked,
5056
+ "data-ribbon-display": item.mode,
5057
+ onClick: () => ribbon.choose(item.mode),
5058
+ className: "flex w-full items-center gap-2 whitespace-nowrap rounded-sm px-2 py-1.5 text-left text-foreground hover:bg-accent/30",
5059
+ children: [
5060
+ /* @__PURE__ */ jsx(
5061
+ "svg",
5062
+ {
5063
+ viewBox: "0 0 16 16",
5064
+ width: "12",
5065
+ height: "12",
5066
+ fill: "none",
5067
+ stroke: "currentColor",
5068
+ strokeWidth: 1.5,
5069
+ strokeLinecap: "round",
5070
+ strokeLinejoin: "round",
5071
+ "aria-hidden": "true",
5072
+ className: cn("shrink-0", !item.checked && "invisible"),
5073
+ children: /* @__PURE__ */ jsx("path", { d: "m3 8.5 3 3 7-7" })
5074
+ }
5075
+ ),
5076
+ t(item.labelKey)
5077
+ ]
5078
+ },
5079
+ item.mode
5080
+ ))
5081
+ }
5082
+ ) });
5083
+ }
4912
5084
  var TAB_BASE = "relative px-3.5 py-2 text-[12px] font-medium whitespace-nowrap transition-colors max-md:min-h-[36px] max-md:px-3";
4913
5085
  var TAB_UNDERLINE = "after:absolute after:-bottom-px after:left-0 after:right-0 after:h-[2.5px] after:bg-primary";
4914
5086
  function RibbonTabBar(p) {
@@ -4931,6 +5103,7 @@ function RibbonTabBar(p) {
4931
5103
  "aria-selected": selected,
4932
5104
  title: resolveScreenTip(viewerOptions, t(s.labelKey)),
4933
5105
  onClick: () => p.onSelectSection(s.id),
5106
+ onDoubleClick: s.id === "file" ? void 0 : () => p.onToggleCollapsed?.(),
4934
5107
  className: cn(
4935
5108
  TAB_BASE,
4936
5109
  selected ? s.id === "file" ? "text-white bg-primary/80 rounded-sm" : `text-foreground ${TAB_UNDERLINE}` : s.id === "file" ? "text-primary hover:bg-primary/15 rounded-sm" : "text-muted-foreground hover:text-foreground hover:bg-accent/30"
@@ -4951,6 +5124,7 @@ function RibbonTabBar(p) {
4951
5124
  ...{ [RIBBON_ADD_IN_TAB_ATTR]: tab.id },
4952
5125
  title: resolveScreenTip(viewerOptions, tab.label),
4953
5126
  onClick: () => p.onSelectAddIn?.(tab.id),
5127
+ onDoubleClick: () => p.onToggleCollapsed?.(),
4954
5128
  className: cn(
4955
5129
  TAB_BASE,
4956
5130
  selected ? `text-foreground ${TAB_UNDERLINE}` : "text-muted-foreground hover:text-foreground hover:bg-accent/30"
@@ -4972,6 +5146,7 @@ function RibbonTabBar(p) {
4972
5146
  ...{ [RIBBON_CONTEXTUAL_TAB_ATTR]: id },
4973
5147
  title: resolveScreenTip(viewerOptions, label),
4974
5148
  onClick: () => p.onSelectContextual(id),
5149
+ onDoubleClick: () => p.onToggleCollapsed?.(),
4975
5150
  className: cn(
4976
5151
  TAB_BASE,
4977
5152
  "text-primary",
@@ -5795,6 +5970,9 @@ function Toolbar(p) {
5795
5970
  const fallBackHome = useCallback(() => onSetToolbarSection("home"), [onSetToolbarSection]);
5796
5971
  const contextual = useContextualRibbonTab(p.selectedElement, customization, fallBackHome);
5797
5972
  const addIns = useRibbonAddInTabs(fallBackHome);
5973
+ const ribbon = useRibbonDisplayFallback(p.ribbonDisplay);
5974
+ const ribbonState = useController(ribbon);
5975
+ const { layout, effectiveMode, peek } = ribbonState;
5798
5976
  const detachOverflow = useRef(null);
5799
5977
  const inspector = useRef({ open: p.isInspectorPaneOpen, toggle: p.onToggleInspector });
5800
5978
  inspector.current = { open: p.isInspectorPaneOpen, toggle: p.onToggleInspector };
@@ -5829,269 +6007,294 @@ function Toolbar(p) {
5829
6007
  const sDrw = section === "draw";
5830
6008
  const sDes = section === "design";
5831
6009
  const showRibbon = mode === "edit" || mode === "master";
5832
- return /* @__PURE__ */ jsxs(
5833
- "div",
5834
- {
5835
- role: "toolbar",
5836
- "data-pptx-scope": "",
5837
- "data-pptx-chrome": "ribbon",
5838
- "aria-label": t("pptx.toolbar.presentationToolbarAria"),
5839
- className: "relative z-20 border-b border-border bg-secondary/50 overflow-visible",
5840
- children: [
5841
- /* @__PURE__ */ jsx(ToolbarPrimaryRow, { ...p }),
5842
- showRibbon && /* @__PURE__ */ jsxs(
5843
- RibbonTabBar,
5844
- {
5845
- isTabVisible,
5846
- activeSection: extraTab ? null : section,
5847
- contextualTabs: contextual.visible,
5848
- activeContextual: addIns.active ? null : contextual.active,
5849
- onSelectSection: (id) => {
5850
- contextual.select(null);
5851
- addIns.select(null);
5852
- onSetToolbarSection(id);
5853
- },
5854
- onSelectContextual: (id) => {
5855
- addIns.select(null);
5856
- contextual.select(id);
5857
- },
5858
- addInTabs: addIns.visible,
5859
- activeAddIn: addIns.active?.id ?? null,
5860
- onSelectAddIn: (id) => {
5861
- contextual.select(null);
5862
- addIns.select(id);
5863
- },
5864
- children: [
5865
- /* @__PURE__ */ jsx(
5866
- TabRowActions,
5867
- {
5868
- onEnterRehearsalMode: p.canEdit ? p.onEnterRehearsalMode : void 0,
5869
- onOpenShareDialog: p.onOpenShareDialog,
5870
- onToggleComments: p.onToggleComments,
5871
- isCommentsPanelOpen: p.isCommentsPanelOpen,
5872
- slideCommentCount: p.slideCommentCount,
5873
- hiddenActions: p.hiddenActions
5874
- }
5875
- ),
5876
- isNarrowViewport && /* @__PURE__ */ jsx(
5877
- "button",
5878
- {
5879
- type: "button",
5880
- onClick: p.onToggleCompactToolbar,
5881
- className: cn(
5882
- "px-2 py-1 rounded text-[11px] transition-colors mr-1",
5883
- isCompactToolbarOpen ? "bg-primary/80 text-white" : "text-muted-foreground hover:text-foreground"
5884
- ),
5885
- title: t(
5886
- isCompactToolbarOpen ? "pptx.ribbon.collapseRibbon" : "pptx.ribbon.expandRibbon"
5887
- ),
5888
- children: t(isCompactToolbarOpen ? "pptx.ribbon.collapseRibbon" : "pptx.ribbon.expandRibbon")
5889
- }
5890
- )
5891
- ]
5892
- }
5893
- ),
5894
- showRibbon && viewerOptions.quickAccess.position === "below" && isPanelVisible(customization, "quickAccessToolbar") && /* @__PURE__ */ jsx(
5895
- TitleBarElement,
5896
- {
5897
- placement: "belowRibbon",
5898
- input: belowInput,
5899
- onQuickCommand: p.onQuickCommand
5900
- }
6010
+ const commandsShown = sFil ? layout.tabs : layout.commands !== "hidden";
6011
+ const commandsOverlaid = commandsShown && layout.commands === "overlay" && !sFil;
6012
+ const rootShown = layout.tabs || commandsShown;
6013
+ const peekedFullScreen = effectiveMode === "fullScreen" && peek;
6014
+ const showStrip = layout.reveal || effectiveMode === "fullScreen";
6015
+ return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
6016
+ showStrip && /* @__PURE__ */ jsx(RibbonRevealStrip, { ribbon }),
6017
+ /* @__PURE__ */ jsxs(
6018
+ "div",
6019
+ {
6020
+ role: "toolbar",
6021
+ "data-pptx-scope": "",
6022
+ "data-pptx-chrome": "ribbon",
6023
+ "data-ribbon-display": effectiveMode,
6024
+ "data-ribbon-peek": peek ? "" : void 0,
6025
+ "aria-label": t("pptx.toolbar.presentationToolbarAria"),
6026
+ className: cn(
6027
+ peekedFullScreen ? RIBBON_PEEK_ROOT_CLASS : "relative z-20 border-b border-border bg-secondary/50 overflow-visible",
6028
+ !rootShown && "hidden"
5901
6029
  ),
5902
- showRibbon && /* @__PURE__ */ jsxs(
5903
- "div",
5904
- {
5905
- ref: attachOverflow,
5906
- "data-pptx-chrome": "ribbon-content",
5907
- className: cn(
5908
- // Plain controls stay compact; labelled RibbonGroups opt into stretching.
5909
- // `RibbonGroupScope` wraps controls in a `display: contents` div, so its
5910
- // children are this row's flex items too and must not shrink (a shrunk
5911
- // "Text Box" pill wraps its caption onto two lines).
5912
- "flex min-h-[82px] items-center gap-0 overflow-x-auto px-1 py-0.5 max-md:min-h-0 max-md:px-1 max-md:py-0.5 flex-nowrap [&>*]:shrink-0 [&>.contents>*]:shrink-0",
5913
- isNarrowViewport && !isCompactToolbarOpen && "hidden"
6030
+ children: [
6031
+ layout.tabs && /* @__PURE__ */ jsx(ToolbarPrimaryRow, { ...p }),
6032
+ showRibbon && layout.tabs && /* @__PURE__ */ jsxs(Fragment, { children: [
6033
+ /* @__PURE__ */ jsxs(
6034
+ RibbonTabBar,
6035
+ {
6036
+ onToggleCollapsed: () => ribbon.toggleCollapsed(),
6037
+ isTabVisible,
6038
+ activeSection: extraTab ? null : section,
6039
+ contextualTabs: contextual.visible,
6040
+ activeContextual: addIns.active ? null : contextual.active,
6041
+ onSelectSection: (id) => {
6042
+ contextual.select(null);
6043
+ addIns.select(null);
6044
+ onSetToolbarSection(id);
6045
+ ribbon.tabChosen(id);
6046
+ },
6047
+ onSelectContextual: (id) => {
6048
+ addIns.select(null);
6049
+ contextual.select(id);
6050
+ ribbon.tabChosen(id);
6051
+ },
6052
+ addInTabs: addIns.visible,
6053
+ activeAddIn: addIns.active?.id ?? null,
6054
+ onSelectAddIn: (id) => {
6055
+ contextual.select(null);
6056
+ addIns.select(id);
6057
+ ribbon.tabChosen(id);
6058
+ },
6059
+ children: [
6060
+ /* @__PURE__ */ jsx(
6061
+ TabRowActions,
6062
+ {
6063
+ onEnterRehearsalMode: p.canEdit ? p.onEnterRehearsalMode : void 0,
6064
+ onOpenShareDialog: p.onOpenShareDialog,
6065
+ onToggleComments: p.onToggleComments,
6066
+ isCommentsPanelOpen: p.isCommentsPanelOpen,
6067
+ slideCommentCount: p.slideCommentCount,
6068
+ hiddenActions: p.hiddenActions
6069
+ }
6070
+ ),
6071
+ /* @__PURE__ */ jsx(RibbonDisplayButton, { ribbon, state: ribbonState }),
6072
+ isNarrowViewport && /* @__PURE__ */ jsx(
6073
+ "button",
6074
+ {
6075
+ type: "button",
6076
+ onClick: p.onToggleCompactToolbar,
6077
+ className: cn(
6078
+ "px-2 py-1 rounded text-[11px] transition-colors mr-1",
6079
+ isCompactToolbarOpen ? "bg-primary/80 text-white" : "text-muted-foreground hover:text-foreground"
6080
+ ),
6081
+ title: t(
6082
+ isCompactToolbarOpen ? "pptx.ribbon.collapseRibbon" : "pptx.ribbon.expandRibbon"
6083
+ ),
6084
+ children: t(
6085
+ isCompactToolbarOpen ? "pptx.ribbon.collapseRibbon" : "pptx.ribbon.expandRibbon"
6086
+ )
6087
+ }
6088
+ )
6089
+ ]
6090
+ }
5914
6091
  ),
5915
- children: [
5916
- sFil && /* @__PURE__ */ jsx(
5917
- FileSection,
5918
- {
5919
- fileName: p.fileName,
5920
- onClose: () => p.onSetToolbarSection("home"),
5921
- onCreatePresentation: p.onCreatePresentation,
5922
- onOpenFile: p.onOpenFile,
5923
- onOpenRecentFile: p.onOpenRecentFile,
5924
- onExportPng: p.onExportPng,
5925
- onExportPdf: p.onExportPdf,
5926
- onExportVideo: p.onExportVideo,
5927
- onExportGif: p.onExportGif,
5928
- onExportJson: p.onExportJson,
5929
- onSave: p.onSave,
5930
- onSaveAsPptx: p.onSaveAsPptx,
5931
- onSaveAsPpsx: p.onSaveAsPpsx,
5932
- onSaveAsPptm: p.onSaveAsPptm,
5933
- onSaveAsPpt: p.onSaveAsPpt,
5934
- hasMacros: p.hasMacros,
5935
- onCopySlideAsImage: p.onCopySlideAsImage,
5936
- onPrint: p.onPrint,
5937
- onOpenSettings: p.onOpenSettings,
5938
- onOpenShareDialog: p.onOpenShareDialog,
5939
- onOpenDocumentProperties: p.onOpenDocumentProperties,
5940
- onOpenPasswordProtection: p.onOpenPasswordProtection,
5941
- onOpenFontEmbedding: p.onOpenFontEmbedding,
5942
- onOpenDigitalSignatures: p.onOpenDigitalSignatures,
5943
- onOpenVersionHistory: p.onToggleVersionHistory,
5944
- hiddenActions: p.hiddenActions,
5945
- recentPresentationsCount: p.recentPresentationsCount
5946
- }
5947
- ),
5948
- sHome && /* @__PURE__ */ jsx(
5949
- HomeSection,
5950
- {
5951
- canEdit: p.canEdit,
5952
- clipboardPayload: p.clipboardPayload,
5953
- formatPainterActive: p.formatPainterActive,
5954
- canActivateFormatPainter: p.canActivateFormatPainter,
5955
- onCopy: p.onCopy,
5956
- onCut: p.onCut,
5957
- onPaste: p.onPaste,
5958
- onToggleFormatPainter: p.onToggleFormatPainter,
5959
- layoutOptions: p.layoutOptions,
5960
- currentLayoutPath: p.currentLayoutPath,
5961
- loadLayoutPreviews: p.loadLayoutPreviews,
5962
- onInsertSlideFromLayout: p.onInsertSlideFromLayout,
5963
- onApplyLayout: p.onApplyLayout,
5964
- onInsertSlideFromTemplate: p.onInsertSlideFromTemplate,
5965
- templateScheme: p.templateScheme,
5966
- selectedElement: p.selectedElement,
5967
- onResetSlide: p.onResetSlide,
5968
- onAddSection: p.onAddSection
5969
- }
5970
- ),
5971
- sIns && /* @__PURE__ */ jsx(
5972
- InsertSection,
5973
- {
5974
- canEdit: p.canEdit,
5975
- onInsertSlideFromTemplate: p.onInsertSlideFromTemplate,
5976
- templateScheme: p.templateScheme,
5977
- newShapeType: p.newShapeType,
5978
- onSetNewShapeType: p.onSetNewShapeType,
5979
- activeFreeformTool: p.activeFreeformTool,
5980
- onArmFreeformTool: p.onArmFreeformTool,
5981
- onAddTextBox: p.onAddTextBox,
5982
- onAddShape: p.onAddShape,
5983
- onAddTable: p.onAddTable,
5984
- onAddChart: p.onAddChart,
5985
- onOpenChartDialog: p.onOpenChartDialog,
5986
- onAddSmartArt: p.onAddSmartArt,
5987
- onAddEquation: p.onAddEquation,
5988
- onAddActionButton: p.onAddActionButton,
5989
- onInsertField: p.onInsertField,
5990
- onOpenHeaderFooter: p.onOpenHeaderFooter,
5991
- onOpenImagePicker: p.onOpenImagePicker,
5992
- onOpenMediaPicker: p.onOpenMediaPicker,
5993
- hasSelection: Boolean(p.selectedElement),
5994
- onOpenHyperlinkDialog: p.onOpenHyperlinkDialog,
5995
- layoutOptions: p.layoutOptions,
5996
- currentLayoutPath: p.currentLayoutPath,
5997
- onInsertSlideFromLayout: p.onInsertSlideFromLayout,
5998
- onToggleComments: p.onToggleComments,
5999
- isCommentsPanelOpen: p.isCommentsPanelOpen
6000
- }
6001
- ),
6002
- sTxt && /* @__PURE__ */ jsx(
6003
- TextSection,
6004
- {
6005
- canEdit: p.canEdit,
6006
- selectedElement: p.selectedElement,
6007
- tableEditorState: p.tableEditorState,
6008
- onUpdateTextStyle: p.onUpdateTextStyle,
6009
- onToggleBullets: p.onToggleBullets,
6010
- onTransformTextCase: p.onTransformTextCase,
6011
- themeFonts: p.themeFonts,
6012
- embeddedFontFamilies: p.embeddedFontFamilies,
6013
- customFontFamilies: p.customFontFamilies
6014
- }
6015
- ),
6016
- sHome && /* @__PURE__ */ jsx(
6017
- DrawingGroup,
6018
- {
6019
- canEdit: p.canEdit,
6020
- selectedElement: p.selectedElement,
6021
- newShapeType: p.newShapeType,
6022
- onSetNewShapeType: p.onSetNewShapeType,
6023
- onAddShape: p.onAddShape,
6024
- onMoveLayer: p.onMoveLayer,
6025
- onMoveLayerToEdge: p.onMoveLayerToEdge,
6026
- onUpdateElementStyle: p.onUpdateElementStyle
6027
- }
6028
- ),
6029
- sHome && /* @__PURE__ */ jsx(
6030
- EditingSection,
6031
- {
6032
- onToggleFindReplace: p.onToggleFindReplace,
6033
- onSelectAll: p.onSelectAll
6034
- }
6035
- ),
6036
- sDrw && /* @__PURE__ */ jsx(
6037
- DrawSection,
6038
- {
6039
- canEdit: p.canEdit,
6040
- activeTool: p.activeTool,
6041
- drawingColor: p.drawingColor,
6042
- drawingWidth: p.drawingWidth,
6043
- onSetActiveTool: p.onSetActiveTool,
6044
- onSetDrawingColor: p.onSetDrawingColor,
6045
- onSetDrawingWidth: p.onSetDrawingWidth
6046
- }
6047
- ),
6048
- sArr && /* @__PURE__ */ jsx(
6049
- ArrangeSection,
6050
- {
6051
- canEdit: p.canEdit,
6052
- selectedElement: p.selectedElement,
6053
- selectedCount: p.selectedCount,
6054
- selectionGroupable: p.selectionGroupable,
6055
- onAlignElements: p.onAlignElements,
6056
- onDistributeElements: p.onDistributeElements,
6057
- canDistribute: p.canDistribute,
6058
- onFlip: p.onFlip,
6059
- onMoveLayer: p.onMoveLayer,
6060
- onMoveLayerToEdge: p.onMoveLayerToEdge,
6061
- onGroupElements: p.onGroupElements,
6062
- onUngroupElement: p.onUngroupElement,
6063
- onUpdateElementStyle: p.onUpdateElementStyle,
6064
- onDuplicate: p.onDuplicate,
6065
- onDelete: p.onDelete,
6066
- formatPainterActive: p.formatPainterActive,
6067
- onToggleFormatPainter: p.onToggleFormatPainter,
6068
- canActivateFormatPainter: p.canActivateFormatPainter,
6069
- hiddenActions: p.hiddenActions
6070
- }
6071
- ),
6072
- sDes && /* @__PURE__ */ jsx(
6073
- DesignSection,
6074
- {
6075
- canEdit: p.canEdit,
6076
- onToggleThemeGallery: p.onToggleThemeGallery,
6077
- isThemeGalleryOpen: p.isThemeGalleryOpen,
6078
- onToggleThemeEditor: p.onToggleThemeEditor,
6079
- isThemeEditorOpen: p.isThemeEditorOpen,
6080
- onOpenDocumentProperties: p.onOpenDocumentProperties,
6081
- onOpenSlideSize: p.onOpenSlideSize,
6082
- onToggleInspector: p.onToggleInspector,
6083
- isInspectorPaneOpen: p.isInspectorPaneOpen
6084
- }
6092
+ ribbonState.menuOpen && /* @__PURE__ */ jsx(RibbonDisplayMenu, { ribbon, state: ribbonState })
6093
+ ] }),
6094
+ showRibbon && viewerOptions.quickAccess.position === "below" && isPanelVisible(customization, "quickAccessToolbar") && /* @__PURE__ */ jsx(
6095
+ TitleBarElement,
6096
+ {
6097
+ placement: "belowRibbon",
6098
+ input: belowInput,
6099
+ onQuickCommand: p.onQuickCommand
6100
+ }
6101
+ ),
6102
+ showRibbon && /* @__PURE__ */ jsxs(
6103
+ "div",
6104
+ {
6105
+ ref: attachOverflow,
6106
+ "data-pptx-chrome": "ribbon-content",
6107
+ className: cn(
6108
+ // Plain controls stay compact; labelled RibbonGroups opt into stretching.
6109
+ // `RibbonGroupScope` wraps controls in a `display: contents` div, so its
6110
+ // children are this row's flex items too and must not shrink (a shrunk
6111
+ // "Text Box" pill wraps its caption onto two lines).
6112
+ "flex min-h-[82px] items-center gap-0 overflow-x-auto px-1 py-0.5 max-md:min-h-0 max-md:px-1 max-md:py-0.5 flex-nowrap [&>*]:shrink-0 [&>.contents>*]:shrink-0",
6113
+ isNarrowViewport && !isCompactToolbarOpen && "hidden",
6114
+ !commandsShown && "hidden",
6115
+ commandsOverlaid && RIBBON_OVERLAY_CLASS
6085
6116
  ),
6086
- /* @__PURE__ */ jsx(ToolbarLateTabs, { p, section }),
6087
- contextual.active && !addIns.active && /* @__PURE__ */ jsx(ContextualTabSection, { tab: contextual.active, hiddenActions: p.hiddenActions }),
6088
- addIns.active && /* @__PURE__ */ jsx(RibbonAddInSection, { tab: addIns.active })
6089
- ]
6090
- }
6091
- )
6092
- ]
6093
- }
6094
- );
6117
+ children: [
6118
+ sFil && /* @__PURE__ */ jsx(
6119
+ FileSection,
6120
+ {
6121
+ fileName: p.fileName,
6122
+ onClose: () => p.onSetToolbarSection("home"),
6123
+ onCreatePresentation: p.onCreatePresentation,
6124
+ onOpenFile: p.onOpenFile,
6125
+ onOpenRecentFile: p.onOpenRecentFile,
6126
+ onExportPng: p.onExportPng,
6127
+ onExportPdf: p.onExportPdf,
6128
+ onExportVideo: p.onExportVideo,
6129
+ onExportGif: p.onExportGif,
6130
+ onExportJson: p.onExportJson,
6131
+ onSave: p.onSave,
6132
+ onSaveAsPptx: p.onSaveAsPptx,
6133
+ onSaveAsPpsx: p.onSaveAsPpsx,
6134
+ onSaveAsPptm: p.onSaveAsPptm,
6135
+ onSaveAsPpt: p.onSaveAsPpt,
6136
+ hasMacros: p.hasMacros,
6137
+ onCopySlideAsImage: p.onCopySlideAsImage,
6138
+ onPrint: p.onPrint,
6139
+ onOpenSettings: p.onOpenSettings,
6140
+ onOpenShareDialog: p.onOpenShareDialog,
6141
+ onOpenDocumentProperties: p.onOpenDocumentProperties,
6142
+ onOpenPasswordProtection: p.onOpenPasswordProtection,
6143
+ onOpenFontEmbedding: p.onOpenFontEmbedding,
6144
+ onOpenDigitalSignatures: p.onOpenDigitalSignatures,
6145
+ onOpenVersionHistory: p.onToggleVersionHistory,
6146
+ hiddenActions: p.hiddenActions,
6147
+ recentPresentationsCount: p.recentPresentationsCount
6148
+ }
6149
+ ),
6150
+ sHome && /* @__PURE__ */ jsx(
6151
+ HomeSection,
6152
+ {
6153
+ canEdit: p.canEdit,
6154
+ clipboardPayload: p.clipboardPayload,
6155
+ formatPainterActive: p.formatPainterActive,
6156
+ canActivateFormatPainter: p.canActivateFormatPainter,
6157
+ onCopy: p.onCopy,
6158
+ onCut: p.onCut,
6159
+ onPaste: p.onPaste,
6160
+ onToggleFormatPainter: p.onToggleFormatPainter,
6161
+ layoutOptions: p.layoutOptions,
6162
+ currentLayoutPath: p.currentLayoutPath,
6163
+ loadLayoutPreviews: p.loadLayoutPreviews,
6164
+ onInsertSlideFromLayout: p.onInsertSlideFromLayout,
6165
+ onApplyLayout: p.onApplyLayout,
6166
+ onInsertSlideFromTemplate: p.onInsertSlideFromTemplate,
6167
+ templateScheme: p.templateScheme,
6168
+ selectedElement: p.selectedElement,
6169
+ onResetSlide: p.onResetSlide,
6170
+ onAddSection: p.onAddSection
6171
+ }
6172
+ ),
6173
+ sIns && /* @__PURE__ */ jsx(
6174
+ InsertSection,
6175
+ {
6176
+ canEdit: p.canEdit,
6177
+ onInsertSlideFromTemplate: p.onInsertSlideFromTemplate,
6178
+ templateScheme: p.templateScheme,
6179
+ newShapeType: p.newShapeType,
6180
+ onSetNewShapeType: p.onSetNewShapeType,
6181
+ activeFreeformTool: p.activeFreeformTool,
6182
+ onArmFreeformTool: p.onArmFreeformTool,
6183
+ onAddTextBox: p.onAddTextBox,
6184
+ onAddShape: p.onAddShape,
6185
+ onAddTable: p.onAddTable,
6186
+ onAddChart: p.onAddChart,
6187
+ onOpenChartDialog: p.onOpenChartDialog,
6188
+ onAddSmartArt: p.onAddSmartArt,
6189
+ onAddEquation: p.onAddEquation,
6190
+ onAddActionButton: p.onAddActionButton,
6191
+ onInsertField: p.onInsertField,
6192
+ onOpenHeaderFooter: p.onOpenHeaderFooter,
6193
+ onOpenImagePicker: p.onOpenImagePicker,
6194
+ onOpenMediaPicker: p.onOpenMediaPicker,
6195
+ hasSelection: Boolean(p.selectedElement),
6196
+ onOpenHyperlinkDialog: p.onOpenHyperlinkDialog,
6197
+ layoutOptions: p.layoutOptions,
6198
+ currentLayoutPath: p.currentLayoutPath,
6199
+ onInsertSlideFromLayout: p.onInsertSlideFromLayout,
6200
+ onToggleComments: p.onToggleComments,
6201
+ isCommentsPanelOpen: p.isCommentsPanelOpen
6202
+ }
6203
+ ),
6204
+ sTxt && /* @__PURE__ */ jsx(
6205
+ TextSection,
6206
+ {
6207
+ canEdit: p.canEdit,
6208
+ selectedElement: p.selectedElement,
6209
+ tableEditorState: p.tableEditorState,
6210
+ onUpdateTextStyle: p.onUpdateTextStyle,
6211
+ onToggleBullets: p.onToggleBullets,
6212
+ onTransformTextCase: p.onTransformTextCase,
6213
+ themeFonts: p.themeFonts,
6214
+ embeddedFontFamilies: p.embeddedFontFamilies,
6215
+ customFontFamilies: p.customFontFamilies
6216
+ }
6217
+ ),
6218
+ sHome && /* @__PURE__ */ jsx(
6219
+ DrawingGroup,
6220
+ {
6221
+ canEdit: p.canEdit,
6222
+ selectedElement: p.selectedElement,
6223
+ newShapeType: p.newShapeType,
6224
+ onSetNewShapeType: p.onSetNewShapeType,
6225
+ onAddShape: p.onAddShape,
6226
+ onMoveLayer: p.onMoveLayer,
6227
+ onMoveLayerToEdge: p.onMoveLayerToEdge,
6228
+ onUpdateElementStyle: p.onUpdateElementStyle
6229
+ }
6230
+ ),
6231
+ sHome && /* @__PURE__ */ jsx(
6232
+ EditingSection,
6233
+ {
6234
+ onToggleFindReplace: p.onToggleFindReplace,
6235
+ onSelectAll: p.onSelectAll
6236
+ }
6237
+ ),
6238
+ sDrw && /* @__PURE__ */ jsx(
6239
+ DrawSection,
6240
+ {
6241
+ canEdit: p.canEdit,
6242
+ activeTool: p.activeTool,
6243
+ drawingColor: p.drawingColor,
6244
+ drawingWidth: p.drawingWidth,
6245
+ onSetActiveTool: p.onSetActiveTool,
6246
+ onSetDrawingColor: p.onSetDrawingColor,
6247
+ onSetDrawingWidth: p.onSetDrawingWidth
6248
+ }
6249
+ ),
6250
+ sArr && /* @__PURE__ */ jsx(
6251
+ ArrangeSection,
6252
+ {
6253
+ canEdit: p.canEdit,
6254
+ selectedElement: p.selectedElement,
6255
+ selectedCount: p.selectedCount,
6256
+ selectionGroupable: p.selectionGroupable,
6257
+ onAlignElements: p.onAlignElements,
6258
+ onDistributeElements: p.onDistributeElements,
6259
+ canDistribute: p.canDistribute,
6260
+ onFlip: p.onFlip,
6261
+ onMoveLayer: p.onMoveLayer,
6262
+ onMoveLayerToEdge: p.onMoveLayerToEdge,
6263
+ onGroupElements: p.onGroupElements,
6264
+ onUngroupElement: p.onUngroupElement,
6265
+ onUpdateElementStyle: p.onUpdateElementStyle,
6266
+ onDuplicate: p.onDuplicate,
6267
+ onDelete: p.onDelete,
6268
+ formatPainterActive: p.formatPainterActive,
6269
+ onToggleFormatPainter: p.onToggleFormatPainter,
6270
+ canActivateFormatPainter: p.canActivateFormatPainter,
6271
+ hiddenActions: p.hiddenActions
6272
+ }
6273
+ ),
6274
+ sDes && /* @__PURE__ */ jsx(
6275
+ DesignSection,
6276
+ {
6277
+ canEdit: p.canEdit,
6278
+ onToggleThemeGallery: p.onToggleThemeGallery,
6279
+ isThemeGalleryOpen: p.isThemeGalleryOpen,
6280
+ onToggleThemeEditor: p.onToggleThemeEditor,
6281
+ isThemeEditorOpen: p.isThemeEditorOpen,
6282
+ onOpenDocumentProperties: p.onOpenDocumentProperties,
6283
+ onOpenSlideSize: p.onOpenSlideSize,
6284
+ onToggleInspector: p.onToggleInspector,
6285
+ isInspectorPaneOpen: p.isInspectorPaneOpen
6286
+ }
6287
+ ),
6288
+ /* @__PURE__ */ jsx(ToolbarLateTabs, { p, section }),
6289
+ contextual.active && !addIns.active && /* @__PURE__ */ jsx(ContextualTabSection, { tab: contextual.active, hiddenActions: p.hiddenActions }),
6290
+ addIns.active && /* @__PURE__ */ jsx(RibbonAddInSection, { tab: addIns.active })
6291
+ ]
6292
+ }
6293
+ )
6294
+ ]
6295
+ }
6296
+ )
6297
+ ] });
6095
6298
  }
6096
6299
  function CanvasGuides({ guides, onDeleteGuide, onStartGuideDrag }) {
6097
6300
  const { t } = useTranslation();
@@ -7796,29 +7999,10 @@ function useCanvasEventHandlers({
7796
7999
  onMoveGuide
7797
8000
  }) {
7798
8001
  const elementFindHighlightsMap = useMemo(() => {
7799
- const map = /* @__PURE__ */ new Map();
7800
- if (!findResults || findResults.length === 0 || activeSlideIndex === null) {
7801
- return map;
7802
- }
7803
- for (let i = 0; i < findResults.length; i++) {
7804
- const r = findResults[i];
7805
- if (r.slideIndex !== activeSlideIndex) {
7806
- continue;
7807
- }
7808
- if (!map.has(r.elementId)) {
7809
- map.set(r.elementId, /* @__PURE__ */ new Map());
7810
- }
7811
- const elMap = map.get(r.elementId);
7812
- if (!elMap.has(r.segmentIndex)) {
7813
- elMap.set(r.segmentIndex, []);
7814
- }
7815
- elMap.get(r.segmentIndex).push({
7816
- startOffset: r.startOffset,
7817
- length: r.length,
7818
- isCurrent: i === (findResultIndex ?? -1)
7819
- });
8002
+ if (!findResults || findResults.length === 0 || activeSlideIndex === void 0) {
8003
+ return /* @__PURE__ */ new Map();
7820
8004
  }
7821
- return map;
8005
+ return findTextHighlightsByElement(findResults, findResultIndex ?? -1, activeSlideIndex);
7822
8006
  }, [findResults, findResultIndex, activeSlideIndex]);
7823
8007
  const selectedBounds = useMemo(() => {
7824
8008
  if (!selectedElement) {
@@ -8462,7 +8646,10 @@ function SlideCanvas(props) {
8462
8646
  props.registerInlineEditReader
8463
8647
  ]
8464
8648
  );
8465
- return /* @__PURE__ */ jsx(InlineCollaborationContext.Provider, { value, children: /* @__PURE__ */ jsx(SlideCanvasContent, { ...props }) });
8649
+ const inherited = useContext(ElementRenderErrorReportingContext);
8650
+ const reporter = props.onElementRenderError ?? inherited?.onElementRenderError;
8651
+ const errorReporting = useMemo(() => ({ onElementRenderError: reporter }), [reporter]);
8652
+ return /* @__PURE__ */ jsx(ElementRenderErrorReportingContext.Provider, { value: errorReporting, children: /* @__PURE__ */ jsx(InlineCollaborationContext.Provider, { value, children: /* @__PURE__ */ jsx(SlideCanvasContent, { ...props }) }) });
8466
8653
  }
8467
8654
  function SlideCanvasContent({
8468
8655
  imagePaste,
@@ -11297,7 +11484,8 @@ function ReadingViewStage({
11297
11484
  slide,
11298
11485
  templateElements,
11299
11486
  canvasSize,
11300
- scale
11487
+ scale,
11488
+ onElementRenderError
11301
11489
  }) {
11302
11490
  if (scale <= 0) {
11303
11491
  return null;
@@ -11341,7 +11529,8 @@ function ReadingViewStage({
11341
11529
  element,
11342
11530
  activeSlide: slide,
11343
11531
  allSlides: [slide],
11344
- zIndex: index
11532
+ zIndex: index,
11533
+ onElementRenderError
11345
11534
  },
11346
11535
  element.id
11347
11536
  ))
@@ -12583,28 +12772,11 @@ function ComparePanel({
12583
12772
  )) })
12584
12773
  ] });
12585
12774
  }
12586
- function getPasswordStrength(password) {
12587
- if (!password) {
12588
- return 0;
12589
- }
12590
- let score = 0;
12591
- if (password.length >= 8) {
12592
- score++;
12593
- }
12594
- if (password.length >= 12) {
12595
- score++;
12596
- }
12597
- if (/[A-Z]/u.test(password) && /[a-z]/u.test(password)) {
12598
- score++;
12599
- }
12600
- if (/\d/u.test(password)) {
12601
- score++;
12602
- }
12603
- if (/[^A-Za-z0-9]/u.test(password)) {
12604
- score++;
12605
- }
12606
- return Math.min(score, 4);
12607
- }
12775
+ var PASSWORD_ERROR_KEYS = {
12776
+ required: "pptx.security.errorPasswordRequired",
12777
+ mismatch: "pptx.security.errorPasswordMismatch",
12778
+ tooShort: "pptx.security.errorPasswordTooShort"
12779
+ };
12608
12780
  var STRENGTH_COLORS = [
12609
12781
  "bg-red-500",
12610
12782
  "bg-orange-500",
@@ -12639,16 +12811,9 @@ function PasswordProtectionDialog({
12639
12811
  }, [strength, password, t]);
12640
12812
  const handleSubmit = useCallback(() => {
12641
12813
  setError("");
12642
- if (!password) {
12643
- setError(t("pptx.security.errorPasswordRequired"));
12644
- return;
12645
- }
12646
- if (password !== confirmPassword) {
12647
- setError(t("pptx.security.errorPasswordMismatch"));
12648
- return;
12649
- }
12650
- if (password.length < 4) {
12651
- setError(t("pptx.security.errorPasswordTooShort"));
12814
+ const invalid = validatePasswordPair(password, confirmPassword);
12815
+ if (invalid) {
12816
+ setError(t(PASSWORD_ERROR_KEYS[invalid]));
12652
12817
  return;
12653
12818
  }
12654
12819
  onSetPassword(password);
@@ -13098,30 +13263,18 @@ function DocumentPropertiesDialog({
13098
13263
  const handleCoreFieldChange = useCallback((key, value) => {
13099
13264
  setDraftCore((prev) => ({ ...prev, [key]: value }));
13100
13265
  }, []);
13101
- const isDirty = useMemo(() => {
13102
- const coreChanged = SUMMARY_FIELDS.some(
13103
- ({ key }) => (draftCore[key] ?? "") !== (coreProperties[key] ?? "")
13104
- );
13105
- if (coreChanged) {
13106
- return true;
13107
- }
13108
- const appCompanyChanged = (draftApp.company ?? "") !== (appProperties?.company ?? "");
13109
- const appManagerChanged = (draftApp.manager ?? "") !== (appProperties?.manager ?? "");
13110
- if (appCompanyChanged || appManagerChanged) {
13111
- return true;
13112
- }
13113
- if (draftCustom.length !== customProperties.length) {
13114
- return true;
13115
- }
13116
- return draftCustom.some(
13117
- (p, i) => p.name !== customProperties[i]?.name || p.value !== customProperties[i]?.value || p.type !== customProperties[i]?.type
13118
- );
13119
- }, [draftCore, draftCustom, draftApp, coreProperties, customProperties, appProperties]);
13266
+ const isDirty = useMemo(
13267
+ () => documentPropertiesChanged(
13268
+ { core: coreProperties, custom: customProperties, app: appProperties },
13269
+ { core: draftCore, custom: draftCustom, app: draftApp }
13270
+ ),
13271
+ [draftCore, draftCustom, draftApp, coreProperties, customProperties, appProperties]
13272
+ );
13120
13273
  const handleUpdateDraftApp = useCallback((updates) => {
13121
13274
  setDraftApp((prev) => ({ ...prev, ...updates }));
13122
13275
  }, []);
13123
13276
  const handleSave = useCallback(() => {
13124
- const appChanged = (draftApp.company ?? "") !== (appProperties?.company ?? "") || (draftApp.manager ?? "") !== (appProperties?.manager ?? "");
13277
+ const appChanged = appPropertiesChanged(appProperties, draftApp);
13125
13278
  onSave(draftCore, draftCustom, appChanged ? draftApp : void 0);
13126
13279
  onClose();
13127
13280
  }, [draftCore, draftCustom, draftApp, appProperties, onSave, onClose]);
@@ -13855,7 +14008,8 @@ function ScaledSlidePreviewImpl({
13855
14008
  slide,
13856
14009
  templateElements,
13857
14010
  canvasSize,
13858
- className
14011
+ className,
14012
+ onElementRenderError
13859
14013
  }) {
13860
14014
  const containerRef = useRef(null);
13861
14015
  const [containerWidth, setContainerWidth] = useState(0);
@@ -13924,7 +14078,8 @@ function ScaledSlidePreviewImpl({
13924
14078
  element,
13925
14079
  activeSlide: slide,
13926
14080
  allSlides: [slide],
13927
- zIndex: index
14081
+ zIndex: index,
14082
+ onElementRenderError
13928
14083
  },
13929
14084
  element.id
13930
14085
  ))
@@ -13935,6 +14090,9 @@ function ScaledSlidePreviewImpl({
13935
14090
  );
13936
14091
  }
13937
14092
  function scaledSlidePreviewPropsEqual(prev, next) {
14093
+ if (prev.onElementRenderError !== next.onElementRenderError) {
14094
+ return false;
14095
+ }
13938
14096
  if (prev.slide !== next.slide) {
13939
14097
  return false;
13940
14098
  }
@@ -27008,11 +27166,7 @@ function ShowSlidesFieldset({
27008
27166
  name: "showSlides",
27009
27167
  value: "range",
27010
27168
  checked: showSlidesMode === "range",
27011
- onChange: () => update({
27012
- showSlidesMode: "range",
27013
- showSlidesFrom: draft.showSlidesFrom ?? 1,
27014
- showSlidesTo: draft.showSlidesTo ?? slideCount
27015
- }),
27169
+ onChange: () => update({ showSlidesMode: "range" }),
27016
27170
  className: "accent-primary"
27017
27171
  }
27018
27172
  ),
@@ -27063,10 +27217,7 @@ function ShowSlidesFieldset({
27063
27217
  name: "showSlides",
27064
27218
  value: "customShow",
27065
27219
  checked: showSlidesMode === "customShow",
27066
- onChange: () => update({
27067
- showSlidesMode: "customShow",
27068
- showSlidesCustomShowId: draft.showSlidesCustomShowId ?? customShows[0]?.id
27069
- }),
27220
+ onChange: () => update({ showSlidesMode: "customShow" }),
27070
27221
  className: "accent-primary"
27071
27222
  }
27072
27223
  ),
@@ -27099,9 +27250,12 @@ function SetUpSlideShowDialog({
27099
27250
  const [draft, setDraft] = useState({
27100
27251
  ...properties
27101
27252
  });
27102
- const update = useCallback((patch) => {
27103
- setDraft((prev) => ({ ...prev, ...patch }));
27104
- }, []);
27253
+ const update = useCallback(
27254
+ (patch) => {
27255
+ setDraft((prev) => applySlideShowSettingsPatch(prev, patch, { slideCount, customShows }));
27256
+ },
27257
+ [slideCount, customShows]
27258
+ );
27105
27259
  const handleSave = useCallback(() => {
27106
27260
  onSave(draft);
27107
27261
  onClose();
@@ -27155,10 +27309,7 @@ function SetUpSlideShowDialog({
27155
27309
  name: "showType",
27156
27310
  value,
27157
27311
  checked: showType === value,
27158
- onChange: () => update({
27159
- showType: value,
27160
- ...value === "kiosk" ? { loopContinuously: true } : {}
27161
- }),
27312
+ onChange: () => update({ showType: value }),
27162
27313
  className: "accent-primary"
27163
27314
  }
27164
27315
  ),
@@ -28103,10 +28254,10 @@ function HyperlinkEditDialog({
28103
28254
  const { t } = useTranslation();
28104
28255
  const { panelStyle, handlers: dragHandlers } = useModalDismissDrag(onCancel);
28105
28256
  const inputRef = useRef(null);
28106
- const detectedType = detectTargetType(initialUrl, initialAction);
28107
- const emailParts = parseEmailUrl(initialUrl || "");
28108
- const detectedSlide = parseSlideFromUrl(initialUrl, initialAction);
28109
- const detectedVerb = initialAction ? ACTION_VERB_MAP[initialAction.toLowerCase()] || "nextSlide" : "nextSlide";
28257
+ const detectedType = detectHyperlinkTargetType(initialUrl, initialAction);
28258
+ const emailParts = parseHyperlinkEmailUrl(initialUrl || "");
28259
+ const detectedSlide = parseHyperlinkSlideNumber(initialUrl, initialAction);
28260
+ const detectedVerb = initialAction ? HYPERLINK_ACTION_VERB_MAP[initialAction.toLowerCase()] || "nextSlide" : "nextSlide";
28110
28261
  const [targetType, setTargetType] = useState(detectedType);
28111
28262
  const [url, setUrl] = useState(
28112
28263
  detectedType === "email" || detectedType === "slide" || detectedType === "action" ? "" : initialUrl || ""
@@ -28729,10 +28880,13 @@ function ViewerToolbarSection(props) {
28729
28880
  onEnableEditing,
28730
28881
  onSetSnapToGrid,
28731
28882
  onSetSnapToShape,
28732
- onSetShowGuides
28883
+ onSetShowGuides,
28884
+ ribbonDisplay
28733
28885
  } = props;
28734
28886
  const { t } = useTranslation();
28735
28887
  const customization = useViewerCustomizationContext();
28888
+ const ribbon = useRibbonDisplayFallback(ribbonDisplay);
28889
+ const ribbonLayout = useController(ribbon).layout;
28736
28890
  const handleAddAnimation = useCallback(
28737
28891
  (preset, group) => {
28738
28892
  if (!selectedElement || !activeSlide) {
@@ -28978,7 +29132,7 @@ function ViewerToolbarSection(props) {
28978
29132
  [onSetMode, onPresentFromBeginning, printHandlers, exportHandlers, slideOps, s, zoom]
28979
29133
  );
28980
29134
  return /* @__PURE__ */ jsxs(Fragment, { children: [
28981
- !dialogs.isNarrowViewport && isPanelVisible(customization, "titleBar") && /* @__PURE__ */ jsx(
29135
+ !dialogs.isNarrowViewport && isPanelVisible(customization, "titleBar") && ribbonLayout.titleBar && /* @__PURE__ */ jsx(
28982
29136
  TitleBar,
28983
29137
  {
28984
29138
  mode,
@@ -29012,6 +29166,7 @@ function ViewerToolbarSection(props) {
29012
29166
  canEdit,
29013
29167
  isProtectedView,
29014
29168
  onEnableEditing,
29169
+ ribbonDisplay: ribbon,
29015
29170
  onQuickCommand: handleQuickAccessCommand,
29016
29171
  hiddenActions,
29017
29172
  recentPresentationsCount,
@@ -30202,7 +30357,13 @@ function useStageAnimationTriggers(root, slide, triggers, onStageClick) {
30202
30357
  }
30203
30358
  };
30204
30359
  }
30205
- function PresentationStage({
30360
+ function PresentationStage(props) {
30361
+ const inherited = useContext(ElementRenderErrorReportingContext);
30362
+ const reporter = props.onElementRenderError ?? inherited?.onElementRenderError;
30363
+ const errorReporting = useMemo(() => ({ onElementRenderError: reporter }), [reporter]);
30364
+ return /* @__PURE__ */ jsx(ElementRenderErrorReportingContext.Provider, { value: errorReporting, children: /* @__PURE__ */ jsx(PresentationStageContent, { ...props }) });
30365
+ }
30366
+ function PresentationStageContent({
30206
30367
  activeSlide,
30207
30368
  templateElements,
30208
30369
  canvasSize,
@@ -34045,7 +34206,7 @@ var PowerPointViewerComponent = /* @__PURE__ */ forwardRef(
34045
34206
  defaultLocale: props.defaultLocale,
34046
34207
  availableLocales: props.availableLocales,
34047
34208
  onLocaleChange: props.onLocaleChange,
34048
- children: /* @__PURE__ */ jsx(PowerPointViewerBody, { ...props, ref })
34209
+ children: /* @__PURE__ */ jsx(ElementRenderErrorScope, { onElementRenderError: props.onElementRenderError, children: /* @__PURE__ */ jsx(PowerPointViewerBody, { ...props, ref }) })
34049
34210
  }
34050
34211
  );
34051
34212
  }
@@ -34056,6 +34217,8 @@ var PowerPointViewerBody = /* @__PURE__ */ forwardRef(
34056
34217
  const {
34057
34218
  content: incomingContent,
34058
34219
  fonts = [],
34220
+ ribbonDisplay,
34221
+ onRibbonDisplayChange,
34059
34222
  filePath: hostFilePath,
34060
34223
  fileName: hostFileName,
34061
34224
  canEdit: canEditProp = false,
@@ -34289,6 +34452,12 @@ var PowerPointViewerBody = /* @__PURE__ */ forwardRef(
34289
34452
  activeSlide,
34290
34453
  selectedElement
34291
34454
  } = state;
34455
+ const ribbonDisplayController = useRibbonDisplayController({
34456
+ ribbonDisplay,
34457
+ onRibbonDisplayChange,
34458
+ collapseRibbonAutomatically: viewerOptions.general.collapseRibbonAutomatically,
34459
+ rootRef: containerRef
34460
+ });
34292
34461
  useLoadNotifications({
34293
34462
  loading,
34294
34463
  error,
@@ -34434,7 +34603,10 @@ var PowerPointViewerBody = /* @__PURE__ */ forwardRef(
34434
34603
  canvasSize,
34435
34604
  selectedElements: state.selectedElements,
34436
34605
  fitPadding: props.fitPadding,
34437
- maxFitScale: props.maxFitScale
34606
+ maxFitScale: props.maxFitScale,
34607
+ // Nothing to select in a read-only view, so a plain drag pans instead.
34608
+ dragPans: mode === "preview",
34609
+ activeSlideId: activeSlide?.id
34438
34610
  });
34439
34611
  const { setIsDirty } = state;
34440
34612
  const onChangeCallback = useRef(onChange);
@@ -34682,6 +34854,14 @@ var PowerPointViewerBody = /* @__PURE__ */ forwardRef(
34682
34854
  filePath,
34683
34855
  fileName,
34684
34856
  storage,
34857
+ // The host persisted the current revision: its work is in the file, so the recovery
34858
+ // copy goes unless Options > Save asks to keep the last AutoRecover version.
34859
+ discardRecoveryOnHostSave: () => {
34860
+ if (filePath && shouldDiscardAutosaveOnSuccessfulSave(viewerOptions)) {
34861
+ void deleteAutosaveSnapshot(filePath, storage).catch(() => {
34862
+ });
34863
+ }
34864
+ },
34685
34865
  // A failed Save / Save As: the host's `onError`, and the save-failed notice for the user.
34686
34866
  onSaveError: (saveError) => {
34687
34867
  onError?.(saveFailureMessage(saveError));
@@ -35046,6 +35226,7 @@ var PowerPointViewerBody = /* @__PURE__ */ forwardRef(
35046
35226
  onToggleAiPanel: aiPanel.toggle,
35047
35227
  isProtectedView,
35048
35228
  onEnableEditing: hostCanEdit && isEditingAllowed(customizationResolved) ? handleEnableEditing : void 0,
35229
+ ribbonDisplay: ribbonDisplayController,
35049
35230
  onSetSnapToGrid: viewPreferencesSync.handleSetSnapToGrid,
35050
35231
  onSetSnapToShape: viewPreferencesSync.handleSetSnapToShape,
35051
35232
  onSetShowGuides: viewPreferencesSync.handleSetShowGuides