var _={inputStabilityCheck:"once",identityFunctionCheck:"once",cacheSizeCheck:"once"},W=e=>{Object.assign(_,e)};var w=class{constructor(n){this.value=n}deref(){return this.value}},P=()=>typeof WeakRef>"u"?w:WeakRef,I=P(),G=0,g=1;function h(){return{s:G,v:void 0,o:null,p:null}}function H(e){return e instanceof I?e.deref():e}function R(e,n={}){let t=h(),{resultEqualityCheck:r,maxSize:c}=n,s=c!==void 0;if(s&&(!Number.isInteger(c)||c<1))throw new TypeError(`maxSize must be a positive integer, received: ${c}`);let m=null,i=0,u,o=0,f=!1;function d(){i>=c&&(m=t,t=h(),i=0)}function z(){let l=t,{length:O}=arguments;for(let a=0,y=O;a<y;a++){let F=arguments[a];if(typeof F=="function"||typeof F=="object"&&F!==null){let p=l.o;p===null&&(l.o=p=new WeakMap);let S=p.get(F);S===void 0?(l=h(),p.set(F,l)):l=S}else{let p=l.p;p===null&&(l.p=p=new Map);let S=p.get(F);S===void 0?(l=h(),p.set(F,l),i++):l=S}}if(l.s===g)return l.v;if(m!==null){let a=m;for(let y=0,F=O;y<F;y++){let p=arguments[y],S;if(typeof p=="function"||typeof p=="object"&&p!==null){let C=a.o;S=C!==null?C.get(p):void 0}else{let C=a.p;S=C!==null?C.get(p):void 0}if(S===void 0){a=null;break}a=S}if(a!==null&&a.s===g){let y=l;return y.s=g,y.v=a.v,d(),a.v}}let b=l,M=e.apply(null,arguments);if(o++,r){let a=H(u);a!=null&&r(a,M)&&(M=a,o!==0&&o--),u=typeof M=="object"&&M!==null||typeof M=="function"?new I(M):M}return b.s=g,b.v=M,s&&d(),M}return z.clearCache=()=>{t=h(),m=null,i=0,z.resetResultsCount()},z.resultsCount=()=>o,z.resetResultsCount=()=>{o=0},z}var v=Symbol("NOT_FOUND");function E(e,n=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(n)}function N(e,n=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(n)}function K(e,n="expected all items to be functions, instead received the following types: "){if(!e.every(t=>typeof t=="function")){let t=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${n}[${t}]`)}}var x=e=>Array.isArray(e)?e:[e];function j(e){let n=Array.isArray(e[0])?e[0]:e;return K(n,"createSelector expects all input-selectors to be functions, but received the following types: "),n}function D(e,...n){let t=typeof e=="function"?{memoize:e,memoizeOptions:n}:e,r=(...c)=>{let s=0,m=0,i,u={},o=c.pop();typeof o=="object"&&(u=o,o=c.pop()),E(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let f={...t,...u},{memoize:d,memoizeOptions:z=[],argsMemoize:l=R,argsMemoizeOptions:O=[]}=f,b=x(z),M=x(O),a=j(c),y=d(function(){return s++,o.apply(null,arguments)},...b),F=!0,p=l(function(){m++;let{length:C}=a,A=new Array(C);for(let k=0;k<C;k++)A[k]=a[k].apply(null,arguments);return i=y.apply(null,A),i},...M);return Object.assign(p,{resultFunc:o,memoizedResultFunc:y,dependencies:a,dependencyRecomputations:()=>m,resetDependencyRecomputations:()=>{m=0},lastResult:()=>i,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:d,argsMemoize:l})};return Object.assign(r,{withTypes:()=>r}),r}var T=D(R);var U=Object.assign((e,n=T)=>{N(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let t=Object.keys(e),r=t.map(s=>e[s]);return n(r,(...s)=>s.reduce((m,i,u)=>(m[t[u]]=i,m),{}))},{withTypes:()=>U});function $(e){let n;return{get(t){return n&&e(n.key,t)?n.value:v},put(t,r){n={key:t,value:r}},findMatchingEntry(t,r){let c=n;return c!==void 0&&r(c.value,t)?c:void 0},clear(){n=void 0}}}function V(e,n){let t=[];function r(i){let u=t.findIndex(o=>n(o.key,i));if(u>-1){let o=t[u];return u>0&&(t.splice(u,1),t.unshift(o)),o.value}return v}function c(i,u){t.unshift({key:i,value:u}),t.length>e&&t.pop()}function s(i,u){let o=t,{length:f}=o;for(let d=0;d<f;d++){let z=o[d];if(u(z.value,i))return z}}function m(){t=[]}return{get:r,put:c,findMatchingEntry:s,clear:m}}var q=(e,n)=>e===n;function L(e){return function(t,r){if(t===null||r===null||t.length!==r.length)return!1;let{length:c}=t;for(let s=0;s<c;s++)if(!e(t[s],r[s]))return!1;return!0}}function Y(e,n){let t=typeof n=="object"?n:{equalityCheck:n},{equalityCheck:r=q,maxSize:c=1,resultEqualityCheck:s}=t,m=L(r),i=0,u=c<=1?$(m):V(c,m);function o(){let f=u.get(arguments);if(f===v){if(f=e.apply(null,arguments),i++,s){let d=u.findMatchingEntry(f,s);d&&(f=d.value,i!==0&&i--)}u.put(arguments,f)}return f}return o.clearCache=()=>{u.clear(),o.resetResultsCount()},o.resultsCount=()=>i,o.resetResultsCount=()=>{i=0},o}export{T as createSelector,D as createSelectorCreator,U as createStructuredSelector,Y as lruMemoize,q as referenceEqualityCheck,W as setGlobalDevModeChecks,R as weakMapMemoize};
//# sourceMappingURL=reselect.browser.mjs.map