box-content-preview 3.120.0 → 3.123.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 (112) hide show
  1. package/README.md +7 -7
  2. package/dist/lib/i18n/bn-IN.js +9 -4
  3. package/dist/lib/i18n/da-DK.js +12 -7
  4. package/dist/lib/i18n/de-DE.js +13 -8
  5. package/dist/lib/i18n/en-AU.js +10 -5
  6. package/dist/lib/i18n/en-CA.js +8 -3
  7. package/dist/lib/i18n/en-GB.js +10 -5
  8. package/dist/lib/i18n/en-US.js +7 -0
  9. package/dist/lib/i18n/en-x-pseudo.js +7 -0
  10. package/dist/lib/i18n/es-419.js +12 -7
  11. package/dist/lib/i18n/es-ES.js +12 -7
  12. package/dist/lib/i18n/fi-FI.js +12 -7
  13. package/dist/lib/i18n/fr-CA.js +12 -7
  14. package/dist/lib/i18n/fr-FR.js +12 -7
  15. package/dist/lib/i18n/hi-IN.js +9 -4
  16. package/dist/lib/i18n/it-IT.js +12 -7
  17. package/dist/lib/i18n/ja-JP.js +9 -4
  18. package/dist/lib/i18n/ko-KR.js +12 -7
  19. package/dist/lib/i18n/nb-NO.js +12 -7
  20. package/dist/lib/i18n/nl-NL.js +12 -7
  21. package/dist/lib/i18n/pl-PL.js +12 -7
  22. package/dist/lib/i18n/pt-BR.js +12 -7
  23. package/dist/lib/i18n/ru-RU.js +12 -7
  24. package/dist/lib/i18n/sv-SE.js +12 -7
  25. package/dist/lib/i18n/tr-TR.js +12 -7
  26. package/dist/lib/i18n/zh-CN.js +12 -7
  27. package/dist/lib/i18n/zh-TW.js +25 -20
  28. package/dist/lib/index.css +13 -4
  29. package/dist/lib/index.js +1580 -402
  30. package/dist/lib/pdfjs-images/altText_add.svg +3 -0
  31. package/dist/lib/pdfjs-images/altText_disclaimer.svg +3 -0
  32. package/dist/lib/pdfjs-images/altText_done.svg +3 -0
  33. package/dist/lib/pdfjs-images/altText_spinner.svg +30 -0
  34. package/dist/lib/pdfjs-images/altText_warning.svg +3 -0
  35. package/dist/lib/pdfjs-images/annotation-check.svg +11 -0
  36. package/dist/lib/pdfjs-images/annotation-comment.svg +16 -0
  37. package/dist/lib/pdfjs-images/annotation-help.svg +26 -0
  38. package/dist/lib/pdfjs-images/annotation-insert.svg +10 -0
  39. package/dist/lib/pdfjs-images/annotation-key.svg +11 -0
  40. package/dist/lib/pdfjs-images/annotation-newparagraph.svg +11 -0
  41. package/dist/lib/pdfjs-images/annotation-noicon.svg +7 -0
  42. package/dist/lib/pdfjs-images/annotation-note.svg +42 -0
  43. package/dist/lib/pdfjs-images/annotation-paperclip.svg +6 -0
  44. package/dist/lib/pdfjs-images/annotation-paragraph.svg +16 -0
  45. package/dist/lib/pdfjs-images/annotation-pushpin.svg +7 -0
  46. package/dist/lib/pdfjs-images/checkmark.svg +5 -0
  47. package/dist/lib/pdfjs-images/comment-actionsButton.svg +3 -0
  48. package/dist/lib/pdfjs-images/comment-closeButton.svg +3 -0
  49. package/dist/lib/pdfjs-images/comment-editButton.svg +8 -0
  50. package/dist/lib/pdfjs-images/comment-popup-editButton.svg +5 -0
  51. package/dist/lib/pdfjs-images/cursor-editorFreeHighlight.svg +6 -0
  52. package/dist/lib/pdfjs-images/cursor-editorFreeText.svg +3 -0
  53. package/dist/lib/pdfjs-images/cursor-editorInk.svg +4 -0
  54. package/dist/lib/pdfjs-images/cursor-editorTextHighlight.svg +8 -0
  55. package/dist/lib/pdfjs-images/editor-toolbar-delete.svg +5 -0
  56. package/dist/lib/pdfjs-images/editor-toolbar-edit.svg +3 -0
  57. package/dist/lib/pdfjs-images/findbarButton-next.svg +3 -0
  58. package/dist/lib/pdfjs-images/findbarButton-previous.svg +3 -0
  59. package/dist/lib/pdfjs-images/gv-toolbarButton-download.svg +3 -0
  60. package/dist/lib/pdfjs-images/loading-icon.gif +0 -0
  61. package/dist/lib/pdfjs-images/loading.svg +1 -0
  62. package/dist/lib/pdfjs-images/messageBar_closingButton.svg +3 -0
  63. package/dist/lib/pdfjs-images/messageBar_info.svg +3 -0
  64. package/dist/lib/pdfjs-images/messageBar_warning.svg +3 -0
  65. package/dist/lib/pdfjs-images/pages_closeButton.svg +3 -0
  66. package/dist/lib/pdfjs-images/pages_selected.svg +7 -0
  67. package/dist/lib/pdfjs-images/pages_viewArrow.svg +3 -0
  68. package/dist/lib/pdfjs-images/pages_viewButton.svg +3 -0
  69. package/dist/lib/pdfjs-images/secondaryToolbarButton-documentProperties.svg +3 -0
  70. package/dist/lib/pdfjs-images/secondaryToolbarButton-firstPage.svg +3 -0
  71. package/dist/lib/pdfjs-images/secondaryToolbarButton-handTool.svg +3 -0
  72. package/dist/lib/pdfjs-images/secondaryToolbarButton-lastPage.svg +3 -0
  73. package/dist/lib/pdfjs-images/secondaryToolbarButton-rotateCcw.svg +3 -0
  74. package/dist/lib/pdfjs-images/secondaryToolbarButton-rotateCw.svg +3 -0
  75. package/dist/lib/pdfjs-images/secondaryToolbarButton-scrollHorizontal.svg +3 -0
  76. package/dist/lib/pdfjs-images/secondaryToolbarButton-scrollPage.svg +3 -0
  77. package/dist/lib/pdfjs-images/secondaryToolbarButton-scrollVertical.svg +3 -0
  78. package/dist/lib/pdfjs-images/secondaryToolbarButton-scrollWrapped.svg +3 -0
  79. package/dist/lib/pdfjs-images/secondaryToolbarButton-selectTool.svg +3 -0
  80. package/dist/lib/pdfjs-images/secondaryToolbarButton-spreadEven.svg +3 -0
  81. package/dist/lib/pdfjs-images/secondaryToolbarButton-spreadNone.svg +3 -0
  82. package/dist/lib/pdfjs-images/secondaryToolbarButton-spreadOdd.svg +3 -0
  83. package/dist/lib/pdfjs-images/signature-properties-row-check.svg +4 -0
  84. package/dist/lib/pdfjs-images/toolbarButton-bookmark.svg +3 -0
  85. package/dist/lib/pdfjs-images/toolbarButton-currentOutlineItem.svg +3 -0
  86. package/dist/lib/pdfjs-images/toolbarButton-download.svg +4 -0
  87. package/dist/lib/pdfjs-images/toolbarButton-editorFreeText.svg +5 -0
  88. package/dist/lib/pdfjs-images/toolbarButton-editorHighlight.svg +6 -0
  89. package/dist/lib/pdfjs-images/toolbarButton-editorInk.svg +4 -0
  90. package/dist/lib/pdfjs-images/toolbarButton-editorSignature.svg +6 -0
  91. package/dist/lib/pdfjs-images/toolbarButton-editorStamp.svg +8 -0
  92. package/dist/lib/pdfjs-images/toolbarButton-menuArrow.svg +3 -0
  93. package/dist/lib/pdfjs-images/toolbarButton-menuArrowNova.svg +3 -0
  94. package/dist/lib/pdfjs-images/toolbarButton-openFile.svg +3 -0
  95. package/dist/lib/pdfjs-images/toolbarButton-pageDown.svg +3 -0
  96. package/dist/lib/pdfjs-images/toolbarButton-pageUp.svg +3 -0
  97. package/dist/lib/pdfjs-images/toolbarButton-presentationMode.svg +3 -0
  98. package/dist/lib/pdfjs-images/toolbarButton-print.svg +3 -0
  99. package/dist/lib/pdfjs-images/toolbarButton-search.svg +3 -0
  100. package/dist/lib/pdfjs-images/toolbarButton-secondaryToolbarToggle.svg +3 -0
  101. package/dist/lib/pdfjs-images/toolbarButton-signaturePropertiesError.svg +7 -0
  102. package/dist/lib/pdfjs-images/toolbarButton-signaturePropertiesVerified.svg +7 -0
  103. package/dist/lib/pdfjs-images/toolbarButton-viewAttachments.svg +3 -0
  104. package/dist/lib/pdfjs-images/toolbarButton-viewLayers.svg +3 -0
  105. package/dist/lib/pdfjs-images/toolbarButton-viewOutline.svg +3 -0
  106. package/dist/lib/pdfjs-images/toolbarButton-viewThumbnail.svg +3 -0
  107. package/dist/lib/pdfjs-images/toolbarButton-viewsManagerToggle.svg +3 -0
  108. package/dist/lib/pdfjs-images/toolbarButton-zoomIn.svg +3 -0
  109. package/dist/lib/pdfjs-images/toolbarButton-zoomOut.svg +3 -0
  110. package/dist/lib/pdfjs-images/treeitem-collapsed.svg +1 -0
  111. package/dist/lib/pdfjs-images/treeitem-expanded.svg +1 -0
  112. package/package.json +1 -1
package/dist/lib/index.js CHANGED
@@ -51,22 +51,21 @@ import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Me
51
51
  import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_Minus_cc9df143_default__ } from "@box/blueprint-web-assets/icons/Medium/Minus";
52
52
  import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_Plus_aaa7b14f_default__ } from "@box/blueprint-web-assets/icons/Medium/Plus";
53
53
  import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_CheckmarkCircle_e8bd4624_default__ } from "@box/blueprint-web-assets/icons/Medium/CheckmarkCircle";
54
- import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_XMark_07fbe0f0_default__ } from "@box/blueprint-web-assets/icons/Medium/XMark";
55
54
  import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_PencilTip_154ad3fd_default__ } from "@box/blueprint-web-assets/icons/Medium/PencilTip";
56
55
  import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_SquarePlus_c11758f1_default__ } from "@box/blueprint-web-assets/icons/Medium/SquarePlus";
57
56
  import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_TCursorHighlight_508374cb_default__ } from "@box/blueprint-web-assets/icons/Medium/TCursorHighlight";
58
- import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_Search_ef3e4aba_default__ } from "@box/blueprint-web-assets/icons/Medium/Search";
57
+ import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_Comment_c700dfbc_default__ } from "@box/blueprint-web-assets/icons/Medium/Comment";
59
58
  import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_GridView_ac92b674_default__ } from "@box/blueprint-web-assets/icons/Medium/GridView";
59
+ import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_Nav_d41e959a_default__ } from "@box/blueprint-web-assets/icons/Medium/Nav";
60
+ import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_RotateLeft_c726d679_default__ } from "@box/blueprint-web-assets/icons/Medium/RotateLeft";
61
+ import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_Search_ef3e4aba_default__ } from "@box/blueprint-web-assets/icons/Medium/Search";
62
+ import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_XMark_07fbe0f0_default__ } from "@box/blueprint-web-assets/icons/Medium/XMark";
63
+ import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_EllipsisVertical_06d33c4b_default__ } from "@box/blueprint-web-assets/icons/Medium/EllipsisVertical";
60
64
  import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_ChevronDown_a545a634_default__ } from "@box/blueprint-web-assets/icons/Medium/ChevronDown";
61
65
  import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_ChevronUp_d399c022_default__ } from "@box/blueprint-web-assets/icons/Medium/ChevronUp";
62
- import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_RotateLeft_c726d679_default__ } from "@box/blueprint-web-assets/icons/Medium/RotateLeft";
63
- import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_Nav_d41e959a_default__ } from "@box/blueprint-web-assets/icons/Medium/Nav";
64
66
  import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_MediumFilled_Nav_ae6d790f_default__ } from "@box/blueprint-web-assets/icons/MediumFilled/Nav";
65
- import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_Checkmark_52a58454_default__ } from "@box/blueprint-web-assets/icons/Medium/Checkmark";
66
- import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_Download_0dc63cde_default__ } from "@box/blueprint-web-assets/icons/Medium/Download";
67
- import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_Ellipsis_9a96c07b_default__ } from "@box/blueprint-web-assets/icons/Medium/Ellipsis";
68
- import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_Expand_92c6b888_default__ } from "@box/blueprint-web-assets/icons/Medium/Expand";
69
- import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_Trash_28211f44_default__ } from "@box/blueprint-web-assets/icons/Medium/Trash";
67
+ import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_MediumFilled_Pause_0cc1f701_default__ } from "@box/blueprint-web-assets/icons/MediumFilled/Pause";
68
+ import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_MediumFilled_Play_ee47c078_default__ } from "@box/blueprint-web-assets/icons/MediumFilled/Play";
70
69
  import { PreviewLoading as __WEBPACK_EXTERNAL_MODULE_box_ui_elements_es_components_preview_386c8d2b_PreviewLoading__, getIcon as __WEBPACK_EXTERNAL_MODULE_box_ui_elements_es_components_preview_386c8d2b_getIcon__ } from "box-ui-elements/es/components/preview";
71
70
  import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_ChevronLeft_8bf40851_default__ } from "@box/blueprint-web-assets/icons/Medium/ChevronLeft";
72
71
  import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_ChevronRight_619e782c_default__ } from "@box/blueprint-web-assets/icons/Medium/ChevronRight";
@@ -1113,7 +1112,7 @@ const DEFAULT_LANGUAGE = 'en-US';
1113
1112
  const MESSAGE_KEY_PREFIX = 'bcp.';
1114
1113
 
1115
1114
  // Only the npm build defines __BCP_DEFAULT_MESSAGES__; the CDN build bakes strings in per locale.
