You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@react-querybuilder/dnd

Package Overview
Dependencies
Maintainers
1
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-querybuilder/dnd - npm Package Compare versions

Comparing version

to
5.0.0-alpha.8

16

dist/index.cjs.js

@@ -1,2 +0,2 @@

"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const O=require("react"),m=require("react-querybuilder"),U=require("@react-querybuilder/ctx"),yr=t=>t&&typeof t=="object"&&"default"in t?t:{default:t};function Fe(t){if(t&&t.__esModule)return t;const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const d in t)if(d!=="default"){const l=Object.getOwnPropertyDescriptor(t,d);Object.defineProperty(a,d,l.get?l:{enumerable:!0,get:()=>t[d]})}}return a.default=t,Object.freeze(a)}const We=yr(O),Dr="5.0.0-alpha.7",Rr=({path:t,independentCombinators:a,useDrop:d})=>{const l=O.useRef(null),[{isOver:R,dropMonitorId:b},f]=d(()=>({accept:["rule","ruleGroup"],canDrop:s=>{const i=m.getParentPath(t),g=m.getParentPath(s.path),u=t[t.length-1],E=s.path[s.path.length-1];return!(m.isAncestor(s.path,t)||m.pathsAreEqual(s.path,t)||m.pathsAreEqual(i,g)&&u-1===E||a&&m.pathsAreEqual(i,g)&&u===E-1)},collect:s=>{var i,g;return{isOver:s.canDrop()&&s.isOver(),dropMonitorId:(i=s.getHandlerId())!=null?i:"",dropEffect:((g=s.getDropResult())!=null?g:{}).dropEffect}},drop:()=>({type:"inlineCombinator",path:t})}),[t,a]);return f(l),{dropRef:l,dropMonitorId:b,isOver:R}},Be=t=>{const[a,d]=O.useState(t!=null?t:null);return O.useEffect(()=>{let l=!1;return a||(async()=>{const[b,f]=await Promise.all([Promise.resolve().then(()=>Fe(require("react-dnd"))).catch(()=>null),Promise.resolve().then(()=>Fe(require("react-dnd-html5-backend"))).catch(()=>null)]);l||b&&f&&d(()=>({...b,...f}))})(),()=>{l=!0}},[]),a},Ge=({type:t,path:a,disabled:d,moveRule:l,useDrag:R})=>R(()=>({type:t,item:{path:a},canDrag:!d,collect:b=>{var f;return{isDragging:!d&&b.isDragging(),dragMonitorId:(f=b.getHandlerId())!=null?f:""}},end(b,f){const s=f.getDropResult();if(!s)return;const i=m.getParentPath(s.path),g=s.path[s.path.length-1],u=s.type==="ruleGroup"?[...s.path,0]:s.type==="inlineCombinator"?[...i,g]:[...i,g+1];l(b.path,u,s.dropEffect==="copy")}}),[d,a]),Er=({path:t,disabled:a,independentCombinators:d,moveRule:l,useDrag:R,useDrop:b})=>{const f=O.useRef(null),s=O.useRef(null),[{isDragging:i,dragMonitorId:g},u,E]=Ge({type:"rule",path:t,disabled:a,independentCombinators:d,moveRule:l,useDrag:R}),[{isOver:C,dropMonitorId:I,dropEffect:k},$]=b(()=>({accept:["rule","ruleGroup"],canDrop:x=>{if(a)return!1;const D=m.getParentPath(t),h=m.getParentPath(x.path),T=t[t.length-1],F=x.path[x.path.length-1];return!(m.isAncestor(x.path,t)||m.pathsAreEqual(D,h)&&(T===F||T===F-1||d&&T===F-2))},collect:x=>{var D,h;return{isOver:x.canDrop()&&x.isOver(),dropMonitorId:(D=x.getHandlerId())!=null?D:"",dropEffect:((h=x.getDropResult())!=null?h:{}).dropEffect}},drop:()=>({type:"rule",path:t})}),[a,d,l,t]);return u(s),E($(f)),{isDragging:i,dragMonitorId:g,isOver:C,dropMonitorId:I,dndRef:f,dragRef:s,dropEffect:k}},_r=({disabled:t,path:a,independentCombinators:d,moveRule:l,useDrag:R,useDrop:b})=>{const f=O.useRef(null),s=O.useRef(null),i=O.useRef(null),[{isDragging:g,dragMonitorId:u},E,C]=Ge({type:"ruleGroup",path:a,disabled:t,independentCombinators:d,moveRule:l,useDrag:R}),[{isOver:I,dropMonitorId:k,dropEffect:$},x]=b(()=>({accept:["rule","ruleGroup"],canDrop:D=>{if(t)return!1;const h=m.getParentPath(D.path),T=D.path[D.path.length-1];return!(m.isAncestor(D.path,a)||m.pathsAreEqual(a,h)&&T===0||m.pathsAreEqual(a,D.path))},collect:D=>{var h,T;return{isOver:D.canDrop()&&D.isOver(),dropMonitorId:(h=D.getHandlerId())!=null?h:"",dropEffect:((T=D.getDropResult())!=null?T:{}).dropEffect}},drop:(D,h)=>{var T;return(T=h.getDropResult())!=null?T:{type:"ruleGroup",path:a}}}),[t,l,a]);return a.length>0&&(E(s),C(f)),x(i),{isDragging:g,dragMonitorId:u,isOver:I,dropMonitorId:k,previewRef:f,dragRef:s,dropRef:i,dropEffect:$}},{rule:Cr,ruleGroup:Pr,combinatorSelector:Or}=m.defaultControlElements,q=O.createContext({baseControls:{rule:Cr,ruleGroup:Pr,combinatorSelector:Or}});q.displayName="QueryBuilderDndContext";var Ye={exports:{}},L={};/**
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const O=require("react"),p=require("react-querybuilder"),mr=t=>t&&typeof t=="object"&&"default"in t?t:{default:t};function $e(t){if(t&&t.__esModule)return t;const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const d in t)if(d!=="default"){const l=Object.getOwnPropertyDescriptor(t,d);Object.defineProperty(a,d,l.get?l:{enumerable:!0,get:()=>t[d]})}}return a.default=t,Object.freeze(a)}const We=mr(O),yr="5.0.0-alpha.8",Dr=({path:t,independentCombinators:a,useDrop:d})=>{const l=O.useRef(null),[{isOver:R,dropMonitorId:m},f]=d(()=>({accept:["rule","ruleGroup"],canDrop:s=>{const i=p.getParentPath(t),h=p.getParentPath(s.path),u=t[t.length-1],E=s.path[s.path.length-1];return!(p.isAncestor(s.path,t)||p.pathsAreEqual(s.path,t)||p.pathsAreEqual(i,h)&&u-1===E||a&&p.pathsAreEqual(i,h)&&u===E-1)},collect:s=>{var i,h;return{isOver:s.canDrop()&&s.isOver(),dropMonitorId:(i=s.getHandlerId())!=null?i:"",dropEffect:((h=s.getDropResult())!=null?h:{}).dropEffect}},drop:()=>({type:"inlineCombinator",path:t})}),[t,a]);return f(l),{dropRef:l,dropMonitorId:m,isOver:R}},Be=t=>{const[a,d]=O.useState(t!=null?t:null);return O.useEffect(()=>{let l=!1;return a||(async()=>{const[m,f]=await Promise.all([Promise.resolve().then(()=>$e(require("react-dnd"))).catch(()=>null),Promise.resolve().then(()=>$e(require("react-dnd-html5-backend"))).catch(()=>null)]);l||m&&f&&d(()=>({...m,...f}))})(),()=>{l=!0}},[]),a},Ge=({type:t,path:a,disabled:d,moveRule:l,useDrag:R})=>R(()=>({type:t,item:{path:a},canDrag:!d,collect:m=>{var f;return{isDragging:!d&&m.isDragging(),dragMonitorId:(f=m.getHandlerId())!=null?f:""}},end(m,f){const s=f.getDropResult();if(!s)return;const i=p.getParentPath(s.path),h=s.path[s.path.length-1],u=s.type==="ruleGroup"?[...s.path,0]:s.type==="inlineCombinator"?[...i,h]:[...i,h+1];l(m.path,u,s.dropEffect==="copy")}}),[d,a]),Rr=({path:t,disabled:a,independentCombinators:d,moveRule:l,useDrag:R,useDrop:m})=>{const f=O.useRef(null),s=O.useRef(null),[{isDragging:i,dragMonitorId:h},u,E]=Ge({type:"rule",path:t,disabled:a,independentCombinators:d,moveRule:l,useDrag:R}),[{isOver:C,dropMonitorId:I,dropEffect:k},$]=m(()=>({accept:["rule","ruleGroup"],canDrop:x=>{if(a)return!1;const D=p.getParentPath(t),b=p.getParentPath(x.path),T=t[t.length-1],F=x.path[x.path.length-1];return!(p.isAncestor(x.path,t)||p.pathsAreEqual(D,b)&&(T===F||T===F-1||d&&T===F-2))},collect:x=>{var D,b;return{isOver:x.canDrop()&&x.isOver(),dropMonitorId:(D=x.getHandlerId())!=null?D:"",dropEffect:((b=x.getDropResult())!=null?b:{}).dropEffect}},drop:()=>({type:"rule",path:t})}),[a,d,l,t]);return u(s),E($(f)),{isDragging:i,dragMonitorId:h,isOver:C,dropMonitorId:I,dndRef:f,dragRef:s,dropEffect:k}},Er=({disabled:t,path:a,independentCombinators:d,moveRule:l,useDrag:R,useDrop:m})=>{const f=O.useRef(null),s=O.useRef(null),i=O.useRef(null),[{isDragging:h,dragMonitorId:u},E,C]=Ge({type:"ruleGroup",path:a,disabled:t,independentCombinators:d,moveRule:l,useDrag:R}),[{isOver:I,dropMonitorId:k,dropEffect:$},x]=m(()=>({accept:["rule","ruleGroup"],canDrop:D=>{if(t)return!1;const b=p.getParentPath(D.path),T=D.path[D.path.length-1];return!(p.isAncestor(D.path,a)||p.pathsAreEqual(a,b)&&T===0||p.pathsAreEqual(a,D.path))},collect:D=>{var b,T;return{isOver:D.canDrop()&&D.isOver(),dropMonitorId:(b=D.getHandlerId())!=null?b:"",dropEffect:((T=D.getDropResult())!=null?T:{}).dropEffect}},drop:(D,b)=>{var T;return(T=b.getDropResult())!=null?T:{type:"ruleGroup",path:a}}}),[t,l,a]);return a.length>0&&(E(s),C(f)),x(i),{isDragging:h,dragMonitorId:u,isOver:I,dropMonitorId:k,previewRef:f,dragRef:s,dropRef:i,dropEffect:$}},{rule:_r,ruleGroup:Cr,combinatorSelector:Pr}=p.defaultControlElements,W=O.createContext({baseControls:{rule:_r,ruleGroup:Cr,combinatorSelector:Pr}});W.displayName="QueryBuilderDndContext";var qe={exports:{}},L={};/**
* @license React

@@ -9,3 +9,3 @@ * react-jsx-runtime.production.min.js

* LICENSE file in the root directory of this source tree.
*/var Ne;function xr(){if(Ne)return L;Ne=1;var t=We.default,a=Symbol.for("react.element"),d=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,R=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,b={key:!0,ref:!0,__self:!0,__source:!0};function f(s,i,g){var u,E={},C=null,I=null;g!==void 0&&(C=""+g),i.key!==void 0&&(C=""+i.key),i.ref!==void 0&&(I=i.ref);for(u in i)l.call(i,u)&&!b.hasOwnProperty(u)&&(E[u]=i[u]);if(s&&s.defaultProps)for(u in i=s.defaultProps,i)E[u]===void 0&&(E[u]=i[u]);return{$$typeof:a,type:s,key:C,ref:I,props:E,_owner:R.current}}return L.Fragment=d,L.jsx=f,L.jsxs=f,L}var V={};/**
*/var Fe;function Or(){if(Fe)return L;Fe=1;var t=We.default,a=Symbol.for("react.element"),d=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,R=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,m={key:!0,ref:!0,__self:!0,__source:!0};function f(s,i,h){var u,E={},C=null,I=null;h!==void 0&&(C=""+h),i.key!==void 0&&(C=""+i.key),i.ref!==void 0&&(I=i.ref);for(u in i)l.call(i,u)&&!m.hasOwnProperty(u)&&(E[u]=i[u]);if(s&&s.defaultProps)for(u in i=s.defaultProps,i)E[u]===void 0&&(E[u]=i[u]);return{$$typeof:a,type:s,key:C,ref:I,props:E,_owner:R.current}}return L.Fragment=d,L.jsx=f,L.jsxs=f,L}var V={};/**
* @license React

@@ -18,13 +18,13 @@ * react-jsx-runtime.development.js

* LICENSE file in the root directory of this source tree.
*/var qe;function Tr(){return qe||(qe=1,process.env.NODE_ENV!=="production"&&function(){var t=We.default,a=Symbol.for("react.element"),d=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),s=Symbol.for("react.context"),i=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),I=Symbol.for("react.offscreen"),k=Symbol.iterator,$="@@iterator";function x(e){if(e===null||typeof e!="object")return null;var r=k&&e[k]||e[$];return typeof r=="function"?r:null}var D=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function h(e){{for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];T("error",e,n)}}function T(e,r,n){{var o=D.ReactDebugCurrentFrame,p=o.getStackAddendum();p!==""&&(r+="%s",n=n.concat([p]));var y=n.map(function(v){return String(v)});y.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,y)}}var F=!1,Q=!1,H=!1,J=!1,Ve=!1,ve;ve=Symbol.for("react.module.reference");function Ue(e){return!!(typeof e=="string"||typeof e=="function"||e===l||e===b||Ve||e===R||e===g||e===u||J||e===I||F||Q||H||typeof e=="object"&&e!==null&&(e.$$typeof===C||e.$$typeof===E||e.$$typeof===f||e.$$typeof===s||e.$$typeof===i||e.$$typeof===ve||e.getModuleId!==void 0))}function Qe(e,r,n){var o=e.displayName;if(o)return o;var p=r.displayName||r.name||"";return p!==""?n+"("+p+")":n}function pe(e){return e.displayName||"Context"}function A(e){if(e==null)return null;if(typeof e.tag=="number"&&h("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 l:return"Fragment";case d:return"Portal";case b:return"Profiler";case R:return"StrictMode";case g:return"Suspense";case u:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case s:var r=e;return pe(r)+".Consumer";case f:var n=e;return pe(n._context)+".Provider";case i:return Qe(e,e.render,"ForwardRef");case E:var o=e.displayName||null;return o!==null?o:A(e.type)||"Memo";case C:{var p=e,y=p._payload,v=p._init;try{return A(v(y))}catch{return null}}}return null}var N=Object.assign,G=0,ge,he,be,me,ye,De,Re;function Ee(){}Ee.__reactDisabledLog=!0;function He(){{if(G===0){ge=console.log,he=console.info,be=console.warn,me=console.error,ye=console.group,De=console.groupCollapsed,Re=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Ee,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}G++}}function Je(){{if(G--,G===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:N({},e,{value:ge}),info:N({},e,{value:he}),warn:N({},e,{value:be}),error:N({},e,{value:me}),group:N({},e,{value:ye}),groupCollapsed:N({},e,{value:De}),groupEnd:N({},e,{value:Re})})}G<0&&h("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var re=D.ReactCurrentDispatcher,te;function z(e,r,n){{if(te===void 0)try{throw Error()}catch(p){var o=p.stack.trim().match(/\n( *(at )?)/);te=o&&o[1]||""}return`
`+te+e}}var ne=!1,K;{var ze=typeof WeakMap=="function"?WeakMap:Map;K=new ze}function _e(e,r){if(!e||ne)return"";{var n=K.get(e);if(n!==void 0)return n}var o;ne=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var y;y=re.current,re.current=null,He();try{if(r){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(M){o=M}Reflect.construct(e,[],v)}else{try{v.call()}catch(M){o=M}e.call(v.prototype)}}else{try{throw Error()}catch(M){o=M}e()}}catch(M){if(M&&o&&typeof M.stack=="string"){for(var c=M.stack.split(`
*/var Ne;function xr(){return Ne||(Ne=1,process.env.NODE_ENV!=="production"&&function(){var t=We.default,a=Symbol.for("react.element"),d=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),s=Symbol.for("react.context"),i=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),I=Symbol.for("react.offscreen"),k=Symbol.iterator,$="@@iterator";function x(e){if(e===null||typeof e!="object")return null;var r=k&&e[k]||e[$];return typeof r=="function"?r:null}var D=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(e){{for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];T("error",e,n)}}function T(e,r,n){{var o=D.ReactDebugCurrentFrame,g=o.getStackAddendum();g!==""&&(r+="%s",n=n.concat([g]));var y=n.map(function(v){return String(v)});y.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,y)}}var F=!1,U=!1,Q=!1,H=!1,Le=!1,de;de=Symbol.for("react.module.reference");function Ve(e){return!!(typeof e=="string"||typeof e=="function"||e===l||e===m||Le||e===R||e===h||e===u||H||e===I||F||U||Q||typeof e=="object"&&e!==null&&(e.$$typeof===C||e.$$typeof===E||e.$$typeof===f||e.$$typeof===s||e.$$typeof===i||e.$$typeof===de||e.getModuleId!==void 0))}function Ue(e,r,n){var o=e.displayName;if(o)return o;var g=r.displayName||r.name||"";return g!==""?n+"("+g+")":n}function ve(e){return e.displayName||"Context"}function A(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 l:return"Fragment";case d:return"Portal";case m:return"Profiler";case R:return"StrictMode";case h:return"Suspense";case u:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case s:var r=e;return ve(r)+".Consumer";case f:var n=e;return ve(n._context)+".Provider";case i:return Ue(e,e.render,"ForwardRef");case E:var o=e.displayName||null;return o!==null?o:A(e.type)||"Memo";case C:{var g=e,y=g._payload,v=g._init;try{return A(v(y))}catch{return null}}}return null}var N=Object.assign,q=0,pe,ge,he,be,me,ye,De;function Re(){}Re.__reactDisabledLog=!0;function Qe(){{if(q===0){pe=console.log,ge=console.info,he=console.warn,be=console.error,me=console.group,ye=console.groupCollapsed,De=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Re,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}q++}}function He(){{if(q--,q===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:N({},e,{value:pe}),info:N({},e,{value:ge}),warn:N({},e,{value:he}),error:N({},e,{value:be}),group:N({},e,{value:me}),groupCollapsed:N({},e,{value:ye}),groupEnd:N({},e,{value:De})})}q<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ee=D.ReactCurrentDispatcher,re;function J(e,r,n){{if(re===void 0)try{throw Error()}catch(g){var o=g.stack.trim().match(/\n( *(at )?)/);re=o&&o[1]||""}return`
`+re+e}}var te=!1,z;{var Je=typeof WeakMap=="function"?WeakMap:Map;z=new Je}function Ee(e,r){if(!e||te)return"";{var n=z.get(e);if(n!==void 0)return n}var o;te=!0;var g=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var y;y=ee.current,ee.current=null,Qe();try{if(r){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(M){o=M}Reflect.construct(e,[],v)}else{try{v.call()}catch(M){o=M}e.call(v.prototype)}}else{try{throw Error()}catch(M){o=M}e()}}catch(M){if(M&&o&&typeof M.stack=="string"){for(var c=M.stack.split(`
`),S=o.stack.split(`
`),_=c.length-1,P=S.length-1;_>=1&&P>=0&&c[_]!==S[P];)P--;for(;_>=1&&P>=0;_--,P--)if(c[_]!==S[P]){if(_!==1||P!==1)do if(_--,P--,P<0||c[_]!==S[P]){var j=`
`+c[_].replace(" at new "," at ");return e.displayName&&j.includes("<anonymous>")&&(j=j.replace("<anonymous>",e.displayName)),typeof e=="function"&&K.set(e,j),j}while(_>=1&&P>=0);break}}}finally{ne=!1,re.current=y,Je(),Error.prepareStackTrace=p}var B=e?e.displayName||e.name:"",$e=B?z(B):"";return typeof e=="function"&&K.set(e,$e),$e}function Ke(e,r,n){return _e(e,!1)}function Xe(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function X(e,r,n){if(e==null)return"";if(typeof e=="function")return _e(e,Xe(e));if(typeof e=="string")return z(e);switch(e){case g:return z("Suspense");case u:return z("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case i:return Ke(e.render);case E:return X(e.type,r,n);case C:{var o=e,p=o._payload,y=o._init;try{return X(y(p),r,n)}catch{}}}return""}var Z=Object.prototype.hasOwnProperty,Ce={},Pe=D.ReactDebugCurrentFrame;function ee(e){if(e){var r=e._owner,n=X(e.type,e._source,r?r.type:null);Pe.setExtraStackFrame(n)}else Pe.setExtraStackFrame(null)}function Ze(e,r,n,o,p){{var y=Function.call.bind(Z);for(var v in e)if(y(e,v)){var c=void 0;try{if(typeof e[v]!="function"){var S=Error((o||"React class")+": "+n+" 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 S.name="Invariant Violation",S}c=e[v](r,v,o,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(_){c=_}c&&!(c instanceof Error)&&(ee(p),h("%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).",o||"React class",n,v,typeof c),ee(null)),c instanceof Error&&!(c.message in Ce)&&(Ce[c.message]=!0,ee(p),h("Failed %s type: %s",n,c.message),ee(null))}}}var er=Array.isArray;function ae(e){return er(e)}function rr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,n=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n}}function tr(e){try{return Oe(e),!1}catch{return!0}}function Oe(e){return""+e}function xe(e){if(tr(e))return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",rr(e)),Oe(e)}var Y=D.ReactCurrentOwner,nr={key:!0,ref:!0,__self:!0,__source:!0},Te,Se,oe;oe={};function ar(e){if(Z.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function or(e){if(Z.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function sr(e,r){if(typeof e.ref=="string"&&Y.current&&r&&Y.current.stateNode!==r){var n=A(Y.current.type);oe[n]||(h('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',A(Y.current.type),e.ref),oe[n]=!0)}}function ir(e,r){{var n=function(){Te||(Te=!0,h("%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)",r))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}}function ur(e,r){{var n=function(){Se||(Se=!0,h("%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)",r))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}}var lr=function(e,r,n,o,p,y,v){var c={$$typeof:a,type:e,key:r,ref:n,props:v,_owner:y};return c._store={},Object.defineProperty(c._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(c,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(c,"_source",{configurable:!1,enumerable:!1,writable:!1,value:p}),Object.freeze&&(Object.freeze(c.props),Object.freeze(c)),c};function cr(e,r,n,o,p){{var y,v={},c=null,S=null;n!==void 0&&(xe(n),c=""+n),or(r)&&(xe(r.key),c=""+r.key),ar(r)&&(S=r.ref,sr(r,p));for(y in r)Z.call(r,y)&&!nr.hasOwnProperty(y)&&(v[y]=r[y]);if(e&&e.defaultProps){var _=e.defaultProps;for(y in _)v[y]===void 0&&(v[y]=_[y])}if(c||S){var P=typeof e=="function"?e.displayName||e.name||"Unknown":e;c&&ir(v,P),S&&ur(v,P)}return lr(e,c,S,p,o,Y.current,v)}}var se=D.ReactCurrentOwner,we=D.ReactDebugCurrentFrame;function W(e){if(e){var r=e._owner,n=X(e.type,e._source,r?r.type:null);we.setExtraStackFrame(n)}else we.setExtraStackFrame(null)}var ie;ie=!1;function ue(e){return typeof e=="object"&&e!==null&&e.$$typeof===a}function je(){{if(se.current){var e=A(se.current.type);if(e)return`
`+c[_].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(_>=1&&P>=0);break}}}finally{te=!1,ee.current=y,He(),Error.prepareStackTrace=g}var G=e?e.displayName||e.name:"",Me=G?J(G):"";return typeof e=="function"&&z.set(e,Me),Me}function ze(e,r,n){return Ee(e,!1)}function Ke(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function K(e,r,n){if(e==null)return"";if(typeof e=="function")return Ee(e,Ke(e));if(typeof e=="string")return J(e);switch(e){case h:return J("Suspense");case u:return J("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case i:return ze(e.render);case E:return K(e.type,r,n);case C:{var o=e,g=o._payload,y=o._init;try{return K(y(g),r,n)}catch{}}}return""}var X=Object.prototype.hasOwnProperty,_e={},Ce=D.ReactDebugCurrentFrame;function Z(e){if(e){var r=e._owner,n=K(e.type,e._source,r?r.type:null);Ce.setExtraStackFrame(n)}else Ce.setExtraStackFrame(null)}function Xe(e,r,n,o,g){{var y=Function.call.bind(X);for(var v in e)if(y(e,v)){var c=void 0;try{if(typeof e[v]!="function"){var S=Error((o||"React class")+": "+n+" 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 S.name="Invariant Violation",S}c=e[v](r,v,o,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(_){c=_}c&&!(c instanceof Error)&&(Z(g),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).",o||"React class",n,v,typeof c),Z(null)),c instanceof Error&&!(c.message in _e)&&(_e[c.message]=!0,Z(g),b("Failed %s type: %s",n,c.message),Z(null))}}}var Ze=Array.isArray;function ne(e){return Ze(e)}function er(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,n=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n}}function rr(e){try{return Pe(e),!1}catch{return!0}}function Pe(e){return""+e}function Oe(e){if(rr(e))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",er(e)),Pe(e)}var Y=D.ReactCurrentOwner,tr={key:!0,ref:!0,__self:!0,__source:!0},xe,Te,ae;ae={};function nr(e){if(X.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function ar(e){if(X.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function or(e,r){if(typeof e.ref=="string"&&Y.current&&r&&Y.current.stateNode!==r){var n=A(Y.current.type);ae[n]||(b('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',A(Y.current.type),e.ref),ae[n]=!0)}}function sr(e,r){{var n=function(){xe||(xe=!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)",r))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}}function ir(e,r){{var n=function(){Te||(Te=!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)",r))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}}var ur=function(e,r,n,o,g,y,v){var c={$$typeof:a,type:e,key:r,ref:n,props:v,_owner:y};return c._store={},Object.defineProperty(c._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(c,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(c,"_source",{configurable:!1,enumerable:!1,writable:!1,value:g}),Object.freeze&&(Object.freeze(c.props),Object.freeze(c)),c};function lr(e,r,n,o,g){{var y,v={},c=null,S=null;n!==void 0&&(Oe(n),c=""+n),ar(r)&&(Oe(r.key),c=""+r.key),nr(r)&&(S=r.ref,or(r,g));for(y in r)X.call(r,y)&&!tr.hasOwnProperty(y)&&(v[y]=r[y]);if(e&&e.defaultProps){var _=e.defaultProps;for(y in _)v[y]===void 0&&(v[y]=_[y])}if(c||S){var P=typeof e=="function"?e.displayName||e.name||"Unknown":e;c&&sr(v,P),S&&ir(v,P)}return ur(e,c,S,g,o,Y.current,v)}}var oe=D.ReactCurrentOwner,Se=D.ReactDebugCurrentFrame;function B(e){if(e){var r=e._owner,n=K(e.type,e._source,r?r.type:null);Se.setExtraStackFrame(n)}else Se.setExtraStackFrame(null)}var se;se=!1;function ie(e){return typeof e=="object"&&e!==null&&e.$$typeof===a}function we(){{if(oe.current){var e=A(oe.current.type);if(e)return`
Check the render method of \``+e+"`."}return""}}function fr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),n=e.lineNumber;return`
Check the render method of \``+e+"`."}return""}}function cr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),n=e.lineNumber;return`
Check your code at `+r+":"+n+"."}return""}}var Ie={};function dr(e){{var r=je();if(!r){var n=typeof e=="string"?e:e.displayName||e.name;n&&(r=`
Check your code at `+r+":"+n+"."}return""}}var je={};function fr(e){{var r=we();if(!r){var n=typeof e=="string"?e:e.displayName||e.name;n&&(r=`
Check the top-level render call using <`+n+">.")}return r}}function ke(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var n=dr(r);if(Ie[n])return;Ie[n]=!0;var o="";e&&e._owner&&e._owner!==se.current&&(o=" It was passed a child from "+A(e._owner.type)+"."),W(e),h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,o),W(null)}}function Ae(e,r){{if(typeof e!="object")return;if(ae(e))for(var n=0;n<e.length;n++){var o=e[n];ue(o)&&ke(o,r)}else if(ue(e))e._store&&(e._store.validated=!0);else if(e){var p=x(e);if(typeof p=="function"&&p!==e.entries)for(var y=p.call(e),v;!(v=y.next()).done;)ue(v.value)&&ke(v.value,r)}}}function vr(e){{var r=e.type;if(r==null||typeof r=="string")return;var n;if(typeof r=="function")n=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===i||r.$$typeof===E))n=r.propTypes;else return;if(n){var o=A(r);Ze(n,e.props,"prop",o,e)}else if(r.PropTypes!==void 0&&!ie){ie=!0;var p=A(r);h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",p||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function pr(e){{for(var r=Object.keys(e.props),n=0;n<r.length;n++){var o=r[n];if(o!=="children"&&o!=="key"){W(e),h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",o),W(null);break}}e.ref!==null&&(W(e),h("Invalid attribute `ref` supplied to `React.Fragment`."),W(null))}}function Me(e,r,n,o,p,y){{var v=Ue(e);if(!v){var c="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(c+=" 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 S=fr(p);S?c+=S:c+=je();var _;e===null?_="null":ae(e)?_="array":e!==void 0&&e.$$typeof===a?(_="<"+(A(e.type)||"Unknown")+" />",c=" Did you accidentally export a JSX literal instead of a component?"):_=typeof e,h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",_,c)}var P=cr(e,r,n,p,y);if(P==null)return P;if(v){var j=r.children;if(j!==void 0)if(o)if(ae(j)){for(var B=0;B<j.length;B++)Ae(j[B],e);Object.freeze&&Object.freeze(j)}else h("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 Ae(j,e)}return e===l?pr(P):vr(P),P}}function gr(e,r,n){return Me(e,r,n,!0)}function hr(e,r,n){return Me(e,r,n,!1)}var br=hr,mr=gr;V.Fragment=l,V.jsx=br,V.jsxs=mr}()),V}(function(t){process.env.NODE_ENV==="production"?t.exports=xr():t.exports=Tr()})(Ye);const w=Ye.exports.jsx,le=({component:t,path:a,independentCombinators:d,...l})=>{const{useDrop:R}=O.useContext(q),{dropRef:b,dropMonitorId:f,isOver:s}=Rr({path:a,independentCombinators:d,useDrop:R}),i=s?m.standardClassnames.dndOver:"",g=m.c(i,m.standardClassnames.betweenRules);return w("div",{ref:b,className:g,"data-dropmonitorid":f,"data-testid":m.TestID.inlineCombinator,children:w(t,{...l,path:a,testID:m.TestID.combinators})},"dnd")};le.displayName="InlineCombinatorDnD";const ce=t=>{const a=O.useContext(q),{useDrag:d,useDrop:l}=a,{path:R,disabled:b,parentDisabled:f,actions:{moveRule:s},schema:{independentCombinators:i}}=t,u=Er({path:R,disabled:!!f||!!b,independentCombinators:i,moveRule:s,useDrag:d,useDrop:l}),E=O.useMemo(()=>`${t.schema.classNames.rule}${u.isOver?` ${m.standardClassnames.dndOver}`:""}${u.isDragging?` ${m.standardClassnames.dndDragging}`:""}`,[u.isDragging,u.isOver,t.schema.classNames.rule]),{rule:C}=a.baseControls;return w(q.Provider,{value:a,children:w(C,{...t,schema:{...t.schema,classNames:{...t.schema.classNames,rule:E}},...u})})};ce.displayName="RuleDnD";const fe=t=>{const a=O.useContext(q),{useDrag:d,useDrop:l}=a,{path:R,disabled:b,parentDisabled:f,actions:{moveRule:s},schema:{independentCombinators:i}}=t,u=_r({disabled:!!f||!!b,path:R,independentCombinators:i,moveRule:s,useDrag:d,useDrop:l}),E=O.useMemo(()=>({...t.schema,classNames:{...t.schema.classNames,header:`${t.schema.classNames.header}${u.isOver?` ${m.standardClassnames.dndOver}`:""}`,ruleGroup:`${t.schema.classNames.ruleGroup}${u.isDragging?` ${m.standardClassnames.dndDragging}`:""}`}}),[t.schema,u.isOver,u.isDragging]),{ruleGroup:C}=a.baseControls;return w(C,{...t,schema:E,...u})};fe.displayName="RuleGroupDnD";const Le=t=>{const{controlClassnames:a,controlElements:d,debugMode:l,enableDragAndDrop:R,enableMountQueryChange:b,translations:f}=t,s=m.useMergedContext({controlClassnames:a,controlElements:d,debugMode:l,enableDragAndDrop:R!=null?R:!0,enableMountQueryChange:b,translations:f!=null?f:{}}),{enableDragAndDrop:i}=s,g=Be(t.dnd),u=i&&g?"dnd":"no-dnd";if(!i||!g)return w(U.QueryBuilderContext.Provider,{value:{...s,enableDragAndDrop:!1,debugMode:l},children:t.children},u);const{DndProvider:E,HTML5Backend:C}=g;return w(E,{backend:C,debugMode:l,children:w(U.QueryBuilderContext.Provider,{value:{...s,enableDragAndDrop:i,debugMode:l},children:w(de,{dnd:g,children:t.children})},u)},u)};Le.displayName="QueryBuilderDnD";const de=t=>{var C,I,k,$,x,D,h,T,F,Q,H,J;const a=O.useContext(U.QueryBuilderContext),d=O.useContext(q),l=Be(t.dnd),R=m.usePreferProp(!1,t.debugMode,a.debugMode),b=m.usePreferProp(!0,t.enableDragAndDrop,a.enableDragAndDrop),f=b&&l?"dnd":"no-dnd";if(!b||!l)return w(U.QueryBuilderContext.Provider,{value:{...a,enableDragAndDrop:!1,debugMode:R},children:t.children},f);const{DndContext:s,useDrag:i,useDrop:g}=l,u={rule:($=(k=(C=t.controlElements)==null?void 0:C.rule)!=null?k:(I=a.controlElements)==null?void 0:I.rule)!=null?$:d.baseControls.rule,ruleGroup:(T=(h=(x=t.controlElements)==null?void 0:x.ruleGroup)!=null?h:(D=a.controlElements)==null?void 0:D.ruleGroup)!=null?T:d.baseControls.ruleGroup,combinatorSelector:(J=(H=(F=t.controlElements)==null?void 0:F.combinatorSelector)!=null?H:(Q=a.controlElements)==null?void 0:Q.combinatorSelector)!=null?J:d.baseControls.combinatorSelector},E={...a,controlElements:{...a.controlElements,ruleGroup:fe,rule:ce,inlineCombinator:le}};return w(s.Consumer,{children:()=>w(U.QueryBuilderContext.Provider,{value:E,children:w(q.Provider,{value:{useDrag:i,useDrop:g,baseControls:u},children:t.children})},f)},f)};de.displayName="QueryBuilderDndWithoutProvider";exports.InlineCombinatorDnD=le;exports.QueryBuilderDnD=Le;exports.QueryBuilderDndWithoutProvider=de;exports.RuleDnD=ce;exports.RuleGroupDnD=fe;exports.version=Dr;
Check the top-level render call using <`+n+">.")}return r}}function Ie(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var n=fr(r);if(je[n])return;je[n]=!0;var o="";e&&e._owner&&e._owner!==oe.current&&(o=" It was passed a child from "+A(e._owner.type)+"."),B(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.',n,o),B(null)}}function ke(e,r){{if(typeof e!="object")return;if(ne(e))for(var n=0;n<e.length;n++){var o=e[n];ie(o)&&Ie(o,r)}else if(ie(e))e._store&&(e._store.validated=!0);else if(e){var g=x(e);if(typeof g=="function"&&g!==e.entries)for(var y=g.call(e),v;!(v=y.next()).done;)ie(v.value)&&Ie(v.value,r)}}}function dr(e){{var r=e.type;if(r==null||typeof r=="string")return;var n;if(typeof r=="function")n=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===i||r.$$typeof===E))n=r.propTypes;else return;if(n){var o=A(r);Xe(n,e.props,"prop",o,e)}else if(r.PropTypes!==void 0&&!se){se=!0;var g=A(r);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",g||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function vr(e){{for(var r=Object.keys(e.props),n=0;n<r.length;n++){var o=r[n];if(o!=="children"&&o!=="key"){B(e),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",o),B(null);break}}e.ref!==null&&(B(e),b("Invalid attribute `ref` supplied to `React.Fragment`."),B(null))}}function Ae(e,r,n,o,g,y){{var v=Ve(e);if(!v){var c="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(c+=" 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 S=cr(g);S?c+=S:c+=we();var _;e===null?_="null":ne(e)?_="array":e!==void 0&&e.$$typeof===a?(_="<"+(A(e.type)||"Unknown")+" />",c=" Did you accidentally export a JSX literal instead of a component?"):_=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",_,c)}var P=lr(e,r,n,g,y);if(P==null)return P;if(v){var j=r.children;if(j!==void 0)if(o)if(ne(j)){for(var G=0;G<j.length;G++)ke(j[G],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 ke(j,e)}return e===l?vr(P):dr(P),P}}function pr(e,r,n){return Ae(e,r,n,!0)}function gr(e,r,n){return Ae(e,r,n,!1)}var hr=gr,br=pr;V.Fragment=l,V.jsx=hr,V.jsxs=br}()),V}(function(t){process.env.NODE_ENV==="production"?t.exports=Or():t.exports=xr()})(qe);const w=qe.exports.jsx,ue=({component:t,path:a,independentCombinators:d,...l})=>{const{useDrop:R}=O.useContext(W),{dropRef:m,dropMonitorId:f,isOver:s}=Dr({path:a,independentCombinators:d,useDrop:R}),i=s?p.standardClassnames.dndOver:"",h=p.c(i,p.standardClassnames.betweenRules);return w("div",{ref:m,className:h,"data-dropmonitorid":f,"data-testid":p.TestID.inlineCombinator,children:w(t,{...l,path:a,testID:p.TestID.combinators})},"dnd")};ue.displayName="InlineCombinatorDnD";const le=t=>{const a=O.useContext(W),{useDrag:d,useDrop:l}=a,{path:R,disabled:m,parentDisabled:f,actions:{moveRule:s},schema:{independentCombinators:i}}=t,u=Rr({path:R,disabled:!!f||!!m,independentCombinators:i,moveRule:s,useDrag:d,useDrop:l}),E=O.useMemo(()=>`${t.schema.classNames.rule}${u.isOver?` ${p.standardClassnames.dndOver}`:""}${u.isDragging?` ${p.standardClassnames.dndDragging}`:""}`,[u.isDragging,u.isOver,t.schema.classNames.rule]),{rule:C}=a.baseControls;return w(W.Provider,{value:a,children:w(C,{...t,schema:{...t.schema,classNames:{...t.schema.classNames,rule:E}},...u})})};le.displayName="RuleDnD";const ce=t=>{const a=O.useContext(W),{useDrag:d,useDrop:l}=a,{path:R,disabled:m,parentDisabled:f,actions:{moveRule:s},schema:{independentCombinators:i}}=t,u=Er({disabled:!!f||!!m,path:R,independentCombinators:i,moveRule:s,useDrag:d,useDrop:l}),E=O.useMemo(()=>({...t.schema,classNames:{...t.schema.classNames,header:`${t.schema.classNames.header}${u.isOver?` ${p.standardClassnames.dndOver}`:""}`,ruleGroup:`${t.schema.classNames.ruleGroup}${u.isDragging?` ${p.standardClassnames.dndDragging}`:""}`}}),[t.schema,u.isOver,u.isDragging]),{ruleGroup:C}=a.baseControls;return w(C,{...t,schema:E,...u})};ce.displayName="RuleGroupDnD";const Ye=t=>{const{controlClassnames:a,controlElements:d,debugMode:l,enableDragAndDrop:R,enableMountQueryChange:m,translations:f}=t,s=p.useMergedContext({controlClassnames:a,controlElements:d,debugMode:l,enableDragAndDrop:R!=null?R:!0,enableMountQueryChange:m,translations:f!=null?f:{}}),{enableDragAndDrop:i}=s,h=Be(t.dnd),u=i&&h?"dnd":"no-dnd";if(!i||!h)return w(p.QueryBuilderContext.Provider,{value:{...s,enableDragAndDrop:!1,debugMode:l},children:t.children},u);const{DndProvider:E,HTML5Backend:C}=h;return w(E,{backend:C,debugMode:l,children:w(p.QueryBuilderContext.Provider,{value:{...s,enableDragAndDrop:i,debugMode:l},children:w(fe,{dnd:h,children:t.children})},u)},u)};Ye.displayName="QueryBuilderDnD";const fe=t=>{var C,I,k,$,x,D,b,T,F,U,Q,H;const a=O.useContext(p.QueryBuilderContext),d=O.useContext(W),l=Be(t.dnd),R=p.usePreferProp(!1,t.debugMode,a.debugMode),m=p.usePreferProp(!0,t.enableDragAndDrop,a.enableDragAndDrop),f=m&&l?"dnd":"no-dnd";if(!m||!l)return w(p.QueryBuilderContext.Provider,{value:{...a,enableDragAndDrop:!1,debugMode:R},children:t.children},f);const{DndContext:s,useDrag:i,useDrop:h}=l,u={rule:($=(k=(C=t.controlElements)==null?void 0:C.rule)!=null?k:(I=a.controlElements)==null?void 0:I.rule)!=null?$:d.baseControls.rule,ruleGroup:(T=(b=(x=t.controlElements)==null?void 0:x.ruleGroup)!=null?b:(D=a.controlElements)==null?void 0:D.ruleGroup)!=null?T:d.baseControls.ruleGroup,combinatorSelector:(H=(Q=(F=t.controlElements)==null?void 0:F.combinatorSelector)!=null?Q:(U=a.controlElements)==null?void 0:U.combinatorSelector)!=null?H:d.baseControls.combinatorSelector},E={...a,controlElements:{...a.controlElements,ruleGroup:ce,rule:le,inlineCombinator:ue}};return w(s.Consumer,{children:()=>w(p.QueryBuilderContext.Provider,{value:E,children:w(W.Provider,{value:{useDrag:i,useDrop:h,baseControls:u},children:t.children})},f)},f)};fe.displayName="QueryBuilderDndWithoutProvider";exports.InlineCombinatorDnD=ue;exports.QueryBuilderDnD=Ye;exports.QueryBuilderDndWithoutProvider=fe;exports.RuleDnD=le;exports.RuleGroupDnD=ce;exports.version=yr;
//# sourceMappingURL=index.cjs.js.map
import Ye, { useRef as G, useState as Cr, useEffect as Or, createContext as Pr, useContext as J, useMemo as Be } from "react";
import { getParentPath as B, isAncestor as de, pathsAreEqual as Y, defaultControlElements as Tr, standardClassnames as L, c as xr, TestID as Me, useMergedContext as wr, usePreferProp as Ne } from "react-querybuilder";
import { QueryBuilderContext as Q } from "@react-querybuilder/ctx";
const Br = "5.0.0-alpha.7", Sr = ({
import { getParentPath as B, isAncestor as de, pathsAreEqual as Y, defaultControlElements as Tr, standardClassnames as L, c as xr, TestID as Me, useMergedContext as wr, QueryBuilderContext as Q, usePreferProp as Ne } from "react-querybuilder";
const Yr = "5.0.0-alpha.8", Sr = ({
path: t,

@@ -985,4 +984,4 @@ independentCombinators: a,

Qe as RuleGroupDnD,
Br as version
Yr as version
};
//# sourceMappingURL=index.es.js.map

@@ -1,2 +0,2 @@

(function(w,C){typeof exports=="object"&&typeof module<"u"?C(exports,require("react"),require("react-querybuilder"),require("@react-querybuilder/ctx")):typeof define=="function"&&define.amd?define(["exports","react","react-querybuilder","@react-querybuilder/ctx"],C):(w=typeof globalThis<"u"?globalThis:w||self,C(w.ReactQueryBuilderDnD={},w.React,w.ReactQueryBuilder,w.ReactQueryBuilderContext))})(this,function(w,C,D,V){"use strict";const pe=(t=>t&&typeof t=="object"&&"default"in t?t:{default:t})(C),He="5.0.0-alpha.7",qe=({path:t,independentCombinators:a,useDrop:h})=>{const c=C.useRef(null),[{isOver:b,dropMonitorId:m},f]=h(()=>({accept:["rule","ruleGroup"],canDrop:s=>{const i=D.getParentPath(t),p=D.getParentPath(s.path),u=t[t.length-1],y=s.path[s.path.length-1];return!(D.isAncestor(s.path,t)||D.pathsAreEqual(s.path,t)||D.pathsAreEqual(i,p)&&u-1===y||a&&D.pathsAreEqual(i,p)&&u===y-1)},collect:s=>{var i,p;return{isOver:s.canDrop()&&s.isOver(),dropMonitorId:(i=s.getHandlerId())!=null?i:"",dropEffect:((p=s.getDropResult())!=null?p:{}).dropEffect}},drop:()=>({type:"inlineCombinator",path:t})}),[t,a]);return f(c),{dropRef:c,dropMonitorId:m,isOver:b}},ge=t=>{const[a,h]=C.useState(t!=null?t:null);return C.useEffect(()=>{let c=!1;return a||(async()=>{const[m,f]=await Promise.all([import("react-dnd").catch(()=>null),import("react-dnd-html5-backend").catch(()=>null)]);c||m&&f&&h(()=>({...m,...f}))})(),()=>{c=!0}},[]),a},he=({type:t,path:a,disabled:h,moveRule:c,useDrag:b})=>b(()=>({type:t,item:{path:a},canDrag:!h,collect:m=>{var f;return{isDragging:!h&&m.isDragging(),dragMonitorId:(f=m.getHandlerId())!=null?f:""}},end(m,f){const s=f.getDropResult();if(!s)return;const i=D.getParentPath(s.path),p=s.path[s.path.length-1],u=s.type==="ruleGroup"?[...s.path,0]:s.type==="inlineCombinator"?[...i,p]:[...i,p+1];c(m.path,u,s.dropEffect==="copy")}}),[h,a]),Je=({path:t,disabled:a,independentCombinators:h,moveRule:c,useDrag:b,useDrop:m})=>{const f=C.useRef(null),s=C.useRef(null),[{isDragging:i,dragMonitorId:p},u,y]=he({type:"rule",path:t,disabled:a,independentCombinators:h,moveRule:c,useDrag:b}),[{isOver:P,dropMonitorId:A,dropEffect:k},N]=m(()=>({accept:["rule","ruleGroup"],canDrop:T=>{if(a)return!1;const E=D.getParentPath(t),g=D.getParentPath(T.path),x=t[t.length-1],B=T.path[T.path.length-1];return!(D.isAncestor(T.path,t)||D.pathsAreEqual(E,g)&&(x===B||x===B-1||h&&x===B-2))},collect:T=>{var E,g;return{isOver:T.canDrop()&&T.isOver(),dropMonitorId:(E=T.getHandlerId())!=null?E:"",dropEffect:((g=T.getDropResult())!=null?g:{}).dropEffect}},drop:()=>({type:"rule",path:t})}),[a,h,c,t]);return u(s),y(N(f)),{isDragging:i,dragMonitorId:p,isOver:P,dropMonitorId:A,dndRef:f,dragRef:s,dropEffect:k}},ze=({disabled:t,path:a,independentCombinators:h,moveRule:c,useDrag:b,useDrop:m})=>{const f=C.useRef(null),s=C.useRef(null),i=C.useRef(null),[{isDragging:p,dragMonitorId:u},y,P]=he({type:"ruleGroup",path:a,disabled:t,independentCombinators:h,moveRule:c,useDrag:b}),[{isOver:A,dropMonitorId:k,dropEffect:N},T]=m(()=>({accept:["rule","ruleGroup"],canDrop:E=>{if(t)return!1;const g=D.getParentPath(E.path),x=E.path[E.path.length-1];return!(D.isAncestor(E.path,a)||D.pathsAreEqual(a,g)&&x===0||D.pathsAreEqual(a,E.path))},collect:E=>{var g,x;return{isOver:E.canDrop()&&E.isOver(),dropMonitorId:(g=E.getHandlerId())!=null?g:"",dropEffect:((x=E.getDropResult())!=null?x:{}).dropEffect}},drop:(E,g)=>{var x;return(x=g.getDropResult())!=null?x:{type:"ruleGroup",path:a}}}),[t,c,a]);return a.length>0&&(y(s),P(f)),T(i),{isDragging:p,dragMonitorId:u,isOver:A,dropMonitorId:k,previewRef:f,dragRef:s,dropRef:i,dropEffect:N}},{rule:Ke,ruleGroup:$e,combinatorSelector:Xe}=D.defaultControlElements,W=C.createContext({baseControls:{rule:Ke,ruleGroup:$e,combinatorSelector:Xe}});W.displayName="QueryBuilderDndContext";var me={exports:{}},U={};/**
(function(w,C){typeof exports=="object"&&typeof module<"u"?C(exports,require("react"),require("react-querybuilder")):typeof define=="function"&&define.amd?define(["exports","react","react-querybuilder"],C):(w=typeof globalThis<"u"?globalThis:w||self,C(w.ReactQueryBuilderDnD={},w.React,w.ReactQueryBuilder))})(this,function(w,C,v){"use strict";const ve=(t=>t&&typeof t=="object"&&"default"in t?t:{default:t})(C),Ue="5.0.0-alpha.8",He=({path:t,independentCombinators:a,useDrop:m})=>{const c=C.useRef(null),[{isOver:b,dropMonitorId:D},f]=m(()=>({accept:["rule","ruleGroup"],canDrop:s=>{const i=v.getParentPath(t),g=v.getParentPath(s.path),l=t[t.length-1],y=s.path[s.path.length-1];return!(v.isAncestor(s.path,t)||v.pathsAreEqual(s.path,t)||v.pathsAreEqual(i,g)&&l-1===y||a&&v.pathsAreEqual(i,g)&&l===y-1)},collect:s=>{var i,g;return{isOver:s.canDrop()&&s.isOver(),dropMonitorId:(i=s.getHandlerId())!=null?i:"",dropEffect:((g=s.getDropResult())!=null?g:{}).dropEffect}},drop:()=>({type:"inlineCombinator",path:t})}),[t,a]);return f(c),{dropRef:c,dropMonitorId:D,isOver:b}},pe=t=>{const[a,m]=C.useState(t!=null?t:null);return C.useEffect(()=>{let c=!1;return a||(async()=>{const[D,f]=await Promise.all([import("react-dnd").catch(()=>null),import("react-dnd-html5-backend").catch(()=>null)]);c||D&&f&&m(()=>({...D,...f}))})(),()=>{c=!0}},[]),a},ge=({type:t,path:a,disabled:m,moveRule:c,useDrag:b})=>b(()=>({type:t,item:{path:a},canDrag:!m,collect:D=>{var f;return{isDragging:!m&&D.isDragging(),dragMonitorId:(f=D.getHandlerId())!=null?f:""}},end(D,f){const s=f.getDropResult();if(!s)return;const i=v.getParentPath(s.path),g=s.path[s.path.length-1],l=s.type==="ruleGroup"?[...s.path,0]:s.type==="inlineCombinator"?[...i,g]:[...i,g+1];c(D.path,l,s.dropEffect==="copy")}}),[m,a]),qe=({path:t,disabled:a,independentCombinators:m,moveRule:c,useDrag:b,useDrop:D})=>{const f=C.useRef(null),s=C.useRef(null),[{isDragging:i,dragMonitorId:g},l,y]=ge({type:"rule",path:t,disabled:a,independentCombinators:m,moveRule:c,useDrag:b}),[{isOver:P,dropMonitorId:A,dropEffect:k},N]=D(()=>({accept:["rule","ruleGroup"],canDrop:T=>{if(a)return!1;const E=v.getParentPath(t),h=v.getParentPath(T.path),x=t[t.length-1],B=T.path[T.path.length-1];return!(v.isAncestor(T.path,t)||v.pathsAreEqual(E,h)&&(x===B||x===B-1||m&&x===B-2))},collect:T=>{var E,h;return{isOver:T.canDrop()&&T.isOver(),dropMonitorId:(E=T.getHandlerId())!=null?E:"",dropEffect:((h=T.getDropResult())!=null?h:{}).dropEffect}},drop:()=>({type:"rule",path:t})}),[a,m,c,t]);return l(s),y(N(f)),{isDragging:i,dragMonitorId:g,isOver:P,dropMonitorId:A,dndRef:f,dragRef:s,dropEffect:k}},Je=({disabled:t,path:a,independentCombinators:m,moveRule:c,useDrag:b,useDrop:D})=>{const f=C.useRef(null),s=C.useRef(null),i=C.useRef(null),[{isDragging:g,dragMonitorId:l},y,P]=ge({type:"ruleGroup",path:a,disabled:t,independentCombinators:m,moveRule:c,useDrag:b}),[{isOver:A,dropMonitorId:k,dropEffect:N},T]=D(()=>({accept:["rule","ruleGroup"],canDrop:E=>{if(t)return!1;const h=v.getParentPath(E.path),x=E.path[E.path.length-1];return!(v.isAncestor(E.path,a)||v.pathsAreEqual(a,h)&&x===0||v.pathsAreEqual(a,E.path))},collect:E=>{var h,x;return{isOver:E.canDrop()&&E.isOver(),dropMonitorId:(h=E.getHandlerId())!=null?h:"",dropEffect:((x=E.getDropResult())!=null?x:{}).dropEffect}},drop:(E,h)=>{var x;return(x=h.getDropResult())!=null?x:{type:"ruleGroup",path:a}}}),[t,c,a]);return a.length>0&&(y(s),P(f)),T(i),{isDragging:g,dragMonitorId:l,isOver:A,dropMonitorId:k,previewRef:f,dragRef:s,dropRef:i,dropEffect:N}},{rule:ze,ruleGroup:Ke,combinatorSelector:$e}=v.defaultControlElements,W=C.createContext({baseControls:{rule:ze,ruleGroup:Ke,combinatorSelector:$e}});W.displayName="QueryBuilderDndContext";var he={exports:{}},V={};/**
* @license React

@@ -9,3 +9,3 @@ * react-jsx-runtime.production.min.js

* LICENSE file in the root directory of this source tree.
*/var De;function Ze(){if(De)return U;De=1;var t=pe.default,a=Symbol.for("react.element"),h=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,b=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,m={key:!0,ref:!0,__self:!0,__source:!0};function f(s,i,p){var u,y={},P=null,A=null;p!==void 0&&(P=""+p),i.key!==void 0&&(P=""+i.key),i.ref!==void 0&&(A=i.ref);for(u in i)c.call(i,u)&&!m.hasOwnProperty(u)&&(y[u]=i[u]);if(s&&s.defaultProps)for(u in i=s.defaultProps,i)y[u]===void 0&&(y[u]=i[u]);return{$$typeof:a,type:s,key:P,ref:A,props:y,_owner:b.current}}return U.Fragment=h,U.jsx=f,U.jsxs=f,U}var H={};/**
*/var me;function Xe(){if(me)return V;me=1;var t=ve.default,a=Symbol.for("react.element"),m=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,b=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,D={key:!0,ref:!0,__self:!0,__source:!0};function f(s,i,g){var l,y={},P=null,A=null;g!==void 0&&(P=""+g),i.key!==void 0&&(P=""+i.key),i.ref!==void 0&&(A=i.ref);for(l in i)c.call(i,l)&&!D.hasOwnProperty(l)&&(y[l]=i[l]);if(s&&s.defaultProps)for(l in i=s.defaultProps,i)y[l]===void 0&&(y[l]=i[l]);return{$$typeof:a,type:s,key:P,ref:A,props:y,_owner:b.current}}return V.Fragment=m,V.jsx=f,V.jsxs=f,V}var U={};/**
* @license React

@@ -18,13 +18,13 @@ * react-jsx-runtime.development.js

* LICENSE file in the root directory of this source tree.
*/var Re;function Qe(){return Re||(Re=1,process.env.NODE_ENV!=="production"&&function(){var t=pe.default,a=Symbol.for("react.element"),h=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),s=Symbol.for("react.context"),i=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),A=Symbol.for("react.offscreen"),k=Symbol.iterator,N="@@iterator";function T(e){if(e===null||typeof e!="object")return null;var r=k&&e[k]||e[N];return typeof r=="function"?r:null}var E=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(e){{for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];x("error",e,n)}}function x(e,r,n){{var o=E.ReactDebugCurrentFrame,v=o.getStackAddendum();v!==""&&(r+="%s",n=n.concat([v]));var R=n.map(function(d){return String(d)});R.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,R)}}var B=!1,z=!1,K=!1,$=!1,er=!1,be;be=Symbol.for("react.module.reference");function rr(e){return!!(typeof e=="string"||typeof e=="function"||e===c||e===m||er||e===b||e===p||e===u||$||e===A||B||z||K||typeof e=="object"&&e!==null&&(e.$$typeof===P||e.$$typeof===y||e.$$typeof===f||e.$$typeof===s||e.$$typeof===i||e.$$typeof===be||e.getModuleId!==void 0))}function nr(e,r,n){var o=e.displayName;if(o)return o;var v=r.displayName||r.name||"";return v!==""?n+"("+v+")":n}function ye(e){return e.displayName||"Context"}function M(e){if(e==null)return null;if(typeof e.tag=="number"&&g("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 c:return"Fragment";case h:return"Portal";case m:return"Profiler";case b:return"StrictMode";case p:return"Suspense";case u:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case s:var r=e;return ye(r)+".Consumer";case f:var n=e;return ye(n._context)+".Provider";case i:return nr(e,e.render,"ForwardRef");case y:var o=e.displayName||null;return o!==null?o:M(e.type)||"Memo";case P:{var v=e,R=v._payload,d=v._init;try{return M(d(R))}catch{return null}}}return null}var G=Object.assign,q=0,Ce,_e,Pe,Oe,Te,xe,Se;function we(){}we.__reactDisabledLog=!0;function tr(){{if(q===0){Ce=console.log,_e=console.info,Pe=console.warn,Oe=console.error,Te=console.group,xe=console.groupCollapsed,Se=console.groupEnd;var e={configurable:!0,enumerable:!0,value:we,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}q++}}function ar(){{if(q--,q===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:G({},e,{value:Ce}),info:G({},e,{value:_e}),warn:G({},e,{value:Pe}),error:G({},e,{value:Oe}),group:G({},e,{value:Te}),groupCollapsed:G({},e,{value:xe}),groupEnd:G({},e,{value:Se})})}q<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var se=E.ReactCurrentDispatcher,ie;function X(e,r,n){{if(ie===void 0)try{throw Error()}catch(v){var o=v.stack.trim().match(/\n( *(at )?)/);ie=o&&o[1]||""}return`
`+ie+e}}var ue=!1,Z;{var or=typeof WeakMap=="function"?WeakMap:Map;Z=new or}function Ie(e,r){if(!e||ue)return"";{var n=Z.get(e);if(n!==void 0)return n}var o;ue=!0;var v=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var R;R=se.current,se.current=null,tr();try{if(r){var d=function(){throw Error()};if(Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(F){o=F}Reflect.construct(e,[],d)}else{try{d.call()}catch(F){o=F}e.call(d.prototype)}}else{try{throw Error()}catch(F){o=F}e()}}catch(F){if(F&&o&&typeof F.stack=="string"){for(var l=F.stack.split(`
*/var De;function Ze(){return De||(De=1,process.env.NODE_ENV!=="production"&&function(){var t=ve.default,a=Symbol.for("react.element"),m=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),s=Symbol.for("react.context"),i=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),A=Symbol.for("react.offscreen"),k=Symbol.iterator,N="@@iterator";function T(e){if(e===null||typeof e!="object")return null;var r=k&&e[k]||e[N];return typeof r=="function"?r:null}var E=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function h(e){{for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];x("error",e,n)}}function x(e,r,n){{var o=E.ReactDebugCurrentFrame,p=o.getStackAddendum();p!==""&&(r+="%s",n=n.concat([p]));var R=n.map(function(d){return String(d)});R.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,R)}}var B=!1,J=!1,z=!1,K=!1,Qe=!1,Ee;Ee=Symbol.for("react.module.reference");function er(e){return!!(typeof e=="string"||typeof e=="function"||e===c||e===D||Qe||e===b||e===g||e===l||K||e===A||B||J||z||typeof e=="object"&&e!==null&&(e.$$typeof===P||e.$$typeof===y||e.$$typeof===f||e.$$typeof===s||e.$$typeof===i||e.$$typeof===Ee||e.getModuleId!==void 0))}function rr(e,r,n){var o=e.displayName;if(o)return o;var p=r.displayName||r.name||"";return p!==""?n+"("+p+")":n}function be(e){return e.displayName||"Context"}function M(e){if(e==null)return null;if(typeof e.tag=="number"&&h("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 c:return"Fragment";case m:return"Portal";case D:return"Profiler";case b:return"StrictMode";case g:return"Suspense";case l:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case s:var r=e;return be(r)+".Consumer";case f:var n=e;return be(n._context)+".Provider";case i:return rr(e,e.render,"ForwardRef");case y:var o=e.displayName||null;return o!==null?o:M(e.type)||"Memo";case P:{var p=e,R=p._payload,d=p._init;try{return M(d(R))}catch{return null}}}return null}var G=Object.assign,H=0,ye,Ce,_e,Pe,Oe,Te,xe;function Se(){}Se.__reactDisabledLog=!0;function nr(){{if(H===0){ye=console.log,Ce=console.info,_e=console.warn,Pe=console.error,Oe=console.group,Te=console.groupCollapsed,xe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Se,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}H++}}function tr(){{if(H--,H===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:G({},e,{value:ye}),info:G({},e,{value:Ce}),warn:G({},e,{value:_e}),error:G({},e,{value:Pe}),group:G({},e,{value:Oe}),groupCollapsed:G({},e,{value:Te}),groupEnd:G({},e,{value:xe})})}H<0&&h("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var oe=E.ReactCurrentDispatcher,se;function $(e,r,n){{if(se===void 0)try{throw Error()}catch(p){var o=p.stack.trim().match(/\n( *(at )?)/);se=o&&o[1]||""}return`
`+se+e}}var ie=!1,X;{var ar=typeof WeakMap=="function"?WeakMap:Map;X=new ar}function we(e,r){if(!e||ie)return"";{var n=X.get(e);if(n!==void 0)return n}var o;ie=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var R;R=oe.current,oe.current=null,nr();try{if(r){var d=function(){throw Error()};if(Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(F){o=F}Reflect.construct(e,[],d)}else{try{d.call()}catch(F){o=F}e.call(d.prototype)}}else{try{throw Error()}catch(F){o=F}e()}}catch(F){if(F&&o&&typeof F.stack=="string"){for(var u=F.stack.split(`
`),S=o.stack.split(`
`),_=l.length-1,O=S.length-1;_>=1&&O>=0&&l[_]!==S[O];)O--;for(;_>=1&&O>=0;_--,O--)if(l[_]!==S[O]){if(_!==1||O!==1)do if(_--,O--,O<0||l[_]!==S[O]){var j=`
`+l[_].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(_>=1&&O>=0);break}}}finally{ue=!1,se.current=R,ar(),Error.prepareStackTrace=v}var L=e?e.displayName||e.name:"",Ue=L?X(L):"";return typeof e=="function"&&Z.set(e,Ue),Ue}function sr(e,r,n){return Ie(e,!1)}function ir(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function Q(e,r,n){if(e==null)return"";if(typeof e=="function")return Ie(e,ir(e));if(typeof e=="string")return X(e);switch(e){case p:return X("Suspense");case u:return X("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case i:return sr(e.render);case y:return Q(e.type,r,n);case P:{var o=e,v=o._payload,R=o._init;try{return Q(R(v),r,n)}catch{}}}return""}var ee=Object.prototype.hasOwnProperty,je={},Ae=E.ReactDebugCurrentFrame;function re(e){if(e){var r=e._owner,n=Q(e.type,e._source,r?r.type:null);Ae.setExtraStackFrame(n)}else Ae.setExtraStackFrame(null)}function ur(e,r,n,o,v){{var R=Function.call.bind(ee);for(var d in e)if(R(e,d)){var l=void 0;try{if(typeof e[d]!="function"){var S=Error((o||"React class")+": "+n+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw S.name="Invariant Violation",S}l=e[d](r,d,o,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(_){l=_}l&&!(l instanceof Error)&&(re(v),g("%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).",o||"React class",n,d,typeof l),re(null)),l instanceof Error&&!(l.message in je)&&(je[l.message]=!0,re(v),g("Failed %s type: %s",n,l.message),re(null))}}}var lr=Array.isArray;function le(e){return lr(e)}function cr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,n=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n}}function fr(e){try{return ke(e),!1}catch{return!0}}function ke(e){return""+e}function Me(e){if(fr(e))return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",cr(e)),ke(e)}var J=E.ReactCurrentOwner,dr={key:!0,ref:!0,__self:!0,__source:!0},Fe,Ne,ce;ce={};function vr(e){if(ee.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function pr(e){if(ee.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function gr(e,r){if(typeof e.ref=="string"&&J.current&&r&&J.current.stateNode!==r){var n=M(J.current.type);ce[n]||(g('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',M(J.current.type),e.ref),ce[n]=!0)}}function hr(e,r){{var n=function(){Fe||(Fe=!0,g("%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)",r))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}}function mr(e,r){{var n=function(){Ne||(Ne=!0,g("%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)",r))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}}var Dr=function(e,r,n,o,v,R,d){var l={$$typeof:a,type:e,key:r,ref:n,props:d,_owner:R};return l._store={},Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:v}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l};function Rr(e,r,n,o,v){{var R,d={},l=null,S=null;n!==void 0&&(Me(n),l=""+n),pr(r)&&(Me(r.key),l=""+r.key),vr(r)&&(S=r.ref,gr(r,v));for(R in r)ee.call(r,R)&&!dr.hasOwnProperty(R)&&(d[R]=r[R]);if(e&&e.defaultProps){var _=e.defaultProps;for(R in _)d[R]===void 0&&(d[R]=_[R])}if(l||S){var O=typeof e=="function"?e.displayName||e.name||"Unknown":e;l&&hr(d,O),S&&mr(d,O)}return Dr(e,l,S,v,o,J.current,d)}}var fe=E.ReactCurrentOwner,Be=E.ReactDebugCurrentFrame;function Y(e){if(e){var r=e._owner,n=Q(e.type,e._source,r?r.type:null);Be.setExtraStackFrame(n)}else Be.setExtraStackFrame(null)}var de;de=!1;function ve(e){return typeof e=="object"&&e!==null&&e.$$typeof===a}function We(){{if(fe.current){var e=M(fe.current.type);if(e)return`
`),_=u.length-1,O=S.length-1;_>=1&&O>=0&&u[_]!==S[O];)O--;for(;_>=1&&O>=0;_--,O--)if(u[_]!==S[O]){if(_!==1||O!==1)do if(_--,O--,O<0||u[_]!==S[O]){var j=`
`+u[_].replace(" at new "," at ");return e.displayName&&j.includes("<anonymous>")&&(j=j.replace("<anonymous>",e.displayName)),typeof e=="function"&&X.set(e,j),j}while(_>=1&&O>=0);break}}}finally{ie=!1,oe.current=R,tr(),Error.prepareStackTrace=p}var L=e?e.displayName||e.name:"",Ve=L?$(L):"";return typeof e=="function"&&X.set(e,Ve),Ve}function or(e,r,n){return we(e,!1)}function sr(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function Z(e,r,n){if(e==null)return"";if(typeof e=="function")return we(e,sr(e));if(typeof e=="string")return $(e);switch(e){case g:return $("Suspense");case l:return $("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case i:return or(e.render);case y:return Z(e.type,r,n);case P:{var o=e,p=o._payload,R=o._init;try{return Z(R(p),r,n)}catch{}}}return""}var Q=Object.prototype.hasOwnProperty,Ie={},je=E.ReactDebugCurrentFrame;function ee(e){if(e){var r=e._owner,n=Z(e.type,e._source,r?r.type:null);je.setExtraStackFrame(n)}else je.setExtraStackFrame(null)}function ir(e,r,n,o,p){{var R=Function.call.bind(Q);for(var d in e)if(R(e,d)){var u=void 0;try{if(typeof e[d]!="function"){var S=Error((o||"React class")+": "+n+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw S.name="Invariant Violation",S}u=e[d](r,d,o,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(_){u=_}u&&!(u instanceof Error)&&(ee(p),h("%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).",o||"React class",n,d,typeof u),ee(null)),u instanceof Error&&!(u.message in Ie)&&(Ie[u.message]=!0,ee(p),h("Failed %s type: %s",n,u.message),ee(null))}}}var lr=Array.isArray;function le(e){return lr(e)}function ur(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,n=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n}}function cr(e){try{return Ae(e),!1}catch{return!0}}function Ae(e){return""+e}function ke(e){if(cr(e))return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ur(e)),Ae(e)}var q=E.ReactCurrentOwner,fr={key:!0,ref:!0,__self:!0,__source:!0},Me,Fe,ue;ue={};function dr(e){if(Q.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function vr(e){if(Q.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function pr(e,r){if(typeof e.ref=="string"&&q.current&&r&&q.current.stateNode!==r){var n=M(q.current.type);ue[n]||(h('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',M(q.current.type),e.ref),ue[n]=!0)}}function gr(e,r){{var n=function(){Me||(Me=!0,h("%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)",r))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}}function hr(e,r){{var n=function(){Fe||(Fe=!0,h("%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)",r))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}}var mr=function(e,r,n,o,p,R,d){var u={$$typeof:a,type:e,key:r,ref:n,props:d,_owner:R};return u._store={},Object.defineProperty(u._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(u,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(u,"_source",{configurable:!1,enumerable:!1,writable:!1,value:p}),Object.freeze&&(Object.freeze(u.props),Object.freeze(u)),u};function Dr(e,r,n,o,p){{var R,d={},u=null,S=null;n!==void 0&&(ke(n),u=""+n),vr(r)&&(ke(r.key),u=""+r.key),dr(r)&&(S=r.ref,pr(r,p));for(R in r)Q.call(r,R)&&!fr.hasOwnProperty(R)&&(d[R]=r[R]);if(e&&e.defaultProps){var _=e.defaultProps;for(R in _)d[R]===void 0&&(d[R]=_[R])}if(u||S){var O=typeof e=="function"?e.displayName||e.name||"Unknown":e;u&&gr(d,O),S&&hr(d,O)}return mr(e,u,S,p,o,q.current,d)}}var ce=E.ReactCurrentOwner,Ne=E.ReactDebugCurrentFrame;function Y(e){if(e){var r=e._owner,n=Z(e.type,e._source,r?r.type:null);Ne.setExtraStackFrame(n)}else Ne.setExtraStackFrame(null)}var fe;fe=!1;function de(e){return typeof e=="object"&&e!==null&&e.$$typeof===a}function Be(){{if(ce.current){var e=M(ce.current.type);if(e)return`
Check the render method of \``+e+"`."}return""}}function Er(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),n=e.lineNumber;return`
Check the render method of \``+e+"`."}return""}}function Rr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),n=e.lineNumber;return`
Check your code at `+r+":"+n+"."}return""}}var Ge={};function br(e){{var r=We();if(!r){var n=typeof e=="string"?e:e.displayName||e.name;n&&(r=`
Check your code at `+r+":"+n+"."}return""}}var We={};function Er(e){{var r=Be();if(!r){var n=typeof e=="string"?e:e.displayName||e.name;n&&(r=`
Check the top-level render call using <`+n+">.")}return r}}function Ye(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var n=br(r);if(Ge[n])return;Ge[n]=!0;var o="";e&&e._owner&&e._owner!==fe.current&&(o=" It was passed a child from "+M(e._owner.type)+"."),Y(e),g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,o),Y(null)}}function Le(e,r){{if(typeof e!="object")return;if(le(e))for(var n=0;n<e.length;n++){var o=e[n];ve(o)&&Ye(o,r)}else if(ve(e))e._store&&(e._store.validated=!0);else if(e){var v=T(e);if(typeof v=="function"&&v!==e.entries)for(var R=v.call(e),d;!(d=R.next()).done;)ve(d.value)&&Ye(d.value,r)}}}function yr(e){{var r=e.type;if(r==null||typeof r=="string")return;var n;if(typeof r=="function")n=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===i||r.$$typeof===y))n=r.propTypes;else return;if(n){var o=M(r);ur(n,e.props,"prop",o,e)}else if(r.PropTypes!==void 0&&!de){de=!0;var v=M(r);g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",v||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Cr(e){{for(var r=Object.keys(e.props),n=0;n<r.length;n++){var o=r[n];if(o!=="children"&&o!=="key"){Y(e),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",o),Y(null);break}}e.ref!==null&&(Y(e),g("Invalid attribute `ref` supplied to `React.Fragment`."),Y(null))}}function Ve(e,r,n,o,v,R){{var d=rr(e);if(!d){var l="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(l+=" 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 S=Er(v);S?l+=S:l+=We();var _;e===null?_="null":le(e)?_="array":e!==void 0&&e.$$typeof===a?(_="<"+(M(e.type)||"Unknown")+" />",l=" Did you accidentally export a JSX literal instead of a component?"):_=typeof e,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",_,l)}var O=Rr(e,r,n,v,R);if(O==null)return O;if(d){var j=r.children;if(j!==void 0)if(o)if(le(j)){for(var L=0;L<j.length;L++)Le(j[L],e);Object.freeze&&Object.freeze(j)}else g("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 Le(j,e)}return e===c?Cr(O):yr(O),O}}function _r(e,r,n){return Ve(e,r,n,!0)}function Pr(e,r,n){return Ve(e,r,n,!1)}var Or=Pr,Tr=_r;H.Fragment=c,H.jsx=Or,H.jsxs=Tr}()),H}(function(t){process.env.NODE_ENV==="production"?t.exports=Ze():t.exports=Qe()})(me);const I=me.exports.jsx,ne=({component:t,path:a,independentCombinators:h,...c})=>{const{useDrop:b}=C.useContext(W),{dropRef:m,dropMonitorId:f,isOver:s}=qe({path:a,independentCombinators:h,useDrop:b}),i=s?D.standardClassnames.dndOver:"",p=D.c(i,D.standardClassnames.betweenRules);return I("div",{ref:m,className:p,"data-dropmonitorid":f,"data-testid":D.TestID.inlineCombinator,children:I(t,{...c,path:a,testID:D.TestID.combinators})},"dnd")};ne.displayName="InlineCombinatorDnD";const te=t=>{const a=C.useContext(W),{useDrag:h,useDrop:c}=a,{path:b,disabled:m,parentDisabled:f,actions:{moveRule:s},schema:{independentCombinators:i}}=t,u=Je({path:b,disabled:!!f||!!m,independentCombinators:i,moveRule:s,useDrag:h,useDrop:c}),y=C.useMemo(()=>`${t.schema.classNames.rule}${u.isOver?` ${D.standardClassnames.dndOver}`:""}${u.isDragging?` ${D.standardClassnames.dndDragging}`:""}`,[u.isDragging,u.isOver,t.schema.classNames.rule]),{rule:P}=a.baseControls;return I(W.Provider,{value:a,children:I(P,{...t,schema:{...t.schema,classNames:{...t.schema.classNames,rule:y}},...u})})};te.displayName="RuleDnD";const ae=t=>{const a=C.useContext(W),{useDrag:h,useDrop:c}=a,{path:b,disabled:m,parentDisabled:f,actions:{moveRule:s},schema:{independentCombinators:i}}=t,u=ze({disabled:!!f||!!m,path:b,independentCombinators:i,moveRule:s,useDrag:h,useDrop:c}),y=C.useMemo(()=>({...t.schema,classNames:{...t.schema.classNames,header:`${t.schema.classNames.header}${u.isOver?` ${D.standardClassnames.dndOver}`:""}`,ruleGroup:`${t.schema.classNames.ruleGroup}${u.isDragging?` ${D.standardClassnames.dndDragging}`:""}`}}),[t.schema,u.isOver,u.isDragging]),{ruleGroup:P}=a.baseControls;return I(P,{...t,schema:y,...u})};ae.displayName="RuleGroupDnD";const Ee=t=>{const{controlClassnames:a,controlElements:h,debugMode:c,enableDragAndDrop:b,enableMountQueryChange:m,translations:f}=t,s=D.useMergedContext({controlClassnames:a,controlElements:h,debugMode:c,enableDragAndDrop:b!=null?b:!0,enableMountQueryChange:m,translations:f!=null?f:{}}),{enableDragAndDrop:i}=s,p=ge(t.dnd),u=i&&p?"dnd":"no-dnd";if(!i||!p)return I(V.QueryBuilderContext.Provider,{value:{...s,enableDragAndDrop:!1,debugMode:c},children:t.children},u);const{DndProvider:y,HTML5Backend:P}=p;return I(y,{backend:P,debugMode:c,children:I(V.QueryBuilderContext.Provider,{value:{...s,enableDragAndDrop:i,debugMode:c},children:I(oe,{dnd:p,children:t.children})},u)},u)};Ee.displayName="QueryBuilderDnD";const oe=t=>{var P,A,k,N,T,E,g,x,B,z,K,$;const a=C.useContext(V.QueryBuilderContext),h=C.useContext(W),c=ge(t.dnd),b=D.usePreferProp(!1,t.debugMode,a.debugMode),m=D.usePreferProp(!0,t.enableDragAndDrop,a.enableDragAndDrop),f=m&&c?"dnd":"no-dnd";if(!m||!c)return I(V.QueryBuilderContext.Provider,{value:{...a,enableDragAndDrop:!1,debugMode:b},children:t.children},f);const{DndContext:s,useDrag:i,useDrop:p}=c,u={rule:(N=(k=(P=t.controlElements)==null?void 0:P.rule)!=null?k:(A=a.controlElements)==null?void 0:A.rule)!=null?N:h.baseControls.rule,ruleGroup:(x=(g=(T=t.controlElements)==null?void 0:T.ruleGroup)!=null?g:(E=a.controlElements)==null?void 0:E.ruleGroup)!=null?x:h.baseControls.ruleGroup,combinatorSelector:($=(K=(B=t.controlElements)==null?void 0:B.combinatorSelector)!=null?K:(z=a.controlElements)==null?void 0:z.combinatorSelector)!=null?$:h.baseControls.combinatorSelector},y={...a,controlElements:{...a.controlElements,ruleGroup:ae,rule:te,inlineCombinator:ne}};return I(s.Consumer,{children:()=>I(V.QueryBuilderContext.Provider,{value:y,children:I(W.Provider,{value:{useDrag:i,useDrop:p,baseControls:u},children:t.children})},f)},f)};oe.displayName="QueryBuilderDndWithoutProvider",w.InlineCombinatorDnD=ne,w.QueryBuilderDnD=Ee,w.QueryBuilderDndWithoutProvider=oe,w.RuleDnD=te,w.RuleGroupDnD=ae,w.version=He,Object.defineProperties(w,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
Check the top-level render call using <`+n+">.")}return r}}function Ge(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var n=Er(r);if(We[n])return;We[n]=!0;var o="";e&&e._owner&&e._owner!==ce.current&&(o=" It was passed a child from "+M(e._owner.type)+"."),Y(e),h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,o),Y(null)}}function Ye(e,r){{if(typeof e!="object")return;if(le(e))for(var n=0;n<e.length;n++){var o=e[n];de(o)&&Ge(o,r)}else if(de(e))e._store&&(e._store.validated=!0);else if(e){var p=T(e);if(typeof p=="function"&&p!==e.entries)for(var R=p.call(e),d;!(d=R.next()).done;)de(d.value)&&Ge(d.value,r)}}}function br(e){{var r=e.type;if(r==null||typeof r=="string")return;var n;if(typeof r=="function")n=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===i||r.$$typeof===y))n=r.propTypes;else return;if(n){var o=M(r);ir(n,e.props,"prop",o,e)}else if(r.PropTypes!==void 0&&!fe){fe=!0;var p=M(r);h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",p||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function yr(e){{for(var r=Object.keys(e.props),n=0;n<r.length;n++){var o=r[n];if(o!=="children"&&o!=="key"){Y(e),h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",o),Y(null);break}}e.ref!==null&&(Y(e),h("Invalid attribute `ref` supplied to `React.Fragment`."),Y(null))}}function Le(e,r,n,o,p,R){{var d=er(e);if(!d){var u="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(u+=" 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 S=Rr(p);S?u+=S:u+=Be();var _;e===null?_="null":le(e)?_="array":e!==void 0&&e.$$typeof===a?(_="<"+(M(e.type)||"Unknown")+" />",u=" Did you accidentally export a JSX literal instead of a component?"):_=typeof e,h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",_,u)}var O=Dr(e,r,n,p,R);if(O==null)return O;if(d){var j=r.children;if(j!==void 0)if(o)if(le(j)){for(var L=0;L<j.length;L++)Ye(j[L],e);Object.freeze&&Object.freeze(j)}else h("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 Ye(j,e)}return e===c?yr(O):br(O),O}}function Cr(e,r,n){return Le(e,r,n,!0)}function _r(e,r,n){return Le(e,r,n,!1)}var Pr=_r,Or=Cr;U.Fragment=c,U.jsx=Pr,U.jsxs=Or}()),U}(function(t){process.env.NODE_ENV==="production"?t.exports=Xe():t.exports=Ze()})(he);const I=he.exports.jsx,re=({component:t,path:a,independentCombinators:m,...c})=>{const{useDrop:b}=C.useContext(W),{dropRef:D,dropMonitorId:f,isOver:s}=He({path:a,independentCombinators:m,useDrop:b}),i=s?v.standardClassnames.dndOver:"",g=v.c(i,v.standardClassnames.betweenRules);return I("div",{ref:D,className:g,"data-dropmonitorid":f,"data-testid":v.TestID.inlineCombinator,children:I(t,{...c,path:a,testID:v.TestID.combinators})},"dnd")};re.displayName="InlineCombinatorDnD";const ne=t=>{const a=C.useContext(W),{useDrag:m,useDrop:c}=a,{path:b,disabled:D,parentDisabled:f,actions:{moveRule:s},schema:{independentCombinators:i}}=t,l=qe({path:b,disabled:!!f||!!D,independentCombinators:i,moveRule:s,useDrag:m,useDrop:c}),y=C.useMemo(()=>`${t.schema.classNames.rule}${l.isOver?` ${v.standardClassnames.dndOver}`:""}${l.isDragging?` ${v.standardClassnames.dndDragging}`:""}`,[l.isDragging,l.isOver,t.schema.classNames.rule]),{rule:P}=a.baseControls;return I(W.Provider,{value:a,children:I(P,{...t,schema:{...t.schema,classNames:{...t.schema.classNames,rule:y}},...l})})};ne.displayName="RuleDnD";const te=t=>{const a=C.useContext(W),{useDrag:m,useDrop:c}=a,{path:b,disabled:D,parentDisabled:f,actions:{moveRule:s},schema:{independentCombinators:i}}=t,l=Je({disabled:!!f||!!D,path:b,independentCombinators:i,moveRule:s,useDrag:m,useDrop:c}),y=C.useMemo(()=>({...t.schema,classNames:{...t.schema.classNames,header:`${t.schema.classNames.header}${l.isOver?` ${v.standardClassnames.dndOver}`:""}`,ruleGroup:`${t.schema.classNames.ruleGroup}${l.isDragging?` ${v.standardClassnames.dndDragging}`:""}`}}),[t.schema,l.isOver,l.isDragging]),{ruleGroup:P}=a.baseControls;return I(P,{...t,schema:y,...l})};te.displayName="RuleGroupDnD";const Re=t=>{const{controlClassnames:a,controlElements:m,debugMode:c,enableDragAndDrop:b,enableMountQueryChange:D,translations:f}=t,s=v.useMergedContext({controlClassnames:a,controlElements:m,debugMode:c,enableDragAndDrop:b!=null?b:!0,enableMountQueryChange:D,translations:f!=null?f:{}}),{enableDragAndDrop:i}=s,g=pe(t.dnd),l=i&&g?"dnd":"no-dnd";if(!i||!g)return I(v.QueryBuilderContext.Provider,{value:{...s,enableDragAndDrop:!1,debugMode:c},children:t.children},l);const{DndProvider:y,HTML5Backend:P}=g;return I(y,{backend:P,debugMode:c,children:I(v.QueryBuilderContext.Provider,{value:{...s,enableDragAndDrop:i,debugMode:c},children:I(ae,{dnd:g,children:t.children})},l)},l)};Re.displayName="QueryBuilderDnD";const ae=t=>{var P,A,k,N,T,E,h,x,B,J,z,K;const a=C.useContext(v.QueryBuilderContext),m=C.useContext(W),c=pe(t.dnd),b=v.usePreferProp(!1,t.debugMode,a.debugMode),D=v.usePreferProp(!0,t.enableDragAndDrop,a.enableDragAndDrop),f=D&&c?"dnd":"no-dnd";if(!D||!c)return I(v.QueryBuilderContext.Provider,{value:{...a,enableDragAndDrop:!1,debugMode:b},children:t.children},f);const{DndContext:s,useDrag:i,useDrop:g}=c,l={rule:(N=(k=(P=t.controlElements)==null?void 0:P.rule)!=null?k:(A=a.controlElements)==null?void 0:A.rule)!=null?N:m.baseControls.rule,ruleGroup:(x=(h=(T=t.controlElements)==null?void 0:T.ruleGroup)!=null?h:(E=a.controlElements)==null?void 0:E.ruleGroup)!=null?x:m.baseControls.ruleGroup,combinatorSelector:(K=(z=(B=t.controlElements)==null?void 0:B.combinatorSelector)!=null?z:(J=a.controlElements)==null?void 0:J.combinatorSelector)!=null?K:m.baseControls.combinatorSelector},y={...a,controlElements:{...a.controlElements,ruleGroup:te,rule:ne,inlineCombinator:re}};return I(s.Consumer,{children:()=>I(v.QueryBuilderContext.Provider,{value:y,children:I(W.Provider,{value:{useDrag:i,useDrop:g,baseControls:l},children:t.children})},f)},f)};ae.displayName="QueryBuilderDndWithoutProvider",w.InlineCombinatorDnD=re,w.QueryBuilderDnD=Re,w.QueryBuilderDndWithoutProvider=ae,w.RuleDnD=ne,w.RuleGroupDnD=te,w.version=Ue,Object.defineProperties(w,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
//# sourceMappingURL=index.umd.js.map
{
"name": "@react-querybuilder/dnd",
"description": "Drag-and-drop-enabled version of react-querybuilder",
"version": "5.0.0-alpha.7",
"version": "5.0.0-alpha.8",
"publishConfig": {

@@ -28,7 +28,4 @@ "access": "public"

},
"dependencies": {
"@react-querybuilder/ts": "^5.0.0-alpha.7"
},
"devDependencies": {
"@react-querybuilder/ctx": "^5.0.0-alpha.7",
"@react-querybuilder/ts": "^5.0.0-alpha.8",
"@testing-library/react": "^13.4.0",

@@ -44,3 +41,3 @@ "@types/node": "^18.8.2",

"react-dom": "^18.2.0",
"react-querybuilder": "^5.0.0-alpha.7",
"react-querybuilder": "^5.0.0-alpha.8",
"typescript": "^4.8.4",

@@ -54,3 +51,3 @@ "vite": "^3.1.4"

},
"gitHead": "a45dfaf41ccaa23992dfc797e3e95c9b52a627bc"
"gitHead": "472eafa5df200b755ce171e5b1cc2921bcfaed75"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet