PluginProbe
Gutenberg / trunk
Gutenberg vtrunk
24.1.0 24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 All 404 releases
← All changes | build/scripts/edit-widgets/index.js +12877 -771 23.1.0 → trunk View file →
@@ -1,4 +1,5 @@
1 +(function() {
1 2 var wp;
2 3 (wp ||= {}).editWidgets = (() => {
3 4 var __create = Object.create;
4 5 var __defProp = Object.defineProperty;
@@ -156,8 +157,177 @@
156 157 module.exports = window.React;
157 158 }
158 159 });
159 160
161 + // vendor-external:react-dom
162 + var require_react_dom = __commonJS({
163 + "vendor-external:react-dom"(exports, module) {
164 + module.exports = window.ReactDOM;
165 + }
166 + });
167 +
168 + // node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
169 + var require_use_sync_external_store_shim_development = __commonJS({
170 + "node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js"(exports) {
171 + "use strict";
172 + (function() {
173 + function is(x, y) {
174 + return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
175 + }
176 + function useSyncExternalStore$2(subscribe, getSnapshot) {
177 + didWarnOld18Alpha || void 0 === React59.startTransition || (didWarnOld18Alpha = true, console.error(
178 + "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
179 + ));
180 + var value = getSnapshot();
181 + if (!didWarnUncachedGetSnapshot) {
182 + var cachedValue = getSnapshot();
183 + objectIs(value, cachedValue) || (console.error(
184 + "The result of getSnapshot should be cached to avoid an infinite loop"
185 + ), didWarnUncachedGetSnapshot = true);
186 + }
187 + cachedValue = useState21({
188 + inst: { value, getSnapshot }
189 + });
190 + var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
191 + useLayoutEffect4(
192 + function() {
193 + inst.value = value;
194 + inst.getSnapshot = getSnapshot;
195 + checkIfSnapshotChanged(inst) && forceUpdate({ inst });
196 + },
197 + [subscribe, value, getSnapshot]
198 + );
199 + useEffect26(
200 + function() {
201 + checkIfSnapshotChanged(inst) && forceUpdate({ inst });
202 + return subscribe(function() {
203 + checkIfSnapshotChanged(inst) && forceUpdate({ inst });
204 + });
205 + },
206 + [subscribe]
207 + );
208 + useDebugValue2(value);
209 + return value;
210 + }
211 + function checkIfSnapshotChanged(inst) {
212 + var latestGetSnapshot = inst.getSnapshot;
213 + inst = inst.value;
214 + try {
215 + var nextValue = latestGetSnapshot();
216 + return !objectIs(inst, nextValue);
217 + } catch (error2) {
218 + return true;
219 + }
220 + }
221 + function useSyncExternalStore$1(subscribe, getSnapshot) {
222 + return getSnapshot();
223 + }
224 + "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
225 + var React59 = require_react(), objectIs = "function" === typeof Object.is ? Object.is : is, useState21 = React59.useState, useEffect26 = React59.useEffect, useLayoutEffect4 = React59.useLayoutEffect, useDebugValue2 = React59.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
226 + exports.useSyncExternalStore = void 0 !== React59.useSyncExternalStore ? React59.useSyncExternalStore : shim;
227 + "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
228 + })();
229 + }
230 + });
231 +
232 + // node_modules/use-sync-external-store/shim/index.js
233 + var require_shim = __commonJS({
234 + "node_modules/use-sync-external-store/shim/index.js"(exports, module) {
235 + "use strict";
236 + if (false) {
237 + module.exports = null;
238 + } else {
239 + module.exports = require_use_sync_external_store_shim_development();
240 + }
241 + }
242 + });
243 +
244 + // node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js
245 + var require_with_selector_development = __commonJS({
246 + "node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js"(exports) {
247 + "use strict";
248 + (function() {
249 + function is(x, y) {
250 + return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
251 + }
252 + "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
253 + var React59 = require_react(), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore3 = shim.useSyncExternalStore, useRef27 = React59.useRef, useEffect26 = React59.useEffect, useMemo24 = React59.useMemo, useDebugValue2 = React59.useDebugValue;
254 + exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
255 + var instRef = useRef27(null);
256 + if (null === instRef.current) {
257 + var inst = { hasValue: false, value: null };
258 + instRef.current = inst;
259 + } else inst = instRef.current;
260 + instRef = useMemo24(
261 + function() {
262 + function memoizedSelector(nextSnapshot) {
263 + if (!hasMemo) {
264 + hasMemo = true;
265 + memoizedSnapshot = nextSnapshot;
266 + nextSnapshot = selector(nextSnapshot);
267 + if (void 0 !== isEqual && inst.hasValue) {
268 + var currentSelection = inst.value;
269 + if (isEqual(currentSelection, nextSnapshot))
270 + return memoizedSelection = currentSelection;
271 + }
272 + return memoizedSelection = nextSnapshot;
273 + }
274 + currentSelection = memoizedSelection;
275 + if (objectIs(memoizedSnapshot, nextSnapshot))
276 + return currentSelection;
277 + var nextSelection = selector(nextSnapshot);
278 + if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
279 + return memoizedSnapshot = nextSnapshot, currentSelection;
280 + memoizedSnapshot = nextSnapshot;
281 + return memoizedSelection = nextSelection;
282 + }
283 + var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
284 + return [
285 + function() {
286 + return memoizedSelector(getSnapshot());
287 + },
288 + null === maybeGetServerSnapshot ? void 0 : function() {
289 + return memoizedSelector(maybeGetServerSnapshot());
290 + }
291 + ];
292 + },
293 + [getSnapshot, getServerSnapshot, selector, isEqual]
294 + );
295 + var value = useSyncExternalStore3(subscribe, instRef[0], instRef[1]);
296 + useEffect26(
297 + function() {
298 + inst.hasValue = true;
299 + inst.value = value;
300 + },
301 + [value]
302 + );
303 + useDebugValue2(value);
304 + return value;
305 + };
306 + "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
307 + })();
308 + }
309 + });
310 +
311 + // node_modules/use-sync-external-store/shim/with-selector.js
312 + var require_with_selector = __commonJS({
313 + "node_modules/use-sync-external-store/shim/with-selector.js"(exports, module) {
314 + "use strict";
315 + if (false) {
316 + module.exports = null;
317 + } else {
318 + module.exports = require_with_selector_development();
319 + }
320 + }
321 + });
322 +
323 + // package-external:@wordpress/theme
324 + var require_theme = __commonJS({
325 + "package-external:@wordpress/theme"(exports, module) {
326 + module.exports = window.wp.theme;
327 + }
328 + });
329 +
160 330 // package-external:@wordpress/private-apis
161 331 var require_private_apis = __commonJS({
162 332 "package-external:@wordpress/private-apis"(exports, module) {
163 333 module.exports = window.wp.privateApis;
@@ -163,8 +333,15 @@
163 333 module.exports = window.wp.privateApis;
164 334 }
165 335 });
166 336
337 + // package-external:@wordpress/a11y
338 + var require_a11y = __commonJS({
339 + "package-external:@wordpress/a11y"(exports, module) {
340 + module.exports = window.wp.a11y;
341 + }
342 + });
343 +
167 344 // package-external:@wordpress/block-editor
168 345 var require_block_editor = __commonJS({
169 346 "package-external:@wordpress/block-editor"(exports, module) {
170 347 module.exports = window.wp.blockEditor;
@@ -228,12 +405,12 @@
228 405 reinitializeEditor: () => reinitializeEditor,
229 406 store: () => store2
230 407 });
231 408 var import_blocks3 = __toESM(require_blocks(), 1);
232 - var import_data32 = __toESM(require_data(), 1);
409 + var import_data33 = __toESM(require_data(), 1);
233 410 var import_deprecated6 = __toESM(require_deprecated(), 1);
234 - var import_element26 = __toESM(require_element(), 1);
235 - var import_block_library2 = __toESM(require_block_library(), 1);
411 + var import_element70 = __toESM(require_element(), 1);
412 + var import_block_library = __toESM(require_block_library(), 1);
236 413 var import_core_data12 = __toESM(require_core_data(), 1);
237 414 var import_widgets5 = __toESM(require_widgets(), 1);
238 415 var import_preferences10 = __toESM(require_preferences(), 1);
239 416
@@ -330,9 +507,9 @@
330 507 setWidgetAreasOpenState: () => setWidgetAreasOpenState,
331 508 setWidgetIdForClientId: () => setWidgetIdForClientId,
332 509 unlockWidgetSaving: () => unlockWidgetSaving
333 510 });
334 - var import_i18n3 = __toESM(require_i18n(), 1);
511 + var import_i18n8 = __toESM(require_i18n(), 1);
335 512 var import_notices = __toESM(require_notices(), 1);
336 513
337 514 // node_modules/clsx/dist/clsx.mjs
338 515 function r(e) {
@@ -350,82 +527,117 @@
350 527 }
351 528 var clsx_default = clsx;
352 529
353 530 // packages/interface/build-module/components/complementary-area/index.mjs
354 - var import_components5 = __toESM(require_components(), 1);
531 + var import_components4 = __toESM(require_components(), 1);
355 532 var import_data6 = __toESM(require_data(), 1);
356 533 var import_i18n = __toESM(require_i18n(), 1);
357 534
358 - // packages/icons/build-module/library/block-default.mjs
535 + // packages/icons/build-module/library/caution.mjs
359 536 var import_primitives = __toESM(require_primitives(), 1);
360 537 var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
361 - var block_default_default = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Path, { d: "M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z" }) });
538 + var caution_default = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Path, { d: "M12 8L12 13M12 14.5L12 16M4.75 12C4.75 7.99593 7.99594 4.75 12 4.75C16.0041 4.75 19.25 7.99594 19.25 12C19.25 16.0041 16.0041 19.25 12 19.25C7.99594 19.25 4.75 16.0041 4.75 12Z", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" }) });
362 539
363 540 // packages/icons/build-module/library/check.mjs
364 541 var import_primitives2 = __toESM(require_primitives(), 1);
365 542 var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
366 - var check_default = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.Path, { d: "M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z" }) });
543 + var check_default = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.Path, { d: "M7 12L10 15L17 8", vectorEffect: "non-scaling-stroke" }) });
367 544
368 - // packages/icons/build-module/library/close-small.mjs
545 + // packages/icons/build-module/library/chevron-down.mjs
369 546 var import_primitives3 = __toESM(require_primitives(), 1);
370 547 var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
371 - var close_small_default = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.Path, { d: "M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z" }) });
548 + var chevron_down_default = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.Path, { d: "M7 11L12 15L17 11", vectorEffect: "non-scaling-stroke" }) });
372 549
373 - // packages/icons/build-module/library/drawer-left.mjs
550 + // packages/icons/build-module/library/close-small.mjs
374 551 var import_primitives4 = __toESM(require_primitives(), 1);
375 552 var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
376 - var drawer_left_default = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM8.5 18.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h2.5v13zm10-.5c0 .3-.2.5-.5.5h-8v-13h8c.3 0 .5.2.5.5v12z" }) });
553 + var close_small_default = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.Path, { d: "M7.75 16.25L16.25 7.75M16.25 16.25L7.75 7.75", vectorEffect: "non-scaling-stroke" }) });
377 554
378 - // packages/icons/build-module/library/drawer-right.mjs
555 + // packages/icons/build-module/library/drawer-left.mjs
379 556 var import_primitives5 = __toESM(require_primitives(), 1);
380 557 var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
381 - var drawer_right_default = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4 14.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h8v13zm4.5-.5c0 .3-.2.5-.5.5h-2.5v-13H18c.3 0 .5.2.5.5v12z" }) });
558 + var drawer_left_default = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.Path, { d: "M9.75 4.75H6C5.30964 4.75 4.75 5.30964 4.75 6V18C4.75 18.6904 5.30964 19.25 6 19.25H9.75M9.75 4.75H18C18.6904 4.75 19.25 5.30964 19.25 6V18C19.25 18.6904 18.6904 19.25 18 19.25H9.75M9.75 4.75V19.25", vectorEffect: "non-scaling-stroke" }) });
382 559
383 - // packages/icons/build-module/library/external.mjs
560 + // packages/icons/build-module/library/drawer-right.mjs
384 561 var import_primitives6 = __toESM(require_primitives(), 1);
385 562 var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
386 - var external_default = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.Path, { d: "M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z" }) });
563 + var drawer_right_default = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.Path, { d: "M14.25 19.25L18 19.25C18.6904 19.25 19.25 18.6904 19.25 18L19.25 6C19.25 5.30964 18.6904 4.75 18 4.75L14.25 4.75M14.25 19.25L6 19.25C5.30964 19.25 4.75 18.6904 4.75 18L4.75 6C4.75 5.30964 5.30965 4.75 6 4.75L14.25 4.75M14.25 19.25L14.25 4.75", vectorEffect: "non-scaling-stroke" }) });
387 564
388 - // packages/icons/build-module/library/list-view.mjs
565 + // packages/icons/build-module/library/error.mjs
389 566 var import_primitives7 = __toESM(require_primitives(), 1);
390 567 var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
391 - var list_view_default = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.Path, { d: "M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z" }) });
568 + var error_default = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.Path, { d: "M12 9L12 14M12 15.5V17M11.1284 5.04947L3.83827 18.0097C3.46331 18.6763 3.94502 19.5 4.70985 19.5H19.2902C20.055 19.5 20.5367 18.6763 20.1617 18.0097L12.8716 5.04947C12.4893 4.36982 11.5107 4.36982 11.1284 5.04947Z", vectorEffect: "non-scaling-stroke" }) });
392 569
393 - // packages/icons/build-module/library/more-vertical.mjs
570 + // packages/icons/build-module/library/external.mjs
394 571 var import_primitives8 = __toESM(require_primitives(), 1);
395 572 var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
396 - var more_vertical_default = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.Path, { d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z" }) });
573 + var external_default = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.Path, { d: "M9.5 6.25H6.5C5.80964 6.25 5.25 6.80964 5.25 7.5V17.5C5.25 18.1904 5.80964 18.75 6.5 18.75H16.5C17.1904 18.75 17.75 18.1904 17.75 17.5V14.5M11.5 12.5L18.75 5.25M12.5 5.25H18.75V11.5", vectorEffect: "non-scaling-stroke" }) });
397 574
398 - // packages/icons/build-module/library/plus.mjs
575 + // packages/icons/build-module/library/info.mjs
399 576 var import_primitives9 = __toESM(require_primitives(), 1);
400 577 var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
401 - var plus_default = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives9.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives9.Path, { d: "M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z" }) });
578 + var info_default = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives9.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives9.Path, { d: "M12 16V11M12 9.5V8M19.25 12C19.25 16.0041 16.0041 19.25 12 19.25C7.99594 19.25 4.75 16.0041 4.75 12C4.75 7.99594 7.99594 4.75 12 4.75C16.0041 4.75 19.25 7.99594 19.25 12Z", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" }) });
402 579
403 - // packages/icons/build-module/library/redo.mjs
580 + // packages/icons/build-module/library/layout.mjs
404 581 var import_primitives10 = __toESM(require_primitives(), 1);
405 582 var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
406 - var redo_default = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives10.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives10.Path, { d: "M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z" }) });
583 + var layout_default = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives10.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives10.Path, { d: "M9.75 19.25H18C18.6904 19.25 19.25 18.6904 19.25 18V9.75M9.75 19.25H6C5.30964 19.25 4.75 18.6904 4.75 18V9.75M9.75 19.25V9.75M19.25 9.75V6C19.25 5.30964 18.6904 4.75 18 4.75H6C5.30964 4.75 4.75 5.30964 4.75 6V9.75M19.25 9.75H9.75M9.75 9.75H4.75", vectorEffect: "non-scaling-stroke" }) });
407 584
408 - // packages/icons/build-module/library/star-empty.mjs
585 + // packages/icons/build-module/library/list-view.mjs
409 586 var import_primitives11 = __toESM(require_primitives(), 1);
410 587 var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
411 - var star_empty_default = /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives11.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives11.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z" }) });
588 + var list_view_default = /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives11.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives11.Path, { d: "M10 17.5H21M6.5 12H17.5M3 6.5H14", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" }) });
412 589
413 - // packages/icons/build-module/library/star-filled.mjs
590 + // packages/icons/build-module/library/more-vertical.mjs
414 591 var import_primitives12 = __toESM(require_primitives(), 1);
415 592 var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
416 - var star_filled_default = /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives12.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives12.Path, { d: "M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z" }) });
593 + var more_vertical_default = /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_primitives12.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: [
594 + /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives12.Path, { d: "M11.75 18.25L12.25 18.25L12.25 17.75L11.75 17.75L11.75 18.25Z", fill: "currentColor", stroke: "none" }),
595 + /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives12.Path, { d: "M11.75 12.25L12.25 12.25L12.25 11.75L11.75 11.75L11.75 12.25Z", fill: "currentColor", stroke: "none" }),
596 + /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives12.Path, { d: "M11.75 6.25L12.25 6.25L12.25 5.75L11.75 5.75L11.75 6.25Z", fill: "currentColor", stroke: "none" }),
597 + /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives12.Path, { d: "M11.75 18.25L12.25 18.25L12.25 17.75L11.75 17.75L11.75 18.25Z", vectorEffect: "non-scaling-stroke" }),
598 + /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives12.Path, { d: "M11.75 12.25L12.25 12.25L12.25 11.75L11.75 11.75L11.75 12.25Z", vectorEffect: "non-scaling-stroke" }),
599 + /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives12.Path, { d: "M11.75 6.25L12.25 6.25L12.25 5.75L11.75 5.75L11.75 6.25Z", vectorEffect: "non-scaling-stroke" })
600 + ] });
417 601
418 - // packages/icons/build-module/library/undo.mjs
602 + // packages/icons/build-module/library/plus.mjs
419 603 var import_primitives13 = __toESM(require_primitives(), 1);
420 604 var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
421 - var undo_default = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_primitives13.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_primitives13.Path, { d: "M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z" }) });
605 + var plus_default = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_primitives13.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_primitives13.Path, { d: "M12 18V6M18 12H6", vectorEffect: "non-scaling-stroke" }) });
422 606
607 + // packages/icons/build-module/library/published.mjs
608 + var import_primitives14 = __toESM(require_primitives(), 1);
609 + var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
610 + var published_default = /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_primitives14.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: [
611 + /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_primitives14.Path, { d: "M12 19.25C16.0041 19.25 19.25 16.0041 19.25 12C19.25 7.99594 16.0041 4.75 12 4.75C7.99594 4.75 4.75 7.99594 4.75 12C4.75 16.0041 7.99594 19.25 12 19.25Z", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" }),
612 + /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_primitives14.Path, { d: "M9 12L11 14L15 10", vectorEffect: "non-scaling-stroke" })
613 + ] });
614 +
615 + // packages/icons/build-module/library/redo.mjs
616 + var import_primitives15 = __toESM(require_primitives(), 1);
617 + var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
618 + var redo_default = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_primitives15.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_primitives15.Path, { d: "M15 15L18.5 11L15 7M18.5 11H8C5 11 4.75 13.8 4.75 17", vectorEffect: "non-scaling-stroke" }) });
619 +
620 + // packages/icons/build-module/library/star-empty.mjs
621 + var import_primitives16 = __toESM(require_primitives(), 1);
622 + var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
623 + var star_empty_default = /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_primitives16.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_primitives16.Path, { d: "M12 5.71576L13.6106 8.97924C13.7563 9.27438 14.0379 9.47895 14.3636 9.52628L17.965 10.0496L15.359 12.5899C15.1233 12.8196 15.0157 13.1506 15.0714 13.475L15.6866 17.0619L12.4653 15.3684C12.174 15.2152 11.826 15.2152 11.5347 15.3684L8.31341 17.0619L8.92861 13.475C8.98425 13.1506 8.8767 12.8196 8.64102 12.5899L6.03497 10.0496L9.63644 9.52628C9.96215 9.47895 10.2437 9.27438 10.3894 8.97924L12 5.71576Z", vectorEffect: "non-scaling-stroke" }) });
624 +
625 + // packages/icons/build-module/library/star-filled.mjs
626 + var import_primitives17 = __toESM(require_primitives(), 1);
627 + var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
628 + var star_filled_default = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_primitives17.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_primitives17.Path, { d: "M12 5.71576L13.6106 8.97924C13.7563 9.27438 14.0379 9.47895 14.3636 9.52628L17.965 10.0496L15.359 12.5899C15.1233 12.8196 15.0157 13.1506 15.0714 13.475L15.6866 17.0619L12.4653 15.3684C12.174 15.2152 11.826 15.2152 11.5347 15.3684L8.31341 17.0619L8.92861 13.475C8.98425 13.1506 8.8767 12.8196 8.64102 12.5899L6.03497 10.0496L9.63644 9.52628C9.96215 9.47895 10.2437 9.27438 10.3894 8.97924L12 5.71576Z", fill: "currentColor", vectorEffect: "non-scaling-stroke" }) });
629 +
630 + // packages/icons/build-module/library/undo.mjs
631 + var import_primitives18 = __toESM(require_primitives(), 1);
632 + var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
633 + var undo_default = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_primitives18.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_primitives18.Path, { d: "M8.25 15L4.75 11L8.25 7M4.75 11H15.25C18.25 11 18.5 13.8 18.5 17", vectorEffect: "non-scaling-stroke" }) });
634 +
423 635 // packages/interface/build-module/components/complementary-area/index.mjs
424 - var import_element2 = __toESM(require_element(), 1);
636 + var import_element3 = __toESM(require_element(), 1);
425 637 var import_viewport = __toESM(require_viewport(), 1);
426 638 var import_preferences3 = __toESM(require_preferences(), 1);
427 - var import_compose = __toESM(require_compose(), 1);
639 + var import_compose2 = __toESM(require_compose(), 1);
428 640 var import_plugins2 = __toESM(require_plugins(), 1);
429 641
430 642 // packages/interface/build-module/components/complementary-area-toggle/index.mjs
431 643 var import_components = __toESM(require_components(), 1);
@@ -624,12 +836,11 @@
624 836 var isItemPinned = (0, import_data2.createRegistrySelector)(
625 837 (select) => (state, scope, item) => {
626 838 scope = normalizeComplementaryAreaScope(scope);
627 839 item = normalizeComplementaryAreaName(scope, item);
628 - const pinnedItems = select(import_preferences2.store).get(
629 - scope,
630 - "pinnedItems"
631 - );
840 + const pinnedItems = select(
841 + import_preferences2.store
842 + ).get(scope, "pinnedItems");
632 843 return pinnedItems?.[item] ?? true;
633 844 }
634 845 );
635 846 var isFeatureActive = (0, import_data2.createRegistrySelector)(
@@ -697,9 +908,9 @@
697 908 });
698 909 (0, import_data4.register)(store);
699 910
700 911 // packages/interface/build-module/components/complementary-area-toggle/index.mjs
701 - var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
912 + var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
702 913 function roleSupportsCheckedState(role) {
703 914 return [
704 915 "checkbox",
705 916 "option",
@@ -728,9 +939,9 @@
728 939 (select) => select(store).getActiveComplementaryArea(scope) === identifier,
729 940 [identifier, scope]
730 941 );
731 942 const { enableComplementaryArea: enableComplementaryArea2, disableComplementaryArea: disableComplementaryArea2 } = (0, import_data5.useDispatch)(store);
732 - return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
943 + return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
733 944 ComponentToUse,
734 945 {
735 946 icon: selectedIcon && isSelected ? selectedIcon : icon,
736 947 "aria-controls": identifier.replace("/", ":"),
@@ -748,16 +959,16 @@
748 959 );
749 960 }
750 961
751 962 // packages/interface/build-module/components/complementary-area-header/index.mjs
752 - var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
963 + var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
753 964 var ComplementaryAreaHeader = ({
754 965 children,
755 966 className,
756 967 toggleButtonProps
757 968 }) => {
758 - const toggleButton = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ComplementaryAreaToggle, { icon: close_small_default, ...toggleButtonProps });
759 - return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
969 + const toggleButton = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ComplementaryAreaToggle, { icon: close_small_default, ...toggleButtonProps });
970 + return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
760 971 "div",
761 972 {
762 973 className: clsx_default(
763 974 "components-panel__header",
@@ -774,66 +985,43 @@
774 985 };
775 986 var complementary_area_header_default = ComplementaryAreaHeader;
776 987
777 988 // packages/interface/build-module/components/complementary-area-more-menu-item/index.mjs
778 - var import_components3 = __toESM(require_components(), 1);
989 + var import_compose = __toESM(require_compose(), 1);
990 + var import_element2 = __toESM(require_element(), 1);
779 991
780 992 // packages/interface/build-module/components/action-item/index.mjs
781 993 var import_components2 = __toESM(require_components(), 1);
782 994 var import_element = __toESM(require_element(), 1);
783 - var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
784 - var noop = () => {
785 - };
995 + var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
786 996 function ActionItemSlot({
787 997 name: name2,
788 998 as: Component2 = import_components2.MenuGroup,
789 999 fillProps = {},
790 - bubblesVirtually,
1000 + children,
791 1001 ...props
792 1002 }) {
793 - return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
794 - import_components2.Slot,
795 - {
796 - name: name2,
797 - bubblesVirtually,
798 - fillProps,
799 - children: (fills) => {
800 - if (!import_element.Children.toArray(fills).length) {
801 - return null;
802 - }
803 - const initializedByPlugins = [];
804 - import_element.Children.forEach(
805 - fills,
806 - ({
807 - props: { __unstableExplicitMenuItem, __unstableTarget }
808 - }) => {
809 - if (__unstableTarget && __unstableExplicitMenuItem) {
810 - initializedByPlugins.push(__unstableTarget);
811 - }
812 - }
813 - );
814 - const children = import_element.Children.map(fills, (child) => {
815 - if (!child.props.__unstableExplicitMenuItem && initializedByPlugins.includes(
816 - child.props.__unstableTarget
817 - )) {
818 - return null;
819 - }
820 - return child;
821 - });
822 - return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Component2, { ...props, children });
823 - }
1003 + return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_components2.Slot, { name: name2, fillProps, children: (fills) => {
1004 + const items = import_element.Children.toArray(fills);
1005 + if (!items.length) {
1006 + return null;
824 1007 }
825 - );
1008 + if (typeof children === "function") {
1009 + return children(items);
1010 + }
1011 + return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Component2, { ...props, children: items });
1012 + } });
826 1013 }
827 - function ActionItem({ name: name2, as: Component2 = import_components2.Button, onClick, ...props }) {
828 - return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_components2.Fill, { name: name2, children: ({ onClick: fpOnClick }) => {
829 - return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1014 + function ActionItem({ name: name2, as, onClick, ...props }) {
1015 + return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_components2.Fill, { name: name2, children: ({ as: slotAs = import_components2.MenuItem, onClick: slotOnClick }) => {
1016 + const Component2 = as ?? slotAs;
1017 + const handlers = [onClick, slotOnClick].filter(Boolean);
1018 + return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
830 1019 Component2,
831 1020 {
832 - onClick: onClick || fpOnClick ? (...args) => {
833 - (onClick || noop)(...args);
834 - (fpOnClick || noop)(...args);
835 - } : void 0,
1021 + onClick: handlers.length ? (...args) => handlers.forEach(
1022 + (handler) => handler(...args)
1023 + ) : void 0,
836 1024 ...props
837 1025 }
838 1026 );
839 1027 } });
@@ -841,40 +1029,29 @@
841 1029 ActionItem.Slot = ActionItemSlot;
842 1030 var action_item_default = ActionItem;
843 1031
844 1032 // packages/interface/build-module/components/complementary-area-more-menu-item/index.mjs
845 - var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
846 - var PluginsMenuItem = ({
847 - // Menu item is marked with unstable prop for backward compatibility.
848 - // They are removed so they don't leak to DOM elements.
849 - // @see https://github.com/WordPress/gutenberg/issues/14457
850 - __unstableExplicitMenuItem,
851 - __unstableTarget,
852 - ...restProps
853 - }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_components3.MenuItem, { ...restProps });
854 - function ComplementaryAreaMoreMenuItem({
1033 + var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
1034 + var menuItems = (0, import_compose.observableMap)();
1035 + function useHasComplementaryAreaMenuItem(scope, target) {
1036 + return !!(0, import_compose.useObservableValue)(menuItems, `${scope}/${target}`);
1037 + }
1038 + function DefaultComplementaryAreaMoreMenuItem({
855 1039 scope,
856 1040 target,
857 - __unstableExplicitMenuItem,
858 1041 ...props
859 1042 }) {
860 - return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1043 + return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
861 1044 ComplementaryAreaToggle,
862 1045 {
863 - as: (toggleProps) => {
864 - return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
865 - action_item_default,
866 - {
867 - __unstableExplicitMenuItem,
868 - __unstableTarget: `${scope}/${target}`,
869 - as: PluginsMenuItem,
870 - name: `${scope}/plugin-more-menu`,
871 - ...toggleProps
872 - }
873 - );
874 - },
1046 + as: (toggleProps) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1047 + action_item_default,
1048 + {
1049 + name: `${scope}/plugin-more-menu`,
1050 + ...toggleProps
1051 + }
1052 + ),
875 1053 role: "menuitemcheckbox",
876 - selectedIcon: check_default,
877 1054 name: target,
878 1055 scope,
879 1056 ...props
880 1057 }
@@ -881,15 +1058,19 @@
881 1058 );
882 1059 }
883 1060
884 1061 // packages/interface/build-module/components/pinned-items/index.mjs
885 - var import_components4 = __toESM(require_components(), 1);
886 - var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
1062 + var import_components3 = __toESM(require_components(), 1);
1063 + var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
887 1064 function PinnedItems({ scope, ...props }) {
888 - return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_components4.Fill, { name: `PinnedItems/${scope}`, ...props });
1065 + return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components3.Fill, { name: `PinnedItems/${scope}`, ...props });
889 1066 }
890 - function PinnedItemsSlot({ scope, className, ...props }) {
891 - return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_components4.Slot, { name: `PinnedItems/${scope}`, ...props, children: (fills) => fills?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1067 + function PinnedItemsSlot({
1068 + scope,
1069 + className,
1070 + ...props
1071 + }) {
1072 + return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components3.Slot, { name: `PinnedItems/${scope}`, ...props, children: (fills) => fills?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
892 1073 "div",
893 1074 {
894 1075 className: clsx_default(
895 1076 className,
@@ -902,19 +1083,38 @@
902 1083 PinnedItems.Slot = PinnedItemsSlot;
903 1084 var pinned_items_default = PinnedItems;
904 1085
905 1086 // packages/interface/build-module/components/complementary-area/index.mjs
906 - var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
1087 + var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
907 1088 var ANIMATION_DURATION = 0.3;
908 - function ComplementaryAreaSlot({ scope, ...props }) {
909 - return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_components5.Slot, { name: `ComplementaryArea/${scope}`, ...props });
1089 + function ComplementaryAreaSlot({
1090 + scope,
1091 + ...props
1092 + }) {
1093 + return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_components4.Slot, { name: `ComplementaryArea/${scope}`, ...props });
910 1094 }
911 - var SIDEBAR_WIDTH = 280;
912 1095 var variants = {
913 - open: { width: SIDEBAR_WIDTH },
914 - closed: { width: 0 },
915 - mobileOpen: { width: "100vw" }
1096 + // `auto` leaves the width to the area's own stylesheet, so it stays in one
1097 + // place. framer-motion measures the element to animate, then restores
1098 + // `auto`.
1099 + open: { width: "auto" },
1100 + // Resolved with the `custom` value passed to `AnimatePresence`, which is
1101 + // the only way an already removed element can be given a fresh transition.
1102 + closed: (transition) => ({
1103 + width: 0,
1104 + transition
1105 + })
916 1106 };
1107 + function renderContainer(render, props) {
1108 + if ((0, import_element3.isValidElement)(render)) {
1109 + return (0, import_element3.cloneElement)(render, {
1110 + ...props,
1111 + className: clsx_default(render.props.className, props.className),
1112 + style: { ...render.props.style, ...props.style }
1113 + });
1114 + }
1115 + return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { ...props });
1116 + }
917 1117 function ComplementaryAreaFill({
918 1118 activeArea,
919 1119 isActive,
920 1120 scope,
@@ -919,51 +1119,42 @@
919 1119 isActive,
920 1120 scope,
921 1121 children,
922 1122 className,
923 - id
1123 + id,
1124 + render
924 1125 }) {
925 - const disableMotion = (0, import_compose.useReducedMotion)();
926 - const isMobileViewport = (0, import_compose.useViewportMatch)("medium", "<");
927 - const previousActiveArea = (0, import_compose.usePrevious)(activeArea);
928 - const previousIsActive = (0, import_compose.usePrevious)(isActive);
929 - const [, setState] = (0, import_element2.useState)({});
930 - (0, import_element2.useEffect)(() => {
931 - setState({});
932 - }, [isActive]);
1126 + const disableMotion = (0, import_compose2.useReducedMotion)();
1127 + const isMobileViewport = (0, import_compose2.useViewportMatch)("medium", "<");
1128 + const previousActiveArea = (0, import_compose2.usePrevious)(activeArea);
1129 + const isSwitchingAreas = !!previousActiveArea && !!activeArea && activeArea !== previousActiveArea;
933 1130 const transition = {
934 1131 type: "tween",
935 - duration: disableMotion || isMobileViewport || !!previousActiveArea && !!activeArea && activeArea !== previousActiveArea ? 0 : ANIMATION_DURATION,
1132 + duration: disableMotion || isMobileViewport || isSwitchingAreas ? 0 : ANIMATION_DURATION,
936 1133 ease: [0.6, 0, 0.4, 1]
937 1134 };
938 - return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_components5.Fill, { name: `ComplementaryArea/${scope}`, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_components5.__unstableAnimatePresence, { initial: false, children: (previousIsActive || isActive) && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
939 - import_components5.__unstableMotion.div,
1135 + return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_components4.Fill, { name: `ComplementaryArea/${scope}`, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_components4.__unstableAnimatePresence, { initial: false, custom: transition, children: isActive && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1136 + import_components4.__unstableMotion.div,
940 1137 {
941 1138 variants,
942 1139 initial: "closed",
943 - animate: isMobileViewport ? "mobileOpen" : "open",
1140 + animate: "open",
944 1141 exit: "closed",
945 1142 transition,
946 1143 className: "interface-complementary-area__fill",
947 - children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
948 - "div",
949 - {
950 - id,
951 - className,
952 - style: {
953 - width: isMobileViewport ? "100vw" : SIDEBAR_WIDTH
954 - },
955 - children
956 - }
957 - )
1144 + children: renderContainer(render, {
1145 + id,
1146 + className,
1147 + children
1148 + })
958 1149 }
959 1150 ) }) });
960 1151 }
961 1152 function useAdjustComplementaryListener(scope, identifier, activeArea, isActive, isSmall) {
962 - const previousIsSmallRef = (0, import_element2.useRef)(false);
963 - const shouldOpenWhenNotSmallRef = (0, import_element2.useRef)(false);
1153 + const previousIsSmallRef = (0, import_element3.useRef)(false);
1154 + const shouldOpenWhenNotSmallRef = (0, import_element3.useRef)(false);
964 1155 const { enableComplementaryArea: enableComplementaryArea2, disableComplementaryArea: disableComplementaryArea2 } = (0, import_data6.useDispatch)(store);
965 - (0, import_element2.useEffect)(() => {
1156 + (0, import_element3.useEffect)(() => {
966 1157 if (isActive && isSmall && !previousIsSmallRef.current) {
967 1158 disableComplementaryArea2(scope);
968 1159 shouldOpenWhenNotSmallRef.current = true;
969 1160 } else if (
@@ -1004,8 +1195,9 @@
1004 1195 headerClassName,
1005 1196 icon: iconProp,
1006 1197 isPinnable = true,
1007 1198 panelClassName,
1199 + render,
1008 1200 scope,
1009 1201 name: name2,
1010 1202 title,
1011 1203 toggleShortcut,
@@ -1013,9 +1205,9 @@
1013 1205 }) {
1014 1206 const context = (0, import_plugins2.usePluginContext)();
1015 1207 const icon = iconProp || context.icon;
1016 1208 const identifier = identifierProp || `${context.name}/${name2}`;
1017 - const [isReady, setIsReady] = (0, import_element2.useState)(false);
1209 + const [isReady, setIsReady] = (0, import_element3.useState)(false);
1018 1210 const {
1019 1211 isLoading,
1020 1212 isActive,
1021 1213 isPinned,
@@ -1043,9 +1235,10 @@
1043 1235 };
1044 1236 },
1045 1237 [identifier, scope]
1046 1238 );
1047 - const isMobileViewport = (0, import_compose.useViewportMatch)("medium", "<");
1239 + const hasMenuItem = useHasComplementaryAreaMenuItem(scope, name2);
1240 + const isMobileViewport = (0, import_compose2.useViewportMatch)("medium", "<");
1048 1241 useAdjustComplementaryListener(
1049 1242 scope,
1050 1243 identifier,
1051 1244 activeArea,
@@ -1057,13 +1250,13 @@
1057 1250 disableComplementaryArea: disableComplementaryArea2,
1058 1251 pinItem: pinItem2,
1059 1252 unpinItem: unpinItem2
1060 1253 } = (0, import_data6.useDispatch)(store);
1061 - (0, import_element2.useEffect)(() => {
1254 + (0, import_element3.useEffect)(() => {
1062 1255 if (isActiveByDefault && activeArea === void 0 && !isSmall) {
1063 1256 enableComplementaryArea2(scope, identifier);
1064 1257 } else if (activeArea === void 0 && isSmall) {
1065 - disableComplementaryArea2(scope, identifier);
1258 + disableComplementaryArea2(scope);
1066 1259 }
1067 1260 setIsReady(true);
1068 1261 }, [
1069 1262 activeArea,
@@ -1076,10 +1269,10 @@
1076 1269 ]);
1077 1270 if (!isReady) {
1078 1271 return;
1079 1272 }
1080 - return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
1081 - isPinnable && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(pinned_items_default, { scope, children: isPinned && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1273 + return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
1274 + isPinnable && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(pinned_items_default, { scope, children: isPinned && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1082 1275 ComplementaryAreaToggle,
1083 1276 {
1084 1277 scope,
1085 1278 identifier,
@@ -1093,10 +1286,10 @@
1093 1286 size: "compact",
1094 1287 shortcut: toggleShortcut
1095 1288 }
1096 1289 ) }),
1097 - name2 && isPinnable && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1098 - ComplementaryAreaMoreMenuItem,
1290 + name2 && isPinnable && !hasMenuItem && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1291 + DefaultComplementaryAreaMoreMenuItem,
1099 1292 {
1100 1293 target: name2,
1101 1294 scope,
1102 1295 icon,
@@ -1103,9 +1296,9 @@
1103 1296 identifier,
1104 1297 children: title
1105 1298 }
1106 1299 ),
1107 - /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
1300 + /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
1108 1301 ComplementaryAreaFill,
1109 1302 {
1110 1303 activeArea,
1111 1304 isActive,
@@ -1111,15 +1304,14 @@
1111 1304 isActive,
1112 1305 className: clsx_default("interface-complementary-area", className),
1113 1306 scope,
1114 1307 id: identifier.replace("/", ":"),
1308 + render,
1115 1309 children: [
1116 - /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1310 + /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1117 1311 complementary_area_header_default,
1118 1312 {
1119 1313 className: headerClassName,
1120 - closeLabel,
1121 - onClose: () => disableComplementaryArea2(scope),
1122 1314 toggleButtonProps: {
1123 1315 label: closeLabel,
1124 1316 size: "compact",
1125 1317 shortcut: toggleShortcut,
@@ -1125,12 +1317,12 @@
1125 1317 shortcut: toggleShortcut,
1126 1318 scope,
1127 1319 identifier
1128 1320 },
1129 - children: header || /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
1130 - /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h2", { className: "interface-complementary-area-header__title", children: title }),
1131 - isPinnable && !isMobileViewport && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1132 - import_components5.Button,
1321 + children: header || /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
1322 + /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h2", { className: "interface-complementary-area-header__title", children: title }),
1323 + isPinnable && !isMobileViewport && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1324 + import_components4.Button,
1133 1325 {
1134 1326 className: "interface-complementary-area__pin-unpin-item",
1135 1327 icon: isPinned ? star_filled_default : star_empty_default,
1136 1328 label: isPinned ? (0, import_i18n.__)("Unpin from toolbar") : (0, import_i18n.__)("Pin to toolbar"),
@@ -1138,9 +1330,8 @@
1138 1330 scope,
1139 1331 identifier
1140 1332 ),
1141 1333 isPressed: isPinned,
1142 - "aria-expanded": isPinned,
1143 1334 size: "compact"
1144 1335 }
1145 1336 )
1146 1337 ] })
@@ -1145,9 +1336,9 @@
1145 1336 )
1146 1337 ] })
1147 1338 }
1148 1339 ),
1149 - /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_components5.Panel, { className: panelClassName, children })
1340 + /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_components4.Panel, { className: panelClassName, children })
1150 1341 ]
1151 1342 }
1152 1343 )
1153 1344 ] });
@@ -1154,13 +1345,109 @@
1154 1345 }
1155 1346 ComplementaryArea.Slot = ComplementaryAreaSlot;
1156 1347 var complementary_area_default = ComplementaryArea;
1157 1348
1158 - // node_modules/@base-ui/utils/esm/useRefWithInit.js
1349 + // node_modules/@base-ui/utils/useControlled.mjs
1159 1350 var React = __toESM(require_react(), 1);
1351 +
1352 + // node_modules/@base-ui/utils/createLogOnce.mjs
1353 + var loggedMessages;
1354 + if (true) {
1355 + loggedMessages = /* @__PURE__ */ new Set();
1356 + }
1357 + function createLogOnce(severity, prefix) {
1358 + return function logOnce(...messages) {
1359 + if (true) {
1360 + const message = messages.join(" ");
1361 + const output = prefix ? `${prefix}: ${message}` : message;
1362 + const key = `${severity}:${output}`;
1363 + if (!loggedMessages.has(key)) {
1364 + loggedMessages.add(key);
1365 + if (severity === "warn") {
1366 + console.warn(output);
1367 + } else {
1368 + console.error(output);
1369 + }
1370 + }
1371 + }
1372 + };
1373 + }
1374 +
1375 + // node_modules/@base-ui/utils/error.mjs
1376 + var error = createLogOnce("error", "Base UI");
1377 +
1378 + // node_modules/@base-ui/utils/useControlled.mjs
1379 + function useControlled({
1380 + controlled,
1381 + default: defaultProp,
1382 + name: name2,
1383 + state = "value"
1384 + }) {
1385 + const {
1386 + current: isControlled
1387 + } = React.useRef(controlled !== void 0);
1388 + const [valueState, setValue] = React.useState(defaultProp);
1389 + const value = isControlled && controlled !== void 0 ? controlled : valueState;
1390 + if (true) {
1391 + React.useEffect(() => {
1392 + if (isControlled !== (controlled !== void 0)) {
1393 + error([`A component is changing the ${isControlled ? "" : "un"}controlled ${state} state of ${name2} to be ${isControlled ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${name2} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join("\n"));
1394 + }
1395 + }, [state, name2, controlled]);
1396 + const {
1397 + current: defaultValue
1398 + } = React.useRef(defaultProp);
1399 + React.useEffect(() => {
1400 + if (!isControlled && serializeToDevModeString(defaultValue) !== serializeToDevModeString(defaultProp)) {
1401 + error([`A component is changing the default ${state} state of an uncontrolled ${name2} after being initialized. To suppress this warning opt to use a controlled ${name2}.`].join("\n"));
1402 + }
1403 + }, [defaultProp]);
1404 + }
1405 + const setValueIfUncontrolled = React.useCallback((newValue) => {
1406 + if (!isControlled) {
1407 + setValue(newValue);
1408 + }
1409 + }, []);
1410 + return [value, setValueIfUncontrolled];
1411 + }
1412 + function serializeToDevModeString(input) {
1413 + let nextId = 0;
1414 + const seen = /* @__PURE__ */ new WeakMap();
1415 + try {
1416 + const result = JSON.stringify(input, function replacer(key, value) {
1417 + if (key === "_owner" && this != null && typeof this === "object" && "$$typeof" in this) {
1418 + return void 0;
1419 + }
1420 + if (typeof value === "bigint") {
1421 + return `__bigint__:${value}`;
1422 + }
1423 + if (value !== null && typeof value === "object") {
1424 + const id = seen.get(value);
1425 + if (id !== void 0) {
1426 + return `__object__:${id}`;
1427 + }
1428 + seen.set(value, nextId);
1429 + nextId += 1;
1430 + }
1431 + return value;
1432 + });
1433 + return result ?? `__top__:${typeof input}`;
1434 + } catch {
1435 + return "__unserializable__";
1436 + }
1437 + }
1438 +
1439 + // node_modules/@base-ui/utils/safeReact.mjs
1440 + var React2 = __toESM(require_react(), 1);
1441 + var SafeReact = {
1442 + ...React2
1443 + };
1444 +
1445 + // node_modules/@base-ui/utils/useRefWithInit.mjs
1446 + var React3 = __toESM(require_react(), 1);
1160 1447 var UNINITIALIZED = {};
1161 1448 function useRefWithInit(init, initArg) {
1162 - const ref = React.useRef(UNINITIALIZED);
1449 + const ref = React3.useRef(UNINITIALIZED);
1163 1450 if (ref.current === UNINITIALIZED) {
1164 1451 ref.current = init(initArg);
1165 1452 }
1166 1453 return ref;
@@ -1165,27 +1452,60 @@
1165 1452 }
1166 1453 return ref;
1167 1454 }
1168 1455
1169 - // node_modules/@base-ui/utils/esm/warn.js
1170 - var set;
1171 - if (true) {
1172 - set = /* @__PURE__ */ new Set();
1456 + // node_modules/@base-ui/utils/useStableCallback.mjs
1457 + var useInsertionEffect = SafeReact.useInsertionEffect;
1458 + var useSafeInsertionEffect = (
1459 + // React 17 doesn't have useInsertionEffect.
1460 + useInsertionEffect && // Preact replaces useInsertionEffect with useLayoutEffect and fires too late.
1461 + useInsertionEffect !== SafeReact.useLayoutEffect ? useInsertionEffect : (fn) => fn()
1462 + );
1463 + function useStableCallback(callback) {
1464 + const stable = useRefWithInit(createStableCallback).current;
1465 + stable.next = callback;
1466 + useSafeInsertionEffect(stable.effect);
1467 + return stable.trampoline;
1173 1468 }
1174 - function warn(...messages) {
1469 + function createStableCallback() {
1470 + const stable = {
1471 + next: void 0,
1472 + callback: assertNotCalled,
1473 + trampoline: (...args) => stable.callback?.(...args),
1474 + effect: () => {
1475 + stable.callback = stable.next;
1476 + }
1477 + };
1478 + return stable;
1479 + }
1480 + function assertNotCalled() {
1175 1481 if (true) {
1176 - const messageKey = messages.join(" ");
1177 - if (!set.has(messageKey)) {
1178 - set.add(messageKey);
1179 - console.warn(`Base UI: ${messageKey}`);
1180 - }
1482 + throw (
1483 + /* minify-error-disabled */
1484 + new Error("Base UI: Cannot call an event handler while rendering.")
1485 + );
1181 1486 }
1182 1487 }
1183 1488
1184 - // node_modules/@base-ui/react/esm/internals/useRenderElement.js
1489 + // node_modules/@base-ui/utils/warn.mjs
1490 + var warn = createLogOnce("warn", "Base UI");
1491 +
1492 + // node_modules/@base-ui/utils/empty.mjs
1493 + function NOOP() {
1494 + }
1495 + var EMPTY_ARRAY = Object.freeze([]);
1496 + var EMPTY_OBJECT = Object.freeze({});
1497 +
1498 + // node_modules/@base-ui/utils/useIsoLayoutEffect.mjs
1185 1499 var React4 = __toESM(require_react(), 1);
1500 + var noop = () => {
1501 + };
1502 + var useIsoLayoutEffect = typeof document !== "undefined" ? React4.useLayoutEffect : noop;
1186 1503
1187 - // node_modules/@base-ui/utils/esm/useMergedRefs.js
1504 + // node_modules/@base-ui/react/internals/useRenderElement.mjs
1505 + var React7 = __toESM(require_react(), 1);
1506 +
1507 + // node_modules/@base-ui/utils/useMergedRefs.mjs
1188 1508 function useMergedRefs(a, b, c, d) {
1189 1509 const forkRef = useRefWithInit(createForkRef).current;
1190 1510 if (didChange(forkRef, a, b, c, d)) {
1191 1511 update(forkRef, [a, b, c, d]);
@@ -1209,9 +1529,9 @@
1209 1529 function didChange(forkRef, a, b, c, d) {
1210 1530 return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d;
1211 1531 }
1212 1532 function didChangeN(forkRef, newRefs) {
1213 - return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index) => ref !== newRefs[index]);
1533 + return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index2) => ref !== newRefs[index2]);
1214 1534 }
1215 1535 function update(forkRef, refs) {
1216 1536 forkRef.refs = refs;
1217 1537 if (refs.every((ref) => ref == null)) {
@@ -1256,9 +1576,9 @@
1256 1576 const cleanupCallback = cleanupCallbacks[i];
1257 1577 if (typeof cleanupCallback === "function") {
1258 1578 cleanupCallback();
1259 1579 } else {
1260 - ref(null);
1580 + void ref(null);
1261 1581 }
1262 1582 break;
1263 1583 }
1264 1584 case "object": {
@@ -1272,21 +1592,21 @@
1272 1592 }
1273 1593 };
1274 1594 }
1275 1595
1276 - // node_modules/@base-ui/utils/esm/getReactElementRef.js
1277 - var React3 = __toESM(require_react(), 1);
1596 + // node_modules/@base-ui/utils/getReactElementRef.mjs
1597 + var React6 = __toESM(require_react(), 1);
1278 1598
1279 - // node_modules/@base-ui/utils/esm/reactVersion.js
1280 - var React2 = __toESM(require_react(), 1);
1281 - var majorVersion = parseInt(React2.version, 10);
1599 + // node_modules/@base-ui/utils/reactVersion.mjs
1600 + var React5 = __toESM(require_react(), 1);
1601 + var majorVersion = parseInt(React5.version, 10);
1282 1602 function isReactVersionAtLeast(reactVersionToCheck) {
1283 1603 return majorVersion >= reactVersionToCheck;
1284 1604 }
1285 1605
1286 - // node_modules/@base-ui/utils/esm/getReactElementRef.js
1606 + // node_modules/@base-ui/utils/getReactElementRef.mjs
1287 1607 function getReactElementRef(element) {
1288 - if (!/* @__PURE__ */ React3.isValidElement(element)) {
1608 + if (!/* @__PURE__ */ React6.isValidElement(element)) {
1289 1609 return null;
1290 1610 }
1291 1611 const reactElement = element;
1292 1612 const propsWithRef = reactElement.props;
@@ -1292,9 +1612,9 @@
1292 1612 const propsWithRef = reactElement.props;
1293 1613 return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null;
1294 1614 }
1295 1615
1296 - // node_modules/@base-ui/utils/esm/mergeObjects.js
1616 + // node_modules/@base-ui/utils/mergeObjects.mjs
1297 1617 function mergeObjects(a, b) {
1298 1618 if (a && !b) {
1299 1619 return a;
1300 1620 }
@@ -1309,13 +1629,9 @@
1309 1629 }
1310 1630 return void 0;
1311 1631 }
1312 1632
1313 - // node_modules/@base-ui/utils/esm/empty.js
1314 - var EMPTY_ARRAY = Object.freeze([]);
1315 - var EMPTY_OBJECT = Object.freeze({});
1316 -
1317 - // node_modules/@base-ui/react/esm/internals/getStateAttributesProps.js
1633 + // node_modules/@base-ui/react/internals/getStateAttributesProps.mjs
1318 1634 function getStateAttributesProps(state, customMapping) {
1319 1635 const props = {};
1320 1636 for (const key in state) {
1321 1637 const value = state[key];
@@ -1334,19 +1650,19 @@
1334 1650 }
1335 1651 return props;
1336 1652 }
1337 1653
1338 - // node_modules/@base-ui/react/esm/utils/resolveClassName.js
1654 + // node_modules/@base-ui/react/utils/resolveClassName.mjs
1339 1655 function resolveClassName(className, state) {
1340 1656 return typeof className === "function" ? className(state) : className;
1341 1657 }
1342 1658
1343 - // node_modules/@base-ui/react/esm/utils/resolveStyle.js
1659 + // node_modules/@base-ui/react/utils/resolveStyle.mjs
1344 1660 function resolveStyle(style, state) {
1345 1661 return typeof style === "function" ? style(state) : style;
1346 1662 }
1347 1663
1348 - // node_modules/@base-ui/react/esm/merge-props/mergeProps.js
1664 + // node_modules/@base-ui/react/merge-props/mergeProps.mjs
1349 1665 var EMPTY_PROPS = {};
1350 1666 function mergeProps(a, b, c, d, e) {
1351 1667 if (!c && !d && !e && !a) {
1352 1668 return createInitialMergedProps(b);
@@ -1499,13 +1815,16 @@
1499 1815 function isSyntheticEvent(event) {
1500 1816 return event != null && typeof event === "object" && "nativeEvent" in event;
1501 1817 }
1502 1818
1503 - // node_modules/@base-ui/react/esm/internals/useRenderElement.js
1819 + // node_modules/@base-ui/react/internals/useRenderElement.mjs
1504 1820 var import_react = __toESM(require_react(), 1);
1505 1821 function useRenderElement(element, componentProps, params = {}) {
1506 - const renderProp = componentProps.render;
1507 - const outProps = useRenderElementProps(componentProps, params);
1822 + let renderProp = componentProps.render;
1823 + if (params.enabled !== false) {
1824 + renderProp = unwrapLazyRenderProp(renderProp);
1825 + }
1826 + const outProps = useRenderElementProps(componentProps, params, renderProp);
1508 1827 if (params.enabled === false) {
1509 1828 return null;
1510 1829 }
1511 1830 const state = params.state ?? EMPTY_OBJECT;
@@ -1510,29 +1829,28 @@
1510 1829 }
1511 1830 const state = params.state ?? EMPTY_OBJECT;
1512 1831 return evaluateRenderProp(element, renderProp, outProps, state);
1513 1832 }
1514 - function useRenderElementProps(componentProps, params = {}) {
1833 + function useRenderElementProps(componentProps, params, renderProp) {
1515 1834 const {
1516 1835 className: classNameProp,
1517 - style: styleProp,
1518 - render: renderProp
1836 + style: styleProp
1519 1837 } = componentProps;
1520 1838 const {
1521 1839 state = EMPTY_OBJECT,
1522 1840 ref,
1523 1841 props,
1524 - stateAttributesMapping,
1842 + stateAttributesMapping: stateAttributesMapping2,
1525 1843 enabled = true
1526 1844 } = params;
1527 1845 const className = enabled ? resolveClassName(classNameProp, state) : void 0;
1528 1846 const style = enabled ? resolveStyle(styleProp, state) : void 0;
1529 - const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping) : EMPTY_OBJECT;
1847 + const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping2) : EMPTY_OBJECT;
1530 1848 const resolvedProps = enabled && props ? resolveRenderFunctionProps(props) : void 0;
1531 1849 const outProps = enabled ? mergeObjects(stateProps, resolvedProps) ?? {} : EMPTY_OBJECT;
1532 1850 if (typeof document !== "undefined") {
1533 1851 if (!enabled) {
1534 - useMergedRefs(null, null);
1852 + void useMergedRefs(null, null);
1535 1853 } else if (Array.isArray(ref)) {
1536 1854 outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);
1537 1855 } else {
1538 1856 outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref);
@@ -1557,8 +1875,15 @@
1557 1875 }
1558 1876 var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
1559 1877 var COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/;
1560 1878 var LOWERCASE_CHARACTER_PATTERN = /[a-z]/;
1879 + function unwrapLazyRenderProp(render) {
1880 + if (render?.$$typeof !== REACT_LAZY_TYPE) {
1881 + return render;
1882 + }
1883 + const unwrapped = React7.Children.toArray(render)[0];
1884 + return /* @__PURE__ */ React7.isValidElement(unwrapped) ? unwrapped : render;
1885 + }
1561 1886 function evaluateRenderProp(element, render, props, state) {
1562 1887 if (render) {
1563 1888 if (typeof render === "function") {
1564 1889 if (true) {
@@ -1567,19 +1892,14 @@
1567 1892 return render(props, state);
1568 1893 }
1569 1894 const mergedProps = mergeProps(props, render.props);
1570 1895 mergedProps.ref = props.ref;
1571 - let newElement = render;
1572 - if (newElement?.$$typeof === REACT_LAZY_TYPE) {
1573 - const children = React4.Children.toArray(render);
1574 - newElement = children[0];
1575 - }
1576 1896 if (true) {
1577 - if (!/* @__PURE__ */ React4.isValidElement(newElement)) {
1897 + if (!/* @__PURE__ */ React7.isValidElement(render)) {
1578 1898 throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.", "A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.", "https://base-ui.com/r/invalid-render-prop"].join("\n"));
1579 1899 }
1580 1900 }
1581 - return /* @__PURE__ */ React4.cloneElement(newElement, mergedProps);
1901 + return /* @__PURE__ */ React7.cloneElement(render, mergedProps);
1582 1902 }
1583 1903 if (element) {
1584 1904 if (typeof element === "string") {
1585 1905 return renderTag(element, props);
@@ -1614,32 +1934,9402 @@
1614 1934 ...props,
1615 1935 key: props.key
1616 1936 });
1617 1937 }
1618 - return /* @__PURE__ */ React4.createElement(Tag, props);
1938 + return /* @__PURE__ */ React7.createElement(Tag, props);
1619 1939 }
1620 1940
1621 - // node_modules/@base-ui/react/esm/use-render/useRender.js
1941 + // node_modules/@base-ui/utils/useId.mjs
1942 + var React8 = __toESM(require_react(), 1);
1943 + var globalId = 0;
1944 + function useGlobalId(idOverride, prefix = "mui") {
1945 + const [defaultId, setDefaultId] = React8.useState(idOverride);
1946 + const id = idOverride || defaultId;
1947 + React8.useEffect(() => {
1948 + if (defaultId == null) {
1949 + globalId += 1;
1950 + setDefaultId(`${prefix}-${globalId}`);
1951 + }
1952 + }, [defaultId, prefix]);
1953 + return id;
1954 + }
1955 + var maybeReactUseId = SafeReact.useId;
1956 + function useId(idOverride, prefix) {
1957 + if (maybeReactUseId !== void 0) {
1958 + const reactId = maybeReactUseId();
1959 + return idOverride ?? (prefix ? `${prefix}-${reactId}` : reactId);
1960 + }
1961 + return useGlobalId(idOverride, prefix);
1962 + }
1963 +
1964 + // node_modules/@base-ui/react/internals/useBaseUiId.mjs
1965 + function useBaseUiId(idOverride) {
1966 + return useId(idOverride, "base-ui");
1967 + }
1968 +
1969 + // node_modules/@base-ui/react/collapsible/root/useCollapsibleRoot.mjs
1970 + var React11 = __toESM(require_react(), 1);
1971 +
1972 + // node_modules/@base-ui/react/internals/reason-parts.mjs
1973 + var reason_parts_exports = {};
1974 + __export(reason_parts_exports, {
1975 + cancelOpen: () => cancelOpen,
1976 + chipRemovePress: () => chipRemovePress,
1977 + clearPress: () => clearPress,
1978 + closePress: () => closePress,
1979 + closeWatcher: () => closeWatcher,
1980 + decrementPress: () => decrementPress,
1981 + disabled: () => disabled,
1982 + drag: () => drag,
1983 + escapeKey: () => escapeKey,
1984 + focusOut: () => focusOut,
1985 + imperativeAction: () => imperativeAction,
1986 + incrementPress: () => incrementPress,
1987 + initial: () => initial,
1988 + inputBlur: () => inputBlur,
1989 + inputChange: () => inputChange,
1990 + inputClear: () => inputClear,
1991 + inputPaste: () => inputPaste,
1992 + inputPress: () => inputPress,
1993 + itemPress: () => itemPress,
1994 + keyboard: () => keyboard,
1995 + linkPress: () => linkPress,
1996 + listNavigation: () => listNavigation,
1997 + missing: () => missing,
1998 + none: () => none,
1999 + outsidePress: () => outsidePress,
2000 + pointer: () => pointer,
2001 + scrub: () => scrub,
2002 + siblingOpen: () => siblingOpen,
2003 + swipe: () => swipe,
2004 + trackPress: () => trackPress,
2005 + triggerFocus: () => triggerFocus,
2006 + triggerHover: () => triggerHover,
2007 + triggerPress: () => triggerPress,
2008 + wheel: () => wheel,
2009 + windowResize: () => windowResize
2010 + });
2011 + var none = "none";
2012 + var triggerPress = "trigger-press";
2013 + var triggerHover = "trigger-hover";
2014 + var triggerFocus = "trigger-focus";
2015 + var outsidePress = "outside-press";
2016 + var itemPress = "item-press";
2017 + var closePress = "close-press";
2018 + var linkPress = "link-press";
2019 + var clearPress = "clear-press";
2020 + var chipRemovePress = "chip-remove-press";
2021 + var trackPress = "track-press";
2022 + var incrementPress = "increment-press";
2023 + var decrementPress = "decrement-press";
2024 + var inputChange = "input-change";
2025 + var inputClear = "input-clear";
2026 + var inputBlur = "input-blur";
2027 + var inputPaste = "input-paste";
2028 + var inputPress = "input-press";
2029 + var focusOut = "focus-out";
2030 + var escapeKey = "escape-key";
2031 + var closeWatcher = "close-watcher";
2032 + var listNavigation = "list-navigation";
2033 + var keyboard = "keyboard";
2034 + var pointer = "pointer";
2035 + var drag = "drag";
2036 + var wheel = "wheel";
2037 + var scrub = "scrub";
2038 + var cancelOpen = "cancel-open";
2039 + var siblingOpen = "sibling-open";
2040 + var disabled = "disabled";
2041 + var missing = "missing";
2042 + var initial = "initial";
2043 + var imperativeAction = "imperative-action";
2044 + var swipe = "swipe";
2045 + var windowResize = "window-resize";
2046 +
2047 + // node_modules/@base-ui/react/internals/createBaseUIEventDetails.mjs
2048 + function createChangeEventDetails(reason, event, trigger, customProperties) {
2049 + let canceled = false;
2050 + let allowPropagation = false;
2051 + const custom = customProperties ?? EMPTY_OBJECT;
2052 + const details = {
2053 + reason,
2054 + event: event ?? new Event("base-ui"),
2055 + cancel() {
2056 + canceled = true;
2057 + },
2058 + allowPropagation() {
2059 + allowPropagation = true;
2060 + },
2061 + get isCanceled() {
2062 + return canceled;
2063 + },
2064 + get isPropagationAllowed() {
2065 + return allowPropagation;
2066 + },
2067 + trigger,
2068 + ...custom
2069 + };
2070 + return details;
2071 + }
2072 +
2073 + // node_modules/@base-ui/react/internals/useTransitionStatus.mjs
2074 + var React10 = __toESM(require_react(), 1);
2075 +
2076 + // node_modules/@base-ui/utils/useOnMount.mjs
2077 + var React9 = __toESM(require_react(), 1);
2078 + function useOnMount(fn) {
2079 + React9.useEffect(fn, EMPTY_ARRAY);
2080 + }
2081 +
2082 + // node_modules/@base-ui/utils/useAnimationFrame.mjs
2083 + var EMPTY = null;
2084 + var LAST_RAF = globalThis.requestAnimationFrame;
2085 + var Scheduler = class {
2086 + /* This implementation uses an array as a backing data-structure for frame callbacks.
2087 + * It allows `O(1)` callback cancelling by inserting a `null` in the array, though it
2088 + * never calls the native `cancelAnimationFrame` if there are no frames left. This can
2089 + * be much more efficient if there is a call pattern that alterns as
2090 + * "request-cancel-request-cancel-…".
2091 + * But in the case of "request-request-…-cancel-cancel-…", it leaves the final animation
2092 + * frame to run anyway. We turn that frame into a `O(1)` no-op via `callbacksCount`. */
2093 + callbacks = [];
2094 + callbacksCount = 0;
2095 + nextId = 1;
2096 + startId = 1;
2097 + isScheduled = false;
2098 + tick = (timestamp) => {
2099 + this.isScheduled = false;
2100 + const currentCallbacks = this.callbacks;
2101 + const currentCallbacksCount = this.callbacksCount;
2102 + this.callbacks = [];
2103 + this.callbacksCount = 0;
2104 + this.startId = this.nextId;
2105 + if (currentCallbacksCount > 0) {
2106 + for (let i = 0; i < currentCallbacks.length; i += 1) {
2107 + currentCallbacks[i]?.(timestamp);
2108 + }
2109 + }
2110 + };
2111 + request(fn) {
2112 + const id = this.nextId;
2113 + this.nextId += 1;
2114 + this.callbacks.push(fn);
2115 + this.callbacksCount += 1;
2116 + const didRAFChange = LAST_RAF !== requestAnimationFrame && (LAST_RAF = requestAnimationFrame, true);
2117 + if (!this.isScheduled || didRAFChange) {
2118 + requestAnimationFrame(this.tick);
2119 + this.isScheduled = true;
2120 + }
2121 + return id;
2122 + }
2123 + cancel(id) {
2124 + const index2 = id - this.startId;
2125 + if (index2 < 0 || index2 >= this.callbacks.length) {
2126 + return;
2127 + }
2128 + if (this.callbacks[index2] === null) {
2129 + return;
2130 + }
2131 + this.callbacks[index2] = null;
2132 + this.callbacksCount -= 1;
2133 + }
2134 + };
2135 + var scheduler = new Scheduler();
2136 + var AnimationFrame = class _AnimationFrame {
2137 + static create() {
2138 + return new _AnimationFrame();
2139 + }
2140 + static request(fn) {
2141 + return scheduler.request(fn);
2142 + }
2143 + static cancel(id) {
2144 + return scheduler.cancel(id);
2145 + }
2146 + currentId = EMPTY;
2147 + /**
2148 + * Executes `fn` after `delay`, clearing any previously scheduled call.
2149 + */
2150 + request(fn) {
2151 + this.cancel();
2152 + this.currentId = scheduler.request(() => {
2153 + this.currentId = EMPTY;
2154 + fn();
2155 + });
2156 + }
2157 + cancel = () => {
2158 + if (this.currentId !== EMPTY) {
2159 + scheduler.cancel(this.currentId);
2160 + this.currentId = EMPTY;
2161 + }
2162 + };
2163 + disposeEffect = () => {
2164 + return this.cancel;
2165 + };
2166 + };
2167 + function useAnimationFrame() {
2168 + const timeout = useRefWithInit(AnimationFrame.create).current;
2169 + useOnMount(timeout.disposeEffect);
2170 + return timeout;
2171 + }
2172 +
2173 + // node_modules/@base-ui/react/internals/useTransitionStatus.mjs
2174 + function useTransitionStatus(open3, enableIdleState = false, deferEndingState = false, animateInitialOpen = false) {
2175 + const [transitionStatus, setTransitionStatus] = React10.useState(open3 && enableIdleState ? "idle" : void 0);
2176 + const [mounted, setMounted] = React10.useState(open3 && !animateInitialOpen);
2177 + if (open3 && !mounted) {
2178 + setMounted(true);
2179 + setTransitionStatus("starting");
2180 + }
2181 + if (!open3 && mounted && transitionStatus !== "ending" && !deferEndingState) {
2182 + setTransitionStatus("ending");
2183 + }
2184 + if (!open3 && !mounted && transitionStatus === "ending") {
2185 + setTransitionStatus(void 0);
2186 + }
2187 + useIsoLayoutEffect(() => {
2188 + if (!open3 && mounted && transitionStatus !== "ending" && deferEndingState) {
2189 + const frame = AnimationFrame.request(() => {
2190 + setTransitionStatus("ending");
2191 + });
2192 + return () => {
2193 + AnimationFrame.cancel(frame);
2194 + };
2195 + }
2196 + return void 0;
2197 + }, [open3, mounted, transitionStatus, deferEndingState]);
2198 + useIsoLayoutEffect(() => {
2199 + if (!open3 || enableIdleState) {
2200 + return void 0;
2201 + }
2202 + const frame = AnimationFrame.request(() => {
2203 + setTransitionStatus(void 0);
2204 + });
2205 + return () => {
2206 + AnimationFrame.cancel(frame);
2207 + };
2208 + }, [enableIdleState, open3]);
2209 + useIsoLayoutEffect(() => {
2210 + if (!open3 || !enableIdleState) {
2211 + return void 0;
2212 + }
2213 + if (open3 && mounted && transitionStatus !== "idle") {
2214 + setTransitionStatus("starting");
2215 + }
2216 + const frame = AnimationFrame.request(() => {
2217 + setTransitionStatus("idle");
2218 + });
2219 + return () => {
2220 + AnimationFrame.cancel(frame);
2221 + };
2222 + }, [enableIdleState, open3, mounted, transitionStatus]);
2223 + return {
2224 + mounted,
2225 + setMounted,
2226 + transitionStatus
2227 + };
2228 + }
2229 +
2230 + // node_modules/@base-ui/react/collapsible/root/useCollapsibleRoot.mjs
2231 + function useCollapsibleRoot(parameters) {
2232 + const {
2233 + open: openParam,
2234 + defaultOpen = false,
2235 + onOpenChange,
2236 + disabled: disabled2
2237 + } = parameters;
2238 + const [open3, setOpen] = useControlled({
2239 + controlled: openParam,
2240 + default: defaultOpen,
2241 + name: "Collapsible",
2242 + state: "open"
2243 + });
2244 + const {
2245 + mounted,
2246 + setMounted,
2247 + transitionStatus
2248 + } = useTransitionStatus(open3, true, true);
2249 + const defaultPanelId = useBaseUiId();
2250 + const [registeredPanelId, setPanelIdState] = React11.useState();
2251 + const panelId = registeredPanelId === null ? void 0 : registeredPanelId ?? defaultPanelId;
2252 + const handleTrigger = useStableCallback((event) => {
2253 + const nextOpen = !open3;
2254 + const eventDetails = createChangeEventDetails(reason_parts_exports.triggerPress, event.nativeEvent);
2255 + onOpenChange(nextOpen, eventDetails);
2256 + if (eventDetails.isCanceled) {
2257 + return;
2258 + }
2259 + setOpen(nextOpen);
2260 + });
2261 + return React11.useMemo(() => ({
2262 + defaultPanelId,
2263 + disabled: disabled2,
2264 + handleTrigger,
2265 + mounted,
2266 + open: open3,
2267 + panelId,
2268 + setMounted,
2269 + setOpen,
2270 + setPanelIdState,
2271 + transitionStatus
2272 + }), [defaultPanelId, disabled2, handleTrigger, mounted, open3, panelId, setMounted, setOpen, setPanelIdState, transitionStatus]);
2273 + }
2274 +
2275 + // node_modules/@base-ui/react/collapsible/root/CollapsibleRootContext.mjs
2276 + var React12 = __toESM(require_react(), 1);
2277 + var CollapsibleRootContext = /* @__PURE__ */ React12.createContext(void 0);
2278 + if (true) CollapsibleRootContext.displayName = "CollapsibleRootContext";
2279 + function useCollapsibleRootContext() {
2280 + const context = React12.useContext(CollapsibleRootContext);
2281 + if (context === void 0) {
2282 + throw new Error(true ? "Base UI: CollapsibleRootContext is missing. Collapsible parts must be placed within <Collapsible.Root>." : formatErrorMessage_default(15));
2283 + }
2284 + return context;
2285 + }
2286 +
2287 + // node_modules/@base-ui/react/internals/TransitionStatusDataAttributes.mjs
2288 + var TransitionStatusDataAttributes_exports = {};
2289 + __export(TransitionStatusDataAttributes_exports, {
2290 + endingStyle: () => endingStyle,
2291 + startingStyle: () => startingStyle
2292 + });
2293 + var startingStyle = "data-starting-style";
2294 + var endingStyle = "data-ending-style";
2295 +
2296 + // node_modules/@base-ui/react/internals/stateAttributesMapping.mjs
2297 + var STARTING_HOOK = {
2298 + [startingStyle]: ""
2299 + };
2300 + var ENDING_HOOK = {
2301 + [endingStyle]: ""
2302 + };
2303 + var transitionStatusMapping = {
2304 + transitionStatus(value) {
2305 + if (value === "starting") {
2306 + return STARTING_HOOK;
2307 + }
2308 + if (value === "ending") {
2309 + return ENDING_HOOK;
2310 + }
2311 + return null;
2312 + }
2313 + };
2314 +
2315 + // node_modules/@base-ui/react/collapsible/panel/CollapsiblePanelDataAttributes.mjs
2316 + var open = "data-open";
2317 + var closed = "data-closed";
2318 + var startingStyle2 = TransitionStatusDataAttributes_exports.startingStyle;
2319 + var endingStyle2 = TransitionStatusDataAttributes_exports.endingStyle;
2320 +
2321 + // node_modules/@base-ui/react/collapsible/trigger/CollapsibleTriggerDataAttributes.mjs
2322 + var panelOpen = "data-panel-open";
2323 +
2324 + // node_modules/@base-ui/react/utils/collapsibleOpenStateMapping.mjs
2325 + var PANEL_OPEN_HOOK = {
2326 + [open]: ""
2327 + };
2328 + var PANEL_CLOSED_HOOK = {
2329 + [closed]: ""
2330 + };
2331 + var triggerOpenStateMapping = {
2332 + open(value) {
2333 + if (value) {
2334 + return {
2335 + [panelOpen]: ""
2336 + };
2337 + }
2338 + return null;
2339 + }
2340 + };
2341 + var collapsibleOpenStateMapping = {
2342 + open(value) {
2343 + if (value) {
2344 + return PANEL_OPEN_HOOK;
2345 + }
2346 + return PANEL_CLOSED_HOOK;
2347 + }
2348 + };
2349 +
2350 + // node_modules/@base-ui/react/internals/use-button/useButton.mjs
2351 + var React15 = __toESM(require_react(), 1);
2352 +
2353 + // node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
2354 + function hasWindow() {
2355 + return typeof window !== "undefined";
2356 + }
2357 + function getNodeName(node) {
2358 + if (isNode(node)) {
2359 + return (node.nodeName || "").toLowerCase();
2360 + }
2361 + return "#document";
2362 + }
2363 + function getWindow(node) {
2364 + var _node$ownerDocument;
2365 + return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
2366 + }
2367 + function getDocumentElement(node) {
2368 + var _ref;
2369 + return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
2370 + }
2371 + function isNode(value) {
2372 + if (!hasWindow()) {
2373 + return false;
2374 + }
2375 + return value instanceof Node || value instanceof getWindow(value).Node;
2376 + }
2377 + function isElement(value) {
2378 + if (!hasWindow()) {
2379 + return false;
2380 + }
2381 + return value instanceof Element || value instanceof getWindow(value).Element;
2382 + }
2383 + function isHTMLElement(value) {
2384 + if (!hasWindow()) {
2385 + return false;
2386 + }
2387 + return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
2388 + }
2389 + function isShadowRoot(value) {
2390 + if (!hasWindow() || typeof ShadowRoot === "undefined") {
2391 + return false;
2392 + }
2393 + return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
2394 + }
2395 + function isOverflowElement(element) {
2396 + const {
2397 + overflow,
2398 + overflowX,
2399 + overflowY,
2400 + display
2401 + } = getComputedStyle2(element);
2402 + return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== "inline" && display !== "contents";
2403 + }
2404 + function isTableElement(element) {
2405 + return /^(table|td|th)$/.test(getNodeName(element));
2406 + }
2407 + function isTopLayer(element) {
2408 + try {
2409 + if (element.matches(":popover-open")) {
2410 + return true;
2411 + }
2412 + } catch (_e) {
2413 + }
2414 + try {
2415 + return element.matches(":modal");
2416 + } catch (_e) {
2417 + return false;
2418 + }
2419 + }
2420 + var willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
2421 + var containRe = /paint|layout|strict|content/;
2422 + var isNotNone = (value) => !!value && value !== "none";
2423 + var isWebKitValue;
2424 + function isContainingBlock(elementOrCss) {
2425 + const css = isElement(elementOrCss) ? getComputedStyle2(elementOrCss) : elementOrCss;
2426 + return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || "") || containRe.test(css.contain || "");
2427 + }
2428 + function getContainingBlock(element) {
2429 + let currentNode = getParentNode(element);
2430 + while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
2431 + if (isContainingBlock(currentNode)) {
2432 + return currentNode;
2433 + } else if (isTopLayer(currentNode)) {
2434 + return null;
2435 + }
2436 + currentNode = getParentNode(currentNode);
2437 + }
2438 + return null;
2439 + }
2440 + function isWebKit() {
2441 + if (isWebKitValue == null) {
2442 + isWebKitValue = typeof CSS !== "undefined" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none");
2443 + }
2444 + return isWebKitValue;
2445 + }
2446 + function isLastTraversableNode(node) {
2447 + return /^(html|body|#document)$/.test(getNodeName(node));
2448 + }
2449 + function getComputedStyle2(element) {
2450 + return getWindow(element).getComputedStyle(element);
2451 + }
2452 + function getNodeScroll(element) {
2453 + if (isElement(element)) {
2454 + return {
2455 + scrollLeft: element.scrollLeft,
2456 + scrollTop: element.scrollTop
2457 + };
2458 + }
2459 + return {
2460 + scrollLeft: element.scrollX,
2461 + scrollTop: element.scrollY
2462 + };
2463 + }
2464 + function getParentNode(node) {
2465 + if (getNodeName(node) === "html") {
2466 + return node;
2467 + }
2468 + const result = (
2469 + // Step into the shadow DOM of the parent of a slotted node.
2470 + node.assignedSlot || // DOM Element detected.
2471 + node.parentNode || // ShadowRoot detected.
2472 + isShadowRoot(node) && node.host || // Fallback.
2473 + getDocumentElement(node)
2474 + );
2475 + return isShadowRoot(result) ? result.host : result;
2476 + }
2477 + function getNearestOverflowAncestor(node) {
2478 + const parentNode = getParentNode(node);
2479 + if (isLastTraversableNode(parentNode)) {
2480 + return (node.ownerDocument || node).body;
2481 + }
2482 + if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
2483 + return parentNode;
2484 + }
2485 + return getNearestOverflowAncestor(parentNode);
2486 + }
2487 + function getOverflowAncestors(node, list, traverseIframes) {
2488 + var _node$ownerDocument2;
2489 + if (list === void 0) {
2490 + list = [];
2491 + }
2492 + if (traverseIframes === void 0) {
2493 + traverseIframes = true;
2494 + }
2495 + const scrollableAncestor = getNearestOverflowAncestor(node);
2496 + const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
2497 + const win = getWindow(scrollableAncestor);
2498 + if (isBody) {
2499 + const frameElement = getFrameElement(win);
2500 + return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
2501 + } else {
2502 + return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
2503 + }
2504 + }
2505 + function getFrameElement(win) {
2506 + return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
2507 + }
2508 +
2509 + // node_modules/@base-ui/react/internals/composite/root/CompositeRootContext.mjs
2510 + var React13 = __toESM(require_react(), 1);
2511 + var CompositeRootContext = /* @__PURE__ */ React13.createContext(void 0);
2512 + if (true) CompositeRootContext.displayName = "CompositeRootContext";
2513 + function useCompositeRootContext(optional = false) {
2514 + const context = React13.useContext(CompositeRootContext);
2515 + if (context === void 0 && !optional) {
2516 + throw new Error(true ? "Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>." : formatErrorMessage_default(16));
2517 + }
2518 + return context;
2519 + }
2520 +
2521 + // node_modules/@base-ui/react/utils/useFocusableWhenDisabled.mjs
2522 + var React14 = __toESM(require_react(), 1);
2523 + function useFocusableWhenDisabled(parameters) {
2524 + const {
2525 + focusableWhenDisabled,
2526 + disabled: disabled2,
2527 + composite = false,
2528 + tabIndex: tabIndexProp = 0,
2529 + isNativeButton
2530 + } = parameters;
2531 + const isFocusableComposite = composite && focusableWhenDisabled !== false;
2532 + const isNonFocusableComposite = composite && focusableWhenDisabled === false;
2533 + const props = React14.useMemo(() => {
2534 + const additionalProps = {
2535 + // allow Tabbing away from focusableWhenDisabled elements
2536 + onKeyDown(event) {
2537 + if (disabled2 && focusableWhenDisabled && event.key !== "Tab") {
2538 + event.preventDefault();
2539 + }
2540 + }
2541 + };
2542 + if (!composite) {
2543 + additionalProps.tabIndex = tabIndexProp;
2544 + if (!isNativeButton && disabled2) {
2545 + additionalProps.tabIndex = focusableWhenDisabled ? tabIndexProp : -1;
2546 + }
2547 + }
2548 + if (isNativeButton && (focusableWhenDisabled || isFocusableComposite) || !isNativeButton && disabled2) {
2549 + additionalProps["aria-disabled"] = disabled2;
2550 + }
2551 + if (isNativeButton && (!focusableWhenDisabled || isNonFocusableComposite)) {
2552 + additionalProps.disabled = disabled2;
2553 + }
2554 + return additionalProps;
2555 + }, [composite, disabled2, focusableWhenDisabled, isFocusableComposite, isNonFocusableComposite, isNativeButton, tabIndexProp]);
2556 + return {
2557 + props
2558 + };
2559 + }
2560 +
2561 + // node_modules/@base-ui/utils/owner.mjs
2562 + function ownerDocument(node) {
2563 + return node?.ownerDocument || document;
2564 + }
2565 +
2566 + // node_modules/@base-ui/react/utils/dispatchClickWithModifiers.mjs
2567 + function dispatchClickWithModifiers(target, sourceEvent, {
2568 + detail = 0
2569 + } = {}) {
2570 + target.dispatchEvent(new (getWindow(target)).PointerEvent("click", {
2571 + bubbles: true,
2572 + cancelable: true,
2573 + composed: true,
2574 + detail,
2575 + shiftKey: sourceEvent.shiftKey,
2576 + ctrlKey: sourceEvent.ctrlKey,
2577 + altKey: sourceEvent.altKey,
2578 + metaKey: sourceEvent.metaKey
2579 + }));
2580 + }
2581 +
2582 + // node_modules/@base-ui/react/internals/use-button/useButton.mjs
2583 + function useButton(parameters = {}) {
2584 + const {
2585 + disabled: disabled2 = false,
2586 + focusableWhenDisabled,
2587 + tabIndex = 0,
2588 + native: isNativeButton = true,
2589 + composite: compositeProp
2590 + } = parameters;
2591 + const elementRef = React15.useRef(null);
2592 + const compositeRootContext = useCompositeRootContext(true);
2593 + const isCompositeItem = compositeProp ?? compositeRootContext !== void 0;
2594 + const {
2595 + props: focusableWhenDisabledProps
2596 + } = useFocusableWhenDisabled({
2597 + focusableWhenDisabled,
2598 + disabled: disabled2,
2599 + composite: isCompositeItem,
2600 + tabIndex,
2601 + isNativeButton
2602 + });
2603 + if (true) {
2604 + React15.useEffect(() => {
2605 + if (!elementRef.current) {
2606 + return;
2607 + }
2608 + const isButtonTag = isButtonElement(elementRef.current);
2609 + if (isNativeButton) {
2610 + if (!isButtonTag) {
2611 + const ownerStackMessage = SafeReact.captureOwnerStack?.() || "";
2612 + const message = "A component that acts as a button expected a native <button> because the `nativeButton` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the `render` prop, or set `nativeButton` to `false`.";
2613 + error(`${message}${ownerStackMessage}`);
2614 + }
2615 + } else if (isButtonTag) {
2616 + const ownerStackMessage = SafeReact.captureOwnerStack?.() || "";
2617 + const message = "A component that acts as a button expected a non-<button> because the `nativeButton` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as `role` or `aria-disabled`). Use a non-<button> in the `render` prop, or set `nativeButton` to `true`.";
2618 + error(`${message}${ownerStackMessage}`);
2619 + }
2620 + }, [isNativeButton]);
2621 + }
2622 + const updateDisabled = React15.useCallback(() => {
2623 + const element = elementRef.current;
2624 + if (!isButtonElement(element)) {
2625 + return;
2626 + }
2627 + if (isCompositeItem && disabled2 && focusableWhenDisabledProps.disabled === void 0 && element.disabled) {
2628 + element.disabled = false;
2629 + }
2630 + }, [disabled2, focusableWhenDisabledProps.disabled, isCompositeItem]);
2631 + useIsoLayoutEffect(updateDisabled, [updateDisabled]);
2632 + const getButtonProps = React15.useCallback((externalProps = {}) => {
2633 + const {
2634 + onClick: externalOnClick,
2635 + onMouseDown: externalOnMouseDown,
2636 + onKeyUp: externalOnKeyUp,
2637 + onKeyDown: externalOnKeyDown,
2638 + onPointerDown: externalOnPointerDown,
2639 + ...otherExternalProps
2640 + } = externalProps;
2641 + return mergeProps({
2642 + onClick(event) {
2643 + if (disabled2) {
2644 + event.preventDefault();
2645 + return;
2646 + }
2647 + externalOnClick?.(event);
2648 + },
2649 + onMouseDown(event) {
2650 + if (!disabled2) {
2651 + externalOnMouseDown?.(event);
2652 + }
2653 + },
2654 + onKeyDown(event) {
2655 + if (disabled2) {
2656 + return;
2657 + }
2658 + makeEventPreventable(event);
2659 + externalOnKeyDown?.(event);
2660 + if (event.baseUIHandlerPrevented) {
2661 + return;
2662 + }
2663 + const isCurrentTarget = event.target === event.currentTarget;
2664 + const currentTarget = event.currentTarget;
2665 + const isButton = isButtonElement(currentTarget);
2666 + const isLink = !isNativeButton && isValidLinkElement(currentTarget);
2667 + const shouldClick = isCurrentTarget && (isNativeButton ? isButton : !isLink);
2668 + const isEnterKey = event.key === "Enter";
2669 + const isSpaceKey = event.key === " ";
2670 + const role = currentTarget.getAttribute("role");
2671 + const isTextNavigationRole = role?.startsWith("menuitem") || role === "option" || role === "gridcell";
2672 + if (isCurrentTarget && isCompositeItem && isSpaceKey) {
2673 + if (event.defaultPrevented && isTextNavigationRole) {
2674 + return;
2675 + }
2676 + event.preventDefault();
2677 + if (!isNativeButton || isButton) {
2678 + event.preventBaseUIHandler();
2679 + dispatchClickWithModifiers(currentTarget, event);
2680 + }
2681 + return;
2682 + }
2683 + if (!shouldClick || isNativeButton || !isSpaceKey && !isEnterKey) {
2684 + if (isCurrentTarget && isLink && isSpaceKey) {
2685 + event.preventDefault();
2686 + }
2687 + return;
2688 + }
2689 + if (event.defaultPrevented) {
2690 + return;
2691 + }
2692 + event.preventDefault();
2693 + if (isEnterKey) {
2694 + event.preventBaseUIHandler();
2695 + dispatchClickWithModifiers(currentTarget, event);
2696 + }
2697 + },
2698 + onKeyUp(event) {
2699 + if (disabled2) {
2700 + return;
2701 + }
2702 + makeEventPreventable(event);
2703 + externalOnKeyUp?.(event);
2704 + if (event.target === event.currentTarget && isNativeButton && isCompositeItem && isButtonElement(event.currentTarget) && event.key === " ") {
2705 + event.preventDefault();
2706 + return;
2707 + }
2708 + if (event.baseUIHandlerPrevented) {
2709 + return;
2710 + }
2711 + if (event.target === event.currentTarget && !isNativeButton && !isCompositeItem && !event.defaultPrevented && event.key === " ") {
2712 + event.preventBaseUIHandler();
2713 + dispatchClickWithModifiers(event.currentTarget, event);
2714 + }
2715 + },
2716 + onPointerDown(event) {
2717 + if (disabled2) {
2718 + event.preventDefault();
2719 + return;
2720 + }
2721 + externalOnPointerDown?.(event);
2722 + }
2723 + }, isNativeButton ? {
2724 + type: "button"
2725 + } : {
2726 + role: "button"
2727 + }, focusableWhenDisabledProps, otherExternalProps);
2728 + }, [disabled2, focusableWhenDisabledProps, isCompositeItem, isNativeButton]);
2729 + const buttonRef = useStableCallback((element) => {
2730 + elementRef.current = element;
2731 + updateDisabled();
2732 + });
2733 + return {
2734 + getButtonProps,
2735 + buttonRef
2736 + };
2737 + }
2738 + function isButtonElement(elem) {
2739 + return isHTMLElement(elem) && elem.tagName === "BUTTON";
2740 + }
2741 + function isValidLinkElement(elem) {
2742 + return isHTMLElement(elem) && elem.tagName === "A" && Boolean(elem.href);
2743 + }
2744 +
2745 + // node_modules/@base-ui/react/collapsible/panel/useCollapsiblePanel.mjs
2746 + var React17 = __toESM(require_react(), 1);
2747 +
2748 + // node_modules/@base-ui/utils/addEventListener.mjs
2749 + function addEventListener(target, type, listener, options) {
2750 + target.addEventListener(type, listener, options);
2751 + return () => {
2752 + target.removeEventListener(type, listener, options);
2753 + };
2754 + }
2755 +
2756 + // node_modules/@base-ui/utils/useValueAsRef.mjs
2757 + function useValueAsRef(value) {
2758 + const latest = useRefWithInit(createLatestRef, value).current;
2759 + latest.next = value;
2760 + useIsoLayoutEffect(latest.effect);
2761 + return latest;
2762 + }
2763 + function createLatestRef(value) {
2764 + const latest = {
2765 + current: value,
2766 + next: value,
2767 + effect: () => {
2768 + latest.current = latest.next;
2769 + }
2770 + };
2771 + return latest;
2772 + }
2773 +
2774 + // node_modules/@base-ui/react/internals/useOpenChangeComplete.mjs
2775 + var React16 = __toESM(require_react(), 1);
2776 +
2777 + // node_modules/@base-ui/react/internals/useAnimationsFinished.mjs
2778 + var ReactDOM = __toESM(require_react_dom(), 1);
2779 +
2780 + // node_modules/@base-ui/react/utils/resolveRef.mjs
2781 + function resolveRef(maybeRef) {
2782 + if (maybeRef == null) {
2783 + return maybeRef;
2784 + }
2785 + return "current" in maybeRef ? maybeRef.current : maybeRef;
2786 + }
2787 +
2788 + // node_modules/@base-ui/react/internals/useAnimationsFinished.mjs
2789 + var pendingCallbacks = null;
2790 + function flushBeforePaint(fn) {
2791 + if (!pendingCallbacks) {
2792 + const callbacks = [];
2793 + pendingCallbacks = callbacks;
2794 + queueMicrotask(() => {
2795 + pendingCallbacks = null;
2796 + ReactDOM.flushSync(() => {
2797 + for (const callback of callbacks) {
2798 + callback();
2799 + }
2800 + });
2801 + });
2802 + }
2803 + pendingCallbacks.push(fn);
2804 + }
2805 + function useAnimationsFinished(elementOrRef, waitForStartingStyleRemoved = false, batch = false) {
2806 + const frame = useAnimationFrame();
2807 + return useStableCallback((fnToExecute, signal = null) => {
2808 + frame.cancel();
2809 + const element = resolveRef(elementOrRef);
2810 + if (element == null) {
2811 + return;
2812 + }
2813 + const resolvedElement = element;
2814 + const done = () => {
2815 + if (!batch) {
2816 + ReactDOM.flushSync(fnToExecute);
2817 + return;
2818 + }
2819 + flushBeforePaint(() => {
2820 + if (!signal?.aborted) {
2821 + fnToExecute();
2822 + }
2823 + });
2824 + };
2825 + if (typeof resolvedElement.getAnimations !== "function" || globalThis.BASE_UI_ANIMATIONS_DISABLED) {
2826 + fnToExecute();
2827 + return;
2828 + }
2829 + function exec() {
2830 + Promise.all(resolvedElement.getAnimations().map((animation) => animation.finished)).then(() => {
2831 + if (!signal?.aborted) {
2832 + done();
2833 + }
2834 + }, () => {
2835 + if (signal?.aborted) {
2836 + return;
2837 + }
2838 + const currentAnimations = resolvedElement.getAnimations();
2839 + if (currentAnimations.some((animation) => animation.pending || animation.playState !== "finished")) {
2840 + exec();
2841 + return;
2842 + }
2843 + done();
2844 + });
2845 + }
2846 + if (waitForStartingStyleRemoved) {
2847 + const startingStyleAttribute = startingStyle;
2848 + if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
2849 + frame.request(exec);
2850 + return;
2851 + }
2852 + const attributeObserver = new MutationObserver(() => {
2853 + if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
2854 + attributeObserver.disconnect();
2855 + exec();
2856 + }
2857 + });
2858 + attributeObserver.observe(resolvedElement, {
2859 + attributes: true,
2860 + attributeFilter: [startingStyleAttribute]
2861 + });
2862 + signal?.addEventListener("abort", () => attributeObserver.disconnect(), {
2863 + once: true
2864 + });
2865 + return;
2866 + }
2867 + frame.request(exec);
2868 + });
2869 + }
2870 +
2871 + // node_modules/@base-ui/react/internals/useOpenChangeComplete.mjs
2872 + function useOpenChangeComplete(parameters) {
2873 + const {
2874 + enabled = true,
2875 + open: open3,
2876 + ref,
2877 + batch = false,
2878 + onComplete: onCompleteParam
2879 + } = parameters;
2880 + const onComplete = useStableCallback(onCompleteParam);
2881 + const runOnceAnimationsFinish = useAnimationsFinished(ref, open3, batch);
2882 + React16.useEffect(() => {
2883 + if (!enabled) {
2884 + return void 0;
2885 + }
2886 + const abortController = new AbortController();
2887 + runOnceAnimationsFinish(onComplete, abortController.signal);
2888 + return () => {
2889 + abortController.abort();
2890 + };
2891 + }, [enabled, open3, onComplete, runOnceAnimationsFinish]);
2892 + }
2893 +
2894 + // node_modules/@base-ui/react/collapsible/panel/useCollapsiblePanel.mjs
2895 + var EMPTY_DIMENSIONS = {
2896 + height: void 0,
2897 + width: void 0
2898 + };
2899 + function useCollapsiblePanel(parameters) {
2900 + const {
2901 + externalRef,
2902 + hiddenUntilFound,
2903 + id: idParam,
2904 + keepMounted,
2905 + mounted,
2906 + onOpenChange,
2907 + open: open3,
2908 + setMounted,
2909 + setOpen,
2910 + transitionStatus
2911 + } = parameters;
2912 + const panelRef = React17.useRef(null);
2913 + const animationTypeRef = React17.useRef(null);
2914 + const [dimensions, setDimensionsUnwrapped] = React17.useState(EMPTY_DIMENSIONS);
2915 + const lastMeasuredDimensionsRef = React17.useRef(EMPTY_DIMENSIONS);
2916 + const shouldSkipNextOpenRef = React17.useRef(false);
2917 + const shouldPreventMountAnimationRef = React17.useRef(open3);
2918 + const shouldPreventActivityResumeAnimationRef = React17.useRef(false);
2919 + const [forcePanelIdle, setForcePanelIdle] = React17.useState(false);
2920 + const pendingTemporaryStyleRestoreRef = React17.useRef(null);
2921 + const mergedPanelRef = useMergedRefs(externalRef, panelRef);
2922 + const latestOpenRef = useValueAsRef(open3);
2923 + const runOnceCloseAnimationsFinish = useAnimationsFinished(panelRef);
2924 + const hidden = !open3 && !mounted;
2925 + const panelTransitionStatus = forcePanelIdle ? "idle" : transitionStatus;
2926 + const shouldPreventOpenAnimation = open3 && // These 2 refs are safe to read in render, they are only written from committed
2927 + // layout/effect paths and gate one-shot motion suppression for the next open
2928 + // lifecycle. They intentionally expose the last committed motion snapshot.
2929 + (shouldPreventMountAnimationRef.current || shouldPreventActivityResumeAnimationRef.current);
2930 + const renderedDimensions = !open3 && mounted && // These 2 refs are also safe to read in render, both hold the last committed
2931 + // animation mode and measurement. This fallback only restores a previously
2932 + // measured pixel size after the live dimensions state has been reset back to `auto`.
2933 + animationTypeRef.current === "css-animation" && dimensions.height === void 0 && dimensions.width === void 0 ? lastMeasuredDimensionsRef.current : dimensions;
2934 + const shouldPersistHiddenTransitionStyles = hiddenUntilFound && hidden && animationTypeRef.current !== "css-animation";
2935 + const setDimensions = useStableCallback((nextDimensions, shouldCacheMeasurement = true) => {
2936 + if (shouldCacheMeasurement) {
2937 + lastMeasuredDimensionsRef.current = nextDimensions;
2938 + }
2939 + setDimensionsUnwrapped(nextDimensions);
2940 + });
2941 + const restorePendingTemporaryStyle = useStableCallback(() => {
2942 + pendingTemporaryStyleRestoreRef.current?.();
2943 + pendingTemporaryStyleRestoreRef.current = null;
2944 + });
2945 + const setPendingTemporaryStyleRestore = useStableCallback((restore) => {
2946 + restorePendingTemporaryStyle();
2947 + pendingTemporaryStyleRestoreRef.current = () => {
2948 + pendingTemporaryStyleRestoreRef.current = null;
2949 + restore();
2950 + };
2951 + });
2952 + const markActivityResumeAnimationSuppressed = useStableCallback(() => {
2953 + if (open3 && mounted && animationTypeRef.current === "css-animation") {
2954 + shouldPreventActivityResumeAnimationRef.current = true;
2955 + }
2956 + });
2957 + useIsoLayoutEffect(() => {
2958 + if (!forcePanelIdle || transitionStatus === "starting") {
2959 + return;
2960 + }
2961 + setForcePanelIdle(false);
2962 + }, [forcePanelIdle, transitionStatus]);
2963 + React17.useEffect(() => {
2964 + return () => {
2965 + markActivityResumeAnimationSuppressed();
2966 + restorePendingTemporaryStyle();
2967 + };
2968 + }, [markActivityResumeAnimationSuppressed, restorePendingTemporaryStyle]);
2969 + useIsoLayoutEffect(() => {
2970 + const panel = panelRef.current;
2971 + if (!panel) {
2972 + return void 0;
2973 + }
2974 + if (!open3 && pendingTemporaryStyleRestoreRef.current) {
2975 + restorePendingTemporaryStyle();
2976 + }
2977 + const animationType = getAnimationType(panel, shouldPreventOpenAnimation);
2978 + animationTypeRef.current = animationType;
2979 + if (open3 && transitionStatus === "idle" && shouldPreventMountAnimationRef.current && animationType === "css-animation") {
2980 + lastMeasuredDimensionsRef.current = getDimensions(panel);
2981 + return void 0;
2982 + }
2983 + if (open3 && transitionStatus === "starting") {
2984 + const skipNextOpen = shouldSkipNextOpenRef.current;
2985 + shouldSkipNextOpenRef.current = false;
2986 + if (animationType === "none") {
2987 + setDimensions(getDimensions(panel));
2988 + setForcePanelIdle(true);
2989 + return void 0;
2990 + }
2991 + if (animationType === "css-transition") {
2992 + const restoreLayoutStyles = resetLayoutStyles(panel);
2993 + setDimensions(getDimensions(panel));
2994 + if (!skipNextOpen) {
2995 + return restoreLayoutStyles;
2996 + }
2997 + const restoreTransitionDuration = setTemporaryStyle(panel, "transition-duration", "0s");
2998 + setPendingTemporaryStyleRestore(restoreTransitionDuration);
2999 + setForcePanelIdle(true);
3000 + return restoreLayoutStyles;
3001 + }
3002 + setDimensions(getDimensions(panel));
3003 + const restoreAnimationName = setTemporaryStyle(panel, "animation-name", "none");
3004 + if (!skipNextOpen) {
3005 + restoreAnimationName();
3006 + return void 0;
3007 + }
3008 + const restoreAnimationDuration = setTemporaryStyle(panel, "animation-duration", "0s");
3009 + restoreAnimationName();
3010 + setPendingTemporaryStyleRestore(restoreAnimationDuration);
3011 + setForcePanelIdle(true);
3012 + return void 0;
3013 + }
3014 + if (!open3 && mounted && (transitionStatus === "idle" || transitionStatus === "starting")) {
3015 + shouldPreventMountAnimationRef.current = false;
3016 + shouldPreventActivityResumeAnimationRef.current = false;
3017 + if (animationType === "none") {
3018 + setDimensions(EMPTY_DIMENSIONS, false);
3019 + setMounted(false);
3020 + return void 0;
3021 + }
3022 + setDimensions(getDimensions(panel));
3023 + return void 0;
3024 + }
3025 + if (transitionStatus !== "ending") {
3026 + return void 0;
3027 + }
3028 + if (animationType === "none") {
3029 + setMounted(false);
3030 + return void 0;
3031 + }
3032 + const nextDimensions = getDimensions(panel);
3033 + const hasMeasuredSize = nextDimensions.height > 0 || nextDimensions.width > 0;
3034 + if (!hasMeasuredSize) {
3035 + setMounted(false);
3036 + return void 0;
3037 + }
3038 + setDimensions(nextDimensions);
3039 + if (animationType === "css-animation") {
3040 + const restoreAnimationName = setTemporaryStyle(panel, "animation-name", "none");
3041 + restoreAnimationName();
3042 + }
3043 + return void 0;
3044 + }, [mounted, open3, restorePendingTemporaryStyle, setDimensions, setMounted, setPendingTemporaryStyleRestore, shouldPreventOpenAnimation, transitionStatus]);
3045 + useOpenChangeComplete({
3046 + enabled: open3 && mounted && panelTransitionStatus === "idle",
3047 + open: true,
3048 + ref: panelRef,
3049 + onComplete() {
3050 + if (!open3) {
3051 + return;
3052 + }
3053 + setDimensions(EMPTY_DIMENSIONS, false);
3054 + }
3055 + });
3056 + React17.useEffect(() => {
3057 + if (open3 || !mounted || panelTransitionStatus !== "ending") {
3058 + return void 0;
3059 + }
3060 + const panel = panelRef.current;
3061 + if (!panel) {
3062 + return void 0;
3063 + }
3064 + const abortController = new AbortController();
3065 + let endingStyleFrame = -1;
3066 + function handleComplete() {
3067 + if (latestOpenRef.current) {
3068 + return;
3069 + }
3070 + setMounted(false);
3071 + setDimensions(EMPTY_DIMENSIONS, false);
3072 + }
3073 + endingStyleFrame = AnimationFrame.request(() => {
3074 + runOnceCloseAnimationsFinish(handleComplete, abortController.signal);
3075 + });
3076 + return () => {
3077 + AnimationFrame.cancel(endingStyleFrame);
3078 + abortController.abort();
3079 + };
3080 + }, [latestOpenRef, mounted, open3, panelTransitionStatus, runOnceCloseAnimationsFinish, setDimensions, setMounted]);
3081 + useIsoLayoutEffect(() => {
3082 + const panel = panelRef.current;
3083 + if (!panel || !hiddenUntilFound || !hidden) {
3084 + return;
3085 + }
3086 + panel.setAttribute("hidden", "until-found");
3087 + }, [hidden, hiddenUntilFound]);
3088 + React17.useEffect(function registerBeforeMatchListener() {
3089 + const panel = panelRef.current;
3090 + if (!panel) {
3091 + return void 0;
3092 + }
3093 + function handleBeforeMatch(event) {
3094 + const eventDetails = createChangeEventDetails(reason_parts_exports.none, event);
3095 + onOpenChange(true, eventDetails);
3096 + if (eventDetails.isCanceled) {
3097 + return;
3098 + }
3099 + shouldSkipNextOpenRef.current = true;
3100 + setOpen(true);
3101 + }
3102 + return addEventListener(panel, "beforematch", handleBeforeMatch);
3103 + }, [onOpenChange, setOpen]);
3104 + const shouldRender = keepMounted || hiddenUntilFound || mounted || open3;
3105 + return {
3106 + height: renderedDimensions.height,
3107 + props: {
3108 + ...shouldPersistHiddenTransitionStyles ? {
3109 + [startingStyle2]: ""
3110 + } : void 0,
3111 + hidden,
3112 + id: idParam
3113 + },
3114 + ref: mergedPanelRef,
3115 + shouldPreventOpenAnimation,
3116 + shouldRender,
3117 + transitionStatus: panelTransitionStatus,
3118 + width: renderedDimensions.width
3119 + };
3120 + }
3121 + function getDimensions(element) {
3122 + return {
3123 + height: element.scrollHeight,
3124 + width: element.scrollWidth
3125 + };
3126 + }
3127 + function getAnimationType(element, hasSuppressedMountAnimation) {
3128 + const panelStyles = getWindow(element).getComputedStyle(element);
3129 + const hasAnimation = (panelStyles.animationName.split(",").map((name2) => name2.trim()).some((name2) => name2 !== "" && name2 !== "none") || hasSuppressedMountAnimation) && hasNonZeroDuration(panelStyles.animationDuration);
3130 + const hasTransition = hasNonZeroDuration(panelStyles.transitionDuration);
3131 + if (hasAnimation && hasTransition) {
3132 + if (true) {
3133 + warn("CSS transitions and CSS animations both detected on Collapsible or Accordion panel.", "Only one of either animation type should be used.");
3134 + }
3135 + return "css-transition";
3136 + }
3137 + if (hasTransition) {
3138 + return "css-transition";
3139 + }
3140 + if (hasAnimation) {
3141 + return "css-animation";
3142 + }
3143 + return "none";
3144 + }
3145 + function hasNonZeroDuration(value) {
3146 + return value.split(",").map((part) => part.trim()).some((part) => part !== "" && Number.parseFloat(part) > 0);
3147 + }
3148 + function setTemporaryStyle(element, property, value) {
3149 + const previousValue = element.style.getPropertyValue(property);
3150 + const previousPriority = element.style.getPropertyPriority(property);
3151 + element.style.setProperty(property, value);
3152 + return () => {
3153 + if (previousValue === "") {
3154 + element.style.removeProperty(property);
3155 + return;
3156 + }
3157 + element.style.setProperty(property, previousValue, previousPriority);
3158 + };
3159 + }
3160 + function resetLayoutStyles(element) {
3161 + const originalLayoutStyles = {
3162 + "justify-content": element.style.justifyContent,
3163 + "align-items": element.style.alignItems,
3164 + "align-content": element.style.alignContent,
3165 + "justify-items": element.style.justifyItems
3166 + };
3167 + Object.keys(originalLayoutStyles).forEach((key) => {
3168 + element.style.setProperty(key, "initial", "important");
3169 + });
3170 + function restoreLayoutStyles() {
3171 + Object.entries(originalLayoutStyles).forEach(([key, value]) => {
3172 + if (value === "") {
3173 + element.style.removeProperty(key);
3174 + return;
3175 + }
3176 + element.style.setProperty(key, value);
3177 + });
3178 + }
3179 + const frame = AnimationFrame.request(restoreLayoutStyles);
3180 + return () => {
3181 + AnimationFrame.cancel(frame);
3182 + restoreLayoutStyles();
3183 + };
3184 + }
3185 +
3186 + // node_modules/@base-ui/utils/platform/parts.mjs
3187 + var parts_exports = {};
3188 + __export(parts_exports, {
3189 + engine: () => engine_exports,
3190 + env: () => env_exports,
3191 + mediaQuery: () => media_query_exports,
3192 + os: () => os_exports,
3193 + screenReader: () => screen_reader_exports
3194 + });
3195 +
3196 + // node_modules/@base-ui/utils/platform/os.mjs
3197 + var os_exports = {};
3198 + __export(os_exports, {
3199 + android: () => android,
3200 + apple: () => apple,
3201 + ios: () => ios,
3202 + linux: () => linux,
3203 + mac: () => mac,
3204 + windows: () => windows
3205 + });
3206 +
3207 + // node_modules/@base-ui/utils/platform/shared.mjs
3208 + function readRawData() {
3209 + if (typeof navigator === "undefined") {
3210 + return {
3211 + userAgent: "",
3212 + platform: "",
3213 + maxTouchPoints: 0
3214 + };
3215 + }
3216 + if (true) {
3217 + const uaData = navigator.userAgentData;
3218 + if (uaData && Array.isArray(uaData.brands)) {
3219 + return {
3220 + userAgent: uaData.brands.map(({
3221 + brand,
3222 + version: version2
3223 + }) => `${brand}/${version2}`).join(" "),
3224 + platform: uaData.platform ?? navigator.platform ?? "",
3225 + maxTouchPoints: navigator.maxTouchPoints ?? 0
3226 + };
3227 + }
3228 + }
3229 + return {
3230 + userAgent: navigator.userAgent,
3231 + platform: navigator.platform ?? "",
3232 + maxTouchPoints: navigator.maxTouchPoints ?? 0
3233 + };
3234 + }
3235 + var {
3236 + userAgent,
3237 + platform,
3238 + maxTouchPoints
3239 + } = readRawData();
3240 + var lowerUserAgent = userAgent.toLowerCase();
3241 + var lowerPlatform = platform.toLowerCase();
3242 +
3243 + // node_modules/@base-ui/utils/platform/os.mjs
3244 + var ios = /^i(os$|p)/.test(lowerPlatform) || lowerPlatform === "macintel" && maxTouchPoints > 1;
3245 + var ANDROID_STRING = "android";
3246 + var android = lowerPlatform === ANDROID_STRING || lowerUserAgent.includes(ANDROID_STRING);
3247 + var mac = !ios && lowerPlatform.startsWith("mac");
3248 + var windows = lowerPlatform.startsWith("win");
3249 + var linux = !android && /^(linux|chrome os)/.test(lowerPlatform);
3250 + var apple = mac || ios;
3251 +
3252 + // node_modules/@base-ui/utils/platform/engine.mjs
3253 + var engine_exports = {};
3254 + __export(engine_exports, {
3255 + blink: () => blink,
3256 + gecko: () => gecko,
3257 + webkit: () => webkit
3258 + });
3259 + var webkit = typeof CSS !== "undefined" && !!CSS.supports?.("-webkit-backdrop-filter:none");
3260 + var gecko = !webkit && lowerUserAgent.includes("firefox");
3261 + var blink = !webkit && lowerUserAgent.includes("chrom");
3262 +
3263 + // node_modules/@base-ui/utils/platform/screen-reader.mjs
3264 + var screen_reader_exports = {};
3265 + __export(screen_reader_exports, {
3266 + voiceOver: () => voiceOver
3267 + });
3268 + var voiceOver = apple;
3269 +
3270 + // node_modules/@base-ui/utils/platform/env.mjs
3271 + var env_exports = {};
3272 + __export(env_exports, {
3273 + jsdom: () => jsdom
3274 + });
3275 + var jsdom = /jsdom|happydom/.test(lowerUserAgent);
3276 +
3277 + // node_modules/@base-ui/utils/platform/media-query.mjs
3278 + var media_query_exports = {};
3279 + __export(media_query_exports, {
3280 + iOS: () => iOS
3281 + });
3282 + var iOS = "@supports (-webkit-touch-callout: none)";
3283 +
3284 + // node_modules/@base-ui/utils/useTimeout.mjs
3285 + var EMPTY2 = 0;
3286 + var Timeout = class _Timeout {
3287 + static create() {
3288 + return new _Timeout();
3289 + }
3290 + currentId = EMPTY2;
3291 + /**
3292 + * Executes `fn` after `delay`, clearing any previously scheduled call.
3293 + */
3294 + start(delay, fn) {
3295 + this.clear();
3296 + this.currentId = setTimeout(() => {
3297 + this.currentId = EMPTY2;
3298 + fn();
3299 + }, delay);
3300 + }
3301 + isStarted() {
3302 + return this.currentId !== EMPTY2;
3303 + }
3304 + clear = () => {
3305 + if (this.currentId !== EMPTY2) {
3306 + clearTimeout(this.currentId);
3307 + this.currentId = EMPTY2;
3308 + }
3309 + };
3310 + disposeEffect = () => {
3311 + return this.clear;
3312 + };
3313 + };
3314 + function useTimeout() {
3315 + const timeout = useRefWithInit(Timeout.create).current;
3316 + useOnMount(timeout.disposeEffect);
3317 + return timeout;
3318 + }
3319 +
3320 + // node_modules/@base-ui/react/floating-ui-react/components/FloatingDelayGroup.mjs
3321 + var React18 = __toESM(require_react(), 1);
3322 +
3323 + // node_modules/@base-ui/react/floating-ui-react/utils/event.mjs
3324 + function isReactEvent(event) {
3325 + return "nativeEvent" in event;
3326 + }
3327 + function isVirtualClick(event) {
3328 + if (event.pointerType === "" && event.isTrusted) {
3329 + return true;
3330 + }
3331 + if (parts_exports.os.android && event.pointerType) {
3332 + return event.type === "click" && event.buttons === 1;
3333 + }
3334 + return event.detail === 0 && !event.pointerType;
3335 + }
3336 + function isMouseLikePointerType(pointerType, strict) {
3337 + const values = ["mouse", "pen"];
3338 + if (!strict) {
3339 + values.push("", void 0);
3340 + }
3341 + return values.includes(pointerType);
3342 + }
3343 + function isClickLikeEvent(event) {
3344 + const type = event.type;
3345 + return type === "click" || type === "mousedown" || type === "keydown" || type === "keyup";
3346 + }
3347 +
3348 + // node_modules/@base-ui/utils/shadowDom.mjs
3349 + function activeElement(doc) {
3350 + let element = doc.activeElement;
3351 + while (element?.shadowRoot?.activeElement != null) {
3352 + element = element.shadowRoot.activeElement;
3353 + }
3354 + return element;
3355 + }
3356 + function contains(parent, child) {
3357 + if (!parent || !child) {
3358 + return false;
3359 + }
3360 + const rootNode = child.getRootNode?.();
3361 + if (parent.contains(child)) {
3362 + return true;
3363 + }
3364 + if (rootNode && isShadowRoot(rootNode)) {
3365 + let next = child;
3366 + while (next) {
3367 + if (parent === next) {
3368 + return true;
3369 + }
3370 + next = next.parentNode || next.host;
3371 + }
3372 + }
3373 + return false;
3374 + }
3375 + function getTarget(event) {
3376 + if ("composedPath" in event) {
3377 + return event.composedPath()[0] ?? event.target;
3378 + }
3379 + return event.target;
3380 + }
3381 +
3382 + // node_modules/@base-ui/react/floating-ui-react/utils/constants.mjs
3383 + var FOCUSABLE_ATTRIBUTE = "data-base-ui-focusable";
3384 + var TYPEABLE_SELECTOR = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
3385 +
3386 + // node_modules/@base-ui/react/utils/CommonPopupDataAttributes.mjs
3387 + var open2 = "data-open";
3388 + var closed2 = "data-closed";
3389 + var anchorHidden = "data-anchor-hidden";
3390 +
3391 + // node_modules/@base-ui/react/utils/CommonTriggerDataAttributes.mjs
3392 + var CommonTriggerDataAttributes_exports = {};
3393 + __export(CommonTriggerDataAttributes_exports, {
3394 + popupOpen: () => popupOpen,
3395 + pressed: () => pressed
3396 + });
3397 + var popupOpen = "data-popup-open";
3398 + var pressed = "data-pressed";
3399 +
3400 + // node_modules/@base-ui/react/utils/popupStateMapping.mjs
3401 + var TRIGGER_HOOK = {
3402 + [popupOpen]: ""
3403 + };
3404 + var PRESSABLE_TRIGGER_HOOK = {
3405 + [popupOpen]: "",
3406 + [pressed]: ""
3407 + };
3408 + var POPUP_OPEN_HOOK = {
3409 + [open2]: ""
3410 + };
3411 + var POPUP_CLOSED_HOOK = {
3412 + [closed2]: ""
3413 + };
3414 + var ANCHOR_HIDDEN_HOOK = {
3415 + [anchorHidden]: ""
3416 + };
3417 + var triggerOpenStateMapping2 = {
3418 + open(value) {
3419 + if (value) {
3420 + return TRIGGER_HOOK;
3421 + }
3422 + return null;
3423 + }
3424 + };
3425 + var popupStateMapping = {
3426 + open(value) {
3427 + if (value) {
3428 + return POPUP_OPEN_HOOK;
3429 + }
3430 + return POPUP_CLOSED_HOOK;
3431 + },
3432 + anchorHidden(value) {
3433 + if (value) {
3434 + return ANCHOR_HIDDEN_HOOK;
3435 + }
3436 + return null;
3437 + }
3438 + };
3439 + var popupTransitionStateMapping = {
3440 + ...popupStateMapping,
3441 + ...transitionStatusMapping
3442 + };
3443 +
3444 + // node_modules/@base-ui/react/tooltip/trigger/TooltipTriggerDataAttributes.mjs
3445 + var popupOpen2 = CommonTriggerDataAttributes_exports.popupOpen;
3446 + var triggerDisabled = "data-trigger-disabled";
3447 +
3448 + // node_modules/@base-ui/react/floating-ui-react/utils/element.mjs
3449 + function isTargetInsideEnabledTrigger(target, triggerElements) {
3450 + if (!isElement(target)) {
3451 + return false;
3452 + }
3453 + const targetElement = target;
3454 + if (triggerElements.hasElement(targetElement)) {
3455 + return !targetElement.hasAttribute(triggerDisabled);
3456 + }
3457 + for (const [, trigger] of triggerElements.entries()) {
3458 + if (contains(trigger, targetElement)) {
3459 + return !trigger.hasAttribute(triggerDisabled);
3460 + }
3461 + }
3462 + return false;
3463 + }
3464 + function isEventTargetWithin(event, node) {
3465 + if (node == null) {
3466 + return false;
3467 + }
3468 + if ("composedPath" in event) {
3469 + return event.composedPath().includes(node);
3470 + }
3471 + const eventAgain = event;
3472 + return eventAgain.target != null && node.contains(eventAgain.target);
3473 + }
3474 + function isRootElement(element) {
3475 + return element.matches("html,body");
3476 + }
3477 + function isTypeableElement(element) {
3478 + return isHTMLElement(element) && element.matches(TYPEABLE_SELECTOR);
3479 + }
3480 + function isInteractiveElement(element) {
3481 + return element?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${TYPEABLE_SELECTOR}`) != null;
3482 + }
3483 + function matchesFocusVisible(element) {
3484 + if (!element || parts_exports.env.jsdom) {
3485 + return true;
3486 + }
3487 + try {
3488 + return element.matches(":focus-visible");
3489 + } catch (_e) {
3490 + return true;
3491 + }
3492 + }
3493 +
3494 + // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverShared.mjs
3495 + function resolveValue(value, pointerType) {
3496 + if (pointerType != null && !isMouseLikePointerType(pointerType)) {
3497 + return 0;
3498 + }
3499 + if (typeof value === "function") {
3500 + return value();
3501 + }
3502 + return value;
3503 + }
3504 + function getDelay(value, prop, pointerType) {
3505 + const result = resolveValue(value, pointerType);
3506 + if (typeof result === "number") {
3507 + return result;
3508 + }
3509 + return result?.[prop];
3510 + }
3511 + function getRestMs(value) {
3512 + if (typeof value === "function") {
3513 + return value();
3514 + }
3515 + return value;
3516 + }
3517 + function isClickLikeOpenEvent(openEventType, interactedInside) {
3518 + return interactedInside || openEventType === "click" || openEventType === "mousedown";
3519 + }
3520 + function isHoverOpenEvent(openEventType) {
3521 + return openEventType?.includes("mouse") && openEventType !== "mousedown";
3522 + }
3523 +
3524 + // node_modules/@base-ui/react/floating-ui-react/components/FloatingDelayGroup.mjs
3525 + var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
3526 + var FloatingDelayGroupContext = /* @__PURE__ */ React18.createContext({
3527 + hasProvider: false,
3528 + timeoutMs: 0,
3529 + delayRef: {
3530 + current: 0
3531 + },
3532 + initialDelayRef: {
3533 + current: 0
3534 + },
3535 + timeout: new Timeout(),
3536 + currentIdRef: {
3537 + current: null
3538 + },
3539 + currentContextRef: {
3540 + current: null
3541 + }
3542 + });
3543 + if (true) FloatingDelayGroupContext.displayName = "FloatingDelayGroupContext";
3544 + function resetDelayRef(delayRef, initialDelayRef) {
3545 + delayRef.current = initialDelayRef.current;
3546 + }
3547 + function FloatingDelayGroup(props) {
3548 + const {
3549 + children,
3550 + delay,
3551 + timeoutMs = 0
3552 + } = props;
3553 + const delayRef = React18.useRef(delay);
3554 + const initialDelayRef = React18.useRef(delay);
3555 + const currentIdRef = React18.useRef(null);
3556 + const currentContextRef = React18.useRef(null);
3557 + const timeout = useTimeout();
3558 + useIsoLayoutEffect(() => {
3559 + initialDelayRef.current = delay;
3560 + if (!currentIdRef.current) {
3561 + delayRef.current = delay;
3562 + return;
3563 + }
3564 + delayRef.current = {
3565 + open: getDelay(delayRef.current, "open"),
3566 + close: getDelay(delay, "close")
3567 + };
3568 + }, [delay, currentIdRef, delayRef, initialDelayRef]);
3569 + return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(FloatingDelayGroupContext.Provider, {
3570 + value: React18.useMemo(() => ({
3571 + hasProvider: true,
3572 + delayRef,
3573 + initialDelayRef,
3574 + currentIdRef,
3575 + timeoutMs,
3576 + currentContextRef,
3577 + timeout
3578 + }), [timeoutMs, timeout]),
3579 + children
3580 + });
3581 + }
3582 + function useDelayGroup(context, options = {
3583 + open: false
3584 + }) {
3585 + const {
3586 + open: open3
3587 + } = options;
3588 + const store3 = "rootStore" in context ? context.rootStore : context;
3589 + const floatingId = store3.useState("floatingId");
3590 + const groupContext = React18.useContext(FloatingDelayGroupContext);
3591 + const {
3592 + currentIdRef,
3593 + delayRef,
3594 + timeoutMs,
3595 + initialDelayRef,
3596 + currentContextRef,
3597 + hasProvider,
3598 + timeout
3599 + } = groupContext;
3600 + const [isInstantPhase, setIsInstantPhase] = React18.useState(false);
3601 + const openRef = React18.useRef(open3);
3602 + useIsoLayoutEffect(() => {
3603 + openRef.current = open3;
3604 + }, [open3]);
3605 + useIsoLayoutEffect(() => {
3606 + function unset() {
3607 + currentContextRef.current?.setIsInstantPhase(false);
3608 + currentIdRef.current = null;
3609 + currentContextRef.current = null;
3610 + delayRef.current = initialDelayRef.current;
3611 + timeout.clear();
3612 + }
3613 + if (!currentIdRef.current) {
3614 + return void 0;
3615 + }
3616 + if (!open3 && currentIdRef.current === floatingId) {
3617 + setIsInstantPhase(false);
3618 + if (timeoutMs) {
3619 + const closingId = floatingId;
3620 + timeout.start(timeoutMs, () => {
3621 + if (store3.select("open") || currentIdRef.current && currentIdRef.current !== closingId) {
3622 + return;
3623 + }
3624 + unset();
3625 + });
3626 + return () => {
3627 + if (openRef.current || currentIdRef.current !== closingId) {
3628 + timeout.clear();
3629 + }
3630 + };
3631 + }
3632 + unset();
3633 + }
3634 + return void 0;
3635 + }, [open3, floatingId, currentIdRef, delayRef, timeoutMs, initialDelayRef, currentContextRef, timeout, store3]);
3636 + useIsoLayoutEffect(() => {
3637 + if (!open3) {
3638 + return;
3639 + }
3640 + const prevContext = currentContextRef.current;
3641 + const prevId = currentIdRef.current;
3642 + timeout.clear();
3643 + currentContextRef.current = {
3644 + onOpenChange: store3.setOpen,
3645 + setIsInstantPhase
3646 + };
3647 + currentIdRef.current = floatingId;
3648 + delayRef.current = {
3649 + open: 0,
3650 + close: getDelay(initialDelayRef.current, "close")
3651 + };
3652 + if (prevId !== null && prevId !== floatingId) {
3653 + setIsInstantPhase(true);
3654 + prevContext?.setIsInstantPhase(true);
3655 + prevContext?.onOpenChange(false, createChangeEventDetails(reason_parts_exports.none));
3656 + } else {
3657 + setIsInstantPhase(false);
3658 + prevContext?.setIsInstantPhase(false);
3659 + }
3660 + }, [open3, floatingId, store3, currentIdRef, delayRef, initialDelayRef, currentContextRef, timeout]);
3661 + useIsoLayoutEffect(() => {
3662 + return () => {
3663 + if (currentIdRef.current === floatingId) {
3664 + currentContextRef.current = null;
3665 + if (!openRef.current) {
3666 + return;
3667 + }
3668 + currentIdRef.current = null;
3669 + resetDelayRef(delayRef, initialDelayRef);
3670 + timeout.clear();
3671 + }
3672 + };
3673 + }, [currentContextRef, currentIdRef, delayRef, floatingId, initialDelayRef, timeout]);
3674 + return React18.useMemo(() => ({
3675 + activeIdRef: currentIdRef,
3676 + hasProvider,
3677 + delayRef,
3678 + isInstantPhase
3679 + }), [currentIdRef, hasProvider, delayRef, isInstantPhase]);
3680 + }
3681 +
3682 + // node_modules/@base-ui/utils/mergeCleanups.mjs
3683 + function mergeCleanups(...cleanups) {
3684 + return () => {
3685 + for (let i = 0; i < cleanups.length; i += 1) {
3686 + const cleanup = cleanups[i];
3687 + if (cleanup) {
3688 + cleanup();
3689 + }
3690 + }
3691 + };
3692 + }
3693 +
3694 + // node_modules/@base-ui/react/utils/FocusGuard.mjs
3695 + var React19 = __toESM(require_react(), 1);
3696 +
3697 + // node_modules/@base-ui/utils/visuallyHidden.mjs
3698 + var visuallyHiddenBase = {
3699 + clipPath: "inset(50%)",
3700 + overflow: "hidden",
3701 + whiteSpace: "nowrap",
3702 + border: 0,
3703 + padding: 0,
3704 + width: 1,
3705 + height: 1,
3706 + margin: -1
3707 + };
3708 + var visuallyHidden = {
3709 + ...visuallyHiddenBase,
3710 + position: "fixed",
3711 + top: 0,
3712 + left: 0
3713 + };
3714 + var visuallyHiddenInput = {
3715 + ...visuallyHiddenBase,
3716 + position: "absolute"
3717 + };
3718 +
3719 + // node_modules/@base-ui/react/utils/FocusGuard.mjs
3720 + var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
3721 + var FocusGuard = /* @__PURE__ */ React19.forwardRef(function FocusGuard2(props, ref) {
3722 + const [role, setRole] = React19.useState();
3723 + useIsoLayoutEffect(() => {
3724 + if (parts_exports.screenReader.voiceOver && parts_exports.engine.webkit) {
3725 + setRole("button");
3726 + }
3727 + }, []);
3728 + const restProps = {
3729 + tabIndex: 0,
3730 + // Role is only for VoiceOver
3731 + role
3732 + };
3733 + return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", {
3734 + ...props,
3735 + ref,
3736 + style: visuallyHidden,
3737 + "aria-hidden": role ? void 0 : true,
3738 + ...restProps,
3739 + "data-base-ui-focus-guard": ""
3740 + });
3741 + });
3742 + if (true) FocusGuard.displayName = "FocusGuard";
3743 +
3744 + // node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
3745 + var min = Math.min;
3746 + var max = Math.max;
3747 + var round = Math.round;
3748 + var floor = Math.floor;
3749 + var createCoords = (v) => ({
3750 + x: v,
3751 + y: v
3752 + });
3753 + var oppositeSideMap = {
3754 + left: "right",
3755 + right: "left",
3756 + bottom: "top",
3757 + top: "bottom"
3758 + };
3759 + function clamp(start, value, end) {
3760 + return max(start, min(value, end));
3761 + }
3762 + function evaluate(value, param) {
3763 + return typeof value === "function" ? value(param) : value;
3764 + }
3765 + function getSide(placement) {
3766 + return placement.split("-")[0];
3767 + }
3768 + function getAlignment(placement) {
3769 + return placement.split("-")[1];
3770 + }
3771 + function getOppositeAxis(axis) {
3772 + return axis === "x" ? "y" : "x";
3773 + }
3774 + function getAxisLength(axis) {
3775 + return axis === "y" ? "height" : "width";
3776 + }
3777 + function getSideAxis(placement) {
3778 + const firstChar = placement[0];
3779 + return firstChar === "t" || firstChar === "b" ? "y" : "x";
3780 + }
3781 + function getAlignmentAxis(placement) {
3782 + return getOppositeAxis(getSideAxis(placement));
3783 + }
3784 + function getAlignmentSides(placement, rects, rtl) {
3785 + if (rtl === void 0) {
3786 + rtl = false;
3787 + }
3788 + const alignment = getAlignment(placement);
3789 + const alignmentAxis = getAlignmentAxis(placement);
3790 + const length = getAxisLength(alignmentAxis);
3791 + let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
3792 + if (rects.reference[length] > rects.floating[length]) {
3793 + mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
3794 + }
3795 + return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
3796 + }
3797 + function getExpandedPlacements(placement) {
3798 + const oppositePlacement = getOppositePlacement(placement);
3799 + return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
3800 + }
3801 + function getOppositeAlignmentPlacement(placement) {
3802 + return placement.includes("start") ? placement.replace("start", "end") : placement.replace("end", "start");
3803 + }
3804 + var lrPlacement = ["left", "right"];
3805 + var rlPlacement = ["right", "left"];
3806 + var tbPlacement = ["top", "bottom"];
3807 + var btPlacement = ["bottom", "top"];
3808 + function getSideList(side, isStart, rtl) {
3809 + switch (side) {
3810 + case "top":
3811 + case "bottom":
3812 + if (rtl) return isStart ? rlPlacement : lrPlacement;
3813 + return isStart ? lrPlacement : rlPlacement;
3814 + case "left":
3815 + case "right":
3816 + return isStart ? tbPlacement : btPlacement;
3817 + default:
3818 + return [];
3819 + }
3820 + }
3821 + function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
3822 + const alignment = getAlignment(placement);
3823 + let list = getSideList(getSide(placement), direction === "start", rtl);
3824 + if (alignment) {
3825 + list = list.map((side) => side + "-" + alignment);
3826 + if (flipAlignment) {
3827 + list = list.concat(list.map(getOppositeAlignmentPlacement));
3828 + }
3829 + }
3830 + return list;
3831 + }
3832 + function getOppositePlacement(placement) {
3833 + const side = getSide(placement);
3834 + return oppositeSideMap[side] + placement.slice(side.length);
3835 + }
3836 + function expandPaddingObject(padding) {
3837 + var _padding$top, _padding$right, _padding$bottom, _padding$left;
3838 + return {
3839 + top: (_padding$top = padding.top) != null ? _padding$top : 0,
3840 + right: (_padding$right = padding.right) != null ? _padding$right : 0,
3841 + bottom: (_padding$bottom = padding.bottom) != null ? _padding$bottom : 0,
3842 + left: (_padding$left = padding.left) != null ? _padding$left : 0
3843 + };
3844 + }
3845 + function getPaddingObject(padding) {
3846 + return typeof padding !== "number" ? expandPaddingObject(padding) : {
3847 + top: padding,
3848 + right: padding,
3849 + bottom: padding,
3850 + left: padding
3851 + };
3852 + }
3853 + function rectToClientRect(rect) {
3854 + const {
3855 + x,
3856 + y,
3857 + width,
3858 + height
3859 + } = rect;
3860 + return {
3861 + width,
3862 + height,
3863 + top: y,
3864 + left: x,
3865 + right: x + width,
3866 + bottom: y + height,
3867 + x,
3868 + y
3869 + };
3870 + }
3871 +
3872 + // node_modules/@base-ui/react/floating-ui-react/utils/composite.mjs
3873 + function isHiddenByStyles(styles) {
3874 + return styles.visibility === "hidden" || styles.visibility === "collapse";
3875 + }
3876 + function isElementVisible(element, styles = element ? getComputedStyle2(element) : null) {
3877 + if (!element || !element.isConnected || !styles || isHiddenByStyles(styles)) {
3878 + return false;
3879 + }
3880 + if (typeof element.checkVisibility === "function") {
3881 + return element.checkVisibility();
3882 + }
3883 + return styles.display !== "none" && styles.display !== "contents";
3884 + }
3885 +
3886 + // node_modules/@base-ui/react/floating-ui-react/utils/tabbable.mjs
3887 + var CANDIDATE_SELECTOR = 'a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';
3888 + function getParentElement(element) {
3889 + const assignedSlot = element.assignedSlot;
3890 + if (assignedSlot) {
3891 + return assignedSlot;
3892 + }
3893 + if (element.parentElement) {
3894 + return element.parentElement;
3895 + }
3896 + const rootNode = element.getRootNode();
3897 + return isShadowRoot(rootNode) ? rootNode.host : null;
3898 + }
3899 + function getDetailsSummary(details) {
3900 + for (const child of Array.from(details.children)) {
3901 + if (getNodeName(child) === "summary") {
3902 + return child;
3903 + }
3904 + }
3905 + return null;
3906 + }
3907 + function isWithinOpenDetailsSummary(element, details) {
3908 + const summary = getDetailsSummary(details);
3909 + return !!summary && (element === summary || contains(summary, element));
3910 + }
3911 + function isFocusableCandidate(element) {
3912 + const nodeName = element ? getNodeName(element) : "";
3913 + return element != null && element.matches(CANDIDATE_SELECTOR) && (nodeName !== "summary" || element.parentElement != null && getNodeName(element.parentElement) === "details" && getDetailsSummary(element.parentElement) === element) && (nodeName !== "details" || getDetailsSummary(element) == null) && (nodeName !== "input" || element.type !== "hidden");
3914 + }
3915 + function isFocusableElement(element) {
3916 + if (!isFocusableCandidate(element) || !element.isConnected || element.matches(":disabled")) {
3917 + return false;
3918 + }
3919 + for (let current = element; current; current = getParentElement(current)) {
3920 + const isAncestor = current !== element;
3921 + const isSlot = getNodeName(current) === "slot";
3922 + if (current.hasAttribute("inert")) {
3923 + return false;
3924 + }
3925 + if (isAncestor && getNodeName(current) === "details" && !current.open && !isWithinOpenDetailsSummary(element, current) || current.hasAttribute("hidden") || !isSlot && !isVisibleInTabbableTree(current, isAncestor)) {
3926 + return false;
3927 + }
3928 + }
3929 + return true;
3930 + }
3931 + function isVisibleInTabbableTree(element, isAncestor) {
3932 + const styles = getComputedStyle2(element);
3933 + if (!isAncestor) {
3934 + return isElementVisible(element, styles);
3935 + }
3936 + return styles.display !== "none";
3937 + }
3938 + function getTabIndex(element) {
3939 + const tabIndex = element.tabIndex;
3940 + if (tabIndex < 0) {
3941 + const nodeName = getNodeName(element);
3942 + if (nodeName === "details" || nodeName === "audio" || nodeName === "video" || isHTMLElement(element) && element.isContentEditable) {
3943 + return 0;
3944 + }
3945 + }
3946 + return tabIndex;
3947 + }
3948 + function getNamedRadioInput(element) {
3949 + if (getNodeName(element) !== "input") {
3950 + return null;
3951 + }
3952 + const input = element;
3953 + return input.type === "radio" && input.name !== "" ? input : null;
3954 + }
3955 + function isTabbableRadio(element, candidates) {
3956 + const input = getNamedRadioInput(element);
3957 + if (!input) {
3958 + return true;
3959 + }
3960 + const checkedRadio = candidates.find((candidate) => {
3961 + const radio = getNamedRadioInput(candidate);
3962 + return radio?.name === input.name && radio.form === input.form && radio.checked;
3963 + });
3964 + if (checkedRadio) {
3965 + return checkedRadio === input;
3966 + }
3967 + return candidates.find((candidate) => {
3968 + const radio = getNamedRadioInput(candidate);
3969 + return radio?.name === input.name && radio.form === input.form;
3970 + }) === input;
3971 + }
3972 + function getComposedChildren(container) {
3973 + if (isHTMLElement(container) && getNodeName(container) === "slot") {
3974 + const assignedElements = container.assignedElements({
3975 + flatten: true
3976 + });
3977 + if (assignedElements.length > 0) {
3978 + return assignedElements;
3979 + }
3980 + }
3981 + if (isHTMLElement(container) && container.shadowRoot) {
3982 + return Array.from(container.shadowRoot.children);
3983 + }
3984 + return Array.from(container.children);
3985 + }
3986 + function appendCandidates(container, list) {
3987 + getComposedChildren(container).forEach((child) => {
3988 + if (isFocusableCandidate(child)) {
3989 + list.push(child);
3990 + }
3991 + appendCandidates(child, list);
3992 + });
3993 + }
3994 + function appendMatchingElements(container, selector, list) {
3995 + getComposedChildren(container).forEach((child) => {
3996 + if (isHTMLElement(child) && child.matches(selector)) {
3997 + list.push(child);
3998 + }
3999 + appendMatchingElements(child, selector, list);
4000 + });
4001 + }
4002 + function focusable(container) {
4003 + const candidates = [];
4004 + appendCandidates(container, candidates);
4005 + return candidates.filter(isFocusableElement);
4006 + }
4007 + function tabbable(container) {
4008 + const candidates = focusable(container);
4009 + return candidates.filter((element) => getTabIndex(element) >= 0 && isTabbableRadio(element, candidates));
4010 + }
4011 + function getTabbableIn(container, dir) {
4012 + const list = tabbable(container);
4013 + const len = list.length;
4014 + if (len === 0) {
4015 + return void 0;
4016 + }
4017 + const active = activeElement(ownerDocument(container));
4018 + const index2 = list.indexOf(active);
4019 + const nextIndex = index2 === -1 ? dir === 1 ? 0 : len - 1 : index2 + dir;
4020 + return list[nextIndex];
4021 + }
4022 + function getNextTabbable(referenceElement) {
4023 + return getTabbableIn(ownerDocument(referenceElement).body, 1) || referenceElement;
4024 + }
4025 + function getPreviousTabbable(referenceElement) {
4026 + return getTabbableIn(ownerDocument(referenceElement).body, -1) || referenceElement;
4027 + }
4028 + function isOutsideEvent(event, container) {
4029 + const containerElement = container || event.currentTarget;
4030 + const relatedTarget = event.relatedTarget;
4031 + return !relatedTarget || !contains(containerElement, relatedTarget);
4032 + }
4033 + function disableFocusInside(container) {
4034 + const tabbableElements = tabbable(container);
4035 + tabbableElements.forEach((element) => {
4036 + element.dataset.tabindex = element.getAttribute("tabindex") || "";
4037 + element.setAttribute("tabindex", "-1");
4038 + });
4039 + }
4040 + function enableFocusInside(container) {
4041 + const elements = [];
4042 + appendMatchingElements(container, "[data-tabindex]", elements);
4043 + elements.forEach((element) => {
4044 + const tabindex = element.dataset.tabindex;
4045 + delete element.dataset.tabindex;
4046 + if (tabindex) {
4047 + element.setAttribute("tabindex", tabindex);
4048 + } else {
4049 + element.removeAttribute("tabindex");
4050 + }
4051 + });
4052 + }
4053 +
4054 + // node_modules/@base-ui/react/floating-ui-react/utils/nodes.mjs
4055 + function getNodeChildren(nodes, id, onlyOpenChildren = true) {
4056 + const directChildren = nodes.filter((node) => node.parentId === id);
4057 + return directChildren.flatMap((child) => [...!onlyOpenChildren || child.context?.open ? [child] : [], ...getNodeChildren(nodes, child.id, onlyOpenChildren)]);
4058 + }
4059 +
4060 + // node_modules/@base-ui/react/floating-ui-react/utils/createAttribute.mjs
4061 + function createAttribute(name2) {
4062 + return `data-base-ui-${name2}`;
4063 + }
4064 +
4065 + // node_modules/@base-ui/react/floating-ui-react/components/FloatingPortal.mjs
4066 + var React20 = __toESM(require_react(), 1);
4067 + var ReactDOM2 = __toESM(require_react_dom(), 1);
4068 +
4069 + // node_modules/@base-ui/react/internals/constants.mjs
4070 + var DISABLED_TRANSITIONS_STYLE = {
4071 + style: {
4072 + transition: "none"
4073 + }
4074 + };
4075 + var BASE_UI_SWIPE_IGNORE_ATTRIBUTE = "data-base-ui-swipe-ignore";
4076 + var LEGACY_SWIPE_IGNORE_ATTRIBUTE = "data-swipe-ignore";
4077 + var BASE_UI_SWIPE_IGNORE_SELECTOR = `[${BASE_UI_SWIPE_IGNORE_ATTRIBUTE}]`;
4078 + var LEGACY_SWIPE_IGNORE_SELECTOR = `[${LEGACY_SWIPE_IGNORE_ATTRIBUTE}]`;
4079 + var POPUP_COLLISION_AVOIDANCE = {
4080 + fallbackAxisSide: "end"
4081 + };
4082 + var ownerVisuallyHidden = {
4083 + clipPath: "inset(50%)",
4084 + position: "fixed",
4085 + top: 0,
4086 + left: 0
4087 + };
4088 +
4089 + // node_modules/@base-ui/react/floating-ui-react/components/FloatingPortal.mjs
4090 + var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
4091 + var PortalContext = /* @__PURE__ */ React20.createContext(null);
4092 + if (true) PortalContext.displayName = "PortalContext";
4093 + var usePortalContext = () => React20.useContext(PortalContext);
4094 + var attr = createAttribute("portal");
4095 + function useFloatingPortalNode(props = {}) {
4096 + const {
4097 + ref,
4098 + container: containerProp,
4099 + componentProps = EMPTY_OBJECT,
4100 + elementProps
4101 + } = props;
4102 + const uniqueId = useId();
4103 + const portalContext = usePortalContext();
4104 + const parentPortalNode = portalContext?.portalNode;
4105 + const [containerElement, setContainerElement] = React20.useState(null);
4106 + const [portalNode, setPortalNode] = React20.useState(null);
4107 + const setPortalNodeRef = useStableCallback((node) => {
4108 + if (node !== null) {
4109 + setPortalNode(node);
4110 + }
4111 + });
4112 + const containerRef = React20.useRef(null);
4113 + useIsoLayoutEffect(() => {
4114 + if (containerProp === null) {
4115 + if (containerRef.current) {
4116 + containerRef.current = null;
4117 + setPortalNode(null);
4118 + setContainerElement(null);
4119 + }
4120 + return;
4121 + }
4122 + const resolvedContainer = (containerProp && (isNode(containerProp) ? containerProp : containerProp.current)) ?? parentPortalNode ?? document.body;
4123 + if (resolvedContainer == null) {
4124 + if (containerRef.current) {
4125 + containerRef.current = null;
4126 + setPortalNode(null);
4127 + setContainerElement(null);
4128 + }
4129 + return;
4130 + }
4131 + if (containerRef.current !== resolvedContainer) {
4132 + containerRef.current = resolvedContainer;
4133 + setPortalNode(null);
4134 + setContainerElement(resolvedContainer);
4135 + }
4136 + }, [containerProp, parentPortalNode]);
4137 + const portalElement = useRenderElement("div", componentProps, {
4138 + ref: [ref, setPortalNodeRef],
4139 + props: [{
4140 + id: uniqueId,
4141 + [attr]: ""
4142 + }, elementProps]
4143 + });
4144 + const portalSubtree = containerElement && portalElement ? /* @__PURE__ */ ReactDOM2.createPortal(portalElement, containerElement) : null;
4145 + return {
4146 + node: portalNode,
4147 + // `id` and `render` props can override or remove the generated ID. Use the exact
4148 + // rendered value so `aria-owns` never points at an ID absent from the DOM.
4149 + nodeId: /* @__PURE__ */ React20.isValidElement(portalElement) ? portalElement.props.id : void 0,
4150 + subtree: portalSubtree
4151 + };
4152 + }
4153 + var FloatingPortal = /* @__PURE__ */ React20.forwardRef(function FloatingPortal2(componentProps, forwardedRef) {
4154 + const {
4155 + render,
4156 + className,
4157 + style,
4158 + children,
4159 + container,
4160 + portalOwnerRole,
4161 + ...elementProps
4162 + } = componentProps;
4163 + const {
4164 + node: portalNode,
4165 + nodeId: portalNodeId,
4166 + subtree: portalSubtree
4167 + } = useFloatingPortalNode({
4168 + container,
4169 + ref: forwardedRef,
4170 + componentProps,
4171 + elementProps
4172 + });
4173 + const beforeOutsideRef = React20.useRef(null);
4174 + const afterOutsideRef = React20.useRef(null);
4175 + const beforeInsideRef = React20.useRef(null);
4176 + const afterInsideRef = React20.useRef(null);
4177 + const [focusManagerState, setFocusManagerState] = React20.useState(null);
4178 + const focusInsideDisabledRef = React20.useRef(false);
4179 + const modal = focusManagerState?.modal;
4180 + const open3 = focusManagerState?.open;
4181 + const shouldRenderGuards = !!focusManagerState && !focusManagerState.modal && focusManagerState.open && !!portalNode;
4182 + React20.useEffect(() => {
4183 + if (!portalNode || modal) {
4184 + return void 0;
4185 + }
4186 + function onFocus(event) {
4187 + if (portalNode && event.relatedTarget && isOutsideEvent(event)) {
4188 + if (event.type === "focusin") {
4189 + if (focusInsideDisabledRef.current) {
4190 + enableFocusInside(portalNode);
4191 + focusInsideDisabledRef.current = false;
4192 + }
4193 + } else {
4194 + disableFocusInside(portalNode);
4195 + focusInsideDisabledRef.current = true;
4196 + }
4197 + }
4198 + }
4199 + return mergeCleanups(addEventListener(portalNode, "focusin", onFocus, true), addEventListener(portalNode, "focusout", onFocus, true));
4200 + }, [portalNode, modal]);
4201 + useIsoLayoutEffect(() => {
4202 + if (!portalNode || open3 !== true || !focusInsideDisabledRef.current) {
4203 + return;
4204 + }
4205 + enableFocusInside(portalNode);
4206 + focusInsideDisabledRef.current = false;
4207 + }, [open3, portalNode]);
4208 + const portalContextValue = React20.useMemo(() => ({
4209 + beforeOutsideRef,
4210 + afterOutsideRef,
4211 + beforeInsideRef,
4212 + afterInsideRef,
4213 + portalNode,
4214 + setFocusManagerState
4215 + }), [portalNode]);
4216 + return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(React20.Fragment, {
4217 + children: [portalSubtree, /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(PortalContext.Provider, {
4218 + value: portalContextValue,
4219 + children: [shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(FocusGuard, {
4220 + "data-type": "outside",
4221 + ref: beforeOutsideRef,
4222 + onFocus: (event) => {
4223 + if (isOutsideEvent(event, portalNode)) {
4224 + beforeInsideRef.current?.focus();
4225 + } else {
4226 + const domReference = focusManagerState ? focusManagerState.domReference : null;
4227 + const prevTabbable = getPreviousTabbable(domReference);
4228 + prevTabbable?.focus();
4229 + }
4230 + }
4231 + }), shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", {
4232 + role: portalOwnerRole,
4233 + "aria-owns": portalNodeId,
4234 + style: ownerVisuallyHidden
4235 + }), portalNode && /* @__PURE__ */ ReactDOM2.createPortal(children, portalNode), shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(FocusGuard, {
4236 + "data-type": "outside",
4237 + ref: afterOutsideRef,
4238 + onFocus: (event) => {
4239 + if (isOutsideEvent(event, portalNode)) {
4240 + afterInsideRef.current?.focus();
4241 + } else {
4242 + const domReference = focusManagerState ? focusManagerState.domReference : null;
4243 + const nextTabbable = getNextTabbable(domReference);
4244 + nextTabbable?.focus();
4245 + if (focusManagerState?.closeOnFocusOut) {
4246 + focusManagerState?.onOpenChange(false, createChangeEventDetails(reason_parts_exports.focusOut, event.nativeEvent));
4247 + }
4248 + }
4249 + }
4250 + })]
4251 + })]
4252 + });
4253 + });
4254 + if (true) FloatingPortal.displayName = "FloatingPortal";
4255 +
4256 + // node_modules/@base-ui/react/floating-ui-react/components/FloatingTree.mjs
4257 + var React21 = __toESM(require_react(), 1);
4258 +
4259 + // node_modules/@base-ui/react/floating-ui-react/utils/createEventEmitter.mjs
4260 + function createEventEmitter() {
4261 + const map = /* @__PURE__ */ new Map();
4262 + return {
4263 + emit(event, data) {
4264 + map.get(event)?.forEach((listener) => listener(data));
4265 + },
4266 + on(event, listener) {
4267 + if (!map.has(event)) {
4268 + map.set(event, /* @__PURE__ */ new Set());
4269 + }
4270 + map.get(event).add(listener);
4271 + },
4272 + off(event, listener) {
4273 + map.get(event)?.delete(listener);
4274 + }
4275 + };
4276 + }
4277 +
4278 + // node_modules/@base-ui/react/floating-ui-react/components/FloatingTree.mjs
4279 + var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
4280 + var FloatingNodeContext = /* @__PURE__ */ React21.createContext(null);
4281 + if (true) FloatingNodeContext.displayName = "FloatingNodeContext";
4282 + var FloatingTreeContext = /* @__PURE__ */ React21.createContext(null);
4283 + if (true) FloatingTreeContext.displayName = "FloatingTreeContext";
4284 + var useFloatingParentNodeId = () => React21.useContext(FloatingNodeContext)?.id || null;
4285 + var useFloatingTree = (externalTree) => {
4286 + const contextTree = React21.useContext(FloatingTreeContext);
4287 + return externalTree ?? contextTree;
4288 + };
4289 +
4290 + // node_modules/@base-ui/react/floating-ui-react/hooks/useClientPoint.mjs
4291 + var React22 = __toESM(require_react(), 1);
4292 + function createVirtualElement(domElement, data) {
4293 + let offsetX = null;
4294 + let offsetY = null;
4295 + let isAutoUpdateEvent = false;
4296 + return {
4297 + contextElement: domElement || void 0,
4298 + getBoundingClientRect() {
4299 + const domRect = domElement?.getBoundingClientRect() || {
4300 + width: 0,
4301 + height: 0,
4302 + x: 0,
4303 + y: 0
4304 + };
4305 + const isXAxis = data.axis === "x" || data.axis === "both";
4306 + const isYAxis = data.axis === "y" || data.axis === "both";
4307 + const canTrackCursorOnAutoUpdate = ["mouseenter", "mousemove"].includes(data.dataRef.current.openEvent?.type || "") && data.pointerType !== "touch";
4308 + let width = domRect.width;
4309 + let height = domRect.height;
4310 + let x = domRect.x;
4311 + let y = domRect.y;
4312 + if (offsetX == null && data.x && isXAxis) {
4313 + offsetX = domRect.x - data.x;
4314 + }
4315 + if (offsetY == null && data.y && isYAxis) {
4316 + offsetY = domRect.y - data.y;
4317 + }
4318 + x -= offsetX || 0;
4319 + y -= offsetY || 0;
4320 + width = 0;
4321 + height = 0;
4322 + if (!isAutoUpdateEvent || canTrackCursorOnAutoUpdate) {
4323 + width = data.axis === "y" ? domRect.width : 0;
4324 + height = data.axis === "x" ? domRect.height : 0;
4325 + x = isXAxis && data.x != null ? data.x : x;
4326 + y = isYAxis && data.y != null ? data.y : y;
4327 + } else if (isAutoUpdateEvent && !canTrackCursorOnAutoUpdate) {
4328 + height = data.axis === "x" ? domRect.height : height;
4329 + width = data.axis === "y" ? domRect.width : width;
4330 + }
4331 + isAutoUpdateEvent = true;
4332 + return {
4333 + width,
4334 + height,
4335 + x,
4336 + y,
4337 + top: y,
4338 + right: x + width,
4339 + bottom: y + height,
4340 + left: x
4341 + };
4342 + }
4343 + };
4344 + }
4345 + function isMouseBasedEvent(event) {
4346 + return event != null && event.clientX != null;
4347 + }
4348 + function useClientPoint(context, props = {}) {
4349 + const {
4350 + enabled = true,
4351 + axis = "both"
4352 + } = props;
4353 + const store3 = "rootStore" in context ? context.rootStore : context;
4354 + const open3 = store3.useState("open");
4355 + const floating = store3.useState("floatingElement");
4356 + const domReference = store3.useState("domReferenceElement");
4357 + const dataRef = store3.context.dataRef;
4358 + const initialRef = React22.useRef(false);
4359 + const cleanupListenerRef = React22.useRef(null);
4360 + const [pointerType, setPointerType] = React22.useState();
4361 + const [reactive, setReactive] = React22.useState([]);
4362 + const resetReference = useStableCallback((reference2) => {
4363 + store3.set("positionReference", reference2);
4364 + });
4365 + const setReference = useStableCallback((newX, newY, referenceElement) => {
4366 + if (initialRef.current) {
4367 + return;
4368 + }
4369 + if (dataRef.current.openEvent && !isMouseBasedEvent(dataRef.current.openEvent)) {
4370 + return;
4371 + }
4372 + store3.set("positionReference", createVirtualElement(referenceElement ?? domReference, {
4373 + x: newX,
4374 + y: newY,
4375 + axis,
4376 + dataRef,
4377 + pointerType
4378 + }));
4379 + });
4380 + const handleReferenceEnterOrMove = useStableCallback((event) => {
4381 + if (!open3) {
4382 + setReference(event.clientX, event.clientY, event.currentTarget);
4383 + } else if (!cleanupListenerRef.current) {
4384 + setReference(event.clientX, event.clientY, event.currentTarget);
4385 + setReactive([]);
4386 + }
4387 + });
4388 + const openCheck = isMouseLikePointerType(pointerType) ? floating : open3;
4389 + React22.useEffect(() => {
4390 + if (!enabled) {
4391 + resetReference(domReference);
4392 + return void 0;
4393 + }
4394 + if (!openCheck) {
4395 + return void 0;
4396 + }
4397 + function cleanupListener() {
4398 + cleanupListenerRef.current?.();
4399 + cleanupListenerRef.current = null;
4400 + }
4401 + const win = getWindow(floating);
4402 + function handleMouseMove(event) {
4403 + const target = getTarget(event);
4404 + if (!contains(floating, target)) {
4405 + setReference(event.clientX, event.clientY);
4406 + } else {
4407 + cleanupListener();
4408 + }
4409 + }
4410 + if (!dataRef.current.openEvent || isMouseBasedEvent(dataRef.current.openEvent)) {
4411 + cleanupListenerRef.current = addEventListener(win, "mousemove", handleMouseMove);
4412 + } else {
4413 + resetReference(domReference);
4414 + }
4415 + return cleanupListener;
4416 + }, [openCheck, enabled, floating, dataRef, domReference, store3, setReference, resetReference, reactive]);
4417 + React22.useEffect(() => () => {
4418 + store3.set("positionReference", null);
4419 + }, [store3]);
4420 + React22.useEffect(() => {
4421 + if (enabled && !floating) {
4422 + initialRef.current = false;
4423 + }
4424 + }, [enabled, floating]);
4425 + React22.useEffect(() => {
4426 + if (!enabled && open3) {
4427 + initialRef.current = true;
4428 + }
4429 + }, [enabled, open3]);
4430 + const reference = React22.useMemo(() => {
4431 + function setPointerTypeRef(event) {
4432 + setPointerType(event.pointerType);
4433 + }
4434 + return {
4435 + onPointerDown: setPointerTypeRef,
4436 + onPointerEnter: setPointerTypeRef,
4437 + onMouseMove: handleReferenceEnterOrMove,
4438 + onMouseEnter: handleReferenceEnterOrMove
4439 + };
4440 + }, [handleReferenceEnterOrMove]);
4441 + return React22.useMemo(() => enabled ? {
4442 + reference,
4443 + trigger: reference
4444 + } : {}, [enabled, reference]);
4445 + }
4446 +
4447 + // node_modules/@base-ui/react/floating-ui-react/hooks/useDismiss.mjs
4448 + var React23 = __toESM(require_react(), 1);
4449 + function alwaysFalse() {
4450 + return false;
4451 + }
4452 + function normalizeProp(normalizable) {
4453 + return {
4454 + escapeKey: typeof normalizable === "boolean" ? normalizable : normalizable?.escapeKey ?? false,
4455 + outsidePress: typeof normalizable === "boolean" ? normalizable : normalizable?.outsidePress ?? true
4456 + };
4457 + }
4458 + function useDismiss(context, props = {}) {
4459 + const {
4460 + enabled = true,
4461 + escapeKey: escapeKey2 = true,
4462 + outsidePress: outsidePressProp = true,
4463 + outsidePressEvent = "sloppy",
4464 + referencePress = alwaysFalse,
4465 + bubbles,
4466 + externalTree
4467 + } = props;
4468 + const store3 = "rootStore" in context ? context.rootStore : context;
4469 + const open3 = store3.useState("open");
4470 + const floatingElement = store3.useState("floatingElement");
4471 + const {
4472 + dataRef,
4473 + events
4474 + } = store3.context;
4475 + const tree = useFloatingTree(externalTree);
4476 + const outsidePressFn = useStableCallback(typeof outsidePressProp === "function" ? outsidePressProp : () => false);
4477 + const outsidePress2 = typeof outsidePressProp === "function" ? outsidePressFn : outsidePressProp;
4478 + const outsidePressEnabled = outsidePress2 !== false;
4479 + const getOutsidePressEventProp = useStableCallback(() => outsidePressEvent);
4480 + const {
4481 + escapeKey: escapeKeyBubbles,
4482 + outsidePress: outsidePressBubbles
4483 + } = normalizeProp(bubbles);
4484 + const pressStartedInsideRef = React23.useRef(false);
4485 + const pressStartPreventedRef = React23.useRef(false);
4486 + const suppressNextOutsideClickRef = React23.useRef(false);
4487 + const sawPressWhileOpenRef = React23.useRef(false);
4488 + const isComposingRef = React23.useRef(false);
4489 + const currentPointerTypeRef = React23.useRef("");
4490 + const touchStateRef = React23.useRef(null);
4491 + const cancelDismissOnEndTimeout = useTimeout();
4492 + const clearInsideReactTreeTimeout = useTimeout();
4493 + const clearInsideReactTree = useStableCallback(() => {
4494 + clearInsideReactTreeTimeout.clear();
4495 + dataRef.current.insideReactTree = false;
4496 + });
4497 + const hasBlockingChild = useStableCallback((bubbleKey) => {
4498 + const nodeId = dataRef.current.floatingContext?.nodeId;
4499 + const children = tree ? getNodeChildren(tree.nodesRef.current, nodeId) : [];
4500 + return children.some((child) => child.context?.open && !child.context.dataRef.current[bubbleKey]);
4501 + });
4502 + const isEventWithinOwnElements = useStableCallback((event) => {
4503 + return isEventTargetWithin(event, store3.select("floatingElement")) || isEventTargetWithin(event, store3.select("domReferenceElement"));
4504 + });
4505 + const closeOnReferencePress = useStableCallback((event) => {
4506 + if (!referencePress()) {
4507 + return;
4508 + }
4509 + store3.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerPress, event.nativeEvent));
4510 + });
4511 + const closeOnEscapeKeyDown = useStableCallback((event) => {
4512 + if (!open3 || !enabled || !escapeKey2 || event.key !== "Escape") {
4513 + return;
4514 + }
4515 + if (isComposingRef.current) {
4516 + return;
4517 + }
4518 + if (!escapeKeyBubbles && hasBlockingChild("__escapeKeyBubbles")) {
4519 + return;
4520 + }
4521 + const native = isReactEvent(event) ? event.nativeEvent : event;
4522 + const eventDetails = createChangeEventDetails(reason_parts_exports.escapeKey, native);
4523 + store3.setOpen(false, eventDetails);
4524 + if (!eventDetails.isCanceled) {
4525 + event.preventDefault();
4526 + }
4527 + if (!escapeKeyBubbles && !eventDetails.isPropagationAllowed) {
4528 + event.stopPropagation();
4529 + }
4530 + });
4531 + const markInsideReactTree = useStableCallback(() => {
4532 + dataRef.current.insideReactTree = true;
4533 + clearInsideReactTreeTimeout.start(0, clearInsideReactTree);
4534 + });
4535 + const markPressStartedInsideReactTree = useStableCallback((event) => {
4536 + if (!open3 || !enabled || event.button !== 0) {
4537 + return;
4538 + }
4539 + const target = getTarget(event.nativeEvent);
4540 + if (!contains(store3.select("floatingElement"), target)) {
4541 + return;
4542 + }
4543 + if (!pressStartedInsideRef.current) {
4544 + pressStartedInsideRef.current = true;
4545 + pressStartPreventedRef.current = false;
4546 + }
4547 + });
4548 + const markInsidePressStartPrevented = useStableCallback((event) => {
4549 + if (!open3 || !enabled) {
4550 + return;
4551 + }
4552 + if (!(event.defaultPrevented || event.nativeEvent.defaultPrevented)) {
4553 + return;
4554 + }
4555 + if (pressStartedInsideRef.current) {
4556 + pressStartPreventedRef.current = true;
4557 + }
4558 + });
4559 + React23.useEffect(() => {
4560 + function handleOpenChange(details) {
4561 + if (!details.open) {
4562 + sawPressWhileOpenRef.current = false;
4563 + }
4564 + }
4565 + events.on("openchange", handleOpenChange);
4566 + return () => {
4567 + events.off("openchange", handleOpenChange);
4568 + };
4569 + }, [events]);
4570 + React23.useEffect(() => {
4571 + if (!open3 || !enabled) {
4572 + if (!open3) {
4573 + sawPressWhileOpenRef.current = false;
4574 + }
4575 + return clearInsideReactTree;
4576 + }
4577 + dataRef.current.__escapeKeyBubbles = escapeKeyBubbles;
4578 + dataRef.current.__outsidePressBubbles = outsidePressBubbles;
4579 + const compositionTimeout = new Timeout();
4580 + const preventedPressSuppressionTimeout = new Timeout();
4581 + const doc = ownerDocument(floatingElement);
4582 + function handleCompositionStart() {
4583 + compositionTimeout.clear();
4584 + isComposingRef.current = true;
4585 + }
4586 + function handleCompositionEnd() {
4587 + compositionTimeout.start(
4588 + // 0ms or 1ms don't work in Safari. 5ms appears to consistently work.
4589 + // Only apply to WebKit for the test to remain 0ms.
4590 + parts_exports.engine.webkit ? 5 : 0,
4591 + () => {
4592 + isComposingRef.current = false;
4593 + }
4594 + );
4595 + }
4596 + function suppressImmediateOutsideClickAfterPreventedStart() {
4597 + suppressNextOutsideClickRef.current = true;
4598 + preventedPressSuppressionTimeout.start(0, () => {
4599 + suppressNextOutsideClickRef.current = false;
4600 + });
4601 + }
4602 + function resetPressStartState() {
4603 + pressStartedInsideRef.current = false;
4604 + pressStartPreventedRef.current = false;
4605 + }
4606 + function getOutsidePressEvent() {
4607 + const type = currentPointerTypeRef.current;
4608 + const computedType = type === "pen" || !type ? "mouse" : type;
4609 + const outsidePressEventValue = getOutsidePressEventProp();
4610 + const resolved = typeof outsidePressEventValue === "function" ? outsidePressEventValue() : outsidePressEventValue;
4611 + if (typeof resolved === "string") {
4612 + return resolved;
4613 + }
4614 + return resolved[computedType];
4615 + }
4616 + function shouldIgnoreEvent(event) {
4617 + const computedOutsidePressEvent = getOutsidePressEvent();
4618 + return computedOutsidePressEvent === "intentional" && event.type !== "click" || computedOutsidePressEvent === "sloppy" && event.type === "click";
4619 + }
4620 + function isEventWithinFloatingTree(event) {
4621 + const nodeId = dataRef.current.floatingContext?.nodeId;
4622 + const targetIsInsideChildren = tree && getNodeChildren(tree.nodesRef.current, nodeId).some((node) => isEventTargetWithin(event, node.context?.elements.floating));
4623 + return isEventWithinOwnElements(event) || targetIsInsideChildren;
4624 + }
4625 + function closeOnPressOutside(event) {
4626 + if (shouldIgnoreEvent(event)) {
4627 + if (event.type !== "click" && !isEventWithinOwnElements(event)) {
4628 + preventedPressSuppressionTimeout.clear();
4629 + suppressNextOutsideClickRef.current = false;
4630 + }
4631 + clearInsideReactTree();
4632 + return;
4633 + }
4634 + if (dataRef.current.insideReactTree) {
4635 + clearInsideReactTree();
4636 + return;
4637 + }
4638 + const target = getTarget(event);
4639 + const inertSelector = `[${createAttribute("inert")}]`;
4640 + const targetRoot = isElement(target) ? target.getRootNode() : null;
4641 + const markers = Array.from((isShadowRoot(targetRoot) ? targetRoot : ownerDocument(store3.select("floatingElement"))).querySelectorAll(inertSelector));
4642 + const triggers = store3.context.triggerElements;
4643 + if (target && (triggers.hasElement(target) || triggers.hasMatchingElement((trigger) => contains(trigger, target)))) {
4644 + return;
4645 + }
4646 + let targetRootAncestor = isElement(target) ? target : null;
4647 + while (targetRootAncestor && !isLastTraversableNode(targetRootAncestor)) {
4648 + const nextParent = getParentNode(targetRootAncestor);
4649 + if (isLastTraversableNode(nextParent) || !isElement(nextParent)) {
4650 + break;
4651 + }
4652 + targetRootAncestor = nextParent;
4653 + }
4654 + if (markers.length && isElement(target) && !isRootElement(target) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
4655 + !contains(target, store3.select("floatingElement")) && // If the target root element contains none of the markers, then the
4656 + // element was injected after the floating element rendered.
4657 + markers.every((marker) => !contains(targetRootAncestor, marker))) {
4658 + return;
4659 + }
4660 + if (isHTMLElement(target) && !("touches" in event)) {
4661 + const lastTraversableNode = isLastTraversableNode(target);
4662 + const style = getComputedStyle2(target);
4663 + const scrollRe = /auto|scroll/;
4664 + const isScrollableX = lastTraversableNode || scrollRe.test(style.overflowX);
4665 + const isScrollableY = lastTraversableNode || scrollRe.test(style.overflowY);
4666 + const canScrollX = isScrollableX && target.clientWidth > 0 && target.scrollWidth > target.clientWidth;
4667 + const canScrollY = isScrollableY && target.clientHeight > 0 && target.scrollHeight > target.clientHeight;
4668 + const isRTL6 = style.direction === "rtl";
4669 + const pressedVerticalScrollbar = canScrollY && (isRTL6 ? event.offsetX <= target.offsetWidth - target.clientWidth : event.offsetX > target.clientWidth);
4670 + const pressedHorizontalScrollbar = canScrollX && event.offsetY > target.clientHeight;
4671 + if (pressedVerticalScrollbar || pressedHorizontalScrollbar) {
4672 + return;
4673 + }
4674 + }
4675 + if (isEventWithinFloatingTree(event)) {
4676 + return;
4677 + }
4678 + if (getOutsidePressEvent() === "intentional") {
4679 + if (event.detail !== 0 && !isVirtualClick(event) && !sawPressWhileOpenRef.current) {
4680 + return;
4681 + }
4682 + if (suppressNextOutsideClickRef.current) {
4683 + preventedPressSuppressionTimeout.clear();
4684 + suppressNextOutsideClickRef.current = false;
4685 + return;
4686 + }
4687 + }
4688 + if (typeof outsidePress2 === "function" && !outsidePress2(event)) {
4689 + return;
4690 + }
4691 + if (hasBlockingChild("__outsidePressBubbles")) {
4692 + return;
4693 + }
4694 + store3.setOpen(false, createChangeEventDetails(reason_parts_exports.outsidePress, event));
4695 + clearInsideReactTree();
4696 + }
4697 + function handlePointerDown(event) {
4698 + if (getOutsidePressEvent() !== "sloppy" || event.pointerType === "touch" || !store3.select("open") || !enabled || isEventWithinOwnElements(event)) {
4699 + return;
4700 + }
4701 + closeOnPressOutside(event);
4702 + }
4703 + function handleTouchStart(event) {
4704 + if (getOutsidePressEvent() !== "sloppy" || !store3.select("open") || !enabled || isEventWithinOwnElements(event)) {
4705 + return;
4706 + }
4707 + const touch = event.touches[0];
4708 + if (touch) {
4709 + touchStateRef.current = {
4710 + startTime: Date.now(),
4711 + startX: touch.clientX,
4712 + startY: touch.clientY,
4713 + dismissOnTouchEnd: false,
4714 + dismissOnMouseDown: true
4715 + };
4716 + cancelDismissOnEndTimeout.start(1e3, () => {
4717 + if (touchStateRef.current) {
4718 + touchStateRef.current.dismissOnTouchEnd = false;
4719 + touchStateRef.current.dismissOnMouseDown = false;
4720 + }
4721 + });
4722 + }
4723 + }
4724 + function addTargetEventListenerOnce(event, listener) {
4725 + const target = getTarget(event);
4726 + if (!target) {
4727 + return;
4728 + }
4729 + const unsubscribe2 = addEventListener(target, event.type, () => {
4730 + listener(event);
4731 + unsubscribe2();
4732 + });
4733 + }
4734 + function handleTouchStartCapture(event) {
4735 + currentPointerTypeRef.current = "touch";
4736 + addTargetEventListenerOnce(event, handleTouchStart);
4737 + }
4738 + function closeOnPressOutsideCapture(event) {
4739 + cancelDismissOnEndTimeout.clear();
4740 + if (event.type === "pointerdown") {
4741 + if (event.button === 0) {
4742 + sawPressWhileOpenRef.current = true;
4743 + }
4744 + currentPointerTypeRef.current = event.pointerType;
4745 + }
4746 + if (event.type === "mousedown" && touchStateRef.current && !touchStateRef.current.dismissOnMouseDown) {
4747 + return;
4748 + }
4749 + addTargetEventListenerOnce(event, (targetEvent) => {
4750 + if (targetEvent.type === "pointerdown") {
4751 + handlePointerDown(targetEvent);
4752 + } else {
4753 + closeOnPressOutside(targetEvent);
4754 + }
4755 + });
4756 + }
4757 + function handlePressEndCapture(event) {
4758 + if (event.type === "pointercancel") {
4759 + sawPressWhileOpenRef.current = false;
4760 + }
4761 + if (!pressStartedInsideRef.current) {
4762 + return;
4763 + }
4764 + const pressStartedInsideDefaultPrevented = pressStartPreventedRef.current;
4765 + resetPressStartState();
4766 + if (getOutsidePressEvent() !== "intentional") {
4767 + return;
4768 + }
4769 + if (event.type === "pointercancel") {
4770 + if (pressStartedInsideDefaultPrevented) {
4771 + suppressImmediateOutsideClickAfterPreventedStart();
4772 + }
4773 + return;
4774 + }
4775 + if (isEventWithinFloatingTree(event)) {
4776 + return;
4777 + }
4778 + if (pressStartedInsideDefaultPrevented) {
4779 + suppressImmediateOutsideClickAfterPreventedStart();
4780 + return;
4781 + }
4782 + if (typeof outsidePress2 === "function" && !outsidePress2(event)) {
4783 + return;
4784 + }
4785 + preventedPressSuppressionTimeout.clear();
4786 + suppressNextOutsideClickRef.current = true;
4787 + clearInsideReactTree();
4788 + }
4789 + function handleTouchMove(event) {
4790 + if (getOutsidePressEvent() !== "sloppy" || !touchStateRef.current || isEventWithinOwnElements(event)) {
4791 + return;
4792 + }
4793 + const touch = event.touches[0];
4794 + if (!touch) {
4795 + return;
4796 + }
4797 + const deltaX = Math.abs(touch.clientX - touchStateRef.current.startX);
4798 + const deltaY = Math.abs(touch.clientY - touchStateRef.current.startY);
4799 + const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
4800 + if (distance > 5) {
4801 + touchStateRef.current.dismissOnTouchEnd = true;
4802 + }
4803 + if (distance > 10) {
4804 + closeOnPressOutside(event);
4805 + cancelDismissOnEndTimeout.clear();
4806 + touchStateRef.current = null;
4807 + }
4808 + }
4809 + function handleTouchMoveCapture(event) {
4810 + addTargetEventListenerOnce(event, handleTouchMove);
4811 + }
4812 + function handleTouchEnd(event) {
4813 + if (getOutsidePressEvent() !== "sloppy" || !touchStateRef.current || isEventWithinOwnElements(event)) {
4814 + return;
4815 + }
4816 + if (touchStateRef.current.dismissOnTouchEnd) {
4817 + closeOnPressOutside(event);
4818 + }
4819 + cancelDismissOnEndTimeout.clear();
4820 + touchStateRef.current = null;
4821 + }
4822 + function handleTouchEndCapture(event) {
4823 + addTargetEventListenerOnce(event, handleTouchEnd);
4824 + }
4825 + const unsubscribe = mergeCleanups(escapeKey2 && mergeCleanups(addEventListener(doc, "keydown", closeOnEscapeKeyDown), addEventListener(doc, "compositionstart", handleCompositionStart), addEventListener(doc, "compositionend", handleCompositionEnd)), outsidePressEnabled && mergeCleanups(addEventListener(doc, "click", closeOnPressOutsideCapture, true), addEventListener(doc, "pointerdown", closeOnPressOutsideCapture, true), addEventListener(doc, "pointerup", handlePressEndCapture, true), addEventListener(doc, "pointercancel", handlePressEndCapture, true), addEventListener(doc, "mousedown", closeOnPressOutsideCapture, true), addEventListener(doc, "mouseup", handlePressEndCapture, true), addEventListener(doc, "touchstart", handleTouchStartCapture, {
4826 + capture: true,
4827 + passive: true
4828 + }), addEventListener(doc, "touchmove", handleTouchMoveCapture, {
4829 + capture: true,
4830 + passive: true
4831 + }), addEventListener(doc, "touchend", handleTouchEndCapture, {
4832 + capture: true,
4833 + passive: true
4834 + })));
4835 + return () => {
4836 + unsubscribe();
4837 + compositionTimeout.clear();
4838 + preventedPressSuppressionTimeout.clear();
4839 + resetPressStartState();
4840 + suppressNextOutsideClickRef.current = false;
4841 + clearInsideReactTree();
4842 + };
4843 + }, [dataRef, floatingElement, escapeKey2, outsidePressEnabled, outsidePress2, open3, enabled, escapeKeyBubbles, outsidePressBubbles, closeOnEscapeKeyDown, clearInsideReactTree, getOutsidePressEventProp, hasBlockingChild, isEventWithinOwnElements, tree, store3, cancelDismissOnEndTimeout]);
4844 + const reference = React23.useMemo(() => ({
4845 + onKeyDown: closeOnEscapeKeyDown,
4846 + onPointerDown: closeOnReferencePress,
4847 + onClick: closeOnReferencePress
4848 + }), [closeOnEscapeKeyDown, closeOnReferencePress]);
4849 + const floating = React23.useMemo(() => ({
4850 + onKeyDown: closeOnEscapeKeyDown,
4851 + // `onMouseDown` may be blocked if `event.preventDefault()` is called in
4852 + // `onPointerDown`, such as with <NumberField.ScrubArea>.
4853 + // See https://github.com/mui/base-ui/pull/3379
4854 + onPointerDown: markInsidePressStartPrevented,
4855 + onMouseDown: markInsidePressStartPrevented,
4856 + onClickCapture: markInsideReactTree,
4857 + onMouseDownCapture(event) {
4858 + markInsideReactTree();
4859 + markPressStartedInsideReactTree(event);
4860 + },
4861 + onPointerDownCapture(event) {
4862 + markInsideReactTree();
4863 + markPressStartedInsideReactTree(event);
4864 + },
4865 + onMouseUpCapture: markInsideReactTree,
4866 + onTouchEndCapture: markInsideReactTree,
4867 + onTouchMoveCapture: markInsideReactTree
4868 + }), [closeOnEscapeKeyDown, markInsideReactTree, markPressStartedInsideReactTree, markInsidePressStartPrevented]);
4869 + return React23.useMemo(() => enabled ? {
4870 + reference,
4871 + floating,
4872 + trigger: reference
4873 + } : {}, [enabled, reference, floating]);
4874 + }
4875 +
4876 + // node_modules/@base-ui/react/floating-ui-react/hooks/useFloating.mjs
4877 + var React31 = __toESM(require_react(), 1);
4878 +
4879 + // node_modules/@floating-ui/core/dist/floating-ui.core.mjs
4880 + function computeCoordsFromPlacement(_ref, placement, rtl) {
4881 + let {
4882 + reference,
4883 + floating
4884 + } = _ref;
4885 + const sideAxis = getSideAxis(placement);
4886 + const alignmentAxis = getAlignmentAxis(placement);
4887 + const alignLength = getAxisLength(alignmentAxis);
4888 + const side = getSide(placement);
4889 + const isVertical = sideAxis === "y";
4890 + const commonX = reference.x + reference.width / 2 - floating.width / 2;
4891 + const commonY = reference.y + reference.height / 2 - floating.height / 2;
4892 + const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
4893 + let coords;
4894 + switch (side) {
4895 + case "top":
4896 + coords = {
4897 + x: commonX,
4898 + y: reference.y - floating.height
4899 + };
4900 + break;
4901 + case "bottom":
4902 + coords = {
4903 + x: commonX,
4904 + y: reference.y + reference.height
4905 + };
4906 + break;
4907 + case "right":
4908 + coords = {
4909 + x: reference.x + reference.width,
4910 + y: commonY
4911 + };
4912 + break;
4913 + case "left":
4914 + coords = {
4915 + x: reference.x - floating.width,
4916 + y: commonY
4917 + };
4918 + break;
4919 + default:
4920 + coords = {
4921 + x: reference.x,
4922 + y: reference.y
4923 + };
4924 + }
4925 + const alignment = getAlignment(placement);
4926 + if (alignment) {
4927 + coords[alignmentAxis] += commonAlign * (alignment === "end" ? 1 : -1) * (rtl && isVertical ? -1 : 1);
4928 + }
4929 + return coords;
4930 + }
4931 + async function detectOverflow(state, options) {
4932 + var _await$platform$isEle;
4933 + if (options === void 0) {
4934 + options = {};
4935 + }
4936 + const {
4937 + x,
4938 + y,
4939 + platform: platform3,
4940 + rects,
4941 + elements,
4942 + strategy
4943 + } = state;
4944 + const {
4945 + boundary = "clippingAncestors",
4946 + rootBoundary = "viewport",
4947 + elementContext = "floating",
4948 + altBoundary = false,
4949 + padding = 0
4950 + } = evaluate(options, state);
4951 + const paddingObject = getPaddingObject(padding);
4952 + const altContext = elementContext === "floating" ? "reference" : "floating";
4953 + const element = elements[altBoundary ? altContext : elementContext];
4954 + const clippingClientRect = rectToClientRect(await platform3.getClippingRect({
4955 + element: ((_await$platform$isEle = await (platform3.isElement == null ? void 0 : platform3.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform3.getDocumentElement == null ? void 0 : platform3.getDocumentElement(elements.floating)),
4956 + boundary,
4957 + rootBoundary,
4958 + strategy
4959 + }));
4960 + const rect = elementContext === "floating" ? {
4961 + x,
4962 + y,
4963 + width: rects.floating.width,
4964 + height: rects.floating.height
4965 + } : rects.reference;
4966 + const offsetParent = await (platform3.getOffsetParent == null ? void 0 : platform3.getOffsetParent(elements.floating));
4967 + const offsetScale = await (platform3.isElement == null ? void 0 : platform3.isElement(offsetParent)) && await (platform3.getScale == null ? void 0 : platform3.getScale(offsetParent)) || {
4968 + x: 1,
4969 + y: 1
4970 + };
4971 + const elementClientRect = rectToClientRect(platform3.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform3.convertOffsetParentRelativeRectToViewportRelativeRect({
4972 + elements,
4973 + rect,
4974 + offsetParent,
4975 + strategy
4976 + }) : rect);
4977 + return {
4978 + top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
4979 + bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
4980 + left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
4981 + right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
4982 + };
4983 + }
4984 + var MAX_RESET_COUNT = 50;
4985 + var computePosition = async (reference, floating, config) => {
4986 + const {
4987 + placement = "bottom",
4988 + strategy = "absolute",
4989 + middleware = [],
4990 + platform: platform3
4991 + } = config;
4992 + const platformWithDetectOverflow = platform3.detectOverflow ? platform3 : {
4993 + ...platform3,
4994 + detectOverflow
4995 + };
4996 + const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(floating));
4997 + let rects = await platform3.getElementRects({
4998 + reference,
4999 + floating,
5000 + strategy
5001 + });
5002 + let {
5003 + x,
5004 + y
5005 + } = computeCoordsFromPlacement(rects, placement, rtl);
5006 + let statefulPlacement = placement;
5007 + let resetCount = 0;
5008 + const middlewareData = {};
5009 + for (let i = 0; i < middleware.length; i++) {
5010 + const currentMiddleware = middleware[i];
5011 + if (!currentMiddleware) {
5012 + continue;
5013 + }
5014 + const {
5015 + name: name2,
5016 + fn
5017 + } = currentMiddleware;
5018 + const {
5019 + x: nextX,
5020 + y: nextY,
5021 + data,
5022 + reset
5023 + } = await fn({
5024 + x,
5025 + y,
5026 + initialPlacement: placement,
5027 + placement: statefulPlacement,
5028 + strategy,
5029 + middlewareData,
5030 + rects,
5031 + platform: platformWithDetectOverflow,
5032 + elements: {
5033 + reference,
5034 + floating
5035 + }
5036 + });
5037 + x = nextX != null ? nextX : x;
5038 + y = nextY != null ? nextY : y;
5039 + middlewareData[name2] = {
5040 + ...middlewareData[name2],
5041 + ...data
5042 + };
5043 + if (reset && resetCount < MAX_RESET_COUNT) {
5044 + resetCount++;
5045 + if (typeof reset === "object") {
5046 + if (reset.placement) {
5047 + statefulPlacement = reset.placement;
5048 + }
5049 + if (reset.rects) {
5050 + rects = reset.rects === true ? await platform3.getElementRects({
5051 + reference,
5052 + floating,
5053 + strategy
5054 + }) : reset.rects;
5055 + }
5056 + ({
5057 + x,
5058 + y
5059 + } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
5060 + }
5061 + i = -1;
5062 + }
5063 + }
5064 + return {
5065 + x,
5066 + y,
5067 + placement: statefulPlacement,
5068 + strategy,
5069 + middlewareData
5070 + };
5071 + };
5072 + var flip = function(options) {
5073 + if (options === void 0) {
5074 + options = {};
5075 + }
5076 + return {
5077 + name: "flip",
5078 + options,
5079 + async fn(state) {
5080 + var _middlewareData$arrow, _middlewareData$flip;
5081 + const {
5082 + placement,
5083 + middlewareData,
5084 + rects,
5085 + initialPlacement,
5086 + platform: platform3,
5087 + elements
5088 + } = state;
5089 + const {
5090 + mainAxis: checkMainAxis = true,
5091 + crossAxis: checkCrossAxis = true,
5092 + fallbackPlacements: specifiedFallbackPlacements,
5093 + fallbackStrategy = "bestFit",
5094 + fallbackAxisSideDirection = "none",
5095 + flipAlignment = true,
5096 + ...detectOverflowOptions
5097 + } = evaluate(options, state);
5098 + if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
5099 + return {};
5100 + }
5101 + const side = getSide(placement);
5102 + const initialSideAxis = getSideAxis(initialPlacement);
5103 + const isBasePlacement = getSide(initialPlacement) === initialPlacement;
5104 + const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements.floating));
5105 + const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
5106 + const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
5107 + if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
5108 + fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
5109 + }
5110 + const placements2 = [initialPlacement, ...fallbackPlacements];
5111 + const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
5112 + const overflows = [];
5113 + let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
5114 + if (checkMainAxis) {
5115 + overflows.push(overflow[side]);
5116 + }
5117 + if (checkCrossAxis) {
5118 + const sides2 = getAlignmentSides(placement, rects, rtl);
5119 + overflows.push(overflow[sides2[0]], overflow[sides2[1]]);
5120 + }
5121 + overflowsData = [...overflowsData, {
5122 + placement,
5123 + overflows
5124 + }];
5125 + if (!overflows.every((side2) => side2 <= 0)) {
5126 + var _middlewareData$flip2, _overflowsData$filter;
5127 + const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
5128 + const nextPlacement = placements2[nextIndex];
5129 + if (nextPlacement) {
5130 + const ignoreCrossAxisOverflow = checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false;
5131 + if (!ignoreCrossAxisOverflow || // We leave the current main axis only if every placement on that axis
5132 + // overflows the main axis.
5133 + overflowsData.every((d) => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
5134 + return {
5135 + data: {
5136 + index: nextIndex,
5137 + overflows: overflowsData
5138 + },
5139 + reset: {
5140 + placement: nextPlacement
5141 + }
5142 + };
5143 + }
5144 + }
5145 + let resetPlacement = (_overflowsData$filter = overflowsData.filter((d) => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
5146 + if (!resetPlacement) {
5147 + switch (fallbackStrategy) {
5148 + case "bestFit": {
5149 + var _overflowsData$filter2;
5150 + const placement2 = (_overflowsData$filter2 = overflowsData.filter((d) => {
5151 + if (hasFallbackAxisSideDirection) {
5152 + const currentSideAxis = getSideAxis(d.placement);
5153 + return currentSideAxis === initialSideAxis || // Create a bias to the `y` side axis due to horizontal
5154 + // reading directions favoring greater width.
5155 + currentSideAxis === "y";
5156 + }
5157 + return true;
5158 + }).map((d) => [d.placement, d.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
5159 + if (placement2) {
5160 + resetPlacement = placement2;
5161 + }
5162 + break;
5163 + }
5164 + case "initialPlacement":
5165 + resetPlacement = initialPlacement;
5166 + break;
5167 + }
5168 + }
5169 + if (placement !== resetPlacement) {
5170 + return {
5171 + reset: {
5172 + placement: resetPlacement
5173 + }
5174 + };
5175 + }
5176 + }
5177 + return {};
5178 + }
5179 + };
5180 + };
5181 + var originSides = /* @__PURE__ */ new Set(["left", "top"]);
5182 + async function convertValueToCoords(state, options) {
5183 + const {
5184 + placement,
5185 + platform: platform3,
5186 + elements
5187 + } = state;
5188 + const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements.floating));
5189 + const side = getSide(placement);
5190 + const alignment = getAlignment(placement);
5191 + const isVertical = getSideAxis(placement) === "y";
5192 + const mainAxisMulti = originSides.has(side) ? -1 : 1;
5193 + const crossAxisMulti = rtl && isVertical ? -1 : 1;
5194 + const rawValue = evaluate(options, state);
5195 + let {
5196 + mainAxis,
5197 + crossAxis,
5198 + alignmentAxis
5199 + } = typeof rawValue === "number" ? {
5200 + mainAxis: rawValue,
5201 + crossAxis: 0,
5202 + alignmentAxis: null
5203 + } : {
5204 + mainAxis: rawValue.mainAxis || 0,
5205 + crossAxis: rawValue.crossAxis || 0,
5206 + alignmentAxis: rawValue.alignmentAxis
5207 + };
5208 + if (alignment && typeof alignmentAxis === "number") {
5209 + crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
5210 + }
5211 + return isVertical ? {
5212 + x: crossAxis * crossAxisMulti,
5213 + y: mainAxis * mainAxisMulti
5214 + } : {
5215 + x: mainAxis * mainAxisMulti,
5216 + y: crossAxis * crossAxisMulti
5217 + };
5218 + }
5219 + var offset = function(options) {
5220 + if (options === void 0) {
5221 + options = 0;
5222 + }
5223 + return {
5224 + name: "offset",
5225 + options,
5226 + async fn(state) {
5227 + var _middlewareData$offse, _middlewareData$arrow;
5228 + const {
5229 + x,
5230 + y,
5231 + placement,
5232 + middlewareData
5233 + } = state;
5234 + const diffCoords = await convertValueToCoords(state, options);
5235 + if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
5236 + return {};
5237 + }
5238 + return {
5239 + x: x + diffCoords.x,
5240 + y: y + diffCoords.y,
5241 + data: {
5242 + ...diffCoords,
5243 + placement
5244 + }
5245 + };
5246 + }
5247 + };
5248 + };
5249 + var shift = function(options) {
5250 + if (options === void 0) {
5251 + options = {};
5252 + }
5253 + return {
5254 + name: "shift",
5255 + options,
5256 + async fn(state) {
5257 + const {
5258 + x,
5259 + y,
5260 + placement,
5261 + platform: platform3
5262 + } = state;
5263 + const {
5264 + mainAxis: checkMainAxis = true,
5265 + crossAxis: checkCrossAxis = false,
5266 + limiter = {
5267 + fn: (_ref) => {
5268 + let {
5269 + x: x2,
5270 + y: y2
5271 + } = _ref;
5272 + return {
5273 + x: x2,
5274 + y: y2
5275 + };
5276 + }
5277 + },
5278 + ...detectOverflowOptions
5279 + } = evaluate(options, state);
5280 + const coords = {
5281 + x,
5282 + y
5283 + };
5284 + const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
5285 + const crossAxis = getSideAxis(placement);
5286 + const mainAxis = getOppositeAxis(crossAxis);
5287 + let mainAxisCoord = coords[mainAxis];
5288 + let crossAxisCoord = coords[crossAxis];
5289 + const clampCoord = (axis, coord) => clamp(coord + overflow[axis === "y" ? "top" : "left"], coord, coord - overflow[axis === "y" ? "bottom" : "right"]);
5290 + if (checkMainAxis) {
5291 + mainAxisCoord = clampCoord(mainAxis, mainAxisCoord);
5292 + }
5293 + if (checkCrossAxis) {
5294 + crossAxisCoord = clampCoord(crossAxis, crossAxisCoord);
5295 + }
5296 + const limitedCoords = limiter.fn({
5297 + ...state,
5298 + [mainAxis]: mainAxisCoord,
5299 + [crossAxis]: crossAxisCoord
5300 + });
5301 + return {
5302 + ...limitedCoords,
5303 + data: {
5304 + x: limitedCoords.x - x,
5305 + y: limitedCoords.y - y,
5306 + enabled: {
5307 + [mainAxis]: checkMainAxis,
5308 + [crossAxis]: checkCrossAxis
5309 + }
5310 + }
5311 + };
5312 + }
5313 + };
5314 + };
5315 + var limitShift = function(options) {
5316 + if (options === void 0) {
5317 + options = {};
5318 + }
5319 + return {
5320 + options,
5321 + fn(state) {
5322 + var _rawOffset$mainAxis, _rawOffset$crossAxis;
5323 + const {
5324 + x,
5325 + y,
5326 + placement,
5327 + rects,
5328 + middlewareData
5329 + } = state;
5330 + const {
5331 + offset: offset4 = 0,
5332 + mainAxis: checkMainAxis = true,
5333 + crossAxis: checkCrossAxis = true
5334 + } = evaluate(options, state);
5335 + const coords = {
5336 + x,
5337 + y
5338 + };
5339 + const crossAxis = getSideAxis(placement);
5340 + const mainAxis = getOppositeAxis(crossAxis);
5341 + let mainAxisCoord = coords[mainAxis];
5342 + let crossAxisCoord = coords[crossAxis];
5343 + const rawOffset = evaluate(offset4, state);
5344 + const computedOffset = typeof rawOffset === "number" ? {
5345 + mainAxis: rawOffset,
5346 + crossAxis: 0
5347 + } : {
5348 + mainAxis: (_rawOffset$mainAxis = rawOffset.mainAxis) != null ? _rawOffset$mainAxis : 0,
5349 + crossAxis: (_rawOffset$crossAxis = rawOffset.crossAxis) != null ? _rawOffset$crossAxis : 0
5350 + };
5351 + if (checkMainAxis) {
5352 + const len = mainAxis === "y" ? "height" : "width";
5353 + const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
5354 + const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
5355 + if (mainAxisCoord < limitMin) {
5356 + mainAxisCoord = limitMin;
5357 + } else if (mainAxisCoord > limitMax) {
5358 + mainAxisCoord = limitMax;
5359 + }
5360 + }
5361 + if (checkCrossAxis) {
5362 + var _middlewareData$offse, _middlewareData$offse2;
5363 + const len = mainAxis === "y" ? "width" : "height";
5364 + const isOriginSide = originSides.has(getSide(placement));
5365 + const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
5366 + const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
5367 + if (crossAxisCoord < limitMin) {
5368 + crossAxisCoord = limitMin;
5369 + } else if (crossAxisCoord > limitMax) {
5370 + crossAxisCoord = limitMax;
5371 + }
5372 + }
5373 + return {
5374 + [mainAxis]: mainAxisCoord,
5375 + [crossAxis]: crossAxisCoord
5376 + };
5377 + }
5378 + };
5379 + };
5380 + var size = function(options) {
5381 + if (options === void 0) {
5382 + options = {};
5383 + }
5384 + return {
5385 + name: "size",
5386 + options,
5387 + async fn(state) {
5388 + const {
5389 + placement,
5390 + rects,
5391 + platform: platform3,
5392 + elements
5393 + } = state;
5394 + const {
5395 + apply = () => {
5396 + },
5397 + ...detectOverflowOptions
5398 + } = evaluate(options, state);
5399 + const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
5400 + const side = getSide(placement);
5401 + const alignment = getAlignment(placement);
5402 + const isYAxis = getSideAxis(placement) === "y";
5403 + const {
5404 + width,
5405 + height
5406 + } = rects.floating;
5407 + let heightSide;
5408 + let widthSide;
5409 + if (side === "top" || side === "bottom") {
5410 + heightSide = side;
5411 + widthSide = alignment === (await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements.floating)) ? "start" : "end") ? "left" : "right";
5412 + } else {
5413 + widthSide = side;
5414 + heightSide = alignment === "end" ? "top" : "bottom";
5415 + }
5416 + const maximumClippingHeight = height - overflow.top - overflow.bottom;
5417 + const maximumClippingWidth = width - overflow.left - overflow.right;
5418 + const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
5419 + const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
5420 + const shiftData = state.middlewareData.shift;
5421 + const noShift = !shiftData;
5422 + let availableHeight2 = overflowAvailableHeight;
5423 + let availableWidth2 = overflowAvailableWidth;
5424 + if (shiftData != null && shiftData.enabled.x) {
5425 + availableWidth2 = maximumClippingWidth;
5426 + }
5427 + if (shiftData != null && shiftData.enabled.y) {
5428 + availableHeight2 = maximumClippingHeight;
5429 + }
5430 + if (noShift && !alignment) {
5431 + if (isYAxis) {
5432 + availableWidth2 = width - 2 * max(overflow.left, overflow.right);
5433 + } else {
5434 + availableHeight2 = height - 2 * max(overflow.top, overflow.bottom);
5435 + }
5436 + }
5437 + await apply({
5438 + ...state,
5439 + availableWidth: availableWidth2,
5440 + availableHeight: availableHeight2
5441 + });
5442 + const nextDimensions = await platform3.getDimensions(elements.floating);
5443 + if (width !== nextDimensions.width || height !== nextDimensions.height) {
5444 + return {
5445 + reset: {
5446 + rects: true
5447 + }
5448 + };
5449 + }
5450 + return {};
5451 + }
5452 + };
5453 + };
5454 +
5455 + // node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
5456 + function getCssDimensions(element) {
5457 + const css = getComputedStyle2(element);
5458 + let width = parseFloat(css.width) || 0;
5459 + let height = parseFloat(css.height) || 0;
5460 + const hasOffset = isHTMLElement(element);
5461 + const offsetWidth = hasOffset ? element.offsetWidth : width;
5462 + const offsetHeight = hasOffset ? element.offsetHeight : height;
5463 + const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
5464 + if (shouldFallback) {
5465 + width = offsetWidth;
5466 + height = offsetHeight;
5467 + }
5468 + return {
5469 + width,
5470 + height,
5471 + $: shouldFallback
5472 + };
5473 + }
5474 + function unwrapElement(element) {
5475 + return !isElement(element) ? element.contextElement : element;
5476 + }
5477 + function getScale(element) {
5478 + const domElement = unwrapElement(element);
5479 + if (!isHTMLElement(domElement)) {
5480 + return createCoords(1);
5481 + }
5482 + const rect = domElement.getBoundingClientRect();
5483 + const {
5484 + width,
5485 + height,
5486 + $
5487 + } = getCssDimensions(domElement);
5488 + let x = ($ ? round(rect.width) : rect.width) / width;
5489 + let y = ($ ? round(rect.height) : rect.height) / height;
5490 + if (!x || !Number.isFinite(x)) {
5491 + x = 1;
5492 + }
5493 + if (!y || !Number.isFinite(y)) {
5494 + y = 1;
5495 + }
5496 + return {
5497 + x,
5498 + y
5499 + };
5500 + }
5501 + var noOffsets = /* @__PURE__ */ createCoords(0);
5502 + function getVisualOffsets(element) {
5503 + const win = getWindow(element);
5504 + if (!isWebKit() || !win.visualViewport) {
5505 + return noOffsets;
5506 + }
5507 + return {
5508 + x: win.visualViewport.offsetLeft,
5509 + y: win.visualViewport.offsetTop
5510 + };
5511 + }
5512 + function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
5513 + if (isFixed === void 0) {
5514 + isFixed = false;
5515 + }
5516 + return !!floatingOffsetParent && isFixed && floatingOffsetParent === getWindow(element);
5517 + }
5518 + function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
5519 + if (includeScale === void 0) {
5520 + includeScale = false;
5521 + }
5522 + if (isFixedStrategy === void 0) {
5523 + isFixedStrategy = false;
5524 + }
5525 + const clientRect = element.getBoundingClientRect();
5526 + const domElement = unwrapElement(element);
5527 + let scale = createCoords(1);
5528 + if (includeScale) {
5529 + if (offsetParent) {
5530 + if (isElement(offsetParent)) {
5531 + scale = getScale(offsetParent);
5532 + }
5533 + } else {
5534 + scale = getScale(element);
5535 + }
5536 + }
5537 + const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
5538 + let x = (clientRect.left + visualOffsets.x) / scale.x;
5539 + let y = (clientRect.top + visualOffsets.y) / scale.y;
5540 + let width = clientRect.width / scale.x;
5541 + let height = clientRect.height / scale.y;
5542 + if (domElement && offsetParent) {
5543 + const win = getWindow(domElement);
5544 + const offsetWin = isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
5545 + let currentWin = win;
5546 + let currentIFrame = getFrameElement(currentWin);
5547 + while (currentIFrame && offsetWin !== currentWin) {
5548 + const iframeScale = getScale(currentIFrame);
5549 + const iframeRect = currentIFrame.getBoundingClientRect();
5550 + const css = getComputedStyle2(currentIFrame);
5551 + const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
5552 + const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
5553 + x *= iframeScale.x;
5554 + y *= iframeScale.y;
5555 + width *= iframeScale.x;
5556 + height *= iframeScale.y;
5557 + x += left;
5558 + y += top;
5559 + currentWin = getWindow(currentIFrame);
5560 + currentIFrame = getFrameElement(currentWin);
5561 + }
5562 + }
5563 + return rectToClientRect({
5564 + width,
5565 + height,
5566 + x,
5567 + y
5568 + });
5569 + }
5570 + function getWindowScrollBarX(element, rect) {
5571 + const leftScroll = getNodeScroll(element).scrollLeft;
5572 + if (!rect) {
5573 + return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
5574 + }
5575 + return rect.left + leftScroll;
5576 + }
5577 + function getHTMLOffset(documentElement, scroll) {
5578 + const htmlRect = documentElement.getBoundingClientRect();
5579 + const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
5580 + const y = htmlRect.top + scroll.scrollTop;
5581 + return {
5582 + x,
5583 + y
5584 + };
5585 + }
5586 + function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
5587 + let {
5588 + elements,
5589 + rect,
5590 + offsetParent,
5591 + strategy
5592 + } = _ref;
5593 + const isFixed = strategy === "fixed";
5594 + const documentElement = getDocumentElement(offsetParent);
5595 + const topLayer = elements ? isTopLayer(elements.floating) : false;
5596 + if (offsetParent === documentElement || topLayer && isFixed) {
5597 + return rect;
5598 + }
5599 + let scroll = {
5600 + scrollLeft: 0,
5601 + scrollTop: 0
5602 + };
5603 + let scale = createCoords(1);
5604 + const offsets = createCoords(0);
5605 + const isOffsetParentAnElement = isHTMLElement(offsetParent);
5606 + if (isOffsetParentAnElement || !isFixed) {
5607 + if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
5608 + scroll = getNodeScroll(offsetParent);
5609 + }
5610 + if (isOffsetParentAnElement) {
5611 + const offsetRect = getBoundingClientRect(offsetParent);
5612 + scale = getScale(offsetParent);
5613 + offsets.x = offsetRect.x + offsetParent.clientLeft;
5614 + offsets.y = offsetRect.y + offsetParent.clientTop;
5615 + }
5616 + }
5617 + const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
5618 + return {
5619 + width: rect.width * scale.x,
5620 + height: rect.height * scale.y,
5621 + x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
5622 + y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
5623 + };
5624 + }
5625 + function getClientRects(element) {
5626 + return element.getClientRects ? Array.from(element.getClientRects()) : [];
5627 + }
5628 + function getDocumentRect(html) {
5629 + const scroll = getNodeScroll(html);
5630 + const body = html.ownerDocument.body;
5631 + const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
5632 + const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
5633 + let x = -scroll.scrollLeft + getWindowScrollBarX(html);
5634 + const y = -scroll.scrollTop;
5635 + if (getComputedStyle2(body).direction === "rtl") {
5636 + x += max(html.clientWidth, body.clientWidth) - width;
5637 + }
5638 + return {
5639 + width,
5640 + height,
5641 + x,
5642 + y
5643 + };
5644 + }
5645 + var SCROLLBAR_MAX = 25;
5646 + function getViewportRect(element, strategy, rootBoundary) {
5647 + if (rootBoundary === void 0) {
5648 + rootBoundary = "viewport";
5649 + }
5650 + const isLayoutViewport = rootBoundary === "layoutViewport";
5651 + const win = getWindow(element);
5652 + const html = getDocumentElement(element);
5653 + const visualViewport = win.visualViewport;
5654 + let width = html.clientWidth;
5655 + let height = html.clientHeight;
5656 + let x = 0;
5657 + let y = 0;
5658 + if (visualViewport) {
5659 + const layoutRelativeClientCoords = !isWebKit() || strategy === "fixed";
5660 + if (isLayoutViewport) {
5661 + if (!layoutRelativeClientCoords) {
5662 + x = -visualViewport.offsetLeft;
5663 + y = -visualViewport.offsetTop;
5664 + }
5665 + } else {
5666 + width = visualViewport.width;
5667 + height = visualViewport.height;
5668 + if (layoutRelativeClientCoords) {
5669 + x = visualViewport.offsetLeft;
5670 + y = visualViewport.offsetTop;
5671 + }
5672 + }
5673 + }
5674 + const windowScrollbarX = getWindowScrollBarX(html);
5675 + if (windowScrollbarX <= 0) {
5676 + const doc = html.ownerDocument;
5677 + const body = doc.body;
5678 + const bodyStyles = getComputedStyle(body);
5679 + const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
5680 + const reservedWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
5681 + const gutter = getComputedStyle(html).scrollbarGutter === "stable both-edges" ? reservedWidth / 2 : reservedWidth;
5682 + if (gutter <= SCROLLBAR_MAX) {
5683 + width -= gutter;
5684 + }
5685 + }
5686 + return {
5687 + width,
5688 + height,
5689 + x,
5690 + y
5691 + };
5692 + }
5693 + function getInnerBoundingClientRect(element, strategy) {
5694 + const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
5695 + const top = clientRect.top + element.clientTop;
5696 + const left = clientRect.left + element.clientLeft;
5697 + const scale = getScale(element);
5698 + const width = element.clientWidth * scale.x;
5699 + const height = element.clientHeight * scale.y;
5700 + const x = left * scale.x;
5701 + const y = top * scale.y;
5702 + return {
5703 + width,
5704 + height,
5705 + x,
5706 + y
5707 + };
5708 + }
5709 + function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
5710 + let rect;
5711 + if (clippingAncestor === "viewport" || clippingAncestor === "layoutViewport") {
5712 + rect = getViewportRect(element, strategy, clippingAncestor);
5713 + } else if (clippingAncestor === "document") {
5714 + rect = getDocumentRect(getDocumentElement(element));
5715 + } else if (isElement(clippingAncestor)) {
5716 + rect = getInnerBoundingClientRect(clippingAncestor, strategy);
5717 + } else {
5718 + const visualOffsets = getVisualOffsets(element);
5719 + rect = {
5720 + x: clippingAncestor.x - visualOffsets.x,
5721 + y: clippingAncestor.y - visualOffsets.y,
5722 + width: clippingAncestor.width,
5723 + height: clippingAncestor.height
5724 + };
5725 + }
5726 + return rectToClientRect(rect);
5727 + }
5728 + function getClippingElementAncestors(element, cache) {
5729 + const cachedResult = cache.get(element);
5730 + if (cachedResult) {
5731 + return cachedResult;
5732 + }
5733 + let result = getOverflowAncestors(element, [], false).filter((el) => isElement(el) && getNodeName(el) !== "body");
5734 + let lastKeptComputedStyle = null;
5735 + const elementIsFixed = getComputedStyle2(element).position === "fixed";
5736 + let currentNode = elementIsFixed ? getParentNode(element) : element;
5737 + while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
5738 + const computedStyle = getComputedStyle2(currentNode);
5739 + const currentNodeIsContaining = isContainingBlock(currentNode);
5740 + const lastPosition = lastKeptComputedStyle ? lastKeptComputedStyle.position : elementIsFixed ? "fixed" : "";
5741 + const shouldDropCurrentNode = !currentNodeIsContaining && (lastPosition === "fixed" || lastPosition === "absolute" && computedStyle.position === "static");
5742 + if (shouldDropCurrentNode) {
5743 + result = result.filter((ancestor) => ancestor !== currentNode);
5744 + } else {
5745 + lastKeptComputedStyle = computedStyle;
5746 + }
5747 + currentNode = getParentNode(currentNode);
5748 + }
5749 + cache.set(element, result);
5750 + return result;
5751 + }
5752 + function getClippingRect(_ref) {
5753 + let {
5754 + element,
5755 + boundary,
5756 + rootBoundary,
5757 + strategy
5758 + } = _ref;
5759 + const elementClippingAncestors = boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
5760 + const clippingAncestors = [...elementClippingAncestors, rootBoundary];
5761 + const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
5762 + let top = firstRect.top;
5763 + let right = firstRect.right;
5764 + let bottom = firstRect.bottom;
5765 + let left = firstRect.left;
5766 + for (let i = 1; i < clippingAncestors.length; i++) {
5767 + const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
5768 + top = max(rect.top, top);
5769 + right = min(rect.right, right);
5770 + bottom = min(rect.bottom, bottom);
5771 + left = max(rect.left, left);
5772 + }
5773 + return {
5774 + width: right - left,
5775 + height: bottom - top,
5776 + x: left,
5777 + y: top
5778 + };
5779 + }
5780 + function getDimensions2(element) {
5781 + const {
5782 + width,
5783 + height
5784 + } = getCssDimensions(element);
5785 + return {
5786 + width,
5787 + height
5788 + };
5789 + }
5790 + function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
5791 + const isOffsetParentAnElement = isHTMLElement(offsetParent);
5792 + const documentElement = getDocumentElement(offsetParent);
5793 + const isFixed = strategy === "fixed";
5794 + const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
5795 + let scroll = {
5796 + scrollLeft: 0,
5797 + scrollTop: 0
5798 + };
5799 + const offsets = createCoords(0);
5800 + if (isOffsetParentAnElement || !isFixed) {
5801 + if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
5802 + scroll = getNodeScroll(offsetParent);
5803 + }
5804 + if (isOffsetParentAnElement) {
5805 + const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
5806 + offsets.x = offsetRect.x + offsetParent.clientLeft;
5807 + offsets.y = offsetRect.y + offsetParent.clientTop;
5808 + }
5809 + }
5810 + if (!isOffsetParentAnElement && documentElement) {
5811 + offsets.x = getWindowScrollBarX(documentElement);
5812 + }
5813 + const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
5814 + const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
5815 + const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
5816 + return {
5817 + x,
5818 + y,
5819 + width: rect.width,
5820 + height: rect.height
5821 + };
5822 + }
5823 + function isStaticPositioned(element) {
5824 + return getComputedStyle2(element).position === "static";
5825 + }
5826 + function getTrueOffsetParent(element, polyfill) {
5827 + if (!isHTMLElement(element) || getComputedStyle2(element).position === "fixed") {
5828 + return null;
5829 + }
5830 + if (polyfill) {
5831 + return polyfill(element);
5832 + }
5833 + let rawOffsetParent = element.offsetParent;
5834 + if (getDocumentElement(element) === rawOffsetParent) {
5835 + rawOffsetParent = rawOffsetParent.ownerDocument.body;
5836 + }
5837 + return rawOffsetParent;
5838 + }
5839 + function getOffsetParent(element, polyfill) {
5840 + const win = getWindow(element);
5841 + if (isTopLayer(element)) {
5842 + return win;
5843 + }
5844 + if (!isHTMLElement(element)) {
5845 + let svgOffsetParent = getParentNode(element);
5846 + while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
5847 + if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
5848 + return svgOffsetParent;
5849 + }
5850 + svgOffsetParent = getParentNode(svgOffsetParent);
5851 + }
5852 + return win;
5853 + }
5854 + let offsetParent = getTrueOffsetParent(element, polyfill);
5855 + while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
5856 + offsetParent = getTrueOffsetParent(offsetParent, polyfill);
5857 + }
5858 + if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
5859 + return win;
5860 + }
5861 + return offsetParent || getContainingBlock(element) || win;
5862 + }
5863 + var getElementRects = async function(data) {
5864 + const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
5865 + const getDimensionsFn = this.getDimensions;
5866 + const floatingDimensions = await getDimensionsFn(data.floating);
5867 + return {
5868 + reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
5869 + floating: {
5870 + x: 0,
5871 + y: 0,
5872 + width: floatingDimensions.width,
5873 + height: floatingDimensions.height
5874 + }
5875 + };
5876 + };
5877 + function isRTL(element) {
5878 + return getComputedStyle2(element).direction === "rtl";
5879 + }
5880 + var platform2 = {
5881 + convertOffsetParentRelativeRectToViewportRelativeRect,
5882 + getDocumentElement,
5883 + getClippingRect,
5884 + getOffsetParent,
5885 + getElementRects,
5886 + getClientRects,
5887 + getDimensions: getDimensions2,
5888 + getScale,
5889 + isElement,
5890 + isRTL
5891 + };
5892 + function rectsAreEqual(a, b) {
5893 + return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
5894 + }
5895 + function observeMove(element, onMove, ancestorResize) {
5896 + let io = null;
5897 + let timeoutId;
5898 + const root = getDocumentElement(element);
5899 + function cleanup() {
5900 + var _io;
5901 + clearTimeout(timeoutId);
5902 + (_io = io) == null || _io.disconnect();
5903 + io = null;
5904 + }
5905 + function refresh(skip, threshold) {
5906 + if (skip === void 0) {
5907 + skip = false;
5908 + }
5909 + if (threshold === void 0) {
5910 + threshold = 1;
5911 + }
5912 + cleanup();
5913 + const elementRectForRootMargin = element.getBoundingClientRect();
5914 + const {
5915 + left,
5916 + top,
5917 + width,
5918 + height
5919 + } = elementRectForRootMargin;
5920 + if (!skip) {
5921 + onMove();
5922 + }
5923 + if (!width || !height) {
5924 + return;
5925 + }
5926 + const insetTop = floor(top);
5927 + const insetRight = floor(root.clientWidth - (left + width));
5928 + const insetBottom = floor(root.clientHeight - (top + height));
5929 + const insetLeft = floor(left);
5930 + const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
5931 + const options = {
5932 + rootMargin,
5933 + threshold: max(0, min(1, threshold)) || 1
5934 + };
5935 + let isFirstUpdate = true;
5936 + function handleObserve(entries) {
5937 + const ratio = entries[0].intersectionRatio;
5938 + if (!rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
5939 + return refresh();
5940 + }
5941 + if (ratio !== threshold) {
5942 + if (!isFirstUpdate) {
5943 + return refresh();
5944 + }
5945 + if (!ratio) {
5946 + timeoutId = setTimeout(() => {
5947 + refresh(false, 1e-7);
5948 + }, 1e3);
5949 + } else {
5950 + refresh(false, ratio);
5951 + }
5952 + }
5953 + isFirstUpdate = false;
5954 + }
5955 + try {
5956 + io = new IntersectionObserver(handleObserve, {
5957 + ...options,
5958 + // Handle <iframe>s
5959 + root: root.ownerDocument
5960 + });
5961 + } catch (_e) {
5962 + io = new IntersectionObserver(handleObserve, options);
5963 + }
5964 + io.observe(element);
5965 + }
5966 + const win = getWindow(element);
5967 + const handleResize = () => refresh(ancestorResize);
5968 + win.addEventListener("resize", handleResize);
5969 + refresh(true);
5970 + return () => {
5971 + win.removeEventListener("resize", handleResize);
5972 + cleanup();
5973 + };
5974 + }
5975 + function autoUpdate(reference, floating, update2, options) {
5976 + if (options === void 0) {
5977 + options = {};
5978 + }
5979 + const {
5980 + ancestorScroll = true,
5981 + ancestorResize = true,
5982 + elementResize = typeof ResizeObserver === "function",
5983 + layoutShift = typeof IntersectionObserver === "function",
5984 + animationFrame = false
5985 + } = options;
5986 + const referenceEl = unwrapElement(reference);
5987 + const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...floating ? getOverflowAncestors(floating) : []] : [];
5988 + ancestors.forEach((ancestor) => {
5989 + ancestorScroll && ancestor.addEventListener("scroll", update2);
5990 + ancestorResize && ancestor.addEventListener("resize", update2);
5991 + });
5992 + const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update2, ancestorResize) : null;
5993 + let reobserveFrame = -1;
5994 + let resizeObserver = null;
5995 + if (elementResize) {
5996 + resizeObserver = new ResizeObserver((_ref) => {
5997 + let [firstEntry] = _ref;
5998 + if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
5999 + resizeObserver.unobserve(floating);
6000 + cancelAnimationFrame(reobserveFrame);
6001 + reobserveFrame = requestAnimationFrame(() => {
6002 + var _resizeObserver;
6003 + (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
6004 + });
6005 + }
6006 + update2();
6007 + });
6008 + if (referenceEl && !animationFrame) {
6009 + resizeObserver.observe(referenceEl);
6010 + }
6011 + if (floating) {
6012 + resizeObserver.observe(floating);
6013 + }
6014 + }
6015 + let frameId;
6016 + let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
6017 + if (animationFrame) {
6018 + frameLoop();
6019 + }
6020 + function frameLoop() {
6021 + const nextRefRect = getBoundingClientRect(reference);
6022 + if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
6023 + update2();
6024 + }
6025 + prevRefRect = nextRefRect;
6026 + frameId = requestAnimationFrame(frameLoop);
6027 + }
6028 + update2();
6029 + return () => {
6030 + var _resizeObserver2;
6031 + ancestors.forEach((ancestor) => {
6032 + ancestorScroll && ancestor.removeEventListener("scroll", update2);
6033 + ancestorResize && ancestor.removeEventListener("resize", update2);
6034 + });
6035 + cleanupIo == null || cleanupIo();
6036 + (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
6037 + resizeObserver = null;
6038 + if (animationFrame) {
6039 + cancelAnimationFrame(frameId);
6040 + }
6041 + };
6042 + }
6043 + var offset2 = offset;
6044 + var shift2 = shift;
6045 + var flip2 = flip;
6046 + var size2 = size;
6047 + var limitShift2 = limitShift;
6048 + var computePosition2 = (reference, floating, options) => {
6049 + const cache = /* @__PURE__ */ new Map();
6050 + const mergedOptions = options != null ? options : {};
6051 + const platformWithCache = {
6052 + ...platform2,
6053 + ...mergedOptions.platform,
6054 + _c: cache
6055 + };
6056 + return computePosition(reference, floating, {
6057 + ...mergedOptions,
6058 + platform: platformWithCache
6059 + });
6060 + };
6061 +
6062 + // node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
6063 + var React24 = __toESM(require_react(), 1);
6064 + var import_react2 = __toESM(require_react(), 1);
6065 + var ReactDOM3 = __toESM(require_react_dom(), 1);
6066 + var isClient = typeof document !== "undefined";
6067 + var noop2 = function noop3() {
6068 + };
6069 + var index = isClient ? import_react2.useLayoutEffect : noop2;
6070 + function deepEqual(a, b) {
6071 + if (a === b) {
6072 + return true;
6073 + }
6074 + if (typeof a !== typeof b) {
6075 + return false;
6076 + }
6077 + if (typeof a === "function" && a.toString() === b.toString()) {
6078 + return true;
6079 + }
6080 + let length;
6081 + let i;
6082 + let keys;
6083 + if (a && b && typeof a === "object") {
6084 + if (Array.isArray(a)) {
6085 + length = a.length;
6086 + if (length !== b.length) return false;
6087 + for (i = length; i-- !== 0; ) {
6088 + if (!deepEqual(a[i], b[i])) {
6089 + return false;
6090 + }
6091 + }
6092 + return true;
6093 + }
6094 + keys = Object.keys(a);
6095 + length = keys.length;
6096 + if (length !== Object.keys(b).length) {
6097 + return false;
6098 + }
6099 + for (i = length; i-- !== 0; ) {
6100 + if (!{}.hasOwnProperty.call(b, keys[i])) {
6101 + return false;
6102 + }
6103 + }
6104 + for (i = length; i-- !== 0; ) {
6105 + const key = keys[i];
6106 + if (key === "_owner" && a.$$typeof) {
6107 + continue;
6108 + }
6109 + if (!deepEqual(a[key], b[key])) {
6110 + return false;
6111 + }
6112 + }
6113 + return true;
6114 + }
6115 + return a !== a && b !== b;
6116 + }
6117 + function getDPR(element) {
6118 + if (typeof window === "undefined") {
6119 + return 1;
6120 + }
6121 + const win = element.ownerDocument.defaultView || window;
6122 + return win.devicePixelRatio || 1;
6123 + }
6124 + function roundByDPR(element, value) {
6125 + const dpr = getDPR(element);
6126 + return Math.round(value * dpr) / dpr;
6127 + }
6128 + function useLatestRef(value) {
6129 + const ref = React24.useRef(value);
6130 + index(() => {
6131 + ref.current = value;
6132 + });
6133 + return ref;
6134 + }
6135 + function useFloating(options) {
6136 + if (options === void 0) {
6137 + options = {};
6138 + }
6139 + const {
6140 + placement = "bottom",
6141 + strategy = "absolute",
6142 + middleware = [],
6143 + platform: platform3,
6144 + elements: {
6145 + reference: externalReference,
6146 + floating: externalFloating
6147 + } = {},
6148 + transform = true,
6149 + whileElementsMounted,
6150 + open: open3
6151 + } = options;
6152 + const [data, setData] = React24.useState({
6153 + x: 0,
6154 + y: 0,
6155 + strategy,
6156 + placement,
6157 + middlewareData: {},
6158 + isPositioned: false
6159 + });
6160 + const [latestMiddleware, setLatestMiddleware] = React24.useState(middleware);
6161 + if (!deepEqual(latestMiddleware, middleware)) {
6162 + setLatestMiddleware(middleware);
6163 + }
6164 + const [_reference, _setReference] = React24.useState(null);
6165 + const [_floating, _setFloating] = React24.useState(null);
6166 + const setReference = React24.useCallback((node) => {
6167 + if (node !== referenceRef.current) {
6168 + referenceRef.current = node;
6169 + _setReference(node);
6170 + }
6171 + }, []);
6172 + const setFloating = React24.useCallback((node) => {
6173 + if (node !== floatingRef.current) {
6174 + floatingRef.current = node;
6175 + _setFloating(node);
6176 + }
6177 + }, []);
6178 + const referenceEl = externalReference || _reference;
6179 + const floatingEl = externalFloating || _floating;
6180 + const referenceRef = React24.useRef(null);
6181 + const floatingRef = React24.useRef(null);
6182 + const dataRef = React24.useRef(data);
6183 + const hasWhileElementsMounted = whileElementsMounted != null;
6184 + const whileElementsMountedRef = useLatestRef(whileElementsMounted);
6185 + const platformRef = useLatestRef(platform3);
6186 + const openRef = useLatestRef(open3);
6187 + const update2 = React24.useCallback(() => {
6188 + if (!referenceRef.current || !floatingRef.current) {
6189 + return;
6190 + }
6191 + const config = {
6192 + placement,
6193 + strategy,
6194 + middleware: latestMiddleware
6195 + };
6196 + if (platformRef.current) {
6197 + config.platform = platformRef.current;
6198 + }
6199 + computePosition2(referenceRef.current, floatingRef.current, config).then((data2) => {
6200 + const fullData = {
6201 + ...data2,
6202 + // The floating element's position may be recomputed while it's closed
6203 + // but still mounted (such as when transitioning out). To ensure
6204 + // `isPositioned` will be `false` initially on the next open, avoid
6205 + // setting it to `true` when `open === false` (must be specified).
6206 + isPositioned: openRef.current !== false
6207 + };
6208 + if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
6209 + dataRef.current = fullData;
6210 + ReactDOM3.flushSync(() => {
6211 + setData(fullData);
6212 + });
6213 + }
6214 + });
6215 + }, [latestMiddleware, placement, strategy, platformRef, openRef]);
6216 + index(() => {
6217 + if (open3 === false && dataRef.current.isPositioned) {
6218 + dataRef.current.isPositioned = false;
6219 + setData((data2) => ({
6220 + ...data2,
6221 + isPositioned: false
6222 + }));
6223 + }
6224 + }, [open3]);
6225 + const isMountedRef = React24.useRef(false);
6226 + index(() => {
6227 + isMountedRef.current = true;
6228 + return () => {
6229 + isMountedRef.current = false;
6230 + };
6231 + }, []);
6232 + index(() => {
6233 + if (referenceEl) referenceRef.current = referenceEl;
6234 + if (floatingEl) floatingRef.current = floatingEl;
6235 + if (referenceEl && floatingEl) {
6236 + if (whileElementsMountedRef.current) {
6237 + return whileElementsMountedRef.current(referenceEl, floatingEl, update2);
6238 + }
6239 + update2();
6240 + }
6241 + }, [referenceEl, floatingEl, update2, whileElementsMountedRef, hasWhileElementsMounted]);
6242 + const refs = React24.useMemo(() => ({
6243 + reference: referenceRef,
6244 + floating: floatingRef,
6245 + setReference,
6246 + setFloating
6247 + }), [setReference, setFloating]);
6248 + const elements = React24.useMemo(() => ({
6249 + reference: referenceEl,
6250 + floating: floatingEl
6251 + }), [referenceEl, floatingEl]);
6252 + const floatingStyles = React24.useMemo(() => {
6253 + const initialStyles = {
6254 + position: strategy,
6255 + left: 0,
6256 + top: 0
6257 + };
6258 + if (!elements.floating) {
6259 + return initialStyles;
6260 + }
6261 + const x = roundByDPR(elements.floating, data.x);
6262 + const y = roundByDPR(elements.floating, data.y);
6263 + if (transform) {
6264 + return {
6265 + ...initialStyles,
6266 + transform: "translate(" + x + "px, " + y + "px)",
6267 + ...getDPR(elements.floating) >= 1.5 && {
6268 + willChange: "transform"
6269 + }
6270 + };
6271 + }
6272 + return {
6273 + position: strategy,
6274 + left: x,
6275 + top: y
6276 + };
6277 + }, [strategy, transform, elements.floating, data.x, data.y]);
6278 + return React24.useMemo(() => ({
6279 + ...data,
6280 + update: update2,
6281 + refs,
6282 + elements,
6283 + floatingStyles
6284 + }), [data, update2, refs, elements, floatingStyles]);
6285 + }
6286 + var offset3 = (options, deps) => {
6287 + const result = offset2(options);
6288 + return {
6289 + name: result.name,
6290 + fn: result.fn,
6291 + options: [options, deps]
6292 + };
6293 + };
6294 + var shift3 = (options, deps) => {
6295 + const result = shift2(options);
6296 + return {
6297 + name: result.name,
6298 + fn: result.fn,
6299 + options: [options, deps]
6300 + };
6301 + };
6302 + var limitShift3 = (options, deps) => {
6303 + const result = limitShift2(options);
6304 + return {
6305 + fn: result.fn,
6306 + options: [options, deps]
6307 + };
6308 + };
6309 + var flip3 = (options, deps) => {
6310 + const result = flip2(options);
6311 + return {
6312 + name: result.name,
6313 + fn: result.fn,
6314 + options: [options, deps]
6315 + };
6316 + };
6317 + var size3 = (options, deps) => {
6318 + const result = size2(options);
6319 + return {
6320 + name: result.name,
6321 + fn: result.fn,
6322 + options: [options, deps]
6323 + };
6324 + };
6325 +
6326 + // node_modules/@base-ui/react/utils/popups/popupHandle.mjs
6327 + var BasePopupHandle = class {
6328 + /**
6329 + * Stores of every root currently using this handle, in attach order. A handle is meant to be used
6330 + * by a single mounted root, but roots can transiently overlap (e.g. during an animated route
6331 + * transition), so this stack lets `attachStore`'s cleanup restore the previous root instead of
6332 + * leaving a still-mounted root uncontrollable when a newer overlapping root detaches first.
6333 + */
6334 + attachedStores = [];
6335 + /**
6336 + * Store of the root that currently controls the handle: the most recently attached one still
6337 + * mounted, or `null` when no root is attached. Imperative methods are no-ops while this is `null`.
6338 + */
6339 + attachedStoreValue = null;
6340 + /**
6341 + * Listeners notified when `attachedStore` changes, so detached triggers can follow the store pointer.
6342 + */
6343 + storeListeners = /* @__PURE__ */ new Set();
6344 + /**
6345 + * Creates a handle backed by the store used while no root is attached.
6346 + *
6347 + * @param fallbackStore Inert, closed store handed to detached triggers while no root is attached,
6348 + * so they can render and register without a mounted root. Triggers register into whichever store
6349 + * `store` currently resolves to, so while detached they live in this store's trigger map and
6350 + * migrate themselves to the root's store (and back) as it attaches/detaches.
6351 + * @param componentName Component name used to prefix dev warnings, e.g. `'Menu'` produces
6352 + * `MenuHandle.open()` in warning text.
6353 + * @param throwOnMissingTrigger Whether `open(triggerId)` throws when no trigger with that id is
6354 + * registered. Anchored popups (Menu, Popover, Tooltip, PreviewCard) need a trigger to anchor to,
6355 + * so they throw; Dialog is not anchored and instead opens unassociated with a dev warning.
6356 + */
6357 + constructor(fallbackStore, componentName, throwOnMissingTrigger = true) {
6358 + this.fallbackStore = fallbackStore;
6359 + this.componentName = componentName;
6360 + this.throwOnMissingTrigger = throwOnMissingTrigger;
6361 + }
6362 + get attachedStore() {
6363 + return this.attachedStoreValue;
6364 + }
6365 + /**
6366 + * Store that detached triggers read from: the attached root's store, or an inert fallback store
6367 + * used while no root is attached.
6368 + * @internal
6369 + */
6370 + get store() {
6371 + return this.attachedStoreValue ?? this.fallbackStore;
6372 + }
6373 + /**
6374 + * Stable fallback store used for server rendering and hydration. Root stores cannot be recorded on
6375 + * the handle during render because a handle can be shared by concurrent server-rendered requests.
6376 + * @internal
6377 + */
6378 + get serverStore() {
6379 + return this.fallbackStore;
6380 + }
6381 + /**
6382 + * Subscribes to changes of the attached store pointer so detached triggers re-render and re-bind
6383 + * when a root attaches or detaches. Returns a function that removes the listener.
6384 + * @internal
6385 + */
6386 + subscribeStore(listener) {
6387 + this.storeListeners.add(listener);
6388 + return () => {
6389 + this.storeListeners.delete(listener);
6390 + };
6391 + }
6392 + /**
6393 + * Points the handle at a root's store and notifies subscribers so detached triggers re-render and
6394 + * re-register into it (their registration effect migrates them when the store pointer changes).
6395 + * Returns a cleanup function that detaches the store again.
6396 + * @internal
6397 + */
6398 + attachStore(newStore) {
6399 + this.attachedStores.push(newStore);
6400 + this.setActiveStore(newStore);
6401 + if (true) {
6402 + if (this.attachedStores.length > 1) {
6403 + const dev = this;
6404 + (dev.overlapWarningFrame ??= AnimationFrame.create()).request(() => {
6405 + if (this.attachedStores.length > 1) {
6406 + console.warn("Base UI: A handle is attached to more than one mounted root at the same time. The most recently mounted root takes over and the previous one stops being controlled by the handle. A handle should be used by a single root that stays mounted for the lifetime of the handle.");
6407 + }
6408 + });
6409 + }
6410 + }
6411 + return () => {
6412 + const index2 = this.attachedStores.lastIndexOf(newStore);
6413 + if (index2 !== -1) {
6414 + this.attachedStores.splice(index2, 1);
6415 + }
6416 + this.setActiveStore(this.attachedStores[this.attachedStores.length - 1] ?? null);
6417 + };
6418 + }
6419 + /**
6420 + * Sets the store that currently controls the handle and notifies subscribers when it changes, so
6421 + * detached triggers re-render and migrate their registration to the new store.
6422 + */
6423 + setActiveStore(store3) {
6424 + if (this.attachedStoreValue !== store3) {
6425 + this.attachedStoreValue = store3;
6426 + this.storeListeners.forEach((listener) => {
6427 + listener();
6428 + });
6429 + }
6430 + }
6431 + /**
6432 + * Opens the attached root's store and associates it with the trigger with the given id, or a
6433 + * no-op (with a dev warning) while no root is attached. Shared by every concrete handle's public
6434 + * `open()` method, which only narrows the parameter type.
6435 + *
6436 + * When a trigger id is given but no matching trigger is registered, anchored popups throw (see
6437 + * `throwOnMissingTrigger`); Dialog opens unassociated with a dev warning instead.
6438 + *
6439 + * This method should only be called in an event handler or an effect (not during rendering).
6440 + *
6441 + * @param triggerId ID of the trigger to associate with the popup, or `null`/`undefined` to open
6442 + * without associating any trigger.
6443 + */
6444 + openByTrigger(triggerId) {
6445 + const attachedStore = this.attachedStore;
6446 + if (attachedStore === null) {
6447 + if (true) {
6448 + console.warn(`Base UI: ${this.componentName}Handle.open() was called while no root using this handle is mounted. The call was ignored; mount a root with this handle before opening it imperatively.`);
6449 + }
6450 + return;
6451 + }
6452 + let triggerElement;
6453 + if (triggerId) {
6454 + for (let i = this.attachedStores.length - 1; i >= 0 && !triggerElement; i -= 1) {
6455 + triggerElement = this.attachedStores[i].context.triggerElements.getById(triggerId);
6456 + }
6457 + triggerElement ??= this.fallbackStore.context.triggerElements.getById(triggerId);
6458 + }
6459 + if (triggerId && !triggerElement) {
6460 + if (this.throwOnMissingTrigger) {
6461 + throw new Error(true ? `Base UI: ${this.componentName}Handle.open() was called with the trigger id "${triggerId}", but no matching trigger is registered with this handle. An anchored popup cannot open without a trigger to anchor to. Pass the id of a mounted ${this.componentName}.Trigger that has this handle set on its "handle" prop.` : formatErrorMessage_default(99, this.componentName, triggerId, this.componentName));
6462 + }
6463 + if (true) {
6464 + console.warn(`Base UI: ${this.componentName}Handle.open: No trigger found with id "${triggerId}". The popup will open, but the trigger will not be associated with it.`);
6465 + }
6466 + }
6467 + attachedStore.setOpen(true, createChangeEventDetails(reason_parts_exports.imperativeAction, void 0, triggerElement));
6468 + }
6469 + /**
6470 + * Closes the popup by setting the attached root's store to closed, or a no-op (with a dev warning)
6471 + * while no root is attached. Shared by every concrete handle's public `close()` method.
6472 + *
6473 + * This method should only be called in an event handler or an effect (not during rendering).
6474 + */
6475 + closePopup() {
6476 + const attachedStore = this.attachedStore;
6477 + if (attachedStore === null) {
6478 + if (true) {
6479 + console.warn(`Base UI: ${this.componentName}Handle.close() was called while no root using this handle is mounted. The call was ignored.`);
6480 + }
6481 + return;
6482 + }
6483 + attachedStore.setOpen(false, createChangeEventDetails(reason_parts_exports.imperativeAction));
6484 + }
6485 + };
6486 +
6487 + // node_modules/@base-ui/react/utils/popups/popupStoreUtils.mjs
6488 + var React29 = __toESM(require_react(), 1);
6489 + var ReactDOM4 = __toESM(require_react_dom(), 1);
6490 +
6491 + // node_modules/@base-ui/react/floating-ui-react/hooks/useSyncedFloatingRootContext.mjs
6492 + var React28 = __toESM(require_react(), 1);
6493 +
6494 + // node_modules/@base-ui/utils/store/useStore.mjs
6495 + var React26 = __toESM(require_react(), 1);
6496 + var import_shim = __toESM(require_shim(), 1);
6497 + var import_with_selector = __toESM(require_with_selector(), 1);
6498 +
6499 + // node_modules/@base-ui/utils/fastHooks.mjs
6500 + var React25 = __toESM(require_react(), 1);
6501 + var hooks = [];
6502 + var currentInstance = void 0;
6503 + function getInstance() {
6504 + return currentInstance;
6505 + }
6506 + function register2(hook) {
6507 + hooks.push(hook);
6508 + }
6509 + function fastComponent(fn) {
6510 + const FastComponent = (props, forwardedRef) => {
6511 + const instance = useRefWithInit(createInstance).current;
6512 + let result;
6513 + try {
6514 + currentInstance = instance;
6515 + for (const hook of hooks) {
6516 + hook.before(instance);
6517 + }
6518 + result = fn(props, forwardedRef);
6519 + for (const hook of hooks) {
6520 + hook.after(instance);
6521 + }
6522 + instance.didInitialize = true;
6523 + } finally {
6524 + currentInstance = void 0;
6525 + }
6526 + return result;
6527 + };
6528 + FastComponent.displayName = fn.displayName || fn.name;
6529 + return FastComponent;
6530 + }
6531 + function fastComponentRef(fn) {
6532 + return /* @__PURE__ */ React25.forwardRef(fastComponent(fn));
6533 + }
6534 + function createInstance() {
6535 + return {
6536 + didInitialize: false
6537 + };
6538 + }
6539 +
6540 + // node_modules/@base-ui/utils/store/useStore.mjs
6541 + var canUseRawUseSyncExternalStore = isReactVersionAtLeast(19);
6542 + var useStoreImplementation = canUseRawUseSyncExternalStore ? useStoreFast : useStoreLegacy;
6543 + function useStore(store3, selector, a1, a2, a3) {
6544 + return useStoreImplementation(store3, selector, a1, a2, a3);
6545 + }
6546 + function useStoreR19(store3, selector, a1, a2, a3) {
6547 + const getSelection = React26.useCallback(() => selector(store3.getSnapshot(), a1, a2, a3), [store3, selector, a1, a2, a3]);
6548 + return (0, import_shim.useSyncExternalStore)(store3.subscribe, getSelection, getSelection);
6549 + }
6550 + register2({
6551 + before(instance) {
6552 + instance.syncIndex = 0;
6553 + if (!instance.didInitialize) {
6554 + instance.syncTick = 1;
6555 + instance.syncHooks = [];
6556 + instance.didChangeStore = true;
6557 + instance.getSnapshot = () => {
6558 + let didChange2 = false;
6559 + for (let i = 0; i < instance.syncHooks.length; i += 1) {
6560 + const hook = instance.syncHooks[i];
6561 + const value = hook.selector(hook.store.state, hook.a1, hook.a2, hook.a3);
6562 + if (!Object.is(hook.value, value)) {
6563 + didChange2 = true;
6564 + hook.value = value;
6565 + }
6566 + }
6567 + if (didChange2) {
6568 + instance.syncTick += 1;
6569 + }
6570 + return instance.syncTick;
6571 + };
6572 + }
6573 + },
6574 + after(instance) {
6575 + if (instance.syncHooks.length > 0) {
6576 + if (instance.didChangeStore) {
6577 + instance.didChangeStore = false;
6578 + instance.subscribe = (onStoreChange) => {
6579 + const stores = /* @__PURE__ */ new Set();
6580 + for (const hook of instance.syncHooks) {
6581 + stores.add(hook.store);
6582 + }
6583 + const unsubscribes = [];
6584 + for (const store3 of stores) {
6585 + unsubscribes.push(store3.subscribe(onStoreChange));
6586 + }
6587 + return () => {
6588 + for (const unsubscribe of unsubscribes) {
6589 + unsubscribe();
6590 + }
6591 + };
6592 + };
6593 + }
6594 + (0, import_shim.useSyncExternalStore)(instance.subscribe, instance.getSnapshot, instance.getSnapshot);
6595 + }
6596 + }
6597 + });
6598 + function useStoreFast(store3, selector, a1, a2, a3) {
6599 + const instance = getInstance();
6600 + if (!instance) {
6601 + return useStoreR19(store3, selector, a1, a2, a3);
6602 + }
6603 + const index2 = instance.syncIndex;
6604 + instance.syncIndex += 1;
6605 + let hook;
6606 + if (!instance.didInitialize) {
6607 + hook = {
6608 + store: store3,
6609 + selector,
6610 + a1,
6611 + a2,
6612 + a3,
6613 + value: selector(store3.getSnapshot(), a1, a2, a3)
6614 + };
6615 + instance.syncHooks.push(hook);
6616 + } else {
6617 + hook = instance.syncHooks[index2];
6618 + if (hook.store !== store3 || hook.selector !== selector || !Object.is(hook.a1, a1) || !Object.is(hook.a2, a2) || !Object.is(hook.a3, a3)) {
6619 + if (hook.store !== store3) {
6620 + instance.didChangeStore = true;
6621 + }
6622 + hook.store = store3;
6623 + hook.selector = selector;
6624 + hook.a1 = a1;
6625 + hook.a2 = a2;
6626 + hook.a3 = a3;
6627 + hook.value = selector(store3.getSnapshot(), a1, a2, a3);
6628 + }
6629 + }
6630 + return hook.value;
6631 + }
6632 + function useStoreLegacy(store3, selector, a1, a2, a3) {
6633 + return (0, import_with_selector.useSyncExternalStoreWithSelector)(store3.subscribe, store3.getSnapshot, store3.getSnapshot, (state) => selector(state, a1, a2, a3));
6634 + }
6635 +
6636 + // node_modules/@base-ui/utils/store/Store.mjs
6637 + var Store = class {
6638 + /**
6639 + * Creates a store with the given initial state, constructing the class it is called on.
6640 + * Calling it on a generic base class (e.g. `ReactStore.create(...)`) constructs that
6641 + * class but degrades the inferred instance type to `Store`; use `new` there instead.
6642 + */
6643 + static create(state) {
6644 + return new this(state);
6645 + }
6646 + /**
6647 + * The current state of the store.
6648 + * This property is updated immediately when the state changes as a result of calling {@link setState}, {@link update}, or {@link set}.
6649 + * To subscribe to state changes, use the {@link useState} method. The value returned by {@link useState} is updated after the component renders (similarly to React's useState).
6650 + * The values can be used directly (to avoid subscribing to the store) in effects or event handlers.
6651 + *
6652 + * Do not modify properties in state directly. Instead, use the provided methods to ensure proper state management and listener notification.
6653 + */
6654 + // Internal state to handle recursive `setState()` calls
6655 + constructor(state) {
6656 + this.state = state;
6657 + this.listeners = /* @__PURE__ */ new Set();
6658 + this.updateTick = 0;
6659 + }
6660 + /**
6661 + * Registers a listener that will be called whenever the store's state changes.
6662 + *
6663 + * @param fn The listener function to be called on state changes.
6664 + * @returns A function to unsubscribe the listener.
6665 + */
6666 + subscribe = (fn) => {
6667 + this.listeners.add(fn);
6668 + return () => {
6669 + this.listeners.delete(fn);
6670 + };
6671 + };
6672 + /**
6673 + * Returns the current state of the store.
6674 + */
6675 + getSnapshot = () => {
6676 + return this.state;
6677 + };
6678 + /**
6679 + * Updates the entire store's state and notifies all registered listeners.
6680 + *
6681 + * @param newState The new state to set for the store.
6682 + */
6683 + setState(newState) {
6684 + if (this.state === newState) {
6685 + return;
6686 + }
6687 + this.state = newState;
6688 + this.updateTick += 1;
6689 + const currentTick = this.updateTick;
6690 + for (const listener of this.listeners) {
6691 + if (currentTick !== this.updateTick) {
6692 + return;
6693 + }
6694 + listener(newState);
6695 + }
6696 + }
6697 + /**
6698 + * Merges the provided changes into the current state and notifies listeners if there are changes.
6699 + * Each value must match its state key. Pass an exact known subset rather than a broad
6700 + * `Partial<State>`, which may contain `undefined` for required state fields.
6701 + *
6702 + * @param changes An object containing the changes to apply to the current state.
6703 + */
6704 + update(changes) {
6705 + for (const key in changes) {
6706 + if (!Object.is(this.state[key], changes[key])) {
6707 + this.setState({
6708 + ...this.state,
6709 + ...changes
6710 + });
6711 + return;
6712 + }
6713 + }
6714 + }
6715 + /**
6716 + * Sets a specific key in the store's state to a new value and notifies listeners if the value has changed.
6717 + *
6718 + * @param key The key in the store's state to update.
6719 + * @param value The new value to set for the specified key.
6720 + */
6721 + set(key, value) {
6722 + if (!Object.is(this.state[key], value)) {
6723 + this.setState({
6724 + ...this.state,
6725 + [key]: value
6726 + });
6727 + }
6728 + }
6729 + /**
6730 + * Gives the state a new reference and updates all registered listeners.
6731 + */
6732 + notifyAll() {
6733 + const newState = {
6734 + ...this.state
6735 + };
6736 + this.setState(newState);
6737 + }
6738 + use(selector, a1, a2, a3) {
6739 + return useStore(this, selector, a1, a2, a3);
6740 + }
6741 + };
6742 +
6743 + // node_modules/@base-ui/utils/store/ReactStore.mjs
6744 + var React27 = __toESM(require_react(), 1);
6745 + var ReactStore = class extends Store {
6746 + /**
6747 + * Creates a new ReactStore instance.
6748 + *
6749 + * @param state Initial state of the store.
6750 + * @param context Non-reactive context values.
6751 + * @param selectors Optional selectors for use with `useState`.
6752 + */
6753 + constructor(state, context = {}, selectors3) {
6754 + super(state);
6755 + this.context = context;
6756 + this.selectors = selectors3;
6757 + }
6758 + /**
6759 + * Non-reactive values such as refs, callbacks, etc.
6760 + */
6761 + /**
6762 + * Synchronizes a single external value into the store.
6763 + *
6764 + * Note that the while the value in `state` is updated immediately, the value returned
6765 + * by `useState` is updated before the next render (similarly to React's `useState`).
6766 + */
6767 + useSyncedValue(key, value) {
6768 + React27.useDebugValue(key);
6769 + const store3 = this;
6770 + useIsoLayoutEffect(() => {
6771 + if (store3.state[key] !== value) {
6772 + store3.set(key, value);
6773 + }
6774 + }, [store3, key, value]);
6775 + }
6776 + /**
6777 + * Synchronizes a single external value into the store and
6778 + * cleans it up (sets to `undefined`) on unmount.
6779 + *
6780 + * Note that the while the value in `state` is updated immediately, the value returned
6781 + * by `useState` is updated before the next render (similarly to React's `useState`).
6782 + */
6783 + useSyncedValueWithCleanup(key, value) {
6784 + const store3 = this;
6785 + useIsoLayoutEffect(() => {
6786 + if (store3.state[key] !== value) {
6787 + store3.set(key, value);
6788 + }
6789 + return () => {
6790 + store3.set(key, void 0);
6791 + };
6792 + }, [store3, key, value]);
6793 + }
6794 + /**
6795 + * Synchronizes multiple external values into the store.
6796 + * Each value must match its state key. Pass an exact known subset rather than a broad
6797 + * `Partial<State>`, which may contain `undefined` for required state fields.
6798 + *
6799 + * Note that the while the values in `state` are updated immediately, the values returned
6800 + * by `useState` are updated before the next render (similarly to React's `useState`).
6801 + *
6802 + * @param statePart An exact subset of state fields to synchronize. Unknown keys are not accepted.
6803 + */
6804 + useSyncedValues(statePart) {
6805 + const store3 = this;
6806 + if (true) {
6807 + React27.useDebugValue(statePart, (p) => Object.keys(p));
6808 + const keys = React27.useRef(Object.keys(statePart)).current;
6809 + const nextKeys = Object.keys(statePart);
6810 + if (keys.length !== nextKeys.length || keys.some((key, index2) => key !== nextKeys[index2])) {
6811 + console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.");
6812 + }
6813 + }
6814 + const dependencies = Object.values(statePart);
6815 + useIsoLayoutEffect(() => {
6816 + store3.update(statePart);
6817 + }, [store3, ...dependencies]);
6818 + }
6819 + /**
6820 + * Registers a controllable prop pair (`controlled`, `defaultValue`) for a specific key. If `controlled`
6821 + * is non-undefined, the store's state at `key` is updated to match `controlled`.
6822 + */
6823 + useControlledProp(key, controlled) {
6824 + React27.useDebugValue(key);
6825 + const store3 = this;
6826 + const isControlled = controlled !== void 0;
6827 + useIsoLayoutEffect(() => {
6828 + if (isControlled && !Object.is(store3.state[key], controlled)) {
6829 + store3.setState({
6830 + ...store3.state,
6831 + [key]: controlled
6832 + });
6833 + }
6834 + }, [store3, key, controlled, isControlled]);
6835 + if (true) {
6836 + const cache = this.controlledValues ??= /* @__PURE__ */ new Map();
6837 + if (!cache.has(key)) {
6838 + cache.set(key, isControlled);
6839 + }
6840 + const previouslyControlled = cache.get(key);
6841 + if (previouslyControlled !== void 0 && previouslyControlled !== isControlled) {
6842 + console.error(`A component is changing the ${isControlled ? "" : "un"}controlled state of ${key.toString()} to be ${isControlled ? "un" : ""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`);
6843 + }
6844 + }
6845 + }
6846 + /** Gets the current value from the store using a selector with the provided key.
6847 + *
6848 + * @param key Key of the selector to use.
6849 + */
6850 + select(key, a1, a2, a3) {
6851 + const selector = this.selectors[key];
6852 + return selector(this.state, a1, a2, a3);
6853 + }
6854 + /**
6855 + * Returns a value from the store's state using a selector function.
6856 + * Used to subscribe to specific parts of the state.
6857 + * This methods causes a rerender whenever the selected state changes.
6858 + *
6859 + * @param key Key of the selector to use.
6860 + */
6861 + useState(key, a1, a2, a3) {
6862 + React27.useDebugValue(key);
6863 + return useStore(this, this.selectors[key], a1, a2, a3);
6864 + }
6865 + /**
6866 + * Wraps a function with `useStableCallback` to ensure it has a stable reference
6867 + * and assigns it to the context.
6868 + *
6869 + * @param key Key of the event callback. Must be a function in the context.
6870 + * @param fn Function to assign.
6871 + */
6872 + useContextCallback(key, fn) {
6873 + React27.useDebugValue(key);
6874 + const stableFunction = useStableCallback(fn ?? NOOP);
6875 + this.context[key] = stableFunction;
6876 + }
6877 + /**
6878 + * Returns a stable setter function for a specific key in the store's state.
6879 + * It's commonly used to pass as a ref callback to React elements.
6880 + *
6881 + * @param key Key of the state to set.
6882 + */
6883 + useStateSetter(key) {
6884 + const ref = React27.useRef(void 0);
6885 + if (ref.current === void 0) {
6886 + ref.current = (value) => {
6887 + this.set(key, value);
6888 + };
6889 + }
6890 + return ref.current;
6891 + }
6892 + /**
6893 + * Observes changes derived from the store's selectors and calls the listener when the selected value changes.
6894 + *
6895 + * @param key Key of the selector to observe.
6896 + * @param listener Listener function called when the selector result changes.
6897 + */
6898 + observe(selector, listener) {
6899 + let selectFn;
6900 + if (typeof selector === "function") {
6901 + selectFn = selector;
6902 + } else {
6903 + selectFn = this.selectors[selector];
6904 + }
6905 + let prevValue = selectFn(this.state);
6906 + listener(prevValue, prevValue, this);
6907 + return this.subscribe((nextState) => {
6908 + const nextValue = selectFn(nextState);
6909 + if (!Object.is(prevValue, nextValue)) {
6910 + const oldValue = prevValue;
6911 + prevValue = nextValue;
6912 + listener(nextValue, oldValue, this);
6913 + }
6914 + });
6915 + }
6916 + };
6917 +
6918 + // node_modules/@base-ui/react/floating-ui-react/components/FloatingRootStore.mjs
6919 + var selectors = {
6920 + open: (state) => state.open,
6921 + transitionStatus: (state) => state.transitionStatus,
6922 + domReferenceElement: (state) => state.domReferenceElement,
6923 + referenceElement: (state) => state.positionReference ?? state.referenceElement,
6924 + floatingElement: (state) => state.floatingElement,
6925 + floatingId: (state) => state.floatingId
6926 + };
6927 + var FloatingRootStore = class extends ReactStore {
6928 + constructor(options) {
6929 + const {
6930 + syncOnly,
6931 + nested,
6932 + onOpenChange,
6933 + triggerElements,
6934 + ...initialState
6935 + } = options;
6936 + super({
6937 + ...initialState,
6938 + positionReference: initialState.referenceElement,
6939 + domReferenceElement: initialState.referenceElement
6940 + }, {
6941 + onOpenChange,
6942 + dataRef: {
6943 + current: {}
6944 + },
6945 + events: createEventEmitter(),
6946 + nested,
6947 + triggerElements
6948 + }, selectors);
6949 + this.syncOnly = syncOnly;
6950 + }
6951 + /**
6952 + * Syncs the event used by hover logic to distinguish hover-open from click-like interaction.
6953 + */
6954 + syncOpenEvent = (newOpen, event) => {
6955 + if (!newOpen || !this.state.open || // Prevent a pending hover-open from overwriting a click-open event, while allowing
6956 + // click events to upgrade a hover-open.
6957 + event != null && isClickLikeEvent(event)) {
6958 + this.context.dataRef.current.openEvent = newOpen ? event : void 0;
6959 + }
6960 + };
6961 + /**
6962 + * Runs the root-owned side effects for an open state change.
6963 + */
6964 + dispatchOpenChange = (newOpen, eventDetails) => {
6965 + this.syncOpenEvent(newOpen, eventDetails.event);
6966 + const details = {
6967 + open: newOpen,
6968 + reason: eventDetails.reason,
6969 + nativeEvent: eventDetails.event,
6970 + nested: this.context.nested,
6971 + triggerElement: eventDetails.trigger
6972 + };
6973 + this.context.events.emit("openchange", details);
6974 + };
6975 + /**
6976 + * Emits the `openchange` event through the internal event emitter and calls the `onOpenChange` handler with the provided arguments.
6977 + *
6978 + * @param newOpen The new open state.
6979 + * @param eventDetails Details about the event that triggered the open state change.
6980 + */
6981 + setOpen = (newOpen, eventDetails) => {
6982 + if (this.syncOnly) {
6983 + this.context.onOpenChange?.(newOpen, eventDetails);
6984 + return;
6985 + }
6986 + this.dispatchOpenChange(newOpen, eventDetails);
6987 + this.context.onOpenChange?.(newOpen, eventDetails);
6988 + };
6989 + };
6990 +
6991 + // node_modules/@base-ui/react/floating-ui-react/hooks/useSyncedFloatingRootContext.mjs
6992 + function useSyncedFloatingRootContext(options) {
6993 + const {
6994 + popupStore,
6995 + treatPopupAsFloatingElement = false,
6996 + floatingRootContext: floatingRootContextProp,
6997 + floatingId,
6998 + nested,
6999 + onOpenChange
7000 + } = options;
7001 + const open3 = popupStore.useState("open");
7002 + const referenceElement = popupStore.useState("activeTriggerElement");
7003 + const floatingElement = popupStore.useState(treatPopupAsFloatingElement ? "popupElement" : "positionerElement");
7004 + const triggerElements = popupStore.context.triggerElements;
7005 + const handleOpenChange = onOpenChange;
7006 + const internalStoreRef = React28.useRef(null);
7007 + if (floatingRootContextProp === void 0 && internalStoreRef.current === null) {
7008 + internalStoreRef.current = new FloatingRootStore({
7009 + open: open3,
7010 + transitionStatus: void 0,
7011 + referenceElement,
7012 + floatingElement,
7013 + triggerElements,
7014 + onOpenChange: handleOpenChange,
7015 + floatingId,
7016 + syncOnly: true,
7017 + nested
7018 + });
7019 + }
7020 + const store3 = floatingRootContextProp ?? internalStoreRef.current;
7021 + popupStore.useSyncedValue("floatingId", floatingId);
7022 + useIsoLayoutEffect(() => {
7023 + const valuesToSync = {
7024 + open: open3,
7025 + floatingId,
7026 + referenceElement,
7027 + floatingElement
7028 + };
7029 + if (isElement(referenceElement)) {
7030 + valuesToSync.domReferenceElement = referenceElement;
7031 + }
7032 + if (store3.state.positionReference === store3.state.referenceElement) {
7033 + valuesToSync.positionReference = referenceElement;
7034 + }
7035 + store3.update(valuesToSync);
7036 + }, [open3, floatingId, referenceElement, floatingElement, store3]);
7037 + store3.context.onOpenChange = handleOpenChange;
7038 + store3.context.nested = nested;
7039 + return store3;
7040 + }
7041 +
7042 + // node_modules/@base-ui/react/utils/popups/popupStoreUtils.mjs
7043 + var FOCUSABLE_POPUP_PROPS = {
7044 + tabIndex: -1,
7045 + [FOCUSABLE_ATTRIBUTE]: ""
7046 + };
7047 + function usePopupRootStore(createStore, treatPopupAsFloatingElement = false) {
7048 + const floatingId = useId();
7049 + const nested = useFloatingParentNodeId() != null;
7050 + const store3 = useRefWithInit(() => createStore(floatingId, nested)).current;
7051 + useSyncedFloatingRootContext({
7052 + popupStore: store3,
7053 + treatPopupAsFloatingElement,
7054 + floatingRootContext: store3.state.floatingRootContext,
7055 + floatingId,
7056 + nested,
7057 + onOpenChange: store3.setOpen
7058 + });
7059 + return store3;
7060 + }
7061 + function PopupHandleAttachment({
7062 + handle,
7063 + store: store3
7064 + }) {
7065 + useIsoLayoutEffect(() => {
7066 + return handle.attachStore(store3);
7067 + }, [handle, store3]);
7068 + return null;
7069 + }
7070 + function syncTriggerCount(store3) {
7071 + const triggerCount = store3.context.triggerElements.size;
7072 + if (store3.select("open") && store3.state.triggerCount !== triggerCount) {
7073 + store3.set("triggerCount", triggerCount);
7074 + }
7075 + }
7076 + function useTriggerRegistration(id, store3) {
7077 + const registrationRef = React29.useRef(null);
7078 + return useStableCallback((element) => {
7079 + const registration = registrationRef.current;
7080 + if (registration !== null) {
7081 + if (registration.element === element && registration.store === store3 && registration.id === id) {
7082 + return;
7083 + }
7084 + registrationRef.current = null;
7085 + const registeredStore = registration.store;
7086 + if (registeredStore.context.triggerElements.getById(registration.id) === registration.element) {
7087 + registeredStore.context.triggerElements.delete(registration.id);
7088 + syncTriggerCount(registeredStore);
7089 + }
7090 + }
7091 + if (element !== null && id !== void 0) {
7092 + registrationRef.current = {
7093 + store: store3,
7094 + id,
7095 + element
7096 + };
7097 + store3.context.triggerElements.add(id, element);
7098 + syncTriggerCount(store3);
7099 + }
7100 + });
7101 + }
7102 + function createPopupOpenState(state, open3, trigger, preventUnmountOnClose = false) {
7103 + let preventUnmountingOnClose = state.preventUnmountingOnClose;
7104 + if (open3) {
7105 + preventUnmountingOnClose = false;
7106 + } else if (preventUnmountOnClose) {
7107 + preventUnmountingOnClose = true;
7108 + }
7109 + const triggerId = trigger?.id ?? null;
7110 + let activeTriggerId = state.activeTriggerId;
7111 + let activeTriggerElement = state.activeTriggerElement;
7112 + if (triggerId || open3) {
7113 + activeTriggerId = triggerId;
7114 + activeTriggerElement = trigger ?? null;
7115 + }
7116 + return {
7117 + open: open3,
7118 + preventUnmountingOnClose,
7119 + activeTriggerId,
7120 + activeTriggerElement
7121 + };
7122 + }
7123 + function attachPreventUnmountOnClose(eventDetails) {
7124 + let preventUnmountOnClose = false;
7125 + eventDetails.preventUnmountOnClose = () => {
7126 + preventUnmountOnClose = true;
7127 + };
7128 + return () => preventUnmountOnClose;
7129 + }
7130 + function applyPopupOpenChange(store3, nextOpen, eventDetails, options = {}) {
7131 + const reason = eventDetails.reason;
7132 + const isHover = reason === reason_parts_exports.triggerHover;
7133 + const isFocusOpen = nextOpen && reason === reason_parts_exports.triggerFocus;
7134 + const isDismissClose = !nextOpen && (reason === reason_parts_exports.triggerPress || reason === reason_parts_exports.escapeKey);
7135 + const shouldPreventUnmountOnClose = attachPreventUnmountOnClose(eventDetails);
7136 + store3.context.onOpenChange?.(nextOpen, eventDetails);
7137 + if (eventDetails.isCanceled) {
7138 + return;
7139 + }
7140 + options.onBeforeDispatch?.();
7141 + store3.state.floatingRootContext.dispatchOpenChange(nextOpen, eventDetails);
7142 + const changeState = () => {
7143 + const popupOpenState = createPopupOpenState(store3.state, nextOpen, eventDetails.trigger, shouldPreventUnmountOnClose());
7144 + const updatedState = {
7145 + ...options.extraState,
7146 + ...popupOpenState
7147 + };
7148 + if (isFocusOpen) {
7149 + updatedState.instantType = "focus";
7150 + } else if (isDismissClose) {
7151 + updatedState.instantType = "dismiss";
7152 + } else if (isHover) {
7153 + updatedState.instantType = void 0;
7154 + }
7155 + store3.update(updatedState);
7156 + };
7157 + if (isHover) {
7158 + ReactDOM4.flushSync(changeState);
7159 + } else {
7160 + changeState();
7161 + }
7162 + }
7163 + function useTriggerDataForwarding(triggerId, triggerElementRef, store3, stateUpdates) {
7164 + const isMountedByThisTrigger = store3.useState("isMountedByTrigger", triggerId);
7165 + const baseRegisterTrigger = useTriggerRegistration(triggerId, store3);
7166 + const applyTriggerData = useStableCallback((element) => {
7167 + const open3 = store3.select("open");
7168 + const activeTriggerId = store3.select("activeTriggerId");
7169 + if (activeTriggerId === triggerId) {
7170 + const changes = {
7171 + activeTriggerElement: element,
7172 + ...open3 ? stateUpdates : null
7173 + };
7174 + store3.update(changes);
7175 + return;
7176 + }
7177 + if (activeTriggerId == null && open3) {
7178 + const changes = {
7179 + activeTriggerId: triggerId ?? null,
7180 + activeTriggerElement: element,
7181 + ...stateUpdates
7182 + };
7183 + store3.update(changes);
7184 + }
7185 + });
7186 + const registerTrigger = useStableCallback((element) => {
7187 + baseRegisterTrigger(element);
7188 + if (element) {
7189 + applyTriggerData(element);
7190 + }
7191 + });
7192 + useIsoLayoutEffect(() => {
7193 + registerTrigger(triggerElementRef.current);
7194 + return () => registerTrigger(null);
7195 + }, [registerTrigger, triggerElementRef, store3, triggerId]);
7196 + useIsoLayoutEffect(() => {
7197 + if (isMountedByThisTrigger) {
7198 + const changes = {
7199 + activeTriggerElement: triggerElementRef.current,
7200 + ...stateUpdates
7201 + };
7202 + store3.update(changes);
7203 + }
7204 + }, [isMountedByThisTrigger, store3, triggerElementRef, ...Object.values(stateUpdates)]);
7205 + return {
7206 + registerTrigger,
7207 + isMountedByThisTrigger
7208 + };
7209 + }
7210 + function useImplicitActiveTrigger(store3, options = {}) {
7211 + const {
7212 + closeOnActiveTriggerUnmount = false
7213 + } = options;
7214 + const resolvedActiveTriggerIdRef = React29.useRef(null);
7215 + const open3 = store3.useState("open");
7216 + const reactiveTriggerCount = store3.useState("triggerCount");
7217 + const activeTriggerId = store3.useState("activeTriggerId");
7218 + const reactiveActiveTriggerElement = store3.useState("activeTriggerElement");
7219 + useIsoLayoutEffect(() => {
7220 + if (!open3) {
7221 + resolvedActiveTriggerIdRef.current = null;
7222 + if (store3.state.triggerCount !== 0) {
7223 + store3.set("triggerCount", 0);
7224 + }
7225 + return;
7226 + }
7227 + const triggerCount = store3.context.triggerElements.size;
7228 + const stateUpdates = {};
7229 + if (store3.state.triggerCount !== triggerCount) {
7230 + stateUpdates.triggerCount = triggerCount;
7231 + }
7232 + const currentActiveTriggerId = store3.select("activeTriggerId");
7233 + let lostActiveTriggerId = null;
7234 + if (currentActiveTriggerId) {
7235 + const activeTriggerElement = store3.context.triggerElements.getById(currentActiveTriggerId);
7236 + if (!activeTriggerElement) {
7237 + for (const [triggerId, triggerElement] of store3.context.triggerElements.entries()) {
7238 + if (triggerElement === store3.state.activeTriggerElement) {
7239 + stateUpdates.activeTriggerId = triggerId;
7240 + stateUpdates.activeTriggerElement = triggerElement;
7241 + resolvedActiveTriggerIdRef.current = triggerId;
7242 + break;
7243 + }
7244 + }
7245 + if (stateUpdates.activeTriggerId === void 0) {
7246 + if (resolvedActiveTriggerIdRef.current === currentActiveTriggerId) {
7247 + lostActiveTriggerId = currentActiveTriggerId;
7248 + } else {
7249 + resolvedActiveTriggerIdRef.current = null;
7250 + }
7251 + }
7252 + } else {
7253 + resolvedActiveTriggerIdRef.current = currentActiveTriggerId;
7254 + if (activeTriggerElement !== store3.state.activeTriggerElement) {
7255 + stateUpdates.activeTriggerElement = activeTriggerElement;
7256 + }
7257 + }
7258 + } else {
7259 + resolvedActiveTriggerIdRef.current = null;
7260 + }
7261 + if (!lostActiveTriggerId && !currentActiveTriggerId && triggerCount === 1) {
7262 + const iteratorResult = store3.context.triggerElements.entries().next();
7263 + if (!iteratorResult.done) {
7264 + const [implicitTriggerId, implicitTriggerElement] = iteratorResult.value;
7265 + stateUpdates.activeTriggerId = implicitTriggerId;
7266 + stateUpdates.activeTriggerElement = implicitTriggerElement;
7267 + resolvedActiveTriggerIdRef.current = implicitTriggerId;
7268 + }
7269 + }
7270 + if (stateUpdates.triggerCount !== void 0 || stateUpdates.activeTriggerId !== void 0 || stateUpdates.activeTriggerElement !== void 0) {
7271 + store3.update(stateUpdates);
7272 + }
7273 + if (lostActiveTriggerId) {
7274 + if (closeOnActiveTriggerUnmount) {
7275 + queueMicrotask(() => {
7276 + if (store3.select("open") && store3.select("activeTriggerId") === lostActiveTriggerId && !store3.context.triggerElements.getById(lostActiveTriggerId)) {
7277 + const eventDetails = createChangeEventDetails(reason_parts_exports.none);
7278 + store3.setOpen(false, eventDetails);
7279 + if (!eventDetails.isCanceled) {
7280 + store3.update({
7281 + activeTriggerId: null,
7282 + activeTriggerElement: null
7283 + });
7284 + }
7285 + }
7286 + });
7287 + }
7288 + }
7289 + }, [open3, store3, reactiveTriggerCount, activeTriggerId, reactiveActiveTriggerElement, closeOnActiveTriggerUnmount]);
7290 + }
7291 + function useOpenStateTransitions(open3, store3, onUnmount, animateInitialOpen) {
7292 + const {
7293 + mounted,
7294 + setMounted,
7295 + transitionStatus
7296 + } = useTransitionStatus(open3, false, false, animateInitialOpen);
7297 + const preventUnmountingOnClose = store3.useState("preventUnmountingOnClose");
7298 + const syncedPreventUnmountingOnClose = open3 ? false : preventUnmountingOnClose;
7299 + store3.useSyncedValues({
7300 + mounted,
7301 + transitionStatus,
7302 + preventUnmountingOnClose: syncedPreventUnmountingOnClose
7303 + });
7304 + const forceUnmount = useStableCallback(() => {
7305 + setMounted(false);
7306 + store3.update({
7307 + activeTriggerId: null,
7308 + activeTriggerElement: null,
7309 + mounted: false,
7310 + preventUnmountingOnClose: false
7311 + });
7312 + onUnmount?.();
7313 + store3.context.onOpenChangeComplete?.(false);
7314 + });
7315 + useOpenChangeComplete({
7316 + enabled: mounted && !open3 && !syncedPreventUnmountingOnClose,
7317 + open: open3,
7318 + ref: store3.context.popupRef,
7319 + onComplete() {
7320 + if (!open3) {
7321 + forceUnmount();
7322 + }
7323 + }
7324 + });
7325 + return {
7326 + forceUnmount,
7327 + transitionStatus
7328 + };
7329 + }
7330 + function usePopupInteractionProps(store3, statePart) {
7331 + store3.useSyncedValues(statePart);
7332 + useIsoLayoutEffect(() => () => {
7333 + store3.update({
7334 + activeTriggerProps: EMPTY_OBJECT,
7335 + inactiveTriggerProps: EMPTY_OBJECT,
7336 + popupProps: EMPTY_OBJECT
7337 + });
7338 + }, [store3]);
7339 + }
7340 +
7341 + // node_modules/@base-ui/react/utils/popups/popupTriggerMap.mjs
7342 + var devElementIdsByMap;
7343 + function getDevElementIds(map) {
7344 + devElementIdsByMap ??= /* @__PURE__ */ new WeakMap();
7345 + let elementIds = devElementIdsByMap.get(map);
7346 + if (!elementIds) {
7347 + elementIds = /* @__PURE__ */ new WeakMap();
7348 + devElementIdsByMap.set(map, elementIds);
7349 + }
7350 + return elementIds;
7351 + }
7352 + var PopupTriggerMap = class {
7353 + constructor() {
7354 + this.idMap = /* @__PURE__ */ new Map();
7355 + }
7356 + /**
7357 + * Adds a trigger element with the given ID.
7358 + *
7359 + * Note: The provided element is assumed to not be registered under multiple IDs.
7360 + */
7361 + add(id, element) {
7362 + if (true) {
7363 + const elementIds = getDevElementIds(this);
7364 + const existingId = elementIds.get(element);
7365 + if (existingId !== void 0 && existingId !== id) {
7366 + throw new Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.");
7367 + }
7368 + const previousElement = this.idMap.get(id);
7369 + if (previousElement !== void 0 && previousElement !== element) {
7370 + elementIds.delete(previousElement);
7371 + }
7372 + elementIds.set(element, id);
7373 + }
7374 + this.idMap.set(id, element);
7375 + }
7376 + /**
7377 + * Removes the trigger element with the given ID.
7378 + */
7379 + delete(id) {
7380 + if (true) {
7381 + const element = this.idMap.get(id);
7382 + if (element !== void 0) {
7383 + devElementIdsByMap?.get(this)?.delete(element);
7384 + }
7385 + }
7386 + this.idMap.delete(id);
7387 + }
7388 + /**
7389 + * Whether the given element is registered as a trigger.
7390 + */
7391 + hasElement(element) {
7392 + for (const registered of this.idMap.values()) {
7393 + if (registered === element) {
7394 + return true;
7395 + }
7396 + }
7397 + return false;
7398 + }
7399 + /**
7400 + * Whether there is a registered trigger element matching the given predicate.
7401 + */
7402 + hasMatchingElement(predicate) {
7403 + for (const element of this.idMap.values()) {
7404 + if (predicate(element)) {
7405 + return true;
7406 + }
7407 + }
7408 + return false;
7409 + }
7410 + /**
7411 + * Returns the trigger element associated with the given ID, or undefined if no such element exists.
7412 + */
7413 + getById(id) {
7414 + return this.idMap.get(id);
7415 + }
7416 + /**
7417 + * Returns an iterable of all registered trigger entries, where each entry is a tuple of [id, element].
7418 + */
7419 + entries() {
7420 + return this.idMap.entries();
7421 + }
7422 + /**
7423 + * Returns an iterable of all registered trigger elements.
7424 + */
7425 + elements() {
7426 + return this.idMap.values();
7427 + }
7428 + /**
7429 + * Returns the number of registered trigger elements.
7430 + */
7431 + get size() {
7432 + return this.idMap.size;
7433 + }
7434 + };
7435 +
7436 + // node_modules/@base-ui/react/utils/popups/store.mjs
7437 + function createInitialPopupStoreState(triggerElements, floatingId, nested = false) {
7438 + return {
7439 + open: false,
7440 + openProp: void 0,
7441 + mounted: false,
7442 + transitionStatus: void 0,
7443 + floatingRootContext: new FloatingRootStore({
7444 + open: false,
7445 + transitionStatus: void 0,
7446 + floatingElement: null,
7447 + referenceElement: null,
7448 + triggerElements,
7449 + floatingId,
7450 + syncOnly: true,
7451 + nested,
7452 + onOpenChange: void 0
7453 + }),
7454 + floatingId,
7455 + triggerCount: 0,
7456 + preventUnmountingOnClose: false,
7457 + payload: void 0,
7458 + activeTriggerId: null,
7459 + activeTriggerElement: null,
7460 + triggerIdProp: void 0,
7461 + popupElement: null,
7462 + positionerElement: null,
7463 + activeTriggerProps: EMPTY_OBJECT,
7464 + inactiveTriggerProps: EMPTY_OBJECT,
7465 + popupProps: EMPTY_OBJECT
7466 + };
7467 + }
7468 + var activeTriggerIdSelector = (state) => state.triggerIdProp ?? state.activeTriggerId;
7469 + var openSelector = (state) => state.openProp ?? state.open;
7470 + var popupIdSelector = (state) => {
7471 + const popupId = state.popupElement?.id ?? state.floatingId;
7472 + return popupId || void 0;
7473 + };
7474 + function triggerOwnsOpenPopup(state, triggerId) {
7475 + return triggerId !== void 0 && openSelector(state) && activeTriggerIdSelector(state) === triggerId;
7476 + }
7477 + function triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) {
7478 + if (triggerOwnsOpenPopup(state, triggerId)) {
7479 + return true;
7480 + }
7481 + return triggerId !== void 0 && openSelector(state) && activeTriggerIdSelector(state) == null && state.triggerCount === 1;
7482 + }
7483 + var popupStoreSelectors = {
7484 + open: openSelector,
7485 + mounted: (state) => state.mounted,
7486 + transitionStatus: (state) => state.transitionStatus,
7487 + floatingRootContext: (state) => state.floatingRootContext,
7488 + triggerCount: (state) => state.triggerCount,
7489 + preventUnmountingOnClose: (state) => state.preventUnmountingOnClose,
7490 + payload: (state) => state.payload,
7491 + activeTriggerId: activeTriggerIdSelector,
7492 + activeTriggerElement: (state) => state.mounted ? state.activeTriggerElement : null,
7493 + popupId: popupIdSelector,
7494 + /**
7495 + * Whether the trigger with the given ID was used to open the popup.
7496 + */
7497 + isTriggerActive: (state, triggerId) => triggerId !== void 0 && activeTriggerIdSelector(state) === triggerId,
7498 + /**
7499 + * Whether the popup is open and was activated by a trigger with the given ID.
7500 + */
7501 + isOpenedByTrigger: (state, triggerId) => triggerOwnsOpenPopup(state, triggerId),
7502 + /**
7503 + * Whether the popup is mounted and was activated by a trigger with the given ID.
7504 + */
7505 + isMountedByTrigger: (state, triggerId) => triggerId !== void 0 && activeTriggerIdSelector(state) === triggerId && state.mounted,
7506 + triggerProps: (state, isActive) => isActive ? state.activeTriggerProps : state.inactiveTriggerProps,
7507 + /**
7508 + * Popup id for the trigger that currently owns the open popup.
7509 + */
7510 + triggerPopupId: (state, triggerId) => triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) ? popupIdSelector(state) : void 0,
7511 + popupProps: (state) => state.popupProps,
7512 + popupElement: (state) => state.popupElement,
7513 + positionerElement: (state) => state.positionerElement
7514 + };
7515 +
7516 + // node_modules/@base-ui/react/utils/popups/usePopupHandleStore.mjs
7517 + var React30 = __toESM(require_react(), 1);
7518 + var import_shim2 = __toESM(require_shim(), 1);
7519 + function usePopupHandleStore(handle) {
7520 + const subscribe = React30.useCallback((listener) => {
7521 + if (handle === void 0) {
7522 + return NOOP;
7523 + }
7524 + return handle.subscribeStore(listener);
7525 + }, [handle]);
7526 + const getSnapshot = React30.useCallback(() => {
7527 + return handle === void 0 ? void 0 : handle.store;
7528 + }, [handle]);
7529 + return (0, import_shim2.useSyncExternalStore)(subscribe, getSnapshot, () => handle?.serverStore);
7530 + }
7531 +
7532 + // node_modules/@base-ui/react/floating-ui-react/hooks/useFloating.mjs
7533 + function useBaseUIFloating(options) {
7534 + return useFloatingWithStore(options, options.rootContext);
7535 + }
7536 + function useFloatingWithStore(options, store3) {
7537 + const {
7538 + nodeId,
7539 + externalTree
7540 + } = options;
7541 + const referenceElement = store3.useState("referenceElement");
7542 + const floatingElement = store3.useState("floatingElement");
7543 + const domReferenceElement = store3.useState("domReferenceElement");
7544 + const open3 = store3.useState("open");
7545 + const floatingId = store3.useState("floatingId");
7546 + const [positionReference, setPositionReferenceRaw] = React31.useState(null);
7547 + const [localDomReference, setLocalDomReference] = React31.useState(void 0);
7548 + const [localFloatingElement, setLocalFloatingElement] = React31.useState(void 0);
7549 + const domReferenceRef = React31.useRef(null);
7550 + const tree = useFloatingTree(externalTree);
7551 + const storeElements = React31.useMemo(() => ({
7552 + reference: referenceElement,
7553 + floating: floatingElement,
7554 + domReference: domReferenceElement
7555 + }), [referenceElement, floatingElement, domReferenceElement]);
7556 + const position = useFloating({
7557 + ...options,
7558 + elements: {
7559 + ...storeElements,
7560 + ...positionReference && {
7561 + reference: positionReference
7562 + }
7563 + }
7564 + });
7565 + const localDomReferenceElement = isElement(localDomReference) ? localDomReference : null;
7566 + const syncedFloatingElement = localFloatingElement === void 0 ? store3.state.floatingElement : localFloatingElement;
7567 + store3.useSyncedValue("referenceElement", localDomReference ?? null);
7568 + store3.useSyncedValue("domReferenceElement", localDomReference === void 0 ? domReferenceElement : localDomReferenceElement);
7569 + store3.useSyncedValue("floatingElement", syncedFloatingElement);
7570 + const setPositionReference = React31.useCallback((node) => {
7571 + const computedPositionReference = isElement(node) ? {
7572 + getBoundingClientRect: () => node.getBoundingClientRect(),
7573 + getClientRects: () => node.getClientRects(),
7574 + contextElement: node
7575 + } : node;
7576 + setPositionReferenceRaw(computedPositionReference);
7577 + position.refs.setReference(computedPositionReference);
7578 + }, [position.refs]);
7579 + const setReference = React31.useCallback((node) => {
7580 + if (isElement(node) || node === null) {
7581 + domReferenceRef.current = node;
7582 + setLocalDomReference(node);
7583 + }
7584 + if (isElement(position.refs.reference.current) || position.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
7585 + // `null` to support `positionReference` + an unstable `reference`
7586 + // callback ref.
7587 + node !== null && !isElement(node)) {
7588 + position.refs.setReference(node);
7589 + }
7590 + }, [position.refs, setLocalDomReference]);
7591 + const setFloating = React31.useCallback((node) => {
7592 + setLocalFloatingElement(node);
7593 + position.refs.setFloating(node);
7594 + }, [position.refs]);
7595 + const refs = React31.useMemo(() => ({
7596 + ...position.refs,
7597 + setReference,
7598 + setFloating,
7599 + setPositionReference,
7600 + domReference: domReferenceRef
7601 + }), [position.refs, setReference, setFloating, setPositionReference]);
7602 + const elements = React31.useMemo(() => ({
7603 + ...position.elements,
7604 + domReference: domReferenceElement
7605 + }), [position.elements, domReferenceElement]);
7606 + const context = React31.useMemo(() => ({
7607 + ...position,
7608 + dataRef: store3.context.dataRef,
7609 + open: open3,
7610 + onOpenChange: store3.setOpen,
7611 + events: store3.context.events,
7612 + floatingId,
7613 + refs,
7614 + elements,
7615 + nodeId,
7616 + rootStore: store3
7617 + }), [position, refs, elements, nodeId, store3, open3, floatingId]);
7618 + useIsoLayoutEffect(() => {
7619 + if (domReferenceElement) {
7620 + domReferenceRef.current = domReferenceElement;
7621 + }
7622 + }, [domReferenceElement]);
7623 + useIsoLayoutEffect(() => {
7624 + store3.context.dataRef.current.floatingContext = context;
7625 + const node = tree?.nodesRef.current.find((n) => n.id === nodeId);
7626 + if (node) {
7627 + node.context = context;
7628 + }
7629 + });
7630 + return React31.useMemo(() => ({
7631 + ...position,
7632 + context,
7633 + refs,
7634 + elements,
7635 + rootStore: store3
7636 + }), [position, refs, elements, context, store3]);
7637 + }
7638 +
7639 + // node_modules/@base-ui/react/floating-ui-react/hooks/useFocus.mjs
7640 + var React32 = __toESM(require_react(), 1);
7641 + var isMacSafari = parts_exports.os.mac && parts_exports.engine.webkit;
7642 + function useFocus(context, props = {}) {
7643 + const {
7644 + enabled = true,
7645 + delay
7646 + } = props;
7647 + const store3 = "rootStore" in context ? context.rootStore : context;
7648 + const {
7649 + events,
7650 + dataRef
7651 + } = store3.context;
7652 + const blockFocusRef = React32.useRef(false);
7653 + const blockedReferenceRef = React32.useRef(null);
7654 + const keyboardModalityRef = React32.useRef(true);
7655 + const timeout = useTimeout();
7656 + React32.useEffect(() => {
7657 + const domReference = store3.select("domReferenceElement");
7658 + if (!enabled) {
7659 + return void 0;
7660 + }
7661 + const win = getWindow(domReference);
7662 + function onBlur() {
7663 + const currentDomReference = store3.select("domReferenceElement");
7664 + if (!store3.select("open") && isHTMLElement(currentDomReference) && currentDomReference === activeElement(ownerDocument(currentDomReference))) {
7665 + blockFocusRef.current = true;
7666 + blockedReferenceRef.current = currentDomReference;
7667 + }
7668 + }
7669 + function onKeyDown() {
7670 + keyboardModalityRef.current = true;
7671 + }
7672 + function onPointerDown() {
7673 + keyboardModalityRef.current = false;
7674 + }
7675 + return mergeCleanups(addEventListener(win, "blur", onBlur), isMacSafari && addEventListener(win, "keydown", onKeyDown, true), isMacSafari && addEventListener(win, "pointerdown", onPointerDown, true));
7676 + }, [store3, enabled]);
7677 + React32.useEffect(() => {
7678 + if (!enabled) {
7679 + return void 0;
7680 + }
7681 + function onOpenChangeLocal(details) {
7682 + if (details.reason === reason_parts_exports.triggerPress || details.reason === reason_parts_exports.escapeKey) {
7683 + const referenceElement = store3.select("domReferenceElement");
7684 + if (isElement(referenceElement)) {
7685 + blockedReferenceRef.current = referenceElement;
7686 + blockFocusRef.current = true;
7687 + }
7688 + }
7689 + }
7690 + events.on("openchange", onOpenChangeLocal);
7691 + return () => {
7692 + events.off("openchange", onOpenChangeLocal);
7693 + };
7694 + }, [events, enabled, store3]);
7695 + const reference = React32.useMemo(() => {
7696 + function resetBlockedFocus() {
7697 + blockFocusRef.current = false;
7698 + blockedReferenceRef.current = null;
7699 + }
7700 + return {
7701 + onMouseLeave() {
7702 + resetBlockedFocus();
7703 + },
7704 + onFocus(event) {
7705 + const focusTarget = event.currentTarget;
7706 + if (blockFocusRef.current) {
7707 + if (blockedReferenceRef.current === focusTarget) {
7708 + return;
7709 + }
7710 + resetBlockedFocus();
7711 + }
7712 + const target = getTarget(event.nativeEvent);
7713 + if (isElement(target)) {
7714 + if (isMacSafari && !event.relatedTarget) {
7715 + if (!keyboardModalityRef.current && !isTypeableElement(target)) {
7716 + return;
7717 + }
7718 + } else if (!matchesFocusVisible(target)) {
7719 + return;
7720 + }
7721 + }
7722 + const movedFromOtherEnabledTrigger = isTargetInsideEnabledTrigger(event.relatedTarget, store3.context.triggerElements);
7723 + const {
7724 + nativeEvent,
7725 + currentTarget
7726 + } = event;
7727 + const delayValue = typeof delay === "function" ? delay() : delay;
7728 + if (store3.select("open") && movedFromOtherEnabledTrigger || delayValue === 0 || delayValue === void 0) {
7729 + store3.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent, currentTarget));
7730 + return;
7731 + }
7732 + timeout.start(delayValue, () => {
7733 + if (blockFocusRef.current) {
7734 + return;
7735 + }
7736 + store3.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent, currentTarget));
7737 + });
7738 + },
7739 + onBlur(event) {
7740 + resetBlockedFocus();
7741 + const relatedTarget = event.relatedTarget;
7742 + const nativeEvent = event.nativeEvent;
7743 + const movedToFocusGuard = isElement(relatedTarget) && relatedTarget.hasAttribute(createAttribute("focus-guard")) && relatedTarget.getAttribute("data-type") === "outside";
7744 + timeout.start(0, () => {
7745 + const domReference = store3.select("domReferenceElement");
7746 + const activeEl = activeElement(ownerDocument(domReference));
7747 + if (!relatedTarget && activeEl === domReference) {
7748 + return;
7749 + }
7750 + if (contains(dataRef.current.floatingContext?.refs.floating.current, activeEl) || contains(domReference, activeEl) || movedToFocusGuard) {
7751 + return;
7752 + }
7753 + const nextFocusedElement = relatedTarget ?? activeEl;
7754 + if (isTargetInsideEnabledTrigger(nextFocusedElement, store3.context.triggerElements)) {
7755 + return;
7756 + }
7757 + store3.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent));
7758 + });
7759 + }
7760 + };
7761 + }, [dataRef, delay, store3, timeout]);
7762 + return React32.useMemo(() => enabled ? {
7763 + reference,
7764 + trigger: reference
7765 + } : {}, [enabled, reference]);
7766 + }
7767 +
7768 + // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverFloatingInteraction.mjs
7769 + var React33 = __toESM(require_react(), 1);
7770 +
7771 + // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverInteractionSharedState.mjs
7772 + var HoverInteraction = class _HoverInteraction {
7773 + constructor() {
7774 + this.pointerType = void 0;
7775 + this.interactedInside = false;
7776 + this.handler = void 0;
7777 + this.blockMouseMove = true;
7778 + this.performedPointerEventsMutation = false;
7779 + this.pointerEventsScopeElement = null;
7780 + this.pointerEventsReferenceElement = null;
7781 + this.pointerEventsFloatingElement = null;
7782 + this.restTimeoutPending = false;
7783 + this.openChangeTimeout = new Timeout();
7784 + this.restTimeout = new Timeout();
7785 + this.handleCloseOptions = void 0;
7786 + }
7787 + static create() {
7788 + return new _HoverInteraction();
7789 + }
7790 + dispose = () => {
7791 + this.openChangeTimeout.clear();
7792 + this.restTimeout.clear();
7793 + };
7794 + disposeEffect = () => {
7795 + return this.dispose;
7796 + };
7797 + };
7798 + var pointerEventsMutationOwnerByScopeElement = /* @__PURE__ */ new WeakMap();
7799 + function clearSafePolygonPointerEventsMutation(instance) {
7800 + if (!instance.performedPointerEventsMutation) {
7801 + return;
7802 + }
7803 + const scopeElement = instance.pointerEventsScopeElement;
7804 + if (scopeElement && pointerEventsMutationOwnerByScopeElement.get(scopeElement) === instance) {
7805 + instance.pointerEventsScopeElement?.style.removeProperty("pointer-events");
7806 + instance.pointerEventsReferenceElement?.style.removeProperty("pointer-events");
7807 + instance.pointerEventsFloatingElement?.style.removeProperty("pointer-events");
7808 + pointerEventsMutationOwnerByScopeElement.delete(scopeElement);
7809 + }
7810 + instance.performedPointerEventsMutation = false;
7811 + instance.pointerEventsScopeElement = null;
7812 + instance.pointerEventsReferenceElement = null;
7813 + instance.pointerEventsFloatingElement = null;
7814 + }
7815 + function applySafePolygonPointerEventsMutation(instance, options) {
7816 + const {
7817 + scopeElement,
7818 + referenceElement,
7819 + floatingElement
7820 + } = options;
7821 + const existingOwner = pointerEventsMutationOwnerByScopeElement.get(scopeElement);
7822 + if (existingOwner && existingOwner !== instance) {
7823 + clearSafePolygonPointerEventsMutation(existingOwner);
7824 + }
7825 + clearSafePolygonPointerEventsMutation(instance);
7826 + instance.performedPointerEventsMutation = true;
7827 + instance.pointerEventsScopeElement = scopeElement;
7828 + instance.pointerEventsReferenceElement = referenceElement;
7829 + instance.pointerEventsFloatingElement = floatingElement;
7830 + pointerEventsMutationOwnerByScopeElement.set(scopeElement, instance);
7831 + scopeElement.style.pointerEvents = "none";
7832 + referenceElement.style.pointerEvents = "auto";
7833 + floatingElement.style.pointerEvents = "auto";
7834 + }
7835 + function useHoverInteractionSharedState(store3) {
7836 + const data = store3.context.dataRef.current;
7837 + const instance = useRefWithInit(() => data.hoverInteractionState ?? HoverInteraction.create()).current;
7838 + if (!data.hoverInteractionState) {
7839 + data.hoverInteractionState = instance;
7840 + }
7841 + useOnMount(data.hoverInteractionState.disposeEffect);
7842 + return data.hoverInteractionState;
7843 + }
7844 +
7845 + // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverFloatingInteraction.mjs
7846 + function useHoverFloatingInteraction(context, parameters = {}) {
7847 + const {
7848 + enabled = true,
7849 + closeDelay: closeDelayProp = 0,
7850 + nodeId: nodeIdProp
7851 + } = parameters;
7852 + const store3 = "rootStore" in context ? context.rootStore : context;
7853 + const open3 = store3.useState("open");
7854 + const floatingElement = store3.useState("floatingElement");
7855 + const domReferenceElement = store3.useState("domReferenceElement");
7856 + const {
7857 + dataRef
7858 + } = store3.context;
7859 + const tree = useFloatingTree();
7860 + const parentId = useFloatingParentNodeId();
7861 + const instance = useHoverInteractionSharedState(store3);
7862 + const childClosedTimeout = useTimeout();
7863 + const isClickLikeOpenEvent2 = useStableCallback(() => {
7864 + return isClickLikeOpenEvent(dataRef.current.openEvent?.type, instance.interactedInside);
7865 + });
7866 + const isHoverOpen = useStableCallback(() => {
7867 + return isHoverOpenEvent(dataRef.current.openEvent?.type);
7868 + });
7869 + const clearPointerEvents = useStableCallback(() => {
7870 + clearSafePolygonPointerEventsMutation(instance);
7871 + });
7872 + useIsoLayoutEffect(() => {
7873 + if (!open3) {
7874 + instance.pointerType = void 0;
7875 + instance.restTimeoutPending = false;
7876 + instance.interactedInside = false;
7877 + clearPointerEvents();
7878 + }
7879 + }, [open3, instance, clearPointerEvents]);
7880 + React33.useEffect(() => {
7881 + return clearPointerEvents;
7882 + }, [clearPointerEvents]);
7883 + useIsoLayoutEffect(() => {
7884 + if (!enabled) {
7885 + return void 0;
7886 + }
7887 + if (open3 && instance.handleCloseOptions?.blockPointerEvents && isHoverOpen() && isElement(domReferenceElement) && floatingElement) {
7888 + const ref = domReferenceElement;
7889 + const floatingEl = floatingElement;
7890 + const doc = ownerDocument(floatingElement);
7891 + const parentFloating = tree?.nodesRef.current.find((node) => node.id === parentId)?.context?.elements.floating;
7892 + if (parentFloating) {
7893 + parentFloating.style.pointerEvents = "";
7894 + }
7895 + const cachedScopeElement = instance.pointerEventsScopeElement !== floatingEl ? instance.pointerEventsScopeElement : null;
7896 + const parentScopeElement = parentFloating !== floatingEl ? parentFloating : null;
7897 + const scopeElement = instance.handleCloseOptions?.getScope?.() ?? cachedScopeElement ?? parentScopeElement ?? ref.closest("[data-rootownerid]") ?? doc.body;
7898 + applySafePolygonPointerEventsMutation(instance, {
7899 + scopeElement,
7900 + referenceElement: ref,
7901 + floatingElement: floatingEl
7902 + });
7903 + return () => {
7904 + clearPointerEvents();
7905 + };
7906 + }
7907 + return void 0;
7908 + }, [enabled, open3, domReferenceElement, floatingElement, instance, isHoverOpen, tree, parentId, clearPointerEvents]);
7909 + React33.useEffect(() => {
7910 + if (!enabled) {
7911 + return void 0;
7912 + }
7913 + function hasParentChildren() {
7914 + return !!(tree && parentId && getNodeChildren(tree.nodesRef.current, parentId).length > 0);
7915 + }
7916 + function closeWithDelay(event) {
7917 + const closeDelay = getDelay(closeDelayProp, "close", instance.pointerType);
7918 + const close = () => {
7919 + store3.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
7920 + tree?.events.emit("floating.closed", event);
7921 + };
7922 + if (closeDelay) {
7923 + instance.openChangeTimeout.start(closeDelay, close);
7924 + } else {
7925 + instance.openChangeTimeout.clear();
7926 + close();
7927 + }
7928 + }
7929 + function handleInteractInside(event) {
7930 + const target = getTarget(event);
7931 + if (!isInteractiveElement(target)) {
7932 + instance.interactedInside = false;
7933 + return;
7934 + }
7935 + instance.interactedInside = target?.closest("[aria-haspopup]") != null;
7936 + }
7937 + function onFloatingMouseEnter() {
7938 + instance.openChangeTimeout.clear();
7939 + childClosedTimeout.clear();
7940 + tree?.events.off("floating.closed", onNodeClosed);
7941 + clearPointerEvents();
7942 + }
7943 + function onFloatingMouseLeave(event) {
7944 + if (hasParentChildren() && tree) {
7945 + tree.events.on("floating.closed", onNodeClosed);
7946 + return;
7947 + }
7948 + if (isTargetInsideEnabledTrigger(event.relatedTarget, store3.context.triggerElements)) {
7949 + return;
7950 + }
7951 + const currentNodeId = dataRef.current.floatingContext?.nodeId ?? nodeIdProp;
7952 + const relatedTarget = event.relatedTarget;
7953 + const isMovingIntoDescendantFloating = tree && currentNodeId && isElement(relatedTarget) && getNodeChildren(tree.nodesRef.current, currentNodeId, false).some((node) => contains(node.context?.elements.floating, relatedTarget));
7954 + if (isMovingIntoDescendantFloating) {
7955 + return;
7956 + }
7957 + if (instance.handler) {
7958 + instance.handler(event);
7959 + return;
7960 + }
7961 + clearPointerEvents();
7962 + if (isHoverOpen() && !isClickLikeOpenEvent2()) {
7963 + closeWithDelay(event);
7964 + }
7965 + }
7966 + function onNodeClosed(event) {
7967 + if (!tree || !parentId || hasParentChildren()) {
7968 + return;
7969 + }
7970 + childClosedTimeout.start(0, () => {
7971 + tree.events.off("floating.closed", onNodeClosed);
7972 + store3.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
7973 + tree.events.emit("floating.closed", event);
7974 + });
7975 + }
7976 + const floating = floatingElement;
7977 + return mergeCleanups(floating && addEventListener(floating, "mouseenter", onFloatingMouseEnter), floating && addEventListener(floating, "mouseleave", onFloatingMouseLeave), floating && addEventListener(floating, "pointerdown", handleInteractInside, true), () => {
7978 + tree?.events.off("floating.closed", onNodeClosed);
7979 + });
7980 + }, [enabled, floatingElement, store3, dataRef, closeDelayProp, nodeIdProp, isHoverOpen, isClickLikeOpenEvent2, clearPointerEvents, instance, tree, parentId, childClosedTimeout]);
7981 + }
7982 +
7983 + // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverReferenceInteraction.mjs
7984 + var React34 = __toESM(require_react(), 1);
7985 + var ReactDOM5 = __toESM(require_react_dom(), 1);
7986 + var EMPTY_REF = {
7987 + current: null
7988 + };
7989 + function useHoverReferenceInteraction(context, props = {}) {
7990 + const {
7991 + enabled = true,
7992 + delay = 0,
7993 + handleClose = null,
7994 + mouseOnly = false,
7995 + restMs = 0,
7996 + move = true,
7997 + triggerElementRef = EMPTY_REF,
7998 + externalTree,
7999 + isActiveTrigger = true,
8000 + getHandleCloseContext,
8001 + isClosing,
8002 + shouldOpen: shouldOpenProp,
8003 + guardStaleOpen = false
8004 + } = props;
8005 + const store3 = "rootStore" in context ? context.rootStore : context;
8006 + const {
8007 + dataRef,
8008 + events
8009 + } = store3.context;
8010 + const tree = useFloatingTree(externalTree);
8011 + const instance = useHoverInteractionSharedState(store3);
8012 + const isHoverCloseActiveRef = React34.useRef(false);
8013 + const handleCloseRef = useValueAsRef(handleClose);
8014 + const delayRef = useValueAsRef(delay);
8015 + const restMsRef = useValueAsRef(restMs);
8016 + const enabledRef = useValueAsRef(enabled);
8017 + const shouldOpenRef = useValueAsRef(shouldOpenProp);
8018 + const isClosingRef = useValueAsRef(isClosing);
8019 + const isClickLikeOpenEvent2 = useStableCallback(() => {
8020 + return isClickLikeOpenEvent(dataRef.current.openEvent?.type, instance.interactedInside);
8021 + });
8022 + const checkShouldOpen = useStableCallback(() => {
8023 + return shouldOpenRef.current?.() !== false;
8024 + });
8025 + const isOverInactiveTrigger = useStableCallback((currentDomReference, currentTarget, target) => {
8026 + const allTriggers = store3.context.triggerElements;
8027 + if (allTriggers.hasElement(currentTarget)) {
8028 + return !currentDomReference || !contains(currentDomReference, currentTarget);
8029 + }
8030 + if (!isElement(target)) {
8031 + return false;
8032 + }
8033 + const targetElement = target;
8034 + return allTriggers.hasMatchingElement((trigger) => contains(trigger, targetElement)) && (!currentDomReference || !contains(currentDomReference, targetElement));
8035 + });
8036 + const cleanupMouseMoveHandler = useStableCallback(() => {
8037 + if (!instance.handler) {
8038 + return;
8039 + }
8040 + const doc = ownerDocument(store3.select("domReferenceElement"));
8041 + doc.removeEventListener("mousemove", instance.handler);
8042 + instance.handler = void 0;
8043 + });
8044 + const clearPointerEvents = useStableCallback(() => {
8045 + clearSafePolygonPointerEventsMutation(instance);
8046 + });
8047 + if (isActiveTrigger) {
8048 + instance.handleCloseOptions = handleClose?.__options;
8049 + }
8050 + React34.useEffect(() => cleanupMouseMoveHandler, [cleanupMouseMoveHandler]);
8051 + React34.useEffect(() => {
8052 + if (!enabled) {
8053 + return void 0;
8054 + }
8055 + function onOpenChangeLocal(details) {
8056 + if (!details.open) {
8057 + isHoverCloseActiveRef.current = details.reason === reason_parts_exports.triggerHover;
8058 + cleanupMouseMoveHandler();
8059 + instance.openChangeTimeout.clear();
8060 + instance.restTimeout.clear();
8061 + instance.blockMouseMove = true;
8062 + instance.restTimeoutPending = false;
8063 + } else {
8064 + isHoverCloseActiveRef.current = false;
8065 + }
8066 + }
8067 + events.on("openchange", onOpenChangeLocal);
8068 + return () => {
8069 + events.off("openchange", onOpenChangeLocal);
8070 + };
8071 + }, [enabled, events, instance, cleanupMouseMoveHandler]);
8072 + React34.useEffect(() => {
8073 + if (!enabled) {
8074 + return void 0;
8075 + }
8076 + function closeWithDelay(event, runElseBranch = true) {
8077 + const closeDelay = getDelay(delayRef.current, "close", instance.pointerType);
8078 + if (closeDelay) {
8079 + instance.openChangeTimeout.start(closeDelay, () => {
8080 + store3.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
8081 + tree?.events.emit("floating.closed", event);
8082 + });
8083 + } else if (runElseBranch) {
8084 + instance.openChangeTimeout.clear();
8085 + store3.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
8086 + tree?.events.emit("floating.closed", event);
8087 + }
8088 + }
8089 + const trigger = triggerElementRef.current ?? (isActiveTrigger ? store3.select("domReferenceElement") : null);
8090 + if (!isElement(trigger)) {
8091 + return void 0;
8092 + }
8093 + function onMouseEnter(event) {
8094 + instance.openChangeTimeout.clear();
8095 + instance.blockMouseMove = false;
8096 + if (mouseOnly && !isMouseLikePointerType(instance.pointerType)) {
8097 + return;
8098 + }
8099 + const restMsValue = getRestMs(restMsRef.current);
8100 + const openDelay = getDelay(delayRef.current, "open", instance.pointerType);
8101 + const eventTarget = getTarget(event);
8102 + const currentTarget = event.currentTarget ?? null;
8103 + const currentDomReference = store3.select("domReferenceElement");
8104 + let triggerNode = currentTarget;
8105 + if (isElement(eventTarget) && !store3.context.triggerElements.hasElement(eventTarget)) {
8106 + for (const triggerElement of store3.context.triggerElements.elements()) {
8107 + if (contains(triggerElement, eventTarget)) {
8108 + triggerNode = triggerElement;
8109 + break;
8110 + }
8111 + }
8112 + }
8113 + if (isElement(currentTarget) && isElement(currentDomReference) && !store3.context.triggerElements.hasElement(currentTarget) && contains(currentTarget, currentDomReference)) {
8114 + triggerNode = currentDomReference;
8115 + }
8116 + const isOverInactive = triggerNode == null ? false : isOverInactiveTrigger(currentDomReference, triggerNode, eventTarget);
8117 + const isOpen = store3.select("open");
8118 + const isInClosingTransition = isClosingRef.current?.() ?? store3.select("transitionStatus") === "ending";
8119 + const isHoverCloseTransition = !isOpen && isInClosingTransition && isHoverCloseActiveRef.current;
8120 + const isReenteringSameTriggerDuringCloseTransition = !isOverInactive && isElement(triggerNode) && isElement(currentDomReference) && contains(currentDomReference, triggerNode) && isHoverCloseTransition;
8121 + const isRestOnlyDelay = restMsValue > 0 && !openDelay;
8122 + const shouldOpenImmediately = isOverInactive && (isOpen || isHoverCloseTransition) || isReenteringSameTriggerDuringCloseTransition;
8123 + const shouldOpen = !isOpen || isOverInactive;
8124 + if (shouldOpenImmediately) {
8125 + if (checkShouldOpen()) {
8126 + store3.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
8127 + }
8128 + return;
8129 + }
8130 + if (isRestOnlyDelay) {
8131 + return;
8132 + }
8133 + if (openDelay) {
8134 + instance.openChangeTimeout.start(openDelay, () => {
8135 + if (shouldOpen && checkShouldOpen()) {
8136 + store3.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
8137 + }
8138 + });
8139 + } else if (shouldOpen) {
8140 + if (checkShouldOpen()) {
8141 + store3.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
8142 + }
8143 + }
8144 + }
8145 + function onMouseLeave(event) {
8146 + if (isClickLikeOpenEvent2()) {
8147 + clearPointerEvents();
8148 + return;
8149 + }
8150 + cleanupMouseMoveHandler();
8151 + const domReferenceElement = store3.select("domReferenceElement");
8152 + const doc = ownerDocument(domReferenceElement);
8153 + instance.restTimeout.clear();
8154 + instance.restTimeoutPending = false;
8155 + const handleCloseContextBase = dataRef.current.floatingContext ?? getHandleCloseContext?.();
8156 + if (isTargetInsideEnabledTrigger(event.relatedTarget, store3.context.triggerElements)) {
8157 + return;
8158 + }
8159 + if (handleCloseRef.current && handleCloseContextBase) {
8160 + if (!store3.select("open")) {
8161 + instance.openChangeTimeout.clear();
8162 + }
8163 + const currentTrigger = triggerElementRef.current;
8164 + instance.handler = handleCloseRef.current({
8165 + ...handleCloseContextBase,
8166 + tree,
8167 + x: event.clientX,
8168 + y: event.clientY,
8169 + onClose() {
8170 + clearPointerEvents();
8171 + cleanupMouseMoveHandler();
8172 + if (enabledRef.current && !isClickLikeOpenEvent2() && currentTrigger === store3.select("domReferenceElement")) {
8173 + closeWithDelay(event, true);
8174 + }
8175 + }
8176 + });
8177 + doc.addEventListener("mousemove", instance.handler);
8178 + instance.handler(event);
8179 + return;
8180 + }
8181 + const shouldClose = instance.pointerType === "touch" ? !contains(store3.select("floatingElement"), event.relatedTarget) : true;
8182 + if (shouldClose) {
8183 + closeWithDelay(event);
8184 + }
8185 + }
8186 + function onMouseOut(event) {
8187 + if (contains(trigger, event.relatedTarget)) {
8188 + return;
8189 + }
8190 + instance.openChangeTimeout.clear();
8191 + instance.restTimeout.clear();
8192 + instance.restTimeoutPending = false;
8193 + }
8194 + const staleOpenGuard = guardStaleOpen ? addEventListener(trigger, "mouseout", onMouseOut) : void 0;
8195 + if (move) {
8196 + return mergeCleanups(addEventListener(trigger, "mousemove", onMouseEnter, {
8197 + once: true
8198 + }), addEventListener(trigger, "mouseenter", onMouseEnter), addEventListener(trigger, "mouseleave", onMouseLeave), staleOpenGuard);
8199 + }
8200 + return mergeCleanups(addEventListener(trigger, "mouseenter", onMouseEnter), addEventListener(trigger, "mouseleave", onMouseLeave), staleOpenGuard);
8201 + }, [cleanupMouseMoveHandler, clearPointerEvents, dataRef, delayRef, store3, enabled, handleCloseRef, instance, isActiveTrigger, isOverInactiveTrigger, isClickLikeOpenEvent2, mouseOnly, move, restMsRef, triggerElementRef, tree, enabledRef, getHandleCloseContext, isClosingRef, checkShouldOpen, guardStaleOpen]);
8202 + return React34.useMemo(() => {
8203 + if (!enabled) {
8204 + return void 0;
8205 + }
8206 + function setPointerRef(event) {
8207 + instance.pointerType = event.pointerType;
8208 + }
8209 + return {
8210 + onPointerDown: setPointerRef,
8211 + onPointerEnter: setPointerRef,
8212 + onMouseMove(event) {
8213 + const {
8214 + nativeEvent
8215 + } = event;
8216 + const trigger = event.currentTarget;
8217 + const currentDomReference = store3.select("domReferenceElement");
8218 + const currentOpen = store3.select("open");
8219 + const isOverInactive = isOverInactiveTrigger(currentDomReference, trigger, event.target);
8220 + if (mouseOnly && !isMouseLikePointerType(instance.pointerType)) {
8221 + return;
8222 + }
8223 + if (currentOpen && isOverInactive && instance.handleCloseOptions?.blockPointerEvents) {
8224 + const floatingElement = store3.select("floatingElement");
8225 + if (floatingElement) {
8226 + const scopeElement = instance.handleCloseOptions?.getScope?.() ?? trigger.ownerDocument.body;
8227 + applySafePolygonPointerEventsMutation(instance, {
8228 + scopeElement,
8229 + referenceElement: trigger,
8230 + floatingElement
8231 + });
8232 + }
8233 + }
8234 + const restMsValue = getRestMs(restMsRef.current);
8235 + if (currentOpen && !isOverInactive || restMsValue === 0) {
8236 + return;
8237 + }
8238 + if (!isOverInactive && instance.restTimeoutPending && event.movementX ** 2 + event.movementY ** 2 < 2) {
8239 + return;
8240 + }
8241 + instance.restTimeout.clear();
8242 + function handleMouseMove() {
8243 + instance.restTimeoutPending = false;
8244 + if (isClickLikeOpenEvent2()) {
8245 + return;
8246 + }
8247 + const latestOpen = store3.select("open");
8248 + if (!instance.blockMouseMove && (!latestOpen || isOverInactive) && checkShouldOpen()) {
8249 + store3.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, nativeEvent, trigger));
8250 + }
8251 + }
8252 + if (instance.pointerType === "touch") {
8253 + ReactDOM5.flushSync(() => {
8254 + handleMouseMove();
8255 + });
8256 + } else if (isOverInactive && currentOpen) {
8257 + handleMouseMove();
8258 + } else {
8259 + instance.restTimeoutPending = true;
8260 + instance.restTimeout.start(restMsValue, handleMouseMove);
8261 + }
8262 + }
8263 + };
8264 + }, [enabled, instance, isClickLikeOpenEvent2, isOverInactiveTrigger, mouseOnly, store3, restMsRef, checkShouldOpen]);
8265 + }
8266 +
8267 + // node_modules/@base-ui/react/floating-ui-react/safePolygon.mjs
8268 + var CURSOR_SPEED_THRESHOLD = 0.1;
8269 + var CURSOR_SPEED_THRESHOLD_SQUARED = CURSOR_SPEED_THRESHOLD * CURSOR_SPEED_THRESHOLD;
8270 + var POLYGON_BUFFER = 0.5;
8271 + function hasIntersectingEdge(pointX, pointY, xi, yi, xj, yj) {
8272 + return yi >= pointY !== yj >= pointY && pointX <= (xj - xi) * (pointY - yi) / (yj - yi) + xi;
8273 + }
8274 + function isPointInQuadrilateral(pointX, pointY, x1, y1, x2, y2, x3, y3, x4, y4) {
8275 + let isInsideValue = false;
8276 + if (hasIntersectingEdge(pointX, pointY, x1, y1, x2, y2)) {
8277 + isInsideValue = !isInsideValue;
8278 + }
8279 + if (hasIntersectingEdge(pointX, pointY, x2, y2, x3, y3)) {
8280 + isInsideValue = !isInsideValue;
8281 + }
8282 + if (hasIntersectingEdge(pointX, pointY, x3, y3, x4, y4)) {
8283 + isInsideValue = !isInsideValue;
8284 + }
8285 + if (hasIntersectingEdge(pointX, pointY, x4, y4, x1, y1)) {
8286 + isInsideValue = !isInsideValue;
8287 + }
8288 + return isInsideValue;
8289 + }
8290 + function isInsideRect(pointX, pointY, rect) {
8291 + return pointX >= rect.x && pointX <= rect.x + rect.width && pointY >= rect.y && pointY <= rect.y + rect.height;
8292 + }
8293 + function isInsideAxisAlignedRect(pointX, pointY, x1, y1, x2, y2) {
8294 + const minX = Math.min(x1, x2);
8295 + const maxX = Math.max(x1, x2);
8296 + const minY = Math.min(y1, y2);
8297 + const maxY = Math.max(y1, y2);
8298 + return pointX >= minX && pointX <= maxX && pointY >= minY && pointY <= maxY;
8299 + }
8300 + function safePolygon(options = {}) {
8301 + const {
8302 + blockPointerEvents = false
8303 + } = options;
8304 + const timeout = new Timeout();
8305 + const fn = ({
8306 + x,
8307 + y,
8308 + placement,
8309 + elements,
8310 + onClose,
8311 + nodeId,
8312 + tree
8313 + }) => {
8314 + const side = placement?.split("-")[0];
8315 + let hasLanded = false;
8316 + let lastX = null;
8317 + let lastY = null;
8318 + let lastCursorTime = typeof performance !== "undefined" ? performance.now() : 0;
8319 + function isCursorMovingSlowly(nextX, nextY) {
8320 + const currentTime = performance.now();
8321 + const elapsedTime = currentTime - lastCursorTime;
8322 + if (lastX === null || lastY === null || elapsedTime === 0) {
8323 + lastX = nextX;
8324 + lastY = nextY;
8325 + lastCursorTime = currentTime;
8326 + return false;
8327 + }
8328 + const deltaX = nextX - lastX;
8329 + const deltaY = nextY - lastY;
8330 + const distanceSquared = deltaX * deltaX + deltaY * deltaY;
8331 + const thresholdSquared = elapsedTime * elapsedTime * CURSOR_SPEED_THRESHOLD_SQUARED;
8332 + lastX = nextX;
8333 + lastY = nextY;
8334 + lastCursorTime = currentTime;
8335 + return distanceSquared < thresholdSquared;
8336 + }
8337 + function close() {
8338 + timeout.clear();
8339 + onClose();
8340 + }
8341 + return function onMouseMove(event) {
8342 + timeout.clear();
8343 + const domReference = elements.domReference;
8344 + const floating = elements.floating;
8345 + if (!domReference || !floating || side == null || x == null || y == null) {
8346 + return void 0;
8347 + }
8348 + const {
8349 + clientX,
8350 + clientY
8351 + } = event;
8352 + const target = getTarget(event);
8353 + const isLeave = event.type === "mouseleave";
8354 + const isOverFloatingEl = contains(floating, target);
8355 + const isOverReferenceEl = contains(domReference, target);
8356 + if (isOverFloatingEl) {
8357 + hasLanded = true;
8358 + if (!isLeave) {
8359 + return void 0;
8360 + }
8361 + }
8362 + if (isOverReferenceEl) {
8363 + hasLanded = false;
8364 + if (!isLeave) {
8365 + hasLanded = true;
8366 + return void 0;
8367 + }
8368 + }
8369 + if (isLeave && isElement(event.relatedTarget) && contains(floating, event.relatedTarget)) {
8370 + return void 0;
8371 + }
8372 + function hasOpenChildNode() {
8373 + return Boolean(tree && getNodeChildren(tree.nodesRef.current, nodeId).length > 0);
8374 + }
8375 + function closeIfNoOpenChild() {
8376 + if (!hasOpenChildNode()) {
8377 + close();
8378 + }
8379 + }
8380 + if (hasOpenChildNode()) {
8381 + return void 0;
8382 + }
8383 + const refRect = domReference.getBoundingClientRect();
8384 + const rect = floating.getBoundingClientRect();
8385 + const cursorLeaveFromRight = x > rect.right - rect.width / 2;
8386 + const cursorLeaveFromBottom = y > rect.bottom - rect.height / 2;
8387 + const isFloatingWider = rect.width > refRect.width;
8388 + const isFloatingTaller = rect.height > refRect.height;
8389 + const left = (isFloatingWider ? refRect : rect).left;
8390 + const right = (isFloatingWider ? refRect : rect).right;
8391 + const top = (isFloatingTaller ? refRect : rect).top;
8392 + const bottom = (isFloatingTaller ? refRect : rect).bottom;
8393 + if (side === "top" && y >= refRect.bottom - 1 || side === "bottom" && y <= refRect.top + 1 || side === "left" && x >= refRect.right - 1 || side === "right" && x <= refRect.left + 1) {
8394 + closeIfNoOpenChild();
8395 + return void 0;
8396 + }
8397 + let isInsideTroughRect = false;
8398 + switch (side) {
8399 + case "top":
8400 + isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, left, refRect.top + 1, right, rect.bottom - 1);
8401 + break;
8402 + case "bottom":
8403 + isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, left, rect.top + 1, right, refRect.bottom - 1);
8404 + break;
8405 + case "left":
8406 + isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, rect.right - 1, bottom, refRect.left + 1, top);
8407 + break;
8408 + case "right":
8409 + isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, refRect.right - 1, bottom, rect.left + 1, top);
8410 + break;
8411 + default:
8412 + }
8413 + if (isInsideTroughRect) {
8414 + return void 0;
8415 + }
8416 + if (hasLanded && !isInsideRect(clientX, clientY, refRect)) {
8417 + closeIfNoOpenChild();
8418 + return void 0;
8419 + }
8420 + if (!isLeave && isCursorMovingSlowly(clientX, clientY)) {
8421 + closeIfNoOpenChild();
8422 + return void 0;
8423 + }
8424 + let isInsidePolygon = false;
8425 + switch (side) {
8426 + case "top": {
8427 + const cursorXOffset = isFloatingWider ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
8428 + const cursorPointOneX = isFloatingWider ? x + cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
8429 + const cursorPointTwoX = isFloatingWider ? x - cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
8430 + const cursorPointY = y + POLYGON_BUFFER + 1;
8431 + const commonYLeft = cursorLeaveFromRight ? rect.bottom - POLYGON_BUFFER : isFloatingWider ? rect.bottom - POLYGON_BUFFER : rect.top;
8432 + const commonYRight = cursorLeaveFromRight ? isFloatingWider ? rect.bottom - POLYGON_BUFFER : rect.top : rect.bottom - POLYGON_BUFFER;
8433 + isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointOneX, cursorPointY, cursorPointTwoX, cursorPointY, rect.left, commonYLeft, rect.right, commonYRight);
8434 + break;
8435 + }
8436 + case "bottom": {
8437 + const cursorXOffset = isFloatingWider ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
8438 + const cursorPointOneX = isFloatingWider ? x + cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
8439 + const cursorPointTwoX = isFloatingWider ? x - cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
8440 + const cursorPointY = y - POLYGON_BUFFER;
8441 + const commonYLeft = cursorLeaveFromRight ? rect.top + POLYGON_BUFFER : isFloatingWider ? rect.top + POLYGON_BUFFER : rect.bottom;
8442 + const commonYRight = cursorLeaveFromRight ? isFloatingWider ? rect.top + POLYGON_BUFFER : rect.bottom : rect.top + POLYGON_BUFFER;
8443 + isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointOneX, cursorPointY, cursorPointTwoX, cursorPointY, rect.left, commonYLeft, rect.right, commonYRight);
8444 + break;
8445 + }
8446 + case "left": {
8447 + const cursorYOffset = isFloatingTaller ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
8448 + const cursorPointOneY = isFloatingTaller ? y + cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
8449 + const cursorPointTwoY = isFloatingTaller ? y - cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
8450 + const cursorPointX = x + POLYGON_BUFFER + 1;
8451 + const commonXTop = cursorLeaveFromBottom ? rect.right - POLYGON_BUFFER : isFloatingTaller ? rect.right - POLYGON_BUFFER : rect.left;
8452 + const commonXBottom = cursorLeaveFromBottom ? isFloatingTaller ? rect.right - POLYGON_BUFFER : rect.left : rect.right - POLYGON_BUFFER;
8453 + isInsidePolygon = isPointInQuadrilateral(clientX, clientY, commonXTop, rect.top, commonXBottom, rect.bottom, cursorPointX, cursorPointOneY, cursorPointX, cursorPointTwoY);
8454 + break;
8455 + }
8456 + case "right": {
8457 + const cursorYOffset = isFloatingTaller ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
8458 + const cursorPointOneY = isFloatingTaller ? y + cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
8459 + const cursorPointTwoY = isFloatingTaller ? y - cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
8460 + const cursorPointX = x - POLYGON_BUFFER;
8461 + const commonXTop = cursorLeaveFromBottom ? rect.left + POLYGON_BUFFER : isFloatingTaller ? rect.left + POLYGON_BUFFER : rect.right;
8462 + const commonXBottom = cursorLeaveFromBottom ? isFloatingTaller ? rect.left + POLYGON_BUFFER : rect.right : rect.left + POLYGON_BUFFER;
8463 + isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointX, cursorPointOneY, cursorPointX, cursorPointTwoY, commonXTop, rect.top, commonXBottom, rect.bottom);
8464 + break;
8465 + }
8466 + default:
8467 + }
8468 + if (!isInsidePolygon) {
8469 + closeIfNoOpenChild();
8470 + } else if (!hasLanded) {
8471 + timeout.start(40, closeIfNoOpenChild);
8472 + }
8473 + return void 0;
8474 + };
8475 + };
8476 + fn.__options = {
8477 + ...options,
8478 + blockPointerEvents
8479 + };
8480 + return fn;
8481 + }
8482 +
8483 + // node_modules/@base-ui/react/utils/NullStore.mjs
8484 + var NullStore = class extends ReactStore {
8485 + // `update`/`set`/`notifyAll` funnel through `setState` in the base `Store`, so overriding
8486 + // `setState` alone would neutralize them today. They are overridden explicitly so the store stays
8487 + // inert even if a future base-class change stops routing a mutator through `setState`.
8488 + setState(_newState) {
8489 + }
8490 + update(_changes) {
8491 + }
8492 + set(_key, _value) {
8493 + }
8494 + notifyAll() {
8495 + }
8496 + };
8497 +
8498 + // node_modules/@base-ui/utils/inertValue.mjs
8499 + function inertValue(value) {
8500 + if (isReactVersionAtLeast(19)) {
8501 + return value;
8502 + }
8503 + return value ? "true" : void 0;
8504 + }
8505 +
8506 + // node_modules/@base-ui/react/internals/direction-context/DirectionContext.mjs
8507 + var React35 = __toESM(require_react(), 1);
8508 + var DirectionContext = /* @__PURE__ */ React35.createContext(void 0);
8509 + if (true) DirectionContext.displayName = "DirectionContext";
8510 + function useDirection() {
8511 + const context = React35.useContext(DirectionContext);
8512 + return context?.direction ?? "ltr";
8513 + }
8514 +
8515 + // node_modules/@base-ui/react/internals/useAnchorPositioning.mjs
8516 + var React36 = __toESM(require_react(), 1);
8517 +
8518 + // node_modules/@base-ui/react/floating-ui-react/middleware/arrow.mjs
8519 + var baseArrow = (options) => ({
8520 + name: "arrow",
8521 + options,
8522 + async fn(state) {
8523 + const {
8524 + x,
8525 + y,
8526 + placement,
8527 + rects,
8528 + platform: platform3,
8529 + elements,
8530 + middlewareData
8531 + } = state;
8532 + const {
8533 + element,
8534 + padding = 0,
8535 + offsetParent = "real"
8536 + } = evaluate(options, state) || {};
8537 + if (element == null) {
8538 + return {};
8539 + }
8540 + const paddingObject = getPaddingObject(padding);
8541 + const coords = {
8542 + x,
8543 + y
8544 + };
8545 + const axis = getAlignmentAxis(placement);
8546 + const length = getAxisLength(axis);
8547 + const arrowDimensions = await platform3.getDimensions(element);
8548 + const isYAxis = axis === "y";
8549 + const minProp = isYAxis ? "top" : "left";
8550 + const maxProp = isYAxis ? "bottom" : "right";
8551 + const clientProp = isYAxis ? "clientHeight" : "clientWidth";
8552 + const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
8553 + const startDiff = coords[axis] - rects.reference[axis];
8554 + const arrowOffsetParent = offsetParent === "real" ? await platform3.getOffsetParent?.(element) : elements.floating;
8555 + let clientSize = elements.floating[clientProp] || rects.floating[length];
8556 + if (!clientSize || !await platform3.isElement?.(arrowOffsetParent)) {
8557 + clientSize = elements.floating[clientProp] || rects.floating[length];
8558 + }
8559 + const centerToReference = endDiff / 2 - startDiff / 2;
8560 + const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
8561 + const minPadding = Math.min(paddingObject[minProp], largestPossiblePadding);
8562 + const maxPadding = Math.min(paddingObject[maxProp], largestPossiblePadding);
8563 + const min2 = minPadding;
8564 + const max2 = clientSize - arrowDimensions[length] - maxPadding;
8565 + const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
8566 + const offset4 = clamp(min2, center, max2);
8567 + const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset4 && rects.reference[length] / 2 - (center < min2 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
8568 + const alignmentOffset = shouldAddOffset ? center < min2 ? center - min2 : center - max2 : 0;
8569 + return {
8570 + [axis]: coords[axis] + alignmentOffset,
8571 + data: {
8572 + [axis]: offset4,
8573 + centerOffset: center - offset4 - alignmentOffset,
8574 + ...shouldAddOffset && {
8575 + alignmentOffset
8576 + }
8577 + },
8578 + reset: shouldAddOffset
8579 + };
8580 + }
8581 + });
8582 + var arrow4 = (options, deps) => {
8583 + const {
8584 + name: name2,
8585 + fn
8586 + } = baseArrow(options);
8587 + return {
8588 + name: name2,
8589 + fn,
8590 + options: [options, deps]
8591 + };
8592 + };
8593 +
8594 + // node_modules/@base-ui/react/utils/hideMiddleware.mjs
8595 + var hide4 = {
8596 + name: "hide",
8597 + async fn(state) {
8598 + const {
8599 + width,
8600 + height,
8601 + x,
8602 + y
8603 + } = state.rects.reference;
8604 + const anchorHidden2 = width === 0 && height === 0 && x === 0 && y === 0;
8605 + const overflow = await state.platform.detectOverflow(state, {
8606 + elementContext: "reference"
8607 + });
8608 + const referenceHidden = overflow.top - height >= 0 || overflow.right - width >= 0 || overflow.bottom - height >= 0 || overflow.left - width >= 0;
8609 + return {
8610 + data: {
8611 + referenceHidden: referenceHidden || anchorHidden2
8612 + }
8613 + };
8614 + }
8615 + };
8616 +
8617 + // node_modules/@base-ui/react/utils/adaptiveOriginConstants.mjs
8618 + var DEFAULT_SIDES = {
8619 + sideX: "left",
8620 + sideY: "top"
8621 + };
8622 +
8623 + // node_modules/@base-ui/react/utils/CommonPositionerCssVars.mjs
8624 + var availableWidth = "--available-width";
8625 + var availableHeight = "--available-height";
8626 + var anchorWidth = "--anchor-width";
8627 + var anchorHeight = "--anchor-height";
8628 + var transformOrigin = "--transform-origin";
8629 + var positionerWidth = "--positioner-width";
8630 + var positionerHeight = "--positioner-height";
8631 +
8632 + // node_modules/@base-ui/react/internals/useAnchorPositioning.mjs
8633 + var AVAILABLE_WIDTH_VAR = availableWidth;
8634 + var AVAILABLE_HEIGHT_VAR = availableHeight;
8635 + function getLogicalSide(sideParam, renderedSide, isRtl) {
8636 + const isLogicalSideParam = sideParam === "inline-start" || sideParam === "inline-end";
8637 + const logicalRight = isRtl ? "inline-start" : "inline-end";
8638 + const logicalLeft = isRtl ? "inline-end" : "inline-start";
8639 + return {
8640 + top: "top",
8641 + right: isLogicalSideParam ? logicalRight : "right",
8642 + bottom: "bottom",
8643 + left: isLogicalSideParam ? logicalLeft : "left"
8644 + }[renderedSide];
8645 + }
8646 + function getOffsetData(state, sideParam, isRtl) {
8647 + const {
8648 + rects,
8649 + placement
8650 + } = state;
8651 + const data = {
8652 + side: getLogicalSide(sideParam, getSide(placement), isRtl),
8653 + align: getAlignment(placement) || "center",
8654 + anchor: {
8655 + width: rects.reference.width,
8656 + height: rects.reference.height
8657 + },
8658 + positioner: {
8659 + width: rects.floating.width,
8660 + height: rects.floating.height
8661 + }
8662 + };
8663 + return data;
8664 + }
8665 + function useAnchorPositioning(params) {
8666 + return useAnchorPositioningWithHook(params, useBaseUIFloating);
8667 + }
8668 + function useAnchorPositioningWithHook(params, useFloatingHook) {
8669 + const {
8670 + // Public parameters
8671 + anchor,
8672 + positionMethod = "absolute",
8673 + side: sideParam = "bottom",
8674 + sideOffset = 0,
8675 + align = "center",
8676 + alignOffset = 0,
8677 + collisionBoundary,
8678 + collisionPadding: collisionPaddingParam = 5,
8679 + sticky = false,
8680 + arrowPadding = 5,
8681 + disableAnchorTracking = false,
8682 + inline: inlineMiddleware,
8683 + // Private parameters
8684 + keepMounted = false,
8685 + floatingRootContext,
8686 + mounted,
8687 + collisionAvoidance,
8688 + shift: shift4,
8689 + nodeId,
8690 + adaptiveOrigin: adaptiveOrigin2,
8691 + lazyFlip = false,
8692 + externalTree
8693 + } = params;
8694 + const [mountSide, setMountSide] = React36.useState(null);
8695 + if (!mounted && mountSide !== null) {
8696 + setMountSide(null);
8697 + }
8698 + const collisionAvoidanceSide = collisionAvoidance.side || "flip";
8699 + const collisionAvoidanceAlign = collisionAvoidance.align || "flip";
8700 + const collisionAvoidanceFallbackAxisSide = collisionAvoidance.fallbackAxisSide || "end";
8701 + const shiftCrossAxis = shift4?.crossAxis ?? false;
8702 + const shiftRootBoundary = shift4?.rootBoundary;
8703 + const anchorFn = typeof anchor === "function" ? anchor : void 0;
8704 + const anchorFnCallback = useStableCallback(anchorFn);
8705 + const anchorDep = anchorFn ? anchorFnCallback : anchor;
8706 + const anchorValueRef = useValueAsRef(anchor);
8707 + const mountedRef = useValueAsRef(mounted);
8708 + const direction = useDirection();
8709 + const isRtl = direction === "rtl";
8710 + const side = mountSide || {
8711 + top: "top",
8712 + right: "right",
8713 + bottom: "bottom",
8714 + left: "left",
8715 + "inline-end": isRtl ? "left" : "right",
8716 + "inline-start": isRtl ? "right" : "left"
8717 + }[sideParam];
8718 + const placement = align === "center" ? side : `${side}-${align}`;
8719 + let collisionPadding = collisionPaddingParam;
8720 + if (typeof collisionPadding === "number") {
8721 + collisionPadding = {
8722 + top: collisionPadding,
8723 + right: collisionPadding,
8724 + bottom: collisionPadding,
8725 + left: collisionPadding
8726 + };
8727 + } else if (collisionPadding) {
8728 + collisionPadding = {
8729 + top: collisionPadding.top || 0,
8730 + right: collisionPadding.right || 0,
8731 + bottom: collisionPadding.bottom || 0,
8732 + left: collisionPadding.left || 0
8733 + };
8734 + }
8735 + const bias = 1;
8736 + const biasTop = sideParam === "bottom" ? bias : 0;
8737 + const biasBottom = sideParam === "top" ? bias : 0;
8738 + const biasLeft = sideParam === "right" ? bias : 0;
8739 + const biasRight = sideParam === "left" ? bias : 0;
8740 + const commonCollisionProps = {
8741 + boundary: collisionBoundary === "clipping-ancestors" ? "clippingAncestors" : collisionBoundary,
8742 + padding: collisionPadding
8743 + };
8744 + const arrowRef = React36.useRef(null);
8745 + const sideOffsetRef = useValueAsRef(sideOffset);
8746 + const alignOffsetRef = useValueAsRef(alignOffset);
8747 + const sideOffsetDep = typeof sideOffset !== "function" ? sideOffset : 0;
8748 + const alignOffsetDep = typeof alignOffset !== "function" ? alignOffset : 0;
8749 + const middleware = [];
8750 + if (inlineMiddleware) {
8751 + middleware.push(inlineMiddleware);
8752 + }
8753 + middleware.push(offset3((state) => {
8754 + const data = getOffsetData(state, sideParam, isRtl);
8755 + const sideAxis = typeof sideOffsetRef.current === "function" ? sideOffsetRef.current(data) : sideOffsetRef.current;
8756 + const alignAxis = typeof alignOffsetRef.current === "function" ? alignOffsetRef.current(data) : alignOffsetRef.current;
8757 + return {
8758 + mainAxis: sideAxis,
8759 + crossAxis: alignAxis,
8760 + alignmentAxis: alignAxis
8761 + };
8762 + }, [sideOffsetDep, alignOffsetDep, isRtl, sideParam]));
8763 + const shiftDisabled = collisionAvoidanceAlign === "none" && collisionAvoidanceSide !== "shift";
8764 + const crossAxisShiftEnabled = !shiftDisabled && (sticky || shiftCrossAxis || collisionAvoidanceSide === "shift");
8765 + const flipMiddleware = collisionAvoidanceSide === "none" ? null : flip3({
8766 + ...commonCollisionProps,
8767 + // Ensure the popup flips if it's been limited by its --available-height and it resizes.
8768 + // Since the size() padding is smaller than the flip() padding, flip() will take precedence.
8769 + padding: {
8770 + top: collisionPadding.top + bias + biasTop,
8771 + right: collisionPadding.right + bias + biasRight,
8772 + bottom: collisionPadding.bottom + bias + biasBottom,
8773 + left: collisionPadding.left + bias + biasLeft
8774 + },
8775 + mainAxis: !shiftCrossAxis && collisionAvoidanceSide === "flip",
8776 + crossAxis: collisionAvoidanceAlign === "flip" ? "alignment" : false,
8777 + fallbackAxisSideDirection: collisionAvoidanceFallbackAxisSide
8778 + });
8779 + const shiftMiddleware = shiftDisabled ? null : shift3({
8780 + ...commonCollisionProps,
8781 + // Use the Layout Viewport to avoid shifting around when pinch-zooming.
8782 + rootBoundary: shiftRootBoundary,
8783 + mainAxis: collisionAvoidanceAlign !== "none",
8784 + crossAxis: crossAxisShiftEnabled,
8785 + limiter: sticky || shiftCrossAxis ? void 0 : limitShift3((limitData) => {
8786 + if (!arrowRef.current) {
8787 + return {};
8788 + }
8789 + const {
8790 + width,
8791 + height
8792 + } = arrowRef.current.getBoundingClientRect();
8793 + const sideAxis = getSideAxis(getSide(limitData.placement));
8794 + const arrowSize = sideAxis === "y" ? width : height;
8795 + const offsetAmount = sideAxis === "y" ? collisionPadding.left + collisionPadding.right : collisionPadding.top + collisionPadding.bottom;
8796 + return {
8797 + offset: arrowSize / 2 + offsetAmount / 2
8798 + };
8799 + })
8800 + }, [commonCollisionProps, sticky, shiftCrossAxis, shiftRootBoundary, collisionPadding, collisionAvoidanceAlign]);
8801 + if (collisionAvoidanceSide === "shift" || collisionAvoidanceAlign === "shift" || align === "center") {
8802 + middleware.push(shiftMiddleware, flipMiddleware);
8803 + } else {
8804 + middleware.push(flipMiddleware, shiftMiddleware);
8805 + }
8806 + middleware.push(size3({
8807 + ...commonCollisionProps,
8808 + apply({
8809 + elements: {
8810 + floating
8811 + },
8812 + availableWidth: availableWidth2,
8813 + availableHeight: availableHeight2,
8814 + rects
8815 + }) {
8816 + if (!mountedRef.current) {
8817 + return;
8818 + }
8819 + const floatingStyle = floating.style;
8820 + floatingStyle.setProperty(AVAILABLE_WIDTH_VAR, `${availableWidth2}px`);
8821 + floatingStyle.setProperty(AVAILABLE_HEIGHT_VAR, `${availableHeight2}px`);
8822 + const dpr = getWindow(floating).devicePixelRatio || 1;
8823 + const {
8824 + x: x2,
8825 + y: y2,
8826 + width,
8827 + height
8828 + } = rects.reference;
8829 + const anchorWidth2 = (Math.round((x2 + width) * dpr) - Math.round(x2 * dpr)) / dpr;
8830 + const anchorHeight2 = (Math.round((y2 + height) * dpr) - Math.round(y2 * dpr)) / dpr;
8831 + floatingStyle.setProperty(anchorWidth, `${anchorWidth2}px`);
8832 + floatingStyle.setProperty(anchorHeight, `${anchorHeight2}px`);
8833 + }
8834 + }), arrow4((state) => ({
8835 + // `transform-origin` calculations rely on an element existing. If the arrow hasn't been set,
8836 + // we'll create a fake element.
8837 + element: arrowRef.current || ownerDocument(state.elements.floating).createElement("div"),
8838 + // No padding for the fake arrow: it would displace aligned popups on narrow anchors.
8839 + padding: arrowRef.current ? arrowPadding : 0,
8840 + offsetParent: "floating"
8841 + }), [arrowPadding]), {
8842 + name: "transformOrigin",
8843 + fn(state) {
8844 + const {
8845 + elements: {
8846 + floating
8847 + },
8848 + middlewareData: middlewareData2,
8849 + placement: renderedPlacement2,
8850 + platform: platform3,
8851 + rects,
8852 + y: y2
8853 + } = state;
8854 + const renderedSide2 = getSide(renderedPlacement2);
8855 + const renderedAlign2 = getAlignment(renderedPlacement2);
8856 + const isVertical = getSideAxis(renderedSide2) === "y";
8857 + const arrowEl = arrowRef.current;
8858 + const sideOffsetValue = typeof sideOffset === "function" ? sideOffset(getOffsetData(state, sideParam, isRtl)) : sideOffset;
8859 + let crossOrigin;
8860 + if (!arrowEl && renderedAlign2 && Math.abs(isVertical ? middlewareData2.shift?.x || 0 : middlewareData2.shift?.y || 0) <= 1) {
8861 + crossOrigin = renderedAlign2 === "start" === (isVertical && platform3.isRTL?.(floating) === true) ? "100%" : "0%";
8862 + } else {
8863 + const arrowOffset = isVertical ? middlewareData2.arrow?.x || 0 : middlewareData2.arrow?.y || 0;
8864 + const arrowSize = isVertical ? arrowEl?.clientWidth || 0 : arrowEl?.clientHeight || 0;
8865 + crossOrigin = `${arrowOffset + arrowSize / 2}px`;
8866 + }
8867 + let sideOrigin = renderedSide2 === "top" || renderedSide2 === "left" ? `calc(100% + ${sideOffsetValue}px)` : `${-sideOffsetValue}px`;
8868 + if (crossAxisShiftEnabled && isVertical && Math.abs(middlewareData2.shift?.y || 0) > sideOffsetValue) {
8869 + sideOrigin = `${rects.reference.y + rects.reference.height / 2 - y2}px`;
8870 + }
8871 + floating.style.setProperty(transformOrigin, isVertical ? `${crossOrigin} ${sideOrigin}` : `${sideOrigin} ${crossOrigin}`);
8872 + return {};
8873 + }
8874 + }, hide4, adaptiveOrigin2);
8875 + useIsoLayoutEffect(() => {
8876 + if (!mounted && floatingRootContext) {
8877 + floatingRootContext.update({
8878 + referenceElement: null,
8879 + floatingElement: null,
8880 + domReferenceElement: null,
8881 + positionReference: null
8882 + });
8883 + }
8884 + }, [mounted, floatingRootContext]);
8885 + const autoUpdateOptions = React36.useMemo(() => ({
8886 + ancestorScroll: !disableAnchorTracking,
8887 + elementResize: !disableAnchorTracking && typeof ResizeObserver !== "undefined",
8888 + layoutShift: !disableAnchorTracking && typeof IntersectionObserver !== "undefined"
8889 + }), [disableAnchorTracking]);
8890 + const {
8891 + refs,
8892 + elements,
8893 + x,
8894 + y,
8895 + middlewareData,
8896 + update: update2,
8897 + placement: renderedPlacement,
8898 + context,
8899 + isPositioned,
8900 + floatingStyles: originalFloatingStyles
8901 + } = useFloatingHook({
8902 + rootContext: floatingRootContext,
8903 + open: keepMounted ? mounted : void 0,
8904 + placement,
8905 + middleware,
8906 + strategy: positionMethod,
8907 + whileElementsMounted: keepMounted ? void 0 : (...args) => autoUpdate(...args, autoUpdateOptions),
8908 + nodeId,
8909 + externalTree
8910 + });
8911 + const {
8912 + sideX,
8913 + sideY
8914 + } = middlewareData.adaptiveOrigin || DEFAULT_SIDES;
8915 + const resolvedPosition = isPositioned ? positionMethod : "fixed";
8916 + const floatingStyles = React36.useMemo(() => {
8917 + let base;
8918 + if (!isPositioned) {
8919 + base = {
8920 + position: resolvedPosition,
8921 + top: 0,
8922 + left: 0
8923 + };
8924 + } else if (adaptiveOrigin2) {
8925 + base = {
8926 + position: resolvedPosition,
8927 + [sideX]: x,
8928 + [sideY]: y
8929 + };
8930 + } else {
8931 + base = {
8932 + ...originalFloatingStyles,
8933 + position: resolvedPosition
8934 + };
8935 + }
8936 + base[AVAILABLE_WIDTH_VAR] = "100vw";
8937 + base[AVAILABLE_HEIGHT_VAR] = "100vh";
8938 + if (!isPositioned) {
8939 + base.opacity = 0;
8940 + }
8941 + return base;
8942 + }, [adaptiveOrigin2, resolvedPosition, sideX, x, sideY, y, originalFloatingStyles, isPositioned]);
8943 + const registeredPositionReferenceRef = React36.useRef(null);
8944 + useIsoLayoutEffect(() => {
8945 + if (!mounted) {
8946 + return;
8947 + }
8948 + const anchorValue = anchorValueRef.current;
8949 + const resolvedAnchor = typeof anchorValue === "function" ? anchorValue() : anchorValue;
8950 + const unwrappedElement = (isRef(resolvedAnchor) ? resolvedAnchor.current : resolvedAnchor) || null;
8951 + const finalAnchor = unwrappedElement || null;
8952 + if (finalAnchor !== registeredPositionReferenceRef.current) {
8953 + refs.setPositionReference(finalAnchor);
8954 + registeredPositionReferenceRef.current = finalAnchor;
8955 + }
8956 + }, [mounted, refs, anchorDep, anchorValueRef]);
8957 + React36.useEffect(() => {
8958 + if (!mounted) {
8959 + return;
8960 + }
8961 + const anchorValue = anchorValueRef.current;
8962 + if (typeof anchorValue === "function") {
8963 + return;
8964 + }
8965 + if (isRef(anchorValue) && anchorValue.current !== registeredPositionReferenceRef.current) {
8966 + refs.setPositionReference(anchorValue.current);
8967 + registeredPositionReferenceRef.current = anchorValue.current;
8968 + }
8969 + }, [mounted, refs, anchorDep, anchorValueRef]);
8970 + React36.useEffect(() => {
8971 + if (keepMounted && mounted && elements.reference && elements.floating) {
8972 + return autoUpdate(elements.reference, elements.floating, update2, autoUpdateOptions);
8973 + }
8974 + return void 0;
8975 + }, [keepMounted, mounted, elements, update2, autoUpdateOptions]);
8976 + const renderedSide = getSide(renderedPlacement);
8977 + const logicalRenderedSide = getLogicalSide(sideParam, renderedSide, isRtl);
8978 + const renderedAlign = getAlignment(renderedPlacement) || "center";
8979 + const anchorHidden2 = Boolean(middlewareData.hide?.referenceHidden);
8980 + useIsoLayoutEffect(() => {
8981 + if (lazyFlip && mounted && isPositioned && renderedSide !== side) {
8982 + setMountSide(renderedSide);
8983 + }
8984 + }, [lazyFlip, mounted, isPositioned, renderedSide, side]);
8985 + const arrowStyles = React36.useMemo(() => ({
8986 + position: "absolute",
8987 + top: middlewareData.arrow?.y,
8988 + left: middlewareData.arrow?.x
8989 + }), [middlewareData.arrow]);
8990 + const arrowUncentered = middlewareData.arrow?.centerOffset !== 0;
8991 + return React36.useMemo(() => ({
8992 + positionerStyles: floatingStyles,
8993 + arrowStyles,
8994 + arrowRef,
8995 + arrowUncentered,
8996 + side: logicalRenderedSide,
8997 + align: renderedAlign,
8998 + physicalSide: renderedSide,
8999 + anchorHidden: anchorHidden2,
9000 + refs,
9001 + context,
9002 + isPositioned,
9003 + update: update2
9004 + }), [floatingStyles, arrowStyles, arrowRef, arrowUncentered, logicalRenderedSide, renderedAlign, renderedSide, anchorHidden2, refs, context, isPositioned, update2]);
9005 + }
9006 + function isRef(param) {
9007 + return param != null && "current" in param;
9008 + }
9009 +
9010 + // node_modules/@base-ui/react/internals/getDisabledMountTransitionStyles.mjs
9011 + function getDisabledMountTransitionStyles(transitionStatus) {
9012 + return transitionStatus === "starting" ? DISABLED_TRANSITIONS_STYLE : EMPTY_OBJECT;
9013 + }
9014 +
9015 + // node_modules/@base-ui/react/utils/usePositioner.mjs
9016 + function usePositioner(componentProps, state, {
9017 + styles,
9018 + transitionStatus,
9019 + props,
9020 + refs,
9021 + hidden,
9022 + inert = false
9023 + }) {
9024 + const style = {
9025 + ...styles
9026 + };
9027 + if (inert) {
9028 + style.pointerEvents = "none";
9029 + }
9030 + return useRenderElement("div", componentProps, {
9031 + state,
9032 + ref: refs,
9033 + props: [{
9034 + role: "presentation",
9035 + hidden,
9036 + style
9037 + }, getDisabledMountTransitionStyles(transitionStatus), props],
9038 + stateAttributesMapping: popupStateMapping
9039 + });
9040 + }
9041 +
9042 + // node_modules/@base-ui/react/button/Button.mjs
9043 + var React37 = __toESM(require_react(), 1);
9044 + var Button3 = /* @__PURE__ */ React37.forwardRef(function Button4(componentProps, forwardedRef) {
9045 + const {
9046 + render,
9047 + className,
9048 + disabled: disabled2 = false,
9049 + focusableWhenDisabled = false,
9050 + nativeButton = true,
9051 + style,
9052 + ...elementProps
9053 + } = componentProps;
9054 + const {
9055 + getButtonProps,
9056 + buttonRef
9057 + } = useButton({
9058 + disabled: disabled2,
9059 + focusableWhenDisabled,
9060 + native: nativeButton
9061 + });
9062 + const state = {
9063 + disabled: disabled2
9064 + };
9065 + return useRenderElement("button", componentProps, {
9066 + state,
9067 + ref: [forwardedRef, buttonRef],
9068 + props: [elementProps, getButtonProps]
9069 + });
9070 + });
9071 + if (true) Button3.displayName = "Button";
9072 +
9073 + // node_modules/@base-ui/react/collapsible/index.parts.mjs
9074 + var index_parts_exports = {};
9075 + __export(index_parts_exports, {
9076 + Panel: () => CollapsiblePanel,
9077 + Root: () => CollapsibleRoot,
9078 + Trigger: () => CollapsibleTrigger
9079 + });
9080 +
9081 + // node_modules/@base-ui/react/collapsible/root/CollapsibleRoot.mjs
9082 + var React38 = __toESM(require_react(), 1);
9083 +
9084 + // node_modules/@base-ui/react/collapsible/root/stateAttributesMapping.mjs
9085 + var collapsibleStateAttributesMapping = {
9086 + ...collapsibleOpenStateMapping,
9087 + ...transitionStatusMapping
9088 + };
9089 +
9090 + // node_modules/@base-ui/react/collapsible/root/CollapsibleRoot.mjs
9091 + var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
9092 + var CollapsibleRoot = /* @__PURE__ */ React38.forwardRef(function CollapsibleRoot2(componentProps, forwardedRef) {
9093 + const {
9094 + render,
9095 + className,
9096 + defaultOpen = false,
9097 + disabled: disabled2 = false,
9098 + onOpenChange: onOpenChangeProp,
9099 + open: open3,
9100 + style,
9101 + ...elementProps
9102 + } = componentProps;
9103 + const onOpenChange = useStableCallback(onOpenChangeProp);
9104 + const collapsible = useCollapsibleRoot({
9105 + open: open3,
9106 + defaultOpen,
9107 + onOpenChange,
9108 + disabled: disabled2
9109 + });
9110 + const state = React38.useMemo(() => ({
9111 + open: collapsible.open,
9112 + disabled: collapsible.disabled,
9113 + transitionStatus: collapsible.transitionStatus
9114 + }), [collapsible.open, collapsible.disabled, collapsible.transitionStatus]);
9115 + const contextValue = React38.useMemo(() => ({
9116 + ...collapsible,
9117 + onOpenChange,
9118 + state
9119 + }), [collapsible, onOpenChange, state]);
9120 + const element = useRenderElement("div", componentProps, {
9121 + state,
9122 + ref: forwardedRef,
9123 + props: elementProps,
9124 + stateAttributesMapping: collapsibleStateAttributesMapping
9125 + });
9126 + return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(CollapsibleRootContext.Provider, {
9127 + value: contextValue,
9128 + children: element
9129 + });
9130 + });
9131 + if (true) CollapsibleRoot.displayName = "CollapsibleRoot";
9132 +
9133 + // node_modules/@base-ui/react/collapsible/trigger/CollapsibleTrigger.mjs
9134 + var React39 = __toESM(require_react(), 1);
9135 + var stateAttributesMapping = {
9136 + ...triggerOpenStateMapping,
9137 + ...transitionStatusMapping
9138 + };
9139 + var CollapsibleTrigger = /* @__PURE__ */ React39.forwardRef(function CollapsibleTrigger2(componentProps, forwardedRef) {
9140 + const {
9141 + panelId,
9142 + open: open3,
9143 + handleTrigger,
9144 + state,
9145 + disabled: contextDisabled
9146 + } = useCollapsibleRootContext();
9147 + const {
9148 + className,
9149 + disabled: disabled2 = contextDisabled,
9150 + render,
9151 + nativeButton = true,
9152 + style,
9153 + ...elementProps
9154 + } = componentProps;
9155 + const {
9156 + getButtonProps,
9157 + buttonRef
9158 + } = useButton({
9159 + disabled: disabled2,
9160 + focusableWhenDisabled: true,
9161 + native: nativeButton
9162 + });
9163 + const element = useRenderElement("button", componentProps, {
9164 + state,
9165 + ref: [forwardedRef, buttonRef],
9166 + props: [{
9167 + "aria-controls": open3 ? panelId : void 0,
9168 + "aria-expanded": open3,
9169 + onClick: handleTrigger
9170 + }, elementProps, getButtonProps],
9171 + stateAttributesMapping
9172 + });
9173 + return element;
9174 + });
9175 + if (true) CollapsibleTrigger.displayName = "CollapsibleTrigger";
9176 +
9177 + // node_modules/@base-ui/react/collapsible/panel/CollapsiblePanel.mjs
9178 + var React40 = __toESM(require_react(), 1);
9179 +
9180 + // node_modules/@base-ui/react/collapsible/panel/CollapsiblePanelCssVars.mjs
9181 + var collapsiblePanelHeight = "--collapsible-panel-height";
9182 + var collapsiblePanelWidth = "--collapsible-panel-width";
9183 +
9184 + // node_modules/@base-ui/react/collapsible/panel/CollapsiblePanel.mjs
9185 + var CollapsiblePanel = /* @__PURE__ */ React40.forwardRef(function CollapsiblePanel2(componentProps, forwardedRef) {
9186 + const {
9187 + className,
9188 + hiddenUntilFound: hiddenUntilFoundProp,
9189 + keepMounted: keepMountedProp,
9190 + render,
9191 + id: idProp,
9192 + style,
9193 + ...elementProps
9194 + } = componentProps;
9195 + if (true) {
9196 + React40.useEffect(() => {
9197 + if (hiddenUntilFoundProp && keepMountedProp === false) {
9198 + warn("The `keepMounted={false}` prop on `Collapsible.Panel` is ignored when `hiddenUntilFound` is enabled, since the panel must remain mounted while closed.");
9199 + }
9200 + }, [hiddenUntilFoundProp, keepMountedProp]);
9201 + }
9202 + const {
9203 + defaultPanelId,
9204 + mounted,
9205 + onOpenChange,
9206 + open: open3,
9207 + setMounted,
9208 + setPanelIdState,
9209 + setOpen,
9210 + state,
9211 + transitionStatus
9212 + } = useCollapsibleRootContext();
9213 + const hiddenUntilFound = hiddenUntilFoundProp ?? false;
9214 + const keepMounted = keepMountedProp ?? false;
9215 + const registeredId = idProp || void 0;
9216 + const id = registeredId ?? defaultPanelId;
9217 + useIsoLayoutEffect(() => {
9218 + setPanelIdState((currentId) => registeredId ?? (currentId === null ? void 0 : currentId));
9219 + return () => {
9220 + setPanelIdState((currentId) => currentId === registeredId ? null : currentId);
9221 + };
9222 + }, [registeredId, setPanelIdState]);
9223 + const {
9224 + height,
9225 + props,
9226 + ref,
9227 + shouldPreventOpenAnimation,
9228 + shouldRender,
9229 + transitionStatus: panelTransitionStatus,
9230 + width
9231 + } = useCollapsiblePanel({
9232 + externalRef: forwardedRef,
9233 + hiddenUntilFound,
9234 + id,
9235 + keepMounted,
9236 + mounted,
9237 + onOpenChange,
9238 + open: open3,
9239 + setMounted,
9240 + setOpen,
9241 + transitionStatus
9242 + });
9243 + const panelState = {
9244 + ...state,
9245 + transitionStatus: panelTransitionStatus
9246 + };
9247 + const resolvedStyle = resolveStyle(style, panelState);
9248 + const element = useRenderElement("div", {
9249 + ...componentProps,
9250 + style: void 0
9251 + }, {
9252 + state: panelState,
9253 + ref,
9254 + props: [
9255 + props,
9256 + {
9257 + style: {
9258 + [collapsiblePanelHeight]: height === void 0 ? "auto" : `${height}px`,
9259 + [collapsiblePanelWidth]: width === void 0 ? "auto" : `${width}px`
9260 + }
9261 + },
9262 + elementProps,
9263 + resolvedStyle ? {
9264 + style: resolvedStyle
9265 + } : void 0,
9266 + // Resolve the public `style` prop so temporary `animationName: 'none'`
9267 + // can still win after user's inline styles have been merged.
9268 + shouldPreventOpenAnimation ? {
9269 + style: {
9270 + animationName: "none"
9271 + }
9272 + } : void 0
9273 + ],
9274 + stateAttributesMapping: collapsibleStateAttributesMapping
9275 + });
9276 + if (!shouldRender) {
9277 + return null;
9278 + }
9279 + return element;
9280 + });
9281 + if (true) CollapsiblePanel.displayName = "CollapsiblePanel";
9282 +
9283 + // node_modules/@base-ui/react/utils/usePopupViewport.mjs
9284 + var React44 = __toESM(require_react(), 1);
9285 + var ReactDOM6 = __toESM(require_react_dom(), 1);
9286 +
9287 + // node_modules/@base-ui/utils/usePreviousValue.mjs
9288 + var React41 = __toESM(require_react(), 1);
9289 + function usePreviousValue(value) {
9290 + const [state, setState] = React41.useState({
9291 + current: value,
9292 + previous: null
9293 + });
9294 + if (!Object.is(value, state.current)) {
9295 + setState({
9296 + current: value,
9297 + previous: state.current
9298 + });
9299 + }
9300 + return state.previous;
9301 + }
9302 +
9303 + // node_modules/@base-ui/react/utils/usePopupAutoResize.mjs
9304 + var React42 = __toESM(require_react(), 1);
9305 +
9306 + // node_modules/@base-ui/react/utils/getCssDimensions.mjs
9307 + function getCssDimensions2(element) {
9308 + const css = getComputedStyle2(element);
9309 + let width = parseFloat(css.width) || 0;
9310 + let height = parseFloat(css.height) || 0;
9311 + const hasOffset = isHTMLElement(element);
9312 + const offsetWidth = hasOffset ? element.offsetWidth : width;
9313 + const offsetHeight = hasOffset ? element.offsetHeight : height;
9314 + const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
9315 + if (shouldFallback) {
9316 + width = offsetWidth;
9317 + height = offsetHeight;
9318 + }
9319 + return {
9320 + width,
9321 + height
9322 + };
9323 + }
9324 +
9325 + // node_modules/@base-ui/react/utils/CommonPopupCssVars.mjs
9326 + var popupWidth = "--popup-width";
9327 + var popupHeight = "--popup-height";
9328 +
9329 + // node_modules/@base-ui/react/utils/usePopupAutoResize.mjs
9330 + function usePopupAutoResize(parameters) {
9331 + const {
9332 + popupElement,
9333 + positionerElement,
9334 + content,
9335 + mounted,
9336 + onMeasureLayout: onMeasureLayoutParam,
9337 + onMeasureLayoutComplete: onMeasureLayoutCompleteParam,
9338 + side,
9339 + direction
9340 + } = parameters;
9341 + const runOnceAnimationsFinish = useAnimationsFinished(popupElement, true);
9342 + const animationFrame = useAnimationFrame();
9343 + const committedDimensionsRef = React42.useRef(null);
9344 + const isInitialRenderRef = React42.useRef(true);
9345 + const restoreAnchoringStylesRef = React42.useRef(NOOP);
9346 + const onMeasureLayout = useStableCallback(onMeasureLayoutParam);
9347 + const onMeasureLayoutComplete = useStableCallback(onMeasureLayoutCompleteParam);
9348 + const anchoringStyles = React42.useMemo(() => getPopupAnchoringStyles(side, direction), [side, direction]);
9349 + useIsoLayoutEffect(() => {
9350 + if (!mounted) {
9351 + restoreAnchoringStylesRef.current = NOOP;
9352 + isInitialRenderRef.current = true;
9353 + committedDimensionsRef.current = null;
9354 + return void 0;
9355 + }
9356 + if (!popupElement || !positionerElement) {
9357 + return void 0;
9358 + }
9359 + restoreAnchoringStylesRef.current = applyElementStyles(popupElement, anchoringStyles);
9360 + setPopupCssSize(popupElement, "auto");
9361 + const restorePopupPosition = overrideElementStyle(popupElement, "position", "static");
9362 + const restorePopupTransform = overrideElementStyle(popupElement, "transform", "none");
9363 + const restorePopupScale = overrideElementStyle(popupElement, "scale", "1");
9364 + const restorePositionerAvailableSize = applyElementStyles(positionerElement, {
9365 + [availableWidth]: "max-content",
9366 + [availableHeight]: "max-content"
9367 + });
9368 + function restoreMeasurementOverrides() {
9369 + restorePopupPosition();
9370 + restorePopupTransform();
9371 + restorePositionerAvailableSize();
9372 + }
9373 + function restoreMeasurementOverridesIncludingScale() {
9374 + restoreMeasurementOverrides();
9375 + restorePopupScale();
9376 + }
9377 + onMeasureLayout?.();
9378 + if (isInitialRenderRef.current || committedDimensionsRef.current === null) {
9379 + setPositionerCssSize(positionerElement, "max-content");
9380 + const dimensions = getCssDimensions2(popupElement);
9381 + committedDimensionsRef.current = dimensions;
9382 + setPositionerCssSize(positionerElement, dimensions);
9383 + restoreMeasurementOverridesIncludingScale();
9384 + onMeasureLayoutComplete?.(null, dimensions);
9385 + isInitialRenderRef.current = false;
9386 + return () => {
9387 + restoreAnchoringStylesRef.current();
9388 + restoreAnchoringStylesRef.current = NOOP;
9389 + };
9390 + }
9391 + setPositionerCssSize(positionerElement, "max-content");
9392 + const previousDimensions = committedDimensionsRef.current;
9393 + const newDimensions = getCssDimensions2(popupElement);
9394 + committedDimensionsRef.current = newDimensions;
9395 + setPopupCssSize(popupElement, previousDimensions);
9396 + restoreMeasurementOverridesIncludingScale();
9397 + onMeasureLayoutComplete?.(previousDimensions, newDimensions);
9398 + setPositionerCssSize(positionerElement, newDimensions);
9399 + const abortController = new AbortController();
9400 + animationFrame.request(() => {
9401 + setPopupCssSize(popupElement, newDimensions);
9402 + runOnceAnimationsFinish(() => {
9403 + popupElement.style.setProperty(popupWidth, "auto");
9404 + popupElement.style.setProperty(popupHeight, "auto");
9405 + }, abortController.signal);
9406 + });
9407 + return () => {
9408 + abortController.abort();
9409 + animationFrame.cancel();
9410 + restoreAnchoringStylesRef.current();
9411 + restoreAnchoringStylesRef.current = NOOP;
9412 + };
9413 + }, [content, popupElement, positionerElement, runOnceAnimationsFinish, animationFrame, mounted, onMeasureLayout, onMeasureLayoutComplete, anchoringStyles]);
9414 + }
9415 + function getPopupAnchoringStyles(side, direction) {
9416 + const isPhysicalTop = side === "top";
9417 + const isPhysicalLeft = side === "left" || side === (direction === "rtl" ? "inline-end" : "inline-start");
9418 + if (!isPhysicalTop && !isPhysicalLeft) {
9419 + return EMPTY_OBJECT;
9420 + }
9421 + return {
9422 + position: "absolute",
9423 + [isPhysicalTop ? "bottom" : "top"]: "0",
9424 + [isPhysicalLeft ? "right" : "left"]: "0"
9425 + };
9426 + }
9427 + function overrideElementStyle(element, property, value) {
9428 + const originalValue = element.style.getPropertyValue(property);
9429 + element.style.setProperty(property, value);
9430 + return () => {
9431 + element.style.setProperty(property, originalValue);
9432 + };
9433 + }
9434 + function applyElementStyles(element, styles) {
9435 + const restorers = [];
9436 + for (const [key, value] of Object.entries(styles)) {
9437 + restorers.push(overrideElementStyle(element, key, value));
9438 + }
9439 + return restorers.length ? () => {
9440 + restorers.forEach((restore) => restore());
9441 + } : NOOP;
9442 + }
9443 + function setPopupCssSize(popupElement, size4) {
9444 + const width = size4 === "auto" ? "auto" : `${size4.width}px`;
9445 + const height = size4 === "auto" ? "auto" : `${size4.height}px`;
9446 + popupElement.style.setProperty(popupWidth, width);
9447 + popupElement.style.setProperty(popupHeight, height);
9448 + }
9449 + function setPositionerCssSize(positionerElement, size4) {
9450 + const width = size4 === "max-content" ? "max-content" : `${size4.width}px`;
9451 + const height = size4 === "max-content" ? "max-content" : `${size4.height}px`;
9452 + positionerElement.style.setProperty(positionerWidth, width);
9453 + positionerElement.style.setProperty(positionerHeight, height);
9454 + }
9455 +
9456 + // node_modules/@base-ui/react/direction-provider/DirectionProvider.mjs
9457 + var React43 = __toESM(require_react(), 1);
9458 + var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
9459 + var DirectionProvider = function DirectionProvider2(props) {
9460 + const {
9461 + direction = "ltr"
9462 + } = props;
9463 + const contextValue = React43.useMemo(() => ({
9464 + direction
9465 + }), [direction]);
9466 + return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DirectionContext.Provider, {
9467 + value: contextValue,
9468 + children: props.children
9469 + });
9470 + };
9471 + if (true) DirectionProvider.displayName = "DirectionProvider";
9472 +
9473 + // node_modules/@base-ui/react/utils/adaptiveOriginMiddleware.mjs
9474 + var adaptiveOrigin = {
9475 + name: "adaptiveOrigin",
9476 + async fn(state) {
9477 + const {
9478 + x: rawX,
9479 + y: rawY,
9480 + rects: {
9481 + floating: floatRect
9482 + },
9483 + elements: {
9484 + floating
9485 + },
9486 + platform: platform3,
9487 + strategy,
9488 + placement
9489 + } = state;
9490 + const win = getWindow(floating);
9491 + const styles = win.getComputedStyle(floating);
9492 + const hasTransition = styles.transitionDuration !== "0s" && styles.transitionDuration !== "";
9493 + if (!hasTransition) {
9494 + return {
9495 + x: rawX,
9496 + y: rawY,
9497 + data: DEFAULT_SIDES
9498 + };
9499 + }
9500 + const offsetParent = await platform3.getOffsetParent?.(floating);
9501 + let offsetDimensions = {
9502 + width: 0,
9503 + height: 0
9504 + };
9505 + if (strategy === "fixed" && win?.visualViewport) {
9506 + offsetDimensions = {
9507 + width: win.visualViewport.width,
9508 + height: win.visualViewport.height
9509 + };
9510 + } else if (offsetParent === win) {
9511 + const doc = ownerDocument(floating);
9512 + offsetDimensions = {
9513 + width: doc.documentElement.clientWidth,
9514 + height: doc.documentElement.clientHeight
9515 + };
9516 + } else if (await platform3.isElement?.(offsetParent)) {
9517 + offsetDimensions = await platform3.getDimensions(offsetParent);
9518 + }
9519 + const currentSide = getSide(placement);
9520 + let x = rawX;
9521 + let y = rawY;
9522 + if (currentSide === "left") {
9523 + x = offsetDimensions.width - (rawX + floatRect.width);
9524 + }
9525 + if (currentSide === "top") {
9526 + y = offsetDimensions.height - (rawY + floatRect.height);
9527 + }
9528 + const sideX = currentSide === "left" ? "right" : DEFAULT_SIDES.sideX;
9529 + const sideY = currentSide === "top" ? "bottom" : DEFAULT_SIDES.sideY;
9530 + return {
9531 + x,
9532 + y,
9533 + data: {
9534 + sideX,
9535 + sideY
9536 + }
9537 + };
9538 + }
9539 + };
9540 +
9541 + // node_modules/@base-ui/react/utils/CommonViewportDataAttributes.mjs
9542 + var activationDirection = "data-activation-direction";
9543 +
9544 + // node_modules/@base-ui/react/utils/usePopupViewport.mjs
9545 + var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
9546 + var popupViewportStateMapping = {
9547 + activationDirection: (value) => value ? {
9548 + [activationDirection]: value
9549 + } : null
9550 + };
9551 + function usePopupViewport(parameters) {
9552 + const {
9553 + store: store3,
9554 + side,
9555 + children
9556 + } = parameters;
9557 + const direction = useDirection();
9558 + const activeTrigger = store3.useState("activeTriggerElement");
9559 + const activeTriggerId = store3.useState("activeTriggerId");
9560 + const open3 = store3.useState("open");
9561 + const payload = store3.useState("payload");
9562 + const mounted = store3.useState("mounted");
9563 + const popupElement = store3.useState("popupElement");
9564 + const positionerElement = store3.useState("positionerElement");
9565 + const previousActiveTrigger = usePreviousValue(open3 ? activeTrigger : null);
9566 + const currentContentKey = usePopupContentKey(activeTriggerId, payload);
9567 + const capturedNodeRef = React44.useRef(null);
9568 + const [previousContentNode, setPreviousContentNode] = React44.useState(null);
9569 + const [newTriggerOffset, setNewTriggerOffset] = React44.useState(null);
9570 + const currentContainerRef = React44.useRef(null);
9571 + const previousContainerRef = React44.useRef(null);
9572 + const onAnimationsFinished = useAnimationsFinished(currentContainerRef, true);
9573 + const cleanupFrame = useAnimationFrame();
9574 + const cleanupControllerRef = React44.useRef(null);
9575 + const [previousContentDimensions, setPreviousContentDimensions] = React44.useState(null);
9576 + const [showStartingStyleAttribute, setShowStartingStyleAttribute] = React44.useState(false);
9577 + useIsoLayoutEffect(() => {
9578 + store3.set("adaptiveOrigin", adaptiveOrigin);
9579 + return () => {
9580 + store3.set("adaptiveOrigin", void 0);
9581 + };
9582 + }, [store3]);
9583 + const handleMeasureLayout = useStableCallback(() => {
9584 + currentContainerRef.current?.style.setProperty("animation", "none");
9585 + currentContainerRef.current?.style.setProperty("transition", "none");
9586 + previousContainerRef.current?.style.setProperty("display", "none");
9587 + });
9588 + const handleMeasureLayoutComplete = useStableCallback((previousDimensions) => {
9589 + currentContainerRef.current?.style.removeProperty("animation");
9590 + currentContainerRef.current?.style.removeProperty("transition");
9591 + previousContainerRef.current?.style.removeProperty("display");
9592 + if (previousDimensions) {
9593 + setPreviousContentDimensions(previousDimensions);
9594 + }
9595 + });
9596 + const armViewportCleanup = useStableCallback(() => {
9597 + cleanupControllerRef.current?.abort();
9598 + const controller = new AbortController();
9599 + cleanupControllerRef.current = controller;
9600 + onAnimationsFinished(() => {
9601 + setPreviousContentNode(null);
9602 + setPreviousContentDimensions(null);
9603 + capturedNodeRef.current = null;
9604 + }, controller.signal);
9605 + });
9606 + const lastHandledTriggerRef = React44.useRef(null);
9607 + useIsoLayoutEffect(() => {
9608 + if (!open3 || !mounted) {
9609 + lastHandledTriggerRef.current = null;
9610 + }
9611 + }, [open3, mounted]);
9612 + useIsoLayoutEffect(() => {
9613 + if (activeTrigger && previousActiveTrigger && activeTrigger !== previousActiveTrigger && lastHandledTriggerRef.current !== activeTrigger && capturedNodeRef.current) {
9614 + setPreviousContentNode(capturedNodeRef.current);
9615 + setShowStartingStyleAttribute(true);
9616 + const offset4 = calculateRelativePosition(previousActiveTrigger, activeTrigger);
9617 + setNewTriggerOffset(offset4);
9618 + lastHandledTriggerRef.current = activeTrigger;
9619 + }
9620 + }, [activeTrigger, previousActiveTrigger]);
9621 + useIsoLayoutEffect(() => {
9622 + if (previousContentNode == null) {
9623 + return;
9624 + }
9625 + cleanupControllerRef.current?.abort();
9626 + setShowStartingStyleAttribute(true);
9627 + cleanupFrame.request(() => {
9628 + ReactDOM6.flushSync(() => {
9629 + setShowStartingStyleAttribute(false);
9630 + });
9631 + armViewportCleanup();
9632 + });
9633 + }, [currentContentKey, previousContentNode, armViewportCleanup, cleanupFrame]);
9634 + useIsoLayoutEffect(() => {
9635 + const source = currentContainerRef.current;
9636 + if (!source) {
9637 + return;
9638 + }
9639 + const wrapper = ownerDocument(source).createElement("div");
9640 + for (const child of Array.from(source.childNodes)) {
9641 + wrapper.appendChild(child.cloneNode(true));
9642 + }
9643 + capturedNodeRef.current = wrapper;
9644 + });
9645 + const isTransitioning = previousContentNode != null;
9646 + let childrenToRender;
9647 + if (!isTransitioning) {
9648 + childrenToRender = /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", {
9649 + "data-current": true,
9650 + ref: currentContainerRef,
9651 + children
9652 + }, currentContentKey);
9653 + } else {
9654 + childrenToRender = /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(React44.Fragment, {
9655 + children: [/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", {
9656 + "data-previous": true,
9657 + inert: inertValue(true),
9658 + ref: previousContainerRef,
9659 + style: {
9660 + ...previousContentDimensions ? {
9661 + [popupWidth]: `${previousContentDimensions.width}px`,
9662 + [popupHeight]: `${previousContentDimensions.height}px`
9663 + } : null,
9664 + position: "absolute"
9665 + },
9666 + "data-ending-style": showStartingStyleAttribute ? void 0 : ""
9667 + }, "previous"), /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", {
9668 + "data-current": true,
9669 + ref: currentContainerRef,
9670 + "data-starting-style": showStartingStyleAttribute ? "" : void 0,
9671 + children
9672 + }, currentContentKey)]
9673 + });
9674 + }
9675 + useIsoLayoutEffect(() => {
9676 + const container = previousContainerRef.current;
9677 + if (!container || !previousContentNode) {
9678 + return;
9679 + }
9680 + container.replaceChildren(...Array.from(previousContentNode.childNodes));
9681 + }, [previousContentNode]);
9682 + usePopupAutoResize({
9683 + popupElement,
9684 + positionerElement,
9685 + mounted,
9686 + content: payload,
9687 + onMeasureLayout: handleMeasureLayout,
9688 + onMeasureLayoutComplete: handleMeasureLayoutComplete,
9689 + side,
9690 + direction
9691 + });
9692 + const state = {
9693 + activationDirection: getActivationDirection(newTriggerOffset),
9694 + transitioning: isTransitioning
9695 + };
9696 + return {
9697 + children: childrenToRender,
9698 + state
9699 + };
9700 + }
9701 + function getActivationDirection(offset4) {
9702 + if (!offset4) {
9703 + return void 0;
9704 + }
9705 + return `${getValueWithTolerance(offset4.horizontal, 5, "right", "left")} ${getValueWithTolerance(offset4.vertical, 5, "down", "up")}`;
9706 + }
9707 + function getValueWithTolerance(value, tolerance, positiveLabel, negativeLabel) {
9708 + if (value > tolerance) {
9709 + return positiveLabel;
9710 + }
9711 + if (value < -tolerance) {
9712 + return negativeLabel;
9713 + }
9714 + return "";
9715 + }
9716 + function calculateRelativePosition(from, to) {
9717 + const fromRect = from.getBoundingClientRect();
9718 + const toRect = to.getBoundingClientRect();
9719 + const fromCenter = {
9720 + x: fromRect.left + fromRect.width / 2,
9721 + y: fromRect.top + fromRect.height / 2
9722 + };
9723 + const toCenter = {
9724 + x: toRect.left + toRect.width / 2,
9725 + y: toRect.top + toRect.height / 2
9726 + };
9727 + return {
9728 + horizontal: toCenter.x - fromCenter.x,
9729 + vertical: toCenter.y - fromCenter.y
9730 + };
9731 + }
9732 + function usePopupContentKey(activeTriggerId, payload) {
9733 + const [contentKey, setContentKey] = React44.useState(0);
9734 + const previousActiveTriggerIdRef = React44.useRef(activeTriggerId);
9735 + const previousPayloadRef = React44.useRef(payload);
9736 + const pendingPayloadUpdateRef = React44.useRef(false);
9737 + useIsoLayoutEffect(() => {
9738 + const previousActiveTriggerId = previousActiveTriggerIdRef.current;
9739 + const previousPayload = previousPayloadRef.current;
9740 + const triggerIdChanged = activeTriggerId !== previousActiveTriggerId;
9741 + const payloadChanged = payload !== previousPayload;
9742 + if (triggerIdChanged) {
9743 + setContentKey((value) => value + 1);
9744 + pendingPayloadUpdateRef.current = !payloadChanged;
9745 + } else if (pendingPayloadUpdateRef.current && payloadChanged) {
9746 + setContentKey((value) => value + 1);
9747 + pendingPayloadUpdateRef.current = false;
9748 + }
9749 + previousActiveTriggerIdRef.current = activeTriggerId;
9750 + previousPayloadRef.current = payload;
9751 + }, [activeTriggerId, payload]);
9752 + return `${activeTriggerId ?? "current"}-${contentKey}`;
9753 + }
9754 +
9755 + // node_modules/@base-ui/react/utils/FloatingPortalLite.mjs
9756 + var React45 = __toESM(require_react(), 1);
9757 + var ReactDOM7 = __toESM(require_react_dom(), 1);
9758 + var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
9759 + var FloatingPortalLite = /* @__PURE__ */ React45.forwardRef(function FloatingPortalLite2(componentProps, forwardedRef) {
9760 + const {
9761 + children,
9762 + container,
9763 + className,
9764 + render,
9765 + style,
9766 + ...elementProps
9767 + } = componentProps;
9768 + const {
9769 + node: portalNode,
9770 + subtree: portalSubtree
9771 + } = useFloatingPortalNode({
9772 + container,
9773 + ref: forwardedRef,
9774 + componentProps,
9775 + elementProps
9776 + });
9777 + if (!portalSubtree && !portalNode) {
9778 + return null;
9779 + }
9780 + return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(React45.Fragment, {
9781 + children: [portalSubtree, portalNode && /* @__PURE__ */ ReactDOM7.createPortal(children, portalNode)]
9782 + });
9783 + });
9784 + if (true) FloatingPortalLite.displayName = "FloatingPortalLite";
9785 +
9786 + // node_modules/@base-ui/react/tooltip/index.parts.mjs
9787 + var index_parts_exports2 = {};
9788 + __export(index_parts_exports2, {
9789 + Arrow: () => TooltipArrow,
9790 + Handle: () => TooltipHandle,
9791 + Popup: () => TooltipPopup,
9792 + Portal: () => TooltipPortal,
9793 + Positioner: () => TooltipPositioner,
9794 + Provider: () => TooltipProvider,
9795 + Root: () => TooltipRoot,
9796 + Trigger: () => TooltipTrigger,
9797 + Viewport: () => TooltipViewport,
9798 + createHandle: () => createTooltipHandle
9799 + });
9800 +
9801 + // node_modules/@base-ui/react/tooltip/root/TooltipRoot.mjs
9802 + var React48 = __toESM(require_react(), 1);
9803 +
9804 + // node_modules/@base-ui/react/tooltip/root/TooltipRootContext.mjs
9805 + var React46 = __toESM(require_react(), 1);
9806 + var TooltipRootContext = /* @__PURE__ */ React46.createContext(void 0);
9807 + if (true) TooltipRootContext.displayName = "TooltipRootContext";
9808 + function useTooltipRootContext(optional) {
9809 + const context = React46.useContext(TooltipRootContext);
9810 + if (context === void 0 && !optional) {
9811 + throw new Error(true ? "Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>." : formatErrorMessage_default(72));
9812 + }
9813 + return context;
9814 + }
9815 +
9816 + // node_modules/@base-ui/react/tooltip/store/TooltipStore.mjs
9817 + var React47 = __toESM(require_react(), 1);
9818 + var selectors2 = {
9819 + ...popupStoreSelectors,
9820 + disabled: (state) => state.disabled,
9821 + instantType: (state) => state.instantType,
9822 + isInstantPhase: (state) => state.isInstantPhase,
9823 + trackCursorAxis: (state) => state.trackCursorAxis,
9824 + disableHoverablePopup: (state) => state.disableHoverablePopup,
9825 + lastOpenChangeReason: (state) => state.openChangeReason,
9826 + closeOnClick: (state) => state.closeOnClick,
9827 + closeDelay: (state) => state.closeDelay,
9828 + adaptiveOrigin: (state) => state.adaptiveOrigin
9829 + };
9830 + var TooltipStore = class extends ReactStore {
9831 + constructor(initialState, floatingId, nested) {
9832 + const triggerElements = new PopupTriggerMap();
9833 + super(createInitialState(initialState, triggerElements, floatingId, nested), createInitialContext(triggerElements), selectors2);
9834 + }
9835 + setOpen = (nextOpen, eventDetails) => {
9836 + applyPopupOpenChange(this, nextOpen, eventDetails, {
9837 + extraState: {
9838 + openChangeReason: eventDetails.reason
9839 + }
9840 + });
9841 + };
9842 + // Used by trigger clicks to clear a delayed hover open without reporting a public open-state change.
9843 + cancelPendingOpen(event) {
9844 + this.state.floatingRootContext.dispatchOpenChange(false, createChangeEventDetails(reason_parts_exports.triggerPress, event));
9845 + }
9846 + };
9847 + function createNullTooltipStore() {
9848 + const triggerElements = new PopupTriggerMap();
9849 + const store3 = new NullStore(Object.freeze(createInitialState(void 0, triggerElements)), Object.freeze(createInitialContext(triggerElements)), selectors2);
9850 + return Object.assign(store3, {
9851 + setOpen: NOOP,
9852 + cancelPendingOpen: NOOP
9853 + });
9854 + }
9855 + function createInitialState(initialState, triggerElements, floatingId, nested = false) {
9856 + const state = {
9857 + ...createInitialPopupStoreState(triggerElements, floatingId, nested),
9858 + disabled: false,
9859 + instantType: void 0,
9860 + isInstantPhase: false,
9861 + trackCursorAxis: "none",
9862 + disableHoverablePopup: false,
9863 + openChangeReason: null,
9864 + closeOnClick: true,
9865 + closeDelay: 0,
9866 + adaptiveOrigin: void 0,
9867 + ...initialState
9868 + };
9869 + return state;
9870 + }
9871 + function createInitialContext(triggerElements) {
9872 + return {
9873 + popupRef: /* @__PURE__ */ React47.createRef(),
9874 + onOpenChange: void 0,
9875 + onOpenChangeComplete: void 0,
9876 + triggerElements
9877 + };
9878 + }
9879 +
9880 + // node_modules/@base-ui/react/tooltip/root/TooltipRoot.mjs
9881 + var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
9882 + var TooltipRoot = fastComponent(function TooltipRoot2(props) {
9883 + const {
9884 + disabled: disabled2 = false,
9885 + defaultOpen = false,
9886 + open: openProp,
9887 + disableHoverablePopup = false,
9888 + trackCursorAxis = "none",
9889 + actionsRef,
9890 + onOpenChange,
9891 + onOpenChangeComplete,
9892 + handle,
9893 + triggerId: triggerIdProp,
9894 + defaultTriggerId: defaultTriggerIdProp = null,
9895 + children
9896 + } = props;
9897 + const store3 = usePopupRootStore((floatingId, nested) => new TooltipStore({
9898 + open: defaultOpen,
9899 + openProp,
9900 + activeTriggerId: defaultTriggerIdProp,
9901 + triggerIdProp
9902 + }, floatingId, nested));
9903 + store3.useControlledProp("openProp", openProp);
9904 + store3.useControlledProp("triggerIdProp", triggerIdProp);
9905 + store3.useContextCallback("onOpenChange", onOpenChange);
9906 + store3.useContextCallback("onOpenChangeComplete", onOpenChangeComplete);
9907 + const openState = store3.useState("open");
9908 + const open3 = !disabled2 && openState;
9909 + const activeTriggerId = store3.useState("activeTriggerId");
9910 + const mounted = store3.useState("mounted");
9911 + const payload = store3.useState("payload");
9912 + store3.useSyncedValues({
9913 + trackCursorAxis,
9914 + disableHoverablePopup,
9915 + disabled: disabled2
9916 + });
9917 + useImplicitActiveTrigger(store3, {
9918 + closeOnActiveTriggerUnmount: true
9919 + });
9920 + const {
9921 + forceUnmount,
9922 + transitionStatus
9923 + } = useOpenStateTransitions(open3, store3);
9924 + const isInstantPhase = store3.useState("isInstantPhase");
9925 + const instantType = store3.useState("instantType");
9926 + const lastOpenChangeReason = store3.useState("lastOpenChangeReason");
9927 + const previousInstantTypeRef = React48.useRef(null);
9928 + useIsoLayoutEffect(() => {
9929 + if (openState && disabled2) {
9930 + store3.setOpen(false, createChangeEventDetails(reason_parts_exports.disabled));
9931 + }
9932 + }, [openState, disabled2, store3]);
9933 + useIsoLayoutEffect(() => {
9934 + if (transitionStatus === "ending" && lastOpenChangeReason === reason_parts_exports.none || transitionStatus !== "ending" && isInstantPhase) {
9935 + if (instantType !== "delay") {
9936 + previousInstantTypeRef.current = instantType;
9937 + }
9938 + store3.set("instantType", "delay");
9939 + } else if (previousInstantTypeRef.current !== null) {
9940 + store3.set("instantType", previousInstantTypeRef.current);
9941 + previousInstantTypeRef.current = null;
9942 + }
9943 + }, [transitionStatus, isInstantPhase, lastOpenChangeReason, instantType, store3]);
9944 + useIsoLayoutEffect(() => {
9945 + if (open3) {
9946 + if (activeTriggerId == null) {
9947 + store3.set("payload", void 0);
9948 + }
9949 + }
9950 + }, [store3, activeTriggerId, open3]);
9951 + React48.useImperativeHandle(actionsRef, () => ({
9952 + unmount: forceUnmount,
9953 + close: () => store3.setOpen(false, createChangeEventDetails(reason_parts_exports.imperativeAction))
9954 + }), [forceUnmount, store3]);
9955 + const shouldRenderInteractions = open3 || mounted || !disabled2 && trackCursorAxis !== "none";
9956 + return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(TooltipRootContext.Provider, {
9957 + value: store3,
9958 + children: [handle && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(PopupHandleAttachment, {
9959 + handle,
9960 + store: store3
9961 + }), shouldRenderInteractions && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TooltipInteractions, {
9962 + store: store3,
9963 + disabled: disabled2,
9964 + trackCursorAxis
9965 + }), typeof children === "function" ? children({
9966 + payload
9967 + }) : children]
9968 + });
9969 + });
9970 + if (true) TooltipRoot.displayName = "TooltipRoot";
9971 + function TooltipInteractions({
9972 + store: store3,
9973 + disabled: disabled2,
9974 + trackCursorAxis
9975 + }) {
9976 + const floatingRootContext = store3.useState("floatingRootContext");
9977 + const dismiss = useDismiss(floatingRootContext, {
9978 + enabled: !disabled2,
9979 + referencePress: () => store3.select("closeOnClick")
9980 + });
9981 + const clientPoint = useClientPoint(floatingRootContext, {
9982 + enabled: !disabled2 && trackCursorAxis !== "none",
9983 + axis: trackCursorAxis === "none" ? void 0 : trackCursorAxis
9984 + });
9985 + const triggerProps = React48.useMemo(() => mergeProps(clientPoint.reference, dismiss.reference), [clientPoint.reference, dismiss.reference]);
9986 + usePopupInteractionProps(store3, {
9987 + activeTriggerProps: triggerProps,
9988 + inactiveTriggerProps: triggerProps,
9989 + popupProps: dismiss.floating ?? EMPTY_OBJECT
9990 + });
9991 + return null;
9992 + }
9993 +
9994 + // node_modules/@base-ui/react/tooltip/trigger/TooltipTrigger.mjs
9995 + var React50 = __toESM(require_react(), 1);
9996 +
9997 + // node_modules/@base-ui/react/tooltip/provider/TooltipProviderContext.mjs
9998 + var React49 = __toESM(require_react(), 1);
9999 + var TooltipProviderContext = /* @__PURE__ */ React49.createContext(void 0);
10000 + if (true) TooltipProviderContext.displayName = "TooltipProviderContext";
10001 + function useTooltipProviderContext() {
10002 + return React49.useContext(TooltipProviderContext);
10003 + }
10004 +
10005 + // node_modules/@base-ui/react/tooltip/utils/constants.mjs
10006 + var OPEN_DELAY = 600;
10007 +
10008 + // node_modules/@base-ui/react/tooltip/trigger/TooltipTrigger.mjs
10009 + var TOOLTIP_TRIGGER_IDENTIFIER = "data-base-ui-tooltip-trigger";
10010 + function getTargetElement(event) {
10011 + if ("composedPath" in event) {
10012 + const path = event.composedPath();
10013 + for (let i = 0; i < path.length; i += 1) {
10014 + const element = path[i];
10015 + if (isElement(element)) {
10016 + return element;
10017 + }
10018 + }
10019 + }
10020 + const target = event.target;
10021 + if (isElement(target)) {
10022 + return target;
10023 + }
10024 + return null;
10025 + }
10026 + function closestEnabledTooltipTrigger(element) {
10027 + let current = element;
10028 + while (current) {
10029 + const trigger = current.closest(`[${TOOLTIP_TRIGGER_IDENTIFIER}]`);
10030 + if (trigger) {
10031 + return trigger;
10032 + }
10033 + const root = current.getRootNode();
10034 + current = "host" in root && isElement(root.host) ? root.host : null;
10035 + }
10036 + return null;
10037 + }
10038 + var TooltipTrigger = fastComponentRef(function TooltipTrigger2(componentProps, forwardedRef) {
10039 + const {
10040 + render,
10041 + className,
10042 + style,
10043 + handle,
10044 + payload,
10045 + disabled: disabledProp,
10046 + delay,
10047 + closeOnClick = true,
10048 + closeDelay,
10049 + id: idProp,
10050 + ...elementProps
10051 + } = componentProps;
10052 + const rootContext = useTooltipRootContext(true);
10053 + const handleStore = usePopupHandleStore(handle);
10054 + const store3 = handleStore ?? rootContext;
10055 + if (!store3) {
10056 + throw new Error(true ? "Base UI: <Tooltip.Trigger> must be either used within a <Tooltip.Root> component or provided with a handle." : formatErrorMessage_default(82));
10057 + }
10058 + const thisTriggerId = useBaseUiId(idProp);
10059 + const isTriggerActive = store3.useState("isTriggerActive", thisTriggerId);
10060 + const isOpenedByThisTrigger = store3.useState("isOpenedByTrigger", thisTriggerId);
10061 + const floatingRootContext = store3.useState("floatingRootContext");
10062 + const triggerElementRef = React50.useRef(null);
10063 + const closeDelayWithDefault = closeDelay ?? 0;
10064 + const {
10065 + registerTrigger,
10066 + isMountedByThisTrigger
10067 + } = useTriggerDataForwarding(thisTriggerId, triggerElementRef, store3, {
10068 + payload,
10069 + closeOnClick,
10070 + closeDelay: closeDelayWithDefault
10071 + });
10072 + const providerDelay = useTooltipProviderContext();
10073 + const {
10074 + activeIdRef,
10075 + delayRef,
10076 + isInstantPhase,
10077 + hasProvider
10078 + } = useDelayGroup(floatingRootContext, {
10079 + open: isOpenedByThisTrigger
10080 + });
10081 + const hoverInteraction = useHoverInteractionSharedState(floatingRootContext);
10082 + store3.useSyncedValue("isInstantPhase", isInstantPhase);
10083 + const rootDisabled = store3.useState("disabled");
10084 + const disabled2 = disabledProp ?? rootDisabled;
10085 + const disabledRef = useValueAsRef(disabled2);
10086 + const trackCursorAxis = store3.useState("trackCursorAxis");
10087 + const disableHoverablePopup = store3.useState("disableHoverablePopup");
10088 + const isNestedTriggerHoveredRef = React50.useRef(false);
10089 + const nestedTriggerOpenTimeout = useTimeout();
10090 + const pointerTypeRef = React50.useRef(void 0);
10091 + function getOpenDelay() {
10092 + if (hasProvider && activeIdRef.current != null) {
10093 + return 0;
10094 + }
10095 + return delay ?? providerDelay ?? OPEN_DELAY;
10096 + }
10097 + function isEnabledNestedTriggerTarget(target) {
10098 + const triggerEl = triggerElementRef.current;
10099 + if (!triggerEl || !target) {
10100 + return false;
10101 + }
10102 + const nearestTrigger = closestEnabledTooltipTrigger(target);
10103 + return nearestTrigger !== null && nearestTrigger !== triggerEl && contains(triggerEl, nearestTrigger);
10104 + }
10105 + function detectNestedTriggerHover(target) {
10106 + const nestedTriggerHovered = isEnabledNestedTriggerTarget(target);
10107 + isNestedTriggerHoveredRef.current = nestedTriggerHovered;
10108 + if (nestedTriggerHovered) {
10109 + hoverInteraction.openChangeTimeout.clear();
10110 + hoverInteraction.restTimeout.clear();
10111 + hoverInteraction.restTimeoutPending = false;
10112 + nestedTriggerOpenTimeout.clear();
10113 + }
10114 + return nestedTriggerHovered;
10115 + }
10116 + const hoverProps = useHoverReferenceInteraction(floatingRootContext, {
10117 + enabled: !disabled2,
10118 + mouseOnly: true,
10119 + move: false,
10120 + handleClose: !disableHoverablePopup && trackCursorAxis !== "both" ? safePolygon() : null,
10121 + restMs: getOpenDelay,
10122 + delay() {
10123 + if (closeDelay == null && hasProvider) {
10124 + return {
10125 + close: getDelay(delayRef.current, "close")
10126 + };
10127 + }
10128 + return {
10129 + close: closeDelayWithDefault
10130 + };
10131 + },
10132 + triggerElementRef,
10133 + isActiveTrigger: isTriggerActive,
10134 + isClosing: () => store3.select("transitionStatus") === "ending",
10135 + shouldOpen() {
10136 + return !isNestedTriggerHoveredRef.current;
10137 + }
10138 + });
10139 + const focusProps = useFocus(floatingRootContext, {
10140 + enabled: !disabled2
10141 + }).reference;
10142 + const handleNestedTriggerHover = (event) => {
10143 + const wasNestedTriggerHovered = isNestedTriggerHoveredRef.current;
10144 + const target = getTargetElement(event);
10145 + const nestedTriggerHovered = detectNestedTriggerHover(target);
10146 + const triggerEl = triggerElementRef.current;
10147 + const targetInsideTrigger = triggerEl && target && contains(triggerEl, target);
10148 + if (nestedTriggerHovered && store3.select("open") && store3.select("lastOpenChangeReason") === reason_parts_exports.triggerHover) {
10149 + store3.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
10150 + return;
10151 + }
10152 + if (wasNestedTriggerHovered && !nestedTriggerHovered && targetInsideTrigger && !disabledRef.current && !store3.select("open") && triggerEl && // Match the hover hook's non-strict mouse fallback for mouse-only event sequences.
10153 + isMouseLikePointerType(pointerTypeRef.current)) {
10154 + const open3 = () => {
10155 + if (!isNestedTriggerHoveredRef.current && !disabledRef.current && !store3.select("open")) {
10156 + store3.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerEl));
10157 + }
10158 + };
10159 + const openDelay = getOpenDelay();
10160 + if (openDelay === 0) {
10161 + nestedTriggerOpenTimeout.clear();
10162 + open3();
10163 + } else {
10164 + nestedTriggerOpenTimeout.start(openDelay, open3);
10165 + }
10166 + }
10167 + };
10168 + const rootTriggerProps = store3.useState("triggerProps", isMountedByThisTrigger);
10169 + const shouldApplyRootTriggerProps = isMountedByThisTrigger || trackCursorAxis !== "none";
10170 + const state = {
10171 + open: isOpenedByThisTrigger
10172 + };
10173 + const element = useRenderElement("button", componentProps, {
10174 + state,
10175 + ref: [forwardedRef, registerTrigger, triggerElementRef],
10176 + props: [hoverProps, focusProps, shouldApplyRootTriggerProps ? rootTriggerProps : void 0, {
10177 + onMouseOver(event) {
10178 + handleNestedTriggerHover(event.nativeEvent);
10179 + },
10180 + onFocus(event) {
10181 + if (isEnabledNestedTriggerTarget(getTargetElement(event.nativeEvent))) {
10182 + event.preventBaseUIHandler();
10183 + }
10184 + },
10185 + onMouseLeave() {
10186 + isNestedTriggerHoveredRef.current = false;
10187 + nestedTriggerOpenTimeout.clear();
10188 + pointerTypeRef.current = void 0;
10189 + },
10190 + onPointerEnter(event) {
10191 + pointerTypeRef.current = event.pointerType;
10192 + },
10193 + onPointerDown(event) {
10194 + pointerTypeRef.current = event.pointerType;
10195 + store3.set("closeOnClick", closeOnClick);
10196 + if (closeOnClick && !store3.select("open")) {
10197 + store3.cancelPendingOpen(event.nativeEvent);
10198 + }
10199 + },
10200 + onClick(event) {
10201 + if (closeOnClick && !store3.select("open")) {
10202 + store3.cancelPendingOpen(event.nativeEvent);
10203 + }
10204 + },
10205 + id: thisTriggerId,
10206 + [triggerDisabled]: disabled2 ? "" : void 0,
10207 + [TOOLTIP_TRIGGER_IDENTIFIER]: disabled2 ? void 0 : ""
10208 + }, elementProps],
10209 + stateAttributesMapping: triggerOpenStateMapping2
10210 + });
10211 + return element;
10212 + });
10213 + if (true) TooltipTrigger.displayName = "TooltipTrigger";
10214 +
10215 + // node_modules/@base-ui/react/tooltip/portal/TooltipPortal.mjs
10216 + var React52 = __toESM(require_react(), 1);
10217 +
10218 + // node_modules/@base-ui/react/tooltip/portal/TooltipPortalContext.mjs
10219 + var React51 = __toESM(require_react(), 1);
10220 + var TooltipPortalContext = /* @__PURE__ */ React51.createContext(void 0);
10221 + if (true) TooltipPortalContext.displayName = "TooltipPortalContext";
10222 + function useTooltipPortalContext() {
10223 + const value = React51.useContext(TooltipPortalContext);
10224 + if (value === void 0) {
10225 + throw new Error(true ? "Base UI: <Tooltip.Portal> is missing." : formatErrorMessage_default(70));
10226 + }
10227 + return value;
10228 + }
10229 +
10230 + // node_modules/@base-ui/react/tooltip/portal/TooltipPortal.mjs
10231 + var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
10232 + var TooltipPortal = /* @__PURE__ */ React52.forwardRef(function TooltipPortal2(props, forwardedRef) {
10233 + const {
10234 + keepMounted = false,
10235 + ...portalProps
10236 + } = props;
10237 + const store3 = useTooltipRootContext();
10238 + const mounted = store3.useState("mounted");
10239 + const shouldRender = mounted || keepMounted;
10240 + if (!shouldRender) {
10241 + return null;
10242 + }
10243 + return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(TooltipPortalContext.Provider, {
10244 + value: keepMounted,
10245 + children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(FloatingPortalLite, {
10246 + ref: forwardedRef,
10247 + ...portalProps
10248 + })
10249 + });
10250 + });
10251 + if (true) TooltipPortal.displayName = "TooltipPortal";
10252 +
10253 + // node_modules/@base-ui/react/tooltip/positioner/TooltipPositioner.mjs
10254 + var React54 = __toESM(require_react(), 1);
10255 +
10256 + // node_modules/@base-ui/react/tooltip/positioner/TooltipPositionerContext.mjs
10257 + var React53 = __toESM(require_react(), 1);
10258 + var TooltipPositionerContext = /* @__PURE__ */ React53.createContext(void 0);
10259 + if (true) TooltipPositionerContext.displayName = "TooltipPositionerContext";
10260 + function useTooltipPositionerContext() {
10261 + const context = React53.useContext(TooltipPositionerContext);
10262 + if (context === void 0) {
10263 + throw new Error(true ? "Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>." : formatErrorMessage_default(71));
10264 + }
10265 + return context;
10266 + }
10267 +
10268 + // node_modules/@base-ui/react/tooltip/positioner/TooltipPositioner.mjs
10269 + var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
10270 + var TooltipPositioner = /* @__PURE__ */ React54.forwardRef(function TooltipPositioner2(componentProps, forwardedRef) {
10271 + const {
10272 + render,
10273 + className,
10274 + anchor,
10275 + positionMethod = "absolute",
10276 + side = "top",
10277 + align = "center",
10278 + sideOffset = 0,
10279 + alignOffset = 0,
10280 + collisionBoundary = "clipping-ancestors",
10281 + collisionPadding = 5,
10282 + arrowPadding = 5,
10283 + sticky = false,
10284 + disableAnchorTracking = false,
10285 + collisionAvoidance = POPUP_COLLISION_AVOIDANCE,
10286 + style,
10287 + ...elementProps
10288 + } = componentProps;
10289 + const store3 = useTooltipRootContext();
10290 + const keepMounted = useTooltipPortalContext();
10291 + const open3 = store3.useState("open");
10292 + const mounted = store3.useState("mounted");
10293 + const trackCursorAxis = store3.useState("trackCursorAxis");
10294 + const disableHoverablePopup = store3.useState("disableHoverablePopup");
10295 + const floatingRootContext = store3.useState("floatingRootContext");
10296 + const instantType = store3.useState("instantType");
10297 + const transitionStatus = store3.useState("transitionStatus");
10298 + const adaptiveOrigin2 = store3.useState("adaptiveOrigin");
10299 + const positioning = useAnchorPositioning({
10300 + anchor,
10301 + positionMethod,
10302 + floatingRootContext,
10303 + mounted,
10304 + side,
10305 + sideOffset,
10306 + align,
10307 + alignOffset,
10308 + collisionBoundary,
10309 + collisionPadding,
10310 + sticky,
10311 + arrowPadding,
10312 + disableAnchorTracking,
10313 + keepMounted,
10314 + collisionAvoidance,
10315 + adaptiveOrigin: adaptiveOrigin2
10316 + });
10317 + const state = React54.useMemo(() => ({
10318 + open: open3,
10319 + side: positioning.side,
10320 + align: positioning.align,
10321 + anchorHidden: positioning.anchorHidden,
10322 + instant: trackCursorAxis !== "none" ? "tracking-cursor" : instantType
10323 + }), [open3, positioning.side, positioning.align, positioning.anchorHidden, trackCursorAxis, instantType]);
10324 + const element = usePositioner(componentProps, state, {
10325 + styles: positioning.positionerStyles,
10326 + transitionStatus,
10327 + props: elementProps,
10328 + refs: [forwardedRef, store3.useStateSetter("positionerElement")],
10329 + hidden: !mounted,
10330 + inert: !open3 || trackCursorAxis === "both" || disableHoverablePopup
10331 + });
10332 + return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TooltipPositionerContext.Provider, {
10333 + value: positioning,
10334 + children: element
10335 + });
10336 + });
10337 + if (true) TooltipPositioner.displayName = "TooltipPositioner";
10338 +
10339 + // node_modules/@base-ui/react/tooltip/popup/TooltipPopup.mjs
10340 + var React55 = __toESM(require_react(), 1);
10341 + var TooltipPopup = /* @__PURE__ */ React55.forwardRef(function TooltipPopup2(componentProps, forwardedRef) {
10342 + const {
10343 + render,
10344 + className,
10345 + style,
10346 + ...elementProps
10347 + } = componentProps;
10348 + const store3 = useTooltipRootContext();
10349 + const {
10350 + side,
10351 + align
10352 + } = useTooltipPositionerContext();
10353 + const open3 = store3.useState("open");
10354 + const instantType = store3.useState("instantType");
10355 + const transitionStatus = store3.useState("transitionStatus");
10356 + const popupProps = store3.useState("popupProps");
10357 + const floatingContext = store3.useState("floatingRootContext");
10358 + const disabled2 = store3.useState("disabled");
10359 + const closeDelay = store3.useState("closeDelay");
10360 + useOpenChangeComplete({
10361 + open: open3,
10362 + ref: store3.context.popupRef,
10363 + onComplete() {
10364 + if (open3) {
10365 + store3.context.onOpenChangeComplete?.(true);
10366 + }
10367 + }
10368 + });
10369 + useHoverFloatingInteraction(floatingContext, {
10370 + enabled: !disabled2,
10371 + closeDelay
10372 + });
10373 + const setPopupElement = store3.useStateSetter("popupElement");
10374 + const state = {
10375 + open: open3,
10376 + side,
10377 + align,
10378 + instant: instantType,
10379 + transitionStatus
10380 + };
10381 + const element = useRenderElement("div", componentProps, {
10382 + state,
10383 + ref: [forwardedRef, store3.context.popupRef, setPopupElement],
10384 + props: [FOCUSABLE_POPUP_PROPS, popupProps, getDisabledMountTransitionStyles(transitionStatus), elementProps],
10385 + stateAttributesMapping: popupTransitionStateMapping
10386 + });
10387 + return element;
10388 + });
10389 + if (true) TooltipPopup.displayName = "TooltipPopup";
10390 +
10391 + // node_modules/@base-ui/react/tooltip/arrow/TooltipArrow.mjs
10392 + var React56 = __toESM(require_react(), 1);
10393 + var TooltipArrow = /* @__PURE__ */ React56.forwardRef(function TooltipArrow2(componentProps, forwardedRef) {
10394 + const {
10395 + render,
10396 + className,
10397 + style,
10398 + ...elementProps
10399 + } = componentProps;
10400 + const store3 = useTooltipRootContext();
10401 + const {
10402 + arrowRef,
10403 + side,
10404 + align,
10405 + arrowUncentered,
10406 + arrowStyles
10407 + } = useTooltipPositionerContext();
10408 + const open3 = store3.useState("open");
10409 + const instantType = store3.useState("instantType");
10410 + const state = {
10411 + open: open3,
10412 + side,
10413 + align,
10414 + uncentered: arrowUncentered,
10415 + instant: instantType
10416 + };
10417 + const element = useRenderElement("div", componentProps, {
10418 + state,
10419 + ref: [forwardedRef, arrowRef],
10420 + props: [{
10421 + style: arrowStyles,
10422 + "aria-hidden": true
10423 + }, elementProps],
10424 + stateAttributesMapping: popupStateMapping
10425 + });
10426 + return element;
10427 + });
10428 + if (true) TooltipArrow.displayName = "TooltipArrow";
10429 +
10430 + // node_modules/@base-ui/react/tooltip/provider/TooltipProvider.mjs
10431 + var React57 = __toESM(require_react(), 1);
10432 + var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
10433 + var TooltipProvider = function TooltipProvider2(props) {
10434 + const {
10435 + delay,
10436 + closeDelay,
10437 + timeout = 400
10438 + } = props;
10439 + const delayValue = React57.useMemo(() => ({
10440 + open: delay,
10441 + close: closeDelay
10442 + }), [delay, closeDelay]);
10443 + return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TooltipProviderContext.Provider, {
10444 + value: delay,
10445 + children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(FloatingDelayGroup, {
10446 + delay: delayValue,
10447 + timeoutMs: timeout,
10448 + children: props.children
10449 + })
10450 + });
10451 + };
10452 + if (true) TooltipProvider.displayName = "TooltipProvider";
10453 +
10454 + // node_modules/@base-ui/react/tooltip/viewport/TooltipViewport.mjs
10455 + var React58 = __toESM(require_react(), 1);
10456 + var TooltipViewport = /* @__PURE__ */ React58.forwardRef(function TooltipViewport2(componentProps, forwardedRef) {
10457 + const {
10458 + render,
10459 + className,
10460 + style,
10461 + children,
10462 + ...elementProps
10463 + } = componentProps;
10464 + const store3 = useTooltipRootContext();
10465 + const positioner = useTooltipPositionerContext();
10466 + const instantType = store3.useState("instantType");
10467 + const {
10468 + children: childrenToRender,
10469 + state: viewportState
10470 + } = usePopupViewport({
10471 + store: store3,
10472 + side: positioner.side,
10473 + children
10474 + });
10475 + const state = {
10476 + activationDirection: viewportState.activationDirection,
10477 + transitioning: viewportState.transitioning,
10478 + instant: instantType
10479 + };
10480 + return useRenderElement("div", componentProps, {
10481 + state,
10482 + ref: forwardedRef,
10483 + props: [elementProps, {
10484 + children: childrenToRender
10485 + }],
10486 + stateAttributesMapping: popupViewportStateMapping
10487 + });
10488 + });
10489 + if (true) TooltipViewport.displayName = "TooltipViewport";
10490 +
10491 + // node_modules/@base-ui/react/tooltip/store/TooltipHandle.mjs
10492 + var TooltipHandle = class extends BasePopupHandle {
10493 + constructor() {
10494 + super(createNullTooltipStore(), "Tooltip");
10495 + }
10496 + /**
10497 + * Opens the tooltip and associates it with the trigger with the given id.
10498 + *
10499 + * This method should only be called in an event handler or an effect (not during rendering).
10500 + *
10501 + * @param triggerId ID of the trigger to associate with the tooltip. The trigger must be a matching
10502 + * `Tooltip.Trigger` with this handle passed as a prop.
10503 + */
10504 + open(triggerId) {
10505 + this.openByTrigger(triggerId);
10506 + }
10507 + /**
10508 + * Closes the tooltip.
10509 + *
10510 + * This method should only be called in an event handler or an effect (not during rendering).
10511 + */
10512 + close() {
10513 + this.closePopup();
10514 + }
10515 + /**
10516 + * Whether the tooltip is currently open. Returns `false` while no root is attached to the handle.
10517 + */
10518 + get isOpen() {
10519 + return this.attachedStore?.select("open") ?? false;
10520 + }
10521 + };
10522 + function createTooltipHandle() {
10523 + return new TooltipHandle();
10524 + }
10525 +
10526 + // node_modules/@base-ui/react/use-render/useRender.mjs
1622 10527 function useRender(params) {
1623 10528 return useRenderElement(params.defaultTagName ?? "div", params, params);
1624 10529 }
1625 10530
10531 + // packages/ui/build-module/text/text.mjs
10532 + var import_element13 = __toESM(require_element(), 1);
10533 + var STYLE_HASH_ATTRIBUTE = "data-wp-hash";
10534 + function getRuntime() {
10535 + const globalScope = globalThis;
10536 + if (globalScope.__wpStyleRuntime) {
10537 + return globalScope.__wpStyleRuntime;
10538 + }
10539 + globalScope.__wpStyleRuntime = {
10540 + documents: /* @__PURE__ */ new Map(),
10541 + styles: /* @__PURE__ */ new Map(),
10542 + injectedStyles: /* @__PURE__ */ new WeakMap()
10543 + };
10544 + if (typeof document !== "undefined") {
10545 + registerDocument(document);
10546 + }
10547 + return globalScope.__wpStyleRuntime;
10548 + }
10549 + function documentContainsStyleHash(targetDocument, hash) {
10550 + if (!targetDocument.head) {
10551 + return false;
10552 + }
10553 + for (const style of targetDocument.head.querySelectorAll(
10554 + `style[${STYLE_HASH_ATTRIBUTE}]`
10555 + )) {
10556 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) {
10557 + return true;
10558 + }
10559 + }
10560 + return false;
10561 + }
10562 + function injectStyle(targetDocument, hash, css) {
10563 + if (!targetDocument.head) {
10564 + return;
10565 + }
10566 + const runtime = getRuntime();
10567 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
10568 + if (!injectedStyles) {
10569 + injectedStyles = /* @__PURE__ */ new Set();
10570 + runtime.injectedStyles.set(targetDocument, injectedStyles);
10571 + }
10572 + if (injectedStyles.has(hash)) {
10573 + return;
10574 + }
10575 + if (documentContainsStyleHash(targetDocument, hash)) {
10576 + injectedStyles.add(hash);
10577 + return;
10578 + }
10579 + const style = targetDocument.createElement("style");
10580 + style.setAttribute(STYLE_HASH_ATTRIBUTE, hash);
10581 + style.appendChild(targetDocument.createTextNode(css));
10582 + targetDocument.head.appendChild(style);
10583 + injectedStyles.add(hash);
10584 + }
10585 + function registerDocument(targetDocument) {
10586 + const runtime = getRuntime();
10587 + runtime.documents.set(
10588 + targetDocument,
10589 + (runtime.documents.get(targetDocument) ?? 0) + 1
10590 + );
10591 + for (const [hash, css] of runtime.styles) {
10592 + injectStyle(targetDocument, hash, css);
10593 + }
10594 + return () => {
10595 + const count = runtime.documents.get(targetDocument);
10596 + if (count === void 0) {
10597 + return;
10598 + }
10599 + if (count <= 1) {
10600 + runtime.documents.delete(targetDocument);
10601 + return;
10602 + }
10603 + runtime.documents.set(targetDocument, count - 1);
10604 + };
10605 + }
10606 + function registerStyle(hash, css) {
10607 + const runtime = getRuntime();
10608 + runtime.styles.set(hash, css);
10609 + for (const targetDocument of runtime.documents.keys()) {
10610 + injectStyle(targetDocument, hash, css);
10611 + }
10612 + }
10613 + if (typeof process === "undefined" || true) {
10614 + registerStyle("3167e7d116", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._83ed8a8da5dd50ea__text{text-wrap:pretty;margin:0}._14437cfb77831647__heading-2xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-p-line-height:var(--wpds-typography-line-height-2xl,40px);font-size:var(--wpds-typography-font-size-2xl,32px);line-height:var(--wpds-typography-line-height-2xl,40px)}._14437cfb77831647__heading-2xl,._3c78b7fa9b4072dd__heading-xl{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-emphasis,600)}._3c78b7fa9b4072dd__heading-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-md,24px)}.aa58f227716bcde2__heading-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-lg,15px)}.aa58f227716bcde2__heading-lg,.fc4da56d8dfe52c4__heading-md{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wpds-typography-line-height-sm,20px)}.fc4da56d8dfe52c4__heading-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px)}.a9b78c7c82e8dff7__heading-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wpds-typography-line-height-xs,16px);text-transform:uppercase}._305ff559e52180d5__body-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-xl,32px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-xl,32px)}._305ff559e52180d5__body-xl,.ca1aa3fc2029e958__body-lg{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-default,400)}.ca1aa3fc2029e958__body-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-lg,15px);line-height:var(--wpds-typography-line-height-md,24px)}._131101940be12424__body-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}._0e8d87a42c1f75fa__body-sm,._131101940be12424__body-md{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-default,400)}._0e8d87a42c1f75fa__body-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}');
10615 + }
10616 + var style_default = { "text": "_83ed8a8da5dd50ea__text", "heading-2xl": "_14437cfb77831647__heading-2xl", "heading-xl": "_3c78b7fa9b4072dd__heading-xl", "heading-lg": "aa58f227716bcde2__heading-lg", "heading-md": "fc4da56d8dfe52c4__heading-md", "heading-sm": "a9b78c7c82e8dff7__heading-sm", "body-xl": "_305ff559e52180d5__body-xl", "body-lg": "ca1aa3fc2029e958__body-lg", "body-md": "_131101940be12424__body-md", "body-sm": "_0e8d87a42c1f75fa__body-sm" };
10617 + if (typeof process === "undefined" || true) {
10618 + registerStyle("e8e31009f5", "._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");
10619 + }
10620 + var global_css_defense_default = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a", "ol": "c59a0ebebd71fa4a__ol", "li": "_46b5cb0c8e24e8c9__li" };
10621 + var Text = (0, import_element13.forwardRef)(function Text2({ variant = "body-md", render, className, ...props }, ref) {
10622 + const element = useRender({
10623 + render,
10624 + defaultTagName: "span",
10625 + ref,
10626 + props: mergeProps(props, {
10627 + className: clsx_default(
10628 + style_default.text,
10629 + global_css_defense_default.heading,
10630 + global_css_defense_default.p,
10631 + style_default[variant],
10632 + className
10633 + )
10634 + })
10635 + });
10636 + return element;
10637 + });
10638 +
10639 + // packages/ui/build-module/tooltip/popup.mjs
10640 + var import_element17 = __toESM(require_element(), 1);
10641 +
10642 + // packages/ui/build-module/tooltip/portal.mjs
10643 + var import_element14 = __toESM(require_element(), 1);
10644 +
10645 + // packages/ui/build-module/utils/wp-compat-overlay-slot.mjs
10646 + var STYLE_HASH_ATTRIBUTE2 = "data-wp-hash";
10647 + function getRuntime2() {
10648 + const globalScope = globalThis;
10649 + if (globalScope.__wpStyleRuntime) {
10650 + return globalScope.__wpStyleRuntime;
10651 + }
10652 + globalScope.__wpStyleRuntime = {
10653 + documents: /* @__PURE__ */ new Map(),
10654 + styles: /* @__PURE__ */ new Map(),
10655 + injectedStyles: /* @__PURE__ */ new WeakMap()
10656 + };
10657 + if (typeof document !== "undefined") {
10658 + registerDocument2(document);
10659 + }
10660 + return globalScope.__wpStyleRuntime;
10661 + }
10662 + function documentContainsStyleHash2(targetDocument, hash) {
10663 + if (!targetDocument.head) {
10664 + return false;
10665 + }
10666 + for (const style of targetDocument.head.querySelectorAll(
10667 + `style[${STYLE_HASH_ATTRIBUTE2}]`
10668 + )) {
10669 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE2) === hash) {
10670 + return true;
10671 + }
10672 + }
10673 + return false;
10674 + }
10675 + function injectStyle2(targetDocument, hash, css) {
10676 + if (!targetDocument.head) {
10677 + return;
10678 + }
10679 + const runtime = getRuntime2();
10680 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
10681 + if (!injectedStyles) {
10682 + injectedStyles = /* @__PURE__ */ new Set();
10683 + runtime.injectedStyles.set(targetDocument, injectedStyles);
10684 + }
10685 + if (injectedStyles.has(hash)) {
10686 + return;
10687 + }
10688 + if (documentContainsStyleHash2(targetDocument, hash)) {
10689 + injectedStyles.add(hash);
10690 + return;
10691 + }
10692 + const style = targetDocument.createElement("style");
10693 + style.setAttribute(STYLE_HASH_ATTRIBUTE2, hash);
10694 + style.appendChild(targetDocument.createTextNode(css));
10695 + targetDocument.head.appendChild(style);
10696 + injectedStyles.add(hash);
10697 + }
10698 + function registerDocument2(targetDocument) {
10699 + const runtime = getRuntime2();
10700 + runtime.documents.set(
10701 + targetDocument,
10702 + (runtime.documents.get(targetDocument) ?? 0) + 1
10703 + );
10704 + for (const [hash, css] of runtime.styles) {
10705 + injectStyle2(targetDocument, hash, css);
10706 + }
10707 + return () => {
10708 + const count = runtime.documents.get(targetDocument);
10709 + if (count === void 0) {
10710 + return;
10711 + }
10712 + if (count <= 1) {
10713 + runtime.documents.delete(targetDocument);
10714 + return;
10715 + }
10716 + runtime.documents.set(targetDocument, count - 1);
10717 + };
10718 + }
10719 + function registerStyle2(hash, css) {
10720 + const runtime = getRuntime2();
10721 + runtime.styles.set(hash, css);
10722 + for (const targetDocument of runtime.documents.keys()) {
10723 + injectStyle2(targetDocument, hash, css);
10724 + }
10725 + }
10726 + if (typeof process === "undefined" || true) {
10727 + registerStyle2("be37f31c1e", "._11fc52b637ff8a7e__slot{inset:0;isolation:isolate;pointer-events:none;position:fixed;z-index:1000000003}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._11fc52b637ff8a7e__slot>*{pointer-events:auto}}}");
10728 + }
10729 + var wp_compat_overlay_slot_default = { "slot": "_11fc52b637ff8a7e__slot" };
10730 + var WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE = "data-wp-compat-overlay-slot";
10731 + function resolveOwnerDocument() {
10732 + return typeof document === "undefined" ? null : document;
10733 + }
10734 + function isInWordPressEnvironment() {
10735 + let topWp;
10736 + try {
10737 + topWp = window.top?.wp;
10738 + } catch {
10739 + }
10740 + const wp = topWp ?? window.wp;
10741 + return typeof wp?.components === "object" && wp.components !== null;
10742 + }
10743 + var cachedSlot = null;
10744 + function ensureSlotIsAccessible(element) {
10745 + element.setAttribute("aria-hidden", "false");
10746 + return element;
10747 + }
10748 + function createSlot(ownerDocument2) {
10749 + const element = ownerDocument2.createElement("div");
10750 + element.setAttribute(WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE, "");
10751 + if (wp_compat_overlay_slot_default.slot) {
10752 + element.classList.add(wp_compat_overlay_slot_default.slot);
10753 + }
10754 + ownerDocument2.body.appendChild(element);
10755 + return element;
10756 + }
10757 + function getWpCompatOverlaySlot() {
10758 + if (typeof window === "undefined") {
10759 + return void 0;
10760 + }
10761 + if (!isInWordPressEnvironment() && window.__wpUiCompatOverlaySlotEnabled !== true) {
10762 + return void 0;
10763 + }
10764 + const ownerDocument2 = resolveOwnerDocument();
10765 + if (!ownerDocument2 || !ownerDocument2.body) {
10766 + return void 0;
10767 + }
10768 + if (cachedSlot && cachedSlot.ownerDocument === ownerDocument2 && cachedSlot.isConnected) {
10769 + return ensureSlotIsAccessible(cachedSlot);
10770 + }
10771 + const existing = ownerDocument2.querySelector(
10772 + `[${WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE}]`
10773 + );
10774 + if (existing instanceof HTMLDivElement) {
10775 + cachedSlot = ensureSlotIsAccessible(existing);
10776 + return cachedSlot;
10777 + }
10778 + if (cachedSlot?.isConnected) {
10779 + cachedSlot.remove();
10780 + }
10781 + cachedSlot = ensureSlotIsAccessible(createSlot(ownerDocument2));
10782 + return cachedSlot;
10783 + }
10784 +
10785 + // packages/ui/build-module/tooltip/portal.mjs
10786 + var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
10787 + var Portal = (0, import_element14.forwardRef)(
10788 + function TooltipPortal3({ container, ...restProps }, ref) {
10789 + return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
10790 + index_parts_exports2.Portal,
10791 + {
10792 + container: container ?? getWpCompatOverlaySlot(),
10793 + ...restProps,
10794 + ref
10795 + }
10796 + );
10797 + }
10798 + );
10799 +
10800 + // packages/ui/build-module/tooltip/positioner.mjs
10801 + var import_element15 = __toESM(require_element(), 1);
10802 + var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
10803 + var STYLE_HASH_ATTRIBUTE3 = "data-wp-hash";
10804 + function getRuntime3() {
10805 + const globalScope = globalThis;
10806 + if (globalScope.__wpStyleRuntime) {
10807 + return globalScope.__wpStyleRuntime;
10808 + }
10809 + globalScope.__wpStyleRuntime = {
10810 + documents: /* @__PURE__ */ new Map(),
10811 + styles: /* @__PURE__ */ new Map(),
10812 + injectedStyles: /* @__PURE__ */ new WeakMap()
10813 + };
10814 + if (typeof document !== "undefined") {
10815 + registerDocument3(document);
10816 + }
10817 + return globalScope.__wpStyleRuntime;
10818 + }
10819 + function documentContainsStyleHash3(targetDocument, hash) {
10820 + if (!targetDocument.head) {
10821 + return false;
10822 + }
10823 + for (const style of targetDocument.head.querySelectorAll(
10824 + `style[${STYLE_HASH_ATTRIBUTE3}]`
10825 + )) {
10826 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE3) === hash) {
10827 + return true;
10828 + }
10829 + }
10830 + return false;
10831 + }
10832 + function injectStyle3(targetDocument, hash, css) {
10833 + if (!targetDocument.head) {
10834 + return;
10835 + }
10836 + const runtime = getRuntime3();
10837 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
10838 + if (!injectedStyles) {
10839 + injectedStyles = /* @__PURE__ */ new Set();
10840 + runtime.injectedStyles.set(targetDocument, injectedStyles);
10841 + }
10842 + if (injectedStyles.has(hash)) {
10843 + return;
10844 + }
10845 + if (documentContainsStyleHash3(targetDocument, hash)) {
10846 + injectedStyles.add(hash);
10847 + return;
10848 + }
10849 + const style = targetDocument.createElement("style");
10850 + style.setAttribute(STYLE_HASH_ATTRIBUTE3, hash);
10851 + style.appendChild(targetDocument.createTextNode(css));
10852 + targetDocument.head.appendChild(style);
10853 + injectedStyles.add(hash);
10854 + }
10855 + function registerDocument3(targetDocument) {
10856 + const runtime = getRuntime3();
10857 + runtime.documents.set(
10858 + targetDocument,
10859 + (runtime.documents.get(targetDocument) ?? 0) + 1
10860 + );
10861 + for (const [hash, css] of runtime.styles) {
10862 + injectStyle3(targetDocument, hash, css);
10863 + }
10864 + return () => {
10865 + const count = runtime.documents.get(targetDocument);
10866 + if (count === void 0) {
10867 + return;
10868 + }
10869 + if (count <= 1) {
10870 + runtime.documents.delete(targetDocument);
10871 + return;
10872 + }
10873 + runtime.documents.set(targetDocument, count - 1);
10874 + };
10875 + }
10876 + function registerStyle3(hash, css) {
10877 + const runtime = getRuntime3();
10878 + runtime.styles.set(hash, css);
10879 + for (const targetDocument of runtime.documents.keys()) {
10880 + injectStyle3(targetDocument, hash, css);
10881 + }
10882 + }
10883 + if (typeof process === "undefined" || true) {
10884 + registerStyle3("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
10885 + }
10886 + var resets_default = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
10887 + if (typeof process === "undefined" || true) {
10888 + registerStyle3("19fcc06039", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{--_wp-ui-elevation-sm:0 1px 2px rgba(0,0,0,.05),0 2px 3px rgba(0,0,0,.04),0 6px 6px rgba(0,0,0,.03),0 8px 8px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-sm);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:1.4;padding:var(--wpds-dimension-padding-xs,4px) var(--wpds-dimension-padding-sm,8px);@media (forced-colors:active){border-bottom-color:CanvasText;border-bottom-style:solid;border-bottom-width:1px;border-left-color:CanvasText;border-left-style:solid;border-left-width:1px;border-right-color:CanvasText;border-right-style:solid;border-right-width:1px;border-top-color:CanvasText;border-top-style:solid;border-top-width:1px}}}}');
10889 + }
10890 + var style_default2 = { "positioner": "_480b748dd3510e64__positioner", "popup": "_50096b232db7709d__popup" };
10891 + var Positioner = (0, import_element15.forwardRef)(
10892 + function TooltipPositioner3({ align = "center", className, side = "top", sideOffset = 4, ...props }, ref) {
10893 + return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
10894 + index_parts_exports2.Positioner,
10895 + {
10896 + ref,
10897 + align,
10898 + side,
10899 + sideOffset,
10900 + ...props,
10901 + className: clsx_default(
10902 + resets_default["box-sizing"],
10903 + style_default2.positioner,
10904 + className
10905 + )
10906 + }
10907 + );
10908 + }
10909 + );
10910 +
10911 + // packages/ui/build-module/utils/render-slot-with-children.mjs
10912 + var import_element16 = __toESM(require_element(), 1);
10913 + function renderSlotWithChildren(slot, defaultSlot, children) {
10914 + return (0, import_element16.cloneElement)(slot ?? defaultSlot, { children });
10915 + }
10916 +
10917 + // packages/ui/build-module/utils/theme-provider.mjs
10918 + var theme = __toESM(require_theme(), 1);
10919 +
10920 + // packages/ui/build-module/lock-unlock.mjs
10921 + var import_private_apis = __toESM(require_private_apis(), 1);
10922 + var { lock, unlock } = (0, import_private_apis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
10923 + "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
10924 + "@wordpress/ui"
10925 + );
10926 +
10927 + // packages/ui/build-module/utils/theme-provider.mjs
10928 + function getThemeProvider() {
10929 + const themePackage = theme;
10930 + if (themePackage.ThemeProvider) {
10931 + return themePackage.ThemeProvider;
10932 + }
10933 + if (!themePackage.privateApis) {
10934 + throw new Error(
10935 + "@wordpress/ui: @wordpress/theme must expose `ThemeProvider` or `privateApis.ThemeProvider`."
10936 + );
10937 + }
10938 + return unlock(
10939 + themePackage.privateApis
10940 + ).ThemeProvider;
10941 + }
10942 + var ThemeProvider = getThemeProvider();
10943 +
10944 + // packages/ui/build-module/tooltip/popup.mjs
10945 + var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
10946 + var STYLE_HASH_ATTRIBUTE4 = "data-wp-hash";
10947 + function getRuntime4() {
10948 + const globalScope = globalThis;
10949 + if (globalScope.__wpStyleRuntime) {
10950 + return globalScope.__wpStyleRuntime;
10951 + }
10952 + globalScope.__wpStyleRuntime = {
10953 + documents: /* @__PURE__ */ new Map(),
10954 + styles: /* @__PURE__ */ new Map(),
10955 + injectedStyles: /* @__PURE__ */ new WeakMap()
10956 + };
10957 + if (typeof document !== "undefined") {
10958 + registerDocument4(document);
10959 + }
10960 + return globalScope.__wpStyleRuntime;
10961 + }
10962 + function documentContainsStyleHash4(targetDocument, hash) {
10963 + if (!targetDocument.head) {
10964 + return false;
10965 + }
10966 + for (const style of targetDocument.head.querySelectorAll(
10967 + `style[${STYLE_HASH_ATTRIBUTE4}]`
10968 + )) {
10969 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE4) === hash) {
10970 + return true;
10971 + }
10972 + }
10973 + return false;
10974 + }
10975 + function injectStyle4(targetDocument, hash, css) {
10976 + if (!targetDocument.head) {
10977 + return;
10978 + }
10979 + const runtime = getRuntime4();
10980 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
10981 + if (!injectedStyles) {
10982 + injectedStyles = /* @__PURE__ */ new Set();
10983 + runtime.injectedStyles.set(targetDocument, injectedStyles);
10984 + }
10985 + if (injectedStyles.has(hash)) {
10986 + return;
10987 + }
10988 + if (documentContainsStyleHash4(targetDocument, hash)) {
10989 + injectedStyles.add(hash);
10990 + return;
10991 + }
10992 + const style = targetDocument.createElement("style");
10993 + style.setAttribute(STYLE_HASH_ATTRIBUTE4, hash);
10994 + style.appendChild(targetDocument.createTextNode(css));
10995 + targetDocument.head.appendChild(style);
10996 + injectedStyles.add(hash);
10997 + }
10998 + function registerDocument4(targetDocument) {
10999 + const runtime = getRuntime4();
11000 + runtime.documents.set(
11001 + targetDocument,
11002 + (runtime.documents.get(targetDocument) ?? 0) + 1
11003 + );
11004 + for (const [hash, css] of runtime.styles) {
11005 + injectStyle4(targetDocument, hash, css);
11006 + }
11007 + return () => {
11008 + const count = runtime.documents.get(targetDocument);
11009 + if (count === void 0) {
11010 + return;
11011 + }
11012 + if (count <= 1) {
11013 + runtime.documents.delete(targetDocument);
11014 + return;
11015 + }
11016 + runtime.documents.set(targetDocument, count - 1);
11017 + };
11018 + }
11019 + function registerStyle4(hash, css) {
11020 + const runtime = getRuntime4();
11021 + runtime.styles.set(hash, css);
11022 + for (const targetDocument of runtime.documents.keys()) {
11023 + injectStyle4(targetDocument, hash, css);
11024 + }
11025 + }
11026 + if (typeof process === "undefined" || true) {
11027 + registerStyle4("19fcc06039", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{--_wp-ui-elevation-sm:0 1px 2px rgba(0,0,0,.05),0 2px 3px rgba(0,0,0,.04),0 6px 6px rgba(0,0,0,.03),0 8px 8px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-sm);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:1.4;padding:var(--wpds-dimension-padding-xs,4px) var(--wpds-dimension-padding-sm,8px);@media (forced-colors:active){border-bottom-color:CanvasText;border-bottom-style:solid;border-bottom-width:1px;border-left-color:CanvasText;border-left-style:solid;border-left-width:1px;border-right-color:CanvasText;border-right-style:solid;border-right-width:1px;border-top-color:CanvasText;border-top-style:solid;border-top-width:1px}}}}');
11028 + }
11029 + var style_default3 = { "positioner": "_480b748dd3510e64__positioner", "popup": "_50096b232db7709d__popup" };
11030 + var POPUP_COLOR = { background: "#1e1e1e" };
11031 + var Popup = (0, import_element17.forwardRef)(function TooltipPopup3({ portal, positioner, children, className, ...props }, ref) {
11032 + const popupContent = /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ThemeProvider, { color: POPUP_COLOR, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
11033 + index_parts_exports2.Popup,
11034 + {
11035 + ref,
11036 + className: clsx_default(style_default3.popup, className),
11037 + ...props,
11038 + children
11039 + }
11040 + ) });
11041 + const positionedPopup = renderSlotWithChildren(
11042 + positioner,
11043 + /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Positioner, {}),
11044 + popupContent
11045 + );
11046 + return renderSlotWithChildren(portal, /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Portal, {}), positionedPopup);
11047 + });
11048 +
11049 + // packages/ui/build-module/tooltip/trigger.mjs
11050 + var import_element18 = __toESM(require_element(), 1);
11051 + var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
11052 + var Trigger = (0, import_element18.forwardRef)(
11053 + function TooltipTrigger3(props, ref) {
11054 + return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(index_parts_exports2.Trigger, { ref, ...props });
11055 + }
11056 + );
11057 +
11058 + // packages/ui/build-module/utils/direction-provider.mjs
11059 + var import_i18n2 = __toESM(require_i18n(), 1);
11060 + var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
11061 + function DirectionProvider3({ children }) {
11062 + return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DirectionProvider, { direction: (0, import_i18n2.isRTL)() ? "rtl" : "ltr", children });
11063 + }
11064 +
11065 + // packages/ui/build-module/tooltip/root.mjs
11066 + var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
11067 + function Root(props) {
11068 + return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DirectionProvider3, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(index_parts_exports2.Root, { ...props }) });
11069 + }
11070 +
11071 + // packages/ui/build-module/link/link.mjs
11072 + var import_element19 = __toESM(require_element(), 1);
11073 + var import_i18n3 = __toESM(require_i18n(), 1);
11074 + var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
11075 + var STYLE_HASH_ATTRIBUTE5 = "data-wp-hash";
11076 + function getRuntime5() {
11077 + const globalScope = globalThis;
11078 + if (globalScope.__wpStyleRuntime) {
11079 + return globalScope.__wpStyleRuntime;
11080 + }
11081 + globalScope.__wpStyleRuntime = {
11082 + documents: /* @__PURE__ */ new Map(),
11083 + styles: /* @__PURE__ */ new Map(),
11084 + injectedStyles: /* @__PURE__ */ new WeakMap()
11085 + };
11086 + if (typeof document !== "undefined") {
11087 + registerDocument5(document);
11088 + }
11089 + return globalScope.__wpStyleRuntime;
11090 + }
11091 + function documentContainsStyleHash5(targetDocument, hash) {
11092 + if (!targetDocument.head) {
11093 + return false;
11094 + }
11095 + for (const style of targetDocument.head.querySelectorAll(
11096 + `style[${STYLE_HASH_ATTRIBUTE5}]`
11097 + )) {
11098 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE5) === hash) {
11099 + return true;
11100 + }
11101 + }
11102 + return false;
11103 + }
11104 + function injectStyle5(targetDocument, hash, css) {
11105 + if (!targetDocument.head) {
11106 + return;
11107 + }
11108 + const runtime = getRuntime5();
11109 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
11110 + if (!injectedStyles) {
11111 + injectedStyles = /* @__PURE__ */ new Set();
11112 + runtime.injectedStyles.set(targetDocument, injectedStyles);
11113 + }
11114 + if (injectedStyles.has(hash)) {
11115 + return;
11116 + }
11117 + if (documentContainsStyleHash5(targetDocument, hash)) {
11118 + injectedStyles.add(hash);
11119 + return;
11120 + }
11121 + const style = targetDocument.createElement("style");
11122 + style.setAttribute(STYLE_HASH_ATTRIBUTE5, hash);
11123 + style.appendChild(targetDocument.createTextNode(css));
11124 + targetDocument.head.appendChild(style);
11125 + injectedStyles.add(hash);
11126 + }
11127 + function registerDocument5(targetDocument) {
11128 + const runtime = getRuntime5();
11129 + runtime.documents.set(
11130 + targetDocument,
11131 + (runtime.documents.get(targetDocument) ?? 0) + 1
11132 + );
11133 + for (const [hash, css] of runtime.styles) {
11134 + injectStyle5(targetDocument, hash, css);
11135 + }
11136 + return () => {
11137 + const count = runtime.documents.get(targetDocument);
11138 + if (count === void 0) {
11139 + return;
11140 + }
11141 + if (count <= 1) {
11142 + runtime.documents.delete(targetDocument);
11143 + return;
11144 + }
11145 + runtime.documents.set(targetDocument, count - 1);
11146 + };
11147 + }
11148 + function registerStyle5(hash, css) {
11149 + const runtime = getRuntime5();
11150 + runtime.styles.set(hash, css);
11151 + for (const targetDocument of runtime.documents.keys()) {
11152 + injectStyle5(targetDocument, hash, css);
11153 + }
11154 + }
11155 + if (typeof process === "undefined" || true) {
11156 + registerStyle5("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
11157 + }
11158 + var resets_default2 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
11159 + if (typeof process === "undefined" || true) {
11160 + registerStyle5("08122b3d53", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.af79fb116edb0dd7__outset-ring--focus:focus,.dfcfdc28396e5d98__outset-ring--focus-visible:focus-visible,.e5cd9ee879f6403a__outset-ring--focus-within:focus-within,:focus-visible ._81935a08e952f267__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within,.abc777e9713fa711__outset-ring--focus-except-active:focus{outline:none}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.abc777e9713fa711__outset-ring--focus-except-active:focus:not(:active){--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");
11161 + }
11162 + var focus_module_default = { "outset-ring--focus": "af79fb116edb0dd7__outset-ring--focus", "outset-ring--focus-visible": "dfcfdc28396e5d98__outset-ring--focus-visible", "outset-ring--focus-within": "e5cd9ee879f6403a__outset-ring--focus-within", "outset-ring--focus-parent-visible": "_81935a08e952f267__outset-ring--focus-parent-visible", "outset-ring--focus-except-active": "abc777e9713fa711__outset-ring--focus-except-active", "outset-ring--focus-within-except-active": "_3c9f5ee9fc9c136d__outset-ring--focus-within-except-active" };
11163 + if (typeof process === "undefined" || true) {
11164 + registerStyle5("e8e6a9be37", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.d4250949359b05ce__link{text-decoration-thickness:from-font;text-underline-offset:.2em}.c6055659b8e2cd2c__is-brand,.c6055659b8e2cd2c__is-brand:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9))}.c6055659b8e2cd2c__is-brand:active,.c6055659b8e2cd2c__is-brand:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000))}._92e0dfcaeee15b88__is-neutral,._92e0dfcaeee15b88__is-neutral:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);text-decoration-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d)}._92e0dfcaeee15b88__is-neutral:active,._92e0dfcaeee15b88__is-neutral:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}.cf122a9bf1035d42__is-unstyled{--_gcd-a-color:inherit;color:inherit;text-decoration:none}._0cb411afac4c86c7__link-icon{display:inline-block;font-weight:var(--wpds-typography-font-weight-default,400);line-height:1;margin-inline-start:var(--wpds-dimension-padding-xs,4px);text-decoration:none}._0cb411afac4c86c7__link-icon:after{content:"\\2197"}._0cb411afac4c86c7__link-icon:dir(rtl):after{content:"\\2196"}}}');
11165 + }
11166 + var style_default4 = { "link": "d4250949359b05ce__link", "is-brand": "c6055659b8e2cd2c__is-brand", "is-neutral": "_92e0dfcaeee15b88__is-neutral", "is-unstyled": "cf122a9bf1035d42__is-unstyled", "link-icon": "_0cb411afac4c86c7__link-icon" };
11167 + if (typeof process === "undefined" || true) {
11168 + registerStyle5("e8e31009f5", "._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");
11169 + }
11170 + var global_css_defense_default2 = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a", "ol": "c59a0ebebd71fa4a__ol", "li": "_46b5cb0c8e24e8c9__li" };
11171 + var Link = (0, import_element19.forwardRef)(function Link2({
11172 + children,
11173 + variant = "default",
11174 + tone = "brand",
11175 + openInNewTab = false,
11176 + target,
11177 + render,
11178 + className,
11179 + ...props
11180 + }, ref) {
11181 + const shouldShowNewTabIndicator = openInNewTab || /^_blank$/i.test(target ?? "");
11182 + const element = useRender({
11183 + render,
11184 + defaultTagName: "a",
11185 + ref,
11186 + props: mergeProps(props, {
11187 + className: clsx_default(
11188 + global_css_defense_default2.a,
11189 + resets_default2["box-sizing"],
11190 + focus_module_default["outset-ring--focus-except-active"],
11191 + variant !== "unstyled" && style_default4.link,
11192 + variant !== "unstyled" && style_default4[`is-${tone}`],
11193 + variant === "unstyled" && style_default4["is-unstyled"],
11194 + className
11195 + ),
11196 + target: target ?? (openInNewTab ? "_blank" : void 0),
11197 + children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
11198 + children,
11199 + shouldShowNewTabIndicator && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
11200 + "span",
11201 + {
11202 + className: style_default4["link-icon"],
11203 + role: "img",
11204 + "aria-label": (
11205 + /* translators: accessibility text appended to link text */
11206 + (0, import_i18n3.__)("(opens in a new tab)")
11207 + )
11208 + }
11209 + )
11210 + ] })
11211 + })
11212 + });
11213 + return element;
11214 + });
11215 +
11216 + // packages/ui/build-module/icon/icon.mjs
11217 + var import_element20 = __toESM(require_element(), 1);
11218 + var import_primitives19 = __toESM(require_primitives(), 1);
11219 + var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
11220 + var Icon = (0, import_element20.forwardRef)(function Icon2({ icon, size: size4 = 24, style, ...restProps }, ref) {
11221 + const mergedStyle = icon.props.style || style ? { ...icon.props.style, ...style } : void 0;
11222 + return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
11223 + import_primitives19.SVG,
11224 + {
11225 + ref,
11226 + ...icon.props,
11227 + ...restProps,
11228 + ...mergedStyle ? { style: mergedStyle } : {},
11229 + width: size4,
11230 + height: size4
11231 + }
11232 + );
11233 + });
11234 +
11235 + // packages/ui/build-module/utils/keyboard-shortcut.mjs
11236 + var import_element22 = __toESM(require_element(), 1);
11237 + var import_i18n4 = __toESM(require_i18n(), 1);
11238 +
1626 11239 // packages/ui/build-module/visually-hidden/visually-hidden.mjs
1627 - var import_element3 = __toESM(require_element(), 1);
1628 - if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='c46e8cb841']")) {
1629 - const style = document.createElement("style");
1630 - style.setAttribute("data-wp-hash", "c46e8cb841");
1631 - style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{.f37b9e2e191ebd66__visually-hidden{word-wrap:normal;border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-break:normal}}"));
1632 - document.head.appendChild(style);
11240 + var import_element21 = __toESM(require_element(), 1);
11241 + var STYLE_HASH_ATTRIBUTE6 = "data-wp-hash";
11242 + function getRuntime6() {
11243 + const globalScope = globalThis;
11244 + if (globalScope.__wpStyleRuntime) {
11245 + return globalScope.__wpStyleRuntime;
11246 + }
11247 + globalScope.__wpStyleRuntime = {
11248 + documents: /* @__PURE__ */ new Map(),
11249 + styles: /* @__PURE__ */ new Map(),
11250 + injectedStyles: /* @__PURE__ */ new WeakMap()
11251 + };
11252 + if (typeof document !== "undefined") {
11253 + registerDocument6(document);
11254 + }
11255 + return globalScope.__wpStyleRuntime;
1633 11256 }
1634 - var style_default = { "visually-hidden": "f37b9e2e191ebd66__visually-hidden" };
1635 - var VisuallyHidden = (0, import_element3.forwardRef)(
11257 + function documentContainsStyleHash6(targetDocument, hash) {
11258 + if (!targetDocument.head) {
11259 + return false;
11260 + }
11261 + for (const style of targetDocument.head.querySelectorAll(
11262 + `style[${STYLE_HASH_ATTRIBUTE6}]`
11263 + )) {
11264 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE6) === hash) {
11265 + return true;
11266 + }
11267 + }
11268 + return false;
11269 + }
11270 + function injectStyle6(targetDocument, hash, css) {
11271 + if (!targetDocument.head) {
11272 + return;
11273 + }
11274 + const runtime = getRuntime6();
11275 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
11276 + if (!injectedStyles) {
11277 + injectedStyles = /* @__PURE__ */ new Set();
11278 + runtime.injectedStyles.set(targetDocument, injectedStyles);
11279 + }
11280 + if (injectedStyles.has(hash)) {
11281 + return;
11282 + }
11283 + if (documentContainsStyleHash6(targetDocument, hash)) {
11284 + injectedStyles.add(hash);
11285 + return;
11286 + }
11287 + const style = targetDocument.createElement("style");
11288 + style.setAttribute(STYLE_HASH_ATTRIBUTE6, hash);
11289 + style.appendChild(targetDocument.createTextNode(css));
11290 + targetDocument.head.appendChild(style);
11291 + injectedStyles.add(hash);
11292 + }
11293 + function registerDocument6(targetDocument) {
11294 + const runtime = getRuntime6();
11295 + runtime.documents.set(
11296 + targetDocument,
11297 + (runtime.documents.get(targetDocument) ?? 0) + 1
11298 + );
11299 + for (const [hash, css] of runtime.styles) {
11300 + injectStyle6(targetDocument, hash, css);
11301 + }
11302 + return () => {
11303 + const count = runtime.documents.get(targetDocument);
11304 + if (count === void 0) {
11305 + return;
11306 + }
11307 + if (count <= 1) {
11308 + runtime.documents.delete(targetDocument);
11309 + return;
11310 + }
11311 + runtime.documents.set(targetDocument, count - 1);
11312 + };
11313 + }
11314 + function registerStyle6(hash, css) {
11315 + const runtime = getRuntime6();
11316 + runtime.styles.set(hash, css);
11317 + for (const targetDocument of runtime.documents.keys()) {
11318 + injectStyle6(targetDocument, hash, css);
11319 + }
11320 + }
11321 + if (typeof process === "undefined" || true) {
11322 + registerStyle6("f4df7461e9", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.f37b9e2e191ebd66__visually-hidden{border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal;padding:0;position:absolute;width:1px;word-break:normal}}}");
11323 + }
11324 + var style_default5 = { "visually-hidden": "f37b9e2e191ebd66__visually-hidden" };
11325 + var VisuallyHidden = (0, import_element21.forwardRef)(
1636 11326 function VisuallyHidden2({ render, ...restProps }, ref) {
1637 11327 const element = useRender({
1638 11328 render,
1639 11329 ref,
1640 11330 props: mergeProps(
1641 - { className: style_default["visually-hidden"] },
11331 + { className: style_default5["visually-hidden"] },
1642 11332 restProps,
1643 11333 {
1644 11334 // @ts-expect-error Arbitrary data-* attributes aren't indexable on the typed div props. Kept hardcoded so consumers can't change or remove it.
1645 11335 "data-visually-hidden": ""
@@ -1649,14 +11339,2288 @@
1649 11339 return element;
1650 11340 }
1651 11341 );
1652 11342
11343 + // packages/ui/build-module/utils/keyboard-shortcut.mjs
11344 + var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
11345 + function useKeyboardShortcutProps({
11346 + "aria-describedby": ariaDescribedBy,
11347 + "aria-keyshortcuts": ariaKeyShortcuts,
11348 + shortcut
11349 + }) {
11350 + const generatedDescriptionId = (0, import_element22.useId)();
11351 + const descriptionId = shortcut ? generatedDescriptionId : void 0;
11352 + const describedBy = [ariaDescribedBy, descriptionId].filter(Boolean).join(" ");
11353 + return {
11354 + descriptionId,
11355 + targetProps: {
11356 + "aria-describedby": describedBy || void 0,
11357 + "aria-keyshortcuts": shortcut?.ariaKeyShortcut ?? ariaKeyShortcuts
11358 + }
11359 + };
11360 + }
11361 + var KeyboardShortcutDescription = (0, import_element22.forwardRef)(function KeyboardShortcutDescription2({ descriptionId, shortcut }, ref) {
11362 + return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
11363 + VisuallyHidden,
11364 + {
11365 + id: descriptionId,
11366 + "aria-hidden": "true",
11367 + render: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { ref }),
11368 + children: (0, import_i18n4.sprintf)(
11369 + /* translators: %s: keyboard shortcut. */
11370 + (0, import_i18n4.__)("Keyboard shortcut: %s"),
11371 + shortcut.label ?? shortcut.ariaKeyShortcut
11372 + )
11373 + }
11374 + );
11375 + });
11376 + var KeyboardShortcutDisplay = (0, import_element22.forwardRef)(function KeyboardShortcutDisplay2({ className, shortcut }, ref) {
11377 + return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { ref, "aria-hidden": "true", className, dir: "ltr", children: shortcut.displayShortcut });
11378 + });
11379 +
11380 + // packages/ui/build-module/button/button.mjs
11381 + var import_a11y = __toESM(require_a11y(), 1);
11382 + var import_element23 = __toESM(require_element(), 1);
11383 + var import_i18n5 = __toESM(require_i18n(), 1);
11384 + var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
11385 + var STYLE_HASH_ATTRIBUTE7 = "data-wp-hash";
11386 + function getRuntime7() {
11387 + const globalScope = globalThis;
11388 + if (globalScope.__wpStyleRuntime) {
11389 + return globalScope.__wpStyleRuntime;
11390 + }
11391 + globalScope.__wpStyleRuntime = {
11392 + documents: /* @__PURE__ */ new Map(),
11393 + styles: /* @__PURE__ */ new Map(),
11394 + injectedStyles: /* @__PURE__ */ new WeakMap()
11395 + };
11396 + if (typeof document !== "undefined") {
11397 + registerDocument7(document);
11398 + }
11399 + return globalScope.__wpStyleRuntime;
11400 + }
11401 + function documentContainsStyleHash7(targetDocument, hash) {
11402 + if (!targetDocument.head) {
11403 + return false;
11404 + }
11405 + for (const style of targetDocument.head.querySelectorAll(
11406 + `style[${STYLE_HASH_ATTRIBUTE7}]`
11407 + )) {
11408 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE7) === hash) {
11409 + return true;
11410 + }
11411 + }
11412 + return false;
11413 + }
11414 + function injectStyle7(targetDocument, hash, css) {
11415 + if (!targetDocument.head) {
11416 + return;
11417 + }
11418 + const runtime = getRuntime7();
11419 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
11420 + if (!injectedStyles) {
11421 + injectedStyles = /* @__PURE__ */ new Set();
11422 + runtime.injectedStyles.set(targetDocument, injectedStyles);
11423 + }
11424 + if (injectedStyles.has(hash)) {
11425 + return;
11426 + }
11427 + if (documentContainsStyleHash7(targetDocument, hash)) {
11428 + injectedStyles.add(hash);
11429 + return;
11430 + }
11431 + const style = targetDocument.createElement("style");
11432 + style.setAttribute(STYLE_HASH_ATTRIBUTE7, hash);
11433 + style.appendChild(targetDocument.createTextNode(css));
11434 + targetDocument.head.appendChild(style);
11435 + injectedStyles.add(hash);
11436 + }
11437 + function registerDocument7(targetDocument) {
11438 + const runtime = getRuntime7();
11439 + runtime.documents.set(
11440 + targetDocument,
11441 + (runtime.documents.get(targetDocument) ?? 0) + 1
11442 + );
11443 + for (const [hash, css] of runtime.styles) {
11444 + injectStyle7(targetDocument, hash, css);
11445 + }
11446 + return () => {
11447 + const count = runtime.documents.get(targetDocument);
11448 + if (count === void 0) {
11449 + return;
11450 + }
11451 + if (count <= 1) {
11452 + runtime.documents.delete(targetDocument);
11453 + return;
11454 + }
11455 + runtime.documents.set(targetDocument, count - 1);
11456 + };
11457 + }
11458 + function registerStyle7(hash, css) {
11459 + const runtime = getRuntime7();
11460 + runtime.styles.set(hash, css);
11461 + for (const targetDocument of runtime.documents.keys()) {
11462 + injectStyle7(targetDocument, hash, css);
11463 + }
11464 + }
11465 + if (typeof process === "undefined" || true) {
11466 + registerStyle7("effc4e3032", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._97b0fc33c028be1a__button,.abbb272e2ce49bd6__is-unstyled{appearance:none;padding:0}._97b0fc33c028be1a__button{--wp-ui-button-font-weight:var(--wpds-typography-font-weight-emphasis,600);--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-strong,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand-strong,#fff);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-strong-disabled,#8d8d8d);--wp-ui-button-padding-block:var(--wpds-dimension-padding-xs,4px);--wp-ui-button-padding-inline:var(--wpds-dimension-padding-md,12px);--wp-ui-button-height:var(--wpds-dimension-size-lg,40px);--wp-ui-button-aspect-ratio:auto;--wp-ui-button-font-size:var(--wpds-typography-font-size-md,13px);--wp-ui-button-min-width:calc(4ch + var(--wp-ui-button-padding-inline)*2);--wp-ui-button-icon-margin:calc((var(--wpds-dimension-size-2xs, 16px) - var(--wpds-dimension-size-sm, 24px))/2);--wp-ui-button-border-color:var(--wp-ui-button-background-color);--wp-ui-button-border-color-active:var(--wp-ui-button-background-color-active);--wp-ui-button-border-color-disabled:var(--wp-ui-button-background-color-disabled);--_gcd-button-font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);--_gcd-button-font-size:var(--wp-ui-button-font-size);--_gcd-button-font-weight:var(--wp-ui-button-font-weight);align-items:center;aspect-ratio:var(--wp-ui-button-aspect-ratio);background-clip:border-box;background-color:var(--wp-ui-button-background-color);border-color:var(--wp-ui-button-border-color);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:1px;color:var(--wp-ui-button-foreground-color);display:inline-flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wp-ui-button-font-size);font-weight:var(--wp-ui-button-font-weight);gap:var(--wpds-dimension-gap-sm,8px);justify-content:center;line-height:var(--wpds-typography-line-height-sm,20px);max-width:100%;min-height:var(--wp-ui-button-height);min-width:var(--wp-ui-button-min-width);overflow-wrap:anywhere;padding-block:var(--wp-ui-button-padding-block);padding-inline:var(--wp-ui-button-padding-inline);position:relative;text-align:center;text-decoration:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}@media not (prefers-reduced-motion){transition:color .1s ease-out;*{transition:opacity .1s ease-out}}&[href]{cursor:pointer}[href]{color:inherit;text-decoration:inherit}&:not([data-disabled]):is(:hover,:active,:focus){background-color:var(--wp-ui-button-background-color-active);border-color:var(--wp-ui-button-border-color-active);color:var(--wp-ui-button-foreground-color-active)}&[data-disabled]:not(._914b42f315c0e580__is-loading){background-color:var(--wp-ui-button-background-color-disabled);border-color:var(--wp-ui-button-border-color-disabled);color:var(--wp-ui-button-foreground-color-disabled);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText;color:GrayText}}&:before{aspect-ratio:1;border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid;border-block-end-color:transparent;border-block-start-color:var(--wp-ui-button-foreground-color);border-inline-end-color:var(--wp-ui-button-foreground-color);border-inline-start-color:transparent;border-radius:50%;box-sizing:border-box;content:"";display:block;height:var(--wp-ui-button-font-size);left:50%;opacity:0;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);@media not (prefers-reduced-motion){transition:opacity .1s ease-out}@media (forced-colors:active){border-block-end-style:none;border-bottom-color:ButtonText;border-inline-start-style:none;border-left-color:ButtonText;border-right-color:ButtonText;border-top-color:ButtonText}}}._908205475f9f2a92__is-small{--wp-ui-button-padding-block:0px;--wp-ui-button-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-button-height:var(--wpds-dimension-size-sm,24px)}._9f6fc6553aeb36fe__icon{margin:var(--wp-ui-button-icon-margin)}.dd460c965226cc77__is-brand{&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 85%,#000));--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-brand-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000)}}.e722a8f96726aa99__is-neutral{&.ad0619a3217c6a5b__is-minimal[aria-pressed=true],&.b50b3358c5fb4d0b__is-solid{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-strong,#2d2d2d);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-strong-active,#1e1e1e);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral-strong,#f0f0f0);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-strong-active,#f0f0f0);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-strong-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e);--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-neutral-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000)}}.abbb272e2ce49bd6__is-unstyled{background:none;border:none;min-width:unset}.cf59cf1b69629838__is-compact{--wp-ui-button-height:var(--wpds-dimension-size-md,32px)}._914b42f315c0e580__is-loading:not(.abbb272e2ce49bd6__is-unstyled){color:transparent;&:not([data-disabled]):is(:hover,:active,:focus){color:transparent}@media (forced-colors:active){color:ButtonFace}*{opacity:0}&:before{opacity:1;transition-delay:.05s;@media not (prefers-reduced-motion){animation:_5a1d53da6f830c8d__loading-animation 1s linear infinite}}}}@keyframes _5a1d53da6f830c8d__loading-animation{0%{transform:translate(-50%,-50%) rotate(0deg)}to{transform:translate(-50%,-50%) rotate(1turn)}}}');
11467 + }
11468 + var style_default6 = { "button": "_97b0fc33c028be1a__button", "is-unstyled": "abbb272e2ce49bd6__is-unstyled", "is-loading": "_914b42f315c0e580__is-loading", "is-small": "_908205475f9f2a92__is-small", "icon": "_9f6fc6553aeb36fe__icon", "is-brand": "dd460c965226cc77__is-brand", "is-outline": "_62d5a778b7b258ee__is-outline", "is-minimal": "ad0619a3217c6a5b__is-minimal", "is-neutral": "e722a8f96726aa99__is-neutral", "is-solid": "b50b3358c5fb4d0b__is-solid", "is-compact": "cf59cf1b69629838__is-compact", "loading-animation": "_5a1d53da6f830c8d__loading-animation" };
11469 + if (typeof process === "undefined" || true) {
11470 + registerStyle7("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
11471 + }
11472 + var resets_default3 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
11473 + if (typeof process === "undefined" || true) {
11474 + registerStyle7("08122b3d53", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.af79fb116edb0dd7__outset-ring--focus:focus,.dfcfdc28396e5d98__outset-ring--focus-visible:focus-visible,.e5cd9ee879f6403a__outset-ring--focus-within:focus-within,:focus-visible ._81935a08e952f267__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within,.abc777e9713fa711__outset-ring--focus-except-active:focus{outline:none}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.abc777e9713fa711__outset-ring--focus-except-active:focus:not(:active){--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");
11475 + }
11476 + var focus_module_default2 = { "outset-ring--focus": "af79fb116edb0dd7__outset-ring--focus", "outset-ring--focus-visible": "dfcfdc28396e5d98__outset-ring--focus-visible", "outset-ring--focus-within": "e5cd9ee879f6403a__outset-ring--focus-within", "outset-ring--focus-parent-visible": "_81935a08e952f267__outset-ring--focus-parent-visible", "outset-ring--focus-except-active": "abc777e9713fa711__outset-ring--focus-except-active", "outset-ring--focus-within-except-active": "_3c9f5ee9fc9c136d__outset-ring--focus-within-except-active" };
11477 + if (typeof process === "undefined" || true) {
11478 + registerStyle7("e8e31009f5", "._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");
11479 + }
11480 + var global_css_defense_default3 = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a", "ol": "c59a0ebebd71fa4a__ol", "li": "_46b5cb0c8e24e8c9__li" };
11481 + var Button5 = (0, import_element23.forwardRef)(
11482 + function Button22({
11483 + tone = "brand",
11484 + variant = "solid",
11485 + size: size4 = "default",
11486 + className,
11487 + focusableWhenDisabled = true,
11488 + disabled: disabled2,
11489 + loading,
11490 + loadingAnnouncement = (0, import_i18n5.__)("Loading"),
11491 + children,
11492 + ...props
11493 + }, ref) {
11494 + const mergedClassName = clsx_default(
11495 + global_css_defense_default3.button,
11496 + resets_default3["box-sizing"],
11497 + focus_module_default2["outset-ring--focus-except-active"],
11498 + variant !== "unstyled" && style_default6.button,
11499 + style_default6[`is-${tone}`],
11500 + style_default6[`is-${variant}`],
11501 + style_default6[`is-${size4}`],
11502 + loading && style_default6["is-loading"],
11503 + className
11504 + );
11505 + (0, import_element23.useEffect)(() => {
11506 + if (loading && loadingAnnouncement) {
11507 + (0, import_a11y.speak)(loadingAnnouncement);
11508 + }
11509 + }, [loading, loadingAnnouncement]);
11510 + return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
11511 + Button3,
11512 + {
11513 + ref,
11514 + className: mergedClassName,
11515 + focusableWhenDisabled,
11516 + disabled: disabled2 ?? loading,
11517 + ...props,
11518 + children
11519 + }
11520 + );
11521 + }
11522 + );
11523 +
11524 + // packages/ui/build-module/button/icon.mjs
11525 + var import_element24 = __toESM(require_element(), 1);
11526 + var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
11527 + var STYLE_HASH_ATTRIBUTE8 = "data-wp-hash";
11528 + function getRuntime8() {
11529 + const globalScope = globalThis;
11530 + if (globalScope.__wpStyleRuntime) {
11531 + return globalScope.__wpStyleRuntime;
11532 + }
11533 + globalScope.__wpStyleRuntime = {
11534 + documents: /* @__PURE__ */ new Map(),
11535 + styles: /* @__PURE__ */ new Map(),
11536 + injectedStyles: /* @__PURE__ */ new WeakMap()
11537 + };
11538 + if (typeof document !== "undefined") {
11539 + registerDocument8(document);
11540 + }
11541 + return globalScope.__wpStyleRuntime;
11542 + }
11543 + function documentContainsStyleHash8(targetDocument, hash) {
11544 + if (!targetDocument.head) {
11545 + return false;
11546 + }
11547 + for (const style of targetDocument.head.querySelectorAll(
11548 + `style[${STYLE_HASH_ATTRIBUTE8}]`
11549 + )) {
11550 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE8) === hash) {
11551 + return true;
11552 + }
11553 + }
11554 + return false;
11555 + }
11556 + function injectStyle8(targetDocument, hash, css) {
11557 + if (!targetDocument.head) {
11558 + return;
11559 + }
11560 + const runtime = getRuntime8();
11561 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
11562 + if (!injectedStyles) {
11563 + injectedStyles = /* @__PURE__ */ new Set();
11564 + runtime.injectedStyles.set(targetDocument, injectedStyles);
11565 + }
11566 + if (injectedStyles.has(hash)) {
11567 + return;
11568 + }
11569 + if (documentContainsStyleHash8(targetDocument, hash)) {
11570 + injectedStyles.add(hash);
11571 + return;
11572 + }
11573 + const style = targetDocument.createElement("style");
11574 + style.setAttribute(STYLE_HASH_ATTRIBUTE8, hash);
11575 + style.appendChild(targetDocument.createTextNode(css));
11576 + targetDocument.head.appendChild(style);
11577 + injectedStyles.add(hash);
11578 + }
11579 + function registerDocument8(targetDocument) {
11580 + const runtime = getRuntime8();
11581 + runtime.documents.set(
11582 + targetDocument,
11583 + (runtime.documents.get(targetDocument) ?? 0) + 1
11584 + );
11585 + for (const [hash, css] of runtime.styles) {
11586 + injectStyle8(targetDocument, hash, css);
11587 + }
11588 + return () => {
11589 + const count = runtime.documents.get(targetDocument);
11590 + if (count === void 0) {
11591 + return;
11592 + }
11593 + if (count <= 1) {
11594 + runtime.documents.delete(targetDocument);
11595 + return;
11596 + }
11597 + runtime.documents.set(targetDocument, count - 1);
11598 + };
11599 + }
11600 + function registerStyle8(hash, css) {
11601 + const runtime = getRuntime8();
11602 + runtime.styles.set(hash, css);
11603 + for (const targetDocument of runtime.documents.keys()) {
11604 + injectStyle8(targetDocument, hash, css);
11605 + }
11606 + }
11607 + if (typeof process === "undefined" || true) {
11608 + registerStyle8("effc4e3032", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._97b0fc33c028be1a__button,.abbb272e2ce49bd6__is-unstyled{appearance:none;padding:0}._97b0fc33c028be1a__button{--wp-ui-button-font-weight:var(--wpds-typography-font-weight-emphasis,600);--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-strong,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand-strong,#fff);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-strong-disabled,#8d8d8d);--wp-ui-button-padding-block:var(--wpds-dimension-padding-xs,4px);--wp-ui-button-padding-inline:var(--wpds-dimension-padding-md,12px);--wp-ui-button-height:var(--wpds-dimension-size-lg,40px);--wp-ui-button-aspect-ratio:auto;--wp-ui-button-font-size:var(--wpds-typography-font-size-md,13px);--wp-ui-button-min-width:calc(4ch + var(--wp-ui-button-padding-inline)*2);--wp-ui-button-icon-margin:calc((var(--wpds-dimension-size-2xs, 16px) - var(--wpds-dimension-size-sm, 24px))/2);--wp-ui-button-border-color:var(--wp-ui-button-background-color);--wp-ui-button-border-color-active:var(--wp-ui-button-background-color-active);--wp-ui-button-border-color-disabled:var(--wp-ui-button-background-color-disabled);--_gcd-button-font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);--_gcd-button-font-size:var(--wp-ui-button-font-size);--_gcd-button-font-weight:var(--wp-ui-button-font-weight);align-items:center;aspect-ratio:var(--wp-ui-button-aspect-ratio);background-clip:border-box;background-color:var(--wp-ui-button-background-color);border-color:var(--wp-ui-button-border-color);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:1px;color:var(--wp-ui-button-foreground-color);display:inline-flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wp-ui-button-font-size);font-weight:var(--wp-ui-button-font-weight);gap:var(--wpds-dimension-gap-sm,8px);justify-content:center;line-height:var(--wpds-typography-line-height-sm,20px);max-width:100%;min-height:var(--wp-ui-button-height);min-width:var(--wp-ui-button-min-width);overflow-wrap:anywhere;padding-block:var(--wp-ui-button-padding-block);padding-inline:var(--wp-ui-button-padding-inline);position:relative;text-align:center;text-decoration:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}@media not (prefers-reduced-motion){transition:color .1s ease-out;*{transition:opacity .1s ease-out}}&[href]{cursor:pointer}[href]{color:inherit;text-decoration:inherit}&:not([data-disabled]):is(:hover,:active,:focus){background-color:var(--wp-ui-button-background-color-active);border-color:var(--wp-ui-button-border-color-active);color:var(--wp-ui-button-foreground-color-active)}&[data-disabled]:not(._914b42f315c0e580__is-loading){background-color:var(--wp-ui-button-background-color-disabled);border-color:var(--wp-ui-button-border-color-disabled);color:var(--wp-ui-button-foreground-color-disabled);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText;color:GrayText}}&:before{aspect-ratio:1;border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid;border-block-end-color:transparent;border-block-start-color:var(--wp-ui-button-foreground-color);border-inline-end-color:var(--wp-ui-button-foreground-color);border-inline-start-color:transparent;border-radius:50%;box-sizing:border-box;content:"";display:block;height:var(--wp-ui-button-font-size);left:50%;opacity:0;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);@media not (prefers-reduced-motion){transition:opacity .1s ease-out}@media (forced-colors:active){border-block-end-style:none;border-bottom-color:ButtonText;border-inline-start-style:none;border-left-color:ButtonText;border-right-color:ButtonText;border-top-color:ButtonText}}}._908205475f9f2a92__is-small{--wp-ui-button-padding-block:0px;--wp-ui-button-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-button-height:var(--wpds-dimension-size-sm,24px)}._9f6fc6553aeb36fe__icon{margin:var(--wp-ui-button-icon-margin)}.dd460c965226cc77__is-brand{&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 85%,#000));--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-brand-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000)}}.e722a8f96726aa99__is-neutral{&.ad0619a3217c6a5b__is-minimal[aria-pressed=true],&.b50b3358c5fb4d0b__is-solid{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-strong,#2d2d2d);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-strong-active,#1e1e1e);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral-strong,#f0f0f0);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-strong-active,#f0f0f0);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-strong-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e);--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-neutral-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000)}}.abbb272e2ce49bd6__is-unstyled{background:none;border:none;min-width:unset}.cf59cf1b69629838__is-compact{--wp-ui-button-height:var(--wpds-dimension-size-md,32px)}._914b42f315c0e580__is-loading:not(.abbb272e2ce49bd6__is-unstyled){color:transparent;&:not([data-disabled]):is(:hover,:active,:focus){color:transparent}@media (forced-colors:active){color:ButtonFace}*{opacity:0}&:before{opacity:1;transition-delay:.05s;@media not (prefers-reduced-motion){animation:_5a1d53da6f830c8d__loading-animation 1s linear infinite}}}}@keyframes _5a1d53da6f830c8d__loading-animation{0%{transform:translate(-50%,-50%) rotate(0deg)}to{transform:translate(-50%,-50%) rotate(1turn)}}}');
11609 + }
11610 + var style_default7 = { "button": "_97b0fc33c028be1a__button", "is-unstyled": "abbb272e2ce49bd6__is-unstyled", "is-loading": "_914b42f315c0e580__is-loading", "is-small": "_908205475f9f2a92__is-small", "icon": "_9f6fc6553aeb36fe__icon", "is-brand": "dd460c965226cc77__is-brand", "is-outline": "_62d5a778b7b258ee__is-outline", "is-minimal": "ad0619a3217c6a5b__is-minimal", "is-neutral": "e722a8f96726aa99__is-neutral", "is-solid": "b50b3358c5fb4d0b__is-solid", "is-compact": "cf59cf1b69629838__is-compact", "loading-animation": "_5a1d53da6f830c8d__loading-animation" };
11611 + var ButtonIcon = (0, import_element24.forwardRef)(
11612 + function ButtonIcon2({ className, icon, ...props }, ref) {
11613 + return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
11614 + Icon,
11615 + {
11616 + ref,
11617 + icon,
11618 + className: clsx_default(style_default7.icon, className),
11619 + size: 24,
11620 + ...props
11621 + }
11622 + );
11623 + }
11624 + );
11625 +
11626 + // packages/ui/build-module/button/index.mjs
11627 + ButtonIcon.displayName = "Button.Icon";
11628 + var Button6 = Object.assign(Button5, {
11629 + /**
11630 + * An icon component specifically designed to work well when rendered inside
11631 + * a `Button` component.
11632 + */
11633 + Icon: ButtonIcon
11634 + });
11635 +
11636 + // packages/ui/build-module/icon-button/icon-button.mjs
11637 + var import_element25 = __toESM(require_element(), 1);
11638 + var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
11639 + var STYLE_HASH_ATTRIBUTE9 = "data-wp-hash";
11640 + function getRuntime9() {
11641 + const globalScope = globalThis;
11642 + if (globalScope.__wpStyleRuntime) {
11643 + return globalScope.__wpStyleRuntime;
11644 + }
11645 + globalScope.__wpStyleRuntime = {
11646 + documents: /* @__PURE__ */ new Map(),
11647 + styles: /* @__PURE__ */ new Map(),
11648 + injectedStyles: /* @__PURE__ */ new WeakMap()
11649 + };
11650 + if (typeof document !== "undefined") {
11651 + registerDocument9(document);
11652 + }
11653 + return globalScope.__wpStyleRuntime;
11654 + }
11655 + function documentContainsStyleHash9(targetDocument, hash) {
11656 + if (!targetDocument.head) {
11657 + return false;
11658 + }
11659 + for (const style of targetDocument.head.querySelectorAll(
11660 + `style[${STYLE_HASH_ATTRIBUTE9}]`
11661 + )) {
11662 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE9) === hash) {
11663 + return true;
11664 + }
11665 + }
11666 + return false;
11667 + }
11668 + function injectStyle9(targetDocument, hash, css) {
11669 + if (!targetDocument.head) {
11670 + return;
11671 + }
11672 + const runtime = getRuntime9();
11673 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
11674 + if (!injectedStyles) {
11675 + injectedStyles = /* @__PURE__ */ new Set();
11676 + runtime.injectedStyles.set(targetDocument, injectedStyles);
11677 + }
11678 + if (injectedStyles.has(hash)) {
11679 + return;
11680 + }
11681 + if (documentContainsStyleHash9(targetDocument, hash)) {
11682 + injectedStyles.add(hash);
11683 + return;
11684 + }
11685 + const style = targetDocument.createElement("style");
11686 + style.setAttribute(STYLE_HASH_ATTRIBUTE9, hash);
11687 + style.appendChild(targetDocument.createTextNode(css));
11688 + targetDocument.head.appendChild(style);
11689 + injectedStyles.add(hash);
11690 + }
11691 + function registerDocument9(targetDocument) {
11692 + const runtime = getRuntime9();
11693 + runtime.documents.set(
11694 + targetDocument,
11695 + (runtime.documents.get(targetDocument) ?? 0) + 1
11696 + );
11697 + for (const [hash, css] of runtime.styles) {
11698 + injectStyle9(targetDocument, hash, css);
11699 + }
11700 + return () => {
11701 + const count = runtime.documents.get(targetDocument);
11702 + if (count === void 0) {
11703 + return;
11704 + }
11705 + if (count <= 1) {
11706 + runtime.documents.delete(targetDocument);
11707 + return;
11708 + }
11709 + runtime.documents.set(targetDocument, count - 1);
11710 + };
11711 + }
11712 + function registerStyle9(hash, css) {
11713 + const runtime = getRuntime9();
11714 + runtime.styles.set(hash, css);
11715 + for (const targetDocument of runtime.documents.keys()) {
11716 + injectStyle9(targetDocument, hash, css);
11717 + }
11718 + }
11719 + if (typeof process === "undefined" || true) {
11720 + registerStyle9("c5cdafb1bc", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer compositions{._28cfdc260e755391__icon-button{--wp-ui-button-aspect-ratio:1;--wp-ui-button-padding-inline:0px;--wp-ui-button-min-width:unset}.f1c70d719989a85a__icon{margin:-1px}}}");
11721 + }
11722 + var style_default8 = { "icon-button": "_28cfdc260e755391__icon-button", "icon": "f1c70d719989a85a__icon" };
11723 + var IconButton = (0, import_element25.forwardRef)(
11724 + function IconButton2({
11725 + label,
11726 + className,
11727 + // Prevent accidental forwarding of `children`
11728 + children: _children,
11729 + disabled: disabled2,
11730 + focusableWhenDisabled = true,
11731 + icon,
11732 + size: size4,
11733 + shortcut,
11734 + positioner,
11735 + "aria-describedby": ariaDescribedBy,
11736 + "aria-keyshortcuts": ariaKeyShortcuts,
11737 + ...restProps
11738 + }, ref) {
11739 + const classes = clsx_default(style_default8["icon-button"], className);
11740 + const { descriptionId, targetProps } = useKeyboardShortcutProps({
11741 + "aria-describedby": ariaDescribedBy,
11742 + "aria-keyshortcuts": ariaKeyShortcuts,
11743 + shortcut
11744 + });
11745 + return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Root, { children: [
11746 + /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
11747 + Trigger,
11748 + {
11749 + ref,
11750 + ...targetProps,
11751 + disabled: disabled2 && !focusableWhenDisabled,
11752 + render: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11753 + Button6,
11754 + {
11755 + ...restProps,
11756 + size: size4,
11757 + "aria-label": label,
11758 + disabled: disabled2,
11759 + focusableWhenDisabled
11760 + }
11761 + ),
11762 + className: classes,
11763 + children: [
11764 + /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Icon, { icon, size: 24, className: style_default8.icon }),
11765 + shortcut && descriptionId && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11766 + KeyboardShortcutDescription,
11767 + {
11768 + descriptionId,
11769 + shortcut
11770 + }
11771 + )
11772 + ]
11773 + }
11774 + ),
11775 + /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Popup, { positioner, children: [
11776 + label,
11777 + shortcut && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
11778 + " ",
11779 + /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(KeyboardShortcutDisplay, { shortcut })
11780 + ] })
11781 + ] })
11782 + ] });
11783 + }
11784 + );
11785 +
11786 + // packages/ui/build-module/card/index.mjs
11787 + var card_exports = {};
11788 + __export(card_exports, {
11789 + Content: () => Content,
11790 + FullBleed: () => FullBleed,
11791 + Header: () => Header,
11792 + Root: () => Root2,
11793 + Title: () => Title
11794 + });
11795 +
11796 + // packages/ui/build-module/card/root.mjs
11797 + var import_element26 = __toESM(require_element(), 1);
11798 + var STYLE_HASH_ATTRIBUTE10 = "data-wp-hash";
11799 + function getRuntime10() {
11800 + const globalScope = globalThis;
11801 + if (globalScope.__wpStyleRuntime) {
11802 + return globalScope.__wpStyleRuntime;
11803 + }
11804 + globalScope.__wpStyleRuntime = {
11805 + documents: /* @__PURE__ */ new Map(),
11806 + styles: /* @__PURE__ */ new Map(),
11807 + injectedStyles: /* @__PURE__ */ new WeakMap()
11808 + };
11809 + if (typeof document !== "undefined") {
11810 + registerDocument10(document);
11811 + }
11812 + return globalScope.__wpStyleRuntime;
11813 + }
11814 + function documentContainsStyleHash10(targetDocument, hash) {
11815 + if (!targetDocument.head) {
11816 + return false;
11817 + }
11818 + for (const style of targetDocument.head.querySelectorAll(
11819 + `style[${STYLE_HASH_ATTRIBUTE10}]`
11820 + )) {
11821 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE10) === hash) {
11822 + return true;
11823 + }
11824 + }
11825 + return false;
11826 + }
11827 + function injectStyle10(targetDocument, hash, css) {
11828 + if (!targetDocument.head) {
11829 + return;
11830 + }
11831 + const runtime = getRuntime10();
11832 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
11833 + if (!injectedStyles) {
11834 + injectedStyles = /* @__PURE__ */ new Set();
11835 + runtime.injectedStyles.set(targetDocument, injectedStyles);
11836 + }
11837 + if (injectedStyles.has(hash)) {
11838 + return;
11839 + }
11840 + if (documentContainsStyleHash10(targetDocument, hash)) {
11841 + injectedStyles.add(hash);
11842 + return;
11843 + }
11844 + const style = targetDocument.createElement("style");
11845 + style.setAttribute(STYLE_HASH_ATTRIBUTE10, hash);
11846 + style.appendChild(targetDocument.createTextNode(css));
11847 + targetDocument.head.appendChild(style);
11848 + injectedStyles.add(hash);
11849 + }
11850 + function registerDocument10(targetDocument) {
11851 + const runtime = getRuntime10();
11852 + runtime.documents.set(
11853 + targetDocument,
11854 + (runtime.documents.get(targetDocument) ?? 0) + 1
11855 + );
11856 + for (const [hash, css] of runtime.styles) {
11857 + injectStyle10(targetDocument, hash, css);
11858 + }
11859 + return () => {
11860 + const count = runtime.documents.get(targetDocument);
11861 + if (count === void 0) {
11862 + return;
11863 + }
11864 + if (count <= 1) {
11865 + runtime.documents.delete(targetDocument);
11866 + return;
11867 + }
11868 + runtime.documents.set(targetDocument, count - 1);
11869 + };
11870 + }
11871 + function registerStyle10(hash, css) {
11872 + const runtime = getRuntime10();
11873 + runtime.styles.set(hash, css);
11874 + for (const targetDocument of runtime.documents.keys()) {
11875 + injectStyle10(targetDocument, hash, css);
11876 + }
11877 + }
11878 + if (typeof process === "undefined" || true) {
11879 + registerStyle10("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
11880 + }
11881 + var resets_default4 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
11882 + if (typeof process === "undefined" || true) {
11883 + registerStyle10("cb866dcef6", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._02872bf298eadc43__root>:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):first-child>.c1fa192587e1b4a6__fullbleed:first-child{margin-block-start:calc(var(--wp-ui-card-padding)*-1)}:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):last-child>.c1fa192587e1b4a6__fullbleed:last-child{margin-block-end:calc(var(--wp-ui-card-padding)*-1)}}}");
11884 + }
11885 + var style_default9 = { "root": "_02872bf298eadc43__root", "header": "bbccc92e6ba5662d__header", "content": "_5dffdaf2a6e669ac__content", "fullbleed": "c1fa192587e1b4a6__fullbleed" };
11886 + var Root2 = (0, import_element26.forwardRef)(function Card({ render, ...restProps }, ref) {
11887 + const mergedClassName = clsx_default(style_default9.root, resets_default4["box-sizing"]);
11888 + const element = useRender({
11889 + defaultTagName: "div",
11890 + render,
11891 + ref,
11892 + props: mergeProps({ className: mergedClassName }, restProps)
11893 + });
11894 + return element;
11895 + });
11896 +
11897 + // packages/ui/build-module/card/header.mjs
11898 + var import_element27 = __toESM(require_element(), 1);
11899 + var STYLE_HASH_ATTRIBUTE11 = "data-wp-hash";
11900 + function getRuntime11() {
11901 + const globalScope = globalThis;
11902 + if (globalScope.__wpStyleRuntime) {
11903 + return globalScope.__wpStyleRuntime;
11904 + }
11905 + globalScope.__wpStyleRuntime = {
11906 + documents: /* @__PURE__ */ new Map(),
11907 + styles: /* @__PURE__ */ new Map(),
11908 + injectedStyles: /* @__PURE__ */ new WeakMap()
11909 + };
11910 + if (typeof document !== "undefined") {
11911 + registerDocument11(document);
11912 + }
11913 + return globalScope.__wpStyleRuntime;
11914 + }
11915 + function documentContainsStyleHash11(targetDocument, hash) {
11916 + if (!targetDocument.head) {
11917 + return false;
11918 + }
11919 + for (const style of targetDocument.head.querySelectorAll(
11920 + `style[${STYLE_HASH_ATTRIBUTE11}]`
11921 + )) {
11922 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE11) === hash) {
11923 + return true;
11924 + }
11925 + }
11926 + return false;
11927 + }
11928 + function injectStyle11(targetDocument, hash, css) {
11929 + if (!targetDocument.head) {
11930 + return;
11931 + }
11932 + const runtime = getRuntime11();
11933 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
11934 + if (!injectedStyles) {
11935 + injectedStyles = /* @__PURE__ */ new Set();
11936 + runtime.injectedStyles.set(targetDocument, injectedStyles);
11937 + }
11938 + if (injectedStyles.has(hash)) {
11939 + return;
11940 + }
11941 + if (documentContainsStyleHash11(targetDocument, hash)) {
11942 + injectedStyles.add(hash);
11943 + return;
11944 + }
11945 + const style = targetDocument.createElement("style");
11946 + style.setAttribute(STYLE_HASH_ATTRIBUTE11, hash);
11947 + style.appendChild(targetDocument.createTextNode(css));
11948 + targetDocument.head.appendChild(style);
11949 + injectedStyles.add(hash);
11950 + }
11951 + function registerDocument11(targetDocument) {
11952 + const runtime = getRuntime11();
11953 + runtime.documents.set(
11954 + targetDocument,
11955 + (runtime.documents.get(targetDocument) ?? 0) + 1
11956 + );
11957 + for (const [hash, css] of runtime.styles) {
11958 + injectStyle11(targetDocument, hash, css);
11959 + }
11960 + return () => {
11961 + const count = runtime.documents.get(targetDocument);
11962 + if (count === void 0) {
11963 + return;
11964 + }
11965 + if (count <= 1) {
11966 + runtime.documents.delete(targetDocument);
11967 + return;
11968 + }
11969 + runtime.documents.set(targetDocument, count - 1);
11970 + };
11971 + }
11972 + function registerStyle11(hash, css) {
11973 + const runtime = getRuntime11();
11974 + runtime.styles.set(hash, css);
11975 + for (const targetDocument of runtime.documents.keys()) {
11976 + injectStyle11(targetDocument, hash, css);
11977 + }
11978 + }
11979 + if (typeof process === "undefined" || true) {
11980 + registerStyle11("cb866dcef6", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._02872bf298eadc43__root>:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):first-child>.c1fa192587e1b4a6__fullbleed:first-child{margin-block-start:calc(var(--wp-ui-card-padding)*-1)}:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):last-child>.c1fa192587e1b4a6__fullbleed:last-child{margin-block-end:calc(var(--wp-ui-card-padding)*-1)}}}");
11981 + }
11982 + var style_default10 = { "root": "_02872bf298eadc43__root", "header": "bbccc92e6ba5662d__header", "content": "_5dffdaf2a6e669ac__content", "fullbleed": "c1fa192587e1b4a6__fullbleed" };
11983 + var Header = (0, import_element27.forwardRef)(
11984 + function CardHeader({ render, ...props }, ref) {
11985 + const element = useRender({
11986 + defaultTagName: "div",
11987 + render,
11988 + ref,
11989 + props: mergeProps({ className: style_default10.header }, props)
11990 + });
11991 + return element;
11992 + }
11993 + );
11994 +
11995 + // packages/ui/build-module/card/content.mjs
11996 + var import_element28 = __toESM(require_element(), 1);
11997 + var STYLE_HASH_ATTRIBUTE12 = "data-wp-hash";
11998 + function getRuntime12() {
11999 + const globalScope = globalThis;
12000 + if (globalScope.__wpStyleRuntime) {
12001 + return globalScope.__wpStyleRuntime;
12002 + }
12003 + globalScope.__wpStyleRuntime = {
12004 + documents: /* @__PURE__ */ new Map(),
12005 + styles: /* @__PURE__ */ new Map(),
12006 + injectedStyles: /* @__PURE__ */ new WeakMap()
12007 + };
12008 + if (typeof document !== "undefined") {
12009 + registerDocument12(document);
12010 + }
12011 + return globalScope.__wpStyleRuntime;
12012 + }
12013 + function documentContainsStyleHash12(targetDocument, hash) {
12014 + if (!targetDocument.head) {
12015 + return false;
12016 + }
12017 + for (const style of targetDocument.head.querySelectorAll(
12018 + `style[${STYLE_HASH_ATTRIBUTE12}]`
12019 + )) {
12020 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE12) === hash) {
12021 + return true;
12022 + }
12023 + }
12024 + return false;
12025 + }
12026 + function injectStyle12(targetDocument, hash, css) {
12027 + if (!targetDocument.head) {
12028 + return;
12029 + }
12030 + const runtime = getRuntime12();
12031 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
12032 + if (!injectedStyles) {
12033 + injectedStyles = /* @__PURE__ */ new Set();
12034 + runtime.injectedStyles.set(targetDocument, injectedStyles);
12035 + }
12036 + if (injectedStyles.has(hash)) {
12037 + return;
12038 + }
12039 + if (documentContainsStyleHash12(targetDocument, hash)) {
12040 + injectedStyles.add(hash);
12041 + return;
12042 + }
12043 + const style = targetDocument.createElement("style");
12044 + style.setAttribute(STYLE_HASH_ATTRIBUTE12, hash);
12045 + style.appendChild(targetDocument.createTextNode(css));
12046 + targetDocument.head.appendChild(style);
12047 + injectedStyles.add(hash);
12048 + }
12049 + function registerDocument12(targetDocument) {
12050 + const runtime = getRuntime12();
12051 + runtime.documents.set(
12052 + targetDocument,
12053 + (runtime.documents.get(targetDocument) ?? 0) + 1
12054 + );
12055 + for (const [hash, css] of runtime.styles) {
12056 + injectStyle12(targetDocument, hash, css);
12057 + }
12058 + return () => {
12059 + const count = runtime.documents.get(targetDocument);
12060 + if (count === void 0) {
12061 + return;
12062 + }
12063 + if (count <= 1) {
12064 + runtime.documents.delete(targetDocument);
12065 + return;
12066 + }
12067 + runtime.documents.set(targetDocument, count - 1);
12068 + };
12069 + }
12070 + function registerStyle12(hash, css) {
12071 + const runtime = getRuntime12();
12072 + runtime.styles.set(hash, css);
12073 + for (const targetDocument of runtime.documents.keys()) {
12074 + injectStyle12(targetDocument, hash, css);
12075 + }
12076 + }
12077 + if (typeof process === "undefined" || true) {
12078 + registerStyle12("cb866dcef6", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._02872bf298eadc43__root>:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):first-child>.c1fa192587e1b4a6__fullbleed:first-child{margin-block-start:calc(var(--wp-ui-card-padding)*-1)}:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):last-child>.c1fa192587e1b4a6__fullbleed:last-child{margin-block-end:calc(var(--wp-ui-card-padding)*-1)}}}");
12079 + }
12080 + var style_default11 = { "root": "_02872bf298eadc43__root", "header": "bbccc92e6ba5662d__header", "content": "_5dffdaf2a6e669ac__content", "fullbleed": "c1fa192587e1b4a6__fullbleed" };
12081 + var Content = (0, import_element28.forwardRef)(
12082 + function CardContent({ render, ...props }, ref) {
12083 + const element = useRender({
12084 + defaultTagName: "div",
12085 + render,
12086 + ref,
12087 + props: mergeProps({ className: style_default11.content }, props)
12088 + });
12089 + return element;
12090 + }
12091 + );
12092 +
12093 + // packages/ui/build-module/card/full-bleed.mjs
12094 + var import_element29 = __toESM(require_element(), 1);
12095 + var STYLE_HASH_ATTRIBUTE13 = "data-wp-hash";
12096 + function getRuntime13() {
12097 + const globalScope = globalThis;
12098 + if (globalScope.__wpStyleRuntime) {
12099 + return globalScope.__wpStyleRuntime;
12100 + }
12101 + globalScope.__wpStyleRuntime = {
12102 + documents: /* @__PURE__ */ new Map(),
12103 + styles: /* @__PURE__ */ new Map(),
12104 + injectedStyles: /* @__PURE__ */ new WeakMap()
12105 + };
12106 + if (typeof document !== "undefined") {
12107 + registerDocument13(document);
12108 + }
12109 + return globalScope.__wpStyleRuntime;
12110 + }
12111 + function documentContainsStyleHash13(targetDocument, hash) {
12112 + if (!targetDocument.head) {
12113 + return false;
12114 + }
12115 + for (const style of targetDocument.head.querySelectorAll(
12116 + `style[${STYLE_HASH_ATTRIBUTE13}]`
12117 + )) {
12118 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE13) === hash) {
12119 + return true;
12120 + }
12121 + }
12122 + return false;
12123 + }
12124 + function injectStyle13(targetDocument, hash, css) {
12125 + if (!targetDocument.head) {
12126 + return;
12127 + }
12128 + const runtime = getRuntime13();
12129 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
12130 + if (!injectedStyles) {
12131 + injectedStyles = /* @__PURE__ */ new Set();
12132 + runtime.injectedStyles.set(targetDocument, injectedStyles);
12133 + }
12134 + if (injectedStyles.has(hash)) {
12135 + return;
12136 + }
12137 + if (documentContainsStyleHash13(targetDocument, hash)) {
12138 + injectedStyles.add(hash);
12139 + return;
12140 + }
12141 + const style = targetDocument.createElement("style");
12142 + style.setAttribute(STYLE_HASH_ATTRIBUTE13, hash);
12143 + style.appendChild(targetDocument.createTextNode(css));
12144 + targetDocument.head.appendChild(style);
12145 + injectedStyles.add(hash);
12146 + }
12147 + function registerDocument13(targetDocument) {
12148 + const runtime = getRuntime13();
12149 + runtime.documents.set(
12150 + targetDocument,
12151 + (runtime.documents.get(targetDocument) ?? 0) + 1
12152 + );
12153 + for (const [hash, css] of runtime.styles) {
12154 + injectStyle13(targetDocument, hash, css);
12155 + }
12156 + return () => {
12157 + const count = runtime.documents.get(targetDocument);
12158 + if (count === void 0) {
12159 + return;
12160 + }
12161 + if (count <= 1) {
12162 + runtime.documents.delete(targetDocument);
12163 + return;
12164 + }
12165 + runtime.documents.set(targetDocument, count - 1);
12166 + };
12167 + }
12168 + function registerStyle13(hash, css) {
12169 + const runtime = getRuntime13();
12170 + runtime.styles.set(hash, css);
12171 + for (const targetDocument of runtime.documents.keys()) {
12172 + injectStyle13(targetDocument, hash, css);
12173 + }
12174 + }
12175 + if (typeof process === "undefined" || true) {
12176 + registerStyle13("cb866dcef6", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._02872bf298eadc43__root>:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):first-child>.c1fa192587e1b4a6__fullbleed:first-child{margin-block-start:calc(var(--wp-ui-card-padding)*-1)}:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):last-child>.c1fa192587e1b4a6__fullbleed:last-child{margin-block-end:calc(var(--wp-ui-card-padding)*-1)}}}");
12177 + }
12178 + var style_default12 = { "root": "_02872bf298eadc43__root", "header": "bbccc92e6ba5662d__header", "content": "_5dffdaf2a6e669ac__content", "fullbleed": "c1fa192587e1b4a6__fullbleed" };
12179 + var FullBleed = (0, import_element29.forwardRef)(
12180 + function CardFullBleed({ render, ...props }, ref) {
12181 + const element = useRender({
12182 + defaultTagName: "div",
12183 + render,
12184 + ref,
12185 + props: mergeProps(
12186 + { className: style_default12.fullbleed },
12187 + props
12188 + )
12189 + });
12190 + return element;
12191 + }
12192 + );
12193 +
12194 + // packages/ui/build-module/card/title.mjs
12195 + var import_element30 = __toESM(require_element(), 1);
12196 + var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
12197 + var DEFAULT_TAG = /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", {});
12198 + var Title = (0, import_element30.forwardRef)(
12199 + function CardTitle({ render = DEFAULT_TAG, children, ...props }, ref) {
12200 + return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
12201 + Text,
12202 + {
12203 + ref,
12204 + variant: "heading-lg",
12205 + render,
12206 + ...props,
12207 + children
12208 + }
12209 + );
12210 + }
12211 + );
12212 +
12213 + // packages/ui/build-module/collapsible/panel.mjs
12214 + var import_element31 = __toESM(require_element(), 1);
12215 + var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
12216 + var Panel2 = (0, import_element31.forwardRef)(
12217 + function CollapsiblePanel3(props, forwardedRef) {
12218 + return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(index_parts_exports.Panel, { ref: forwardedRef, ...props });
12219 + }
12220 + );
12221 +
12222 + // packages/ui/build-module/collapsible/root.mjs
12223 + var import_element32 = __toESM(require_element(), 1);
12224 + var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
12225 + var Root3 = (0, import_element32.forwardRef)(
12226 + function CollapsibleRoot3(props, forwardedRef) {
12227 + return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(index_parts_exports.Root, { ref: forwardedRef, ...props });
12228 + }
12229 + );
12230 +
12231 + // packages/ui/build-module/collapsible/trigger.mjs
12232 + var import_element33 = __toESM(require_element(), 1);
12233 + var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1);
12234 + var Trigger2 = (0, import_element33.forwardRef)(
12235 + function CollapsibleTrigger3(props, forwardedRef) {
12236 + return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(index_parts_exports.Trigger, { ref: forwardedRef, ...props });
12237 + }
12238 + );
12239 +
12240 + // packages/ui/build-module/collapsible-card/index.mjs
12241 + var collapsible_card_exports = {};
12242 + __export(collapsible_card_exports, {
12243 + Content: () => Content2,
12244 + Header: () => Header2,
12245 + HeaderDescription: () => HeaderDescription,
12246 + Root: () => Root32
12247 + });
12248 +
12249 + // packages/ui/build-module/collapsible-card/root.mjs
12250 + var import_element34 = __toESM(require_element(), 1);
12251 + var import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1);
12252 + var Root32 = (0, import_element34.forwardRef)(
12253 + function CollapsibleCardRoot({ render, ...restProps }, ref) {
12254 + return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
12255 + Root3,
12256 + {
12257 + ref,
12258 + render: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Root2, { render }),
12259 + ...restProps
12260 + }
12261 + );
12262 + }
12263 + );
12264 +
12265 + // packages/ui/build-module/collapsible-card/header.mjs
12266 + var import_compose3 = __toESM(require_compose(), 1);
12267 + var import_element36 = __toESM(require_element(), 1);
12268 +
12269 + // packages/ui/build-module/collapsible-card/context.mjs
12270 + var import_element35 = __toESM(require_element(), 1);
12271 + var HeaderDescriptionIdContext = (0, import_element35.createContext)(null);
12272 +
12273 + // packages/ui/build-module/collapsible-card/header.mjs
12274 + var import_jsx_runtime54 = __toESM(require_jsx_runtime(), 1);
12275 + var STYLE_HASH_ATTRIBUTE14 = "data-wp-hash";
12276 + function getRuntime14() {
12277 + const globalScope = globalThis;
12278 + if (globalScope.__wpStyleRuntime) {
12279 + return globalScope.__wpStyleRuntime;
12280 + }
12281 + globalScope.__wpStyleRuntime = {
12282 + documents: /* @__PURE__ */ new Map(),
12283 + styles: /* @__PURE__ */ new Map(),
12284 + injectedStyles: /* @__PURE__ */ new WeakMap()
12285 + };
12286 + if (typeof document !== "undefined") {
12287 + registerDocument14(document);
12288 + }
12289 + return globalScope.__wpStyleRuntime;
12290 + }
12291 + function documentContainsStyleHash14(targetDocument, hash) {
12292 + if (!targetDocument.head) {
12293 + return false;
12294 + }
12295 + for (const style of targetDocument.head.querySelectorAll(
12296 + `style[${STYLE_HASH_ATTRIBUTE14}]`
12297 + )) {
12298 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE14) === hash) {
12299 + return true;
12300 + }
12301 + }
12302 + return false;
12303 + }
12304 + function injectStyle14(targetDocument, hash, css) {
12305 + if (!targetDocument.head) {
12306 + return;
12307 + }
12308 + const runtime = getRuntime14();
12309 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
12310 + if (!injectedStyles) {
12311 + injectedStyles = /* @__PURE__ */ new Set();
12312 + runtime.injectedStyles.set(targetDocument, injectedStyles);
12313 + }
12314 + if (injectedStyles.has(hash)) {
12315 + return;
12316 + }
12317 + if (documentContainsStyleHash14(targetDocument, hash)) {
12318 + injectedStyles.add(hash);
12319 + return;
12320 + }
12321 + const style = targetDocument.createElement("style");
12322 + style.setAttribute(STYLE_HASH_ATTRIBUTE14, hash);
12323 + style.appendChild(targetDocument.createTextNode(css));
12324 + targetDocument.head.appendChild(style);
12325 + injectedStyles.add(hash);
12326 + }
12327 + function registerDocument14(targetDocument) {
12328 + const runtime = getRuntime14();
12329 + runtime.documents.set(
12330 + targetDocument,
12331 + (runtime.documents.get(targetDocument) ?? 0) + 1
12332 + );
12333 + for (const [hash, css] of runtime.styles) {
12334 + injectStyle14(targetDocument, hash, css);
12335 + }
12336 + return () => {
12337 + const count = runtime.documents.get(targetDocument);
12338 + if (count === void 0) {
12339 + return;
12340 + }
12341 + if (count <= 1) {
12342 + runtime.documents.delete(targetDocument);
12343 + return;
12344 + }
12345 + runtime.documents.set(targetDocument, count - 1);
12346 + };
12347 + }
12348 + function registerStyle14(hash, css) {
12349 + const runtime = getRuntime14();
12350 + runtime.styles.set(hash, css);
12351 + for (const targetDocument of runtime.documents.keys()) {
12352 + injectStyle14(targetDocument, hash, css);
12353 + }
12354 + }
12355 + if (typeof process === "undefined" || true) {
12356 + registerStyle14("64bdb4d46e", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._626190151275d6d3__heading-wrapper{--_gcd-heading-color:inherit;--_gcd-heading-font-size:inherit;--_gcd-heading-font-weight:inherit;--_gcd-heading-margin:0;font-family:inherit;line-height:inherit}.cab17c7a373cb60d__header-content{flex:1;min-width:0}._92ebbaa30c8a1d05__header-description{color:var(--wpds-color-foreground-content-neutral-weak,#707070)}.dd89d27c4f15912d__header-trigger-positioner{align-self:flex-start;flex-shrink:0;margin-block-start:calc(var(--wpds-typography-line-height-sm, 20px)/2);max-height:0;overflow:visible}.bcfab5f2448bafef__header-trigger-wrapper{border-radius:var(--wpds-border-radius-sm,2px);display:flex;translate:0 -50%}._3106f8d2b0330faa__header-trigger{@media not (prefers-reduced-motion){transition:rotate .15s ease-out}}._5d2dfcb4085c6d0f__header[data-panel-open] ._3106f8d2b0330faa__header-trigger{rotate:180deg}._5d2dfcb4085c6d0f__header[data-disabled] ._3106f8d2b0330faa__header-trigger{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}.e34cf37ccd0d81e0__content{height:var(--collapsible-panel-height);margin-block-start:var(--wp-ui-card-header-content-margin);overflow:hidden;&._03cfdbcd710393c9__overflow-visible{overflow:visible}&[hidden]:not([hidden=until-found]){display:none}&[data-ending-style],&[data-starting-style]{height:0}@media not (prefers-reduced-motion){transition:all .15s ease-out}}}@layer compositions{._41bfdbf7b6c087c2__content-inner{padding-block-start:0}._5d2dfcb4085c6d0f__header{align-items:stretch;display:flex;flex-direction:row;gap:var(--wpds-dimension-gap-sm,8px);outline:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}}}}");
12357 + }
12358 + var style_default13 = { "heading-wrapper": "_626190151275d6d3__heading-wrapper", "header-content": "cab17c7a373cb60d__header-content", "header-description": "_92ebbaa30c8a1d05__header-description", "header-trigger-positioner": "dd89d27c4f15912d__header-trigger-positioner", "header-trigger-wrapper": "bcfab5f2448bafef__header-trigger-wrapper", "header-trigger": "_3106f8d2b0330faa__header-trigger", "header": "_5d2dfcb4085c6d0f__header", "content": "e34cf37ccd0d81e0__content", "overflow-visible": "_03cfdbcd710393c9__overflow-visible", "content-inner": "_41bfdbf7b6c087c2__content-inner" };
12359 + if (typeof process === "undefined" || true) {
12360 + registerStyle14("e8e31009f5", "._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");
12361 + }
12362 + var global_css_defense_default4 = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a", "ol": "c59a0ebebd71fa4a__ol", "li": "_46b5cb0c8e24e8c9__li" };
12363 + if (typeof process === "undefined" || true) {
12364 + registerStyle14("08122b3d53", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.af79fb116edb0dd7__outset-ring--focus:focus,.dfcfdc28396e5d98__outset-ring--focus-visible:focus-visible,.e5cd9ee879f6403a__outset-ring--focus-within:focus-within,:focus-visible ._81935a08e952f267__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within,.abc777e9713fa711__outset-ring--focus-except-active:focus{outline:none}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.abc777e9713fa711__outset-ring--focus-except-active:focus:not(:active){--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");
12365 + }
12366 + var focus_module_default3 = { "outset-ring--focus": "af79fb116edb0dd7__outset-ring--focus", "outset-ring--focus-visible": "dfcfdc28396e5d98__outset-ring--focus-visible", "outset-ring--focus-within": "e5cd9ee879f6403a__outset-ring--focus-within", "outset-ring--focus-parent-visible": "_81935a08e952f267__outset-ring--focus-parent-visible", "outset-ring--focus-except-active": "abc777e9713fa711__outset-ring--focus-except-active", "outset-ring--focus-within-except-active": "_3c9f5ee9fc9c136d__outset-ring--focus-within-except-active" };
12367 + var Header2 = (0, import_element36.forwardRef)(
12368 + function CollapsibleCardHeader({
12369 + children,
12370 + className,
12371 + render,
12372 + "aria-describedby": ariaDescribedByProp,
12373 + ...restProps
12374 + }, ref) {
12375 + const [descriptionIds, setDescriptionIds] = (0, import_element36.useState)(
12376 + []
12377 + );
12378 + const [orderedDescriptionIds, setOrderedDescriptionIds] = (0, import_element36.useState)([]);
12379 + const headerContentRef = (0, import_element36.useRef)(null);
12380 + const registerDescriptionId = (0, import_element36.useCallback)((id) => {
12381 + setDescriptionIds((currentDescriptionIds) => {
12382 + if (currentDescriptionIds.includes(id)) {
12383 + return currentDescriptionIds;
12384 + }
12385 + return [...currentDescriptionIds, id];
12386 + });
12387 + return () => {
12388 + setDescriptionIds(
12389 + (currentDescriptionIds) => currentDescriptionIds.filter(
12390 + (descriptionId) => descriptionId !== id
12391 + )
12392 + );
12393 + };
12394 + }, []);
12395 + const contextValue = (0, import_element36.useMemo)(
12396 + () => ({ registerDescriptionId }),
12397 + [registerDescriptionId]
12398 + );
12399 + (0, import_compose3.useIsomorphicLayoutEffect)(() => {
12400 + const registeredDescriptionIds = new Set(descriptionIds);
12401 + const nextDescriptionIds = Array.from(
12402 + headerContentRef.current?.querySelectorAll("[id]") ?? []
12403 + ).map((element) => element.id).filter((id) => registeredDescriptionIds.has(id));
12404 + setOrderedDescriptionIds((currentDescriptionIds) => {
12405 + if (currentDescriptionIds.length === nextDescriptionIds.length && currentDescriptionIds.every(
12406 + (id, index2) => id === nextDescriptionIds[index2]
12407 + )) {
12408 + return currentDescriptionIds;
12409 + }
12410 + return nextDescriptionIds;
12411 + });
12412 + });
12413 + const ariaDescribedBy = Array.from(
12414 + /* @__PURE__ */ new Set([
12415 + ...ariaDescribedByProp?.split(/\s+/).filter(Boolean) ?? [],
12416 + ...orderedDescriptionIds
12417 + ])
12418 + ).join(" ") || void 0;
12419 + return useRender({
12420 + defaultTagName: "div",
12421 + render,
12422 + ref,
12423 + props: mergeProps(restProps, {
12424 + className: clsx_default(
12425 + global_css_defense_default4.heading,
12426 + style_default13["heading-wrapper"],
12427 + className
12428 + ),
12429 + children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(HeaderDescriptionIdContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
12430 + Trigger2,
12431 + {
12432 + className: style_default13.header,
12433 + render: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Header, {}),
12434 + nativeButton: false,
12435 + "aria-describedby": ariaDescribedBy,
12436 + children: [
12437 + /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
12438 + "div",
12439 + {
12440 + ref: headerContentRef,
12441 + className: style_default13["header-content"],
12442 + children
12443 + }
12444 + ),
12445 + /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
12446 + "div",
12447 + {
12448 + className: clsx_default(
12449 + style_default13["header-trigger-positioner"]
12450 + ),
12451 + children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
12452 + "div",
12453 + {
12454 + className: clsx_default(
12455 + style_default13["header-trigger-wrapper"],
12456 + global_css_defense_default4.div,
12457 + // While the interactive trigger element is the whole header,
12458 + // the focus ring will be displayed only on the icon to visually
12459 + // emulate it being the button.
12460 + focus_module_default3["outset-ring--focus-parent-visible"]
12461 + ),
12462 + children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
12463 + Icon,
12464 + {
12465 + icon: chevron_down_default,
12466 + className: style_default13["header-trigger"]
12467 + }
12468 + )
12469 + }
12470 + )
12471 + }
12472 + )
12473 + ]
12474 + }
12475 + ) })
12476 + })
12477 + });
12478 + }
12479 + );
12480 +
12481 + // packages/ui/build-module/collapsible-card/header-description.mjs
12482 + var import_element37 = __toESM(require_element(), 1);
12483 + var import_jsx_runtime55 = __toESM(require_jsx_runtime(), 1);
12484 + var STYLE_HASH_ATTRIBUTE15 = "data-wp-hash";
12485 + function getRuntime15() {
12486 + const globalScope = globalThis;
12487 + if (globalScope.__wpStyleRuntime) {
12488 + return globalScope.__wpStyleRuntime;
12489 + }
12490 + globalScope.__wpStyleRuntime = {
12491 + documents: /* @__PURE__ */ new Map(),
12492 + styles: /* @__PURE__ */ new Map(),
12493 + injectedStyles: /* @__PURE__ */ new WeakMap()
12494 + };
12495 + if (typeof document !== "undefined") {
12496 + registerDocument15(document);
12497 + }
12498 + return globalScope.__wpStyleRuntime;
12499 + }
12500 + function documentContainsStyleHash15(targetDocument, hash) {
12501 + if (!targetDocument.head) {
12502 + return false;
12503 + }
12504 + for (const style of targetDocument.head.querySelectorAll(
12505 + `style[${STYLE_HASH_ATTRIBUTE15}]`
12506 + )) {
12507 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE15) === hash) {
12508 + return true;
12509 + }
12510 + }
12511 + return false;
12512 + }
12513 + function injectStyle15(targetDocument, hash, css) {
12514 + if (!targetDocument.head) {
12515 + return;
12516 + }
12517 + const runtime = getRuntime15();
12518 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
12519 + if (!injectedStyles) {
12520 + injectedStyles = /* @__PURE__ */ new Set();
12521 + runtime.injectedStyles.set(targetDocument, injectedStyles);
12522 + }
12523 + if (injectedStyles.has(hash)) {
12524 + return;
12525 + }
12526 + if (documentContainsStyleHash15(targetDocument, hash)) {
12527 + injectedStyles.add(hash);
12528 + return;
12529 + }
12530 + const style = targetDocument.createElement("style");
12531 + style.setAttribute(STYLE_HASH_ATTRIBUTE15, hash);
12532 + style.appendChild(targetDocument.createTextNode(css));
12533 + targetDocument.head.appendChild(style);
12534 + injectedStyles.add(hash);
12535 + }
12536 + function registerDocument15(targetDocument) {
12537 + const runtime = getRuntime15();
12538 + runtime.documents.set(
12539 + targetDocument,
12540 + (runtime.documents.get(targetDocument) ?? 0) + 1
12541 + );
12542 + for (const [hash, css] of runtime.styles) {
12543 + injectStyle15(targetDocument, hash, css);
12544 + }
12545 + return () => {
12546 + const count = runtime.documents.get(targetDocument);
12547 + if (count === void 0) {
12548 + return;
12549 + }
12550 + if (count <= 1) {
12551 + runtime.documents.delete(targetDocument);
12552 + return;
12553 + }
12554 + runtime.documents.set(targetDocument, count - 1);
12555 + };
12556 + }
12557 + function registerStyle15(hash, css) {
12558 + const runtime = getRuntime15();
12559 + runtime.styles.set(hash, css);
12560 + for (const targetDocument of runtime.documents.keys()) {
12561 + injectStyle15(targetDocument, hash, css);
12562 + }
12563 + }
12564 + if (typeof process === "undefined" || true) {
12565 + registerStyle15("64bdb4d46e", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._626190151275d6d3__heading-wrapper{--_gcd-heading-color:inherit;--_gcd-heading-font-size:inherit;--_gcd-heading-font-weight:inherit;--_gcd-heading-margin:0;font-family:inherit;line-height:inherit}.cab17c7a373cb60d__header-content{flex:1;min-width:0}._92ebbaa30c8a1d05__header-description{color:var(--wpds-color-foreground-content-neutral-weak,#707070)}.dd89d27c4f15912d__header-trigger-positioner{align-self:flex-start;flex-shrink:0;margin-block-start:calc(var(--wpds-typography-line-height-sm, 20px)/2);max-height:0;overflow:visible}.bcfab5f2448bafef__header-trigger-wrapper{border-radius:var(--wpds-border-radius-sm,2px);display:flex;translate:0 -50%}._3106f8d2b0330faa__header-trigger{@media not (prefers-reduced-motion){transition:rotate .15s ease-out}}._5d2dfcb4085c6d0f__header[data-panel-open] ._3106f8d2b0330faa__header-trigger{rotate:180deg}._5d2dfcb4085c6d0f__header[data-disabled] ._3106f8d2b0330faa__header-trigger{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}.e34cf37ccd0d81e0__content{height:var(--collapsible-panel-height);margin-block-start:var(--wp-ui-card-header-content-margin);overflow:hidden;&._03cfdbcd710393c9__overflow-visible{overflow:visible}&[hidden]:not([hidden=until-found]){display:none}&[data-ending-style],&[data-starting-style]{height:0}@media not (prefers-reduced-motion){transition:all .15s ease-out}}}@layer compositions{._41bfdbf7b6c087c2__content-inner{padding-block-start:0}._5d2dfcb4085c6d0f__header{align-items:stretch;display:flex;flex-direction:row;gap:var(--wpds-dimension-gap-sm,8px);outline:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}}}}");
12566 + }
12567 + var style_default14 = { "heading-wrapper": "_626190151275d6d3__heading-wrapper", "header-content": "cab17c7a373cb60d__header-content", "header-description": "_92ebbaa30c8a1d05__header-description", "header-trigger-positioner": "dd89d27c4f15912d__header-trigger-positioner", "header-trigger-wrapper": "bcfab5f2448bafef__header-trigger-wrapper", "header-trigger": "_3106f8d2b0330faa__header-trigger", "header": "_5d2dfcb4085c6d0f__header", "content": "e34cf37ccd0d81e0__content", "overflow-visible": "_03cfdbcd710393c9__overflow-visible", "content-inner": "_41bfdbf7b6c087c2__content-inner" };
12568 + var DEFAULT_TAG2 = /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", {});
12569 + var HeaderDescription = (0, import_element37.forwardRef)(function CollapsibleCardHeaderDescription({ children, className, id: idProp, render = DEFAULT_TAG2, ...restProps }, ref) {
12570 + const generatedId = (0, import_element37.useId)();
12571 + const descriptionId = idProp ?? generatedId;
12572 + const context = (0, import_element37.useContext)(HeaderDescriptionIdContext);
12573 + if (!context) {
12574 + throw new Error(
12575 + "CollapsibleCard.HeaderDescription: Missing parent <CollapsibleCard.Header>. Render <CollapsibleCard.HeaderDescription> inside <CollapsibleCard.Header>."
12576 + );
12577 + }
12578 + (0, import_element37.useEffect)(() => {
12579 + return context?.registerDescriptionId(descriptionId);
12580 + }, [context, descriptionId]);
12581 + return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
12582 + Text,
12583 + {
12584 + ref,
12585 + variant: "body-md",
12586 + render,
12587 + id: descriptionId,
12588 + "aria-hidden": "true",
12589 + className: clsx_default(style_default14["header-description"], className),
12590 + ...restProps,
12591 + children
12592 + }
12593 + );
12594 + });
12595 +
12596 + // packages/ui/build-module/collapsible-card/content.mjs
12597 + var import_element38 = __toESM(require_element(), 1);
12598 + var import_jsx_runtime56 = __toESM(require_jsx_runtime(), 1);
12599 + var STYLE_HASH_ATTRIBUTE16 = "data-wp-hash";
12600 + function getRuntime16() {
12601 + const globalScope = globalThis;
12602 + if (globalScope.__wpStyleRuntime) {
12603 + return globalScope.__wpStyleRuntime;
12604 + }
12605 + globalScope.__wpStyleRuntime = {
12606 + documents: /* @__PURE__ */ new Map(),
12607 + styles: /* @__PURE__ */ new Map(),
12608 + injectedStyles: /* @__PURE__ */ new WeakMap()
12609 + };
12610 + if (typeof document !== "undefined") {
12611 + registerDocument16(document);
12612 + }
12613 + return globalScope.__wpStyleRuntime;
12614 + }
12615 + function documentContainsStyleHash16(targetDocument, hash) {
12616 + if (!targetDocument.head) {
12617 + return false;
12618 + }
12619 + for (const style of targetDocument.head.querySelectorAll(
12620 + `style[${STYLE_HASH_ATTRIBUTE16}]`
12621 + )) {
12622 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE16) === hash) {
12623 + return true;
12624 + }
12625 + }
12626 + return false;
12627 + }
12628 + function injectStyle16(targetDocument, hash, css) {
12629 + if (!targetDocument.head) {
12630 + return;
12631 + }
12632 + const runtime = getRuntime16();
12633 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
12634 + if (!injectedStyles) {
12635 + injectedStyles = /* @__PURE__ */ new Set();
12636 + runtime.injectedStyles.set(targetDocument, injectedStyles);
12637 + }
12638 + if (injectedStyles.has(hash)) {
12639 + return;
12640 + }
12641 + if (documentContainsStyleHash16(targetDocument, hash)) {
12642 + injectedStyles.add(hash);
12643 + return;
12644 + }
12645 + const style = targetDocument.createElement("style");
12646 + style.setAttribute(STYLE_HASH_ATTRIBUTE16, hash);
12647 + style.appendChild(targetDocument.createTextNode(css));
12648 + targetDocument.head.appendChild(style);
12649 + injectedStyles.add(hash);
12650 + }
12651 + function registerDocument16(targetDocument) {
12652 + const runtime = getRuntime16();
12653 + runtime.documents.set(
12654 + targetDocument,
12655 + (runtime.documents.get(targetDocument) ?? 0) + 1
12656 + );
12657 + for (const [hash, css] of runtime.styles) {
12658 + injectStyle16(targetDocument, hash, css);
12659 + }
12660 + return () => {
12661 + const count = runtime.documents.get(targetDocument);
12662 + if (count === void 0) {
12663 + return;
12664 + }
12665 + if (count <= 1) {
12666 + runtime.documents.delete(targetDocument);
12667 + return;
12668 + }
12669 + runtime.documents.set(targetDocument, count - 1);
12670 + };
12671 + }
12672 + function registerStyle16(hash, css) {
12673 + const runtime = getRuntime16();
12674 + runtime.styles.set(hash, css);
12675 + for (const targetDocument of runtime.documents.keys()) {
12676 + injectStyle16(targetDocument, hash, css);
12677 + }
12678 + }
12679 + if (typeof process === "undefined" || true) {
12680 + registerStyle16("64bdb4d46e", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._626190151275d6d3__heading-wrapper{--_gcd-heading-color:inherit;--_gcd-heading-font-size:inherit;--_gcd-heading-font-weight:inherit;--_gcd-heading-margin:0;font-family:inherit;line-height:inherit}.cab17c7a373cb60d__header-content{flex:1;min-width:0}._92ebbaa30c8a1d05__header-description{color:var(--wpds-color-foreground-content-neutral-weak,#707070)}.dd89d27c4f15912d__header-trigger-positioner{align-self:flex-start;flex-shrink:0;margin-block-start:calc(var(--wpds-typography-line-height-sm, 20px)/2);max-height:0;overflow:visible}.bcfab5f2448bafef__header-trigger-wrapper{border-radius:var(--wpds-border-radius-sm,2px);display:flex;translate:0 -50%}._3106f8d2b0330faa__header-trigger{@media not (prefers-reduced-motion){transition:rotate .15s ease-out}}._5d2dfcb4085c6d0f__header[data-panel-open] ._3106f8d2b0330faa__header-trigger{rotate:180deg}._5d2dfcb4085c6d0f__header[data-disabled] ._3106f8d2b0330faa__header-trigger{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}.e34cf37ccd0d81e0__content{height:var(--collapsible-panel-height);margin-block-start:var(--wp-ui-card-header-content-margin);overflow:hidden;&._03cfdbcd710393c9__overflow-visible{overflow:visible}&[hidden]:not([hidden=until-found]){display:none}&[data-ending-style],&[data-starting-style]{height:0}@media not (prefers-reduced-motion){transition:all .15s ease-out}}}@layer compositions{._41bfdbf7b6c087c2__content-inner{padding-block-start:0}._5d2dfcb4085c6d0f__header{align-items:stretch;display:flex;flex-direction:row;gap:var(--wpds-dimension-gap-sm,8px);outline:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}}}}");
12681 + }
12682 + var style_default15 = { "heading-wrapper": "_626190151275d6d3__heading-wrapper", "header-content": "cab17c7a373cb60d__header-content", "header-description": "_92ebbaa30c8a1d05__header-description", "header-trigger-positioner": "dd89d27c4f15912d__header-trigger-positioner", "header-trigger-wrapper": "bcfab5f2448bafef__header-trigger-wrapper", "header-trigger": "_3106f8d2b0330faa__header-trigger", "header": "_5d2dfcb4085c6d0f__header", "content": "e34cf37ccd0d81e0__content", "overflow-visible": "_03cfdbcd710393c9__overflow-visible", "content-inner": "_41bfdbf7b6c087c2__content-inner" };
12683 + var Content2 = (0, import_element38.forwardRef)(
12684 + function CollapsibleCardContent({ className, render, children, hiddenUntilFound = true, ...restProps }, ref) {
12685 + return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
12686 + Panel2,
12687 + {
12688 + ref,
12689 + className: (state) => clsx_default(
12690 + style_default15.content,
12691 + state.open && state.transitionStatus === "idle" && style_default15["overflow-visible"],
12692 + className
12693 + ),
12694 + hiddenUntilFound,
12695 + ...restProps,
12696 + children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
12697 + Content,
12698 + {
12699 + className: style_default15["content-inner"],
12700 + render,
12701 + children
12702 + }
12703 + )
12704 + }
12705 + );
12706 + }
12707 + );
12708 +
12709 + // packages/ui/build-module/stack/stack.mjs
12710 + var import_element39 = __toESM(require_element(), 1);
12711 + var STYLE_HASH_ATTRIBUTE17 = "data-wp-hash";
12712 + function getRuntime17() {
12713 + const globalScope = globalThis;
12714 + if (globalScope.__wpStyleRuntime) {
12715 + return globalScope.__wpStyleRuntime;
12716 + }
12717 + globalScope.__wpStyleRuntime = {
12718 + documents: /* @__PURE__ */ new Map(),
12719 + styles: /* @__PURE__ */ new Map(),
12720 + injectedStyles: /* @__PURE__ */ new WeakMap()
12721 + };
12722 + if (typeof document !== "undefined") {
12723 + registerDocument17(document);
12724 + }
12725 + return globalScope.__wpStyleRuntime;
12726 + }
12727 + function documentContainsStyleHash17(targetDocument, hash) {
12728 + if (!targetDocument.head) {
12729 + return false;
12730 + }
12731 + for (const style of targetDocument.head.querySelectorAll(
12732 + `style[${STYLE_HASH_ATTRIBUTE17}]`
12733 + )) {
12734 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE17) === hash) {
12735 + return true;
12736 + }
12737 + }
12738 + return false;
12739 + }
12740 + function injectStyle17(targetDocument, hash, css) {
12741 + if (!targetDocument.head) {
12742 + return;
12743 + }
12744 + const runtime = getRuntime17();
12745 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
12746 + if (!injectedStyles) {
12747 + injectedStyles = /* @__PURE__ */ new Set();
12748 + runtime.injectedStyles.set(targetDocument, injectedStyles);
12749 + }
12750 + if (injectedStyles.has(hash)) {
12751 + return;
12752 + }
12753 + if (documentContainsStyleHash17(targetDocument, hash)) {
12754 + injectedStyles.add(hash);
12755 + return;
12756 + }
12757 + const style = targetDocument.createElement("style");
12758 + style.setAttribute(STYLE_HASH_ATTRIBUTE17, hash);
12759 + style.appendChild(targetDocument.createTextNode(css));
12760 + targetDocument.head.appendChild(style);
12761 + injectedStyles.add(hash);
12762 + }
12763 + function registerDocument17(targetDocument) {
12764 + const runtime = getRuntime17();
12765 + runtime.documents.set(
12766 + targetDocument,
12767 + (runtime.documents.get(targetDocument) ?? 0) + 1
12768 + );
12769 + for (const [hash, css] of runtime.styles) {
12770 + injectStyle17(targetDocument, hash, css);
12771 + }
12772 + return () => {
12773 + const count = runtime.documents.get(targetDocument);
12774 + if (count === void 0) {
12775 + return;
12776 + }
12777 + if (count <= 1) {
12778 + runtime.documents.delete(targetDocument);
12779 + return;
12780 + }
12781 + runtime.documents.set(targetDocument, count - 1);
12782 + };
12783 + }
12784 + function registerStyle17(hash, css) {
12785 + const runtime = getRuntime17();
12786 + runtime.styles.set(hash, css);
12787 + for (const targetDocument of runtime.documents.keys()) {
12788 + injectStyle17(targetDocument, hash, css);
12789 + }
12790 + }
12791 + if (typeof process === "undefined" || true) {
12792 + registerStyle17("32aba35fe1", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}");
12793 + }
12794 + var style_default16 = { "stack": "_19ce0419607e1896__stack" };
12795 + var gapTokens = {
12796 + xs: "var(--wpds-dimension-gap-xs, 4px)",
12797 + sm: "var(--wpds-dimension-gap-sm, 8px)",
12798 + md: "var(--wpds-dimension-gap-md, 12px)",
12799 + lg: "var(--wpds-dimension-gap-lg, 16px)",
12800 + xl: "var(--wpds-dimension-gap-xl, 24px)",
12801 + "2xl": "var(--wpds-dimension-gap-2xl, 32px)",
12802 + "3xl": "var(--wpds-dimension-gap-3xl, 40px)"
12803 + };
12804 + var Stack = (0, import_element39.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render, ...props }, ref) {
12805 + const style = {
12806 + gap: gap && gapTokens[gap],
12807 + alignItems: align,
12808 + justifyContent: justify,
12809 + flexDirection: direction,
12810 + flexWrap: wrap
12811 + };
12812 + const element = useRender({
12813 + render,
12814 + ref,
12815 + props: mergeProps(props, { style, className: style_default16.stack })
12816 + });
12817 + return element;
12818 + });
12819 +
12820 + // packages/ui/build-module/notice/index.mjs
12821 + var notice_exports = {};
12822 + __export(notice_exports, {
12823 + ActionButton: () => ActionButton,
12824 + ActionLink: () => ActionLink,
12825 + Actions: () => Actions,
12826 + CloseIcon: () => CloseIcon,
12827 + Description: () => Description,
12828 + Root: () => Root4,
12829 + Title: () => Title2
12830 + });
12831 +
12832 + // packages/ui/build-module/notice/root.mjs
12833 + var import_a11y2 = __toESM(require_a11y(), 1);
12834 + var import_element40 = __toESM(require_element(), 1);
12835 + var import_jsx_runtime57 = __toESM(require_jsx_runtime(), 1);
12836 + var STYLE_HASH_ATTRIBUTE18 = "data-wp-hash";
12837 + function getRuntime18() {
12838 + const globalScope = globalThis;
12839 + if (globalScope.__wpStyleRuntime) {
12840 + return globalScope.__wpStyleRuntime;
12841 + }
12842 + globalScope.__wpStyleRuntime = {
12843 + documents: /* @__PURE__ */ new Map(),
12844 + styles: /* @__PURE__ */ new Map(),
12845 + injectedStyles: /* @__PURE__ */ new WeakMap()
12846 + };
12847 + if (typeof document !== "undefined") {
12848 + registerDocument18(document);
12849 + }
12850 + return globalScope.__wpStyleRuntime;
12851 + }
12852 + function documentContainsStyleHash18(targetDocument, hash) {
12853 + if (!targetDocument.head) {
12854 + return false;
12855 + }
12856 + for (const style of targetDocument.head.querySelectorAll(
12857 + `style[${STYLE_HASH_ATTRIBUTE18}]`
12858 + )) {
12859 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE18) === hash) {
12860 + return true;
12861 + }
12862 + }
12863 + return false;
12864 + }
12865 + function injectStyle18(targetDocument, hash, css) {
12866 + if (!targetDocument.head) {
12867 + return;
12868 + }
12869 + const runtime = getRuntime18();
12870 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
12871 + if (!injectedStyles) {
12872 + injectedStyles = /* @__PURE__ */ new Set();
12873 + runtime.injectedStyles.set(targetDocument, injectedStyles);
12874 + }
12875 + if (injectedStyles.has(hash)) {
12876 + return;
12877 + }
12878 + if (documentContainsStyleHash18(targetDocument, hash)) {
12879 + injectedStyles.add(hash);
12880 + return;
12881 + }
12882 + const style = targetDocument.createElement("style");
12883 + style.setAttribute(STYLE_HASH_ATTRIBUTE18, hash);
12884 + style.appendChild(targetDocument.createTextNode(css));
12885 + targetDocument.head.appendChild(style);
12886 + injectedStyles.add(hash);
12887 + }
12888 + function registerDocument18(targetDocument) {
12889 + const runtime = getRuntime18();
12890 + runtime.documents.set(
12891 + targetDocument,
12892 + (runtime.documents.get(targetDocument) ?? 0) + 1
12893 + );
12894 + for (const [hash, css] of runtime.styles) {
12895 + injectStyle18(targetDocument, hash, css);
12896 + }
12897 + return () => {
12898 + const count = runtime.documents.get(targetDocument);
12899 + if (count === void 0) {
12900 + return;
12901 + }
12902 + if (count <= 1) {
12903 + runtime.documents.delete(targetDocument);
12904 + return;
12905 + }
12906 + runtime.documents.set(targetDocument, count - 1);
12907 + };
12908 + }
12909 + function registerStyle18(hash, css) {
12910 + const runtime = getRuntime18();
12911 + runtime.styles.set(hash, css);
12912 + for (const targetDocument of runtime.documents.keys()) {
12913 + injectStyle18(targetDocument, hash, css);
12914 + }
12915 + }
12916 + if (typeof process === "undefined" || true) {
12917 + registerStyle18("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
12918 + }
12919 + var resets_default5 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
12920 + if (typeof process === "undefined" || true) {
12921 + registerStyle18("2e53930a41", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#adc6e2);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bd7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#936300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#92d39d);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#e0afa7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");
12922 + }
12923 + var style_default17 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "title": "b5397fb9d05389e3__title", "description": "_1904b570a89bb815__description", "actions": "_0a1270dcdd79c031__actions", "action-button": "_983740ab855c4e09__action-button", "action-link": "d329e7416d368d31__action-link", "close-icon": "_487e6a5c1375f7dc__close-icon", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error", "is-action-button-outline": "_8ddb8fb33fbf3d38__is-action-button-outline", "is-action-button-minimal": "_77bbde495a8a0af3__is-action-button-minimal" };
12924 + var icons = {
12925 + neutral: null,
12926 + info: info_default,
12927 + warning: caution_default,
12928 + success: published_default,
12929 + error: error_default
12930 + };
12931 + function getDefaultPoliteness(intent) {
12932 + return intent === "error" ? "assertive" : "polite";
12933 + }
12934 + function safeRenderToString(message) {
12935 + if (!message) {
12936 + return void 0;
12937 + }
12938 + if (typeof message === "string") {
12939 + return message;
12940 + }
12941 + try {
12942 + return (0, import_element40.renderToString)(message);
12943 + } catch {
12944 + return void 0;
12945 + }
12946 + }
12947 + function useSpokenMessage(message, politeness) {
12948 + const spokenMessage = safeRenderToString(message);
12949 + (0, import_element40.useEffect)(() => {
12950 + if (spokenMessage) {
12951 + (0, import_a11y2.speak)(spokenMessage, politeness);
12952 + }
12953 + }, [spokenMessage, politeness]);
12954 + }
12955 + var Root4 = (0, import_element40.forwardRef)(function Notice({
12956 + intent = "neutral",
12957 + children,
12958 + icon,
12959 + spokenMessage = children,
12960 + politeness = getDefaultPoliteness(intent),
12961 + render,
12962 + ...restProps
12963 + }, ref) {
12964 + useSpokenMessage(spokenMessage, politeness);
12965 + const iconElement = icon === null ? null : icon ?? icons[intent];
12966 + const mergedClassName = clsx_default(
12967 + style_default17.notice,
12968 + style_default17[`is-${intent}`],
12969 + resets_default5["box-sizing"]
12970 + );
12971 + const element = useRender({
12972 + defaultTagName: "div",
12973 + render,
12974 + ref,
12975 + props: mergeProps(
12976 + {
12977 + className: mergedClassName,
12978 + children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
12979 + children,
12980 + iconElement && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
12981 + Icon,
12982 + {
12983 + className: style_default17.icon,
12984 + icon: iconElement
12985 + }
12986 + )
12987 + ] })
12988 + },
12989 + restProps
12990 + )
12991 + });
12992 + return element;
12993 + });
12994 +
12995 + // packages/ui/build-module/notice/title.mjs
12996 + var import_element41 = __toESM(require_element(), 1);
12997 + var import_jsx_runtime58 = __toESM(require_jsx_runtime(), 1);
12998 + var STYLE_HASH_ATTRIBUTE19 = "data-wp-hash";
12999 + function getRuntime19() {
13000 + const globalScope = globalThis;
13001 + if (globalScope.__wpStyleRuntime) {
13002 + return globalScope.__wpStyleRuntime;
13003 + }
13004 + globalScope.__wpStyleRuntime = {
13005 + documents: /* @__PURE__ */ new Map(),
13006 + styles: /* @__PURE__ */ new Map(),
13007 + injectedStyles: /* @__PURE__ */ new WeakMap()
13008 + };
13009 + if (typeof document !== "undefined") {
13010 + registerDocument19(document);
13011 + }
13012 + return globalScope.__wpStyleRuntime;
13013 + }
13014 + function documentContainsStyleHash19(targetDocument, hash) {
13015 + if (!targetDocument.head) {
13016 + return false;
13017 + }
13018 + for (const style of targetDocument.head.querySelectorAll(
13019 + `style[${STYLE_HASH_ATTRIBUTE19}]`
13020 + )) {
13021 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE19) === hash) {
13022 + return true;
13023 + }
13024 + }
13025 + return false;
13026 + }
13027 + function injectStyle19(targetDocument, hash, css) {
13028 + if (!targetDocument.head) {
13029 + return;
13030 + }
13031 + const runtime = getRuntime19();
13032 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
13033 + if (!injectedStyles) {
13034 + injectedStyles = /* @__PURE__ */ new Set();
13035 + runtime.injectedStyles.set(targetDocument, injectedStyles);
13036 + }
13037 + if (injectedStyles.has(hash)) {
13038 + return;
13039 + }
13040 + if (documentContainsStyleHash19(targetDocument, hash)) {
13041 + injectedStyles.add(hash);
13042 + return;
13043 + }
13044 + const style = targetDocument.createElement("style");
13045 + style.setAttribute(STYLE_HASH_ATTRIBUTE19, hash);
13046 + style.appendChild(targetDocument.createTextNode(css));
13047 + targetDocument.head.appendChild(style);
13048 + injectedStyles.add(hash);
13049 + }
13050 + function registerDocument19(targetDocument) {
13051 + const runtime = getRuntime19();
13052 + runtime.documents.set(
13053 + targetDocument,
13054 + (runtime.documents.get(targetDocument) ?? 0) + 1
13055 + );
13056 + for (const [hash, css] of runtime.styles) {
13057 + injectStyle19(targetDocument, hash, css);
13058 + }
13059 + return () => {
13060 + const count = runtime.documents.get(targetDocument);
13061 + if (count === void 0) {
13062 + return;
13063 + }
13064 + if (count <= 1) {
13065 + runtime.documents.delete(targetDocument);
13066 + return;
13067 + }
13068 + runtime.documents.set(targetDocument, count - 1);
13069 + };
13070 + }
13071 + function registerStyle19(hash, css) {
13072 + const runtime = getRuntime19();
13073 + runtime.styles.set(hash, css);
13074 + for (const targetDocument of runtime.documents.keys()) {
13075 + injectStyle19(targetDocument, hash, css);
13076 + }
13077 + }
13078 + if (typeof process === "undefined" || true) {
13079 + registerStyle19("2e53930a41", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#adc6e2);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bd7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#936300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#92d39d);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#e0afa7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");
13080 + }
13081 + var style_default18 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "title": "b5397fb9d05389e3__title", "description": "_1904b570a89bb815__description", "actions": "_0a1270dcdd79c031__actions", "action-button": "_983740ab855c4e09__action-button", "action-link": "d329e7416d368d31__action-link", "close-icon": "_487e6a5c1375f7dc__close-icon", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error", "is-action-button-outline": "_8ddb8fb33fbf3d38__is-action-button-outline", "is-action-button-minimal": "_77bbde495a8a0af3__is-action-button-minimal" };
13082 + var Title2 = (0, import_element41.forwardRef)(
13083 + function NoticeTitle({ className, ...props }, ref) {
13084 + return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
13085 + Text,
13086 + {
13087 + ref,
13088 + variant: "heading-md",
13089 + className: clsx_default(style_default18.title, className),
13090 + ...props
13091 + }
13092 + );
13093 + }
13094 + );
13095 +
13096 + // packages/ui/build-module/notice/description.mjs
13097 + var import_element42 = __toESM(require_element(), 1);
13098 + var import_jsx_runtime59 = __toESM(require_jsx_runtime(), 1);
13099 + var STYLE_HASH_ATTRIBUTE20 = "data-wp-hash";
13100 + function getRuntime20() {
13101 + const globalScope = globalThis;
13102 + if (globalScope.__wpStyleRuntime) {
13103 + return globalScope.__wpStyleRuntime;
13104 + }
13105 + globalScope.__wpStyleRuntime = {
13106 + documents: /* @__PURE__ */ new Map(),
13107 + styles: /* @__PURE__ */ new Map(),
13108 + injectedStyles: /* @__PURE__ */ new WeakMap()
13109 + };
13110 + if (typeof document !== "undefined") {
13111 + registerDocument20(document);
13112 + }
13113 + return globalScope.__wpStyleRuntime;
13114 + }
13115 + function documentContainsStyleHash20(targetDocument, hash) {
13116 + if (!targetDocument.head) {
13117 + return false;
13118 + }
13119 + for (const style of targetDocument.head.querySelectorAll(
13120 + `style[${STYLE_HASH_ATTRIBUTE20}]`
13121 + )) {
13122 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE20) === hash) {
13123 + return true;
13124 + }
13125 + }
13126 + return false;
13127 + }
13128 + function injectStyle20(targetDocument, hash, css) {
13129 + if (!targetDocument.head) {
13130 + return;
13131 + }
13132 + const runtime = getRuntime20();
13133 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
13134 + if (!injectedStyles) {
13135 + injectedStyles = /* @__PURE__ */ new Set();
13136 + runtime.injectedStyles.set(targetDocument, injectedStyles);
13137 + }
13138 + if (injectedStyles.has(hash)) {
13139 + return;
13140 + }
13141 + if (documentContainsStyleHash20(targetDocument, hash)) {
13142 + injectedStyles.add(hash);
13143 + return;
13144 + }
13145 + const style = targetDocument.createElement("style");
13146 + style.setAttribute(STYLE_HASH_ATTRIBUTE20, hash);
13147 + style.appendChild(targetDocument.createTextNode(css));
13148 + targetDocument.head.appendChild(style);
13149 + injectedStyles.add(hash);
13150 + }
13151 + function registerDocument20(targetDocument) {
13152 + const runtime = getRuntime20();
13153 + runtime.documents.set(
13154 + targetDocument,
13155 + (runtime.documents.get(targetDocument) ?? 0) + 1
13156 + );
13157 + for (const [hash, css] of runtime.styles) {
13158 + injectStyle20(targetDocument, hash, css);
13159 + }
13160 + return () => {
13161 + const count = runtime.documents.get(targetDocument);
13162 + if (count === void 0) {
13163 + return;
13164 + }
13165 + if (count <= 1) {
13166 + runtime.documents.delete(targetDocument);
13167 + return;
13168 + }
13169 + runtime.documents.set(targetDocument, count - 1);
13170 + };
13171 + }
13172 + function registerStyle20(hash, css) {
13173 + const runtime = getRuntime20();
13174 + runtime.styles.set(hash, css);
13175 + for (const targetDocument of runtime.documents.keys()) {
13176 + injectStyle20(targetDocument, hash, css);
13177 + }
13178 + }
13179 + if (typeof process === "undefined" || true) {
13180 + registerStyle20("2e53930a41", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#adc6e2);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bd7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#936300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#92d39d);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#e0afa7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");
13181 + }
13182 + var style_default19 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "title": "b5397fb9d05389e3__title", "description": "_1904b570a89bb815__description", "actions": "_0a1270dcdd79c031__actions", "action-button": "_983740ab855c4e09__action-button", "action-link": "d329e7416d368d31__action-link", "close-icon": "_487e6a5c1375f7dc__close-icon", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error", "is-action-button-outline": "_8ddb8fb33fbf3d38__is-action-button-outline", "is-action-button-minimal": "_77bbde495a8a0af3__is-action-button-minimal" };
13183 + var Description = (0, import_element42.forwardRef)(
13184 + function NoticeDescription({ className, ...props }, ref) {
13185 + return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
13186 + Text,
13187 + {
13188 + ref,
13189 + variant: "body-md",
13190 + className: clsx_default(style_default19.description, className),
13191 + ...props
13192 + }
13193 + );
13194 + }
13195 + );
13196 +
13197 + // packages/ui/build-module/notice/actions.mjs
13198 + var import_element43 = __toESM(require_element(), 1);
13199 + var STYLE_HASH_ATTRIBUTE21 = "data-wp-hash";
13200 + function getRuntime21() {
13201 + const globalScope = globalThis;
13202 + if (globalScope.__wpStyleRuntime) {
13203 + return globalScope.__wpStyleRuntime;
13204 + }
13205 + globalScope.__wpStyleRuntime = {
13206 + documents: /* @__PURE__ */ new Map(),
13207 + styles: /* @__PURE__ */ new Map(),
13208 + injectedStyles: /* @__PURE__ */ new WeakMap()
13209 + };
13210 + if (typeof document !== "undefined") {
13211 + registerDocument21(document);
13212 + }
13213 + return globalScope.__wpStyleRuntime;
13214 + }
13215 + function documentContainsStyleHash21(targetDocument, hash) {
13216 + if (!targetDocument.head) {
13217 + return false;
13218 + }
13219 + for (const style of targetDocument.head.querySelectorAll(
13220 + `style[${STYLE_HASH_ATTRIBUTE21}]`
13221 + )) {
13222 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE21) === hash) {
13223 + return true;
13224 + }
13225 + }
13226 + return false;
13227 + }
13228 + function injectStyle21(targetDocument, hash, css) {
13229 + if (!targetDocument.head) {
13230 + return;
13231 + }
13232 + const runtime = getRuntime21();
13233 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
13234 + if (!injectedStyles) {
13235 + injectedStyles = /* @__PURE__ */ new Set();
13236 + runtime.injectedStyles.set(targetDocument, injectedStyles);
13237 + }
13238 + if (injectedStyles.has(hash)) {
13239 + return;
13240 + }
13241 + if (documentContainsStyleHash21(targetDocument, hash)) {
13242 + injectedStyles.add(hash);
13243 + return;
13244 + }
13245 + const style = targetDocument.createElement("style");
13246 + style.setAttribute(STYLE_HASH_ATTRIBUTE21, hash);
13247 + style.appendChild(targetDocument.createTextNode(css));
13248 + targetDocument.head.appendChild(style);
13249 + injectedStyles.add(hash);
13250 + }
13251 + function registerDocument21(targetDocument) {
13252 + const runtime = getRuntime21();
13253 + runtime.documents.set(
13254 + targetDocument,
13255 + (runtime.documents.get(targetDocument) ?? 0) + 1
13256 + );
13257 + for (const [hash, css] of runtime.styles) {
13258 + injectStyle21(targetDocument, hash, css);
13259 + }
13260 + return () => {
13261 + const count = runtime.documents.get(targetDocument);
13262 + if (count === void 0) {
13263 + return;
13264 + }
13265 + if (count <= 1) {
13266 + runtime.documents.delete(targetDocument);
13267 + return;
13268 + }
13269 + runtime.documents.set(targetDocument, count - 1);
13270 + };
13271 + }
13272 + function registerStyle21(hash, css) {
13273 + const runtime = getRuntime21();
13274 + runtime.styles.set(hash, css);
13275 + for (const targetDocument of runtime.documents.keys()) {
13276 + injectStyle21(targetDocument, hash, css);
13277 + }
13278 + }
13279 + if (typeof process === "undefined" || true) {
13280 + registerStyle21("2e53930a41", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#adc6e2);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bd7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#936300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#92d39d);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#e0afa7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");
13281 + }
13282 + var style_default20 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "title": "b5397fb9d05389e3__title", "description": "_1904b570a89bb815__description", "actions": "_0a1270dcdd79c031__actions", "action-button": "_983740ab855c4e09__action-button", "action-link": "d329e7416d368d31__action-link", "close-icon": "_487e6a5c1375f7dc__close-icon", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error", "is-action-button-outline": "_8ddb8fb33fbf3d38__is-action-button-outline", "is-action-button-minimal": "_77bbde495a8a0af3__is-action-button-minimal" };
13283 + var Actions = (0, import_element43.forwardRef)(
13284 + function NoticeActions({ render, ...props }, ref) {
13285 + const element = useRender({
13286 + defaultTagName: "div",
13287 + render,
13288 + ref,
13289 + props: mergeProps(
13290 + {
13291 + className: style_default20.actions
13292 + },
13293 + props
13294 + )
13295 + });
13296 + return element;
13297 + }
13298 + );
13299 +
13300 + // packages/ui/build-module/notice/close-icon.mjs
13301 + var import_element44 = __toESM(require_element(), 1);
13302 + var import_i18n6 = __toESM(require_i18n(), 1);
13303 + var import_jsx_runtime60 = __toESM(require_jsx_runtime(), 1);
13304 + var STYLE_HASH_ATTRIBUTE22 = "data-wp-hash";
13305 + function getRuntime22() {
13306 + const globalScope = globalThis;
13307 + if (globalScope.__wpStyleRuntime) {
13308 + return globalScope.__wpStyleRuntime;
13309 + }
13310 + globalScope.__wpStyleRuntime = {
13311 + documents: /* @__PURE__ */ new Map(),
13312 + styles: /* @__PURE__ */ new Map(),
13313 + injectedStyles: /* @__PURE__ */ new WeakMap()
13314 + };
13315 + if (typeof document !== "undefined") {
13316 + registerDocument22(document);
13317 + }
13318 + return globalScope.__wpStyleRuntime;
13319 + }
13320 + function documentContainsStyleHash22(targetDocument, hash) {
13321 + if (!targetDocument.head) {
13322 + return false;
13323 + }
13324 + for (const style of targetDocument.head.querySelectorAll(
13325 + `style[${STYLE_HASH_ATTRIBUTE22}]`
13326 + )) {
13327 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE22) === hash) {
13328 + return true;
13329 + }
13330 + }
13331 + return false;
13332 + }
13333 + function injectStyle22(targetDocument, hash, css) {
13334 + if (!targetDocument.head) {
13335 + return;
13336 + }
13337 + const runtime = getRuntime22();
13338 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
13339 + if (!injectedStyles) {
13340 + injectedStyles = /* @__PURE__ */ new Set();
13341 + runtime.injectedStyles.set(targetDocument, injectedStyles);
13342 + }
13343 + if (injectedStyles.has(hash)) {
13344 + return;
13345 + }
13346 + if (documentContainsStyleHash22(targetDocument, hash)) {
13347 + injectedStyles.add(hash);
13348 + return;
13349 + }
13350 + const style = targetDocument.createElement("style");
13351 + style.setAttribute(STYLE_HASH_ATTRIBUTE22, hash);
13352 + style.appendChild(targetDocument.createTextNode(css));
13353 + targetDocument.head.appendChild(style);
13354 + injectedStyles.add(hash);
13355 + }
13356 + function registerDocument22(targetDocument) {
13357 + const runtime = getRuntime22();
13358 + runtime.documents.set(
13359 + targetDocument,
13360 + (runtime.documents.get(targetDocument) ?? 0) + 1
13361 + );
13362 + for (const [hash, css] of runtime.styles) {
13363 + injectStyle22(targetDocument, hash, css);
13364 + }
13365 + return () => {
13366 + const count = runtime.documents.get(targetDocument);
13367 + if (count === void 0) {
13368 + return;
13369 + }
13370 + if (count <= 1) {
13371 + runtime.documents.delete(targetDocument);
13372 + return;
13373 + }
13374 + runtime.documents.set(targetDocument, count - 1);
13375 + };
13376 + }
13377 + function registerStyle22(hash, css) {
13378 + const runtime = getRuntime22();
13379 + runtime.styles.set(hash, css);
13380 + for (const targetDocument of runtime.documents.keys()) {
13381 + injectStyle22(targetDocument, hash, css);
13382 + }
13383 + }
13384 + if (typeof process === "undefined" || true) {
13385 + registerStyle22("2e53930a41", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#adc6e2);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bd7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#936300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#92d39d);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#e0afa7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");
13386 + }
13387 + var style_default21 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "title": "b5397fb9d05389e3__title", "description": "_1904b570a89bb815__description", "actions": "_0a1270dcdd79c031__actions", "action-button": "_983740ab855c4e09__action-button", "action-link": "d329e7416d368d31__action-link", "close-icon": "_487e6a5c1375f7dc__close-icon", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error", "is-action-button-outline": "_8ddb8fb33fbf3d38__is-action-button-outline", "is-action-button-minimal": "_77bbde495a8a0af3__is-action-button-minimal" };
13388 + var CloseIcon = (0, import_element44.forwardRef)(
13389 + function NoticeCloseIcon({ className, icon = close_small_default, label = (0, import_i18n6.__)("Dismiss"), ...props }, ref) {
13390 + return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
13391 + IconButton,
13392 + {
13393 + ...props,
13394 + ref,
13395 + className: clsx_default(style_default21["close-icon"], className),
13396 + variant: "minimal",
13397 + size: "small",
13398 + tone: "neutral",
13399 + icon,
13400 + label
13401 + }
13402 + );
13403 + }
13404 + );
13405 +
13406 + // packages/ui/build-module/notice/action-button.mjs
13407 + var import_element45 = __toESM(require_element(), 1);
13408 + var import_jsx_runtime61 = __toESM(require_jsx_runtime(), 1);
13409 + var STYLE_HASH_ATTRIBUTE23 = "data-wp-hash";
13410 + function getRuntime23() {
13411 + const globalScope = globalThis;
13412 + if (globalScope.__wpStyleRuntime) {
13413 + return globalScope.__wpStyleRuntime;
13414 + }
13415 + globalScope.__wpStyleRuntime = {
13416 + documents: /* @__PURE__ */ new Map(),
13417 + styles: /* @__PURE__ */ new Map(),
13418 + injectedStyles: /* @__PURE__ */ new WeakMap()
13419 + };
13420 + if (typeof document !== "undefined") {
13421 + registerDocument23(document);
13422 + }
13423 + return globalScope.__wpStyleRuntime;
13424 + }
13425 + function documentContainsStyleHash23(targetDocument, hash) {
13426 + if (!targetDocument.head) {
13427 + return false;
13428 + }
13429 + for (const style of targetDocument.head.querySelectorAll(
13430 + `style[${STYLE_HASH_ATTRIBUTE23}]`
13431 + )) {
13432 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE23) === hash) {
13433 + return true;
13434 + }
13435 + }
13436 + return false;
13437 + }
13438 + function injectStyle23(targetDocument, hash, css) {
13439 + if (!targetDocument.head) {
13440 + return;
13441 + }
13442 + const runtime = getRuntime23();
13443 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
13444 + if (!injectedStyles) {
13445 + injectedStyles = /* @__PURE__ */ new Set();
13446 + runtime.injectedStyles.set(targetDocument, injectedStyles);
13447 + }
13448 + if (injectedStyles.has(hash)) {
13449 + return;
13450 + }
13451 + if (documentContainsStyleHash23(targetDocument, hash)) {
13452 + injectedStyles.add(hash);
13453 + return;
13454 + }
13455 + const style = targetDocument.createElement("style");
13456 + style.setAttribute(STYLE_HASH_ATTRIBUTE23, hash);
13457 + style.appendChild(targetDocument.createTextNode(css));
13458 + targetDocument.head.appendChild(style);
13459 + injectedStyles.add(hash);
13460 + }
13461 + function registerDocument23(targetDocument) {
13462 + const runtime = getRuntime23();
13463 + runtime.documents.set(
13464 + targetDocument,
13465 + (runtime.documents.get(targetDocument) ?? 0) + 1
13466 + );
13467 + for (const [hash, css] of runtime.styles) {
13468 + injectStyle23(targetDocument, hash, css);
13469 + }
13470 + return () => {
13471 + const count = runtime.documents.get(targetDocument);
13472 + if (count === void 0) {
13473 + return;
13474 + }
13475 + if (count <= 1) {
13476 + runtime.documents.delete(targetDocument);
13477 + return;
13478 + }
13479 + runtime.documents.set(targetDocument, count - 1);
13480 + };
13481 + }
13482 + function registerStyle23(hash, css) {
13483 + const runtime = getRuntime23();
13484 + runtime.styles.set(hash, css);
13485 + for (const targetDocument of runtime.documents.keys()) {
13486 + injectStyle23(targetDocument, hash, css);
13487 + }
13488 + }
13489 + if (typeof process === "undefined" || true) {
13490 + registerStyle23("2e53930a41", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#adc6e2);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bd7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#936300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#92d39d);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#e0afa7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");
13491 + }
13492 + var style_default22 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "title": "b5397fb9d05389e3__title", "description": "_1904b570a89bb815__description", "actions": "_0a1270dcdd79c031__actions", "action-button": "_983740ab855c4e09__action-button", "action-link": "d329e7416d368d31__action-link", "close-icon": "_487e6a5c1375f7dc__close-icon", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error", "is-action-button-outline": "_8ddb8fb33fbf3d38__is-action-button-outline", "is-action-button-minimal": "_77bbde495a8a0af3__is-action-button-minimal" };
13493 + var ActionButton = (0, import_element45.forwardRef)(
13494 + function NoticeActionButton({ className, loading, loadingAnnouncement, variant, ...props }, ref) {
13495 + const loadingProps = loading !== void 0 ? { loading, loadingAnnouncement: loadingAnnouncement ?? "" } : {};
13496 + return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
13497 + Button6,
13498 + {
13499 + ...props,
13500 + ...loadingProps,
13501 + ref,
13502 + size: "compact",
13503 + tone: "neutral",
13504 + variant,
13505 + className: clsx_default(
13506 + style_default22["action-button"],
13507 + style_default22[`is-action-button-${variant}`],
13508 + className
13509 + )
13510 + }
13511 + );
13512 + }
13513 + );
13514 +
13515 + // packages/ui/build-module/notice/action-link.mjs
13516 + var import_element46 = __toESM(require_element(), 1);
13517 + var import_jsx_runtime62 = __toESM(require_jsx_runtime(), 1);
13518 + var STYLE_HASH_ATTRIBUTE24 = "data-wp-hash";
13519 + function getRuntime24() {
13520 + const globalScope = globalThis;
13521 + if (globalScope.__wpStyleRuntime) {
13522 + return globalScope.__wpStyleRuntime;
13523 + }
13524 + globalScope.__wpStyleRuntime = {
13525 + documents: /* @__PURE__ */ new Map(),
13526 + styles: /* @__PURE__ */ new Map(),
13527 + injectedStyles: /* @__PURE__ */ new WeakMap()
13528 + };
13529 + if (typeof document !== "undefined") {
13530 + registerDocument24(document);
13531 + }
13532 + return globalScope.__wpStyleRuntime;
13533 + }
13534 + function documentContainsStyleHash24(targetDocument, hash) {
13535 + if (!targetDocument.head) {
13536 + return false;
13537 + }
13538 + for (const style of targetDocument.head.querySelectorAll(
13539 + `style[${STYLE_HASH_ATTRIBUTE24}]`
13540 + )) {
13541 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE24) === hash) {
13542 + return true;
13543 + }
13544 + }
13545 + return false;
13546 + }
13547 + function injectStyle24(targetDocument, hash, css) {
13548 + if (!targetDocument.head) {
13549 + return;
13550 + }
13551 + const runtime = getRuntime24();
13552 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
13553 + if (!injectedStyles) {
13554 + injectedStyles = /* @__PURE__ */ new Set();
13555 + runtime.injectedStyles.set(targetDocument, injectedStyles);
13556 + }
13557 + if (injectedStyles.has(hash)) {
13558 + return;
13559 + }
13560 + if (documentContainsStyleHash24(targetDocument, hash)) {
13561 + injectedStyles.add(hash);
13562 + return;
13563 + }
13564 + const style = targetDocument.createElement("style");
13565 + style.setAttribute(STYLE_HASH_ATTRIBUTE24, hash);
13566 + style.appendChild(targetDocument.createTextNode(css));
13567 + targetDocument.head.appendChild(style);
13568 + injectedStyles.add(hash);
13569 + }
13570 + function registerDocument24(targetDocument) {
13571 + const runtime = getRuntime24();
13572 + runtime.documents.set(
13573 + targetDocument,
13574 + (runtime.documents.get(targetDocument) ?? 0) + 1
13575 + );
13576 + for (const [hash, css] of runtime.styles) {
13577 + injectStyle24(targetDocument, hash, css);
13578 + }
13579 + return () => {
13580 + const count = runtime.documents.get(targetDocument);
13581 + if (count === void 0) {
13582 + return;
13583 + }
13584 + if (count <= 1) {
13585 + runtime.documents.delete(targetDocument);
13586 + return;
13587 + }
13588 + runtime.documents.set(targetDocument, count - 1);
13589 + };
13590 + }
13591 + function registerStyle24(hash, css) {
13592 + const runtime = getRuntime24();
13593 + runtime.styles.set(hash, css);
13594 + for (const targetDocument of runtime.documents.keys()) {
13595 + injectStyle24(targetDocument, hash, css);
13596 + }
13597 + }
13598 + if (typeof process === "undefined" || true) {
13599 + registerStyle24("2e53930a41", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#adc6e2);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bd7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#936300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#92d39d);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#e0afa7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");
13600 + }
13601 + var style_default23 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "title": "b5397fb9d05389e3__title", "description": "_1904b570a89bb815__description", "actions": "_0a1270dcdd79c031__actions", "action-button": "_983740ab855c4e09__action-button", "action-link": "d329e7416d368d31__action-link", "close-icon": "_487e6a5c1375f7dc__close-icon", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error", "is-action-button-outline": "_8ddb8fb33fbf3d38__is-action-button-outline", "is-action-button-minimal": "_77bbde495a8a0af3__is-action-button-minimal" };
13602 + var ActionLink = (0, import_element46.forwardRef)(
13603 + function NoticeActionLink({ className, render, ...props }, ref) {
13604 + return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
13605 + Text,
13606 + {
13607 + ref,
13608 + className: clsx_default(style_default23["action-link"], className),
13609 + ...props,
13610 + variant: "body-md",
13611 + render: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Link, { tone: "neutral", variant: "default", render })
13612 + }
13613 + );
13614 + }
13615 + );
13616 +
1653 13617 // packages/admin-ui/build-module/navigable-region/index.mjs
1654 - var import_element4 = __toESM(require_element(), 1);
1655 - var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
1656 - var NavigableRegion = (0, import_element4.forwardRef)(
13618 + var import_element47 = __toESM(require_element(), 1);
13619 + var import_jsx_runtime63 = __toESM(require_jsx_runtime(), 1);
13620 + var NavigableRegion = (0, import_element47.forwardRef)(
1657 13621 ({ children, className, ariaLabel, as: Tag = "div", ...props }, ref) => {
1658 - return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
13622 + return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
1659 13623 Tag,
1660 13624 {
1661 13625 ref,
1662 13626 className: clsx_default("admin-ui-navigable-region", className),
@@ -1671,14 +13635,35 @@
1671 13635 );
1672 13636 NavigableRegion.displayName = "NavigableRegion";
1673 13637 var navigable_region_default = NavigableRegion;
1674 13638
13639 + // packages/admin-ui/build-module/admin-theme-colors/index.mjs
13640 + var DEFAULT_THEME_COLORS = {
13641 + primary: "#3858e9",
13642 + background: "#222524"
13643 + };
13644 + var ADMIN_THEME_COLORS = /* @__PURE__ */ new Map([
13645 + ["modern", DEFAULT_THEME_COLORS],
13646 + ["fresh", { primary: "#007cba", background: "#25292b" }],
13647 + ["midnight", { primary: "#cf4339", background: "#3d4042" }],
13648 + ["coffee", { primary: "#916745", background: "#5b534d" }],
13649 + ["ocean", { primary: "#567958", background: "#5f787f" }],
13650 + ["blue", { primary: "#437aa8", background: "#3876a8" }],
13651 + ["ectoplasm", { primary: "#646c3e", background: "#4f386e" }],
13652 + ["sunrise", { primary: "#ad631e", background: "#cc4541" }],
13653 + ["light", { primary: "#007cba", background: "#eaeeed" }]
13654 + ]);
13655 + function getAdminThemeColors() {
13656 + const scheme = document.body.className.match(/admin-color-([\w-]+)/)?.[1] ?? "modern";
13657 + return ADMIN_THEME_COLORS.get(scheme) ?? DEFAULT_THEME_COLORS;
13658 + }
13659 +
1675 13660 // packages/interface/build-module/components/interface-skeleton/index.mjs
1676 - var import_element5 = __toESM(require_element(), 1);
1677 - var import_components6 = __toESM(require_components(), 1);
1678 - var import_i18n2 = __toESM(require_i18n(), 1);
1679 - var import_compose2 = __toESM(require_compose(), 1);
1680 - var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
13661 + var import_element48 = __toESM(require_element(), 1);
13662 + var import_components5 = __toESM(require_components(), 1);
13663 + var import_i18n7 = __toESM(require_i18n(), 1);
13664 + var import_compose4 = __toESM(require_compose(), 1);
13665 + var import_jsx_runtime64 = __toESM(require_jsx_runtime(), 1);
1681 13666 var ANIMATION_DURATION2 = 0.25;
1682 13667 var commonTransition = {
1683 13668 type: "tween",
1684 13669 duration: ANIMATION_DURATION2,
@@ -1684,9 +13669,9 @@
1684 13669 duration: ANIMATION_DURATION2,
1685 13670 ease: [0.6, 0, 0.4, 1]
1686 13671 };
1687 13672 function useHTMLClass(className) {
1688 - (0, import_element5.useEffect)(() => {
13673 + (0, import_element48.useEffect)(() => {
1689 13674 const element = document && document.querySelector(`html:not(.${className})`);
1690 13675 if (!element) {
1691 13676 return;
1692 13677 }
@@ -1733,11 +13718,10 @@
1733 13718 actions,
1734 13719 labels,
1735 13720 className
1736 13721 }, ref) {
1737 - const [secondarySidebarResizeListener, secondarySidebarSize] = (0, import_compose2.useResizeObserver)();
1738 - const isMobileViewport = (0, import_compose2.useViewportMatch)("medium", "<");
1739 - const disableMotion = (0, import_compose2.useReducedMotion)();
13722 + const isMobileViewport = (0, import_compose4.useViewportMatch)("medium", "<");
13723 + const disableMotion = (0, import_compose4.useReducedMotion)();
1740 13724 const defaultTransition = {
1741 13725 type: "tween",
1742 13726 duration: disableMotion ? 0 : ANIMATION_DURATION2,
1743 13727 ease: [0.6, 0, 0.4, 1]
@@ -1744,22 +13728,22 @@
1744 13728 };
1745 13729 useHTMLClass("interface-interface-skeleton__html-container");
1746 13730 const defaultLabels = {
1747 13731 /* translators: accessibility text for the top bar landmark region. */
1748 - header: (0, import_i18n2._x)("Header", "header landmark area"),
13732 + header: (0, import_i18n7._x)("Header", "header landmark area"),
1749 13733 /* translators: accessibility text for the content landmark region. */
1750 - body: (0, import_i18n2.__)("Content"),
13734 + body: (0, import_i18n7.__)("Content"),
1751 13735 /* translators: accessibility text for the secondary sidebar landmark region. */
1752 - secondarySidebar: (0, import_i18n2.__)("Block Library"),
13736 + secondarySidebar: (0, import_i18n7.__)("Block Library"),
1753 13737 /* translators: accessibility text for the settings landmark region. */
1754 - sidebar: (0, import_i18n2._x)("Settings", "settings landmark area"),
13738 + sidebar: (0, import_i18n7._x)("Settings", "settings landmark area"),
1755 13739 /* translators: accessibility text for the publish landmark region. */
1756 - actions: (0, import_i18n2.__)("Publish"),
13740 + actions: (0, import_i18n7.__)("Publish"),
1757 13741 /* translators: accessibility text for the footer landmark region. */
1758 - footer: (0, import_i18n2.__)("Footer")
13742 + footer: (0, import_i18n7.__)("Footer")
1759 13743 };
1760 13744 const mergedLabels = { ...defaultLabels, ...labels };
1761 - return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
13745 + return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
1762 13746 "div",
1763 13747 {
1764 13748 ref,
1765 13749 className: clsx_default(
@@ -1767,13 +13751,13 @@
1767 13751 "interface-interface-skeleton",
1768 13752 !!footer && "has-footer"
1769 13753 ),
1770 13754 children: [
1771 - /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "interface-interface-skeleton__editor", children: [
1772 - /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_components6.__unstableAnimatePresence, { initial: false, children: !!header && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
13755 + /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "interface-interface-skeleton__editor", children: [
13756 + /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_components5.__unstableAnimatePresence, { initial: false, children: !!header && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
1773 13757 navigable_region_default,
1774 13758 {
1775 - as: import_components6.__unstableMotion.div,
13759 + as: import_components5.__unstableMotion.div,
1776 13760 className: "interface-interface-skeleton__header",
1777 13761 ariaLabel: mergedLabels.header,
1778 13762 initial: isDistractionFree && !isMobileViewport ? "distractionFreeHidden" : "hidden",
1779 13763 whileHover: isDistractionFree && !isMobileViewport ? "distractionFreeHover" : "visible",
@@ -1783,32 +13767,30 @@
1783 13767 transition: defaultTransition,
1784 13768 children: header
1785 13769 }
1786 13770 ) }),
1787 - isDistractionFree && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "interface-interface-skeleton__header", children: editorNotices }),
1788 - /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "interface-interface-skeleton__body", children: [
1789 - /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_components6.__unstableAnimatePresence, { initial: false, children: !!secondarySidebar && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
13771 + isDistractionFree && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "interface-interface-skeleton__header", children: editorNotices }),
13772 + /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "interface-interface-skeleton__body", children: [
13773 + /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_components5.__unstableAnimatePresence, { initial: false, children: !!secondarySidebar && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
1790 13774 navigable_region_default,
1791 13775 {
1792 13776 className: "interface-interface-skeleton__secondary-sidebar",
1793 13777 ariaLabel: mergedLabels.secondarySidebar,
1794 - as: import_components6.__unstableMotion.div,
13778 + as: import_components5.__unstableMotion.div,
1795 13779 initial: "closed",
1796 13780 animate: "open",
1797 13781 exit: "closed",
1798 13782 variants: {
1799 - open: { width: secondarySidebarSize.width },
13783 + open: { width: "auto" },
1800 13784 closed: { width: 0 }
1801 13785 },
1802 13786 transition: defaultTransition,
1803 - children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1804 - import_components6.__unstableMotion.div,
13787 + children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
13788 + import_components5.__unstableMotion.div,
1805 13789 {
1806 13790 style: {
1807 - position: "absolute",
1808 - width: isMobileViewport ? "100vw" : "fit-content",
1809 - height: "100%",
1810 - left: 0
13791 + width: isMobileViewport ? "100vw" : "max-content",
13792 + height: "100%"
1811 13793 },
1812 13794 variants: {
1813 13795 open: { x: 0 },
1814 13796 closed: { x: "-100%" }
@@ -1813,17 +13795,14 @@
1813 13795 open: { x: 0 },
1814 13796 closed: { x: "-100%" }
1815 13797 },
1816 13798 transition: defaultTransition,
1817 - children: [
1818 - secondarySidebarResizeListener,
1819 - secondarySidebar
1820 - ]
13799 + children: secondarySidebar
1821 13800 }
1822 13801 )
1823 13802 }
1824 13803 ) }),
1825 - /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
13804 + /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
1826 13805 navigable_region_default,
1827 13806 {
1828 13807 className: "interface-interface-skeleton__content",
1829 13808 ariaLabel: mergedLabels.body,
@@ -1829,9 +13808,9 @@
1829 13808 ariaLabel: mergedLabels.body,
1830 13809 children: content
1831 13810 }
1832 13811 ),
1833 - !!sidebar && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
13812 + !!sidebar && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
1834 13813 navigable_region_default,
1835 13814 {
1836 13815 className: "interface-interface-skeleton__sidebar",
1837 13816 ariaLabel: mergedLabels.sidebar,
@@ -1837,9 +13816,9 @@
1837 13816 ariaLabel: mergedLabels.sidebar,
1838 13817 children: sidebar
1839 13818 }
1840 13819 ),
1841 - !!actions && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
13820 + !!actions && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
1842 13821 navigable_region_default,
1843 13822 {
1844 13823 className: "interface-interface-skeleton__actions",
1845 13824 ariaLabel: mergedLabels.actions,
@@ -1847,9 +13826,9 @@
1847 13826 }
1848 13827 )
1849 13828 ] })
1850 13829 ] }),
1851 - !!footer && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
13830 + !!footer && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
1852 13831 navigable_region_default,
1853 13832 {
1854 13833 className: "interface-interface-skeleton__footer",
1855 13834 ariaLabel: mergedLabels.footer,
@@ -1859,9 +13838,9 @@
1859 13838 ]
1860 13839 }
1861 13840 );
1862 13841 }
1863 - var interface_skeleton_default = (0, import_element5.forwardRef)(InterfaceSkeleton);
13842 + var interface_skeleton_default = (0, import_element48.forwardRef)(InterfaceSkeleton);
1864 13843
1865 13844 // packages/edit-widgets/build-module/store/actions.mjs
1866 13845 var import_widgets2 = __toESM(require_widgets(), 1);
1867 13846 var import_core_data = __toESM(require_core_data(), 1);
@@ -1974,15 +13953,15 @@
1974 13953 return;
1975 13954 }
1976 13955 try {
1977 13956 await dispatch2.saveWidgetAreas(editedWidgetAreas);
1978 - registry.dispatch(import_notices.store).createSuccessNotice((0, import_i18n3.__)("Widgets saved."), {
13957 + registry.dispatch(import_notices.store).createSuccessNotice((0, import_i18n8.__)("Widgets saved."), {
1979 13958 type: "snackbar"
1980 13959 });
1981 13960 } catch (e) {
1982 13961 registry.dispatch(import_notices.store).createErrorNotice(
1983 13962 /* translators: %s: The error message. */
1984 - (0, import_i18n3.sprintf)((0, import_i18n3.__)("There was an error. %s"), e.message),
13963 + (0, import_i18n8.sprintf)((0, import_i18n8.__)("There was an error. %s"), e.message),
1985 13964 {
1986 13965 type: "snackbar"
1987 13966 }
1988 13967 );
@@ -2086,10 +14065,10 @@
2086 14065 for (let i = 0; i < preservedRecords.length; i++) {
2087 14066 const widget = preservedRecords[i];
2088 14067 const { block, position } = batchMeta[i];
2089 14068 post.blocks[position].attributes.__internalWidgetId = widget.id;
2090 - const error = registry.select(import_core_data.store).getLastEntitySaveError("root", "widget", widget.id);
2091 - if (error) {
14069 + const error2 = registry.select(import_core_data.store).getLastEntitySaveError("root", "widget", widget.id);
14070 + if (error2) {
2092 14071 failedWidgetNames.push(block.attributes?.name || block?.name);
2093 14072 }
2094 14073 if (!sidebarWidgetsIds[position]) {
2095 14074 sidebarWidgetsIds[position] = widget.id;
@@ -2096,11 +14075,11 @@
2096 14075 }
2097 14076 }
2098 14077 if (failedWidgetNames.length) {
2099 14078 throw new Error(
2100 - (0, import_i18n3.sprintf)(
14079 + (0, import_i18n8.sprintf)(
2101 14080 /* translators: %s: List of widget names */
2102 - (0, import_i18n3.__)("Could not save the following widgets: %s."),
14081 + (0, import_i18n8.__)("Could not save the following widgets: %s."),
2103 14082 failedWidgetNames.join(", ")
2104 14083 )
2105 14084 );
2106 14085 }
@@ -2226,10 +14205,10 @@
2226 14205 );
2227 14206 }
2228 14207 }
2229 14208 const widgetAreasOpenState2 = {};
2230 - widgetAreaBlocks.forEach((widgetAreaBlock, index) => {
2231 - widgetAreasOpenState2[widgetAreaBlock.clientId] = index === 0;
14209 + widgetAreaBlocks.forEach((widgetAreaBlock, index2) => {
14210 + widgetAreasOpenState2[widgetAreaBlock.clientId] = index2 === 0;
2232 14211 });
2233 14212 dispatch2(setWidgetAreasOpenState(widgetAreasOpenState2));
2234 14213 dispatch2(
2235 14214 persistStubPost(buildWidgetAreasPostId(), widgetAreaBlocks)
@@ -2443,8 +14422,11 @@
2443 14422 var canInsertBlockInWidgetArea = (0, import_data7.createRegistrySelector)(
2444 14423 (select) => (state, blockName) => {
2445 14424 const widgetAreas = select(import_block_editor2.store).getBlocks();
2446 14425 const [firstWidgetArea] = widgetAreas;
14426 + if (!firstWidgetArea) {
14427 + return false;
14428 + }
2447 14429 return select(import_block_editor2.store).canInsertBlockType(
2448 14430 blockName,
2449 14431 firstWidgetArea.clientId
2450 14432 );
@@ -2470,10 +14452,10 @@
2470 14452 return state.inserterSidebarToggleRef;
2471 14453 }
2472 14454
2473 14455 // packages/edit-widgets/build-module/lock-unlock.mjs
2474 - var import_private_apis = __toESM(require_private_apis(), 1);
2475 - var { lock, unlock } = (0, import_private_apis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
14456 + var import_private_apis2 = __toESM(require_private_apis(), 1);
14457 + var { lock: lock2, unlock: unlock2 } = (0, import_private_apis2.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
2476 14458 "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
2477 14459 "@wordpress/edit-widgets"
2478 14460 );
2479 14461
@@ -2491,18 +14473,18 @@
2491 14473 return Promise.resolve({});
2492 14474 }
2493 14475 return next(options);
2494 14476 });
2495 - unlock(store2).registerPrivateSelectors(private_selectors_exports);
14477 + unlock2(store2).registerPrivateSelectors(private_selectors_exports);
2496 14478
2497 14479 // packages/edit-widgets/build-module/filters/move-to-widget-area.mjs
2498 14480 var import_block_editor3 = __toESM(require_block_editor(), 1);
2499 - var import_compose3 = __toESM(require_compose(), 1);
14481 + var import_compose5 = __toESM(require_compose(), 1);
2500 14482 var import_data9 = __toESM(require_data(), 1);
2501 14483 var import_hooks = __toESM(require_hooks(), 1);
2502 14484 var import_widgets4 = __toESM(require_widgets(), 1);
2503 - var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
2504 - var withMoveToWidgetAreaToolbarItem = (0, import_compose3.createHigherOrderComponent)(
14485 + var import_jsx_runtime65 = __toESM(require_jsx_runtime(), 1);
14486 + var withMoveToWidgetAreaToolbarItem = (0, import_compose5.createHigherOrderComponent)(
2505 14487 (BlockEdit) => (props) => {
2506 14488 const { clientId, name: blockName } = props;
2507 14489 const { widgetAreas, currentWidgetAreaId, canInsertBlockInWidgetArea: canInsertBlockInWidgetArea2 } = (0, import_data9.useSelect)(
2508 14490 (select) => {
@@ -2508,14 +14490,14 @@
2508 14490 (select) => {
2509 14491 if (blockName === "core/widget-area") {
2510 14492 return {};
2511 14493 }
2512 - const selectors = select(store2);
2513 - const widgetAreaBlock = selectors.getParentWidgetAreaBlock(clientId);
14494 + const selectors3 = select(store2);
14495 + const widgetAreaBlock = selectors3.getParentWidgetAreaBlock(clientId);
2514 14496 return {
2515 - widgetAreas: selectors.getWidgetAreas(),
14497 + widgetAreas: selectors3.getWidgetAreas(),
2516 14498 currentWidgetAreaId: widgetAreaBlock?.attributes?.id,
2517 - canInsertBlockInWidgetArea: selectors.canInsertBlockInWidgetArea(blockName)
14499 + canInsertBlockInWidgetArea: selectors3.canInsertBlockInWidgetArea(blockName)
2518 14500 };
2519 14501 },
2520 14502 [clientId, blockName]
2521 14503 );
@@ -2521,11 +14503,11 @@
2521 14503 );
2522 14504 const { moveBlockToWidgetArea: moveBlockToWidgetArea2 } = (0, import_data9.useDispatch)(store2);
2523 14505 const hasMultipleWidgetAreas = widgetAreas?.length > 1;
2524 14506 const isMoveToWidgetAreaVisible = blockName !== "core/widget-area" && hasMultipleWidgetAreas && canInsertBlockInWidgetArea2;
2525 - return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
2526 - /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(BlockEdit, { ...props }, "edit"),
2527 - isMoveToWidgetAreaVisible && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_block_editor3.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
14507 + return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
14508 + /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(BlockEdit, { ...props }, "edit"),
14509 + isMoveToWidgetAreaVisible && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_block_editor3.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
2528 14510 import_widgets4.MoveToWidgetArea,
2529 14511 {
2530 14512 widgetAreas,
2531 14513 currentWidgetAreaId,
@@ -2563,9 +14545,9 @@
2563 14545 metadata: () => block_default,
2564 14546 name: () => name,
2565 14547 settings: () => settings
2566 14548 });
2567 - var import_i18n4 = __toESM(require_i18n(), 1);
14549 + var import_i18n9 = __toESM(require_i18n(), 1);
2568 14550
2569 14551 // packages/edit-widgets/build-module/blocks/widget-area/block.json
2570 14552 var block_default = {
2571 14553 $schema: "https://schemas.wp.org/trunk/block.json",
@@ -2596,25 +14578,25 @@
2596 14578 style: "wp-block-widget-area"
2597 14579 };
2598 14580
2599 14581 // packages/edit-widgets/build-module/blocks/widget-area/edit/index.mjs
2600 - var import_element8 = __toESM(require_element(), 1);
14582 + var import_element51 = __toESM(require_element(), 1);
2601 14583 var import_data10 = __toESM(require_data(), 1);
2602 14584 var import_core_data5 = __toESM(require_core_data(), 1);
2603 - var import_components7 = __toESM(require_components(), 1);
14585 + var import_components6 = __toESM(require_components(), 1);
2604 14586 var import_block_editor5 = __toESM(require_block_editor(), 1);
2605 14587
2606 14588 // packages/edit-widgets/build-module/blocks/widget-area/edit/inner-blocks.mjs
2607 14589 var import_core_data4 = __toESM(require_core_data(), 1);
2608 14590 var import_block_editor4 = __toESM(require_block_editor(), 1);
2609 - var import_element7 = __toESM(require_element(), 1);
14591 + var import_element50 = __toESM(require_element(), 1);
2610 14592
2611 14593 // packages/edit-widgets/build-module/blocks/widget-area/edit/use-is-dragging-within.mjs
2612 - var import_element6 = __toESM(require_element(), 1);
14594 + var import_element49 = __toESM(require_element(), 1);
2613 14595 var useIsDraggingWithin = (elementRef) => {
2614 - const [isDraggingWithin, setIsDraggingWithin] = (0, import_element6.useState)(false);
2615 - (0, import_element6.useEffect)(() => {
2616 - const { ownerDocument } = elementRef.current;
14596 + const [isDraggingWithin, setIsDraggingWithin] = (0, import_element49.useState)(false);
14597 + (0, import_element49.useEffect)(() => {
14598 + const { ownerDocument: ownerDocument2 } = elementRef.current;
2617 14599 function handleDragStart(event) {
2618 14600 handleDragEnter(event);
2619 14601 }
2620 14602 function handleDragEnd() {
@@ -2626,15 +14608,15 @@
2626 14608 } else {
2627 14609 setIsDraggingWithin(false);
2628 14610 }
2629 14611 }
2630 - ownerDocument.addEventListener("dragstart", handleDragStart);
2631 - ownerDocument.addEventListener("dragend", handleDragEnd);
2632 - ownerDocument.addEventListener("dragenter", handleDragEnter);
14612 + ownerDocument2.addEventListener("dragstart", handleDragStart);
14613 + ownerDocument2.addEventListener("dragend", handleDragEnd);
14614 + ownerDocument2.addEventListener("dragenter", handleDragEnter);
2633 14615 return () => {
2634 - ownerDocument.removeEventListener("dragstart", handleDragStart);
2635 - ownerDocument.removeEventListener("dragend", handleDragEnd);
2636 - ownerDocument.removeEventListener("dragenter", handleDragEnter);
14616 + ownerDocument2.removeEventListener("dragstart", handleDragStart);
14617 + ownerDocument2.removeEventListener("dragend", handleDragEnd);
14618 + ownerDocument2.removeEventListener("dragenter", handleDragEnter);
2637 14619 };
2638 14620 }, []);
2639 14621 return isDraggingWithin;
2640 14622 };
@@ -2640,15 +14622,15 @@
2640 14622 };
2641 14623 var use_is_dragging_within_default = useIsDraggingWithin;
2642 14624
2643 14625 // packages/edit-widgets/build-module/blocks/widget-area/edit/inner-blocks.mjs
2644 - var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
14626 + var import_jsx_runtime66 = __toESM(require_jsx_runtime(), 1);
2645 14627 function WidgetAreaInnerBlocks({ id }) {
2646 14628 const [blocks, onInput, onChange] = (0, import_core_data4.useEntityBlockEditor)(
2647 14629 "root",
2648 14630 "postType"
2649 14631 );
2650 - const innerBlocksRef = (0, import_element7.useRef)();
14632 + const innerBlocksRef = (0, import_element50.useRef)();
2651 14633 const isDraggingWithinInnerBlocks = use_is_dragging_within_default(innerBlocksRef);
2652 14634 const shouldHighlightDropZone = isDraggingWithinInnerBlocks;
2653 14635 const innerBlocksProps = (0, import_block_editor4.useInnerBlocksProps)(
2654 14636 { ref: innerBlocksRef },
@@ -2659,9 +14641,9 @@
2659 14641 templateLock: false,
2660 14642 renderAppender: import_block_editor4.InnerBlocks.ButtonBlockAppender
2661 14643 }
2662 14644 );
2663 - return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
14645 + return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
2664 14646 "div",
2665 14647 {
2666 14648 "data-widget-area-id": id,
2667 14649 className: clsx_default(
@@ -2669,15 +14651,15 @@
2669 14651 {
2670 14652 "wp-block-widget-area__highlight-drop-zone": shouldHighlightDropZone
2671 14653 }
2672 14654 ),
2673 - children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { ...innerBlocksProps })
14655 + children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { ...innerBlocksProps })
2674 14656 }
2675 14657 );
2676 14658 }
2677 14659
2678 14660 // packages/edit-widgets/build-module/blocks/widget-area/edit/index.mjs
2679 - var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
14661 + var import_jsx_runtime67 = __toESM(require_jsx_runtime(), 1);
2680 14662 function WidgetAreaEdit({
2681 14663 clientId,
2682 14664 attributes: { id, name: name2 }
2683 14665 }) {
@@ -2685,17 +14667,17 @@
2685 14667 (select) => select(store2).getIsWidgetAreaOpen(clientId),
2686 14668 [clientId]
2687 14669 );
2688 14670 const { setIsWidgetAreaOpen: setIsWidgetAreaOpen2 } = (0, import_data10.useDispatch)(store2);
2689 - const wrapper = (0, import_element8.useRef)();
2690 - const setOpen = (0, import_element8.useCallback)(
14671 + const wrapper = (0, import_element51.useRef)();
14672 + const setOpen = (0, import_element51.useCallback)(
2691 14673 (openState) => setIsWidgetAreaOpen2(clientId, openState),
2692 14674 [clientId]
2693 14675 );
2694 14676 const isDragging = useIsDragging(wrapper);
2695 14677 const isDraggingWithin = use_is_dragging_within_default(wrapper);
2696 - const [openedWhileDragging, setOpenedWhileDragging] = (0, import_element8.useState)(false);
2697 - (0, import_element8.useEffect)(() => {
14678 + const [openedWhileDragging, setOpenedWhileDragging] = (0, import_element51.useState)(false);
14679 + (0, import_element51.useEffect)(() => {
2698 14680 if (!isDragging) {
2699 14681 setOpenedWhileDragging(false);
2700 14682 return;
2701 14683 }
@@ -2706,10 +14688,10 @@
2706 14688 setOpen(false);
2707 14689 }
2708 14690 }, [isOpen, isDragging, isDraggingWithin, openedWhileDragging]);
2709 14691 const blockProps = (0, import_block_editor5.useBlockProps)();
2710 - return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_components7.Panel, { ref: wrapper, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2711 - import_components7.PanelBody,
14692 + return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_components6.Panel, { ref: wrapper, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
14693 + import_components6.PanelBody,
2712 14694 {
2713 14695 title: name2,
2714 14696 opened: isOpen,
2715 14697 onToggle: () => {
@@ -2720,20 +14702,20 @@
2720 14702 // This is required to ensure LegacyWidget blocks are not
2721 14703 // unmounted when the panel is collapsed. Unmounting legacy
2722 14704 // widgets may have unintended consequences (e.g. TinyMCE
2723 14705 // not being properly reinitialized)
2724 - /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2725 - import_components7.__unstableDisclosureContent,
14706 + /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
14707 + import_components6.__unstableDisclosureContent,
2726 14708 {
2727 14709 className: "wp-block-widget-area__panel-body-content",
2728 14710 visible: opened,
2729 - children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
14711 + children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
2730 14712 import_core_data5.EntityProvider,
2731 14713 {
2732 14714 kind: "root",
2733 14715 type: "postType",
2734 14716 id: `widget-area-${id}`,
2735 - children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(WidgetAreaInnerBlocks, { id })
14717 + children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(WidgetAreaInnerBlocks, { id })
2736 14718 }
2737 14719 )
2738 14720 }
2739 14721 )
@@ -2741,11 +14723,11 @@
2741 14723 }
2742 14724 ) }) });
2743 14725 }
2744 14726 var useIsDragging = (elementRef) => {
2745 - const [isDragging, setIsDragging] = (0, import_element8.useState)(false);
2746 - (0, import_element8.useEffect)(() => {
2747 - const { ownerDocument } = elementRef.current;
14727 + const [isDragging, setIsDragging] = (0, import_element51.useState)(false);
14728 + (0, import_element51.useEffect)(() => {
14729 + const { ownerDocument: ownerDocument2 } = elementRef.current;
2748 14730 function handleDragStart() {
2749 14731 setIsDragging(true);
2750 14732 }
2751 14733 function handleDragEnd() {
@@ -2750,13 +14732,13 @@
2750 14732 }
2751 14733 function handleDragEnd() {
2752 14734 setIsDragging(false);
2753 14735 }
2754 - ownerDocument.addEventListener("dragstart", handleDragStart);
2755 - ownerDocument.addEventListener("dragend", handleDragEnd);
14736 + ownerDocument2.addEventListener("dragstart", handleDragStart);
14737 + ownerDocument2.addEventListener("dragend", handleDragEnd);
2756 14738 return () => {
2757 - ownerDocument.removeEventListener("dragstart", handleDragStart);
2758 - ownerDocument.removeEventListener("dragend", handleDragEnd);
14739 + ownerDocument2.removeEventListener("dragstart", handleDragStart);
14740 + ownerDocument2.removeEventListener("dragend", handleDragEnd);
2759 14741 };
2760 14742 }, []);
2761 14743 return isDragging;
2762 14744 };
@@ -2763,63 +14745,158 @@
2763 14745
2764 14746 // packages/edit-widgets/build-module/blocks/widget-area/index.mjs
2765 14747 var { name } = block_default;
2766 14748 var settings = {
2767 - title: (0, import_i18n4.__)("Widget Area"),
2768 - description: (0, import_i18n4.__)("A widget area container."),
14749 + title: (0, import_i18n9.__)("Widget Area"),
14750 + description: (0, import_i18n9.__)("A widget area container."),
2769 14751 __experimentalLabel: ({ name: label }) => label,
14752 + icon: layout_default,
2770 14753 edit: WidgetAreaEdit
2771 14754 };
2772 14755
2773 14756 // packages/edit-widgets/build-module/components/layout/index.mjs
2774 - var import_i18n21 = __toESM(require_i18n(), 1);
2775 - var import_data31 = __toESM(require_data(), 1);
14757 + var import_i18n26 = __toESM(require_i18n(), 1);
14758 + var import_element69 = __toESM(require_element(), 1);
14759 + var import_data32 = __toESM(require_data(), 1);
2776 14760 var import_plugins3 = __toESM(require_plugins(), 1);
2777 14761 var import_notices4 = __toESM(require_notices(), 1);
2778 - var import_components22 = __toESM(require_components(), 1);
14762 + var import_components20 = __toESM(require_components(), 1);
14763 + var import_theme2 = __toESM(require_theme(), 1);
2779 14764
2780 14765 // packages/edit-widgets/build-module/components/error-boundary/index.mjs
2781 - var import_element9 = __toESM(require_element(), 1);
2782 - var import_i18n5 = __toESM(require_i18n(), 1);
2783 - var import_components8 = __toESM(require_components(), 1);
2784 - var import_block_editor6 = __toESM(require_block_editor(), 1);
2785 - var import_compose4 = __toESM(require_compose(), 1);
14766 + var import_element52 = __toESM(require_element(), 1);
14767 + var import_i18n10 = __toESM(require_i18n(), 1);
14768 + var import_compose6 = __toESM(require_compose(), 1);
2786 14769 var import_hooks3 = __toESM(require_hooks(), 1);
2787 - var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
2788 - function CopyButton({ text, children }) {
2789 - const ref = (0, import_compose4.useCopyToClipboard)(text);
2790 - return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_components8.Button, { __next40pxDefaultSize: true, variant: "secondary", ref, children });
14770 + var import_jsx_runtime68 = __toESM(require_jsx_runtime(), 1);
14771 + function getErrorName(error2) {
14772 + return error2 instanceof Error && error2.name || "Error";
2791 14773 }
2792 - function ErrorBoundaryWarning({ message, error }) {
2793 - const actions = [
2794 - /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(CopyButton, { text: error.stack, children: (0, import_i18n5.__)("Copy Error") }, "copy-error")
14774 + function getErrorMessage(error2) {
14775 + if (typeof error2 === "string" && error2) {
14776 + return error2;
14777 + }
14778 + if (typeof error2?.message === "string" && error2.message) {
14779 + return error2.message;
14780 + }
14781 + return "An unknown error occurred.";
14782 + }
14783 + function getErrorSections(error2, componentStack) {
14784 + const sections = [
14785 + { label: getErrorName(error2), content: getErrorMessage(error2) }
2795 14786 ];
2796 - return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_block_editor6.Warning, { className: "edit-widgets-error-boundary", actions, children: message });
14787 + if (error2?.stack) {
14788 + sections.push({
14789 + label: "Stack",
14790 + content: error2.stack.trim(),
14791 + preformatted: true
14792 + });
14793 + }
14794 + if (componentStack) {
14795 + sections.push({
14796 + label: "Component stack",
14797 + content: componentStack.trim(),
14798 + preformatted: true
14799 + });
14800 + }
14801 + sections.push({
14802 + label: "Environment",
14803 + content: `User agent: ${window.navigator.userAgent}`,
14804 + preformatted: true
14805 + });
14806 + return sections;
2797 14807 }
2798 - var ErrorBoundary = class extends import_element9.Component {
14808 + function getErrorReport(error2, componentStack) {
14809 + const sections = getErrorSections(error2, componentStack).map(
14810 + ({ label, content, preformatted }) => `**${label}**
14811 +
14812 +${preformatted ? `\`\`\`
14813 +${content}
14814 +\`\`\`` : content}`
14815 + );
14816 + return ["### Error report", ...sections].join("\n\n");
14817 + }
14818 + function CopyButton({ text, children, variant = "outline" }) {
14819 + const ref = (0, import_compose6.useCopyToClipboard)(text);
14820 + return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(notice_exports.ActionButton, { variant, ref, children });
14821 + }
14822 + function ErrorReport({ error: error2, componentStack }) {
14823 + return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
14824 + Stack,
14825 + {
14826 + className: "edit-widgets-error-boundary__report",
14827 + direction: "column",
14828 + gap: "md",
14829 + children: getErrorSections(error2, componentStack).map(
14830 + ({ label, content }) => /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(Stack, { direction: "column", gap: "xs", children: [
14831 + /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Text, { variant: "heading-md", children: label }),
14832 + /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("pre", { className: "edit-widgets-error-boundary__report-section", children: content })
14833 + ] }, label)
14834 + )
14835 + }
14836 + );
14837 + }
14838 + function ErrorDetails({ error: error2, componentStack }) {
14839 + return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(collapsible_card_exports.Root, { className: "edit-widgets-error-boundary__details", children: [
14840 + /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(collapsible_card_exports.Header, { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(card_exports.Title, { children: (0, import_i18n10.__)("Error details") }) }),
14841 + /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(collapsible_card_exports.Content, { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
14842 + ErrorReport,
14843 + {
14844 + error: error2,
14845 + componentStack
14846 + }
14847 + ) })
14848 + ] });
14849 + }
14850 + var ErrorBoundary = class extends import_element52.Component {
2799 14851 constructor() {
2800 14852 super(...arguments);
2801 14853 this.state = {
2802 - error: null
14854 + error: null,
14855 + componentStack: null
2803 14856 };
2804 14857 }
2805 - componentDidCatch(error) {
2806 - (0, import_hooks3.doAction)("editor.ErrorBoundary.errorLogged", error);
14858 + componentDidCatch(error2, errorInfo) {
14859 + this.setState({ componentStack: errorInfo?.componentStack });
14860 + (0, import_hooks3.doAction)("editor.ErrorBoundary.errorLogged", error2, errorInfo);
2807 14861 }
2808 - static getDerivedStateFromError(error) {
2809 - return { error };
14862 + static getDerivedStateFromError(error2) {
14863 + return { error: error2 };
2810 14864 }
2811 14865 render() {
2812 - if (!this.state.error) {
14866 + const { error: error2, componentStack } = this.state;
14867 + if (!error2) {
2813 14868 return this.props.children;
2814 14869 }
2815 - return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2816 - ErrorBoundaryWarning,
14870 + return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
14871 + Stack,
2817 14872 {
2818 - message: (0, import_i18n5.__)(
2819 - "The editor has encountered an unexpected error."
2820 - ),
2821 - error: this.state.error
14873 + className: "edit-widgets-error-boundary",
14874 + direction: "column",
14875 + gap: "lg",
14876 + children: [
14877 + /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(notice_exports.Root, { intent: "error", children: [
14878 + /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(notice_exports.Title, { children: (0, import_i18n10.__)("The editor has crashed") }),
14879 + /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(notice_exports.Description, { children: (0, import_i18n10.__)(
14880 + "An unknown error occurred. Reload your browser to try again, or copy the error to report the problem or search."
14881 + ) }),
14882 + /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(notice_exports.Actions, { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
14883 + CopyButton,
14884 + {
14885 + variant: "solid",
14886 + text: () => getErrorReport(error2, componentStack),
14887 + children: (0, import_i18n10.__)("Copy error")
14888 + }
14889 + ) })
14890 + ] }),
14891 + true ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
14892 + ErrorDetails,
14893 + {
14894 + error: error2,
14895 + componentStack
14896 + }
14897 + ) : null
14898 + ]
2822 14899 }
2823 14900 );
2824 14901 }
2825 14902 };
@@ -2824,34 +14901,41 @@
2824 14901 }
2825 14902 };
2826 14903
2827 14904 // packages/edit-widgets/build-module/components/widget-areas-block-editor-provider/index.mjs
2828 - var import_components9 = __toESM(require_components(), 1);
2829 - var import_compose5 = __toESM(require_compose(), 1);
14905 + var import_components7 = __toESM(require_components(), 1);
14906 + var import_compose7 = __toESM(require_compose(), 1);
2830 14907 var import_media_utils2 = __toESM(require_media_utils(), 1);
2831 14908 var import_data13 = __toESM(require_data(), 1);
2832 14909 var import_core_data8 = __toESM(require_core_data(), 1);
2833 - var import_element11 = __toESM(require_element(), 1);
14910 + var import_element54 = __toESM(require_element(), 1);
2834 14911 var import_block_editor8 = __toESM(require_block_editor(), 1);
2835 14912 var import_patterns = __toESM(require_patterns(), 1);
2836 14913 var import_preferences4 = __toESM(require_preferences(), 1);
2837 - var import_block_library = __toESM(require_block_library(), 1);
2838 14914
2839 14915 // packages/edit-widgets/build-module/components/keyboard-shortcuts/index.mjs
2840 - var import_element10 = __toESM(require_element(), 1);
14916 + var import_element53 = __toESM(require_element(), 1);
2841 14917 var import_keyboard_shortcuts = __toESM(require_keyboard_shortcuts(), 1);
2842 14918 var import_keycodes = __toESM(require_keycodes(), 1);
2843 14919 var import_data11 = __toESM(require_data(), 1);
2844 - var import_i18n6 = __toESM(require_i18n(), 1);
14920 + var import_i18n11 = __toESM(require_i18n(), 1);
2845 14921 var import_core_data6 = __toESM(require_core_data(), 1);
14922 + var import_block_editor6 = __toESM(require_block_editor(), 1);
14923 + var { usesNativeUndo } = unlock2(import_block_editor6.privateApis);
2846 14924 function KeyboardShortcuts() {
2847 14925 const { redo, undo } = (0, import_data11.useDispatch)(import_core_data6.store);
2848 14926 const { saveEditedWidgetAreas: saveEditedWidgetAreas2 } = (0, import_data11.useDispatch)(store2);
2849 14927 (0, import_keyboard_shortcuts.useShortcut)("core/edit-widgets/undo", (event) => {
14928 + if (usesNativeUndo(event)) {
14929 + return;
14930 + }
2850 14931 undo();
2851 14932 event.preventDefault();
2852 14933 });
2853 14934 (0, import_keyboard_shortcuts.useShortcut)("core/edit-widgets/redo", (event) => {
14935 + if (usesNativeUndo(event)) {
14936 + return;
14937 + }
2854 14938 redo();
2855 14939 event.preventDefault();
2856 14940 });
2857 14941 (0, import_keyboard_shortcuts.useShortcut)("core/edit-widgets/save", (event) => {
@@ -2861,13 +14945,13 @@
2861 14945 return null;
2862 14946 }
2863 14947 function KeyboardShortcutsRegister() {
2864 14948 const { registerShortcut } = (0, import_data11.useDispatch)(import_keyboard_shortcuts.store);
2865 - (0, import_element10.useEffect)(() => {
14949 + (0, import_element53.useEffect)(() => {
2866 14950 registerShortcut({
2867 14951 name: "core/edit-widgets/undo",
2868 14952 category: "global",
2869 - description: (0, import_i18n6.__)("Undo your last changes."),
14953 + description: (0, import_i18n11.__)("Undo your last changes."),
2870 14954 keyCombination: {
2871 14955 modifier: "primary",
2872 14956 character: "z"
2873 14957 }
@@ -2874,9 +14958,9 @@
2874 14958 });
2875 14959 registerShortcut({
2876 14960 name: "core/edit-widgets/redo",
2877 14961 category: "global",
2878 - description: (0, import_i18n6.__)("Redo your last undo."),
14962 + description: (0, import_i18n11.__)("Redo your last undo."),
2879 14963 keyCombination: {
2880 14964 modifier: "primaryShift",
2881 14965 character: "z"
2882 14966 },
@@ -2893,9 +14977,9 @@
2893 14977 });
2894 14978 registerShortcut({
2895 14979 name: "core/edit-widgets/save",
2896 14980 category: "global",
2897 - description: (0, import_i18n6.__)("Save your changes."),
14981 + description: (0, import_i18n11.__)("Save your changes."),
2898 14982 keyCombination: {
2899 14983 modifier: "primary",
2900 14984 character: "s"
2901 14985 }
@@ -2902,9 +14986,9 @@
2902 14986 });
2903 14987 registerShortcut({
2904 14988 name: "core/edit-widgets/keyboard-shortcuts",
2905 14989 category: "main",
2906 - description: (0, import_i18n6.__)("Display these keyboard shortcuts."),
14990 + description: (0, import_i18n11.__)("Display these keyboard shortcuts."),
2907 14991 keyCombination: {
2908 14992 modifier: "access",
2909 14993 character: "h"
2910 14994 }
@@ -2911,9 +14995,9 @@
2911 14995 });
2912 14996 registerShortcut({
2913 14997 name: "core/edit-widgets/next-region",
2914 14998 category: "global",
2915 - description: (0, import_i18n6.__)("Navigate to the next part of the editor."),
14999 + description: (0, import_i18n11.__)("Navigate to the next part of the editor."),
2916 15000 keyCombination: {
2917 15001 modifier: "ctrl",
2918 15002 character: "`"
2919 15003 },
@@ -2926,9 +15010,9 @@
2926 15010 });
2927 15011 registerShortcut({
2928 15012 name: "core/edit-widgets/previous-region",
2929 15013 category: "global",
2930 - description: (0, import_i18n6.__)("Navigate to the previous part of the editor."),
15014 + description: (0, import_i18n11.__)("Navigate to the previous part of the editor."),
2931 15015 keyCombination: {
2932 15016 modifier: "ctrlShift",
2933 15017 character: "`"
2934 15018 },
@@ -2979,12 +15063,11 @@
2979 15063 var ALLOW_REUSABLE_BLOCKS = false;
2980 15064 var ENABLE_EXPERIMENTAL_FSE_BLOCKS = false;
2981 15065
2982 15066 // packages/edit-widgets/build-module/components/widget-areas-block-editor-provider/index.mjs
2983 - var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
2984 - var { ExperimentalBlockEditorProvider } = unlock(import_block_editor8.privateApis);
2985 - var { PatternsMenuItems } = unlock(import_patterns.privateApis);
2986 - var { BlockKeyboardShortcuts } = unlock(import_block_library.privateApis);
15067 + var import_jsx_runtime69 = __toESM(require_jsx_runtime(), 1);
15068 + var { ExperimentalBlockEditorProvider } = unlock2(import_block_editor8.privateApis);
15069 + var { PatternsMenuItems } = unlock2(import_patterns.privateApis);
2987 15070 var EMPTY_ARRAY2 = [];
2988 15071 function WidgetAreasBlockEditorProvider({
2989 15072 blockEditorSettings,
2990 15073 children,
@@ -2989,9 +15072,9 @@
2989 15072 blockEditorSettings,
2990 15073 children,
2991 15074 ...props
2992 15075 }) {
2993 - const isLargeViewport = (0, import_compose5.useViewportMatch)("medium");
15076 + const isLargeViewport = (0, import_compose7.useViewportMatch)("medium");
2994 15077 const {
2995 15078 hasUploadPermissions,
2996 15079 reusableBlocks,
2997 15080 isFixedToolbarActive,
@@ -3022,9 +15105,9 @@
3022 15105 pageForPosts: siteSettings?.page_for_posts
3023 15106 };
3024 15107 }, []);
3025 15108 const { setIsInserterOpened: setIsInserterOpened2 } = (0, import_data13.useDispatch)(store2);
3026 - const settings2 = (0, import_element11.useMemo)(() => {
15109 + const settings2 = (0, import_element54.useMemo)(() => {
3027 15110 let mediaUploadBlockEditor;
3028 15111 if (hasUploadPermissions) {
3029 15112 mediaUploadBlockEditor = ({ onError, ...argumentsObject }) => {
3030 15113 (0, import_media_utils2.uploadMedia)({
@@ -3042,10 +15125,9 @@
3042 15125 mediaUpload: mediaUploadBlockEditor,
3043 15126 templateLock: "all",
3044 15127 __experimentalSetIsInserterOpened: setIsInserterOpened2,
3045 15128 pageOnFront,
3046 - pageForPosts,
3047 - editorTool: "edit"
15129 + pageForPosts
3048 15130 };
3049 15131 }, [
3050 15132 hasUploadPermissions,
3051 15133 blockEditorSettings,
@@ -3062,12 +15144,11 @@
3062 15144 KIND,
3063 15145 POST_TYPE,
3064 15146 { id: buildWidgetAreasPostId() }
3065 15147 );
3066 - return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_components9.SlotFillProvider, { children: [
3067 - /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(keyboard_shortcuts_default.Register, {}),
3068 - /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(BlockKeyboardShortcuts, {}),
3069 - /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
15148 + return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_components7.SlotFillProvider, { children: [
15149 + /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(keyboard_shortcuts_default.Register, {}),
15150 + /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
3070 15151 ExperimentalBlockEditorProvider,
3071 15152 {
3072 15153 value: blocks,
3073 15154 onInput,
@@ -3076,9 +15157,9 @@
3076 15157 useSubRegistry: false,
3077 15158 ...props,
3078 15159 children: [
3079 15160 children,
3080 - /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(PatternsMenuItems, { rootClientId: widgetAreaId })
15161 + /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(PatternsMenuItems, { rootClientId: widgetAreaId })
3081 15162 ]
3082 15163 }
3083 15164 )
3084 15165 ] });
@@ -3084,29 +15165,29 @@
3084 15165 ] });
3085 15166 }
3086 15167
3087 15168 // packages/edit-widgets/build-module/components/sidebar/index.mjs
3088 - var import_element13 = __toESM(require_element(), 1);
3089 - var import_i18n8 = __toESM(require_i18n(), 1);
15169 + var import_element56 = __toESM(require_element(), 1);
15170 + var import_i18n13 = __toESM(require_i18n(), 1);
3090 15171 var import_block_editor10 = __toESM(require_block_editor(), 1);
3091 - var import_components11 = __toESM(require_components(), 1);
15172 + var import_components9 = __toESM(require_components(), 1);
3092 15173 var import_data15 = __toESM(require_data(), 1);
3093 15174
3094 15175 // packages/edit-widgets/build-module/components/sidebar/widget-areas.mjs
3095 15176 var import_data14 = __toESM(require_data(), 1);
3096 - var import_element12 = __toESM(require_element(), 1);
15177 + var import_element55 = __toESM(require_element(), 1);
3097 15178 var import_block_editor9 = __toESM(require_block_editor(), 1);
3098 - var import_components10 = __toESM(require_components(), 1);
3099 - var import_i18n7 = __toESM(require_i18n(), 1);
15179 + var import_components8 = __toESM(require_components(), 1);
15180 + var import_i18n12 = __toESM(require_i18n(), 1);
3100 15181 var import_url = __toESM(require_url(), 1);
3101 - var import_dom = __toESM(require_dom(), 1);
3102 - var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
15182 + var import_dom21 = __toESM(require_dom(), 1);
15183 + var import_jsx_runtime70 = __toESM(require_jsx_runtime(), 1);
3103 15184 function WidgetAreas({ selectedWidgetAreaId }) {
3104 15185 const widgetAreas = (0, import_data14.useSelect)(
3105 15186 (select) => select(store2).getWidgetAreas(),
3106 15187 []
3107 15188 );
3108 - const selectedWidgetArea = (0, import_element12.useMemo)(
15189 + const selectedWidgetArea = (0, import_element55.useMemo)(
3109 15190 () => selectedWidgetAreaId && widgetAreas?.find(
3110 15191 (widgetArea) => widgetArea.id === selectedWidgetAreaId
3111 15192 ),
3112 15193 [selectedWidgetAreaId, widgetAreas]
@@ -3112,35 +15193,35 @@
3112 15193 [selectedWidgetAreaId, widgetAreas]
3113 15194 );
3114 15195 let description;
3115 15196 if (!selectedWidgetArea) {
3116 - description = (0, import_i18n7.__)(
15197 + description = (0, import_i18n12.__)(
3117 15198 // eslint-disable-next-line no-restricted-syntax -- 'sidebar' is a common web design term for layouts
3118 15199 "Widget Areas are global parts in your site\u2019s layout that can accept blocks. These vary by theme, but are typically parts like your Sidebar or Footer."
3119 15200 );
3120 15201 } else if (selectedWidgetAreaId === "wp_inactive_widgets") {
3121 - description = (0, import_i18n7.__)(
15202 + description = (0, import_i18n12.__)(
3122 15203 "Blocks in this Widget Area will not be displayed in your site."
3123 15204 );
3124 15205 } else {
3125 15206 description = selectedWidgetArea.description;
3126 15207 }
3127 - return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "edit-widgets-widget-areas", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "edit-widgets-widget-areas__top-container", children: [
3128 - /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_block_editor9.BlockIcon, { icon: block_default_default }),
3129 - /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { children: [
3130 - /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
15208 + return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "edit-widgets-widget-areas", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "edit-widgets-widget-areas__top-container", children: [
15209 + /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_block_editor9.BlockIcon, { icon: layout_default }),
15210 + /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { children: [
15211 + /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
3131 15212 "p",
3132 15213 {
3133 15214 dangerouslySetInnerHTML: {
3134 - __html: (0, import_dom.safeHTML)(description)
15215 + __html: (0, import_dom21.safeHTML)(description)
3135 15216 }
3136 15217 }
3137 15218 ),
3138 - widgetAreas?.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { children: (0, import_i18n7.__)(
15219 + widgetAreas?.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("p", { children: (0, import_i18n12.__)(
3139 15220 "Your theme does not contain any Widget Areas."
3140 15221 ) }),
3141 - !selectedWidgetArea && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3142 - import_components10.Button,
15222 + !selectedWidgetArea && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
15223 + import_components8.Button,
3143 15224 {
3144 15225 __next40pxDefaultSize: true,
3145 15226 href: (0, import_url.addQueryArgs)("customize.php", {
3146 15227 "autofocus[panel]": "widgets",
@@ -3146,9 +15227,9 @@
3146 15227 "autofocus[panel]": "widgets",
3147 15228 return: window.location.pathname
3148 15229 }),
3149 15230 variant: "tertiary",
3150 - children: (0, import_i18n7.__)("Manage with live preview")
15231 + children: (0, import_i18n12.__)("Manage with live preview")
3151 15232 }
3152 15233 )
3153 15234 ] })
3154 15235 ] }) });
@@ -3154,20 +15235,17 @@
3154 15235 ] }) });
3155 15236 }
3156 15237
3157 15238 // packages/edit-widgets/build-module/components/sidebar/index.mjs
3158 - var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
3159 - var SIDEBAR_ACTIVE_BY_DEFAULT = import_element13.Platform.select({
3160 - web: true,
3161 - native: false
3162 - });
15239 + var import_jsx_runtime71 = __toESM(require_jsx_runtime(), 1);
15240 + var SIDEBAR_ACTIVE_BY_DEFAULT = true;
3163 15241 var BLOCK_INSPECTOR_IDENTIFIER = "edit-widgets/block-inspector";
3164 15242 var WIDGET_AREAS_IDENTIFIER = "edit-widgets/block-areas";
3165 - var { Tabs } = unlock(import_components11.privateApis);
15243 + var { Tabs } = unlock2(import_components9.privateApis);
3166 15244 function SidebarHeader({ selectedWidgetAreaBlock }) {
3167 - return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Tabs.TabList, { children: [
3168 - /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Tabs.Tab, { tabId: WIDGET_AREAS_IDENTIFIER, children: selectedWidgetAreaBlock ? selectedWidgetAreaBlock.attributes.name : (0, import_i18n8.__)("Widget Areas") }),
3169 - /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Tabs.Tab, { tabId: BLOCK_INSPECTOR_IDENTIFIER, children: (0, import_i18n8.__)("Block") })
15245 + return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(Tabs.TabList, { children: [
15246 + /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Tabs.Tab, { tabId: WIDGET_AREAS_IDENTIFIER, children: selectedWidgetAreaBlock ? selectedWidgetAreaBlock.attributes.name : (0, import_i18n13.__)("Widget Areas") }),
15247 + /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Tabs.Tab, { tabId: BLOCK_INSPECTOR_IDENTIFIER, children: (0, import_i18n13.__)("Block") })
3170 15248 ] });
3171 15249 }
3172 15250 function SidebarContent({
3173 15251 hasSelectedNonAreaBlock,
@@ -3175,9 +15253,9 @@
3175 15253 isGeneralSidebarOpen,
3176 15254 selectedWidgetAreaBlock
3177 15255 }) {
3178 15256 const { enableComplementaryArea: enableComplementaryArea2 } = (0, import_data15.useDispatch)(store);
3179 - (0, import_element13.useEffect)(() => {
15257 + (0, import_element56.useEffect)(() => {
3180 15258 if (hasSelectedNonAreaBlock && currentArea === WIDGET_AREAS_IDENTIFIER && isGeneralSidebarOpen) {
3181 15259 enableComplementaryArea2(
3182 15260 "core/edit-widgets",
3183 15261 BLOCK_INSPECTOR_IDENTIFIER
@@ -3189,14 +15267,14 @@
3189 15267 WIDGET_AREAS_IDENTIFIER
3190 15268 );
3191 15269 }
3192 15270 }, [hasSelectedNonAreaBlock, enableComplementaryArea2]);
3193 - const tabsContextValue = (0, import_element13.useContext)(Tabs.Context);
3194 - return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
15271 + const tabsContextValue = (0, import_element56.useContext)(Tabs.Context);
15272 + return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
3195 15273 complementary_area_default,
3196 15274 {
3197 15275 className: "edit-widgets-sidebar",
3198 - header: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Tabs.Context.Provider, { value: tabsContextValue, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
15276 + header: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Tabs.Context.Provider, { value: tabsContextValue, children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
3199 15277 SidebarHeader,
3200 15278 {
3201 15279 selectedWidgetAreaBlock
3202 15280 }
@@ -3201,21 +15279,21 @@
3201 15279 selectedWidgetAreaBlock
3202 15280 }
3203 15281 ) }),
3204 15282 headerClassName: "edit-widgets-sidebar__panel-tabs",
3205 - title: (0, import_i18n8.__)("Settings"),
3206 - closeLabel: (0, import_i18n8.__)("Close Settings"),
15283 + title: (0, import_i18n13.__)("Settings"),
15284 + closeLabel: (0, import_i18n13.__)("Close Settings"),
3207 15285 scope: "core/edit-widgets",
3208 15286 identifier: currentArea,
3209 - icon: (0, import_i18n8.isRTL)() ? drawer_left_default : drawer_right_default,
15287 + icon: (0, import_i18n13.isRTL)() ? drawer_left_default : drawer_right_default,
3210 15288 isActiveByDefault: SIDEBAR_ACTIVE_BY_DEFAULT,
3211 - children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Tabs.Context.Provider, { value: tabsContextValue, children: [
3212 - /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
15289 + children: /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(Tabs.Context.Provider, { value: tabsContextValue, children: [
15290 + /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
3213 15291 Tabs.TabPanel,
3214 15292 {
3215 15293 tabId: WIDGET_AREAS_IDENTIFIER,
3216 15294 focusable: false,
3217 - children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
15295 + children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
3218 15296 WidgetAreas,
3219 15297 {
3220 15298 selectedWidgetAreaId: selectedWidgetAreaBlock?.attributes.id
3221 15299 }
@@ -3221,17 +15299,17 @@
3221 15299 }
3222 15300 )
3223 15301 }
3224 15302 ),
3225 - /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
15303 + /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
3226 15304 Tabs.TabPanel,
3227 15305 {
3228 15306 tabId: BLOCK_INSPECTOR_IDENTIFIER,
3229 15307 focusable: false,
3230 - children: hasSelectedNonAreaBlock ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_block_editor10.BlockInspector, {}) : (
15308 + children: hasSelectedNonAreaBlock ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_block_editor10.BlockInspector, {}) : (
3231 15309 // Pretend that Widget Areas are part of the UI by not
3232 15310 // showing the Block Inspector when one is selected.
3233 - /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "block-editor-block-inspector__no-blocks", children: (0, import_i18n8.__)("No block selected.") })
15311 + /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "block-editor-block-inspector__no-blocks", children: (0, import_i18n13.__)("No block selected.") })
3234 15312 )
3235 15313 }
3236 15314 )
3237 15315 ] })
@@ -3277,9 +15355,9 @@
3277 15355 selectedWidgetAreaBlock: widgetAreaBlock
3278 15356 };
3279 15357 }, []);
3280 15358 const { enableComplementaryArea: enableComplementaryArea2 } = (0, import_data15.useDispatch)(store);
3281 - const onTabSelect = (0, import_element13.useCallback)(
15359 + const onTabSelect = (0, import_element56.useCallback)(
3282 15360 (newSelectedTabId) => {
3283 15361 if (!!newSelectedTabId) {
3284 15362 enableComplementaryArea2(
3285 15363 store2.name,
@@ -3288,15 +15366,15 @@
3288 15366 }
3289 15367 },
3290 15368 [enableComplementaryArea2]
3291 15369 );
3292 - return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
15370 + return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
3293 15371 Tabs,
3294 15372 {
3295 15373 selectedTabId: isGeneralSidebarOpen ? currentArea : null,
3296 15374 onSelect: onTabSelect,
3297 15375 selectOnMove: false,
3298 - children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
15376 + children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
3299 15377 SidebarContent,
3300 15378 {
3301 15379 hasSelectedNonAreaBlock,
3302 15380 currentArea,
@@ -3308,40 +15386,40 @@
3308 15386 );
3309 15387 }
3310 15388
3311 15389 // packages/edit-widgets/build-module/components/layout/interface.mjs
3312 - var import_compose12 = __toESM(require_compose(), 1);
15390 + var import_compose13 = __toESM(require_compose(), 1);
3313 15391 var import_block_editor17 = __toESM(require_block_editor(), 1);
3314 - var import_element23 = __toESM(require_element(), 1);
3315 - var import_data28 = __toESM(require_data(), 1);
3316 - var import_i18n18 = __toESM(require_i18n(), 1);
15392 + var import_element66 = __toESM(require_element(), 1);
15393 + var import_data29 = __toESM(require_data(), 1);
15394 + var import_i18n23 = __toESM(require_i18n(), 1);
3317 15395 var import_preferences8 = __toESM(require_preferences(), 1);
3318 15396
3319 15397 // packages/edit-widgets/build-module/components/header/index.mjs
3320 15398 var import_block_editor12 = __toESM(require_block_editor(), 1);
3321 - var import_data22 = __toESM(require_data(), 1);
3322 - var import_element19 = __toESM(require_element(), 1);
3323 - var import_i18n16 = __toESM(require_i18n(), 1);
3324 - var import_components19 = __toESM(require_components(), 1);
3325 - var import_compose8 = __toESM(require_compose(), 1);
15399 + var import_data23 = __toESM(require_data(), 1);
15400 + var import_element62 = __toESM(require_element(), 1);
15401 + var import_i18n21 = __toESM(require_i18n(), 1);
15402 + var import_components17 = __toESM(require_components(), 1);
15403 + var import_compose10 = __toESM(require_compose(), 1);
3326 15404 var import_preferences6 = __toESM(require_preferences(), 1);
3327 15405
3328 15406 // packages/edit-widgets/build-module/components/header/document-tools/index.mjs
3329 15407 var import_data18 = __toESM(require_data(), 1);
3330 - var import_i18n11 = __toESM(require_i18n(), 1);
3331 - var import_components14 = __toESM(require_components(), 1);
15408 + var import_i18n16 = __toESM(require_i18n(), 1);
15409 + var import_components12 = __toESM(require_components(), 1);
3332 15410 var import_block_editor11 = __toESM(require_block_editor(), 1);
3333 - var import_element16 = __toESM(require_element(), 1);
3334 - var import_compose6 = __toESM(require_compose(), 1);
15411 + var import_element59 = __toESM(require_element(), 1);
15412 + var import_compose8 = __toESM(require_compose(), 1);
3335 15413
3336 15414 // packages/edit-widgets/build-module/components/header/undo-redo/undo.mjs
3337 - var import_i18n9 = __toESM(require_i18n(), 1);
3338 - var import_components12 = __toESM(require_components(), 1);
15415 + var import_i18n14 = __toESM(require_i18n(), 1);
15416 + var import_components10 = __toESM(require_components(), 1);
3339 15417 var import_data16 = __toESM(require_data(), 1);
3340 15418 var import_keycodes2 = __toESM(require_keycodes(), 1);
3341 15419 var import_core_data9 = __toESM(require_core_data(), 1);
3342 - var import_element14 = __toESM(require_element(), 1);
3343 - var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
15420 + var import_element57 = __toESM(require_element(), 1);
15421 + var import_jsx_runtime72 = __toESM(require_jsx_runtime(), 1);
3344 15422 function UndoButton(props, ref) {
3345 15423 const hasUndo = (0, import_data16.useSelect)(
3346 15424 (select) => select(import_core_data9.store).hasUndo(),
3347 15425 []
@@ -3346,15 +15424,15 @@
3346 15424 (select) => select(import_core_data9.store).hasUndo(),
3347 15425 []
3348 15426 );
3349 15427 const { undo } = (0, import_data16.useDispatch)(import_core_data9.store);
3350 - return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3351 - import_components12.Button,
15428 + return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
15429 + import_components10.Button,
3352 15430 {
3353 15431 ...props,
3354 15432 ref,
3355 - icon: !(0, import_i18n9.isRTL)() ? undo_default : redo_default,
3356 - label: (0, import_i18n9.__)("Undo"),
15433 + icon: !(0, import_i18n14.isRTL)() ? undo_default : redo_default,
15434 + label: (0, import_i18n14.__)("Undo"),
3357 15435 shortcut: import_keycodes2.displayShortcut.primary("z"),
3358 15436 "aria-disabled": !hasUndo,
3359 15437 onClick: hasUndo ? undo : void 0,
3360 15438 size: "compact"
@@ -3360,18 +15438,18 @@
3360 15438 size: "compact"
3361 15439 }
3362 15440 );
3363 15441 }
3364 - var undo_default2 = (0, import_element14.forwardRef)(UndoButton);
15442 + var undo_default2 = (0, import_element57.forwardRef)(UndoButton);
3365 15443
3366 15444 // packages/edit-widgets/build-module/components/header/undo-redo/redo.mjs
3367 - var import_i18n10 = __toESM(require_i18n(), 1);
3368 - var import_components13 = __toESM(require_components(), 1);
15445 + var import_i18n15 = __toESM(require_i18n(), 1);
15446 + var import_components11 = __toESM(require_components(), 1);
3369 15447 var import_data17 = __toESM(require_data(), 1);
3370 15448 var import_keycodes3 = __toESM(require_keycodes(), 1);
3371 15449 var import_core_data10 = __toESM(require_core_data(), 1);
3372 - var import_element15 = __toESM(require_element(), 1);
3373 - var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
15450 + var import_element58 = __toESM(require_element(), 1);
15451 + var import_jsx_runtime73 = __toESM(require_jsx_runtime(), 1);
3374 15452 function RedoButton(props, ref) {
3375 15453 const shortcut = (0, import_keycodes3.isAppleOS)() ? import_keycodes3.displayShortcut.primaryShift("z") : import_keycodes3.displayShortcut.primary("y");
3376 15454 const hasRedo = (0, import_data17.useSelect)(
3377 15455 (select) => select(import_core_data10.store).hasRedo(),
@@ -3377,15 +15455,15 @@
3377 15455 (select) => select(import_core_data10.store).hasRedo(),
3378 15456 []
3379 15457 );
3380 15458 const { redo } = (0, import_data17.useDispatch)(import_core_data10.store);
3381 - return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3382 - import_components13.Button,
15459 + return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
15460 + import_components11.Button,
3383 15461 {
3384 15462 ...props,
3385 15463 ref,
3386 - icon: !(0, import_i18n10.isRTL)() ? redo_default : undo_default,
3387 - label: (0, import_i18n10.__)("Redo"),
15464 + icon: !(0, import_i18n15.isRTL)() ? redo_default : undo_default,
15465 + label: (0, import_i18n15.__)("Redo"),
3388 15466 shortcut,
3389 15467 "aria-disabled": !hasRedo,
3390 15468 onClick: hasRedo ? redo : void 0,
3391 15469 size: "compact"
@@ -3391,14 +15469,14 @@
3391 15469 size: "compact"
3392 15470 }
3393 15471 );
3394 15472 }
3395 - var redo_default2 = (0, import_element15.forwardRef)(RedoButton);
15473 + var redo_default2 = (0, import_element58.forwardRef)(RedoButton);
3396 15474
3397 15475 // packages/edit-widgets/build-module/components/header/document-tools/index.mjs
3398 - var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
15476 + var import_jsx_runtime74 = __toESM(require_jsx_runtime(), 1);
3399 15477 function DocumentTools() {
3400 - const isMediumViewport = (0, import_compose6.useViewportMatch)("medium");
15478 + const isMediumViewport = (0, import_compose8.useViewportMatch)("medium");
3401 15479 const {
3402 15480 isInserterOpen,
3403 15481 isListViewOpen,
3404 15482 inserterSidebarToggleRef: inserterSidebarToggleRef2,
@@ -3408,9 +15486,9 @@
3408 15486 isInserterOpened: isInserterOpened2,
3409 15487 getInserterSidebarToggleRef: getInserterSidebarToggleRef2,
3410 15488 isListViewOpened: isListViewOpened2,
3411 15489 getListViewToggleRef: getListViewToggleRef2
3412 - } = unlock(select(store2));
15490 + } = unlock2(select(store2));
3413 15491 return {
3414 15492 isInserterOpen: isInserterOpened2(),
3415 15493 isListViewOpen: isListViewOpened2(),
3416 15494 inserterSidebarToggleRef: getInserterSidebarToggleRef2(),
@@ -3417,28 +15495,28 @@
3417 15495 listViewToggleRef: getListViewToggleRef2()
3418 15496 };
3419 15497 }, []);
3420 15498 const { setIsInserterOpened: setIsInserterOpened2, setIsListViewOpened: setIsListViewOpened2 } = (0, import_data18.useDispatch)(store2);
3421 - const toggleListView = (0, import_element16.useCallback)(
15499 + const toggleListView = (0, import_element59.useCallback)(
3422 15500 () => setIsListViewOpened2(!isListViewOpen),
3423 15501 [setIsListViewOpened2, isListViewOpen]
3424 15502 );
3425 - const toggleInserterSidebar = (0, import_element16.useCallback)(
15503 + const toggleInserterSidebar = (0, import_element59.useCallback)(
3426 15504 () => setIsInserterOpened2(!isInserterOpen),
3427 15505 [setIsInserterOpened2, isInserterOpen]
3428 15506 );
3429 - return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
15507 + return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
3430 15508 import_block_editor11.NavigableToolbar,
3431 15509 {
3432 15510 className: "edit-widgets-header-toolbar",
3433 - "aria-label": (0, import_i18n11.__)("Document tools"),
15511 + "aria-label": (0, import_i18n16.__)("Document tools"),
3434 15512 variant: "unstyled",
3435 15513 children: [
3436 - /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3437 - import_components14.ToolbarItem,
15514 + /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
15515 + import_components12.ToolbarItem,
3438 15516 {
3439 15517 ref: inserterSidebarToggleRef2,
3440 - as: import_components14.Button,
15518 + as: import_components12.Button,
3441 15519 className: "edit-widgets-header-toolbar__inserter-toggle",
3442 15520 variant: "primary",
3443 15521 isPressed: isInserterOpen,
3444 15522 onMouseDown: (event) => {
@@ -3445,9 +15523,9 @@
3445 15523 event.preventDefault();
3446 15524 },
3447 15525 onClick: toggleInserterSidebar,
3448 15526 icon: plus_default,
3449 - label: (0, import_i18n11._x)(
15527 + label: (0, import_i18n16._x)(
3450 15528 "Block Inserter",
3451 15529 "Generic label for block inserter button"
3452 15530 ),
3453 15531 size: "compact"
@@ -3452,19 +15530,19 @@
3452 15530 ),
3453 15531 size: "compact"
3454 15532 }
3455 15533 ),
3456 - isMediumViewport && /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_jsx_runtime31.Fragment, { children: [
3457 - /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components14.ToolbarItem, { as: undo_default2 }),
3458 - /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components14.ToolbarItem, { as: redo_default2 }),
3459 - /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3460 - import_components14.ToolbarItem,
15534 + isMediumViewport && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_jsx_runtime74.Fragment, { children: [
15535 + /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_components12.ToolbarItem, { as: undo_default2 }),
15536 + /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_components12.ToolbarItem, { as: redo_default2 }),
15537 + /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
15538 + import_components12.ToolbarItem,
3461 15539 {
3462 - as: import_components14.Button,
15540 + as: import_components12.Button,
3463 15541 className: "edit-widgets-header-toolbar__list-view-toggle",
3464 15542 icon: list_view_default,
3465 15543 isPressed: isListViewOpen,
3466 - label: (0, import_i18n11.__)("List View"),
15544 + label: (0, import_i18n16.__)("List View"),
3467 15545 onClick: toggleListView,
3468 15546 ref: listViewToggleRef2,
3469 15547 size: "compact"
3470 15548 }
@@ -3476,12 +15554,12 @@
3476 15554 }
3477 15555 var document_tools_default = DocumentTools;
3478 15556
3479 15557 // packages/edit-widgets/build-module/components/save-button/index.mjs
3480 - var import_components15 = __toESM(require_components(), 1);
3481 - var import_i18n12 = __toESM(require_i18n(), 1);
15558 + var import_components13 = __toESM(require_components(), 1);
15559 + var import_i18n17 = __toESM(require_i18n(), 1);
3482 15560 var import_data19 = __toESM(require_data(), 1);
3483 - var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
15561 + var import_jsx_runtime75 = __toESM(require_jsx_runtime(), 1);
3484 15562 function SaveButton() {
3485 15563 const { hasEditedWidgetAreaIds, isSaving, isWidgetSaveLocked } = (0, import_data19.useSelect)(
3486 15564 (select) => {
3487 15565 const {
@@ -3498,10 +15576,10 @@
3498 15576 []
3499 15577 );
3500 15578 const { saveEditedWidgetAreas: saveEditedWidgetAreas2 } = (0, import_data19.useDispatch)(store2);
3501 15579 const isDisabled = isWidgetSaveLocked || isSaving || !hasEditedWidgetAreaIds;
3502 - return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3503 - import_components15.Button,
15580 + return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
15581 + import_components13.Button,
3504 15582 {
3505 15583 variant: "primary",
3506 15584 isBusy: isSaving,
3507 15585 "aria-disabled": isDisabled,
@@ -3506,9 +15584,9 @@
3506 15584 isBusy: isSaving,
3507 15585 "aria-disabled": isDisabled,
3508 15586 onClick: isDisabled ? void 0 : saveEditedWidgetAreas2,
3509 15587 size: "compact",
3510 - children: isSaving ? (0, import_i18n12.__)("Saving\u2026") : (0, import_i18n12.__)("Update")
15588 + children: isSaving ? (0, import_i18n17.__)("Saving\u2026") : (0, import_i18n17.__)("Update")
3511 15589 }
3512 15590 );
3513 15591 }
3514 15592 var save_button_default = SaveButton;
@@ -3513,56 +15591,57 @@
3513 15591 }
3514 15592 var save_button_default = SaveButton;
3515 15593
3516 15594 // packages/edit-widgets/build-module/components/more-menu/index.mjs
3517 - var import_components18 = __toESM(require_components(), 1);
3518 - var import_element18 = __toESM(require_element(), 1);
3519 - var import_i18n15 = __toESM(require_i18n(), 1);
15595 + var import_components16 = __toESM(require_components(), 1);
15596 + var import_data22 = __toESM(require_data(), 1);
15597 + var import_element61 = __toESM(require_element(), 1);
15598 + var import_i18n20 = __toESM(require_i18n(), 1);
3520 15599 var import_preferences5 = __toESM(require_preferences(), 1);
3521 15600 var import_keycodes5 = __toESM(require_keycodes(), 1);
3522 15601 var import_keyboard_shortcuts5 = __toESM(require_keyboard_shortcuts(), 1);
3523 - var import_compose7 = __toESM(require_compose(), 1);
15602 + var import_compose9 = __toESM(require_compose(), 1);
3524 15603
3525 15604 // packages/edit-widgets/build-module/components/keyboard-shortcut-help-modal/index.mjs
3526 - var import_components16 = __toESM(require_components(), 1);
3527 - var import_i18n14 = __toESM(require_i18n(), 1);
15605 + var import_components14 = __toESM(require_components(), 1);
15606 + var import_i18n19 = __toESM(require_i18n(), 1);
3528 15607 var import_keyboard_shortcuts4 = __toESM(require_keyboard_shortcuts(), 1);
3529 15608 var import_data21 = __toESM(require_data(), 1);
3530 15609
3531 15610 // packages/edit-widgets/build-module/components/keyboard-shortcut-help-modal/config.mjs
3532 - var import_i18n13 = __toESM(require_i18n(), 1);
15611 + var import_i18n18 = __toESM(require_i18n(), 1);
3533 15612 var textFormattingShortcuts = [
3534 15613 {
3535 15614 keyCombination: { modifier: "primary", character: "b" },
3536 - description: (0, import_i18n13.__)("Make the selected text bold.")
15615 + description: (0, import_i18n18.__)("Make the selected text bold.")
3537 15616 },
3538 15617 {
3539 15618 keyCombination: { modifier: "primary", character: "i" },
3540 - description: (0, import_i18n13.__)("Make the selected text italic.")
15619 + description: (0, import_i18n18.__)("Make the selected text italic.")
3541 15620 },
3542 15621 {
3543 15622 keyCombination: { modifier: "primary", character: "k" },
3544 - description: (0, import_i18n13.__)("Convert the selected text into a link.")
15623 + description: (0, import_i18n18.__)("Convert the selected text into a link.")
3545 15624 },
3546 15625 {
3547 15626 keyCombination: { modifier: "primaryShift", character: "k" },
3548 - description: (0, import_i18n13.__)("Remove a link.")
15627 + description: (0, import_i18n18.__)("Remove a link.")
3549 15628 },
3550 15629 {
3551 15630 keyCombination: { character: "[[" },
3552 - description: (0, import_i18n13.__)("Insert a link to a post or page.")
15631 + description: (0, import_i18n18.__)("Insert a link to a post or page.")
3553 15632 },
3554 15633 {
3555 15634 keyCombination: { modifier: "primary", character: "u" },
3556 - description: (0, import_i18n13.__)("Underline the selected text.")
15635 + description: (0, import_i18n18.__)("Underline the selected text.")
3557 15636 },
3558 15637 {
3559 15638 keyCombination: { modifier: "access", character: "d" },
3560 - description: (0, import_i18n13.__)("Strikethrough the selected text.")
15639 + description: (0, import_i18n18.__)("Strikethrough the selected text.")
3561 15640 },
3562 15641 {
3563 15642 keyCombination: { modifier: "access", character: "x" },
3564 - description: (0, import_i18n13.__)("Make the selected text inline code.")
15643 + description: (0, import_i18n18.__)("Make the selected text inline code.")
3565 15644 },
3566 15645 {
3567 15646 keyCombination: {
3568 15647 modifier: "access",
@@ -3573,26 +15652,26 @@
3573 15652 modifier: "access",
3574 15653 character: "7"
3575 15654 }
3576 15655 ],
3577 - description: (0, import_i18n13.__)("Convert the current heading to a paragraph.")
15656 + description: (0, import_i18n18.__)("Convert the current heading to a paragraph.")
3578 15657 },
3579 15658 {
3580 15659 keyCombination: { modifier: "access", character: "1-6" },
3581 - description: (0, import_i18n13.__)(
15660 + description: (0, import_i18n18.__)(
3582 15661 "Convert the current paragraph or heading to a heading of level 1 to 6."
3583 15662 )
3584 15663 },
3585 15664 {
3586 15665 keyCombination: { modifier: "primaryShift", character: "SPACE" },
3587 - description: (0, import_i18n13.__)("Add non breaking space.")
15666 + description: (0, import_i18n18.__)("Add non breaking space.")
3588 15667 }
3589 15668 ];
3590 15669
3591 15670 // packages/edit-widgets/build-module/components/keyboard-shortcut-help-modal/shortcut.mjs
3592 - var import_element17 = __toESM(require_element(), 1);
15671 + var import_element60 = __toESM(require_element(), 1);
3593 15672 var import_keycodes4 = __toESM(require_keycodes(), 1);
3594 - var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
15673 + var import_jsx_runtime76 = __toESM(require_jsx_runtime(), 1);
3595 15674 function KeyCombination({ keyCombination, forceAriaLabel }) {
3596 15675 const shortcut = keyCombination.modifier ? import_keycodes4.displayShortcutList[keyCombination.modifier](
3597 15676 keyCombination.character
3598 15677 ) : keyCombination.character;
@@ -3599,24 +15678,24 @@
3599 15678 const ariaLabel = keyCombination.modifier ? import_keycodes4.shortcutAriaLabel[keyCombination.modifier](
3600 15679 keyCombination.character
3601 15680 ) : keyCombination.character;
3602 15681 const shortcuts = Array.isArray(shortcut) ? shortcut : [shortcut];
3603 - return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
15682 + return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
3604 15683 "kbd",
3605 15684 {
3606 15685 className: "edit-widgets-keyboard-shortcut-help-modal__shortcut-key-combination",
3607 15686 "aria-label": forceAriaLabel || ariaLabel,
3608 - children: shortcuts.map((character, index) => {
15687 + children: shortcuts.map((character, index2) => {
3609 15688 if (character === "+") {
3610 - return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_element17.Fragment, { children: character }, index);
15689 + return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_element60.Fragment, { children: character }, index2);
3611 15690 }
3612 - return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
15691 + return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
3613 15692 "kbd",
3614 15693 {
3615 15694 className: "edit-widgets-keyboard-shortcut-help-modal__shortcut-key",
3616 15695 children: character
3617 15696 },
3618 - index
15697 + index2
3619 15698 );
3620 15699 })
3621 15700 }
3622 15701 );
@@ -3621,12 +15700,12 @@
3621 15700 }
3622 15701 );
3623 15702 }
3624 15703 function Shortcut({ description, keyCombination, aliases = [], ariaLabel }) {
3625 - return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
3626 - /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "edit-widgets-keyboard-shortcut-help-modal__shortcut-description", children: description }),
3627 - /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "edit-widgets-keyboard-shortcut-help-modal__shortcut-term", children: [
3628 - /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
15704 + return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(import_jsx_runtime76.Fragment, { children: [
15705 + /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "edit-widgets-keyboard-shortcut-help-modal__shortcut-description", children: description }),
15706 + /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "edit-widgets-keyboard-shortcut-help-modal__shortcut-term", children: [
15707 + /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
3629 15708 KeyCombination,
3630 15709 {
3631 15710 keyCombination,
3632 15711 forceAriaLabel: ariaLabel
@@ -3631,15 +15710,15 @@
3631 15710 keyCombination,
3632 15711 forceAriaLabel: ariaLabel
3633 15712 }
3634 15713 ),
3635 - aliases.map((alias, index) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
15714 + aliases.map((alias, index2) => /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
3636 15715 KeyCombination,
3637 15716 {
3638 15717 keyCombination: alias,
3639 15718 forceAriaLabel: ariaLabel
3640 15719 },
3641 - index
15720 + index2
3642 15721 ))
3643 15722 ] })
3644 15723 ] });
3645 15724 }
@@ -3647,9 +15726,9 @@
3647 15726
3648 15727 // packages/edit-widgets/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.mjs
3649 15728 var import_data20 = __toESM(require_data(), 1);
3650 15729 var import_keyboard_shortcuts3 = __toESM(require_keyboard_shortcuts(), 1);
3651 - var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
15730 + var import_jsx_runtime77 = __toESM(require_jsx_runtime(), 1);
3652 15731 function DynamicShortcut({ name: name2 }) {
3653 15732 const { keyCombination, description, aliases } = (0, import_data20.useSelect)(
3654 15733 (select) => {
3655 15734 const {
@@ -3667,9 +15746,9 @@
3667 15746 );
3668 15747 if (!keyCombination) {
3669 15748 return null;
3670 15749 }
3671 - return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
15750 + return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
3672 15751 shortcut_default,
3673 15752 {
3674 15753 keyCombination,
3675 15754 description,
@@ -3679,9 +15758,9 @@
3679 15758 }
3680 15759 var dynamic_shortcut_default = DynamicShortcut;
3681 15760
3682 15761 // packages/edit-widgets/build-module/components/keyboard-shortcut-help-modal/index.mjs
3683 - var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
15762 + var import_jsx_runtime78 = __toESM(require_jsx_runtime(), 1);
3684 15763 var ShortcutList = ({ shortcuts }) => (
3685 15764 /*
3686 15765 * Disable reason: The `list` ARIA role is redundant but
3687 15766 * Safari+VoiceOver won't announce the list otherwise.
@@ -3686,25 +15765,25 @@
3686 15765 * Disable reason: The `list` ARIA role is redundant but
3687 15766 * Safari+VoiceOver won't announce the list otherwise.
3688 15767 */
3689 15768 /* eslint-disable jsx-a11y/no-redundant-roles */
3690 - /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
15769 + /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
3691 15770 "ul",
3692 15771 {
3693 15772 className: "edit-widgets-keyboard-shortcut-help-modal__shortcut-list",
3694 15773 role: "list",
3695 - children: shortcuts.map((shortcut, index) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
15774 + children: shortcuts.map((shortcut, index2) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
3696 15775 "li",
3697 15776 {
3698 15777 className: "edit-widgets-keyboard-shortcut-help-modal__shortcut",
3699 - children: typeof shortcut === "string" ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(dynamic_shortcut_default, { name: shortcut }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(shortcut_default, { ...shortcut })
15778 + children: typeof shortcut === "string" ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(dynamic_shortcut_default, { name: shortcut }) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(shortcut_default, { ...shortcut })
3700 15779 },
3701 - index
15780 + index2
3702 15781 ))
3703 15782 }
3704 15783 )
3705 15784 );
3706 - var ShortcutSection = ({ title, shortcuts, className }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
15785 + var ShortcutSection = ({ title, shortcuts, className }) => /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
3707 15786 "section",
3708 15787 {
3709 15788 className: clsx_default(
3710 15789 "edit-widgets-keyboard-shortcut-help-modal__section",
@@ -3710,10 +15789,10 @@
3710 15789 "edit-widgets-keyboard-shortcut-help-modal__section",
3711 15790 className
3712 15791 ),
3713 15792 children: [
3714 - !!title && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h2", { className: "edit-widgets-keyboard-shortcut-help-modal__section-title", children: title }),
3715 - /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ShortcutList, { shortcuts })
15793 + !!title && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("h2", { className: "edit-widgets-keyboard-shortcut-help-modal__section-title", children: title }),
15794 + /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(ShortcutList, { shortcuts })
3716 15795 ]
3717 15796 }
3718 15797 );
3719 15798 var ShortcutCategorySection = ({
@@ -3728,9 +15807,9 @@
3728 15807 );
3729 15808 },
3730 15809 [categoryName]
3731 15810 );
3732 - return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
15811 + return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
3733 15812 ShortcutSection,
3734 15813 {
3735 15814 title,
3736 15815 shortcuts: categoryShortcuts.concat(additionalShortcuts)
@@ -3746,16 +15825,16 @@
3746 15825 });
3747 15826 if (!isModalActive2) {
3748 15827 return null;
3749 15828 }
3750 - return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
3751 - import_components16.Modal,
15829 + return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
15830 + import_components14.Modal,
3752 15831 {
3753 15832 className: "edit-widgets-keyboard-shortcut-help-modal",
3754 - title: (0, import_i18n14.__)("Keyboard shortcuts"),
15833 + title: (0, import_i18n19.__)("Keyboard shortcuts"),
3755 15834 onRequestClose: toggleModal,
3756 15835 children: [
3757 - /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
15836 + /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
3758 15837 ShortcutSection,
3759 15838 {
3760 15839 className: "edit-widgets-keyboard-shortcut-help-modal__main-shortcuts",
3761 15840 shortcuts: ["core/edit-widgets/keyboard-shortcuts"]
@@ -3760,50 +15839,50 @@
3760 15839 className: "edit-widgets-keyboard-shortcut-help-modal__main-shortcuts",
3761 15840 shortcuts: ["core/edit-widgets/keyboard-shortcuts"]
3762 15841 }
3763 15842 ),
3764 - /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
15843 + /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
3765 15844 ShortcutCategorySection,
3766 15845 {
3767 - title: (0, import_i18n14.__)("Global shortcuts"),
15846 + title: (0, import_i18n19.__)("Global shortcuts"),
3768 15847 categoryName: "global"
3769 15848 }
3770 15849 ),
3771 - /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
15850 + /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
3772 15851 ShortcutCategorySection,
3773 15852 {
3774 - title: (0, import_i18n14.__)("Selection shortcuts"),
15853 + title: (0, import_i18n19.__)("Selection shortcuts"),
3775 15854 categoryName: "selection"
3776 15855 }
3777 15856 ),
3778 - /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
15857 + /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
3779 15858 ShortcutCategorySection,
3780 15859 {
3781 - title: (0, import_i18n14.__)("Block shortcuts"),
15860 + title: (0, import_i18n19.__)("Block shortcuts"),
3782 15861 categoryName: "block",
3783 15862 additionalShortcuts: [
3784 15863 {
3785 15864 keyCombination: { character: "/" },
3786 - description: (0, import_i18n14.__)(
15865 + description: (0, import_i18n19.__)(
3787 15866 "Change the block type after adding a new paragraph."
3788 15867 ),
3789 15868 /* translators: The forward-slash character. e.g. '/'. */
3790 - ariaLabel: (0, import_i18n14.__)("Forward-slash")
15869 + ariaLabel: (0, import_i18n19.__)("Forward-slash")
3791 15870 }
3792 15871 ]
3793 15872 }
3794 15873 ),
3795 - /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
15874 + /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
3796 15875 ShortcutSection,
3797 15876 {
3798 - title: (0, import_i18n14.__)("Text formatting"),
15877 + title: (0, import_i18n19.__)("Text formatting"),
3799 15878 shortcuts: textFormattingShortcuts
3800 15879 }
3801 15880 ),
3802 - /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
15881 + /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
3803 15882 ShortcutCategorySection,
3804 15883 {
3805 - title: (0, import_i18n14.__)("List View shortcuts"),
15884 + title: (0, import_i18n19.__)("List View shortcuts"),
3806 15885 categoryName: "list-view"
3807 15886 }
3808 15887 )
3809 15888 ]
@@ -3811,35 +15890,35 @@
3811 15890 );
3812 15891 }
3813 15892
3814 15893 // packages/edit-widgets/build-module/components/more-menu/tools-more-menu-group.mjs
3815 - var import_components17 = __toESM(require_components(), 1);
3816 - var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
3817 - var { Fill: ToolsMoreMenuGroup, Slot: Slot4 } = (0, import_components17.createSlotFill)(
15894 + var import_components15 = __toESM(require_components(), 1);
15895 + var { Fill: ToolsMoreMenuGroup, Slot: Slot4 } = (0, import_components15.createSlotFill)(
3818 15896 "EditWidgetsToolsMoreMenuGroup"
3819 15897 );
3820 - ToolsMoreMenuGroup.Slot = ({ fillProps }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Slot4, { fillProps, children: (fills) => fills.length > 0 && fills });
15898 + ToolsMoreMenuGroup.Slot = Slot4;
3821 15899 var tools_more_menu_group_default = ToolsMoreMenuGroup;
3822 15900
3823 15901 // packages/edit-widgets/build-module/components/more-menu/index.mjs
3824 - var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
15902 + var import_jsx_runtime79 = __toESM(require_jsx_runtime(), 1);
3825 15903 function MoreMenu() {
3826 15904 const [
3827 15905 isKeyboardShortcutsModalActive,
3828 15906 setIsKeyboardShortcutsModalVisible
3829 - ] = (0, import_element18.useState)(false);
15907 + ] = (0, import_element61.useState)(false);
3830 15908 const toggleKeyboardShortcutsModal = () => setIsKeyboardShortcutsModalVisible(!isKeyboardShortcutsModalActive);
3831 15909 (0, import_keyboard_shortcuts5.useShortcut)(
3832 15910 "core/edit-widgets/keyboard-shortcuts",
3833 15911 toggleKeyboardShortcutsModal
3834 15912 );
3835 - const isLargeViewport = (0, import_compose7.useViewportMatch)("medium");
3836 - return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
3837 - /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3838 - import_components18.DropdownMenu,
15913 + const isLargeViewport = (0, import_compose9.useViewportMatch)("medium");
15914 + const { toggle } = (0, import_data22.useDispatch)(import_preferences5.store);
15915 + return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
15916 + /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
15917 + import_components16.DropdownMenu,
3839 15918 {
3840 15919 icon: more_vertical_default,
3841 - label: (0, import_i18n15.__)("Options"),
15920 + label: (0, import_i18n20.__)("Options"),
3842 15921 popoverProps: {
3843 15922 placement: "bottom-end",
3844 15923 className: "more-menu-dropdown__content"
3845 15924 },
@@ -3846,66 +15925,69 @@
3846 15925 toggleProps: {
3847 15926 tooltipPosition: "bottom",
3848 15927 size: "compact"
3849 15928 },
3850 - children: (onClose) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
3851 - isLargeViewport && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_components18.MenuGroup, { label: (0, import_i18n15._x)("View", "noun"), children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
15929 + children: (onClose) => /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
15930 + isLargeViewport && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_components16.MenuGroup, { label: (0, import_i18n20._x)("View", "noun"), children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
3852 15931 import_preferences5.PreferenceToggleMenuItem,
3853 15932 {
3854 15933 scope: "core/edit-widgets",
3855 15934 name: "fixedToolbar",
3856 - label: (0, import_i18n15.__)("Top toolbar"),
3857 - info: (0, import_i18n15.__)(
15935 + label: (0, import_i18n20.__)("Top toolbar"),
15936 + info: (0, import_i18n20.__)(
3858 15937 "Access all block and document tools in a single place"
3859 15938 ),
3860 - messageActivated: (0, import_i18n15.__)(
15939 + messageActivated: (0, import_i18n20.__)(
3861 15940 "Top toolbar activated"
3862 15941 ),
3863 - messageDeactivated: (0, import_i18n15.__)(
15942 + messageDeactivated: (0, import_i18n20.__)(
3864 15943 "Top toolbar deactivated"
3865 15944 )
3866 15945 }
3867 15946 ) }),
3868 - /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_components18.MenuGroup, { label: (0, import_i18n15.__)("Tools"), children: [
3869 - /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3870 - import_components18.MenuItem,
15947 + /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_components16.MenuGroup, { label: (0, import_i18n20.__)("Tools"), children: [
15948 + /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
15949 + import_components16.MenuItem,
3871 15950 {
3872 15951 onClick: () => {
3873 15952 setIsKeyboardShortcutsModalVisible(true);
3874 15953 },
3875 15954 shortcut: import_keycodes5.displayShortcut.access("h"),
3876 - children: (0, import_i18n15.__)("Keyboard shortcuts")
15955 + children: (0, import_i18n20.__)("Keyboard shortcuts")
3877 15956 }
3878 15957 ),
3879 - /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3880 - import_preferences5.PreferenceToggleMenuItem,
15958 + /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
15959 + import_components16.MenuItem,
3881 15960 {
3882 - scope: "core/edit-widgets",
3883 - name: "welcomeGuide",
3884 - label: (0, import_i18n15.__)("Welcome Guide")
15961 + onClick: () => toggle(
15962 + "core/edit-widgets",
15963 + "welcomeGuide"
15964 + ),
15965 + "aria-haspopup": "dialog",
15966 + children: (0, import_i18n20.__)("Welcome Guide")
3885 15967 }
3886 15968 ),
3887 - /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
3888 - import_components18.MenuItem,
15969 + /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
15970 + import_components16.MenuItem,
3889 15971 {
3890 15972 role: "menuitem",
3891 15973 icon: external_default,
3892 - href: (0, import_i18n15.__)(
15974 + href: (0, import_i18n20.__)(
3893 15975 "https://wordpress.org/documentation/article/block-based-widgets-editor/"
3894 15976 ),
3895 15977 target: "_blank",
3896 15978 rel: "noopener",
3897 15979 children: [
3898 - (0, import_i18n15.__)("Help"),
3899 - /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(VisuallyHidden, {
3900 - render: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", {}),
15980 + (0, import_i18n20.__)("Help"),
15981 + /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(VisuallyHidden, {
15982 + render: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", {}),
3901 15983 /* translators: accessibility text */
3902 - children: (0, import_i18n15.__)("(opens in a new tab)")
15984 + children: (0, import_i18n20.__)("(opens in a new tab)")
3903 15985 })
3904 15986 ]
3905 15987 }
3906 15988 ),
3907 - /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
15989 + /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
3908 15990 tools_more_menu_group_default.Slot,
3909 15991 {
3910 15992 fillProps: { onClose }
3911 15993 }
@@ -3910,52 +15992,52 @@
3910 15992 fillProps: { onClose }
3911 15993 }
3912 15994 )
3913 15995 ] }),
3914 - /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_components18.MenuGroup, { label: (0, import_i18n15.__)("Preferences"), children: [
3915 - /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
15996 + /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_components16.MenuGroup, { label: (0, import_i18n20.__)("Preferences"), children: [
15997 + /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
3916 15998 import_preferences5.PreferenceToggleMenuItem,
3917 15999 {
3918 16000 scope: "core/edit-widgets",
3919 16001 name: "keepCaretInsideBlock",
3920 - label: (0, import_i18n15.__)(
16002 + label: (0, import_i18n20.__)(
3921 16003 "Contain text cursor inside block"
3922 16004 ),
3923 - info: (0, import_i18n15.__)(
16005 + info: (0, import_i18n20.__)(
3924 16006 "Aids screen readers by stopping text caret from leaving blocks."
3925 16007 ),
3926 - messageActivated: (0, import_i18n15.__)(
16008 + messageActivated: (0, import_i18n20.__)(
3927 16009 "Contain text cursor inside block activated"
3928 16010 ),
3929 - messageDeactivated: (0, import_i18n15.__)(
16011 + messageDeactivated: (0, import_i18n20.__)(
3930 16012 "Contain text cursor inside block deactivated"
3931 16013 )
3932 16014 }
3933 16015 ),
3934 - /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
16016 + /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
3935 16017 import_preferences5.PreferenceToggleMenuItem,
3936 16018 {
3937 16019 scope: "core/edit-widgets",
3938 16020 name: "themeStyles",
3939 - info: (0, import_i18n15.__)(
16021 + info: (0, import_i18n20.__)(
3940 16022 "Make the editor look like your theme."
3941 16023 ),
3942 - label: (0, import_i18n15.__)("Use theme styles")
16024 + label: (0, import_i18n20.__)("Use theme styles")
3943 16025 }
3944 16026 ),
3945 - isLargeViewport && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
16027 + isLargeViewport && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
3946 16028 import_preferences5.PreferenceToggleMenuItem,
3947 16029 {
3948 16030 scope: "core/edit-widgets",
3949 16031 name: "showBlockBreadcrumbs",
3950 - label: (0, import_i18n15.__)("Display block breadcrumbs"),
3951 - info: (0, import_i18n15.__)(
16032 + label: (0, import_i18n20.__)("Display block breadcrumbs"),
16033 + info: (0, import_i18n20.__)(
3952 16034 "Shows block breadcrumbs at the bottom of the editor."
3953 16035 ),
3954 - messageActivated: (0, import_i18n15.__)(
16036 + messageActivated: (0, import_i18n20.__)(
3955 16037 "Display block breadcrumbs activated"
3956 16038 ),
3957 - messageDeactivated: (0, import_i18n15.__)(
16039 + messageDeactivated: (0, import_i18n20.__)(
3958 16040 "Display block breadcrumbs deactivated"
3959 16041 )
3960 16042 }
3961 16043 )
@@ -3962,9 +16044,9 @@
3962 16044 ] })
3963 16045 ] })
3964 16046 }
3965 16047 ),
3966 - /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
16048 + /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
3967 16049 KeyboardShortcutHelpModal,
3968 16050 {
3969 16051 isModalActive: isKeyboardShortcutsModalActive,
3970 16052 toggleModal: toggleKeyboardShortcutsModal
@@ -3973,13 +16055,13 @@
3973 16055 ] });
3974 16056 }
3975 16057
3976 16058 // packages/edit-widgets/build-module/components/header/index.mjs
3977 - var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
3978 - function Header() {
3979 - const isLargeViewport = (0, import_compose8.useViewportMatch)("medium");
3980 - const blockToolbarRef = (0, import_element19.useRef)();
3981 - const { hasFixedToolbar } = (0, import_data22.useSelect)(
16059 + var import_jsx_runtime80 = __toESM(require_jsx_runtime(), 1);
16060 + function Header3() {
16061 + const isLargeViewport = (0, import_compose10.useViewportMatch)("medium");
16062 + const blockToolbarRef = (0, import_element62.useRef)();
16063 + const { hasFixedToolbar } = (0, import_data23.useSelect)(
3982 16064 (select) => ({
3983 16065 hasFixedToolbar: !!select(import_preferences6.store).get(
3984 16066 "core/edit-widgets",
3985 16067 "fixedToolbar"
@@ -3986,24 +16068,24 @@
3986 16068 )
3987 16069 }),
3988 16070 []
3989 16071 );
3990 - return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_jsx_runtime38.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "edit-widgets-header", children: [
3991 - /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "edit-widgets-header__navigable-toolbar-wrapper", children: [
3992 - isLargeViewport && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h1", { className: "edit-widgets-header__title", children: (0, import_i18n16.__)("Widgets") }),
3993 - !isLargeViewport && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
16072 + return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_jsx_runtime80.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "edit-widgets-header", children: [
16073 + /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "edit-widgets-header__navigable-toolbar-wrapper", children: [
16074 + isLargeViewport && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("h1", { className: "edit-widgets-header__title", children: (0, import_i18n21.__)("Widgets") }),
16075 + !isLargeViewport && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
3994 16076 VisuallyHidden,
3995 16077 {
3996 16078 className: "edit-widgets-header__title",
3997 - render: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h1", {}),
3998 - children: (0, import_i18n16.__)("Widgets")
16079 + render: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("h1", {}),
16080 + children: (0, import_i18n21.__)("Widgets")
3999 16081 }
4000 16082 ),
4001 - /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(document_tools_default, {}),
4002 - hasFixedToolbar && isLargeViewport && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
4003 - /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "selected-block-tools-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_block_editor12.BlockToolbar, { hideDragHandle: true }) }),
4004 - /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
4005 - import_components19.Popover.Slot,
16083 + /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(document_tools_default, {}),
16084 + hasFixedToolbar && isLargeViewport && /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
16085 + /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "selected-block-tools-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_block_editor12.BlockToolbar, { hideDragHandle: true }) }),
16086 + /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
16087 + import_components17.Popover.Slot,
4006 16088 {
4007 16089 ref: blockToolbarRef,
4008 16090 name: "block-toolbar"
4009 16091 }
@@ -4009,47 +16091,49 @@
4009 16091 }
4010 16092 )
4011 16093 ] })
4012 16094 ] }),
4013 - /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "edit-widgets-header__actions", children: [
4014 - /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(pinned_items_default.Slot, { scope: "core/edit-widgets" }),
4015 - /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(save_button_default, {}),
4016 - /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(MoreMenu, {})
16095 + /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "edit-widgets-header__actions", children: [
16096 + /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(pinned_items_default.Slot, { scope: "core/edit-widgets" }),
16097 + /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(save_button_default, {}),
16098 + /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(MoreMenu, {})
4017 16099 ] })
4018 16100 ] }) });
4019 16101 }
4020 - var header_default = Header;
16102 + var header_default = Header3;
4021 16103
4022 16104 // packages/edit-widgets/build-module/components/widget-areas-block-editor-content/index.mjs
4023 16105 var import_block_editor13 = __toESM(require_block_editor(), 1);
4024 - var import_compose9 = __toESM(require_compose(), 1);
4025 - var import_data23 = __toESM(require_data(), 1);
4026 - var import_element20 = __toESM(require_element(), 1);
16106 + var import_compose11 = __toESM(require_compose(), 1);
16107 + var import_data24 = __toESM(require_data(), 1);
16108 + var import_element63 = __toESM(require_element(), 1);
4027 16109 var import_preferences7 = __toESM(require_preferences(), 1);
4028 16110
4029 16111 // packages/edit-widgets/build-module/components/notices/index.mjs
4030 16112 var import_notices2 = __toESM(require_notices(), 1);
4031 - var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
16113 + var import_theme = __toESM(require_theme(), 1);
16114 + var import_jsx_runtime81 = __toESM(require_jsx_runtime(), 1);
4032 16115 function Notices() {
4033 - return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
4034 - /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
16116 + return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_theme.ThemeProvider, { cornerRadius: "none", children: [
16117 + /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
4035 16118 import_notices2.InlineNotices,
4036 16119 {
16120 + className: "edit-widgets-notices",
4037 16121 pinnedNoticesClassName: "edit-widgets-notices__pinned",
4038 16122 dismissibleNoticesClassName: "edit-widgets-notices__dismissible"
4039 16123 }
4040 16124 ),
4041 - /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_notices2.SnackbarNotices, { className: "edit-widgets-notices__snackbar" })
16125 + /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_notices2.SnackbarNotices, { className: "edit-widgets-notices__snackbar" })
4042 16126 ] });
4043 16127 }
4044 16128 var notices_default = Notices;
4045 16129
4046 16130 // packages/edit-widgets/build-module/components/widget-areas-block-editor-content/index.mjs
4047 - var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
16131 + var import_jsx_runtime82 = __toESM(require_jsx_runtime(), 1);
4048 16132 function WidgetAreasBlockEditorContent({
4049 16133 blockEditorSettings
4050 16134 }) {
4051 - const hasThemeStyles = (0, import_data23.useSelect)(
16135 + const hasThemeStyles = (0, import_data24.useSelect)(
4052 16136 (select) => !!select(import_preferences7.store).get(
4053 16137 "core/edit-widgets",
4054 16138 "themeStyles"
4055 16139 ),
@@ -4054,18 +16138,18 @@
4054 16138 "themeStyles"
4055 16139 ),
4056 16140 []
4057 16141 );
4058 - const isLargeViewport = (0, import_compose9.useViewportMatch)("medium");
4059 - const styles = (0, import_element20.useMemo)(() => {
16142 + const isLargeViewport = (0, import_compose11.useViewportMatch)("medium");
16143 + const styles = (0, import_element63.useMemo)(() => {
4060 16144 return hasThemeStyles ? blockEditorSettings.styles : [];
4061 16145 }, [blockEditorSettings, hasThemeStyles]);
4062 - return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "edit-widgets-block-editor", children: [
4063 - /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(notices_default, {}),
4064 - !isLargeViewport && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_block_editor13.BlockToolbar, { hideDragHandle: true }),
4065 - /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_block_editor13.BlockTools, { children: [
4066 - /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(keyboard_shortcuts_default, {}),
4067 - /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
16146 + return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "edit-widgets-block-editor", children: [
16147 + /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(notices_default, {}),
16148 + !isLargeViewport && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_block_editor13.BlockToolbar, { hideDragHandle: true }),
16149 + /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_block_editor13.BlockTools, { children: [
16150 + /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(keyboard_shortcuts_default, {}),
16151 + /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
4068 16152 import_block_editor13.__unstableEditorStyles,
4069 16153 {
4070 16154 styles,
4071 16155 scope: ":where(.editor-styles-wrapper)"
@@ -4070,28 +16154,28 @@
4070 16154 styles,
4071 16155 scope: ":where(.editor-styles-wrapper)"
4072 16156 }
4073 16157 ),
4074 - /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_block_editor13.BlockSelectionClearer, { children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_block_editor13.WritingFlow, { children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_block_editor13.BlockList, { className: "edit-widgets-main-block-list" }) }) })
16158 + /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_block_editor13.BlockSelectionClearer, { children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_block_editor13.WritingFlow, { children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_block_editor13.BlockList, { className: "edit-widgets-main-block-list" }) }) })
4075 16159 ] })
4076 16160 ] });
4077 16161 }
4078 16162
4079 16163 // packages/edit-widgets/build-module/components/secondary-sidebar/index.mjs
4080 - var import_data27 = __toESM(require_data(), 1);
16164 + var import_data28 = __toESM(require_data(), 1);
4081 16165
4082 16166 // packages/edit-widgets/build-module/components/secondary-sidebar/inserter-sidebar.mjs
4083 16167 var import_block_editor15 = __toESM(require_block_editor(), 1);
4084 - var import_compose10 = __toESM(require_compose(), 1);
4085 - var import_element21 = __toESM(require_element(), 1);
4086 - var import_data25 = __toESM(require_data(), 1);
16168 + var import_compose12 = __toESM(require_compose(), 1);
16169 + var import_element64 = __toESM(require_element(), 1);
16170 + var import_data26 = __toESM(require_data(), 1);
4087 16171
4088 16172 // packages/edit-widgets/build-module/hooks/use-widget-library-insertion-point.mjs
4089 - var import_data24 = __toESM(require_data(), 1);
16173 + var import_data25 = __toESM(require_data(), 1);
4090 16174 var import_block_editor14 = __toESM(require_block_editor(), 1);
4091 16175 var import_core_data11 = __toESM(require_core_data(), 1);
4092 16176 var useWidgetLibraryInsertionPoint = () => {
4093 - const firstRootId = (0, import_data24.useSelect)((select) => {
16177 + const firstRootId = (0, import_data25.useSelect)((select) => {
4094 16178 const { getEntityRecord } = select(import_core_data11.store);
4095 16179 const widgetAreasPost = getEntityRecord(
4096 16180 KIND,
4097 16181 POST_TYPE,
@@ -4098,9 +16182,9 @@
4098 16182 buildWidgetAreasPostId()
4099 16183 );
4100 16184 return widgetAreasPost?.blocks[0]?.clientId;
4101 16185 }, []);
4102 - return (0, import_data24.useSelect)(
16186 + return (0, import_data25.useSelect)(
4103 16187 (select) => {
4104 16188 const {
4105 16189 getBlockRootClientId,
4106 16190 getBlockSelectionEnd,
@@ -4129,18 +16213,18 @@
4129 16213 };
4130 16214 var use_widget_library_insertion_point_default = useWidgetLibraryInsertionPoint;
4131 16215
4132 16216 // packages/edit-widgets/build-module/components/secondary-sidebar/inserter-sidebar.mjs
4133 - var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
16217 + var import_jsx_runtime83 = __toESM(require_jsx_runtime(), 1);
4134 16218 function InserterSidebar() {
4135 - const isMobileViewport = (0, import_compose10.useViewportMatch)("medium", "<");
16219 + const isMobileViewport = (0, import_compose12.useViewportMatch)("medium", "<");
4136 16220 const { rootClientId, insertionIndex } = use_widget_library_insertion_point_default();
4137 - const { setIsInserterOpened: setIsInserterOpened2 } = (0, import_data25.useDispatch)(store2);
4138 - const closeInserter = (0, import_element21.useCallback)(() => {
16221 + const { setIsInserterOpened: setIsInserterOpened2 } = (0, import_data26.useDispatch)(store2);
16222 + const closeInserter = (0, import_element64.useCallback)(() => {
4139 16223 return setIsInserterOpened2(false);
4140 16224 }, [setIsInserterOpened2]);
4141 - const libraryRef = (0, import_element21.useRef)();
4142 - return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "edit-widgets-layout__inserter-panel", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "edit-widgets-layout__inserter-panel-content", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
16225 + const libraryRef = (0, import_element64.useRef)();
16226 + return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "edit-widgets-layout__inserter-panel", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "edit-widgets-layout__inserter-panel-content", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
4143 16227 import_block_editor15.__experimentalLibrary,
4144 16228 {
4145 16229 showInserterHelpPanel: true,
4146 16230 shouldFocusBlock: isMobileViewport,
@@ -4153,25 +16237,23 @@
4153 16237 }
4154 16238
4155 16239 // packages/edit-widgets/build-module/components/secondary-sidebar/list-view-sidebar.mjs
4156 16240 var import_block_editor16 = __toESM(require_block_editor(), 1);
4157 - var import_components20 = __toESM(require_components(), 1);
4158 - var import_compose11 = __toESM(require_compose(), 1);
4159 - var import_data26 = __toESM(require_data(), 1);
4160 - var import_element22 = __toESM(require_element(), 1);
4161 - var import_i18n17 = __toESM(require_i18n(), 1);
16241 + var import_components18 = __toESM(require_components(), 1);
16242 + var import_data27 = __toESM(require_data(), 1);
16243 + var import_element65 = __toESM(require_element(), 1);
16244 + var import_i18n22 = __toESM(require_i18n(), 1);
4162 16245 var import_keycodes6 = __toESM(require_keycodes(), 1);
4163 - var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
16246 + var import_jsx_runtime84 = __toESM(require_jsx_runtime(), 1);
4164 16247 function ListViewSidebar() {
4165 - const { setIsListViewOpened: setIsListViewOpened2 } = (0, import_data26.useDispatch)(store2);
4166 - const { getListViewToggleRef: getListViewToggleRef2 } = unlock((0, import_data26.useSelect)(store2));
4167 - const [dropZoneElement, setDropZoneElement] = (0, import_element22.useState)(null);
4168 - const focusOnMountRef = (0, import_compose11.useFocusOnMount)("firstElement");
4169 - const closeListView = (0, import_element22.useCallback)(() => {
16248 + const { setIsListViewOpened: setIsListViewOpened2 } = (0, import_data27.useDispatch)(store2);
16249 + const { getListViewToggleRef: getListViewToggleRef2 } = unlock2((0, import_data27.useSelect)(store2));
16250 + const [dropZoneElement, setDropZoneElement] = (0, import_element65.useState)(null);
16251 + const closeListView = (0, import_element65.useCallback)(() => {
4170 16252 setIsListViewOpened2(false);
4171 16253 getListViewToggleRef2().current?.focus();
4172 16254 }, [getListViewToggleRef2, setIsListViewOpened2]);
4173 - const closeOnEscape = (0, import_element22.useCallback)(
16255 + const closeOnEscape = (0, import_element65.useCallback)(
4174 16256 (event) => {
4175 16257 if (event.keyCode === import_keycodes6.ESCAPE && !event.defaultPrevented) {
4176 16258 event.preventDefault();
4177 16259 closeListView();
@@ -4180,32 +16262,32 @@
4180 16262 [closeListView]
4181 16263 );
4182 16264 return (
4183 16265 // eslint-disable-next-line jsx-a11y/no-static-element-interactions
4184 - /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
16266 + /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
4185 16267 "div",
4186 16268 {
4187 16269 className: "edit-widgets-editor__list-view-panel",
4188 16270 onKeyDown: closeOnEscape,
4189 16271 children: [
4190 - /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "edit-widgets-editor__list-view-panel-header", children: [
4191 - /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("strong", { children: (0, import_i18n17.__)("List View") }),
4192 - /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
4193 - import_components20.Button,
16272 + /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "edit-widgets-editor__list-view-panel-header", children: [
16273 + /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("strong", { children: (0, import_i18n22.__)("List View") }),
16274 + /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
16275 + import_components18.Button,
4194 16276 {
4195 16277 icon: close_small_default,
4196 - label: (0, import_i18n17.__)("Close"),
16278 + label: (0, import_i18n22.__)("Close"),
4197 16279 onClick: closeListView,
4198 16280 size: "compact"
4199 16281 }
4200 16282 )
4201 16283 ] }),
4202 - /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
16284 + /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
4203 16285 "div",
4204 16286 {
4205 16287 className: "edit-widgets-editor__list-view-panel-content",
4206 - ref: (0, import_compose11.useMergeRefs)([focusOnMountRef, setDropZoneElement]),
4207 - children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_block_editor16.__experimentalListView, { dropZoneElement })
16288 + ref: setDropZoneElement,
16289 + children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_block_editor16.__experimentalListView, { dropZoneElement, focusOnMount: true })
4208 16290 }
4209 16291 )
4210 16292 ]
4211 16293 }
@@ -4213,11 +16295,11 @@
4213 16295 );
4214 16296 }
4215 16297
4216 16298 // packages/edit-widgets/build-module/components/secondary-sidebar/index.mjs
4217 - var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
16299 + var import_jsx_runtime85 = __toESM(require_jsx_runtime(), 1);
4218 16300 function SecondarySidebar() {
4219 - const { isInserterOpen, isListViewOpen } = (0, import_data27.useSelect)((select) => {
16301 + const { isInserterOpen, isListViewOpen } = (0, import_data28.useSelect)((select) => {
4220 16302 const { isInserterOpened: isInserterOpened2, isListViewOpened: isListViewOpened2 } = select(store2);
4221 16303 return {
4222 16304 isInserterOpen: isInserterOpened2(),
4223 16305 isListViewOpen: isListViewOpened2()
@@ -4223,38 +16305,38 @@
4223 16305 isListViewOpen: isListViewOpened2()
4224 16306 };
4225 16307 }, []);
4226 16308 if (isInserterOpen) {
4227 - return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(InserterSidebar, {});
16309 + return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(InserterSidebar, {});
4228 16310 }
4229 16311 if (isListViewOpen) {
4230 - return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ListViewSidebar, {});
16312 + return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ListViewSidebar, {});
4231 16313 }
4232 16314 return null;
4233 16315 }
4234 16316
4235 16317 // packages/edit-widgets/build-module/components/layout/interface.mjs
4236 - var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
16318 + var import_jsx_runtime86 = __toESM(require_jsx_runtime(), 1);
4237 16319 var interfaceLabels = {
4238 16320 /* translators: accessibility text for the widgets screen top bar landmark region. */
4239 - header: (0, import_i18n18.__)("Widgets top bar"),
16321 + header: (0, import_i18n23.__)("Widgets top bar"),
4240 16322 /* translators: accessibility text for the widgets screen content landmark region. */
4241 - body: (0, import_i18n18.__)("Widgets and blocks"),
16323 + body: (0, import_i18n23.__)("Widgets and blocks"),
4242 16324 /* translators: accessibility text for the widgets screen settings landmark region. */
4243 - sidebar: (0, import_i18n18.__)("Widgets settings"),
16325 + sidebar: (0, import_i18n23.__)("Widgets settings"),
4244 16326 /* translators: accessibility text for the widgets screen footer landmark region. */
4245 - footer: (0, import_i18n18.__)("Widgets footer")
16327 + footer: (0, import_i18n23.__)("Widgets footer")
4246 16328 };
4247 16329 function Interface({ blockEditorSettings }) {
4248 - const isMobileViewport = (0, import_compose12.useViewportMatch)("medium", "<");
4249 - const isHugeViewport = (0, import_compose12.useViewportMatch)("huge", ">=");
4250 - const { setIsInserterOpened: setIsInserterOpened2, setIsListViewOpened: setIsListViewOpened2, closeGeneralSidebar: closeGeneralSidebar2 } = (0, import_data28.useDispatch)(store2);
16330 + const isMobileViewport = (0, import_compose13.useViewportMatch)("medium", "<");
16331 + const isHugeViewport = (0, import_compose13.useViewportMatch)("huge", ">=");
16332 + const { setIsInserterOpened: setIsInserterOpened2, setIsListViewOpened: setIsListViewOpened2, closeGeneralSidebar: closeGeneralSidebar2 } = (0, import_data29.useDispatch)(store2);
4251 16333 const {
4252 16334 hasBlockBreadCrumbsEnabled,
4253 16335 hasSidebarEnabled,
4254 16336 isInserterOpened: isInserterOpened2,
4255 16337 isListViewOpened: isListViewOpened2
4256 - } = (0, import_data28.useSelect)(
16338 + } = (0, import_data29.useSelect)(
4257 16339 (select) => ({
4258 16340 hasSidebarEnabled: !!select(
4259 16341 store
4260 16342 ).getActiveComplementaryArea(store2.name),
@@ -4266,22 +16348,22 @@
4266 16348 )
4267 16349 }),
4268 16350 []
4269 16351 );
4270 - (0, import_element23.useEffect)(() => {
16352 + (0, import_element66.useEffect)(() => {
4271 16353 if (hasSidebarEnabled && !isHugeViewport) {
4272 16354 setIsInserterOpened2(false);
4273 16355 setIsListViewOpened2(false);
4274 16356 }
4275 16357 }, [hasSidebarEnabled, isHugeViewport]);
4276 - (0, import_element23.useEffect)(() => {
16358 + (0, import_element66.useEffect)(() => {
4277 16359 if ((isInserterOpened2 || isListViewOpened2) && !isHugeViewport) {
4278 16360 closeGeneralSidebar2();
4279 16361 }
4280 16362 }, [isInserterOpened2, isListViewOpened2, isHugeViewport]);
4281 - const secondarySidebarLabel = isListViewOpened2 ? (0, import_i18n18.__)("List View") : (0, import_i18n18.__)("Block Library");
16363 + const secondarySidebarLabel = isListViewOpened2 ? (0, import_i18n23.__)("List View") : (0, import_i18n23.__)("Block Library");
4282 16364 const hasSecondarySidebar = isListViewOpened2 || isInserterOpened2;
4283 - return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
16365 + return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4284 16366 interface_skeleton_default,
4285 16367 {
4286 16368 labels: {
4287 16369 ...interfaceLabels,
@@ -4286,18 +16368,18 @@
4286 16368 labels: {
4287 16369 ...interfaceLabels,
4288 16370 secondarySidebar: secondarySidebarLabel
4289 16371 },
4290 - header: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(header_default, {}),
4291 - secondarySidebar: hasSecondarySidebar && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(SecondarySidebar, {}),
4292 - sidebar: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(complementary_area_default.Slot, { scope: "core/edit-widgets" }),
4293 - content: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_jsx_runtime44.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
16372 + header: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(header_default, {}),
16373 + secondarySidebar: hasSecondarySidebar && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(SecondarySidebar, {}),
16374 + sidebar: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(complementary_area_default.Slot, { scope: "core/edit-widgets" }),
16375 + content: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_jsx_runtime86.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4294 16376 WidgetAreasBlockEditorContent,
4295 16377 {
4296 16378 blockEditorSettings
4297 16379 }
4298 16380 ) }),
4299 - footer: hasBlockBreadCrumbsEnabled && !isMobileViewport && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "edit-widgets-layout__footer", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_block_editor17.BlockBreadcrumb, { rootLabelText: (0, import_i18n18.__)("Widgets") }) })
16381 + footer: hasBlockBreadCrumbsEnabled && !isMobileViewport && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "edit-widgets-layout__footer", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_block_editor17.BlockBreadcrumb, { rootLabelText: (0, import_i18n23.__)("Widgets") }) })
4300 16382 }
4301 16383 );
4302 16384 }
4303 16385 var interface_default = Interface;
@@ -4302,21 +16384,21 @@
4302 16384 }
4303 16385 var interface_default = Interface;
4304 16386
4305 16387 // packages/edit-widgets/build-module/components/layout/unsaved-changes-warning.mjs
4306 - var import_i18n19 = __toESM(require_i18n(), 1);
4307 - var import_element24 = __toESM(require_element(), 1);
4308 - var import_data29 = __toESM(require_data(), 1);
16388 + var import_i18n24 = __toESM(require_i18n(), 1);
16389 + var import_element67 = __toESM(require_element(), 1);
16390 + var import_data30 = __toESM(require_data(), 1);
4309 16391 function UnsavedChangesWarning() {
4310 - const isDirty = (0, import_data29.useSelect)((select) => {
16392 + const isDirty = (0, import_data30.useSelect)((select) => {
4311 16393 const { getEditedWidgetAreas: getEditedWidgetAreas2 } = select(store2);
4312 16394 const editedWidgetAreas = getEditedWidgetAreas2();
4313 16395 return editedWidgetAreas?.length > 0;
4314 16396 }, []);
4315 - (0, import_element24.useEffect)(() => {
16397 + (0, import_element67.useEffect)(() => {
4316 16398 const warnIfUnsavedChanges = (event) => {
4317 16399 if (isDirty) {
4318 - event.returnValue = (0, import_i18n19.__)(
16400 + event.returnValue = (0, import_i18n24.__)(
4319 16401 "You have unsaved changes. If you proceed, they will be lost."
4320 16402 );
4321 16403 return event.returnValue;
4322 16404 }
@@ -4329,16 +16411,16 @@
4329 16411 return null;
4330 16412 }
4331 16413
4332 16414 // packages/edit-widgets/build-module/components/welcome-guide/index.mjs
4333 - var import_data30 = __toESM(require_data(), 1);
4334 - var import_components21 = __toESM(require_components(), 1);
4335 - var import_i18n20 = __toESM(require_i18n(), 1);
4336 - var import_element25 = __toESM(require_element(), 1);
16415 + var import_data31 = __toESM(require_data(), 1);
16416 + var import_components19 = __toESM(require_components(), 1);
16417 + var import_i18n25 = __toESM(require_i18n(), 1);
16418 + var import_element68 = __toESM(require_element(), 1);
4337 16419 var import_preferences9 = __toESM(require_preferences(), 1);
4338 - var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
16420 + var import_jsx_runtime87 = __toESM(require_jsx_runtime(), 1);
4339 16421 function WelcomeGuide() {
4340 - const isActive = (0, import_data30.useSelect)(
16422 + const isActive = (0, import_data31.useSelect)(
4341 16423 (select) => !!select(import_preferences9.store).get(
4342 16424 "core/edit-widgets",
4343 16425 "welcomeGuide"
4344 16426 ),
@@ -4343,10 +16425,10 @@
4343 16425 "welcomeGuide"
4344 16426 ),
4345 16427 []
4346 16428 );
4347 - const { toggle } = (0, import_data30.useDispatch)(import_preferences9.store);
4348 - const widgetAreas = (0, import_data30.useSelect)(
16429 + const { toggle } = (0, import_data31.useDispatch)(import_preferences9.store);
16430 + const widgetAreas = (0, import_data31.useSelect)(
4349 16431 (select) => select(store2).getWidgetAreas({ per_page: -1 }),
4350 16432 []
4351 16433 );
4352 16434 if (!isActive) {
@@ -4359,18 +16441,18 @@
4359 16441 );
4360 16442 const numWidgetAreas = widgetAreas?.filter(
4361 16443 (widgetArea) => widgetArea.id !== "wp_inactive_widgets"
4362 16444 ).length ?? 0;
4363 - return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
4364 - import_components21.Guide,
16445 + return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
16446 + import_components19.Guide,
4365 16447 {
4366 16448 className: "edit-widgets-welcome-guide",
4367 - contentLabel: (0, import_i18n20.__)("Welcome to block Widgets"),
4368 - finishButtonText: (0, import_i18n20.__)("Get started"),
16449 + contentLabel: (0, import_i18n25.__)("Welcome to block Widgets"),
16450 + finishButtonText: (0, import_i18n25.__)("Get started"),
4369 16451 onFinish: () => toggle("core/edit-widgets", "welcomeGuide"),
4370 16452 pages: [
4371 16453 {
4372 - image: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
16454 + image: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
4373 16455 WelcomeGuideImage,
4374 16456 {
4375 16457 nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-canvas.svg",
4376 16458 animatedSrc: "https://s.w.org/images/block-editor/welcome-canvas.gif"
@@ -4375,34 +16457,34 @@
4375 16457 nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-canvas.svg",
4376 16458 animatedSrc: "https://s.w.org/images/block-editor/welcome-canvas.gif"
4377 16459 }
4378 16460 ),
4379 - content: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
4380 - /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("h1", { className: "edit-widgets-welcome-guide__heading", children: (0, import_i18n20.__)("Welcome to block Widgets") }),
4381 - isEntirelyBlockWidgets ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "edit-widgets-welcome-guide__text", children: (0, import_i18n20.sprintf)(
16461 + content: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_jsx_runtime87.Fragment, { children: [
16462 + /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("h1", { className: "edit-widgets-welcome-guide__heading", children: (0, import_i18n25.__)("Welcome to block Widgets") }),
16463 + isEntirelyBlockWidgets ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_jsx_runtime87.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("p", { className: "edit-widgets-welcome-guide__text", children: (0, import_i18n25.sprintf)(
4382 16464 // Translators: %s: Number of block areas in the current theme.
4383 - (0, import_i18n20._n)(
16465 + (0, import_i18n25._n)(
4384 16466 "Your theme provides %s \u201Cblock\u201D area for you to add and edit content.\xA0Try adding a search bar, social icons, or other types of blocks here and see how they\u2019ll look on your site.",
4385 16467 "Your theme provides %s different \u201Cblock\u201D areas for you to add and edit content.\xA0Try adding a search bar, social icons, or other types of blocks here and see how they\u2019ll look on your site.",
4386 16468 numWidgetAreas
4387 16469 ),
4388 16470 numWidgetAreas
4389 - ) }) }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
4390 - /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "edit-widgets-welcome-guide__text", children: (0, import_i18n20.__)(
16471 + ) }) }) : /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_jsx_runtime87.Fragment, { children: [
16472 + /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("p", { className: "edit-widgets-welcome-guide__text", children: (0, import_i18n25.__)(
4391 16473 "You can now add any block to your site\u2019s widget areas. Don\u2019t worry, all of your favorite widgets still work flawlessly."
4392 16474 ) }),
4393 - /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("p", { className: "edit-widgets-welcome-guide__text", children: [
4394 - /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("strong", { children: (0, import_i18n20.__)(
16475 + /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("p", { className: "edit-widgets-welcome-guide__text", children: [
16476 + /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("strong", { children: (0, import_i18n25.__)(
4395 16477 "Want to stick with the old widgets?"
4396 16478 ) }),
4397 16479 " ",
4398 - /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
4399 - import_components21.ExternalLink,
16480 + /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
16481 + import_components19.ExternalLink,
4400 16482 {
4401 - href: (0, import_i18n20.__)(
16483 + href: (0, import_i18n25.__)(
4402 16484 "https://wordpress.org/plugins/classic-widgets/"
4403 16485 ),
4404 - children: (0, import_i18n20.__)(
16486 + children: (0, import_i18n25.__)(
4405 16487 "Get the Classic Widgets plugin."
4406 16488 )
4407 16489 }
4408 16490 )
@@ -4410,9 +16492,9 @@
4410 16492 ] })
4411 16493 ] })
4412 16494 },
4413 16495 {
4414 - image: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
16496 + image: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
4415 16497 WelcomeGuideImage,
4416 16498 {
4417 16499 nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-editor.svg",
4418 16500 animatedSrc: "https://s.w.org/images/block-editor/welcome-editor.gif"
@@ -4417,17 +16499,17 @@
4417 16499 nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-editor.svg",
4418 16500 animatedSrc: "https://s.w.org/images/block-editor/welcome-editor.gif"
4419 16501 }
4420 16502 ),
4421 - content: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
4422 - /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("h1", { className: "edit-widgets-welcome-guide__heading", children: (0, import_i18n20.__)("Customize each block") }),
4423 - /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "edit-widgets-welcome-guide__text", children: (0, import_i18n20.__)(
16503 + content: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_jsx_runtime87.Fragment, { children: [
16504 + /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("h1", { className: "edit-widgets-welcome-guide__heading", children: (0, import_i18n25.__)("Customize each block") }),
16505 + /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("p", { className: "edit-widgets-welcome-guide__text", children: (0, import_i18n25.__)(
4424 16506 "Each block comes with its own set of controls for changing things like color, width, and alignment. These will show and hide automatically when you have a block selected."
4425 16507 ) })
4426 16508 ] })
4427 16509 },
4428 16510 {
4429 - image: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
16511 + image: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
4430 16512 WelcomeGuideImage,
4431 16513 {
4432 16514 nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-library.svg",
4433 16515 animatedSrc: "https://s.w.org/images/block-editor/welcome-library.gif"
@@ -4432,20 +16514,20 @@
4432 16514 nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-library.svg",
4433 16515 animatedSrc: "https://s.w.org/images/block-editor/welcome-library.gif"
4434 16516 }
4435 16517 ),
4436 - content: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
4437 - /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("h1", { className: "edit-widgets-welcome-guide__heading", children: (0, import_i18n20.__)("Explore all blocks") }),
4438 - /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "edit-widgets-welcome-guide__text", children: (0, import_element25.createInterpolateElement)(
4439 - (0, import_i18n20.__)(
16518 + content: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_jsx_runtime87.Fragment, { children: [
16519 + /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("h1", { className: "edit-widgets-welcome-guide__heading", children: (0, import_i18n25.__)("Explore all blocks") }),
16520 + /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("p", { className: "edit-widgets-welcome-guide__text", children: (0, import_element68.createInterpolateElement)(
16521 + (0, import_i18n25.__)(
4440 16522 "All of the blocks available to you live in the block library. You\u2019ll find it wherever you see the <InserterIconImage /> icon."
4441 16523 ),
4442 16524 {
4443 - InserterIconImage: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
16525 + InserterIconImage: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
4444 16526 "img",
4445 16527 {
4446 16528 className: "edit-widgets-welcome-guide__inserter-icon",
4447 - alt: (0, import_i18n20.__)("inserter"),
16529 + alt: (0, import_i18n25.__)("inserter"),
4448 16530 src: "data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='18' height='18' rx='2' fill='%231E1E1E'/%3E%3Cpath d='M9.22727 4V14M4 8.77273H14' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E%0A"
4449 16531 }
4450 16532 )
4451 16533 }
@@ -4452,9 +16534,9 @@
4452 16534 ) })
4453 16535 ] })
4454 16536 },
4455 16537 {
4456 - image: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
16538 + image: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
4457 16539 WelcomeGuideImage,
4458 16540 {
4459 16541 nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.svg",
4460 16542 animatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.gif"
@@ -4459,19 +16541,19 @@
4459 16541 nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.svg",
4460 16542 animatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.gif"
4461 16543 }
4462 16544 ),
4463 - content: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
4464 - /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("h1", { className: "edit-widgets-welcome-guide__heading", children: (0, import_i18n20.__)("Learn more") }),
4465 - /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "edit-widgets-welcome-guide__text", children: (0, import_element25.createInterpolateElement)(
4466 - (0, import_i18n20.__)(
16545 + content: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_jsx_runtime87.Fragment, { children: [
16546 + /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("h1", { className: "edit-widgets-welcome-guide__heading", children: (0, import_i18n25.__)("Learn more") }),
16547 + /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("p", { className: "edit-widgets-welcome-guide__text", children: (0, import_element68.createInterpolateElement)(
16548 + (0, import_i18n25.__)(
4467 16549 "New to the block editor? Want to learn more about using it? <a>Here's a detailed guide.</a>"
4468 16550 ),
4469 16551 {
4470 - a: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
4471 - import_components21.ExternalLink,
16552 + a: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
16553 + import_components19.ExternalLink,
4472 16554 {
4473 - href: (0, import_i18n20.__)(
16555 + href: (0, import_i18n25.__)(
4474 16556 "https://wordpress.org/documentation/article/wordpress-block-editor/"
4475 16557 )
4476 16558 }
4477 16559 )
@@ -4483,10 +16565,10 @@
4483 16565 }
4484 16566 );
4485 16567 }
4486 16568 function WelcomeGuideImage({ nonAnimatedSrc, animatedSrc }) {
4487 - return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("picture", { className: "edit-widgets-welcome-guide__image", children: [
4488 - /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
16569 + return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("picture", { className: "edit-widgets-welcome-guide__image", children: [
16570 + /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
4489 16571 "source",
4490 16572 {
4491 16573 srcSet: nonAnimatedSrc,
4492 16574 media: "(prefers-reduced-motion: reduce)"
@@ -4491,21 +16573,21 @@
4491 16573 srcSet: nonAnimatedSrc,
4492 16574 media: "(prefers-reduced-motion: reduce)"
4493 16575 }
4494 16576 ),
4495 - /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("img", { src: animatedSrc, width: "312", height: "240", alt: "" })
16577 + /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("img", { src: animatedSrc, width: "312", height: "240", alt: "" })
4496 16578 ] });
4497 16579 }
4498 16580
4499 16581 // packages/edit-widgets/build-module/components/layout/index.mjs
4500 - var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
16582 + var import_jsx_runtime88 = __toESM(require_jsx_runtime(), 1);
4501 16583 function Layout({ blockEditorSettings }) {
4502 - const { createErrorNotice } = (0, import_data31.useDispatch)(import_notices4.store);
16584 + const { createErrorNotice } = (0, import_data32.useDispatch)(import_notices4.store);
4503 16585 function onPluginAreaError(name2) {
4504 16586 createErrorNotice(
4505 - (0, import_i18n21.sprintf)(
16587 + (0, import_i18n26.sprintf)(
4506 16588 /* translators: %s: plugin name */
4507 - (0, import_i18n21.__)(
16589 + (0, import_i18n26.__)(
4508 16590 'The "%s" plugin has encountered an error and cannot be rendered.'
4509 16591 ),
4510 16592 name2
4511 16593 )
@@ -4510,35 +16592,33 @@
4510 16592 name2
4511 16593 )
4512 16594 );
4513 16595 }
4514 - const navigateRegionsProps = (0, import_components22.__unstableUseNavigateRegions)();
4515 - return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ErrorBoundary, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
4516 - "div",
16596 + const navigateRegionsProps = (0, import_components20.__unstableUseNavigateRegions)();
16597 + const adminPrimary = (0, import_element69.useMemo)(() => getAdminThemeColors().primary, []);
16598 + return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_theme2.ThemeProvider, { isRoot: true, color: { primary: adminPrimary }, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(ErrorBoundary, { children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { ...navigateRegionsProps, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
16599 + WidgetAreasBlockEditorProvider,
4517 16600 {
4518 - className: navigateRegionsProps.className,
4519 - ...navigateRegionsProps,
4520 - ref: navigateRegionsProps.ref,
4521 - children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
4522 - WidgetAreasBlockEditorProvider,
4523 - {
4524 - blockEditorSettings,
4525 - children: [
4526 - /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(interface_default, { blockEditorSettings }),
4527 - /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Sidebar, {}),
4528 - /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_plugins3.PluginArea, { onError: onPluginAreaError }),
4529 - /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(UnsavedChangesWarning, {}),
4530 - /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(WelcomeGuide, {})
4531 - ]
4532 - }
4533 - )
16601 + blockEditorSettings,
16602 + children: [
16603 + /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
16604 + interface_default,
16605 + {
16606 + blockEditorSettings
16607 + }
16608 + ),
16609 + /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Sidebar, {}),
16610 + /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_plugins3.PluginArea, { onError: onPluginAreaError }),
16611 + /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(UnsavedChangesWarning, {}),
16612 + /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(WelcomeGuide, {})
16613 + ]
4534 16614 }
4535 - ) });
16615 + ) }) }) });
4536 16616 }
4537 - var layout_default = Layout;
16617 + var layout_default2 = Layout;
4538 16618
4539 16619 // packages/edit-widgets/build-module/index.mjs
4540 - var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
16620 + var import_jsx_runtime89 = __toESM(require_jsx_runtime(), 1);
4541 16621 var disabledBlocks = [
4542 16622 "core/more",
4543 16623 "core/freeform",
4544 16624 "core/template-part",
@@ -4545,23 +16625,23 @@
4545 16625 ...ALLOW_REUSABLE_BLOCKS ? [] : ["core/block"]
4546 16626 ];
4547 16627 function initializeEditor(id, settings2) {
4548 16628 const target = document.getElementById(id);
4549 - const root = (0, import_element26.createRoot)(target);
4550 - const coreBlocks = (0, import_block_library2.__experimentalGetCoreBlocks)().filter((block) => {
16629 + const root = (0, import_element70.createRoot)(target);
16630 + const coreBlocks = (0, import_block_library.__experimentalGetCoreBlocks)().filter((block) => {
4551 16631 return !(disabledBlocks.includes(block.name) || block.name.startsWith("core/post") || block.name.startsWith("core/query") || block.name.startsWith("core/site") || block.name.startsWith("core/navigation") || block.name.startsWith("core/term"));
4552 16632 });
4553 - (0, import_data32.dispatch)(import_preferences10.store).setDefaults("core/edit-widgets", {
16633 + (0, import_data33.dispatch)(import_preferences10.store).setDefaults("core/edit-widgets", {
4554 16634 fixedToolbar: false,
4555 16635 welcomeGuide: true,
4556 16636 showBlockBreadcrumbs: true,
4557 16637 themeStyles: true
4558 16638 });
4559 - (0, import_data32.dispatch)(import_blocks3.store).reapplyBlockTypeFilters();
4560 - (0, import_block_library2.registerCoreBlocks)(coreBlocks);
16639 + (0, import_data33.dispatch)(import_blocks3.store).reapplyBlockTypeFilters();
16640 + (0, import_block_library.registerCoreBlocks)(coreBlocks);
4561 16641 (0, import_widgets5.registerLegacyWidgetBlock)();
4562 16642 if (true) {
4563 - (0, import_block_library2.__experimentalRegisterExperimentalCoreBlocks)({
16643 + (0, import_block_library.__experimentalRegisterExperimentalCoreBlocks)({
4564 16644 enableFSEBlocks: ENABLE_EXPERIMENTAL_FSE_BLOCKS
4565 16645 });
4566 16646 }
4567 16647 (0, import_widgets5.registerLegacyWidgetVariations)(settings2);
@@ -4569,9 +16649,9 @@
4569 16649 (0, import_widgets5.registerWidgetGroupBlock)();
4570 16650 settings2.__experimentalFetchLinkSuggestions = (search, searchOptions) => (0, import_core_data12.__experimentalFetchLinkSuggestions)(search, searchOptions, settings2);
4571 16651 (0, import_blocks3.setFreeformContentHandlerName)("core/html");
4572 16652 root.render(
4573 - /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_element26.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(layout_default, { blockEditorSettings: settings2 }) })
16653 + /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_element70.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(layout_default2, { blockEditorSettings: settings2 }) })
4574 16654 );
4575 16655 return root;
4576 16656 }
4577 16657 var initialize = initializeEditor;
@@ -4591,6 +16671,32 @@
4591 16671 }
4592 16672 (0, import_blocks3.registerBlockType)(name2, settings2);
4593 16673 };
4594 16674 return __toCommonJS(index_exports);
16675 +})();
16676 +/*! Bundled license information:
16677 +
16678 +use-sync-external-store/cjs/use-sync-external-store-shim.development.js:
16679 + (**
16680 + * @license React
16681 + * use-sync-external-store-shim.development.js
16682 + *
16683 + * Copyright (c) Meta Platforms, Inc. and affiliates.
16684 + *
16685 + * This source code is licensed under the MIT license found in the
16686 + * LICENSE file in the root directory of this source tree.
16687 + *)
16688 +
16689 +use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js:
16690 + (**
16691 + * @license React
16692 + * use-sync-external-store-shim/with-selector.development.js
16693 + *
16694 + * Copyright (c) Meta Platforms, Inc. and affiliates.
16695 + *
16696 + * This source code is licensed under the MIT license found in the
16697 + * LICENSE file in the root directory of this source tree.
16698 + *)
16699 +*/
16700 +(window.wp ||= {}).editWidgets = wp.editWidgets;
4595 16701 })();
4596 16702 //# sourceMappingURL=index.js.map