1116
- const defaultStrings = (0,_isNpmBuild__WEBPACK_IMPORTED_MODULE_0__/* .isNpmBuild */ .w)() ? {"rotate_left":"Rotate left","zoom_current_scale":"Current zoom level","zoom_in":"Zoom in","zoom_out":"Zoom out","enter_fullscreen":"Enter fullscreen","exit_fullscreen":"Exit fullscreen","controls_more":"More options","controls_shortcut_ctrl":"Ctrl + {1}","drawing_comment":"Markup","region_comment":"Comment on Region","highlight_text":"Highlight and Comment","exit_annotations":"Exit Annotations","annotation_tools":"Comment and markup","drawing_color":"Drawing color","drawing_color_blue":"Blue","drawing_color_green":"Green","drawing_color_red":"Red","drawing_color_orange":"Orange","drawing_color_yellow":"Yellow","drawing_color_purple":"Purple","previous_page":"Previous page","enter_page_num":"Click to enter page number","next_page":"Next page","download":"Download","print":"Print","print_notification":"Please press the print button to get a printable version of this document.","print_loading":"Preparing to print...","print_ready":"Ready to print.","print_close":"Close print dialog","previous_file":"Previous file","logo":"Logo","next_file":"Next file","loading_preview":"Loading Preview...","download_file":"Download File","text_truncated":"This file has been truncated due to size limits. Please download to view the whole file.","toggle_findbar":"Toggle findbar","toggle_thumbnails":"Toggle thumbnails","gallery_view":"Gallery view","page_gallery":"Page gallery","page_gallery_tile":"Page {1}","has_x_refs":"This preview has references you cannot view. Open the file in its native application.","find_next":"Find next","find_previous":"Find previous","find_close":"Close","find_label":"Search input","thumbnail_label":"Page thumbnails","file_preview_label":"File preview","comparison_banner_current":"Current version","comparison_banner_previous":"Previous version","comparison_banner_actions":"More actions","comparison_banner_open_full_preview":"Open Full Preview","comparison_banner_close":"Close","comparison_banner_make_current":"Make Current","comparison_banner_delete":"Delete","error_generic":"This preview didn’t load. Please try to open or download the file to view.","error_unsupported":"This preview didn’t load because the file type is unsupported. Please try to open or download the file to view.","error_account":"This preview didn’t load because your account is unable to preview this file type. Please try to open or download the file to view.","error_permissions":"This preview didn’t load because you don’t have permission. Please ask the file owner to update permissions.","error_refresh":"This preview didn’t load. Please try to open or download the file to view.","error_rate_limit":"This preview didn’t load because your request was rate limited. Please try to open or download the file to view.","error_reupload":"This preview didn’t load. Please try to open or download the file to view.","error_browser_unsupported":"Your browser doesn’t support preview for {1}. Please try to open or download the file to view.","error_document":"This preview didn’t load because the document may be protected. Please try to open or download the file to view.","error_password_protected":"This preview didn’t load because the document is protected. Please try to open or download the file to view.","error_try_again_later":"This preview didn’t load. Please refresh the page or download file to view.","error_bad_file":"This preview didn’t load. Please try to open or download the file to view.","error_not_downloadable":"Something seems to be wrong with this file. Please refresh the page, and if the issue continues, try to upload a new version.","error_flash_not_enabled":"This preview didn’t load because Flash is not enabled on your browser. Please try to enable Flash or download the file to view.","error_internet_explorer_office_online":"This version of Internet Explorer is out of date and the experience may be degraded. Please try switching to a different browser for a better experience.","error_large_file":"File exceeds supported size for preview. Open or download the file to view.","error_too_many_operations":"The file is too complex to display in your browser. Please download it to view.","error_zero_byte_file":"Cannot preview 0 B file. Open or download the file to view.","filename":"Name","last_modified_date":"Modified","size":"Size","search":"Search","search_results":"Search Results","search_placeholder":"Search files and folders","search_clear":"Clear search","breadcrumb":"Breadcrumb","breadcrumb_truncated":"Show hidden folders","media_autoplay":"Autoplay","media_autoplay_disabled":"Disabled","media_autoplay_enabled":"Enabled","media_play_next":"Play next file","media_play_next_disabled":"Disabled","media_play_next_enabled":"Enabled","media_speed":"Speed","media_speed_normal":"Normal","media_quality":"Quality","media_quality_auto":"Auto","media_guides":"Guides","media_guides_off":"Off","media_guides_default":"Default","media_guides_widescreen_hd":"Widescreen HD","media_guides_vertical":"Vertical","media_guides_square":"Square","media_guides_social_portrait":"Social Portrait","media_guides_cinemascope":"Cinemascope","media_guides_univisium":"Univisium","media_guides_cinema_flat":"Cinema Flat","media_guides_scope":"Scope","media_guides_fullscreen":"Fullscreen","media_guides_ultrawide":"Ultrawide","media_volume_slider":"Volume Slider","media_generating_waveform":"Generating waveform","media_loading":"Loading","media_zoom":"Zoom","media_zoom_slider":"Zoom Slider","media_time_slider":"Media Slider","media_comment_marker":"Comment marker","media_range_comment":"Comment","media_range_clear":"Clear","media_shuttle_forward":"Scanning forward at {1}x","media_shuttle_reverse":"Scanning backward at {1}x","media_mute":"Mute","media_unmute":"Unmute","media_play":"Play","media_pause":"Pause","media_skip_forward":"Skip forward","media_skip_backward":"Skip backward","media_settings":"Settings","media_subtitles_cc":"Subtitles/Closed Captions","media_time_format":"Time format","media_time_format_standard":"Standard time","media_time_format_timecode":"Timecode","media_time_format_frames":"Frame numbers","volume":"Volume","of":"of","subtitles":"Subtitles","off":"Off","media_audio":"Audio","track":"Track","media_auto_generated_captions":"Auto-Generated Captions","auto_generated":"Auto-Generated","box3d_animation_clips":"Animation clips","box3d_camera_projection_perspective":"Perspective","box3d_camera_projection_orthographic":"Orthographic","box3d_reset":"Reset","box3d_toggle_animation":"Play/pause animation","box3d_toggle_vr":"Toggle VR display","box3d_render_mode_lit":"Lit","box3d_render_mode_unlit":"Unlit","box3d_render_mode_normals":"Normals","box3d_render_mode_shape":"Shape","box3d_render_mode_uv_overlay":"UV Overlay","box3d_settings":"Settings","box3d_settings_render_label":"Render mode","box3d_settings_grid_label":"Show grid","box3d_settings_wireframes_label":"Show wireframes","box3d_settings_skeletons_label":"Show skeletons","box3d_settings_projection_label":"Camera Projection","box3d_settings_rotate_label":"Rotate Model","box3d_settings_rotate_left":"Rotate left around {1} axis","box3d_settings_rotate_right":"Rotate right around {1} axis","document_label":"Document Viewer","annotation_add_comment_placeholder":"Add a comment here...","annotation_reply_placeholder":"Post a reply...","annotation_done":"Done","annotation_close":"Close","annotation_cancel":"Cancel","annotation_save":"Save","annotation_post":"Post","annotation_delete":"Delete","annotation_delete_confirmation_message":"Delete this annotation?","annotation_profile_alt":"Avatar","annotation_anonymous_user_name":"Some User","annotation_posting_message":"Posting...","annotation_point_toggle":"Point annotation mode","annotation_draw_toggle":"Drawing annotation mode","annotation_highlight_toggle":"Highlight text","annotation_highlight_comment":"Add comment to highlighted text","annotation_who_highlighted":"{1} highlighted","annotation_who_drew":"{1} drew","annotation_draw_save":"Save drawing","annotation_draw_delete":"Delete drawing","annotations_load_error":"Annotations could not be loaded for this file. Please refresh the page to try again.","annotations_create_error":"This annotation could not be created. Please try again.","annotations_delete_error":"This annotation could not be deleted. Please try again.","annotations_authorization_error":"Annotations could not be loaded for this file. You may not have permission to take this action.","notification_button_default_text":"Okay","notification_button_default_label":"Clear Notification","notification_annotation_point_mode":"Click anywhere to add a comment to the document","notification_annotation_draw_mode":"Press down and drag the pointer to draw on the document","notification_degraded_preview":"Your connection to {1} is being blocked. Please reach out to your network admin to adjust firewall settings.","notification_cannot_download":"This file could not be downloaded.","notification_cannot_download_due_to_policy":"The file could not be downloaded due to a security policy.","link_contact_us":"Contact Us","360_videos":"360-degree videos","360_images":"360-degree images","3d_models":"3D models","afrikaans":"Afrikaans","albanian":"Albanian","arabic":"Arabic","armenian":"Armenian","belarusian":"Belarusian","bengali":"Bengali","bosnian":"Bosnian","bulgarian":"Bulgarian","burmese":"Burmese","catalan":"Catalan","central_khmer":"Central Khmer","chinese":"Chinese","croatian":"Croatian","czech":"Czech","danish":"Danish","dutch":"Dutch","english":"English","estonian":"Estonian","filipino":"Filipino","finnish":"Finnish","french":"French","galician":"Galician","ganda":"Ganda","georgian":"Georgian","german":"German","haitian_creole":"Haitian Creole","hebrew":"Hebrew","hindi":"Hindi","hmong":"Hmong","hungarian":"Hungarian","icelandic":"Icelandic","indonesian":"Indonesian","irish":"Irish","italian":"Italian","japanese":"Japanese","kazakh":"Kazakh","korean":"Korean","kurdish":"Kurdish","lao":"Lao","latvian":"Latvian","lithuanian":"Lithuanian","luxembourgish":"Luxembourgish","malay_macrolanguage":"Malay","modern_greek_1453_":"Greek","mongolian":"Mongolian","norwegian":"Norwegian","persian":"Persian","polish":"Polish","portuguese":"Portuguese","romanian":"Romanian","russian":"Russian","serbian":"Serbian","sichuan_yi":"Sichuan Yi","sicilian":"Sicilian","slovak":"Slovak","slovenian":"Slovenian","somali":"Somali","spanish":"Spanish","swahili_macrolanguage":"Swahili","swedish":"Swedish","swiss_german":"Swiss German","tagalog":"Tagalog","telugu":"Telugu","thai":"Thai","tibetan":"Tibetan","turkish":"Turkish","ukrainian":"Ukrainian","uzbek":"Uzbek","vietnamese":"Vietnamese"} : {};
1115
+ const defaultStrings = (0,_isNpmBuild__WEBPACK_IMPORTED_MODULE_0__/* .isNpmBuild */ .w)() ? {"rotate_left":"Rotate left","zoom_current_scale":"Current zoom level","zoom_in":"Zoom in","zoom_out":"Zoom out","enter_fullscreen":"Enter fullscreen","exit_fullscreen":"Exit fullscreen","controls_more":"More options","controls_find":"Find","controls_rotate_document":"Rotate document","controls_zoom_scale":"Zoom: {1}","controls_view_as_grid":"View as grid","controls_show_thumbnails":"View thumbnails","controls_hide_thumbnails":"Hide thumbnails","controls_shortcut_ctrl":"Ctrl + {1}","drawing_comment":"Markup","region_comment":"Comment on Region","highlight_text":"Highlight and Comment","exit_annotations":"Exit Annotations","annotation_tools":"Comment and markup","drawing_color":"Drawing color","drawing_color_blue":"Blue","drawing_color_green":"Green","drawing_color_red":"Red","drawing_color_orange":"Orange","drawing_color_yellow":"Yellow","drawing_color_purple":"Purple","previous_page":"Previous page","enter_page_num":"Click to enter page number","next_page":"Next page","download":"Download","print":"Print","print_notification":"Please press the print button to get a printable version of this document.","print_loading":"Preparing to print...","print_ready":"Ready to print.","print_close":"Close print dialog","previous_file":"Previous file","logo":"Logo","next_file":"Next file","loading_preview":"Loading Preview...","download_file":"Download File","text_truncated":"This file has been truncated due to size limits. Please download to view the whole file.","toggle_findbar":"Toggle findbar","toggle_thumbnails":"Toggle thumbnails","gallery_view":"Gallery view","page_gallery":"Page gallery","page_gallery_tile":"Page {1}","has_x_refs":"This preview has references you cannot view. Open the file in its native application.","find_next":"Find next","find_previous":"Find previous","find_close":"Close","find_label":"Search input","thumbnail_label":"Page thumbnails","file_preview_label":"File preview","comparison_banner_current":"Current version","comparison_banner_previous":"Previous version","comparison_banner_version":"Version {1}","comparison_banner_actions":"More actions","comparison_banner_open_full_preview":"Open Full Preview","comparison_banner_close":"Close","comparison_banner_make_current":"Make Current","comparison_banner_delete":"Delete","error_generic":"This preview didn’t load. Please try to open or download the file to view.","error_unsupported":"This preview didn’t load because the file type is unsupported. Please try to open or download the file to view.","error_account":"This preview didn’t load because your account is unable to preview this file type. Please try to open or download the file to view.","error_permissions":"This preview didn’t load because you don’t have permission. Please ask the file owner to update permissions.","error_refresh":"This preview didn’t load. Please try to open or download the file to view.","error_rate_limit":"This preview didn’t load because your request was rate limited. Please try to open or download the file to view.","error_reupload":"This preview didn’t load. Please try to open or download the file to view.","error_browser_unsupported":"Your browser doesn’t support preview for {1}. Please try to open or download the file to view.","error_document":"This preview didn’t load because the document may be protected. Please try to open or download the file to view.","error_password_protected":"This preview didn’t load because the document is protected. Please try to open or download the file to view.","error_try_again_later":"This preview didn’t load. Please refresh the page or download file to view.","error_bad_file":"This preview didn’t load. Please try to open or download the file to view.","error_not_downloadable":"Something seems to be wrong with this file. Please refresh the page, and if the issue continues, try to upload a new version.","error_flash_not_enabled":"This preview didn’t load because Flash is not enabled on your browser. Please try to enable Flash or download the file to view.","error_internet_explorer_office_online":"This version of Internet Explorer is out of date and the experience may be degraded. Please try switching to a different browser for a better experience.","error_large_file":"File exceeds supported size for preview. Open or download the file to view.","error_too_many_operations":"The file is too complex to display in your browser. Please download it to view.","error_zero_byte_file":"Cannot preview 0 B file. Open or download the file to view.","filename":"Name","last_modified_date":"Modified","size":"Size","search":"Search","search_results":"Search Results","search_placeholder":"Search files and folders","search_clear":"Clear search","breadcrumb":"Breadcrumb","breadcrumb_truncated":"Show hidden folders","media_autoplay":"Autoplay","media_autoplay_disabled":"Disabled","media_autoplay_enabled":"Enabled","media_play_next":"Play next file","media_play_next_disabled":"Disabled","media_play_next_enabled":"Enabled","media_speed":"Speed","media_speed_normal":"Normal","media_quality":"Quality","media_quality_auto":"Auto","media_guides":"Guides","media_guides_off":"Off","media_guides_default":"Default","media_guides_widescreen_hd":"Widescreen HD","media_guides_vertical":"Vertical","media_guides_square":"Square","media_guides_social_portrait":"Social Portrait","media_guides_cinemascope":"Cinemascope","media_guides_univisium":"Univisium","media_guides_cinema_flat":"Cinema Flat","media_guides_scope":"Scope","media_guides_fullscreen":"Fullscreen","media_guides_ultrawide":"Ultrawide","media_volume_slider":"Volume Slider","media_generating_waveform":"Generating waveform","media_loading":"Loading","media_zoom":"Zoom","media_zoom_slider":"Zoom Slider","media_time_slider":"Media Slider","media_comment_marker":"Comment marker","media_range_comment":"Comment","media_range_clear":"Clear","media_shuttle_forward":"Scanning forward at {1}x","media_shuttle_reverse":"Scanning backward at {1}x","media_mute":"Mute","media_unmute":"Unmute","media_play":"Play","media_pause":"Pause","media_skip_forward":"Skip forward","media_skip_backward":"Skip backward","media_settings":"Settings","media_subtitles_cc":"Subtitles/Closed Captions","media_time_format":"Time format","media_time_format_standard":"Standard time","media_time_format_timecode":"Timecode","media_time_format_frames":"Frame numbers","volume":"Volume","of":"of","subtitles":"Subtitles","off":"Off","media_audio":"Audio","track":"Track","media_auto_generated_captions":"Auto-Generated Captions","auto_generated":"Auto-Generated","box3d_animation_clips":"Animation clips","box3d_camera_projection_perspective":"Perspective","box3d_camera_projection_orthographic":"Orthographic","box3d_reset":"Reset","box3d_toggle_animation":"Play/pause animation","box3d_toggle_vr":"Toggle VR display","box3d_render_mode_lit":"Lit","box3d_render_mode_unlit":"Unlit","box3d_render_mode_normals":"Normals","box3d_render_mode_shape":"Shape","box3d_render_mode_uv_overlay":"UV Overlay","box3d_settings":"Settings","box3d_settings_render_label":"Render mode","box3d_settings_grid_label":"Show grid","box3d_settings_wireframes_label":"Show wireframes","box3d_settings_skeletons_label":"Show skeletons","box3d_settings_projection_label":"Camera Projection","box3d_settings_rotate_label":"Rotate Model","box3d_settings_rotate_left":"Rotate left around {1} axis","box3d_settings_rotate_right":"Rotate right around {1} axis","document_label":"Document Viewer","annotation_add_comment_placeholder":"Add a comment here...","annotation_reply_placeholder":"Post a reply...","annotation_done":"Done","annotation_close":"Close","annotation_cancel":"Cancel","annotation_save":"Save","annotation_post":"Post","annotation_delete":"Delete","annotation_delete_confirmation_message":"Delete this annotation?","annotation_profile_alt":"Avatar","annotation_anonymous_user_name":"Some User","annotation_posting_message":"Posting...","annotation_point_toggle":"Point annotation mode","annotation_draw_toggle":"Drawing annotation mode","annotation_highlight_toggle":"Highlight text","annotation_highlight_comment":"Add comment to highlighted text","annotation_who_highlighted":"{1} highlighted","annotation_who_drew":"{1} drew","annotation_draw_save":"Save drawing","annotation_draw_delete":"Delete drawing","annotations_load_error":"Annotations could not be loaded for this file. Please refresh the page to try again.","annotations_create_error":"This annotation could not be created. Please try again.","annotations_delete_error":"This annotation could not be deleted. Please try again.","annotations_authorization_error":"Annotations could not be loaded for this file. You may not have permission to take this action.","notification_button_default_text":"Okay","notification_button_default_label":"Clear Notification","notification_annotation_point_mode":"Click anywhere to add a comment to the document","notification_annotation_draw_mode":"Press down and drag the pointer to draw on the document","notification_degraded_preview":"Your connection to {1} is being blocked. Please reach out to your network admin to adjust firewall settings.","notification_cannot_download":"This file could not be downloaded.","notification_cannot_download_due_to_policy":"The file could not be downloaded due to a security policy.","link_contact_us":"Contact Us","360_videos":"360-degree videos","360_images":"360-degree images","3d_models":"3D models","afrikaans":"Afrikaans","albanian":"Albanian","arabic":"Arabic","armenian":"Armenian","belarusian":"Belarusian","bengali":"Bengali","bosnian":"Bosnian","bulgarian":"Bulgarian","burmese":"Burmese","catalan":"Catalan","central_khmer":"Central Khmer","chinese":"Chinese","croatian":"Croatian","czech":"Czech","danish":"Danish","dutch":"Dutch","english":"English","estonian":"Estonian","filipino":"Filipino","finnish":"Finnish","french":"French","galician":"Galician","ganda":"Ganda","georgian":"Georgian","german":"German","haitian_creole":"Haitian Creole","hebrew":"Hebrew","hindi":"Hindi","hmong":"Hmong","hungarian":"Hungarian","icelandic":"Icelandic","indonesian":"Indonesian","irish":"Irish","italian":"Italian","japanese":"Japanese","kazakh":"Kazakh","korean":"Korean","kurdish":"Kurdish","lao":"Lao","latvian":"Latvian","lithuanian":"Lithuanian","luxembourgish":"Luxembourgish","malay_macrolanguage":"Malay","modern_greek_1453_":"Greek","mongolian":"Mongolian","norwegian":"Norwegian","persian":"Persian","polish":"Polish","portuguese":"Portuguese","romanian":"Romanian","russian":"Russian","serbian":"Serbian","sichuan_yi":"Sichuan Yi","sicilian":"Sicilian","slovak":"Slovak","slovenian":"Slovenian","somali":"Somali","spanish":"Spanish","swahili_macrolanguage":"Swahili","swedish":"Swedish","swiss_german":"Swiss German","tagalog":"Tagalog","telugu":"Telugu","thai":"Thai","tibetan":"Tibetan","turkish":"Turkish","ukrainian":"Ukrainian","uzbek":"Uzbek","vietnamese":"Vietnamese"} : {};
1117
1116
  let language = true ? "en-US" : 0;
1118
1117
  let strings = defaultStrings;
