@wordpress/edit-site 6.50.0 → 7.0.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 (85) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/build/components/add-new-template/add-custom-template-modal-content.cjs +3 -3
  3. package/build/components/add-new-template/add-custom-template-modal-content.cjs.map +2 -2
  4. package/build/components/add-new-template/index.cjs +1 -1
  5. package/build/components/add-new-template/index.cjs.map +2 -2
  6. package/build/components/add-new-template-legacy/add-custom-template-modal-content.cjs +3 -3
  7. package/build/components/add-new-template-legacy/add-custom-template-modal-content.cjs.map +2 -2
  8. package/build/components/add-new-template-legacy/index.cjs +1 -1
  9. package/build/components/add-new-template-legacy/index.cjs.map +2 -2
  10. package/build/components/editor/index.cjs +22 -97
  11. package/build/components/editor/index.cjs.map +3 -3
  12. package/build/components/layout/index.cjs +12 -15
  13. package/build/components/layout/index.cjs.map +3 -3
  14. package/build/components/page-patterns/fields.cjs +0 -36
  15. package/build/components/page-patterns/fields.cjs.map +2 -2
  16. package/build/components/page-patterns/index.cjs +4 -15
  17. package/build/components/page-patterns/index.cjs.map +2 -2
  18. package/build/components/save-panel/index.cjs +1 -2
  19. package/build/components/save-panel/index.cjs.map +2 -2
  20. package/build/components/site-editor-routes/styles.cjs +4 -3
  21. package/build/components/site-editor-routes/styles.cjs.map +2 -2
  22. package/build/components/site-hub/index.cjs +13 -176
  23. package/build/components/site-hub/index.cjs.map +3 -3
  24. package/build/index.cjs +3 -1
  25. package/build/index.cjs.map +2 -2
  26. package/build-module/components/add-new-template/add-custom-template-modal-content.mjs +3 -3
  27. package/build-module/components/add-new-template/add-custom-template-modal-content.mjs.map +2 -2
  28. package/build-module/components/add-new-template/index.mjs +1 -1
  29. package/build-module/components/add-new-template/index.mjs.map +2 -2
  30. package/build-module/components/add-new-template-legacy/add-custom-template-modal-content.mjs +3 -3
  31. package/build-module/components/add-new-template-legacy/add-custom-template-modal-content.mjs.map +2 -2
  32. package/build-module/components/add-new-template-legacy/index.mjs +1 -1
  33. package/build-module/components/add-new-template-legacy/index.mjs.map +2 -2
  34. package/build-module/components/editor/index.mjs +25 -100
  35. package/build-module/components/editor/index.mjs.map +2 -2
  36. package/build-module/components/layout/index.mjs +12 -15
  37. package/build-module/components/layout/index.mjs.map +2 -2
  38. package/build-module/components/page-patterns/fields.mjs +2 -41
  39. package/build-module/components/page-patterns/fields.mjs.map +2 -2
  40. package/build-module/components/page-patterns/index.mjs +5 -16
  41. package/build-module/components/page-patterns/index.mjs.map +2 -2
  42. package/build-module/components/save-panel/index.mjs +1 -2
  43. package/build-module/components/save-panel/index.mjs.map +2 -2
  44. package/build-module/components/site-editor-routes/styles.mjs +4 -3
  45. package/build-module/components/site-editor-routes/styles.mjs.map +2 -2
  46. package/build-module/components/site-hub/index.mjs +17 -170
  47. package/build-module/components/site-hub/index.mjs.map +2 -2
  48. package/build-module/index.mjs +3 -1
  49. package/build-module/index.mjs.map +2 -2
  50. package/build-style/style-rtl.css +110 -330
  51. package/build-style/style.css +110 -330
  52. package/package.json +52 -52
  53. package/src/components/add-new-template/add-custom-template-modal-content.js +3 -3
  54. package/src/components/add-new-template/index.js +1 -1
  55. package/src/components/add-new-template-legacy/add-custom-template-modal-content.js +3 -3
  56. package/src/components/add-new-template-legacy/index.js +1 -1
  57. package/src/components/editor/index.js +31 -122
  58. package/src/components/editor/style.scss +0 -62
  59. package/src/components/layout/index.js +13 -18
  60. package/src/components/layout/style.scss +5 -62
  61. package/src/components/page-patterns/fields.js +2 -50
  62. package/src/components/page-patterns/index.js +5 -23
  63. package/src/components/page-patterns/style.scss +1 -1
  64. package/src/components/save-panel/index.js +1 -2
  65. package/src/components/sidebar/style.scss +2 -0
  66. package/src/components/sidebar-button/style.scss +1 -9
  67. package/src/components/sidebar-global-styles/style.scss +7 -4
  68. package/src/components/sidebar-navigation-item/style.scss +8 -4
  69. package/src/components/sidebar-navigation-screen/style.scss +1 -1
  70. package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +2 -2
  71. package/src/components/sidebar-navigation-screen-patterns/style.scss +1 -1
  72. package/src/components/site-editor-routes/styles.js +5 -2
  73. package/src/components/site-hub/index.js +12 -170
  74. package/src/components/site-hub/style.scss +5 -82
  75. package/src/index.js +3 -1
  76. package/src/style.scss +16 -11
  77. package/build/components/site-icon/index.cjs +0 -73
  78. package/build/components/site-icon/index.cjs.map +0 -7
  79. package/build-module/components/site-icon/index.mjs +0 -42
  80. package/build-module/components/site-icon/index.mjs.map +0 -7
  81. package/build-style/experimental-omnibar-rtl.css +0 -103
  82. package/build-style/experimental-omnibar.css +0 -103
  83. package/src/components/site-icon/index.js +0 -51
  84. package/src/components/site-icon/style.scss +0 -41
  85. package/src/experimental-omnibar.scss +0 -75
@@ -1,135 +1,38 @@
1
1
  // packages/edit-site/src/components/site-hub/index.js
2
- import clsx from "clsx";
3
- import { useSelect, useDispatch } from "@wordpress/data";
4
- import { Button, __experimentalHStack as HStack } from "@wordpress/components";
2
+ import { useSelect } from "@wordpress/data";
3
+ import { Button } from "@wordpress/components";
5
4
  import { __, isRTL } from "@wordpress/i18n";
6
5
  import { store as coreStore } from "@wordpress/core-data";
7
- import { decodeEntities } from "@wordpress/html-entities";
8
6
  import { memo, forwardRef, useContext } from "@wordpress/element";
9
- import { Icon, arrowUpLeft, arrowUpRight, search } from "@wordpress/icons";
10
- import { store as commandsStore } from "@wordpress/commands";
11
- import { displayShortcut } from "@wordpress/keycodes";
12
- import { VisuallyHidden } from "@wordpress/ui";
13
- import { filterURLForDisplay } from "@wordpress/url";
7
+ import { chevronLeft, chevronRight } from "@wordpress/icons";
14
8
  import { privateApis as routerPrivateApis } from "@wordpress/router";
15
9
  import { store as editSiteStore } from "../../store/index.mjs";
16
- import SiteIcon from "../site-icon/index.mjs";
17
10
  import { unlock } from "../../lock-unlock.mjs";
18
11
  import { SidebarNavigationContext } from "../sidebar/index.mjs";
19
- import { jsx, jsxs } from "react/jsx-runtime";
12
+ import { jsx } from "react/jsx-runtime";
20
13
  var { useLocation, useHistory } = unlock(routerPrivateApis);
