/** * Relay v2.0.0 * * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("fbjs/lib/invariant"),require("fbjs/lib/ErrorUtils"),require("fbjs/lib/areEqual"),require("fbjs/lib/emptyFunction"),require("fbjs/lib/removeFromArray"),require("fbjs/lib/sprintf"),require("fbjs/lib/resolveImmediate"),require("fbjs/lib/mapObject")):"function"==typeof define&&define.amd?define(["fbjs/lib/invariant","fbjs/lib/ErrorUtils","fbjs/lib/areEqual","fbjs/lib/emptyFunction","fbjs/lib/removeFromArray","fbjs/lib/sprintf","fbjs/lib/resolveImmediate","fbjs/lib/mapObject"],t):"object"==typeof exports?exports.RelayRuntime=t(require("fbjs/lib/invariant"),require("fbjs/lib/ErrorUtils"),require("fbjs/lib/areEqual"),require("fbjs/lib/emptyFunction"),require("fbjs/lib/removeFromArray"),require("fbjs/lib/sprintf"),require("fbjs/lib/resolveImmediate"),require("fbjs/lib/mapObject")):e.RelayRuntime=t(e["fbjs/lib/invariant"],e["fbjs/lib/ErrorUtils"],e["fbjs/lib/areEqual"],e["fbjs/lib/emptyFunction"],e["fbjs/lib/removeFromArray"],e["fbjs/lib/sprintf"],e["fbjs/lib/resolveImmediate"],e["fbjs/lib/mapObject"])}(window,function(e,t,r,n,i,o,a,s){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=44)}([function(e,t,r){"use strict";function n(e,t){var n={};return e.forEach(function(e){e.kind===r(3).VARIABLE?n[e.name]=function(e,t){return t.hasOwnProperty(e)||r(1)(!1),r(19)(t[e])}(e.variableName,t):n[e.name]=e.value}),n}function i(e,t){if(!t)return e;var r=[];for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];null!=i&&r.push(n+":"+JSON.stringify(i))}return 0===r.length?e:e+"(".concat(r.join(","),")")}var o={FRAGMENTS_KEY:"__fragments",FRAGMENT_OWNER_KEY:"__fragmentOwner",FRAGMENT_PROP_NAME_KEY:"__fragmentPropName",MATCH_COMPONENT_KEY:"__match_component",MATCH_FRAGMENT_KEY:"__match_fragment",ID_KEY:"__id",MODULE_KEY:"__module",REF_KEY:"__ref",REFS_KEY:"__refs",ROOT_ID:"client:root",ROOT_TYPE:"__Root",TYPENAME_KEY:"__typename",UNPUBLISH_RECORD_SENTINEL:Object.freeze({__UNPUBLISH_RECORD_SENTINEL:!0}),UNPUBLISH_FIELD_SENTINEL:Object.freeze({__UNPUBLISH_FIELD_SENTINEL:!0}),getArgumentValues:n,getHandleStorageKey:function(e,t){var o=e.handle,a=e.key,s=e.name,u=e.args,c=e.filters,l=r(24)(o,a,s);return u&&c&&0!==u.length&&0!==c.length?i(l,n(u.filter(function(e){return c.indexOf(e.name)>-1}),t)):l},getStorageKey:function(e,t){if(e.storageKey)return e.storageKey;var r=e.args,o=e.name;return r&&0!==r.length?i(o,n(r,t)):o},getStableStorageKey:function(e,t){return i(e,r(19)(t))}};e.exports=o},function(t,r){t.exports=e},function(e,t,r){"use strict";var n=r(5)(r(13));e.exports={clone:function(e){return(0,n.default)({},e)},copyFields:function(e,t){for(var n in e)e.hasOwnProperty(n)&&n!==r(0).ID_KEY&&n!==r(0).TYPENAME_KEY&&(t[n]=e[n])},create:function(e,t){var n={};return n[r(0).ID_KEY]=e,n[r(0).TYPENAME_KEY]=t,n},freeze:function(e){r(36)(e)},getDataID:function(e){return e[r(0).ID_KEY]},getLinkedRecordID:function(e,t){var n=e[t];return null==n?n:("object"==typeof n&&n&&"string"==typeof n[r(0).REF_KEY]||r(1)(!1),n[r(0).REF_KEY])},getLinkedRecordIDs:function(e,t){var n=e[t];return null==n?n:("object"==typeof n&&Array.isArray(n[r(0).REFS_KEY])||r(1)(!1),n[r(0).REFS_KEY])},getType:function(e){return e[r(0).TYPENAME_KEY]},getValue:function(e,t){var n=e[t];return n&&"object"==typeof n&&(n.hasOwnProperty(r(0).REF_KEY)||n.hasOwnProperty(r(0).REFS_KEY))&&r(1)(!1),n},merge:function(e,t){return Object.assign({},e,t)},setValue:function(e,t,r){e[t]=r},setLinkedRecordID:function(e,t,n){var i={};i[r(0).REF_KEY]=n,e[t]=i},setLinkedRecordIDs:function(e,t,n){var i={};i[r(0).REFS_KEY]=n,e[t]=i},update:function(e,t){for(var i=null,o=Object.keys(t),a=0;a3&&void 0!==arguments[3]?arguments[3]:{handleStrippedNulls:!1},o=new(r(11));o.set(r(0).ROOT_ID,r(2).create(r(0).ROOT_ID,r(0).ROOT_TYPE));var a=r(37).normalize(o,e,t,i);return{errors:n,fieldPayloads:a.fieldPayloads,matchPayloads:a.matchPayloads,source:o}}},function(e,r){e.exports=t},function(e,t,r){"use strict";var n=Object.freeze({RANGE_ADD:"RANGE_ADD",RANGE_DELETE:"RANGE_DELETE",NODE_DELETE:"NODE_DELETE",FIELDS_CHANGE:"FIELDS_CHANGE",REQUIRED_CHILDREN:"REQUIRED_CHILDREN"}),i=Object.freeze({APPEND:"append",IGNORE:"ignore",PREPEND:"prepend",REFETCH:"refetch",REMOVE:"remove"});function o(e){return e.fragment.selections&&e.fragment.selections.length>0&&"LinkedField"===e.fragment.selections[0].kind?e.fragment.selections[0].name:null}e.exports={MutationTypes:n,RangeOperations:i,convert:function(e,t,n,i){var a=n?[n]:[],s=i?[i]:[];return e.forEach(function(e){switch(e.type){case"NODE_DELETE":var n=function(e,t){var r=e.deletedIDFieldName,n=o(t);return n?function(e,t){var i=e.getRootField(n);if(i){var o=i.getValue(r),a=Array.isArray(o)?o:[o];a.forEach(function(t){t&&"string"==typeof t&&e.delete(t)})}}:null}(e,t);n&&(a.push(n),s.push(n));break;case"RANGE_ADD":var i=function(e,t){var n=e.parentID,i=e.connectionInfo,a=e.edgeName;if(!n)return null;var s=o(t);return i&&s?function(e,t){var o=e.get(n);if(o){var u=e.getRootField(s);if(u){var c=u.getLinkedRecord(a),l=!0,d=!1,f=void 0;try{for(var h,p=i[Symbol.iterator]();!(l=(h=p.next()).done);l=!0){var _=h.value;if(c){var v=r(9).getConnection(o,_.key,_.filters);if(v){var g=r(9).buildConnectionEdge(e,v,c);if(g)switch(_.rangeBehavior){case"append":r(9).insertEdgeAfter(v,g);break;case"ignore":break;case"prepend":r(9).insertEdgeBefore(v,g)}}}}}catch(e){d=!0,f=e}finally{try{l||null==p.return||p.return()}finally{if(d)throw f}}}}}:null}(e,t);i&&(a.push(i),s.push(i));break;case"RANGE_DELETE":var u=function(e,t){var n=e.parentID,i=e.connectionKeys,a=e.pathToConnection,s=e.deletedIDFieldName;if(!n)return null;var u=o(t);return u?function(e,t){if(t){var o=[],c=t[u];if(c&&Array.isArray(s)){var l=!0,d=!1,f=void 0;try{for(var h,p=s[Symbol.iterator]();!(l=(h=p.next()).done);l=!0){var _=h.value;c&&"object"==typeof c&&(c=c[_])}}catch(e){d=!0,f=e}finally{try{l||null==p.return||p.return()}finally{if(d)throw f}}Array.isArray(c)?c.forEach(function(e){e&&e.id&&"object"==typeof e&&"string"==typeof e.id&&o.push(e.id)}):c&&c.id&&"string"==typeof c.id&&o.push(c.id)}else c&&"string"==typeof s&&"object"==typeof c&&("string"==typeof(c=c[s])?o.push(c):Array.isArray(c)&&c.forEach(function(e){"string"==typeof e&&o.push(e)}));!function(e,t,n,i,o){var a=i.get(e);if(a&&!(n.length<2)){for(var s=a,u=1;u0,n=i.hasOwnProperty(e);if(n||r){for(var o,s=n&&r?i[e].concat(i["*"]):n?i[e]:i["*"],u=s.length-1;u>=0;u--){var c=(0,s[u])(e,t);(o=o||[]).unshift(c)}return{stop:function(e){o&&o.forEach(function(t){return t(e)})}}}return a},attachProfileHandler:function(e,t){s(e)&&(i.hasOwnProperty(e)||(i[e]=[]),i[e].push(t))},detachProfileHandler:function(e,t){s(e)&&i.hasOwnProperty(e)&&r(30)(i[e],t)}};e.exports=u},function(e,t){e.exports=n},function(e,t){e.exports=i},function(e,t,r){"use strict";var n=function(){function e(e,t,r){this._recordSource=e,this._seenRecords={},this._isMissingData=!1,this._variables=t,this._owner=r}var t=e.prototype;return t.read=function(e,t){return{data:this._traverse(e,t,null),dataID:t,node:e,seenRecords:this._seenRecords,variables:this._variables,isMissingData:this._isMissingData,owner:this._owner}},t._traverse=function(e,t,r){var n=this._recordSource.get(t);if(this._seenRecords[t]=n,null==n)return void 0===n&&(this._isMissingData=!0),n;var i=r||{};return this._traverseSelections(e.selections,n,i),i},t._getVariableValue=function(e){return this._variables.hasOwnProperty(e)||r(1)(!1),this._variables[e]},t._traverseSelections=function(e,t,n){var i=this;e.forEach(function(e){if(e.kind===r(3).SCALAR_FIELD)i._readScalar(e,t,n);else if(e.kind===r(3).LINKED_FIELD)e.plural?i._readPluralLink(e,t,n):i._readLink(e,t,n);else if(e.kind===r(3).CONDITION){i._getVariableValue(e.condition)===e.passingValue&&i._traverseSelections(e.selections,t,n)}else if(e.kind===r(3).INLINE_FRAGMENT){var o=r(2).getType(t);null!=o&&o===e.type&&i._traverseSelections(e.selections,t,n)}else e.kind===r(3).FRAGMENT_SPREAD?i._createFragmentPointer(e,t,n,i._variables):e.kind===r(3).MATCH_FIELD?i._readMatchField(e,t,n):r(1)(!1)})},t._readScalar=function(e,t,n){var i,o=null!==(i=e.alias)&&void 0!==i?i:e.name,a=r(0).getStorageKey(e,this._variables),s=r(2).getValue(t,a);void 0===s&&(this._isMissingData=!0),n[o]=s},t._readLink=function(e,t,n){var i,o=null!==(i=e.alias)&&void 0!==i?i:e.name,a=r(0).getStorageKey(e,this._variables),s=r(2).getLinkedRecordID(t,a);if(null==s)return n[o]=s,void(void 0===s&&(this._isMissingData=!0));var u=n[o];null!=u&&"object"!=typeof u&&r(1)(!1),n[o]=this._traverse(e,s,u)},t._readPluralLink=function(e,t,n){var i,o=this,a=null!==(i=e.alias)&&void 0!==i?i:e.name,s=r(0).getStorageKey(e,this._variables),u=r(2).getLinkedRecordIDs(t,s);if(null==u)return n[a]=u,void(void 0===u&&(this._isMissingData=!0));var c=n[a];null==c||Array.isArray(c)||r(1)(!1);var l=c||[];u.forEach(function(t,n){if(null==t)return void 0===t&&(o._isMissingData=!0),void(l[n]=t);var i=l[n];null!=i&&"object"!=typeof i&&r(1)(!1),l[n]=o._traverse(e,t,i)}),n[a]=l},t._readMatchField=function(e,t,n){var i,o=null!==(i=e.alias)&&void 0!==i?i:e.name,a=r(0).getStorageKey(e,this._variables),s=r(2).getLinkedRecordID(t,a);if(null==s)return n[o]=s,void(void 0===s&&(this._isMissingData=!0));var u=n[o];null!=u&&"object"!=typeof u&&r(1)(!1);var c=this._recordSource.get(s);if(this._seenRecords[s]=c,null==c)return void 0===c&&(this._isMissingData=!0),void(n[o]=c);var l=r(2).getType(c);"string"!=typeof l&&r(1)(!1);var d=e.matchesByType[l];if(null!=d){var f=r(2).getValue(c,r(0).MATCH_COMPONENT_KEY);if(null==f)return void 0===f&&(this._isMissingData=!0),void(n[o]=null);var h={};this._createFragmentPointer({kind:"FragmentSpread",name:d.fragmentName,args:null},c,h,this._variables),h[r(0).FRAGMENT_PROP_NAME_KEY]=d.fragmentPropName,h[r(0).MODULE_KEY]=f,n[o]=h}else n[o]=null},t._createFragmentPointer=function(e,t,n,i){var o=n[r(0).FRAGMENTS_KEY];null==o&&(o=n[r(0).FRAGMENTS_KEY]={}),"object"==typeof o&&o||r(1)(!1),null==n[r(0).ID_KEY]&&(n[r(0).ID_KEY]=r(2).getDataID(t)),o[e.name]=e.args?r(0).getArgumentValues(e.args,i):{},n[r(0).FRAGMENT_OWNER_KEY]=this._owner},e}();e.exports={read:function(e,t,r){var i,o=t.dataID,a=t.node,s=t.variables;return new n(e,s,null!==(i=r)&&void 0!==i?i:null).read(a,o)}}},function(e,t,r){"use strict";e.exports=function(e){return Boolean(e&&e["@@RelayModernEnvironment"])}},function(e,t,r){"use strict";e.exports=function(e){switch(e){case"connection":return r(9);case"viewer":return r(35)}r(1)(!1)}},function(e,t,r){"use strict";e.exports={DEFAULT_HANDLE_KEY:""}},function(e,t,r){"use strict";var n=r(7)(r(0).ROOT_ID,"viewer"),i="Viewer";e.exports={VIEWER_ID:n,update:function(e,t){var r=e.get(t.dataID);if(r){var o=r.getLinkedRecord(t.fieldKey);if(o){if(o.getDataID()===n)return r.setValue(null,t.fieldKey),void r.setLinkedRecord(o,t.handleKey);var a=e.get(n)||e.create(n,i);a.copyFieldsFrom(o),r.setValue(null,t.fieldKey),r.setLinkedRecord(a,t.handleKey),e.getRoot().setLinkedRecord(a,t.handleKey)}}}}},function(e,t,r){"use strict";e.exports=function e(t){return Object.freeze(t),Object.getOwnPropertyNames(t).forEach(function(r){var n=t[r];n&&"object"==typeof n&&!Object.isFrozen(n)&&e(n)}),t}},function(e,t,r){"use strict";var n=r(5)(r(27));function i(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{handleStrippedNulls:!1},i=t.dataID,a=t.node,s=t.variables;return new o(e,s,n).normalizeResponse(a,i,r)}var o=function(){function e(e,t,r){this._handleFieldPayloads=[],this._handleStrippedNulls=r.handleStrippedNulls,this._incrementalPayloads=[],this._matchFieldPayloads=[],this._path=r.path?(0,n.default)(r.path):[],this._recordSource=e,this._variables=t}var t=e.prototype;return t.normalizeResponse=function(e,t,n){var i=this._recordSource.get(t);return i||r(1)(!1),this._traverseSelections(e,i,n),{incrementalPayloads:this._incrementalPayloads,fieldPayloads:this._handleFieldPayloads,matchPayloads:this._matchFieldPayloads}},t._getVariableValue=function(e){return this._variables.hasOwnProperty(e)||r(1)(!1),this._variables[e]},t._getRecordType=function(e){var t=e[r(0).TYPENAME_KEY];return null==t&&r(1)(!1),t},t._traverseSelections=function(e,t,n){var i=this;e.selections.forEach(function(o){if(o.kind===r(3).SCALAR_FIELD||o.kind===r(3).LINKED_FIELD)i._normalizeField(e,o,t,n);else if(o.kind===r(3).CONDITION){i._getVariableValue(o.condition)===o.passingValue&&i._traverseSelections(o,t,n)}else if(o.kind===r(3).INLINE_FRAGMENT){r(2).getType(t)===o.type&&i._traverseSelections(o,t,n)}else if(o.kind===r(3).LINKED_HANDLE||o.kind===r(3).SCALAR_HANDLE){var a=o.args?r(0).getArgumentValues(o.args,i._variables):{},s=r(0).getStorageKey(o,i._variables),u=r(0).getHandleStorageKey(o,i._variables);i._handleFieldPayloads.push({args:a,dataID:r(2).getDataID(t),fieldKey:s,handle:o.handle,handleKey:u})}else o.kind===r(3).MATCH_FIELD?i._normalizeMatchField(e,o,t,n):o.kind===r(3).DEFER?i._normalizeDefer(o,t,n):o.kind===r(3).STREAM?i._normalizeStream(o,t,n):(o.kind===r(3).FRAGMENT||(o.kind,r(3).FRAGMENT_SPREAD),r(1)(!1))})},t._normalizeDefer=function(e,t,i){!1===(null===e.if||this._getVariableValue(e.if))?this._traverseSelections(e,t,i):this._incrementalPayloads.push({kind:"defer",label:e.label,path:(0,n.default)(this._path),selector:{dataID:r(2).getDataID(t),node:e,variables:this._variables}})},t._normalizeStream=function(e,t,i){this._traverseSelections(e,t,i),!0===(null===e.if||this._getVariableValue(e.if))&&this._incrementalPayloads.push({kind:"stream",label:e.label,path:(0,n.default)(this._path),selector:{dataID:r(2).getDataID(t),node:e,variables:this._variables}})},t._normalizeMatchField=function(e,t,i,o){"object"==typeof o&&o||r(1)(!1);var a=t.alias||t.name,s=r(0).getStorageKey(t,this._variables),u=o[a];if(null!=u){"object"==typeof u&&u||r(1)(!1);var c=this._getRecordType(u);if(null!=t.matchesByType[c]){var l=u.id||r(2).getLinkedRecordID(i,s)||r(7)(r(2).getDataID(i),s);"string"!=typeof l&&r(1)(!1),r(2).setLinkedRecordID(i,s,l);var d=this._recordSource.get(l);d||(d=r(2).create(l,c),this._recordSource.set(l,d));var f=u[r(0).MATCH_FRAGMENT_KEY];null!=f&&this._matchFieldPayloads.push({data:u,dataID:l,operationReference:f,path:(0,n.default)(this._path).concat([a]),typeName:c,variables:this._variables})}else r(2).setValue(i,s,null)}else{if(void 0===u&&!this._handleStrippedNulls)return;r(2).setValue(i,s,null)}},t._normalizeField=function(e,t,n,i){"object"==typeof i&&i||r(1)(!1);var o=t.alias||t.name,a=r(0).getStorageKey(t,this._variables),s=i[o];if(null!=s)t.kind===r(3).SCALAR_FIELD?r(2).setValue(n,a,s):t.kind===r(3).LINKED_FIELD?(this._path.push(o),t.plural?this._normalizePluralLink(t,n,a,s):this._normalizeLink(t,n,a,s),this._path.pop()):(t.kind,r(3).MATCH_FIELD,r(1)(!1));else{if(void 0===s&&!this._handleStrippedNulls)return;r(2).setValue(n,a,null)}},t._normalizeLink=function(e,t,n,i){"object"==typeof i&&i||r(1)(!1);var o=i.id||r(2).getLinkedRecordID(t,n)||r(7)(r(2).getDataID(t),n);"string"!=typeof o&&r(1)(!1),r(2).setLinkedRecordID(t,n,o);var a=this._recordSource.get(o);if(a)0;else{var s=e.concreteType||this._getRecordType(i);a=r(2).create(o,s),this._recordSource.set(o,a)}this._traverseSelections(e,a,i)},t._normalizePluralLink=function(e,t,n,i){var o=this;Array.isArray(i)||r(1)(!1);var a=r(2).getLinkedRecordIDs(t,n),s=[];i.forEach(function(i,u){if(null!=i){o._path.push(String(u)),"object"!=typeof i&&r(1)(!1);var c=i.id||a&&a[u]||r(7)(r(2).getDataID(t),n,u);"string"!=typeof c&&r(1)(!1),s.push(c);var l=o._recordSource.get(c);if(l)0;else{var d=e.concreteType||o._getRecordType(i);l=r(2).create(c,d),o._recordSource.set(c,l)}o._traverseSelections(e,l,i),o._path.pop()}else s.push(i)}),r(2).setLinkedRecordIDs(t,n,s)},t._validateRecordType=function(e,t,r){"LinkedField"===t.kind&&t.concreteType||this._getRecordType(r)},e}();i=r(28).instrument("RelayResponseNormalizer.normalize",i),e.exports={normalize:i}},function(e,t,r){"use strict";e.exports=function(e,t){return e===t&&(null===e||"object"!=typeof e)}},function(e,t,r){"use strict";var n=function(){function e(e,t,n,i,o){var a;this._operationLoader=null!==(a=o)&&void 0!==a?a:null,this._handlers=i,this._mutator=new(r(20))(e,t),this._recordWasMissing=!1,this._source=e,this._variables=n,this._recordSourceProxy=new(r(21))(this._mutator)}var t=e.prototype;return t.check=function(e,t){return this._traverse(e,t),!this._recordWasMissing},t._getVariableValue=function(e){return this._variables.hasOwnProperty(e)||r(1)(!1),this._variables[e]},t._handleMissing=function(){this._recordWasMissing=!0},t._getDataForHandlers=function(e,t){return{args:e.args?r(0).getArgumentValues(e.args,this._variables):{},record:this._source.get(t)}},t._handleMissingScalarField=function(e,t){var r=this._getDataForHandlers(e,t),n=r.args,i=r.record,o=!0,a=!1,s=void 0;try{for(var u,c=this._handlers[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var l=u.value;if("scalar"===l.kind){var d=l.handle(e,i,n,this._recordSourceProxy);if(void 0!==d)return d}}}catch(e){a=!0,s=e}finally{try{o||null==c.return||c.return()}finally{if(a)throw s}}this._handleMissing()},t._handleMissingLinkField=function(e,t){var n=this._getDataForHandlers(e,t),i=n.args,o=n.record,a=!0,s=!1,u=void 0;try{for(var c,l=this._handlers[Symbol.iterator]();!(a=(c=l.next()).done);a=!0){var d=c.value;if("linked"===d.kind){var f=d.handle(e,o,i,this._recordSourceProxy);if(null!=f&&this._mutator.getStatus(f)===r(4).EXISTENT)return f}}}catch(e){s=!0,u=e}finally{try{a||null==l.return||l.return()}finally{if(s)throw u}}this._handleMissing()},t._handleMissingPluralLinkField=function(e,t){var n=this,i=this._getDataForHandlers(e,t),o=i.args,a=i.record,s=!0,u=!1,c=void 0;try{for(var l,d=this._handlers[Symbol.iterator]();!(s=(l=d.next()).done);s=!0){var f=l.value;if("pluralLinked"===f.kind){var h=f.handle(e,a,o,this._recordSourceProxy);if(null!=h)return h.filter(function(e){return null!=e&&n._mutator.getStatus(e)===r(4).EXISTENT})}}}catch(e){u=!0,c=e}finally{try{s||null==d.return||d.return()}finally{if(u)throw c}}this._handleMissing()},t._traverse=function(e,t){var n=this._mutator.getStatus(t);n===r(4).UNKNOWN&&this._handleMissing(),n===r(4).EXISTENT&&this._traverseSelections(e.selections,t)},t._traverseSelections=function(e,t){var n=this;e.forEach(function(i){switch(i.kind){case r(3).SCALAR_FIELD:n._checkScalar(i,t);break;case r(3).LINKED_FIELD:i.plural?n._checkPluralLink(i,t):n._checkLink(i,t);break;case r(3).CONDITION:n._getVariableValue(i.condition)===i.passingValue&&n._traverseSelections(i.selections,t);break;case r(3).INLINE_FRAGMENT:var o=n._mutator.getType(t);null!=o&&o===i.type&&n._traverseSelections(i.selections,t);break;case r(3).LINKED_HANDLE:var a=r(40)(i,e,n._variables);a.plural?n._checkPluralLink(a,t):n._checkLink(a,t);break;case r(3).MATCH_FIELD:n._checkMatch(i,t);break;case r(3).DEFER:case r(3).STREAM:n._traverseSelections(i.selections,t);break;case r(3).SCALAR_HANDLE:case r(3).FRAGMENT_SPREAD:r(1)(!1);break;default:r(1)(!1)}})},t._checkMatch=function(e,t){var n=r(0).getStorageKey(e,this._variables),i=this._mutator.getLinkedRecordID(t,n);if(void 0===i)this._handleMissing();else if(null!==i){var o=this._mutator.getStatus(i);if(o===r(4).UNKNOWN)return void this._handleMissing();if(o!==r(4).EXISTENT)return;var a=this._mutator.getType(i);if(null!=(null!=a?e.matchesByType[a]:null)){var s=this._operationLoader;null===s&&r(1)(!1);var u=this._mutator.getValue(i,r(0).MATCH_FRAGMENT_KEY);if(void 0===u)return void this._handleMissing();if(null===u)return;var c=s.get(u);null!=c?this._traverse(c,i):this._handleMissing()}}},t._checkScalar=function(e,t){var n=r(0).getStorageKey(e,this._variables),i=this._mutator.getValue(t,n);void 0===i&&void 0!==(i=this._handleMissingScalarField(e,t))&&this._mutator.setValue(t,n,i)},t._checkLink=function(e,t){var n=r(0).getStorageKey(e,this._variables),i=this._mutator.getLinkedRecordID(t,n);void 0===i&&null!=(i=this._handleMissingLinkField(e,t))&&this._mutator.setLinkedRecordID(t,n,i),null!=i&&this._traverse(e,i)},t._checkPluralLink=function(e,t){var n=this,i=r(0).getStorageKey(e,this._variables),o=this._mutator.getLinkedRecordIDs(t,i);void 0===o&&null!=(o=this._handleMissingPluralLinkField(e,t))&&this._mutator.setLinkedRecordIDs(t,i,o),o&&o.forEach(function(t){null!=t&&n._traverse(e,t)})},e}();e.exports={check:function(e,t,r,i,o){var a=r.dataID,s=r.node,u=r.variables;return new n(e,t,u,i,o).check(s,a)}}},function(e,t,r){"use strict";var n=r(5)(r(13));e.exports=function(e,t,i){var o=t.find(function(t){return t.kind===r(3).LINKED_FIELD&&t.name===e.name&&t.alias===e.alias&&r(25)(t.args,e.args)});o&&o.kind===r(3).LINKED_FIELD||r(1)(!1);var a=r(0).getHandleStorageKey(e,i);return(0,n.default)({},o,{args:null,name:a,storageKey:a})}},function(e,t,r){"use strict";e.exports=function(e,t){var n=t.data,i=t.errors;if(null!=n)return r(15)(e.root,n,i,{handleStrippedNulls:!0});var o=e.node,a=r(42).create("RelayNetwork","No data returned for operation `%s`, got error(s):\n%s\n\nSee the error `source` property for more information.",o.params?o.params.name:o.name,i?i.map(function(e){return e.message}).join("\n"):"(No errors)");throw a.source={errors:i,operation:e.node,variables:e.variables},a}},function(e,t,r){"use strict";var n=r(5)(r(27)),i={create:function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i2?r-2:0),i=2;i0&&(this._publishQueue.commitSource(n),this._publishQueue.run()),i},n.execute=function(e){var t=e.operation,n=e.cacheConfig,i=e.updater;return r(54).execute({operation:t,cacheConfig:n,updater:i,network:this._network,operationLoader:this._operationLoader,publishQueue:this._publishQueue})},n.executeMutation=function(e){var t,n=this,i=e.operation,o=e.optimisticResponse,a=e.optimisticUpdater,s=e.updater,u=e.uploadables;(o||a)&&(t={operation:i,selectorStoreUpdater:a,response:o||null});var c=i.node;return this._network.execute(c.params,i.variables,{force:!0},u).do({start:function(){t&&(n._publishQueue.applyUpdate(t),n._publishQueue.run())},next:function(e){t&&(n._publishQueue.revertUpdate(t),t=void 0),n._publishQueue.commitPayload(i,r(41)(i,e),s),n._publishQueue.run()},error:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e){t&&(n._publishQueue.revertUpdate(t),t=void 0,n._publishQueue.run())}),unsubscribe:function(){t&&(n._publishQueue.revertUpdate(t),t=void 0,n._publishQueue.run())}})},n.sendQuery=function(e){var t=e.cacheConfig,r=e.onCompleted,n=e.onError,i=e.onNext,o=e.operation;return this.execute({operation:o,cacheConfig:t}).subscribeLegacy({onNext:i,onError:n,onCompleted:r})},n.sendMutation=function(e){var t=e.onCompleted,r=e.onError,n=e.operation,i=e.optimisticResponse,o=e.optimisticUpdater,a=e.updater,s=e.uploadables;return this.executeMutation({operation:n,optimisticResponse:i,optimisticUpdater:o,updater:a,uploadables:s}).subscribeLegacy({onNext:function(e){t&&t(e.errors)},onError:r,onCompleted:t})},n.toJSON=function(){var e;return"RelayModernEnvironment(".concat(null!==(e=this.configName)&&void 0!==e?e:"",")")},e}();n.prototype["@@RelayModernEnvironment"]=!0,e.exports=n}).call(this,r(46))},function(e,t){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";var n=function(){function e(e,t){this._backup=new(r(11)),this._handlerProvider=t||null,this._pendingBackupRebase=!1,this._pendingUpdaters=new Set,this._pendingData=new Set,this._pendingOptimisticUpdates=new Set,this._store=e,this._appliedOptimisticUpdates=new Set,this._gcHold=null}var t=e.prototype;return t.applyUpdate=function(e){(this._appliedOptimisticUpdates.has(e)||this._pendingOptimisticUpdates.has(e))&&r(1)(!1),this._pendingOptimisticUpdates.add(e)},t.revertUpdate=function(e){this._pendingOptimisticUpdates.has(e)?this._pendingOptimisticUpdates.delete(e):this._appliedOptimisticUpdates.has(e)&&(this._pendingBackupRebase=!0,this._appliedOptimisticUpdates.delete(e))},t.revertAll=function(){this._pendingBackupRebase=!0,this._pendingOptimisticUpdates.clear(),this._appliedOptimisticUpdates.clear()},t.commitPayload=function(e,t,r){var n=t.fieldPayloads,i=t.source;this._pendingBackupRebase=!0,this._pendingData.add({kind:"payload",payload:{fieldPayloads:n,operation:e,source:i,updater:r}})},t.commitRelayPayload=function(e){var t=e.fieldPayloads,r=e.source;this._pendingBackupRebase=!0,this._pendingData.add({kind:"payload",payload:{fieldPayloads:t,operation:null,source:r,updater:null}})},t.commitUpdate=function(e){this._pendingBackupRebase=!0,this._pendingUpdaters.add(e)},t.commitSource=function(e){this._pendingBackupRebase=!0,this._pendingData.add({kind:"source",source:e})},t.run=function(){this._pendingBackupRebase&&this._backup.size()&&(this._store.publish(this._backup),this._backup=new(r(11))),this._commitData(),this._commitUpdaters(),this._applyUpdates(),this._pendingBackupRebase=!1,this._appliedOptimisticUpdates.size>0?this._gcHold||(this._gcHold=this._store.holdGC()):this._gcHold&&(this._gcHold.dispose(),this._gcHold=null),this._store.notify()},t._getSourceFromPayload=function(e){var t=this,n=e.fieldPayloads,o=e.operation,a=e.source,s=e.updater,u=new(r(20))(this._store.getSource(),a),c=new(r(21))(u);if(n&&n.length&&n.forEach(function(e){var n=t._handlerProvider&&t._handlerProvider(e.handle);n||r(1)(!1),n.update(c,e)}),s){var l=null===o||void 0===o?void 0:o.fragment;null==l&&r(1)(!1),s(new(r(26))(c,l),i(a,l,o))}return a},t._commitData=function(){var e=this;this._pendingData.size&&(this._pendingData.forEach(function(t){var r;r="payload"===t.kind?e._getSourceFromPayload(t.payload):t.source,e._store.publish(r)}),this._pendingData.clear())},t._commitUpdaters=function(){var e=this;if(this._pendingUpdaters.size){var t=new(r(11));this._pendingUpdaters.forEach(function(n){var i=new(r(20))(e._store.getSource(),t),o=new(r(21))(i);r(16).applyWithGuard(n,null,[o],null,"RelayPublishQueue:commitUpdaters")}),this._store.publish(t),this._pendingUpdaters.clear()}},t._applyUpdates=function(){var e=this;if(this._pendingOptimisticUpdates.size||this._pendingBackupRebase&&this._appliedOptimisticUpdates.size){var t=new(r(11)),n=new(r(20))(this._store.getSource(),t,this._backup),o=new(r(21))(n,this._handlerProvider);this._pendingBackupRebase&&this._appliedOptimisticUpdates.size&&this._appliedOptimisticUpdates.forEach(function(e){if(e.operation){var t,n=e.selectorStoreUpdater,a=e.operation,s=e.response,u=o.commitPayload(a,s);if(s)t=i(r(15)(a.root,s).source,a.fragment,a);n&&r(16).applyWithGuard(n,null,[u,t],null,"RelayPublishQueue:applyUpdates")}else if(e.storeUpdater){var c=e.storeUpdater;r(16).applyWithGuard(c,null,[o],null,"RelayPublishQueue:applyUpdates")}else{var l=e.source,d=e.fieldPayloads;o.publishSource(l,d)}}),this._pendingOptimisticUpdates.size&&(this._pendingOptimisticUpdates.forEach(function(t){if(t.operation){var n,a=t.selectorStoreUpdater,s=t.operation,u=t.response,c=o.commitPayload(s,u);if(u)n=i(r(15)(s.root,u).source,s.fragment,s);a&&r(16).applyWithGuard(a,null,[c,n],null,"RelayPublishQueue:applyUpdates")}else if(t.storeUpdater){var l=t.storeUpdater;r(16).applyWithGuard(l,null,[o],null,"RelayPublishQueue:applyUpdates")}else{var d=t.source,f=t.fieldPayloads;o.publishSource(d,f)}e._appliedOptimisticUpdates.add(t)}),this._pendingOptimisticUpdates.clear()),this._store.publish(t)}},e}();function i(e,t,n){return r(31).read(e,t,n).data}e.exports=n},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);te.length;){this._resolvers.pop().dispose()}for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,c=arguments.length>3&&void 0!==arguments[3]&&arguments[3],f=i.matchPayloads;f&&f.length&&(o||r(1)(!1),f.forEach(function(n){(function(e,t,n){return r(14).from(new Promise(function(e,r){t.load(n.operationReference).then(e,r)})).map(function(t){if(null!=t){var i={dataID:n.dataID,variables:n.variables,node:t},o=new(r(11)),a=r(2).create(n.dataID,n.typeName);o.set(n.dataID,a);var s=r(37).normalize(o,i,n.data),u={errors:null,fieldPayloads:s.fieldPayloads,matchPayloads:s.matchPayloads,source:o};e(u)}})})(t,o,n).subscribe({complete:d,error:e.error,start:l})})),c?(null!==u&&r(1)(!1),u={source:i.source,fieldPayloads:i.fieldPayloads},n.applyUpdate(u),n.run()):(null!==u&&(n.revertUpdate(u),u=null),a&&s?n.commitPayload(a,i,s):n.commitRelayPayload(i),n.run())},h=i.node;return t.execute(h.params,i.variables,a||{}).subscribe({complete:d,next:function(t){var n,o=r(41)(i,t),a=!0===(null===(n=t.extensions)||void 0===n?void 0:n.isOptimistic);f(o,i,s,a),e.next(t)},error:e.error,start:l}),function(){0!==c.size&&(c.forEach(function(e){return e.unsubscribe()}),c.clear()),null!==u&&(n.revertUpdate(u),u=null,n.run())}})}}},function(e,t,r){"use strict";e.exports=function(e){return!!e&&"function"==typeof e.then}},function(e,t){e.exports=o},function(e,t,r){"use strict";e.exports={create:function(e,t){var n=r(23).convertFetch(e),i=t?r(23).convertSubscribe(t):void 0;return{execute:function(e,t,o,a){if("subscription"===e.operationKind)return i||r(1)(!1),a&&r(1)(!1),i(e,t,o);var s=o.poll;return null!=s?(a&&r(1)(!1),n(e,t,{force:!0}).poll(s)):n(e,t,o,a)}}}}},function(e,t,r){"use strict";var n=r(5)(r(13)),i=function(){function e(e){var t=e.size,n=e.ttl;t>0||r(1)(!1),n>0||r(1)(!1),this._responses=new Map,this._size=t,this._ttl=n}var t=e.prototype;return t.clear=function(){this._responses.clear()},t.get=function(e,t){var r=this,i=o(e,t);this._responses.forEach(function(e,t){(function(e,t){return e+t>=Date.now()})(e.fetchTime,r._ttl)||r._responses.delete(t)});var a=this._responses.get(i);return null!=a?(0,n.default)({},a.payload,{extensions:(0,n.default)({},a.payload.extensions,{cacheTimestamp:a.fetchTime})}):null},t.set=function(e,t,r){var n=Date.now(),i=o(e,t);if(this._responses.delete(i),this._responses.set(i,{fetchTime:n,payload:r}),this._responses.size>this._size){var a=this._responses.keys().next();a.done||this._responses.delete(a.value)}},e}();function o(e,t){return JSON.stringify(r(19)({queryID:e,variables:t}))}e.exports=i},function(e,t,r){"use strict";var n=r(5)(r(13)),i=function(){function e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r(60),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._gcScheduler=t,this._hasScheduledGC=!1,this._index=0,this._operationLoader=n,this._recordSource=e,this._roots=new Map,this._subscriptions=new Set,this._updatedRecordIDs={},this._gcHoldCounter=0,this._shouldScheduleGC=!1}var t=e.prototype;return t.getSource=function(){return this._recordSource},t.check=function(e){return r(39).check(this._recordSource,this._recordSource,e,[],this._operationLoader)},t.retain=function(e){var t=this,r=this._index++;return this._roots.set(r,e),{dispose:function(){t._roots.delete(r),t._scheduleGC()}}},t.lookup=function(e,t){return r(31).read(this._recordSource,e,t)},t.notify=function(){var e=this;this._subscriptions.forEach(function(t){e._updateSubscription(t)}),this._updatedRecordIDs={}},t.publish=function(e){!function(e,t,n){for(var i=t.getRecordIDs(),o=0;o0&&(e._gcHoldCounter--,0===e._gcHoldCounter&&e._shouldScheduleGC&&(e._scheduleGC(),e._shouldScheduleGC=!1))}}},t.toJSON=function(){return"RelayModernStore()"},t.__getUpdatedRecordIDs=function(){return this._updatedRecordIDs},t._updateSubscription=function(e){var t=e.callback,i=e.snapshot;if(r(61)(i,this._updatedRecordIDs)){var o=r(31).read(this._recordSource,i,i.owner),a=o.data,s=o.seenRecords,u=r(43)(i.data,a),c=(0,n.default)({},i,{data:u,seenRecords:s});0,e.snapshot=c,c.data!==i.data&&t(c)}},t._scheduleGC=function(){var e=this;this._gcHoldCounter>0?this._shouldScheduleGC=!0:this._hasScheduledGC||(this._hasScheduledGC=!0,this._gcScheduler(function(){e.__gc(),e._hasScheduledGC=!1}))},t.__gc=function(){var e=this,t=new Set;if(this._roots.forEach(function(n){r(62).mark(e._recordSource,n,t,e._operationLoader)}),t.size)for(var n=this._recordSource.getRecordIDs(),i=0;i1?t-1:0),n=1;n