react-composable-treeview 1.1.0 → 1.1.1

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/dist/index.cjs CHANGED
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Ne;function dr(){if(Ne)return B;Ne=1;var r=_,a=Symbol.for("react.element"),n=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,i=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function w(f,l,S){var h,E={},C=null,P=null;S!==void 0&&(C=""+S),l.key!==void 0&&(C=""+l.key),l.ref!==void 0&&(P=l.ref);for(h in l)u.call(l,h)&&!c.hasOwnProperty(h)&&(E[h]=l[h]);if(f&&f.defaultProps)for(h in l=f.defaultProps,l)E[h]===void 0&&(E[h]=l[h]);return{$$typeof:a,type:f,key:C,ref:P,props:E,_owner:i.current}}return B.Fragment=n,B.jsx=w,B.jsxs=w,B}var K={};/**
9
+ */var Ne;function dr(){if(Ne)return B;Ne=1;var r=_,o=Symbol.for("react.element"),n=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,i=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function w(f,l,S){var h,R={},C=null,P=null;S!==void 0&&(C=""+S),l.key!==void 0&&(C=""+l.key),l.ref!==void 0&&(P=l.ref);for(h in l)a.call(l,h)&&!c.hasOwnProperty(h)&&(R[h]=l[h]);if(f&&f.defaultProps)for(h in l=f.defaultProps,l)R[h]===void 0&&(R[h]=l[h]);return{$$typeof:o,type:f,key:C,ref:P,props:R,_owner:i.current}}return B.Fragment=n,B.jsx=w,B.jsxs=w,B}var K={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,13 +14,13 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Ve;function vr(){return Ve||(Ve=1,process.env.NODE_ENV!=="production"&&function(){var r=_,a=Symbol.for("react.element"),n=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),w=Symbol.for("react.provider"),f=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),P=Symbol.for("react.offscreen"),D=Symbol.iterator,$="@@iterator";function m(e){if(e===null||typeof e!="object")return null;var t=D&&e[D]||e[$];return typeof t=="function"?t:null}var O=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function R(e){{for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];x("error",e,o)}}function x(e,t,o){{var s=O.ReactDebugCurrentFrame,p=s.getStackAddendum();p!==""&&(t+="%s",o=o.concat([p]));var g=o.map(function(v){return String(v)});g.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,g)}}var A=!1,F=!1,k=!1,V=!1,H=!1,fe;fe=Symbol.for("react.module.reference");function Ye(e){return!!(typeof e=="string"||typeof e=="function"||e===u||e===c||H||e===i||e===S||e===h||V||e===P||A||F||k||typeof e=="object"&&e!==null&&(e.$$typeof===C||e.$$typeof===E||e.$$typeof===w||e.$$typeof===f||e.$$typeof===l||e.$$typeof===fe||e.getModuleId!==void 0))}function Le(e,t,o){var s=e.displayName;if(s)return s;var p=t.displayName||t.name||"";return p!==""?o+"("+p+")":o}function le(e){return e.displayName||"Context"}function Y(e){if(e==null)return null;if(typeof e.tag=="number"&&R("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case u:return"Fragment";case n:return"Portal";case c:return"Profiler";case i:return"StrictMode";case S:return"Suspense";case h:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case f:var t=e;return le(t)+".Consumer";case w:var o=e;return le(o._context)+".Provider";case l:return Le(e,e.render,"ForwardRef");case E:var s=e.displayName||null;return s!==null?s:Y(e.type)||"Memo";case C:{var p=e,g=p._payload,v=p._init;try{return Y(v(g))}catch{return null}}}return null}var L=Object.assign,q=0,de,ve,pe,_e,ge,he,Re;function be(){}be.__reactDisabledLog=!0;function We(){{if(q===0){de=console.log,ve=console.info,pe=console.warn,_e=console.error,ge=console.group,he=console.groupCollapsed,Re=console.groupEnd;var e={configurable:!0,enumerable:!0,value:be,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}q++}}function Ue(){{if(q--,q===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:L({},e,{value:de}),info:L({},e,{value:ve}),warn:L({},e,{value:pe}),error:L({},e,{value:_e}),group:L({},e,{value:ge}),groupCollapsed:L({},e,{value:he}),groupEnd:L({},e,{value:Re})})}q<0&&R("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var re=O.ReactCurrentDispatcher,te;function X(e,t,o){{if(te===void 0)try{throw Error()}catch(p){var s=p.stack.trim().match(/\n( *(at )?)/);te=s&&s[1]||""}return`
18
- `+te+e}}var ne=!1,Z;{var Ge=typeof WeakMap=="function"?WeakMap:Map;Z=new Ge}function Ee(e,t){if(!e||ne)return"";{var o=Z.get(e);if(o!==void 0)return o}var s;ne=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var g;g=re.current,re.current=null,We();try{if(t){var v=function(){throw Error()};if(Object.defineProperty(v.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(v,[])}catch(N){s=N}Reflect.construct(e,[],v)}else{try{v.call()}catch(N){s=N}e.call(v.prototype)}}else{try{throw Error()}catch(N){s=N}e()}}catch(N){if(N&&s&&typeof N.stack=="string"){for(var d=N.stack.split(`
17
+ */var Ve;function vr(){return Ve||(Ve=1,process.env.NODE_ENV!=="production"&&function(){var r=_,o=Symbol.for("react.element"),n=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),w=Symbol.for("react.provider"),f=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),P=Symbol.for("react.offscreen"),D=Symbol.iterator,$="@@iterator";function m(e){if(e===null||typeof e!="object")return null;var t=D&&e[D]||e[$];return typeof t=="function"?t:null}var O=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(e){{for(var t=arguments.length,u=new Array(t>1?t-1:0),s=1;s<t;s++)u[s-1]=arguments[s];x("error",e,u)}}function x(e,t,u){{var s=O.ReactDebugCurrentFrame,p=s.getStackAddendum();p!==""&&(t+="%s",u=u.concat([p]));var g=u.map(function(v){return String(v)});g.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,g)}}var A=!1,F=!1,k=!1,V=!1,H=!1,fe;fe=Symbol.for("react.module.reference");function Ye(e){return!!(typeof e=="string"||typeof e=="function"||e===a||e===c||H||e===i||e===S||e===h||V||e===P||A||F||k||typeof e=="object"&&e!==null&&(e.$$typeof===C||e.$$typeof===R||e.$$typeof===w||e.$$typeof===f||e.$$typeof===l||e.$$typeof===fe||e.getModuleId!==void 0))}function Le(e,t,u){var s=e.displayName;if(s)return s;var p=t.displayName||t.name||"";return p!==""?u+"("+p+")":u}function le(e){return e.displayName||"Context"}function Y(e){if(e==null)return null;if(typeof e.tag=="number"&&b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case a:return"Fragment";case n:return"Portal";case c:return"Profiler";case i:return"StrictMode";case S:return"Suspense";case h:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case f:var t=e;return le(t)+".Consumer";case w:var u=e;return le(u._context)+".Provider";case l:return Le(e,e.render,"ForwardRef");case R:var s=e.displayName||null;return s!==null?s:Y(e.type)||"Memo";case C:{var p=e,g=p._payload,v=p._init;try{return Y(v(g))}catch{return null}}}return null}var L=Object.assign,q=0,de,ve,pe,_e,ge,he,Re;function be(){}be.__reactDisabledLog=!0;function We(){{if(q===0){de=console.log,ve=console.info,pe=console.warn,_e=console.error,ge=console.group,he=console.groupCollapsed,Re=console.groupEnd;var e={configurable:!0,enumerable:!0,value:be,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}q++}}function Ue(){{if(q--,q===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:L({},e,{value:de}),info:L({},e,{value:ve}),warn:L({},e,{value:pe}),error:L({},e,{value:_e}),group:L({},e,{value:ge}),groupCollapsed:L({},e,{value:he}),groupEnd:L({},e,{value:Re})})}q<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var re=O.ReactCurrentDispatcher,te;function X(e,t,u){{if(te===void 0)try{throw Error()}catch(p){var s=p.stack.trim().match(/\n( *(at )?)/);te=s&&s[1]||""}return`
18
+ `+te+e}}var ne=!1,Z;{var Ge=typeof WeakMap=="function"?WeakMap:Map;Z=new Ge}function Ee(e,t){if(!e||ne)return"";{var u=Z.get(e);if(u!==void 0)return u}var s;ne=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var g;g=re.current,re.current=null,We();try{if(t){var v=function(){throw Error()};if(Object.defineProperty(v.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(v,[])}catch(N){s=N}Reflect.construct(e,[],v)}else{try{v.call()}catch(N){s=N}e.call(v.prototype)}}else{try{throw Error()}catch(N){s=N}e()}}catch(N){if(N&&s&&typeof N.stack=="string"){for(var d=N.stack.split(`
19
19
  `),T=s.stack.split(`
20
- `),b=d.length-1,y=T.length-1;b>=1&&y>=0&&d[b]!==T[y];)y--;for(;b>=1&&y>=0;b--,y--)if(d[b]!==T[y]){if(b!==1||y!==1)do if(b--,y--,y<0||d[b]!==T[y]){var j=`
21
- `+d[b].replace(" at new "," at ");return e.displayName&&j.includes("<anonymous>")&&(j=j.replace("<anonymous>",e.displayName)),typeof e=="function"&&Z.set(e,j),j}while(b>=1&&y>=0);break}}}finally{ne=!1,re.current=g,Ue(),Error.prepareStackTrace=p}var U=e?e.displayName||e.name:"",Ae=U?X(U):"";return typeof e=="function"&&Z.set(e,Ae),Ae}function qe(e,t,o){return Ee(e,!1)}function Be(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function Q(e,t,o){if(e==null)return"";if(typeof e=="function")return Ee(e,Be(e));if(typeof e=="string")return X(e);switch(e){case S:return X("Suspense");case h:return X("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case l:return qe(e.render);case E:return Q(e.type,t,o);case C:{var s=e,p=s._payload,g=s._init;try{return Q(g(p),t,o)}catch{}}}return""}var M=Object.prototype.hasOwnProperty,me={},ye=O.ReactDebugCurrentFrame;function ee(e){if(e){var t=e._owner,o=Q(e.type,e._source,t?t.type:null);ye.setExtraStackFrame(o)}else ye.setExtraStackFrame(null)}function Ke(e,t,o,s,p){{var g=Function.call.bind(M);for(var v in e)if(g(e,v)){var d=void 0;try{if(typeof e[v]!="function"){var T=Error((s||"React class")+": "+o+" type `"+v+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[v]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw T.name="Invariant Violation",T}d=e[v](t,v,s,o,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(b){d=b}d&&!(d instanceof Error)&&(ee(p),R("%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).",s||"React class",o,v,typeof d),ee(null)),d instanceof Error&&!(d.message in me)&&(me[d.message]=!0,ee(p),R("Failed %s type: %s",o,d.message),ee(null))}}}var Je=Array.isArray;function oe(e){return Je(e)}function ze(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,o=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o}}function He(e){try{return we(e),!1}catch{return!0}}function we(e){return""+e}function xe(e){if(He(e))return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ze(e)),we(e)}var Ce=O.ReactCurrentOwner,Xe={key:!0,ref:!0,__self:!0,__source:!0},Te,Se;function Ze(e){if(M.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return e.ref!==void 0}function Qe(e){if(M.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function Me(e,t){typeof e.ref=="string"&&Ce.current}function er(e,t){{var o=function(){Te||(Te=!0,R("%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)",t))};o.isReactWarning=!0,Object.defineProperty(e,"key",{get:o,configurable:!0})}}function rr(e,t){{var o=function(){Se||(Se=!0,R("%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)",t))};o.isReactWarning=!0,Object.defineProperty(e,"ref",{get:o,configurable:!0})}}var tr=function(e,t,o,s,p,g,v){var d={$$typeof:a,type:e,key:t,ref:o,props:v,_owner:g};return d._store={},Object.defineProperty(d._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(d,"_self",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.defineProperty(d,"_source",{configurable:!1,enumerable:!1,writable:!1,value:p}),Object.freeze&&(Object.freeze(d.props),Object.freeze(d)),d};function nr(e,t,o,s,p){{var g,v={},d=null,T=null;o!==void 0&&(xe(o),d=""+o),Qe(t)&&(xe(t.key),d=""+t.key),Ze(t)&&(T=t.ref,Me(t,p));for(g in t)M.call(t,g)&&!Xe.hasOwnProperty(g)&&(v[g]=t[g]);if(e&&e.defaultProps){var b=e.defaultProps;for(g in b)v[g]===void 0&&(v[g]=b[g])}if(d||T){var y=typeof e=="function"?e.displayName||e.name||"Unknown":e;d&&er(v,y),T&&rr(v,y)}return tr(e,d,T,p,s,Ce.current,v)}}var ue=O.ReactCurrentOwner,Pe=O.ReactDebugCurrentFrame;function W(e){if(e){var t=e._owner,o=Q(e.type,e._source,t?t.type:null);Pe.setExtraStackFrame(o)}else Pe.setExtraStackFrame(null)}var ae;ae=!1;function ie(e){return typeof e=="object"&&e!==null&&e.$$typeof===a}function Oe(){{if(ue.current){var e=Y(ue.current.type);if(e)return`
20
+ `),E=d.length-1,y=T.length-1;E>=1&&y>=0&&d[E]!==T[y];)y--;for(;E>=1&&y>=0;E--,y--)if(d[E]!==T[y]){if(E!==1||y!==1)do if(E--,y--,y<0||d[E]!==T[y]){var j=`
21
+ `+d[E].replace(" at new "," at ");return e.displayName&&j.includes("<anonymous>")&&(j=j.replace("<anonymous>",e.displayName)),typeof e=="function"&&Z.set(e,j),j}while(E>=1&&y>=0);break}}}finally{ne=!1,re.current=g,Ue(),Error.prepareStackTrace=p}var U=e?e.displayName||e.name:"",Ae=U?X(U):"";return typeof e=="function"&&Z.set(e,Ae),Ae}function qe(e,t,u){return Ee(e,!1)}function Be(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function Q(e,t,u){if(e==null)return"";if(typeof e=="function")return Ee(e,Be(e));if(typeof e=="string")return X(e);switch(e){case S:return X("Suspense");case h:return X("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case l:return qe(e.render);case R:return Q(e.type,t,u);case C:{var s=e,p=s._payload,g=s._init;try{return Q(g(p),t,u)}catch{}}}return""}var M=Object.prototype.hasOwnProperty,me={},ye=O.ReactDebugCurrentFrame;function ee(e){if(e){var t=e._owner,u=Q(e.type,e._source,t?t.type:null);ye.setExtraStackFrame(u)}else ye.setExtraStackFrame(null)}function Ke(e,t,u,s,p){{var g=Function.call.bind(M);for(var v in e)if(g(e,v)){var d=void 0;try{if(typeof e[v]!="function"){var T=Error((s||"React class")+": "+u+" type `"+v+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[v]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw T.name="Invariant Violation",T}d=e[v](t,v,s,u,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(E){d=E}d&&!(d instanceof Error)&&(ee(p),b("%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).",s||"React class",u,v,typeof d),ee(null)),d instanceof Error&&!(d.message in me)&&(me[d.message]=!0,ee(p),b("Failed %s type: %s",u,d.message),ee(null))}}}var Je=Array.isArray;function oe(e){return Je(e)}function ze(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,u=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return u}}function He(e){try{return we(e),!1}catch{return!0}}function we(e){return""+e}function Ce(e){if(He(e))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ze(e)),we(e)}var xe=O.ReactCurrentOwner,Xe={key:!0,ref:!0,__self:!0,__source:!0},Te,Se;function Ze(e){if(M.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return e.ref!==void 0}function Qe(e){if(M.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function Me(e,t){typeof e.ref=="string"&&xe.current}function er(e,t){{var u=function(){Te||(Te=!0,b("%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)",t))};u.isReactWarning=!0,Object.defineProperty(e,"key",{get:u,configurable:!0})}}function rr(e,t){{var u=function(){Se||(Se=!0,b("%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)",t))};u.isReactWarning=!0,Object.defineProperty(e,"ref",{get:u,configurable:!0})}}var tr=function(e,t,u,s,p,g,v){var d={$$typeof:o,type:e,key:t,ref:u,props:v,_owner:g};return d._store={},Object.defineProperty(d._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(d,"_self",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.defineProperty(d,"_source",{configurable:!1,enumerable:!1,writable:!1,value:p}),Object.freeze&&(Object.freeze(d.props),Object.freeze(d)),d};function nr(e,t,u,s,p){{var g,v={},d=null,T=null;u!==void 0&&(Ce(u),d=""+u),Qe(t)&&(Ce(t.key),d=""+t.key),Ze(t)&&(T=t.ref,Me(t,p));for(g in t)M.call(t,g)&&!Xe.hasOwnProperty(g)&&(v[g]=t[g]);if(e&&e.defaultProps){var E=e.defaultProps;for(g in E)v[g]===void 0&&(v[g]=E[g])}if(d||T){var y=typeof e=="function"?e.displayName||e.name||"Unknown":e;d&&er(v,y),T&&rr(v,y)}return tr(e,d,T,p,s,xe.current,v)}}var ue=O.ReactCurrentOwner,Pe=O.ReactDebugCurrentFrame;function W(e){if(e){var t=e._owner,u=Q(e.type,e._source,t?t.type:null);Pe.setExtraStackFrame(u)}else Pe.setExtraStackFrame(null)}var ae;ae=!1;function ie(e){return typeof e=="object"&&e!==null&&e.$$typeof===o}function Oe(){{if(ue.current){var e=Y(ue.current.type);if(e)return`
22
22
 
23
- Check the render method of \``+e+"`."}return""}}function or(e){return""}var ke={};function ur(e){{var t=Oe();if(!t){var o=typeof e=="string"?e:e.displayName||e.name;o&&(t=`
23
+ Check the render method of \``+e+"`."}return""}}function or(e){return""}var ke={};function ur(e){{var t=Oe();if(!t){var u=typeof e=="string"?e:e.displayName||e.name;u&&(t=`
24
24
 
25
- Check the top-level render call using <`+o+">.")}return t}}function je(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var o=ur(t);if(ke[o])return;ke[o]=!0;var s="";e&&e._owner&&e._owner!==ue.current&&(s=" It was passed a child from "+Y(e._owner.type)+"."),W(e),R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',o,s),W(null)}}function De(e,t){{if(typeof e!="object")return;if(oe(e))for(var o=0;o<e.length;o++){var s=e[o];ie(s)&&je(s,t)}else if(ie(e))e._store&&(e._store.validated=!0);else if(e){var p=m(e);if(typeof p=="function"&&p!==e.entries)for(var g=p.call(e),v;!(v=g.next()).done;)ie(v.value)&&je(v.value,t)}}}function ar(e){{var t=e.type;if(t==null||typeof t=="string")return;var o;if(typeof t=="function")o=t.propTypes;else if(typeof t=="object"&&(t.$$typeof===l||t.$$typeof===E))o=t.propTypes;else return;if(o){var s=Y(t);Ke(o,e.props,"prop",s,e)}else if(t.PropTypes!==void 0&&!ae){ae=!0;var p=Y(t);R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",p||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ir(e){{for(var t=Object.keys(e.props),o=0;o<t.length;o++){var s=t[o];if(s!=="children"&&s!=="key"){W(e),R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",s),W(null);break}}e.ref!==null&&(W(e),R("Invalid attribute `ref` supplied to `React.Fragment`."),W(null))}}function Fe(e,t,o,s,p,g){{var v=Ye(e);if(!v){var d="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(d+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var T=or();T?d+=T:d+=Oe();var b;e===null?b="null":oe(e)?b="array":e!==void 0&&e.$$typeof===a?(b="<"+(Y(e.type)||"Unknown")+" />",d=" Did you accidentally export a JSX literal instead of a component?"):b=typeof e,R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",b,d)}var y=nr(e,t,o,p,g);if(y==null)return y;if(v){var j=t.children;if(j!==void 0)if(s)if(oe(j)){for(var U=0;U<j.length;U++)De(j[U],e);Object.freeze&&Object.freeze(j)}else R("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else De(j,e)}return e===u?ir(y):ar(y),y}}function sr(e,t,o){return Fe(e,t,o,!0)}function cr(e,t,o){return Fe(e,t,o,!1)}var fr=cr,lr=sr;K.Fragment=u,K.jsx=fr,K.jsxs=lr}()),K}process.env.NODE_ENV==="production"?se.exports=dr():se.exports=vr();var I=se.exports;const z=_.createContext({rootValue:new Set,setRootValue:()=>{},selection:null,setSelection:()=>{},focus:{current:""},nodeMap:{current:new Map},registerNode:()=>{},removeNode:()=>{}});function pr(){const r=_.useRef(new Map([["__root__",{value:"__root__",parent:"",index:0,isGroup:!0,ref:{current:null}}]]));return[r,(u,i,c,w,f)=>{var l;(l=r.current)==null||l.set(u,{value:u,parent:i,index:c,isGroup:w,ref:f})},u=>{var i;(i=r.current)==null||i.delete(u)}]}function Ie(r,a){if(!r.current)return"";for(const[n,u]of r.current)if(u.parent==a&&u.index==0)return u.value;return""}function _r(r,a){if(!r.current)return"";const n=r.current.get(a);if(n){for(const[u,i]of r.current)if(i.parent==n.parent&&i.index==n.index-1)return i.value;return""}else return""}function gr(r,a){if(!r.current)return"";const n=r.current.get(a);if(n){if(n.index==0)return n.parent;{let u=r.current.get(_r(r,n.value));for(;u&&u.isGroup;){const i=r.current.get($e(r,u.value));if(!i)return u.value;u=i}return u?u.value:""}}else return""}function hr(r,a){if(!r.current)return"";const n=r.current.get(a);if(n){for(const[u,i]of r.current)if(i.parent==n.parent&&i.index==n.index+1)return i.value;return""}else return""}function Rr(r,a){if(!r.current)return"";const n=r.current.get(a);if(n){if(n.isGroup){const i=Ie(r,a);if(i)return i}let u=n;for(;;){const i=hr(r,u.value);if(i)return i;{const c=r.current.get(u.parent);if(!c||u.value=="__root__")return"";u=c}}}else return""}function br(r){if(!r.current)return"";for(const[a,n]of r.current)if(n.parent=="__root__"&&n.index==0)return n.value;return""}function $e(r,a){if(!r.current)return"";let n=null;for(const[u,i]of r.current)i.parent==a&&(!n||i.index>n.index)&&(n=i);return n?n.value:""}function Er(r){if(!r.current)return"";let a=r.current.get("__root__");for(;a&&a.isGroup;){const n=r.current.get($e(r,a.value));if(!n)return a.value;a=n}return a?a.value:""}const G=_.createContext({parent:"",depth:-1});function mr(r,a,n){const[u,i]=_.useState(n),c=r!==void 0?r:u;return[c,f=>{const l=typeof f=="function"?f(c):f;a&&a(l),i(l)}]}function J(r,a){return function(u){const i=u.defaultPrevented;i&&(u.defaultPrevented=!1),r==null||r(u);let c;return u.defaultPrevented||(c=a==null?void 0:a(u),i&&(u.defaultPrevented=!0)),c}}function ce(...r){return _.useCallback(a=>{for(const n of r)typeof n=="function"?n(a):n!=null&&(n.current=a)},[r])}const yr=["ArrowRight","ArrowUp","ArrowLeft","ArrowDown","Home","End","Enter"];function wr(r,a){var u,i,c;const n=Ie(r,a);n&&((c=(i=(u=r.current)==null?void 0:u.get(n))==null?void 0:i.ref.current)==null||c.focus())}function xr(r,a){var u,i,c,w,f;const n=(i=(u=r.current)==null?void 0:u.get(a))==null?void 0:i.parent;n&&n!="__root__"&&((f=(w=(c=r.current)==null?void 0:c.get(n))==null?void 0:w.ref.current)==null||f.focus())}function Cr(r,a){var u,i,c;const n=gr(r,a);n&&n!="__root__"&&((c=(i=(u=r.current)==null?void 0:u.get(n))==null?void 0:i.ref.current)==null||c.focus())}function Tr(r,a){var u,i,c;const n=Rr(r,a);n&&n!="__root__"&&((c=(i=(u=r.current)==null?void 0:u.get(n))==null?void 0:i.ref.current)==null||c.focus())}function Sr(r){var n,u,i;const a=br(r);a&&a!="__root__"&&((i=(u=(n=r.current)==null?void 0:n.get(a))==null?void 0:u.ref.current)==null||i.focus())}function Pr(r){var n,u,i;const a=Er(r);a&&a!="__root__"&&((i=(u=(n=r.current)==null?void 0:n.get(a))==null?void 0:u.ref.current)==null||i.focus())}const Or=_.forwardRef(({value:r,onValueChange:a,defaultValue:n,defaultSelection:u,onKeyDown:i,...c},w)=>{const[f,l,S]=pr(),[h,E]=mr(r,a,n??new Set),[C,P]=_.useState(""),D=_.useRef(null),$=ce(D,w),m=_.useRef(""),O=_.useCallback(x=>{var A;if(!(!yr.includes(x.key)||!f))switch(x.key){case"ArrowRight":const F=(A=f.current)==null?void 0:A.get(m.current);if(!F||!F.isGroup)break;x.preventDefault(),h.has(m.current)?wr(f,m.current):E(k=>new Set([...k,m.current]));break;case"ArrowLeft":x.preventDefault(),h.has(m.current)?E(k=>new Set([...k].filter(V=>V!==m.current))):xr(f,m.current);break;case"ArrowUp":x.preventDefault(),Cr(f,m.current);break;case"ArrowDown":x.preventDefault(),Tr(f,m.current);break;case"Home":x.preventDefault(),Sr(f);break;case"End":x.preventDefault(),Pr(f);break;case"Enter":x.preventDefault(),P(m.current),h.has(m.current)?E(k=>new Set([...k].filter(V=>V!==m.current))):E(k=>new Set([...k,m.current]));break}},[h]),R=J(i,O);return I.jsx(z.Provider,{value:{rootValue:h,setRootValue:E,selection:C,setSelection:P,focus:m,nodeMap:f,registerNode:l,removeNode:S},children:I.jsx(G.Provider,{value:{parent:"__root__",depth:0},children:I.jsx("ul",{ref:$,role:"tree","aria-multiselectable":"false",onKeyDown:R,...c})})})}),kr=_.forwardRef(({value:r,index:a,onFocus:n,onClick:u,...i},c)=>{const{selection:w,setSelection:f,focus:l,nodeMap:S,registerNode:h,removeNode:E}=_.useContext(z),{parent:C,depth:P}=_.useContext(G),D=_.useRef(null),$=ce(D,c),m=J(n,R),O=J(u,x);function R(A){var F,k,V,H;(V=(k=(F=S.current)==null?void 0:F.get(l.current))==null?void 0:k.ref.current)==null||V.setAttribute("tabindex","-1"),(H=D.current)==null||H.setAttribute("tabindex","0"),l.current=r,A.stopPropagation()}function x(){f(r)}return l.current==""&&C=="__root__"&&a==0&&(l.current=r),_.useEffect(()=>(h(r,C,a,!1,D),()=>E(r)),[]),_.useEffect(()=>()=>{l.current==r&&(l.current="")},[]),I.jsx("li",{ref:$,role:"treeitem","aria-selected":w==r,tabIndex:l.current==r?0:-1,onFocus:m,onClick:O,"data-depth":P,...i})}),jr=_.forwardRef(({value:r,index:a,onFocus:n,...u},i)=>{const{rootValue:c,selection:w,focus:f,nodeMap:l,registerNode:S,removeNode:h}=_.useContext(z),{parent:E,depth:C}=_.useContext(G),P=_.useRef(null),D=ce(P,i),$=J(n,m);function m(O){var R,x,A,F;(A=(x=(R=l.current)==null?void 0:R.get(f.current))==null?void 0:x.ref.current)==null||A.setAttribute("tabindex","-1"),(F=P.current)==null||F.setAttribute("tabindex","0"),f.current=r,O.stopPropagation()}return f.current==""&&E=="__root__"&&a==0&&(f.current=r),_.useEffect(()=>(S(r,E,a,!0,P),()=>h(r)),[]),_.useEffect(()=>()=>{f.current==r&&(f.current="")},[]),I.jsx(G.Provider,{value:{parent:r,depth:C+1},children:I.jsx("li",{ref:D,role:"treeitem","data-state":c.has(r)?"open":"closed","data-depth":C,"aria-expanded":c.has(r),"aria-selected":w==r,tabIndex:f.current==r?0:-1,onFocus:$,...u})})}),Dr=_.forwardRef(({onClick:r,...a},n)=>{const{setRootValue:u,setSelection:i}=_.useContext(z),{parent:c}=_.useContext(G),w=J(r,f);function f(){i(c),u(l=>l.has(c)?new Set([...l].filter(S=>S!==c)):new Set([...l,c]))}return I.jsx("div",{ref:n,onClick:w,...a})}),Fr=_.forwardRef(({...r},a)=>{const{rootValue:n}=_.useContext(z),{parent:u}=_.useContext(G);if(n.has(u))return I.jsx("ul",{ref:a,role:"group",...r})}),Ar={Root:Or,Group:jr,Trigger:Dr,Content:Fr,Item:kr};module.exports=Ar;
25
+ Check the top-level render call using <`+u+">.")}return t}}function je(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var u=ur(t);if(ke[u])return;ke[u]=!0;var s="";e&&e._owner&&e._owner!==ue.current&&(s=" It was passed a child from "+Y(e._owner.type)+"."),W(e),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',u,s),W(null)}}function De(e,t){{if(typeof e!="object")return;if(oe(e))for(var u=0;u<e.length;u++){var s=e[u];ie(s)&&je(s,t)}else if(ie(e))e._store&&(e._store.validated=!0);else if(e){var p=m(e);if(typeof p=="function"&&p!==e.entries)for(var g=p.call(e),v;!(v=g.next()).done;)ie(v.value)&&je(v.value,t)}}}function ar(e){{var t=e.type;if(t==null||typeof t=="string")return;var u;if(typeof t=="function")u=t.propTypes;else if(typeof t=="object"&&(t.$$typeof===l||t.$$typeof===R))u=t.propTypes;else return;if(u){var s=Y(t);Ke(u,e.props,"prop",s,e)}else if(t.PropTypes!==void 0&&!ae){ae=!0;var p=Y(t);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",p||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ir(e){{for(var t=Object.keys(e.props),u=0;u<t.length;u++){var s=t[u];if(s!=="children"&&s!=="key"){W(e),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",s),W(null);break}}e.ref!==null&&(W(e),b("Invalid attribute `ref` supplied to `React.Fragment`."),W(null))}}function Fe(e,t,u,s,p,g){{var v=Ye(e);if(!v){var d="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(d+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var T=or();T?d+=T:d+=Oe();var E;e===null?E="null":oe(e)?E="array":e!==void 0&&e.$$typeof===o?(E="<"+(Y(e.type)||"Unknown")+" />",d=" Did you accidentally export a JSX literal instead of a component?"):E=typeof e,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",E,d)}var y=nr(e,t,u,p,g);if(y==null)return y;if(v){var j=t.children;if(j!==void 0)if(s)if(oe(j)){for(var U=0;U<j.length;U++)De(j[U],e);Object.freeze&&Object.freeze(j)}else b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else De(j,e)}return e===a?ir(y):ar(y),y}}function sr(e,t,u){return Fe(e,t,u,!0)}function cr(e,t,u){return Fe(e,t,u,!1)}var fr=cr,lr=sr;K.Fragment=a,K.jsx=fr,K.jsxs=lr}()),K}process.env.NODE_ENV==="production"?se.exports=dr():se.exports=vr();var I=se.exports;const z=_.createContext({rootValue:new Set,setRootValue:()=>{},selection:null,setSelection:()=>{},focus:{current:""},nodeMap:{current:new Map},registerNode:()=>{},removeNode:()=>{}});function pr(){const r=_.useRef(new Map([["__root__",{value:"__root__",parent:"",index:0,isGroup:!0,ref:{current:null}}]]));return[r,(a,i,c,w,f)=>{var l;(l=r.current)==null||l.set(a,{value:a,parent:i,index:c,isGroup:w,ref:f})},a=>{var i;(i=r.current)==null||i.delete(a)}]}function Ie(r,o){if(!r.current)return"";for(const[n,a]of r.current)if(a.parent==o&&a.index==0)return a.value;return""}function _r(r,o){if(!r.current)return"";const n=r.current.get(o);if(n){for(const[a,i]of r.current)if(i.parent==n.parent&&i.index==n.index-1)return i.value;return""}else return""}function gr(r,o){if(!r.current)return"";const n=r.current.get(o);if(n){if(n.index==0)return n.parent;{let a=r.current.get(_r(r,n.value));for(;a&&a.isGroup;){const i=r.current.get($e(r,a.value));if(!i)return a.value;a=i}return a?a.value:""}}else return""}function hr(r,o){if(!r.current)return"";const n=r.current.get(o);if(n){for(const[a,i]of r.current)if(i.parent==n.parent&&i.index==n.index+1)return i.value;return""}else return""}function Rr(r,o){if(!r.current)return"";const n=r.current.get(o);if(n){if(n.isGroup){const i=Ie(r,o);if(i)return i}let a=n;for(;;){const i=hr(r,a.value);if(i)return i;{const c=r.current.get(a.parent);if(!c||a.value=="__root__")return"";a=c}}}else return""}function br(r){if(!r.current)return"";for(const[o,n]of r.current)if(n.parent=="__root__"&&n.index==0)return n.value;return""}function $e(r,o){if(!r.current)return"";let n=null;for(const[a,i]of r.current)i.parent==o&&(!n||i.index>n.index)&&(n=i);return n?n.value:""}function Er(r){if(!r.current)return"";let o=r.current.get("__root__");for(;o&&o.isGroup;){const n=r.current.get($e(r,o.value));if(!n)return o.value;o=n}return o?o.value:""}const G=_.createContext({parent:"",depth:-1});function mr(r,o,n){const[a,i]=_.useState(n),c=r!==void 0?r:a;return[c,f=>{const l=typeof f=="function"?f(c):f;o&&o(l),i(l)}]}function J(r,o){return function(a){const i=a.defaultPrevented;i&&(a.defaultPrevented=!1),r==null||r(a);let c;return a.defaultPrevented||(c=o==null?void 0:o(a),i&&(a.defaultPrevented=!0)),c}}function ce(...r){return _.useCallback(o=>{for(const n of r)typeof n=="function"?n(o):n!=null&&(n.current=o)},[r])}const yr=["ArrowRight","ArrowUp","ArrowLeft","ArrowDown","Home","End","Enter"];function wr(r,o){var a,i,c;const n=Ie(r,o);n&&((c=(i=(a=r.current)==null?void 0:a.get(n))==null?void 0:i.ref.current)==null||c.focus())}function Cr(r,o){var a,i,c,w,f;const n=(i=(a=r.current)==null?void 0:a.get(o))==null?void 0:i.parent;n&&n!="__root__"&&((f=(w=(c=r.current)==null?void 0:c.get(n))==null?void 0:w.ref.current)==null||f.focus())}function xr(r,o){var a,i,c;const n=gr(r,o);n&&n!="__root__"&&((c=(i=(a=r.current)==null?void 0:a.get(n))==null?void 0:i.ref.current)==null||c.focus())}function Tr(r,o){var a,i,c;const n=Rr(r,o);n&&n!="__root__"&&((c=(i=(a=r.current)==null?void 0:a.get(n))==null?void 0:i.ref.current)==null||c.focus())}function Sr(r){var n,a,i;const o=br(r);o&&o!="__root__"&&((i=(a=(n=r.current)==null?void 0:n.get(o))==null?void 0:a.ref.current)==null||i.focus())}function Pr(r){var n,a,i;const o=Er(r);o&&o!="__root__"&&((i=(a=(n=r.current)==null?void 0:n.get(o))==null?void 0:a.ref.current)==null||i.focus())}const Or=_.forwardRef(({value:r,onValueChange:o,defaultValue:n,defaultSelection:a,onKeyDown:i,...c},w)=>{const[f,l,S]=pr(),[h,R]=mr(r,o,n??new Set),[C,P]=_.useState(""),D=_.useRef(null),$=ce(D,w),m=_.useRef(""),O=_.useCallback(x=>{var A;if(!(!yr.includes(x.key)||!f))switch(x.key){case"ArrowRight":const F=(A=f.current)==null?void 0:A.get(m.current);if(!F||!F.isGroup)break;x.preventDefault(),h.has(m.current)?wr(f,m.current):R(k=>new Set([...k,m.current]));break;case"ArrowLeft":x.preventDefault(),h.has(m.current)?R(k=>new Set([...k].filter(V=>V!==m.current))):Cr(f,m.current);break;case"ArrowUp":x.preventDefault(),xr(f,m.current);break;case"ArrowDown":x.preventDefault(),Tr(f,m.current);break;case"Home":x.preventDefault(),Sr(f);break;case"End":x.preventDefault(),Pr(f);break;case"Enter":x.preventDefault(),P(m.current),h.has(m.current)?R(k=>new Set([...k].filter(V=>V!==m.current))):R(k=>new Set([...k,m.current]));break}},[h]),b=J(i,O);return I.jsx(z.Provider,{value:{rootValue:h,setRootValue:R,selection:C,setSelection:P,focus:m,nodeMap:f,registerNode:l,removeNode:S},children:I.jsx(G.Provider,{value:{parent:"__root__",depth:0},children:I.jsx("ul",{ref:$,role:"tree","aria-multiselectable":"false",onKeyDown:b,...c})})})}),kr=_.forwardRef(({value:r,index:o,onFocus:n,onClick:a,...i},c)=>{const{selection:w,setSelection:f,focus:l,nodeMap:S,registerNode:h,removeNode:R}=_.useContext(z),{parent:C,depth:P}=_.useContext(G),D=_.useRef(null),$=ce(D,c),m=J(n,b),O=J(a,x);function b(A){var F,k,V,H;(V=(k=(F=S.current)==null?void 0:F.get(l.current))==null?void 0:k.ref.current)==null||V.setAttribute("tabindex","-1"),(H=D.current)==null||H.setAttribute("tabindex","0"),l.current=r,A.stopPropagation()}function x(){f(r)}return l.current==""&&C=="__root__"&&o==0&&(l.current=r),_.useEffect(()=>(h(r,C,o,!1,D),()=>R(r)),[r,C,o]),_.useEffect(()=>()=>{l.current==r&&(l.current="")},[]),I.jsx("li",{ref:$,role:"treeitem","aria-selected":w==r,tabIndex:l.current==r?0:-1,onFocus:m,onClick:O,"data-depth":P,...i})}),jr=_.forwardRef(({value:r,index:o,onFocus:n,...a},i)=>{const{rootValue:c,selection:w,focus:f,nodeMap:l,registerNode:S,removeNode:h}=_.useContext(z),{parent:R,depth:C}=_.useContext(G),P=_.useRef(null),D=ce(P,i),$=J(n,m);function m(O){var b,x,A,F;(A=(x=(b=l.current)==null?void 0:b.get(f.current))==null?void 0:x.ref.current)==null||A.setAttribute("tabindex","-1"),(F=P.current)==null||F.setAttribute("tabindex","0"),f.current=r,O.stopPropagation()}return f.current==""&&R=="__root__"&&o==0&&(f.current=r),_.useEffect(()=>(S(r,R,o,!0,P),()=>h(r)),[r,R,o]),_.useEffect(()=>()=>{f.current==r&&(f.current="")},[]),I.jsx(G.Provider,{value:{parent:r,depth:C+1},children:I.jsx("li",{ref:D,role:"treeitem","data-state":c.has(r)?"open":"closed","data-depth":C,"aria-expanded":c.has(r),"aria-selected":w==r,tabIndex:f.current==r?0:-1,onFocus:$,...a})})}),Dr=_.forwardRef(({onClick:r,...o},n)=>{const{setRootValue:a,setSelection:i}=_.useContext(z),{parent:c}=_.useContext(G),w=J(r,f);function f(){i(c),a(l=>l.has(c)?new Set([...l].filter(S=>S!==c)):new Set([...l,c]))}return I.jsx("div",{ref:n,onClick:w,...o})}),Fr=_.forwardRef(({...r},o)=>{const{rootValue:n}=_.useContext(z),{parent:a}=_.useContext(G);if(n.has(a))return I.jsx("ul",{ref:o,role:"group",...r})}),Ar={Root:Or,Group:jr,Trigger:Dr,Content:Fr,Item:kr};module.exports=Ar;
26
26
  //# sourceMappingURL=index.cjs.map