21
- var SiteHub = memo(
22
- forwardRef(({ isTransparent }, ref) => {
23
- const { dashboardLink, homeUrl, siteTitle } = useSelect((select) => {
24
- const { getSettings } = unlock(select(editSiteStore));
25
- const { getEntityRecord } = select(coreStore);
26
- const _site = getEntityRecord("root", "site");
27
- return {
28
- dashboardLink: getSettings().__experimentalDashboardLink,
29
- homeUrl: getEntityRecord("root", "__unstableBase")?.home,
30
- siteTitle: !_site?.title && !!_site?.url ? filterURLForDisplay(_site?.url) : _site?.title
31
- };
32
- }, []);
33
- const { open: openCommandCenter } = useDispatch(commandsStore);
34
- return /* @__PURE__ */ jsx("div", { className: "edit-site-site-hub", children: /* @__PURE__ */ jsxs(HStack, { justify: "flex-start", spacing: "0", children: [
35
- /* @__PURE__ */ jsx(
36
- "div",
37
- {
38
- className: clsx(
39
- "edit-site-site-hub__view-mode-toggle-container",
40
- {
41
- "has-transparent-background": isTransparent
42
- }
43
- ),
44
- children: /* @__PURE__ */ jsx(
45
- Button,
46
- {
47
- __next40pxDefaultSize: true,
48
- ref,
49
- href: dashboardLink,
50
- label: __("Go to the Dashboard"),
51
- className: "edit-site-layout__view-mode-toggle",
52
- style: {
53
- transform: "scale(0.5333) translateX(-4px)",
54
- // Offset to position the icon 12px from viewport edge
55
- borderRadius: 4
56
- },
57
- children: /* @__PURE__ */ jsx(SiteIcon, { className: "edit-site-layout__view-mode-toggle-icon" })
58
- }
59
- )
60
- }
61
- ),
62
- /* @__PURE__ */ jsxs(HStack, { children: [
63
- /* @__PURE__ */ jsx("div", { className: "edit-site-site-hub__title", children: /* @__PURE__ */ jsxs(
64
- Button,
65
- {
66
- __next40pxDefaultSize: true,
67
- variant: "link",
68
- href: homeUrl,
69
- target: "_blank",
70
- children: [
71
- decodeEntities(siteTitle),
72
- /* @__PURE__ */ jsx(VisuallyHidden, {
73
- render: /* @__PURE__ */ jsx("span", {}),
74
- /* translators: accessibility text */
75
- children: __("(opens in a new tab)")
76
- })
77
- ]
78
- }
79
- ) }),
80
- /* @__PURE__ */ jsx(
81
- HStack,
82
- {
83
- spacing: 0,
84
- expanded: false,
85
- className: "edit-site-site-hub__actions",
86
- children: /* @__PURE__ */ jsx(
87
- Button,
88
- {
89
- size: "compact",
90
- className: "edit-site-site-hub_toggle-command-center",
91
- icon: search,
92
- onClick: () => openCommandCenter(),
93
- label: __("Open command palette"),
94
- shortcut: displayShortcut.primary("k")
95
- }
96
- )
97
- }
98
- )
99
- ] })
100
- ] }) });
101
- })
102
- );
103
- var site_hub_default = SiteHub;
104
14
  var SiteHubMobile = memo(
105
- forwardRef(({ isTransparent }, ref) => {
15
+ forwardRef((props, ref) => {
106
16
  const { path } = useLocation();
107
17
  const history = useHistory();
108
18
  const { navigate } = useContext(SidebarNavigationContext);
109
- const hasAdminBarInEditor = window.__experimentalAdminBarInEditor;
110
19
  const {
111
20
  dashboardLink,
112
- homeUrl,
113
- siteTitle,
114
21
  isBlockTheme,
115
22
  isClassicThemeWithStyleBookSupport
116
23
  } = useSelect((select) => {
117
24
  const { getSettings } = unlock(select(editSiteStore));
118
- const { getEntityRecord, getCurrentTheme } = select(coreStore);
119
- const _site = getEntityRecord("root", "site");
25
+ const { getCurrentTheme } = select(coreStore);
120
26
  const currentTheme = getCurrentTheme();
121
27
  const settings = getSettings();
122
28
  const supportsEditorStyles = currentTheme?.theme_supports["editor-styles"];
123
29
  const hasThemeJson = settings.supportsLayout;
124
30
  return {
125
31
  dashboardLink: settings.__experimentalDashboardLink,
126
- homeUrl: getEntityRecord("root", "__unstableBase")?.home,
127
- siteTitle: !_site?.title && !!_site?.url ? filterURLForDisplay(_site?.url) : _site?.title,
128
32
  isBlockTheme: currentTheme?.is_block_theme,
129
33
  isClassicThemeWithStyleBookSupport: !currentTheme?.is_block_theme && (supportsEditorStyles || hasThemeJson)
130
34
  };
131
35
  }, []);
132
- const { open: openCommandCenter } = useDispatch(commandsStore);
133
36
  let backPath;
134
37
  if (path !== "/") {
135
38
  if (isBlockTheme || isClassicThemeWithStyleBookSupport) {
@@ -146,75 +49,19 @@ var SiteHubMobile = memo(
146
49
  navigate("back");
147
50
  } : void 0
148
51
  };
149
- return /* @__PURE__ */ jsx("div", { className: "edit-site-site-hub", children: /* @__PURE__ */ jsxs(HStack, { justify: "flex-start", spacing: "0", children: [
150
- /* @__PURE__ */ jsx(
151
- "div",
152
- {
153
- className: clsx(
154
- "edit-site-site-hub__view-mode-toggle-container",
155
- {
156
- "has-transparent-background": isTransparent
157
- }
158
- ),
159
- children: /* @__PURE__ */ jsx(
160
- Button,
161
- {
162
- __next40pxDefaultSize: true,
163
- ref,
164
- className: "edit-site-layout__view-mode-toggle",
165
- style: {
166
- transform: "scale(0.5)",
167
- borderRadius: 4
168
- },
169
- ...backButtonProps,
170
- children: hasAdminBarInEditor ? /* @__PURE__ */ jsx(
171
- Icon,
172
- {
173
- icon: isRTL() ? arrowUpRight : arrowUpLeft,
174
- size: 48
175
- }
176
- ) : /* @__PURE__ */ jsx(SiteIcon, { className: "edit-site-layout__view-mode-toggle-icon" })
177
- }
178
- )
179
- }
180
- ),
181
- /* @__PURE__ */ jsxs(HStack, { children: [
182
- /* @__PURE__ */ jsx("div", { className: "edit-site-site-hub__title", children: /* @__PURE__ */ jsx(
183
- Button,
184
- {
185
- __next40pxDefaultSize: true,
186
- variant: "link",
187
- href: homeUrl,
188
- target: "_blank",
189
- label: __("View site (opens in a new tab)"),
190
- children: decodeEntities(siteTitle)
191
- }
192
- ) }),
193
- /* @__PURE__ */ jsx(
194
- HStack,
195
- {
196
- spacing: 0,
197
- expanded: false,
198
- className: "edit-site-site-hub__actions",
199
- children: /* @__PURE__ */ jsx(
200
- Button,
201
- {
202
- __next40pxDefaultSize: true,
203
- className: "edit-site-site-hub_toggle-command-center",
204
- icon: search,
205
- onClick: () => openCommandCenter(),
206
- label: __("Open command palette"),
207
- shortcut: displayShortcut.primary("k")
208
- }
209
- )
210
- }
211
- )
212
- ] })
213
- ] }) });
52
+ return /* @__PURE__ */ jsx("div", { className: "edit-site-site-hub", children: /* @__PURE__ */ jsx(
53
+ Button,
54
+ {
55
+ size: "compact",
56
+ ref,
57
+ className: "edit-site-site-hub__back-button",
58
+ icon: isRTL() ? chevronRight : chevronLeft,
59
+ ...backButtonProps
60
+ }
61
+ ) });
214
62
  })
215
63
  );
216
64
  export {
217
- SiteHubMobile,
218
- site_hub_default as default
65
+ SiteHubMobile
219
66
  };
220
67
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/site-hub/index.js"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { Button, __experimentalHStack as HStack } from '@wordpress/components';\nimport { __, isRTL } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { memo, forwardRef, useContext } from '@wordpress/element';\nimport { Icon, arrowUpLeft, arrowUpRight, search } from '@wordpress/icons';\nimport { store as commandsStore } from '@wordpress/commands';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { VisuallyHidden } from '@wordpress/ui';\nimport { filterURLForDisplay } from '@wordpress/url';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport SiteIcon from '../site-icon';\nimport { unlock } from '../../lock-unlock';\nimport { SidebarNavigationContext } from '../sidebar';\nconst { useLocation, useHistory } = unlock( routerPrivateApis );\n\nconst SiteHub = memo(\n\tforwardRef( ( { isTransparent }, ref ) => {\n\t\tconst { dashboardLink, homeUrl, siteTitle } = useSelect( ( select ) => {\n\t\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\n\t\t\tconst { getEntityRecord } = select( coreStore );\n\t\t\tconst _site = getEntityRecord( 'root', 'site' );\n\t\t\treturn {\n\t\t\t\tdashboardLink: getSettings().__experimentalDashboardLink,\n\t\t\t\thomeUrl: getEntityRecord( 'root', '__unstableBase' )?.home,\n\t\t\t\tsiteTitle:\n\t\t\t\t\t! _site?.title && !! _site?.url\n\t\t\t\t\t\t? filterURLForDisplay( _site?.url )\n\t\t\t\t\t\t: _site?.title,\n\t\t\t};\n\t\t}, [] );\n\t\tconst { open: openCommandCenter } = useDispatch( commandsStore );\n\n\t\treturn (\n\t\t\t<div className=\"edit-site-site-hub\">\n\t\t\t\t<HStack justify=\"flex-start\" spacing=\"0\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t'edit-site-site-hub__view-mode-toggle-container',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'has-transparent-background': isTransparent,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\thref={ dashboardLink }\n\t\t\t\t\t\t\tlabel={ __( 'Go to the Dashboard' ) }\n\t\t\t\t\t\t\tclassName=\"edit-site-layout__view-mode-toggle\"\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\ttransform: 'scale(0.5333) translateX(-4px)', // Offset to position the icon 12px from viewport edge\n\t\t\t\t\t\t\t\tborderRadius: 4,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<SiteIcon className=\"edit-site-layout__view-mode-toggle-icon\" />\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<HStack>\n\t\t\t\t\t\t<div className=\"edit-site-site-hub__title\">\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\t\t\thref={ homeUrl }\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ decodeEntities( siteTitle ) }\n\t\t\t\t\t\t\t\t<VisuallyHidden render={ <span /> }>\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\tspacing={ 0 }\n\t\t\t\t\t\t\texpanded={ false }\n\t\t\t\t\t\t\tclassName=\"edit-site-site-hub__actions\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t\tclassName=\"edit-site-site-hub_toggle-command-center\"\n\t\t\t\t\t\t\t\ticon={ search }\n\t\t\t\t\t\t\t\tonClick={ () => openCommandCenter() }\n\t\t\t\t\t\t\t\tlabel={ __( 'Open command palette' ) }\n\t\t\t\t\t\t\t\tshortcut={ displayShortcut.primary( 'k' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t</HStack>\n\t\t\t\t</HStack>\n\t\t\t</div>\n\t\t);\n\t} )\n);\n\nexport default SiteHub;\n\nexport const SiteHubMobile = memo(\n\tforwardRef( ( { isTransparent }, ref ) => {\n\t\tconst { path } = useLocation();\n\t\tconst history = useHistory();\n\t\tconst { navigate } = useContext( SidebarNavigationContext );\n\t\tconst hasAdminBarInEditor = window.__experimentalAdminBarInEditor;\n\n\t\tconst {\n\t\t\tdashboardLink,\n\t\t\thomeUrl,\n\t\t\tsiteTitle,\n\t\t\tisBlockTheme,\n\t\t\tisClassicThemeWithStyleBookSupport,\n\t\t} = useSelect( ( select ) => {\n\t\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\t\t\tconst { getEntityRecord, getCurrentTheme } = select( coreStore );\n\t\t\tconst _site = getEntityRecord( 'root', 'site' );\n\t\t\tconst currentTheme = getCurrentTheme();\n\t\t\tconst settings = getSettings();\n\t\t\tconst supportsEditorStyles =\n\t\t\t\tcurrentTheme?.theme_supports[ 'editor-styles' ];\n\t\t\t// This is a temp solution until the has_theme_json value is available for the current theme.\n\t\t\tconst hasThemeJson = settings.supportsLayout;\n\n\t\t\treturn {\n\t\t\t\tdashboardLink: settings.__experimentalDashboardLink,\n\t\t\t\thomeUrl: getEntityRecord( 'root', '__unstableBase' )?.home,\n\t\t\t\tsiteTitle:\n\t\t\t\t\t! _site?.title && !! _site?.url\n\t\t\t\t\t\t? filterURLForDisplay( _site?.url )\n\t\t\t\t\t\t: _site?.title,\n\t\t\t\tisBlockTheme: currentTheme?.is_block_theme,\n\t\t\t\tisClassicThemeWithStyleBookSupport:\n\t\t\t\t\t! currentTheme?.is_block_theme &&\n\t\t\t\t\t( supportsEditorStyles || hasThemeJson ),\n\t\t\t};\n\t\t}, [] );\n\t\tconst { open: openCommandCenter } = useDispatch( commandsStore );\n\n\t\tlet backPath;\n\n\t\t// If the current path is not the root page, find a page to back to.\n\t\tif ( path !== '/' ) {\n\t\t\tif ( isBlockTheme || isClassicThemeWithStyleBookSupport ) {\n\t\t\t\t// If the current theme is a block theme or a classic theme that supports StyleBook,\n\t\t\t\t// back to the Design screen.\n\t\t\t\tbackPath = '/';\n\t\t\t} else if ( path !== '/pattern' ) {\n\t\t\t\t// If the current theme is a classic theme that does not support StyleBook,\n\t\t\t\t// back to the Patterns page.\n\t\t\t\tbackPath = '/pattern';\n\t\t\t}\n\t\t}\n\n\t\tconst backButtonProps = {\n\t\t\thref: !! backPath ? undefined : dashboardLink,\n\t\t\tlabel: !! backPath\n\t\t\t\t? __( 'Go to Site Editor' )\n\t\t\t\t: __( 'Go to the Dashboard' ),\n\t\t\tonClick: !! backPath\n\t\t\t\t? () => {\n\t\t\t\t\t\thistory.navigate( backPath );\n\t\t\t\t\t\tnavigate( 'back' );\n\t\t\t\t }\n\t\t\t\t: undefined,\n\t\t};\n\n\t\treturn (\n\t\t\t<div className=\"edit-site-site-hub\">\n\t\t\t\t<HStack justify=\"flex-start\" spacing=\"0\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t'edit-site-site-hub__view-mode-toggle-container',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'has-transparent-background': isTransparent,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\tclassName=\"edit-site-layout__view-mode-toggle\"\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\ttransform: 'scale(0.5)',\n\t\t\t\t\t\t\t\tborderRadius: 4,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t{ ...backButtonProps }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ hasAdminBarInEditor ? (\n\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\tisRTL() ? arrowUpRight : arrowUpLeft\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tsize={ 48 }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<SiteIcon className=\"edit-site-layout__view-mode-toggle-icon\" />\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<HStack>\n\t\t\t\t\t\t<div className=\"edit-site-site-hub__title\">\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\t\t\thref={ homeUrl }\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\tlabel={ __( 'View site (opens in a new tab)' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ decodeEntities( siteTitle ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\tspacing={ 0 }\n\t\t\t\t\t\t\texpanded={ false }\n\t\t\t\t\t\t\tclassName=\"edit-site-site-hub__actions\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tclassName=\"edit-site-site-hub_toggle-command-center\"\n\t\t\t\t\t\t\t\ticon={ search }\n\t\t\t\t\t\t\t\tonClick={ () => openCommandCenter() }\n\t\t\t\t\t\t\t\tlabel={ __( 'Open command palette' ) }\n\t\t\t\t\t\t\t\tshortcut={ displayShortcut.primary( 'k' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t</HStack>\n\t\t\t\t</HStack>\n\t\t\t</div>\n\t\t);\n\t} )\n);\n"],
5
- "mappings": ";AAGA,OAAO,UAAU;AAKjB,SAAS,WAAW,mBAAmB;AACvC,SAAS,QAAQ,wBAAwB,cAAc;AACvD,SAAS,IAAI,aAAa;AAC1B,SAAS,SAAS,iBAAiB;AACnC,SAAS,sBAAsB;AAC/B,SAAS,MAAM,YAAY,kBAAkB;AAC7C,SAAS,MAAM,aAAa,cAAc,cAAc;AACxD,SAAS,SAAS,qBAAqB;AACvC,SAAS,uBAAuB;AAChC,SAAS,sBAAsB;AAC/B,SAAS,2BAA2B;AACpC,SAAS,eAAe,yBAAyB;AAKjD,SAAS,SAAS,qBAAqB;AACvC,OAAO,cAAc;AACrB,SAAS,cAAc;AACvB,SAAS,gCAAgC;AA2ClC,cAMA,YANA;AA1CP,IAAM,EAAE,aAAa,WAAW,IAAI,OAAQ,iBAAkB;AAE9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AE3C,yBAAgB,SAAU;AAAA;AAAA,QAC7B,GACD;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACA,SAAU;AAAA,YACV,UAAW;AAAA,YACX,WAAU;AAAA,YAEV;AAAA,cAAC;AAAA;AAAA,gBACA,uBAAqB;AAAA,gBACrB,WAAU;AAAA,gBACV,MAAO;AAAA,gBACP,SAAU,MAAM,kBAAkB;AAAA,gBAClC,OAAQ,GAAI,sBAAuB;AAAA,gBACnC,UAAW,gBAAgB,QAAS,GAAI;AAAA;AAAA,YACzC;AAAA;AAAA,QACD;AAAA,SACD;AAAA,OACD,GACD;AAAA,EAEF,CAAE;AACH;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { Button } from '@wordpress/components';\nimport { __, isRTL } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { memo, forwardRef, useContext } from '@wordpress/element';\nimport { chevronLeft, chevronRight } from '@wordpress/icons';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport { SidebarNavigationContext } from '../sidebar';\nconst { useLocation, useHistory } = unlock( routerPrivateApis );\n\nexport const SiteHubMobile = memo(\n\tforwardRef( ( props, ref ) => {\n\t\tconst { path } = useLocation();\n\t\tconst history = useHistory();\n\t\tconst { navigate } = useContext( SidebarNavigationContext );\n\n\t\tconst {\n\t\t\tdashboardLink,\n\t\t\tisBlockTheme,\n\t\t\tisClassicThemeWithStyleBookSupport,\n\t\t} = useSelect( ( select ) => {\n\t\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\t\t\tconst { getCurrentTheme } = select( coreStore );\n\t\t\tconst currentTheme = getCurrentTheme();\n\t\t\tconst settings = getSettings();\n\t\t\tconst supportsEditorStyles =\n\t\t\t\tcurrentTheme?.theme_supports[ 'editor-styles' ];\n\t\t\t// This is a temp solution until the has_theme_json value is available for the current theme.\n\t\t\tconst hasThemeJson = settings.supportsLayout;\n\n\t\t\treturn {\n\t\t\t\tdashboardLink: settings.__experimentalDashboardLink,\n\t\t\t\tisBlockTheme: currentTheme?.is_block_theme,\n\t\t\t\tisClassicThemeWithStyleBookSupport:\n\t\t\t\t\t! currentTheme?.is_block_theme &&\n\t\t\t\t\t( supportsEditorStyles || hasThemeJson ),\n\t\t\t};\n\t\t}, [] );\n\n\t\tlet backPath;\n\n\t\t// If the current path is not the root page, find a page to back to.\n\t\tif ( path !== '/' ) {\n\t\t\tif ( isBlockTheme || isClassicThemeWithStyleBookSupport ) {\n\t\t\t\t// If the current theme is a block theme or a classic theme that supports StyleBook,\n\t\t\t\t// back to the Design screen.\n\t\t\t\tbackPath = '/';\n\t\t\t} else if ( path !== '/pattern' ) {\n\t\t\t\t// If the current theme is a classic theme that does not support StyleBook,\n\t\t\t\t// back to the Patterns page.\n\t\t\t\tbackPath = '/pattern';\n\t\t\t}\n\t\t}\n\n\t\tconst backButtonProps = {\n\t\t\thref: !! backPath ? undefined : dashboardLink,\n\t\t\tlabel: !! backPath\n\t\t\t\t? __( 'Go to Site Editor' )\n\t\t\t\t: __( 'Go to the Dashboard' ),\n\t\t\tonClick: !! backPath\n\t\t\t\t? () => {\n\t\t\t\t\t\thistory.navigate( backPath );\n\t\t\t\t\t\tnavigate( 'back' );\n\t\t\t\t }\n\t\t\t\t: undefined,\n\t\t};\n\n\t\treturn (\n\t\t\t<div className=\"edit-site-site-hub\">\n\t\t\t\t<Button\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\tref={ ref }\n\t\t\t\t\tclassName=\"edit-site-site-hub__back-button\"\n\t\t\t\t\ticon={ isRTL() ? chevronRight : chevronLeft }\n\t\t\t\t\t{ ...backButtonProps }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t} )\n);\n"],
5
+ "mappings": ";AAGA,SAAS,iBAAiB;AAC1B,SAAS,cAAc;AACvB,SAAS,IAAI,aAAa;AAC1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jB,IACA;AAAA,IACJ;AAEA,WACC,oBAAC,SAAI,WAAU,sBACd;AAAA,MAAC;AAAA;AAAA,QACA,MAAK;AAAA,QACL;AAAA,QACA,WAAU;AAAA,QACV,MAAO,MAAM,IAAI,eAAe;AAAA,QAC9B,GAAG;AAAA;AAAA,IACN,GACD;AAAA,EAEF,CAAE;AACH;",
6
6
  "names": []
7
7
  }
@@ -59,7 +59,9 @@ function initializeEditor(id, settings) {
59
59
  showListViewByDefault: false,
60
60
  enableChoosePatternModal: true,
61
61
  showCollaborationCursor: false,
62
- showCollaborationNotifications: true
62
+ showCollaborationJoinNotifications: true,
63
+ showCollaborationLeaveNotifications: true,
64
+ showCollaborationPostSaveNotifications: true
63
65
  });
64
66
  if (window.__clientSideMediaProcessing) {
65
67
  dispatch(preferencesStore).setDefaults("core/media", {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/index.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalGetCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport { dispatch } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { createRoot, StrictMode } from '@wordpress/element';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from './store';\nimport { unlock } from './lock-unlock';\nimport App from './components/app';\n\nconst { registerCoreBlockBindingsSources } = unlock( editorPrivateApis );\n\n/**\n * Initializes the site editor screen.\n *\n * @param {string} id ID of the root element to render the screen in.\n * @param {Object} settings Editor settings.\n */\nexport function initializeEditor( id, settings ) {\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\tconst coreBlocks = __experimentalGetCoreBlocks().filter(\n\t\t( { name } ) => name !== 'core/freeform'\n\t);\n\tregisterCoreBlocks( coreBlocks );\n\tregisterCoreBlockBindingsSources();\n\tdispatch( blocksStore ).setFreeformFallbackBlockName( 'core/html' );\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: true,\n\t\t} );\n\t}\n\n\t// We dispatch actions and update the store synchronously before rendering\n\t// so that we won't trigger unnecessary re-renders with useEffect.\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-site', {\n\t\twelcomeGuide: true,\n\t\twelcomeGuideStyles: true,\n\t\twelcomeGuidePage: true,\n\t\twelcomeGuideTemplate: true,\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\tallowRightClickOverrides: true,\n\t\tdistractionFree: false,\n\t\teditorMode: 'visual',\n\t\teditorTool: 'edit',\n\t\tfixedToolbar: false,\n\t\tfocusMode: false,\n\t\tinactivePanels: [],\n\t\tkeepCaretInsideBlock: false,\n\t\topenPanels: [ 'post-status' ],\n\t\tshowBlockBreadcrumbs: true,\n\t\tshowListViewByDefault: false,\n\t\tenableChoosePatternModal: true,\n\t\tshowCollaborationCursor: false,\n\t\tshowCollaborationNotifications: true,\n\t} );\n\n\tif ( window.__clientSideMediaProcessing ) {\n\t\tdispatch( preferencesStore ).setDefaults( 'core/media', {\n\t\t\trequireApproval: true,\n\t\t\toptimizeOnUpload: true,\n\t\t} );\n\t}\n\n\tdispatch( editSiteStore ).updateSettings( settings );\n\n\t// Prevent the default browser action for files dropped outside of dropzones.\n\twindow.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );\n\twindow.addEventListener( 'drop', ( e ) => e.preventDefault(), false );\n\n\troot.render(\n\t\t<StrictMode>\n\t\t\t<App />\n\t\t</StrictMode>\n\t);\n\n\treturn root;\n}\n\nexport function reinitializeEditor() {\n\tdeprecated( 'wp.editSite.reinitializeEditor', {\n\t\tsince: '6.2',\n\t\tversion: '6.3',\n\t} );\n}\n\nexport { default as PluginTemplateSettingPanel } from './components/plugin-template-setting-panel';\nexport { store } from './store';\nexport * from './deprecated';\n"],
5
- "mappings": ";AAGA,SAAS,SAAS,mBAAmB;AACrC;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,gBAAgB;AACzB,OAAO,gBAAgB;AACvB,SAAS,YAAY,kBAAkB;AACvC,SAAS,eAAe,yBAAyB;AACjD,SAAS,SAAS,wBAAwB;AAC1C;AAAA,EACC;AAAA,EACA;AAAA,OACM;AAKP,SAAS,SAAS,qBAAqB;AACvC,SAAS,cAAc;AACvB,OAAO,SAAS;AAoFhB,SAAoB,WAAXA,gBAA6C;AACtD,SAAS,aAAa;AACtB,cAAc;AAhBX;AApEH,IAAM,EAAE,iCAAiC,IAAI,OAAQ,iBAAkB;AAQhE,SAAS,iBAAkB,IAAI,UAAW;AAChD,QAAM,SAAS,SAAS,eAAgB,EAAG;AAC3C,QAAM,OAAO,WAAY,MAAO;AAEhC,WAAU,WAAY,EAAE,wBAAwB;AAChD,QAAM,aAAa,4BAA4B,EAAE;AAAA,IAChD,CAAE,EAAE,KAAK,MAAO,SAAS;AAAA,EAC1B;AACA,qBAAoB,UAAW;AAC/B,mCAAiC;AACjC,WAAU,WAAY,EAAE,6BAA8B,WAAY;AAClE,4BAA2B,EAAE,UAAU,MAAM,CAAE;AAC/C,2BAA0B,EAAE,UAAU,MAAM,CAAE;AAC9C,MAAK,WAAW,qBAAsB;AACrC,iDAA8C;AAAA,MAC7C,iBAAiB;AAAA,IAClB,CAAE;AAAA,EACH;AAIA,WAAU,gBAAiB,EAAE,YAAa,kBAAkB;AAAA,IAC3D,cAAc;AAAA,IACd,oBAAoB;AAAA,IACpB,kBAAkB;AAAA,IAClB,sBAAsB;AAAA,EACvB,CAAE;AAEF,WAAU,gBAAiB,EAAE,YAAa,QAAQ;AAAA,IACjD,0BAA0B;AAAA,IAC1B,iBAAiB;AAAA,IACjB,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,WAAW;AAAA,IACX,gBAAgB,CAAC;AAAA,IACjB,sBAAsB;AAAA,IACtB,YAAY,CAAE,aAAc;AAAA,IAC5B,sBAAsB;AAAA,IACtB,uBAAuB;AAAA,IACvB,0BAA0B;AAAA,IAC1B,yBAAyB;AAAA,IACzB,gCAAgC;AAAA,EACjC,CAAE;AAEF,MAAK,OAAO,6BAA8B;AACzC,aAAU,gBAAiB,EAAE,YAAa,cAAc;AAAA,MACvD,iBAAiB;AAAA,MACjB,kBAAkB;AAAA,IACnB,CAAE;AAAA,EACH;AAEA,WAAU,aAAc,EAAE,eAAgB,QAAS;AAGnD,SAAO,iBAAkB,YAAY,CAAE,MAAO,EAAE,eAAe,GAAG,KAAM;AACxE,SAAO,iBAAkB,QAAQ,CAAE,MAAO,EAAE,eAAe,GAAG,KAAM;AAEpE,OAAK;AAAA,IACJ,oBAAC,cACA,8BAAC,OAAI,GACN;AAAA,EACD;AAEA,SAAO;AACR;AAEO,SAAS,qBAAqB;AACpC,aAAY,kCAAkC;AAAA,IAC7C,OAAO;AAAA,IACP,SAAS;AAAA,EACV,CAAE;AACH;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalGetCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport { dispatch } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { createRoot, StrictMode } from '@wordpress/element';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from './store';\nimport { unlock } from './lock-unlock';\nimport App from './components/app';\n\nconst { registerCoreBlockBindingsSources } = unlock( editorPrivateApis );\n\n/**\n * Initializes the site editor screen.\n *\n * @param {string} id ID of the root element to render the screen in.\n * @param {Object} settings Editor settings.\n */\nexport function initializeEditor( id, settings ) {\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\tconst coreBlocks = __experimentalGetCoreBlocks().filter(\n\t\t( { name } ) => name !== 'core/freeform'\n\t);\n\tregisterCoreBlocks( coreBlocks );\n\tregisterCoreBlockBindingsSources();\n\tdispatch( blocksStore ).setFreeformFallbackBlockName( 'core/html' );\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: true,\n\t\t} );\n\t}\n\n\t// We dispatch actions and update the store synchronously before rendering\n\t// so that we won't trigger unnecessary re-renders with useEffect.\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-site', {\n\t\twelcomeGuide: true,\n\t\twelcomeGuideStyles: true,\n\t\twelcomeGuidePage: true,\n\t\twelcomeGuideTemplate: true,\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\tallowRightClickOverrides: true,\n\t\tdistractionFree: false,\n\t\teditorMode: 'visual',\n\t\teditorTool: 'edit',\n\t\tfixedToolbar: false,\n\t\tfocusMode: false,\n\t\tinactivePanels: [],\n\t\tkeepCaretInsideBlock: false,\n\t\topenPanels: [ 'post-status' ],\n\t\tshowBlockBreadcrumbs: true,\n\t\tshowListViewByDefault: false,\n\t\tenableChoosePatternModal: true,\n\t\tshowCollaborationCursor: false,\n\t\tshowCollaborationJoinNotifications: true,\n\t\tshowCollaborationLeaveNotifications: true,\n\t\tshowCollaborationPostSaveNotifications: true,\n\t} );\n\n\tif ( window.__clientSideMediaProcessing ) {\n\t\tdispatch( preferencesStore ).setDefaults( 'core/media', {\n\t\t\trequireApproval: true,\n\t\t\toptimizeOnUpload: true,\n\t\t} );\n\t}\n\n\tdispatch( editSiteStore ).updateSettings( settings );\n\n\t// Prevent the default browser action for files dropped outside of dropzones.\n\twindow.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );\n\twindow.addEventListener( 'drop', ( e ) => e.preventDefault(), false );\n\n\troot.render(\n\t\t<StrictMode>\n\t\t\t<App />\n\t\t</StrictMode>\n\t);\n\n\treturn root;\n}\n\nexport function reinitializeEditor() {\n\tdeprecated( 'wp.editSite.reinitializeEditor', {\n\t\tsince: '6.2',\n\t\tversion: '6.3',\n\t} );\n}\n\nexport { default as PluginTemplateSettingPanel } from './components/plugin-template-setting-panel';\nexport { store } from './store';\nexport * from './deprecated';\n"],
5
+ "mappings": ";AAGA,SAAS,SAAS,mBAAmB;AACrC;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,gBAAgB;AACzB,OAAO,gBAAgB;AACvB,SAAS,YAAY,kBAAkB;AACvC,SAAS,eAAe,yBAAyB;AACjD,SAAS,SAAS,wBAAwB;AAC1C;AAAA,EACC;AAAA,EACA;AAAA,OACM;AAKP,SAAS,SAAS,qBAAqB;AACvC,SAAS,cAAc;AACvB,OAAO,SAAS;AAsFhB,SAAoB,WAAXA,gBAA6C;AACtD,SAAS,aAAa;AACtB,cAAc;AAhBX;AAtEH,IAAM,EAAE,iCAAiC,IAAI,OAAQ,iBAAkB;AAQhE,SAAS,iBAAkB,IAAI,UAAW;AAChD,QAAM,SAAS,SAAS,eAAgB,EAAG;AAC3C,QAAM,OAAO,WAAY,MAAO;AAEhC,WAAU,WAAY,EAAE,wBAAwB;AAChD,QAAM,aAAa,4BAA4B,EAAE;AAAA,IAChD,CAAE,EAAE,KAAK,MAAO,SAAS;AAAA,EAC1B;AACA,qBAAoB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