1119
1118
  function getLanguage() {
@@ -1216,7 +1215,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
1216
1215
  const CLIENT_NAME = "box-content-preview"; // eslint-disable-line no-undef
1217
1216
  const CLIENT_NAME_KEY = 'box_client_name';
1218
1217
  const CLIENT_VERSION_KEY = 'box_client_version';
1219
- const CLIENT_VERSION = "3.120.0"; // eslint-disable-line no-undef
1218
+ const CLIENT_VERSION = "3.123.0"; // eslint-disable-line no-undef
1220
1219
  const HEADER_CLIENT_NAME = 'X-Box-Client-Name';
1221
1220
  const HEADER_CLIENT_VERSION = 'X-Box-Client-Version';
1222
1221
  const PROMISE_MAP = {};
@@ -1509,8 +1508,8 @@ function createAssetUrlCreator(location) {
1509
1508
  if (name.indexOf('http') === 0) {
1510
1509
  // This is a full url
1511
1510
  asset = name;
1512
- } else if (name.indexOf('third-party') === 0 || name.indexOf('exif/') === 0 || name.indexOf('cmaps/') === 0 || name.indexOf('iccs/') === 0 || name.indexOf('wasm/') === 0 || name.indexOf('standard_fonts/') === 0) {
1513
- // Static, non-localized asset (third-party libs, shared exif, pdfjs cmaps, ICC profiles, wasm, standard fonts).
1511
+ } else if (name.indexOf('third-party') === 0 || name.indexOf('exif/') === 0 || name.indexOf('cmaps/') === 0 || name.indexOf('iccs/') === 0 || name.indexOf('wasm/') === 0 || name.indexOf('standard_fonts/') === 0 || name.indexOf('pdfjs-images/') === 0) {
1512
+ // Static asset shared by every version and locale
1514
1513
  asset = staticBaseURI + name;
1515
1514
  } else {
1516
1515
  // This is our own asset that is localized
@@ -4019,7 +4018,8 @@ function BreadcrumbsV2({
4019
4018
  onClick(path);
4020
4019
  };
4021
4020
  return /*#__PURE__*/external_react_["default"].createElement("div", {
4022
- className: "bp-BreadcrumbsV2"
4021
+ className: "bp-BreadcrumbsV2",
4022
+ "data-testid": "bp-archive-breadcrumbs"
4023
4023
  }, view === constants/* VIEWS */.Vw.VIEW_SEARCH ? /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Text, {
4024
4024
  as: "span",
4025
4025
  variant: "bodyDefaultBold"
@@ -4081,6 +4081,8 @@ __webpack_require__.d(__webpack_exports__, {
4081
4081
 
4082
4082
  // EXTERNAL MODULE: external "react"
4083
4083
  var external_react_ = __webpack_require__(1649);
4084
+ // EXTERNAL MODULE: external "react-dom"
4085
+ var external_react_dom_ = __webpack_require__(7516);
4084
4086
  // EXTERNAL MODULE: external "react-dom/client"
4085
4087
  var client_ = __webpack_require__(6662);
4086
4088
  // EXTERNAL MODULE: ./node_modules/prop-types/index.js
@@ -5124,7 +5126,8 @@ class Breadcrumbs extends external_react_["default"].PureComponent {
5124
5126
  view
5125
5127
  } = this.props;
5126
5128
  return /*#__PURE__*/external_react_["default"].createElement("div", {
5127
- className: "bp-Breadcrumbs"
5129
+ className: "bp-Breadcrumbs",
5130
+ "data-testid": "bp-archive-breadcrumbs"
5128
5131
  }, /*#__PURE__*/external_react_["default"].createElement(__WEBPACK_EXTERNAL_MODULE_box_ui_elements_es_components_breadcrumb_da64b71d_default__, null, view === constants/* VIEWS */.Vw.VIEW_SEARCH ? /*#__PURE__*/external_react_["default"].createElement("span", null, __('search_results')) : this.getPathItems(fullPath).map(pathItem => /*#__PURE__*/external_react_["default"].createElement(__WEBPACK_EXTERNAL_MODULE_box_ui_elements_es_components_plain_button_PlainButton_6ddbae5a_default__, {
5129
5132
  key: pathItem.path,
5130
5133
  "data-resin-target": "breadcrumb",
@@ -5418,7 +5421,8 @@ class ArchiveExplorer extends external_react_.Component {
5418
5421
  resin: resin,
5419
5422
  view: view
5420
5423
  }), /*#__PURE__*/external_react_.createElement("div", {
5421
- className: "bp-ArchiveExplorer-table"
5424
+ className: "bp-ArchiveExplorer-table",
5425
+ "data-testid": "bp-archive-table"
5422
5426
  }, v2 ? /*#__PURE__*/external_react_.createElement(v2.ArchiveTableV2, {
5423
5427
  items: itemList,
5424
5428
  onItemClick: item => this.handleItemClick({
@@ -5496,6 +5500,7 @@ function BoxArchive_toPrimitive(t, r) { if ("object" != typeof t || !t) return t
5496
5500
 
5497
5501
 
5498
5502
 
5503
+
5499
5504
  class BoxArchive {
5500
5505
  /**
5501
5506
  * [constructor]
@@ -5554,9 +5559,11 @@ class BoxArchive {
5554
5559
  resin: this.resin,
5555
5560
  v2: v2
5556
5561
  });
5557
- this.root.render(v2 ? /*#__PURE__*/external_react_["default"].createElement(v2.BlueprintProviders, {
5558
- container: this.archiveEl
5559
- }, explorer) : explorer);
5562
+ (0,external_react_dom_.flushSync)(() => {
5563
+ this.root.render(v2 ? /*#__PURE__*/external_react_["default"].createElement(v2.BlueprintProviders, {
5564
+ container: this.archiveEl
5565
+ }, explorer) : explorer);
5566
+ });
5560
5567
  }
5561
5568
 
5562
5569
  /**
@@ -6372,7 +6379,7 @@ function MediaSettingsMenuSubtitles({
6372
6379
 
6373
6380
  /***/ },
6374
6381
 
6375
- /***/ 4190
6382
+ /***/ 4027
6376
6383
  (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
6377
6384
 
6378
6385
 
@@ -6394,102 +6401,10 @@ var Medium_ = __webpack_require__(9747);
6394
6401
  var tokens_ = __webpack_require__(8380);
6395
6402
  // EXTERNAL MODULE: ./src/lib/viewers/controls/settings/SettingsRadioItem.tsx + 1 modules
6396
6403
  var SettingsRadioItem = __webpack_require__(8394);
6397
- ;// ./src/lib/viewers/controls/tooltip/MenuTriggerTooltipV2.tsx
6398
-
6399
-
6400
- // An open tooltip sits above the menu in the dismiss stack, so it would cover the menu and take its first Escape.
6401
- function MenuTriggerTooltipV2({
6402
- children,
6403
- content,
6404
- isMenuOpen
6405
- }) {
6406
- const [isOpen, setIsOpen] = external_react_["default"].useState(false);
6407
- return /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Tooltip, {
6408
- content: content,
6409
- onOpenChange: setIsOpen,
6410
- open: isOpen && !isMenuOpen
6411
- }, children);
6412
- }
6413
- ;// ./src/lib/viewers/controls/settings/SettingsToggleV2.scss
6414
- // extracted by mini-css-extract-plugin
6415
-
6416
- ;// ./src/lib/viewers/controls/settings/SettingsToggleV2.tsx
6417
- const _excluded = ["badge", "buttonType", "label"],
6418
- _excluded2 = ["badge", "buttonType", "label"];
6419
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
6420
- function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
6421
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
6422
-
6423
-
6424
-
6425
-
6426
-
6427
-
6428
- // Toolbar.Button throws outside a Toolbar.Root, so toggles rendered elsewhere use IconButton.
6429
-
6430
- // The Tooltip wraps the button inside this component so that a Popover or DropdownMenu trigger
6431
- // rendered around it (asChild) keeps its own data-state; Radix gives the child's props precedence.
6432
- function SettingsToggleV2(props, ref) {
6433
- const isMenuOpen = props['aria-expanded'] === true || props['aria-expanded'] === 'true';
6434
- if (props.buttonType === 'icon') {
6435
- const {
6436
- badge,
6437
- buttonType,
6438
- label
6439
- } = props,
6440
- rest = _objectWithoutProperties(props, _excluded);
6441
-
6442
- // IconButton renders only its icon, so the badge sits beside the button in a positioned wrapper.
6443
- return /*#__PURE__*/external_react_["default"].createElement("span", {
6444
- className: "bp-SettingsToggleV2"
6445
- }, /*#__PURE__*/external_react_["default"].createElement(MenuTriggerTooltipV2, {
6446
- content: label,
6447
- isMenuOpen: isMenuOpen
6448
- }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.IconButton, _extends({
6449
- ref: ref,
6450
- "aria-label": label,
6451
- "data-resin-target": "settingsOpen",
6452
- icon: Medium_.Gear
6453
- }, rest))), /*#__PURE__*/external_react_["default"].isValidElement(badge) && /*#__PURE__*/external_react_["default"].createElement("span", {
6454
- className: "bp-SettingsToggleV2-badge"
6455
- }, badge));
6456
- }
6457
- const {
6458
- badge,
6459
- buttonType,
6460
- label
6461
- } = props,
6462
- rest = _objectWithoutProperties(props, _excluded2);
6463
- return /*#__PURE__*/external_react_["default"].createElement(MenuTriggerTooltipV2, {
6464
- content: label,
6465
- isMenuOpen: isMenuOpen
6466
- }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Toolbar.Button, _extends({
6467
- ref: ref,
6468
- "aria-label": label,
6469
- "data-resin-target": "settingsOpen"
6470
- }, rest), /*#__PURE__*/external_react_["default"].createElement("span", {
6471
- className: "bp-SettingsToggleV2"
6472
- }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Toolbar.Icon, {
6473
- icon: Medium_.Gear
6474
- }), /*#__PURE__*/external_react_["default"].isValidElement(badge) && /*#__PURE__*/external_react_["default"].createElement("span", {
6475
- className: "bp-SettingsToggleV2-badge"
6476
- }, badge))));
6477
- }
6478
- /* harmony default export */ const settings_SettingsToggleV2 = (/*#__PURE__*/external_react_["default"].forwardRef(SettingsToggleV2));
6479
- ;// ./src/lib/viewers/controls/settings/stopMenuKeyPropagation.ts
6480
- // For a menu's onKeyDown, so its keys don't reach preview's file navigation on document or the host's hotkeys
6481
- // (e.g. preview-client's HotkeyLayer on window). Escape must still reach Radix's document listener to close the menu.
6482
- function stopKeyPropagation(event) {
6483
- if (event.key !== 'Escape') {
6484
- event.stopPropagation();
6485
- }
6486
- }
6487
-
6488
- // For a Radix layer's onEscapeKeyDown, which runs on document after the layer has closed, so the host's Escape
6489
- // hotkey doesn't close the whole preview too.
6490
- function stopEscapePropagation(event) {
6491
- event.stopPropagation();
6492
- }
6404
+ // EXTERNAL MODULE: ./src/lib/viewers/controls/settings/SettingsToggleV2.tsx + 1 modules
6405
+ var SettingsToggleV2 = __webpack_require__(4574);
6406
+ // EXTERNAL MODULE: ./src/lib/viewers/controls/settings/stopMenuKeyPropagation.ts
6407
+ var stopMenuKeyPropagation = __webpack_require__(9646);
6493
6408
  // EXTERNAL MODULE: ./src/lib/viewers/controls/media/MediaSettingsAudioTracks.tsx
6494
6409
  var MediaSettingsAudioTracks = __webpack_require__(9306);
6495
6410
  // EXTERNAL MODULE: ./src/lib/viewers/controls/media/MediaSettingsMenuGuides.tsx
@@ -6662,10 +6577,10 @@ function MediaSettingsV2({
6662
6577
  event.preventDefault();
6663
6578
  closeSubMenu();
6664
6579
  }
6665
- stopKeyPropagation(event);
6580
+ (0,stopMenuKeyPropagation/* stopKeyPropagation */.a)(event);
6666
6581
  };
6667
6582
  const handleEscapeKeyDown = event => {
6668
- stopEscapePropagation(event);
6583
+ (0,stopMenuKeyPropagation/* stopEscapePropagation */.s)(event);
6669
6584
  if (activeSubMenu) {
6670
6585
  event.preventDefault();
6671
6586
  closeSubMenu();
@@ -6693,7 +6608,7 @@ function MediaSettingsV2({
6693
6608
  open: isOpen
6694
6609
  }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Trigger, {
6695
6610
  asChild: true
6696
- }, /*#__PURE__*/external_react_["default"].createElement(settings_SettingsToggleV2, {
6611
+ }, /*#__PURE__*/external_react_["default"].createElement(SettingsToggleV2/* default */.A, {
6697
6612
  buttonType: "icon",
6698
6613
  "data-target-id": "MediaSettingsV2-toggle",
6699
6614
  label: __('media_settings'),
@@ -9093,6 +9008,115 @@ function SettingsRadioItem(props, ref) {
9093
9008
 
9094
9009
  /***/ },
9095
9010
 
9011
+ /***/ 4574
9012
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
9013
+
9014
+
9015
+ // EXPORTS
9016
+ __webpack_require__.d(__webpack_exports__, {
9017
+ A: () => (/* binding */ settings_SettingsToggleV2)
9018
+ });
9019
+
9020
+ // EXTERNAL MODULE: external "react"
9021
+ var external_react_ = __webpack_require__(1649);
9022
+ // EXTERNAL MODULE: external "@box/blueprint-web"
9023
+ var blueprint_web_ = __webpack_require__(8912);
9024
+ // EXTERNAL MODULE: external "@box/blueprint-web-assets/icons/Medium"
9025
+ var Medium_ = __webpack_require__(9747);
9026
+ // EXTERNAL MODULE: ./src/lib/viewers/controls/tooltip/MenuTriggerTooltipV2.tsx
9027
+ var MenuTriggerTooltipV2 = __webpack_require__(6014);
9028
+ ;// ./src/lib/viewers/controls/settings/SettingsToggleV2.scss
9029
+ // extracted by mini-css-extract-plugin
9030
+
9031
+ ;// ./src/lib/viewers/controls/settings/SettingsToggleV2.tsx
9032
+ const _excluded = ["badge", "buttonType", "label"],
9033
+ _excluded2 = ["badge", "buttonType", "label"];
9034
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
9035
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
9036
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
9037
+
9038
+
9039
+
9040
+
9041
+
9042
+
9043
+ // Toolbar.Button throws outside a Toolbar.Root, so toggles rendered elsewhere use IconButton.
9044
+
9045
+ // The Tooltip wraps the button inside this component so that a Popover or DropdownMenu trigger
9046
+ // rendered around it (asChild) keeps its own data-state; Radix gives the child's props precedence.
9047
+ function SettingsToggleV2(props, ref) {
9048
+ const isMenuOpen = props['aria-expanded'] === true || props['aria-expanded'] === 'true';
9049
+ if (props.buttonType === 'icon') {
9050
+ const {
9051
+ badge,
9052
+ buttonType,
9053
+ label
9054
+ } = props,
9055
+ rest = _objectWithoutProperties(props, _excluded);
9056
+
9057
+ // IconButton renders only its icon, so the badge sits beside the button in a positioned wrapper.
9058
+ return /*#__PURE__*/external_react_["default"].createElement("span", {
9059
+ className: "bp-SettingsToggleV2"
9060
+ }, /*#__PURE__*/external_react_["default"].createElement(MenuTriggerTooltipV2/* default */.A, {
9061
+ content: label,
9062
+ isMenuOpen: isMenuOpen
9063
+ }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.IconButton, _extends({
9064
+ ref: ref,
9065
+ "aria-label": label,
9066
+ "data-resin-target": "settingsOpen",
9067
+ icon: Medium_.Gear
9068
+ }, rest))), /*#__PURE__*/external_react_["default"].isValidElement(badge) && /*#__PURE__*/external_react_["default"].createElement("span", {
9069
+ className: "bp-SettingsToggleV2-badge"
9070
+ }, badge));
9071
+ }
9072
+ const {
9073
+ badge,
9074
+ buttonType,
9075
+ label
9076
+ } = props,
9077
+ rest = _objectWithoutProperties(props, _excluded2);
9078
+ return /*#__PURE__*/external_react_["default"].createElement(MenuTriggerTooltipV2/* default */.A, {
9079
+ content: label,
9080
+ isMenuOpen: isMenuOpen
9081
+ }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Toolbar.Button, _extends({
9082
+ ref: ref,
9083
+ "aria-label": label,
9084
+ "data-resin-target": "settingsOpen"
9085
+ }, rest), /*#__PURE__*/external_react_["default"].createElement("span", {
9086
+ className: "bp-SettingsToggleV2"
9087
+ }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Toolbar.Icon, {
9088
+ icon: Medium_.Gear
9089
+ }), /*#__PURE__*/external_react_["default"].isValidElement(badge) && /*#__PURE__*/external_react_["default"].createElement("span", {
9090
+ className: "bp-SettingsToggleV2-badge"
9091
+ }, badge))));
9092
+ }
9093
+ /* harmony default export */ const settings_SettingsToggleV2 = (/*#__PURE__*/external_react_["default"].forwardRef(SettingsToggleV2));
9094
+
9095
+ /***/ },
9096
+
9097
+ /***/ 9646
9098
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
9099
+
9100
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9101
+ /* harmony export */ a: () => (/* binding */ stopKeyPropagation),
9102
+ /* harmony export */ s: () => (/* binding */ stopEscapePropagation)
9103
+ /* harmony export */ });
9104
+ // For a menu's onKeyDown, so its keys don't reach preview's file navigation on document or the host's hotkeys
9105
+ // (e.g. preview-client's HotkeyLayer on window). Escape must still reach Radix's document listener to close the menu.
9106
+ function stopKeyPropagation(event) {
9107
+ if (event.key !== 'Escape') {
9108
+ event.stopPropagation();
9109
+ }
9110
+ }
9111
+
9112
+ // For a Radix layer's onEscapeKeyDown, which runs on document after the layer has closed, so the host's Escape
9113
+ // hotkey doesn't close the whole preview too.
9114
+ function stopEscapePropagation(event) {
9115
+ event.stopPropagation();
9116
+ }
9117
+
9118
+ /***/ },
9119
+
9096
9120
  /***/ 4937
9097
9121
  (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
9098
9122
 
@@ -9275,6 +9299,32 @@ function SliderControl(_ref) {
9275
9299
 
9276
9300
  /***/ },
9277
9301
 
9302
+ /***/ 6014
9303
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
9304
+
9305
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9306
+ /* harmony export */ A: () => (/* binding */ MenuTriggerTooltipV2)
9307
+ /* harmony export */ });
9308
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1649);
9309
+ /* harmony import */ var _box_blueprint_web__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8912);
9310
+
9311
+
9312
+ // An open tooltip sits above the menu in the dismiss stack, so it would cover the menu and take its first Escape.
9313
+ function MenuTriggerTooltipV2({
9314
+ children,
9315
+ content,
9316
+ isMenuOpen
9317
+ }) {
9318
+ const [isOpen, setIsOpen] = react__WEBPACK_IMPORTED_MODULE_0__["default"].useState(false);
9319
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(_box_blueprint_web__WEBPACK_IMPORTED_MODULE_1__.Tooltip, {
9320
+ content: content,
9321
+ onOpenChange: setIsOpen,
9322
+ open: isOpen && !isMenuOpen
9323
+ }, children);
9324
+ }
9325
+
9326
+ /***/ },
9327
+
9278
9328
  /***/ 9974
9279
9329
  (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
9280
9330
 
@@ -9309,8 +9359,8 @@ var blueprint_web_ = __webpack_require__(8912);
9309
9359
  var MediaLoadingIndicator = __webpack_require__(4301);
9310
9360
  // EXTERNAL MODULE: ./src/lib/viewers/controls/media/MediaSettings.tsx + 2 modules
9311
9361
  var MediaSettings = __webpack_require__(112);
9312
- // EXTERNAL MODULE: ./src/lib/viewers/controls/media/MediaSettingsV2.tsx + 5 modules
9313
- var MediaSettingsV2 = __webpack_require__(4190);
9362
+ // EXTERNAL MODULE: ./src/lib/viewers/controls/media/MediaSettingsV2.tsx + 1 modules
9363
+ var MediaSettingsV2 = __webpack_require__(4027);
9314
9364
  // EXTERNAL MODULE: ./src/lib/viewers/controls/media/PlayOverlayIcon.tsx
9315
9365
  var PlayOverlayIcon = __webpack_require__(2048);
9316
9366
  // EXTERNAL MODULE: ./src/lib/viewers/controls/media/PlayPauseToggle.tsx + 1 modules
@@ -21539,7 +21589,7 @@ var x = (y) => {
21539
21589
  var x = {}; __webpack_require__.d(x, y); return x
21540
21590
  }
21541
21591
  var y = (x) => (() => (x))
21542
- module.exports = x({ ["BlueprintProvider"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.BlueprintProvider), ["Breadcrumb"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Breadcrumb), ["Cell"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Cell), ["Column"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Column), ["DataTableWrapper"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.DataTableWrapper), ["DropdownMenu"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.DropdownMenu), ["Ghost"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Ghost), ["IconButton"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.IconButton), ["IconToggleButton"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.IconToggleButton), ["LoadingIndicator"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.LoadingIndicator), ["Modal"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Modal), ["Row"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Row), ["SearchInput"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.SearchInput), ["SelectMenu"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.SelectMenu), ["Table"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Table), ["TableBody"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.TableBody), ["TableHeader"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.TableHeader), ["Text"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Text), ["Toolbar"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Toolbar), ["Tooltip"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Tooltip), ["TooltipProvider"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.TooltipProvider), ["VisuallyHidden"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.VisuallyHidden), ["useNoopTreatment"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.useNoopTreatment) });
21592
+ module.exports = x({ ["BlueprintProvider"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.BlueprintProvider), ["Breadcrumb"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Breadcrumb), ["Cell"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Cell), ["Column"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Column), ["DataTableWrapper"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.DataTableWrapper), ["DropdownMenu"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.DropdownMenu), ["EllipsizableText"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.EllipsizableText), ["Focusable"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Focusable), ["Ghost"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Ghost), ["IconButton"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.IconButton), ["IconToggleButton"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.IconToggleButton), ["LoadingIndicator"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.LoadingIndicator), ["Modal"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Modal), ["Popover"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Popover), ["Row"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Row), ["SearchInput"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.SearchInput), ["Select"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Select), ["SelectMenu"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.SelectMenu), ["Switch"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Switch), ["Table"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Table), ["TableBody"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.TableBody), ["TableHeader"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.TableHeader), ["Text"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Text), ["Toolbar"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Toolbar), ["Tooltip"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Tooltip), ["TooltipProvider"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.TooltipProvider), ["VisuallyHidden"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.VisuallyHidden), ["useNoopTreatment"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.useNoopTreatment) });
21543
21593
 
21544
21594
  /***/ },
21545
21595
 
@@ -21550,7 +21600,7 @@ var x = (y) => {
21550
21600
  var x = {}; __webpack_require__.d(x, y); return x
21551
21601
  }
21552
21602
  var y = (x) => (() => (x))
21553
- module.exports = x({ ["ArrowCurveBack5"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.ArrowCurveBack5), ["ArrowCurveForward5"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.ArrowCurveForward5), ["ArrowsMaximize"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.ArrowsMaximize), ["ArrowsMinimize"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.ArrowsMinimize), ["ChevronDown"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.ChevronDown), ["ChevronLeft"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.ChevronLeft), ["ChevronRight"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.ChevronRight), ["ChevronUp"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.ChevronUp), ["ClosedCaption"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.ClosedCaption), ["Comment"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.Comment), ["Element"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.Element), ["Gear"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.Gear), ["Volume0"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.Volume0), ["Volume1"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.Volume1), ["Volume2"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.Volume2), ["VolumeX"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.VolumeX), ["XMark"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.XMark), ["ZoomIn"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.ZoomIn), ["ZoomOut"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.ZoomOut) });
21603
+ module.exports = x({ ["ArrowCurveBack5"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.ArrowCurveBack5), ["ArrowCurveForward"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.ArrowCurveForward), ["ArrowCurveForward5"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.ArrowCurveForward5), ["ArrowsMaximize"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.ArrowsMaximize), ["ArrowsMinimize"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.ArrowsMinimize), ["Checkmark"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.Checkmark), ["ChevronDown"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.ChevronDown), ["ChevronLeft"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.ChevronLeft), ["ChevronRight"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.ChevronRight), ["ChevronUp"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.ChevronUp), ["ClosedCaption"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.ClosedCaption), ["Comment"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.Comment), ["Download"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.Download), ["Element"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.Element), ["Ellipsis"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.Ellipsis), ["Expand"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.Expand), ["GaugeNeedle"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.GaugeNeedle), ["Gear"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.Gear), ["RotateLeft"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.RotateLeft), ["Trash"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.Trash), ["Volume0"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.Volume0), ["Volume1"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.Volume1), ["Volume2"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.Volume2), ["VolumeX"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.VolumeX), ["XMark"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.XMark), ["ZoomIn"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.ZoomIn), ["ZoomOut"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__.ZoomOut) });
21554
21604
 
21555
21605
  /***/ },
21556
21606
 
@@ -37204,7 +37254,7 @@ var isNpmBuild = __webpack_require__(8080);
37204
37254
  ;// ./src/lib/Logger.js
37205
37255
  /* eslint-disable no-undef */
37206
37256
  const CLIENT_NAME = "box-content-preview";
37207
- const CLIENT_VERSION = "3.120.0";
37257
+ const CLIENT_VERSION = "3.123.0";
37208
37258
  /* eslint-enable no-undef */
37209
37259
 
37210
37260
  class Logger {
@@ -38837,7 +38887,13 @@ class BaseViewer extends (events_default()) {
38837
38887
  * @return {void}
38838
38888
  */
38839
38889
  toggleFullscreen(isFullscreen, fullscreenToggleEl) {
38840
- this.fullscreenToggleEl = fullscreenToggleEl;
38890
+ // The keyboard shortcut has no button to return focus to, so keep the last toggle unless it has
38891
+ // since unmounted, as when it collapses into or out of the overflow menu
38892
+ if (fullscreenToggleEl) {
38893
+ this.fullscreenToggleEl = fullscreenToggleEl;
38894
+ } else if (this.fullscreenToggleEl && !this.fullscreenToggleEl.isConnected) {
38895
+ this.fullscreenToggleEl = null;
38896
+ }
38841
38897
  lib_Fullscreen.toggle(this.containerEl);
38842
38898
  }
38843
38899
 
@@ -38987,7 +39043,7 @@ class BaseViewer extends (events_default()) {
38987
39043
  * @return {void}
38988
39044
  */
38989
39045
  emitFirstRenderMetric() {
38990
- if (this.firstRenderEmitted) {
39046
+ if (this.isDestroyed() || this.firstRenderEmitted) {
38991
39047
  return;
38992
39048
  }
38993
39049
  const {
@@ -39806,6 +39862,7 @@ class ArchiveViewer extends viewers_BaseViewer {
39806
39862
  * @return {void}
39807
39863
  */
39808
39864
  finishRender() {
39865
+ this.emitFirstRenderMetric();
39809
39866
  this.loaded = true;
39810
39867
  this.emit(lib_events/* VIEWER_EVENT */.Oi.load);
39811
39868
  }
@@ -41493,7 +41550,7 @@ class ImageViewer extends image_ImageBaseViewer {
41493
41550
  * @return {void}
41494
41551
  */
41495
41552
  emitFirstRenderMetric() {
41496
- if (this.firstRenderEmitted) {
41553
+ if (this.isDestroyed() || this.firstRenderEmitted) {
41497
41554
  return;
41498
41555
  }
41499
41556
  const {
@@ -44805,7 +44862,8 @@ class Image360Viewer extends box3d_Box3DViewer {
44805
44862
  * @return {boolean} Consumed or not
44806
44863
  */
44807
44864
  onKeydown(key) {
44808
- return this.handleFullscreenKey(key);
44865
+ // Without React controls the legacy Box3DControls bar renders, which has no fullscreen shortcut
44866
+ return this.getViewerOption('useReactControls') ? this.handleFullscreenKey(key) : false;
44809
44867
  }
44810
44868
  renderUI() {
44811
44869
  if (!this.controls) {
@@ -45220,25 +45278,45 @@ function TextControls({
45220
45278
 
45221
45279
 
45222
45280
 
45223
- function ZoomControlsV2({
45281
+ function getZoomState({
45224
45282
  maxScale = MAX_SCALE,
45225
45283
  minScale = MIN_SCALE,
45226
- onZoomIn,
45227
- onZoomOut,
45228
- resinTargetZoomIn = 'zoomIn',
45229
- resinTargetZoomOut = 'zoomOut',
45230
45284
  scale = 1
45231
45285
  }) {
45232
45286
  const currentScale = Math.round((scale + Number.EPSILON) * 100) / 100;
45233
45287
  const maxScaleValue = isFinite_default()(maxScale) ? Math.min(maxScale, MAX_SCALE) : MAX_SCALE;
45234
45288
  const minScaleValue = isFinite_default()(minScale) ? Math.max(minScale, MIN_SCALE) : MIN_SCALE;
45289
+ return {
45290
+ canZoomIn: currentScale < maxScaleValue,
45291
+ canZoomOut: currentScale > minScaleValue,
45292
+ currentScale
45293
+ };
45294
+ }
45295
+ function ZoomControlsV2({
45296
+ maxScale,
45297
+ minScale,
45298
+ onZoomIn,
45299
+ onZoomOut,
45300
+ resinTargetZoomIn = 'zoomIn',
45301
+ resinTargetZoomOut = 'zoomOut',
45302
+ scale
45303
+ }) {
45304
+ const {
45305
+ canZoomIn,
45306
+ canZoomOut,
45307
+ currentScale
45308
+ } = getZoomState({
45309
+ maxScale,
45310
+ minScale,
45311
+ scale
45312
+ });
45235
45313
  return /*#__PURE__*/external_react_["default"].createElement(external_react_["default"].Fragment, null, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Tooltip, {
45236
45314
  content: ZoomControlsV2_('zoom_out')
45237
45315
  }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Toolbar.Button, {
45238
45316
  "aria-label": ZoomControlsV2_('zoom_out'),
45239
45317
  "data-resin-target": resinTargetZoomOut,
45240
45318
  "data-testid": "bp-ZoomControls-out",
45241
- disabled: currentScale <= minScaleValue,
45319
+ disabled: !canZoomOut,
45242
45320
  onClick: onZoomOut
45243
45321
  }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Toolbar.Icon, {
45244
45322
  icon: __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_Minus_cc9df143_default__
@@ -45254,7 +45332,7 @@ function ZoomControlsV2({
45254
45332
  "aria-label": ZoomControlsV2_('zoom_in'),
45255
45333
  "data-resin-target": resinTargetZoomIn,
45256
45334
  "data-testid": "bp-ZoomControls-in",
45257
- disabled: currentScale >= maxScaleValue,
45335
+ disabled: !canZoomIn,
45258
45336
  onClick: onZoomIn
45259
45337
  }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Toolbar.Icon, {
45260
45338
  icon: __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_Plus_aaa7b14f_default__
@@ -53479,10 +53557,12 @@ var MediaToggle = __webpack_require__(8997);
53479
53557
  // data-state Toolbar.ToggleItem uses for its selected styling, so the tooltip gets its own element.
53480
53558
  function ToggleTooltipV2({
53481
53559
  children,
53482
- content
53560
+ content,
53561
+ side
53483
53562
  }) {
53484
53563
  return /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Tooltip, {
53485
- content: content
53564
+ content: content,
53565
+ side: side
53486
53566
  }, /*#__PURE__*/external_react_["default"].createElement("span", {
53487
53567
  className: "bp-ToggleTooltipV2"
53488
53568
  }, children));
@@ -53674,8 +53754,8 @@ function VideoControls({
53674
53754
  onFullscreenToggle: onFullscreenToggle
53675
53755
  })))));
53676
53756
  }
53677
- // EXTERNAL MODULE: ./src/lib/viewers/controls/media/MediaSettingsV2.tsx + 5 modules
53678
- var MediaSettingsV2 = __webpack_require__(4190);
53757
+ // EXTERNAL MODULE: ./src/lib/viewers/controls/media/MediaSettingsV2.tsx + 1 modules
53758
+ var MediaSettingsV2 = __webpack_require__(4027);
53679
53759
  // EXTERNAL MODULE: ./src/lib/viewers/controls/media/PlayPauseButton.tsx + 2 modules
53680
53760
  var PlayPauseButton = __webpack_require__(5760);
53681
53761
  // EXTERNAL MODULE: ./src/lib/viewers/controls/media/SkipButton.tsx + 2 modules
@@ -54105,6 +54185,298 @@ function VideoFullscreenButton({
54105
54185
  type: "button"
54106
54186
  }, isFullscreen ? /*#__PURE__*/external_react_["default"].createElement(icons_IconArrowsMinimizeMedium24, null) : /*#__PURE__*/external_react_["default"].createElement(icons_IconArrowsMaximizeMedium24, null));
54107
54187
  }
54188
+ // EXTERNAL MODULE: external "react-dom"
54189
+ var external_react_dom_ = __webpack_require__(7516);
54190
+ ;// ./src/lib/viewers/controls/annotations/AnnotationsPaletteAnchorV2.scss
54191
+ // extracted by mini-css-extract-plugin
54192
+
54193
+ ;// ./src/lib/viewers/controls/annotations/AnnotationsPaletteAnchorV2.tsx
54194
+
54195
+
54196
+
54197
+
54198
+
54199
+ // Portals the palette out of the controls so it alone can stack above the annotator's layers, pinned to
54200
+ // the anchor's top-right corner where an end-aligned menu would open
54201
+ function AnnotationsPaletteAnchorV2({
54202
+ anchorRef,
54203
+ children
54204
+ }) {
54205
+ const container = external_react_["default"].useContext(BlueprintProviders/* PortalContainerContext */.n) ?? document.body;
54206
+ const {
54207
+ setIsForced
54208
+ } = external_react_["default"].useContext(ControlsLayerContext);
54209
+ const [point, setPoint] = external_react_["default"].useState(null);
54210
+ external_react_["default"].useLayoutEffect(() => {
54211
+ const anchorEl = anchorRef.current;
54212
+ if (!anchorEl) {
54213
+ return undefined;
54214
+ }
54215
+ const updatePoint = () => {
54216
+ const anchorRect = anchorEl.getBoundingClientRect();
54217
+ const containerRect = container.getBoundingClientRect();
54218
+ const left = anchorRect.right - containerRect.left;
54219
+ const top = anchorRect.top - containerRect.top;
54220
+ setPoint(prev => prev && prev.left === left && prev.top === top ? prev : {
54221
+ left,
54222
+ top
54223
+ });
54224
+ };
54225
+ updatePoint();
54226
+ const observer = new ResizeObserver(updatePoint);
54227
+ observer.observe(container);
54228
+ return () => observer.disconnect();
54229
+ }, [anchorRef, container]);
54230
+
54231
+ // The palette is outside the controls layer, so the layer is held open to keep the anchor in view
54232
+ external_react_["default"].useEffect(() => {
54233
+ setIsForced(true);
54234
+ return () => setIsForced(false);
54235
+ }, [setIsForced]);
54236
+ if (!point) {
54237
+ return null;
54238
+ }
54239
+ return /*#__PURE__*/(0,external_react_dom_.createPortal)(/*#__PURE__*/external_react_["default"].createElement("div", {
54240
+ className: "bp-AnnotationsPaletteAnchorV2",
54241
+ "data-testid": "bp-AnnotationsPaletteAnchorV2",
54242
+ style: {
54243
+ left: point.left,
54244
+ top: point.top
54245
+ }
54246
+ }, children), container);
54247
+ }
54248
+ ;// external "@box/blueprint-web-assets/icons/Medium/PencilTip"
54249
+
54250
+ ;// external "@box/blueprint-web-assets/icons/Medium/SquarePlus"
54251
+
54252
+ ;// external "@box/blueprint-web-assets/icons/Medium/TCursorHighlight"
54253
+
54254
+ ;// ./src/lib/viewers/controls/annotations/annotationModeIcons.ts
54255
+
54256
+
54257
+
54258
+
54259
+ const ANNOTATION_MODE_ICONS = {
54260
+ [AnnotationMode.DRAWING]: __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_PencilTip_154ad3fd_default__,
54261
+ [AnnotationMode.HIGHLIGHT]: __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_TCursorHighlight_508374cb_default__,
54262
+ [AnnotationMode.REGION]: __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_SquarePlus_c11758f1_default__
54263
+ };
54264
+ /* harmony default export */ const annotationModeIcons = (ANNOTATION_MODE_ICONS);
54265
+ ;// ./src/lib/viewers/controls/annotations/AnnotationsPaletteV2.scss
54266
+ // extracted by mini-css-extract-plugin
54267
+
54268
+ ;// ./src/lib/viewers/controls/annotations/AnnotationsPaletteV2.tsx
54269
+ /* provided dependency */ var AnnotationsPaletteV2_ = __webpack_require__(441)["Tl"];
54270
+ function AnnotationsPaletteV2_extends() { return AnnotationsPaletteV2_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, AnnotationsPaletteV2_extends.apply(null, arguments); }
54271
+
54272
+
54273
+
54274
+
54275
+
54276
+
54277
+
54278
+
54279
+ function AnnotationsPaletteV2({
54280
+ children
54281
+ }) {
54282
+ return /*#__PURE__*/external_react_["default"].createElement("div", {
54283
+ className: "bp-AnnotationsPaletteV2",
54284
+ "data-testid": "bp-AnnotationsPaletteV2"
54285
+ }, /*#__PURE__*/external_react_["default"].createElement(controls_bar_ControlsBarV2, null, children));
54286
+ }
54287
+ function Modes({
54288
+ annotationMode,
54289
+ children,
54290
+ onAnnotationModeClick = (noop_default())
54291
+ }) {
54292
+ // The single-select group reports an empty value when the active mode is clicked again. Exiting
54293
+ // is left to the trigger on the main bar, so the palette never closes under the cursor.
54294
+ const handleModeChange = mode => {
54295
+ if (!mode || mode === annotationMode) {
54296
+ return;
54297
+ }
54298
+ onAnnotationModeClick({
54299
+ mode: mode
54300
+ });
54301
+ };
54302
+ return /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Toolbar.ToggleGroup, {
54303
+ "data-testid": "bp-annotations-controls",
54304
+ onValueChange: handleModeChange,
54305
+ type: "single",
54306
+ value: annotationMode
54307
+ }, children);
54308
+ }
54309
+ function Mode({
54310
+ value
54311
+ }) {
54312
+ const {
54313
+ label,
54314
+ resinTarget,
54315
+ testId
54316
+ } = {
54317
+ [AnnotationMode.DRAWING]: {
54318
+ label: AnnotationsPaletteV2_('drawing_comment'),
54319
+ resinTarget: 'draw',
54320
+ testId: 'bp-AnnotationsControls-drawBtn'
54321
+ },
54322
+ [AnnotationMode.HIGHLIGHT]: {
54323
+ label: AnnotationsPaletteV2_('highlight_text'),
54324
+ resinTarget: 'highlightText',
54325
+ testId: 'bp-AnnotationsControls-highlightBtn'
54326
+ },
54327
+ [AnnotationMode.REGION]: {
54328
+ label: AnnotationsPaletteV2_('region_comment'),
54329
+ resinTarget: 'highlightRegion',
54330
+ testId: 'bp-AnnotationsControls-regionBtn'
54331
+ }
54332
+ }[value];
54333
+ return /*#__PURE__*/external_react_["default"].createElement(ToggleTooltipV2, {
54334
+ content: label
54335
+ }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Toolbar.ToggleItem, {
54336
+ "aria-label": label,
54337
+ "data-resin-target": resinTarget,
54338
+ "data-testid": testId,
54339
+ icon: annotationModeIcons[value],
54340
+ value: value
54341
+ }));
54342
+ }
54343
+ /* harmony default export */ const annotations_AnnotationsPaletteV2 = (AnnotationsPaletteV2_extends(AnnotationsPaletteV2, {
54344
+ Mode,
54345
+ Modes
54346
+ }));
54347
+ ;// external "@box/blueprint-web-assets/icons/Medium/Comment"
54348
+
54349
+ ;// ./src/lib/viewers/controls/annotations/AnnotationsToggleV2.tsx
54350
+ /* provided dependency */ var AnnotationsToggleV2_ = __webpack_require__(441)["Tl"];
54351
+ function AnnotationsToggleV2_extends() { return AnnotationsToggleV2_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, AnnotationsToggleV2_extends.apply(null, arguments); }
54352
+
54353
+
54354
+
54355
+
54356
+
54357
+
54358
+
54359
+ // The toolbar parts throw outside a Toolbar.Root, so surfaces without one (the media bar) use a standalone button.
54360
+
54361
+ const TOGGLE_VALUE = 'annotations';
54362
+ function AnnotationsToggleV2(props, ref) {
54363
+ const {
54364
+ annotationMode = AnnotationMode.NONE,
54365
+ isExpanded,
54366
+ modes,
54367
+ onAnnotationModeClick = (noop_default()),
54368
+ onAnnotationModeEscape = (noop_default()),
54369
+ tooltipSide
54370
+ } = props;
54371
+ const [lastMode, setLastMode] = external_react_["default"].useState(null);
54372
+ const isActive = annotationMode !== AnnotationMode.NONE;
54373
+ const resumeMode = lastMode && modes.includes(lastMode) ? lastMode : modes[0];
54374
+ external_react_["default"].useEffect(() => {
54375
+ if (annotationMode !== AnnotationMode.NONE) {
54376
+ setLastMode(annotationMode);
54377
+ }
54378
+ }, [annotationMode]);
54379
+
54380
+ // Global event handlers
54381
+ external_react_["default"].useEffect(() => {
54382
+ const handleKeyDown = event => {
54383
+ if (event.key !== 'Escape') {
54384
+ return;
54385
+ }
54386
+ event.preventDefault();
54387
+ event.stopPropagation();
54388
+ onAnnotationModeEscape();
54389
+ };
54390
+ if (annotationMode !== AnnotationMode.NONE) {
54391
+ document.addEventListener('keydown', handleKeyDown);
54392
+ }
54393
+ return () => {
54394
+ document.removeEventListener('keydown', handleKeyDown);
54395
+ };
54396
+ }, [annotationMode, onAnnotationModeEscape]);
54397
+ if (!resumeMode) {
54398
+ return null;
54399
+ }
54400
+ const handleToggle = isPressed => {
54401
+ onAnnotationModeClick({
54402
+ mode: isPressed ? resumeMode : AnnotationMode.NONE
54403
+ });
54404
+ };
54405
+ const toggleProps = {
54406
+ ref,
54407
+ 'aria-expanded': isExpanded ?? isActive,
54408
+ 'aria-label': AnnotationsToggleV2_('annotation_tools'),
54409
+ 'data-resin-target': 'annotations',
54410
+ 'data-testid': 'bp-AnnotationsControls-toggleBtn',
54411
+ icon: __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_Comment_c700dfbc_default__
54412
+ };
54413
+ const renderToggle = toggle => /*#__PURE__*/external_react_["default"].createElement(ToggleTooltipV2, {
54414
+ content: AnnotationsToggleV2_('annotation_tools'),
54415
+ side: tooltipSide
54416
+ }, toggle);
54417
+ if (props.buttonType === 'icon') {
54418
+ const {
54419
+ className,
54420
+ size,
54421
+ variant
54422
+ } = props;
54423
+ return renderToggle(/*#__PURE__*/external_react_["default"].createElement(blueprint_web_.IconToggleButton, AnnotationsToggleV2_extends({}, toggleProps, {
54424
+ className: className,
54425
+ onPressedChange: handleToggle,
54426
+ pressed: isActive,
54427
+ size: size,
54428
+ variant: variant
54429
+ })));
54430
+ }
54431
+ return /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Toolbar.ToggleGroup, {
54432
+ onValueChange: value => handleToggle(value.includes(TOGGLE_VALUE)),
54433
+ type: "multiple",
54434
+ value: isActive ? [TOGGLE_VALUE] : []
54435
+ }, renderToggle(/*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Toolbar.ToggleItem, AnnotationsToggleV2_extends({}, toggleProps, {
54436
+ value: TOGGLE_VALUE
54437
+ }))));
54438
+ }
54439
+ /* harmony default export */ const annotations_AnnotationsToggleV2 = (/*#__PURE__*/external_react_["default"].forwardRef(AnnotationsToggleV2));
54440
+ ;// ./src/lib/viewers/controls/color-picker/ColorPickerControlV2.scss
54441
+ // extracted by mini-css-extract-plugin
54442
+
54443
+ ;// ./src/lib/viewers/controls/color-picker/ColorPickerControlV2.tsx
54444
+ /* provided dependency */ var ColorPickerControlV2_ = __webpack_require__(441)["Tl"];
54445
+
54446
+
54447
+
54448
+
54449
+
54450
+ const getColorLabels = () => ({
54451
+ [AnnotationColor.BOX_BLUE]: ColorPickerControlV2_('drawing_color_blue'),
54452
+ [AnnotationColor.GREEN_LIGHT]: ColorPickerControlV2_('drawing_color_green'),
54453
+ [AnnotationColor.WATERMELON_RED]: ColorPickerControlV2_('drawing_color_red'),
54454
+ [AnnotationColor.YELLORANGE]: ColorPickerControlV2_('drawing_color_orange'),
54455
+ [AnnotationColor.YELLOW]: ColorPickerControlV2_('drawing_color_yellow'),
54456
+ [AnnotationColor.GRIMACE]: ColorPickerControlV2_('drawing_color_purple')
54457
+ });
54458
+ function ColorPickerControlV2({
54459
+ activeColor = __WEBPACK_EXTERNAL_MODULE_box_ui_elements_es_styles_variables_c815ce80_bdlBoxBlue__,
54460
+ colors,
54461
+ onColorSelect
54462
+ }) {
54463
+ const colorLabels = getColorLabels();
54464
+ return /*#__PURE__*/external_react_["default"].createElement("div", {
54465
+ className: "bp-ColorPickerControlV2",
54466
+ "data-testid": "bp-color-picker-control"
54467
+ }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.SelectMenu.Grid, {
54468
+ "aria-label": ColorPickerControlV2_('drawing_color'),
54469
+ columns: colors.length
54470
+ }, colors.map(color => /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.SelectMenu.Option.ColorCircle, {
54471
+ key: color,
54472
+ active: color === activeColor,
54473
+ "aria-label": colorLabels[color] || color,
54474
+ className: "bp-ColorPickerControlV2-swatch",
54475
+ color: color,
54476
+ "data-resin-target": "colorSelect",
54477
+ onClick: () => onColorSelect(color)
54478
+ }))));
54479
+ }
54108
54480
  ;// ./src/lib/viewers/media/VideoControlsV2.scss
54109
54481
  // extracted by mini-css-extract-plugin
54110
54482
 
@@ -54121,12 +54493,20 @@ function VideoFullscreenButton({
54121
54493
 
54122
54494
 
54123
54495
 
54496
+
54497
+
54498
+
54499
+
54500
+
54501
+
54502
+
54503
+
54124
54504
 
54125
54505
 
54126
54506
 
54127
54507
  function VideoControlsV2({
54128
54508
  annotationColor,
54129
- annotationMode,
54509
+ annotationMode = AnnotationMode.NONE,
54130
54510
  aspectRatio,
54131
54511
  audioTrack,
54132
54512
  audioTracks,
@@ -54176,6 +54556,55 @@ function VideoControlsV2({
54176
54556
  videoAnnotationsEnabled = false,
54177
54557
  volume
54178
54558
  }) {
54559
+ const isFullscreen = useFullscreen();
54560
+
54561
+ // Listed in the palette's button order, which is also the order the toggle falls back to
54562
+ const annotationModes = [];
54563
+ if (videoAnnotationsEnabled && isBlueprintEnabled && !isFullscreen) {
54564
+ if (hasRegion) {
54565
+ annotationModes.push(AnnotationMode.REGION);
54566
+ }
54567
+ if (hasDrawing) {
54568
+ annotationModes.push(AnnotationMode.DRAWING);
54569
+ }
54570
+ }
54571
+ const hasAnnotationsV2 = annotationModes.length > 0;
54572
+ const isAnnotating = hasAnnotationsV2 && annotationMode !== AnnotationMode.NONE;
54573
+ const [isPaletteDismissed, setIsPaletteDismissed] = external_react_["default"].useState(false);
54574
+ const [paletteMode, setPaletteMode] = external_react_["default"].useState(annotationMode);
54575
+ const isPaletteOpen = isAnnotating && !isPaletteDismissed;
54576
+ const annotationsToggleRef = external_react_["default"].useRef(null);
54577
+ if (paletteMode !== annotationMode) {
54578
+ setPaletteMode(annotationMode);
54579
+ setIsPaletteDismissed(false);
54580
+ }
54581
+
54582
+ // The annotator mounts its drawing and region layers beside the video, so a press anywhere in its
54583
+ // container starts a markup. Capture runs before the annotator's own handlers can stop the event.
54584
+ external_react_["default"].useEffect(() => {
54585
+ const surfaceEl = mediaEl?.parentElement;
54586
+ if (!isAnnotating || !surfaceEl) {
54587
+ return undefined;
54588
+ }
54589
+ const handlePointerDown = () => setIsPaletteDismissed(true);
54590
+ surfaceEl.addEventListener('pointerdown', handlePointerDown, true);
54591
+ return () => {
54592
+ surfaceEl.removeEventListener('pointerdown', handlePointerDown, true);
54593
+ };
54594
+ }, [isAnnotating, mediaEl]);
54595
+ external_react_["default"].useEffect(() => {
54596
+ const toggleEl = annotationsToggleRef.current;
54597
+ if (!isAnnotating || !isPaletteDismissed || !toggleEl) {
54598
+ return undefined;
54599
+ }
54600
+ const handleRestore = () => setIsPaletteDismissed(false);
54601
+ toggleEl.addEventListener('focus', handleRestore);
54602
+ toggleEl.addEventListener('pointerenter', handleRestore);
54603
+ return () => {
54604
+ toggleEl.removeEventListener('focus', handleRestore);
54605
+ toggleEl.removeEventListener('pointerenter', handleRestore);
54606
+ };
54607
+ }, [isAnnotating, isPaletteDismissed]);
54179
54608
  return /*#__PURE__*/external_react_["default"].createElement(ExperiencesProvider, {
54180
54609
  experiences: experiences
54181
54610
  }, /*#__PURE__*/external_react_["default"].createElement("div", {
@@ -54280,7 +54709,31 @@ function VideoControlsV2({
54280
54709
  rate: rate,
54281
54710
  subtitle: subtitle,
54282
54711
  subtitles: subtitles
54283
- }), videoAnnotationsEnabled && /*#__PURE__*/external_react_["default"].createElement(external_react_["default"].Fragment, null, /*#__PURE__*/external_react_["default"].createElement("div", {
54712
+ }), hasAnnotationsV2 && /*#__PURE__*/external_react_["default"].createElement(external_react_["default"].Fragment, null, /*#__PURE__*/external_react_["default"].createElement("div", {
54713
+ className: "bp-VideoControlsV2-divider"
54714
+ }), /*#__PURE__*/external_react_["default"].createElement(annotations_AnnotationsToggleV2, {
54715
+ ref: annotationsToggleRef,
54716
+ annotationMode: annotationMode,
54717
+ buttonType: "icon",
54718
+ className: "bp-VideoControlsV2-annotationsToggle",
54719
+ isExpanded: isPaletteOpen,
54720
+ modes: annotationModes,
54721
+ onAnnotationModeClick: onAnnotationModeClick,
54722
+ onAnnotationModeEscape: onAnnotationModeEscape,
54723
+ tooltipSide: isPaletteOpen ? 'left' : undefined
54724
+ }), isPaletteOpen && /*#__PURE__*/external_react_["default"].createElement(AnnotationsPaletteAnchorV2, {
54725
+ anchorRef: annotationsToggleRef
54726
+ }, /*#__PURE__*/external_react_["default"].createElement(annotations_AnnotationsPaletteV2, null, /*#__PURE__*/external_react_["default"].createElement(annotations_AnnotationsPaletteV2.Modes, {
54727
+ annotationMode: annotationMode,
54728
+ onAnnotationModeClick: onAnnotationModeClick
54729
+ }, annotationModes.map(mode => /*#__PURE__*/external_react_["default"].createElement(annotations_AnnotationsPaletteV2.Mode, {
54730
+ key: mode,
54731
+ value: mode
54732
+ }))), annotationMode === AnnotationMode.DRAWING && /*#__PURE__*/external_react_["default"].createElement(external_react_["default"].Fragment, null, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Toolbar.Separator, null), /*#__PURE__*/external_react_["default"].createElement(ColorPickerControlV2, {
54733
+ activeColor: annotationColor,
54734
+ colors: ANNOTATION_COLORS,
54735
+ onColorSelect: onAnnotationColorChange
54736
+ }))))), videoAnnotationsEnabled && !isBlueprintEnabled && /*#__PURE__*/external_react_["default"].createElement(external_react_["default"].Fragment, null, /*#__PURE__*/external_react_["default"].createElement("div", {
54284
54737
  className: "bp-VideoControlsV2-divider"
54285
54738
  }), /*#__PURE__*/external_react_["default"].createElement(AnnotationsControls, {
54286
54739
  annotationColor: annotationColor,
@@ -56867,6 +57320,14 @@ function DocControls({
56867
57320
  onAnnotationColorChange: onAnnotationColorChange
56868
57321
  })));
56869
57322
  }
57323
+ ;// external "@box/blueprint-web-assets/icons/Medium/GridView"
57324
+
57325
+ ;// external "@box/blueprint-web-assets/icons/Medium/Nav"
57326
+
57327
+ ;// external "@box/blueprint-web-assets/icons/Medium/RotateLeft"
57328
+
57329
+ ;// external "@box/blueprint-web-assets/icons/Medium/Search"
57330
+
56870
57331
  ;// external "@box/blueprint-web-assets/icons/Medium/XMark"
56871
57332
 
56872
57333
  ;// ./src/lib/viewers/controls/annotations/AnnotationsExitButtonV2.scss
@@ -56894,29 +57355,154 @@ function AnnotationsExitButtonV2({
56894
57355
  icon: __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_XMark_07fbe0f0_default__
56895
57356
  }))));
56896
57357
  }
56897
- ;// external "@box/blueprint-web-assets/icons/Medium/PencilTip"
57358
+ ;// ./src/lib/viewers/controls/controls-bar/useControlsOverflow.ts
56898
57359
 
56899
- ;// external "@box/blueprint-web-assets/icons/Medium/SquarePlus"
56900
57360
 
56901
- ;// external "@box/blueprint-web-assets/icons/Medium/TCursorHighlight"
56902
57361
 
56903
- ;// ./src/lib/viewers/controls/annotations/annotationModeIcons.ts
57362
+ const ALWAYS_OVERFLOW = 0;
57363
+ // The space the mocks leave between the bar and the edges of the viewer
57364
+ const EDGE_MARGIN = 40;
57365
+ // One toolbar button, the estimate for a control or the overflow trigger before it has been measured
57366
+ const DEFAULT_WIDTH = 32;
57367
+ const isCollapsible = ({
57368
+ menu,
57369
+ priority
57370
+ }) => !!menu && priority !== undefined;
57371
+ function getOverflowIds(items, availableWidth, metrics) {
57372
+ const {
57373
+ chrome,
57374
+ gap,
57375
+ triggerWidth = DEFAULT_WIDTH,
57376
+ widths
57377
+ } = metrics;
57378
+ const overflowIds = new Set(items.filter(item => isCollapsible(item) && item.priority === ALWAYS_OVERFLOW).map(({
57379
+ id
57380
+ }) => id));
57381
+ const getBarWidth = () => {
57382
+ const slots = items.filter(({
57383
+ id
57384
+ }) => !overflowIds.has(id)).map(({
57385
+ id
57386
+ }) => widths.get(id) ?? DEFAULT_WIDTH);
57387
+ if (overflowIds.size) {
57388
+ slots.push(triggerWidth);
57389
+ }
57390
+ return chrome + slots.reduce((total, width) => total + width, 0) + gap * Math.max(slots.length - 1, 0);
57391
+ };
57392
+ const priorities = items.filter(item => isCollapsible(item) && item.priority !== ALWAYS_OVERFLOW).map(({
57393
+ priority
57394
+ }) => priority).sort((a, b) => a - b);
57395
+ Array.from(new Set(priorities)).every(priority => {
57396
+ if (getBarWidth() <= availableWidth) {
57397
+ return false;
57398
+ }
57399
+ items.filter(item => isCollapsible(item) && item.priority === priority).forEach(({
57400
+ id
57401
+ }) => overflowIds.add(id));
57402
+ return true;
57403
+ });
57404
+ return overflowIds;
57405
+ }
57406
+ const getStyleWidth = (style, properties) => properties.reduce((total, property) => total + (parseFloat(style.getPropertyValue(property)) || 0), 0);
57407
+ function useControlsOverflow(items) {
57408
+ const barRef = external_react_["default"].useRef(null);
57409
+ const metricsRef = external_react_["default"].useRef({
57410
+ chrome: 0,
57411
+ gap: 0,
57412
+ widths: new Map()
57413
+ });
57414
+ const portalContainer = external_react_["default"].useContext(BlueprintProviders/* PortalContainerContext */.n);
57415
+ const [availableWidth, setAvailableWidth] = external_react_["default"].useState(Number.POSITIVE_INFINITY);
57416
+ const [, forceUpdate] = external_react_["default"].useReducer(count => count + 1, 0);
56904
57417
 
57418
+ // A control can only be measured while it is on the bar, so each width is cached as it renders and
57419
+ // reused to decide whether that control would fit again
57420
+ external_react_["default"].useLayoutEffect(() => {
57421
+ const bar = barRef.current;
57422
+ if (!bar) {
57423
+ return;
57424
+ }
57425
+ const metrics = metricsRef.current;
57426
+ const style = window.getComputedStyle(bar);
57427
+ const chrome = getStyleWidth(style, ['padding-left', 'padding-right', 'border-left-width', 'border-right-width']);
57428
+ const gap = getStyleWidth(style, ['column-gap']);
57429
+ let hasChanged = chrome !== metrics.chrome || gap !== metrics.gap;
57430
+ metrics.chrome = chrome;
57431
+ metrics.gap = gap;
57432
+ Array.from(bar.children).forEach(child => {
57433
+ const {
57434
+ offsetWidth
57435
+ } = child;
57436
+ const {
57437
+ overflowId,
57438
+ overflowTrigger
57439
+ } = child.dataset;
57440
+ if (!offsetWidth) {
57441
+ return;
57442
+ }
57443
+ if (overflowId && metrics.widths.get(overflowId) !== offsetWidth) {
57444
+ metrics.widths.set(overflowId, offsetWidth);
57445
+ hasChanged = true;
57446
+ }
57447
+ if (overflowTrigger !== undefined && metrics.triggerWidth !== offsetWidth) {
57448
+ metrics.triggerWidth = offsetWidth;
57449
+ hasChanged = true;
57450
+ }
57451
+ });
57452
+ if (hasChanged) {
57453
+ forceUpdate();
57454
+ }
57455
+ });
56905
57456
 
57457
+ // The bar renders nothing without items, so the viewer lookup reruns once it mounts
57458
+ const hasItems = items.length > 0;
56906
57459
 
57460
+ // The controls root is centered and shrinks to fit the bar, so the space the bar can grow into is the
57461
+ // viewer's. Fullscreen resizes the viewer too, which the observer picks up.
57462
+ external_react_["default"].useLayoutEffect(() => {
57463
+ const container = portalContainer ?? barRef.current?.closest(`.${constants/* CLASS_BOX_PREVIEW_CONTENT */.SG}`) ?? null;
57464
+ if (!container) {
57465
+ return undefined;
57466
+ }
57467
+ const updateAvailableWidth = () => {
57468
+ const {
57469
+ clientWidth
57470
+ } = container;
56907
57471
 
56908
- const ANNOTATION_MODE_ICONS = {
56909
- [AnnotationMode.DRAWING]: __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_PencilTip_154ad3fd_default__,
56910
- [AnnotationMode.HIGHLIGHT]: __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_TCursorHighlight_508374cb_default__,
56911
- [AnnotationMode.REGION]: __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_SquarePlus_c11758f1_default__
56912
- };
56913
- /* harmony default export */ const annotationModeIcons = (ANNOTATION_MODE_ICONS);
56914
- ;// ./src/lib/viewers/controls/annotations/AnnotationsPaletteV2.scss
57472
+ // A container that has not been laid out yet measures zero, which would collapse everything
57473
+ setAvailableWidth(clientWidth > 0 ? clientWidth - EDGE_MARGIN : Number.POSITIVE_INFINITY);
57474
+ };
57475
+ updateAvailableWidth();
57476
+ if (typeof ResizeObserver === 'undefined') {
57477
+ return undefined;
57478
+ }
57479
+ const observer = new ResizeObserver(updateAvailableWidth);
57480
+ observer.observe(container);
57481
+ return () => observer.disconnect();
57482
+ }, [hasItems, portalContainer]);
57483
+ const overflowIds = getOverflowIds(items, availableWidth, metricsRef.current);
57484
+ return {
57485
+ barRef,
57486
+ overflowItems: items.filter(({
57487
+ id
57488
+ }) => overflowIds.has(id)),
57489
+ visibleItems: items.filter(({
57490
+ id
57491
+ }) => !overflowIds.has(id))
57492
+ };
57493
+ }
57494
+ ;// external "@box/blueprint-web-assets/icons/Medium/EllipsisVertical"
57495
+
57496
+ // EXTERNAL MODULE: ./src/lib/viewers/controls/tooltip/MenuTriggerTooltipV2.tsx
57497
+ var MenuTriggerTooltipV2 = __webpack_require__(6014);
57498
+ // EXTERNAL MODULE: ./src/lib/viewers/controls/settings/stopMenuKeyPropagation.ts
57499
+ var stopMenuKeyPropagation = __webpack_require__(9646);
57500
+ ;// ./src/lib/viewers/controls/controls-bar/ControlsOverflowMenuV2.scss
56915
57501
  // extracted by mini-css-extract-plugin
56916
57502
 
56917
- ;// ./src/lib/viewers/controls/annotations/AnnotationsPaletteV2.tsx
56918
- /* provided dependency */ var AnnotationsPaletteV2_ = __webpack_require__(441)["Tl"];
56919
- function AnnotationsPaletteV2_extends() { return AnnotationsPaletteV2_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, AnnotationsPaletteV2_extends.apply(null, arguments); }
57503
+ ;// ./src/lib/viewers/controls/controls-bar/ControlsOverflowMenuV2.tsx
57504
+ /* provided dependency */ var ControlsOverflowMenuV2_ = __webpack_require__(441)["Tl"];
57505
+ function ControlsOverflowMenuV2_extends() { return ControlsOverflowMenuV2_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, ControlsOverflowMenuV2_extends.apply(null, arguments); }
56920
57506
 
56921
57507
 
56922
57508
 
@@ -56925,202 +57511,194 @@ function AnnotationsPaletteV2_extends() { return AnnotationsPaletteV2_extends =
56925
57511
 
56926
57512
 
56927
57513
 
56928
- function AnnotationsPaletteV2({
56929
- children
56930
- }) {
56931
- return /*#__PURE__*/external_react_["default"].createElement("div", {
56932
- className: "bp-AnnotationsPaletteV2",
56933
- "data-testid": "bp-AnnotationsPaletteV2"
56934
- }, /*#__PURE__*/external_react_["default"].createElement(controls_bar_ControlsBarV2, null, children));
57514
+ // Handlers that return focus to the control that invoked them get the trigger, since the row unmounts with the menu
57515
+ const ControlsOverflowTriggerContext = /*#__PURE__*/external_react_["default"].createContext({
57516
+ current: null
57517
+ });
57518
+
57519
+ // The menu portals out of the controls root, so it carries the root's Resin attributes itself
57520
+ const getResinAttributes = element => {
57521
+ const resinComponent = element?.closest('[data-resin-component]');
57522
+ return resinComponent ? Object.fromEntries(Array.from(resinComponent.attributes).filter(({
57523
+ name
57524
+ }) => name.startsWith('data-resin-')).map(({
57525
+ name,
57526
+ value
57527
+ }) => [name, value])) : {};
57528
+ };
57529
+ function ControlsOverflowToggle(props, ref) {
57530
+ const isMenuOpen = props['aria-expanded'] === true || props['aria-expanded'] === 'true';
57531
+ return /*#__PURE__*/external_react_["default"].createElement(MenuTriggerTooltipV2/* default */.A, {
57532
+ content: ControlsOverflowMenuV2_('controls_more'),
57533
+ isMenuOpen: isMenuOpen
57534
+ }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Toolbar.Button, ControlsOverflowMenuV2_extends({
57535
+ ref: ref,
57536
+ "aria-label": ControlsOverflowMenuV2_('controls_more'),
57537
+ "data-resin-target": "moreOptions",
57538
+ "data-testid": "bp-ControlsBar-overflowBtn"
57539
+ }, props), /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Toolbar.Icon, {
57540
+ icon: __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_EllipsisVertical_06d33c4b_default__
57541
+ })));
56935
57542
  }
56936
- function Modes({
56937
- annotationMode,
56938
- children,
56939
- onAnnotationModeClick = (noop_default())
57543
+ const ControlsOverflowToggleV2 = /*#__PURE__*/external_react_["default"].forwardRef(ControlsOverflowToggle);
57544
+ function ControlsOverflowMenuV2({
57545
+ items
56940
57546
  }) {
56941
- // The single-select group reports an empty value when the active mode is clicked again. Exiting
56942
- // is left to the trigger on the main bar, so the palette never closes under the cursor.
56943
- const handleModeChange = mode => {
56944
- if (!mode || mode === annotationMode) {
56945
- return;
57547
+ const container = external_react_["default"].useContext(BlueprintProviders/* PortalContainerContext */.n) ?? undefined;
57548
+ const {
57549
+ setIsForced
57550
+ } = external_react_["default"].useContext(ControlsLayerContext);
57551
+ const triggerRef = external_react_["default"].useRef(null);
57552
+ const [isOpen, setIsOpen] = external_react_["default"].useState(false);
57553
+ const [resinAttributes, setResinAttributes] = external_react_["default"].useState({});
57554
+ const handleOpenChange = open => {
57555
+ if (open) {
57556
+ setResinAttributes(getResinAttributes(triggerRef.current));
56946
57557
  }
56947
- onAnnotationModeClick({
56948
- mode: mode
56949
- });
57558
+ setIsOpen(open);
56950
57559
  };
56951
- return /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Toolbar.ToggleGroup, {
56952
- "data-testid": "bp-annotations-controls",
56953
- onValueChange: handleModeChange,
56954
- type: "single",
56955
- value: annotationMode
56956
- }, children);
56957
- }
56958
- function Mode({
56959
- value
56960
- }) {
56961
- const {
56962
- label,
56963
- resinTarget,
56964
- testId
56965
- } = {
56966
- [AnnotationMode.DRAWING]: {
56967
- label: AnnotationsPaletteV2_('drawing_comment'),
56968
- resinTarget: 'draw',
56969
- testId: 'bp-AnnotationsControls-drawBtn'
56970
- },
56971
- [AnnotationMode.HIGHLIGHT]: {
56972
- label: AnnotationsPaletteV2_('highlight_text'),
56973
- resinTarget: 'highlightText',
56974
- testId: 'bp-AnnotationsControls-highlightBtn'
56975
- },
56976
- [AnnotationMode.REGION]: {
56977
- label: AnnotationsPaletteV2_('region_comment'),
56978
- resinTarget: 'highlightRegion',
56979
- testId: 'bp-AnnotationsControls-regionBtn'
57560
+
57561
+ // The menu sits outside the controls layer, which would otherwise hide the bar under the open menu
57562
+ external_react_["default"].useEffect(() => {
57563
+ if (!isOpen) {
57564
+ return undefined;
56980
57565
  }
56981
- }[value];
56982
- return /*#__PURE__*/external_react_["default"].createElement(ToggleTooltipV2, {
56983
- content: label
56984
- }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Toolbar.ToggleItem, {
56985
- "aria-label": label,
56986
- "data-resin-target": resinTarget,
56987
- "data-testid": testId,
56988
- icon: annotationModeIcons[value],
56989
- value: value
56990
- }));
57566
+ setIsForced(true);
57567
+ return () => setIsForced(false);
57568
+ }, [isOpen, setIsForced]);
57569
+ return /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Root, {
57570
+ modal: false,
57571
+ onOpenChange: handleOpenChange,
57572
+ open: isOpen
57573
+ }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Trigger, {
57574
+ ref: triggerRef,
57575
+ asChild: true,
57576
+ "data-overflow-ids": items.map(({
57577
+ id
57578
+ }) => id).join(' '),
57579
+ "data-overflow-trigger": ""
57580
+ }, /*#__PURE__*/external_react_["default"].createElement(ControlsOverflowToggleV2, null)), /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Content, ControlsOverflowMenuV2_extends({
57581
+ align: "end",
57582
+ className: "bp-ControlsOverflowMenuV2",
57583
+ container: container,
57584
+ "data-testid": "bp-ControlsBar-overflowMenu",
57585
+ onEscapeKeyDown: stopMenuKeyPropagation/* stopEscapePropagation */.s,
57586
+ onKeyDown: stopMenuKeyPropagation/* stopKeyPropagation */.a,
57587
+ side: "top"
57588
+ }, resinAttributes), /*#__PURE__*/external_react_["default"].createElement(ControlsOverflowTriggerContext.Provider, {
57589
+ value: triggerRef
57590
+ }, items.map(({
57591
+ id,
57592
+ menu
57593
+ }) => /*#__PURE__*/external_react_["default"].createElement(external_react_["default"].Fragment, {
57594
+ key: id
57595
+ }, menu)))));
56991
57596
  }
56992
- /* harmony default export */ const annotations_AnnotationsPaletteV2 = (AnnotationsPaletteV2_extends(AnnotationsPaletteV2, {
56993
- Mode,
56994
- Modes
56995
- }));
56996
- ;// ./src/lib/viewers/controls/annotations/AnnotationsToggleV2.tsx
56997
- /* provided dependency */ var AnnotationsToggleV2_ = __webpack_require__(441)["Tl"];
56998
- function AnnotationsToggleV2_extends() { return AnnotationsToggleV2_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, AnnotationsToggleV2_extends.apply(null, arguments); }
56999
-
57597
+ ;// ./src/lib/viewers/controls/controls-bar/shortcuts.ts
57598
+ /* provided dependency */ var shortcuts_ = __webpack_require__(441)["Tl"];
57000
57599
 
57600
+ // iPads report a Mac user agent, and their keyboards have the command key too
57601
+ const isApplePlatform = () => /Mac|iPhone|iPad|iPod/.test(navigator.userAgent);
57001
57602
 
57603
+ // Preview binds its shortcuts to both Cmd and Ctrl, so each platform is shown the modifier its keyboard labels
57604
+ function getShortcut(key) {
57605
+ return isApplePlatform() ? {
57606
+ keys: `Meta+${key}`,
57607
+ label: `⌘ + ${key}`
57608
+ } : {
57609
+ keys: `Control+${key}`,
57610
+ label: (0,util/* replacePlaceholders */.Lb)(shortcuts_('controls_shortcut_ctrl'), [key])
57611
+ };
57612
+ }
57613
+ ;// ./src/lib/viewers/controls/controls-bar/ControlsMenuItemV2.scss
57614
+ // extracted by mini-css-extract-plugin
57002
57615
 
57616
+ ;// ./src/lib/viewers/controls/controls-bar/ControlsMenuItemV2.tsx
57617
+ const ControlsMenuItemV2_excluded = ["bareKey", "icon", "keepOpen", "label", "onSelect", "shortcutKey"];
57618
+ function ControlsMenuItemV2_extends() { return ControlsMenuItemV2_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, ControlsMenuItemV2_extends.apply(null, arguments); }
57619
+ function ControlsMenuItemV2_objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = ControlsMenuItemV2_objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
57620
+ function ControlsMenuItemV2_objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
57003
57621
 
57004
57622
 
57005
57623
 
57006
- // The toolbar parts throw outside a Toolbar.Root, so surfaces without one (the media bar) use a standalone button.
57007
57624
 
57008
- const TOGGLE_VALUE = 'annotations';
57009
- function AnnotationsToggleV2(props, ref) {
57010
- const {
57011
- annotationMode = AnnotationMode.NONE,
57012
- modes,
57013
- onAnnotationModeClick = (noop_default()),
57014
- onAnnotationModeEscape = (noop_default())
57015
- } = props;
57016
- const [lastMode, setLastMode] = external_react_["default"].useState(null);
57017
- const isActive = annotationMode !== AnnotationMode.NONE;
57018
- const resumeMode = lastMode && modes.includes(lastMode) ? lastMode : modes[0];
57019
- external_react_["default"].useEffect(() => {
57020
- if (annotationMode !== AnnotationMode.NONE) {
57021
- setLastMode(annotationMode);
57022
- }
57023
- }, [annotationMode]);
57024
57625
 
57025
- // Global event handlers
57026
- external_react_["default"].useEffect(() => {
57027
- const handleKeyDown = event => {
57028
- if (event.key !== 'Escape') {
57029
- return;
57030
- }
57031
- event.preventDefault();
57032
- event.stopPropagation();
57033
- onAnnotationModeEscape();
57034
- };
57035
- if (annotationMode !== AnnotationMode.NONE) {
57036
- document.addEventListener('keydown', handleKeyDown);
57037
- }
57038
- return () => {
57039
- document.removeEventListener('keydown', handleKeyDown);
57626
+ // The menu form of a bar control. Toggles are plain rows whose label names the next action, since checkbox
57627
+ // rows reserve space for a checkmark that the mocks do not have.
57628
+ function ControlsMenuItemV2(_ref) {
57629
+ let {
57630
+ bareKey,
57631
+ icon,
57632
+ keepOpen,
57633
+ label,
57634
+ onSelect,
57635
+ shortcutKey
57636
+ } = _ref,
57637
+ rest = ControlsMenuItemV2_objectWithoutProperties(_ref, ControlsMenuItemV2_excluded);
57638
+ const triggerRef = external_react_["default"].useContext(ControlsOverflowTriggerContext);
57639
+ let shortcut = null;
57640
+ if (shortcutKey) {
57641
+ shortcut = getShortcut(shortcutKey);
57642
+ } else if (bareKey) {
57643
+ shortcut = {
57644
+ keys: bareKey,
57645
+ label: bareKey
57040
57646
  };
57041
- }, [annotationMode, onAnnotationModeEscape]);
57042
- if (!resumeMode) {
57043
- return null;
57044
57647
  }
57045
- const handleToggle = isPressed => {
57046
- onAnnotationModeClick({
57047
- mode: isPressed ? resumeMode : AnnotationMode.NONE
57048
- });
57049
- };
57050
- const toggleProps = {
57051
- ref,
57052
- 'aria-expanded': isActive,
57053
- 'aria-label': AnnotationsToggleV2_('annotation_tools'),
57054
- 'data-resin-target': 'annotations',
57055
- 'data-testid': 'bp-AnnotationsControls-toggleBtn',
57056
- icon: annotationModeIcons[isActive ? annotationMode : resumeMode]
57648
+ const handleSelect = event => {
57649
+ if (keepOpen) {
57650
+ event.preventDefault();
57651
+ }
57652
+ onSelect(triggerRef.current);
57057
57653
  };
57058
- const renderToggle = toggle => /*#__PURE__*/external_react_["default"].createElement(ToggleTooltipV2, {
57059
- content: AnnotationsToggleV2_('annotation_tools')
57060
- }, toggle);
57061
- if (props.buttonType === 'icon') {
57062
- const {
57063
- size,
57064
- variant
57065
- } = props;
57066
- return renderToggle(/*#__PURE__*/external_react_["default"].createElement(blueprint_web_.IconToggleButton, AnnotationsToggleV2_extends({}, toggleProps, {
57067
- onPressedChange: handleToggle,
57068
- pressed: isActive,
57069
- size: size,
57070
- variant: variant
57071
- })));
57072
- }
57073
- return /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Toolbar.ToggleGroup, {
57074
- onValueChange: value => handleToggle(value.includes(TOGGLE_VALUE)),
57075
- type: "multiple",
57076
- value: isActive ? [TOGGLE_VALUE] : []
57077
- }, renderToggle(/*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Toolbar.ToggleItem, AnnotationsToggleV2_extends({}, toggleProps, {
57078
- value: TOGGLE_VALUE
57079
- }))));
57654
+ return /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Item, ControlsMenuItemV2_extends({
57655
+ "aria-keyshortcuts": shortcut?.keys,
57656
+ onSelect: handleSelect
57657
+ }, rest, {
57658
+ className: "bp-ControlsMenuItemV2"
57659
+ }), /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Item.StartElement, {
57660
+ icon: icon
57661
+ }), /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Item.MainContent, {
57662
+ label: label
57663
+ }), shortcut && /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Item.EndElement, {
57664
+ "aria-hidden": true
57665
+ }, shortcut.label));
57080
57666
  }
57081
- /* harmony default export */ const annotations_AnnotationsToggleV2 = (/*#__PURE__*/external_react_["default"].forwardRef(AnnotationsToggleV2));
57082
- ;// ./src/lib/viewers/controls/color-picker/ColorPickerControlV2.scss
57667
+ ;// ./src/lib/viewers/controls/controls-bar/ResponsiveControlsBarV2.scss
57083
57668
  // extracted by mini-css-extract-plugin
57084
57669
 
57085
- ;// ./src/lib/viewers/controls/color-picker/ColorPickerControlV2.tsx
57086
- /* provided dependency */ var ColorPickerControlV2_ = __webpack_require__(441)["Tl"];
57670
+ ;// ./src/lib/viewers/controls/controls-bar/ResponsiveControlsBarV2.tsx
57087
57671
 
57088
57672
 
57089
57673
 
57090
57674
 
57091
57675
 
57092
- const getColorLabels = () => ({
57093
- [AnnotationColor.BOX_BLUE]: ColorPickerControlV2_('drawing_color_blue'),
57094
- [AnnotationColor.GREEN_LIGHT]: ColorPickerControlV2_('drawing_color_green'),
57095
- [AnnotationColor.WATERMELON_RED]: ColorPickerControlV2_('drawing_color_red'),
57096
- [AnnotationColor.YELLORANGE]: ColorPickerControlV2_('drawing_color_orange'),
57097
- [AnnotationColor.YELLOW]: ColorPickerControlV2_('drawing_color_yellow'),
57098
- [AnnotationColor.GRIMACE]: ColorPickerControlV2_('drawing_color_purple')
57099
- });
57100
- function ColorPickerControlV2({
57101
- activeColor = __WEBPACK_EXTERNAL_MODULE_box_ui_elements_es_styles_variables_c815ce80_bdlBoxBlue__,
57102
- colors,
57103
- onColorSelect
57676
+ // Moves controls into an overflow menu as the viewer narrows. Bars that always show everything, like the
57677
+ // annotations palette, use ControlsBarV2 directly.
57678
+ function ResponsiveControlsBarV2({
57679
+ items
57104
57680
  }) {
57105
- const colorLabels = getColorLabels();
57106
- return /*#__PURE__*/external_react_["default"].createElement("div", {
57107
- className: "bp-ColorPickerControlV2",
57108
- "data-testid": "bp-color-picker-control"
57109
- }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.SelectMenu.Grid, {
57110
- "aria-label": ColorPickerControlV2_('drawing_color'),
57111
- columns: colors.length
57112
- }, colors.map(color => /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.SelectMenu.Option.ColorCircle, {
57113
- key: color,
57114
- active: color === activeColor,
57115
- "aria-label": colorLabels[color] || color,
57116
- className: "bp-ColorPickerControlV2-swatch",
57117
- color: color,
57118
- "data-resin-target": "colorSelect",
57119
- onClick: () => onColorSelect(color)
57120
- }))));
57681
+ const {
57682
+ barRef,
57683
+ overflowItems,
57684
+ visibleItems
57685
+ } = useControlsOverflow(items);
57686
+ if (!items.length) {
57687
+ return null;
57688
+ }
57689
+ return /*#__PURE__*/external_react_["default"].createElement(controls_bar_ControlsBarV2, {
57690
+ ref: barRef
57691
+ }, visibleItems.map(({
57692
+ control,
57693
+ id
57694
+ }) => /*#__PURE__*/external_react_["default"].createElement("div", {
57695
+ key: id,
57696
+ className: "bp-ResponsiveControlsBarV2-item",
57697
+ "data-overflow-id": id
57698
+ }, control)), overflowItems.length > 0 && /*#__PURE__*/external_react_["default"].createElement(ControlsOverflowMenuV2, {
57699
+ items: overflowItems
57700
+ }));
57121
57701
  }
57122
- ;// external "@box/blueprint-web-assets/icons/Medium/Search"
57123
-
57124
57702
  ;// ./src/lib/viewers/controls/findbar/FindBarToggleV2.tsx
57125
57703
  /* provided dependency */ var FindBarToggleV2_ = __webpack_require__(441)["Tl"];
57126
57704
 
@@ -57144,8 +57722,6 @@ function FindBarToggleV2({
57144
57722
  icon: __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_Search_ef3e4aba_default__
57145
57723
  })));
57146
57724
  }
57147
- ;// external "@box/blueprint-web-assets/icons/Medium/GridView"
57148
-
57149
57725
  ;// ./src/lib/viewers/controls/gallery/GalleryToggleV2.tsx
57150
57726
  /* provided dependency */ var GalleryToggleV2_ = __webpack_require__(441)["Tl"];
57151
57727
 
@@ -57325,8 +57901,6 @@ function PageControlsV2({
57325
57901
  icon: __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_ChevronDown_a545a634_default__
57326
57902
  }))));
57327
57903
  }
57328
- ;// external "@box/blueprint-web-assets/icons/Medium/RotateLeft"
57329
-
57330
57904
  ;// ./src/lib/viewers/controls/rotate/RotateControlV2.tsx
57331
57905
  /* provided dependency */ var RotateControlV2_ = __webpack_require__(441)["Tl"];
57332
57906
 
@@ -57345,8 +57919,6 @@ function RotateControlV2({
57345
57919
  icon: __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_RotateLeft_c726d679_default__
57346
57920
  })));
57347
57921
  }
57348
- ;// external "@box/blueprint-web-assets/icons/Medium/Nav"
57349
-
57350
57922
  ;// external "@box/blueprint-web-assets/icons/MediumFilled/Nav"
57351
57923
 
57352
57924
  ;// ./src/lib/viewers/controls/sidebar/ThumbnailsToggleV2.scss
@@ -57383,7 +57955,85 @@ function ThumbnailsToggleV2({
57383
57955
  value: "thumbnails"
57384
57956
  }))));
57385
57957
  }
57958
+ ;// ./src/lib/viewers/controls/hooks/useMediaQuery.ts
57959
+
57960
+ const getMatches = query => typeof window.matchMedia === 'function' && window.matchMedia(query).matches;
57961
+ function useMediaQuery(query) {
57962
+ const [matches, setMatches] = external_react_["default"].useState(() => getMatches(query));
57963
+ external_react_["default"].useEffect(() => {
57964
+ if (typeof window.matchMedia !== 'function') {
57965
+ return undefined;
57966
+ }
57967
+ const mediaQueryList = window.matchMedia(query);
57968
+ const handleChange = () => setMatches(mediaQueryList.matches);
57969
+ handleChange();
57970
+ mediaQueryList.addEventListener('change', handleChange);
57971
+ return () => mediaQueryList.removeEventListener('change', handleChange);
57972
+ }, [query]);
57973
+ return matches;
57974
+ }
57975
+ ;// ./src/lib/viewers/controls/zoom/ZoomMenuItemsV2.scss
57976
+ // extracted by mini-css-extract-plugin
57977
+
57978
+ ;// ./src/lib/viewers/controls/zoom/ZoomMenuItemsV2.tsx
57979
+ /* provided dependency */ var ZoomMenuItemsV2_ = __webpack_require__(441)["Tl"];
57980
+
57981
+
57982
+
57983
+
57984
+
57985
+
57986
+
57987
+
57988
+
57989
+ // The overflow menu form of the zoom controls: the current scale, then zoom in and zoom out
57990
+ function ZoomMenuItemsV2({
57991
+ maxScale,
57992
+ minScale,
57993
+ onZoomIn,
57994
+ onZoomOut,
57995
+ resinTargetZoomIn = 'zoomIn',
57996
+ resinTargetZoomOut = 'zoomOut',
57997
+ scale
57998
+ }) {
57999
+ const {
58000
+ canZoomIn,
58001
+ canZoomOut,
58002
+ currentScale
58003
+ } = getZoomState({
58004
+ maxScale,
58005
+ minScale,
58006
+ scale
58007
+ });
58008
+ const scaleLabel = (0,util/* replacePlaceholders */.Lb)(ZoomMenuItemsV2_('controls_zoom_scale'), [`${Math.round(currentScale * 100)}%`]);
58009
+ return /*#__PURE__*/external_react_["default"].createElement(external_react_["default"].Fragment, null, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Text, {
58010
+ as: "div",
58011
+ className: "bp-ZoomMenuItemsV2-scale",
58012
+ color: "textOnLightSecondary",
58013
+ "data-testid": "bp-ZoomMenuItems-scale",
58014
+ variant: "caption"
58015
+ }, scaleLabel), /*#__PURE__*/external_react_["default"].createElement(ControlsMenuItemV2, {
58016
+ "data-resin-target": resinTargetZoomIn,
58017
+ "data-testid": "bp-ZoomControls-in-menuItem",
58018
+ disabled: !canZoomIn,
58019
+ icon: __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_Plus_aaa7b14f_default__,
58020
+ keepOpen: true,
58021
+ label: ZoomMenuItemsV2_('zoom_in'),
58022
+ onSelect: () => onZoomIn()
58023
+ }), /*#__PURE__*/external_react_["default"].createElement(ControlsMenuItemV2, {
58024
+ "data-resin-target": resinTargetZoomOut,
58025
+ "data-testid": "bp-ZoomControls-out-menuItem",
58026
+ disabled: !canZoomOut,
58027
+ icon: __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_Minus_cc9df143_default__,
58028
+ keepOpen: true,
58029
+ label: ZoomMenuItemsV2_('zoom_out'),
58030
+ onSelect: () => onZoomOut()
58031
+ }), /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Separator, null));
58032
+ }
57386
58033
  ;// ./src/lib/viewers/doc/DocControlsV2.tsx
58034
+ /* provided dependency */ var DocControlsV2_ = __webpack_require__(441)["Tl"];
58035
+
58036
+
57387
58037
 
57388
58038
 
57389
58039
 
@@ -57403,6 +58053,25 @@ function ThumbnailsToggleV2({
57403
58053
 
57404
58054
 
57405
58055
 
58056
+
58057
+
58058
+
58059
+
58060
+ // The thumbnails sidebar only opens at this width (box-ui-elements $size-large-min)
58061
+ const THUMBNAILS_MEDIA_QUERY = '(min-width: 768px)';
58062
+
58063
+ // From the responsive mocks: find stays in the menu at every width, and gallery does too until the grid is
58064
+ // open. Then the grid toggle is the button itself, and nothing else collapses into a more options menu.
58065
+ // Rotate collapses next, then thumbnails and fullscreen together, then zoom. Page and the markup trigger
58066
+ // have no menu form and never collapse.
58067
+ const PRIORITY = {
58068
+ find: ALWAYS_OVERFLOW,
58069
+ fullscreen: 2,
58070
+ gallery: ALWAYS_OVERFLOW,
58071
+ rotate: 1,
58072
+ thumbnails: 2,
58073
+ zoom: 3
58074
+ };
57406
58075
  function DocControlsV2({
57407
58076
  annotationColor,
57408
58077
  annotationMode = AnnotationMode.NONE,
@@ -57433,6 +58102,7 @@ function DocControlsV2({
57433
58102
  }) {
57434
58103
  const annotationsToggleRef = external_react_["default"].useRef(null);
57435
58104
  const isFullscreen = useFullscreen();
58105
+ const canShowThumbnails = useMediaQuery(THUMBNAILS_MEDIA_QUERY);
57436
58106
 
57437
58107
  // Listed in the palette's button order, which is also the order the toggle falls back to
57438
58108
  const annotationModes = [];
@@ -57454,42 +58124,113 @@ function DocControlsV2({
57454
58124
  mode: AnnotationMode.NONE
57455
58125
  });
57456
58126
  };
57457
- return /*#__PURE__*/external_react_["default"].createElement(ExperiencesProvider, {
57458
- experiences: experiences
57459
- }, /*#__PURE__*/external_react_["default"].createElement(controls_bar_ControlsBarV2, null, !isGalleryOpen && /*#__PURE__*/external_react_["default"].createElement(external_react_["default"].Fragment, null, /*#__PURE__*/external_react_["default"].createElement(ThumbnailsToggleV2, {
57460
- isThumbnailsOpen: isThumbnailsOpen,
57461
- onThumbnailsToggle: onThumbnailsToggle
57462
- }), /*#__PURE__*/external_react_["default"].createElement(FindBarToggleV2, {
57463
- onFindBarToggle: onFindBarToggle
57464
- }), /*#__PURE__*/external_react_["default"].createElement(PageControlsV2, {
57465
- onPageChange: onPageChange,
57466
- onPageSubmit: onPageSubmit,
57467
- pageCount: pageCount,
57468
- pageNumber: pageNumber
57469
- })), (!isGalleryOpen || hasGalleryZoom) && /*#__PURE__*/external_react_["default"].createElement(ZoomControlsV2, {
57470
- maxScale: maxScale,
57471
- minScale: minScale,
57472
- onZoomIn: onZoomIn,
57473
- onZoomOut: onZoomOut,
58127
+ const zoomProps = {
58128
+ maxScale,
58129
+ minScale,
58130
+ onZoomIn,
58131
+ onZoomOut,
57474
58132
  resinTargetZoomIn: isGalleryOpen ? 'galleryZoomIn' : undefined,
57475
58133
  resinTargetZoomOut: isGalleryOpen ? 'galleryZoomOut' : undefined,
57476
- scale: scale
57477
- }), !isGalleryOpen && onRotateLeft && /*#__PURE__*/external_react_["default"].createElement(RotateControlV2, {
57478
- onRotateLeft: onRotateLeft
57479
- }), /*#__PURE__*/external_react_["default"].createElement(GalleryToggleV2, {
57480
- isGalleryOpen: isGalleryOpen,
57481
- onGalleryToggle: onGalleryToggle
57482
- }), /*#__PURE__*/external_react_["default"].createElement(FullscreenToggleV2, {
57483
- onFullscreenToggle: onFullscreenToggle
57484
- }), hasAnnotations && /*#__PURE__*/external_react_["default"].createElement(external_react_["default"].Fragment, null, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Toolbar.Separator, null), /*#__PURE__*/external_react_["default"].createElement(AnnotationsExitButtonV2, {
57485
- onClick: handleAnnotationsExit
57486
- }), /*#__PURE__*/external_react_["default"].createElement(annotations_AnnotationsToggleV2, {
57487
- ref: annotationsToggleRef,
57488
- annotationMode: annotationMode,
57489
- modes: annotationModes,
57490
- onAnnotationModeClick: onAnnotationModeClick,
57491
- onAnnotationModeEscape: onAnnotationModeEscape
57492
- }))), hasAnnotations && annotationMode !== AnnotationMode.NONE && /*#__PURE__*/external_react_["default"].createElement(annotations_AnnotationsPaletteV2, null, /*#__PURE__*/external_react_["default"].createElement(annotations_AnnotationsPaletteV2.Modes, {
58134
+ scale
58135
+ };
58136
+
58137
+ // Each control is gated here rather than only inside it, so the bar never reserves width for a control
58138
+ // that would render nothing
58139
+ const items = [!isGalleryOpen && !isFullscreen && canShowThumbnails && onThumbnailsToggle && {
58140
+ control: /*#__PURE__*/external_react_["default"].createElement(ThumbnailsToggleV2, {
58141
+ isThumbnailsOpen: isThumbnailsOpen,
58142
+ onThumbnailsToggle: onThumbnailsToggle
58143
+ }),
58144
+ id: 'thumbnails',
58145
+ menu: /*#__PURE__*/external_react_["default"].createElement(external_react_["default"].Fragment, null, /*#__PURE__*/external_react_["default"].createElement(ControlsMenuItemV2, {
58146
+ "data-resin-target": "thumbnails",
58147
+ icon: __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_Nav_d41e959a_default__,
58148
+ label: isThumbnailsOpen ? DocControlsV2_('controls_hide_thumbnails') : DocControlsV2_('controls_show_thumbnails'),
58149
+ onSelect: () => onThumbnailsToggle()
58150
+ }), /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Separator, null)),
58151
+ priority: PRIORITY.thumbnails
58152
+ }, !isGalleryOpen && pageCount > 1 && {
58153
+ control: /*#__PURE__*/external_react_["default"].createElement(PageControlsV2, {
58154
+ onPageChange: onPageChange,
58155
+ onPageSubmit: onPageSubmit,
58156
+ pageCount: pageCount,
58157
+ pageNumber: pageNumber
58158
+ }),
58159
+ id: 'page'
58160
+ }, (!isGalleryOpen || hasGalleryZoom) && {
58161
+ control: /*#__PURE__*/external_react_["default"].createElement(ZoomControlsV2, zoomProps),
58162
+ id: 'zoom',
58163
+ menu: !isGalleryOpen && /*#__PURE__*/external_react_["default"].createElement(ZoomMenuItemsV2, zoomProps),
58164
+ priority: isGalleryOpen ? undefined : PRIORITY.zoom
58165
+ }, !isGalleryOpen && onFindBarToggle && {
58166
+ control: /*#__PURE__*/external_react_["default"].createElement(FindBarToggleV2, {
58167
+ onFindBarToggle: onFindBarToggle
58168
+ }),
58169
+ id: 'find',
58170
+ menu: /*#__PURE__*/external_react_["default"].createElement(ControlsMenuItemV2, {
58171
+ "data-resin-target": "findBar",
58172
+ icon: __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_Search_ef3e4aba_default__,
58173
+ label: DocControlsV2_('controls_find'),
58174
+ onSelect: onFindBarToggle,
58175
+ shortcutKey: "F"
58176
+ }),
58177
+ priority: PRIORITY.find
58178
+ }, !isGalleryOpen && onRotateLeft && {
58179
+ control: /*#__PURE__*/external_react_["default"].createElement(RotateControlV2, {
58180
+ onRotateLeft: onRotateLeft
58181
+ }),
58182
+ id: 'rotate',
58183
+ menu: /*#__PURE__*/external_react_["default"].createElement(ControlsMenuItemV2, {
58184
+ "data-resin-target": "rotate",
58185
+ icon: __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_RotateLeft_c726d679_default__,
58186
+ bareKey: "R",
58187
+ label: DocControlsV2_('controls_rotate_document'),
58188
+ onSelect: () => onRotateLeft()
58189
+ }),
58190
+ priority: PRIORITY.rotate
58191
+ }, onGalleryToggle && {
58192
+ control: /*#__PURE__*/external_react_["default"].createElement(GalleryToggleV2, {
58193
+ isGalleryOpen: isGalleryOpen,
58194
+ onGalleryToggle: onGalleryToggle
58195
+ }),
58196
+ id: 'gallery',
58197
+ menu: !isGalleryOpen && /*#__PURE__*/external_react_["default"].createElement(ControlsMenuItemV2, {
58198
+ "data-resin-target": "galleryView",
58199
+ icon: __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_GridView_ac92b674_default__,
58200
+ label: DocControlsV2_('controls_view_as_grid'),
58201
+ onSelect: () => onGalleryToggle()
58202
+ }),
58203
+ priority: isGalleryOpen ? undefined : PRIORITY.gallery
58204
+ }, {
58205
+ control: /*#__PURE__*/external_react_["default"].createElement(FullscreenToggleV2, {
58206
+ onFullscreenToggle: onFullscreenToggle
58207
+ }),
58208
+ id: 'fullscreen',
58209
+ menu: !isGalleryOpen && /*#__PURE__*/external_react_["default"].createElement(ControlsMenuItemV2, {
58210
+ "data-resin-target": "fullscreen",
58211
+ icon: isFullscreen ? __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_ArrowsMinimize_35faab95_default__ : __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_ArrowsMaximize_12b9ae40_default__,
58212
+ bareKey: "F",
58213
+ label: isFullscreen ? DocControlsV2_('exit_fullscreen') : DocControlsV2_('enter_fullscreen'),
58214
+ onSelect: trigger => onFullscreenToggle(!isFullscreen, trigger)
58215
+ }),
58216
+ priority: isGalleryOpen ? undefined : PRIORITY.fullscreen
58217
+ }, hasAnnotations && {
58218
+ control: /*#__PURE__*/external_react_["default"].createElement(external_react_["default"].Fragment, null, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Toolbar.Separator, null), /*#__PURE__*/external_react_["default"].createElement(AnnotationsExitButtonV2, {
58219
+ onClick: handleAnnotationsExit
58220
+ }), /*#__PURE__*/external_react_["default"].createElement(annotations_AnnotationsToggleV2, {
58221
+ ref: annotationsToggleRef,
58222
+ annotationMode: annotationMode,
58223
+ modes: annotationModes,
58224
+ onAnnotationModeClick: onAnnotationModeClick,
58225
+ onAnnotationModeEscape: onAnnotationModeEscape
58226
+ })),
58227
+ id: 'annotations'
58228
+ }];
58229
+ return /*#__PURE__*/external_react_["default"].createElement(ExperiencesProvider, {
58230
+ experiences: experiences
58231
+ }, /*#__PURE__*/external_react_["default"].createElement(ResponsiveControlsBarV2, {
58232
+ items: items.filter(item => !!item)
58233
+ }), hasAnnotations && annotationMode !== AnnotationMode.NONE && /*#__PURE__*/external_react_["default"].createElement(annotations_AnnotationsPaletteV2, null, /*#__PURE__*/external_react_["default"].createElement(annotations_AnnotationsPaletteV2.Modes, {
57493
58234
  annotationMode: annotationMode,
57494
58235
  onAnnotationModeClick: onAnnotationModeClick
57495
58236
  }, annotationModes.map(mode => /*#__PURE__*/external_react_["default"].createElement(annotations_AnnotationsPaletteV2.Mode, {
@@ -61057,8 +61798,6 @@ class ThumbnailsSidebar {
61057
61798
  }
61058
61799
  }
61059
61800
  /* harmony default export */ const lib_ThumbnailsSidebar = (ThumbnailsSidebar);
61060
- // EXTERNAL MODULE: external "react-dom"
61061
- var external_react_dom_ = __webpack_require__(7516);
61062
61801
  ;// ./src/lib/ThumbnailsSidebarV2.scss
61063
61802
  // extracted by mini-css-extract-plugin
61064
61803
 
@@ -61251,6 +61990,7 @@ function DocBaseViewer_toPrimitive(t, r) { if ("object" != typeof t || !t) retur
61251
61990
 
61252
61991
 
61253
61992
 
61993
+
61254
61994
 
61255
61995
 
61256
61996
  const DOC_FIRST_PAGES_ENABLED = 'docFirstPages.enabled';
@@ -61267,6 +62007,9 @@ const DocBaseViewer_MIN_PINCH_SCALE_DELTA = 0.01;
61267
62007
  const MIN_PINCH_SCALE_VALUE = 0.25;
61268
62008
  const DocBaseViewer_MIN_SCALE = 0.1;
61269
62009
  const METRICS_WHITELIST = [lib_events/* USER_DOCUMENT_THUMBNAIL_EVENTS */.Xe.CLOSE, lib_events/* USER_DOCUMENT_THUMBNAIL_EVENTS */.Xe.NAVIGATE, lib_events/* USER_DOCUMENT_THUMBNAIL_EVENTS */.Xe.OPEN];
62010
+ // npm pdf.js draws its sharp detail canvas over zoomed pages only when maxCanvasPixels is positive
62011
+ const NPM_PDFJS_MAX_CANVAS_SIZE = 2 ** 25; // pdf.js desktop default
62012
+ const LEGACY_PDFJS_MAX_CANVAS_SIZE = -1; // Unlimited
61270
62013
  const MOBILE_MAX_CANVAS_SIZE = 2949120; // ~3MP 1920x1536
61271
62014
  const PAGES_UNIT_NAME = 'pages';
61272
62015
  const PDFJS_TEXT_LAYER_MODE = {
@@ -61413,9 +62156,17 @@ class DocBaseViewer extends viewers_BaseViewer {
61413
62156
  getThumbnailsSidebar: () => this.thumbnailsSidebar,
61414
62157
  setPage: n => this.setPage(n),
61415
62158
  toggleThumbnails: () => this.toggleThumbnails(),
61416
- requestUiUpdate: () => this.renderUI(),
62159
+ requestUiUpdate: () => {
62160
+ // The v2 bar moves the gallery toggle between the bar and its overflow menu, so the bar must be
62161
+ // committed before focusToggle looks the toggle up
62162
+ if (this.featureEnabled(constants/* BLUEPRINT_MIGRATION_CONTROLS_BAR */.OQ)) {
62163
+ (0,external_react_dom_.flushSync)(() => this.renderUI());
62164
+ } else {
62165
+ this.renderUI();
62166
+ }
62167
+ },
61417
62168
  focusToggle: () => {
61418
- const toggle = this.containerEl.querySelector('.bp-GalleryToggle, [data-bp-gallery-toggle]');
62169
+ const toggle = this.containerEl.querySelector('.bp-GalleryToggle, [data-bp-gallery-toggle], [data-overflow-ids~="gallery"]');
61419
62170
  if (toggle && toggle.focus) {
61420
62171
  toggle.focus();
61421
62172
  }
@@ -61649,7 +62400,7 @@ class DocBaseViewer extends viewers_BaseViewer {
61649
62400
  const isWatermarked = file && file.watermark_info && file.watermark_info.is_watermarked;
61650
62401
  if (assets) {
61651
62402
  if (this.featureEnabled('useNpmPdfjs') || (0,isNpmBuild/* isNpmBuild */.w)()) {
61652
- this.prefetchAssets(EXIF_READER, docAssets_CSS);
62403
+ this.prefetchAssets(EXIF_READER, []);
61653
62404
  } else {
61654
62405
  const ASSETS = this.featureEnabled(DOC_FIRST_PAGES_ENABLED) ? [...JS_NO_EXIF, ...EXIF_READER] : docAssets_JS;
61655
62406
  this.prefetchAssets(ASSETS, docAssets_CSS);
@@ -62104,6 +62855,22 @@ class DocBaseViewer extends viewers_BaseViewer {
62104
62855
  case ']':
62105
62856
  this.nextPage();
62106
62857
  break;
62858
+ case 'r':
62859
+ case 'R':
62860
+ // The rotate control is hidden while the gallery is open, so the key follows it.
62861
+ // These bare keys belong to the v2 controls bar; the older bar has no such shortcuts.
62862
+ if (this.featureEnabled(constants/* BLUEPRINT_MIGRATION_CONTROLS_BAR */.OQ) && !this.galleryController?.isOpen && this.featureEnabled('rotate.enabled')) {
62863
+ this.rotateLeft();
62864
+ break;
62865
+ }
62866
+ return this.findBar ? this.findBar.onKeydown(event) : false;
62867
+ case 'f':
62868
+ case 'F':
62869
+ if (this.featureEnabled(constants/* BLUEPRINT_MIGRATION_CONTROLS_BAR */.OQ)) {
62870
+ this.toggleFullscreen();
62871
+ break;
62872
+ }
62873
+ return this.findBar ? this.findBar.onKeydown(event) : false;
62107
62874
  default:
62108
62875
  if (this.findBar) {
62109
62876
  return this.findBar.onKeydown(event);
@@ -62313,14 +63080,20 @@ class DocBaseViewer extends viewers_BaseViewer {
62313
63080
  container: this.docEl,
62314
63081
  eventBus: this.pdfEventBus,
62315
63082
  findController: this.pdfFindController,
62316
- imageResourcesPath: assetUrlCreator(IMAGES),
63083
+ imageResourcesPath: this.featureEnabled('useNpmPdfjs') ? assetUrlCreator('pdfjs-images/') : assetUrlCreator(IMAGES),
62317
63084
  linkService: this.pdfLinkService,
62318
- maxCanvasPixels: this.isMobile ? MOBILE_MAX_CANVAS_SIZE : -1,
63085
+ maxCanvasPixels: this.getMaxCanvasPixels(),
62319
63086
  renderInteractiveForms: false,
62320
63087
  // Enabling prevents unverified signatures from being displayed
62321
63088
  textLayerMode: hasTextLayer ? enabledTextLayerMode : PDFJS_TEXT_LAYER_MODE.DISABLE
62322
63089
  });
62323
63090
  }
63091
+ getMaxCanvasPixels() {
63092
+ if (this.isMobile) {
63093
+ return MOBILE_MAX_CANVAS_SIZE;
63094
+ }
63095
+ return this.featureEnabled('useNpmPdfjs') ? NPM_PDFJS_MAX_CANVAS_SIZE : LEGACY_PDFJS_MAX_CANVAS_SIZE;
63096
+ }
62324
63097
 
62325
63098
  /**
62326
63099
  * Initializes the Find Bar
@@ -66595,6 +67368,389 @@ function Model3DControlsNew_Model3DControls({
66595
67368
  onFullscreenToggle: onFullscreenToggle
66596
67369
  }));
66597
67370
  }
67371
+ ;// external "@box/blueprint-web-assets/icons/MediumFilled/Pause"
67372
+
67373
+ ;// external "@box/blueprint-web-assets/icons/MediumFilled/Play"
67374
+
67375
+ // EXTERNAL MODULE: ./src/lib/viewers/controls/settings/SettingsRadioItem.tsx + 1 modules
67376
+ var SettingsRadioItem = __webpack_require__(8394);
67377
+ ;// ./src/lib/viewers/controls/box3d/AnimationClipsControlV2.tsx
67378
+ /* provided dependency */ var AnimationClipsControlV2_ = __webpack_require__(441)["Tl"];
67379
+ function AnimationClipsControlV2_extends() { return AnimationClipsControlV2_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, AnimationClipsControlV2_extends.apply(null, arguments); }
67380
+
67381
+
67382
+
67383
+
67384
+
67385
+
67386
+
67387
+
67388
+
67389
+ // The Tooltip sits inside the DropdownMenu trigger so the trigger keeps the menu's data-state.
67390
+ function AnimationClipsControlV2_AnimationClipsToggle(props, ref) {
67391
+ const isMenuOpen = props['aria-expanded'] === true || props['aria-expanded'] === 'true';
67392
+ return /*#__PURE__*/external_react_["default"].createElement(MenuTriggerTooltipV2/* default */.A, {
67393
+ content: AnimationClipsControlV2_('box3d_animation_clips'),
67394
+ isMenuOpen: isMenuOpen
67395
+ }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Toolbar.Button, AnimationClipsControlV2_extends({
67396
+ ref: ref,
67397
+ "aria-label": AnimationClipsControlV2_('box3d_animation_clips'),
67398
+ "data-resin-target": "animationClips"
67399
+ }, props), /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Toolbar.Icon, {
67400
+ icon: Medium_.GaugeNeedle
67401
+ })));
67402
+ }
67403
+ const AnimationClipsToggleV2 = /*#__PURE__*/external_react_["default"].forwardRef(AnimationClipsControlV2_AnimationClipsToggle);
67404
+ function AnimationClipsControlV2({
67405
+ animationClips,
67406
+ currentAnimationClipId,
67407
+ onAnimationClipSelect
67408
+ }) {
67409
+ const container = external_react_["default"].useContext(BlueprintProviders/* PortalContainerContext */.n);
67410
+ // Props types this as () => void, but the viewer's handler reads the selected clip id.
67411
+ const onSelect = onAnimationClipSelect;
67412
+ const handleValueChange = id => {
67413
+ window.Box?.Preview?.resin?.recordAction?.(SettingsRadioItem/* settingsRadioItemAction */.w);
67414
+ onSelect(id);
67415
+ };
67416
+ return /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Root, {
67417
+ modal: false
67418
+ }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Trigger, {
67419
+ asChild: true
67420
+ }, /*#__PURE__*/external_react_["default"].createElement(AnimationClipsToggleV2, null)), /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Content, {
67421
+ align: "start",
67422
+ container: container,
67423
+ onEscapeKeyDown: stopMenuKeyPropagation/* stopEscapePropagation */.s,
67424
+ onKeyDown: stopMenuKeyPropagation/* stopKeyPropagation */.a,
67425
+ side: "top"
67426
+ }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.RadioGroup, {
67427
+ onValueChange: handleValueChange,
67428
+ value: currentAnimationClipId
67429
+ }, animationClips.map(({
67430
+ duration,
67431
+ id,
67432
+ name
67433
+ }) => /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.RadioSelectItem, {
67434
+ key: id,
67435
+ "data-resin-target": "settingsRadioItem",
67436
+ value: id
67437
+ }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Text, {
67438
+ as: "span"
67439
+ }, `${formatDuration(duration)} ${name}`))))));
67440
+ }
67441
+ ;// ./src/lib/viewers/controls/box3d/AnimationControlsV2.tsx
67442
+ /* provided dependency */ var AnimationControlsV2_ = __webpack_require__(441)["Tl"];
67443
+
67444
+
67445
+
67446
+
67447
+
67448
+ function AnimationControlsV2({
67449
+ animationClips,
67450
+ currentAnimationClipId,
67451
+ isPlaying,
67452
+ onAnimationClipSelect,
67453
+ onPlayPause
67454
+ }) {
67455
+ if (!animationClips.length) {
67456
+ return null;
67457
+ }
67458
+ const label = isPlaying ? AnimationControlsV2_('media_pause') : AnimationControlsV2_('media_play');
67459
+ return /*#__PURE__*/external_react_["default"].createElement(external_react_["default"].Fragment, null, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Tooltip, {
67460
+ content: label
67461
+ }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Toolbar.Button, {
67462
+ "aria-label": label,
67463
+ "data-resin-target": "playPause",
67464
+ onClick: () => onPlayPause(!isPlaying)
67465
+ }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Toolbar.Icon, {
67466
+ icon: isPlaying ? __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_MediumFilled_Pause_0cc1f701_default__ : __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_MediumFilled_Play_ee47c078_default__
67467
+ }))), /*#__PURE__*/external_react_["default"].createElement(AnimationClipsControlV2, {
67468
+ animationClips: animationClips,
67469
+ currentAnimationClipId: currentAnimationClipId,
67470
+ onAnimationClipSelect: onAnimationClipSelect
67471
+ }));
67472
+ }
67473
+ ;// ./src/lib/viewers/controls/box3d/RotateRight.scss
67474
+ // extracted by mini-css-extract-plugin
67475
+
67476
+ ;// ./src/lib/viewers/controls/box3d/RotateRight.tsx
67477
+ function RotateRight_extends() { return RotateRight_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, RotateRight_extends.apply(null, arguments); }
67478
+
67479
+
67480
+
67481
+
67482
+ // Blueprint has RotateLeft and no RotateRight. Mirror the left glyph for the clockwise control.
67483
+ function RotateRight(props) {
67484
+ return /*#__PURE__*/external_react_["default"].createElement(Medium_.RotateLeft, RotateRight_extends({}, props, {
67485
+ className: ['bp-RotateRight', props.className].filter(Boolean).join(' ')
67486
+ }));
67487
+ }
67488
+ ;// ./src/lib/viewers/controls/box3d/RotateAxisControlV2.scss
67489
+ // extracted by mini-css-extract-plugin
67490
+
67491
+ ;// ./src/lib/viewers/controls/box3d/RotateAxisControlV2.tsx
67492
+ /* provided dependency */ var RotateAxisControlV2_ = __webpack_require__(441)["Tl"];
67493
+
67494
+
67495
+
67496
+
67497
+
67498
+
67499
+ const RotateAxisControlV2_ROTATION_STEP = 90;
67500
+ function RotateAxisControlV2({
67501
+ axis,
67502
+ onRotateOnAxisChange
67503
+ }) {
67504
+ const axisName = axis.toUpperCase();
67505
+ const handleClickLeft = () => onRotateOnAxisChange({
67506
+ [axis]: -RotateAxisControlV2_ROTATION_STEP
67507
+ });
67508
+ const handleClickRight = () => onRotateOnAxisChange({
67509
+ [axis]: RotateAxisControlV2_ROTATION_STEP
67510
+ });
67511
+ return /*#__PURE__*/external_react_["default"].createElement("div", {
67512
+ className: "bp-RotateAxisControlV2",
67513
+ "data-testid": `bp-rotate-axis-control-${axis}`
67514
+ }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.IconButton, {
67515
+ "aria-label": (0,util/* replacePlaceholders */.Lb)(RotateAxisControlV2_('box3d_settings_rotate_left'), [axisName]),
67516
+ "data-resin-target": "rotateAxisLeft",
67517
+ "data-testid": "bp-rotate-axis-control-left",
67518
+ icon: Medium_.RotateLeft,
67519
+ onClick: handleClickLeft
67520
+ }), /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Text, {
67521
+ as: "span",
67522
+ "data-testid": "bp-rotate-axis-control-label",
67523
+ variant: "bodyDefaultBold"
67524
+ }, axisName), /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.IconButton, {
67525
+ "aria-label": (0,util/* replacePlaceholders */.Lb)(RotateAxisControlV2_('box3d_settings_rotate_right'), [axisName]),
67526
+ "data-resin-target": "rotateAxisRight",
67527
+ "data-testid": "bp-rotate-axis-control-right",
67528
+ icon: RotateRight,
67529
+ onClick: handleClickRight
67530
+ }));
67531
+ }
67532
+ ;// ./src/lib/viewers/controls/box3d/RotateAxisControlsV2.scss
67533
+ // extracted by mini-css-extract-plugin
67534
+
67535
+ ;// ./src/lib/viewers/controls/box3d/RotateAxisControlsV2.tsx
67536
+ /* provided dependency */ var RotateAxisControlsV2_ = __webpack_require__(441)["Tl"];
67537
+
67538
+
67539
+
67540
+
67541
+ function RotateAxisControlsV2({
67542
+ onRotateOnAxisChange
67543
+ }) {
67544
+ const labelId = external_react_["default"].useId();
67545
+ return /*#__PURE__*/external_react_["default"].createElement("div", {
67546
+ "aria-labelledby": labelId,
67547
+ className: "bp-RotateAxisControlsV2",
67548
+ role: "group"
67549
+ }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Text, {
67550
+ as: "span",
67551
+ "data-testid": "bp-rotate-axis-controls-label",
67552
+ id: labelId,
67553
+ variant: "bodyDefaultBold"
67554
+ }, RotateAxisControlsV2_('box3d_settings_rotate_label')), /*#__PURE__*/external_react_["default"].createElement(RotateAxisControlV2, {
67555
+ axis: "x",
67556
+ onRotateOnAxisChange: onRotateOnAxisChange
67557
+ }), /*#__PURE__*/external_react_["default"].createElement(RotateAxisControlV2, {
67558
+ axis: "y",
67559
+ onRotateOnAxisChange: onRotateOnAxisChange
67560
+ }), /*#__PURE__*/external_react_["default"].createElement(RotateAxisControlV2, {
67561
+ axis: "z",
67562
+ onRotateOnAxisChange: onRotateOnAxisChange
67563
+ }));
67564
+ }
67565
+ // EXTERNAL MODULE: ./src/lib/viewers/controls/settings/SettingsToggleV2.tsx + 1 modules
67566
+ var SettingsToggleV2 = __webpack_require__(4574);
67567
+ ;// ./src/lib/viewers/controls/box3d/Model3DSettingsV2.scss
67568
+ // extracted by mini-css-extract-plugin
67569
+
67570
+ ;// ./src/lib/viewers/controls/box3d/Model3DSettingsV2.tsx
67571
+ /* provided dependency */ var Model3DSettingsV2_ = __webpack_require__(441)["Tl"];
67572
+
67573
+
67574
+
67575
+
67576
+
67577
+
67578
+
67579
+
67580
+
67581
+ function Model3DSettingsV2({
67582
+ cameraProjection,
67583
+ onCameraProjectionChange,
67584
+ onClose = (noop_default()),
67585
+ onOpen = (noop_default()),
67586
+ onRenderModeChange,
67587
+ onRotateOnAxisChange,
67588
+ onShowGridToggle,
67589
+ onShowSkeletonsToggle,
67590
+ onShowWireframesToggle,
67591
+ renderMode,
67592
+ showGrid,
67593
+ showSkeletons,
67594
+ showWireframes
67595
+ }) {
67596
+ const container = external_react_["default"].useContext(BlueprintProviders/* PortalContainerContext */.n) ?? undefined;
67597
+ const handleOpenChange = isOpen => {
67598
+ if (isOpen) {
67599
+ onOpen();
67600
+ } else {
67601
+ onClose();
67602
+ }
67603
+ };
67604
+ return /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Popover.Root, {
67605
+ modal: false,
67606
+ onOpenChange: handleOpenChange
67607
+ }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Popover.Trigger, {
67608
+ asChild: true
67609
+ }, /*#__PURE__*/external_react_["default"].createElement(SettingsToggleV2/* default */.A, {
67610
+ label: Model3DSettingsV2_('box3d_settings')
67611
+ })), /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Popover.ContentContainer, {
67612
+ align: "start",
67613
+ "aria-label": Model3DSettingsV2_('box3d_settings'),
67614
+ container: container,
67615
+ "data-testid": "bp-model3d-settings",
67616
+ onEscapeKeyDown: stopMenuKeyPropagation/* stopEscapePropagation */.s,
67617
+ onKeyDown: stopMenuKeyPropagation/* stopKeyPropagation */.a,
67618
+ side: "top"
67619
+ }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Popover.MainContent, null, /*#__PURE__*/external_react_["default"].createElement("div", {
67620
+ className: "bp-Model3DSettingsV2"
67621
+ }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Select, {
67622
+ "data-resin-target": "settingsDropdown",
67623
+ label: Model3DSettingsV2_('box3d_settings_render_label'),
67624
+ onValueChange: value => onRenderModeChange(value),
67625
+ placeholder: Model3DSettingsV2_('box3d_settings_render_label'),
67626
+ value: renderMode
67627
+ }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Select.Content, {
67628
+ container: container,
67629
+ onEscapeKeyDown: stopMenuKeyPropagation/* stopEscapePropagation */.s
67630
+ }, getRenderModeOptions().map(({
67631
+ label,
67632
+ value
67633
+ }) => /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Select.Option, {
67634
+ key: value,
67635
+ text: label,
67636
+ value: value
67637
+ })))), /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Switch.Item, {
67638
+ checked: showGrid,
67639
+ "data-resin-target": "settingsCheckbox",
67640
+ label: Model3DSettingsV2_('box3d_settings_grid_label'),
67641
+ onCheckedChange: onShowGridToggle,
67642
+ value: "grid"
67643
+ }), /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Switch.Item, {
67644
+ checked: showWireframes,
67645
+ "data-resin-target": "settingsCheckbox",
67646
+ label: Model3DSettingsV2_('box3d_settings_wireframes_label'),
67647
+ onCheckedChange: onShowWireframesToggle,
67648
+ value: "wireframes"
67649
+ }), /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Switch.Item, {
67650
+ checked: showSkeletons,
67651
+ "data-resin-target": "settingsCheckbox",
67652
+ label: Model3DSettingsV2_('box3d_settings_skeletons_label'),
67653
+ onCheckedChange: onShowSkeletonsToggle,
67654
+ value: "skeletons"
67655
+ }), /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Select, {
67656
+ "data-resin-target": "settingsDropdown",
67657
+ label: Model3DSettingsV2_('box3d_settings_projection_label'),
67658
+ onValueChange: value => onCameraProjectionChange(value),
67659
+ placeholder: Model3DSettingsV2_('box3d_settings_projection_label'),
67660
+ value: cameraProjection
67661
+ }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Select.Content, {
67662
+ container: container,
67663
+ onEscapeKeyDown: stopMenuKeyPropagation/* stopEscapePropagation */.s
67664
+ }, getCameraProjectionOptions().map(({
67665
+ label,
67666
+ value
67667
+ }) => /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Select.Option, {
67668
+ key: value,
67669
+ text: label,
67670
+ value: value
67671
+ })))), /*#__PURE__*/external_react_["default"].createElement(RotateAxisControlsV2, {
67672
+ onRotateOnAxisChange: onRotateOnAxisChange
67673
+ })))));
67674
+ }
67675
+ ;// ./src/lib/viewers/controls/box3d/ResetControlV2.tsx
67676
+ /* provided dependency */ var ResetControlV2_ = __webpack_require__(441)["Tl"];
67677
+
67678
+
67679
+
67680
+ function ResetControlV2({
67681
+ onReset
67682
+ }) {
67683
+ return /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Tooltip, {
67684
+ content: ResetControlV2_('box3d_reset')
67685
+ }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Toolbar.Button, {
67686
+ "aria-label": ResetControlV2_('box3d_reset'),
67687
+ "data-resin-target": "resetView",
67688
+ onClick: () => onReset()
67689
+ }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Toolbar.Icon, {
67690
+ icon: Medium_.ArrowCurveForward
67691
+ })));
67692
+ }
67693
+ ;// ./src/lib/viewers/box3d/model3d/Model3DControlsV2.tsx
67694
+
67695
+
67696
+
67697
+
67698
+
67699
+
67700
+
67701
+ function Model3DControlsV2({
67702
+ animationClips,
67703
+ cameraProjection,
67704
+ currentAnimationClipId,
67705
+ isPlaying,
67706
+ isVrShown,
67707
+ onAnimationClipSelect,
67708
+ onCameraProjectionChange,
67709
+ onFullscreenToggle,
67710
+ onPlayPause,
67711
+ onRenderModeChange,
67712
+ onRotateOnAxisChange,
67713
+ onReset,
67714
+ onSettingsClose,
67715
+ onSettingsOpen,
67716
+ onShowGridToggle,
67717
+ onShowSkeletonsToggle,
67718
+ onShowWireframesToggle,
67719
+ onVrToggle,
67720
+ renderMode,
67721
+ showGrid,
67722
+ showSkeletons,
67723
+ showWireframes
67724
+ }) {
67725
+ return /*#__PURE__*/external_react_["default"].createElement(controls_bar_ControlsBarV2, null, /*#__PURE__*/external_react_["default"].createElement(ResetControlV2, {
67726
+ onReset: onReset
67727
+ }), /*#__PURE__*/external_react_["default"].createElement(AnimationControlsV2, {
67728
+ animationClips: animationClips,
67729
+ currentAnimationClipId: currentAnimationClipId,
67730
+ isPlaying: isPlaying,
67731
+ onAnimationClipSelect: onAnimationClipSelect,
67732
+ onPlayPause: onPlayPause
67733
+ }), /*#__PURE__*/external_react_["default"].createElement(VrToggleControlV2, {
67734
+ isVrShown: isVrShown,
67735
+ onVrToggle: onVrToggle
67736
+ }), /*#__PURE__*/external_react_["default"].createElement(Model3DSettingsV2, {
67737
+ cameraProjection: cameraProjection,
67738
+ onCameraProjectionChange: onCameraProjectionChange,
67739
+ onClose: onSettingsClose,
67740
+ onOpen: onSettingsOpen,
67741
+ onRenderModeChange: onRenderModeChange,
67742
+ onRotateOnAxisChange: onRotateOnAxisChange,
67743
+ onShowGridToggle: onShowGridToggle,
67744
+ onShowSkeletonsToggle: onShowSkeletonsToggle,
67745
+ onShowWireframesToggle: onShowWireframesToggle,
67746
+ renderMode: renderMode,
67747
+ showGrid: showGrid,
67748
+ showSkeletons: showSkeletons,
67749
+ showWireframes: showWireframes
67750
+ }), /*#__PURE__*/external_react_["default"].createElement(FullscreenToggleV2, {
67751
+ onFullscreenToggle: onFullscreenToggle
67752
+ }));
67753
+ }
66598
67754
  ;// ./src/lib/viewers/box3d/model3d/Model3DVrControls.js
66599
67755
  function Model3DVrControls_defineProperty(e, r, t) { return (r = Model3DVrControls_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
66600
67756
  function Model3DVrControls_toPropertyKey(t) { var i = Model3DVrControls_toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
@@ -67501,6 +68657,8 @@ function Model3DViewer_toPrimitive(t, r) { if ("object" != typeof t || !t) retur
67501
68657
 
67502
68658
 
67503
68659
 
68660
+
68661
+
67504
68662
  const DEFAULT_AXIS_UP = '+Y';
67505
68663
  const DEFAULT_AXIS_FORWARD = '+Z';
67506
68664
  const DEFAULT_RENDER_GRID = true;
@@ -67944,7 +69102,8 @@ class Model3DViewer extends box3d_Box3DViewer {
67944
69102
  if (!this.controls || !this.renderer) {
67945
69103
  return;
67946
69104
  }
67947
- this.controls.render(/*#__PURE__*/external_react_["default"].createElement(Model3DControlsNew_Model3DControls, {
69105
+ const Controls = this.featureEnabled(constants/* BLUEPRINT_MIGRATION_CONTROLS_BAR */.OQ) ? Model3DControlsV2 : Model3DControlsNew_Model3DControls;
69106
+ this.controls.render(/*#__PURE__*/external_react_["default"].createElement(Controls, {
67948
69107
  animationClips: this.animationClips,
67949
69108
  cameraProjection: this.projection,
67950
69109
  currentAnimationClipId: this.renderer.getAnimationClip(),
@@ -68552,16 +69711,6 @@ office_OfficeLoader,
68552
69711
  doc_DocLoader,
68553
69712
  // should come after text
68554
69713
  swf_SWFLoader, video360_Video360Loader, media_MediaLoader, image360_Image360Loader, image_ImageLoader, model3d_Model3DLoader, iframe_IFrameLoader]);
68555
- ;// external "@box/blueprint-web-assets/icons/Medium/Checkmark"
68556
-
68557
- ;// external "@box/blueprint-web-assets/icons/Medium/Download"
68558
-
68559
- ;// external "@box/blueprint-web-assets/icons/Medium/Ellipsis"
68560
-
68561
- ;// external "@box/blueprint-web-assets/icons/Medium/Expand"
68562
-
68563
- ;// external "@box/blueprint-web-assets/icons/Medium/Trash"
68564
-
68565
69714
  ;// ./src/lib/ComparisonBanner.scss
68566
69715
  // extracted by mini-css-extract-plugin
68567
69716
 
@@ -68579,9 +69728,8 @@ function ComparisonBanner_toPrimitive(t, r) { if ("object" != typeof t || !t) re
68579
69728
 
68580
69729
 
68581
69730
 
68582
-
68583
-
68584
-
69731
+ // The badge is a fixed-size circle, so larger version numbers are shown as "999+"
69732
+ const MAX_BADGE_VERSION = 999;
68585
69733
  function formatComparisonTimestamp(iso, locale) {
68586
69734
  if (!iso) {
68587
69735
  return '';
@@ -68600,6 +69748,23 @@ function formatComparisonTimestamp(iso, locale) {
68600
69748
  function getComparisonBannerAuthor(file = {}) {
68601
69749
  return file.modified_by?.name || file.created_by?.name || '';
68602
69750
  }
69751
+ function VersionBadge({
69752
+ fullLabel,
69753
+ isTruncated,
69754
+ label
69755
+ }) {
69756
+ const badge = /*#__PURE__*/external_react_["default"].createElement("span", {
69757
+ // When truncated, the tooltip supplies the full number
69758
+ "aria-label": isTruncated ? undefined : fullLabel,
69759
+ className: isTruncated ? 'bp-version-banner-badge bp-version-banner-badge--truncated' : 'bp-version-banner-badge',
69760
+ role: isTruncated ? undefined : 'img'
69761
+ }, label);
69762
+
69763
+ // Tooltip triggers must be focusable so keyboard users can open the full version number
69764
+ return isTruncated ? /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Tooltip, {
69765
+ content: fullLabel
69766
+ }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Focusable, null, badge)) : badge;
69767
+ }
68603
69768
  function ComparisonBanner({
68604
69769
  file = {},
68605
69770
  isComparedPreview = false,
@@ -68614,40 +69779,51 @@ function ComparisonBanner({
68614
69779
  const versionNumber = file.version_number != null && file.version_number !== '' ? String(file.version_number) : '';
68615
69780
  const timestamp = formatComparisonTimestamp(file.modified_at, locale);
68616
69781
  const author = getComparisonBannerAuthor(file);
69782
+ const isBadgeTruncated = Number(versionNumber) > MAX_BADGE_VERSION;
69783
+ const badgeLabel = isBadgeTruncated ? `${MAX_BADGE_VERSION}+` : versionNumber;
69784
+ const badgeFullLabel = (0,util/* replacePlaceholders */.Lb)(ComparisonBanner_('comparison_banner_version'), [versionNumber]);
68617
69785
  // When "Open Full Preview" is the only action, the close button covers it, so skip the menu
68618
69786
  const showMenu = !!(onMakeCurrent || onDownload || onDelete);
68619
69787
  const showClose = !!onOpenFullPreview;
68620
69788
  if (!versionNumber && !timestamp && !author) {
68621
69789
  return null;
68622
69790
  }
68623
- return /*#__PURE__*/external_react_["default"].createElement("div", {
69791
+ return /*#__PURE__*/external_react_["default"].createElement(BlueprintProviders/* default */.A, {
69792
+ container: menuContainer
69793
+ }, /*#__PURE__*/external_react_["default"].createElement("div", {
68624
69794
  className: isComparedPreview ? `${constants/* CLASS_BOX_PREVIEW_VERSION_BANNER */.on} ${constants/* CLASS_BOX_PREVIEW_VERSION_BANNER_COMPARED */.Uj}` : constants/* CLASS_BOX_PREVIEW_VERSION_BANNER */.on
68625
69795
  }, /*#__PURE__*/external_react_["default"].createElement("div", {
68626
69796
  "aria-label": isComparedPreview ? ComparisonBanner_('comparison_banner_previous') : ComparisonBanner_('comparison_banner_current'),
68627
69797
  className: "bp-version-banner-details",
68628
69798
  role: "status"
68629
- }, versionNumber && /*#__PURE__*/external_react_["default"].createElement("span", {
68630
- className: "bp-version-banner-badge"
68631
- }, versionNumber), (timestamp || author) && /*#__PURE__*/external_react_["default"].createElement("div", {
69799
+ }, versionNumber && /*#__PURE__*/external_react_["default"].createElement(VersionBadge, {
69800
+ fullLabel: badgeFullLabel,
69801
+ isTruncated: isBadgeTruncated,
69802
+ label: badgeLabel
69803
+ }), (timestamp || author) && /*#__PURE__*/external_react_["default"].createElement("div", {
68632
69804
  className: "bp-version-banner-info"
68633
- }, timestamp && /*#__PURE__*/external_react_["default"].createElement("div", {
68634
- className: "bp-version-banner-time"
68635
- }, timestamp), author && /*#__PURE__*/external_react_["default"].createElement("div", {
68636
- className: "bp-version-banner-author"
69805
+ }, timestamp && /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.EllipsizableText, {
69806
+ as: "div",
69807
+ className: "bp-version-banner-time",
69808
+ lineClamp: 1,
69809
+ variant: "bodyDefaultSemibold"
69810
+ }, timestamp), author && /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.EllipsizableText, {
69811
+ as: "div",
69812
+ className: "bp-version-banner-author",
69813
+ lineClamp: 1,
69814
+ variant: "caption"
68637
69815
  }, author))), isComparedPreview && (onMakeCurrent || onDownload || onOpenFullPreview || onDelete) && /*#__PURE__*/external_react_["default"].createElement("div", {
68638
69816
  className: "bp-version-banner-actions",
68639
69817
  onKeyDown: event => {
68640
69818
  event.stopPropagation(); // Prevents global key handling
68641
69819
  },
68642
69820
  role: "presentation"
68643
- }, /*#__PURE__*/external_react_["default"].createElement(BlueprintProviders/* default */.A, {
68644
- container: menuContainer
68645
69821
  }, showMenu && /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Root, null, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Trigger, {
68646
69822
  asChild: true
68647
69823
  }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.IconButton, {
68648
69824
  "aria-label": ComparisonBanner_('comparison_banner_actions'),
68649
69825
  "data-target-id": "ComparisonBanner-openActions",
68650
- icon: __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_Ellipsis_9a96c07b_default__,
69826
+ icon: Medium_.Ellipsis,
68651
69827
  size: "small",
68652
69828
  variant: isOnDark ? 'on-dark' : 'default'
68653
69829
  })), /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Content, {
@@ -68658,21 +69834,21 @@ function ComparisonBanner({
68658
69834
  "data-target-id": "ComparisonBanner-makeCurrent",
68659
69835
  onSelect: onMakeCurrent
68660
69836
  }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Item.StartElement, {
68661
- icon: __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_Checkmark_52a58454_default__
69837
+ icon: Medium_.Checkmark
68662
69838
  }), /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Item.MainContent, {
68663
69839
  label: ComparisonBanner_('comparison_banner_make_current')
68664
69840
  })), onDownload && /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Item, {
68665
69841
  "data-target-id": "ComparisonBanner-download",
68666
69842
  onSelect: onDownload
68667
69843
  }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Item.StartElement, {
68668
- icon: __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_Download_0dc63cde_default__
69844
+ icon: Medium_.Download
68669
69845
  }), /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Item.MainContent, {
68670
69846
  label: ComparisonBanner_('download')
68671
69847
  })), onOpenFullPreview && /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Item, {
68672
69848
  "data-target-id": "ComparisonBanner-openFullPreview",
68673
69849
  onSelect: onOpenFullPreview
68674
69850
  }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Item.StartElement, {
68675
- icon: __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_Expand_92c6b888_default__
69851
+ icon: Medium_.Expand
68676
69852
  }), /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Item.MainContent, {
68677
69853
  label: ComparisonBanner_('comparison_banner_open_full_preview')
68678
69854
  })), onDelete && (onMakeCurrent || onDownload || onOpenFullPreview) && /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Separator, null), onDelete && /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Item, {
@@ -68680,7 +69856,7 @@ function ComparisonBanner({
68680
69856
  onSelect: onDelete,
68681
69857
  variant: "destructive"
68682
69858
  }, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Item.StartElement, {
68683
- icon: __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_Trash_28211f44_default__
69859
+ icon: Medium_.Trash
68684
69860
  }), /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Item.MainContent, {
68685
69861
  label: ComparisonBanner_('comparison_banner_delete')
68686
69862
  })))), showMenu && showClose && /*#__PURE__*/external_react_["default"].createElement("span", {
@@ -68689,7 +69865,7 @@ function ComparisonBanner({
68689
69865
  }), showClose && /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.IconButton, {
68690
69866
  "aria-label": ComparisonBanner_('comparison_banner_close'),
68691
69867
  "data-target-id": "ComparisonBanner-close",
68692
- icon: __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_XMark_07fbe0f0_default__,
69868
+ icon: Medium_.XMark,
68693
69869
  onClick: onOpenFullPreview,
68694
69870
  size: "small",
68695
69871
  variant: isOnDark ? 'on-dark' : 'default'
@@ -70457,7 +71633,9 @@ class Preview extends (events_default()) {
70457
71633
  // Start the preview load and render timers when the user starts to perceive preview's load
70458
71634
  lib_Timer.start(lib_Timer.createTag(this.file.id, lib_events/* LOAD_METRIC */.Yy.previewLoadTime));
70459
71635
  lib_Timer.start(lib_Timer.createTag(this.file.id, lib_events/* RENDER_METRIC */.QQ));
70460
- lib_Timer.start(lib_Timer.createTag(this.file.id, lib_events/* FIRST_RENDER_METRIC */.VT));
71636
+ const firstRenderTag = lib_Timer.createTag(this.file.id, lib_events/* FIRST_RENDER_METRIC */.VT);
71637
+ lib_Timer.reset(firstRenderTag);
71638
+ lib_Timer.start(firstRenderTag);
70461
71639
 
70462
71640
  // If file version ID is specified, increment retry count if it matches current file version ID
70463
71641
  if (fileVersionId) {