@wp-playground/components 3.0.14 → 3.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../../packages/playground/components/src/icons.tsx","../../../../node_modules/@wordpress/icons/build-module/icon/index.js","../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../node_modules/react/jsx-runtime.js","../../../../node_modules/@wordpress/primitives/build-module/svg/index.js","../../../../node_modules/@wordpress/icons/build-module/library/chevron-down.js","../../../../node_modules/@wordpress/icons/build-module/library/chevron-right.js","../../../../packages/playground/components/src/FilePickerTree/index.tsx","../../../../packages/playground/components/src/FilePickerControl/PathPreview.tsx","../../../../packages/playground/components/src/FilePickerControl/index.tsx"],"sourcesContent":["import React from 'react';\n\nexport const playgroundLogo = (props?: React.SVGProps<SVGSVGElement>) => {\n\treturn (\n\t\t<svg\n\t\t\twidth=\"32\"\n\t\t\theight=\"32\"\n\t\t\tviewBox=\"0 0 32 32\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t{...props}\n\t\t>\n\t\t\t<rect\n\t\t\t\twidth=\"10.4176\"\n\t\t\t\theight=\"10.4176\"\n\t\t\t\trx=\"3.86258\"\n\t\t\t\ttransform=\"matrix(0.829038 -0.559193 0.838671 0.544639 7.45703 24.1775)\"\n\t\t\t\tstroke=\"white\"\n\t\t\t\tstrokeWidth=\"0.965644\"\n\t\t\t/>\n\t\t\t<rect\n\t\t\t\twidth=\"13.2346\"\n\t\t\t\theight=\"13.2346\"\n\t\t\t\trx=\"3.86258\"\n\t\t\t\ttransform=\"matrix(0.829038 -0.559193 0.838671 0.544639 5.0918 18.9934)\"\n\t\t\t\tstroke=\"white\"\n\t\t\t\tstrokeWidth=\"1.44847\"\n\t\t\t/>\n\t\t\t<rect\n\t\t\t\twidth=\"17.451\"\n\t\t\t\theight=\"17.451\"\n\t\t\t\trx=\"3.86258\"\n\t\t\t\ttransform=\"matrix(0.829038 -0.559193 0.838671 0.544639 1.55371 11.6099)\"\n\t\t\t\tstroke=\"white\"\n\t\t\t\tstrokeWidth=\"1.93129\"\n\t\t\t/>\n\t\t</svg>\n\t);\n};\n\nexport const temporaryStorage = (props?: React.SVGProps<SVGSVGElement>) => {\n\treturn (\n\t\t<svg\n\t\t\twidth=\"16\"\n\t\t\theight=\"17\"\n\t\t\tviewBox=\"0 0 16 17\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t{...props}\n\t\t>\n\t\t\t<path\n\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\tclipRule=\"evenodd\"\n\t\t\t\td=\"M8 15C4.41015 15 1.5 12.0899 1.5 8.5C1.5 4.91015 4.41015 2 8 2C11.5899 2 14.5 4.91015 14.5 8.5C14.5 12.0899 11.5899 15 8 15ZM0 8.5C0 4.08172 3.58172 0.5 8 0.5C12.4183 0.5 16 4.08172 16 8.5C16 12.9183 12.4183 16.5 8 16.5C3.58172 16.5 0 12.9183 0 8.5ZM9 9.5V4.5H7.5V8H5.5V9.5H9Z\"\n\t\t\t\tfill=\"#949494\"\n\t\t\t/>\n\t\t</svg>\n\t);\n};\n\nexport const WordPressIcon = (props?: React.SVGProps<SVGSVGElement>) => {\n\treturn (\n\t\t<svg\n\t\t\twidth=\"20\"\n\t\t\theight=\"21\"\n\t\t\tviewBox=\"0 0 20 21\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t{...props}\n\t\t>\n\t\t\t<path\n\t\t\t\td=\"M20 10.5C20 4.99 15.51 0.5 10 0.5C4.48 0.5 0 4.99 0 10.5C0 16.02 4.48 20.5 10 20.5C15.51 20.5 20 16.02 20 10.5ZM7.78 15.87L4.37 6.72C4.92 6.7 5.54 6.64 5.54 6.64C6.04 6.58 5.98 5.51 5.48 5.53C5.48 5.53 4.03 5.64 3.11 5.64C2.93 5.64 2.74 5.64 2.53 5.63C4.12 3.19 6.87 1.61 10 1.61C12.33 1.61 14.45 2.48 16.05 3.95C15.37 3.84 14.4 4.34 14.4 5.53C14.4 6.27 14.85 6.89 15.3 7.63C15.65 8.24 15.85 8.99 15.85 10.09C15.85 11.58 14.45 15.09 14.45 15.09L11.42 6.72C11.96 6.7 12.24 6.55 12.24 6.55C12.74 6.5 12.68 5.3 12.18 5.33C12.18 5.33 10.74 5.45 9.8 5.45C8.93 5.45 7.47 5.33 7.47 5.33C6.97 5.3 6.91 6.53 7.41 6.55L8.33 6.63L9.59 10.04L7.78 15.87ZM17.41 10.5C17.65 9.86 18.15 8.63 17.84 6.25C18.54 7.54 18.89 8.96 18.89 10.5C18.89 13.79 17.16 16.74 14.49 18.28C15.46 15.69 16.43 13.08 17.41 10.5ZM6.1 18.59C3.12 17.15 1.11 14.03 1.11 10.5C1.11 9.2 1.34 8.02 1.83 6.91C3.25 10.8 4.67 14.7 6.1 18.59ZM10.13 11.96L12.71 18.94C11.85 19.23 10.95 19.39 10 19.39C9.21 19.39 8.43 19.28 7.71 19.06C8.52 16.68 9.33 14.32 10.13 11.96Z\"\n\t\t\t\tfill=\"#ffffff\"\n\t\t\t/>\n\t\t</svg>\n\t);\n};\n\nexport const folder = (\n\t<svg\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\twidth=\"15\"\n\t\theight=\"14\"\n\t\tviewBox=\"0 0 15 14\"\n\t\tfill=\"none\"\n\t>\n\t\t<path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M7.59196 3.59524L6.77745 1.96623C6.70755 1.82641 6.56464 1.7381 6.40832 1.7381H1.65079C1.42287 1.7381 1.2381 1.92287 1.2381 2.15079V11.8492C1.2381 12.0771 1.42287 12.2619 1.65079 12.2619H13.2063C13.4343 12.2619 13.619 12.0771 13.619 11.8492V4.00794C13.619 3.78001 13.4343 3.59524 13.2063 3.59524H7.59196ZM8.35714 2.35714L7.88484 1.41254C7.60521 0.853274 7.0336 0.5 6.40832 0.5H1.65079C0.739085 0.5 0 1.23909 0 2.15079V11.8492C0 12.7609 0.739085 13.5 1.65079 13.5H13.2063C14.1181 13.5 14.8571 12.7609 14.8571 11.8492V4.00794C14.8571 3.09623 14.1181 2.35714 13.2063 2.35714H8.35714Z\"\n\t\t/>\n\t</svg>\n);\n\nexport const file = (\n\t<svg\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\twidth=\"16\"\n\t\theight=\"16\"\n\t\tfill=\"currentColor\"\n\t\tclassName=\"bi bi-file-earmark\"\n\t\tviewBox=\"0 0 16 16\"\n\t>\n\t\t<path d=\"M14 4.5V14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h5.5zm-3 0A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4.5z\" />\n\t</svg>\n);\n\nexport const ClockIcon = (props?: React.SVGProps<SVGSVGElement>) => (\n\t<svg\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\twidth=\"18\"\n\t\theight=\"18\"\n\t\tviewBox=\"0 0 14 14\"\n\t\tfill=\"none\"\n\t\t{...props}\n\t>\n\t\t<path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M7 12.6875C3.85888 12.6875 1.3125 10.1411 1.3125 7C1.3125 3.85888 3.85888 1.3125 7 1.3125C10.1411 1.3125 12.6875 3.85888 12.6875 7C12.6875 10.1411 10.1411 12.6875 7 12.6875ZM0 7C0 3.13401 3.13401 0 7 0C10.866 0 14 3.13401 14 7C14 10.866 10.866 14 7 14C3.13401 14 0 10.866 0 7ZM7.875 7.875V3.5H6.5625V6.5625H4.8125V7.875H7.875Z\"\n\t\t\tfill=\"#949494\"\n\t\t/>\n\t</svg>\n);\n\nexport const layout = (\n\t<svg\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\twidth=\"14\"\n\t\theight=\"14\"\n\t\tviewBox=\"0 0 14 14\"\n\t\tfill=\"none\"\n\t>\n\t\t<path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M12.25 1.3125H1.75C1.50838 1.3125 1.3125 1.50838 1.3125 1.75V4.37495H12.6875V1.75C12.6875 1.50837 12.4916 1.3125 12.25 1.3125ZM12.6875 5.68745H5.25003V12.6875H12.25C12.4916 12.6875 12.6875 12.4916 12.6875 12.25V5.68745ZM3.93753 5.68745H1.3125V12.25C1.3125 12.4916 1.50837 12.6875 1.75 12.6875H3.93753L3.93753 5.68745ZM1.75 0H12.25C13.2165 0 14 0.783502 14 1.75V12.25C14 13.2165 13.2165 14 12.25 14H1.75C0.783502 14 0 13.2165 0 12.25V1.75C0 0.783502 0.783502 0 1.75 0Z\"\n\t\t\tfill=\"#949494\"\n\t\t/>\n\t</svg>\n);\n\nexport function getLogoDataURL(logo: { mime: string; data: string }): string {\n\treturn `data:${logo.mime};base64,${logo.data}`;\n}\n\nexport function SiteManagerIcon() {\n\treturn (\n\t\t<svg\n\t\t\twidth=\"14\"\n\t\t\theight=\"14\"\n\t\t\tviewBox=\"0 0 14 14\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t>\n\t\t\t<path\n\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\tclipRule=\"evenodd\"\n\t\t\t\td=\"M1.99967 1.58301H4.49967C4.72979 1.58301 4.91634 1.76956 4.91634 1.99967V4.49967C4.91634 4.72979 4.72979 4.91634 4.49967 4.91634H1.99967C1.76956 4.91634 1.58301 4.72979 1.58301 4.49967V1.99967C1.58301 1.76956 1.76956 1.58301 1.99967 1.58301ZM0.333008 1.99967C0.333008 1.0792 1.0792 0.333008 1.99967 0.333008H4.49967C5.42015 0.333008 6.16634 1.0792 6.16634 1.99967V4.49967C6.16634 5.42015 5.42015 6.16634 4.49967 6.16634H1.99967C1.0792 6.16634 0.333008 5.42015 0.333008 4.49967V1.99967ZM9.49967 1.58301H11.9997C12.2298 1.58301 12.4163 1.76956 12.4163 1.99967V4.49967C12.4163 4.72979 12.2298 4.91634 11.9997 4.91634H9.49967C9.26956 4.91634 9.08301 4.72979 9.08301 4.49967V1.99967C9.08301 1.76956 9.26956 1.58301 9.49967 1.58301ZM7.83301 1.99967C7.83301 1.0792 8.5792 0.333008 9.49967 0.333008H11.9997C12.9201 0.333008 13.6663 1.0792 13.6663 1.99967V4.49967C13.6663 5.42015 12.9201 6.16634 11.9997 6.16634H9.49967C8.5792 6.16634 7.83301 5.42015 7.83301 4.49967V1.99967ZM11.9997 9.08301H9.49967C9.26956 9.08301 9.08301 9.26956 9.08301 9.49967V11.9997C9.08301 12.2298 9.26956 12.4163 9.49967 12.4163H11.9997C12.2298 12.4163 12.4163 12.2298 12.4163 11.9997V9.49967C12.4163 9.26956 12.2298 9.08301 11.9997 9.08301ZM9.49967 7.83301C8.5792 7.83301 7.83301 8.5792 7.83301 9.49967V11.9997C7.83301 12.9201 8.5792 13.6663 9.49967 13.6663H11.9997C12.9201 13.6663 13.6663 12.9201 13.6663 11.9997V9.49967C13.6663 8.5792 12.9201 7.83301 11.9997 7.83301H9.49967ZM1.99967 9.08301H4.49967C4.72979 9.08301 4.91634 9.26956 4.91634 9.49967V11.9997C4.91634 12.2298 4.72979 12.4163 4.49967 12.4163H1.99967C1.76956 12.4163 1.58301 12.2298 1.58301 11.9997V9.49967C1.58301 9.26956 1.76956 9.08301 1.99967 9.08301ZM0.333008 9.49967C0.333008 8.5792 1.0792 7.83301 1.99967 7.83301H4.49967C5.42015 7.83301 6.16634 8.5792 6.16634 9.49967V11.9997C6.16634 12.9201 5.42015 13.6663 4.49967 13.6663H1.99967C1.0792 13.6663 0.333008 12.9201 0.333008 11.9997V9.49967Z\"\n\t\t\t\tfill=\"white\"\n\t\t\t/>\n\t\t</svg>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { cloneElement, forwardRef } from '@wordpress/element';\n\n/**\n * External dependencies\n */\n\n/**\n * Return an SVG icon.\n *\n * @param props The component props.\n *\n * @return Icon component\n */\nexport default forwardRef(({\n icon,\n size = 24,\n ...props\n}, ref) => {\n return cloneElement(icon, {\n width: size,\n height: size,\n ...props,\n ref\n });\n});\n//# sourceMappingURL=index.js.map","/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\nvar React = require('react');\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\nvar assign = Object.assign;\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"<anonymous>\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('<anonymous>')) {\n _frame = _frame.replace('<anonymous>', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown;\nvar specialPropRefWarningShown;\nvar didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config, self) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {\n var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingKey = function () {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n }\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingRef = function () {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * https://github.com/reactjs/rfcs/pull/107\n * @param {*} type\n * @param {object} props\n * @param {string} key\n */\n\nfunction jsxDEV(type, config, maybeKey, source, self) {\n {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null; // Currently, key can be spread in as a prop. This causes a potential\n // issue if key is also explicitly declared (ie. <div {...props} key=\"Hi\" />\n // or <div key=\"Hi\" {...props} /> ). We want to deprecate key spread,\n // but as an intermediary step, we will use jsxDEV for everything except\n // <div {...props} key=\"Hi\" />, because we aren't currently able to tell if\n // key is explicitly declared to be undefined or not.\n\n if (maybeKey !== undefined) {\n {\n checkKeyStringCoercion(maybeKey);\n }\n\n key = '' + maybeKey;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n }\n\n if (hasValidRef(config)) {\n ref = config.ref;\n warnIfStringRefCannotBeAutoConverted(config, self);\n } // Remaining properties are added to a new props object\n\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n }\n}\n\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\n\nfunction isValidElement(object) {\n {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n }\n}\n\nfunction getDeclarationErrorAddendum() {\n {\n if (ReactCurrentOwner$1.current) {\n var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n }\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n }\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n }\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n }\n\n setCurrentlyValidatingElement$1(element);\n\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n setCurrentlyValidatingElement$1(null);\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n {\n if (typeof node !== 'object') {\n return;\n }\n\n if (isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n // Intentionally inside to avoid triggering lazy initializers:\n var name = getComponentNameFromType(type);\n checkPropTypes(propTypes, element.props, 'prop', name, element);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n var _name = getComponentNameFromType(type);\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement$1(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement$1(null);\n }\n }\n}\n\nvar didWarnAboutKeySpread = {};\nfunction jsxWithValidation(type, props, key, isStaticChildren, source, self) {\n {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendum(source);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n\n var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n var children = props.children;\n\n if (children !== undefined) {\n if (isStaticChildren) {\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n validateChildKeys(children[i], type);\n }\n\n if (Object.freeze) {\n Object.freeze(children);\n }\n } else {\n error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');\n }\n } else {\n validateChildKeys(children, type);\n }\n }\n }\n\n {\n if (hasOwnProperty.call(props, 'key')) {\n var componentName = getComponentNameFromType(type);\n var keys = Object.keys(props).filter(function (k) {\n return k !== 'key';\n });\n var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';\n\n if (!didWarnAboutKeySpread[componentName + beforeExample]) {\n var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';\n\n error('A props object containing a \"key\" prop is being spread into JSX:\\n' + ' let props = %s;\\n' + ' <%s {...props} />\\n' + 'React keys must be passed directly to JSX without using spread:\\n' + ' let props = %s;\\n' + ' <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);\n\n didWarnAboutKeySpread[componentName + beforeExample] = true;\n }\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n }\n} // These two functions exist to still get child warnings in dev\n// even with the prod transform. This means that jsxDEV is purely\n// opt-in behavior for better messages but that we won't stop\n// giving you warnings if you use production apis.\n\nfunction jsxWithValidationStatic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, true);\n }\n}\nfunction jsxWithValidationDynamic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, false);\n }\n}\n\nvar jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.\n// for now we can ship identical prod functions\n\nvar jsxs = jsxWithValidationStatic ;\n\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsx;\nexports.jsxs = jsxs;\n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { createElement, forwardRef } from '@wordpress/element';\n\n/** @typedef {{isPressed?: boolean} & import('react').ComponentPropsWithoutRef<'svg'>} SVGProps */\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'circle'>} props\n *\n * @return {JSX.Element} Circle component\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const Circle = props => createElement('circle', props);\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'g'>} props\n *\n * @return {JSX.Element} G component\n */\nexport const G = props => createElement('g', props);\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'line'>} props\n *\n * @return {JSX.Element} Path component\n */\nexport const Line = props => createElement('line', props);\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'path'>} props\n *\n * @return {JSX.Element} Path component\n */\nexport const Path = props => createElement('path', props);\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'polygon'>} props\n *\n * @return {JSX.Element} Polygon component\n */\nexport const Polygon = props => createElement('polygon', props);\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'rect'>} props\n *\n * @return {JSX.Element} Rect component\n */\nexport const Rect = props => createElement('rect', props);\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'defs'>} props\n *\n * @return {JSX.Element} Defs component\n */\nexport const Defs = props => createElement('defs', props);\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'radialGradient'>} props\n *\n * @return {JSX.Element} RadialGradient component\n */\nexport const RadialGradient = props => createElement('radialGradient', props);\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'linearGradient'>} props\n *\n * @return {JSX.Element} LinearGradient component\n */\nexport const LinearGradient = props => createElement('linearGradient', props);\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'stop'>} props\n *\n * @return {JSX.Element} Stop component\n */\nexport const Stop = props => createElement('stop', props);\nexport const SVG = forwardRef(\n/**\n * @param {SVGProps} props isPressed indicates whether the SVG should appear as pressed.\n * Other props will be passed through to svg component.\n * @param {import('react').ForwardedRef<SVGSVGElement>} ref The forwarded ref to the SVG element.\n *\n * @return {JSX.Element} Stop component\n */\n({\n className,\n isPressed,\n ...props\n}, ref) => {\n const appliedProps = {\n ...props,\n className: clsx(className, {\n 'is-pressed': isPressed\n }) || undefined,\n 'aria-hidden': true,\n focusable: false\n };\n\n // Disable reason: We need to have a way to render HTML tag for web.\n // eslint-disable-next-line react/forbid-elements\n return /*#__PURE__*/_jsx(\"svg\", {\n ...appliedProps,\n ref: ref\n });\n});\nSVG.displayName = 'SVG';\n//# sourceMappingURL=index.js.map","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst chevronDown = /*#__PURE__*/_jsx(SVG, {\n viewBox: \"0 0 24 24\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: /*#__PURE__*/_jsx(Path, {\n d: \"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z\"\n })\n});\nexport default chevronDown;\n//# sourceMappingURL=chevron-down.js.map","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst chevronRight = /*#__PURE__*/_jsx(SVG, {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\",\n children: /*#__PURE__*/_jsx(Path, {\n d: \"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z\"\n })\n});\nexport default chevronRight;\n//# sourceMappingURL=chevron-right.js.map","import React, {\n\tforwardRef,\n\tuseEffect,\n\tuseImperativeHandle,\n\tuseMemo,\n\tuseRef,\n\tuseState,\n} from 'react';\nimport {\n\t__experimentalTreeGrid as TreeGrid,\n\t__experimentalTreeGridRow as TreeGridRow,\n\t__experimentalTreeGridCell as TreeGridCell,\n\tButton,\n\tPopover,\n\tNavigableMenu,\n\tMenuItem,\n} from '@wordpress/components';\nimport { Icon, chevronDown, chevronRight } from '@wordpress/icons';\nimport '@wordpress/components/build-style/style.css';\nimport css from './style.module.css';\nimport classNames from 'classnames';\nimport { file, folder } from '../icons';\nimport { basename, dirname, joinPaths } from '@php-wasm/util';\n\ntype ExpandedNodePaths = Record<string, boolean>;\n\ntype DropIndicatorState = 'valid' | 'invalid';\n\ntype DropIndicator = {\n\tpath: string;\n\tstate: DropIndicatorState;\n};\n\ntype DropEvaluation = {\n\tallowed: boolean;\n\tstate: DropIndicatorState;\n\tdestination: string | null;\n};\n\ninterface FileSystemEntryBaseLike {\n\treadonly isFile: boolean;\n\treadonly isDirectory: boolean;\n\treadonly name: string;\n}\n\ninterface FileSystemFileEntryLike extends FileSystemEntryBaseLike {\n\tfile: (\n\t\tsuccessCallback: (file: File) => void,\n\t\terrorCallback?: (error: DOMException) => void\n\t) => void;\n}\n\ninterface FileSystemDirectoryReaderLike {\n\treadEntries: (\n\t\tsuccessCallback: (entries: FileSystemEntryLike[]) => void,\n\t\terrorCallback?: (error: DOMException) => void\n\t) => void;\n}\n\ninterface FileSystemDirectoryEntryLike extends FileSystemEntryBaseLike {\n\tcreateReader: () => FileSystemDirectoryReaderLike;\n}\n\ntype FileSystemEntryLike =\n\t| FileSystemFileEntryLike\n\t| FileSystemDirectoryEntryLike;\n\nexport interface AsyncWritableFilesystem {\n\tisDir: (path: string) => Promise<boolean>;\n\tfileExists: (path: string) => Promise<boolean>;\n\treadFileAsBuffer: (path: string) => Promise<Uint8Array>;\n\treadFileAsText: (path: string) => Promise<string>;\n\tlistFiles: (path: string) => Promise<string[]>;\n\twriteFile: (path: string, data: Uint8Array | string) => Promise<void>;\n\tmkdir: (path: string) => Promise<void>;\n\trmdir: (path: string, options?: { recursive?: boolean }) => Promise<void>;\n\tmv: (source: string, destination: string) => Promise<void>;\n\tunlink: (path: string) => Promise<void>;\n}\n\nexport type FileNode = {\n\tname: string;\n\ttype: 'file' | 'folder';\n\tchildren?: FileNode[];\n};\n\nexport type FilePickerTreeProps = {\n\tfilesystem: AsyncWritableFilesystem;\n\troot?: string; // default '/wordpress'\n\tinitialSelectedPath?: string;\n\tonSelect?: (path: string | null) => void;\n};\n\nexport type FilePickerTreeHandle = {\n\tfocusPath: (\n\t\tpath: string,\n\t\toptions?: { select?: boolean; domFocus?: boolean; notify?: boolean }\n\t) => void;\n\tselectPath: (path: string) => void;\n\tgetSelectedPath: () => string | null;\n\texpandToPath: (path: string) => Promise<void>;\n\trefresh: (path: string) => Promise<FileNode[] | undefined>;\n\tremapPath: (from: string, to: string) => void;\n\t// Filesystem helpers\n\tcreateFile: (absSelectedPath?: string) => Promise<void>;\n\tcreateFolder: (absSelectedPath?: string) => Promise<void>;\n};\n\nfunction buildPathChain(path: string): string[] {\n\tif (!path) return [];\n\tconst normalized =\n\t\tpath\n\t\t\t.replaceAll(/\\\\+/g, '/')\n\t\t\t.replace(/\\/{2,}/g, '/')\n\t\t\t.replace(/\\/$/, '') || path;\n\tconst hasLeadingSlash = normalized.startsWith('/');\n\tconst parts = normalized.split('/').filter(Boolean);\n\tconst chain: string[] = [];\n\tlet current = hasLeadingSlash ? '/' : '';\n\tif (hasLeadingSlash) chain.push('/');\n\tfor (const part of parts) {\n\t\tif (!current || current === '/') {\n\t\t\tcurrent = current === '/' ? `/${part}` : part;\n\t\t} else {\n\t\t\tcurrent = `${current}/${part}`;\n\t\t}\n\t\tchain.push(current);\n\t}\n\treturn chain;\n}\n\nfunction isDescendantPath(ancestor: string, candidate: string) {\n\tif (!ancestor || !candidate) return false;\n\tif (ancestor === candidate) return false;\n\tconst normalizedAncestor =\n\t\tancestor === '/' ? '/' : ancestor.replace(/\\/{2,}/g, '/');\n\tconst normalizedCandidate = candidate.replace(/\\/{2,}/g, '/');\n\tif (normalizedAncestor === '/') {\n\t\treturn (\n\t\t\tnormalizedCandidate.startsWith('/') && normalizedCandidate !== '/'\n\t\t);\n\t}\n\treturn normalizedCandidate.startsWith(`${normalizedAncestor}/`);\n}\n\nfunction remapSinglePath(value: string | null, from: string, to: string) {\n\tif (!value) return value;\n\tif (value === from) return to;\n\tif (value.startsWith(from === '/' ? '/' : `${from}/`)) {\n\t\treturn to + value.slice(from.length);\n\t}\n\treturn value;\n}\n\nexport const FilePickerTree = forwardRef<\n\tFilePickerTreeHandle,\n\tFilePickerTreeProps\n>(function FilePickerTree(\n\t{\n\t\tfilesystem,\n\t\troot = '/wordpress',\n\t\tinitialSelectedPath,\n\t\tonSelect = () => {},\n\t},\n\tref\n) {\n\tconst normalizedRoot = useMemo(() => {\n\t\tlet p = (root || '/').replace(/\\\\+/g, '/');\n\t\tif (!p.startsWith('/')) p = `/${p}`;\n\t\tp = p.replace(/\\/{2,}/g, '/');\n\t\tif (p.length > 1 && p.endsWith('/')) p = p.slice(0, -1);\n\t\treturn p || '/';\n\t}, [root]);\n\n\tconst isValidNameSegment = (name: string) => {\n\t\tif (!name) return false;\n\t\tif (name === '.' || name === '..') return false;\n\t\treturn !/[\\\\/]/.test(name);\n\t};\n\n\tconst [expanded, setExpanded] = useState<ExpandedNodePaths>(() => {\n\t\tif (!initialSelectedPath) {\n\t\t\treturn {};\n\t\t}\n\t\tconst initialExpanded: ExpandedNodePaths = {};\n\t\tfor (const path of buildPathChain(initialSelectedPath)) {\n\t\t\tinitialExpanded[path] = true;\n\t\t}\n\t\treturn initialExpanded;\n\t});\n\tconst [selectedPath, setSelectedPath] = useState<string | null>(\n\t\t() => initialSelectedPath ?? null\n\t);\n\tconst [focusedPath, setFocusedPath] = useState<string | null>(\n\t\t() => initialSelectedPath ?? null\n\t);\n\tconst [lazyChildren, setLazyChildren] = useState<\n\t\tRecord<string, FileNode[]>\n\t>({});\n\tconst [loadingPaths, setLoadingPaths] = useState<Record<string, boolean>>(\n\t\t{}\n\t);\n\tconst [draggedPath, setDraggedPath] = useState<string | null>(null);\n\tconst [dropIndicator, setDropIndicator] = useState<DropIndicator | null>(\n\t\tnull\n\t);\n\tconst dragExpandTimeoutsRef = useRef<Record<string, number>>({});\n\tconst rootAutoExpandedRef = useRef(false);\n\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\tconst searchBufferTimeoutRef = useRef<NodeJS.Timeout | null>(null);\n\tconst loadingPathsRef = useRef(loadingPaths);\n\tconst lazyChildrenRef = useRef(lazyChildren);\n\tconst clearAllDragExpandTimeouts = () => {\n\t\tfor (const key of Object.keys(dragExpandTimeoutsRef.current)) {\n\t\t\tclearTimeout(dragExpandTimeoutsRef.current[key]);\n\t\t\tdelete dragExpandTimeoutsRef.current[key];\n\t\t}\n\t};\n\tconst cancelExpandOnDrag = (path: string) => {\n\t\tconst timeoutId = dragExpandTimeoutsRef.current[path];\n\t\tif (timeoutId) {\n\t\t\tclearTimeout(timeoutId);\n\t\t\tdelete dragExpandTimeoutsRef.current[path];\n\t\t}\n\t};\n\n\tuseEffect(() => {\n\t\tloadingPathsRef.current = loadingPaths;\n\t}, [loadingPaths]);\n\n\tuseEffect(() => {\n\t\tlazyChildrenRef.current = lazyChildren;\n\t}, [lazyChildren]);\n\n\tconst focusDomNode = (path: string) => {\n\t\tconst focusTarget = containerRef.current?.querySelector(\n\t\t\t`[data-path=\"${path}\"]`\n\t\t) as HTMLElement | null;\n\t\tif (focusTarget && typeof focusTarget.focus === 'function') {\n\t\t\tfocusTarget.focus();\n\t\t}\n\t};\n\n\tconst generatePath = (node: FileNode, parentPath = ''): string => {\n\t\tconst raw = parentPath ? `${parentPath}/${node.name}` : node.name;\n\t\treturn raw.replaceAll(/\\\\+/g, '/').replace(/\\/{2,}/g, '/');\n\t};\n\n\tconst getResolvedChildren = (\n\t\tnode: FileNode,\n\t\tpath: string\n\t): FileNode[] | undefined => {\n\t\tif (node.children) {\n\t\t\treturn node.children;\n\t\t}\n\t\treturn lazyChildren[path];\n\t};\n\n\tconst listDir = async (fs: AsyncWritableFilesystem, basePath: string) => {\n\t\tconst names = await fs.listFiles(basePath);\n\t\tconst results: { name: string; type: 'file' | 'folder' }[] = [];\n\t\tfor (const name of names) {\n\t\t\tconst childPath =\n\t\t\t\tbasePath === '/' ? `/${name}` : `${basePath}/${name}`;\n\t\t\tconst isDirectory = await fs.isDir(childPath);\n\t\t\tresults.push({ name, type: isDirectory ? 'folder' : 'file' });\n\t\t}\n\t\tresults.sort((a, b) => {\n\t\t\tif (a.type !== b.type) return a.type === 'folder' ? -1 : 1;\n\t\t\treturn a.name.localeCompare(b.name);\n\t\t});\n\t\treturn results as FileNode[];\n\t};\n\n\tconst loadChildren = async (path: string): Promise<FileNode[]> => {\n\t\treturn await listDir(filesystem as AsyncWritableFilesystem, path);\n\t};\n\n\tconst loadChildrenForPath = (path: string, node: FileNode) => {\n\t\tif (node.type !== 'folder') {\n\t\t\treturn node.children;\n\t\t}\n\t\tconst existingChildren = node.children ?? lazyChildrenRef.current[path];\n\t\tif (existingChildren || loadingPathsRef.current[path]) {\n\t\t\treturn existingChildren;\n\t\t}\n\t\tsetLoadingPaths((prev) => ({ ...prev, [path]: true }));\n\t\treturn new Promise<FileNode[]>((resolve) => {\n\t\t\tloadChildren(path)\n\t\t\t\t.then((children) => {\n\t\t\t\t\tsetLazyChildren((prev) => ({\n\t\t\t\t\t\t...prev,\n\t\t\t\t\t\t[path]: children ?? [],\n\t\t\t\t\t}));\n\t\t\t\t\tresolve(children ?? []);\n\t\t\t\t})\n\t\t\t\t.catch(() => {\n\t\t\t\t\tresolve([]);\n\t\t\t\t})\n\t\t\t\t.finally(() => {\n\t\t\t\t\tsetLoadingPaths((prev) => {\n\t\t\t\t\t\tconst next = { ...prev };\n\t\t\t\t\t\tdelete next[path];\n\t\t\t\t\t\treturn next;\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t});\n\t};\n\n\tconst scheduleExpandOnDrag = (path: string, node: FileNode) => {\n\t\tif (node.type !== 'folder') {\n\t\t\treturn;\n\t\t}\n\t\tif (typeof window === 'undefined') {\n\t\t\treturn;\n\t\t}\n\t\tif (dragExpandTimeoutsRef.current[path]) {\n\t\t\treturn;\n\t\t}\n\t\tdragExpandTimeoutsRef.current[path] = window.setTimeout(() => {\n\t\t\tsetExpanded((prev) => {\n\t\t\t\tif (prev[path]) {\n\t\t\t\t\treturn prev;\n\t\t\t\t}\n\t\t\t\treturn { ...prev, [path]: true };\n\t\t\t});\n\t\t\tvoid loadChildrenForPath(path, node);\n\t\t\tdelete dragExpandTimeoutsRef.current[path];\n\t\t}, 600);\n\t};\n\n\tconst refreshChildren = (path: string) => {\n\t\tsetLoadingPaths((prev) => ({ ...prev, [path]: true }));\n\t\treturn new Promise<FileNode[]>((resolve) => {\n\t\t\tloadChildren(path)\n\t\t\t\t.then((children) => {\n\t\t\t\t\tsetLazyChildren((prev) => ({\n\t\t\t\t\t\t...prev,\n\t\t\t\t\t\t[path]: children ?? [],\n\t\t\t\t\t}));\n\t\t\t\t\tresolve(children ?? []);\n\t\t\t\t})\n\t\t\t\t.catch(() => {\n\t\t\t\t\tresolve([]);\n\t\t\t\t})\n\t\t\t\t.finally(() => {\n\t\t\t\t\tsetLoadingPaths((prev) => {\n\t\t\t\t\t\tconst next = { ...prev };\n\t\t\t\t\t\tdelete next[path];\n\t\t\t\t\t\treturn next;\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t});\n\t};\n\n\tconst toggleNode = (path: string, node: FileNode, isOpen: boolean) => {\n\t\tsetExpanded((prev) => ({\n\t\t\t...prev,\n\t\t\t[path]: isOpen,\n\t\t}));\n\t\tif (isOpen) {\n\t\t\tvoid loadChildrenForPath(path, node);\n\t\t} else {\n\t\t\tsetLazyChildren((prev) => {\n\t\t\t\tif (prev[path] === undefined) {\n\t\t\t\t\treturn prev;\n\t\t\t\t}\n\t\t\t\tconst next = { ...prev } as Record<string, FileNode[]>;\n\t\t\t\tdelete next[path];\n\t\t\t\treturn next;\n\t\t\t});\n\t\t}\n\t};\n\n\tconst expandToPath = async (targetPath: string) => {\n\t\tif (!targetPath) return;\n\t\tconst chain = buildPathChain(targetPath);\n\t\tif (chain.length === 0) return;\n\t\tsetExpanded((prev) => {\n\t\t\tconst next = { ...prev } as ExpandedNodePaths;\n\t\t\tfor (const segment of chain) {\n\t\t\t\tnext[segment] = true;\n\t\t\t}\n\t\t\treturn next;\n\t\t});\n\t\t// always available in filesystem mode\n\n\t\tlet currentChildren: FileNode[] | undefined = [\n\t\t\t{ name: normalizedRoot, type: 'folder' },\n\t\t];\n\t\tlet parentPath = '';\n\t\tfor (const segmentPath of chain) {\n\t\t\tconst nextNode = currentChildren?.find((child) => {\n\t\t\t\tconst childPath = generatePath(child, parentPath);\n\t\t\t\treturn childPath === segmentPath;\n\t\t\t});\n\t\t\tif (!nextNode || nextNode.type !== 'folder') {\n\t\t\t\tparentPath = segmentPath;\n\t\t\t\tcurrentChildren = [];\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst loaded = await loadChildrenForPath(segmentPath, nextNode);\n\t\t\tcurrentChildren = loaded ?? lazyChildrenRef.current[segmentPath];\n\t\t\tparentPath = segmentPath;\n\t\t}\n\t};\n\n\tconst remapPathState = (from: string, to: string) => {\n\t\tif (!from || !to || from === to) {\n\t\t\treturn;\n\t\t}\n\t\tconst fromPrefix = from === '/' ? '/' : `${from}/`;\n\t\tconst remapKey = (key: string): string | null => {\n\t\t\tif (key === from) return to;\n\t\t\tif (key.startsWith(fromPrefix)) {\n\t\t\t\treturn to + key.slice(from.length);\n\t\t\t}\n\t\t\treturn null;\n\t\t};\n\n\t\tsetExpanded((prev) => {\n\t\t\tlet changed = false;\n\t\t\tconst next: ExpandedNodePaths = { ...prev };\n\t\t\tfor (const key of Object.keys(prev)) {\n\t\t\t\tconst mapped = remapKey(key);\n\t\t\t\tif (mapped && mapped !== key) {\n\t\t\t\t\tnext[mapped] = prev[key];\n\t\t\t\t\tdelete next[key];\n\t\t\t\t\tchanged = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn changed ? next : prev;\n\t\t});\n\n\t\tsetLazyChildren((prev) => {\n\t\t\tlet changed = false;\n\t\t\tconst next = { ...prev } as Record<string, FileNode[]>;\n\t\t\tfor (const key of Object.keys(prev)) {\n\t\t\t\tconst mapped = remapKey(key);\n\t\t\t\tif (mapped && mapped !== key) {\n\t\t\t\t\tnext[mapped] = prev[key];\n\t\t\t\t\tdelete next[key];\n\t\t\t\t\tchanged = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn changed ? next : prev;\n\t\t});\n\n\t\tsetSelectedPath((prev) => {\n\t\t\tif (!prev) return prev;\n\t\t\tconst mapped = remapKey(prev);\n\t\t\treturn mapped ?? prev;\n\t\t});\n\t\tsetFocusedPath((prev) => {\n\t\t\tif (!prev) return prev;\n\t\t\tconst mapped = remapKey(prev);\n\t\t\treturn mapped ?? prev;\n\t\t});\n\t};\n\n\tconst resetDragState = () => {\n\t\tsetDraggedPath(null);\n\t\tsetDropIndicator(null);\n\t\tclearAllDragExpandTimeouts();\n\t};\n\n\tconst selectPath = (path: string, notify = true) => {\n\t\tsetSelectedPath(path);\n\t\tif (notify) {\n\t\t\tonSelect(path);\n\t\t}\n\t};\n\n\t// Filesystem-specific state and actions (declare before exposing handle)\n\tconst treeFiles: FileNode[] = useMemo(() => {\n\t\treturn [{ name: normalizedRoot, type: 'folder' }];\n\t}, [normalizedRoot]);\n\n\tconst [contextMenu, setContextMenu] = useState<{\n\t\tabsPath: string;\n\t\ttype: 'file' | 'folder';\n\t\tx: number;\n\t\ty: number;\n\t} | null>(null);\n\tconst [renamingAbsolutePath, setRenamingAbsolutePath] = useState<\n\t\tstring | null\n\t>(null);\n\tconst pendingCreateRef = useRef<{\n\t\ttype: 'file' | 'folder';\n\t\ttempPath: string;\n\t} | null>(null);\n\n\tconst effectiveRenamingPath = renamingAbsolutePath;\n\n\tuseImperativeHandle(\n\t\tref,\n\t\t() => ({\n\t\t\tfocusPath: (\n\t\t\t\tpath: string,\n\t\t\t\toptions: {\n\t\t\t\t\tselect?: boolean;\n\t\t\t\t\tdomFocus?: boolean;\n\t\t\t\t\tnotify?: boolean;\n\t\t\t\t} = {}\n\t\t\t) => {\n\t\t\t\tif (!path) return;\n\t\t\t\tconst {\n\t\t\t\t\tselect = true,\n\t\t\t\t\tdomFocus = true,\n\t\t\t\t\tnotify = false,\n\t\t\t\t} = options;\n\t\t\t\tif (select) {\n\t\t\t\t\tselectPath(path, notify);\n\t\t\t\t}\n\t\t\t\tsetFocusedPath(path);\n\t\t\t\tif (domFocus) {\n\t\t\t\t\tfocusDomNode(path);\n\t\t\t\t}\n\t\t\t},\n\t\t\tselectPath: (path: string) => {\n\t\t\t\tif (!path) return;\n\t\t\t\tselectPath(path);\n\t\t\t\tsetFocusedPath(path);\n\t\t\t\tfocusDomNode(path);\n\t\t\t},\n\t\t\tgetSelectedPath: () => selectedPath,\n\t\t\texpandToPath: async (path: string) => await expandToPath(path),\n\t\t\trefresh: async (path: string) => await refreshChildren(path),\n\t\t\tremapPath: remapPathState,\n\t\t\tcreateFile: async (absSelectedPath?: string) => {\n\t\t\t\tawait createNode(absSelectedPath, 'file', 'untitled.php');\n\t\t\t},\n\t\t\tcreateFolder: async (absSelectedPath?: string) => {\n\t\t\t\tawait createNode(absSelectedPath, 'folder', 'New Folder');\n\t\t\t},\n\t\t}),\n\t\t[selectedPath, refreshChildren, remapPathState, expandToPath]\n\t);\n\n\tconst hasInitializedRef = useRef(false);\n\tconst pendingInitialExpandRef = useRef<string | null>(\n\t\tinitialSelectedPath ?? null\n\t);\n\tconst previousInitialPathRef = useRef(initialSelectedPath);\n\n\tuseEffect(() => {\n\t\trootAutoExpandedRef.current = false;\n\t}, [normalizedRoot]);\n\n\tuseEffect(() => {\n\t\tif (\n\t\t\tinitialSelectedPath &&\n\t\t\tinitialSelectedPath !== previousInitialPathRef.current\n\t\t) {\n\t\t\tpendingInitialExpandRef.current = initialSelectedPath;\n\t\t} else if (!initialSelectedPath) {\n\t\t\tpendingInitialExpandRef.current = null;\n\t\t}\n\t\tpreviousInitialPathRef.current = initialSelectedPath;\n\t}, [initialSelectedPath]);\n\tuseEffect(() => {\n\t\tif (!initialSelectedPath || hasInitializedRef.current) {\n\t\t\treturn;\n\t\t}\n\t\thasInitializedRef.current = true;\n\t\tconst chain = buildPathChain(initialSelectedPath);\n\t\tsetExpanded((prev) => {\n\t\t\tconst next = { ...prev } as ExpandedNodePaths;\n\t\t\tfor (const path of chain) {\n\t\t\t\tnext[path] = true;\n\t\t\t}\n\t\t\treturn next;\n\t\t});\n\t\tconst target = chain[chain.length - 1] || initialSelectedPath;\n\t\tsetFocusedPath(target);\n\t\tsetSelectedPath(target);\n\t\tvoid expandToPath(initialSelectedPath);\n\t}, [initialSelectedPath, expandToPath]);\n\n\tuseEffect(() => {\n\t\tconst target = pendingInitialExpandRef.current;\n\t\tif (!target || treeFiles.length === 0) {\n\t\t\treturn;\n\t\t}\n\t\tpendingInitialExpandRef.current = null;\n\t\tvoid expandToPath(target);\n\t}, [treeFiles, expandToPath]);\n\n\tuseEffect(() => {\n\t\tif (!focusedPath) {\n\t\t\tif (treeFiles.length > 0) {\n\t\t\t\tconst firstPath = generatePath(treeFiles[0]);\n\t\t\t\tsetFocusedPath(firstPath);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif (effectiveRenamingPath && effectiveRenamingPath === focusedPath) {\n\t\t\treturn;\n\t\t}\n\t\tif (false) {\n\t\t\treturn;\n\t\t}\n\t\tfocusDomNode(focusedPath);\n\t}, [\n\t\ttreeFiles,\n\t\tfocusedPath,\n\t\tgeneratePath,\n\t\teffectiveRenamingPath,\n\t\tfocusDomNode,\n\t]);\n\n\tuseEffect(() => {\n\t\tif (treeFiles.length === 0) {\n\t\t\treturn;\n\t\t}\n\t\tconst rootNode = treeFiles[0];\n\t\tif (rootNode?.type !== 'folder') {\n\t\t\treturn;\n\t\t}\n\t\tif (rootAutoExpandedRef.current) {\n\t\t\treturn;\n\t\t}\n\t\tconst rootPath = rootNode.name;\n\t\trootAutoExpandedRef.current = true;\n\t\tsetExpanded((prev) =>\n\t\t\tprev[rootPath] ? prev : { ...prev, [rootPath]: true }\n\t\t);\n\t\tif (\n\t\t\t!lazyChildrenRef.current[rootPath] &&\n\t\t\t!loadingPathsRef.current[rootPath]\n\t\t) {\n\t\t\tvoid loadChildrenForPath(rootPath, rootNode);\n\t\t}\n\t}, [treeFiles, loadChildrenForPath, normalizedRoot]);\n\n\tuseEffect(() => {\n\t\treturn () => {\n\t\t\tif (searchBufferTimeoutRef.current) {\n\t\t\t\tclearTimeout(searchBufferTimeoutRef.current);\n\t\t\t}\n\t\t\tclearAllDragExpandTimeouts();\n\t\t};\n\t}, []);\n\n\tconst [searchBuffer, setSearchBuffer] = useState('');\n\n\t// remove duplicate handle; unified handle is defined above\n\n\tconst getDropDestinationDir = (node: FileNode, path: string) => {\n\t\tif (node.type === 'folder') {\n\t\t\treturn path;\n\t\t}\n\t\tconst parent = dirname(path);\n\t\tif (!parent) {\n\t\t\treturn '/';\n\t\t}\n\t\treturn parent || '/';\n\t};\n\n\tconst evaluateDropTarget = (\n\t\tnode: FileNode,\n\t\tpath: string,\n\t\tsourcePath: string | null\n\t): DropEvaluation => {\n\t\tconst destinationDir = getDropDestinationDir(node, path);\n\t\tif (!destinationDir) {\n\t\t\treturn { allowed: false, state: 'invalid', destination: null };\n\t\t}\n\t\tif (sourcePath) {\n\t\t\tif (destinationDir === sourcePath) {\n\t\t\t\treturn { allowed: false, state: 'invalid', destination: null };\n\t\t\t}\n\t\t\tif (isDescendantPath(sourcePath, destinationDir)) {\n\t\t\t\treturn { allowed: false, state: 'invalid', destination: null };\n\t\t\t}\n\t\t}\n\t\treturn { allowed: true, state: 'valid', destination: destinationDir };\n\t};\n\n\tconst handleNodeDragStart = (\n\t\tevent: React.DragEvent,\n\t\tnode: FileNode,\n\t\tpath: string\n\t) => {\n\t\tif (node.type !== 'folder' && node.type !== 'file') {\n\t\t\treturn;\n\t\t}\n\t\tsetDraggedPath(path);\n\t\tsetDropIndicator(null);\n\t\tif (event.dataTransfer) {\n\t\t\tevent.dataTransfer.effectAllowed = 'move';\n\t\t\tevent.dataTransfer.setData(\n\t\t\t\t'application/x-wp-playground-path',\n\t\t\t\tpath\n\t\t\t);\n\t\t\tevent.dataTransfer.setData('text/plain', path);\n\t\t}\n\t};\n\n\tconst handleNodeDragEnd = () => {\n\t\tresetDragState();\n\t};\n\n\tconst handleNodeDragEnter = (\n\t\tevent: React.DragEvent,\n\t\tnode: FileNode,\n\t\tpath: string\n\t) => {\n\t\tconst evaluation = evaluateDropTarget(node, path, draggedPath);\n\t\tif (evaluation.allowed) {\n\t\t\tif (node.type === 'folder') {\n\t\t\t\tscheduleExpandOnDrag(path, node);\n\t\t\t}\n\t\t}\n\t\tsetDropIndicator((prev) => {\n\t\t\tif (prev?.path === path && prev.state === evaluation.state) {\n\t\t\t\treturn prev;\n\t\t\t}\n\t\t\treturn { path, state: evaluation.state };\n\t\t});\n\t};\n\n\tconst handleNodeDragOver = (\n\t\tevent: React.DragEvent,\n\t\tnode: FileNode,\n\t\tpath: string\n\t) => {\n\t\tconst evaluation = evaluateDropTarget(node, path, draggedPath);\n\t\tif (evaluation.allowed && evaluation.destination) {\n\t\t\tevent.preventDefault();\n\t\t\tif (event.dataTransfer) {\n\t\t\t\tevent.dataTransfer.dropEffect = draggedPath ? 'move' : 'copy';\n\t\t\t}\n\t\t\tif (node.type === 'folder') {\n\t\t\t\tscheduleExpandOnDrag(path, node);\n\t\t\t}\n\t\t\tsetDropIndicator((prev) => {\n\t\t\t\tif (prev?.path === path && prev.state === evaluation.state) {\n\t\t\t\t\treturn prev;\n\t\t\t\t}\n\t\t\t\treturn { path, state: evaluation.state };\n\t\t\t});\n\t\t} else {\n\t\t\tif (event.dataTransfer) {\n\t\t\t\tevent.dataTransfer.dropEffect = 'none';\n\t\t\t}\n\t\t\tcancelExpandOnDrag(path);\n\t\t\tsetDropIndicator((prev) => {\n\t\t\t\tif (prev?.path === path && prev.state === 'invalid') {\n\t\t\t\t\treturn prev;\n\t\t\t\t}\n\t\t\t\treturn { path, state: 'invalid' };\n\t\t\t});\n\t\t}\n\t};\n\n\tconst handleNodeDragLeave = (\n\t\tevent: React.DragEvent,\n\t\tnode: FileNode,\n\t\tpath: string\n\t) => {\n\t\tcancelExpandOnDrag(path);\n\t\tconst related = event.relatedTarget as Node | null;\n\t\tif (related && event.currentTarget.contains(related)) {\n\t\t\treturn;\n\t\t}\n\t\tsetDropIndicator((prev) => (prev?.path === path ? null : prev));\n\t};\n\n\tconst handleNodeDrop = async (\n\t\tevent: React.DragEvent,\n\t\tnode: FileNode,\n\t\tpath: string\n\t) => {\n\t\tconst sourcePath = draggedPath;\n\t\tconst evaluation = evaluateDropTarget(node, path, sourcePath);\n\t\tif (!evaluation.allowed || !evaluation.destination) {\n\t\t\tresetDragState();\n\t\t\treturn;\n\t\t}\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tcancelExpandOnDrag(path);\n\t\tsetDropIndicator(null);\n\t\ttry {\n\t\t\tif (sourcePath) {\n\t\t\t\tawait moveNode(sourcePath, evaluation.destination);\n\t\t\t} else {\n\t\t\t\tawait importExternalItems(event, evaluation.destination);\n\t\t\t}\n\t\t} finally {\n\t\t\tresetDragState();\n\t\t}\n\t};\n\n\tconst handleInternalContextMenu = (\n\t\tevent: React.MouseEvent,\n\t\tnode: FileNode,\n\t\tpath: string\n\t) => {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tsetRenamingAbsolutePath(null);\n\t\tsetContextMenu({\n\t\t\tabsPath: path,\n\t\t\ttype: node.type,\n\t\t\tx: event.clientX,\n\t\t\ty: event.clientY,\n\t\t});\n\t};\n\n\tconst findAvailableName = async (baseDir: string, baseName: string) => {\n\t\tlet name = baseName;\n\t\tlet counter = 0;\n\t\tconst splitExt = (n: string) => {\n\t\t\tconst dot = n.lastIndexOf('.');\n\t\t\tif (dot > 0) return { stem: n.slice(0, dot), ext: n.slice(dot) };\n\t\t\treturn { stem: n, ext: '' };\n\t\t};\n\t\tconst prefix = baseDir === '/' ? '' : baseDir;\n\t\twhile (\n\t\t\t(await filesystem?.fileExists(`${prefix}/${name}`)) ||\n\t\t\t(await filesystem?.isDir(`${prefix}/${name}`))\n\t\t) {\n\t\t\tcounter += 1;\n\t\t\tconst { stem, ext } = splitExt(baseName);\n\t\t\tname = `${stem} (${counter})${ext}`;\n\t\t}\n\t\treturn name;\n\t};\n\n\tconst createNode = async (\n\t\tabsSelectedPath: string | undefined,\n\t\ttype: 'file' | 'folder',\n\t\tinitialName: string\n\t) => {\n\t\tif (!filesystem) return;\n\t\tlet base = absSelectedPath || selectedPath || normalizedRoot;\n\t\t// Ensure base is directory\n\t\ttry {\n\t\t\tif (!(await filesystem.isDir(base))) {\n\t\t\t\tbase = dirname(base);\n\t\t\t}\n\t\t} catch {\n\t\t\tbase = dirname(base);\n\t\t}\n\t\tconst normalizedBase = base;\n\t\tconst name = await findAvailableName(normalizedBase, initialName);\n\t\tconst tempPath = joinPaths(normalizedBase, name);\n\t\tif (type === 'folder') {\n\t\t\tawait filesystem.mkdir(tempPath);\n\t\t} else {\n\t\t\tawait filesystem.writeFile(tempPath, '');\n\t\t}\n\t\tpendingCreateRef.current = { type, tempPath };\n\t\tsetRenamingAbsolutePath(tempPath);\n\t\tawait refreshChildren(normalizedBase);\n\t\t// Focus new node\n\t\tsetTimeout(() => {\n\t\t\tsetFocusedPath(tempPath);\n\t\t\tfocusDomNode(tempPath);\n\t\t}, 0);\n\t};\n\n\tconst pathExists = async (path: string) => {\n\t\tif (!filesystem) return false;\n\t\ttry {\n\t\t\tif (await filesystem.fileExists(path)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} catch {\n\t\t\t// ignore\n\t\t}\n\t\ttry {\n\t\t\tif (await filesystem.isDir(path)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} catch {\n\t\t\t// ignore\n\t\t}\n\t\treturn false;\n\t};\n\n\tconst ensureDirectory = async (path: string) => {\n\t\tif (!filesystem) return;\n\t\ttry {\n\t\t\tawait filesystem.mkdir(path);\n\t\t} catch (error) {\n\t\t\tconst exists = await filesystem.isDir(path).catch(() => false);\n\t\t\tif (!exists) {\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t}\n\t};\n\n\tconst moveNode = async (sourcePath: string, destinationDir: string) => {\n\t\tif (!filesystem) return;\n\t\tconst fileName = basename(sourcePath);\n\t\tconst destinationPath = joinPaths(destinationDir, fileName);\n\t\tif (destinationPath === sourcePath) {\n\t\t\treturn;\n\t\t}\n\t\tif (await pathExists(destinationPath)) {\n\t\t\treturn;\n\t\t}\n\t\tconst sourceParent = dirname(sourcePath);\n\t\ttry {\n\t\t\tawait filesystem.mv(sourcePath, destinationPath);\n\t\t\tremapPathState(sourcePath, destinationPath);\n\t\t\tconst mappedSelected = remapSinglePath(\n\t\t\t\tselectedPath,\n\t\t\t\tsourcePath,\n\t\t\t\tdestinationPath\n\t\t\t);\n\t\t\tif (\n\t\t\t\tselectedPath &&\n\t\t\t\t(selectedPath === sourcePath ||\n\t\t\t\t\tselectedPath.startsWith(`${sourcePath}/`))\n\t\t\t) {\n\t\t\t\tonSelect(mappedSelected);\n\t\t\t}\n\t\t\tsetFocusedPath((prev) =>\n\t\t\t\tremapSinglePath(prev, sourcePath, destinationPath)\n\t\t\t);\n\t\t\tsetExpanded((prev) => ({\n\t\t\t\t...prev,\n\t\t\t\t[destinationDir]: true,\n\t\t\t}));\n\t\t\tawait Promise.all([\n\t\t\t\trefreshChildren(sourceParent),\n\t\t\t\trefreshChildren(destinationDir),\n\t\t\t]);\n\t\t\tsetSelectedPath((prev) =>\n\t\t\t\tremapSinglePath(prev, sourcePath, destinationPath)\n\t\t\t);\n\t\t\tfocusDomNode(destinationPath);\n\t\t} catch {\n\t\t\t// ignore move errors\n\t\t}\n\t};\n\n\tconst getEntryFromItem = (item: DataTransferItem) => {\n\t\tconst maybeItem = item as DataTransferItem & {\n\t\t\twebkitGetAsEntry?: () => FileSystemEntryLike | null;\n\t\t};\n\t\tif (maybeItem.webkitGetAsEntry) {\n\t\t\treturn maybeItem.webkitGetAsEntry() as FileSystemEntryLike | null;\n\t\t}\n\t\treturn null;\n\t};\n\n\tconst fileFromEntry = (entry: FileSystemFileEntryLike) => {\n\t\treturn new Promise<File>((resolve, reject) => {\n\t\t\tentry.file(resolve, reject);\n\t\t});\n\t};\n\n\tconst importFileBlob = async (file: File, destinationDir: string) => {\n\t\tif (!filesystem) return;\n\t\tconst safeName = file.name || 'untitled';\n\t\tconst targetName = await findAvailableName(destinationDir, safeName);\n\t\tconst targetPath = joinPaths(destinationDir, targetName);\n\t\tconst buffer = new Uint8Array(await file.arrayBuffer());\n\t\tawait filesystem.writeFile(targetPath, buffer);\n\t};\n\n\tconst importFileEntry = async (\n\t\tentry: FileSystemFileEntryLike,\n\t\tdestinationDir: string\n\t) => {\n\t\tconst file = await fileFromEntry(entry);\n\t\tawait importFileBlob(file, destinationDir);\n\t};\n\n\tconst importDirectoryEntry = async (\n\t\tentry: FileSystemDirectoryEntryLike,\n\t\tdestinationDir: string\n\t) => {\n\t\tconst folderName = await findAvailableName(\n\t\t\tdestinationDir,\n\t\t\tentry.name || 'New Folder'\n\t\t);\n\t\tconst folderPath = joinPaths(destinationDir, folderName);\n\t\tawait ensureDirectory(folderPath);\n\t\tconst reader = entry.createReader();\n\t\tconst readEntries = () =>\n\t\t\tnew Promise<FileSystemEntryLike[]>((resolve, reject) => {\n\t\t\t\treader.readEntries(\n\t\t\t\t\t(entries) => resolve(Array.from(entries)),\n\t\t\t\t\treject\n\t\t\t\t);\n\t\t\t});\n\t\twhile (true) {\n\t\t\tconst batch = await readEntries();\n\t\t\tif (!batch.length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor (const child of batch) {\n\t\t\t\tif (child.isFile) {\n\t\t\t\t\tawait importFileEntry(\n\t\t\t\t\t\tchild as FileSystemFileEntryLike,\n\t\t\t\t\t\tfolderPath\n\t\t\t\t\t);\n\t\t\t\t} else if (child.isDirectory) {\n\t\t\t\t\tawait importDirectoryEntry(\n\t\t\t\t\t\tchild as FileSystemDirectoryEntryLike,\n\t\t\t\t\t\tfolderPath\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\tconst importExternalItems = async (\n\t\tevent: React.DragEvent,\n\t\tdestinationDir: string\n\t) => {\n\t\tif (!filesystem) return;\n\t\tconst items = event.dataTransfer?.items\n\t\t\t? Array.from(event.dataTransfer.items)\n\t\t\t: [];\n\t\tconst entries = items\n\t\t\t.filter((item) => item.kind === 'file')\n\t\t\t.map((item) => getEntryFromItem(item))\n\t\t\t.filter((entry): entry is FileSystemEntryLike => Boolean(entry));\n\t\tif (entries.length > 0) {\n\t\t\tfor (const entry of entries) {\n\t\t\t\tif (entry.isFile) {\n\t\t\t\t\tawait importFileEntry(\n\t\t\t\t\t\tentry as FileSystemFileEntryLike,\n\t\t\t\t\t\tdestinationDir\n\t\t\t\t\t);\n\t\t\t\t} else if (entry.isDirectory) {\n\t\t\t\t\tawait importDirectoryEntry(\n\t\t\t\t\t\tentry as FileSystemDirectoryEntryLike,\n\t\t\t\t\t\tdestinationDir\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconst files = event.dataTransfer?.files\n\t\t\t\t? Array.from(event.dataTransfer.files)\n\t\t\t\t: [];\n\t\t\tfor (const file of files) {\n\t\t\t\tawait importFileBlob(file, destinationDir);\n\t\t\t}\n\t\t}\n\t\tawait refreshChildren(destinationDir);\n\t\tsetExpanded((prev) => ({\n\t\t\t...prev,\n\t\t\t[destinationDir]: true,\n\t\t}));\n\t};\n\n\tconst handleDeletePath = async (\n\t\tabsSelectedPath: string,\n\t\ttype: 'file' | 'folder'\n\t) => {\n\t\tif (!filesystem) return;\n\t\tconst normalized = absSelectedPath;\n\t\tsetContextMenu(null);\n\t\ttry {\n\t\t\tif (type === 'folder') {\n\t\t\t\tawait filesystem.rmdir(normalized, { recursive: true } as any);\n\t\t\t} else {\n\t\t\t\tawait filesystem.unlink(normalized);\n\t\t\t}\n\t\t} catch {\n\t\t\t// ignore\n\t\t} finally {\n\t\t\tsetRenamingAbsolutePath(null);\n\t\t\tconst parentDir = dirname(normalized);\n\t\t\tawait refreshChildren(parentDir);\n\t\t\t// If current selection was removed, notify parent\n\t\t\tif (\n\t\t\t\tselectedPath &&\n\t\t\t\t(selectedPath === normalized ||\n\t\t\t\t\tselectedPath.startsWith(`${normalized}/`))\n\t\t\t) {\n\t\t\t\tonSelect(null);\n\t\t\t}\n\t\t}\n\t};\n\n\tconst handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n\t\tif (event.key.length === 1 && event.key.match(/\\S/)) {\n\t\t\tconst newSearchBuffer = searchBuffer + event.key.toLowerCase();\n\t\t\tsetSearchBuffer(newSearchBuffer);\n\t\t\tif (searchBufferTimeoutRef.current) {\n\t\t\t\tclearTimeout(searchBufferTimeoutRef.current);\n\t\t\t}\n\t\t\tsearchBufferTimeoutRef.current = setTimeout(() => {\n\t\t\t\tsetSearchBuffer('');\n\t\t\t}, 1000);\n\t\t\tif (!containerRef.current) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst buttons = Array.from(\n\t\t\t\tcontainerRef.current.querySelectorAll('.file-node-button')\n\t\t\t);\n\t\t\tconst activeElement = document.activeElement;\n\t\t\tlet startIndex = 0;\n\t\t\tif (\n\t\t\t\tactiveElement &&\n\t\t\t\tbuttons.includes(activeElement as HTMLButtonElement)\n\t\t\t) {\n\t\t\t\tstartIndex = buttons.indexOf(\n\t\t\t\t\tactiveElement as HTMLButtonElement\n\t\t\t\t);\n\t\t\t}\n\t\t\tfor (let i = 0; i < buttons.length; i++) {\n\t\t\t\tconst index = (startIndex + i) % buttons.length;\n\t\t\t\tconst button = buttons[index] as HTMLElement;\n\t\t\t\tif (\n\t\t\t\t\tbutton.textContent\n\t\t\t\t\t\t?.toLowerCase()\n\t\t\t\t\t\t.trim()\n\t\t\t\t\t\t.startsWith(newSearchBuffer)\n\t\t\t\t) {\n\t\t\t\t\tbutton.focus();\n\t\t\t\t\tconst path = button.getAttribute('data-path');\n\t\t\t\t\tif (path) {\n\t\t\t\t\t\tsetFocusedPath(path);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tsetSearchBuffer('');\n\t\t\tif (searchBufferTimeoutRef.current) {\n\t\t\t\tclearTimeout(searchBufferTimeoutRef.current);\n\t\t\t}\n\t\t}\n\t};\n\n\t// No explicit error UI; upstream can handle errors in filesystem\n\n\t// Filesystem-mode rename handlers\n\tconst handleRename = async (path: string, newName: string) => {\n\t\tconst pending = pendingCreateRef.current;\n\t\tconst isPending = pending?.tempPath === path;\n\t\tconst parent = dirname(path);\n\t\tconst sanitized = (newName || '').trim();\n\t\tif (!isValidNameSegment(sanitized)) {\n\t\t\tif (isPending) {\n\t\t\t\ttry {\n\t\t\t\t\tif (pending.type === 'folder') {\n\t\t\t\t\t\tawait filesystem.rmdir(path, {\n\t\t\t\t\t\t\trecursive: true,\n\t\t\t\t\t\t} as any);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tawait filesystem.unlink(path);\n\t\t\t\t\t}\n\t\t\t\t} catch {\n\t\t\t\t\t/* noop */\n\t\t\t\t}\n\t\t\t\tpendingCreateRef.current = null;\n\t\t\t}\n\t\t\tsetRenamingAbsolutePath(isPending ? null : path);\n\t\t\treturn;\n\t\t}\n\t\tlet candidate = joinPaths(parent, sanitized);\n\t\tlet candidateNormalized = candidate;\n\t\tif (candidateNormalized === path) {\n\t\t\tsetRenamingAbsolutePath(null);\n\t\t\tif (isPending) pendingCreateRef.current = null;\n\t\t\tsetTimeout(() => {\n\t\t\t\tsetFocusedPath(candidateNormalized);\n\t\t\t\tfocusDomNode(candidateNormalized);\n\t\t\t}, 0);\n\t\t\treturn;\n\t\t}\n\t\tconst exists = await filesystem.fileExists(candidateNormalized);\n\t\tconst existsDir = await filesystem.isDir(candidateNormalized);\n\t\tif ((exists || existsDir) && candidateNormalized !== path) {\n\t\t\tif (isPending) {\n\t\t\t\ttry {\n\t\t\t\t\tconst unique = await findAvailableName(\n\t\t\t\t\t\tparent === '/' ? '/' : parent,\n\t\t\t\t\t\tsanitized\n\t\t\t\t\t);\n\t\t\t\t\tcandidate = joinPaths(parent, unique);\n\t\t\t\t\tcandidateNormalized = candidate;\n\t\t\t\t} catch {\n\t\t\t\t\t/* noop */\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tsetRenamingAbsolutePath(path);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tlet candidateIsDir = pending?.type === 'folder';\n\t\ttry {\n\t\t\tawait filesystem.mv(path, candidate);\n\t\t\tif (!pending) {\n\t\t\t\tconst isDir = await filesystem.isDir(candidate);\n\t\t\t\tcandidateIsDir = isDir;\n\t\t\t}\n\t\t\tif (candidateIsDir) {\n\t\t\t\tremapPathState(path, candidateNormalized);\n\t\t\t}\n\t\t\tif (selectedPath === path) {\n\t\t\t\tonSelect(candidateNormalized);\n\t\t\t}\n\t\t\tawait refreshChildren(parent);\n\t\t\tsetFocusedPath(candidateNormalized);\n\t\t\tfocusDomNode(candidateNormalized);\n\t\t} catch {\n\t\t\tif (isPending) {\n\t\t\t\ttry {\n\t\t\t\t\tif (pending?.type === 'folder') {\n\t\t\t\t\t\tawait filesystem.rmdir(path, {\n\t\t\t\t\t\t\trecursive: true,\n\t\t\t\t\t\t} as any);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tawait filesystem.unlink(path);\n\t\t\t\t\t}\n\t\t\t\t} catch {\n\t\t\t\t\t/* noop */\n\t\t\t\t}\n\t\t\t}\n\t\t} finally {\n\t\t\tpendingCreateRef.current = null;\n\t\t\tsetRenamingAbsolutePath(null);\n\t\t}\n\t};\n\n\tconst handleRenameCancelInternal = async (path: string) => {\n\t\tconst pending = pendingCreateRef.current;\n\t\tif (!filesystem || pending?.tempPath !== path) {\n\t\t\tsetRenamingAbsolutePath((prev) => (prev === path ? null : prev));\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tif (pending.type === 'folder') {\n\t\t\t\tawait filesystem.rmdir(path, { recursive: true } as any);\n\t\t\t} else {\n\t\t\t\tawait filesystem.unlink(path);\n\t\t\t}\n\t\t} catch {\n\t\t\t/* noop */\n\t\t}\n\t\tpendingCreateRef.current = null;\n\t\tsetRenamingAbsolutePath(null);\n\t\tconst parentDir = dirname(path);\n\t\tawait refreshChildren(parentDir);\n\t\tsetFocusedPath(parentDir);\n\t\tfocusDomNode(parentDir);\n\t};\n\n\treturn (\n\t\t<div onKeyDown={handleKeyDown} ref={containerRef}>\n\t\t\t<TreeGrid className={css['filePickerTree']}>\n\t\t\t\t{treeFiles.map((file, index) => (\n\t\t\t\t\t<NodeRow\n\t\t\t\t\t\tkey={file.name}\n\t\t\t\t\t\tnode={file}\n\t\t\t\t\t\tlevel={0}\n\t\t\t\t\t\tposition={index + 1}\n\t\t\t\t\t\tsetSize={treeFiles.length}\n\t\t\t\t\t\texpandedNodePaths={expanded}\n\t\t\t\t\t\tonToggle={toggleNode}\n\t\t\t\t\t\tselectedNode={selectedPath}\n\t\t\t\t\t\tfocusPath={(path) => setFocusedPath(path)}\n\t\t\t\t\t\tfocusedNode={focusedPath}\n\t\t\t\t\t\tselectPath={selectPath}\n\t\t\t\t\t\tgeneratePath={generatePath}\n\t\t\t\t\t\tgetChildren={getResolvedChildren}\n\t\t\t\t\t\tonContextMenu={handleInternalContextMenu}\n\t\t\t\t\t\trenamingPath={effectiveRenamingPath}\n\t\t\t\t\t\tonRename={handleRename}\n\t\t\t\t\t\tonRenameCancel={handleRenameCancelInternal}\n\t\t\t\t\t\tdropIndicator={dropIndicator}\n\t\t\t\t\t\tonDragStart={handleNodeDragStart}\n\t\t\t\t\t\tonDragEnd={handleNodeDragEnd}\n\t\t\t\t\t\tonDragEnter={handleNodeDragEnter}\n\t\t\t\t\t\tonDragOver={handleNodeDragOver}\n\t\t\t\t\t\tonDragLeave={handleNodeDragLeave}\n\t\t\t\t\t\tonDrop={handleNodeDrop}\n\t\t\t\t\t\trootPath={normalizedRoot}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t</TreeGrid>\n\t\t\t{contextMenu && (\n\t\t\t\t<Popover\n\t\t\t\t\tplacement=\"bottom-start\"\n\t\t\t\t\tonClose={() => setContextMenu(null)}\n\t\t\t\t\tanchor={{\n\t\t\t\t\t\tgetBoundingClientRect: () => ({\n\t\t\t\t\t\t\tx: contextMenu.x,\n\t\t\t\t\t\t\ty: contextMenu.y,\n\t\t\t\t\t\t\twidth: 0,\n\t\t\t\t\t\t\theight: 0,\n\t\t\t\t\t\t\ttop: contextMenu.y,\n\t\t\t\t\t\t\tleft: contextMenu.x,\n\t\t\t\t\t\t\tright: contextMenu.x,\n\t\t\t\t\t\t\tbottom: contextMenu.y,\n\t\t\t\t\t\t\ttoJSON: () => ({}),\n\t\t\t\t\t\t}),\n\t\t\t\t\t\townerDocument: document,\n\t\t\t\t\t}}\n\t\t\t\t\tnoArrow={true}\n\t\t\t\t\tresize={false}\n\t\t\t\t\tfocusOnMount=\"firstElement\"\n\t\t\t\t>\n\t\t\t\t\t<NavigableMenu role=\"menu\">\n\t\t\t\t\t\t{contextMenu.type === 'folder' && (\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\trole=\"menuitem\"\n\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\tsetContextMenu(null);\n\t\t\t\t\t\t\t\t\tawait createNode(\n\t\t\t\t\t\t\t\t\t\tcontextMenu.absPath,\n\t\t\t\t\t\t\t\t\t\t'file',\n\t\t\t\t\t\t\t\t\t\t'untitled.php'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tCreate file\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{contextMenu.type === 'folder' && (\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\trole=\"menuitem\"\n\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\tsetContextMenu(null);\n\t\t\t\t\t\t\t\t\tawait createNode(\n\t\t\t\t\t\t\t\t\t\tcontextMenu.absPath,\n\t\t\t\t\t\t\t\t\t\t'folder',\n\t\t\t\t\t\t\t\t\t\t'New Folder'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tCreate directory\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\trole=\"menuitem\"\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\tsetContextMenu(null);\n\t\t\t\t\t\t\t\tsetRenamingAbsolutePath(contextMenu.absPath);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tRename\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\trole=\"menuitem\"\n\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\thandleDeletePath(\n\t\t\t\t\t\t\t\t\tcontextMenu.absPath,\n\t\t\t\t\t\t\t\t\tcontextMenu.type\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tDelete\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t</NavigableMenu>\n\t\t\t\t</Popover>\n\t\t\t)}\n\t\t</div>\n\t);\n});\n\nconst NodeRow: React.FC<{\n\tnode: FileNode;\n\tlevel: number;\n\tposition: number;\n\tsetSize: number;\n\texpandedNodePaths: ExpandedNodePaths;\n\tonToggle: (\n\t\tpath: string,\n\t\tnode: FileNode,\n\t\tisOpen: boolean\n\t) => void | Promise<void>;\n\tselectedNode: string | null;\n\tfocusPath: (path: string) => void;\n\tfocusedNode: string | null;\n\tselectPath: (path: string, notify?: boolean) => void;\n\tgeneratePath: (node: FileNode, parentPath?: string) => string;\n\tgetChildren: (node: FileNode, path: string) => FileNode[] | undefined;\n\tonContextMenu?: (\n\t\tevent: React.MouseEvent,\n\t\tnode: FileNode,\n\t\tpath: string\n\t) => void;\n\trenamingPath: string | null;\n\tonRename?: (path: string, newName: string) => void;\n\tonRenameCancel?: (path: string) => void;\n\tparentPath?: string;\n\tdropIndicator: DropIndicator | null;\n\tonDragStart?: (\n\t\tevent: React.DragEvent,\n\t\tnode: FileNode,\n\t\tpath: string\n\t) => void;\n\tonDragEnd?: (event: React.DragEvent, node: FileNode, path: string) => void;\n\tonDragEnter?: (\n\t\tevent: React.DragEvent,\n\t\tnode: FileNode,\n\t\tpath: string\n\t) => void;\n\tonDragOver?: (event: React.DragEvent, node: FileNode, path: string) => void;\n\tonDragLeave?: (\n\t\tevent: React.DragEvent,\n\t\tnode: FileNode,\n\t\tpath: string\n\t) => void;\n\tonDrop?: (event: React.DragEvent, node: FileNode, path: string) => void;\n\trootPath: string;\n}> = ({\n\tnode,\n\tlevel,\n\tposition,\n\tsetSize,\n\texpandedNodePaths,\n\tonToggle,\n\tselectedNode,\n\tfocusPath,\n\tfocusedNode,\n\tselectPath,\n\tgeneratePath,\n\tgetChildren,\n\tonContextMenu,\n\trenamingPath,\n\tonRename,\n\tonRenameCancel,\n\tparentPath = '',\n\tdropIndicator,\n\tonDragStart,\n\tonDragEnd,\n\tonDragEnter,\n\tonDragOver,\n\tonDragLeave,\n\tonDrop,\n\trootPath,\n}) => {\n\tconst path = generatePath(node, parentPath);\n\tconst isExpanded = expandedNodePaths[path];\n\tconst isRenaming = renamingPath === path;\n\tconst renameInputRef = useRef<HTMLInputElement>(null);\n\tconst [renameValue, setRenameValue] = useState(node.name);\n\tconst renameHandledRef = useRef(false);\n\tconst isDropTarget = dropIndicator?.path === path;\n\tconst isDropTargetValid = isDropTarget && dropIndicator?.state === 'valid';\n\tconst isDropTargetInvalid =\n\t\tisDropTarget && dropIndicator?.state === 'invalid';\n\tconst isDraggable = !isRenaming && path !== rootPath;\n\n\tconst dragHandlers = {\n\t\tonDragEnter: (event: React.DragEvent) =>\n\t\t\tonDragEnter?.(event, node, path),\n\t\tonDragOver: (event: React.DragEvent) => onDragOver?.(event, node, path),\n\t\tonDragLeave: (event: React.DragEvent) =>\n\t\t\tonDragLeave?.(event, node, path),\n\t\tonDrop: (event: React.DragEvent) => onDrop?.(event, node, path),\n\t};\n\n\tconst resolvedChildren = getChildren(node, path) ?? [];\n\n\tuseEffect(() => {\n\t\tif (isRenaming) {\n\t\t\tsetRenameValue(node.name);\n\t\t\trenameHandledRef.current = false;\n\t\t\tif (typeof window !== 'undefined' && window.requestAnimationFrame) {\n\t\t\t\twindow.requestAnimationFrame(() => {\n\t\t\t\t\trenameInputRef.current?.select();\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\trenameInputRef.current?.select();\n\t\t\t}\n\t\t} else {\n\t\t\trenameHandledRef.current = false;\n\t\t}\n\t}, [isRenaming, node.name]);\n\n\tconst toggleOpen = () => {\n\t\tif (node.type === 'folder') {\n\t\t\tonToggle(path, node, !isExpanded);\n\t\t}\n\t};\n\n\tconst handleKeyDown = (event: React.KeyboardEvent) => {\n\t\tif (event.key === 'ArrowLeft') {\n\t\t\tif (isExpanded) {\n\t\t\t\ttoggleOpen();\n\t\t\t} else {\n\t\t\t\t(\n\t\t\t\t\tdocument.querySelector(\n\t\t\t\t\t\t`[data-path=\"${parentPath}\"]`\n\t\t\t\t\t) as HTMLButtonElement\n\t\t\t\t)?.focus();\n\t\t\t}\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t} else if (event.key === 'ArrowRight') {\n\t\t\tif (isExpanded) {\n\t\t\t\tif (resolvedChildren?.length) {\n\t\t\t\t\tconst firstChildPath = generatePath(\n\t\t\t\t\t\tresolvedChildren[0],\n\t\t\t\t\t\tpath\n\t\t\t\t\t);\n\t\t\t\t\t(\n\t\t\t\t\t\tdocument.querySelector(\n\t\t\t\t\t\t\t`[data-path=\"${firstChildPath}\"]`\n\t\t\t\t\t\t) as HTMLButtonElement\n\t\t\t\t\t)?.focus();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttoggleOpen();\n\t\t\t}\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t} else if (\n\t\t\tevent.key === ' ' ||\n\t\t\tevent.key === 'Space' ||\n\t\t\tevent.key === 'Spacebar'\n\t\t) {\n\t\t\tif (node.type === 'folder') {\n\t\t\t\tonToggle(path, node, !isExpanded);\n\t\t\t}\n\t\t\tevent.preventDefault();\n\t\t} else if (event.key === 'Enter') {\n\t\t\tselectPath(path);\n\t\t\tfocusPath(path);\n\t\t\tconst form = (event.currentTarget as HTMLElement)?.closest('form');\n\t\t\tif (form) {\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tform.dispatchEvent(new Event('submit', { bubbles: true }));\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n\n\tconst handleContextMenu = (event: React.MouseEvent) => {\n\t\tonContextMenu?.(event, node, path);\n\t};\n\n\tconst handleRenameSubmit = (event: React.FormEvent) => {\n\t\tevent.preventDefault();\n\t\trenameHandledRef.current = true;\n\t\tonRename?.(path, renameValue.trim());\n\t};\n\n\tconst handleRenameKeyDown = (\n\t\tevent: React.KeyboardEvent<HTMLInputElement>\n\t) => {\n\t\tif (event.key === 'Escape') {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\trenameHandledRef.current = true;\n\t\t\tonRenameCancel?.(path);\n\t\t\treturn;\n\t\t}\n\t\tif (\n\t\t\tevent.key === 'ArrowLeft' ||\n\t\t\tevent.key === 'ArrowRight' ||\n\t\t\tevent.key === 'ArrowUp' ||\n\t\t\tevent.key === 'ArrowDown'\n\t\t) {\n\t\t\tevent.stopPropagation();\n\t\t}\n\t};\n\n\tconst handleRenameBlur = () => {\n\t\tif (!renameHandledRef.current) {\n\t\t\tonRenameCancel?.(path);\n\t\t}\n\t\trenameHandledRef.current = false;\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<TreeGridRow\n\t\t\t\tlevel={level}\n\t\t\t\tpositionInSet={position}\n\t\t\t\tsetSize={setSize}\n\t\t\t>\n\t\t\t\t<TreeGridCell>\n\t\t\t\t\t{() => (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{isRenaming ? (\n\t\t\t\t\t\t\t\t<form\n\t\t\t\t\t\t\t\t\tonSubmit={handleRenameSubmit}\n\t\t\t\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t\t\t\tcss['fileNodeButton'],\n\t\t\t\t\t\t\t\t\t\tcss['renaming'],\n\t\t\t\t\t\t\t\t\t\t'file-node-button',\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t[css['selected']]:\n\t\t\t\t\t\t\t\t\t\t\t\tselectedNode === path,\n\t\t\t\t\t\t\t\t\t\t\t[css['focused']]:\n\t\t\t\t\t\t\t\t\t\t\t\tfocusedNode === path,\n\t\t\t\t\t\t\t\t\t\t\t[css['dropTarget']]:\n\t\t\t\t\t\t\t\t\t\t\t\tisDropTargetValid,\n\t\t\t\t\t\t\t\t\t\t\t[css['dropTargetInvalid']]:\n\t\t\t\t\t\t\t\t\t\t\t\tisDropTargetInvalid,\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\tdata-path={path}\n\t\t\t\t\t\t\t\t\tonContextMenu={handleContextMenu}\n\t\t\t\t\t\t\t\t\t{...dragHandlers}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<FileName\n\t\t\t\t\t\t\t\t\t\tnode={node}\n\t\t\t\t\t\t\t\t\t\tisOpen={\n\t\t\t\t\t\t\t\t\t\t\tnode.type === 'folder' && isExpanded\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tlevel={level}\n\t\t\t\t\t\t\t\t\t\thideName\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\tref={renameInputRef}\n\t\t\t\t\t\t\t\t\t\tclassName={css['renameInput']}\n\t\t\t\t\t\t\t\t\t\tvalue={renameValue}\n\t\t\t\t\t\t\t\t\t\tonChange={(event) =>\n\t\t\t\t\t\t\t\t\t\t\tsetRenameValue(event.target.value)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tonBlur={handleRenameBlur}\n\t\t\t\t\t\t\t\t\t\tonFocus={() => focusPath(path)}\n\t\t\t\t\t\t\t\t\t\tonKeyDown={handleRenameKeyDown}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t{...dragHandlers}\n\t\t\t\t\t\t\t\t\tdraggable={isDraggable}\n\t\t\t\t\t\t\t\t\tonDragStart={(event: any) =>\n\t\t\t\t\t\t\t\t\t\tonDragStart?.(event, node, path)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonDragEnd={(event: any) =>\n\t\t\t\t\t\t\t\t\t\tonDragEnd?.(event, node, path)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\tif (node.type === 'folder') {\n\t\t\t\t\t\t\t\t\t\t\ttoggleOpen();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tselectPath(path);\n\t\t\t\t\t\t\t\t\t\tfocusPath(path);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\t\t\t\tonFocus={() => {\n\t\t\t\t\t\t\t\t\t\tfocusPath(path);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tonContextMenu={handleContextMenu}\n\t\t\t\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t\t\t\tcss['fileNodeButton'],\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t[css['selected']]:\n\t\t\t\t\t\t\t\t\t\t\t\tselectedNode === path,\n\t\t\t\t\t\t\t\t\t\t\t[css['focused']]:\n\t\t\t\t\t\t\t\t\t\t\t\tfocusedNode === path,\n\t\t\t\t\t\t\t\t\t\t\t[css['dropTarget']]:\n\t\t\t\t\t\t\t\t\t\t\t\tisDropTargetValid,\n\t\t\t\t\t\t\t\t\t\t\t[css['dropTargetInvalid']]:\n\t\t\t\t\t\t\t\t\t\t\t\tisDropTargetInvalid,\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\tdata-path={path}\n\t\t\t\t\t\t\t\t\tdata-expanded={\n\t\t\t\t\t\t\t\t\t\tisExpanded ? 'true' : 'false'\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<FileName\n\t\t\t\t\t\t\t\t\t\tnode={node}\n\t\t\t\t\t\t\t\t\t\tisOpen={\n\t\t\t\t\t\t\t\t\t\t\tnode.type === 'folder' && isExpanded\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tlevel={level}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</>\n\t\t\t\t\t)}\n\t\t\t\t</TreeGridCell>\n\t\t\t</TreeGridRow>\n\t\t\t{isExpanded &&\n\t\t\t\tresolvedChildren &&\n\t\t\t\tresolvedChildren.map((child, index) => (\n\t\t\t\t\t<NodeRow\n\t\t\t\t\t\tkey={child.name}\n\t\t\t\t\t\tnode={child}\n\t\t\t\t\t\tlevel={level + 1}\n\t\t\t\t\t\tposition={index + 1}\n\t\t\t\t\t\tsetSize={resolvedChildren.length}\n\t\t\t\t\t\texpandedNodePaths={expandedNodePaths}\n\t\t\t\t\t\tonToggle={onToggle}\n\t\t\t\t\t\tselectedNode={selectedNode}\n\t\t\t\t\t\tfocusPath={focusPath}\n\t\t\t\t\t\tfocusedNode={focusedNode}\n\t\t\t\t\t\tselectPath={selectPath}\n\t\t\t\t\t\tgeneratePath={generatePath}\n\t\t\t\t\t\tgetChildren={getChildren}\n\t\t\t\t\t\tonContextMenu={onContextMenu}\n\t\t\t\t\t\trenamingPath={renamingPath}\n\t\t\t\t\t\tonRename={onRename}\n\t\t\t\t\t\tonRenameCancel={onRenameCancel}\n\t\t\t\t\t\tparentPath={path}\n\t\t\t\t\t\tdropIndicator={dropIndicator}\n\t\t\t\t\t\tonDragStart={onDragStart}\n\t\t\t\t\t\tonDragEnd={onDragEnd}\n\t\t\t\t\t\tonDragEnter={onDragEnter}\n\t\t\t\t\t\tonDragOver={onDragOver}\n\t\t\t\t\t\tonDragLeave={onDragLeave}\n\t\t\t\t\t\tonDrop={onDrop}\n\t\t\t\t\t\trootPath={rootPath}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t</>\n\t);\n};\n\nconst FileName: React.FC<{\n\tnode: FileNode;\n\tlevel: number;\n\tisOpen?: boolean;\n\thideName?: boolean;\n}> = ({ node, level, isOpen, hideName = false }) => {\n\tconst indent: string[] = [];\n\tfor (let i = 0; i < level; i++) {\n\t\tindent.push('&nbsp;&nbsp;&nbsp;&nbsp;');\n\t}\n\treturn (\n\t\t<>\n\t\t\t<span\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\tdangerouslySetInnerHTML={{ __html: indent.join('') }}\n\t\t\t></span>\n\t\t\t{node.type === 'folder' ? (\n\t\t\t\t<Icon width={16} icon={isOpen ? chevronDown : chevronRight} />\n\t\t\t) : (\n\t\t\t\t<div style={{ width: 16 }}>&nbsp;</div>\n\t\t\t)}\n\t\t\t<Icon width={16} icon={node.type === 'folder' ? folder : file} />\n\t\t\t{!hideName && <span className={css['fileName']}>{node.name}</span>}\n\t\t</>\n\t);\n};\n\nexport default FilePickerTree;\n","import React from 'react';\nimport css from './style.module.css';\n\nexport function PathPreview({ path }: { path: string }) {\n\tif (!path) {\n\t\treturn (\n\t\t\t<div className={css['pathPreview']}>\n\t\t\t\t<i>Select a path</i>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tconst segments = path.split('/');\n\tlet pathPreviewEnd = (segments.length > 2 ? '/' : '') + segments.pop();\n\tif (pathPreviewEnd.length > 10) {\n\t\tpathPreviewEnd = pathPreviewEnd.substring(pathPreviewEnd.length - 10);\n\t}\n\tconst pathPreviewStart = path.substring(\n\t\t0,\n\t\tpath.length - pathPreviewEnd.length\n\t);\n\treturn (\n\t\t<div\n\t\t\tclassName={css['pathPreview']}\n\t\t\tdata-content-start={pathPreviewStart}\n\t\t\tdata-content-end={pathPreviewEnd}\n\t\t></div>\n\t);\n}\n","import React, { useState } from 'react';\nimport { Button, Modal } from '@wordpress/components';\nimport { PathPreview } from './PathPreview';\nimport css from './style.module.css';\nimport type { AsyncWritableFilesystem } from '../FilePickerTree';\nimport { FilePickerTree } from '../FilePickerTree';\n\nexport function FilePickerControl({\n\tvalue = '',\n\tonChange,\n\tfilesystem,\n}: {\n\tvalue?: string;\n\tonChange: (selectedPath: string) => void;\n\tfilesystem: AsyncWritableFilesystem;\n}) {\n\tconst [isOpen, setOpen] = useState(false);\n\tconst openModal = () => setOpen(true);\n\tconst closeModal = () => setOpen(false);\n\n\tconst [lastSelectedPath, setLastSelectedPath] = useState<string | null>(\n\t\tvalue || null\n\t);\n\tfunction handleSubmit(event?: React.FormEvent<HTMLFormElement>) {\n\t\tevent?.preventDefault();\n\t\tonChange(lastSelectedPath || '');\n\t\tcloseModal();\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<Button\n\t\t\t\tvariant=\"tertiary\"\n\t\t\t\tclassName={css['control']}\n\t\t\t\tonClick={openModal}\n\t\t\t>\n\t\t\t\t<span className={css['browseLabel']}>Browse</span>\n\t\t\t\t<PathPreview path={value || ''} />\n\t\t\t</Button>\n\t\t\t{isOpen && (\n\t\t\t\t<Modal\n\t\t\t\t\ttitle=\"Select a path \"\n\t\t\t\t\tonRequestClose={closeModal}\n\t\t\t\t\tclassName={css['modal']}\n\t\t\t\t>\n\t\t\t\t\t<form onSubmit={handleSubmit}>\n\t\t\t\t\t\t<FilePickerTree\n\t\t\t\t\t\t\tfilesystem={filesystem}\n\t\t\t\t\t\t\tinitialSelectedPath={value}\n\t\t\t\t\t\t\tonSelect={setLastSelectedPath}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<div className={css['modalFooter']}>\n\t\t\t\t\t\t\t<Button type=\"submit\" variant=\"primary\">\n\t\t\t\t\t\t\t\tSelect Path\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\t\t\t\t</Modal>\n\t\t\t)}\n\t\t</>\n\t);\n}\n"],"names":["playgroundLogo","props","React","temporaryStorage","WordPressIcon","folder","file","ClockIcon","layout","getLogoDataURL","logo","SiteManagerIcon","forwardRef","icon","size","ref","cloneElement","f","require$$0","k","l","m","n","p","q","c","a","g","b","d","e","h","reactJsxRuntime_production_min","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_OFFSCREEN_TYPE","MAYBE_ITERATOR_SYMBOL","FAUX_ITERATOR_SYMBOL","getIteratorFn","maybeIterable","maybeIterator","ReactSharedInternals","error","format","_len2","args","_key2","printWarning","level","ReactDebugCurrentFrame","stack","argsWithFormat","item","enableScopeAPI","enableCacheElement","enableTransitionTracing","enableLegacyHidden","enableDebugTracing","REACT_MODULE_REFERENCE","isValidElementType","type","getWrappedName","outerType","innerType","wrapperName","displayName","functionName","getContextName","getComponentNameFromType","context","provider","outerName","lazyComponent","payload","init","assign","disabledDepth","prevLog","prevInfo","prevWarn","prevError","prevGroup","prevGroupCollapsed","prevGroupEnd","disabledLog","disableLogs","reenableLogs","ReactCurrentDispatcher","prefix","describeBuiltInComponentFrame","name","source","ownerFn","x","match","reentry","componentFrameCache","PossiblyWeakMap","describeNativeComponentFrame","fn","construct","frame","control","previousPrepareStackTrace","previousDispatcher","Fake","sample","sampleLines","controlLines","s","_frame","syntheticFrame","describeFunctionComponentFrame","shouldConstruct","Component","prototype","describeUnknownElementTypeFrameInDEV","hasOwnProperty","loggedTypeFailures","setCurrentlyValidatingElement","element","owner","checkPropTypes","typeSpecs","values","location","componentName","has","typeSpecName","error$1","err","ex","isArrayImpl","isArray","typeName","value","hasToStringTag","willCoercionThrow","testStringCoercion","checkKeyStringCoercion","ReactCurrentOwner","RESERVED_PROPS","specialPropKeyWarningShown","specialPropRefWarningShown","hasValidRef","config","getter","hasValidKey","warnIfStringRefCannotBeAutoConverted","self","defineKeyPropWarningGetter","warnAboutAccessingKey","defineRefPropWarningGetter","warnAboutAccessingRef","ReactElement","key","jsxDEV","maybeKey","propName","defaultProps","ReactCurrentOwner$1","ReactDebugCurrentFrame$1","setCurrentlyValidatingElement$1","propTypesMisspellWarningShown","isValidElement","object","getDeclarationErrorAddendum","getSourceInfoErrorAddendum","ownerHasKeyUseWarning","getCurrentComponentErrorInfo","parentType","info","parentName","validateExplicitKey","currentComponentErrorInfo","childOwner","validateChildKeys","node","i","child","iteratorFn","iterator","step","validatePropTypes","propTypes","_name","validateFragmentProps","fragment","keys","didWarnAboutKeySpread","jsxWithValidation","isStaticChildren","validType","sourceInfo","typeString","children","beforeExample","afterExample","jsxWithValidationStatic","jsxWithValidationDynamic","jsx","jsxs","reactJsxRuntime_development","jsxRuntimeModule","require$$1","Path","createElement","SVG","className","isPressed","appliedProps","clsx","_jsx","chevronDown","chevronRight","buildPathChain","path","normalized","hasLeadingSlash","parts","chain","current","part","isDescendantPath","ancestor","candidate","normalizedAncestor","normalizedCandidate","remapSinglePath","from","to","FilePickerTree","filesystem","root","initialSelectedPath","onSelect","normalizedRoot","useMemo","isValidNameSegment","expanded","setExpanded","useState","initialExpanded","selectedPath","setSelectedPath","focusedPath","setFocusedPath","lazyChildren","setLazyChildren","loadingPaths","setLoadingPaths","draggedPath","setDraggedPath","dropIndicator","setDropIndicator","dragExpandTimeoutsRef","useRef","rootAutoExpandedRef","containerRef","searchBufferTimeoutRef","loadingPathsRef","lazyChildrenRef","clearAllDragExpandTimeouts","cancelExpandOnDrag","timeoutId","useEffect","focusDomNode","focusTarget","_a","generatePath","parentPath","getResolvedChildren","listDir","fs","basePath","names","results","childPath","isDirectory","loadChildren","loadChildrenForPath","existingChildren","prev","resolve","next","scheduleExpandOnDrag","refreshChildren","toggleNode","isOpen","expandToPath","targetPath","segment","currentChildren","segmentPath","nextNode","remapPathState","fromPrefix","remapKey","changed","mapped","resetDragState","selectPath","notify","treeFiles","contextMenu","setContextMenu","renamingAbsolutePath","setRenamingAbsolutePath","pendingCreateRef","effectiveRenamingPath","useImperativeHandle","options","select","domFocus","absSelectedPath","createNode","hasInitializedRef","pendingInitialExpandRef","previousInitialPathRef","target","firstPath","rootNode","rootPath","searchBuffer","setSearchBuffer","getDropDestinationDir","parent","dirname","evaluateDropTarget","sourcePath","destinationDir","handleNodeDragStart","event","handleNodeDragEnd","handleNodeDragEnter","evaluation","handleNodeDragOver","handleNodeDragLeave","related","handleNodeDrop","moveNode","importExternalItems","handleInternalContextMenu","findAvailableName","baseDir","baseName","counter","splitExt","dot","stem","ext","initialName","base","normalizedBase","tempPath","joinPaths","pathExists","ensureDirectory","fileName","basename","destinationPath","sourceParent","mappedSelected","getEntryFromItem","maybeItem","fileFromEntry","entry","reject","importFileBlob","safeName","targetName","buffer","importFileEntry","importDirectoryEntry","folderName","folderPath","reader","readEntries","entries","batch","files","_b","handleDeletePath","parentDir","handleKeyDown","newSearchBuffer","buttons","activeElement","startIndex","index","button","handleRename","newName","pending","isPending","sanitized","candidateNormalized","exists","existsDir","unique","candidateIsDir","handleRenameCancelInternal","TreeGrid","css","NodeRow","Popover","NavigableMenu","MenuItem","position","setSize","expandedNodePaths","onToggle","selectedNode","focusPath","focusedNode","getChildren","onContextMenu","renamingPath","onRename","onRenameCancel","onDragStart","onDragEnd","onDragEnter","onDragOver","onDragLeave","onDrop","isExpanded","isRenaming","renameInputRef","renameValue","setRenameValue","renameHandledRef","isDropTarget","isDropTargetValid","isDropTargetInvalid","isDraggable","dragHandlers","resolvedChildren","toggleOpen","firstChildPath","form","_c","handleContextMenu","handleRenameSubmit","handleRenameKeyDown","handleRenameBlur","TreeGridRow","TreeGridCell","classNames","FileName","Button","hideName","indent","Icon","PathPreview","segments","pathPreviewEnd","pathPreviewStart","FilePickerControl","onChange","setOpen","openModal","closeModal","lastSelectedPath","setLastSelectedPath","handleSubmit","Modal"],"mappings":"sPAEaA,GAAkBC,GAE7BC,EAAA,cAAC,MAAA,CACA,MAAM,KACN,OAAO,KACP,QAAQ,YACR,KAAK,OACL,MAAM,6BACL,GAAGD,CAAA,EAEJC,EAAA,cAAC,OAAA,CACA,MAAM,UACN,OAAO,UACP,GAAG,UACH,UAAU,+DACV,OAAO,QACP,YAAY,UAAA,CACb,EACAA,EAAA,cAAC,OAAA,CACA,MAAM,UACN,OAAO,UACP,GAAG,UACH,UAAU,8DACV,OAAO,QACP,YAAY,SAAA,CACb,EACAA,EAAA,cAAC,OAAA,CACA,MAAM,SACN,OAAO,SACP,GAAG,UACH,UAAU,+DACV,OAAO,QACP,YAAY,SAAA,CAAA,CAEd,EAIWC,GAAoBF,GAE/BC,EAAA,cAAC,MAAA,CACA,MAAM,KACN,OAAO,KACP,QAAQ,YACR,KAAK,OACL,MAAM,6BACL,GAAGD,CAAA,EAEJC,EAAA,cAAC,OAAA,CACA,SAAS,UACT,SAAS,UACT,EAAE,uRACF,KAAK,SAAA,CAAA,CAEP,EAIWE,GAAiBH,GAE5BC,EAAA,cAAC,MAAA,CACA,MAAM,KACN,OAAO,KACP,QAAQ,YACR,KAAK,OACL,MAAM,6BACL,GAAGD,CAAA,EAEJC,EAAA,cAAC,OAAA,CACA,EAAE,4/BACF,KAAK,SAAA,CAAA,CAEP,EAIWG,GACZH,EAAA,cAAC,MAAA,CACA,MAAM,6BACN,MAAM,KACN,OAAO,KACP,QAAQ,YACR,KAAK,MAAA,EAELA,EAAA,cAAC,OAAA,CACA,SAAS,UACT,SAAS,UACT,EAAE,skBAAA,CAAA,CAEJ,EAGYI,GACZJ,EAAA,cAAC,MAAA,CACA,MAAM,6BACN,MAAM,KACN,OAAO,KACP,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CACD,CAAA,CAGH,CAEF","x_google_ignoreList":[1,2,3,4,5,6,7]}
1
+ {"version":3,"file":"index.cjs","sources":["../../../../packages/playground/components/src/icons.tsx","../../../../node_modules/@wordpress/icons/build-module/icon/index.js","../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../node_modules/react/jsx-runtime.js","../../../../node_modules/@wordpress/primitives/build-module/svg/index.js","../../../../node_modules/@wordpress/icons/build-module/library/chevron-down.js","../../../../node_modules/@wordpress/icons/build-module/library/chevron-right.js","../../../../packages/playground/components/src/FilePickerTree/index.tsx","../../../../packages/playground/components/src/FilePickerControl/PathPreview.tsx","../../../../packages/playground/components/src/FilePickerControl/index.tsx"],"sourcesContent":["import React from 'react';\n\nexport const playgroundLogo = (props?: React.SVGProps<SVGSVGElement>) => {\n\treturn (\n\t\t<svg\n\t\t\twidth=\"32\"\n\t\t\theight=\"32\"\n\t\t\tviewBox=\"0 0 32 32\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t{...props}\n\t\t>\n\t\t\t<rect\n\t\t\t\twidth=\"10.4176\"\n\t\t\t\theight=\"10.4176\"\n\t\t\t\trx=\"3.86258\"\n\t\t\t\ttransform=\"matrix(0.829038 -0.559193 0.838671 0.544639 7.45703 24.1775)\"\n\t\t\t\tstroke=\"white\"\n\t\t\t\tstrokeWidth=\"0.965644\"\n\t\t\t/>\n\t\t\t<rect\n\t\t\t\twidth=\"13.2346\"\n\t\t\t\theight=\"13.2346\"\n\t\t\t\trx=\"3.86258\"\n\t\t\t\ttransform=\"matrix(0.829038 -0.559193 0.838671 0.544639 5.0918 18.9934)\"\n\t\t\t\tstroke=\"white\"\n\t\t\t\tstrokeWidth=\"1.44847\"\n\t\t\t/>\n\t\t\t<rect\n\t\t\t\twidth=\"17.451\"\n\t\t\t\theight=\"17.451\"\n\t\t\t\trx=\"3.86258\"\n\t\t\t\ttransform=\"matrix(0.829038 -0.559193 0.838671 0.544639 1.55371 11.6099)\"\n\t\t\t\tstroke=\"white\"\n\t\t\t\tstrokeWidth=\"1.93129\"\n\t\t\t/>\n\t\t</svg>\n\t);\n};\n\nexport const temporaryStorage = (props?: React.SVGProps<SVGSVGElement>) => {\n\treturn (\n\t\t<svg\n\t\t\twidth=\"16\"\n\t\t\theight=\"17\"\n\t\t\tviewBox=\"0 0 16 17\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t{...props}\n\t\t>\n\t\t\t<path\n\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\tclipRule=\"evenodd\"\n\t\t\t\td=\"M8 15C4.41015 15 1.5 12.0899 1.5 8.5C1.5 4.91015 4.41015 2 8 2C11.5899 2 14.5 4.91015 14.5 8.5C14.5 12.0899 11.5899 15 8 15ZM0 8.5C0 4.08172 3.58172 0.5 8 0.5C12.4183 0.5 16 4.08172 16 8.5C16 12.9183 12.4183 16.5 8 16.5C3.58172 16.5 0 12.9183 0 8.5ZM9 9.5V4.5H7.5V8H5.5V9.5H9Z\"\n\t\t\t\tfill=\"#949494\"\n\t\t\t/>\n\t\t</svg>\n\t);\n};\n\nexport const WordPressIcon = (props?: React.SVGProps<SVGSVGElement>) => {\n\treturn (\n\t\t<svg\n\t\t\twidth=\"20\"\n\t\t\theight=\"21\"\n\t\t\tviewBox=\"0 0 20 21\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t{...props}\n\t\t>\n\t\t\t<path\n\t\t\t\td=\"M20 10.5C20 4.99 15.51 0.5 10 0.5C4.48 0.5 0 4.99 0 10.5C0 16.02 4.48 20.5 10 20.5C15.51 20.5 20 16.02 20 10.5ZM7.78 15.87L4.37 6.72C4.92 6.7 5.54 6.64 5.54 6.64C6.04 6.58 5.98 5.51 5.48 5.53C5.48 5.53 4.03 5.64 3.11 5.64C2.93 5.64 2.74 5.64 2.53 5.63C4.12 3.19 6.87 1.61 10 1.61C12.33 1.61 14.45 2.48 16.05 3.95C15.37 3.84 14.4 4.34 14.4 5.53C14.4 6.27 14.85 6.89 15.3 7.63C15.65 8.24 15.85 8.99 15.85 10.09C15.85 11.58 14.45 15.09 14.45 15.09L11.42 6.72C11.96 6.7 12.24 6.55 12.24 6.55C12.74 6.5 12.68 5.3 12.18 5.33C12.18 5.33 10.74 5.45 9.8 5.45C8.93 5.45 7.47 5.33 7.47 5.33C6.97 5.3 6.91 6.53 7.41 6.55L8.33 6.63L9.59 10.04L7.78 15.87ZM17.41 10.5C17.65 9.86 18.15 8.63 17.84 6.25C18.54 7.54 18.89 8.96 18.89 10.5C18.89 13.79 17.16 16.74 14.49 18.28C15.46 15.69 16.43 13.08 17.41 10.5ZM6.1 18.59C3.12 17.15 1.11 14.03 1.11 10.5C1.11 9.2 1.34 8.02 1.83 6.91C3.25 10.8 4.67 14.7 6.1 18.59ZM10.13 11.96L12.71 18.94C11.85 19.23 10.95 19.39 10 19.39C9.21 19.39 8.43 19.28 7.71 19.06C8.52 16.68 9.33 14.32 10.13 11.96Z\"\n\t\t\t\tfill=\"#ffffff\"\n\t\t\t/>\n\t\t</svg>\n\t);\n};\n\nexport const folder = (\n\t<svg\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\twidth=\"15\"\n\t\theight=\"14\"\n\t\tviewBox=\"0 0 15 14\"\n\t\tfill=\"none\"\n\t>\n\t\t<path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M7.59196 3.59524L6.77745 1.96623C6.70755 1.82641 6.56464 1.7381 6.40832 1.7381H1.65079C1.42287 1.7381 1.2381 1.92287 1.2381 2.15079V11.8492C1.2381 12.0771 1.42287 12.2619 1.65079 12.2619H13.2063C13.4343 12.2619 13.619 12.0771 13.619 11.8492V4.00794C13.619 3.78001 13.4343 3.59524 13.2063 3.59524H7.59196ZM8.35714 2.35714L7.88484 1.41254C7.60521 0.853274 7.0336 0.5 6.40832 0.5H1.65079C0.739085 0.5 0 1.23909 0 2.15079V11.8492C0 12.7609 0.739085 13.5 1.65079 13.5H13.2063C14.1181 13.5 14.8571 12.7609 14.8571 11.8492V4.00794C14.8571 3.09623 14.1181 2.35714 13.2063 2.35714H8.35714Z\"\n\t\t/>\n\t</svg>\n);\n\nexport const file = (\n\t<svg\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\twidth=\"16\"\n\t\theight=\"16\"\n\t\tfill=\"currentColor\"\n\t\tclassName=\"bi bi-file-earmark\"\n\t\tviewBox=\"0 0 16 16\"\n\t>\n\t\t<path d=\"M14 4.5V14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h5.5zm-3 0A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4.5z\" />\n\t</svg>\n);\n\nexport const ClockIcon = (props?: React.SVGProps<SVGSVGElement>) => (\n\t<svg\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\twidth=\"18\"\n\t\theight=\"18\"\n\t\tviewBox=\"0 0 14 14\"\n\t\tfill=\"none\"\n\t\t{...props}\n\t>\n\t\t<path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M7 12.6875C3.85888 12.6875 1.3125 10.1411 1.3125 7C1.3125 3.85888 3.85888 1.3125 7 1.3125C10.1411 1.3125 12.6875 3.85888 12.6875 7C12.6875 10.1411 10.1411 12.6875 7 12.6875ZM0 7C0 3.13401 3.13401 0 7 0C10.866 0 14 3.13401 14 7C14 10.866 10.866 14 7 14C3.13401 14 0 10.866 0 7ZM7.875 7.875V3.5H6.5625V6.5625H4.8125V7.875H7.875Z\"\n\t\t\tfill=\"#949494\"\n\t\t/>\n\t</svg>\n);\n\nexport const layout = (\n\t<svg\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\twidth=\"14\"\n\t\theight=\"14\"\n\t\tviewBox=\"0 0 14 14\"\n\t\tfill=\"none\"\n\t>\n\t\t<path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M12.25 1.3125H1.75C1.50838 1.3125 1.3125 1.50838 1.3125 1.75V4.37495H12.6875V1.75C12.6875 1.50837 12.4916 1.3125 12.25 1.3125ZM12.6875 5.68745H5.25003V12.6875H12.25C12.4916 12.6875 12.6875 12.4916 12.6875 12.25V5.68745ZM3.93753 5.68745H1.3125V12.25C1.3125 12.4916 1.50837 12.6875 1.75 12.6875H3.93753L3.93753 5.68745ZM1.75 0H12.25C13.2165 0 14 0.783502 14 1.75V12.25C14 13.2165 13.2165 14 12.25 14H1.75C0.783502 14 0 13.2165 0 12.25V1.75C0 0.783502 0.783502 0 1.75 0Z\"\n\t\t\tfill=\"#949494\"\n\t\t/>\n\t</svg>\n);\n\nexport function getLogoDataURL(logo: { mime: string; data: string }): string {\n\treturn `data:${logo.mime};base64,${logo.data}`;\n}\n\nexport function SiteManagerIcon({\n\tsize = 24,\n\tsidebarActive = false,\n}: {\n\tsize?: number;\n\tsidebarActive?: boolean;\n}) {\n\treturn (\n\t\t<svg\n\t\t\twidth={size}\n\t\t\theight={size}\n\t\t\tviewBox=\"0 0 24 24\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\tfill=\"none\"\n\t\t\tstroke=\"currentColor\"\n\t\t\tstrokeWidth=\"2\"\n\t\t\tstrokeLinecap=\"round\"\n\t\t\tstrokeLinejoin=\"round\"\n\t\t>\n\t\t\t<rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"></rect>\n\t\t\t{sidebarActive ? (\n\t\t\t\t<rect\n\t\t\t\t\tx=\"3\"\n\t\t\t\t\ty=\"3\"\n\t\t\t\t\twidth=\"7\"\n\t\t\t\t\theight=\"18\"\n\t\t\t\t\trx=\"2\"\n\t\t\t\t\try=\"2\"\n\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t></rect>\n\t\t\t) : (\n\t\t\t\t<rect\n\t\t\t\t\tx=\"3\"\n\t\t\t\t\ty=\"3\"\n\t\t\t\t\twidth=\"8\"\n\t\t\t\t\theight=\"18\"\n\t\t\t\t\trx=\"2\"\n\t\t\t\t\try=\"2\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstrokeWidth=\"2\"\n\t\t\t\t></rect>\n\t\t\t)}\n\t\t</svg>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { cloneElement, forwardRef } from '@wordpress/element';\n\n/**\n * External dependencies\n */\n\n/**\n * Return an SVG icon.\n *\n * @param props The component props.\n *\n * @return Icon component\n */\nexport default forwardRef(({\n icon,\n size = 24,\n ...props\n}, ref) => {\n return cloneElement(icon, {\n width: size,\n height: size,\n ...props,\n ref\n });\n});\n//# sourceMappingURL=index.js.map","/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\nvar React = require('react');\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\nvar assign = Object.assign;\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"<anonymous>\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('<anonymous>')) {\n _frame = _frame.replace('<anonymous>', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown;\nvar specialPropRefWarningShown;\nvar didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config, self) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {\n var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingKey = function () {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n }\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingRef = function () {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * https://github.com/reactjs/rfcs/pull/107\n * @param {*} type\n * @param {object} props\n * @param {string} key\n */\n\nfunction jsxDEV(type, config, maybeKey, source, self) {\n {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null; // Currently, key can be spread in as a prop. This causes a potential\n // issue if key is also explicitly declared (ie. <div {...props} key=\"Hi\" />\n // or <div key=\"Hi\" {...props} /> ). We want to deprecate key spread,\n // but as an intermediary step, we will use jsxDEV for everything except\n // <div {...props} key=\"Hi\" />, because we aren't currently able to tell if\n // key is explicitly declared to be undefined or not.\n\n if (maybeKey !== undefined) {\n {\n checkKeyStringCoercion(maybeKey);\n }\n\n key = '' + maybeKey;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n }\n\n if (hasValidRef(config)) {\n ref = config.ref;\n warnIfStringRefCannotBeAutoConverted(config, self);\n } // Remaining properties are added to a new props object\n\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n }\n}\n\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\n\nfunction isValidElement(object) {\n {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n }\n}\n\nfunction getDeclarationErrorAddendum() {\n {\n if (ReactCurrentOwner$1.current) {\n var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n }\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n }\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n }\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n }\n\n setCurrentlyValidatingElement$1(element);\n\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n setCurrentlyValidatingElement$1(null);\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n {\n if (typeof node !== 'object') {\n return;\n }\n\n if (isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n // Intentionally inside to avoid triggering lazy initializers:\n var name = getComponentNameFromType(type);\n checkPropTypes(propTypes, element.props, 'prop', name, element);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n var _name = getComponentNameFromType(type);\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement$1(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement$1(null);\n }\n }\n}\n\nvar didWarnAboutKeySpread = {};\nfunction jsxWithValidation(type, props, key, isStaticChildren, source, self) {\n {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendum(source);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n\n var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n var children = props.children;\n\n if (children !== undefined) {\n if (isStaticChildren) {\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n validateChildKeys(children[i], type);\n }\n\n if (Object.freeze) {\n Object.freeze(children);\n }\n } else {\n error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');\n }\n } else {\n validateChildKeys(children, type);\n }\n }\n }\n\n {\n if (hasOwnProperty.call(props, 'key')) {\n var componentName = getComponentNameFromType(type);\n var keys = Object.keys(props).filter(function (k) {\n return k !== 'key';\n });\n var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';\n\n if (!didWarnAboutKeySpread[componentName + beforeExample]) {\n var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';\n\n error('A props object containing a \"key\" prop is being spread into JSX:\\n' + ' let props = %s;\\n' + ' <%s {...props} />\\n' + 'React keys must be passed directly to JSX without using spread:\\n' + ' let props = %s;\\n' + ' <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);\n\n didWarnAboutKeySpread[componentName + beforeExample] = true;\n }\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n }\n} // These two functions exist to still get child warnings in dev\n// even with the prod transform. This means that jsxDEV is purely\n// opt-in behavior for better messages but that we won't stop\n// giving you warnings if you use production apis.\n\nfunction jsxWithValidationStatic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, true);\n }\n}\nfunction jsxWithValidationDynamic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, false);\n }\n}\n\nvar jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.\n// for now we can ship identical prod functions\n\nvar jsxs = jsxWithValidationStatic ;\n\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsx;\nexports.jsxs = jsxs;\n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { createElement, forwardRef } from '@wordpress/element';\n\n/** @typedef {{isPressed?: boolean} & import('react').ComponentPropsWithoutRef<'svg'>} SVGProps */\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'circle'>} props\n *\n * @return {JSX.Element} Circle component\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const Circle = props => createElement('circle', props);\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'g'>} props\n *\n * @return {JSX.Element} G component\n */\nexport const G = props => createElement('g', props);\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'line'>} props\n *\n * @return {JSX.Element} Path component\n */\nexport const Line = props => createElement('line', props);\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'path'>} props\n *\n * @return {JSX.Element} Path component\n */\nexport const Path = props => createElement('path', props);\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'polygon'>} props\n *\n * @return {JSX.Element} Polygon component\n */\nexport const Polygon = props => createElement('polygon', props);\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'rect'>} props\n *\n * @return {JSX.Element} Rect component\n */\nexport const Rect = props => createElement('rect', props);\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'defs'>} props\n *\n * @return {JSX.Element} Defs component\n */\nexport const Defs = props => createElement('defs', props);\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'radialGradient'>} props\n *\n * @return {JSX.Element} RadialGradient component\n */\nexport const RadialGradient = props => createElement('radialGradient', props);\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'linearGradient'>} props\n *\n * @return {JSX.Element} LinearGradient component\n */\nexport const LinearGradient = props => createElement('linearGradient', props);\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'stop'>} props\n *\n * @return {JSX.Element} Stop component\n */\nexport const Stop = props => createElement('stop', props);\nexport const SVG = forwardRef(\n/**\n * @param {SVGProps} props isPressed indicates whether the SVG should appear as pressed.\n * Other props will be passed through to svg component.\n * @param {import('react').ForwardedRef<SVGSVGElement>} ref The forwarded ref to the SVG element.\n *\n * @return {JSX.Element} Stop component\n */\n({\n className,\n isPressed,\n ...props\n}, ref) => {\n const appliedProps = {\n ...props,\n className: clsx(className, {\n 'is-pressed': isPressed\n }) || undefined,\n 'aria-hidden': true,\n focusable: false\n };\n\n // Disable reason: We need to have a way to render HTML tag for web.\n // eslint-disable-next-line react/forbid-elements\n return /*#__PURE__*/_jsx(\"svg\", {\n ...appliedProps,\n ref: ref\n });\n});\nSVG.displayName = 'SVG';\n//# sourceMappingURL=index.js.map","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst chevronDown = /*#__PURE__*/_jsx(SVG, {\n viewBox: \"0 0 24 24\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: /*#__PURE__*/_jsx(Path, {\n d: \"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z\"\n })\n});\nexport default chevronDown;\n//# sourceMappingURL=chevron-down.js.map","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst chevronRight = /*#__PURE__*/_jsx(SVG, {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\",\n children: /*#__PURE__*/_jsx(Path, {\n d: \"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z\"\n })\n});\nexport default chevronRight;\n//# sourceMappingURL=chevron-right.js.map","import React, {\n\tforwardRef,\n\tuseEffect,\n\tuseImperativeHandle,\n\tuseMemo,\n\tuseRef,\n\tuseState,\n} from 'react';\nimport {\n\t__experimentalTreeGrid as TreeGrid,\n\t__experimentalTreeGridRow as TreeGridRow,\n\t__experimentalTreeGridCell as TreeGridCell,\n\tButton,\n\tPopover,\n\tNavigableMenu,\n\tMenuItem,\n} from '@wordpress/components';\nimport { Icon, chevronDown, chevronRight } from '@wordpress/icons';\nimport '@wordpress/components/build-style/style.css';\nimport css from './style.module.css';\nimport classNames from 'classnames';\nimport { file, folder } from '../icons';\nimport { basename, dirname, joinPaths } from '@php-wasm/util';\n\ntype ExpandedNodePaths = Record<string, boolean>;\n\ntype DropIndicatorState = 'valid' | 'invalid';\n\ntype DropIndicator = {\n\tpath: string;\n\tstate: DropIndicatorState;\n};\n\ntype DropEvaluation = {\n\tallowed: boolean;\n\tstate: DropIndicatorState;\n\tdestination: string | null;\n};\n\ninterface FileSystemEntryBaseLike {\n\treadonly isFile: boolean;\n\treadonly isDirectory: boolean;\n\treadonly name: string;\n}\n\ninterface FileSystemFileEntryLike extends FileSystemEntryBaseLike {\n\tfile: (\n\t\tsuccessCallback: (file: File) => void,\n\t\terrorCallback?: (error: DOMException) => void\n\t) => void;\n}\n\ninterface FileSystemDirectoryReaderLike {\n\treadEntries: (\n\t\tsuccessCallback: (entries: FileSystemEntryLike[]) => void,\n\t\terrorCallback?: (error: DOMException) => void\n\t) => void;\n}\n\ninterface FileSystemDirectoryEntryLike extends FileSystemEntryBaseLike {\n\tcreateReader: () => FileSystemDirectoryReaderLike;\n}\n\ntype FileSystemEntryLike =\n\t| FileSystemFileEntryLike\n\t| FileSystemDirectoryEntryLike;\n\nexport interface AsyncWritableFilesystem {\n\tisDir: (path: string) => Promise<boolean>;\n\tfileExists: (path: string) => Promise<boolean>;\n\treadFileAsBuffer: (path: string) => Promise<Uint8Array>;\n\treadFileAsText: (path: string) => Promise<string>;\n\tlistFiles: (path: string) => Promise<string[]>;\n\twriteFile: (path: string, data: Uint8Array | string) => Promise<void>;\n\tmkdir: (path: string) => Promise<void>;\n\trmdir: (path: string, options?: { recursive?: boolean }) => Promise<void>;\n\tmv: (source: string, destination: string) => Promise<void>;\n\tunlink: (path: string) => Promise<void>;\n}\n\nexport type FileNode = {\n\tname: string;\n\ttype: 'file' | 'folder';\n\tchildren?: FileNode[];\n};\n\nexport type FilePickerTreeProps = {\n\tfilesystem: AsyncWritableFilesystem;\n\troot?: string; // default '/wordpress'\n\tinitialSelectedPath?: string;\n\tonSelect?: (path: string | null) => void;\n\tonDoubleClickFile?: (path: string) => void;\n};\n\nexport type FilePickerTreeHandle = {\n\tfocusPath: (\n\t\tpath: string,\n\t\toptions?: { select?: boolean; domFocus?: boolean; notify?: boolean }\n\t) => void;\n\tselectPath: (path: string) => void;\n\tgetSelectedPath: () => string | null;\n\texpandToPath: (path: string) => Promise<void>;\n\trefresh: (path: string) => Promise<FileNode[] | undefined>;\n\tremapPath: (from: string, to: string) => void;\n\t// Filesystem helpers\n\tcreateFile: (absSelectedPath?: string) => Promise<void>;\n\tcreateFolder: (absSelectedPath?: string) => Promise<void>;\n};\n\nfunction buildPathChain(path: string): string[] {\n\tif (!path) return [];\n\tconst normalized =\n\t\tpath\n\t\t\t.replaceAll(/\\\\+/g, '/')\n\t\t\t.replace(/\\/{2,}/g, '/')\n\t\t\t.replace(/\\/$/, '') || path;\n\tconst hasLeadingSlash = normalized.startsWith('/');\n\tconst parts = normalized.split('/').filter(Boolean);\n\tconst chain: string[] = [];\n\tlet current = hasLeadingSlash ? '/' : '';\n\tif (hasLeadingSlash) chain.push('/');\n\tfor (const part of parts) {\n\t\tif (!current || current === '/') {\n\t\t\tcurrent = current === '/' ? `/${part}` : part;\n\t\t} else {\n\t\t\tcurrent = `${current}/${part}`;\n\t\t}\n\t\tchain.push(current);\n\t}\n\treturn chain;\n}\n\nfunction isDescendantPath(ancestor: string, candidate: string) {\n\tif (!ancestor || !candidate) return false;\n\tif (ancestor === candidate) return false;\n\tconst normalizedAncestor =\n\t\tancestor === '/' ? '/' : ancestor.replace(/\\/{2,}/g, '/');\n\tconst normalizedCandidate = candidate.replace(/\\/{2,}/g, '/');\n\tif (normalizedAncestor === '/') {\n\t\treturn (\n\t\t\tnormalizedCandidate.startsWith('/') && normalizedCandidate !== '/'\n\t\t);\n\t}\n\treturn normalizedCandidate.startsWith(`${normalizedAncestor}/`);\n}\n\nfunction remapSinglePath(value: string | null, from: string, to: string) {\n\tif (!value) return value;\n\tif (value === from) return to;\n\tif (value.startsWith(from === '/' ? '/' : `${from}/`)) {\n\t\treturn to + value.slice(from.length);\n\t}\n\treturn value;\n}\n\nexport const FilePickerTree = forwardRef<\n\tFilePickerTreeHandle,\n\tFilePickerTreeProps\n>(function FilePickerTree(\n\t{\n\t\tfilesystem,\n\t\troot = '/wordpress',\n\t\tinitialSelectedPath,\n\t\tonSelect = () => {},\n\t\tonDoubleClickFile,\n\t},\n\tref\n) {\n\tconst normalizedRoot = useMemo(() => {\n\t\tlet p = (root || '/').replace(/\\\\+/g, '/');\n\t\tif (!p.startsWith('/')) p = `/${p}`;\n\t\tp = p.replace(/\\/{2,}/g, '/');\n\t\tif (p.length > 1 && p.endsWith('/')) p = p.slice(0, -1);\n\t\treturn p || '/';\n\t}, [root]);\n\n\tconst isValidNameSegment = (name: string) => {\n\t\tif (!name) return false;\n\t\tif (name === '.' || name === '..') return false;\n\t\treturn !/[\\\\/]/.test(name);\n\t};\n\n\tconst [expanded, setExpanded] = useState<ExpandedNodePaths>(() => {\n\t\tif (!initialSelectedPath) {\n\t\t\treturn {};\n\t\t}\n\t\tconst initialExpanded: ExpandedNodePaths = {};\n\t\tfor (const path of buildPathChain(initialSelectedPath)) {\n\t\t\tinitialExpanded[path] = true;\n\t\t}\n\t\treturn initialExpanded;\n\t});\n\tconst [selectedPath, setSelectedPath] = useState<string | null>(\n\t\t() => initialSelectedPath ?? null\n\t);\n\tconst [focusedPath, setFocusedPath] = useState<string | null>(\n\t\t() => initialSelectedPath ?? null\n\t);\n\tconst [lazyChildren, setLazyChildren] = useState<\n\t\tRecord<string, FileNode[]>\n\t>({});\n\tconst [loadingPaths, setLoadingPaths] = useState<Record<string, boolean>>(\n\t\t{}\n\t);\n\tconst [draggedPath, setDraggedPath] = useState<string | null>(null);\n\tconst [dropIndicator, setDropIndicator] = useState<DropIndicator | null>(\n\t\tnull\n\t);\n\tconst dragExpandTimeoutsRef = useRef<Record<string, number>>({});\n\tconst rootAutoExpandedRef = useRef(false);\n\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\tconst searchBufferTimeoutRef = useRef<NodeJS.Timeout | null>(null);\n\tconst loadingPathsRef = useRef(loadingPaths);\n\tconst lazyChildrenRef = useRef(lazyChildren);\n\tconst clearAllDragExpandTimeouts = () => {\n\t\tfor (const key of Object.keys(dragExpandTimeoutsRef.current)) {\n\t\t\tclearTimeout(dragExpandTimeoutsRef.current[key]);\n\t\t\tdelete dragExpandTimeoutsRef.current[key];\n\t\t}\n\t};\n\tconst cancelExpandOnDrag = (path: string) => {\n\t\tconst timeoutId = dragExpandTimeoutsRef.current[path];\n\t\tif (timeoutId) {\n\t\t\tclearTimeout(timeoutId);\n\t\t\tdelete dragExpandTimeoutsRef.current[path];\n\t\t}\n\t};\n\n\tuseEffect(() => {\n\t\tloadingPathsRef.current = loadingPaths;\n\t}, [loadingPaths]);\n\n\tuseEffect(() => {\n\t\tlazyChildrenRef.current = lazyChildren;\n\t}, [lazyChildren]);\n\n\tconst focusDomNode = (path: string) => {\n\t\tconst focusTarget = containerRef.current?.querySelector(\n\t\t\t`[data-path=\"${path}\"]`\n\t\t) as HTMLElement | null;\n\t\tif (focusTarget && typeof focusTarget.focus === 'function') {\n\t\t\tfocusTarget.focus();\n\t\t\tfocusTarget.scrollIntoView({\n\t\t\t\tbehavior: 'smooth',\n\t\t\t\tblock: 'nearest',\n\t\t\t});\n\t\t}\n\t};\n\n\tconst generatePath = (node: FileNode, parentPath = ''): string => {\n\t\tconst raw = parentPath ? `${parentPath}/${node.name}` : node.name;\n\t\treturn raw.replaceAll(/\\\\+/g, '/').replace(/\\/{2,}/g, '/');\n\t};\n\n\tconst getResolvedChildren = (\n\t\tnode: FileNode,\n\t\tpath: string\n\t): FileNode[] | undefined => {\n\t\tif (node.children) {\n\t\t\treturn node.children;\n\t\t}\n\t\treturn lazyChildren[path];\n\t};\n\n\tconst listDir = async (fs: AsyncWritableFilesystem, basePath: string) => {\n\t\tconst names = await fs.listFiles(basePath);\n\t\tconst results: { name: string; type: 'file' | 'folder' }[] = [];\n\t\tfor (const name of names) {\n\t\t\tconst childPath =\n\t\t\t\tbasePath === '/' ? `/${name}` : `${basePath}/${name}`;\n\t\t\tconst isDirectory = await fs.isDir(childPath);\n\t\t\tresults.push({ name, type: isDirectory ? 'folder' : 'file' });\n\t\t}\n\t\tresults.sort((a, b) => {\n\t\t\t// First, sort by type (folders before files)\n\t\t\tif (a.type !== b.type) return a.type === 'folder' ? -1 : 1;\n\n\t\t\t// Within same type, prioritize pending create item\n\t\t\tconst aPath =\n\t\t\t\tbasePath === '/' ? `/${a.name}` : `${basePath}/${a.name}`;\n\t\t\tconst bPath =\n\t\t\t\tbasePath === '/' ? `/${b.name}` : `${basePath}/${b.name}`;\n\t\t\tconst pendingPath = pendingCreateRef.current?.tempPath;\n\n\t\t\tif (pendingPath) {\n\t\t\t\tif (aPath === pendingPath) return -1;\n\t\t\t\tif (bPath === pendingPath) return 1;\n\t\t\t}\n\n\t\t\t// Otherwise, sort alphabetically\n\t\t\treturn a.name.localeCompare(b.name);\n\t\t});\n\t\treturn results as FileNode[];\n\t};\n\n\tconst loadChildren = async (path: string): Promise<FileNode[]> => {\n\t\treturn await listDir(filesystem as AsyncWritableFilesystem, path);\n\t};\n\n\tconst loadChildrenForPath = (path: string, node: FileNode) => {\n\t\tif (node.type !== 'folder') {\n\t\t\treturn node.children;\n\t\t}\n\t\tconst existingChildren = node.children ?? lazyChildrenRef.current[path];\n\t\tif (existingChildren || loadingPathsRef.current[path]) {\n\t\t\treturn existingChildren;\n\t\t}\n\t\tsetLoadingPaths((prev) => ({ ...prev, [path]: true }));\n\t\treturn new Promise<FileNode[]>((resolve) => {\n\t\t\tloadChildren(path)\n\t\t\t\t.then((children) => {\n\t\t\t\t\tsetLazyChildren((prev) => ({\n\t\t\t\t\t\t...prev,\n\t\t\t\t\t\t[path]: children ?? [],\n\t\t\t\t\t}));\n\t\t\t\t\tresolve(children ?? []);\n\t\t\t\t})\n\t\t\t\t.catch(() => {\n\t\t\t\t\tresolve([]);\n\t\t\t\t})\n\t\t\t\t.finally(() => {\n\t\t\t\t\tsetLoadingPaths((prev) => {\n\t\t\t\t\t\tconst next = { ...prev };\n\t\t\t\t\t\tdelete next[path];\n\t\t\t\t\t\treturn next;\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t});\n\t};\n\n\tconst scheduleExpandOnDrag = (path: string, node: FileNode) => {\n\t\tif (node.type !== 'folder') {\n\t\t\treturn;\n\t\t}\n\t\tif (typeof window === 'undefined') {\n\t\t\treturn;\n\t\t}\n\t\tif (dragExpandTimeoutsRef.current[path]) {\n\t\t\treturn;\n\t\t}\n\t\tdragExpandTimeoutsRef.current[path] = window.setTimeout(() => {\n\t\t\tsetExpanded((prev) => {\n\t\t\t\tif (prev[path]) {\n\t\t\t\t\treturn prev;\n\t\t\t\t}\n\t\t\t\treturn { ...prev, [path]: true };\n\t\t\t});\n\t\t\tvoid loadChildrenForPath(path, node);\n\t\t\tdelete dragExpandTimeoutsRef.current[path];\n\t\t}, 600);\n\t};\n\n\tconst refreshChildren = (path: string) => {\n\t\tsetLoadingPaths((prev) => ({ ...prev, [path]: true }));\n\t\treturn new Promise<FileNode[]>((resolve) => {\n\t\t\tloadChildren(path)\n\t\t\t\t.then((children) => {\n\t\t\t\t\tsetLazyChildren((prev) => ({\n\t\t\t\t\t\t...prev,\n\t\t\t\t\t\t[path]: children ?? [],\n\t\t\t\t\t}));\n\t\t\t\t\tresolve(children ?? []);\n\t\t\t\t})\n\t\t\t\t.catch(() => {\n\t\t\t\t\tresolve([]);\n\t\t\t\t})\n\t\t\t\t.finally(() => {\n\t\t\t\t\tsetLoadingPaths((prev) => {\n\t\t\t\t\t\tconst next = { ...prev };\n\t\t\t\t\t\tdelete next[path];\n\t\t\t\t\t\treturn next;\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t});\n\t};\n\n\tconst toggleNode = (path: string, node: FileNode, isOpen: boolean) => {\n\t\tsetExpanded((prev) => ({\n\t\t\t...prev,\n\t\t\t[path]: isOpen,\n\t\t}));\n\t\tif (isOpen) {\n\t\t\tvoid loadChildrenForPath(path, node);\n\t\t} else {\n\t\t\tsetLazyChildren((prev) => {\n\t\t\t\tif (prev[path] === undefined) {\n\t\t\t\t\treturn prev;\n\t\t\t\t}\n\t\t\t\tconst next = { ...prev } as Record<string, FileNode[]>;\n\t\t\t\tdelete next[path];\n\t\t\t\treturn next;\n\t\t\t});\n\t\t}\n\t};\n\n\tconst expandToPath = async (targetPath: string) => {\n\t\tif (!targetPath) return;\n\t\tconst chain = buildPathChain(targetPath);\n\t\tif (chain.length === 0) return;\n\t\tsetExpanded((prev) => {\n\t\t\tconst next = { ...prev } as ExpandedNodePaths;\n\t\t\tfor (const segment of chain) {\n\t\t\t\tnext[segment] = true;\n\t\t\t}\n\t\t\treturn next;\n\t\t});\n\t\t// always available in filesystem mode\n\n\t\tlet currentChildren: FileNode[] | undefined = [\n\t\t\t{ name: normalizedRoot, type: 'folder' },\n\t\t];\n\t\tlet parentPath = '';\n\t\tfor (const segmentPath of chain) {\n\t\t\tconst nextNode = currentChildren?.find((child) => {\n\t\t\t\tconst childPath = generatePath(child, parentPath);\n\t\t\t\treturn childPath === segmentPath;\n\t\t\t});\n\t\t\tif (!nextNode || nextNode.type !== 'folder') {\n\t\t\t\tparentPath = segmentPath;\n\t\t\t\tcurrentChildren = [];\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst loaded = await loadChildrenForPath(segmentPath, nextNode);\n\t\t\tcurrentChildren = loaded ?? lazyChildrenRef.current[segmentPath];\n\t\t\tparentPath = segmentPath;\n\t\t}\n\t};\n\n\tconst remapPathState = (from: string, to: string) => {\n\t\tif (!from || !to || from === to) {\n\t\t\treturn;\n\t\t}\n\t\tconst fromPrefix = from === '/' ? '/' : `${from}/`;\n\t\tconst remapKey = (key: string): string | null => {\n\t\t\tif (key === from) return to;\n\t\t\tif (key.startsWith(fromPrefix)) {\n\t\t\t\treturn to + key.slice(from.length);\n\t\t\t}\n\t\t\treturn null;\n\t\t};\n\n\t\tsetExpanded((prev) => {\n\t\t\tlet changed = false;\n\t\t\tconst next: ExpandedNodePaths = { ...prev };\n\t\t\tfor (const key of Object.keys(prev)) {\n\t\t\t\tconst mapped = remapKey(key);\n\t\t\t\tif (mapped && mapped !== key) {\n\t\t\t\t\tnext[mapped] = prev[key];\n\t\t\t\t\tdelete next[key];\n\t\t\t\t\tchanged = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn changed ? next : prev;\n\t\t});\n\n\t\tsetLazyChildren((prev) => {\n\t\t\tlet changed = false;\n\t\t\tconst next = { ...prev } as Record<string, FileNode[]>;\n\t\t\tfor (const key of Object.keys(prev)) {\n\t\t\t\tconst mapped = remapKey(key);\n\t\t\t\tif (mapped && mapped !== key) {\n\t\t\t\t\tnext[mapped] = prev[key];\n\t\t\t\t\tdelete next[key];\n\t\t\t\t\tchanged = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn changed ? next : prev;\n\t\t});\n\n\t\tsetSelectedPath((prev) => {\n\t\t\tif (!prev) return prev;\n\t\t\tconst mapped = remapKey(prev);\n\t\t\treturn mapped ?? prev;\n\t\t});\n\t\tsetFocusedPath((prev) => {\n\t\t\tif (!prev) return prev;\n\t\t\tconst mapped = remapKey(prev);\n\t\t\treturn mapped ?? prev;\n\t\t});\n\t};\n\n\tconst resetDragState = () => {\n\t\tsetDraggedPath(null);\n\t\tsetDropIndicator(null);\n\t\tclearAllDragExpandTimeouts();\n\t};\n\n\tconst selectPath = (path: string, notify = true) => {\n\t\tsetSelectedPath(path);\n\t\tif (notify) {\n\t\t\tonSelect(path);\n\t\t}\n\t};\n\n\t// Filesystem-specific state and actions (declare before exposing handle)\n\tconst treeFiles: FileNode[] = useMemo(() => {\n\t\treturn [{ name: normalizedRoot, type: 'folder' }];\n\t}, [normalizedRoot]);\n\n\tconst [contextMenu, setContextMenu] = useState<{\n\t\tabsPath: string;\n\t\ttype: 'file' | 'folder';\n\t\tx: number;\n\t\ty: number;\n\t} | null>(null);\n\tconst [renamingAbsolutePath, setRenamingAbsolutePath] = useState<\n\t\tstring | null\n\t>(null);\n\tconst pendingCreateRef = useRef<{\n\t\ttype: 'file' | 'folder';\n\t\ttempPath: string;\n\t} | null>(null);\n\n\tconst effectiveRenamingPath = renamingAbsolutePath;\n\n\tuseImperativeHandle(\n\t\tref,\n\t\t() => ({\n\t\t\tfocusPath: (\n\t\t\t\tpath: string,\n\t\t\t\toptions: {\n\t\t\t\t\tselect?: boolean;\n\t\t\t\t\tdomFocus?: boolean;\n\t\t\t\t\tnotify?: boolean;\n\t\t\t\t} = {}\n\t\t\t) => {\n\t\t\t\tif (!path) return;\n\t\t\t\tconst {\n\t\t\t\t\tselect = true,\n\t\t\t\t\tdomFocus = true,\n\t\t\t\t\tnotify = false,\n\t\t\t\t} = options;\n\t\t\t\tif (select) {\n\t\t\t\t\tselectPath(path, notify);\n\t\t\t\t}\n\t\t\t\tsetFocusedPath(path);\n\t\t\t\tif (domFocus) {\n\t\t\t\t\tfocusDomNode(path);\n\t\t\t\t}\n\t\t\t},\n\t\t\tselectPath: (path: string) => {\n\t\t\t\tif (!path) return;\n\t\t\t\tselectPath(path);\n\t\t\t\tsetFocusedPath(path);\n\t\t\t\tfocusDomNode(path);\n\t\t\t},\n\t\t\tgetSelectedPath: () => selectedPath,\n\t\t\texpandToPath: async (path: string) => await expandToPath(path),\n\t\t\trefresh: async (path: string) => await refreshChildren(path),\n\t\t\tremapPath: remapPathState,\n\t\t\tcreateFile: async (absSelectedPath?: string) => {\n\t\t\t\tawait createNode(absSelectedPath, 'file', 'untitled.php');\n\t\t\t},\n\t\t\tcreateFolder: async (absSelectedPath?: string) => {\n\t\t\t\tawait createNode(absSelectedPath, 'folder', 'New Folder');\n\t\t\t},\n\t\t}),\n\t\t[selectedPath, refreshChildren, remapPathState, expandToPath]\n\t);\n\n\tconst hasInitializedRef = useRef(false);\n\tconst pendingInitialExpandRef = useRef<string | null>(\n\t\tinitialSelectedPath ?? null\n\t);\n\tconst previousInitialPathRef = useRef(initialSelectedPath);\n\n\tuseEffect(() => {\n\t\trootAutoExpandedRef.current = false;\n\t}, [normalizedRoot]);\n\n\tuseEffect(() => {\n\t\tif (\n\t\t\tinitialSelectedPath &&\n\t\t\tinitialSelectedPath !== previousInitialPathRef.current\n\t\t) {\n\t\t\tpendingInitialExpandRef.current = initialSelectedPath;\n\t\t} else if (!initialSelectedPath) {\n\t\t\tpendingInitialExpandRef.current = null;\n\t\t}\n\t\tpreviousInitialPathRef.current = initialSelectedPath;\n\t}, [initialSelectedPath]);\n\tuseEffect(() => {\n\t\tif (!initialSelectedPath || hasInitializedRef.current) {\n\t\t\treturn;\n\t\t}\n\t\thasInitializedRef.current = true;\n\t\tconst chain = buildPathChain(initialSelectedPath);\n\t\tsetExpanded((prev) => {\n\t\t\tconst next = { ...prev } as ExpandedNodePaths;\n\t\t\tfor (const path of chain) {\n\t\t\t\tnext[path] = true;\n\t\t\t}\n\t\t\treturn next;\n\t\t});\n\t\tconst target = chain[chain.length - 1] || initialSelectedPath;\n\t\tsetFocusedPath(target);\n\t\tsetSelectedPath(target);\n\t\tvoid expandToPath(initialSelectedPath);\n\t}, [initialSelectedPath, expandToPath]);\n\n\tuseEffect(() => {\n\t\tconst target = pendingInitialExpandRef.current;\n\t\tif (!target || treeFiles.length === 0) {\n\t\t\treturn;\n\t\t}\n\t\tpendingInitialExpandRef.current = null;\n\t\tvoid expandToPath(target);\n\t}, [treeFiles, expandToPath]);\n\n\tuseEffect(() => {\n\t\tif (!focusedPath) {\n\t\t\tif (treeFiles.length > 0) {\n\t\t\t\tconst firstPath = generatePath(treeFiles[0]);\n\t\t\t\tsetFocusedPath(firstPath);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif (effectiveRenamingPath && effectiveRenamingPath === focusedPath) {\n\t\t\treturn;\n\t\t}\n\t\tfocusDomNode(focusedPath);\n\t}, [treeFiles, focusedPath, effectiveRenamingPath]);\n\n\tuseEffect(() => {\n\t\tif (treeFiles.length === 0) {\n\t\t\treturn;\n\t\t}\n\t\tconst rootNode = treeFiles[0];\n\t\tif (rootNode?.type !== 'folder') {\n\t\t\treturn;\n\t\t}\n\t\tif (rootAutoExpandedRef.current) {\n\t\t\treturn;\n\t\t}\n\t\tconst rootPath = rootNode.name;\n\t\trootAutoExpandedRef.current = true;\n\t\tsetExpanded((prev) =>\n\t\t\tprev[rootPath] ? prev : { ...prev, [rootPath]: true }\n\t\t);\n\t\tif (\n\t\t\t!lazyChildrenRef.current[rootPath] &&\n\t\t\t!loadingPathsRef.current[rootPath]\n\t\t) {\n\t\t\tvoid loadChildrenForPath(rootPath, rootNode);\n\t\t}\n\t}, [treeFiles, loadChildrenForPath, normalizedRoot]);\n\n\tuseEffect(() => {\n\t\treturn () => {\n\t\t\tif (searchBufferTimeoutRef.current) {\n\t\t\t\tclearTimeout(searchBufferTimeoutRef.current);\n\t\t\t}\n\t\t\tclearAllDragExpandTimeouts();\n\t\t};\n\t}, []);\n\n\t/**\n\t * Wait for the context menu (right-click menu) to render, then focus the\n\t * first menu item (e.g. \"Rename\"). This is similar to how VS Code works.\n\t */\n\tuseEffect(() => {\n\t\tif (contextMenu) {\n\t\t\tsetTimeout(() => {\n\t\t\t\tconst firstMenuItem = document.querySelector(\n\t\t\t\t\t'[role=\"menu\"] [role=\"menuitem\"]'\n\t\t\t\t) as HTMLElement | null;\n\t\t\t\tif (\n\t\t\t\t\tfirstMenuItem &&\n\t\t\t\t\ttypeof firstMenuItem.focus === 'function'\n\t\t\t\t) {\n\t\t\t\t\tfirstMenuItem.focus();\n\t\t\t\t}\n\t\t\t}, 0);\n\t\t}\n\t}, [contextMenu]);\n\n\tconst [searchBuffer, setSearchBuffer] = useState('');\n\n\t// remove duplicate handle; unified handle is defined above\n\n\tconst getDropDestinationDir = (node: FileNode, path: string) => {\n\t\tif (node.type === 'folder') {\n\t\t\treturn path;\n\t\t}\n\t\tconst parent = dirname(path);\n\t\tif (!parent) {\n\t\t\treturn '/';\n\t\t}\n\t\treturn parent || '/';\n\t};\n\n\tconst evaluateDropTarget = (\n\t\tnode: FileNode,\n\t\tpath: string,\n\t\tsourcePath: string | null\n\t): DropEvaluation => {\n\t\tconst destinationDir = getDropDestinationDir(node, path);\n\t\tif (!destinationDir) {\n\t\t\treturn { allowed: false, state: 'invalid', destination: null };\n\t\t}\n\t\tif (sourcePath) {\n\t\t\tif (destinationDir === sourcePath) {\n\t\t\t\treturn { allowed: false, state: 'invalid', destination: null };\n\t\t\t}\n\t\t\tif (isDescendantPath(sourcePath, destinationDir)) {\n\t\t\t\treturn { allowed: false, state: 'invalid', destination: null };\n\t\t\t}\n\t\t}\n\t\treturn { allowed: true, state: 'valid', destination: destinationDir };\n\t};\n\n\tconst handleNodeDragStart = (\n\t\tevent: React.DragEvent,\n\t\tnode: FileNode,\n\t\tpath: string\n\t) => {\n\t\tif (node.type !== 'folder' && node.type !== 'file') {\n\t\t\treturn;\n\t\t}\n\t\tsetDraggedPath(path);\n\t\tsetDropIndicator(null);\n\t\tif (event.dataTransfer) {\n\t\t\tevent.dataTransfer.effectAllowed = 'move';\n\t\t\tevent.dataTransfer.setData(\n\t\t\t\t'application/x-wp-playground-path',\n\t\t\t\tpath\n\t\t\t);\n\t\t\tevent.dataTransfer.setData('text/plain', path);\n\t\t}\n\t};\n\n\tconst handleNodeDragEnd = () => {\n\t\tresetDragState();\n\t};\n\n\tconst handleNodeDragEnter = (\n\t\tevent: React.DragEvent,\n\t\tnode: FileNode,\n\t\tpath: string\n\t) => {\n\t\tconst evaluation = evaluateDropTarget(node, path, draggedPath);\n\t\tif (evaluation.allowed) {\n\t\t\tif (node.type === 'folder') {\n\t\t\t\tscheduleExpandOnDrag(path, node);\n\t\t\t}\n\t\t}\n\t\tsetDropIndicator((prev) => {\n\t\t\tif (prev?.path === path && prev.state === evaluation.state) {\n\t\t\t\treturn prev;\n\t\t\t}\n\t\t\treturn { path, state: evaluation.state };\n\t\t});\n\t};\n\n\tconst handleNodeDragOver = (\n\t\tevent: React.DragEvent,\n\t\tnode: FileNode,\n\t\tpath: string\n\t) => {\n\t\tconst evaluation = evaluateDropTarget(node, path, draggedPath);\n\t\tif (evaluation.allowed && evaluation.destination) {\n\t\t\tevent.preventDefault();\n\t\t\tif (event.dataTransfer) {\n\t\t\t\tevent.dataTransfer.dropEffect = draggedPath ? 'move' : 'copy';\n\t\t\t}\n\t\t\tif (node.type === 'folder') {\n\t\t\t\tscheduleExpandOnDrag(path, node);\n\t\t\t}\n\t\t\tsetDropIndicator((prev) => {\n\t\t\t\tif (prev?.path === path && prev.state === evaluation.state) {\n\t\t\t\t\treturn prev;\n\t\t\t\t}\n\t\t\t\treturn { path, state: evaluation.state };\n\t\t\t});\n\t\t} else {\n\t\t\tif (event.dataTransfer) {\n\t\t\t\tevent.dataTransfer.dropEffect = 'none';\n\t\t\t}\n\t\t\tcancelExpandOnDrag(path);\n\t\t\tsetDropIndicator((prev) => {\n\t\t\t\tif (prev?.path === path && prev.state === 'invalid') {\n\t\t\t\t\treturn prev;\n\t\t\t\t}\n\t\t\t\treturn { path, state: 'invalid' };\n\t\t\t});\n\t\t}\n\t};\n\n\tconst handleNodeDragLeave = (\n\t\tevent: React.DragEvent,\n\t\tnode: FileNode,\n\t\tpath: string\n\t) => {\n\t\tcancelExpandOnDrag(path);\n\t\tconst related = event.relatedTarget as Node | null;\n\t\tif (related && event.currentTarget.contains(related)) {\n\t\t\treturn;\n\t\t}\n\t\tsetDropIndicator((prev) => (prev?.path === path ? null : prev));\n\t};\n\n\tconst handleNodeDrop = async (\n\t\tevent: React.DragEvent,\n\t\tnode: FileNode,\n\t\tpath: string\n\t) => {\n\t\tconst sourcePath = draggedPath;\n\t\tconst evaluation = evaluateDropTarget(node, path, sourcePath);\n\t\tif (!evaluation.allowed || !evaluation.destination) {\n\t\t\tresetDragState();\n\t\t\treturn;\n\t\t}\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tcancelExpandOnDrag(path);\n\t\tsetDropIndicator(null);\n\t\ttry {\n\t\t\tif (sourcePath) {\n\t\t\t\tawait moveNode(sourcePath, evaluation.destination);\n\t\t\t} else {\n\t\t\t\tawait importExternalItems(event, evaluation.destination);\n\t\t\t}\n\t\t} finally {\n\t\t\tresetDragState();\n\t\t}\n\t};\n\n\tconst handleInternalContextMenu = (\n\t\tevent: React.MouseEvent,\n\t\tnode: FileNode,\n\t\tpath: string\n\t) => {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tsetRenamingAbsolutePath(null);\n\t\tsetContextMenu({\n\t\t\tabsPath: path,\n\t\t\ttype: node.type,\n\t\t\tx: event.clientX,\n\t\t\ty: event.clientY,\n\t\t});\n\t};\n\n\tconst findAvailableName = async (baseDir: string, baseName: string) => {\n\t\tlet name = baseName;\n\t\tlet counter = 0;\n\t\tconst splitExt = (n: string) => {\n\t\t\tconst dot = n.lastIndexOf('.');\n\t\t\tif (dot > 0) return { stem: n.slice(0, dot), ext: n.slice(dot) };\n\t\t\treturn { stem: n, ext: '' };\n\t\t};\n\t\tconst prefix = baseDir === '/' ? '' : baseDir;\n\t\twhile (\n\t\t\t(await filesystem?.fileExists(`${prefix}/${name}`)) ||\n\t\t\t(await filesystem?.isDir(`${prefix}/${name}`))\n\t\t) {\n\t\t\tcounter += 1;\n\t\t\tconst { stem, ext } = splitExt(baseName);\n\t\t\tname = `${stem} (${counter})${ext}`;\n\t\t}\n\t\treturn name;\n\t};\n\n\tconst createNode = async (\n\t\tabsSelectedPath: string | undefined,\n\t\ttype: 'file' | 'folder',\n\t\tinitialName: string\n\t) => {\n\t\tif (!filesystem) return;\n\t\tlet base = absSelectedPath || selectedPath || normalizedRoot;\n\t\t// Ensure base is directory\n\t\ttry {\n\t\t\tif (!(await filesystem.isDir(base))) {\n\t\t\t\tbase = dirname(base);\n\t\t\t}\n\t\t} catch {\n\t\t\tbase = dirname(base);\n\t\t}\n\t\tconst normalizedBase = base;\n\t\tconst name = await findAvailableName(normalizedBase, initialName);\n\t\tconst tempPath = joinPaths(normalizedBase, name);\n\t\tif (type === 'folder') {\n\t\t\tawait filesystem.mkdir(tempPath);\n\t\t} else {\n\t\t\tawait filesystem.writeFile(tempPath, '');\n\t\t}\n\t\tpendingCreateRef.current = { type, tempPath };\n\t\tsetRenamingAbsolutePath(tempPath);\n\t\tawait refreshChildren(normalizedBase);\n\t\t// Focus new node\n\t\tsetTimeout(() => {\n\t\t\tsetFocusedPath(tempPath);\n\t\t\tfocusDomNode(tempPath);\n\t\t}, 0);\n\t};\n\n\tconst pathExists = async (path: string) => {\n\t\tif (!filesystem) return false;\n\t\ttry {\n\t\t\tif (await filesystem.fileExists(path)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} catch {\n\t\t\t// ignore\n\t\t}\n\t\ttry {\n\t\t\tif (await filesystem.isDir(path)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} catch {\n\t\t\t// ignore\n\t\t}\n\t\treturn false;\n\t};\n\n\tconst ensureDirectory = async (path: string) => {\n\t\tif (!filesystem) return;\n\t\ttry {\n\t\t\tawait filesystem.mkdir(path);\n\t\t} catch (error) {\n\t\t\tconst exists = await filesystem.isDir(path).catch(() => false);\n\t\t\tif (!exists) {\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t}\n\t};\n\n\tconst moveNode = async (sourcePath: string, destinationDir: string) => {\n\t\tif (!filesystem) return;\n\t\tconst fileName = basename(sourcePath);\n\t\tconst destinationPath = joinPaths(destinationDir, fileName);\n\t\tif (destinationPath === sourcePath) {\n\t\t\treturn;\n\t\t}\n\t\tif (await pathExists(destinationPath)) {\n\t\t\treturn;\n\t\t}\n\t\tconst sourceParent = dirname(sourcePath);\n\t\ttry {\n\t\t\tawait filesystem.mv(sourcePath, destinationPath);\n\t\t\tremapPathState(sourcePath, destinationPath);\n\t\t\tconst mappedSelected = remapSinglePath(\n\t\t\t\tselectedPath,\n\t\t\t\tsourcePath,\n\t\t\t\tdestinationPath\n\t\t\t);\n\t\t\tif (\n\t\t\t\tselectedPath &&\n\t\t\t\t(selectedPath === sourcePath ||\n\t\t\t\t\tselectedPath.startsWith(`${sourcePath}/`))\n\t\t\t) {\n\t\t\t\tonSelect(mappedSelected);\n\t\t\t}\n\t\t\tsetFocusedPath((prev) =>\n\t\t\t\tremapSinglePath(prev, sourcePath, destinationPath)\n\t\t\t);\n\t\t\tsetExpanded((prev) => ({\n\t\t\t\t...prev,\n\t\t\t\t[destinationDir]: true,\n\t\t\t}));\n\t\t\tawait Promise.all([\n\t\t\t\trefreshChildren(sourceParent),\n\t\t\t\trefreshChildren(destinationDir),\n\t\t\t]);\n\t\t\tsetSelectedPath((prev) =>\n\t\t\t\tremapSinglePath(prev, sourcePath, destinationPath)\n\t\t\t);\n\t\t\tfocusDomNode(destinationPath);\n\t\t} catch {\n\t\t\t// ignore move errors\n\t\t}\n\t};\n\n\tconst getEntryFromItem = (item: DataTransferItem) => {\n\t\tconst maybeItem = item as DataTransferItem & {\n\t\t\twebkitGetAsEntry?: () => FileSystemEntryLike | null;\n\t\t};\n\t\tif (maybeItem.webkitGetAsEntry) {\n\t\t\treturn maybeItem.webkitGetAsEntry() as FileSystemEntryLike | null;\n\t\t}\n\t\treturn null;\n\t};\n\n\tconst fileFromEntry = (entry: FileSystemFileEntryLike) => {\n\t\treturn new Promise<File>((resolve, reject) => {\n\t\t\tentry.file(resolve, reject);\n\t\t});\n\t};\n\n\tconst importFileBlob = async (file: File, destinationDir: string) => {\n\t\tif (!filesystem) return;\n\t\tconst safeName = file.name || 'untitled';\n\t\tconst targetName = await findAvailableName(destinationDir, safeName);\n\t\tconst targetPath = joinPaths(destinationDir, targetName);\n\t\tconst buffer = new Uint8Array(await file.arrayBuffer());\n\t\tawait filesystem.writeFile(targetPath, buffer);\n\t};\n\n\tconst importFileEntry = async (\n\t\tentry: FileSystemFileEntryLike,\n\t\tdestinationDir: string\n\t) => {\n\t\tconst file = await fileFromEntry(entry);\n\t\tawait importFileBlob(file, destinationDir);\n\t};\n\n\tconst importDirectoryEntry = async (\n\t\tentry: FileSystemDirectoryEntryLike,\n\t\tdestinationDir: string\n\t) => {\n\t\tconst folderName = await findAvailableName(\n\t\t\tdestinationDir,\n\t\t\tentry.name || 'New Folder'\n\t\t);\n\t\tconst folderPath = joinPaths(destinationDir, folderName);\n\t\tawait ensureDirectory(folderPath);\n\t\tconst reader = entry.createReader();\n\t\tconst readEntries = () =>\n\t\t\tnew Promise<FileSystemEntryLike[]>((resolve, reject) => {\n\t\t\t\treader.readEntries(\n\t\t\t\t\t(entries) => resolve(Array.from(entries)),\n\t\t\t\t\treject\n\t\t\t\t);\n\t\t\t});\n\t\twhile (true) {\n\t\t\tconst batch = await readEntries();\n\t\t\tif (!batch.length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor (const child of batch) {\n\t\t\t\tif (child.isFile) {\n\t\t\t\t\tawait importFileEntry(\n\t\t\t\t\t\tchild as FileSystemFileEntryLike,\n\t\t\t\t\t\tfolderPath\n\t\t\t\t\t);\n\t\t\t\t} else if (child.isDirectory) {\n\t\t\t\t\tawait importDirectoryEntry(\n\t\t\t\t\t\tchild as FileSystemDirectoryEntryLike,\n\t\t\t\t\t\tfolderPath\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\tconst importExternalItems = async (\n\t\tevent: React.DragEvent,\n\t\tdestinationDir: string\n\t) => {\n\t\tif (!filesystem) return;\n\t\tconst items = event.dataTransfer?.items\n\t\t\t? Array.from(event.dataTransfer.items)\n\t\t\t: [];\n\t\tconst entries = items\n\t\t\t.filter((item) => item.kind === 'file')\n\t\t\t.map((item) => getEntryFromItem(item))\n\t\t\t.filter((entry): entry is FileSystemEntryLike => Boolean(entry));\n\t\tif (entries.length > 0) {\n\t\t\tfor (const entry of entries) {\n\t\t\t\tif (entry.isFile) {\n\t\t\t\t\tawait importFileEntry(\n\t\t\t\t\t\tentry as FileSystemFileEntryLike,\n\t\t\t\t\t\tdestinationDir\n\t\t\t\t\t);\n\t\t\t\t} else if (entry.isDirectory) {\n\t\t\t\t\tawait importDirectoryEntry(\n\t\t\t\t\t\tentry as FileSystemDirectoryEntryLike,\n\t\t\t\t\t\tdestinationDir\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconst files = event.dataTransfer?.files\n\t\t\t\t? Array.from(event.dataTransfer.files)\n\t\t\t\t: [];\n\t\t\tfor (const file of files) {\n\t\t\t\tawait importFileBlob(file, destinationDir);\n\t\t\t}\n\t\t}\n\t\tawait refreshChildren(destinationDir);\n\t\tsetExpanded((prev) => ({\n\t\t\t...prev,\n\t\t\t[destinationDir]: true,\n\t\t}));\n\t};\n\n\tconst handleDeletePath = async (\n\t\tabsSelectedPath: string,\n\t\ttype: 'file' | 'folder'\n\t) => {\n\t\tif (!filesystem) return;\n\t\tconst normalized = absSelectedPath;\n\t\tsetContextMenu(null);\n\t\ttry {\n\t\t\tif (type === 'folder') {\n\t\t\t\tawait filesystem.rmdir(normalized, { recursive: true } as any);\n\t\t\t} else {\n\t\t\t\tawait filesystem.unlink(normalized);\n\t\t\t}\n\t\t} catch {\n\t\t\t// ignore\n\t\t} finally {\n\t\t\tsetRenamingAbsolutePath(null);\n\t\t\tconst parentDir = dirname(normalized);\n\t\t\tawait refreshChildren(parentDir);\n\t\t\t// If current selection was removed, notify parent\n\t\t\tif (\n\t\t\t\tselectedPath &&\n\t\t\t\t(selectedPath === normalized ||\n\t\t\t\t\tselectedPath.startsWith(`${normalized}/`))\n\t\t\t) {\n\t\t\t\tonSelect(null);\n\t\t\t}\n\t\t}\n\t};\n\n\tconst handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n\t\t// Skip type-ahead when renaming to avoid interfering with rename input\n\t\tif (renamingAbsolutePath) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (event.key.length === 1 && event.key.match(/\\S/)) {\n\t\t\tconst newSearchBuffer = searchBuffer + event.key.toLowerCase();\n\t\t\tsetSearchBuffer(newSearchBuffer);\n\t\t\tif (searchBufferTimeoutRef.current) {\n\t\t\t\tclearTimeout(searchBufferTimeoutRef.current);\n\t\t\t}\n\t\t\tsearchBufferTimeoutRef.current = setTimeout(() => {\n\t\t\t\tsetSearchBuffer('');\n\t\t\t}, 1000);\n\t\t\tif (!containerRef.current) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst buttons = Array.from(\n\t\t\t\tcontainerRef.current.querySelectorAll('.file-node-button')\n\t\t\t);\n\t\t\tconst activeElement = document.activeElement;\n\t\t\tlet startIndex = 0;\n\t\t\tif (\n\t\t\t\tactiveElement &&\n\t\t\t\tbuttons.includes(activeElement as HTMLButtonElement)\n\t\t\t) {\n\t\t\t\tstartIndex = buttons.indexOf(\n\t\t\t\t\tactiveElement as HTMLButtonElement\n\t\t\t\t);\n\t\t\t}\n\t\t\tfor (let i = 0; i < buttons.length; i++) {\n\t\t\t\tconst index = (startIndex + i) % buttons.length;\n\t\t\t\tconst button = buttons[index] as HTMLElement;\n\t\t\t\tif (\n\t\t\t\t\tbutton.textContent\n\t\t\t\t\t\t?.toLowerCase()\n\t\t\t\t\t\t.trim()\n\t\t\t\t\t\t.startsWith(newSearchBuffer)\n\t\t\t\t) {\n\t\t\t\t\tbutton.focus();\n\t\t\t\t\tconst path = button.getAttribute('data-path');\n\t\t\t\t\tif (path) {\n\t\t\t\t\t\tsetFocusedPath(path);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tsetSearchBuffer('');\n\t\t\tif (searchBufferTimeoutRef.current) {\n\t\t\t\tclearTimeout(searchBufferTimeoutRef.current);\n\t\t\t}\n\t\t}\n\t};\n\n\t// No explicit error UI; upstream can handle errors in filesystem\n\n\t// Filesystem-mode rename handlers\n\tconst handleRename = async (path: string, newName: string) => {\n\t\tconst pending = pendingCreateRef.current;\n\t\tconst isPending = pending?.tempPath === path;\n\t\tconst parent = dirname(path);\n\t\tconst sanitized = (newName || '').trim();\n\t\tif (!isValidNameSegment(sanitized)) {\n\t\t\tif (isPending) {\n\t\t\t\ttry {\n\t\t\t\t\tif (pending.type === 'folder') {\n\t\t\t\t\t\tawait filesystem.rmdir(path, {\n\t\t\t\t\t\t\trecursive: true,\n\t\t\t\t\t\t} as any);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tawait filesystem.unlink(path);\n\t\t\t\t\t}\n\t\t\t\t} catch {\n\t\t\t\t\t/* noop */\n\t\t\t\t}\n\t\t\t\tpendingCreateRef.current = null;\n\t\t\t}\n\t\t\tsetRenamingAbsolutePath(isPending ? null : path);\n\t\t\treturn;\n\t\t}\n\t\tlet candidate = joinPaths(parent, sanitized);\n\t\tlet candidateNormalized = candidate;\n\t\tif (candidateNormalized === path) {\n\t\t\tsetRenamingAbsolutePath(null);\n\t\t\tconst wasFileCreate = isPending && pending?.type === 'file';\n\t\t\tif (isPending) pendingCreateRef.current = null;\n\t\t\tsetTimeout(() => {\n\t\t\t\tsetFocusedPath(candidateNormalized);\n\t\t\t\tfocusDomNode(candidateNormalized);\n\t\t\t\t// We've just saved a new file, immediately open it in the code editor.\n\t\t\t\tif (wasFileCreate && onDoubleClickFile) {\n\t\t\t\t\tonDoubleClickFile(candidateNormalized);\n\t\t\t\t}\n\t\t\t}, 0);\n\t\t\treturn;\n\t\t}\n\t\tconst exists = await filesystem.fileExists(candidateNormalized);\n\t\tconst existsDir = await filesystem.isDir(candidateNormalized);\n\t\tif ((exists || existsDir) && candidateNormalized !== path) {\n\t\t\tif (isPending) {\n\t\t\t\ttry {\n\t\t\t\t\tconst unique = await findAvailableName(\n\t\t\t\t\t\tparent === '/' ? '/' : parent,\n\t\t\t\t\t\tsanitized\n\t\t\t\t\t);\n\t\t\t\t\tcandidate = joinPaths(parent, unique);\n\t\t\t\t\tcandidateNormalized = candidate;\n\t\t\t\t} catch {\n\t\t\t\t\t/* noop */\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tsetRenamingAbsolutePath(path);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tlet candidateIsDir = pending?.type === 'folder';\n\t\ttry {\n\t\t\tawait filesystem.mv(path, candidate);\n\t\t\tif (!pending) {\n\t\t\t\tconst isDir = await filesystem.isDir(candidate);\n\t\t\t\tcandidateIsDir = isDir;\n\t\t\t}\n\t\t\tif (candidateIsDir) {\n\t\t\t\tremapPathState(path, candidateNormalized);\n\t\t\t}\n\t\t\tif (selectedPath === path) {\n\t\t\t\tonSelect(candidateNormalized);\n\t\t\t}\n\t\t\tawait refreshChildren(parent);\n\t\t\tsetFocusedPath(candidateNormalized);\n\t\t\tfocusDomNode(candidateNormalized);\n\t\t\t// If this was a newly created file, open it in the editor\n\t\t\tif (isPending && !candidateIsDir && onDoubleClickFile) {\n\t\t\t\tonDoubleClickFile(candidateNormalized);\n\t\t\t}\n\t\t} catch {\n\t\t\tif (isPending) {\n\t\t\t\ttry {\n\t\t\t\t\tif (pending?.type === 'folder') {\n\t\t\t\t\t\tawait filesystem.rmdir(path, {\n\t\t\t\t\t\t\trecursive: true,\n\t\t\t\t\t\t} as any);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tawait filesystem.unlink(path);\n\t\t\t\t\t}\n\t\t\t\t} catch {\n\t\t\t\t\t/* noop */\n\t\t\t\t}\n\t\t\t}\n\t\t} finally {\n\t\t\tpendingCreateRef.current = null;\n\t\t\tsetRenamingAbsolutePath(null);\n\t\t}\n\t};\n\n\tconst handleRenameCancelInternal = async (path: string) => {\n\t\tconst pending = pendingCreateRef.current;\n\t\tif (!filesystem || pending?.tempPath !== path) {\n\t\t\tsetRenamingAbsolutePath((prev) => (prev === path ? null : prev));\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tif (pending.type === 'folder') {\n\t\t\t\tawait filesystem.rmdir(path, { recursive: true } as any);\n\t\t\t} else {\n\t\t\t\tawait filesystem.unlink(path);\n\t\t\t}\n\t\t} catch {\n\t\t\t/* noop */\n\t\t}\n\t\tpendingCreateRef.current = null;\n\t\tsetRenamingAbsolutePath(null);\n\t\tconst parentDir = dirname(path);\n\t\tawait refreshChildren(parentDir);\n\t\tsetFocusedPath(parentDir);\n\t\tfocusDomNode(parentDir);\n\t};\n\n\treturn (\n\t\t<div onKeyDown={handleKeyDown} ref={containerRef}>\n\t\t\t<TreeGrid className={css['filePickerTree']}>\n\t\t\t\t{treeFiles.map((file, index) => (\n\t\t\t\t\t<NodeRow\n\t\t\t\t\t\tkey={file.name}\n\t\t\t\t\t\tnode={file}\n\t\t\t\t\t\tlevel={0}\n\t\t\t\t\t\tposition={index + 1}\n\t\t\t\t\t\tsetSize={treeFiles.length}\n\t\t\t\t\t\texpandedNodePaths={expanded}\n\t\t\t\t\t\tonToggle={toggleNode}\n\t\t\t\t\t\tselectedNode={selectedPath}\n\t\t\t\t\t\tfocusPath={(path) => setFocusedPath(path)}\n\t\t\t\t\t\tfocusedNode={focusedPath}\n\t\t\t\t\t\tselectPath={selectPath}\n\t\t\t\t\t\tgeneratePath={generatePath}\n\t\t\t\t\t\tgetChildren={getResolvedChildren}\n\t\t\t\t\t\tonContextMenu={handleInternalContextMenu}\n\t\t\t\t\t\trenamingPath={effectiveRenamingPath}\n\t\t\t\t\t\tonRename={handleRename}\n\t\t\t\t\t\tonRenameCancel={handleRenameCancelInternal}\n\t\t\t\t\t\tdropIndicator={dropIndicator}\n\t\t\t\t\t\tonDragStart={handleNodeDragStart}\n\t\t\t\t\t\tonDragEnd={handleNodeDragEnd}\n\t\t\t\t\t\tonDragEnter={handleNodeDragEnter}\n\t\t\t\t\t\tonDragOver={handleNodeDragOver}\n\t\t\t\t\t\tonDragLeave={handleNodeDragLeave}\n\t\t\t\t\t\tonDrop={handleNodeDrop}\n\t\t\t\t\t\trootPath={normalizedRoot}\n\t\t\t\t\t\tonDoubleClickFile={onDoubleClickFile}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t</TreeGrid>\n\t\t\t{contextMenu && (\n\t\t\t\t<Popover\n\t\t\t\t\tplacement=\"bottom-start\"\n\t\t\t\t\tonClose={() => setContextMenu(null)}\n\t\t\t\t\tanchor={{\n\t\t\t\t\t\tgetBoundingClientRect: () => ({\n\t\t\t\t\t\t\tx: contextMenu.x,\n\t\t\t\t\t\t\ty: contextMenu.y,\n\t\t\t\t\t\t\twidth: 0,\n\t\t\t\t\t\t\theight: 0,\n\t\t\t\t\t\t\ttop: contextMenu.y,\n\t\t\t\t\t\t\tleft: contextMenu.x,\n\t\t\t\t\t\t\tright: contextMenu.x,\n\t\t\t\t\t\t\tbottom: contextMenu.y,\n\t\t\t\t\t\t\ttoJSON: () => ({}),\n\t\t\t\t\t\t}),\n\t\t\t\t\t\townerDocument: document,\n\t\t\t\t\t}}\n\t\t\t\t\tnoArrow={true}\n\t\t\t\t\tresize={false}\n\t\t\t\t\tfocusOnMount=\"firstElement\"\n\t\t\t\t>\n\t\t\t\t\t<NavigableMenu role=\"menu\">\n\t\t\t\t\t\t{contextMenu.type === 'folder' && (\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\trole=\"menuitem\"\n\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\tsetContextMenu(null);\n\t\t\t\t\t\t\t\t\tawait createNode(\n\t\t\t\t\t\t\t\t\t\tcontextMenu.absPath,\n\t\t\t\t\t\t\t\t\t\t'file',\n\t\t\t\t\t\t\t\t\t\t'untitled.php'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tCreate file\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{contextMenu.type === 'folder' && (\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\trole=\"menuitem\"\n\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\tsetContextMenu(null);\n\t\t\t\t\t\t\t\t\tawait createNode(\n\t\t\t\t\t\t\t\t\t\tcontextMenu.absPath,\n\t\t\t\t\t\t\t\t\t\t'folder',\n\t\t\t\t\t\t\t\t\t\t'New Folder'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tCreate directory\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\trole=\"menuitem\"\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\tsetContextMenu(null);\n\t\t\t\t\t\t\t\tsetRenamingAbsolutePath(contextMenu.absPath);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tRename\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\trole=\"menuitem\"\n\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\thandleDeletePath(\n\t\t\t\t\t\t\t\t\tcontextMenu.absPath,\n\t\t\t\t\t\t\t\t\tcontextMenu.type\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tDelete\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t</NavigableMenu>\n\t\t\t\t</Popover>\n\t\t\t)}\n\t\t</div>\n\t);\n});\n\nconst NodeRow: React.FC<{\n\tnode: FileNode;\n\tlevel: number;\n\tposition: number;\n\tsetSize: number;\n\texpandedNodePaths: ExpandedNodePaths;\n\tonToggle: (\n\t\tpath: string,\n\t\tnode: FileNode,\n\t\tisOpen: boolean\n\t) => void | Promise<void>;\n\tselectedNode: string | null;\n\tfocusPath: (path: string) => void;\n\tfocusedNode: string | null;\n\tselectPath: (path: string, notify?: boolean) => void;\n\tgeneratePath: (node: FileNode, parentPath?: string) => string;\n\tgetChildren: (node: FileNode, path: string) => FileNode[] | undefined;\n\tonContextMenu?: (\n\t\tevent: React.MouseEvent,\n\t\tnode: FileNode,\n\t\tpath: string\n\t) => void;\n\trenamingPath: string | null;\n\tonRename?: (path: string, newName: string) => void;\n\tonRenameCancel?: (path: string) => void;\n\tparentPath?: string;\n\tdropIndicator: DropIndicator | null;\n\tonDragStart?: (\n\t\tevent: React.DragEvent,\n\t\tnode: FileNode,\n\t\tpath: string\n\t) => void;\n\tonDragEnd?: (event: React.DragEvent, node: FileNode, path: string) => void;\n\tonDragEnter?: (\n\t\tevent: React.DragEvent,\n\t\tnode: FileNode,\n\t\tpath: string\n\t) => void;\n\tonDragOver?: (event: React.DragEvent, node: FileNode, path: string) => void;\n\tonDragLeave?: (\n\t\tevent: React.DragEvent,\n\t\tnode: FileNode,\n\t\tpath: string\n\t) => void;\n\tonDrop?: (event: React.DragEvent, node: FileNode, path: string) => void;\n\trootPath: string;\n\tonDoubleClickFile?: (path: string) => void;\n}> = ({\n\tnode,\n\tlevel,\n\tposition,\n\tsetSize,\n\texpandedNodePaths,\n\tonToggle,\n\tselectedNode,\n\tfocusPath,\n\tfocusedNode,\n\tselectPath,\n\tgeneratePath,\n\tgetChildren,\n\tonContextMenu,\n\trenamingPath,\n\tonRename,\n\tonRenameCancel,\n\tparentPath = '',\n\tdropIndicator,\n\tonDragStart,\n\tonDragEnd,\n\tonDragEnter,\n\tonDragOver,\n\tonDragLeave,\n\tonDrop,\n\trootPath,\n\tonDoubleClickFile,\n}) => {\n\tconst path = generatePath(node, parentPath);\n\tconst isExpanded = expandedNodePaths[path];\n\tconst isRenaming = renamingPath === path;\n\tconst renameInputRef = useRef<HTMLInputElement>(null);\n\tconst [renameValue, setRenameValue] = useState(node.name);\n\tconst renameHandledRef = useRef(false);\n\tconst isDropTarget = dropIndicator?.path === path;\n\tconst isDropTargetValid = isDropTarget && dropIndicator?.state === 'valid';\n\tconst isDropTargetInvalid =\n\t\tisDropTarget && dropIndicator?.state === 'invalid';\n\tconst isDraggable = !isRenaming && path !== rootPath;\n\tconst clickTimeoutRef = useRef<number | null>(null);\n\n\tconst dragHandlers = {\n\t\tonDragEnter: (event: React.DragEvent) =>\n\t\t\tonDragEnter?.(event, node, path),\n\t\tonDragOver: (event: React.DragEvent) => onDragOver?.(event, node, path),\n\t\tonDragLeave: (event: React.DragEvent) =>\n\t\t\tonDragLeave?.(event, node, path),\n\t\tonDrop: (event: React.DragEvent) => onDrop?.(event, node, path),\n\t};\n\n\tconst resolvedChildren = getChildren(node, path) ?? [];\n\n\tuseEffect(() => {\n\t\tif (isRenaming) {\n\t\t\tsetRenameValue(node.name);\n\t\t\trenameHandledRef.current = false;\n\t\t\tif (typeof window !== 'undefined' && requestAnimationFrame) {\n\t\t\t\trequestAnimationFrame(() => {\n\t\t\t\t\trenameInputRef.current?.select();\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\trenameInputRef.current?.select();\n\t\t\t}\n\t\t} else {\n\t\t\trenameHandledRef.current = false;\n\t\t}\n\t}, [isRenaming, node.name]);\n\n\tconst toggleOpen = () => {\n\t\tif (node.type === 'folder') {\n\t\t\tonToggle(path, node, !isExpanded);\n\t\t}\n\t};\n\n\tconst handleKeyDown = (event: React.KeyboardEvent) => {\n\t\tif (event.key === 'ArrowLeft') {\n\t\t\tif (isExpanded) {\n\t\t\t\ttoggleOpen();\n\t\t\t} else {\n\t\t\t\t(\n\t\t\t\t\tdocument.querySelector(\n\t\t\t\t\t\t`[data-path=\"${parentPath}\"]`\n\t\t\t\t\t) as HTMLButtonElement\n\t\t\t\t)?.focus();\n\t\t\t}\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t} else if (event.key === 'ArrowRight') {\n\t\t\tif (isExpanded) {\n\t\t\t\tif (resolvedChildren?.length) {\n\t\t\t\t\tconst firstChildPath = generatePath(\n\t\t\t\t\t\tresolvedChildren[0],\n\t\t\t\t\t\tpath\n\t\t\t\t\t);\n\t\t\t\t\t(\n\t\t\t\t\t\tdocument.querySelector(\n\t\t\t\t\t\t\t`[data-path=\"${firstChildPath}\"]`\n\t\t\t\t\t\t) as HTMLButtonElement\n\t\t\t\t\t)?.focus();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttoggleOpen();\n\t\t\t}\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t} else if (\n\t\t\tevent.key === ' ' ||\n\t\t\tevent.key === 'Space' ||\n\t\t\tevent.key === 'Spacebar'\n\t\t) {\n\t\t\tif (node.type === 'folder') {\n\t\t\t\tonToggle(path, node, !isExpanded);\n\t\t\t}\n\t\t\tevent.preventDefault();\n\t\t} else if (event.key === 'Enter') {\n\t\t\tif (node.type === 'folder') {\n\t\t\t\t// For folders, toggle open/closed\n\t\t\t\tonToggle(path, node, !isExpanded);\n\t\t\t} else {\n\t\t\t\t// For files, behave like double-click: open with focus\n\t\t\t\tselectPath(path, false); // Update visual selection\n\t\t\t\tfocusPath(path);\n\t\t\t\tif (onDoubleClickFile) {\n\t\t\t\t\tonDoubleClickFile(path); // Open file and move focus to editor\n\t\t\t\t} else {\n\t\t\t\t\tselectPath(path, true); // Fallback behavior\n\t\t\t\t}\n\t\t\t}\n\t\t\tevent.preventDefault();\n\t\t}\n\t};\n\n\tconst handleContextMenu = (event: React.MouseEvent) => {\n\t\tonContextMenu?.(event, node, path);\n\t};\n\n\tconst handleRenameSubmit = (event: React.FormEvent) => {\n\t\tevent.preventDefault();\n\t\trenameHandledRef.current = true;\n\t\tonRename?.(path, renameValue.trim());\n\t};\n\n\tconst handleRenameKeyDown = (\n\t\tevent: React.KeyboardEvent<HTMLInputElement>\n\t) => {\n\t\tif (event.key === 'Escape') {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\trenameHandledRef.current = true;\n\t\t\tonRenameCancel?.(path);\n\t\t\treturn;\n\t\t}\n\t\tif (\n\t\t\tevent.key === 'ArrowLeft' ||\n\t\t\tevent.key === 'ArrowRight' ||\n\t\t\tevent.key === 'ArrowUp' ||\n\t\t\tevent.key === 'ArrowDown'\n\t\t) {\n\t\t\tevent.stopPropagation();\n\t\t}\n\t};\n\n\tconst handleRenameBlur = () => {\n\t\tif (!renameHandledRef.current) {\n\t\t\tonRenameCancel?.(path);\n\t\t}\n\t\trenameHandledRef.current = false;\n\t};\n\n\tconst handleClick = () => {\n\t\t// Folders – collapse or expand immediately\n\t\tif (node.type === 'folder') {\n\t\t\ttoggleOpen();\n\t\t\tselectPath(path);\n\t\t\tfocusPath(path);\n\t\t\treturn;\n\t\t}\n\n\t\tconst wasWaitingForDoubleClick = clickTimeoutRef.current !== null;\n\t\tif (wasWaitingForDoubleClick && clickTimeoutRef.current) {\n\t\t\tclearTimeout(clickTimeoutRef.current);\n\t\t}\n\t\tclickTimeoutRef.current = null;\n\n\t\tif (wasWaitingForDoubleClick) {\n\t\t\tif (onDoubleClickFile) {\n\t\t\t\tonDoubleClickFile(path);\n\t\t\t} else {\n\t\t\t\tselectPath(path, true);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// Single click: update selection, keep focus in the tree, and open the file.\n\t\tselectPath(path, false);\n\t\tfocusPath(path);\n\t\tselectPath(path, true);\n\n\t\tclickTimeoutRef.current = window.setTimeout(() => {\n\t\t\tclickTimeoutRef.current = null;\n\t\t}, 300);\n\t};\n\n\t// Cleanup timeout on unmount\n\tuseEffect(() => {\n\t\treturn () => {\n\t\t\tif (\n\t\t\t\tclickTimeoutRef.current !== null &&\n\t\t\t\ttypeof window !== 'undefined'\n\t\t\t) {\n\t\t\t\tclearTimeout(clickTimeoutRef.current);\n\t\t\t}\n\t\t};\n\t}, []);\n\n\treturn (\n\t\t<>\n\t\t\t<TreeGridRow\n\t\t\t\tlevel={level}\n\t\t\t\tpositionInSet={position}\n\t\t\t\tsetSize={setSize}\n\t\t\t>\n\t\t\t\t<TreeGridCell>\n\t\t\t\t\t{() => (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{isRenaming ? (\n\t\t\t\t\t\t\t\t<form\n\t\t\t\t\t\t\t\t\tonSubmit={handleRenameSubmit}\n\t\t\t\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t\t\t\tcss['fileNodeButton'],\n\t\t\t\t\t\t\t\t\t\tcss['renaming'],\n\t\t\t\t\t\t\t\t\t\t'file-node-button',\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t[css['selected']]:\n\t\t\t\t\t\t\t\t\t\t\t\tselectedNode === path,\n\t\t\t\t\t\t\t\t\t\t\t[css['focused']]:\n\t\t\t\t\t\t\t\t\t\t\t\tfocusedNode === path,\n\t\t\t\t\t\t\t\t\t\t\t[css['dropTarget']]:\n\t\t\t\t\t\t\t\t\t\t\t\tisDropTargetValid,\n\t\t\t\t\t\t\t\t\t\t\t[css['dropTargetInvalid']]:\n\t\t\t\t\t\t\t\t\t\t\t\tisDropTargetInvalid,\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\tdata-path={path}\n\t\t\t\t\t\t\t\t\tonContextMenu={handleContextMenu}\n\t\t\t\t\t\t\t\t\t{...dragHandlers}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<FileName\n\t\t\t\t\t\t\t\t\t\tnode={node}\n\t\t\t\t\t\t\t\t\t\tisOpen={\n\t\t\t\t\t\t\t\t\t\t\tnode.type === 'folder' && isExpanded\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tlevel={level}\n\t\t\t\t\t\t\t\t\t\thideName\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\tref={renameInputRef}\n\t\t\t\t\t\t\t\t\t\tclassName={css['renameInput']}\n\t\t\t\t\t\t\t\t\t\tvalue={renameValue}\n\t\t\t\t\t\t\t\t\t\tonChange={(event) =>\n\t\t\t\t\t\t\t\t\t\t\tsetRenameValue(event.target.value)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tonBlur={handleRenameBlur}\n\t\t\t\t\t\t\t\t\t\tonFocus={() => focusPath(path)}\n\t\t\t\t\t\t\t\t\t\tonKeyDown={handleRenameKeyDown}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t{...dragHandlers}\n\t\t\t\t\t\t\t\t\tdraggable={isDraggable}\n\t\t\t\t\t\t\t\t\tonDragStart={(event: any) =>\n\t\t\t\t\t\t\t\t\t\tonDragStart?.(event, node, path)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonDragEnd={(event: any) =>\n\t\t\t\t\t\t\t\t\t\tonDragEnd?.(event, node, path)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonClick={handleClick}\n\t\t\t\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\t\t\t\tonFocus={() => {\n\t\t\t\t\t\t\t\t\t\tfocusPath(path);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tonContextMenu={handleContextMenu}\n\t\t\t\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t\t\t\tcss['fileNodeButton'],\n\t\t\t\t\t\t\t\t\t\t'file-node-button',\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t[css['selected']]:\n\t\t\t\t\t\t\t\t\t\t\t\tselectedNode === path,\n\t\t\t\t\t\t\t\t\t\t\t[css['focused']]:\n\t\t\t\t\t\t\t\t\t\t\t\tfocusedNode === path,\n\t\t\t\t\t\t\t\t\t\t\t[css['dropTarget']]:\n\t\t\t\t\t\t\t\t\t\t\t\tisDropTargetValid,\n\t\t\t\t\t\t\t\t\t\t\t[css['dropTargetInvalid']]:\n\t\t\t\t\t\t\t\t\t\t\t\tisDropTargetInvalid,\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\tdata-path={path}\n\t\t\t\t\t\t\t\t\tdata-expanded={\n\t\t\t\t\t\t\t\t\t\tisExpanded ? 'true' : 'false'\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<FileName\n\t\t\t\t\t\t\t\t\t\tnode={node}\n\t\t\t\t\t\t\t\t\t\tisOpen={\n\t\t\t\t\t\t\t\t\t\t\tnode.type === 'folder' && isExpanded\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tlevel={level}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</>\n\t\t\t\t\t)}\n\t\t\t\t</TreeGridCell>\n\t\t\t</TreeGridRow>\n\t\t\t{isExpanded &&\n\t\t\t\tresolvedChildren &&\n\t\t\t\tresolvedChildren.map((child, index) => (\n\t\t\t\t\t<NodeRow\n\t\t\t\t\t\tkey={child.name}\n\t\t\t\t\t\tnode={child}\n\t\t\t\t\t\tlevel={level + 1}\n\t\t\t\t\t\tposition={index + 1}\n\t\t\t\t\t\tsetSize={resolvedChildren.length}\n\t\t\t\t\t\texpandedNodePaths={expandedNodePaths}\n\t\t\t\t\t\tonToggle={onToggle}\n\t\t\t\t\t\tselectedNode={selectedNode}\n\t\t\t\t\t\tfocusPath={focusPath}\n\t\t\t\t\t\tfocusedNode={focusedNode}\n\t\t\t\t\t\tselectPath={selectPath}\n\t\t\t\t\t\tgeneratePath={generatePath}\n\t\t\t\t\t\tgetChildren={getChildren}\n\t\t\t\t\t\tonContextMenu={onContextMenu}\n\t\t\t\t\t\trenamingPath={renamingPath}\n\t\t\t\t\t\tonRename={onRename}\n\t\t\t\t\t\tonRenameCancel={onRenameCancel}\n\t\t\t\t\t\tparentPath={path}\n\t\t\t\t\t\tdropIndicator={dropIndicator}\n\t\t\t\t\t\tonDragStart={onDragStart}\n\t\t\t\t\t\tonDragEnd={onDragEnd}\n\t\t\t\t\t\tonDragEnter={onDragEnter}\n\t\t\t\t\t\tonDragOver={onDragOver}\n\t\t\t\t\t\tonDragLeave={onDragLeave}\n\t\t\t\t\t\tonDrop={onDrop}\n\t\t\t\t\t\trootPath={rootPath}\n\t\t\t\t\t\tonDoubleClickFile={onDoubleClickFile}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t</>\n\t);\n};\n\nconst FileName: React.FC<{\n\tnode: FileNode;\n\tlevel: number;\n\tisOpen?: boolean;\n\thideName?: boolean;\n}> = ({ node, level, isOpen, hideName = false }) => {\n\tconst indent: string[] = [];\n\tfor (let i = 0; i < level; i++) {\n\t\tindent.push('&nbsp;&nbsp;&nbsp;&nbsp;');\n\t}\n\treturn (\n\t\t<>\n\t\t\t<span\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\tdangerouslySetInnerHTML={{ __html: indent.join('') }}\n\t\t\t></span>\n\t\t\t{node.type === 'folder' ? (\n\t\t\t\t<Icon width={16} icon={isOpen ? chevronDown : chevronRight} />\n\t\t\t) : (\n\t\t\t\t<div style={{ width: 16 }}>&nbsp;</div>\n\t\t\t)}\n\t\t\t<Icon width={16} icon={node.type === 'folder' ? folder : file} />\n\t\t\t{!hideName && <span className={css['fileName']}>{node.name}</span>}\n\t\t</>\n\t);\n};\n\nexport default FilePickerTree;\n","import React from 'react';\nimport css from './style.module.css';\n\nexport function PathPreview({ path }: { path: string }) {\n\tif (!path) {\n\t\treturn (\n\t\t\t<div className={css['pathPreview']}>\n\t\t\t\t<i>Select a path</i>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tconst segments = path.split('/');\n\tlet pathPreviewEnd = (segments.length > 2 ? '/' : '') + segments.pop();\n\tif (pathPreviewEnd.length > 10) {\n\t\tpathPreviewEnd = pathPreviewEnd.substring(pathPreviewEnd.length - 10);\n\t}\n\tconst pathPreviewStart = path.substring(\n\t\t0,\n\t\tpath.length - pathPreviewEnd.length\n\t);\n\treturn (\n\t\t<div\n\t\t\tclassName={css['pathPreview']}\n\t\t\tdata-content-start={pathPreviewStart}\n\t\t\tdata-content-end={pathPreviewEnd}\n\t\t></div>\n\t);\n}\n","import React, { useState } from 'react';\nimport { Button, Modal } from '@wordpress/components';\nimport { PathPreview } from './PathPreview';\nimport css from './style.module.css';\nimport type { AsyncWritableFilesystem } from '../FilePickerTree';\nimport { FilePickerTree } from '../FilePickerTree';\n\nexport function FilePickerControl({\n\tvalue = '',\n\tonChange,\n\tfilesystem,\n}: {\n\tvalue?: string;\n\tonChange: (selectedPath: string) => void;\n\tfilesystem: AsyncWritableFilesystem;\n}) {\n\tconst [isOpen, setOpen] = useState(false);\n\tconst openModal = () => setOpen(true);\n\tconst closeModal = () => setOpen(false);\n\n\tconst [lastSelectedPath, setLastSelectedPath] = useState<string | null>(\n\t\tvalue || null\n\t);\n\tfunction handleSubmit(event?: React.FormEvent<HTMLFormElement>) {\n\t\tevent?.preventDefault();\n\t\tonChange(lastSelectedPath || '');\n\t\tcloseModal();\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<Button\n\t\t\t\tvariant=\"tertiary\"\n\t\t\t\tclassName={css['control']}\n\t\t\t\tonClick={openModal}\n\t\t\t>\n\t\t\t\t<span className={css['browseLabel']}>Browse</span>\n\t\t\t\t<PathPreview path={value || ''} />\n\t\t\t</Button>\n\t\t\t{isOpen && (\n\t\t\t\t<Modal\n\t\t\t\t\ttitle=\"Select a path \"\n\t\t\t\t\tonRequestClose={closeModal}\n\t\t\t\t\tclassName={css['modal']}\n\t\t\t\t>\n\t\t\t\t\t<form onSubmit={handleSubmit}>\n\t\t\t\t\t\t<FilePickerTree\n\t\t\t\t\t\t\tfilesystem={filesystem}\n\t\t\t\t\t\t\tinitialSelectedPath={value}\n\t\t\t\t\t\t\tonSelect={setLastSelectedPath}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<div className={css['modalFooter']}>\n\t\t\t\t\t\t\t<Button type=\"submit\" variant=\"primary\">\n\t\t\t\t\t\t\t\tSelect Path\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\t\t\t\t</Modal>\n\t\t\t)}\n\t\t</>\n\t);\n}\n"],"names":["playgroundLogo","props","React","temporaryStorage","WordPressIcon","folder","file","ClockIcon","layout","getLogoDataURL","logo","SiteManagerIcon","size","sidebarActive","forwardRef","icon","ref","cloneElement","f","require$$0","k","l","m","n","p","q","c","a","g","b","d","e","h","reactJsxRuntime_production_min","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_OFFSCREEN_TYPE","MAYBE_ITERATOR_SYMBOL","FAUX_ITERATOR_SYMBOL","getIteratorFn","maybeIterable","maybeIterator","ReactSharedInternals","error","format","_len2","args","_key2","printWarning","level","ReactDebugCurrentFrame","stack","argsWithFormat","item","enableScopeAPI","enableCacheElement","enableTransitionTracing","enableLegacyHidden","enableDebugTracing","REACT_MODULE_REFERENCE","isValidElementType","type","getWrappedName","outerType","innerType","wrapperName","displayName","functionName","getContextName","getComponentNameFromType","context","provider","outerName","lazyComponent","payload","init","assign","disabledDepth","prevLog","prevInfo","prevWarn","prevError","prevGroup","prevGroupCollapsed","prevGroupEnd","disabledLog","disableLogs","reenableLogs","ReactCurrentDispatcher","prefix","describeBuiltInComponentFrame","name","source","ownerFn","x","match","reentry","componentFrameCache","PossiblyWeakMap","describeNativeComponentFrame","fn","construct","frame","control","previousPrepareStackTrace","previousDispatcher","Fake","sample","sampleLines","controlLines","s","_frame","syntheticFrame","describeFunctionComponentFrame","shouldConstruct","Component","prototype","describeUnknownElementTypeFrameInDEV","hasOwnProperty","loggedTypeFailures","setCurrentlyValidatingElement","element","owner","checkPropTypes","typeSpecs","values","location","componentName","has","typeSpecName","error$1","err","ex","isArrayImpl","isArray","typeName","value","hasToStringTag","willCoercionThrow","testStringCoercion","checkKeyStringCoercion","ReactCurrentOwner","RESERVED_PROPS","specialPropKeyWarningShown","specialPropRefWarningShown","hasValidRef","config","getter","hasValidKey","warnIfStringRefCannotBeAutoConverted","self","defineKeyPropWarningGetter","warnAboutAccessingKey","defineRefPropWarningGetter","warnAboutAccessingRef","ReactElement","key","jsxDEV","maybeKey","propName","defaultProps","ReactCurrentOwner$1","ReactDebugCurrentFrame$1","setCurrentlyValidatingElement$1","propTypesMisspellWarningShown","isValidElement","object","getDeclarationErrorAddendum","getSourceInfoErrorAddendum","ownerHasKeyUseWarning","getCurrentComponentErrorInfo","parentType","info","parentName","validateExplicitKey","currentComponentErrorInfo","childOwner","validateChildKeys","node","i","child","iteratorFn","iterator","step","validatePropTypes","propTypes","_name","validateFragmentProps","fragment","keys","didWarnAboutKeySpread","jsxWithValidation","isStaticChildren","validType","sourceInfo","typeString","children","beforeExample","afterExample","jsxWithValidationStatic","jsxWithValidationDynamic","jsx","jsxs","reactJsxRuntime_development","jsxRuntimeModule","require$$1","Path","createElement","SVG","className","isPressed","appliedProps","clsx","_jsx","chevronDown","chevronRight","buildPathChain","path","normalized","hasLeadingSlash","parts","chain","current","part","isDescendantPath","ancestor","candidate","normalizedAncestor","normalizedCandidate","remapSinglePath","from","to","FilePickerTree","filesystem","root","initialSelectedPath","onSelect","onDoubleClickFile","normalizedRoot","useMemo","isValidNameSegment","expanded","setExpanded","useState","initialExpanded","selectedPath","setSelectedPath","focusedPath","setFocusedPath","lazyChildren","setLazyChildren","loadingPaths","setLoadingPaths","draggedPath","setDraggedPath","dropIndicator","setDropIndicator","dragExpandTimeoutsRef","useRef","rootAutoExpandedRef","containerRef","searchBufferTimeoutRef","loadingPathsRef","lazyChildrenRef","clearAllDragExpandTimeouts","cancelExpandOnDrag","timeoutId","useEffect","focusDomNode","focusTarget","_a","generatePath","parentPath","getResolvedChildren","listDir","fs","basePath","names","results","childPath","isDirectory","aPath","bPath","pendingPath","pendingCreateRef","loadChildren","loadChildrenForPath","existingChildren","prev","resolve","next","scheduleExpandOnDrag","refreshChildren","toggleNode","isOpen","expandToPath","targetPath","segment","currentChildren","segmentPath","nextNode","remapPathState","fromPrefix","remapKey","changed","mapped","resetDragState","selectPath","notify","treeFiles","contextMenu","setContextMenu","renamingAbsolutePath","setRenamingAbsolutePath","effectiveRenamingPath","useImperativeHandle","options","select","domFocus","absSelectedPath","createNode","hasInitializedRef","pendingInitialExpandRef","previousInitialPathRef","target","firstPath","rootNode","rootPath","firstMenuItem","searchBuffer","setSearchBuffer","getDropDestinationDir","parent","dirname","evaluateDropTarget","sourcePath","destinationDir","handleNodeDragStart","event","handleNodeDragEnd","handleNodeDragEnter","evaluation","handleNodeDragOver","handleNodeDragLeave","related","handleNodeDrop","moveNode","importExternalItems","handleInternalContextMenu","findAvailableName","baseDir","baseName","counter","splitExt","dot","stem","ext","initialName","base","normalizedBase","tempPath","joinPaths","pathExists","ensureDirectory","fileName","basename","destinationPath","sourceParent","mappedSelected","getEntryFromItem","maybeItem","fileFromEntry","entry","reject","importFileBlob","safeName","targetName","buffer","importFileEntry","importDirectoryEntry","folderName","folderPath","reader","readEntries","entries","batch","files","_b","handleDeletePath","parentDir","handleKeyDown","newSearchBuffer","buttons","activeElement","startIndex","index","button","handleRename","newName","pending","isPending","sanitized","candidateNormalized","wasFileCreate","exists","existsDir","unique","candidateIsDir","handleRenameCancelInternal","TreeGrid","css","NodeRow","Popover","NavigableMenu","MenuItem","position","setSize","expandedNodePaths","onToggle","selectedNode","focusPath","focusedNode","getChildren","onContextMenu","renamingPath","onRename","onRenameCancel","onDragStart","onDragEnd","onDragEnter","onDragOver","onDragLeave","onDrop","isExpanded","isRenaming","renameInputRef","renameValue","setRenameValue","renameHandledRef","isDropTarget","isDropTargetValid","isDropTargetInvalid","isDraggable","clickTimeoutRef","dragHandlers","resolvedChildren","toggleOpen","firstChildPath","handleContextMenu","handleRenameSubmit","handleRenameKeyDown","handleRenameBlur","handleClick","wasWaitingForDoubleClick","TreeGridRow","TreeGridCell","classNames","FileName","Button","hideName","indent","Icon","PathPreview","segments","pathPreviewEnd","pathPreviewStart","FilePickerControl","onChange","setOpen","openModal","closeModal","lastSelectedPath","setLastSelectedPath","handleSubmit","Modal"],"mappings":"sPAEaA,GAAkBC,GAE7BC,EAAA,cAAC,MAAA,CACA,MAAM,KACN,OAAO,KACP,QAAQ,YACR,KAAK,OACL,MAAM,6BACL,GAAGD,CAAA,EAEJC,EAAA,cAAC,OAAA,CACA,MAAM,UACN,OAAO,UACP,GAAG,UACH,UAAU,+DACV,OAAO,QACP,YAAY,UAAA,CACb,EACAA,EAAA,cAAC,OAAA,CACA,MAAM,UACN,OAAO,UACP,GAAG,UACH,UAAU,8DACV,OAAO,QACP,YAAY,SAAA,CACb,EACAA,EAAA,cAAC,OAAA,CACA,MAAM,SACN,OAAO,SACP,GAAG,UACH,UAAU,+DACV,OAAO,QACP,YAAY,SAAA,CAAA,CAEd,EAIWC,GAAoBF,GAE/BC,EAAA,cAAC,MAAA,CACA,MAAM,KACN,OAAO,KACP,QAAQ,YACR,KAAK,OACL,MAAM,6BACL,GAAGD,CAAA,EAEJC,EAAA,cAAC,OAAA,CACA,SAAS,UACT,SAAS,UACT,EAAE,uRACF,KAAK,SAAA,CAAA,CAEP,EAIWE,GAAiBH,GAE5BC,EAAA,cAAC,MAAA,CACA,MAAM,KACN,OAAO,KACP,QAAQ,YACR,KAAK,OACL,MAAM,6BACL,GAAGD,CAAA,EAEJC,EAAA,cAAC,OAAA,CACA,EAAE,4/BACF,KAAK,SAAA,CAAA,CAEP,EAIWG,GACZH,EAAA,cAAC,MAAA,CACA,MAAM,6BACN,MAAM,KACN,OAAO,KACP,QAAQ,YACR,KAAK,MAAA,EAELA,EAAA,cAAC,OAAA,CACA,SAAS,UACT,SAAS,UACT,EAAE,skBAAA,CAAA,CAEJ,EAGYI,GACZJ,EAAA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