New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@rest-hooks/normalizr

Package Overview
Dependencies
Maintainers
2
Versions
126
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rest-hooks/normalizr - npm Package Compare versions

Comparing version 8.2.0-beta.1 to 8.2.0-beta.2

9

CHANGELOG.md

@@ -6,2 +6,11 @@ # Change Log

## [8.2.0-beta.2](https://github.com/coinbase/rest-hooks/compare/@rest-hooks/normalizr@8.2.0-beta.1...@rest-hooks/normalizr@8.2.0-beta.2) (2022-03-10)
### 🐛 Bug Fix
* Union schemas with null args[0] hooks ([#1779](https://github.com/coinbase/rest-hooks/issues/1779)) ([fcf70a9](https://github.com/coinbase/rest-hooks/commit/fcf70a92ef15531b7fd12feb117f29ad8c3de3d8))
## [8.2.0-beta.1](https://github.com/coinbase/rest-hooks/compare/@rest-hooks/normalizr@8.1.0...@rest-hooks/normalizr@8.2.0-beta.1) (2022-03-08)

@@ -8,0 +17,0 @@

1

dist/normalizr.amd.js

@@ -1326,2 +1326,3 @@ define(['exports'], (function (exports) { 'use strict';

_proto.infer = function infer(args, indexes, recurse) {
if (!args[0]) return undefined;
var attr = this.getSchemaAttribute(args[0], undefined, '');

@@ -1328,0 +1329,0 @@ var discriminatedSchema = this.schema[attr]; // Was unable to infer the entity's schema from params

@@ -1327,2 +1327,3 @@ var rest_hooks_normalizr = (function (exports) {

_proto.infer = function infer(args, indexes, recurse) {
if (!args[0]) return undefined;
var attr = this.getSchemaAttribute(args[0], undefined, '');

@@ -1329,0 +1330,0 @@ var discriminatedSchema = this.schema[attr]; // Was unable to infer the entity's schema from params

2

dist/normalizr.es.min.js

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

function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function t(t,n){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,n){if(t){if("string"==typeof t)return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}(t))||n&&t&&"number"==typeof t.length){r&&(t=r);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(e){return!(!e||"function"!=typeof e.hasOwnProperty||!(Object.hasOwnProperty.call(e,"__ownerID")||e._map&&Object.hasOwnProperty.call(e._map,"__ownerID")))}function o(e,t,n){var r=!0,i=!1;return[Object.keys(e).reduce((function(t,o){var s=""+o,a=n(t.get(s),e[s]),u=a[0],c=a[1],f=a[2];return c||(r=!1),f&&(i=!0),t.has(s)?t.set(s,u):t}),t),r,i]}var s=function(){function e(){}return e.toJSON=function(){return{name:this.name,schema:this.schema,key:this.key}},e.pk=function(e,t,n){return this.prototype.pk.call(e,t,n)},e.useIncoming=function(e,t,n,r){return e.date<=t.date},e.merge=function(e,t){return Object.assign({},e,t)},e.fromJS=function(e){void 0===e&&(e={});var t=new this(e);return Object.assign(t,e),t},e.process=function(e){function t(t,n,r){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e,t,n){if("production"!==process.env.NODE_ENV&&"silent"!==this.automaticValidation&&Array.isArray(e)){var r="Attempted to initialize "+this.name+" with an array, but named members were expected\n\nThis is likely due to a malformed response.\nTry inspecting the network response or fetch() return value.\nOr use debugging tools: https://resthooks.io/docs/guides/debugging\nLearn more about schemas: https://resthooks.io/docs/api/schema\nIf this is a mistake, you can disable this check by setting static automaticValidation = 'silent'\n\nFirst three members: "+JSON.stringify(e.slice(0,3),null,2);if("warn"!==this.automaticValidation){var i=new Error(r);throw i.status=400,i}console.warn(r)}return Object.assign({},e)})),e.normalize=function(e,t,n,r,i,o){var s=this,a=this.process(e,t,n),u=this.pk(a,t,n);if(void 0!==u&&""!==u){var c=this.key;if(c in o||(o[c]={}),u in o[c]||(o[c][u]=[]),o[c][u].some((function(t){return t===e})))return u;var f=this.validate(a);if(f){var l=new Error(f);throw l.status=400,l}return o[c][u].push(e),Object.keys(this.schema).forEach((function(e){if(Object.prototype.hasOwnProperty.call(a,e)){var t=s.schema[e];a[e]=r(a[e],a,e,t,i,o)}})),i(this,a,u),u}if("production"!==process.env.NODE_ENV){var h=new Error("Missing usable primary key when normalizing response.\n\n This is likely due to a malformed response.\n Try inspecting the network response or fetch() return value.\n Or use debugging tools: https://resthooks.io/docs/guides/debugging\n Learn more about schemas: https://resthooks.io/docs/api/schema\n\n Entity: "+this.name+"\n Value (processed): "+(a&&JSON.stringify(a,null,2))+"\n ");throw h.status=400,h}},e.validate=function(e){if("production"!==process.env.NODE_ENV&&"silent"!==this.automaticValidation){for(var n=new Set(Object.keys(this.defaults)),r=Object.keys(e),i=[[],[],[]],o=i[0],s=i[1],a=i[2],u=0,c=r;u<c.length;u++){var f=c[u];n.has(f)?o.push(f):a.push(f)}for(var l,h=t(n);!(l=h()).done;){var p=l.value;o.includes(p)||s.push(p)}if(n.size){var d=Math.max(r.length/2,1)<=a.length&&n.size>Math.max(a.length,2)&&Math.pow(o.length,1.5)/2<=a.length,y=o.length<Math.min(1,n.size/2);if(d||y){var m="",v="substantially different than expected keys";y&&(m+="\n Missing: "+s,v="no matching keys found"),d&&(m+="\n Unexpected keys: "+a,v="a large number of unexpected keys found");var g="Attempted to initialize "+this.name+" with "+v+"\n\n This is likely due to a malformed response.\n Try inspecting the network response or fetch() return value.\n Or use debugging tools: https://resthooks.io/docs/guides/debugging\n Learn more about schemas: https://resthooks.io/docs/api/schema\n If this is a mistake, you can disable this check by setting static automaticValidation = 'silent'\n\n Expected keys:\n Found: "+o+m+"\n Value (processed): "+JSON.stringify(e,null,2);if(!(o.length>=4&&d||"warn"===this.automaticValidation))return g;console.warn(g)}}}if("production"!==process.env.NODE_ENV)for(var b=0,O=Object.keys(this.schema);b<O.length;b++){var k=O[b];if(!Object.prototype.hasOwnProperty.call(e,k)&&!Object.prototype.hasOwnProperty.call(this.defaults,k))return"Schema key is missing in Entity\n\n Be sure all schema members are also part of the entity\n Or use debugging tools: https://resthooks.io/docs/guides/debugging\n Learn more about nesting schemas: https://resthooks.io/docs/guides/nested-response\n\n Entity keys: "+Object.keys(this.defaults)+"\n Schema key(missing): "+k+"\n "}},e.infer=function(e,t,n){if(e[0]){var r=this.pk(e[0],void 0,"");if(void 0!==r&&""!==r)return r;var i=function(e,t){return t?t.find((function(t){return Object.prototype.hasOwnProperty.call(e,t)})):void 0}(e[0],this.indexes);if(i&&t[this.key])return t[this.key][i][e[0][i]]}},e.expiresAt=function(e,t){return e.expiresAt},e.denormalize=function(e,t){var n=this;if(i(e)){if(this.validate(e.toJS()))return[void 0,!1,!0];null==t.setLocal||t.setLocal(e);var r=o(this.schema,e,t),s=r[0],a=r[1],u=r[2];return[this.fromJS(s.toObject()),a,u]}if(this.validate(e))return[void 0,!1,!0];var c=this.fromJS(e);null==t.setLocal||t.setLocal(c);var f=!1;return Object.keys(this.schema).forEach((function(r){var i=n.schema[r],o=Object.prototype.hasOwnProperty.call(e,r)?e[r]:void 0,s=t(o,i),a=s[0];!s[2]||Object.prototype.hasOwnProperty.call(e,r)&&!n.defaults[r]||(f=!0),Object.prototype.hasOwnProperty.call(e,r)&&e[r]!==a&&n.set(c,r,a)})),[c,!0,f]},e.set=function(e,t,n){e[t]=n},r(e,null,[{key:"key",get:function(){if("production"!==process.env.NODE_ENV&&(""===this.name||"Entity"===this.name||"_temp"===this.name))throw new Error("Entity classes without a name must define `static get key()`");return this.name}},{key:"defaults",get:function(){return Object.prototype.hasOwnProperty.call(this,"__defaults")||(this.__defaults=new this),this.__defaults}}]),e}();if(s.schema={},"production"!==process.env.NODE_ENV){var a=s.fromJS;s.fromJS=function(e){if(void 0===this.prototype.pk)throw new Error("cannot construct on abstract types");return a.call(this,e)}}function u(e){return null!==e&&void 0!==e.pk}var c=Symbol("ENTITY WAS DELETED");function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,f(e,t)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function d(e,t,n){return(d=p()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&f(i,n.prototype),i}).apply(null,arguments)}function y(e){var t="function"==typeof Map?new Map:void 0;return(y=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return d(e,arguments,h(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),f(r,e)})(e)}var m=function(){this.children=new WeakMap},v=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).message="Keys must include at least one member",t}return l(t,e),t}(y(Error)),g=function(){function e(){this.first=new WeakMap}var t=e.prototype;return t.delete=function(e){var t=this.traverse(e);return null==t||delete t.value,!!t},t.get=function(e){var t=this.traverse(e);return null==t?void 0:t.value},t.has=function(e){var t=this.traverse(e);return!!t&&Object.prototype.hasOwnProperty.call(t,"value")},t.set=function(e,t){if(e.length<1)throw new v;for(var n,r=this.first,i=0;i<e.length;i++)r.has(e[i])?n=r.get(e[i]):(n=new m,r.set(e[i],n)),r=n.children,i===e.length-1&&(n.value=t);return this},t.traverse=function(e){for(var t,n=this.first,r=0;r<e.length;r++){if(!(t=n.get(e[r])))return;n=t.children}return t},e}(),b=function(){function e(e,t){this.schema=void 0,t&&(this._schemaAttribute="string"==typeof t?function(e){return e[t]}:t),this.define(e)}var t=e.prototype;return t.define=function(e){this.schema=e},t.getSchemaAttribute=function(e,t,n){return!this.isSingleSchema&&this._schemaAttribute(e,t,n)},t.inferSchema=function(e,t,n){if(this.isSingleSchema)return this.schema;var r=this.getSchemaAttribute(e,t,n);return this.schema[r]},t.normalizeValue=function(e,t,n,r,i,o){var s=this.inferSchema(e,t,n);if(!s){if("production"!==process.env.NODE_ENV){var a=this.getSchemaAttribute(e,t,n);console.warn("Schema attribute "+JSON.stringify(a,void 0,2)+" is not expected.\nExpected one of: "+Object.keys(this.schema).map((function(e){return'"'+e+'"'})).join(", ")+"\n\nValue: "+JSON.stringify(e,void 0,2))}return e}var u=r(e,t,n,s,i,o);return this.isSingleSchema||null==u?u:{id:u,schema:this.getSchemaAttribute(e,t,n)}},t.denormalizeValue=function(e,t){if(void 0===e)return[e,!1,!1];var n=i(e)?e.get("schema"):e.schema;return this.isSingleSchema||n?t((this.isSingleSchema?void 0:i(e)?e.get("id"):e.id)||e,this.isSingleSchema?this.schema:this.schema[n]):[e,!0,!1]},r(e,[{key:"isSingleSchema",get:function(){return!this._schemaAttribute}}]),e}(),O=function(e){if(Array.isArray(e)&&e.length>1)throw new Error("Expected schema definition to be a single schema, but found "+e.length+".");return e[0]},k=function(e){return Array.isArray(e)?e:Object.keys(e).map((function(t){return e[t]}))},w=function(e){var t=e[0],n=e[2];return void 0!==t&&!n},j=function(e,t,n,r,i,o,s){return e=O(e),k(t).map((function(t,a){return i(t,n,r,e,o,s)}))},E=function(e,t,n){e=O(e);var r=!1,i=!0;if(void 0===t&&e){var o=n(void 0,e);i=o[1],r=o[2]}return[t&&t.map?t.map((function(t){return n(t,e)})).filter(w).map((function(e){return e[0]})):t,i,r]};function S(e,t,n,r){}var _=function(e){function t(){return e.apply(this,arguments)||this}l(t,e);var n=t.prototype;return n.normalize=function(e,t,n,r,i,o){var s=this;return k(e).map((function(e,a){return s.normalizeValue(e,t,n,r,i,o)})).filter((function(e){return null!=e}))},n.denormalize=function(e,t){var n=this,r=!1,i=!0;if(void 0===e&&this.schema){var o=t(void 0,this.schema);i=o[1],r=o[2]}return[e&&e.map?e.map((function(e){return n.denormalizeValue(e,t)})).filter(w).map((function(e){return e[0]})):e,i,r]},n.infer=function(e,t,n){this.schema},t}(b),A=function(e,t,n,r,i,o,s){var a=Object.assign({},t);return Object.keys(e).forEach((function(n){var r=e[n],u=i(t[n],t,n,r,o,s);null==u?delete a[n]:a[n]=u})),a},z=function(e,t,n){if(i(t))return o(e,t,n);var r=Object.assign({},t),s=!0,a=!1;return Object.keys(e).forEach((function(t){var i=n(r[t],e[t]),o=i[0],u=i[1],c=i[2];void 0!==r[t]&&(r[t]=o),c&&(a=!0),u||(s=!1)})),[r,s,a]};function N(e,t,n,r){for(var i={},o=0,s=Object.keys(e);o<s.length;o++){var a=s[o];i[a]=r(e[a],t,n)}return i}var x=function(){function e(e){this.schema=void 0,this.define(e)}var t=e.prototype;return t.define=function(e){this.schema=Object.keys(e).reduce((function(t,n){var r,i=e[n];return Object.assign({},t,((r={})[n]=i,r))}),this.schema||{})},t.normalize=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return A.apply(void 0,[this.schema].concat(t))},t.denormalize=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return z.apply(void 0,[this.schema].concat(t))},t.infer=function(e,t,n){return N(this.schema,e,t,n)},e}(),V=Symbol("draft"),D=function(e,t,n,r,i,o,s,a){var u=r(e,t);if(u===c)return[void 0,!0,!0];if("production"!==process.env.NODE_ENV&&"symbol"==typeof u&&u.toString().includes("DELETED"))throw new Error("Unrecognized symbol detected.\nMake sure you do not have multiple versions of @rest-hooks/normalizr installed.");if("object"!=typeof u||null===u)return[u,!1,!1];void 0===i[t.key]&&(i[t.key]={});var f=!0,l=!1;if(i[t.key][e]){if(Object.prototype.hasOwnProperty.call(i[t.key][e],V))return a.i=i[t.key][e].i,[i[t.key][e][V],f,l];s.push(u)}else{var h=s.length;s.push(u);var p=function(e){var t=e.og||e,n=function(e,n){return t(e,n)};return n.og=e,n}(n);p.setLocal=function(n){var r;return i[t.key][e]=((r={})[V]=n,r.i=h,r)};var d=function(e,t,n){e[t.key]||(e[t.key]={});e[t.key][n]||(e[t.key][n]=new g);return e[t.key][n]}(o,t,e),y=t.denormalize(u,p);i[t.key][e]=y[0],f=y[1],l=y[2];var m=s.slice(-1===a.i?h:a.i);d.has(m)?i[t.key][e]=d.get(m):d.set(m,i[t.key][e]),a.i===h&&(a.i=-1)}return[i[t.key][e],f,l]},P=function(e){var t=i(e);return function(n,r){var i,o=r.key;return"object"==typeof n?n:t?e.getIn([o,n]):null==(i=e[o])?void 0:i[n]}},J=function(e,t,n,r,i){if(void 0===r&&(r={}),void 0===i&&(i=new g),void 0===t)return[e,!0,!1,{}];if(void 0===e)return[void 0,!1,!1,{}];var o={},s=function(e,t,n,r){var i=P(e),o=[],s={i:-1};function a(e,n){if(!n)return[e,!0,!1];if(!n.denormalize||"function"!=typeof n.denormalize){if("function"==typeof n)return e instanceof n?[e,!0,!1]:[new n(e),!0,!1];if("object"==typeof n)return(Array.isArray(n)?E:z)(n,e,a)}return null===e?[e,!0,!1]:u(n)?void 0===e?[e,!1,!1]:D(e,n,a,i,r,t,o,s):"function"==typeof n.denormalize?n.denormalize(e,a):[e,!0,!1]}return function(e,t){var r=a(e,t);return Object(e)!==e?r:(o.push(e),n.has(o)?[n.get(o),r[1],r[2]]:(n.set(o,r[0]),r))}}(n,r,i,o);return[].concat(s(e,t),[o])};var I=function e(t,n,r,i,o,s){return t&&i?i.normalize&&"function"==typeof i.normalize?"object"!=typeof t?t:i.normalize(t,n,r,e,o,s):"function"==typeof i?new i(t):"object"!=typeof t||"object"!=typeof i?t:(Array.isArray(i)?j:A)(i,t,n,r,e,o,s):t};var M=function(e,n,r,i,o,s){if(void 0===r&&(r={}),void 0===i&&(i={}),void 0===o&&(o={}),void 0===s&&(s={date:Date.now(),expiresAt:1/0}),void 0===n)return{entities:r,indexes:i,result:e,entityMeta:o};var a=function(e){return["object","function"].includes(typeof e)?"object":typeof e}(n);if(null===e||typeof e!==a&&(void 0===n.key||"string"!=typeof e)){if("production"!==process.env.NODE_ENV){throw"string"==typeof e&&function(e){try{return"string"!=typeof JSON.parse(e)}catch(e){return!1}}(e)?new Error('Normalizing a string, but this does match schema.\n\nParsing this input string as JSON worked. This likely indicates fetch function did not parse\nthe JSON. By default, this only happens if "content-type" header includes "json".\nSee https://resthooks.io/docs/guides/custom-networking for more information\n\n Schema: '+JSON.stringify(n,void 0,2)+'\n Input: "'+e+'"'):new Error('Unexpected input given to normalize. Expected type to be "'+a+'", found "'+(null===e?"null":typeof e)+'".\n\n Schema: '+JSON.stringify(n,void 0,2)+'\n Input: "'+e+'"')}throw new Error('Unexpected input given to normalize. Expected type to be "'+a+'", found "'+(null===e?"null":typeof e)+'".')}var u=Object.assign({},r),f=Object.assign({},i),l=Object.assign({},o),h=function(e,n,r,i,o,s){return function(a,u,f){var l=a.key;l in e||(e[l]={},r[l]=Object.assign({},r[l]),o[l]=Object.assign({},o[l]));var h=e[l][f];if(h)e[l][f]=a.merge(h,u);else{var p=a.expiresAt?a.expiresAt(s,u):s.expiresAt,d=r[l][f];if(d){var y,m,v=o[l][f],g=!v||a.useIncoming(v,s,d,u);e[l][f]=g?typeof u!=typeof d?u:a.merge(d,u):d,o[l][f]={expiresAt:Math.max(p,null==(y=o[l][f])?void 0:y.expiresAt),date:Math.max(s.date,null==(m=o[l][f])?void 0:m.date)}}else e[l][f]=u,o[l][f]={expiresAt:p,date:s.date}}if(Array.isArray(a.indexes)){var b=e[l][f];l in n||(n[l]={},i[l]=Object.assign({},i[l]));for(var O,k=t(a.indexes);!(O=k()).done;){var w=O.value;w in n[l]||(i[l][w]=n[l][w]={});var j=n[l][w];h&&delete j[h[w]],r[l]&&r[l][f]&&r[l][f][w]!==b[w]&&(j[r[l][f][w]]=c),w in b?j[b[w]]=f:"production"!==process.env.NODE_ENV&&console.warn("Index not found in entity. Indexes must be top-level members of your entity.\nIndex: "+w+"\nEntity: "+JSON.stringify(b,void 0,2))}}r[l][f]=e[l][f]}}({},{},u,f,l,s);return{entities:u,indexes:f,result:I(e,e,void 0,n,h,{}),entityMeta:l}},T=function(e){function t(t,n){if(!n)throw new Error('Expected option "schemaAttribute" not found on UnionSchema.');return e.call(this,t,n)||this}l(t,e);var n=t.prototype;return n.normalize=function(e,t,n,r,i,o){return this.normalizeValue(e,t,n,r,i,o)},n.denormalize=function(e,t){return this.denormalizeValue(e,t)},n.infer=function(e,t,n){var r=this.getSchemaAttribute(e[0],void 0,""),i=this.schema[r];if(void 0!==i)return{id:n(i,e,t),schema:r}},t}(b),L=function(e){function t(){return e.apply(this,arguments)||this}l(t,e);var n=t.prototype;return n.normalize=function(e,t,n,r,i,o){var s=this;return Object.keys(e).reduce((function(t,n,a){var u,c=e[n];return null!=c?Object.assign({},t,((u={})[n]=s.normalizeValue(c,e,n,r,i,o),u)):t}),{})},n.denormalize=function(e,t){var n=this,r=!0,i=!1;return[Object.keys(e).reduce((function(o,s){var a,u=e[s],c=n.denormalizeValue(u,t),f=c[0],l=c[1],h=c[2];return l||(r=!1),h&&(i=!0),!l||h?o:Object.assign({},o,((a={})[s]=f,a))}),{}),r,i]},n.infer=function(e,t,n){},t}(b),U=function(){function e(e){if("production"!==process.env.NODE_ENV&&!e)throw new Error('Expected option "entity" not found on DeleteSchema.');this._entity=e}var t=e.prototype;return t.normalize=function(e,t,n,r,i,o){var s=this._entity.process(e,t,n),a=this._entity.pk(s,t,n);if("production"!==process.env.NODE_ENV&&(void 0===a||""===a)){var u,f=new Error("Missing usable primary key when normalizing response.\n\n This is likely due to a malformed response.\n Try inspecting the network response or fetch() return value.\n Or use debugging tools: https://resthooks.io/docs/guides/debugging\n Learn more about schemas: https://resthooks.io/docs/api/schema\n\n Delete(Entity): Delete("+(null!=(u=this._entity.name)?u:this._entity)+")\n Value: "+(e&&JSON.stringify(e,null,2))+"\n ");throw f.status=400,f}return i(this,c,a),a},t.infer=function(e,t,n){},t.denormalize=function(e,t){return t(e,this._entity)},t._denormalizeNullable=function(){return[]},t._normalizeNullable=function(){return[]},t.merge=function(e,t){return t},t.useIncoming=function(e,t,n,r){return e.date<=t.date},r(e,[{key:"key",get:function(){return this._entity.key}}]),e}(),R=Object.freeze({__proto__:null,Union:T,Values:L,Array:_,Object:x,Delete:U});function B(e,t,n){return function(e){return!!e&&"function"==typeof e.infer}(e)?e.infer(t,n,B):"object"==typeof e&&e?(Array.isArray(e)?S:N)(e,t,n,B):e}export{c as DELETED,s as Entity,g as WeakListMap,J as denormalize,B as inferResults,u as isEntity,M as normalize,R as schema};
function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function t(t,n){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,n){if(t){if("string"==typeof t)return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}(t))||n&&t&&"number"==typeof t.length){r&&(t=r);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(e){return!(!e||"function"!=typeof e.hasOwnProperty||!(Object.hasOwnProperty.call(e,"__ownerID")||e._map&&Object.hasOwnProperty.call(e._map,"__ownerID")))}function o(e,t,n){var r=!0,i=!1;return[Object.keys(e).reduce((function(t,o){var s=""+o,a=n(t.get(s),e[s]),u=a[0],c=a[1],f=a[2];return c||(r=!1),f&&(i=!0),t.has(s)?t.set(s,u):t}),t),r,i]}var s=function(){function e(){}return e.toJSON=function(){return{name:this.name,schema:this.schema,key:this.key}},e.pk=function(e,t,n){return this.prototype.pk.call(e,t,n)},e.useIncoming=function(e,t,n,r){return e.date<=t.date},e.merge=function(e,t){return Object.assign({},e,t)},e.fromJS=function(e){void 0===e&&(e={});var t=new this(e);return Object.assign(t,e),t},e.process=function(e){function t(t,n,r){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e,t,n){if("production"!==process.env.NODE_ENV&&"silent"!==this.automaticValidation&&Array.isArray(e)){var r="Attempted to initialize "+this.name+" with an array, but named members were expected\n\nThis is likely due to a malformed response.\nTry inspecting the network response or fetch() return value.\nOr use debugging tools: https://resthooks.io/docs/guides/debugging\nLearn more about schemas: https://resthooks.io/docs/api/schema\nIf this is a mistake, you can disable this check by setting static automaticValidation = 'silent'\n\nFirst three members: "+JSON.stringify(e.slice(0,3),null,2);if("warn"!==this.automaticValidation){var i=new Error(r);throw i.status=400,i}console.warn(r)}return Object.assign({},e)})),e.normalize=function(e,t,n,r,i,o){var s=this,a=this.process(e,t,n),u=this.pk(a,t,n);if(void 0!==u&&""!==u){var c=this.key;if(c in o||(o[c]={}),u in o[c]||(o[c][u]=[]),o[c][u].some((function(t){return t===e})))return u;var f=this.validate(a);if(f){var l=new Error(f);throw l.status=400,l}return o[c][u].push(e),Object.keys(this.schema).forEach((function(e){if(Object.prototype.hasOwnProperty.call(a,e)){var t=s.schema[e];a[e]=r(a[e],a,e,t,i,o)}})),i(this,a,u),u}if("production"!==process.env.NODE_ENV){var h=new Error("Missing usable primary key when normalizing response.\n\n This is likely due to a malformed response.\n Try inspecting the network response or fetch() return value.\n Or use debugging tools: https://resthooks.io/docs/guides/debugging\n Learn more about schemas: https://resthooks.io/docs/api/schema\n\n Entity: "+this.name+"\n Value (processed): "+(a&&JSON.stringify(a,null,2))+"\n ");throw h.status=400,h}},e.validate=function(e){if("production"!==process.env.NODE_ENV&&"silent"!==this.automaticValidation){for(var n=new Set(Object.keys(this.defaults)),r=Object.keys(e),i=[[],[],[]],o=i[0],s=i[1],a=i[2],u=0,c=r;u<c.length;u++){var f=c[u];n.has(f)?o.push(f):a.push(f)}for(var l,h=t(n);!(l=h()).done;){var p=l.value;o.includes(p)||s.push(p)}if(n.size){var d=Math.max(r.length/2,1)<=a.length&&n.size>Math.max(a.length,2)&&Math.pow(o.length,1.5)/2<=a.length,y=o.length<Math.min(1,n.size/2);if(d||y){var m="",v="substantially different than expected keys";y&&(m+="\n Missing: "+s,v="no matching keys found"),d&&(m+="\n Unexpected keys: "+a,v="a large number of unexpected keys found");var g="Attempted to initialize "+this.name+" with "+v+"\n\n This is likely due to a malformed response.\n Try inspecting the network response or fetch() return value.\n Or use debugging tools: https://resthooks.io/docs/guides/debugging\n Learn more about schemas: https://resthooks.io/docs/api/schema\n If this is a mistake, you can disable this check by setting static automaticValidation = 'silent'\n\n Expected keys:\n Found: "+o+m+"\n Value (processed): "+JSON.stringify(e,null,2);if(!(o.length>=4&&d||"warn"===this.automaticValidation))return g;console.warn(g)}}}if("production"!==process.env.NODE_ENV)for(var b=0,O=Object.keys(this.schema);b<O.length;b++){var k=O[b];if(!Object.prototype.hasOwnProperty.call(e,k)&&!Object.prototype.hasOwnProperty.call(this.defaults,k))return"Schema key is missing in Entity\n\n Be sure all schema members are also part of the entity\n Or use debugging tools: https://resthooks.io/docs/guides/debugging\n Learn more about nesting schemas: https://resthooks.io/docs/guides/nested-response\n\n Entity keys: "+Object.keys(this.defaults)+"\n Schema key(missing): "+k+"\n "}},e.infer=function(e,t,n){if(e[0]){var r=this.pk(e[0],void 0,"");if(void 0!==r&&""!==r)return r;var i=function(e,t){return t?t.find((function(t){return Object.prototype.hasOwnProperty.call(e,t)})):void 0}(e[0],this.indexes);if(i&&t[this.key])return t[this.key][i][e[0][i]]}},e.expiresAt=function(e,t){return e.expiresAt},e.denormalize=function(e,t){var n=this;if(i(e)){if(this.validate(e.toJS()))return[void 0,!1,!0];null==t.setLocal||t.setLocal(e);var r=o(this.schema,e,t),s=r[0],a=r[1],u=r[2];return[this.fromJS(s.toObject()),a,u]}if(this.validate(e))return[void 0,!1,!0];var c=this.fromJS(e);null==t.setLocal||t.setLocal(c);var f=!1;return Object.keys(this.schema).forEach((function(r){var i=n.schema[r],o=Object.prototype.hasOwnProperty.call(e,r)?e[r]:void 0,s=t(o,i),a=s[0];!s[2]||Object.prototype.hasOwnProperty.call(e,r)&&!n.defaults[r]||(f=!0),Object.prototype.hasOwnProperty.call(e,r)&&e[r]!==a&&n.set(c,r,a)})),[c,!0,f]},e.set=function(e,t,n){e[t]=n},r(e,null,[{key:"key",get:function(){if("production"!==process.env.NODE_ENV&&(""===this.name||"Entity"===this.name||"_temp"===this.name))throw new Error("Entity classes without a name must define `static get key()`");return this.name}},{key:"defaults",get:function(){return Object.prototype.hasOwnProperty.call(this,"__defaults")||(this.__defaults=new this),this.__defaults}}]),e}();if(s.schema={},"production"!==process.env.NODE_ENV){var a=s.fromJS;s.fromJS=function(e){if(void 0===this.prototype.pk)throw new Error("cannot construct on abstract types");return a.call(this,e)}}function u(e){return null!==e&&void 0!==e.pk}var c=Symbol("ENTITY WAS DELETED");function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,f(e,t)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function d(e,t,n){return(d=p()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&f(i,n.prototype),i}).apply(null,arguments)}function y(e){var t="function"==typeof Map?new Map:void 0;return(y=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return d(e,arguments,h(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),f(r,e)})(e)}var m=function(){this.children=new WeakMap},v=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).message="Keys must include at least one member",t}return l(t,e),t}(y(Error)),g=function(){function e(){this.first=new WeakMap}var t=e.prototype;return t.delete=function(e){var t=this.traverse(e);return null==t||delete t.value,!!t},t.get=function(e){var t=this.traverse(e);return null==t?void 0:t.value},t.has=function(e){var t=this.traverse(e);return!!t&&Object.prototype.hasOwnProperty.call(t,"value")},t.set=function(e,t){if(e.length<1)throw new v;for(var n,r=this.first,i=0;i<e.length;i++)r.has(e[i])?n=r.get(e[i]):(n=new m,r.set(e[i],n)),r=n.children,i===e.length-1&&(n.value=t);return this},t.traverse=function(e){for(var t,n=this.first,r=0;r<e.length;r++){if(!(t=n.get(e[r])))return;n=t.children}return t},e}(),b=function(){function e(e,t){this.schema=void 0,t&&(this._schemaAttribute="string"==typeof t?function(e){return e[t]}:t),this.define(e)}var t=e.prototype;return t.define=function(e){this.schema=e},t.getSchemaAttribute=function(e,t,n){return!this.isSingleSchema&&this._schemaAttribute(e,t,n)},t.inferSchema=function(e,t,n){if(this.isSingleSchema)return this.schema;var r=this.getSchemaAttribute(e,t,n);return this.schema[r]},t.normalizeValue=function(e,t,n,r,i,o){var s=this.inferSchema(e,t,n);if(!s){if("production"!==process.env.NODE_ENV){var a=this.getSchemaAttribute(e,t,n);console.warn("Schema attribute "+JSON.stringify(a,void 0,2)+" is not expected.\nExpected one of: "+Object.keys(this.schema).map((function(e){return'"'+e+'"'})).join(", ")+"\n\nValue: "+JSON.stringify(e,void 0,2))}return e}var u=r(e,t,n,s,i,o);return this.isSingleSchema||null==u?u:{id:u,schema:this.getSchemaAttribute(e,t,n)}},t.denormalizeValue=function(e,t){if(void 0===e)return[e,!1,!1];var n=i(e)?e.get("schema"):e.schema;return this.isSingleSchema||n?t((this.isSingleSchema?void 0:i(e)?e.get("id"):e.id)||e,this.isSingleSchema?this.schema:this.schema[n]):[e,!0,!1]},r(e,[{key:"isSingleSchema",get:function(){return!this._schemaAttribute}}]),e}(),O=function(e){if(Array.isArray(e)&&e.length>1)throw new Error("Expected schema definition to be a single schema, but found "+e.length+".");return e[0]},k=function(e){return Array.isArray(e)?e:Object.keys(e).map((function(t){return e[t]}))},w=function(e){var t=e[0],n=e[2];return void 0!==t&&!n},j=function(e,t,n,r,i,o,s){return e=O(e),k(t).map((function(t,a){return i(t,n,r,e,o,s)}))},E=function(e,t,n){e=O(e);var r=!1,i=!0;if(void 0===t&&e){var o=n(void 0,e);i=o[1],r=o[2]}return[t&&t.map?t.map((function(t){return n(t,e)})).filter(w).map((function(e){return e[0]})):t,i,r]};function S(e,t,n,r){}var _=function(e){function t(){return e.apply(this,arguments)||this}l(t,e);var n=t.prototype;return n.normalize=function(e,t,n,r,i,o){var s=this;return k(e).map((function(e,a){return s.normalizeValue(e,t,n,r,i,o)})).filter((function(e){return null!=e}))},n.denormalize=function(e,t){var n=this,r=!1,i=!0;if(void 0===e&&this.schema){var o=t(void 0,this.schema);i=o[1],r=o[2]}return[e&&e.map?e.map((function(e){return n.denormalizeValue(e,t)})).filter(w).map((function(e){return e[0]})):e,i,r]},n.infer=function(e,t,n){this.schema},t}(b),A=function(e,t,n,r,i,o,s){var a=Object.assign({},t);return Object.keys(e).forEach((function(n){var r=e[n],u=i(t[n],t,n,r,o,s);null==u?delete a[n]:a[n]=u})),a},z=function(e,t,n){if(i(t))return o(e,t,n);var r=Object.assign({},t),s=!0,a=!1;return Object.keys(e).forEach((function(t){var i=n(r[t],e[t]),o=i[0],u=i[1],c=i[2];void 0!==r[t]&&(r[t]=o),c&&(a=!0),u||(s=!1)})),[r,s,a]};function N(e,t,n,r){for(var i={},o=0,s=Object.keys(e);o<s.length;o++){var a=s[o];i[a]=r(e[a],t,n)}return i}var x=function(){function e(e){this.schema=void 0,this.define(e)}var t=e.prototype;return t.define=function(e){this.schema=Object.keys(e).reduce((function(t,n){var r,i=e[n];return Object.assign({},t,((r={})[n]=i,r))}),this.schema||{})},t.normalize=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return A.apply(void 0,[this.schema].concat(t))},t.denormalize=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return z.apply(void 0,[this.schema].concat(t))},t.infer=function(e,t,n){return N(this.schema,e,t,n)},e}(),V=Symbol("draft"),D=function(e,t,n,r,i,o,s,a){var u=r(e,t);if(u===c)return[void 0,!0,!0];if("production"!==process.env.NODE_ENV&&"symbol"==typeof u&&u.toString().includes("DELETED"))throw new Error("Unrecognized symbol detected.\nMake sure you do not have multiple versions of @rest-hooks/normalizr installed.");if("object"!=typeof u||null===u)return[u,!1,!1];void 0===i[t.key]&&(i[t.key]={});var f=!0,l=!1;if(i[t.key][e]){if(Object.prototype.hasOwnProperty.call(i[t.key][e],V))return a.i=i[t.key][e].i,[i[t.key][e][V],f,l];s.push(u)}else{var h=s.length;s.push(u);var p=function(e){var t=e.og||e,n=function(e,n){return t(e,n)};return n.og=e,n}(n);p.setLocal=function(n){var r;return i[t.key][e]=((r={})[V]=n,r.i=h,r)};var d=function(e,t,n){e[t.key]||(e[t.key]={});e[t.key][n]||(e[t.key][n]=new g);return e[t.key][n]}(o,t,e),y=t.denormalize(u,p);i[t.key][e]=y[0],f=y[1],l=y[2];var m=s.slice(-1===a.i?h:a.i);d.has(m)?i[t.key][e]=d.get(m):d.set(m,i[t.key][e]),a.i===h&&(a.i=-1)}return[i[t.key][e],f,l]},P=function(e){var t=i(e);return function(n,r){var i,o=r.key;return"object"==typeof n?n:t?e.getIn([o,n]):null==(i=e[o])?void 0:i[n]}},J=function(e,t,n,r,i){if(void 0===r&&(r={}),void 0===i&&(i=new g),void 0===t)return[e,!0,!1,{}];if(void 0===e)return[void 0,!1,!1,{}];var o={},s=function(e,t,n,r){var i=P(e),o=[],s={i:-1};function a(e,n){if(!n)return[e,!0,!1];if(!n.denormalize||"function"!=typeof n.denormalize){if("function"==typeof n)return e instanceof n?[e,!0,!1]:[new n(e),!0,!1];if("object"==typeof n)return(Array.isArray(n)?E:z)(n,e,a)}return null===e?[e,!0,!1]:u(n)?void 0===e?[e,!1,!1]:D(e,n,a,i,r,t,o,s):"function"==typeof n.denormalize?n.denormalize(e,a):[e,!0,!1]}return function(e,t){var r=a(e,t);return Object(e)!==e?r:(o.push(e),n.has(o)?[n.get(o),r[1],r[2]]:(n.set(o,r[0]),r))}}(n,r,i,o);return[].concat(s(e,t),[o])};var I=function e(t,n,r,i,o,s){return t&&i?i.normalize&&"function"==typeof i.normalize?"object"!=typeof t?t:i.normalize(t,n,r,e,o,s):"function"==typeof i?new i(t):"object"!=typeof t||"object"!=typeof i?t:(Array.isArray(i)?j:A)(i,t,n,r,e,o,s):t};var M=function(e,n,r,i,o,s){if(void 0===r&&(r={}),void 0===i&&(i={}),void 0===o&&(o={}),void 0===s&&(s={date:Date.now(),expiresAt:1/0}),void 0===n)return{entities:r,indexes:i,result:e,entityMeta:o};var a=function(e){return["object","function"].includes(typeof e)?"object":typeof e}(n);if(null===e||typeof e!==a&&(void 0===n.key||"string"!=typeof e)){if("production"!==process.env.NODE_ENV){throw"string"==typeof e&&function(e){try{return"string"!=typeof JSON.parse(e)}catch(e){return!1}}(e)?new Error('Normalizing a string, but this does match schema.\n\nParsing this input string as JSON worked. This likely indicates fetch function did not parse\nthe JSON. By default, this only happens if "content-type" header includes "json".\nSee https://resthooks.io/docs/guides/custom-networking for more information\n\n Schema: '+JSON.stringify(n,void 0,2)+'\n Input: "'+e+'"'):new Error('Unexpected input given to normalize. Expected type to be "'+a+'", found "'+(null===e?"null":typeof e)+'".\n\n Schema: '+JSON.stringify(n,void 0,2)+'\n Input: "'+e+'"')}throw new Error('Unexpected input given to normalize. Expected type to be "'+a+'", found "'+(null===e?"null":typeof e)+'".')}var u=Object.assign({},r),f=Object.assign({},i),l=Object.assign({},o),h=function(e,n,r,i,o,s){return function(a,u,f){var l=a.key;l in e||(e[l]={},r[l]=Object.assign({},r[l]),o[l]=Object.assign({},o[l]));var h=e[l][f];if(h)e[l][f]=a.merge(h,u);else{var p=a.expiresAt?a.expiresAt(s,u):s.expiresAt,d=r[l][f];if(d){var y,m,v=o[l][f],g=!v||a.useIncoming(v,s,d,u);e[l][f]=g?typeof u!=typeof d?u:a.merge(d,u):d,o[l][f]={expiresAt:Math.max(p,null==(y=o[l][f])?void 0:y.expiresAt),date:Math.max(s.date,null==(m=o[l][f])?void 0:m.date)}}else e[l][f]=u,o[l][f]={expiresAt:p,date:s.date}}if(Array.isArray(a.indexes)){var b=e[l][f];l in n||(n[l]={},i[l]=Object.assign({},i[l]));for(var O,k=t(a.indexes);!(O=k()).done;){var w=O.value;w in n[l]||(i[l][w]=n[l][w]={});var j=n[l][w];h&&delete j[h[w]],r[l]&&r[l][f]&&r[l][f][w]!==b[w]&&(j[r[l][f][w]]=c),w in b?j[b[w]]=f:"production"!==process.env.NODE_ENV&&console.warn("Index not found in entity. Indexes must be top-level members of your entity.\nIndex: "+w+"\nEntity: "+JSON.stringify(b,void 0,2))}}r[l][f]=e[l][f]}}({},{},u,f,l,s);return{entities:u,indexes:f,result:I(e,e,void 0,n,h,{}),entityMeta:l}},T=function(e){function t(t,n){if(!n)throw new Error('Expected option "schemaAttribute" not found on UnionSchema.');return e.call(this,t,n)||this}l(t,e);var n=t.prototype;return n.normalize=function(e,t,n,r,i,o){return this.normalizeValue(e,t,n,r,i,o)},n.denormalize=function(e,t){return this.denormalizeValue(e,t)},n.infer=function(e,t,n){if(e[0]){var r=this.getSchemaAttribute(e[0],void 0,""),i=this.schema[r];if(void 0!==i)return{id:n(i,e,t),schema:r}}},t}(b),L=function(e){function t(){return e.apply(this,arguments)||this}l(t,e);var n=t.prototype;return n.normalize=function(e,t,n,r,i,o){var s=this;return Object.keys(e).reduce((function(t,n,a){var u,c=e[n];return null!=c?Object.assign({},t,((u={})[n]=s.normalizeValue(c,e,n,r,i,o),u)):t}),{})},n.denormalize=function(e,t){var n=this,r=!0,i=!1;return[Object.keys(e).reduce((function(o,s){var a,u=e[s],c=n.denormalizeValue(u,t),f=c[0],l=c[1],h=c[2];return l||(r=!1),h&&(i=!0),!l||h?o:Object.assign({},o,((a={})[s]=f,a))}),{}),r,i]},n.infer=function(e,t,n){},t}(b),U=function(){function e(e){if("production"!==process.env.NODE_ENV&&!e)throw new Error('Expected option "entity" not found on DeleteSchema.');this._entity=e}var t=e.prototype;return t.normalize=function(e,t,n,r,i,o){var s=this._entity.process(e,t,n),a=this._entity.pk(s,t,n);if("production"!==process.env.NODE_ENV&&(void 0===a||""===a)){var u,f=new Error("Missing usable primary key when normalizing response.\n\n This is likely due to a malformed response.\n Try inspecting the network response or fetch() return value.\n Or use debugging tools: https://resthooks.io/docs/guides/debugging\n Learn more about schemas: https://resthooks.io/docs/api/schema\n\n Delete(Entity): Delete("+(null!=(u=this._entity.name)?u:this._entity)+")\n Value: "+(e&&JSON.stringify(e,null,2))+"\n ");throw f.status=400,f}return i(this,c,a),a},t.infer=function(e,t,n){},t.denormalize=function(e,t){return t(e,this._entity)},t._denormalizeNullable=function(){return[]},t._normalizeNullable=function(){return[]},t.merge=function(e,t){return t},t.useIncoming=function(e,t,n,r){return e.date<=t.date},r(e,[{key:"key",get:function(){return this._entity.key}}]),e}(),R=Object.freeze({__proto__:null,Union:T,Values:L,Array:_,Object:x,Delete:U});function B(e,t,n){return function(e){return!!e&&"function"==typeof e.infer}(e)?e.infer(t,n,B):"object"==typeof e&&e?(Array.isArray(e)?S:N)(e,t,n,B):e}export{c as DELETED,s as Entity,g as WeakListMap,J as denormalize,B as inferResults,u as isEntity,M as normalize,R as schema};

@@ -1070,2 +1070,3 @@ 'use strict';

infer(args, indexes, recurse) {
if (!args[0]) return undefined;
const attr = this.getSchemaAttribute(args[0], undefined, '');

@@ -1072,0 +1073,0 @@ const discriminatedSchema = this.schema[attr]; // Was unable to infer the entity's schema from params

@@ -1330,2 +1330,3 @@ (function (global, factory) {

_proto.infer = function infer(args, indexes, recurse) {
if (!args[0]) return undefined;
var attr = this.getSchemaAttribute(args[0], undefined, '');

@@ -1332,0 +1333,0 @@ var discriminatedSchema = this.schema[attr]; // Was unable to infer the entity's schema from params

@@ -83,2 +83,2 @@ import { isImmutable, denormalizeImmutable } from "./ImmutableUtils.js";

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zY2hlbWFzL09iamVjdC50cyJdLCJuYW1lcyI6WyJpc0ltbXV0YWJsZSIsImRlbm9ybWFsaXplSW1tdXRhYmxlIiwibm9ybWFsaXplIiwic2NoZW1hIiwiaW5wdXQiLCJwYXJlbnQiLCJrZXkiLCJ2aXNpdCIsImFkZEVudGl0eSIsInZpc2l0ZWRFbnRpdGllcyIsIm9iamVjdCIsIk9iamVjdCIsImtleXMiLC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5OiBhbnksXG4gICAgICB2aXNpdDogYW55LFxuICAgICAgYWRkRW50aXR5OiBhbnksXG4gICAgICB2aXNpdGVkRW50aXRpZXM6IGFueSxcbiAgICBdXG4gICkge1xuICAgIHJldHVybiBub3JtYWxpemUodGhpcy5zY2hlbWEsIC4uLmFyZ3MpO1xuICB9XG5cbiAgZGVub3JtYWxpemUoLi4uYXJnczogcmVhZG9ubHkgW2lucHV0OiBhbnksIHVudmlzaXQ6IGFueV0pIHtcbiAgICByZXR1cm4gZGVub3JtYWxpemUodGhpcy5zY2hlbWEsIC4uLmFyZ3MpO1xuICB9XG5cbiAgaW5mZXIoYXJnczogYW55LCBpbmRleGVzOiBhbnksIHJlY3Vyc2U6IGFueSkge1xuICAgIHJldHVybiBpbmZlcih0aGlzLnNjaGVtYSwgYXJncywgaW5kZXhlcywgcmVjdXJzZSk7XG4gIH1cbn1cbiJdfQ==
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zY2hlbWFzL09iamVjdC50cyJdLCJuYW1lcyI6WyJpc0ltbXV0YWJsZSIsImRlbm9ybWFsaXplSW1tdXRhYmxlIiwibm9ybWFsaXplIiwic2NoZW1hIiwiaW5wdXQiLCJwYXJlbnQiLCJrZXkiLCJ2aXNpdCIsImFkZEVudGl0eSIsInZpc2l0ZWRFbnRpdGllcyIsIm9iamVjdCIsIk9iamVjdCIsImtleXMiLCJmb3JFYWNoIiwibG9jYWxTY2hlbWEiLCJ2YWx1ZSIsInVuZGVmaW5lZCIsImRlbm9ybWFsaXplIiwidW52aXNpdCIsImZvdW5kIiwiZGVsZXRlZCIsIml0ZW0iLCJmb3VuZEl0ZW0iLCJkZWxldGVkSXRlbSIsImluZmVyIiwiYXJncyIsImluZGV4ZXMiLCJyZWN1cnNlIiwicmVzdWx0T2JqZWN0IiwiayIsIk9iamVjdFNjaGVtYSIsImNvbnN0cnVjdG9yIiwiZGVmaW5pdGl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ogYW55LCB1bnZpc2l0OiBhbnldKSB7XG4gICAgcmV0dXJuIGRlbm9ybWFsaXplKHRoaXMuc2NoZW1hLCAuLi5hcmdzKTtcbiAgfVxuXG4gIGluZmVyKGFyZ3M6IGFueSwgaW5kZXhlczogYW55LCByZWN1cnNlOiBhbnkpIHtcbiAgICByZXR1cm4gaW5mZXIodGhpcy5zY2hlbWEsIGFyZ3MsIGluZGV4ZXMsIHJlY3Vyc2UpO1xuICB9XG59XG4iXX0=

@@ -25,2 +25,3 @@ import PolymorphicSchema from "./Polymorphic.js";

infer(args, indexes, recurse) {
if (!args[0]) return undefined;
const attr = this.getSchemaAttribute(args[0], undefined, '');

@@ -37,2 +38,2 @@ const discriminatedSchema = this.schema[attr]; // Was unable to infer the entity's schema from params

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zY2hlbWFzL1VuaW9uLmpzIl0sIm5hbWVzIjpbIlBvbHltb3JwaGljU2NoZW1hIiwiVW5pb25TY2hlbWEiLCJjb25zdHJ1Y3RvciIsImRlZmluaXRpb24iLCJzY2hlbWFBdHRyaWJ1dGUiLCJFcnJvciIsIm5vcm1hbGl6ZSIsImlucHV0IiwicGFyZW50Iiwia2V5IiwidmlzaXQiLCJhZGRFbnRpdHkiLCJ2aXNpdGVkRW50aXRpZXMiLCJub3JtYWxpemVWYWx1ZSIsImRlbm9ybWFsaXplIiwidW52aXNpdCIsImRlbm9ybWFsaXplVmFsdWUiLCJpbmZlciIsImFyZ3MiLCJpbmRleGVzIiwicmVjdXJzZSIsImF0dHIiLCJnZXRTY2hlbWFBdHRyaWJ1dGUiLCJ1bmRlZmluZWQiLCJkaXNjcmltaW5hdGVkU2NoZW1hIiwic2NoZW1hIiwiaWQiXSwibWFwcGluZ3MiOiJBQUFBLE9BQU9BLGlCQUFQO0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBQ0EsZUFBZSxNQUFNQyxXQ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LCB2aXNpdCwgYWRkRW50aXR5LCB2aXNpdGVkRW50aXRpZXMpIHtcbiAgICByZXR1cm4gdGhpcy5ub3JtYWxpemVWYWx1ZShcbiAgICAgIGlucHV0LFxuICAgICAgcGFyZW50LFxuICAgICAga2V5LFxuICAgICAgdmlzaXQsXG4gICAgICBhZGRFbnRpdHksXG4gICAgICB2aXNpdGVkRW50aXRpZXMsXG4gICAgKTtcbiAgfVxuXG4gIGRlbm9ybWFsaXplKGlucHV0LCB1bnZpc2l0KSB7XG4gICAgcmV0dXJuIHRoaXMuZGVub3JtYWxpemVWYWx1ZShpbnB1dCwgdW52aXNpdCk7XG4gIH1cblxuICBpbmZlcihhcmdzLCBpbmRleGVzLCByZWN1cnNlKSB7XG4gICAgaWYgKCFhcmdzWzBdKSByZXR1cm4gdW5kZWZpbmVkO1xuICAgIGNvbnN0IGF0dHIgPSB0aGlzLmdldFNjaGVtYUF0dHJpYnV0ZShhcmdzWzBdLCB1bmRlZmluZWQsICcnKTtcbiAgICBjb25zdCBkaXNjcmltaW5hdGVkU2NoZW1hID0gdGhpcy5zY2hlbWFbYXR0cl07XG5cbiAgICAvLyBXYXMgdW5hYmxlIHRvIGluZmVyIHRoZSBlbnRpdHkncyBzY2hlbWEgZnJvbSBwYXJhbXNcbiAgICBpZiAoZGlzY3JpbWluYXRlZFNjaGVtYSA9PT0gdW5kZWZpbmVkKSByZXR1cm4gdW5kZWZpbmVkO1xuICAgIHJldHVybiB7XG4gICAgICBpZDogcmVjdXJzZShkaXNjcmltaW5hdGVkU2NoZW1hLCBhcmdzLCBpbmRleGVzKSxcbiAgICAgIHNjaGVtYTogYXR0cixcbiAgICB9O1xuICB9XG59XG4iXX0=
export declare const normalize: (schema: any, input: any, parent: any, key: any, visit: any, addEntity: any, visitedEntities: any) => any;
export declare const denormalize: (schema: any, input: any, unvisit: any) => [denormalized: any, found: boolean, deleted: boolean];
export declare function infer(schema: any, args: any, indexes: any, recurse: any): any;
export declare function infer(schema: any, args: readonly any[], indexes: any, recurse: any): any;
/**

@@ -5,0 +5,0 @@ * Represents fixed objects

@@ -85,2 +85,2 @@ import { isImmutable, denormalizeImmutable } from "./ImmutableUtils.js";

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zY2hlbWFzL09iamVjdC50cyJdLCJuYW1lcyI6WyJpc0ltbXV0YWJsZSIsImRlbm9ybWFsaXplSW1tdXRhYmxlIiwibm9ybWFsaXplIiwic2NoZW1hIiwiaW5wdXQiLCJwYXJlbnQiLCJrZXkiLCJ2aXNpdCIsImFkZEVudGl0eSIsInZpc2l0ZWRFbnRpdGllcyIsIm9iamVjdCIsIk9iamVjdCIsImtleXMiLCJmb3JFYWNoIiwibG9jYWxTY2hlbWEiLCJ2YWx1ZSIsInVuZGVmaW5lZCIsImRlbm9ybWFsaXplIiwidW52aXNpdCIsImZvdW5kIiwiZGVsZXRlZCIsIml0ZW0iLCJmb3VuZEl0ZW0iLCJkZWxldGVkSXRlbSIsImluZmVyIiwiYXJncyIsImluZGV4ZXMiLCJyZWN1cnNlIiwicmVzdWx0T2JqZWN0IiwiayIsIk9iamVjdFNjaGVtYSIsImNvbnN0cnVjdG9yIiwiZGVmaW5pdGlvbiIsImRlZmluZSIsInJlZHVjZSIsImVudGl0eVNjaGVtYSJdLCJtYXBwaW5ncyI6IkFBQUEsU0FDRUEsV0FERixFQUVFQyxvQkFGRjtBQUtBLE9BQU8sTUFBTUMsU0FBUyxHQUFHLENBQ3ZCQyxNQUR1QixFQUV2QkMsS0FGdUIsRUFHdkJDLE1BSHVCLEVBSXZCQyxHQUp1QixFQUt2QkMsS0FMdUIsRUFNdkJDLFNBTnVCLEVBT3ZCQyxlQVB1QixLQVFwQjtBQUNILFFBQU1DLE1BQU0sR0FBRyxFQUFFLEdBQUdOO0FBQUwsR0FBZjtBQUNBTyxFQUFBQSxNQUFNLENBQUNDLElBQVAsQ0FBWVQsTUFBWixFQ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maW5lKGRlZmluaXRpb24pO1xuICB9XG5cbiAgZGVmaW5lKGRlZmluaXRpb24pIHtcbiAgICB0aGlzLnNjaGVtYSA9IE9iamVjdC5rZXlzKGRlZmluaXRpb24pLnJlZHVjZSgoZW50aXR5U2NoZW1hLCBrZXkpID0+IHtcbiAgICAgIGNvbnN0IHNjaGVtYSA9IGRlZmluaXRpb25ba2V5XTtcbiAgICAgIHJldHVybiB7IC4uLmVudGl0eVNjaGVtYSwgW2tleV06IHNjaGVtYSB9O1xuICAgIH0sIHRoaXMuc2NoZW1hIHx8IHt9KTtcbiAgfVxuXG4gIG5vcm1hbGl6ZShcbiAgICAuLi5hcmdzOiByZWFkb25seSBbXG4gICAgICBpbnB1dDogYW55LFxuICAgICAgcGFyZW50OiBhbnksXG4gICAgICBrZXk6IGFueSxcbiAgICAgIHZpc2l0OiBhbnksXG4gICAgICBhZGRFbnRpdHk6IGFueSxcbiAgICAgIHZpc2l0ZWRFbnRpdGllczogYW55LFxuICAgIF1cbiAgKSB7XG4gICAgcmV0dXJuIG5vcm1hbGl6ZSh0aGlzLnNjaGVtYSwgLi4uYXJncyk7XG4gIH1cblxuICBkZW5vcm1hbGl6ZSguLi5hcmdzOiByZWFkb25seSBbaW5wdXQ6IGFueSwgdW52aXNpdDogYW55XSkge1xuICAgIHJldHVybiBkZW5vcm1hbGl6ZSh0aGlzLnNjaGVtYSwgLi4uYXJncyk7XG4gIH1cblxuICBpbmZlcihhcmdzOiBhbnksIGluZGV4ZXM6IGFueSwgcmVjdXJzZTogYW55KSB7XG4gICAgcmV0dXJuIGluZmVyKHRoaXMuc2NoZW1hLCBhcmdzLCBpbmRleGVzLCByZWN1cnNlKTtcbiAgfVxufVxuIl19
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zY2hlbWFzL09iamVjdC50cyJdLCJuYW1lcyI6WyJpc0ltbXV0YWJsZSIsImRlbm9ybWFsa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V07XG4gICAgICByZXR1cm4geyAuLi5lbnRpdHlTY2hlbWEsIFtrZXldOiBzY2hlbWEgfTtcbiAgICB9LCB0aGlzLnNjaGVtYSB8fCB7fSk7XG4gIH1cblxuICBub3JtYWxpemUoXG4gICAgLi4uYXJnczogcmVhZG9ubHkgW1xuICAgICAgaW5wdXQ6IGFueSxcbiAgICAgIHBhcmVudDogYW55LFxuICAgICAga2V5OiBhbnksXG4gICAgICB2aXNpdDogYW55LFxuICAgICAgYWRkRW50aXR5OiBhbnksXG4gICAgICB2aXNpdGVkRW50aXRpZXM6IGFueSxcbiAgICBdXG4gICkge1xuICAgIHJldHVybiBub3JtYWxpemUodGhpcy5zY2hlbWEsIC4uLmFyZ3MpO1xuICB9XG5cbiAgZGVub3JtYWxpemUoLi4uYXJnczogcmVhZG9ubHkgW2lucHV0OiBhbnksIHVudmlzaXQ6IGFueV0pIHtcbiAgICByZXR1cm4gZGVub3JtYWxpemUodGhpcy5zY2hlbWEsIC4uLmFyZ3MpO1xuICB9XG5cbiAgaW5mZXIoYXJnczogYW55LCBpbmRleGVzOiBhbnksIHJlY3Vyc2U6IGFueSkge1xuICAgIHJldHVybiBpbmZlcih0aGlzLnNjaGVtYSwgYXJncywgaW5kZXhlcywgcmVjdXJzZSk7XG4gIH1cbn1cbiJdfQ==

@@ -25,2 +25,3 @@ import PolymorphicSchema from "./Polymorphic.js";

infer(args, indexes, recurse) {
if (!args[0]) return undefined;
const attr = this.getSchemaAttribute(args[0], undefined, '');

@@ -37,2 +38,2 @@ const discriminatedSchema = this.schema[attr]; // Was unable to infer the entity's schema from params

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zY2hlbWFzL1VuaW9uLmpzIl0sIm5hbWVzIjpbIlBvbHltb3JwaGljU2NoZW1hIiwiVW5pb25TY2hlbWEiLCJjb25zdHJ1Y3RvciIsImRlZmluaXRpb24iLCJzY2hlbWFBdH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mxlIHRvIGluZmVyIHRoZSBlbnRpdHkncyBzY2hlbWEgZnJvbSBwYXJhbXNcbiAgICBpZiAoZGlzY3JpbWluYXRlZFNjaGVtYSA9PT0gdW5kZWZpbmVkKSByZXR1cm4gdW5kZWZpbmVkO1xuICAgIHJldHVybiB7XG4gICAgICBpZDogcmVjdXJzZShkaXNjcmltaW5hdGVkU2NoZW1hLCBhcmdzLCBpbmRleGVzKSxcbiAgICAgIHNjaGVtYTogYXR0cixcbiAgICB9O1xuICB9XG59XG4iXX0=
{
"name": "@rest-hooks/normalizr",
"version": "8.2.0-beta.1",
"version": "8.2.0-beta.2",
"description": "Normalizes and denormalizes JSON according to schema for Redux and Flux applications",

@@ -104,3 +104,3 @@ "homepage": "https://github.com/coinbase/rest-hooks/tree/master/packages/normalizr#readme",

},
"gitHead": "e697b70e8bbeb0f9bac4ab50718141b0f11ee1e7"
"gitHead": "b435cd1165a996730b9353875603bfb97add2cdd"
}

@@ -7,3 +7,3 @@ export declare const normalize: (schema: any, input: any, parent: any, key: any, visit: any, addEntity: any, visitedEntities: any) => any;

];
export declare function infer(schema: any, args: any, indexes: any, recurse: any): any;
export declare function infer(schema: any, args: readonly any[], indexes: any, recurse: any): any;
/**

@@ -10,0 +10,0 @@ * Represents fixed objects

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc