@vulcanjs/react-ui 0.6.6-alpha.6 → 0.6.6-y.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (138) hide show
  1. package/dist/components/Datatable/Datatable.d.ts.map +0 -0
  2. package/dist/components/Datatable/DatatableCell.d.ts.map +0 -0
  3. package/dist/components/Datatable/DatatableContents.d.ts.map +0 -0
  4. package/dist/components/Datatable/DatatableFilter.d.ts.map +0 -0
  5. package/dist/components/Datatable/DatatableHeader.d.ts.map +0 -0
  6. package/dist/components/Datatable/DatatableRow.d.ts.map +0 -0
  7. package/dist/components/Datatable/DatatableSelect.d.ts.map +0 -0
  8. package/dist/components/Datatable/DatatableSorter.d.ts.map +0 -0
  9. package/dist/components/Datatable/DatatableSubmitSelected.d.ts.map +0 -0
  10. package/dist/components/Datatable/others/DeleteButton.d.ts.map +0 -0
  11. package/dist/components/Datatable/others/EditButton.d.ts.map +0 -0
  12. package/dist/components/Datatable/others/NewButton.d.ts.map +0 -0
  13. package/dist/components/HeadTags.d.ts.map +0 -0
  14. package/dist/components/LoadingButton.d.ts.map +0 -0
  15. package/dist/components/MutationButton.d.ts.map +0 -0
  16. package/dist/components/VulcanComponents/Consumer.d.ts.map +0 -0
  17. package/dist/components/VulcanComponents/Context.d.ts.map +0 -0
  18. package/dist/components/VulcanComponents/Dummy.d.ts.map +0 -0
  19. package/dist/components/VulcanComponents/Provider.d.ts.map +1 -1
  20. package/dist/components/VulcanComponents/defaultVulcanComponents/cellComponents.d.ts.map +0 -0
  21. package/dist/components/VulcanComponents/defaultVulcanComponents/coreComponents.d.ts.map +0 -0
  22. package/dist/components/VulcanComponents/defaultVulcanComponents/datatableComponents.d.ts.map +0 -0
  23. package/dist/components/VulcanComponents/defaultVulcanComponents/formComponents.d.ts.map +0 -0
  24. package/dist/components/VulcanComponents/defaultVulcanComponents/index.d.ts.map +0 -0
  25. package/dist/components/VulcanComponents/index.d.ts +1 -0
  26. package/dist/components/VulcanComponents/index.d.ts.map +1 -1
  27. package/dist/components/VulcanComponents/typings.d.ts.map +0 -0
  28. package/dist/components/VulcanCurrentUser/Consumer.d.ts.map +0 -0
  29. package/dist/components/VulcanCurrentUser/Context.d.ts.map +0 -0
  30. package/dist/components/VulcanCurrentUser/Provider.d.ts.map +0 -0
  31. package/dist/components/VulcanCurrentUser/index.d.ts.map +0 -0
  32. package/dist/components/bootstrap/Dropdown.d.ts.map +0 -0
  33. package/dist/components/bootstrap/Modal.d.ts.map +0 -0
  34. package/dist/components/bootstrap/ModalTrigger.d.ts.map +0 -0
  35. package/dist/components/bootstrap/TooltipTrigger.d.ts.map +0 -0
  36. package/dist/components/cell/CardItem.d.ts.map +0 -0
  37. package/dist/components/cell/CardItemArray.d.ts.map +0 -0
  38. package/dist/components/cell/CardItemDate.d.ts.map +0 -0
  39. package/dist/components/cell/CardItemDefault.d.ts.map +0 -0
  40. package/dist/components/cell/CardItemHTML.d.ts.map +0 -0
  41. package/dist/components/cell/CardItemImage.d.ts.map +0 -0
  42. package/dist/components/cell/CardItemNumber.d.ts.map +0 -0
  43. package/dist/components/cell/CardItemObject.d.ts.map +0 -0
  44. package/dist/components/cell/CardItemRelationHasMany.d.ts.map +0 -0
  45. package/dist/components/cell/CardItemRelationHasOne.d.ts.map +0 -0
  46. package/dist/components/cell/CardItemRelationItem.d.ts.map +0 -0
  47. package/dist/components/cell/CardItemString.d.ts.map +0 -0
  48. package/dist/components/cell/CardItemURL.d.ts.map +0 -0
  49. package/dist/components/core/Button.d.ts.map +0 -0
  50. package/dist/components/core/Loading.d.ts.map +0 -0
  51. package/dist/components/form/core/Form/Form.d.ts.map +0 -0
  52. package/dist/components/form/core/Form/fields.d.ts.map +0 -0
  53. package/dist/components/form/core/Form/index.d.ts.map +0 -0
  54. package/dist/components/form/core/Form/typings.d.ts.map +0 -0
  55. package/dist/components/form/core/Form/utils.d.ts.map +0 -0
  56. package/dist/components/form/core/FormComponent.d.ts.map +0 -0
  57. package/dist/components/form/core/FormComponentInner.d.ts.map +0 -0
  58. package/dist/components/form/core/FormComponentLoader.d.ts.map +0 -0
  59. package/dist/components/form/core/FormContainer.d.ts.map +0 -0
  60. package/dist/components/form/core/FormContext.d.ts.map +0 -0
  61. package/dist/components/form/core/FormGroup.d.ts.map +0 -0
  62. package/dist/components/form/core/index.d.ts.map +0 -0
  63. package/dist/components/form/elements/FieldErrors.d.ts.map +0 -0
  64. package/dist/components/form/elements/FormElement.d.ts.map +0 -0
  65. package/dist/components/form/elements/FormError.d.ts.map +0 -0
  66. package/dist/components/form/elements/FormErrors.d.ts.map +0 -0
  67. package/dist/components/form/elements/FormLayout.d.ts.map +0 -0
  68. package/dist/components/form/elements/FormSubmit.d.ts.map +0 -0
  69. package/dist/components/form/elements/index.d.ts.map +0 -0
  70. package/dist/components/form/hooks/useBlockTransition/block.d.ts.map +0 -0
  71. package/dist/components/form/hooks/useBlockTransition/useBlockTransition.d.ts.map +0 -0
  72. package/dist/components/form/hooks/useWarnOnUnsaved/index.d.ts.map +0 -0
  73. package/dist/components/form/hooks/useWarnOnUnsaved/useWarnOnUnsaved.d.ts.map +0 -0
  74. package/dist/components/form/index.d.ts.map +0 -0
  75. package/dist/components/form/inputs/AutocompleteMultiple.d.ts.map +0 -0
  76. package/dist/components/form/inputs/BasicInputs.d.ts.map +0 -0
  77. package/dist/components/form/inputs/Checkboxgroup.d.ts.map +0 -0
  78. package/dist/components/form/inputs/FormItem.d.ts.map +0 -0
  79. package/dist/components/form/inputs/FormOptionLabel.d.ts.map +0 -0
  80. package/dist/components/form/inputs/RadioGroup.d.ts.map +1 -1
  81. package/dist/components/form/inputs/SelectInputs.d.ts.map +0 -0
  82. package/dist/components/form/inputs/consts.d.ts.map +0 -0
  83. package/dist/components/form/inputs/index.d.ts.map +0 -0
  84. package/dist/components/form/intl/FormIntl.d.ts.map +0 -0
  85. package/dist/components/form/nested/FormNestedArray.d.ts.map +0 -0
  86. package/dist/components/form/nested/FormNestedArrayLayout.d.ts.map +0 -0
  87. package/dist/components/form/nested/FormNestedDivider.d.ts.map +0 -0
  88. package/dist/components/form/nested/FormNestedItem.d.ts.map +0 -0
  89. package/dist/components/form/nested/FormNestedObject.d.ts.map +0 -0
  90. package/dist/components/form/nested/index.d.ts.map +0 -0
  91. package/dist/components/form/typings.d.ts.map +0 -0
  92. package/dist/components/form/utils/formFragments.d.ts.map +0 -0
  93. package/dist/components/form/utils/path_utils.d.ts.map +0 -0
  94. package/dist/components/form/utils/schema_utils.d.ts.map +0 -0
  95. package/dist/components/form/utils/ui_utils.d.ts.map +0 -0
  96. package/dist/components/form/utils/utils.d.ts.map +0 -0
  97. package/dist/componentsHelpers.d.ts.map +0 -0
  98. package/dist/index.d.ts.map +0 -0
  99. package/dist/index.js +576 -573
  100. package/dist/index.js.map +1 -1
  101. package/package.json +2 -2
  102. package/dist/components/form/FieldErrors.d.ts +0 -6
  103. package/dist/components/form/Form/Form.d.ts +0 -4
  104. package/dist/components/form/Form/fields.d.ts +0 -22
  105. package/dist/components/form/Form/index.d.ts +0 -3
  106. package/dist/components/form/Form/typings.d.ts +0 -76
  107. package/dist/components/form/Form/utils.d.ts +0 -2
  108. package/dist/components/form/FormComponent.d.ts +0 -31
  109. package/dist/components/form/FormComponentInner.d.ts +0 -32
  110. package/dist/components/form/FormComponentLoader.d.ts +0 -15
  111. package/dist/components/form/FormContainer.d.ts +0 -18
  112. package/dist/components/form/FormContext.d.ts +0 -25
  113. package/dist/components/form/FormElement.d.ts +0 -4
  114. package/dist/components/form/FormError.d.ts +0 -11
  115. package/dist/components/form/FormErrors.d.ts +0 -3
  116. package/dist/components/form/FormGroup.d.ts +0 -30
  117. package/dist/components/form/FormIntl.d.ts +0 -15
  118. package/dist/components/form/FormLayout.d.ts +0 -10
  119. package/dist/components/form/FormNestedArray.d.ts +0 -26
  120. package/dist/components/form/FormNestedArrayLayout.d.ts +0 -18
  121. package/dist/components/form/FormNestedDivider.d.ts +0 -13
  122. package/dist/components/form/FormNestedItem.d.ts +0 -52
  123. package/dist/components/form/FormNestedObject.d.ts +0 -35
  124. package/dist/components/form/FormOptionLabel.d.ts +0 -5
  125. package/dist/components/form/FormSubmit.d.ts +0 -38
  126. package/dist/components/form/core/Button.d.ts +0 -4
  127. package/dist/components/form/core/Loading.d.ts +0 -3
  128. package/dist/components/form/modules/formFragments.d.ts +0 -16
  129. package/dist/components/form/modules/path_utils.d.ts +0 -6
  130. package/dist/components/form/modules/schema_utils.d.ts +0 -14
  131. package/dist/components/form/modules/utils.d.ts +0 -17
  132. package/dist/components/form/ui_utils.d.ts +0 -3
  133. package/dist/components/form/useBlockTransition/block.d.ts +0 -4
  134. package/dist/components/form/useBlockTransition/useBlockTransition.d.ts +0 -5
  135. package/dist/components/form/useWarnOnUnsaved/index.d.ts +0 -2
  136. package/dist/components/form/useWarnOnUnsaved/useWarnOnUnsaved.d.ts +0 -5
  137. package/dist/decorators/autocomplete.d.ts +0 -8
  138. package/dist/decorators/index.d.ts +0 -4
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../node_modules/tslib/tslib.js","../../../node_modules/react-is/cjs/react-is.production.min.js","../../../node_modules/react-is/cjs/react-is.development.js","../../../node_modules/react-is/index.js","../../../node_modules/object-assign/index.js","../../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../../node_modules/prop-types/lib/has.js","../../../node_modules/prop-types/checkPropTypes.js","../../../node_modules/prop-types/factoryWithTypeCheckers.js","../../../node_modules/prop-types/factoryWithThrowingShims.js","../../../node_modules/prop-types/index.js","../../../node_modules/moment/moment.js","../index.ts","../components/form/index.ts","../components/form/core/FormContainer.tsx","../../../node_modules/graphql-tag/lib/index.js","../../../node_modules/tslib/modules/index.js","../../../node_modules/graphql/index.mjs","../../../node_modules/graphql/language/parser.mjs","../../../node_modules/graphql/error/syntaxError.mjs","../../../node_modules/graphql/error/GraphQLError.mjs","../../../node_modules/graphql/jsutils/isObjectLike.mjs","../../../node_modules/graphql/polyfills/symbols.mjs","../../../node_modules/graphql/language/location.mjs","../../../node_modules/graphql/language/printLocation.mjs","../../../node_modules/graphql/language/kinds.mjs","../../../node_modules/graphql/language/ast.mjs","../../../node_modules/graphql/jsutils/defineInspect.mjs","../../../node_modules/graphql/jsutils/invariant.mjs","../../../node_modules/graphql/jsutils/nodejsCustomInspectSymbol.mjs","../../../node_modules/graphql/language/tokenKind.mjs","../../../node_modules/graphql/language/source.mjs","../../../node_modules/graphql/jsutils/inspect.mjs","../../../node_modules/graphql/jsutils/devAssert.mjs","../../../node_modules/graphql/jsutils/instanceOf.mjs","../../../node_modules/graphql/language/directiveLocation.mjs","../../../node_modules/graphql/language/lexer.mjs","../../../node_modules/graphql/language/blockString.mjs","../../../node_modules/graphql/language/index.mjs","../components/form/utils/formFragments.ts","../components/VulcanComponents/Consumer.tsx","../components/VulcanComponents/Context.ts","../components/VulcanComponents/Dummy.tsx","../components/VulcanCurrentUser/Consumer.tsx","../components/VulcanCurrentUser/Context.ts","../components/form/core/Form/index.ts","../components/form/core/Form/Form.tsx","../components/form/utils/schema_utils.ts","../components/form/utils/utils.ts","../components/form/utils/path_utils.ts","../components/form/core/FormContext.tsx","../components/form/core/Form/fields.ts","../components/form/core/Form/utils.ts","../components/form/hooks/useWarnOnUnsaved/index.ts","../components/form/hooks/useWarnOnUnsaved/useWarnOnUnsaved.ts","../components/form/hooks/useBlockTransition/useBlockTransition.ts","../components/form/hooks/useBlockTransition/block.ts","../components/form/core/Form/typings.ts","../components/VulcanComponents/index.ts","../components/VulcanComponents/Provider.tsx","../components/VulcanComponents/defaultVulcanComponents/index.ts","../components/VulcanComponents/defaultVulcanComponents/formComponents.ts","../components/form/elements/index.ts","../components/form/elements/FieldErrors.tsx","../components/form/elements/FormError.tsx","../components/form/elements/FormErrors.tsx","../components/form/elements/FormSubmit.tsx","../components/form/elements/FormLayout.tsx","../components/form/elements/FormElement.tsx","../components/form/core/index.ts","../components/form/core/FormComponent.tsx","../components/form/inputs/consts.ts","../components/form/core/FormComponentInner.tsx","../components/form/utils/ui_utils.ts","../components/form/core/FormComponentLoader.tsx","../components/form/core/FormGroup.tsx","../components/form/intl/FormIntl.tsx","../components/form/nested/index.ts","../components/form/nested/FormNestedArray.tsx","../components/form/nested/FormNestedArrayLayout.tsx","../components/form/nested/FormNestedItem.tsx","../components/form/nested/FormNestedDivider.tsx","../components/form/nested/FormNestedObject.tsx","../components/form/inputs/index.ts","../components/form/inputs/BasicInputs.tsx","../components/form/inputs/RadioGroup.tsx","../components/form/inputs/Checkboxgroup.tsx","../components/form/inputs/SelectInputs.tsx","../components/form/inputs/FormItem.tsx","../components/form/inputs/FormOptionLabel.tsx","../components/form/inputs/AutocompleteMultiple.tsx","../components/VulcanComponents/defaultVulcanComponents/datatableComponents.ts","../components/Datatable/Datatable.tsx","../components/Datatable/DatatableContents.tsx","../components/Datatable/DatatableHeader.tsx","../components/Datatable/DatatableRow.tsx","../components/Datatable/DatatableCell.tsx","../components/Datatable/DatatableFilter.tsx","../components/Datatable/DatatableSorter.tsx","../components/Datatable/DatatableSelect.tsx","../components/Datatable/DatatableSubmitSelected.tsx","../components/Datatable/others/EditButton.tsx","../components/Datatable/others/NewButton.tsx","../components/Datatable/others/DeleteButton.tsx","../components/VulcanComponents/defaultVulcanComponents/cellComponents.ts","../components/cell/CardItem.tsx","../components/cell/CardItemRelationItem.tsx","../components/cell/CardItemArray.tsx","../components/cell/CardItemDate.tsx","../components/cell/CardItemDefault.tsx","../components/cell/CardItemHTML.tsx","../components/cell/CardItemImage.tsx","../components/cell/CardItemNumber.tsx","../components/cell/CardItemObject.tsx","../components/cell/CardItemRelationHasMany.tsx","../components/cell/CardItemRelationHasOne.tsx","../components/cell/CardItemString.tsx","../components/cell/CardItemURL.tsx","../components/VulcanComponents/defaultVulcanComponents/coreComponents.ts","../components/core/Button.tsx","../components/core/Loading.tsx","../components/LoadingButton.tsx","../components/MutationButton.tsx","../components/HeadTags.tsx","../components/bootstrap/TooltipTrigger.tsx","../components/bootstrap/Dropdown.tsx","../components/bootstrap/Modal.tsx","../components/bootstrap/ModalTrigger.tsx","../components/VulcanComponents/typings.ts","../components/VulcanCurrentUser/index.ts","../components/VulcanCurrentUser/Provider.tsx","../componentsHelpers.tsx"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global global, define, System, Reflect, Promise */\r\nvar __extends;\r\nvar __assign;\r\nvar __rest;\r\nvar __decorate;\r\nvar __param;\r\nvar __metadata;\r\nvar __awaiter;\r\nvar __generator;\r\nvar __exportStar;\r\nvar __values;\r\nvar __read;\r\nvar __spread;\r\nvar __spreadArrays;\r\nvar __spreadArray;\r\nvar __await;\r\nvar __asyncGenerator;\r\nvar __asyncDelegator;\r\nvar __asyncValues;\r\nvar __makeTemplateObject;\r\nvar __importStar;\r\nvar __importDefault;\r\nvar __classPrivateFieldGet;\r\nvar __classPrivateFieldSet;\r\nvar __classPrivateFieldIn;\r\nvar __createBinding;\r\n(function (factory) {\r\n var root = typeof global === \"object\" ? global : typeof self === \"object\" ? self : typeof this === \"object\" ? this : {};\r\n if (typeof define === \"function\" && define.amd) {\r\n define(\"tslib\", [\"exports\"], function (exports) { factory(createExporter(root, createExporter(exports))); });\r\n }\r\n else if (typeof module === \"object\" && typeof module.exports === \"object\") {\r\n factory(createExporter(root, createExporter(module.exports)));\r\n }\r\n else {\r\n factory(createExporter(root));\r\n }\r\n function createExporter(exports, previous) {\r\n if (exports !== root) {\r\n if (typeof Object.create === \"function\") {\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n }\r\n else {\r\n exports.__esModule = true;\r\n }\r\n }\r\n return function (id, v) { return exports[id] = previous ? previous(id, v) : v; };\r\n }\r\n})\r\n(function (exporter) {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n\r\n __extends = function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n\r\n __assign = Object.assign || function (t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n\r\n __rest = function (s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n };\r\n\r\n __decorate = function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n };\r\n\r\n __param = function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n };\r\n\r\n __metadata = function (metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n };\r\n\r\n __awaiter = function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n };\r\n\r\n __generator = function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n };\r\n\r\n __exportStar = function(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n };\r\n\r\n __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n }) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n });\r\n\r\n __values = function (o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n };\r\n\r\n __read = function (o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n };\r\n\r\n /** @deprecated */\r\n __spread = function () {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n };\r\n\r\n /** @deprecated */\r\n __spreadArrays = function () {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n };\r\n\r\n __spreadArray = function (to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n };\r\n\r\n __await = function (v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n };\r\n\r\n __asyncGenerator = function (thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n };\r\n\r\n __asyncDelegator = function (o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n };\r\n\r\n __asyncValues = function (o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n };\r\n\r\n __makeTemplateObject = function (cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n };\r\n\r\n var __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n }) : function(o, v) {\r\n o[\"default\"] = v;\r\n };\r\n\r\n __importStar = function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n };\r\n\r\n __importDefault = function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n };\r\n\r\n __classPrivateFieldGet = function (receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n };\r\n\r\n __classPrivateFieldSet = function (receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n };\r\n\r\n __classPrivateFieldIn = function (state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n };\r\n\r\n exporter(\"__extends\", __extends);\r\n exporter(\"__assign\", __assign);\r\n exporter(\"__rest\", __rest);\r\n exporter(\"__decorate\", __decorate);\r\n exporter(\"__param\", __param);\r\n exporter(\"__metadata\", __metadata);\r\n exporter(\"__awaiter\", __awaiter);\r\n exporter(\"__generator\", __generator);\r\n exporter(\"__exportStar\", __exportStar);\r\n exporter(\"__createBinding\", __createBinding);\r\n exporter(\"__values\", __values);\r\n exporter(\"__read\", __read);\r\n exporter(\"__spread\", __spread);\r\n exporter(\"__spreadArrays\", __spreadArrays);\r\n exporter(\"__spreadArray\", __spreadArray);\r\n exporter(\"__await\", __await);\r\n exporter(\"__asyncGenerator\", __asyncGenerator);\r\n exporter(\"__asyncDelegator\", __asyncDelegator);\r\n exporter(\"__asyncValues\", __asyncValues);\r\n exporter(\"__makeTemplateObject\", __makeTemplateObject);\r\n exporter(\"__importStar\", __importStar);\r\n exporter(\"__importDefault\", __importDefault);\r\n exporter(\"__classPrivateFieldGet\", __classPrivateFieldGet);\r\n exporter(\"__classPrivateFieldSet\", __classPrivateFieldSet);\r\n exporter(\"__classPrivateFieldIn\", __classPrivateFieldIn);\r\n});\r\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","/** @license React v16.13.1\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n// (unstable) APIs that have been removed. Can we remove the symbols?\n\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\nvar REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\nvar REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_ASYNC_MODE_TYPE:\n case REACT_CONCURRENT_MODE_TYPE:\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n} // AsyncMode is deprecated along with isAsyncMode\n\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","module.exports = Function.call.bind(Object.prototype.hasOwnProperty);\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n var has = require('./lib/has');\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) { /**/ }\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +\n 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n );\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n if (process.env.NODE_ENV !== 'production') {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactIs = require('react-is');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar has = require('./lib/has');\nvar checkPropTypes = require('./checkPropTypes');\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<<anonymous>>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bigint: createPrimitiveTypeChecker('bigint'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message, data) {\n this.message = message;\n this.data = data && typeof data === 'object' ? data: {};\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),\n {expectedType: expectedType}\n );\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (process.env.NODE_ENV !== 'production') {\n if (arguments.length > 1) {\n printWarning(\n 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n );\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n if (type === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var expectedTypes = [];\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);\n if (checkerResult == null) {\n return null;\n }\n if (checkerResult.data && has(checkerResult.data, 'expectedType')) {\n expectedTypes.push(checkerResult.data.expectedType);\n }\n }\n var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function invalidValidatorError(componentName, location, propFullName, key, type) {\n return new PropTypeError(\n (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'\n );\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (has(shapeTypes, key) && typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // falsy value can't be a Symbol\n if (!propValue) {\n return false;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","//! moment.js\n//! version : 2.29.3\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n global.moment = factory()\n}(this, (function () { 'use strict';\n\n var hookCallback;\n\n function hooks() {\n return hookCallback.apply(null, arguments);\n }\n\n // This is done to register the method called with moment()\n // without creating circular dependencies.\n function setHookCallback(callback) {\n hookCallback = callback;\n }\n\n function isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n }\n\n function isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n }\n\n function hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n }\n\n function isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n }\n\n function isUndefined(input) {\n return input === void 0;\n }\n\n function isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n }\n\n function isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n }\n\n function map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n }\n\n function extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n }\n\n function createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n }\n\n function defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n }\n\n function getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n }\n\n var some;\n if (Array.prototype.some) {\n some = Array.prototype.some;\n } else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n }\n\n function isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n }\n\n function createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n }\n\n // Plugins that add properties should also add the key here (null value),\n // so we can properly clone ourselves.\n var momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\n function copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n }\n\n // Moment prototype object\n function Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n }\n\n function isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n }\n\n function warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n }\n\n function deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n }\n\n var deprecations = {};\n\n function deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n }\n\n hooks.suppressDeprecationWarnings = false;\n hooks.deprecationHandler = null;\n\n function isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n }\n\n function set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n }\n\n function mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n }\n\n function Locale(config) {\n if (config != null) {\n this.set(config);\n }\n }\n\n var keys;\n\n if (Object.keys) {\n keys = Object.keys;\n } else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n }\n\n var defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n };\n\n function calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n }\n\n function zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n }\n\n var formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n // token: 'M'\n // padded: ['MM', 2]\n // ordinal: 'Mo'\n // callback: function () { this.month() + 1 }\n function addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n }\n\n function removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n }\n\n function makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n }\n\n // format date using native date object\n function formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n }\n\n function expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n }\n\n var defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n };\n\n function longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n }\n\n var defaultInvalidDate = 'Invalid date';\n\n function invalidDate() {\n return this._invalidDate;\n }\n\n var defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\n function ordinal(number) {\n return this._ordinal.replace('%d', number);\n }\n\n var defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n };\n\n function relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n }\n\n function pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n }\n\n var aliases = {};\n\n function addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n }\n\n function normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n }\n\n function normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n }\n\n var priorities = {};\n\n function addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n }\n\n function getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n }\n\n function isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n }\n\n function absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n }\n\n function toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n }\n\n function makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n }\n\n function get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n }\n\n function set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n }\n\n // MOMENTS\n\n function stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n }\n\n function stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n }\n\n var match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\n regexes = {};\n\n function addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n }\n\n function getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n }\n\n // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n function unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n }\n\n function regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n\n var tokens = {};\n\n function addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n }\n\n function addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n }\n\n function addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n }\n\n var YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\n function mod(n, x) {\n return ((n % x) + x) % x;\n }\n\n var indexOf;\n\n if (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n } else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n }\n\n function daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n }\n\n // FORMATTING\n\n addFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n });\n\n addFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n });\n\n addFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n });\n\n // ALIASES\n\n addUnitAlias('month', 'M');\n\n // PRIORITY\n\n addUnitPriority('month', 8);\n\n // PARSING\n\n addRegexToken('M', match1to2);\n addRegexToken('MM', match1to2, match2);\n addRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n });\n addRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n });\n\n addParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n });\n\n addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n });\n\n // LOCALES\n\n var defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\n function localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n }\n\n function localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n }\n\n function handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n }\n\n // MOMENTS\n\n function setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n }\n\n function getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n }\n\n function getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n }\n\n function monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n }\n\n function monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n }\n\n function computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n }\n\n // FORMATTING\n\n addFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n });\n\n addFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n });\n\n addFormatToken(0, ['YYYY', 4], 0, 'year');\n addFormatToken(0, ['YYYYY', 5], 0, 'year');\n addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n // ALIASES\n\n addUnitAlias('year', 'y');\n\n // PRIORITIES\n\n addUnitPriority('year', 1);\n\n // PARSING\n\n addRegexToken('Y', matchSigned);\n addRegexToken('YY', match1to2, match2);\n addRegexToken('YYYY', match1to4, match4);\n addRegexToken('YYYYY', match1to6, match6);\n addRegexToken('YYYYYY', match1to6, match6);\n\n addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n addParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n });\n addParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n });\n addParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n });\n\n // HELPERS\n\n function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n }\n\n // HOOKS\n\n hooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n };\n\n // MOMENTS\n\n var getSetYear = makeGetSet('FullYear', true);\n\n function getIsLeapYear() {\n return isLeapYear(this.year());\n }\n\n function createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n }\n\n function createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n }\n\n // start-of-first-week - start-of-year\n function firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n }\n\n // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n }\n\n function weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n }\n\n function weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n }\n\n // FORMATTING\n\n addFormatToken('w', ['ww', 2], 'wo', 'week');\n addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n // ALIASES\n\n addUnitAlias('week', 'w');\n addUnitAlias('isoWeek', 'W');\n\n // PRIORITIES\n\n addUnitPriority('week', 5);\n addUnitPriority('isoWeek', 5);\n\n // PARSING\n\n addRegexToken('w', match1to2);\n addRegexToken('ww', match1to2, match2);\n addRegexToken('W', match1to2);\n addRegexToken('WW', match1to2, match2);\n\n addWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n );\n\n // HELPERS\n\n // LOCALES\n\n function localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n }\n\n var defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n };\n\n function localeFirstDayOfWeek() {\n return this._week.dow;\n }\n\n function localeFirstDayOfYear() {\n return this._week.doy;\n }\n\n // MOMENTS\n\n function getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n function getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n // FORMATTING\n\n addFormatToken('d', 0, 'do', 'day');\n\n addFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n });\n\n addFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n });\n\n addFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n });\n\n addFormatToken('e', 0, 0, 'weekday');\n addFormatToken('E', 0, 0, 'isoWeekday');\n\n // ALIASES\n\n addUnitAlias('day', 'd');\n addUnitAlias('weekday', 'e');\n addUnitAlias('isoWeekday', 'E');\n\n // PRIORITY\n addUnitPriority('day', 11);\n addUnitPriority('weekday', 11);\n addUnitPriority('isoWeekday', 11);\n\n // PARSING\n\n addRegexToken('d', match1to2);\n addRegexToken('e', match1to2);\n addRegexToken('E', match1to2);\n addRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n });\n addRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n });\n addRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n });\n\n addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n });\n\n addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n });\n\n // HELPERS\n\n function parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n }\n\n function parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n }\n\n // LOCALES\n function shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n }\n\n var defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\n function localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n }\n\n function localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n }\n\n function localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n }\n\n function handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n }\n\n // MOMENTS\n\n function getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n }\n\n function getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n }\n\n function getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n }\n\n function weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n }\n\n function weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n }\n\n function weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n }\n\n function computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n }\n\n // FORMATTING\n\n function hFormat() {\n return this.hours() % 12 || 12;\n }\n\n function kFormat() {\n return this.hours() || 24;\n }\n\n addFormatToken('H', ['HH', 2], 0, 'hour');\n addFormatToken('h', ['hh', 2], 0, hFormat);\n addFormatToken('k', ['kk', 2], 0, kFormat);\n\n addFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n });\n\n addFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n });\n\n addFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n });\n\n addFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n });\n\n function meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n }\n\n meridiem('a', true);\n meridiem('A', false);\n\n // ALIASES\n\n addUnitAlias('hour', 'h');\n\n // PRIORITY\n addUnitPriority('hour', 13);\n\n // PARSING\n\n function matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n }\n\n addRegexToken('a', matchMeridiem);\n addRegexToken('A', matchMeridiem);\n addRegexToken('H', match1to2);\n addRegexToken('h', match1to2);\n addRegexToken('k', match1to2);\n addRegexToken('HH', match1to2, match2);\n addRegexToken('hh', match1to2, match2);\n addRegexToken('kk', match1to2, match2);\n\n addRegexToken('hmm', match3to4);\n addRegexToken('hmmss', match5to6);\n addRegexToken('Hmm', match3to4);\n addRegexToken('Hmmss', match5to6);\n\n addParseToken(['H', 'HH'], HOUR);\n addParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n });\n addParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n });\n addParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n });\n addParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n });\n\n // LOCALES\n\n function localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n }\n\n var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\n function localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n }\n\n var baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n };\n\n // internal storage for locale config files\n var locales = {},\n localeFamilies = {},\n globalLocale;\n\n function commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n }\n\n function normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n }\n\n // pick the locale from the array\n // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n function chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n }\n\n function isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n }\n\n function loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n }\n\n // This function will load locale and then set the global locale. If\n // no arguments are passed in, it will simply return the current global\n // locale key.\n function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n }\n\n function defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n }\n\n function updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n }\n\n // returns locale data\n function getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n }\n\n function listLocales() {\n return keys(locales);\n }\n\n function checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n }\n\n // iso 8601 regex\n // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\n var extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n // date from iso format\n function configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }\n\n function extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n ) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n }\n\n function untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n }\n\n function preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^)]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n }\n\n function checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n }\n\n function calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n }\n\n // date and time from ref 2822 format\n function configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n }\n\n // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\n function configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n }\n\n hooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n );\n\n // Pick the first defined of two or three arguments.\n function defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n }\n\n function currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n }\n\n // convert an array to a date.\n // the array should mirror the parameters below\n // note: all values past the year are optional and will default to the lowest possible value.\n // [year, month, day , hour, minute, second, millisecond]\n function configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n }\n\n function dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n }\n\n // constant that refers to the ISO standard\n hooks.ISO_8601 = function () {};\n\n // constant that refers to the RFC 2822 form\n hooks.RFC_2822 = function () {};\n\n // date from string and format string\n function configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n }\n\n function meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n }\n\n // date from string and array of format strings\n function configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }\n\n function configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n }\n\n function createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n }\n\n function prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n }\n\n function configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n }\n\n function createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n }\n\n function createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n }\n\n var prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n // Pick a moment m from moments so that m[fn](other) is true for all\n // other. This relies on the function fn to be transitive.\n //\n // moments should either be an array of moment objects or an array, whose\n // first element is an array of moment objects.\n function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }\n\n // TODO: Use [].sort instead?\n function min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n }\n\n function max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n }\n\n var now = function () {\n return Date.now ? Date.now() : +new Date();\n };\n\n var ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n ];\n\n function isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n }\n\n function isValid$1() {\n return this._isValid;\n }\n\n function createInvalid$1() {\n return createDuration(NaN);\n }\n\n function Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n }\n\n function isDuration(obj) {\n return obj instanceof Duration;\n }\n\n function absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n }\n\n // compare two arrays, return the number of differences\n function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }\n\n // FORMATTING\n\n function offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n }\n\n offset('Z', ':');\n offset('ZZ', '');\n\n // PARSING\n\n addRegexToken('Z', matchShortOffset);\n addRegexToken('ZZ', matchShortOffset);\n addParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n });\n\n // HELPERS\n\n // timezone chunker\n // '+10:00' > ['10', '00']\n // '-1530' > ['-15', '30']\n var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n function offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n }\n\n // Return a moment from input, that is local/utc/zone equivalent to model.\n function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }\n\n function getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n }\n\n // HOOKS\n\n // This function will be called whenever a moment is mutated.\n // It is intended to keep the offset in sync with the timezone.\n hooks.updateOffset = function () {};\n\n // MOMENTS\n\n // keepLocalTime = true means only change the timezone, without\n // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n // +0200, so we adjust the time as needed, to be valid.\n //\n // Keeping the time actually adds/subtracts (one hour)\n // from the actual represented time. That is why we call updateOffset\n // a second time. In case it wants us to change the offset again\n // _changeInProgress == true case, then we have to adjust, because\n // there is no such time in the given timezone.\n function getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }\n\n function getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n }\n\n function setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n }\n\n function setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n }\n\n function setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n }\n\n function hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n }\n\n function isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n }\n\n function isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n }\n\n function isLocal() {\n return this.isValid() ? !this._isUTC : false;\n }\n\n function isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n }\n\n function isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n }\n\n // ASP.NET json date format regex\n var aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n function createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n }\n\n createDuration.fn = Duration.prototype;\n createDuration.invalid = createInvalid$1;\n\n function parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n }\n\n function positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n }\n\n function momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n }\n\n // TODO: remove 'name' arg after deprecation is removed\n function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }\n\n function addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n }\n\n var add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\n function isString(input) {\n return typeof input === 'string' || input instanceof String;\n }\n\n // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\n function isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n }\n\n function isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n }\n\n function isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n }\n\n function isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n }\n\n function getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n }\n\n function calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n }\n\n function clone() {\n return new Moment(this);\n }\n\n function isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n }\n\n function isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n }\n\n function isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n }\n\n function isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n }\n\n function isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n }\n\n function isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n }\n\n function diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n }\n\n function monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n }\n\n hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n function toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n }\n\n function toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n\n /**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\n function inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n }\n\n function format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n }\n\n function from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n }\n\n function to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n }\n\n // If passed a locale key, it will set the locale for this\n // instance. Otherwise, it will return the locale configuration\n // variables for this instance.\n function locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n }\n\n var lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n );\n\n function localeData() {\n return this._locale;\n }\n\n var MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n // actual modulo - handles negative numbers (for dates before 1970):\n function mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n }\n\n function localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n }\n\n function utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n }\n\n function startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n }\n\n function endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n }\n\n function valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n }\n\n function unix() {\n return Math.floor(this.valueOf() / 1000);\n }\n\n function toDate() {\n return new Date(this.valueOf());\n }\n\n function toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n }\n\n function toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n }\n\n function toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n }\n\n function isValid$2() {\n return isValid(this);\n }\n\n function parsingFlags() {\n return extend({}, getParsingFlags(this));\n }\n\n function invalidAt() {\n return getParsingFlags(this).overflow;\n }\n\n function creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n }\n\n addFormatToken('N', 0, 0, 'eraAbbr');\n addFormatToken('NN', 0, 0, 'eraAbbr');\n addFormatToken('NNN', 0, 0, 'eraAbbr');\n addFormatToken('NNNN', 0, 0, 'eraName');\n addFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\n addFormatToken('y', ['y', 1], 'yo', 'eraYear');\n addFormatToken('y', ['yy', 2], 0, 'eraYear');\n addFormatToken('y', ['yyy', 3], 0, 'eraYear');\n addFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\n addRegexToken('N', matchEraAbbr);\n addRegexToken('NN', matchEraAbbr);\n addRegexToken('NNN', matchEraAbbr);\n addRegexToken('NNNN', matchEraName);\n addRegexToken('NNNNN', matchEraNarrow);\n\n addParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n );\n\n addRegexToken('y', matchUnsigned);\n addRegexToken('yy', matchUnsigned);\n addRegexToken('yyy', matchUnsigned);\n addRegexToken('yyyy', matchUnsigned);\n addRegexToken('yo', matchEraYearOrdinal);\n\n addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\n addParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n });\n\n function localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n }\n\n function localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n }\n\n function localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n }\n\n function getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n }\n\n function getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n }\n\n function getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n }\n\n function getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n }\n\n function erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n }\n\n function erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n }\n\n function erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n }\n\n function matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n }\n\n function matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n }\n\n function matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n }\n\n function matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n }\n\n function computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n }\n\n // FORMATTING\n\n addFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n });\n\n addFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n });\n\n function addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n }\n\n addWeekYearFormatToken('gggg', 'weekYear');\n addWeekYearFormatToken('ggggg', 'weekYear');\n addWeekYearFormatToken('GGGG', 'isoWeekYear');\n addWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n // ALIASES\n\n addUnitAlias('weekYear', 'gg');\n addUnitAlias('isoWeekYear', 'GG');\n\n // PRIORITY\n\n addUnitPriority('weekYear', 1);\n addUnitPriority('isoWeekYear', 1);\n\n // PARSING\n\n addRegexToken('G', matchSigned);\n addRegexToken('g', matchSigned);\n addRegexToken('GG', match1to2, match2);\n addRegexToken('gg', match1to2, match2);\n addRegexToken('GGGG', match1to4, match4);\n addRegexToken('gggg', match1to4, match4);\n addRegexToken('GGGGG', match1to6, match6);\n addRegexToken('ggggg', match1to6, match6);\n\n addWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n );\n\n addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n });\n\n // MOMENTS\n\n function getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n }\n\n function getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n }\n\n function getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n }\n\n function getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n }\n\n function getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n }\n\n function getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n }\n\n function getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n }\n\n function setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n }\n\n // FORMATTING\n\n addFormatToken('Q', 0, 'Qo', 'quarter');\n\n // ALIASES\n\n addUnitAlias('quarter', 'Q');\n\n // PRIORITY\n\n addUnitPriority('quarter', 7);\n\n // PARSING\n\n addRegexToken('Q', match1);\n addParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n });\n\n // MOMENTS\n\n function getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n }\n\n // FORMATTING\n\n addFormatToken('D', ['DD', 2], 'Do', 'date');\n\n // ALIASES\n\n addUnitAlias('date', 'D');\n\n // PRIORITY\n addUnitPriority('date', 9);\n\n // PARSING\n\n addRegexToken('D', match1to2);\n addRegexToken('DD', match1to2, match2);\n addRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n });\n\n addParseToken(['D', 'DD'], DATE);\n addParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n });\n\n // MOMENTS\n\n var getSetDayOfMonth = makeGetSet('Date', true);\n\n // FORMATTING\n\n addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n // ALIASES\n\n addUnitAlias('dayOfYear', 'DDD');\n\n // PRIORITY\n addUnitPriority('dayOfYear', 4);\n\n // PARSING\n\n addRegexToken('DDD', match1to3);\n addRegexToken('DDDD', match3);\n addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n });\n\n // HELPERS\n\n // MOMENTS\n\n function getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n }\n\n // FORMATTING\n\n addFormatToken('m', ['mm', 2], 0, 'minute');\n\n // ALIASES\n\n addUnitAlias('minute', 'm');\n\n // PRIORITY\n\n addUnitPriority('minute', 14);\n\n // PARSING\n\n addRegexToken('m', match1to2);\n addRegexToken('mm', match1to2, match2);\n addParseToken(['m', 'mm'], MINUTE);\n\n // MOMENTS\n\n var getSetMinute = makeGetSet('Minutes', false);\n\n // FORMATTING\n\n addFormatToken('s', ['ss', 2], 0, 'second');\n\n // ALIASES\n\n addUnitAlias('second', 's');\n\n // PRIORITY\n\n addUnitPriority('second', 15);\n\n // PARSING\n\n addRegexToken('s', match1to2);\n addRegexToken('ss', match1to2, match2);\n addParseToken(['s', 'ss'], SECOND);\n\n // MOMENTS\n\n var getSetSecond = makeGetSet('Seconds', false);\n\n // FORMATTING\n\n addFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n });\n\n addFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n });\n\n addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n addFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n });\n addFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n });\n addFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n });\n addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n });\n addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n });\n addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n });\n\n // ALIASES\n\n addUnitAlias('millisecond', 'ms');\n\n // PRIORITY\n\n addUnitPriority('millisecond', 16);\n\n // PARSING\n\n addRegexToken('S', match1to3, match1);\n addRegexToken('SS', match1to3, match2);\n addRegexToken('SSS', match1to3, match3);\n\n var token, getSetMillisecond;\n for (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n }\n\n function parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n }\n\n for (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n }\n\n getSetMillisecond = makeGetSet('Milliseconds', false);\n\n // FORMATTING\n\n addFormatToken('z', 0, 0, 'zoneAbbr');\n addFormatToken('zz', 0, 0, 'zoneName');\n\n // MOMENTS\n\n function getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n }\n\n function getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n }\n\n var proto = Moment.prototype;\n\n proto.add = add;\n proto.calendar = calendar$1;\n proto.clone = clone;\n proto.diff = diff;\n proto.endOf = endOf;\n proto.format = format;\n proto.from = from;\n proto.fromNow = fromNow;\n proto.to = to;\n proto.toNow = toNow;\n proto.get = stringGet;\n proto.invalidAt = invalidAt;\n proto.isAfter = isAfter;\n proto.isBefore = isBefore;\n proto.isBetween = isBetween;\n proto.isSame = isSame;\n proto.isSameOrAfter = isSameOrAfter;\n proto.isSameOrBefore = isSameOrBefore;\n proto.isValid = isValid$2;\n proto.lang = lang;\n proto.locale = locale;\n proto.localeData = localeData;\n proto.max = prototypeMax;\n proto.min = prototypeMin;\n proto.parsingFlags = parsingFlags;\n proto.set = stringSet;\n proto.startOf = startOf;\n proto.subtract = subtract;\n proto.toArray = toArray;\n proto.toObject = toObject;\n proto.toDate = toDate;\n proto.toISOString = toISOString;\n proto.inspect = inspect;\n if (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n }\n proto.toJSON = toJSON;\n proto.toString = toString;\n proto.unix = unix;\n proto.valueOf = valueOf;\n proto.creationData = creationData;\n proto.eraName = getEraName;\n proto.eraNarrow = getEraNarrow;\n proto.eraAbbr = getEraAbbr;\n proto.eraYear = getEraYear;\n proto.year = getSetYear;\n proto.isLeapYear = getIsLeapYear;\n proto.weekYear = getSetWeekYear;\n proto.isoWeekYear = getSetISOWeekYear;\n proto.quarter = proto.quarters = getSetQuarter;\n proto.month = getSetMonth;\n proto.daysInMonth = getDaysInMonth;\n proto.week = proto.weeks = getSetWeek;\n proto.isoWeek = proto.isoWeeks = getSetISOWeek;\n proto.weeksInYear = getWeeksInYear;\n proto.weeksInWeekYear = getWeeksInWeekYear;\n proto.isoWeeksInYear = getISOWeeksInYear;\n proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\n proto.date = getSetDayOfMonth;\n proto.day = proto.days = getSetDayOfWeek;\n proto.weekday = getSetLocaleDayOfWeek;\n proto.isoWeekday = getSetISODayOfWeek;\n proto.dayOfYear = getSetDayOfYear;\n proto.hour = proto.hours = getSetHour;\n proto.minute = proto.minutes = getSetMinute;\n proto.second = proto.seconds = getSetSecond;\n proto.millisecond = proto.milliseconds = getSetMillisecond;\n proto.utcOffset = getSetOffset;\n proto.utc = setOffsetToUTC;\n proto.local = setOffsetToLocal;\n proto.parseZone = setOffsetToParsedOffset;\n proto.hasAlignedHourOffset = hasAlignedHourOffset;\n proto.isDST = isDaylightSavingTime;\n proto.isLocal = isLocal;\n proto.isUtcOffset = isUtcOffset;\n proto.isUtc = isUtc;\n proto.isUTC = isUtc;\n proto.zoneAbbr = getZoneAbbr;\n proto.zoneName = getZoneName;\n proto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n );\n proto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n );\n proto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n );\n proto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n );\n proto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n );\n\n function createUnix(input) {\n return createLocal(input * 1000);\n }\n\n function createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n }\n\n function preParsePostFormat(string) {\n return string;\n }\n\n var proto$1 = Locale.prototype;\n\n proto$1.calendar = calendar;\n proto$1.longDateFormat = longDateFormat;\n proto$1.invalidDate = invalidDate;\n proto$1.ordinal = ordinal;\n proto$1.preparse = preParsePostFormat;\n proto$1.postformat = preParsePostFormat;\n proto$1.relativeTime = relativeTime;\n proto$1.pastFuture = pastFuture;\n proto$1.set = set;\n proto$1.eras = localeEras;\n proto$1.erasParse = localeErasParse;\n proto$1.erasConvertYear = localeErasConvertYear;\n proto$1.erasAbbrRegex = erasAbbrRegex;\n proto$1.erasNameRegex = erasNameRegex;\n proto$1.erasNarrowRegex = erasNarrowRegex;\n\n proto$1.months = localeMonths;\n proto$1.monthsShort = localeMonthsShort;\n proto$1.monthsParse = localeMonthsParse;\n proto$1.monthsRegex = monthsRegex;\n proto$1.monthsShortRegex = monthsShortRegex;\n proto$1.week = localeWeek;\n proto$1.firstDayOfYear = localeFirstDayOfYear;\n proto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\n proto$1.weekdays = localeWeekdays;\n proto$1.weekdaysMin = localeWeekdaysMin;\n proto$1.weekdaysShort = localeWeekdaysShort;\n proto$1.weekdaysParse = localeWeekdaysParse;\n\n proto$1.weekdaysRegex = weekdaysRegex;\n proto$1.weekdaysShortRegex = weekdaysShortRegex;\n proto$1.weekdaysMinRegex = weekdaysMinRegex;\n\n proto$1.isPM = localeIsPM;\n proto$1.meridiem = localeMeridiem;\n\n function get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n }\n\n function listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n }\n\n // ()\n // (5)\n // (fmt, 5)\n // (fmt)\n // (true)\n // (true, 5)\n // (true, fmt, 5)\n // (true, fmt)\n function listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n }\n\n function listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n }\n\n function listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n }\n\n function listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n }\n\n function listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n }\n\n function listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n }\n\n getSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n });\n\n // Side effect imports\n\n hooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n );\n hooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n );\n\n var mathAbs = Math.abs;\n\n function abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n }\n\n function addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n }\n\n // supports only 2.0-style add(1, 's') or add(duration)\n function add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n }\n\n // supports only 2.0-style subtract(1, 's') or subtract(duration)\n function subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n }\n\n function absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n }\n\n function bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n }\n\n function daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n }\n\n function monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n }\n\n function as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n }\n\n // TODO: Use this.as('ms')?\n function valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n }\n\n function makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n }\n\n var asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\n function clone$1() {\n return createDuration(this);\n }\n\n function get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n }\n\n function makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n }\n\n var milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\n function weeks() {\n return absFloor(this.days() / 7);\n }\n\n var round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n }\n\n function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n }\n\n // This function allows you to set the rounding function for relative time strings\n function getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }\n\n // This function allows you to set a threshold for relative time strings\n function getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }\n\n function humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n }\n\n var abs$1 = Math.abs;\n\n function sign(x) {\n return (x > 0) - (x < 0) || +x;\n }\n\n function toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n }\n\n var proto$2 = Duration.prototype;\n\n proto$2.isValid = isValid$1;\n proto$2.abs = abs;\n proto$2.add = add$1;\n proto$2.subtract = subtract$1;\n proto$2.as = as;\n proto$2.asMilliseconds = asMilliseconds;\n proto$2.asSeconds = asSeconds;\n proto$2.asMinutes = asMinutes;\n proto$2.asHours = asHours;\n proto$2.asDays = asDays;\n proto$2.asWeeks = asWeeks;\n proto$2.asMonths = asMonths;\n proto$2.asQuarters = asQuarters;\n proto$2.asYears = asYears;\n proto$2.valueOf = valueOf$1;\n proto$2._bubble = bubble;\n proto$2.clone = clone$1;\n proto$2.get = get$2;\n proto$2.milliseconds = milliseconds;\n proto$2.seconds = seconds;\n proto$2.minutes = minutes;\n proto$2.hours = hours;\n proto$2.days = days;\n proto$2.weeks = weeks;\n proto$2.months = months;\n proto$2.years = years;\n proto$2.humanize = humanize;\n proto$2.toISOString = toISOString$1;\n proto$2.toString = toISOString$1;\n proto$2.toJSON = toISOString$1;\n proto$2.locale = locale;\n proto$2.localeData = localeData;\n\n proto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n );\n proto$2.lang = lang;\n\n // FORMATTING\n\n addFormatToken('X', 0, 0, 'unix');\n addFormatToken('x', 0, 0, 'valueOf');\n\n // PARSING\n\n addRegexToken('x', matchSigned);\n addRegexToken('X', matchTimestamp);\n addParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n });\n addParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n });\n\n //! moment.js\n\n hooks.version = '2.29.3';\n\n setHookCallback(createLocal);\n\n hooks.fn = proto;\n hooks.min = min;\n hooks.max = max;\n hooks.now = now;\n hooks.utc = createUTC;\n hooks.unix = createUnix;\n hooks.months = listMonths;\n hooks.isDate = isDate;\n hooks.locale = getSetGlobalLocale;\n hooks.invalid = createInvalid;\n hooks.duration = createDuration;\n hooks.isMoment = isMoment;\n hooks.weekdays = listWeekdays;\n hooks.parseZone = createInZone;\n hooks.localeData = getLocale;\n hooks.isDuration = isDuration;\n hooks.monthsShort = listMonthsShort;\n hooks.weekdaysMin = listWeekdaysMin;\n hooks.defineLocale = defineLocale;\n hooks.updateLocale = updateLocale;\n hooks.locales = listLocales;\n hooks.weekdaysShort = listWeekdaysShort;\n hooks.normalizeUnits = normalizeUnits;\n hooks.relativeTimeRounding = getSetRelativeTimeRounding;\n hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\n hooks.calendarFormat = getCalendarFormat;\n hooks.prototype = proto;\n\n // currently HTML5 input type only supports 24-hour formats\n hooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // <input type=\"datetime-local\" />\n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type=\"datetime-local\" step=\"1\" />\n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type=\"datetime-local\" step=\"0.001\" />\n DATE: 'YYYY-MM-DD', // <input type=\"date\" />\n TIME: 'HH:mm', // <input type=\"time\" />\n TIME_SECONDS: 'HH:mm:ss', // <input type=\"time\" step=\"1\" />\n TIME_MS: 'HH:mm:ss.SSS', // <input type=\"time\" step=\"0.001\" />\n WEEK: 'GGGG-[W]WW', // <input type=\"week\" />\n MONTH: 'YYYY-MM', // <input type=\"month\" />\n };\n\n return hooks;\n\n})));\n","export * from \"./components/form\";\nexport * from \"./components/VulcanComponents\";\nexport * from \"./components/VulcanCurrentUser\";\nexport * from \"./componentsHelpers\";\n","export * from \"./core/FormContainer\";\nexport * from \"./core/Form\";\n\nexport * from \"./core/FormContext\";\n\nexport type { FormInputProps } from \"./core/FormComponentInner\";\n","/*\n\nFormContainer aka SmartForm\n\nChanges compared to Vulcan Meteor:\n\n- previously was named FormWrapper\n- accepts a model instead of collection\n- no queryFragmentName (resp. mutation name), instead you need to pass the fragment explicitely\n\nTechnically, this is a GraphqlSmartForm, while Form.tsx is the more\ngeneric SmartForm, or a \"ModelForm\".\n\n\n---\n\nGenerate the appropriate fragment for the current form, then\nwrap the main Form component with the necessary HoCs while passing\nthem the fragment.\n\nThis component is itself wrapped with:\n\n- withCurrentUser\n- withApollo (used to access the Apollo client for form pre-population)\n\nAnd wraps the Form component with:\n\n- withNew\n\nOr:\n\n- withSingle\n- withUpdate\n- withDelete\n\n(When wrapping with withSingle, withUpdate, and withDelete, a special Loader\ncomponent is also added to wait for withSingle's loading prop to be false)\n\n*/\nimport React, { useRef } from \"react\";\n// import // withCurrentUser,\n// Utils,\n// getFragment,\n//\"meteor/vulcan:core\";\nimport { DocumentNode } from \"@apollo/client\";\nimport gql from \"graphql-tag\";\n\nimport getFormFragments from \"../utils/formFragments\";\n// import { VulcanModel } from \"@vulcanjs/model\";\nimport { VulcanGraphqlModel, getFragmentName } from \"@vulcanjs/graphql\";\nimport type {\n CreateVariables,\n UpdateVariables,\n DeleteVariables,\n} from \"@vulcanjs/crud\";\nimport { capitalize } from \"@vulcanjs/utils\";\nimport {\n useSingle,\n useCreate,\n useUpdate,\n useDelete,\n UseSingleOptions,\n} from \"@vulcanjs/react-hooks\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\nimport { FetchResult } from \"@apollo/client\";\n// import { FormType } from \"./typings\";\nimport { debugVulcan } from \"@vulcanjs/utils\";\nimport { useVulcanCurrentUser } from \"../../VulcanCurrentUser/Consumer\";\nimport { VulcanUser } from \"@vulcanjs/permissions\";\nimport { PassedDownFormProps } from \"./Form/typings\";\nconst debugForm = debugVulcan(\"form\");\n\n// Mutation that yield a success result\ntype SuccessfulFetchResult<TData = Object> = FetchResult<TData> & {\n data: TData;\n};\n/**\n * Typeguared to allow considering the request as successful\n */\nconst isSuccessful = function <T = any>(\n result: FetchResult<T> | undefined\n): result is SuccessfulFetchResult<T> {\n return !!result?.data;\n};\n\nexport interface FormContainerProps extends PassedDownFormProps {\n model: VulcanGraphqlModel;\n /** Document id for edition mode, will automatically fetch the document */\n documentId?: string;\n /** Slug (= human readable unique id) for edition mode, will automatically fetch the document */\n slug?: string;\n /**\n * List only those fields in the form\n */\n fields?: Array<string>;\n /**\n * List default fields + those additional fields as well\n */\n addFields?: Array<string>;\n /**\n * Force a currentUser, overriding the currentUser obtained\n * via Context\n *\n * If you use many forms in your app,\n * it might be better to set VulcanCurrentUserContext\n * at the top-level of your app\n * (eg in \"pages/_app.js\" for Next.js)\n */\n currentUser?: VulcanUser | null;\n loadingCurrentUser?: boolean;\n}\nexport type SmartFormProps = FormContainerProps;\n\nconst useFragments = (\n props: Pick<\n FormContainerProps,\n | \"mutationFragment\"\n | \"mutationFragmentName\"\n | \"queryFragment\"\n | \"queryFragmentName\"\n // for auto generation\n | \"model\"\n | \"fields\"\n | \"addFields\"\n >,\n formType: \"edit\" | \"new\"\n) => {\n // get fragment used to decide what data to load from the server to populate the form,\n // as well as what data to ask for as return value for the mutation\n // TODO: move out of the component\n //const getFragments = () => {\n let queryFragment: DocumentNode | undefined;\n let queryFragmentName: string | undefined;\n let mutationFragment: DocumentNode | undefined;\n let mutationFragmentName: string | undefined;\n\n // if queryFragment or mutationFragment props are specified, accept either fragment object or fragment string\n // TODO: not sure we actually need that, gApollo accepts fragments or string normally\n if (props.queryFragment) {\n if (typeof props.queryFragment === \"string\") {\n queryFragment = gql`\n ${props.queryFragment}\n `;\n if (!props.queryFragmentName)\n throw new Error(\n \"When using a string queryFragment, queryFragmentName is mandatory\"\n );\n queryFragmentName = props.queryFragmentName;\n } else {\n // DocumentNode\n queryFragment = props.queryFragment;\n // automatically compute the fragment name\n queryFragmentName =\n props.queryFragmentName || getFragmentName(props.queryFragment);\n }\n }\n if (props.mutationFragment) {\n if (typeof props.mutationFragment === \"string\") {\n mutationFragment = gql`\n ${props.mutationFragment}\n `;\n if (!props.mutationFragmentName)\n throw new Error(\n \"When using a string mutationFragment, mutationFragmentName is mandatory\"\n );\n queryFragmentName = props.mutationFragmentName;\n } else {\n // DocumentNode\n mutationFragment = props.mutationFragment;\n // automatically compute the fragment name\n mutationFragmentName =\n props.mutationFragmentName || getFragmentName(props.mutationFragment);\n }\n }\n // auto generate fragments\n let autoFormFragments;\n if (!props.queryFragment || !props.mutationFragment) {\n const { model, fields, addFields } = props;\n // autogenerated fragments\n autoFormFragments = getFormFragments({\n formType,\n model,\n fields,\n addFields,\n });\n }\n // use autogenerated value if necessary\n if (!props.queryFragment) {\n queryFragment = autoFormFragments.queryFragment;\n queryFragmentName = autoFormFragments.queryFragmentName;\n }\n if (!props.mutationFragment) {\n mutationFragment = autoFormFragments.mutationFragment;\n mutationFragmentName = autoFormFragments.mutationFragmentName;\n }\n return {\n mutationFragment: mutationFragment as DocumentNode,\n mutationFragmentName: mutationFragmentName as string,\n queryFragment: queryFragment as DocumentNode,\n queryFragmentName: queryFragmentName as string,\n };\n};\n// Fonctionnal version to be able to use hooks\nexport const FormContainer = (props: FormContainerProps) => {\n const {\n model,\n documentId,\n slug,\n fields,\n addFields,\n currentUser: currentUserFromProps,\n loadingCurrentUser: loadingCurrentUserFromProps,\n } = props;\n const { schema } = model;\n // if a document is being passed, this is an edit form\n const isEdit = documentId || slug;\n const selector = {\n documentId,\n slug,\n };\n const formType = isEdit ? \"edit\" : \"new\";\n const VulcanComponents = useVulcanComponents();\n\n // get query & mutation fragments from props or else default to same as generatedFragment\n //return {\n // queryFragment,\n // mutationFragment,\n //};\n //}\n\n const prefix = `${model.name}${capitalize(formType)}`;\n // props to pass on to child component (i.e. <Form />)\n const childProps = {\n formType,\n schema,\n };\n\n const {\n mutationFragment,\n mutationFragmentName,\n queryFragment,\n queryFragmentName,\n } = useFragments(props, formType);\n\n // options for useCreate, useUpdate and useDelete\n const mutationOptions = {\n model,\n // collection: this.props.collection,\n fragment: mutationFragment,\n fragmentName: mutationFragmentName,\n };\n\n const queryOptions: UseSingleOptions<any> = {\n model,\n // TODO: what this option does?\n // queryName: `${prefix}FormQuery`,\n fragment: queryFragment,\n fragmentName: queryFragmentName,\n // fragmentName?\n input: {\n id: documentId,\n enableCache: false,\n // TODO: support slug\n },\n queryOptions: {\n // we always want to load a fresh copy of the document\n fetchPolicy: \"network-only\" as \"network-only\", // cast is for fixing annoying TS issue... https://github.com/vuejs/vue-apollo/issues/936\n pollInterval: 0, // no polling, only load data once\n skip: formType === \"new\",\n },\n };\n /* debug\n console.log(\n \"MUT\",\n (mutationFragment as any).loc.source.body,\n mutationFragmentName\n );\n console.log(\n \"QUERY\",\n (queryFragment as any).loc.source.body,\n queryFragmentName\n );*/\n const { data, document, loading, refetch } = useSingle(queryOptions);\n if (formType !== \"new\") {\n debugForm(\n \"useSingle result\",\n \"data\",\n data,\n \"document\",\n document,\n \"loading\",\n loading\n );\n }\n // TODO: pass the creation functions down to the Form\n const [createDocument] = useCreate(mutationOptions);\n const [updateDocument] = useUpdate(mutationOptions);\n const [deleteDocument] = useDelete(mutationOptions);\n\n const {\n currentUser: currentUserFromContext,\n loading: loadingCurrentUserFromContext,\n } = useVulcanCurrentUser();\n const shouldGetCurrentUserFromProps =\n typeof currentUserFromProps !== \"undefined\";\n const currentUser = shouldGetCurrentUserFromProps\n ? currentUserFromProps\n : currentUserFromContext;\n const loadingCurrentUser = shouldGetCurrentUserFromProps\n ? loadingCurrentUserFromProps\n : loadingCurrentUserFromContext;\n\n // callbacks\n /*\n const formRef = useRef(null);\n const newMutationSuccessCallback = function <TData = Object>(\n result: SuccessfulFetchResult<TData>\n ) {\n getDocumentFromResult(result, \"new\");\n };\n const editMutationSuccessCallback = function <TData = Object>(\n result: SuccessfulFetchResult<TData>\n ) {\n getDocumentFromResult(result, \"edit\");\n };\n */\n\n /*\n The create hook already creates a document prop in a more stable way\n const getDocumentFromResult = function <TData = Object>(\n // must be called only on valid results\n result: SuccessfulFetchResult<TData> | undefined\n ) {\n if (!result) return undefined;\n // TODO: quite risky... we should have a better way to get the document\n let document = result.data[Object.keys(result.data)[0]].data; // document is always on first property\n\n return document;\n };*/\n // for new mutation, run refetch function if it exists\n /*\n if (mutationType === \"new\" && refetch) refetch();\n */\n\n const createAndReturnDocument = async (variables: CreateVariables) => {\n const result = await createDocument(variables);\n const { errors, document } = result;\n return {\n document,\n errors,\n };\n };\n const updateAndReturnDocument = async (variables: UpdateVariables) => {\n const result = await updateDocument(variables);\n const { errors, document } = result;\n return {\n document,\n errors,\n };\n };\n\n const deleteDocumentAndRefetch = async (variables: DeleteVariables) => {\n await deleteDocument(variables as any);\n };\n\n if (isEdit && loading) {\n return <VulcanComponents.Loading />;\n }\n return (\n <VulcanComponents.Form\n document={document}\n loading={loading || loadingCurrentUser}\n createDocument={createAndReturnDocument /*createDocument*/}\n updateDocument={updateAndReturnDocument}\n deleteDocument={deleteDocumentAndRefetch}\n refetch={refetch}\n currentUser={currentUser}\n {...childProps}\n {...props}\n />\n );\n};\n\n/*\nFormContainer.propTypes = {\n // main options\n documentId: PropTypes.string, // if a document is passed, this will be an edit form\n mutationFragment: PropTypes.object,\n mutationFragmentName: PropTypes.string,\n\n // graphQL\n // createFoo, deleteFoo, updateFoo\n // newMutation: PropTypes.func, // the new mutation\n // editMutation: PropTypes.func, // the edit mutation\n // removeMutation: PropTypes.func, // the remove mutation\n\n // form\n prefilledProps: PropTypes.object,\n layout: PropTypes.string,\n fields: PropTypes.arrayOf(PropTypes.string),\n hideFields: PropTypes.arrayOf(PropTypes.string),\n addFields: PropTypes.arrayOf(PropTypes.string),\n showRemove: PropTypes.bool,\n submitLabel: PropTypes.node,\n cancelLabel: PropTypes.node,\n revertLabel: PropTypes.node,\n repeatErrors: PropTypes.bool,\n warnUnsavedChanges: PropTypes.bool,\n formComponents: PropTypes.object,\n disabled: PropTypes.bool,\n itemProperties: PropTypes.object,\n successComponent: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n contextName: PropTypes.string,\n\n // callbacks\n ...callbackProps,\n\n currentUser: PropTypes.object,\n client: PropTypes.object,\n};\n\nFormContainer.defaultProps = {\n layout: \"horizontal\",\n};\n*/\n\n/*\nregisterComponent({\n name: 'SmartForm',\n component: FormContainer,\n hocs: [withCurrentUser, withApollo, withRouter, withCollectionProps],\n});\n*/\n\nexport const SmartForm = FormContainer;\n\nexport default FormContainer;\n","import { __assign } from \"tslib\";\nimport { parse } from 'graphql';\nvar docCache = new Map();\nvar fragmentSourceMap = new Map();\nvar printFragmentWarnings = true;\nvar experimentalFragmentVariables = false;\nfunction normalize(string) {\n return string.replace(/[\\s,]+/g, ' ').trim();\n}\nfunction cacheKeyFromLoc(loc) {\n return normalize(loc.source.body.substring(loc.start, loc.end));\n}\nfunction processFragments(ast) {\n var seenKeys = new Set();\n var definitions = [];\n ast.definitions.forEach(function (fragmentDefinition) {\n if (fragmentDefinition.kind === 'FragmentDefinition') {\n var fragmentName = fragmentDefinition.name.value;\n var sourceKey = cacheKeyFromLoc(fragmentDefinition.loc);\n var sourceKeySet = fragmentSourceMap.get(fragmentName);\n if (sourceKeySet && !sourceKeySet.has(sourceKey)) {\n if (printFragmentWarnings) {\n console.warn(\"Warning: fragment with name \" + fragmentName + \" already exists.\\n\"\n + \"graphql-tag enforces all fragment names across your application to be unique; read more about\\n\"\n + \"this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names\");\n }\n }\n else if (!sourceKeySet) {\n fragmentSourceMap.set(fragmentName, sourceKeySet = new Set);\n }\n sourceKeySet.add(sourceKey);\n if (!seenKeys.has(sourceKey)) {\n seenKeys.add(sourceKey);\n definitions.push(fragmentDefinition);\n }\n }\n else {\n definitions.push(fragmentDefinition);\n }\n });\n return __assign(__assign({}, ast), { definitions: definitions });\n}\nfunction stripLoc(doc) {\n var workSet = new Set(doc.definitions);\n workSet.forEach(function (node) {\n if (node.loc)\n delete node.loc;\n Object.keys(node).forEach(function (key) {\n var value = node[key];\n if (value && typeof value === 'object') {\n workSet.add(value);\n }\n });\n });\n var loc = doc.loc;\n if (loc) {\n delete loc.startToken;\n delete loc.endToken;\n }\n return doc;\n}\nfunction parseDocument(source) {\n var cacheKey = normalize(source);\n if (!docCache.has(cacheKey)) {\n var parsed = parse(source, {\n experimentalFragmentVariables: experimentalFragmentVariables,\n allowLegacyFragmentVariables: experimentalFragmentVariables\n });\n if (!parsed || parsed.kind !== 'Document') {\n throw new Error('Not a valid GraphQL document.');\n }\n docCache.set(cacheKey, stripLoc(processFragments(parsed)));\n }\n return docCache.get(cacheKey);\n}\nexport function gql(literals) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (typeof literals === 'string') {\n literals = [literals];\n }\n var result = literals[0];\n args.forEach(function (arg, i) {\n if (arg && arg.kind === 'Document') {\n result += arg.loc.source.body;\n }\n else {\n result += arg;\n }\n result += literals[i + 1];\n });\n return parseDocument(result);\n}\nexport function resetCaches() {\n docCache.clear();\n fragmentSourceMap.clear();\n}\nexport function disableFragmentWarnings() {\n printFragmentWarnings = false;\n}\nexport function enableExperimentalFragmentVariables() {\n experimentalFragmentVariables = true;\n}\nexport function disableExperimentalFragmentVariables() {\n experimentalFragmentVariables = false;\n}\nvar extras = {\n gql: gql,\n resetCaches: resetCaches,\n disableFragmentWarnings: disableFragmentWarnings,\n enableExperimentalFragmentVariables: enableExperimentalFragmentVariables,\n disableExperimentalFragmentVariables: disableExperimentalFragmentVariables\n};\n(function (gql_1) {\n gql_1.gql = extras.gql, gql_1.resetCaches = extras.resetCaches, gql_1.disableFragmentWarnings = extras.disableFragmentWarnings, gql_1.enableExperimentalFragmentVariables = extras.enableExperimentalFragmentVariables, gql_1.disableExperimentalFragmentVariables = extras.disableExperimentalFragmentVariables;\n})(gql || (gql = {}));\ngql[\"default\"] = gql;\nexport default gql;\n//# sourceMappingURL=index.js.map","import tslib from '../tslib.js';\r\nconst {\r\n __extends,\r\n __assign,\r\n __rest,\r\n __decorate,\r\n __param,\r\n __metadata,\r\n __awaiter,\r\n __generator,\r\n __exportStar,\r\n __createBinding,\r\n __values,\r\n __read,\r\n __spread,\r\n __spreadArrays,\r\n __spreadArray,\r\n __await,\r\n __asyncGenerator,\r\n __asyncDelegator,\r\n __asyncValues,\r\n __makeTemplateObject,\r\n __importStar,\r\n __importDefault,\r\n __classPrivateFieldGet,\r\n __classPrivateFieldSet,\r\n __classPrivateFieldIn,\r\n} = tslib;\r\nexport {\r\n __extends,\r\n __assign,\r\n __rest,\r\n __decorate,\r\n __param,\r\n __metadata,\r\n __awaiter,\r\n __generator,\r\n __exportStar,\r\n __createBinding,\r\n __values,\r\n __read,\r\n __spread,\r\n __spreadArrays,\r\n __spreadArray,\r\n __await,\r\n __asyncGenerator,\r\n __asyncDelegator,\r\n __asyncValues,\r\n __makeTemplateObject,\r\n __importStar,\r\n __importDefault,\r\n __classPrivateFieldGet,\r\n __classPrivateFieldSet,\r\n __classPrivateFieldIn,\r\n};\r\n","/**\n * GraphQL.js provides a reference implementation for the GraphQL specification\n * but is also a useful utility for operating on GraphQL files and building\n * sophisticated tools.\n *\n * This primary module exports a general purpose function for fulfilling all\n * steps of the GraphQL specification in a single operation, but also includes\n * utilities for every part of the GraphQL specification:\n *\n * - Parsing the GraphQL language.\n * - Building a GraphQL type schema.\n * - Validating a GraphQL request against a type schema.\n * - Executing a GraphQL request against a type schema.\n *\n * This also includes utility functions for operating on GraphQL types and\n * GraphQL documents to facilitate building tools.\n *\n * You may also import from each sub-directory directly. For example, the\n * following two import statements are equivalent:\n *\n * import { parse } from 'graphql';\n * import { parse } from 'graphql/language';\n */\n// The GraphQL.js version info.\nexport { version, versionInfo } from \"./version.mjs\"; // The primary entry point into fulfilling a GraphQL request.\n\nexport { graphql, graphqlSync } from \"./graphql.mjs\"; // Create and operate on GraphQL type definitions and schema.\n\nexport { // Definitions\nGraphQLSchema, GraphQLDirective, GraphQLScalarType, GraphQLObjectType, GraphQLInterfaceType, GraphQLUnionType, GraphQLEnumType, GraphQLInputObjectType, GraphQLList, GraphQLNonNull // Standard GraphQL Scalars\n, specifiedScalarTypes, GraphQLInt, GraphQLFloat, GraphQLString, GraphQLBoolean, GraphQLID // Built-in Directives defined by the Spec\n, specifiedDirectives, GraphQLIncludeDirective, GraphQLSkipDirective, GraphQLDeprecatedDirective, GraphQLSpecifiedByDirective // \"Enum\" of Type Kinds\n, TypeKind // Constant Deprecation Reason\n, DEFAULT_DEPRECATION_REASON // GraphQL Types for introspection.\n, introspectionTypes, __Schema, __Directive, __DirectiveLocation, __Type, __Field, __InputValue, __EnumValue, __TypeKind // Meta-field definitions.\n, SchemaMetaFieldDef, TypeMetaFieldDef, TypeNameMetaFieldDef // Predicates\n, isSchema, isDirective, isType, isScalarType, isObjectType, isInterfaceType, isUnionType, isEnumType, isInputObjectType, isListType, isNonNullType, isInputType, isOutputType, isLeafType, isCompositeType, isAbstractType, isWrappingType, isNullableType, isNamedType, isRequiredArgument, isRequiredInputField, isSpecifiedScalarType, isIntrospectionType, isSpecifiedDirective // Assertions\n, assertSchema, assertDirective, assertType, assertScalarType, assertObjectType, assertInterfaceType, assertUnionType, assertEnumType, assertInputObjectType, assertListType, assertNonNullType, assertInputType, assertOutputType, assertLeafType, assertCompositeType, assertAbstractType, assertWrappingType, assertNullableType, assertNamedType // Un-modifiers\n, getNullableType, getNamedType // Validate GraphQL schema.\n, validateSchema, assertValidSchema } from \"./type/index.mjs\";\n// Parse and operate on GraphQL language source files.\nexport { Token, Source, Location, getLocation // Print source location\n, printLocation, printSourceLocation // Lex\n, Lexer, TokenKind // Parse\n, parse, parseValue, parseType // Print\n, print // Visit\n, visit, visitInParallel, getVisitFn, BREAK, Kind, DirectiveLocation // Predicates\n, isDefinitionNode, isExecutableDefinitionNode, isSelectionNode, isValueNode, isTypeNode, isTypeSystemDefinitionNode, isTypeDefinitionNode, isTypeSystemExtensionNode, isTypeExtensionNode } from \"./language/index.mjs\";\n// Execute GraphQL queries.\nexport { execute, executeSync, defaultFieldResolver, defaultTypeResolver, responsePathAsArray, getDirectiveValues } from \"./execution/index.mjs\";\nexport { subscribe, createSourceEventStream } from \"./subscription/index.mjs\";\n// Validate GraphQL documents.\nexport { validate, ValidationContext // All validation rules in the GraphQL Specification.\n, specifiedRules // Individual validation rules.\n, ExecutableDefinitionsRule, FieldsOnCorrectTypeRule, FragmentsOnCompositeTypesRule, KnownArgumentNamesRule, KnownDirectivesRule, KnownFragmentNamesRule, KnownTypeNamesRule, LoneAnonymousOperationRule, NoFragmentCyclesRule, NoUndefinedVariablesRule, NoUnusedFragmentsRule, NoUnusedVariablesRule, OverlappingFieldsCanBeMergedRule, PossibleFragmentSpreadsRule, ProvidedRequiredArgumentsRule, ScalarLeafsRule, SingleFieldSubscriptionsRule, UniqueArgumentNamesRule, UniqueDirectivesPerLocationRule, UniqueFragmentNamesRule, UniqueInputFieldNamesRule, UniqueOperationNamesRule, UniqueVariableNamesRule, ValuesOfCorrectTypeRule, VariablesAreInputTypesRule, VariablesInAllowedPositionRule // SDL-specific validation rules\n, LoneSchemaDefinitionRule, UniqueOperationTypesRule, UniqueTypeNamesRule, UniqueEnumValueNamesRule, UniqueFieldDefinitionNamesRule, UniqueDirectiveNamesRule, PossibleTypeExtensionsRule // Custom validation rules\n, NoDeprecatedCustomRule, NoSchemaIntrospectionCustomRule } from \"./validation/index.mjs\";\n// Create, format, and print GraphQL errors.\nexport { GraphQLError, syntaxError, locatedError, printError, formatError } from \"./error/index.mjs\";\n// Utilities for operating on GraphQL type schema and parsed sources.\nexport { // Produce the GraphQL query recommended for a full schema introspection.\n// Accepts optional IntrospectionOptions.\ngetIntrospectionQuery // Gets the target Operation from a Document.\n, getOperationAST // Gets the Type for the target Operation AST.\n, getOperationRootType // Convert a GraphQLSchema to an IntrospectionQuery.\n, introspectionFromSchema // Build a GraphQLSchema from an introspection result.\n, buildClientSchema // Build a GraphQLSchema from a parsed GraphQL Schema language AST.\n, buildASTSchema // Build a GraphQLSchema from a GraphQL schema language document.\n, buildSchema // @deprecated: Get the description from a schema AST node and supports legacy\n// syntax for specifying descriptions - will be removed in v16.\n, getDescription // Extends an existing GraphQLSchema from a parsed GraphQL Schema\n// language AST.\n, extendSchema // Sort a GraphQLSchema.\n, lexicographicSortSchema // Print a GraphQLSchema to GraphQL Schema language.\n, printSchema // Print a GraphQLType to GraphQL Schema language.\n, printType // Prints the built-in introspection schema in the Schema Language\n// format.\n, printIntrospectionSchema // Create a GraphQLType from a GraphQL language AST.\n, typeFromAST // Create a JavaScript value from a GraphQL language AST with a Type.\n, valueFromAST // Create a JavaScript value from a GraphQL language AST without a Type.\n, valueFromASTUntyped // Create a GraphQL language AST from a JavaScript value.\n, astFromValue // A helper to use within recursive-descent visitors which need to be aware of\n// the GraphQL type system.\n, TypeInfo, visitWithTypeInfo // Coerces a JavaScript value to a GraphQL type, or produces errors.\n, coerceInputValue // Concatenates multiple AST together.\n, concatAST // Separates an AST into an AST per Operation.\n, separateOperations // Strips characters that are not significant to the validity or execution\n// of a GraphQL document.\n, stripIgnoredCharacters // Comparators for types\n, isEqualType, isTypeSubTypeOf, doTypesOverlap // Asserts a string is a valid GraphQL name.\n, assertValidName // Determine if a string is a valid GraphQL name.\n, isValidNameError // Compares two GraphQLSchemas and detects breaking changes.\n, BreakingChangeType, DangerousChangeType, findBreakingChanges, findDangerousChanges // @deprecated: Report all deprecated usage within a GraphQL document.\n, findDeprecatedUsages } from \"./utilities/index.mjs\";\n","import { syntaxError } from \"../error/syntaxError.mjs\";\nimport { Kind } from \"./kinds.mjs\";\nimport { Location } from \"./ast.mjs\";\nimport { TokenKind } from \"./tokenKind.mjs\";\nimport { Source, isSource } from \"./source.mjs\";\nimport { DirectiveLocation } from \"./directiveLocation.mjs\";\nimport { Lexer, isPunctuatorTokenKind } from \"./lexer.mjs\";\n/**\n * Configuration options to control parser behavior\n */\n\n/**\n * Given a GraphQL source, parses it into a Document.\n * Throws GraphQLError if a syntax error is encountered.\n */\nexport function parse(source, options) {\n var parser = new Parser(source, options);\n return parser.parseDocument();\n}\n/**\n * Given a string containing a GraphQL value (ex. `[42]`), parse the AST for\n * that value.\n * Throws GraphQLError if a syntax error is encountered.\n *\n * This is useful within tools that operate upon GraphQL Values directly and\n * in isolation of complete GraphQL documents.\n *\n * Consider providing the results to the utility function: valueFromAST().\n */\n\nexport function parseValue(source, options) {\n var parser = new Parser(source, options);\n parser.expectToken(TokenKind.SOF);\n var value = parser.parseValueLiteral(false);\n parser.expectToken(TokenKind.EOF);\n return value;\n}\n/**\n * Given a string containing a GraphQL Type (ex. `[Int!]`), parse the AST for\n * that type.\n * Throws GraphQLError if a syntax error is encountered.\n *\n * This is useful within tools that operate upon GraphQL Types directly and\n * in isolation of complete GraphQL documents.\n *\n * Consider providing the results to the utility function: typeFromAST().\n */\n\nexport function parseType(source, options) {\n var parser = new Parser(source, options);\n parser.expectToken(TokenKind.SOF);\n var type = parser.parseTypeReference();\n parser.expectToken(TokenKind.EOF);\n return type;\n}\n/**\n * This class is exported only to assist people in implementing their own parsers\n * without duplicating too much code and should be used only as last resort for cases\n * such as experimental syntax or if certain features could not be contributed upstream.\n *\n * It is still part of the internal API and is versioned, so any changes to it are never\n * considered breaking changes. If you still need to support multiple versions of the\n * library, please use the `versionInfo` variable for version detection.\n *\n * @internal\n */\n\nexport var Parser = /*#__PURE__*/function () {\n function Parser(source, options) {\n var sourceObj = isSource(source) ? source : new Source(source);\n this._lexer = new Lexer(sourceObj);\n this._options = options;\n }\n /**\n * Converts a name lex token into a name parse node.\n */\n\n\n var _proto = Parser.prototype;\n\n _proto.parseName = function parseName() {\n var token = this.expectToken(TokenKind.NAME);\n return {\n kind: Kind.NAME,\n value: token.value,\n loc: this.loc(token)\n };\n } // Implements the parsing rules in the Document section.\n\n /**\n * Document : Definition+\n */\n ;\n\n _proto.parseDocument = function parseDocument() {\n var start = this._lexer.token;\n return {\n kind: Kind.DOCUMENT,\n definitions: this.many(TokenKind.SOF, this.parseDefinition, TokenKind.EOF),\n loc: this.loc(start)\n };\n }\n /**\n * Definition :\n * - ExecutableDefinition\n * - TypeSystemDefinition\n * - TypeSystemExtension\n *\n * ExecutableDefinition :\n * - OperationDefinition\n * - FragmentDefinition\n */\n ;\n\n _proto.parseDefinition = function parseDefinition() {\n if (this.peek(TokenKind.NAME)) {\n switch (this._lexer.token.value) {\n case 'query':\n case 'mutation':\n case 'subscription':\n return this.parseOperationDefinition();\n\n case 'fragment':\n return this.parseFragmentDefinition();\n\n case 'schema':\n case 'scalar':\n case 'type':\n case 'interface':\n case 'union':\n case 'enum':\n case 'input':\n case 'directive':\n return this.parseTypeSystemDefinition();\n\n case 'extend':\n return this.parseTypeSystemExtension();\n }\n } else if (this.peek(TokenKind.BRACE_L)) {\n return this.parseOperationDefinition();\n } else if (this.peekDescription()) {\n return this.parseTypeSystemDefinition();\n }\n\n throw this.unexpected();\n } // Implements the parsing rules in the Operations section.\n\n /**\n * OperationDefinition :\n * - SelectionSet\n * - OperationType Name? VariableDefinitions? Directives? SelectionSet\n */\n ;\n\n _proto.parseOperationDefinition = function parseOperationDefinition() {\n var start = this._lexer.token;\n\n if (this.peek(TokenKind.BRACE_L)) {\n return {\n kind: Kind.OPERATION_DEFINITION,\n operation: 'query',\n name: undefined,\n variableDefinitions: [],\n directives: [],\n selectionSet: this.parseSelectionSet(),\n loc: this.loc(start)\n };\n }\n\n var operation = this.parseOperationType();\n var name;\n\n if (this.peek(TokenKind.NAME)) {\n name = this.parseName();\n }\n\n return {\n kind: Kind.OPERATION_DEFINITION,\n operation: operation,\n name: name,\n variableDefinitions: this.parseVariableDefinitions(),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n loc: this.loc(start)\n };\n }\n /**\n * OperationType : one of query mutation subscription\n */\n ;\n\n _proto.parseOperationType = function parseOperationType() {\n var operationToken = this.expectToken(TokenKind.NAME);\n\n switch (operationToken.value) {\n case 'query':\n return 'query';\n\n case 'mutation':\n return 'mutation';\n\n case 'subscription':\n return 'subscription';\n }\n\n throw this.unexpected(operationToken);\n }\n /**\n * VariableDefinitions : ( VariableDefinition+ )\n */\n ;\n\n _proto.parseVariableDefinitions = function parseVariableDefinitions() {\n return this.optionalMany(TokenKind.PAREN_L, this.parseVariableDefinition, TokenKind.PAREN_R);\n }\n /**\n * VariableDefinition : Variable : Type DefaultValue? Directives[Const]?\n */\n ;\n\n _proto.parseVariableDefinition = function parseVariableDefinition() {\n var start = this._lexer.token;\n return {\n kind: Kind.VARIABLE_DEFINITION,\n variable: this.parseVariable(),\n type: (this.expectToken(TokenKind.COLON), this.parseTypeReference()),\n defaultValue: this.expectOptionalToken(TokenKind.EQUALS) ? this.parseValueLiteral(true) : undefined,\n directives: this.parseDirectives(true),\n loc: this.loc(start)\n };\n }\n /**\n * Variable : $ Name\n */\n ;\n\n _proto.parseVariable = function parseVariable() {\n var start = this._lexer.token;\n this.expectToken(TokenKind.DOLLAR);\n return {\n kind: Kind.VARIABLE,\n name: this.parseName(),\n loc: this.loc(start)\n };\n }\n /**\n * SelectionSet : { Selection+ }\n */\n ;\n\n _proto.parseSelectionSet = function parseSelectionSet() {\n var start = this._lexer.token;\n return {\n kind: Kind.SELECTION_SET,\n selections: this.many(TokenKind.BRACE_L, this.parseSelection, TokenKind.BRACE_R),\n loc: this.loc(start)\n };\n }\n /**\n * Selection :\n * - Field\n * - FragmentSpread\n * - InlineFragment\n */\n ;\n\n _proto.parseSelection = function parseSelection() {\n return this.peek(TokenKind.SPREAD) ? this.parseFragment() : this.parseField();\n }\n /**\n * Field : Alias? Name Arguments? Directives? SelectionSet?\n *\n * Alias : Name :\n */\n ;\n\n _proto.parseField = function parseField() {\n var start = this._lexer.token;\n var nameOrAlias = this.parseName();\n var alias;\n var name;\n\n if (this.expectOptionalToken(TokenKind.COLON)) {\n alias = nameOrAlias;\n name = this.parseName();\n } else {\n name = nameOrAlias;\n }\n\n return {\n kind: Kind.FIELD,\n alias: alias,\n name: name,\n arguments: this.parseArguments(false),\n directives: this.parseDirectives(false),\n selectionSet: this.peek(TokenKind.BRACE_L) ? this.parseSelectionSet() : undefined,\n loc: this.loc(start)\n };\n }\n /**\n * Arguments[Const] : ( Argument[?Const]+ )\n */\n ;\n\n _proto.parseArguments = function parseArguments(isConst) {\n var item = isConst ? this.parseConstArgument : this.parseArgument;\n return this.optionalMany(TokenKind.PAREN_L, item, TokenKind.PAREN_R);\n }\n /**\n * Argument[Const] : Name : Value[?Const]\n */\n ;\n\n _proto.parseArgument = function parseArgument() {\n var start = this._lexer.token;\n var name = this.parseName();\n this.expectToken(TokenKind.COLON);\n return {\n kind: Kind.ARGUMENT,\n name: name,\n value: this.parseValueLiteral(false),\n loc: this.loc(start)\n };\n };\n\n _proto.parseConstArgument = function parseConstArgument() {\n var start = this._lexer.token;\n return {\n kind: Kind.ARGUMENT,\n name: this.parseName(),\n value: (this.expectToken(TokenKind.COLON), this.parseValueLiteral(true)),\n loc: this.loc(start)\n };\n } // Implements the parsing rules in the Fragments section.\n\n /**\n * Corresponds to both FragmentSpread and InlineFragment in the spec.\n *\n * FragmentSpread : ... FragmentName Directives?\n *\n * InlineFragment : ... TypeCondition? Directives? SelectionSet\n */\n ;\n\n _proto.parseFragment = function parseFragment() {\n var start = this._lexer.token;\n this.expectToken(TokenKind.SPREAD);\n var hasTypeCondition = this.expectOptionalKeyword('on');\n\n if (!hasTypeCondition && this.peek(TokenKind.NAME)) {\n return {\n kind: Kind.FRAGMENT_SPREAD,\n name: this.parseFragmentName(),\n directives: this.parseDirectives(false),\n loc: this.loc(start)\n };\n }\n\n return {\n kind: Kind.INLINE_FRAGMENT,\n typeCondition: hasTypeCondition ? this.parseNamedType() : undefined,\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n loc: this.loc(start)\n };\n }\n /**\n * FragmentDefinition :\n * - fragment FragmentName on TypeCondition Directives? SelectionSet\n *\n * TypeCondition : NamedType\n */\n ;\n\n _proto.parseFragmentDefinition = function parseFragmentDefinition() {\n var _this$_options;\n\n var start = this._lexer.token;\n this.expectKeyword('fragment'); // Experimental support for defining variables within fragments changes\n // the grammar of FragmentDefinition:\n // - fragment FragmentName VariableDefinitions? on TypeCondition Directives? SelectionSet\n\n if (((_this$_options = this._options) === null || _this$_options === void 0 ? void 0 : _this$_options.experimentalFragmentVariables) === true) {\n return {\n kind: Kind.FRAGMENT_DEFINITION,\n name: this.parseFragmentName(),\n variableDefinitions: this.parseVariableDefinitions(),\n typeCondition: (this.expectKeyword('on'), this.parseNamedType()),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n loc: this.loc(start)\n };\n }\n\n return {\n kind: Kind.FRAGMENT_DEFINITION,\n name: this.parseFragmentName(),\n typeCondition: (this.expectKeyword('on'), this.parseNamedType()),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n loc: this.loc(start)\n };\n }\n /**\n * FragmentName : Name but not `on`\n */\n ;\n\n _proto.parseFragmentName = function parseFragmentName() {\n if (this._lexer.token.value === 'on') {\n throw this.unexpected();\n }\n\n return this.parseName();\n } // Implements the parsing rules in the Values section.\n\n /**\n * Value[Const] :\n * - [~Const] Variable\n * - IntValue\n * - FloatValue\n * - StringValue\n * - BooleanValue\n * - NullValue\n * - EnumValue\n * - ListValue[?Const]\n * - ObjectValue[?Const]\n *\n * BooleanValue : one of `true` `false`\n *\n * NullValue : `null`\n *\n * EnumValue : Name but not `true`, `false` or `null`\n */\n ;\n\n _proto.parseValueLiteral = function parseValueLiteral(isConst) {\n var token = this._lexer.token;\n\n switch (token.kind) {\n case TokenKind.BRACKET_L:\n return this.parseList(isConst);\n\n case TokenKind.BRACE_L:\n return this.parseObject(isConst);\n\n case TokenKind.INT:\n this._lexer.advance();\n\n return {\n kind: Kind.INT,\n value: token.value,\n loc: this.loc(token)\n };\n\n case TokenKind.FLOAT:\n this._lexer.advance();\n\n return {\n kind: Kind.FLOAT,\n value: token.value,\n loc: this.loc(token)\n };\n\n case TokenKind.STRING:\n case TokenKind.BLOCK_STRING:\n return this.parseStringLiteral();\n\n case TokenKind.NAME:\n this._lexer.advance();\n\n switch (token.value) {\n case 'true':\n return {\n kind: Kind.BOOLEAN,\n value: true,\n loc: this.loc(token)\n };\n\n case 'false':\n return {\n kind: Kind.BOOLEAN,\n value: false,\n loc: this.loc(token)\n };\n\n case 'null':\n return {\n kind: Kind.NULL,\n loc: this.loc(token)\n };\n\n default:\n return {\n kind: Kind.ENUM,\n value: token.value,\n loc: this.loc(token)\n };\n }\n\n case TokenKind.DOLLAR:\n if (!isConst) {\n return this.parseVariable();\n }\n\n break;\n }\n\n throw this.unexpected();\n };\n\n _proto.parseStringLiteral = function parseStringLiteral() {\n var token = this._lexer.token;\n\n this._lexer.advance();\n\n return {\n kind: Kind.STRING,\n value: token.value,\n block: token.kind === TokenKind.BLOCK_STRING,\n loc: this.loc(token)\n };\n }\n /**\n * ListValue[Const] :\n * - [ ]\n * - [ Value[?Const]+ ]\n */\n ;\n\n _proto.parseList = function parseList(isConst) {\n var _this = this;\n\n var start = this._lexer.token;\n\n var item = function item() {\n return _this.parseValueLiteral(isConst);\n };\n\n return {\n kind: Kind.LIST,\n values: this.any(TokenKind.BRACKET_L, item, TokenKind.BRACKET_R),\n loc: this.loc(start)\n };\n }\n /**\n * ObjectValue[Const] :\n * - { }\n * - { ObjectField[?Const]+ }\n */\n ;\n\n _proto.parseObject = function parseObject(isConst) {\n var _this2 = this;\n\n var start = this._lexer.token;\n\n var item = function item() {\n return _this2.parseObjectField(isConst);\n };\n\n return {\n kind: Kind.OBJECT,\n fields: this.any(TokenKind.BRACE_L, item, TokenKind.BRACE_R),\n loc: this.loc(start)\n };\n }\n /**\n * ObjectField[Const] : Name : Value[?Const]\n */\n ;\n\n _proto.parseObjectField = function parseObjectField(isConst) {\n var start = this._lexer.token;\n var name = this.parseName();\n this.expectToken(TokenKind.COLON);\n return {\n kind: Kind.OBJECT_FIELD,\n name: name,\n value: this.parseValueLiteral(isConst),\n loc: this.loc(start)\n };\n } // Implements the parsing rules in the Directives section.\n\n /**\n * Directives[Const] : Directive[?Const]+\n */\n ;\n\n _proto.parseDirectives = function parseDirectives(isConst) {\n var directives = [];\n\n while (this.peek(TokenKind.AT)) {\n directives.push(this.parseDirective(isConst));\n }\n\n return directives;\n }\n /**\n * Directive[Const] : @ Name Arguments[?Const]?\n */\n ;\n\n _proto.parseDirective = function parseDirective(isConst) {\n var start = this._lexer.token;\n this.expectToken(TokenKind.AT);\n return {\n kind: Kind.DIRECTIVE,\n name: this.parseName(),\n arguments: this.parseArguments(isConst),\n loc: this.loc(start)\n };\n } // Implements the parsing rules in the Types section.\n\n /**\n * Type :\n * - NamedType\n * - ListType\n * - NonNullType\n */\n ;\n\n _proto.parseTypeReference = function parseTypeReference() {\n var start = this._lexer.token;\n var type;\n\n if (this.expectOptionalToken(TokenKind.BRACKET_L)) {\n type = this.parseTypeReference();\n this.expectToken(TokenKind.BRACKET_R);\n type = {\n kind: Kind.LIST_TYPE,\n type: type,\n loc: this.loc(start)\n };\n } else {\n type = this.parseNamedType();\n }\n\n if (this.expectOptionalToken(TokenKind.BANG)) {\n return {\n kind: Kind.NON_NULL_TYPE,\n type: type,\n loc: this.loc(start)\n };\n }\n\n return type;\n }\n /**\n * NamedType : Name\n */\n ;\n\n _proto.parseNamedType = function parseNamedType() {\n var start = this._lexer.token;\n return {\n kind: Kind.NAMED_TYPE,\n name: this.parseName(),\n loc: this.loc(start)\n };\n } // Implements the parsing rules in the Type Definition section.\n\n /**\n * TypeSystemDefinition :\n * - SchemaDefinition\n * - TypeDefinition\n * - DirectiveDefinition\n *\n * TypeDefinition :\n * - ScalarTypeDefinition\n * - ObjectTypeDefinition\n * - InterfaceTypeDefinition\n * - UnionTypeDefinition\n * - EnumTypeDefinition\n * - InputObjectTypeDefinition\n */\n ;\n\n _proto.parseTypeSystemDefinition = function parseTypeSystemDefinition() {\n // Many definitions begin with a description and require a lookahead.\n var keywordToken = this.peekDescription() ? this._lexer.lookahead() : this._lexer.token;\n\n if (keywordToken.kind === TokenKind.NAME) {\n switch (keywordToken.value) {\n case 'schema':\n return this.parseSchemaDefinition();\n\n case 'scalar':\n return this.parseScalarTypeDefinition();\n\n case 'type':\n return this.parseObjectTypeDefinition();\n\n case 'interface':\n return this.parseInterfaceTypeDefinition();\n\n case 'union':\n return this.parseUnionTypeDefinition();\n\n case 'enum':\n return this.parseEnumTypeDefinition();\n\n case 'input':\n return this.parseInputObjectTypeDefinition();\n\n case 'directive':\n return this.parseDirectiveDefinition();\n }\n }\n\n throw this.unexpected(keywordToken);\n };\n\n _proto.peekDescription = function peekDescription() {\n return this.peek(TokenKind.STRING) || this.peek(TokenKind.BLOCK_STRING);\n }\n /**\n * Description : StringValue\n */\n ;\n\n _proto.parseDescription = function parseDescription() {\n if (this.peekDescription()) {\n return this.parseStringLiteral();\n }\n }\n /**\n * SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ }\n */\n ;\n\n _proto.parseSchemaDefinition = function parseSchemaDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n this.expectKeyword('schema');\n var directives = this.parseDirectives(true);\n var operationTypes = this.many(TokenKind.BRACE_L, this.parseOperationTypeDefinition, TokenKind.BRACE_R);\n return {\n kind: Kind.SCHEMA_DEFINITION,\n description: description,\n directives: directives,\n operationTypes: operationTypes,\n loc: this.loc(start)\n };\n }\n /**\n * OperationTypeDefinition : OperationType : NamedType\n */\n ;\n\n _proto.parseOperationTypeDefinition = function parseOperationTypeDefinition() {\n var start = this._lexer.token;\n var operation = this.parseOperationType();\n this.expectToken(TokenKind.COLON);\n var type = this.parseNamedType();\n return {\n kind: Kind.OPERATION_TYPE_DEFINITION,\n operation: operation,\n type: type,\n loc: this.loc(start)\n };\n }\n /**\n * ScalarTypeDefinition : Description? scalar Name Directives[Const]?\n */\n ;\n\n _proto.parseScalarTypeDefinition = function parseScalarTypeDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n this.expectKeyword('scalar');\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n return {\n kind: Kind.SCALAR_TYPE_DEFINITION,\n description: description,\n name: name,\n directives: directives,\n loc: this.loc(start)\n };\n }\n /**\n * ObjectTypeDefinition :\n * Description?\n * type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition?\n */\n ;\n\n _proto.parseObjectTypeDefinition = function parseObjectTypeDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n this.expectKeyword('type');\n var name = this.parseName();\n var interfaces = this.parseImplementsInterfaces();\n var directives = this.parseDirectives(true);\n var fields = this.parseFieldsDefinition();\n return {\n kind: Kind.OBJECT_TYPE_DEFINITION,\n description: description,\n name: name,\n interfaces: interfaces,\n directives: directives,\n fields: fields,\n loc: this.loc(start)\n };\n }\n /**\n * ImplementsInterfaces :\n * - implements `&`? NamedType\n * - ImplementsInterfaces & NamedType\n */\n ;\n\n _proto.parseImplementsInterfaces = function parseImplementsInterfaces() {\n var _this$_options2;\n\n if (!this.expectOptionalKeyword('implements')) {\n return [];\n }\n\n if (((_this$_options2 = this._options) === null || _this$_options2 === void 0 ? void 0 : _this$_options2.allowLegacySDLImplementsInterfaces) === true) {\n var types = []; // Optional leading ampersand\n\n this.expectOptionalToken(TokenKind.AMP);\n\n do {\n types.push(this.parseNamedType());\n } while (this.expectOptionalToken(TokenKind.AMP) || this.peek(TokenKind.NAME));\n\n return types;\n }\n\n return this.delimitedMany(TokenKind.AMP, this.parseNamedType);\n }\n /**\n * FieldsDefinition : { FieldDefinition+ }\n */\n ;\n\n _proto.parseFieldsDefinition = function parseFieldsDefinition() {\n var _this$_options3;\n\n // Legacy support for the SDL?\n if (((_this$_options3 = this._options) === null || _this$_options3 === void 0 ? void 0 : _this$_options3.allowLegacySDLEmptyFields) === true && this.peek(TokenKind.BRACE_L) && this._lexer.lookahead().kind === TokenKind.BRACE_R) {\n this._lexer.advance();\n\n this._lexer.advance();\n\n return [];\n }\n\n return this.optionalMany(TokenKind.BRACE_L, this.parseFieldDefinition, TokenKind.BRACE_R);\n }\n /**\n * FieldDefinition :\n * - Description? Name ArgumentsDefinition? : Type Directives[Const]?\n */\n ;\n\n _proto.parseFieldDefinition = function parseFieldDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n var name = this.parseName();\n var args = this.parseArgumentDefs();\n this.expectToken(TokenKind.COLON);\n var type = this.parseTypeReference();\n var directives = this.parseDirectives(true);\n return {\n kind: Kind.FIELD_DEFINITION,\n description: description,\n name: name,\n arguments: args,\n type: type,\n directives: directives,\n loc: this.loc(start)\n };\n }\n /**\n * ArgumentsDefinition : ( InputValueDefinition+ )\n */\n ;\n\n _proto.parseArgumentDefs = function parseArgumentDefs() {\n return this.optionalMany(TokenKind.PAREN_L, this.parseInputValueDef, TokenKind.PAREN_R);\n }\n /**\n * InputValueDefinition :\n * - Description? Name : Type DefaultValue? Directives[Const]?\n */\n ;\n\n _proto.parseInputValueDef = function parseInputValueDef() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n var name = this.parseName();\n this.expectToken(TokenKind.COLON);\n var type = this.parseTypeReference();\n var defaultValue;\n\n if (this.expectOptionalToken(TokenKind.EQUALS)) {\n defaultValue = this.parseValueLiteral(true);\n }\n\n var directives = this.parseDirectives(true);\n return {\n kind: Kind.INPUT_VALUE_DEFINITION,\n description: description,\n name: name,\n type: type,\n defaultValue: defaultValue,\n directives: directives,\n loc: this.loc(start)\n };\n }\n /**\n * InterfaceTypeDefinition :\n * - Description? interface Name Directives[Const]? FieldsDefinition?\n */\n ;\n\n _proto.parseInterfaceTypeDefinition = function parseInterfaceTypeDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n this.expectKeyword('interface');\n var name = this.parseName();\n var interfaces = this.parseImplementsInterfaces();\n var directives = this.parseDirectives(true);\n var fields = this.parseFieldsDefinition();\n return {\n kind: Kind.INTERFACE_TYPE_DEFINITION,\n description: description,\n name: name,\n interfaces: interfaces,\n directives: directives,\n fields: fields,\n loc: this.loc(start)\n };\n }\n /**\n * UnionTypeDefinition :\n * - Description? union Name Directives[Const]? UnionMemberTypes?\n */\n ;\n\n _proto.parseUnionTypeDefinition = function parseUnionTypeDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n this.expectKeyword('union');\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n var types = this.parseUnionMemberTypes();\n return {\n kind: Kind.UNION_TYPE_DEFINITION,\n description: description,\n name: name,\n directives: directives,\n types: types,\n loc: this.loc(start)\n };\n }\n /**\n * UnionMemberTypes :\n * - = `|`? NamedType\n * - UnionMemberTypes | NamedType\n */\n ;\n\n _proto.parseUnionMemberTypes = function parseUnionMemberTypes() {\n return this.expectOptionalToken(TokenKind.EQUALS) ? this.delimitedMany(TokenKind.PIPE, this.parseNamedType) : [];\n }\n /**\n * EnumTypeDefinition :\n * - Description? enum Name Directives[Const]? EnumValuesDefinition?\n */\n ;\n\n _proto.parseEnumTypeDefinition = function parseEnumTypeDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n this.expectKeyword('enum');\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n var values = this.parseEnumValuesDefinition();\n return {\n kind: Kind.ENUM_TYPE_DEFINITION,\n description: description,\n name: name,\n directives: directives,\n values: values,\n loc: this.loc(start)\n };\n }\n /**\n * EnumValuesDefinition : { EnumValueDefinition+ }\n */\n ;\n\n _proto.parseEnumValuesDefinition = function parseEnumValuesDefinition() {\n return this.optionalMany(TokenKind.BRACE_L, this.parseEnumValueDefinition, TokenKind.BRACE_R);\n }\n /**\n * EnumValueDefinition : Description? EnumValue Directives[Const]?\n *\n * EnumValue : Name\n */\n ;\n\n _proto.parseEnumValueDefinition = function parseEnumValueDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n return {\n kind: Kind.ENUM_VALUE_DEFINITION,\n description: description,\n name: name,\n directives: directives,\n loc: this.loc(start)\n };\n }\n /**\n * InputObjectTypeDefinition :\n * - Description? input Name Directives[Const]? InputFieldsDefinition?\n */\n ;\n\n _proto.parseInputObjectTypeDefinition = function parseInputObjectTypeDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n this.expectKeyword('input');\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n var fields = this.parseInputFieldsDefinition();\n return {\n kind: Kind.INPUT_OBJECT_TYPE_DEFINITION,\n description: description,\n name: name,\n directives: directives,\n fields: fields,\n loc: this.loc(start)\n };\n }\n /**\n * InputFieldsDefinition : { InputValueDefinition+ }\n */\n ;\n\n _proto.parseInputFieldsDefinition = function parseInputFieldsDefinition() {\n return this.optionalMany(TokenKind.BRACE_L, this.parseInputValueDef, TokenKind.BRACE_R);\n }\n /**\n * TypeSystemExtension :\n * - SchemaExtension\n * - TypeExtension\n *\n * TypeExtension :\n * - ScalarTypeExtension\n * - ObjectTypeExtension\n * - InterfaceTypeExtension\n * - UnionTypeExtension\n * - EnumTypeExtension\n * - InputObjectTypeDefinition\n */\n ;\n\n _proto.parseTypeSystemExtension = function parseTypeSystemExtension() {\n var keywordToken = this._lexer.lookahead();\n\n if (keywordToken.kind === TokenKind.NAME) {\n switch (keywordToken.value) {\n case 'schema':\n return this.parseSchemaExtension();\n\n case 'scalar':\n return this.parseScalarTypeExtension();\n\n case 'type':\n return this.parseObjectTypeExtension();\n\n case 'interface':\n return this.parseInterfaceTypeExtension();\n\n case 'union':\n return this.parseUnionTypeExtension();\n\n case 'enum':\n return this.parseEnumTypeExtension();\n\n case 'input':\n return this.parseInputObjectTypeExtension();\n }\n }\n\n throw this.unexpected(keywordToken);\n }\n /**\n * SchemaExtension :\n * - extend schema Directives[Const]? { OperationTypeDefinition+ }\n * - extend schema Directives[Const]\n */\n ;\n\n _proto.parseSchemaExtension = function parseSchemaExtension() {\n var start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('schema');\n var directives = this.parseDirectives(true);\n var operationTypes = this.optionalMany(TokenKind.BRACE_L, this.parseOperationTypeDefinition, TokenKind.BRACE_R);\n\n if (directives.length === 0 && operationTypes.length === 0) {\n throw this.unexpected();\n }\n\n return {\n kind: Kind.SCHEMA_EXTENSION,\n directives: directives,\n operationTypes: operationTypes,\n loc: this.loc(start)\n };\n }\n /**\n * ScalarTypeExtension :\n * - extend scalar Name Directives[Const]\n */\n ;\n\n _proto.parseScalarTypeExtension = function parseScalarTypeExtension() {\n var start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('scalar');\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n\n if (directives.length === 0) {\n throw this.unexpected();\n }\n\n return {\n kind: Kind.SCALAR_TYPE_EXTENSION,\n name: name,\n directives: directives,\n loc: this.loc(start)\n };\n }\n /**\n * ObjectTypeExtension :\n * - extend type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition\n * - extend type Name ImplementsInterfaces? Directives[Const]\n * - extend type Name ImplementsInterfaces\n */\n ;\n\n _proto.parseObjectTypeExtension = function parseObjectTypeExtension() {\n var start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('type');\n var name = this.parseName();\n var interfaces = this.parseImplementsInterfaces();\n var directives = this.parseDirectives(true);\n var fields = this.parseFieldsDefinition();\n\n if (interfaces.length === 0 && directives.length === 0 && fields.length === 0) {\n throw this.unexpected();\n }\n\n return {\n kind: Kind.OBJECT_TYPE_EXTENSION,\n name: name,\n interfaces: interfaces,\n directives: directives,\n fields: fields,\n loc: this.loc(start)\n };\n }\n /**\n * InterfaceTypeExtension :\n * - extend interface Name ImplementsInterfaces? Directives[Const]? FieldsDefinition\n * - extend interface Name ImplementsInterfaces? Directives[Const]\n * - extend interface Name ImplementsInterfaces\n */\n ;\n\n _proto.parseInterfaceTypeExtension = function parseInterfaceTypeExtension() {\n var start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('interface');\n var name = this.parseName();\n var interfaces = this.parseImplementsInterfaces();\n var directives = this.parseDirectives(true);\n var fields = this.parseFieldsDefinition();\n\n if (interfaces.length === 0 && directives.length === 0 && fields.length === 0) {\n throw this.unexpected();\n }\n\n return {\n kind: Kind.INTERFACE_TYPE_EXTENSION,\n name: name,\n interfaces: interfaces,\n directives: directives,\n fields: fields,\n loc: this.loc(start)\n };\n }\n /**\n * UnionTypeExtension :\n * - extend union Name Directives[Const]? UnionMemberTypes\n * - extend union Name Directives[Const]\n */\n ;\n\n _proto.parseUnionTypeExtension = function parseUnionTypeExtension() {\n var start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('union');\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n var types = this.parseUnionMemberTypes();\n\n if (directives.length === 0 && types.length === 0) {\n throw this.unexpected();\n }\n\n return {\n kind: Kind.UNION_TYPE_EXTENSION,\n name: name,\n directives: directives,\n types: types,\n loc: this.loc(start)\n };\n }\n /**\n * EnumTypeExtension :\n * - extend enum Name Directives[Const]? EnumValuesDefinition\n * - extend enum Name Directives[Const]\n */\n ;\n\n _proto.parseEnumTypeExtension = function parseEnumTypeExtension() {\n var start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('enum');\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n var values = this.parseEnumValuesDefinition();\n\n if (directives.length === 0 && values.length === 0) {\n throw this.unexpected();\n }\n\n return {\n kind: Kind.ENUM_TYPE_EXTENSION,\n name: name,\n directives: directives,\n values: values,\n loc: this.loc(start)\n };\n }\n /**\n * InputObjectTypeExtension :\n * - extend input Name Directives[Const]? InputFieldsDefinition\n * - extend input Name Directives[Const]\n */\n ;\n\n _proto.parseInputObjectTypeExtension = function parseInputObjectTypeExtension() {\n var start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('input');\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n var fields = this.parseInputFieldsDefinition();\n\n if (directives.length === 0 && fields.length === 0) {\n throw this.unexpected();\n }\n\n return {\n kind: Kind.INPUT_OBJECT_TYPE_EXTENSION,\n name: name,\n directives: directives,\n fields: fields,\n loc: this.loc(start)\n };\n }\n /**\n * DirectiveDefinition :\n * - Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations\n */\n ;\n\n _proto.parseDirectiveDefinition = function parseDirectiveDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n this.expectKeyword('directive');\n this.expectToken(TokenKind.AT);\n var name = this.parseName();\n var args = this.parseArgumentDefs();\n var repeatable = this.expectOptionalKeyword('repeatable');\n this.expectKeyword('on');\n var locations = this.parseDirectiveLocations();\n return {\n kind: Kind.DIRECTIVE_DEFINITION,\n description: description,\n name: name,\n arguments: args,\n repeatable: repeatable,\n locations: locations,\n loc: this.loc(start)\n };\n }\n /**\n * DirectiveLocations :\n * - `|`? DirectiveLocation\n * - DirectiveLocations | DirectiveLocation\n */\n ;\n\n _proto.parseDirectiveLocations = function parseDirectiveLocations() {\n return this.delimitedMany(TokenKind.PIPE, this.parseDirectiveLocation);\n }\n /*\n * DirectiveLocation :\n * - ExecutableDirectiveLocation\n * - TypeSystemDirectiveLocation\n *\n * ExecutableDirectiveLocation : one of\n * `QUERY`\n * `MUTATION`\n * `SUBSCRIPTION`\n * `FIELD`\n * `FRAGMENT_DEFINITION`\n * `FRAGMENT_SPREAD`\n * `INLINE_FRAGMENT`\n *\n * TypeSystemDirectiveLocation : one of\n * `SCHEMA`\n * `SCALAR`\n * `OBJECT`\n * `FIELD_DEFINITION`\n * `ARGUMENT_DEFINITION`\n * `INTERFACE`\n * `UNION`\n * `ENUM`\n * `ENUM_VALUE`\n * `INPUT_OBJECT`\n * `INPUT_FIELD_DEFINITION`\n */\n ;\n\n _proto.parseDirectiveLocation = function parseDirectiveLocation() {\n var start = this._lexer.token;\n var name = this.parseName();\n\n if (DirectiveLocation[name.value] !== undefined) {\n return name;\n }\n\n throw this.unexpected(start);\n } // Core parsing utility functions\n\n /**\n * Returns a location object, used to identify the place in the source that created a given parsed object.\n */\n ;\n\n _proto.loc = function loc(startToken) {\n var _this$_options4;\n\n if (((_this$_options4 = this._options) === null || _this$_options4 === void 0 ? void 0 : _this$_options4.noLocation) !== true) {\n return new Location(startToken, this._lexer.lastToken, this._lexer.source);\n }\n }\n /**\n * Determines if the next token is of a given kind\n */\n ;\n\n _proto.peek = function peek(kind) {\n return this._lexer.token.kind === kind;\n }\n /**\n * If the next token is of the given kind, return that token after advancing the lexer.\n * Otherwise, do not change the parser state and throw an error.\n */\n ;\n\n _proto.expectToken = function expectToken(kind) {\n var token = this._lexer.token;\n\n if (token.kind === kind) {\n this._lexer.advance();\n\n return token;\n }\n\n throw syntaxError(this._lexer.source, token.start, \"Expected \".concat(getTokenKindDesc(kind), \", found \").concat(getTokenDesc(token), \".\"));\n }\n /**\n * If the next token is of the given kind, return that token after advancing the lexer.\n * Otherwise, do not change the parser state and return undefined.\n */\n ;\n\n _proto.expectOptionalToken = function expectOptionalToken(kind) {\n var token = this._lexer.token;\n\n if (token.kind === kind) {\n this._lexer.advance();\n\n return token;\n }\n\n return undefined;\n }\n /**\n * If the next token is a given keyword, advance the lexer.\n * Otherwise, do not change the parser state and throw an error.\n */\n ;\n\n _proto.expectKeyword = function expectKeyword(value) {\n var token = this._lexer.token;\n\n if (token.kind === TokenKind.NAME && token.value === value) {\n this._lexer.advance();\n } else {\n throw syntaxError(this._lexer.source, token.start, \"Expected \\\"\".concat(value, \"\\\", found \").concat(getTokenDesc(token), \".\"));\n }\n }\n /**\n * If the next token is a given keyword, return \"true\" after advancing the lexer.\n * Otherwise, do not change the parser state and return \"false\".\n */\n ;\n\n _proto.expectOptionalKeyword = function expectOptionalKeyword(value) {\n var token = this._lexer.token;\n\n if (token.kind === TokenKind.NAME && token.value === value) {\n this._lexer.advance();\n\n return true;\n }\n\n return false;\n }\n /**\n * Helper function for creating an error when an unexpected lexed token is encountered.\n */\n ;\n\n _proto.unexpected = function unexpected(atToken) {\n var token = atToken !== null && atToken !== void 0 ? atToken : this._lexer.token;\n return syntaxError(this._lexer.source, token.start, \"Unexpected \".concat(getTokenDesc(token), \".\"));\n }\n /**\n * Returns a possibly empty list of parse nodes, determined by the parseFn.\n * This list begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n */\n ;\n\n _proto.any = function any(openKind, parseFn, closeKind) {\n this.expectToken(openKind);\n var nodes = [];\n\n while (!this.expectOptionalToken(closeKind)) {\n nodes.push(parseFn.call(this));\n }\n\n return nodes;\n }\n /**\n * Returns a list of parse nodes, determined by the parseFn.\n * It can be empty only if open token is missing otherwise it will always return non-empty list\n * that begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n */\n ;\n\n _proto.optionalMany = function optionalMany(openKind, parseFn, closeKind) {\n if (this.expectOptionalToken(openKind)) {\n var nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (!this.expectOptionalToken(closeKind));\n\n return nodes;\n }\n\n return [];\n }\n /**\n * Returns a non-empty list of parse nodes, determined by the parseFn.\n * This list begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n */\n ;\n\n _proto.many = function many(openKind, parseFn, closeKind) {\n this.expectToken(openKind);\n var nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (!this.expectOptionalToken(closeKind));\n\n return nodes;\n }\n /**\n * Returns a non-empty list of parse nodes, determined by the parseFn.\n * This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind.\n * Advances the parser to the next lex token after last item in the list.\n */\n ;\n\n _proto.delimitedMany = function delimitedMany(delimiterKind, parseFn) {\n this.expectOptionalToken(delimiterKind);\n var nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (this.expectOptionalToken(delimiterKind));\n\n return nodes;\n };\n\n return Parser;\n}();\n/**\n * A helper function to describe a token as a string for debugging.\n */\n\nfunction getTokenDesc(token) {\n var value = token.value;\n return getTokenKindDesc(token.kind) + (value != null ? \" \\\"\".concat(value, \"\\\"\") : '');\n}\n/**\n * A helper function to describe a token kind as a string for debugging.\n */\n\n\nfunction getTokenKindDesc(kind) {\n return isPunctuatorTokenKind(kind) ? \"\\\"\".concat(kind, \"\\\"\") : kind;\n}\n","import { GraphQLError } from \"./GraphQLError.mjs\";\n/**\n * Produces a GraphQLError representing a syntax error, containing useful\n * descriptive information about the syntax error's position in the source.\n */\n\nexport function syntaxError(source, position, description) {\n return new GraphQLError(\"Syntax Error: \".concat(description), undefined, source, [position]);\n}\n","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _wrapNativeSuper(Class) { var _cache = typeof Map === \"function\" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== \"function\") { throw new TypeError(\"Super expression must either be null or a function\"); } if (typeof _cache !== \"undefined\") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }\n\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _isNativeFunction(fn) { return Function.toString.call(fn).indexOf(\"[native code]\") !== -1; }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nimport isObjectLike from \"../jsutils/isObjectLike.mjs\";\nimport { SYMBOL_TO_STRING_TAG } from \"../polyfills/symbols.mjs\";\nimport { getLocation } from \"../language/location.mjs\";\nimport { printLocation, printSourceLocation } from \"../language/printLocation.mjs\";\n/**\n * A GraphQLError describes an Error found during the parse, validate, or\n * execute phases of performing a GraphQL operation. In addition to a message\n * and stack trace, it also includes information about the locations in a\n * GraphQL document and/or execution result that correspond to the Error.\n */\n\nexport var GraphQLError = /*#__PURE__*/function (_Error) {\n _inherits(GraphQLError, _Error);\n\n var _super = _createSuper(GraphQLError);\n\n /**\n * An array of { line, column } locations within the source GraphQL document\n * which correspond to this error.\n *\n * Errors during validation often contain multiple locations, for example to\n * point out two things with the same name. Errors during execution include a\n * single location, the field which produced the error.\n *\n * Enumerable, and appears in the result of JSON.stringify().\n */\n\n /**\n * An array describing the JSON-path into the execution response which\n * corresponds to this error. Only included for errors during execution.\n *\n * Enumerable, and appears in the result of JSON.stringify().\n */\n\n /**\n * An array of GraphQL AST Nodes corresponding to this error.\n */\n\n /**\n * The source GraphQL document for the first location of this error.\n *\n * Note that if this Error represents more than one node, the source may not\n * represent nodes after the first node.\n */\n\n /**\n * An array of character offsets within the source GraphQL document\n * which correspond to this error.\n */\n\n /**\n * The original error thrown from a field resolver during execution.\n */\n\n /**\n * Extension fields to add to the formatted error.\n */\n function GraphQLError(message, nodes, source, positions, path, originalError, extensions) {\n var _nodeLocations, _nodeLocations2, _nodeLocations3;\n\n var _this;\n\n _classCallCheck(this, GraphQLError);\n\n _this = _super.call(this, message);\n _this.name = 'GraphQLError';\n _this.originalError = originalError !== null && originalError !== void 0 ? originalError : undefined; // Compute list of blame nodes.\n\n _this.nodes = undefinedIfEmpty(Array.isArray(nodes) ? nodes : nodes ? [nodes] : undefined);\n var nodeLocations = [];\n\n for (var _i2 = 0, _ref3 = (_this$nodes = _this.nodes) !== null && _this$nodes !== void 0 ? _this$nodes : []; _i2 < _ref3.length; _i2++) {\n var _this$nodes;\n\n var _ref4 = _ref3[_i2];\n var loc = _ref4.loc;\n\n if (loc != null) {\n nodeLocations.push(loc);\n }\n }\n\n nodeLocations = undefinedIfEmpty(nodeLocations); // Compute locations in the source for the given nodes/positions.\n\n _this.source = source !== null && source !== void 0 ? source : (_nodeLocations = nodeLocations) === null || _nodeLocations === void 0 ? void 0 : _nodeLocations[0].source;\n _this.positions = positions !== null && positions !== void 0 ? positions : (_nodeLocations2 = nodeLocations) === null || _nodeLocations2 === void 0 ? void 0 : _nodeLocations2.map(function (loc) {\n return loc.start;\n });\n _this.locations = positions && source ? positions.map(function (pos) {\n return getLocation(source, pos);\n }) : (_nodeLocations3 = nodeLocations) === null || _nodeLocations3 === void 0 ? void 0 : _nodeLocations3.map(function (loc) {\n return getLocation(loc.source, loc.start);\n });\n _this.path = path !== null && path !== void 0 ? path : undefined;\n var originalExtensions = originalError === null || originalError === void 0 ? void 0 : originalError.extensions;\n\n if (extensions == null && isObjectLike(originalExtensions)) {\n _this.extensions = _objectSpread({}, originalExtensions);\n } else {\n _this.extensions = extensions !== null && extensions !== void 0 ? extensions : {};\n } // By being enumerable, JSON.stringify will include bellow properties in the resulting output.\n // This ensures that the simplest possible GraphQL service adheres to the spec.\n\n\n Object.defineProperties(_assertThisInitialized(_this), {\n message: {\n enumerable: true\n },\n locations: {\n enumerable: _this.locations != null\n },\n path: {\n enumerable: _this.path != null\n },\n extensions: {\n enumerable: _this.extensions != null && Object.keys(_this.extensions).length > 0\n },\n name: {\n enumerable: false\n },\n nodes: {\n enumerable: false\n },\n source: {\n enumerable: false\n },\n positions: {\n enumerable: false\n },\n originalError: {\n enumerable: false\n }\n }); // Include (non-enumerable) stack trace.\n\n if (originalError !== null && originalError !== void 0 && originalError.stack) {\n Object.defineProperty(_assertThisInitialized(_this), 'stack', {\n value: originalError.stack,\n writable: true,\n configurable: true\n });\n return _possibleConstructorReturn(_this);\n } // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')\n\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(_assertThisInitialized(_this), GraphQLError);\n } else {\n Object.defineProperty(_assertThisInitialized(_this), 'stack', {\n value: Error().stack,\n writable: true,\n configurable: true\n });\n }\n\n return _this;\n }\n\n _createClass(GraphQLError, [{\n key: \"toString\",\n value: function toString() {\n return printError(this);\n } // FIXME: workaround to not break chai comparisons, should be remove in v16\n // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet\n\n }, {\n key: SYMBOL_TO_STRING_TAG,\n get: function get() {\n return 'Object';\n }\n }]);\n\n return GraphQLError;\n}( /*#__PURE__*/_wrapNativeSuper(Error));\n\nfunction undefinedIfEmpty(array) {\n return array === undefined || array.length === 0 ? undefined : array;\n}\n/**\n * Prints a GraphQLError to a string, representing useful location information\n * about the error's position in the source.\n */\n\n\nexport function printError(error) {\n var output = error.message;\n\n if (error.nodes) {\n for (var _i4 = 0, _error$nodes2 = error.nodes; _i4 < _error$nodes2.length; _i4++) {\n var node = _error$nodes2[_i4];\n\n if (node.loc) {\n output += '\\n\\n' + printLocation(node.loc);\n }\n }\n } else if (error.source && error.locations) {\n for (var _i6 = 0, _error$locations2 = error.locations; _i6 < _error$locations2.length; _i6++) {\n var location = _error$locations2[_i6];\n output += '\\n\\n' + printSourceLocation(error.source, location);\n }\n }\n\n return output;\n}\n","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/**\n * Return true if `value` is object-like. A value is object-like if it's not\n * `null` and has a `typeof` result of \"object\".\n */\nexport default function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}\n","// In ES2015 (or a polyfilled) environment, this will be Symbol.iterator\n// istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')\nexport var SYMBOL_ITERATOR = typeof Symbol === 'function' && Symbol.iterator != null ? Symbol.iterator : '@@iterator'; // In ES2017 (or a polyfilled) environment, this will be Symbol.asyncIterator\n// istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')\n\nexport var SYMBOL_ASYNC_ITERATOR = typeof Symbol === 'function' && Symbol.asyncIterator != null ? Symbol.asyncIterator : '@@asyncIterator'; // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')\n\nexport var SYMBOL_TO_STRING_TAG = typeof Symbol === 'function' && Symbol.toStringTag != null ? Symbol.toStringTag : '@@toStringTag';\n","/**\n * Represents a location in a Source.\n */\n\n/**\n * Takes a Source and a UTF-8 character offset, and returns the corresponding\n * line and column as a SourceLocation.\n */\nexport function getLocation(source, position) {\n var lineRegexp = /\\r\\n|[\\n\\r]/g;\n var line = 1;\n var column = position + 1;\n var match;\n\n while ((match = lineRegexp.exec(source.body)) && match.index < position) {\n line += 1;\n column = position + 1 - (match.index + match[0].length);\n }\n\n return {\n line: line,\n column: column\n };\n}\n","import { getLocation } from \"./location.mjs\";\n/**\n * Render a helpful description of the location in the GraphQL Source document.\n */\n\nexport function printLocation(location) {\n return printSourceLocation(location.source, getLocation(location.source, location.start));\n}\n/**\n * Render a helpful description of the location in the GraphQL Source document.\n */\n\nexport function printSourceLocation(source, sourceLocation) {\n var firstLineColumnOffset = source.locationOffset.column - 1;\n var body = whitespace(firstLineColumnOffset) + source.body;\n var lineIndex = sourceLocation.line - 1;\n var lineOffset = source.locationOffset.line - 1;\n var lineNum = sourceLocation.line + lineOffset;\n var columnOffset = sourceLocation.line === 1 ? firstLineColumnOffset : 0;\n var columnNum = sourceLocation.column + columnOffset;\n var locationStr = \"\".concat(source.name, \":\").concat(lineNum, \":\").concat(columnNum, \"\\n\");\n var lines = body.split(/\\r\\n|[\\n\\r]/g);\n var locationLine = lines[lineIndex]; // Special case for minified documents\n\n if (locationLine.length > 120) {\n var subLineIndex = Math.floor(columnNum / 80);\n var subLineColumnNum = columnNum % 80;\n var subLines = [];\n\n for (var i = 0; i < locationLine.length; i += 80) {\n subLines.push(locationLine.slice(i, i + 80));\n }\n\n return locationStr + printPrefixedLines([[\"\".concat(lineNum), subLines[0]]].concat(subLines.slice(1, subLineIndex + 1).map(function (subLine) {\n return ['', subLine];\n }), [[' ', whitespace(subLineColumnNum - 1) + '^'], ['', subLines[subLineIndex + 1]]]));\n }\n\n return locationStr + printPrefixedLines([// Lines specified like this: [\"prefix\", \"string\"],\n [\"\".concat(lineNum - 1), lines[lineIndex - 1]], [\"\".concat(lineNum), locationLine], ['', whitespace(columnNum - 1) + '^'], [\"\".concat(lineNum + 1), lines[lineIndex + 1]]]);\n}\n\nfunction printPrefixedLines(lines) {\n var existingLines = lines.filter(function (_ref) {\n var _ = _ref[0],\n line = _ref[1];\n return line !== undefined;\n });\n var padLen = Math.max.apply(Math, existingLines.map(function (_ref2) {\n var prefix = _ref2[0];\n return prefix.length;\n }));\n return existingLines.map(function (_ref3) {\n var prefix = _ref3[0],\n line = _ref3[1];\n return leftPad(padLen, prefix) + (line ? ' | ' + line : ' |');\n }).join('\\n');\n}\n\nfunction whitespace(len) {\n return Array(len + 1).join(' ');\n}\n\nfunction leftPad(len, str) {\n return whitespace(len - str.length) + str;\n}\n","/**\n * The set of allowed kind values for AST nodes.\n */\nexport var Kind = Object.freeze({\n // Name\n NAME: 'Name',\n // Document\n DOCUMENT: 'Document',\n OPERATION_DEFINITION: 'OperationDefinition',\n VARIABLE_DEFINITION: 'VariableDefinition',\n SELECTION_SET: 'SelectionSet',\n FIELD: 'Field',\n ARGUMENT: 'Argument',\n // Fragments\n FRAGMENT_SPREAD: 'FragmentSpread',\n INLINE_FRAGMENT: 'InlineFragment',\n FRAGMENT_DEFINITION: 'FragmentDefinition',\n // Values\n VARIABLE: 'Variable',\n INT: 'IntValue',\n FLOAT: 'FloatValue',\n STRING: 'StringValue',\n BOOLEAN: 'BooleanValue',\n NULL: 'NullValue',\n ENUM: 'EnumValue',\n LIST: 'ListValue',\n OBJECT: 'ObjectValue',\n OBJECT_FIELD: 'ObjectField',\n // Directives\n DIRECTIVE: 'Directive',\n // Types\n NAMED_TYPE: 'NamedType',\n LIST_TYPE: 'ListType',\n NON_NULL_TYPE: 'NonNullType',\n // Type System Definitions\n SCHEMA_DEFINITION: 'SchemaDefinition',\n OPERATION_TYPE_DEFINITION: 'OperationTypeDefinition',\n // Type Definitions\n SCALAR_TYPE_DEFINITION: 'ScalarTypeDefinition',\n OBJECT_TYPE_DEFINITION: 'ObjectTypeDefinition',\n FIELD_DEFINITION: 'FieldDefinition',\n INPUT_VALUE_DEFINITION: 'InputValueDefinition',\n INTERFACE_TYPE_DEFINITION: 'InterfaceTypeDefinition',\n UNION_TYPE_DEFINITION: 'UnionTypeDefinition',\n ENUM_TYPE_DEFINITION: 'EnumTypeDefinition',\n ENUM_VALUE_DEFINITION: 'EnumValueDefinition',\n INPUT_OBJECT_TYPE_DEFINITION: 'InputObjectTypeDefinition',\n // Directive Definitions\n DIRECTIVE_DEFINITION: 'DirectiveDefinition',\n // Type System Extensions\n SCHEMA_EXTENSION: 'SchemaExtension',\n // Type Extensions\n SCALAR_TYPE_EXTENSION: 'ScalarTypeExtension',\n OBJECT_TYPE_EXTENSION: 'ObjectTypeExtension',\n INTERFACE_TYPE_EXTENSION: 'InterfaceTypeExtension',\n UNION_TYPE_EXTENSION: 'UnionTypeExtension',\n ENUM_TYPE_EXTENSION: 'EnumTypeExtension',\n INPUT_OBJECT_TYPE_EXTENSION: 'InputObjectTypeExtension'\n});\n/**\n * The enum type representing the possible kind values of AST nodes.\n */\n","import defineInspect from \"../jsutils/defineInspect.mjs\";\n\n/**\n * Contains a range of UTF-8 character offsets and token references that\n * identify the region of the source from which the AST derived.\n */\nexport var Location = /*#__PURE__*/function () {\n /**\n * The character offset at which this Node begins.\n */\n\n /**\n * The character offset at which this Node ends.\n */\n\n /**\n * The Token at which this Node begins.\n */\n\n /**\n * The Token at which this Node ends.\n */\n\n /**\n * The Source document the AST represents.\n */\n function Location(startToken, endToken, source) {\n this.start = startToken.start;\n this.end = endToken.end;\n this.startToken = startToken;\n this.endToken = endToken;\n this.source = source;\n }\n\n var _proto = Location.prototype;\n\n _proto.toJSON = function toJSON() {\n return {\n start: this.start,\n end: this.end\n };\n };\n\n return Location;\n}(); // Print a simplified form when appearing in `inspect` and `util.inspect`.\n\ndefineInspect(Location);\n/**\n * Represents a range of characters represented by a lexical token\n * within a Source.\n */\n\nexport var Token = /*#__PURE__*/function () {\n /**\n * The kind of Token.\n */\n\n /**\n * The character offset at which this Node begins.\n */\n\n /**\n * The character offset at which this Node ends.\n */\n\n /**\n * The 1-indexed line number on which this Token appears.\n */\n\n /**\n * The 1-indexed column number at which this Token begins.\n */\n\n /**\n * For non-punctuation tokens, represents the interpreted value of the token.\n */\n\n /**\n * Tokens exist as nodes in a double-linked-list amongst all tokens\n * including ignored tokens. <SOF> is always the first node and <EOF>\n * the last.\n */\n function Token(kind, start, end, line, column, prev, value) {\n this.kind = kind;\n this.start = start;\n this.end = end;\n this.line = line;\n this.column = column;\n this.value = value;\n this.prev = prev;\n this.next = null;\n }\n\n var _proto2 = Token.prototype;\n\n _proto2.toJSON = function toJSON() {\n return {\n kind: this.kind,\n value: this.value,\n line: this.line,\n column: this.column\n };\n };\n\n return Token;\n}(); // Print a simplified form when appearing in `inspect` and `util.inspect`.\n\ndefineInspect(Token);\n/**\n * @internal\n */\n\nexport function isNode(maybeNode) {\n return maybeNode != null && typeof maybeNode.kind === 'string';\n}\n/**\n * The list of all possible AST node types.\n */\n","import invariant from \"./invariant.mjs\";\nimport nodejsCustomInspectSymbol from \"./nodejsCustomInspectSymbol.mjs\";\n/**\n * The `defineInspect()` function defines `inspect()` prototype method as alias of `toJSON`\n */\n\nexport default function defineInspect(classObject) {\n var fn = classObject.prototype.toJSON;\n typeof fn === 'function' || invariant(0);\n classObject.prototype.inspect = fn; // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2317')\n\n if (nodejsCustomInspectSymbol) {\n classObject.prototype[nodejsCustomInspectSymbol] = fn;\n }\n}\n","export default function invariant(condition, message) {\n var booleanCondition = Boolean(condition); // istanbul ignore else (See transformation done in './resources/inlineInvariant.js')\n\n if (!booleanCondition) {\n throw new Error(message != null ? message : 'Unexpected invariant triggered.');\n }\n}\n","// istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')\nvar nodejsCustomInspectSymbol = typeof Symbol === 'function' && typeof Symbol.for === 'function' ? Symbol.for('nodejs.util.inspect.custom') : undefined;\nexport default nodejsCustomInspectSymbol;\n","/**\n * An exported enum describing the different kinds of tokens that the\n * lexer emits.\n */\nexport var TokenKind = Object.freeze({\n SOF: '<SOF>',\n EOF: '<EOF>',\n BANG: '!',\n DOLLAR: '$',\n AMP: '&',\n PAREN_L: '(',\n PAREN_R: ')',\n SPREAD: '...',\n COLON: ':',\n EQUALS: '=',\n AT: '@',\n BRACKET_L: '[',\n BRACKET_R: ']',\n BRACE_L: '{',\n PIPE: '|',\n BRACE_R: '}',\n NAME: 'Name',\n INT: 'Int',\n FLOAT: 'Float',\n STRING: 'String',\n BLOCK_STRING: 'BlockString',\n COMMENT: 'Comment'\n});\n/**\n * The enum type representing the token kinds values.\n */\n","function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nimport { SYMBOL_TO_STRING_TAG } from \"../polyfills/symbols.mjs\";\nimport inspect from \"../jsutils/inspect.mjs\";\nimport devAssert from \"../jsutils/devAssert.mjs\";\nimport instanceOf from \"../jsutils/instanceOf.mjs\";\n\n/**\n * A representation of source input to GraphQL. The `name` and `locationOffset` parameters are\n * optional, but they are useful for clients who store GraphQL documents in source files.\n * For example, if the GraphQL input starts at line 40 in a file named `Foo.graphql`, it might\n * be useful for `name` to be `\"Foo.graphql\"` and location to be `{ line: 40, column: 1 }`.\n * The `line` and `column` properties in `locationOffset` are 1-indexed.\n */\nexport var Source = /*#__PURE__*/function () {\n function Source(body) {\n var name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'GraphQL request';\n var locationOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {\n line: 1,\n column: 1\n };\n typeof body === 'string' || devAssert(0, \"Body must be a string. Received: \".concat(inspect(body), \".\"));\n this.body = body;\n this.name = name;\n this.locationOffset = locationOffset;\n this.locationOffset.line > 0 || devAssert(0, 'line in locationOffset is 1-indexed and must be positive.');\n this.locationOffset.column > 0 || devAssert(0, 'column in locationOffset is 1-indexed and must be positive.');\n } // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet\n\n\n _createClass(Source, [{\n key: SYMBOL_TO_STRING_TAG,\n get: function get() {\n return 'Source';\n }\n }]);\n\n return Source;\n}();\n/**\n * Test if the given value is a Source object.\n *\n * @internal\n */\n\n// eslint-disable-next-line no-redeclare\nexport function isSource(source) {\n return instanceOf(source, Source);\n}\n","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/* eslint-disable flowtype/no-weak-types */\nimport nodejsCustomInspectSymbol from \"./nodejsCustomInspectSymbol.mjs\";\nvar MAX_ARRAY_LENGTH = 10;\nvar MAX_RECURSIVE_DEPTH = 2;\n/**\n * Used to print values in error messages.\n */\n\nexport default function inspect(value) {\n return formatValue(value, []);\n}\n\nfunction formatValue(value, seenValues) {\n switch (_typeof(value)) {\n case 'string':\n return JSON.stringify(value);\n\n case 'function':\n return value.name ? \"[function \".concat(value.name, \"]\") : '[function]';\n\n case 'object':\n if (value === null) {\n return 'null';\n }\n\n return formatObjectValue(value, seenValues);\n\n default:\n return String(value);\n }\n}\n\nfunction formatObjectValue(value, previouslySeenValues) {\n if (previouslySeenValues.indexOf(value) !== -1) {\n return '[Circular]';\n }\n\n var seenValues = [].concat(previouslySeenValues, [value]);\n var customInspectFn = getCustomFn(value);\n\n if (customInspectFn !== undefined) {\n var customValue = customInspectFn.call(value); // check for infinite recursion\n\n if (customValue !== value) {\n return typeof customValue === 'string' ? customValue : formatValue(customValue, seenValues);\n }\n } else if (Array.isArray(value)) {\n return formatArray(value, seenValues);\n }\n\n return formatObject(value, seenValues);\n}\n\nfunction formatObject(object, seenValues) {\n var keys = Object.keys(object);\n\n if (keys.length === 0) {\n return '{}';\n }\n\n if (seenValues.length > MAX_RECURSIVE_DEPTH) {\n return '[' + getObjectTag(object) + ']';\n }\n\n var properties = keys.map(function (key) {\n var value = formatValue(object[key], seenValues);\n return key + ': ' + value;\n });\n return '{ ' + properties.join(', ') + ' }';\n}\n\nfunction formatArray(array, seenValues) {\n if (array.length === 0) {\n return '[]';\n }\n\n if (seenValues.length > MAX_RECURSIVE_DEPTH) {\n return '[Array]';\n }\n\n var len = Math.min(MAX_ARRAY_LENGTH, array.length);\n var remaining = array.length - len;\n var items = [];\n\n for (var i = 0; i < len; ++i) {\n items.push(formatValue(array[i], seenValues));\n }\n\n if (remaining === 1) {\n items.push('... 1 more item');\n } else if (remaining > 1) {\n items.push(\"... \".concat(remaining, \" more items\"));\n }\n\n return '[' + items.join(', ') + ']';\n}\n\nfunction getCustomFn(object) {\n var customInspectFn = object[String(nodejsCustomInspectSymbol)];\n\n if (typeof customInspectFn === 'function') {\n return customInspectFn;\n }\n\n if (typeof object.inspect === 'function') {\n return object.inspect;\n }\n}\n\nfunction getObjectTag(object) {\n var tag = Object.prototype.toString.call(object).replace(/^\\[object /, '').replace(/]$/, '');\n\n if (tag === 'Object' && typeof object.constructor === 'function') {\n var name = object.constructor.name;\n\n if (typeof name === 'string' && name !== '') {\n return name;\n }\n }\n\n return tag;\n}\n","export default function devAssert(condition, message) {\n var booleanCondition = Boolean(condition); // istanbul ignore else (See transformation done in './resources/inlineInvariant.js')\n\n if (!booleanCondition) {\n throw new Error(message);\n }\n}\n","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport inspect from \"./inspect.mjs\";\n/**\n * A replacement for instanceof which includes an error warning when multi-realm\n * constructors are detected.\n */\n\n// See: https://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production\n// See: https://webpack.js.org/guides/production/\nexport default process.env.NODE_ENV === 'production' ? // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')\n// eslint-disable-next-line no-shadow\nfunction instanceOf(value, constructor) {\n return value instanceof constructor;\n} : // eslint-disable-next-line no-shadow\nfunction instanceOf(value, constructor) {\n if (value instanceof constructor) {\n return true;\n }\n\n if (_typeof(value) === 'object' && value !== null) {\n var _value$constructor;\n\n var className = constructor.prototype[Symbol.toStringTag];\n var valueClassName = // We still need to support constructor's name to detect conflicts with older versions of this library.\n Symbol.toStringTag in value ? value[Symbol.toStringTag] : (_value$constructor = value.constructor) === null || _value$constructor === void 0 ? void 0 : _value$constructor.name;\n\n if (className === valueClassName) {\n var stringifiedValue = inspect(value);\n throw new Error(\"Cannot use \".concat(className, \" \\\"\").concat(stringifiedValue, \"\\\" from another module or realm.\\n\\nEnsure that there is only one instance of \\\"graphql\\\" in the node_modules\\ndirectory. If different versions of \\\"graphql\\\" are the dependencies of other\\nrelied on modules, use \\\"resolutions\\\" to ensure only one version is installed.\\n\\nhttps://yarnpkg.com/en/docs/selective-version-resolutions\\n\\nDuplicate \\\"graphql\\\" modules cannot be used at the same time since different\\nversions may have different capabilities and behavior. The data from one\\nversion used in the function from another could produce confusing and\\nspurious results.\"));\n }\n }\n\n return false;\n};\n","/**\n * The set of allowed directive location values.\n */\nexport var DirectiveLocation = Object.freeze({\n // Request Definitions\n QUERY: 'QUERY',\n MUTATION: 'MUTATION',\n SUBSCRIPTION: 'SUBSCRIPTION',\n FIELD: 'FIELD',\n FRAGMENT_DEFINITION: 'FRAGMENT_DEFINITION',\n FRAGMENT_SPREAD: 'FRAGMENT_SPREAD',\n INLINE_FRAGMENT: 'INLINE_FRAGMENT',\n VARIABLE_DEFINITION: 'VARIABLE_DEFINITION',\n // Type System Definitions\n SCHEMA: 'SCHEMA',\n SCALAR: 'SCALAR',\n OBJECT: 'OBJECT',\n FIELD_DEFINITION: 'FIELD_DEFINITION',\n ARGUMENT_DEFINITION: 'ARGUMENT_DEFINITION',\n INTERFACE: 'INTERFACE',\n UNION: 'UNION',\n ENUM: 'ENUM',\n ENUM_VALUE: 'ENUM_VALUE',\n INPUT_OBJECT: 'INPUT_OBJECT',\n INPUT_FIELD_DEFINITION: 'INPUT_FIELD_DEFINITION'\n});\n/**\n * The enum type representing the directive location values.\n */\n","import { syntaxError } from \"../error/syntaxError.mjs\";\nimport { Token } from \"./ast.mjs\";\nimport { TokenKind } from \"./tokenKind.mjs\";\nimport { dedentBlockStringValue } from \"./blockString.mjs\";\n/**\n * Given a Source object, creates a Lexer for that source.\n * A Lexer is a stateful stream generator in that every time\n * it is advanced, it returns the next token in the Source. Assuming the\n * source lexes, the final Token emitted by the lexer will be of kind\n * EOF, after which the lexer will repeatedly return the same EOF token\n * whenever called.\n */\n\nexport var Lexer = /*#__PURE__*/function () {\n /**\n * The previously focused non-ignored token.\n */\n\n /**\n * The currently focused non-ignored token.\n */\n\n /**\n * The (1-indexed) line containing the current token.\n */\n\n /**\n * The character offset at which the current line begins.\n */\n function Lexer(source) {\n var startOfFileToken = new Token(TokenKind.SOF, 0, 0, 0, 0, null);\n this.source = source;\n this.lastToken = startOfFileToken;\n this.token = startOfFileToken;\n this.line = 1;\n this.lineStart = 0;\n }\n /**\n * Advances the token stream to the next non-ignored token.\n */\n\n\n var _proto = Lexer.prototype;\n\n _proto.advance = function advance() {\n this.lastToken = this.token;\n var token = this.token = this.lookahead();\n return token;\n }\n /**\n * Looks ahead and returns the next non-ignored token, but does not change\n * the state of Lexer.\n */\n ;\n\n _proto.lookahead = function lookahead() {\n var token = this.token;\n\n if (token.kind !== TokenKind.EOF) {\n do {\n var _token$next;\n\n // Note: next is only mutable during parsing, so we cast to allow this.\n token = (_token$next = token.next) !== null && _token$next !== void 0 ? _token$next : token.next = readToken(this, token);\n } while (token.kind === TokenKind.COMMENT);\n }\n\n return token;\n };\n\n return Lexer;\n}();\n/**\n * @internal\n */\n\nexport function isPunctuatorTokenKind(kind) {\n return kind === TokenKind.BANG || kind === TokenKind.DOLLAR || kind === TokenKind.AMP || kind === TokenKind.PAREN_L || kind === TokenKind.PAREN_R || kind === TokenKind.SPREAD || kind === TokenKind.COLON || kind === TokenKind.EQUALS || kind === TokenKind.AT || kind === TokenKind.BRACKET_L || kind === TokenKind.BRACKET_R || kind === TokenKind.BRACE_L || kind === TokenKind.PIPE || kind === TokenKind.BRACE_R;\n}\n\nfunction printCharCode(code) {\n return (// NaN/undefined represents access beyond the end of the file.\n isNaN(code) ? TokenKind.EOF : // Trust JSON for ASCII.\n code < 0x007f ? JSON.stringify(String.fromCharCode(code)) : // Otherwise print the escaped form.\n \"\\\"\\\\u\".concat(('00' + code.toString(16).toUpperCase()).slice(-4), \"\\\"\")\n );\n}\n/**\n * Gets the next token from the source starting at the given position.\n *\n * This skips over whitespace until it finds the next lexable token, then lexes\n * punctuators immediately or calls the appropriate helper function for more\n * complicated tokens.\n */\n\n\nfunction readToken(lexer, prev) {\n var source = lexer.source;\n var body = source.body;\n var bodyLength = body.length;\n var pos = prev.end;\n\n while (pos < bodyLength) {\n var code = body.charCodeAt(pos);\n var _line = lexer.line;\n\n var _col = 1 + pos - lexer.lineStart; // SourceCharacter\n\n\n switch (code) {\n case 0xfeff: // <BOM>\n\n case 9: // \\t\n\n case 32: // <space>\n\n case 44:\n // ,\n ++pos;\n continue;\n\n case 10:\n // \\n\n ++pos;\n ++lexer.line;\n lexer.lineStart = pos;\n continue;\n\n case 13:\n // \\r\n if (body.charCodeAt(pos + 1) === 10) {\n pos += 2;\n } else {\n ++pos;\n }\n\n ++lexer.line;\n lexer.lineStart = pos;\n continue;\n\n case 33:\n // !\n return new Token(TokenKind.BANG, pos, pos + 1, _line, _col, prev);\n\n case 35:\n // #\n return readComment(source, pos, _line, _col, prev);\n\n case 36:\n // $\n return new Token(TokenKind.DOLLAR, pos, pos + 1, _line, _col, prev);\n\n case 38:\n // &\n return new Token(TokenKind.AMP, pos, pos + 1, _line, _col, prev);\n\n case 40:\n // (\n return new Token(TokenKind.PAREN_L, pos, pos + 1, _line, _col, prev);\n\n case 41:\n // )\n return new Token(TokenKind.PAREN_R, pos, pos + 1, _line, _col, prev);\n\n case 46:\n // .\n if (body.charCodeAt(pos + 1) === 46 && body.charCodeAt(pos + 2) === 46) {\n return new Token(TokenKind.SPREAD, pos, pos + 3, _line, _col, prev);\n }\n\n break;\n\n case 58:\n // :\n return new Token(TokenKind.COLON, pos, pos + 1, _line, _col, prev);\n\n case 61:\n // =\n return new Token(TokenKind.EQUALS, pos, pos + 1, _line, _col, prev);\n\n case 64:\n // @\n return new Token(TokenKind.AT, pos, pos + 1, _line, _col, prev);\n\n case 91:\n // [\n return new Token(TokenKind.BRACKET_L, pos, pos + 1, _line, _col, prev);\n\n case 93:\n // ]\n return new Token(TokenKind.BRACKET_R, pos, pos + 1, _line, _col, prev);\n\n case 123:\n // {\n return new Token(TokenKind.BRACE_L, pos, pos + 1, _line, _col, prev);\n\n case 124:\n // |\n return new Token(TokenKind.PIPE, pos, pos + 1, _line, _col, prev);\n\n case 125:\n // }\n return new Token(TokenKind.BRACE_R, pos, pos + 1, _line, _col, prev);\n\n case 34:\n // \"\n if (body.charCodeAt(pos + 1) === 34 && body.charCodeAt(pos + 2) === 34) {\n return readBlockString(source, pos, _line, _col, prev, lexer);\n }\n\n return readString(source, pos, _line, _col, prev);\n\n case 45: // -\n\n case 48: // 0\n\n case 49: // 1\n\n case 50: // 2\n\n case 51: // 3\n\n case 52: // 4\n\n case 53: // 5\n\n case 54: // 6\n\n case 55: // 7\n\n case 56: // 8\n\n case 57:\n // 9\n return readNumber(source, pos, code, _line, _col, prev);\n\n case 65: // A\n\n case 66: // B\n\n case 67: // C\n\n case 68: // D\n\n case 69: // E\n\n case 70: // F\n\n case 71: // G\n\n case 72: // H\n\n case 73: // I\n\n case 74: // J\n\n case 75: // K\n\n case 76: // L\n\n case 77: // M\n\n case 78: // N\n\n case 79: // O\n\n case 80: // P\n\n case 81: // Q\n\n case 82: // R\n\n case 83: // S\n\n case 84: // T\n\n case 85: // U\n\n case 86: // V\n\n case 87: // W\n\n case 88: // X\n\n case 89: // Y\n\n case 90: // Z\n\n case 95: // _\n\n case 97: // a\n\n case 98: // b\n\n case 99: // c\n\n case 100: // d\n\n case 101: // e\n\n case 102: // f\n\n case 103: // g\n\n case 104: // h\n\n case 105: // i\n\n case 106: // j\n\n case 107: // k\n\n case 108: // l\n\n case 109: // m\n\n case 110: // n\n\n case 111: // o\n\n case 112: // p\n\n case 113: // q\n\n case 114: // r\n\n case 115: // s\n\n case 116: // t\n\n case 117: // u\n\n case 118: // v\n\n case 119: // w\n\n case 120: // x\n\n case 121: // y\n\n case 122:\n // z\n return readName(source, pos, _line, _col, prev);\n }\n\n throw syntaxError(source, pos, unexpectedCharacterMessage(code));\n }\n\n var line = lexer.line;\n var col = 1 + pos - lexer.lineStart;\n return new Token(TokenKind.EOF, bodyLength, bodyLength, line, col, prev);\n}\n/**\n * Report a message that an unexpected character was encountered.\n */\n\n\nfunction unexpectedCharacterMessage(code) {\n if (code < 0x0020 && code !== 0x0009 && code !== 0x000a && code !== 0x000d) {\n return \"Cannot contain the invalid character \".concat(printCharCode(code), \".\");\n }\n\n if (code === 39) {\n // '\n return 'Unexpected single quote character (\\'), did you mean to use a double quote (\")?';\n }\n\n return \"Cannot parse the unexpected character \".concat(printCharCode(code), \".\");\n}\n/**\n * Reads a comment token from the source file.\n *\n * #[\\u0009\\u0020-\\uFFFF]*\n */\n\n\nfunction readComment(source, start, line, col, prev) {\n var body = source.body;\n var code;\n var position = start;\n\n do {\n code = body.charCodeAt(++position);\n } while (!isNaN(code) && ( // SourceCharacter but not LineTerminator\n code > 0x001f || code === 0x0009));\n\n return new Token(TokenKind.COMMENT, start, position, line, col, prev, body.slice(start + 1, position));\n}\n/**\n * Reads a number token from the source file, either a float\n * or an int depending on whether a decimal point appears.\n *\n * Int: -?(0|[1-9][0-9]*)\n * Float: -?(0|[1-9][0-9]*)(\\.[0-9]+)?((E|e)(+|-)?[0-9]+)?\n */\n\n\nfunction readNumber(source, start, firstCode, line, col, prev) {\n var body = source.body;\n var code = firstCode;\n var position = start;\n var isFloat = false;\n\n if (code === 45) {\n // -\n code = body.charCodeAt(++position);\n }\n\n if (code === 48) {\n // 0\n code = body.charCodeAt(++position);\n\n if (code >= 48 && code <= 57) {\n throw syntaxError(source, position, \"Invalid number, unexpected digit after 0: \".concat(printCharCode(code), \".\"));\n }\n } else {\n position = readDigits(source, position, code);\n code = body.charCodeAt(position);\n }\n\n if (code === 46) {\n // .\n isFloat = true;\n code = body.charCodeAt(++position);\n position = readDigits(source, position, code);\n code = body.charCodeAt(position);\n }\n\n if (code === 69 || code === 101) {\n // E e\n isFloat = true;\n code = body.charCodeAt(++position);\n\n if (code === 43 || code === 45) {\n // + -\n code = body.charCodeAt(++position);\n }\n\n position = readDigits(source, position, code);\n code = body.charCodeAt(position);\n } // Numbers cannot be followed by . or NameStart\n\n\n if (code === 46 || isNameStart(code)) {\n throw syntaxError(source, position, \"Invalid number, expected digit but got: \".concat(printCharCode(code), \".\"));\n }\n\n return new Token(isFloat ? TokenKind.FLOAT : TokenKind.INT, start, position, line, col, prev, body.slice(start, position));\n}\n/**\n * Returns the new position in the source after reading digits.\n */\n\n\nfunction readDigits(source, start, firstCode) {\n var body = source.body;\n var position = start;\n var code = firstCode;\n\n if (code >= 48 && code <= 57) {\n // 0 - 9\n do {\n code = body.charCodeAt(++position);\n } while (code >= 48 && code <= 57); // 0 - 9\n\n\n return position;\n }\n\n throw syntaxError(source, position, \"Invalid number, expected digit but got: \".concat(printCharCode(code), \".\"));\n}\n/**\n * Reads a string token from the source file.\n *\n * \"([^\"\\\\\\u000A\\u000D]|(\\\\(u[0-9a-fA-F]{4}|[\"\\\\/bfnrt])))*\"\n */\n\n\nfunction readString(source, start, line, col, prev) {\n var body = source.body;\n var position = start + 1;\n var chunkStart = position;\n var code = 0;\n var value = '';\n\n while (position < body.length && !isNaN(code = body.charCodeAt(position)) && // not LineTerminator\n code !== 0x000a && code !== 0x000d) {\n // Closing Quote (\")\n if (code === 34) {\n value += body.slice(chunkStart, position);\n return new Token(TokenKind.STRING, start, position + 1, line, col, prev, value);\n } // SourceCharacter\n\n\n if (code < 0x0020 && code !== 0x0009) {\n throw syntaxError(source, position, \"Invalid character within String: \".concat(printCharCode(code), \".\"));\n }\n\n ++position;\n\n if (code === 92) {\n // \\\n value += body.slice(chunkStart, position - 1);\n code = body.charCodeAt(position);\n\n switch (code) {\n case 34:\n value += '\"';\n break;\n\n case 47:\n value += '/';\n break;\n\n case 92:\n value += '\\\\';\n break;\n\n case 98:\n value += '\\b';\n break;\n\n case 102:\n value += '\\f';\n break;\n\n case 110:\n value += '\\n';\n break;\n\n case 114:\n value += '\\r';\n break;\n\n case 116:\n value += '\\t';\n break;\n\n case 117:\n {\n // uXXXX\n var charCode = uniCharCode(body.charCodeAt(position + 1), body.charCodeAt(position + 2), body.charCodeAt(position + 3), body.charCodeAt(position + 4));\n\n if (charCode < 0) {\n var invalidSequence = body.slice(position + 1, position + 5);\n throw syntaxError(source, position, \"Invalid character escape sequence: \\\\u\".concat(invalidSequence, \".\"));\n }\n\n value += String.fromCharCode(charCode);\n position += 4;\n break;\n }\n\n default:\n throw syntaxError(source, position, \"Invalid character escape sequence: \\\\\".concat(String.fromCharCode(code), \".\"));\n }\n\n ++position;\n chunkStart = position;\n }\n }\n\n throw syntaxError(source, position, 'Unterminated string.');\n}\n/**\n * Reads a block string token from the source file.\n *\n * \"\"\"(\"?\"?(\\\\\"\"\"|\\\\(?!=\"\"\")|[^\"\\\\]))*\"\"\"\n */\n\n\nfunction readBlockString(source, start, line, col, prev, lexer) {\n var body = source.body;\n var position = start + 3;\n var chunkStart = position;\n var code = 0;\n var rawValue = '';\n\n while (position < body.length && !isNaN(code = body.charCodeAt(position))) {\n // Closing Triple-Quote (\"\"\")\n if (code === 34 && body.charCodeAt(position + 1) === 34 && body.charCodeAt(position + 2) === 34) {\n rawValue += body.slice(chunkStart, position);\n return new Token(TokenKind.BLOCK_STRING, start, position + 3, line, col, prev, dedentBlockStringValue(rawValue));\n } // SourceCharacter\n\n\n if (code < 0x0020 && code !== 0x0009 && code !== 0x000a && code !== 0x000d) {\n throw syntaxError(source, position, \"Invalid character within String: \".concat(printCharCode(code), \".\"));\n }\n\n if (code === 10) {\n // new line\n ++position;\n ++lexer.line;\n lexer.lineStart = position;\n } else if (code === 13) {\n // carriage return\n if (body.charCodeAt(position + 1) === 10) {\n position += 2;\n } else {\n ++position;\n }\n\n ++lexer.line;\n lexer.lineStart = position;\n } else if ( // Escape Triple-Quote (\\\"\"\")\n code === 92 && body.charCodeAt(position + 1) === 34 && body.charCodeAt(position + 2) === 34 && body.charCodeAt(position + 3) === 34) {\n rawValue += body.slice(chunkStart, position) + '\"\"\"';\n position += 4;\n chunkStart = position;\n } else {\n ++position;\n }\n }\n\n throw syntaxError(source, position, 'Unterminated string.');\n}\n/**\n * Converts four hexadecimal chars to the integer that the\n * string represents. For example, uniCharCode('0','0','0','f')\n * will return 15, and uniCharCode('0','0','f','f') returns 255.\n *\n * Returns a negative number on error, if a char was invalid.\n *\n * This is implemented by noting that char2hex() returns -1 on error,\n * which means the result of ORing the char2hex() will also be negative.\n */\n\n\nfunction uniCharCode(a, b, c, d) {\n return char2hex(a) << 12 | char2hex(b) << 8 | char2hex(c) << 4 | char2hex(d);\n}\n/**\n * Converts a hex character to its integer value.\n * '0' becomes 0, '9' becomes 9\n * 'A' becomes 10, 'F' becomes 15\n * 'a' becomes 10, 'f' becomes 15\n *\n * Returns -1 on error.\n */\n\n\nfunction char2hex(a) {\n return a >= 48 && a <= 57 ? a - 48 // 0-9\n : a >= 65 && a <= 70 ? a - 55 // A-F\n : a >= 97 && a <= 102 ? a - 87 // a-f\n : -1;\n}\n/**\n * Reads an alphanumeric + underscore name from the source.\n *\n * [_A-Za-z][_0-9A-Za-z]*\n */\n\n\nfunction readName(source, start, line, col, prev) {\n var body = source.body;\n var bodyLength = body.length;\n var position = start + 1;\n var code = 0;\n\n while (position !== bodyLength && !isNaN(code = body.charCodeAt(position)) && (code === 95 || // _\n code >= 48 && code <= 57 || // 0-9\n code >= 65 && code <= 90 || // A-Z\n code >= 97 && code <= 122) // a-z\n ) {\n ++position;\n }\n\n return new Token(TokenKind.NAME, start, position, line, col, prev, body.slice(start, position));\n} // _ A-Z a-z\n\n\nfunction isNameStart(code) {\n return code === 95 || code >= 65 && code <= 90 || code >= 97 && code <= 122;\n}\n","/**\n * Produces the value of a block string from its parsed raw value, similar to\n * CoffeeScript's block string, Python's docstring trim or Ruby's strip_heredoc.\n *\n * This implements the GraphQL spec's BlockStringValue() static algorithm.\n *\n * @internal\n */\nexport function dedentBlockStringValue(rawString) {\n // Expand a block string's raw value into independent lines.\n var lines = rawString.split(/\\r\\n|[\\n\\r]/g); // Remove common indentation from all lines but first.\n\n var commonIndent = getBlockStringIndentation(rawString);\n\n if (commonIndent !== 0) {\n for (var i = 1; i < lines.length; i++) {\n lines[i] = lines[i].slice(commonIndent);\n }\n } // Remove leading and trailing blank lines.\n\n\n var startLine = 0;\n\n while (startLine < lines.length && isBlank(lines[startLine])) {\n ++startLine;\n }\n\n var endLine = lines.length;\n\n while (endLine > startLine && isBlank(lines[endLine - 1])) {\n --endLine;\n } // Return a string of the lines joined with U+000A.\n\n\n return lines.slice(startLine, endLine).join('\\n');\n}\n\nfunction isBlank(str) {\n for (var i = 0; i < str.length; ++i) {\n if (str[i] !== ' ' && str[i] !== '\\t') {\n return false;\n }\n }\n\n return true;\n}\n/**\n * @internal\n */\n\n\nexport function getBlockStringIndentation(value) {\n var _commonIndent;\n\n var isFirstLine = true;\n var isEmptyLine = true;\n var indent = 0;\n var commonIndent = null;\n\n for (var i = 0; i < value.length; ++i) {\n switch (value.charCodeAt(i)) {\n case 13:\n // \\r\n if (value.charCodeAt(i + 1) === 10) {\n ++i; // skip \\r\\n as one symbol\n }\n\n // falls through\n\n case 10:\n // \\n\n isFirstLine = false;\n isEmptyLine = true;\n indent = 0;\n break;\n\n case 9: // \\t\n\n case 32:\n // <space>\n ++indent;\n break;\n\n default:\n if (isEmptyLine && !isFirstLine && (commonIndent === null || indent < commonIndent)) {\n commonIndent = indent;\n }\n\n isEmptyLine = false;\n }\n }\n\n return (_commonIndent = commonIndent) !== null && _commonIndent !== void 0 ? _commonIndent : 0;\n}\n/**\n * Print a block string in the indented block form by adding a leading and\n * trailing blank line. However, if a block string starts with whitespace and is\n * a single-line, adding a leading blank line would strip that whitespace.\n *\n * @internal\n */\n\nexport function printBlockString(value) {\n var indentation = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n var preferMultipleLines = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var isSingleLine = value.indexOf('\\n') === -1;\n var hasLeadingSpace = value[0] === ' ' || value[0] === '\\t';\n var hasTrailingQuote = value[value.length - 1] === '\"';\n var hasTrailingSlash = value[value.length - 1] === '\\\\';\n var printAsMultipleLines = !isSingleLine || hasTrailingQuote || hasTrailingSlash || preferMultipleLines;\n var result = ''; // Format a multi-line block quote to account for leading space.\n\n if (printAsMultipleLines && !(isSingleLine && hasLeadingSpace)) {\n result += '\\n' + indentation;\n }\n\n result += indentation ? value.replace(/\\n/g, '\\n' + indentation) : value;\n\n if (printAsMultipleLines) {\n result += '\\n';\n }\n\n return '\"\"\"' + result.replace(/\"\"\"/g, '\\\\\"\"\"') + '\"\"\"';\n}\n","export { Source } from \"./source.mjs\";\nexport { getLocation } from \"./location.mjs\";\nexport { printLocation, printSourceLocation } from \"./printLocation.mjs\";\nexport { Kind } from \"./kinds.mjs\";\nexport { TokenKind } from \"./tokenKind.mjs\";\nexport { Lexer } from \"./lexer.mjs\";\nexport { parse, parseValue, parseType } from \"./parser.mjs\";\nexport { print } from \"./printer.mjs\";\nexport { visit, visitInParallel, getVisitFn, BREAK } from \"./visitor.mjs\";\nexport { Location, Token } from \"./ast.mjs\";\nexport { isDefinitionNode, isExecutableDefinitionNode, isSelectionNode, isValueNode, isTypeNode, isTypeSystemDefinitionNode, isTypeDefinitionNode, isTypeSystemExtensionNode, isTypeExtensionNode } from \"./predicates.mjs\";\nexport { DirectiveLocation } from \"./directiveLocation.mjs\";\n","/**\n * Generate mutation and query fragments for a form based on the schema\n * TODO: refactor to mutualize more code with vulcan-core defaultFragment functions\n * TODO: move to lib when refactored\n */\nimport _uniq from \"lodash/uniq.js\";\nimport _intersection from \"lodash/intersection.js\";\nimport gql from \"graphql-tag\";\nimport {\n getCreateableFields,\n getUpdateableFields,\n getFragmentFieldNames,\n //isBlackbox,\n} from \"@vulcanjs/schema\";\nimport {\n getFieldFragment,\n VulcanGraphqlModel,\n //isBlackbox,\n} from \"@vulcanjs/graphql\";\nimport { capitalize } from \"@vulcanjs/utils\";\nimport type { FormType } from \"../typings\";\nimport compact from \"lodash/compact.js\";\n// getFieldFragment,\nconst intlSuffix = \"_intl\";\n\n// PostsEditFormQueryFragment/PostsNewFormMutationFragment/etc.\nconst getFragmentName = (\n formType: FormType,\n multiTypeName: string,\n fragmentType: \"mutation\" | \"query\"\n) =>\n [multiTypeName, formType, \"form\", fragmentType, \"fragment\"]\n .map(capitalize)\n .join(\"\");\n\n// get modifiable fields in the query either for update or create operations\nconst getQueryFieldNames = ({ schema, options }) => {\n const queryFields =\n options.formType === \"new\"\n ? getCreateableFields(schema)\n : getUpdateableFields(schema);\n return queryFields;\n};\n// add readable fields to mutation fields\nconst getMutationFieldNames = ({ readableFieldNames, queryFieldNames }) => {\n return _uniq(queryFieldNames.concat(readableFieldNames));\n};\n\n/*\nconst getFieldFragment = ({ schema, fieldName, options }) => {\n let fieldFragment = fieldName;\n const field = schema[fieldName];\n if (!(field && field.type)) return fieldName;\n const fieldType = field.type.singleType;\n const fieldTypeName =\n typeof fieldType === 'object'\n ? 'Object'\n : typeof fieldType === 'function'\n ? fieldType.name\n : fieldType;\n\n if (fieldName.slice(-5) === intlSuffix) {\n fieldFragment = `${fieldName}{ locale value }`;\n } else {\n switch (fieldTypeName) {\n // recursive call for nested arrays and objects\n case 'Object':\n if (!isBlackbox(field) && fieldType._schema) {\n fieldFragment =\n getSchemaFragment({\n fragmentName: fieldName,\n schema: fieldType._schema,\n options,\n }) || null;\n }\n break;\n case 'Array':\n const arrayItemFieldName = `${fieldName}.$`;\n const arrayItemField = schema[arrayItemFieldName];\n // note: make sure field has an associated array item field\n if (arrayItemField) {\n // child will either be native value or a an object (first case)\n const arrayItemFieldType = arrayItemField.type.singleType;\n if (!arrayItemField.blackbox && arrayItemFieldType._schema) {\n fieldFragment =\n getSchemaFragment({\n fragmentName: fieldName,\n schema: arrayItemFieldType._schema,\n options,\n }) || null;\n }\n }\n break;\n default:\n // handle intl or return fieldName\n fieldFragment = fieldName;\n break;\n }\n }\n return fieldFragment;\n};\n*/\n\n// get fragment for a whole schema (root schema or nested schema of an object or an array)\nconst getSchemaFragment = ({\n schema,\n fragmentName,\n options,\n fieldNames: providedFieldNames,\n}) => {\n // differentiate mutation/query and create/update cases\n // respect provided fieldNames if any (needed for the root schema)\n const fieldNames =\n providedFieldNames ||\n (options.isMutation\n ? getMutationFieldNames({\n queryFieldNames: getQueryFieldNames({ schema, options }),\n readableFieldNames: getFragmentFieldNames({\n schema,\n options: { onlyViewable: true },\n }),\n })\n : getQueryFieldNames({ schema, options }));\n\n const childFragments =\n fieldNames.length &&\n fieldNames\n .map((fieldName) =>\n getFieldFragment({\n schema,\n fieldName,\n options,\n getObjectFragment: getSchemaFragment, // allow to reuse the code from defaultFragment with another behaviour\n })\n )\n // remove empty values\n .filter((f) => !!f);\n if (childFragments.length) {\n return `${fragmentName} { ${childFragments.join(\"\\n\")} }`;\n }\n return null;\n};\n\n/**\n * Generate query and mutation fragments for forms, dynamically based on the selected fields\n */\nconst getFormFragments = ({\n formType = \"new\",\n model,\n fields, // restrict on certain fields\n addFields, // add additional fields (eg to display static fields)\n}: {\n model: VulcanGraphqlModel;\n formType: FormType;\n fields?: Array<string>; // restrict on certain fields\n addFields?: Array<string>; // add additional fields (eg to display static fields)\n}) => {\n const { schema, name, graphql } = model;\n const { typeName, multiTypeName } = graphql;\n // get the root schema fieldNames\n let queryFieldNames = getQueryFieldNames({ schema, options: { formType } });\n let mutationFieldNames = getMutationFieldNames({\n queryFieldNames,\n readableFieldNames: getFragmentFieldNames({\n schema,\n options: { onlyViewable: true },\n }),\n });\n\n // if \"fields\" prop is specified, restrict list of fields to it\n if (fields && fields?.length > 0) {\n // add \"_intl\" suffix to all fields in case some of them are intl fields\n const fieldsWithIntlSuffix = fields.map((field) => `${field}${intlSuffix}`);\n const allFields = [...fields, ...fieldsWithIntlSuffix];\n queryFieldNames = _intersection(queryFieldNames, allFields);\n mutationFieldNames = _intersection(mutationFieldNames, allFields);\n }\n\n // add \"addFields\" prop contents to list of fields\n if (addFields?.length) {\n queryFieldNames = queryFieldNames.concat(addFields);\n mutationFieldNames = mutationFieldNames.concat(addFields);\n }\n\n // userId is used to check for permissions, so add it to fragments if possible\n if (schema.userId) {\n queryFieldNames.unshift(\"userId\");\n mutationFieldNames.unshift(\"userId\");\n }\n\n if (schema._id) {\n queryFieldNames.unshift(\"_id\");\n mutationFieldNames.unshift(\"_id\");\n }\n\n // check unicity (_id can be added twice)\n queryFieldNames = _uniq(queryFieldNames);\n mutationFieldNames = _uniq(mutationFieldNames);\n\n if (queryFieldNames.length === 0)\n // NOTE: in theory, you could have no queriable fields, but mutable fields =>\n // a form for data that you can create but can never see...\n // Since that doesn't make much sense, we throw an error to secure the end user\n throw new Error(\n `Model \"${model.name}\" has no queryable fields, cannot create a form for it. Please add readable/createable/updateable fields to the model schema.`\n );\n if (mutationFieldNames.length === 0)\n throw new Error(\n `Model \"${model.name}\" has no mutable fields, cannot create a form for it. Please add createable/updateable fields to model schema.`\n );\n\n const queryFragmentName = getFragmentName(\n formType,\n multiTypeName, // previously collectionName //name,\n \"query\"\n );\n // generate query fragment based on the fields that can be edited. Note: always add _id, and userId if possible.\n // TODO: support nesting\n const queryFragmentText = getSchemaFragment({\n schema,\n fragmentName: `fragment ${queryFragmentName} on ${typeName}`,\n options: { formType, isMutation: false },\n fieldNames: queryFieldNames,\n });\n if (!queryFragmentText) {\n // NOTE: this should never happen if we don't have an empty array for field names\n throw new Error(\n `Model ${model.name} with fields ${queryFieldNames} yield an empty query fragment.`\n );\n }\n const generatedQueryFragment = gql(queryFragmentText);\n\n const mutationFragmentName = getFragmentName(\n formType,\n multiTypeName, // previously collectionName,\n \"mutation\"\n );\n const mutationFragmentText = getSchemaFragment({\n schema,\n fragmentName: `fragment ${mutationFragmentName} on ${typeName}`,\n options: { formType, isMutation: true },\n fieldNames: mutationFieldNames,\n });\n if (!mutationFragmentText) {\n // NOTE: this should never happen if we don't have an empty array for field names\n throw new Error(\n `Model ${model.name} with fields ${mutationFieldNames} yield an empty mutation fragment.`\n );\n }\n // generate mutation fragment based on the fields that can be edited and/or viewed. Note: always add _id, and userId if possible.\n // TODO: support nesting\n const generatedMutationFragment = gql(mutationFragmentText);\n\n // if any field specifies extra queries, add them\n const extraQueries = compact(\n getQueryFieldNames({ schema, options: { formType } }).map((fieldName) => {\n const field = schema[fieldName];\n return field.query;\n })\n );\n // get query & mutation fragments from props or else default to same as generatedFragment\n return {\n queryFragment: generatedQueryFragment,\n mutationFragment: generatedMutationFragment,\n queryFragmentName,\n mutationFragmentName,\n extraQueries,\n };\n};\n\nexport default getFormFragments;\n","import { deprecate } from \"@vulcanjs/utils\";\nimport React, { useContext, useEffect } from \"react\";\nimport { VulcanComponentsContext } from \"./Context\";\n\nexport const VulcanComponentsConsumer = VulcanComponentsContext.Consumer;\n\nexport const useVulcanComponents = () => {\n const val = useContext(VulcanComponentsContext);\n return val;\n};\n\nexport const withVulcanComponents = (C) => (props) => {\n const vulcanComponents = useVulcanComponents();\n deprecate(\n \"0.0.0\",\n \"Using withVulcanComponents HOC => prefer useVulcanComponents with hooks\"\n );\n return <C vulcanComponents={vulcanComponents} {...props} />;\n};\n","import React from \"react\";\nimport type { PossibleVulcanComponents } from \"./typings\";\nimport { Dummy } from \"./Dummy\";\n\nconst dummyHandler = {\n get(target, property) {\n //console.log(\"target\", property);\n if (property in target) {\n return target[property];\n }\n console.log(\n `Property ${property} not in possible Vulcan components, returning Dummy`\n );\n return Dummy;\n },\n};\n// We need this to shut TypeScript up\n// You should use the Provider to get the right default values\nexport const VulcanComponentsContext =\n React.createContext<PossibleVulcanComponents>(\n // @ts-ignore\n new Proxy(\n {\n __not_initialized: true,\n },\n dummyHandler\n )\n );\n\n// Needed to guarantee that the exports stays named\nVulcanComponentsContext.displayName = \"VulcanComponentsContext\";\n","import React from \"react\";\nexport interface DummyProps {}\n\nexport const Dummy = () => (\n <span>\n You have not setup VulcanComponentsProvider. Please add following code in\n your app:{\" \"}\n <code>{`import { VulcanComponentsProvider } from \"@vulcanjs/react-ui\"; const YourApp = <VulcanComponentsProvider>{/* your app */}</VulcanComponentsProvider>;}`}</code>\n </span>\n);\n","import { useContext } from \"react\";\nimport { VulcanCurrentUserContext } from \"./Context\";\n\nexport const VulcanCurrentUserConsumer = VulcanCurrentUserContext.Consumer;\n\nexport const useVulcanCurrentUser = () => useContext(VulcanCurrentUserContext);\n","import React from \"react\";\nimport type { VulcanUser } from \"@vulcanjs/permissions\";\n\nexport type VulcanCurrentUserContextType =\n | { currentUser: VulcanUser | null; loading: false }\n | { loading: true; currentUser: any };\n// We need this to shut TypeScript up\n// You should use the Provider to get the right default values\nexport const VulcanCurrentUserContext =\n React.createContext<VulcanCurrentUserContextType>({\n currentUser: null,\n loading: false,\n });\n","export * from \"./Form\";\nexport * from \"./typings\";\n","/*\n\nMain form component.\n\nThis component expects:\n\n### All Forms:\n\n- collection\n- currentUser\n- client (Apollo client)\n\n*/\n\nimport React, { useEffect, useRef, useState } from \"react\";\nimport { runCallbacks, getErrors } from \"@vulcanjs/core\";\nimport { useIntlContext } from \"@vulcanjs/react-i18n\";\nimport { removeProperty } from \"@vulcanjs/utils\";\nimport _filter from \"lodash/filter.js\";\nimport cloneDeep from \"lodash/cloneDeep.js\";\nimport compact from \"lodash/compact.js\";\nimport get from \"lodash/get.js\";\nimport isObject from \"lodash/isObject.js\";\nimport mapValues from \"lodash/mapValues.js\";\nimport merge from \"lodash/merge.js\";\nimport omit from \"lodash/omit.js\";\nimport omitBy from \"lodash/omitBy.js\";\nimport pick from \"lodash/pick.js\";\nimport pickBy from \"lodash/pickBy.js\";\nimport set from \"lodash/set.js\";\nimport unset from \"lodash/unset.js\";\nimport update from \"lodash/update.js\";\nimport without from \"lodash/without.js\";\nimport isEmpty from \"lodash/isEmpty.js\";\nimport type { FormLayoutProps } from \"../../elements/FormLayout\";\nimport type { FormSubmitProps } from \"../../elements/FormSubmit\";\n\nimport {\n convertSchema,\n getEditableFields,\n getInsertableFields,\n} from \"../../utils/schema_utils\";\nimport { isEmptyValue } from \"../../utils/utils\";\nimport { getParentPath } from \"../../utils/path_utils\";\n// import withCollectionProps from \"./withCollectionProps\";\nimport { FormContext } from \"../FormContext\";\nimport { getFieldGroups, getFieldNames, getLabel } from \"./fields\";\nimport { isNotSameDocument } from \"./utils\";\nimport { useWarnOnUnsaved } from \"../../hooks/useWarnOnUnsaved\";\nimport { useVulcanComponents } from \"../../../VulcanComponents/Consumer\";\n\nimport type { FormType } from \"../../typings\";\nimport {\n CreateDocumentResult,\n FormProps,\n FormState,\n UpdateDocumentResult,\n} from \"./typings\";\nimport { MutationResult } from \"@apollo/client\";\n\n// props that should trigger a form reset\nconst RESET_PROPS = [\n \"model\",\n // \"collection\",\n // \"collectionName\",\n \"document\",\n \"schema\",\n \"currentUser\",\n \"fields\",\n \"removeFields\",\n \"prefilledProps\", // TODO: prefilledProps should be merged instead?\n];\n\nconst compactParent = (object, path) => {\n const parentPath = getParentPath(path);\n\n // note: we only want to compact arrays, not objects\n const compactIfArray = (x) => (Array.isArray(x) ? compact(x) : x);\n\n update(object, parentPath, compactIfArray);\n};\n\nconst getDefaultValues = (convertedSchema) => {\n // TODO: make this work with nested schemas, too\n return pickBy(\n mapValues(convertedSchema, (field) => field.defaultValue),\n (value) => value\n );\n};\n\nconst compactObject = (o) => omitBy(o, (f) => f === null || f === undefined);\n\nconst getInitialStateFromProps = (nextProps: FormProps): FormState => {\n const schema = nextProps.schema || nextProps.model.schema;\n const convertedSchema = convertSchema(schema);\n const formType: FormType = nextProps.document ? \"edit\" : \"new\";\n // for new document forms, add default values to initial document\n const defaultValues =\n formType === \"new\" ? getDefaultValues(convertedSchema) : {};\n // note: we remove null/undefined values from the loaded document so they don't overwrite possible prefilledProps\n const initialDocument = merge(\n {},\n defaultValues,\n nextProps.prefilledProps,\n compactObject(nextProps.document)\n );\n\n //if minCount is specified, go ahead and create empty nested documents\n Object.keys(convertedSchema).forEach((key) => {\n let minCount = convertedSchema[key].minCount;\n if (minCount) {\n initialDocument[key] = initialDocument[key] || [];\n while (initialDocument[key].length < minCount)\n initialDocument[key].push({});\n }\n });\n\n // remove all instances of the `__typename` property from document\n removeProperty(initialDocument, \"__typename\");\n\n return {\n disabled: nextProps.disabled,\n errors: [],\n deletedValues: [],\n currentValues: {},\n originalSchema: convertSchema(schema, { removeArrays: false }),\n // convert SimpleSchema schema into JSON object\n schema: convertedSchema,\n // Also store all field schemas (including nested schemas) in a flat structure\n flatSchema: convertSchema(schema, { flatten: true }),\n // the initial document passed as props\n initialDocument,\n // initialize the current document to be the same as the initial document\n currentDocument: initialDocument,\n };\n};\n\nconst getChildrenProps = (\n props: FormProps,\n state: Pick<FormState, \"disabled\" | \"currentDocument\">,\n options: { formType: FormType },\n // TODO: that belongs to the context instead\n callbacks: { deleteDocument: Function }\n): {\n formLayoutProps: FormLayoutProps;\n formGroupProps: Function;\n commonProps: any;\n formSubmitProps: FormSubmitProps;\n} => {\n const {\n currentUser,\n repeatErrors,\n submitLabel,\n cancelLabel,\n revertLabel,\n cancelCallback,\n revertCallback,\n id,\n model,\n prefilledProps,\n itemProperties,\n contextName,\n showRemove,\n showDelete,\n } = props;\n const { disabled, currentDocument } = state;\n const { formType } = options;\n const { deleteDocument } = callbacks;\n const commonProps = {\n document: currentDocument,\n formType,\n currentUser,\n disabled,\n prefilledProps,\n itemProperties,\n contextName,\n };\n\n const docClassName = `document-${formType}`;\n const modelName = model.name.toLowerCase();\n const formProps = {\n className: `${docClassName} ${docClassName}-${modelName}`,\n id: id,\n // It's the form element responsibility to get submitForm from context\n // onSubmit: this.submitForm(formType),\n // TODO: update to useRef\n //ref: (e) => {\n // this.form = e;\n //},\n };\n\n const formGroupProps = (group) => ({\n key: group.name,\n ...group,\n group: omit(group, [\"fields\"]),\n ...commonProps,\n });\n\n const formSubmitProps = {\n model,\n currentUser,\n submitLabel,\n cancelLabel,\n revertLabel,\n cancelCallback,\n revertCallback,\n document: currentDocument,\n // TODO: should probably be passed through context\n deleteDocument:\n (formType === \"edit\" && showRemove && showDelete && deleteDocument) ||\n null,\n };\n\n const formLayoutProps = {\n formProps: formProps,\n repeatErrors: repeatErrors,\n submitProps: formSubmitProps,\n commonProps,\n };\n return {\n commonProps,\n formSubmitProps,\n formGroupProps,\n formLayoutProps,\n };\n};\n\n// component form until we go stateless\nconst FormWarnUnsaved = ({\n isChanged,\n warnUnsavedChanges,\n children,\n}: {\n isChanged: boolean;\n warnUnsavedChanges?: boolean;\n children: React.ReactNode;\n}) => {\n useWarnOnUnsaved({\n isChanged,\n warnUnsavedChanges,\n });\n return <>{children}</>;\n};\n\n/*\n\n Like getDocument, but cross-reference with getFieldNames()\n to only return fields that actually need to be submitted\n\n Also remove any deleted values.\n\n */\nconst getData = (\n customArgs,\n props: FormProps,\n state: Pick<FormState, \"currentDocument\" | \"deletedValues\">,\n // previously from \"this\" object\n { submitFormCallbacks, form }: any\n) => {\n const { currentDocument } = state;\n const { model, prefilledProps } = props;\n // we want to keep prefilled data even for hidden/removed fields\n let data = prefilledProps || {};\n\n // omit prefilled props for nested fields\n data = omitBy(data, (value, key) => key.endsWith(\".$\"));\n\n const args = {\n schema: model.schema,\n excludeRemovedFields: false,\n excludeHiddenFields: false,\n replaceIntlFields: true,\n addExtraFields: false,\n ...customArgs,\n };\n\n // only keep relevant fields\n // for intl fields, make sure we look in foo_intl and not foo\n const fields = getFieldNames(props, currentDocument, args);\n data = { ...data, ...pick(currentDocument, ...fields) };\n\n // compact deleted values\n state.deletedValues.forEach((path) => {\n if (path.includes(\".\")) {\n /*\n\n If deleted field is a nested field, nested array, or nested array item, try to compact its parent array\n\n - Nested field: 'address.city'\n - Nested array: 'addresses.1'\n - Nested array item: 'addresses.1.city'\n\n */\n compactParent(data, path);\n }\n });\n\n // run data object through submitForm callbacks\n data = runCallbacks({\n callbacks: submitFormCallbacks,\n iterator: data,\n args: [\n {\n /*form: this*/\n },\n ],\n });\n\n return data;\n};\n\nexport const Form = (props: FormProps) => {\n const { initCallback, createDocument, updateDocument, deleteDocument } =\n props;\n const initialState = getInitialStateFromProps(props);\n const { schema, originalSchema, flatSchema, initialDocument } = initialState;\n const isFirstRender = useRef(true);\n useEffect(() => {\n if (isFirstRender.current) {\n isFirstRender.current = false; // toggle flag after first render/mounting\n return;\n }\n if (initCallback) initCallback(initialState.currentDocument);\n }, [initCallback]);\n const defaultProps = {\n layout: \"horizontal\",\n prefilledProps: {},\n repeatErrors: false,\n showRemove: true,\n showDelete: true,\n };\n const allProps = { ...defaultProps, ...props };\n const defaultValues = {};\n const submitFormCallbacks: Array<Function> = [];\n const successFormCallbacks: Array<Function> = [];\n const failureFormCallbacks: Array<Function> = [];\n const intl = useIntlContext();\n\n // --------------------------------------------------------------------- //\n // ------------------------------- Errors ------------------------------ //\n // --------------------------------------------------------------------- //\n\n /*\n\n Add error to form state\n\n Errors can have the following properties:\n - id: used as an internationalization key, for example `errors.required`\n - path: for field-specific errors, the path of the field with the issue\n - properties: additional data. Will be passed to vulcan-i18n as values\n - message: if id cannot be used as i81n key, message will be used\n\n */\n const [errors, setErrors] = useState<Array<any>>([]);\n const throwError = (error) => {\n let formErrors = getErrors(error);\n\n // eslint-disable-next-line no-console\n console.log(formErrors);\n\n // add error(s) to state\n setErrors((prevErrors) => [...prevErrors, ...formErrors]);\n };\n\n /*\n\n Clear errors for a field\n\n */\n const clearFieldErrors = (path) => {\n setErrors((prevErrors) =>\n prevErrors.filter((error) => error.path !== path)\n );\n };\n\n // --------------------------------------------------------------------- //\n // ------------------------------- Context ----------------------------- //\n // --------------------------------------------------------------------- //\n\n const [deletedValues, setDeletedValues] = useState<Array<any>>([]);\n\n // add something to deleted values\n const addToDeletedValues = (name) => {\n setDeletedValues((prevDeletedValues) => [...prevDeletedValues, name]);\n };\n\n interface Callbacks {\n submitFormCallbacks: Array<any>;\n successFormCallbacks: Array<any>;\n failureFormCallbacks: Array<any>;\n }\n const [callbacks, setCallbacks] = useState<Callbacks>({\n submitFormCallbacks: [],\n successFormCallbacks: [],\n failureFormCallbacks: [],\n });\n // add a callback to the form submission\n const addToSubmitForm = (callback) => {\n setCallbacks((cbs) => ({\n ...cbs,\n // submitFormCallbacks: [...cbs.submitFormCallbacks, callback],\n }));\n };\n\n // add a callback to form submission success\n const addToSuccessForm = (callback) => {\n setCallbacks((cbs) => ({\n ...cbs,\n successFormCallbacks: [...cbs.successFormCallbacks, callback],\n }));\n };\n\n // add a callback to form submission failure\n const addToFailureForm = (callback) => {\n setCallbacks((cbs) => ({\n ...cbs,\n failureFormCallbacks: [...cbs.failureFormCallbacks, callback],\n }));\n };\n\n const clearFormCallbacks = () => {\n setCallbacks({\n submitFormCallbacks: [],\n successFormCallbacks: [],\n failureFormCallbacks: [],\n });\n };\n\n /*\n setFormState = (fn) => {\n this.setState(fn);\n };\n */\n\n const [currentValues, setCurrentValues] = useState<Object>({});\n\n const submitFormContext = (formType: FormType) => (event /*newValues*/) => {\n /*\n TODO: previously this callback was updating the current values with new values after this call\n Need to check how this worked in Vulcan initially\n setCurrentValues((prevCurrentValues) => ({\n ...prevCurrentValues,\n ...newValues,\n }));\n */\n // TODO: previously, this was using a callback from setCurrentValues\n // this needs to be rearchitectured to work without, will need some check\n // https://stackoverflow.com/questions/56247433/how-to-use-setstate-callback-on-react-hooks\n submitForm(formType)(event);\n };\n\n // --------------------------------------------------------------------- //\n // ------------------------------ Lifecycle ---------------------------- //\n // --------------------------------------------------------------------- //\n\n /*\n\n When props change, reinitialize the form state\n Triggered only for data related props (collection, document, currentUser etc.)\n\n @see https://reactjs.org/blog/2018/06/07/you-probably-dont-need-derived-state.html\n\n */\n /*\n UNSAFE_componentWillReceiveProps(nextProps) {\n const needReset = !!RESET_PROPS.find(\n (prop) => !isEqual(this.props[prop], nextProps[prop])\n );\n if (needReset) {\n const newState = getInitialStateFromProps(nextProps);\n this.setState(newState);\n if (nextProps.initCallback)\n nextProps.initCallback(newState.currentDocument);\n }\n }*/\n\n const [currentDocument, setCurrentDocument] = useState<{\n title?: string;\n _id?: string;\n name?: string;\n }>(initialDocument);\n\n /*\n\n Manually update the current values of one or more fields(i.e. on change or blur).\n\n */\n const updateCurrentValues = (newValues, options: { mode?: string } = {}) => {\n // default to overwriting old value with new\n const { mode = \"overwrite\" } = options;\n const { changeCallback } = props;\n\n // keep the previous ones and extend (with possible replacement) with new ones\n // keep only the relevant properties\n const newState = {\n currentValues: cloneDeep(currentValues),\n currentDocument: cloneDeep(currentDocument),\n deletedValues: cloneDeep(deletedValues),\n };\n\n Object.keys(newValues).forEach((key) => {\n const path = key;\n let value = newValues[key];\n\n if (isEmptyValue(value)) {\n // delete value\n unset(newState.currentValues, path);\n set(newState.currentDocument, path, null);\n newState.deletedValues = [...newState.deletedValues, path];\n } else {\n // 1. update currentValues\n set(newState.currentValues, path, value);\n\n // 2. update currentDocument\n // For arrays and objects, give option to merge instead of overwrite\n if (mode === \"merge\" && (Array.isArray(value) || isObject(value))) {\n const oldValue = get(newState.currentDocument, path);\n set(newState.currentDocument, path, merge(oldValue, value));\n } else {\n set(newState.currentDocument, path, value);\n }\n\n // 3. in case value had previously been deleted, \"undelete\" it\n newState.deletedValues = without(newState.deletedValues, path);\n }\n });\n if (changeCallback) changeCallback(newState.currentDocument);\n\n // TODO: prefer a reducer\n setCurrentValues(newState.currentValues);\n setCurrentDocument(newState.currentDocument);\n setDeletedValues(newState.deletedValues);\n };\n\n /*\n\n Refetch the document from the database (in case it was updated by another process or to reset the form)\n\n */\n const refetchForm = () => {\n if (props.refetch) {\n props.refetch();\n }\n };\n\n const [disabled, setDisabled] = useState<boolean>(false); // TODO\n const [success, setSuccess] = useState<boolean>(false); // TODO\n /**\n * Clears form errors and values.\n *\n * @example Clear form\n * // form will be fully emptied, with exception of prefilled values\n * clearForm({ document: {} });\n *\n * @example Reset/revert form\n * // form will be reverted to its initial state\n * clearForm();\n *\n * @example Clear with new values\n * // form will be cleared but initialized with the new document\n * const document = {\n * // ... some values\n * };\n * clearForm({ document });\n *\n * @param {Object=} options\n * @param {Object=} options.document\n * Document to use as new initial document when values are cleared instead of\n * the existing one. Note that prefilled props will be merged\n */\n const clearForm = (options: { document?: any } = {}) => {\n const { document: optionsDocument } = options;\n const document = optionsDocument\n ? merge({}, props.prefilledProps, optionsDocument)\n : null;\n // TODO: prefer a reducer\n setErrors([]);\n setCurrentValues({});\n setDeletedValues([]);\n setCurrentDocument(document || initialDocument);\n // setInitialDocument(document || initialDocument);\n setDisabled(false);\n };\n\n const newMutationSuccessCallback = function <TModel = Object>(\n result: CreateDocumentResult<TModel>\n ) {\n mutationSuccessCallback(result, \"new\");\n };\n\n const editMutationSuccessCallback = function <TModel = Object>(\n result: UpdateDocumentResult<TModel>\n ) {\n mutationSuccessCallback(result, \"edit\");\n };\n\n const formRef = useRef(null);\n const mutationSuccessCallback = function <TModel = Object>(\n // must be called only on valid results\n result: CreateDocumentResult<TModel>,\n mutationType: FormType\n ) {\n // TODO: use a reducer\n setDisabled(false);\n setSuccess(true);\n // for new mutation, run refetch function if it exists\n // TODO: the create mutation should already return the freshest value, do we really need that?\n // instead we might want to update currentResult with the result of the creation\n if (mutationType === \"new\") refetchForm();\n let { document } = result;\n\n // call the clear form method (i.e. trigger setState) only if the form has not been unmounted\n // (we are in an async callback, everything can happen!)\n // TODO: this should rely on a ref\n if (formRef.current) {\n clearForm({\n document: mutationType === \"edit\" ? document : undefined,\n });\n }\n\n // run document through mutation success callbacks\n document = runCallbacks({\n callbacks: successFormCallbacks,\n iterator: document,\n args: [{ form: formRef.current }],\n });\n\n // run success callback if it exists\n if (props.successCallback) props.successCallback(document, { form: this });\n };\n\n // catch graphql errors\n const mutationErrorCallback = (document, error) => {\n setDisabled(false);\n\n // eslint-disable-next-line no-console\n console.error(\"// graphQL Error\");\n // eslint-disable-next-line no-console\n console.error(error);\n\n // run mutation failure callbacks on error, we do not allow the callbacks to change the error\n runCallbacks({\n callbacks: failureFormCallbacks,\n iterator: error,\n args: [{ error, form: formRef.current }],\n });\n\n if (!isEmpty(error)) {\n // add error to state\n throwError(error);\n }\n\n // run error callback if it exists\n if (props.errorCallback)\n props.errorCallback(document, error, { form: this });\n\n // scroll back up to show error messages\n // TODO: migrate this to scroll on top of the form\n //Utils.scrollIntoView(\".flash-message\");\n };\n\n /*\n\n Submit form handler\n\n */\n const submitForm = (formType: FormType) => async (event?: Event) => {\n event && event.preventDefault();\n event && event.stopPropagation();\n\n const { contextName } = props;\n\n // if form is disabled (there is already a submit handler running) don't do anything\n if (disabled) {\n return;\n }\n\n // clear errors and disable form while it's submitting\n setErrors([]);\n setDisabled(true);\n\n // complete the data with values from custom components\n // note: it follows the same logic as SmartForm's getDocument method\n let data = getData(\n { replaceIntlFields: true, addExtraFields: false, mutableFields },\n props,\n {\n currentDocument,\n deletedValues,\n },\n { form: formRef.current, submitFormCallbacks }\n );\n\n // if there's a submit callback, run it\n if (props.submitCallback) {\n data = props.submitCallback(data) || data;\n }\n\n if (formType === \"new\") {\n // create document form\n try {\n const result = await createDocument({\n input: {\n data,\n contextName,\n },\n });\n if (result.errors?.length) {\n // TODO: previously got from meta, we could have more than 1 error\n mutationErrorCallback(document, result.errors[0]);\n } else {\n newMutationSuccessCallback(result);\n }\n } catch (error) {\n mutationErrorCallback(document, error);\n }\n } else {\n // update document form\n try {\n const documentId = currentDocument._id;\n const result = await updateDocument({\n input: {\n id: documentId,\n data,\n contextName,\n },\n });\n // TODO: handle more than 1 error\n if (result.errors?.length) {\n mutationErrorCallback(document, result.errors[0]);\n } else {\n editMutationSuccessCallback(result);\n }\n } catch (error) {\n mutationErrorCallback(document, error);\n }\n }\n };\n\n /*\n\n Delete document handler\n\n */\n const deleteDocumentWithConfirm = () => {\n const document = currentDocument;\n const documentId = props.document._id;\n const documentTitle = document.title || document.name || \"\";\n\n const deleteDocumentConfirm = intl.formatMessage(\n { id: \"forms.delete_confirm\" },\n { title: documentTitle }\n );\n\n if (window.confirm(deleteDocumentConfirm)) {\n deleteDocument({ input: { id: documentId } })\n .then((mutationResult) => {\n // the mutation result looks like {data:{collectionRemove: null}} if succeeded\n if (props.removeSuccessCallback)\n props.removeSuccessCallback({ documentId, documentTitle });\n refetchForm();\n })\n .catch((error) => {\n // eslint-disable-next-line no-console\n console.log(error);\n });\n }\n };\n\n // --------------------------------------------------------------------- //\n // ------------------------- Props to Pass ----------------------------- //\n // --------------------------------------------------------------------- //\n\n // --------------------------------------------------------------------- //\n // ----------------------------- Render -------------------------------- //\n // --------------------------------------------------------------------- //\n\n const { successComponent, document, currentUser, model, warnUnsavedChanges } =\n props;\n const FormComponents = useVulcanComponents();\n\n const formType: \"edit\" | \"new\" = document ? \"edit\" : \"new\";\n\n // Fields computation\n const mutableFields =\n formType === \"edit\"\n ? getEditableFields(schema, currentUser, initialDocument)\n : getInsertableFields(schema, currentUser);\n\n const { formLayoutProps, formGroupProps } = getChildrenProps(\n props,\n { disabled, currentDocument },\n {\n formType,\n },\n {\n deleteDocument: deleteDocumentWithConfirm,\n }\n );\n const isChanged = isNotSameDocument(initialDocument, currentDocument);\n\n return success && successComponent ? (\n successComponent\n ) : (\n <FormWarnUnsaved\n isChanged={isChanged}\n warnUnsavedChanges={warnUnsavedChanges}\n >\n <FormContext.Provider\n value={{\n throwError,\n clearForm,\n refetchForm,\n isChanged,\n submitForm: submitFormContext(formType), //Change in name because we already have a function\n // called submitForm, but no reason for the user to know\n // about that\n addToDeletedValues: addToDeletedValues,\n updateCurrentValues: updateCurrentValues,\n getDocument: () => currentDocument,\n getLabel: (fieldName, fieldLocale) =>\n getLabel(model, flatSchema, intl, fieldName, fieldLocale),\n initialDocument: initialDocument,\n // TODO BAD: check where used\n //setFormState: this.setFormState,\n addToSubmitForm,\n addToSuccessForm,\n addToFailureForm,\n clearFormCallbacks,\n errors,\n currentValues,\n deletedValues,\n clearFieldErrors,\n }}\n >\n <FormComponents.FormLayout {...formLayoutProps}>\n {getFieldGroups(\n props,\n {\n currentDocument,\n schema,\n flatSchema,\n originalSchema,\n },\n intl,\n mutableFields,\n intl.formatMessage\n ).map((group, i) => (\n <FormComponents.FormGroup key={i} {...formGroupProps(group)} />\n ))}\n </FormComponents.FormLayout>\n </FormContext.Provider>\n </FormWarnUnsaved>\n );\n};\n\n// Mutation that yield a success result\ntype SuccessfulMutationResult<TData = Object> = MutationResult<TData> & {\n data: TData;\n};\n/**\n * Typeguared to allow considering the request as successful\n */\nconst isSuccessful = function <T = any>(\n result: MutationResult<T> | undefined\n): result is SuccessfulMutationResult<T> {\n return !!result?.data;\n};\n\nexport default Form;\n","/*\n * Schema converter/getters\n */\nimport { canCreateField, canUpdateField } from \"@vulcanjs/permissions\";\nimport { VulcanFieldSchema, VulcanSchema } from \"@vulcanjs/schema\";\nimport { getFieldType } from \"./utils\";\n\n/* getters */\n// filter out fields with \".\" or \"$\"\nexport const getValidFields = (schema) => {\n return Object.keys(schema).filter(\n (fieldName) => !fieldName.includes(\"$\") && !fieldName.includes(\".\")\n );\n};\n\n/*\n\nConvert a nested SimpleSchema schema into a JSON object\nIf flatten = true, will create a flat object instead of nested tree\n\n/* permissions */\n\n/**\n * @method Mongo.Collection.getInsertableFields\n * Get an array of all fields editable by a specific user for a given collection\n * @param {Object} user – the user for which to check field permissions\n */\nexport const getInsertableFields = function (schema, user) {\n const fields = Object.keys(schema).filter(function (fieldName) {\n var field = schema[fieldName];\n return canCreateField(user, field);\n });\n return fields;\n};\n\n/**\n * @method Mongo.Collection.getEditableFields\n * Get an array of all fields editable by a specific user for a given collection (and optionally document)\n * @param {Object} user – the user for which to check field permissions\n */\nexport const getEditableFields = function (schema, user, document) {\n const fields = Object.keys(schema).filter(function (fieldName) {\n var field = schema[fieldName];\n return canUpdateField(user, field, document);\n });\n return fields;\n};\n\nconst isNestedSchema = (schema: any): schema is VulcanSchema => {\n return typeof schema === \"object\";\n};\n\n/**\n * Vulcan Schema => Form Schema\n * TODO: type this better\n * @param schema\n * @param options\n * @returns\n */\nexport const convertSchema = (\n schema: VulcanSchema,\n options: { flatten?: boolean; removeArrays?: boolean } = {}\n) => {\n const { flatten = false, removeArrays = true } = options;\n\n let jsonSchema = {};\n\n Object.keys(schema).forEach((fieldName) => {\n // exclude array fields\n if (removeArrays && fieldName.includes(\"$\")) {\n return;\n }\n\n // extract schema\n jsonSchema[fieldName] = getFieldSchema(fieldName, schema);\n\n // check for existence of nested field\n // and get its schema if possible or its type otherwise\n const subSchemaOrType = getNestedFieldSchemaOrType(fieldName, schema);\n if (subSchemaOrType) {\n // remember the subschema if it exists, allow to customize labels for each group of items for arrays of objects\n jsonSchema[fieldName].arrayFieldSchema = getFieldSchema(\n `${fieldName}.$`,\n schema\n );\n\n // nested schema can be a field schema ({type, canRead, etc.}) (convertedSchema will be null)\n // or a schema on its own with subfields (convertedSchema will return smth)\n if (isNestedSchema(subSchemaOrType)) {\n // call convertSchema recursively on the subSchema\n const convertedSubSchema = convertSchema(subSchemaOrType, options);\n // subSchema is a full schema with multiple fields (eg array of objects)\n if (flatten) {\n jsonSchema = { ...jsonSchema, ...convertedSubSchema };\n } else {\n jsonSchema[fieldName].schema = convertedSubSchema;\n }\n } else {\n // subSchema is a simple field in this case (eg array of numbers)\n jsonSchema[fieldName].isSimpleArrayField = true; //getFieldSchema(`${fieldName}.$`, schema);\n }\n }\n });\n return jsonSchema;\n};\n\n/*\n\nGet a JSON object representing a field's schema\n\n*/\nexport const getFieldSchema = (fieldName: string, schema: VulcanSchema) => {\n let fieldSchema = {};\n schemaProperties.forEach((property) => {\n const propertyValue = schema[fieldName]?.[property];\n if (propertyValue) {\n fieldSchema[property] = propertyValue;\n }\n });\n return fieldSchema;\n};\n\n// type is an array due to the possibility of using SimpleSchema.oneOf\n// right now we support only fields with one type\nexport const getSchemaType = (fieldSchema: VulcanFieldSchema) =>\n getFieldType(fieldSchema);\n\nconst getArrayNestedSchema = (fieldName: string, schema: VulcanSchema) => {\n const arrayItemSchema = schema[`${fieldName}.$`];\n const nestedSchema = arrayItemSchema && getSchemaType(arrayItemSchema);\n return nestedSchema;\n};\n\n// TODO: not 100% it's valid with current implementation\nconst isNestedSchemaField = (fieldSchema: VulcanFieldSchema) => {\n const fieldType = getSchemaType(fieldSchema);\n return fieldType && typeof fieldType === \"object\";\n};\nconst getObjectNestedSchema = (fieldName: string, schema: VulcanSchema) => {\n const fieldSchema = schema[fieldName];\n if (!isNestedSchemaField(fieldSchema)) return null;\n const nestedSchema = fieldSchema && getSchemaType(fieldSchema);\n return nestedSchema;\n};\n/*\n\nGiven an array field, get its nested schema\nIf the field is not an object, this will return the subfield type instead\n*/\nexport const getNestedFieldSchemaOrType = (fieldName, schema) => {\n const arrayItemSchema = getArrayNestedSchema(fieldName, schema);\n if (!arrayItemSchema) {\n // look for an object schema\n const objectItemSchema = getObjectNestedSchema(fieldName, schema);\n // no schema was found\n if (!objectItemSchema) return null;\n return objectItemSchema;\n }\n return arrayItemSchema;\n};\n\nexport const schemaProperties = [\n \"type\",\n \"label\",\n \"optional\",\n \"required\",\n \"min\",\n \"max\",\n \"exclusiveMin\",\n \"exclusiveMax\",\n \"minCount\",\n \"maxCount\",\n \"allowedValues\",\n \"regEx\",\n \"blackbox\",\n \"trim\",\n \"custom\",\n \"defaultValue\",\n \"autoValue\",\n \"hidden\", // hidden: true means the field is never shown in a form no matter what\n \"mustComplete\", // mustComplete: true means the field is required to have a complete profile\n \"form\", // form placeholder\n \"inputProperties\", // form placeholder\n \"itemProperties\",\n \"control\", // SmartForm control (String or React component)\n \"input\", // SmartForm control (String or React component)\n \"autoform\", // legacy form placeholder; backward compatibility (not used anymore)\n \"order\", // position in the form\n \"group\", // form fieldset group\n \"onCreate\", // field insert callback\n \"onUpdate\", // field edit callback\n \"onDelete\", // field remove callback\n \"onInsert\", // OpenCRUD backwards compatibility\n \"onEdit\", // OpenCRUD backwards compatibility\n \"onRemove\", // OpenCRUD backwards compatibility\n \"canRead\",\n \"canCreate\",\n \"canUpdate\",\n \"viewableBy\", // OpenCRUD backwards compatibility\n \"insertableBy\", // OpenCRUD backwards compatibility\n \"editableBy\", // OpenCRUD backwards compatibility\n \"resolveAs\",\n \"searchable\",\n \"description\",\n \"beforeComponent\",\n \"afterComponent\",\n \"placeholder\",\n \"options\",\n \"query\",\n \"queryWaitsForValue\",\n \"autocompleteQuery\",\n \"fieldProperties\",\n \"intl\",\n \"intlId\",\n];\n\nexport const formProperties = [\n \"optional\",\n \"required\",\n \"min\",\n \"max\",\n \"exclusiveMin\",\n \"exclusiveMax\",\n \"minCount\",\n \"maxCount\",\n \"allowedValues\",\n \"regEx\",\n \"blackbox\",\n \"trim\",\n \"custom\",\n \"defaultValue\",\n \"autoValue\",\n \"mustComplete\", // mustComplete: true means the field is required to have a complete profile\n \"form\", // form placeholder\n \"inputProperties\", // form placeholder\n \"itemProperties\",\n \"control\", // SmartForm control (String or React component)\n \"input\", // SmartForm control (String or React component)\n \"order\", // position in the form\n \"group\", // form fieldset group\n \"description\",\n \"beforeComponent\",\n \"afterComponent\",\n \"placeholder\",\n \"options\",\n \"query\",\n \"queryWaitsForValue\",\n \"autocompleteQuery\",\n \"fieldProperties\",\n];\n","import merge from \"lodash/merge.js\";\nimport find from \"lodash/find.js\";\nimport isPlainObject from \"lodash/isPlainObject.js\";\nimport set from \"lodash/set.js\";\nimport size from \"lodash/size.js\";\n\nimport { removePrefix, filterPathsByPrefix } from \"./path_utils\";\nimport { VulcanFieldSchema } from \"@vulcanjs/schema\";\n\n// add support for nested properties\nexport const deepValue = function (obj, path) {\n const pathArray = path.split(\".\");\n\n for (var i = 0; i < pathArray.length; i++) {\n obj = obj[pathArray[i]];\n }\n\n return obj;\n};\n\n// see http://stackoverflow.com/questions/19098797/fastest-way-to-flatten-un-flatten-nested-json-objects\nexport const flatten = function (data) {\n var result = {};\n function recurse(cur, prop) {\n if (Object.prototype.toString.call(cur) !== \"[object Object]\") {\n result[prop] = cur;\n } else if (Array.isArray(cur)) {\n for (var i = 0, l = cur.length; i < l; i++)\n recurse(cur[i], prop + \"[\" + i + \"]\");\n if (l == 0) result[prop] = [];\n } else {\n var isEmpty = true;\n for (var p in cur) {\n isEmpty = false;\n recurse(cur[p], prop ? prop + \".\" + p : p);\n }\n if (isEmpty && prop) result[prop] = {};\n }\n }\n recurse(data, \"\");\n return result;\n};\n\nexport const isEmptyValue = (value) =>\n typeof value === \"undefined\" ||\n value === null ||\n value === \"\" ||\n (Array.isArray(value) && value.length === 0);\n\n/**\n * Merges values. It takes into account the current, original and deleted values,\n * and the merge produces the proper type for simple objects or arrays.\n *\n * @param {Object} props\n * Form component props. Only specific properties for this function are documented.\n * @param {*} props.currentValue\n * Current value of the field\n * @param {*} props.documentValue\n * Original value of the field\n * @return {*|undefined}\n * Merged value or undefined if no merge was performed\n */\nexport const mergeValue = ({\n currentValue,\n documentValue,\n deletedValues: deletedFields,\n path,\n locale,\n datatype,\n}) => {\n if (locale) {\n // note: intl fields are of type Object but should be treated as Strings\n return currentValue || documentValue || \"\";\n }\n\n // note: retrieve nested deleted values is performed here to avoid skipping\n // the merge in case the current field is not in `currentValues` but a nested\n // property has been removed directly by path\n const deletedValues = getNestedDeletedValues(path, deletedFields);\n const hasDeletedValues = !!size(deletedValues);\n if (\n (Array.isArray(currentValue) || hasDeletedValues) &&\n find(datatype, [\"type\", Array])\n ) {\n return merge([], documentValue, currentValue, deletedValues);\n } else if (\n (isPlainObject(currentValue) || hasDeletedValues) &&\n find(datatype, [\"type\", Object])\n ) {\n return merge({}, documentValue, currentValue, deletedValues);\n }\n return undefined;\n};\n\n/**\n * Converts a list of field names to an object of deleted values.\n *\n * @param {string[]|Object.<string|string>} deletedFields\n * List of deleted field names or paths\n * @param {Object|Array=} accumulator={}\n * Value to reduce the values to\n * @return {Object|Array}\n * Deleted values, with the structure defined by taking the received deleted\n * fields as paths\n * @example\n * const deletedFields = [\n * 'field.subField',\n * 'field.subFieldArray[0]',\n * 'fieldArray[0]',\n * 'fieldArray[2].name',\n * ];\n * getNestedDeletedValues(deletedFields);\n * // => { 'field': { 'subField': null, 'subFieldArray': [null] }, 'fieldArray': [null, undefined, { name: null } }\n */\nexport const getDeletedValues = (deletedFields, accumulator = {}) =>\n deletedFields.reduce(\n (deletedValues, path) => set(deletedValues, path, null),\n accumulator\n );\n\n/**\n * Filters the given field names by prefix, removes it from each one of them\n * and convert the list to an object of deleted values.\n *\n * @param {string=} prefix\n * Prefix to filter and remove from deleted fields\n * @param {string[]|Object.<string|string>} deletedFields\n * List of deleted field names or paths\n * @param {Object|Array=} accumulator={}\n * Value to reduce the values to\n * @return {Object.<string, null>}\n * Object keyed with the given deleted fields, valued with `null`\n * @example\n * const deletedFields = [\n * 'field.subField',\n * 'field.subFieldArray[0]',\n * 'fieldArray[0]',\n * 'fieldArray[2].name',\n * ];\n * getNestedDeletedValues('field', deletedFields);\n * // => { 'subField': null, 'subFieldArray': [null] }\n * getNestedDeletedValues('fieldArray', deletedFields);\n * // => { '0': null, '2': { 'name': null } }\n * getNestedDeletedValues('fieldArray', deletedFields, []);\n * // => [null, undefined, { 'name': null } ]\n */\nexport const getNestedDeletedValues = (\n prefix,\n deletedFields,\n accumulator = {}\n) =>\n getDeletedValues(\n removePrefix(prefix, filterPathsByPrefix(prefix, deletedFields)),\n accumulator\n );\n\n//TODO: check if it still works as expected\n// previously was dataType[0].type\nexport const getFieldType = (fieldSchema: VulcanFieldSchema) =>\n fieldSchema.type;\n/**\n * Get appropriate null value for various field types\n *\n * @param {Array} datatype\n * Field's datatype property\n */\nexport const getNullValue = (datatype) => {\n const fieldType = getFieldType(datatype);\n if (fieldType === Array) {\n return [];\n } else if (fieldType === Boolean) {\n return false;\n } else if (fieldType === String) {\n return \"\";\n } else if (fieldType === Number) {\n return \"\";\n } else {\n // normalize to null\n return null;\n }\n};\n","import toPath from \"lodash/toPath.js\";\nimport initial from \"lodash/initial.js\";\nimport flow from \"lodash/fp/flow.js\";\nimport takeRight from \"lodash/takeRight.js\";\n\n/**\n * Splits a path in string format into an array.\n */\nexport const splitPath = (string: string) => toPath(string);\n\n/**\n * Joins a path in array format into a string.\n */\nexport const joinPath = (array: Array<string | number>): string =>\n array.reduce<string>(\n (string, item) =>\n string +\n (Number.isNaN(Number(item))\n ? `${string === \"\" ? \"\" : \".\"}${item}`\n : `[${item}]`),\n \"\"\n );\n\n/**\n * Retrieves parent path from the given one.\n *\n * @param {String} string\n * Path in string format\n * @return {String}\n */\nexport const getParentPath = flow(splitPath, initial, joinPath);\n\n/**\n * Removes prefix from the given paths.\n *\n * @param {String} prefix\n * @param {String[]} paths\n * @return {String[]}\n */\nexport const removePrefix = (\n prefix: string,\n paths: Array<string>\n): Array<string> => {\n const explodedPrefix = splitPath(prefix);\n return paths.map((path) => {\n if (path === prefix) {\n return path;\n }\n const explodedPath = splitPath(path);\n const explodedSuffix = takeRight(\n explodedPath,\n explodedPath.length - explodedPrefix.length\n );\n return joinPath(explodedSuffix);\n });\n};\n\n/**\n * Filters paths that have the given prefix.\n *\n * @param {String} prefix\n * @param {String[]} paths\n * @return {String[]}\n */\nexport const filterPathsByPrefix = (prefix: string, paths: Array<string>) =>\n paths.filter(\n (path) =>\n path === prefix ||\n path.startsWith(`${prefix}.`) ||\n path.startsWith(`${prefix}[`)\n );\n","import React, { useContext } from \"react\";\n\ninterface FormContextValue {\n addToDeletedValues: Function;\n addToFailureForm: Function;\n addToSubmitForm: Function;\n addToSuccessForm: Function;\n clearForm: Function;\n clearFormCallbacks: Function;\n clearFieldErrors: Function;\n currentValues: object;\n deletedValues: Array<any>;\n errors: Array<any>;\n getDocument: Function;\n getLabel: (fieldName: string, fieldLocale?: string) => string;\n initialDocument: object;\n isChanged: boolean;\n refetchForm: Function;\n // TODO: we deprecate this, it doesn't make sense to allow a child to setState this way\n // setFormState: Function;\n // FIXME: this type doesn't work, it doesn't necessarily have the event + it has to be defined\n submitForm: Function; //React.HTMLAttributes<HTMLFormElement>[\"onSubmit\"];\n throwError: Function;\n updateCurrentValues: Function;\n}\n\nexport const FormContext =\n React.createContext<FormContextValue | undefined>(undefined);\n\nexport const useFormContext = () => {\n const formContext = useContext(FormContext);\n if (!formContext)\n throw new Error(\n \"A component is trying to access form context but it is undefined. Please wrap your component with a <Form>.\"\n );\n return formContext;\n};\n","/**\n * Field processing functions that computes groups and add relevant props for i18n\n */\nimport { formProperties } from \"../../utils/schema_utils\";\nimport { FieldGroup } from \"@vulcanjs/schema\";\nimport { FormField } from \"../../typings\";\nimport { FormProps, FormState } from \"./typings\";\n\n/**\n * Field related functions\n */\n\nimport { VulcanSchema } from \"@vulcanjs/schema\";\nimport uniq from \"lodash/uniq.js\";\nimport compact from \"lodash/compact.js\";\nimport get from \"lodash/get.js\";\nimport pick from \"lodash/pick.js\";\nimport {\n isIntlField,\n formatLabel,\n getIntlKeys,\n getIntlLabel,\n} from \"@vulcanjs/i18n\";\n\nimport { IntlProviderContextValue } from \"@vulcanjs/react-i18n\";\nimport map from \"lodash/map.js\";\nimport sortBy from \"lodash/sortBy.js\";\nimport uniqBy from \"lodash/uniqBy.js\";\nimport difference from \"lodash/difference.js\";\nimport reject from \"lodash/reject.js\";\nimport intersection from \"lodash/intersection.js\";\nimport _filter from \"lodash/filter.js\";\nimport { capitalize } from \"@vulcanjs/utils\";\nimport { VulcanFieldSchema } from \"@vulcanjs/schema\";\nimport { VulcanModel } from \"@vulcanjs/model\";\n\n/*\n\n Get a field's intl keys (useful for debugging)\n\n */\nconst getModelIntlKeys = (\n model: VulcanModel,\n flatSchema: any,\n fieldName: string\n) => {\n return getIntlKeys({\n fieldName: fieldName,\n modelName: model.name,\n schema: flatSchema,\n });\n};\n\n/*\n\n Get a field's label\n\n */\nexport const getLabel = (\n model: VulcanModel,\n flatSchema: any,\n context: IntlProviderContextValue,\n fieldName: string,\n fieldLocale?: string\n) => {\n const collectionName = model.name.toLowerCase();\n const label = formatLabel({\n intl: context,\n fieldName: fieldName,\n collectionName: collectionName,\n schema: flatSchema,\n });\n if (fieldLocale) {\n const intlFieldLocale = context.formatMessage({\n id: `locales.${fieldLocale}`,\n defaultMessage: fieldLocale,\n });\n return `${label} (${intlFieldLocale})`;\n } else {\n return label;\n }\n};\n\n/*\n\n Get a field's description\n\n (Same as getLabel but pass isDescription: true )\n */\nconst getDescription = (\n model: VulcanModel,\n flatSchema: any,\n context: any,\n fieldName: string\n) => {\n const collectionName = model.name.toLowerCase();\n const description = getIntlLabel({\n intl: context,\n fieldName: fieldName,\n collectionName: collectionName,\n schema: flatSchema,\n isDescription: true,\n });\n return description || null;\n};\n\n/*\n\n Get a field option's label\n\n */\nconst getOptionLabel = (\n model: VulcanModel,\n context: { formatMessage: Function },\n fieldName: string,\n option: { intlId?: string; label: string; value?: any }\n) => {\n const collectionName = model.name.toLowerCase();\n const intlId =\n option.intlId || `${collectionName}.${fieldName}.${option.value}`;\n return context.formatMessage({\n id: intlId,\n defaultMessage: option.label,\n });\n};\n\n/*\n\n Get a list of the fields to be included in the current form\n\n Note: when submitting the form (getData()), do not include any extra fields.\n\n */\nexport const getFieldNames = (\n props: Pick<FormProps, \"fields\" | \"addFields\" | \"removeFields\">,\n currentDocument,\n optionsFromArgs: {\n excludeHiddenFields?: boolean;\n excludeRemovedFields?: boolean;\n replaceIntlFields?: boolean;\n addExtraFields?: boolean;\n schema?: VulcanSchema;\n mutableFields?: Array<any>;\n }\n) => {\n const { fields, addFields, removeFields } = props;\n const defaultOptions = {\n excludeHiddenFields: true,\n excludeRemovedFields: true,\n replaceIntlFields: false,\n addExtraFields: false,\n };\n const options = {\n ...defaultOptions,\n ...optionsFromArgs,\n };\n const {\n schema,\n mutableFields,\n excludeRemovedFields,\n excludeHiddenFields,\n addExtraFields,\n replaceIntlFields,\n } = options;\n\n // get all editable/insertable fields (depending on current form type)\n let relevantFields = mutableFields;\n\n // if \"fields\" prop is specified, restrict list of fields to it\n if (typeof fields !== \"undefined\" && fields.length > 0) {\n relevantFields = intersection(relevantFields, fields);\n }\n\n // if \"hideFields\" prop is specified, remove its fields\n if (excludeRemovedFields) {\n // OpenCRUD backwards compatibility\n //const removeFields = removeFields || hideFields;\n if (typeof removeFields !== \"undefined\" && removeFields.length > 0) {\n relevantFields = difference(relevantFields, removeFields);\n }\n }\n\n // if \"addFields\" prop is specified, add its fields\n if (\n addExtraFields &&\n typeof addFields !== \"undefined\" &&\n addFields.length > 0\n ) {\n relevantFields = relevantFields?.concat(addFields);\n }\n\n // remove all hidden fields\n if (excludeHiddenFields) {\n const document = currentDocument;\n relevantFields = reject(relevantFields, (fieldName) => {\n const hidden = schema?.[fieldName].hidden;\n return typeof hidden === \"function\"\n ? hidden({ props, document })\n : hidden;\n });\n }\n\n // replace intl fields\n if (replaceIntlFields) {\n relevantFields = relevantFields?.map((fieldName) =>\n isIntlField(schema?.[fieldName]) ? `${fieldName}_intl` : fieldName\n );\n }\n\n // remove any duplicates\n relevantFields = uniq(relevantFields);\n\n return relevantFields;\n};\n\n// --------------------------------------------------------------------- //\n// -------------------------------- Fields ----------------------------- //\n// --------------------------------------------------------------------- //\n\nconst initField = (\n props: { model: VulcanModel; layout?: \"horizontal\" | \"vertical\" },\n state: Pick<FormState, \"currentDocument\" | \"flatSchema\" | \"originalSchema\">,\n context: any,\n fieldName: string,\n fieldSchema: VulcanFieldSchema\n) => {\n const { model } = props;\n const { currentDocument, flatSchema } = state;\n const isArray = fieldSchema.type === Array;\n\n // intialize properties\n let field: Partial<FormField> = {\n ...pick(fieldSchema, formProperties),\n name: fieldName,\n datatype: fieldSchema.type,\n layout: props.layout, // A layout property used to control how the form fields are displayed. Defaults to horizontal.\n input: fieldSchema.input || fieldSchema.control, // TODO\n };\n\n // if this is an array field also store its array item type\n if (isArray) {\n const itemFieldSchema = state.originalSchema[`${fieldName}.$`];\n field.itemDatatype = get(itemFieldSchema, \"type.0.type\");\n }\n\n field.label = getLabel(model, flatSchema, context, fieldName);\n field.intlKeys = getIntlKeys({\n fieldName,\n modelName: model.name,\n schema: model.schema,\n });\n // // replace value by prefilled value if value is empty\n // const prefill = fieldSchema.prefill || (fieldSchema.form && fieldSchema.form.prefill);\n // if (prefill) {\n // const prefilledValue = typeof prefill === 'function' ? prefill.call(fieldSchema) : prefill;\n // if (!!prefilledValue && !field.value) {\n // field.prefilledValue = prefilledValue;\n // field.value = prefilledValue;\n // }\n // }\n\n const document = currentDocument;\n field.document = document;\n\n // internationalize field options labels\n if (field.options && Array.isArray(field.options)) {\n field.options = field.options.map((option) => ({\n ...option,\n label: getOptionLabel(model, context, fieldName, option),\n }));\n }\n\n // if this an intl'd field, use a special intlInput\n if (isIntlField(fieldSchema)) {\n field.intlInput = true;\n }\n\n // add any properties specified in fieldSchema.form as extra props passed on\n // to the form component, calling them if they are functions\n const inputProperties = fieldSchema.form || fieldSchema.inputProperties || {};\n for (const prop in inputProperties) {\n const property = inputProperties[prop];\n field[prop] =\n typeof property === \"function\"\n ? property.call(fieldSchema, {\n ...props,\n fieldName,\n document,\n intl: context,\n })\n : property;\n }\n\n // add description as help prop\n const description = getDescription(model, flatSchema, context, fieldName);\n if (description) {\n field.help = description;\n }\n\n return field as FormField;\n};\nconst handleFieldPath = (\n field: FormField,\n fieldName: string,\n parentPath?: string\n) => {\n const fieldPath = parentPath ? `${parentPath}.${fieldName}` : fieldName;\n field.path = fieldPath;\n // TODO: reintroduce this side effect to correctly set the default values\n // (previously was in Form.tsx)\n // Note sure if this is actually needed\n // if (field.defaultValue) {\n // set(this.defaultValues, fieldPath, field.defaultValue);\n // }\n return field;\n};\nconst handleFieldParent = (field: FormField, parentFieldName?: string) => {\n // if field has a parent field, pass it on\n if (parentFieldName) {\n field.parentFieldName = parentFieldName;\n }\n\n return field;\n};\nconst handlePermissions = (\n field: FormField,\n fieldName: string,\n mutableFields: Array<any>\n) => {\n // if field is not creatable/updatable, disable it\n if (!mutableFields.includes(fieldName)) {\n field.disabled = true;\n }\n return field;\n};\nconst handleFieldChildren = (\n props: FormProps,\n state: Pick<FormState, \"currentDocument\" | \"flatSchema\" | \"originalSchema\">,\n context: any,\n field: FormField,\n fieldName: string,\n fieldSchema: any, // TODO: not a VulcanField, more a FormField\n schema: VulcanSchema,\n mutableFields: Array<any>\n) => {\n const { currentDocument } = state;\n // array field\n if (fieldSchema.arrayFieldSchema) {\n field.arrayFieldSchema = fieldSchema.arrayFieldSchema;\n // create a field that can be exploited by the form\n field.arrayField = createArraySubField(\n props,\n state,\n context,\n fieldName,\n field.arrayFieldSchema,\n schema,\n mutableFields\n );\n //field.nestedInput = true\n }\n // nested fields: set input to \"nested\"\n if (fieldSchema.schema) {\n field.nestedSchema = fieldSchema.schema;\n field.nestedInput = true;\n\n // get nested schema\n // for each nested field, get field object by calling createField recursively\n field.nestedFields = getFieldNames(props, currentDocument, {\n schema: field.nestedSchema,\n addExtraFields: false,\n }).map((subFieldName) => {\n return createField(\n props,\n state,\n context,\n subFieldName,\n field.nestedSchema,\n mutableFields,\n fieldName,\n field.path\n );\n });\n }\n return field;\n};\n\n/*\n Given a field's name, the containing schema, and parent, create the\n complete field object to be passed to the component\n\n */\nconst createField = (\n props: FormProps,\n state: Pick<FormState, \"currentDocument\" | \"flatSchema\" | \"originalSchema\">,\n context: any,\n fieldName: string,\n schema: any,\n mutableFields: Array<any>,\n parentFieldName?: string,\n parentPath?: string\n): FormField => {\n const fieldSchema = schema[fieldName];\n let field = initField(props, state, context, fieldName, fieldSchema);\n field = handleFieldPath(field, fieldName, parentPath);\n field = handleFieldParent(field, parentFieldName);\n field = handlePermissions(field, fieldName, mutableFields);\n field = handleFieldChildren(\n props,\n state,\n context,\n field,\n fieldName,\n fieldSchema,\n schema,\n mutableFields\n );\n return field;\n};\nconst createArraySubField = (\n props: FormProps,\n state: Pick<FormState, \"currentDocument\" | \"flatSchema\" | \"originalSchema\">,\n context: any,\n fieldName: string,\n subFieldSchema: VulcanFieldSchema,\n schema: VulcanSchema,\n mutableFields: Array<string>\n) => {\n const subFieldName = `${fieldName}.$`;\n let subField = initField(props, state, context, subFieldName, subFieldSchema);\n // array subfield has the same path and permissions as its parent\n // so we use parent name (fieldName) and not subfieldName\n subField = handleFieldPath(subField, fieldName);\n subField = handlePermissions(subField, fieldName, mutableFields /*schema*/);\n // we do not allow nesting yet\n //subField = this.handleFieldChildren(field, fieldSchema)\n return subField;\n};\n\n// Group of multiple fields (obtained by parsing the whole schema)\ninterface GroupWithFields extends FieldGroup {\n fields: Array<FormField>;\n}\n\ntype FormSchemaState = Pick<\n FormState,\n \"currentDocument\" | \"schema\" | \"flatSchema\" | \"originalSchema\"\n>;\n\n/*\n\n Get all field groups\n\n */\nexport const getFieldGroups = (\n props: FormProps,\n state: FormSchemaState,\n context: IntlProviderContextValue,\n mutableFields: Array<string>,\n formatMessage: any\n) => {\n const { schema, currentDocument } = state;\n // build fields array by iterating over the list of field names\n let fields = getFieldNames(props, currentDocument, {\n mutableFields,\n schema,\n }).map((fieldName) => {\n // get schema for the current field\n return createField(props, state, context, fieldName, schema, mutableFields);\n });\n\n fields = sortBy(fields, \"order\");\n\n // get list of all unique groups (based on their name) used in current fields, remove \"empty\" group\n let groups = compact(uniqBy(map(fields, \"group\"), (g) => (g ? g.name : \"\")));\n\n // for each group, add relevant fields\n let groupsWithFields = groups.map((group) => {\n const label =\n group.label ||\n //this.context.formatMessage({ id: group.name }) ||\n capitalize(group.name);\n const groupFields = _filter<FormField>(fields, (field) => {\n return field.group && field.group.name === group.name;\n });\n const groupWithFields: GroupWithFields = {\n ...group,\n label,\n fields: groupFields,\n };\n return groupWithFields;\n });\n\n // add default group if necessary\n const defaultGroupFields = _filter(fields, (field) => !field.group);\n if (defaultGroupFields.length) {\n const defaultGroup: GroupWithFields = {\n name: \"default\",\n label: \"default\",\n order: 0,\n fields: defaultGroupFields,\n };\n groupsWithFields = [defaultGroup].concat(groupsWithFields);\n }\n\n // sort by order\n groupsWithFields = sortBy(groupsWithFields, \"order\");\n\n // console.log(groups);\n\n return groupsWithFields;\n};\n","import find from \"lodash/find.js\";\nimport isEqualWith from \"lodash/isEqualWith.js\";\nexport const isNotSameDocument = (initialDocument, changedDocument) => {\n const changedValue = find(changedDocument, (value, key, collection) => {\n return !isEqualWith(value, initialDocument[key], (objValue, othValue) => {\n if (!objValue && !othValue) return true;\n });\n });\n return typeof changedValue !== \"undefined\";\n};\n","export * from \"./useWarnOnUnsaved\";\n","import { useBlockTransition } from \"../useBlockTransition/useBlockTransition\";\nimport debug from \"debug\";\nimport { useIntlContext } from \"@vulcanjs/react-i18n\";\nconst debugTransitions = debug(\"vn:route-transitions\");\n\n/**\n * Can trigger an alert on unsaved changes\n *\n * Triggers event so you can also block SPA transition (implementation is NOT provided by this hook, you\n * need listeners whose implementation depends on your router (React Router, Next Router...), see block.ts)\n *\n * @see https://github.com/ReactTraining/history/blob/master/docs/blocking-transitions.md\n *\n * @param param0\n */\nexport const useWarnOnUnsaved = ({\n isChanged,\n warnUnsavedChanges,\n}: {\n isChanged: boolean;\n warnUnsavedChanges?: boolean;\n}) => {\n const context = useIntlContext();\n /**\n * To be passed to onbeforeunload event. The returned message will be displayed\n * by the prompt.\n *\n * see https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onbeforeunload\n * the message returned is actually ignored by most browsers and a default message 'Are you sure you want to leave this page? You might have unsaved changes' is displayed. See the Notes section on the mozilla docs above\n */\n const getBlockedMessage = (event?: BeforeUnloadEvent) => {\n debugTransitions(\"running handlePageLeave\", event);\n const message = context.formatMessage({\n id: \"forms.confirm_discard\",\n defaultMessage: \"Are you sure you want to discard your changes?\",\n });\n return message;\n };\n useBlockTransition({\n shouldBlock: !!(warnUnsavedChanges && isChanged),\n getBlockedMessage: getBlockedMessage,\n });\n};\n","import { useEffect, useRef } from \"react\";\nimport { block } from \"./block\";\nimport debug from \"debug\";\nconst debugTransitions = debug(\"vn:router-transitions\");\n\n/**\n * Can trigger an alert on unsaved changes\n *\n * Triggers event so you can also block SPA transition (implementation is NOT provided by this hook, you\n * need listeners whose implementation depends on your router (React Router, Next Router...), see block.ts)\n *\n * @see https://github.com/ReactTraining/history/blob/master/docs/blocking-transitions.md\n *\n * @param param0\n */\nexport const useBlockTransition = ({\n shouldBlock,\n getBlockedMessage,\n}: {\n shouldBlock: boolean;\n getBlockedMessage: (evt?: BeforeUnloadEvent) => string;\n}) => {\n // function to unblock the form\n const unblockRef = useRef<Function | undefined>();\n\n useEffect(() => {\n const isBlocking = !!unblockRef.current;\n debugTransitions(\n \"running effect\",\n \"should block\",\n shouldBlock,\n \"currently blocked\",\n isBlocking\n );\n\n const onUnblock = () => {\n debugTransitions(\"running unblock from effect\");\n if (!shouldBlock) {\n if (unblockRef.current) {\n unblockRef.current();\n }\n }\n };\n // block\n const onBlocked = (evt?: BeforeUnloadEvent): string => {\n const message = getBlockedMessage(evt);\n debugTransitions(\n \"user is being blocked after trying to leave the page, with message: \" +\n message\n );\n if (evt) {\n evt.returnValue = message;\n }\n return message;\n };\n if (shouldBlock) {\n debugTransitions(\n \"should block transition, setting up relevant event listener\"\n );\n unblockRef.current = block(onBlocked, onUnblock);\n }\n // unblock if not blocking anymore and was blocking previously\n if (!shouldBlock && isBlocking) {\n debugTransitions(\"should unblock (state has been reinitialized)\");\n if (unblockRef.current) {\n unblockRef.current();\n }\n }\n // trigger the potentially registered unblock function when component unmounts\n //return onUnblock;\n }, [shouldBlock]);\n};\n","import debug from \"debug\";\nconst debugTransitions = debug(\"vn:route-transition\");\nconst BeforeUnloadEventType = \"beforeunload\";\n/**\n * Event triggered when a warning on unsaved changes is necessary\n * The app should listen for this event to setup relevant blocking methods depending on the framework\n *\n * For instance with React Router:\n *\n * let unblock\n * window.addEventListener(\"blocktransition\", () => {\n * unblock = router.history.block(...)\n * })\n * window.addEventListener(\"unblocktransition\", () => {\n * unblock()\n * })\n *\n * For Next.js, you would do something similar\n * Check https://github.com/vercel/next.js/discussions/12348\n *\n */\nexport const BLOCK_TRANSITION_EVENT_TYPE = \"blocktransition\";\n/**\n * Called when blocking is not necessary anymore:\n * - there are no unsaved changes anymore\n * - user has confirmed they want to leave\n */\nexport const UNBLOCK_TRANSITION_EVENT_TYPE = \"unblocktransition\";\n/**\n * Intercepts the beforeunload event\n *\n * Code taken from React Router history feature\n * @see https://github.com/ReactTraining/history/blob/master/docs/blocking-transitions.md\n */\nfunction blockBeforeUnload(event: BeforeUnloadEvent) {\n // Cancel the event.\n event.preventDefault();\n // Chrome (and legacy IE) requires returnValue to be set.\n event.returnValue = \"\";\n}\n\n/**\n * Blocks transition\n *\n * /!\\ In order to catch SPA transition, you need to implement\n * an event listener in your own app.\n *\n *\n * @param onUnblock Callback to call on unblock, for custom behaviour\n * @returns A function to unblock the transition (eg if the form is back to\n * its original state)\n */\nexport const block = (\n setConfirmationMessage: (event?: BeforeUnloadEvent) => string,\n onUnblock?: Function\n) => {\n debugTransitions(\"running block function\");\n // trigger a block event, to be handled at the framework level\n // TODO: setConfirmationMessage should be passed as well\n const blockEvent = new Event(BLOCK_TRANSITION_EVENT_TYPE);\n window.dispatchEvent(blockEvent);\n // block at browser level\n window.addEventListener(BeforeUnloadEventType, blockBeforeUnload);\n window.addEventListener(BeforeUnloadEventType, setConfirmationMessage);\n // return an unblock function to cancel\n const unblock = () => {\n debugTransitions(\"running unblock function\");\n if (onUnblock) {\n debugTransitions(\"running user defined function\");\n onUnblock(); // callback from user land\n }\n // trigger an unblock event, to be handled at the framework level\n const unblockEvent = new Event(UNBLOCK_TRANSITION_EVENT_TYPE);\n window.dispatchEvent(unblockEvent);\n // remove the browser level events\n window.removeEventListener(BeforeUnloadEventType, blockBeforeUnload);\n window.removeEventListener(BeforeUnloadEventType, setConfirmationMessage);\n // unblock browser change\n // @ts-ignore\n window.onbeforeunload = undefined; //undefined instead of null to support IE\n };\n return unblock;\n};\n","import type {\n CreateVariables,\n UpdateVariables,\n DeleteVariables,\n} from \"@vulcanjs/crud\";\nimport { VulcanModel } from \"@vulcanjs/model\";\nimport { VulcanUser } from \"@vulcanjs/permissions\";\nimport { VulcanSchema } from \"@vulcanjs/schema\";\nimport { DocumentNode } from \"graphql\";\n\nexport interface FormState {\n schema: any;\n initialDocument: Object;\n currentDocument: Object;\n deletedValues: any;\n errors: any;\n currentValues: any;\n disabled: any;\n success?: any;\n flatSchema: any;\n originalSchema: any;\n}\n\n/**\n * Props that can be passed to the FormContainer (= SmartForm)\n * and will be passed down to the Form\n *\n * TODO: this might not be complete yet. We need to move relevant props from \"FormProps\" to this type,\n * based on current usage of the SmartForm in existing apps\n */\nexport interface PassedDownFormProps {\n itemProperties?: Object;\n showDelete?: boolean;\n /**\n * Disable the form\n */\n disabled?: boolean;\n /**\n * Will prevent leaving the page/unmounting the form on unsaved changes\n */\n warnUnsavedChanges?: boolean;\n /*A callback called on form submission on the form data. Can return the submitted data object as well.*/\n submitCallback?: (data) => any;\n /*A callback called on mutation success.*/\n successCallback?: (document, meta: { form: any }) => void;\n /*A callback called on mutation failure.*/\n errorCallback?: (document, error, meta: { form: any }) => void;\n\n // Fragments\n /**\n * A GraphQL fragment used to specify the data to fetch to populate edit forms.\n * If no fragment is passed, SmartForm will do its best to figure out what data to load based on the fields included in the form.\n *\n * Can be either a string or a DocumentNode (using \"gql\" tag)\n */\n queryFragment?: DocumentNode | string;\n /**\n * A GraphQL fragment used to specify the data to return once a mutation is complete.\n\nIf no fragment is passed, SmartForm will only return fields used in the form, but note that this might sometimes lead to discrepancies when compared with documents already loaded on the client.\n\nAn example would be a createdAt date added automatically on creation even though it’s not part of the actual form. If you’d like that field to be returned after the mutation, you can define a custom mutationFragment that includes it explicitly.\n\n * Can be either a string or a DocumentNode (using \"gql\" tag)\n*/\n mutationFragment?: DocumentNode | string;\n /** Force a query fragment name\n *\n * NOTE: needed only for string fragments\n * If you use a DocumentNode (with \"gql\" tag), it will be computed automatically\n *\n * @deprecated Prefer using DocumentNode fragment, using the gql tag\n */\n queryFragmentName?: string;\n /** Force a mutation fragment name\n *\n *NOTE: needed only for string fragments\n *If you use a DocumentNode (with \"gql\" tag), it will be computed automatically\n *\n * @deprecated Prefer using DocumentNode fragment, using the gql tag\n */\n mutationFragmentName?: string;\n}\n\nexport interface FormProps<TModel = { [key in string]: any }>\n extends PassedDownFormProps {\n /**\n * Function that retriggers data fetching in edit mode\n * Usually provided by the useSingle but could be any function\n */\n refetch?: () => void;\n /**\n * Document id in update mode\n */\n id?: string;\n /* The model in which to edit or insert a document. */\n model: VulcanModel;\n /** Passing directly a raw schema (TODO: model is still mandatory atm) */\n schema?: VulcanSchema;\n /**\n * Passing directly a document (TODO: not yet tested in the new version)\n */\n document?: any;\n /**\n * currentUser to check authorizations to update/create some fields\n */\n currentUser?: VulcanUser;\n addFields?: Array<string>;\n removeFields?: Array<string>;\n // deprecated\n //hideFields?: any;\n /**\n * Label so that graphql queries are contextualized\n */\n contextName?: string;\n // labels\n cancelLabel?: string;\n revertLabel?: string;\n //\n revertCallback?: Function;\n // TODO: probably should be removed\n successComponent?: any;\n /* Instead of passing collection you can pass the name of the collection.*/\n // collectionName?: string;\n /*If present, the document to edit. If not present, the form will be a “new document” form.*/\n documentId?: string;\n /*An array of field names, if you want to restrict the form to a specific set of fields.*/\n fields?: Array<keyof TModel>;\n /*The text inside the submit button of the form.*/\n submitLabel?: string;\n /*A layout property used to control how the form fields are displayed. Defaults to horizontal.*/\n layout?: \"horizontal\" | \"vertical\";\n /*Whether to show a “delete document” link on edit forms.*/\n showRemove?: boolean;\n /*A set of props used to prefill the form. */\n prefilledProps?: TModel & Object; // TODO: should it allow only fields from the Model or also additional fields?\n /*Whether to repeat validation errors at the bottom of the form.*/\n repeatErrors?: boolean;\n //Callbacks\n /** Callback ran on first render */\n initCallback?: Function;\n /*If a cancelCallback function is provided, a “cancel” link will be shown next to the form’s submit button and the callback will be called on click.*/\n cancelCallback?: (document) => void;\n /*A callback to call when a document is successfully removed (deleted).*/\n removeSuccessCallback?: (document) => void;\n\n /*A callback called a every change or blur event inside the form.*/\n changeCallback: (currentDocument) => void;\n\n // mutations from container\n // => replace the \"onSubmit\" of a normal form\n /**\n * The result is usually extracted from a graphql mutation\n * But we have a simplified abstracted API, so we could also use the Form without graphql\n */\n createDocument: <TModel = any>(\n createVars: CreateVariables\n ) => Promise<CreateDocumentResult<TModel>>;\n updateDocument: <TModel = any>(\n vars: UpdateVariables\n ) => Promise<UpdateDocumentResult<TModel>>;\n deleteDocument: (vars: DeleteVariables) => Promise<void>;\n // Other results from the Apollo query => should be ignored, in order to avoid dependency to graphql in the Form\n // instead the container is responsible for passing errors and stuff\n // createDocumentMeta?: { error?: any };\n // updateDocumentMeta?: { error?: any };\n // EXPERIMENTAL: allowing to manually set the form children\n children?: React.ReactNode;\n}\n\nexport interface CreateDocumentResult<TDocument = any> {\n document: TDocument;\n errors: Array<any>;\n}\n\nexport interface UpdateDocumentResult<TDocument = any> {\n document: TDocument;\n errors: Array<any>;\n}\n","export * from \"./Provider\";\nexport * from \"./Context\";\nexport * from \"./Consumer\";\nexport * from \"./typings\";\n","/**\n * NOTE: KEEP SEPARATED FROM THE HOOKS TO CONSUME THE CONTEXT\n * otherwise you'll end up with circular dependencies because of the default components\n */\n// TODO: we might need to adapt the provider to merge its value with a potentially higher up context\nimport React from \"react\";\n\nimport { defaultVulcanComponents } from \"./defaultVulcanComponents\";\nimport { PossibleVulcanComponents } from \"./typings\";\nimport { VulcanComponentsContext } from \"./Context\";\nimport { useVulcanComponents } from \"./Consumer\";\nimport { debugVulcan } from \"@vulcanjs/utils\";\nconst debugComponents = debugVulcan(\"components\"); //console.log;\n\n/**\n *\n * @param options.value An object of Vulcan components to be overriden.\n */\nexport const VulcanComponentsProvider = ({\n value,\n ...props\n}: {\n value?: Partial<PossibleVulcanComponents>;\n children: React.ReactNode;\n}) => {\n const currentComponents = useVulcanComponents();\n debugComponents(\n \"Current components __not_initialized?\",\n currentComponents.__not_initialized\n );\n const mergedComponents = {\n ...defaultVulcanComponents,\n // merge with a parent Provider if needed\n ...(currentComponents?.__not_initialized ? {} : currentComponents || {}),\n ...(value || {}),\n };\n debugComponents(\"Merged components\", mergedComponents);\n // For preserving displayName, that is lost after build somehow\n Object.keys(mergedComponents).forEach((componentName) => {\n if (mergedComponents[componentName]) {\n mergedComponents[componentName].displayName = \"Vulcan.\" + componentName;\n } else {\n console.warn(`Encountered an undefined component: ${componentName}.\n The component may not be registered, or import failed.\n For instance due to an infinite import loop when importing\n \"useVulcanComponents\" from index instead of Consumer.`);\n }\n });\n return (\n <VulcanComponentsContext.Provider\n value={mergedComponents} // merge provided components so the user can provide only a partial replacement\n {...props}\n />\n );\n};\n","export { defaultFormComponents } from \"./formComponents\";\nexport { defaultDatatableComponents } from \"./datatableComponents\";\nexport { defaultCellComponents } from \"./cellComponents\";\nexport { defaultCoreComponents } from \"./coreComponents\";\n\nimport { defaultFormComponents } from \"./formComponents\";\nimport { defaultDatatableComponents } from \"./datatableComponents\";\nimport { defaultCellComponents } from \"./cellComponents\";\nimport { defaultCoreComponents } from \"./coreComponents\";\n\n/**\n * @deprecated 0.6.1\n * Use each type of components instead of loading all of them at once\n * This will avoid loading form and datatable components, that are very heavy, on every page\n * even when they are anot actually used\n */\nexport const defaultVulcanComponents = {\n ...defaultDatatableComponents,\n ...defaultCellComponents,\n ...defaultCoreComponents,\n ...defaultFormComponents,\n};\n","import type { PossibleFormComponents } from \"../typings\";\nimport {\n FormError,\n FormErrors,\n FormSubmit,\n FormLayout,\n FormElement,\n FieldErrors,\n} from \"../../form/elements\";\n// TODO: currently we need the default export because we pass components manually\nimport {\n FormContainer,\n FormComponent,\n FormComponentInner,\n FormComponentLoader,\n} from \"../../form/core/index\";\nimport { Form } from \"../../form/core/Form\";\nimport {\n FormGroup,\n FormGroupLayout,\n FormGroupHeader,\n} from \"../../form/core/FormGroup\";\nimport {\n FormIntl,\n FormIntlItemLayout,\n FormIntlLayout,\n} from \"../../form/intl/FormIntl\";\nimport {\n FormNestedArray,\n FormNestedArrayInnerLayout,\n IconAdd,\n IconRemove,\n //\n FormNestedDivider,\n //\n FormNestedArrayLayout,\n //\n FormNestedItem,\n FormNestedItemLayout,\n //\n FormNestedObject,\n FormNestedObjectLayout,\n} from \"../../form/nested\";\n\nimport {\n FormComponentDefault,\n FormComponentPassword,\n FormComponentNumber,\n FormComponentUrl,\n FormComponentEmail,\n FormComponentCheckbox,\n FormComponentTextarea,\n FormComponentSelect,\n FormComponentSelectMultiple,\n FormComponentDateTime,\n FormComponentDate,\n FormComponentTime,\n FormComponentStaticText,\n FormComponentLikert,\n FormComponentAutocomplete,\n FormComponentCheckboxGroup,\n FormComponentRadioGroup,\n // input utilities\n FormItem,\n FormOptionLabel,\n //\n AutocompleteMultiple,\n} from \"../../form/inputs\";\n\nexport const defaultFormComponents: PossibleFormComponents = {\n FormError, // used by: FieldErrors\n // To be defined by the UI framework\n // TODO: add defaults in React components\n FormComponentDefault,\n FormComponentText: FormComponentDefault,\n FormComponentPassword,\n FormComponentNumber,\n FormComponentUrl,\n FormComponentEmail,\n FormComponentTextarea,\n FormComponentCheckbox,\n FormComponentCheckboxGroup,\n FormComponentRadioGroup,\n FormComponentSelect,\n FormComponentSelectMultiple,\n FormComponentDateTime,\n FormComponentDate,\n //FormComponentDate2,\n FormComponentTime,\n FormComponentStaticText,\n FormComponentLikert,\n //FormComponentAutocomplete,\n //FormComponentMultiAutocomplete,\n // Components defined in default vulcan/forms\n FormComponent,\n FormComponentInner,\n FormComponentLoader,\n FormElement,\n FormGroup,\n FormGroupLayout,\n FormGroupHeader,\n FormIntl,\n FormIntlItemLayout,\n FormIntlLayout,\n\n // Layout\n FieldErrors,\n FormErrors,\n FormSubmit,\n FormLayout,\n\n FormNestedArray,\n FormNestedArrayInnerLayout,\n FormNestedArrayLayout,\n FormNestedItem,\n IconAdd,\n IconRemove,\n FormNestedDivider,\n // nested item\n FormNestedItemLayout,\n FormNestedObjectLayout,\n FormNestedObject,\n FormOptionLabel,\n //\n Form,\n SmartForm: FormContainer,\n //\n FormItem,\n FormComponentAutocomplete,\n FormComponentMultiAutocomplete: AutocompleteMultiple,\n};\n","export * from \"./FieldErrors\";\nexport * from \"./FormError\";\nexport * from \"./FormErrors\";\nexport * from \"./FormSubmit\";\nexport * from \"./FormLayout\";\nexport * from \"./FormElement\";\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\n\n// Track dependencies, not used yet\nconst formComponentsDependencies = [\"FormError\"];\n\n/**\n * Errors for one specif fields\n * @returns\n */\nexport const FieldErrors = ({\n errors,\n}: {\n /**\n * Errors for this specific field only\n */\n errors: Array<any>;\n}) => {\n const VulcanComponents = useVulcanComponents();\n return (\n <ul className=\"form-input-errors\">\n {errors.map((error, index) => (\n <li key={index}>\n <VulcanComponents.FormError error={error} errorContext=\"field\" />\n </li>\n ))}\n </ul>\n );\n};\n","import React from \"react\";\n// import PropTypes from \"prop-types\";\n// import getContext from 'recompose/getContext';\n// import { Components, registerComponent } from 'meteor/vulcan:core';\nimport get from \"lodash/get.js\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\nimport { useFormContext } from \"../core/FormContext\";\n\nexport const FormError = ({ error, errorContext }) => {\n const VulcanComponents = useVulcanComponents();\n const { getLabel } = useFormContext();\n // use the error or error message as default message\n const defaultMessage = JSON.stringify(error.message || error);\n const id = error.id || \"app.defaultError\";\n\n // default props for all errors\n let messageProps = {\n id,\n defaultMessage,\n values: {\n errorContext,\n defaultMessage,\n },\n };\n\n // additional properties to enhance the message\n if (error.properties) {\n // in case this is a nested fields, only keep last segment of path\n const errorName =\n error.properties.name && error.properties.name.split(\".\").slice(-1)[0];\n messageProps.values = {\n ...messageProps.values,\n // if the error is triggered by a field, get the relevant label\n label: errorName && getLabel(errorName, error.properties.locale),\n ...error.properties,\n };\n }\n\n if (error.data) {\n messageProps.values = {\n ...messageProps.values,\n ...error.data, // backwards compatibility\n };\n }\n\n const exception = get(error, \"extensions.exception\");\n if (exception) {\n messageProps = {\n ...messageProps,\n id: exception.id,\n values: exception.data,\n };\n }\n return <VulcanComponents.FormattedMessage html={true} {...messageProps} />;\n};\n\nFormError.defaultProps = {\n errorContext: \"\", // default context so format message does not complain\n};\n","import React from \"react\";\nimport { useFormContext } from \"../core/FormContext\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\n\n/**\n * Display errors for the current form, based on the context\n */\nexport const FormErrors = () => {\n const VulcanComponents = useVulcanComponents();\n const { errors } = useFormContext();\n\n return (\n <div className=\"form-errors\">\n {!!errors.length && (\n <VulcanComponents.Alert className=\"flash-message\" variant=\"danger\">\n <ul>\n {errors.map((error, index) => (\n <li key={index}>\n <VulcanComponents.FormError error={error} errorContext=\"form\" />\n </li>\n ))}\n </ul>\n </VulcanComponents.Alert>\n )}\n </div>\n );\n};\n\n// /*\n\n// Render errors\n\n// */\n// renderErrors = () => {\n// return (\n// <div className=\"form-errors\">\n// {this.state.errors.map((error, index) => {\n// let message;\n\n// if (error.data && error.data.errors) {\n// // this error is a \"multi-error\" with multiple sub-errors\n\n// message = error.data.errors.map(error => {\n// return {\n// content: this.getErrorMessage(error),\n// data: error.data,\n// };\n// });\n// } else {\n// // this is a regular error\n\n// message = {\n// content:\n// error.message ||\n// this.context.intl.formatMessage({ id: error.id, defaultMessage: error.id }, error.data),\n// };\n// }\n\n// return <Components.FormFlash key={index} message={message} type=\"error\" />;\n// })}\n// </div>\n// );\n// };\n","/**\n * Change compared to Vulcan:\n * - using a model instead of a collectionName\n */\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { canDeleteDocument } from \"@vulcanjs/permissions\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\nimport { useFormContext } from \"../core/FormContext\";\n\nexport interface FormSubmitProps {\n submitLabel: any;\n cancelLabel: any;\n cancelCallback: any;\n revertLabel: any;\n revertCallback: any;\n document: any;\n deleteDocument: any;\n model: any;\n // classes: any,\n currentUser: any;\n}\nexport const FormSubmit = ({\n submitLabel,\n cancelLabel,\n cancelCallback,\n revertLabel,\n revertCallback,\n document,\n deleteDocument,\n model,\n // classes,\n currentUser,\n}) => {\n const VulcanComponents = useVulcanComponents();\n const { clearForm } = useFormContext();\n return (\n <div className=\"form-submit\">\n <VulcanComponents.Button type=\"submit\" variant=\"primary\">\n {submitLabel ? (\n submitLabel\n ) : (\n <VulcanComponents.FormattedMessage\n id=\"forms.submit\"\n defaultMessage=\"Submit\"\n />\n )}\n </VulcanComponents.Button>\n\n {cancelCallback ? (\n <a\n className=\"form-cancel\"\n onClick={(e) => {\n e.preventDefault();\n cancelCallback(document);\n }}\n >\n {cancelLabel ? (\n cancelLabel\n ) : (\n <VulcanComponents.FormattedMessage\n id=\"forms.cancel\"\n defaultMessage=\"Cancel\"\n />\n )}\n </a>\n ) : null}\n\n {revertCallback ? (\n <a\n className=\"form-cancel\"\n onClick={(e) => {\n e.preventDefault();\n clearForm();\n revertCallback(document);\n }}\n >\n {revertLabel ? (\n revertLabel\n ) : (\n <VulcanComponents.FormattedMessage\n id=\"forms.revert\"\n defaultMessage=\"Revert\"\n />\n )}\n </a>\n ) : null}\n\n {deleteDocument &&\n canDeleteDocument({\n user: currentUser,\n document,\n model,\n }) ? (\n <div>\n <hr />\n <VulcanComponents.Button\n variant=\"link\"\n onClick={deleteDocument}\n className={`delete-link ${model.name}-delete-link`}\n >\n <VulcanComponents.Icon name=\"close\" />{\" \"}\n <VulcanComponents.FormattedMessage\n id=\"forms.delete\"\n defaultMessage=\"Delete\"\n />\n </VulcanComponents.Button>\n </div>\n ) : null}\n </div>\n );\n};\n\nFormSubmit.propTypes = {\n submitLabel: PropTypes.node,\n cancelLabel: PropTypes.node,\n cancelCallback: PropTypes.func,\n revertLabel: PropTypes.node,\n revertCallback: PropTypes.func,\n document: PropTypes.object,\n deleteDocument: PropTypes.func,\n collectionName: PropTypes.string,\n classes: PropTypes.object,\n};\n","import React from \"react\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\n\nexport interface FormLayoutProps {\n commonProps: any;\n formProps: any;\n submitProps: any;\n repeatErrors?: boolean;\n}\nexport const FormLayout: React.FC<FormLayoutProps> = ({\n commonProps,\n formProps,\n repeatErrors,\n submitProps,\n children,\n}) => {\n const VulcanComponents = useVulcanComponents();\n return (\n <VulcanComponents.FormElement {...formProps}>\n <VulcanComponents.FormErrors {...commonProps} />\n\n {children}\n\n {repeatErrors && <VulcanComponents.FormErrors {...commonProps} />}\n\n <VulcanComponents.FormSubmit {...commonProps} {...submitProps} />\n </VulcanComponents.FormElement>\n );\n};\n\nexport const formComponentsDependencies = [\n \"FormErrors\",\n \"FormSubmit\",\n \"FormElement\",\n];\n","import React, { HTMLAttributes, PropsWithChildren } from \"react\";\nimport { useFormContext } from \"../core/FormContext\";\n\nexport type FormElementProps = HTMLAttributes<HTMLFormElement>;\n/**\n * The actual wrapper of the form\n */\nexport const FormElement = React.forwardRef<HTMLFormElement>(\n ({ children, ...otherProps }: PropsWithChildren<FormElementProps>, ref) => {\n const { submitForm } = useFormContext();\n return (\n <form\n {...otherProps}\n // @ts-ignore\n onSubmit={submitForm}\n ref={ref}\n >\n {children}\n </form>\n );\n }\n);\n","export * from \"./FormComponent\";\nexport { default as FormComponent } from \"./FormComponent\";\n\nexport * from \"./FormComponentInner\";\nexport * from \"./FormComponentLoader\";\n\nexport * from \"./FormContext\";\nexport * from \"./FormContainer\";\n","/**\n * TODO: rename \"FieldComponent\" to clarify\n * Change compared to Meteor:\n * - custom inputs cannot be a reference anymore, you need to pass the whole component and not just the name\n * - FormComponents context is limited to default component. Other components must be passed through the schema instead\n * (it means you can't extend the SmartForm with new inputType, instead use a fully custom input)\n */\nimport React, { ComponentType, useEffect, useState } from \"react\";\nimport get from \"lodash/get.js\";\nimport SimpleSchema from \"simpl-schema\";\nimport { isEmptyValue, getNullValue } from \"../utils/utils\";\nimport type {\n PossibleFormComponents,\n PossibleVulcanComponents,\n} from \"../../VulcanComponents/typings\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\nimport { FormField } from \"../typings\";\nimport {\n VulcanFieldSchema,\n VulcanFieldInput,\n VulcanFieldType,\n} from \"@vulcanjs/schema\";\nimport { getAutoInputFromType } from \"../inputs/consts\";\nimport { useFormContext } from \"./FormContext\";\n\nconst getCharacterCounts = (value: any, max: number) => {\n const characterCount: number = value && value.length ? value.length : 0;\n return { charsRemaining: max - characterCount, charsCount: characterCount };\n};\n\n/**\n * Get field path, taking intlInput fields into account\n */\nconst getPath = ({\n intlInput,\n path,\n}: {\n intlInput?: boolean;\n path: string;\n}) => {\n return intlInput ? `${path}_intl` : path;\n};\n\nconst getCharacterCountsFromProps = ({\n document,\n max,\n intlInput,\n path,\n}: Pick<FormComponentProps, \"document\" | \"max\" | \"intlInput\" | \"path\">) => {\n if (!max) {\n return null;\n }\n const fieldPath = getPath({ intlInput, path });\n const intlOrRegularValue = document?.[fieldPath];\n const value =\n intlOrRegularValue && typeof intlOrRegularValue === \"object\"\n ? intlOrRegularValue.value\n : intlOrRegularValue;\n return getCharacterCounts(value, max);\n};\n\n// TODO: move to schema helpers\nconst isArrayField = (type: VulcanFieldSchema[\"type\"]) => {\n return type === Array;\n};\n\n// TODO: not up to date\nconst isObjectField = (type: VulcanFieldSchema[\"type\"]) => {\n return type instanceof SimpleSchema;\n};\n\n/*\n\n Get form input type, either based on input props, or by guessing based on form field type\n\n */\nconst getInputName = (fieldType: VulcanFieldType, input?: VulcanFieldInput) => {\n if (input) return input;\n return getAutoInputFromType(fieldType);\n};\n\n/*\n Returns true if the passed input type is a custom\n NOTE: it also accept non-standard name, if you want to add a new type of Input in the context\n */\n/*\nconst isCustomInput = (inputType: VulcanFieldInput) => {\n if (typeof inputType !== \"string\") return true;\n const isStandardInput = allVulcanInputs.includes(inputType);\n return !isStandardInput;\n};\n*/\n\n/*\n\n Function passed to FormComponentInner to help with rendering the component\n\n */\nconst getFormInput = ({\n type,\n input,\n FormComponents,\n}: {\n type: VulcanFieldType;\n input: VulcanFieldInput;\n FormComponents: PossibleFormComponents;\n}): // TODO: we could type the props here, it's an InputComponent to be more precise\nComponentType => {\n // if input is a React component, use it\n // NOTE: does it work with class components?\n if (typeof input === \"function\") {\n const InputComponent = input;\n return InputComponent;\n } else {\n const inputName = getInputName(type, input);\n // else pick a predefined component\n switch (inputName) {\n case \"text\":\n return FormComponents.FormComponentDefault;\n\n case \"password\":\n return FormComponents.FormComponentPassword;\n\n case \"number\":\n return FormComponents.FormComponentNumber;\n\n case \"url\":\n return FormComponents.FormComponentUrl;\n\n case \"email\":\n return FormComponents.FormComponentEmail;\n\n case \"textarea\":\n return FormComponents.FormComponentTextarea;\n\n case \"checkbox\":\n return FormComponents.FormComponentCheckbox;\n\n case \"checkboxgroup\":\n return FormComponents.FormComponentCheckboxGroup;\n\n case \"radiogroup\":\n return FormComponents.FormComponentRadioGroup;\n\n case \"select\":\n return FormComponents.FormComponentSelect;\n\n case \"selectmultiple\":\n return FormComponents.FormComponentSelectMultiple;\n\n case \"datetime\":\n return FormComponents.FormComponentDateTime;\n\n case \"date\":\n return FormComponents.FormComponentDate;\n\n // case \"date2\":\n // return FormComponents.FormComponentDate2;\n\n case \"time\":\n return FormComponents.FormComponentTime;\n\n case \"statictext\":\n return FormComponents.FormComponentStaticText;\n\n case \"likert\":\n return FormComponents.FormComponentLikert;\n\n case \"autocomplete\":\n return FormComponents.FormComponentAutocomplete;\n\n case \"multiautocomplete\":\n return FormComponents.FormComponentMultiAutocomplete;\n\n default:\n // @see https://github.com/VulcanJS/vulcan-npm/pull/31 discussions about custom components support from the context\n throw new Error(\n `Input name \"${inputName}\" is not a standard Vulcan form input (type: ${type}, input: ${input})`\n );\n }\n }\n};\n\nexport type FormOption<TField = any> = {\n label: string;\n value: TField;\n /** Can force a default value */\n checked?: boolean;\n};\n\nexport interface FormComponentProps<TField = any>\n extends Omit<FormField, \"type\"> {\n document: any;\n datatype: VulcanFieldType; // TODO: type of the field, replace this by a cleaner value like we do in graphql to get the field type\n disabled: boolean;\n errors: Array<any>;\n /** Help text for the form */\n help?: string;\n /** Path of the field if nested */\n path: string;\n defaultValue?: TField;\n max?: number;\n locale?: string;\n /** Input for this field */\n input?: VulcanFieldInput | string | React.Component;\n formType: \"new\" | \"edit\"; // new or edit\n intlInput?: boolean;\n nestedInput?: boolean;\n /** Graphql query you can pass to fetch the options asynchronously */\n query?: string;\n options?: Array<FormOption> | ((fciProps?: any) => Array<FormOption>);\n vulcanComponents?: PossibleVulcanComponents;\n}\n/**\n * Component for the display of any field of the form\n */\nexport const FormComponent = (props: FormComponentProps) => {\n /*\n TODO: replace with a useMemo\n shouldComponentUpdate(nextProps, nextState) {\n // allow custom controls to determine if they should update\n if (this.isCustomInput(this.getInputType(nextProps))) {\n return true;\n }\n\n const { document, deletedValues, errors } = nextProps;\n const path = getPath(this.props);\n\n // when checking for deleted values, both current path ('foo') and child path ('foo.0.bar') should trigger updates\n const includesPathOrChildren = (deletedValues) =>\n deletedValues.some((deletedPath) => deletedPath.includes(path));\n\n const valueChanged = !isEqual(\n get(document, path),\n get(this.props.document, path)\n );\n const errorChanged = !isEqual(this.getErrors(errors), this.getErrors());\n const deleteChanged =\n includesPathOrChildren(deletedValues) !==\n includesPathOrChildren(this.props.deletedValues);\n const charsChanged = nextState.charsRemaining !== this.state.charsRemaining;\n const disabledChanged = nextProps.disabled !== this.props.disabled;\n const helpChanged = nextProps.help !== this.props.help;\n\n const shouldUpdate =\n valueChanged ||\n errorChanged ||\n deleteChanged ||\n charsChanged ||\n disabledChanged ||\n helpChanged;\n\n return shouldUpdate;\n }*/\n\n const {\n locale,\n max,\n path,\n //type,\n datatype,\n input,\n intlInput,\n nestedInput,\n query,\n options,\n } = props;\n const { updateCurrentValues, deletedValues, clearFieldErrors } =\n useFormContext();\n\n const type = datatype;\n const countFromProps = getCharacterCountsFromProps(props);\n // equivalent to getDerivedStateFromProps\n const [charsCountState, setCharacterCounts] = useState<{\n charsCount: number;\n charsRemaining: number;\n } | null>(countFromProps);\n\n // TODO: move this logic somewhere else, as it is specific to String components.\n // Eg using an intermediate FormComponentText\n /*\n Updates the state of charsCount and charsRemaining as the users types\n */\n const updateCharacterCount = (value) => {\n if (!max)\n throw new Error(\n \"Cannot update character count when no max value is set.\"\n );\n setCharacterCounts(getCharacterCounts(value, max));\n };\n useEffect(() => {\n if (countFromProps) {\n setCharacterCounts(countFromProps);\n }\n }, [countFromProps?.charsCount, countFromProps?.charsRemaining]);\n /*\n\n Whether to keep track of and show remaining chars\n\n */\n let showCharsRemaining = false;\n let inputName = null;\n if (typeof input === \"string\") {\n inputName = getInputName(type, input);\n showCharsRemaining = !!(\n typeof max !== \"undefined\" &&\n inputName &&\n [\"url\", \"email\", \"textarea\", \"text\"].includes(inputName)\n );\n }\n // const inputType = inputName; // TODO: rename inputType in the corresponding child components\n\n /*\n Function passed to form controls (always controlled) to update their value\n (Note: we could use the context instead?)\n */\n const handleChange = (value) => {\n // if value is an empty string, delete the field\n if (value === \"\") {\n value = null;\n }\n // if this is a number field, convert value before sending it up to Form\n if (type === Number && value != null) {\n value = Number(value);\n } else if (type === SimpleSchema.Integer && value != null) {\n value = parseInt(value);\n }\n\n if (value !== getValue()) {\n const updateValue = locale ? { locale: locale, value } : value;\n updateCurrentValues({ [getPath(props)]: updateValue });\n clearFieldErrors(getPath(props));\n }\n\n // for text fields, update character count on change\n if (showCharsRemaining) {\n updateCharacterCount(value);\n }\n };\n\n /*\n Get value from Form state through document and currentValues props\n // TODO: get document from context\n */\n const getValue = () => {\n //const c = context || this.context;\n const { locale, defaultValue, formType, datatype } = props;\n const path = locale ? `${getPath(props)}.value` : getPath(props);\n const currentDocument = props.document;\n let value = get(currentDocument, path);\n // note: force intl fields to be treated like strings\n const nullValue = locale ? \"\" : getNullValue(datatype);\n\n // handle deleted & empty value\n if (deletedValues.includes(path)) {\n value = nullValue;\n } else if (isEmptyValue(value)) {\n // replace empty value by the default value from the schema if it exists – for new forms only\n value = formType === \"new\" && defaultValue ? defaultValue : nullValue;\n }\n return value;\n };\n\n /*\n\n Get errors from Form state through context\n\n Note: we use `includes` to get all errors from nested components, which have longer paths\n\n */\n const getErrors = (errors?: Array<any>) => {\n errors = errors || props.errors || [];\n const fieldErrors = errors.filter(\n (error) => error.path && error.path.includes(path)\n );\n return fieldErrors;\n };\n\n /*\n\n Function passed to form controls to clear their contents (set their value to null)\n\n */\n const clearField = (event) => {\n event.preventDefault();\n event.stopPropagation();\n updateCurrentValues({ [path]: null });\n if (showCharsRemaining) {\n updateCharacterCount(null);\n }\n };\n\n const FormComponents = useVulcanComponents();\n\n if (intlInput) {\n return <FormComponents.FormIntl {...props} />;\n } else if (!input && nestedInput) {\n if (isArrayField(type)) {\n return (\n <FormComponents.FormNestedArray\n {...props}\n formComponents={FormComponents}\n errors={getErrors()}\n value={getValue()}\n />\n );\n } else if (isObjectField(type)) {\n return (\n <FormComponents.FormNestedObject\n {...props}\n formComponents={FormComponents}\n errors={getErrors()}\n value={getValue()}\n />\n );\n }\n }\n\n const fciProps = {\n ...props,\n ...(charsCountState || {}),\n inputType: getInputName(type, input),\n value: getValue(),\n errors: getErrors(),\n showCharsRemaining: !!showCharsRemaining,\n handleChange: handleChange,\n clearField: clearField,\n formInput: getFormInput({ FormComponents, input, type }),\n };\n\n // if there is no query, handle options here; otherwise they will be handled by\n // the FormComponentLoader component\n if (!query && typeof options === \"function\") {\n fciProps.options = options(fciProps);\n }\n\n const fci = <FormComponents.FormComponentInner {...fciProps} />;\n\n return query ? (\n <FormComponents.FormComponentLoader {...fciProps}>\n {fci}\n </FormComponents.FormComponentLoader>\n ) : (\n fci\n );\n};\n\nexport const formComponentsDependencies = [\n \"FormComponentDefault\",\n \"FormComponentPassword\",\n \"FormComponentNumber\",\n \"FormComponentUrl\",\n \"FormComponentEmail\",\n \"FormComponentTextarea\",\n \"FormComponentCheckbox\",\n \"FormComponentCheckboxGroup\",\n \"FormComponentRadioGroup\",\n \"FormComponentSelect\",\n \"FormComponentSelectMultiple\",\n \"FormComponentDateTime\",\n \"FormComponentDate\",\n \"FormComponentDate2\",\n \"FormComponentTime\",\n \"FormComponentStaticText\",\n \"FormComponentLikert\",\n \"FormComponentAutocomplete\",\n \"FormComponentMultiAutocomplete\",\n];\n\nexport default FormComponent;\n","import type { VulcanFieldType, VulcanCoreInput } from \"@vulcanjs/schema\";\n// import SimpleSchema from \"simpl-schema\";\n\nexport const standardInputs: Array<VulcanCoreInput> = [\n \"number\",\n \"url\",\n \"email\",\n \"textarea\",\n \"checkbox\",\n \"checkboxgroup\",\n \"radiogroup\",\n \"select\",\n \"selectmultiple\",\n \"datetime\",\n \"date\",\n \"time\",\n \"text\",\n \"password\",\n];\n\nexport const clearableInputs: Array<VulcanCoreInput> = [\n \"date\",\n // \"date2\",\n \"datetime\",\n \"time\",\n \"select\",\n \"radiogroup\",\n];\nexport const advancedInputs: Array<VulcanCoreInput> = [\n \"likert\",\n \"autocomplete\",\n \"multiautocomplete\",\n];\nexport type DerivedInput = \"nested\";\nexport const derivedInputs: Array<DerivedInput> = [\"nested\"];\nexport const allVulcanInputs: Array<VulcanCoreInput | DerivedInput> = [\n ...standardInputs,\n ...advancedInputs,\n // derived inputs are specific to the Form internal computations\n // it can't be set by the user\n ...derivedInputs,\n];\n\nexport const getAutoInputFromType = (\n fieldType: VulcanFieldType\n): VulcanCoreInput => {\n const autoType =\n fieldType === Number //|| fieldType === SimpleSchema.Integer\n ? \"number\"\n : fieldType === Boolean\n ? \"checkbox\"\n : fieldType === Date\n ? \"date\"\n : \"text\";\n return autoType;\n};\n","import React, { MouseEventHandler } from \"react\";\nimport { useIntlContext } from \"@vulcanjs/react-i18n\";\nimport { whitelistInputProps } from \"../utils/ui_utils\";\nimport { FormComponentProps } from \"./FormComponent\";\n/*\nimport {\n instantiateComponent,\n whitelistInputProps,\n} from \"meteor/vulcan:core\";\n*/\nimport classNames from \"classnames\";\nimport { VulcanCoreInput } from \"@vulcanjs/schema\";\nimport { PossibleVulcanComponents } from \"../../VulcanComponents/typings\";\nimport { clearableInputs } from \"../inputs/consts\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\n\nexport interface FormComponentInnerProps extends FormComponentProps {\n inputType: VulcanCoreInput;\n //disabled?: boolean;\n // help?: string;\n /**\n * Callback called when clicking on the \"clear input\" button\n */\n clearField?: MouseEventHandler<HTMLButtonElement>;\n /**\n * TODO: not sure if it should be mandatory or not (eg for uncontrolled components?)\n */\n handleChange?: Function;\n itemProperties?: any;\n description?: string;\n loading?: boolean;\n submitForm: any;\n formComponents: PossibleVulcanComponents;\n intlKeys?: any;\n inputClassName: any;\n name?: string;\n input: any;\n beforeComponent: any;\n afterComponent: any;\n errors: any;\n showCharsRemaining: any;\n charsRemaining: any;\n renderComponent: any;\n formInput: any;\n}\n\nexport const FormComponentInner = (props: FormComponentInnerProps) => {\n const intl = useIntlContext();\n const { inputType, disabled, clearField } = props;\n\n const renderClear = () => {\n if (clearableInputs.includes(inputType) && !disabled) {\n /*\n From bootstrap:\n <Components.TooltipTrigger\n trigger={\n <button\n className=\"form-component-clear\"\n title={this.context.intl.formatMessage({\n id: \"forms.clear_field\",\n })}\n onClick={this.props.clearField}\n >\n <span>✕</span>\n </button>\n }\n >\n <Components.FormattedMessage id=\"forms.clear_field\" />\n </Components.TooltipTrigger>\n */\n return (\n <button\n className=\"form-component-clear\"\n title={intl.formatMessage({\n id: \"forms.clear_field\",\n })}\n onClick={clearField}\n >\n <span>✕</span>\n </button>\n );\n }\n };\n\n const getProperties = (): FormInputProps => {\n const {\n handleChange,\n inputType,\n itemProperties,\n help,\n description,\n loading,\n submitForm,\n formComponents,\n intlKeys,\n } = props;\n const properties = {\n ...props,\n inputProperties: {\n ...whitelistInputProps(props),\n onChange: (event) => {\n // FormComponent's handleChange expects value as argument; look in target.checked or target.value\n const inputValue =\n inputType === \"checkbox\"\n ? // TODO: not sure why we need an ignore there\n // @ts-ignore\n event.target.checked\n : // @ts-ignore\n event.target.value;\n if (handleChange) {\n handleChange(inputValue);\n }\n },\n /*\n TODO: check if this creates regression\n onKeyPress: (event) => {\n if (event.key === \"Enter\" && inputType !== \"textarea\") {\n submitForm();\n }\n },\n */\n },\n\n itemProperties: {\n ...itemProperties,\n intlKeys,\n Components: formComponents,\n description: description || help,\n loading,\n },\n };\n return properties;\n };\n\n const {\n inputClassName,\n name,\n input,\n //inputType,\n beforeComponent,\n afterComponent,\n errors,\n showCharsRemaining,\n charsRemaining,\n renderComponent,\n formInput,\n } = props;\n\n const FormComponents = useVulcanComponents();\n //const FormComponents = formComponents;\n\n const hasErrors = errors && errors.length;\n\n const inputName = typeof input === \"function\" ? input.name : inputType;\n const inputClass = classNames(\n \"form-input\",\n inputClassName,\n `input-${name}`,\n `form-component-${inputName || \"default\"}`,\n {\n \"input-error\": hasErrors,\n }\n );\n const properties = getProperties();\n\n const FormInput = formInput;\n\n return (\n <div className={inputClass}>\n {/*instantiateComponent(beforeComponent, properties)*/}\n <FormInput {...properties} />\n {hasErrors ? <FormComponents.FieldErrors errors={errors} /> : null}\n {renderClear()}\n {showCharsRemaining && (\n <div\n className={classNames(\"form-control-limit\", {\n danger: charsRemaining < 10,\n })}\n >\n {charsRemaining}\n </div>\n )}\n {/*instantiateComponent(afterComponent, properties)*/}\n </div>\n );\n};\n\n/**\n * Props passed to Vulcan Smart Form input\n * Use those props to define custom inputs\n */\nexport interface FormInputProps<TInput = HTMLInputElement>\n extends FormComponentInnerProps {\n // TODO: note sure about this, there also seems to be label and other props that are not HTMLInput props per se\n // It may depend on the type of input as well, maybe the type is more an union\n /**\n * Input properties will contain all props that can be safely passed down to the root input\n * (often an HTML \"input\" or textarea)\n *\n * This includes the current \"value\", that can be obtained either from \"props\" or \"props.inputProperties.value\"\n * in input components\n */\n inputProperties: React.HTMLProps<TInput>;\n itemProperties: any; // TODO\n}\nexport type FormTextAreaProps = FormInputProps<HTMLTextAreaElement>;\n","import pick from \"lodash/pick.js\";\n\n/**\n * Extract input props for the FormComponentInner\n * @param {*} props All component props\n * @returns Initial props + props specific to the HTML input in an inputProperties object\n */\nexport const getHtmlInputProps = (props) => {\n const { name, path, options, label, onChange, onBlur, value, disabled } =\n props;\n\n // these properties are whitelisted so that they can be safely passed to the actual form input\n // and avoid https://facebook.github.io/react/warnings/unknown-prop.html warnings\n const inputProperties = {\n ...props.inputProperties,\n name,\n path,\n options,\n label,\n onChange,\n onBlur,\n value,\n disabled,\n };\n\n return {\n ...props,\n inputProperties,\n };\n};\n\n/**\n * Extract input props for the FormComponentInner\n * @param {*} props All component props\n * @returns Initial props + props specific to the HTML input in an inputProperties object\n */\nexport const whitelistInputProps = (\n props: any\n): React.HTMLProps<HTMLInputElement> => {\n const whitelist = [\n \"name\",\n \"path\",\n \"options\",\n \"label\",\n \"onChange\",\n \"onBlur\",\n \"value\",\n \"disabled\",\n \"placeholder\",\n ];\n const value = props.value;\n let safeValue;\n // No null values in HTML inputs\n if (value === null) safeValue = undefined;\n // if value is null, return undefined\n return { ...pick(props, whitelist), value: safeValue };\n};\n","/**\n * Changes from Vulcan Meteor:\n * - query is not expanded: you need to pass the full query with fragments already\n */\nimport React, { useEffect } from \"react\";\n// @see packages/vulcan-lib/lib/modules/fragments.js in Vulcan\n// should we reenable this?\n// import { expandQueryFragments } from \"meteor/vulcan:core\";\nimport { useLazyQuery } from \"@apollo/client\";\nimport gql from \"graphql-tag\";\nimport isEmpty from \"lodash/isEmpty.js\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\n\nexport interface FormComponentLoaderProps {\n query: string | (({ value: any }) => string);\n children: React.ReactNode;\n options: any;\n value: any;\n /** Run the query only when value is not empty */\n queryWaitsForValue?: boolean;\n}\nexport const FormComponentLoader = (props: FormComponentLoaderProps) => {\n const VulcanComponents = useVulcanComponents();\n const { query, children, options, value, queryWaitsForValue } = props;\n\n // if query is a function, execute it\n const queryText = typeof query === \"function\" ? query({ value }) : query;\n\n const [loadFieldQuery, { loading, error, data }] = useLazyQuery(\n gql(queryText)\n // gql(expandQueryFragments(queryText))\n );\n\n const valueIsEmpty =\n isEmpty(value) || (Array.isArray(value) && value.length) === 0;\n\n useEffect(() => {\n if (queryWaitsForValue && valueIsEmpty) {\n // we don't want to run this query until we have a value to pass to it\n // so do nothing\n } else {\n loadFieldQuery({\n variables: { value },\n });\n }\n }, [valueIsEmpty, value, queryWaitsForValue]);\n\n if (error) {\n throw new Error(error.toString());\n }\n\n if (loading) {\n return (\n <div className=\"form-component-loader\">\n <VulcanComponents.Loading />\n </div>\n );\n }\n\n // pass newly loaded data (and options if needed) to child component\n const extraProps: {\n data: any;\n queryData: any;\n queryError: any;\n loading: boolean;\n optionsFunction?: Function;\n options?: Array<any>;\n } = { data, queryData: data, queryError: error, loading };\n if (typeof options === \"function\") {\n extraProps.optionsFunction = options;\n extraProps.options = options.call({}, { ...props, data });\n }\n if (!React.isValidElement(children)) {\n throw new Error(\n \"Children of FormComponentLoader must be a React element, got \" + children\n );\n }\n const fci = React.cloneElement(children, extraProps);\n\n return <div className=\"form-component-loader\">{fci}</div>;\n};\n\nFormComponentLoader.propTypes = {};\n","import React, { PureComponent, useState } from \"react\";\nimport _some from \"lodash/some.js\";\nimport { VulcanUser, isAdmin } from \"@vulcanjs/permissions\";\nimport { FieldGroup } from \"@vulcanjs/schema\";\nimport { FormField } from \"../typings\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\nimport { useFormContext } from \"./FormContext\";\n\nexport interface FormGroupProps {\n name: string;\n label: string;\n group: FieldGroup /*{\n adminsOnly?: boolean;\n beforeComponent?: any;\n };*/;\n fields: Array<FormField>;\n hidden?: boolean | Function;\n disabled?: boolean;\n document: any;\n currentUser?: VulcanUser;\n itemProperties: any;\n formType: any;\n prefilledProps: any;\n}\n\n/**\n * TODO: take unused props into account\n * @param param0\n * @returns\n */\nexport const FormGroupLayout = ({\n anchorName,\n collapsed,\n hasErrors,\n group,\n document,\n toggle,\n ...props\n}) => {\n return <fieldset {...props} />;\n};\n\nexport const FormGroupHeader = (props) => <h2 {...props} />;\n\nexport const FormGroup /*<FormGroupProps, FormGroupState>*/ = (\n props: FormGroupProps\n) => {\n // TODO: get value/update methods from context instead\n const {\n name,\n label,\n group,\n fields,\n hidden,\n document,\n currentUser,\n disabled,\n itemProperties,\n prefilledProps,\n formType,\n } = props;\n const { errors, clearFieldErrors } = useFormContext();\n const [collapsed, setCollapsed] = useState<boolean>(\n group.startCollapsed || false\n );\n const toggle = () => setCollapsed((collapsed) => !collapsed);\n // if at least one of the fields in the group has an error, the group as a whole has an error\n const hasErrors = _some(fields, (field) => {\n return !!errors.filter((error) => error.path === field.path).length;\n });\n const VulcanComponents = useVulcanComponents();\n\n const isHidden =\n typeof hidden === \"function\"\n ? hidden({ ...props, document })\n : hidden || false;\n /*\n static propTypes = {\n name: PropTypes.string,\n label: PropTypes.string,\n order: PropTypes.number,\n hidden: PropTypes.func,\n fields: PropTypes.array.isRequired,\n group: PropTypes.object.isRequired,\n errors: PropTypes.array.isRequired,\n throwError: PropTypes.func.isRequired,\n currentValues: PropTypes.object.isRequired,\n updateCurrentValues: PropTypes.func.isRequired,\n deletedValues: PropTypes.array.isRequired,\n addToDeletedValues: PropTypes.func.isRequired,\n clearFieldErrors: PropTypes.func.isRequired,\n formType: PropTypes.string.isRequired,\n currentUser: PropTypes.object,\n prefilledProps: PropTypes.object,\n };*/\n\n const heading = (\n <VulcanComponents.FormGroupHeader\n toggle={toggle}\n label={label}\n collapsed={collapsed}\n hidden={isHidden}\n group={group}\n />\n );\n\n if (group.adminsOnly && !isAdmin(currentUser)) {\n return null;\n }\n const anchorName = name.split(\".\").length > 1 ? name.split(\".\")[1] : name;\n\n return (\n <VulcanComponents.FormGroupLayout\n label={label}\n anchorName={anchorName}\n toggle={toggle}\n collapsed={collapsed}\n hidden={isHidden}\n group={group}\n heading={name === \"default\" ? null : heading}\n hasErrors={hasErrors}\n document={document}\n >\n {/* TODO: create TS error at the moment: group.beforeComponent && <group.beforeComponent {...props} />*/}\n {/** TODO: we pass all the functions as props to the FormComponent,\n * but it should rely on the context instead for methods\n */}\n\n {fields.map((field) => (\n <VulcanComponents.FormComponent\n key={field.name}\n disabled={disabled}\n {...field}\n document={document}\n itemProperties={{\n ...itemProperties,\n ...field.itemProperties,\n }}\n clearFieldErrors={clearFieldErrors}\n formType={formType}\n currentUser={currentUser}\n prefilledProps={prefilledProps}\n />\n ))}\n\n {/* TODO: create TS error at the moment: group.afterComponent && <group.afterComponent {...props} />*/}\n </VulcanComponents.FormGroupLayout>\n );\n};\n\nexport default FormGroup;\n","import React from \"react\";\nimport omit from \"lodash/omit.js\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\nimport { useFormContext } from \"../core/FormContext\";\n//import type { LocaleType } from \"@vulcanjs/i18n\";\n\n// const Locales: Array<{ id: string }> = []; // ?? might need to get this from context\nexport const FormIntlLayout = ({ children }) => (\n <div className=\"form-intl\">{children}</div>\n);\nexport const FormIntlItemLayout = ({ locale, children }) => (\n <div className={`form-intl-${locale.id}`}>{children}</div>\n);\n\ninterface FormIntlProps {\n path: string;\n name: string;\n // TODO: this should probably be provided by i18n context instead\n //Locales: Array<LocaleType>;\n}\n\nexport const FormIntl = (props: FormIntlProps) => {\n const FormComponents = useVulcanComponents();\n const { getLabel } = useFormContext();\n // TODO: we don't have a globale \"Locales\" object anymore\n // so we need to get this from context somehow\n //const { Locales } = props;\n const Locales: Array<any> = []; // TODO: get it from i18n context instead that exposes the LocalesRegistry\n /*\n Note: ideally we'd try to make sure to return the right path no matter\n the order translations are stored in, but in practice we can't guarantee it\n so we just use the order of the Locales array.\n\n */\n const getLocalePath = (defaultIndex) => {\n return `${props.path}_intl.${defaultIndex}`;\n };\n\n const { name } = props;\n\n // do not pass FormIntl's own value, inputProperties, and intlInput props down\n const properties = omit(\n props,\n \"value\",\n \"inputProperties\",\n \"intlInput\",\n \"nestedInput\"\n );\n return (\n <FormComponents.FormIntlLayout>\n {Locales.map((locale, i) => (\n <FormComponents.FormIntlItemLayout key={locale.id} locale={locale}>\n <FormComponents.FormComponent\n {...properties}\n label={getLabel(name, locale.id)}\n path={getLocalePath(i)}\n locale={locale.id}\n />\n </FormComponents.FormIntlItemLayout>\n ))}\n </FormComponents.FormIntlLayout>\n );\n};\n","export * from \"./FormNestedArray\";\nexport * from \"./FormNestedArrayLayout\";\nexport * from \"./FormNestedItem\";\nexport * from \"./FormNestedDivider\";\nexport * from \"./FormNestedObject\";\n","/**\n * Change compared to Vulcan Meteor:\n * after/before => After, Before with titlecase\n */\nimport React, { useEffect } from \"react\";\nimport _omit from \"lodash/omit.js\";\nimport _get from \"lodash/get.js\";\nimport { useFormContext } from \"../core/FormContext\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\n\n// Wraps the FormNestedItem, repeated for each object\n// Allow for example to have a label per object\nexport const FormNestedArrayInnerLayout = (props) => {\n const { label, children, addItem, BeforeComponent, AfterComponent } = props;\n const FormComponents = useVulcanComponents();\n return (\n <div className=\"form-nested-array-inner-layout\">\n <BeforeComponent {...props} />\n {children}\n <FormComponents.FormNestedDivider label={label} addItem={addItem} />\n <AfterComponent {...props} />\n </div>\n );\n};\n\nexport interface FormNestedArrayProps<TValue = any> {\n value: TValue;\n /** Path for the nested object */\n path: string;\n itemProperties: any;\n minCount?: number;\n maxCount?: number;\n arrayField?: boolean;\n nestedArrayErrors: any;\n hasErrors?: boolean;\n // TODO: get from context\n prefilledProps?: any;\n addItem: Function | null;\n}\nexport const FormNestedArray = (props: FormNestedArrayProps) => {\n const { updateCurrentValues, deletedValues, errors } = useFormContext();\n /*static defaultProps = {\n itemProperties: {},\n };*/\n const value = props.value || [];\n\n const addItem = () => {\n const { prefilledProps, path } = props;\n updateCurrentValues(\n { [`${path}.${value.length}`]: _get(prefilledProps, `${path}.$`) || {} },\n { mode: \"merge\" }\n );\n };\n\n const removeItem = (index) => {\n updateCurrentValues({ [`${props.path}.${index}`]: null });\n };\n\n /*\n\n Go through this.context.deletedValues and see if any value matches both the current field\n and the given index (ex: if we want to know if the second address is deleted, we\n look for the presence of 'addresses.1')\n */\n const isDeleted = (index) => {\n return deletedValues.includes(`${props.path}.${index}`);\n };\n\n const computeVisibleIndex = (values) => {\n let currentIndex = 0;\n const visibleIndexes = values.map((subDocument, subDocumentIndx) => {\n if (isDeleted(subDocumentIndx)) {\n return 0;\n } else {\n currentIndex = currentIndex + 1;\n return currentIndex;\n }\n });\n return visibleIndexes;\n };\n\n useEffect(() => {\n if (props.itemProperties.openNested) addItem();\n }, []);\n\n const visibleItemIndexes = computeVisibleIndex(value);\n // do not pass FormNested's own value, input and inputProperties props down\n const properties = {\n ..._omit(\n props,\n \"value\",\n \"input\",\n \"inputProperties\",\n \"nestedInput\",\n \"beforeComponent\",\n \"afterComponent\"\n ),\n };\n const { path, minCount, maxCount, arrayField } = props;\n const FormComponents = useVulcanComponents();\n\n //filter out null values to calculate array length\n let arrayLength = value.filter((singleValue) => {\n return typeof singleValue !== \"undefined\" && singleValue !== null;\n }).length;\n properties.addItem = !maxCount || arrayLength < maxCount ? addItem : null;\n\n // only keep errors specific to the nested array (and not its subfields)\n properties.nestedArrayErrors = errors.filter(\n (error) => error.path && error.path === path\n );\n properties.hasErrors = !!(\n properties.nestedArrayErrors && properties.nestedArrayErrors.length\n );\n\n return (\n <FormComponents.FormNestedArrayLayout {...properties}>\n {value.map((subDocument, i) => {\n if (isDeleted(i)) return null;\n const path = `${props.path}.${i}`;\n const visibleItemIndex = visibleItemIndexes[i];\n return (\n <FormComponents.FormNestedArrayInnerLayout\n {...arrayField}\n key={path}\n addItem={addItem}\n itemIndex={i}\n visibleItemIndex={visibleItemIndex}\n path={path}\n >\n <FormComponents.FormNestedItem\n {...properties}\n itemIndex={i}\n visibleItemIndex={visibleItemIndex}\n path={path}\n removeItem={() => {\n removeItem(i);\n }}\n hideRemove={!!minCount && arrayLength <= minCount}\n />\n </FormComponents.FormNestedArrayInnerLayout>\n );\n })}\n </FormComponents.FormNestedArrayLayout>\n );\n};\n\nexport const formComponentsDependencies = [\n \"FormNestedArrayInnerLayout\",\n \"FormNestedArrayLayout\",\n];\n\nexport default FormNestedArray;\n\nexport const IconAdd = ({ width = 24, height = 24 }) => (\n <svg\n width={width}\n height={height}\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 448 512\"\n >\n <path\n fill=\"currentColor\"\n d=\"M448 294.2v-76.4c0-13.3-10.7-24-24-24H286.2V56c0-13.3-10.7-24-24-24h-76.4c-13.3 0-24 10.7-24 24v137.8H24c-13.3 0-24 10.7-24 24v76.4c0 13.3 10.7 24 24 24h137.8V456c0 13.3 10.7 24 24 24h76.4c13.3 0 24-10.7 24-24V318.2H424c13.3 0 24-10.7 24-24z\"\n />\n </svg>\n);\n\nexport const IconRemove = ({ width = 24, height = 24 }) => (\n <svg\n width={width}\n height={height}\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 448 512\"\n >\n <path\n fill=\"currentColor\"\n d=\"M424 318.2c13.3 0 24-10.7 24-24v-76.4c0-13.3-10.7-24-24-24H24c-13.3 0-24 10.7-24 24v76.4c0 13.3 10.7 24 24 24h400z\"\n />\n </svg>\n);\n","import PropTypes from \"prop-types\";\nimport React from \"react\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\n\n// Replaceable layout, default implementation\nexport const FormNestedArrayLayout = (props) => {\n const {\n hasErrors,\n nestedArrayErrors,\n label,\n addItem,\n BeforeComponent,\n AfterComponent,\n children,\n } = props;\n const VulcanComponents = useVulcanComponents();\n\n return (\n <div\n className={`form-group row form-nested ${hasErrors ? \"input-error\" : \"\"}`}\n >\n {BeforeComponent && <BeforeComponent {...props} />}\n\n <label className=\"control-label col-sm-3\">{label}</label>\n\n <div className=\"col-sm-9\">\n {children}\n {addItem && (\n <VulcanComponents.Button\n className=\"form-nested-button form-nested-add\"\n size=\"sm\"\n variant=\"success\"\n onClick={addItem}\n >\n <VulcanComponents.IconAdd height={12} width={12} />\n </VulcanComponents.Button>\n )}\n {props.hasErrors ? (\n <VulcanComponents.FieldErrors\n key=\"form-nested-errors\"\n errors={nestedArrayErrors}\n />\n ) : null}\n </div>\n\n {AfterComponent && <AfterComponent {...props} />}\n </div>\n );\n};\n\nFormNestedArrayLayout.propTypes = {\n hasErrors: PropTypes.bool.isRequired,\n nestedArrayErrors: PropTypes.array,\n label: PropTypes.node,\n hideLabel: PropTypes.bool,\n addItem: PropTypes.func,\n beforeComponent: PropTypes.node,\n afterComponent: PropTypes.node,\n formComponents: PropTypes.object,\n children: PropTypes.node,\n};\n\nexport default FormNestedArrayLayout;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { intlShape } from \"@vulcanjs/react-i18n\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\nimport { useIntlContext } from \"@vulcanjs/react-i18n\";\n\nexport const FormNestedItemLayout = ({ content, removeButton }) => (\n <div className=\"form-nested-item\">\n <div className=\"form-nested-item-inner\">{content}</div>\n {removeButton && [\n <div key=\"remove-button\" className=\"form-nested-item-remove\">\n {removeButton}\n </div>,\n <div\n key=\"remove-button-overlay\"\n className=\"form-nested-item-deleted-overlay\"\n />,\n ]}\n </div>\n);\nFormNestedItemLayout.propTypes = {\n content: PropTypes.node.isRequired,\n removeButton: PropTypes.node,\n};\n\nexport const FormNestedItem = ({\n nestedFields,\n name,\n path,\n removeItem,\n itemIndex,\n formComponents,\n hideRemove,\n label,\n ...props\n}) => {\n const VulcanComponents = useVulcanComponents();\n const intl = useIntlContext();\n const isArray = typeof itemIndex !== \"undefined\";\n return (\n <VulcanComponents.FormNestedItemLayout\n content={nestedFields.map((field, i) => {\n return (\n <VulcanComponents.FormComponent\n key={i}\n {...props}\n {...field}\n path={`${path}.${field.name}`}\n itemIndex={itemIndex}\n />\n );\n })}\n removeButton={\n isArray &&\n !hideRemove && [\n <div key=\"remove-button\" className=\"form-nested-item-remove\">\n <VulcanComponents.Button\n className=\"form-nested-button\"\n variant=\"danger\"\n size=\"sm\"\n iconButton\n tabIndex={-1}\n onClick={() => {\n removeItem(name);\n }}\n aria-label={intl.formatMessage(\n { id: \"forms.delete_nested_field\" },\n { label: label }\n )}\n >\n <VulcanComponents.IconRemove height={12} width={12} />\n </VulcanComponents.Button>\n </div>,\n <div\n key=\"remove-button-overlay\"\n className=\"form-nested-item-deleted-overlay\"\n />,\n ]\n }\n />\n );\n};\n\nFormNestedItem.propTypes = {\n path: PropTypes.string.isRequired,\n itemIndex: PropTypes.number,\n formComponents: PropTypes.object,\n hideRemove: PropTypes.bool,\n};\n\nFormNestedItem.contextTypes = {\n errors: PropTypes.array,\n intl: intlShape,\n};\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nexport const FormNestedDivider = ({ label, addItem }) => <div />;\n\nFormNestedDivider.propTypes = {\n label: PropTypes.string,\n addItem: PropTypes.func,\n};\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport _omit from \"lodash/omit.js\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\nimport { useFormContext } from \"../core/FormContext\";\n\n// Replaceable layout\nexport const FormNestedObjectLayout = ({ hasErrors, label, content }) => (\n <div\n className={`form-group row form-nested ${hasErrors ? \"input-error\" : \"\"}`}\n >\n <label className=\"control-label col-sm-3\">{label}</label>\n <div className=\"col-sm-9\">{content}</div>\n </div>\n);\nFormNestedObjectLayout.propTypes = {\n hasErrors: PropTypes.oneOfType([PropTypes.number, PropTypes.bool]),\n label: PropTypes.node,\n content: PropTypes.node,\n};\n\ninterface FormNestedObjectProps {\n label?: string;\n value: any;\n input: any;\n inputProperties: any;\n nestedInput: any;\n errors: Array<any>;\n path: string;\n}\nexport const FormNestedObject = (props: FormNestedObjectProps) => {\n const VulcanComponents = useVulcanComponents();\n //const value = this.getCurrentValue()\n // do not pass FormNested's own value, input and inputProperties props down\n const properties = _omit(\n props,\n \"value\",\n \"input\",\n \"inputProperties\",\n \"nestedInput\"\n );\n const { errors } = useFormContext();\n // only keep errors specific to the nested array (and not its subfields)\n const nestedObjectErrors = errors.filter(\n (error) => error.path && error.path === props.path\n );\n const hasErrors = nestedObjectErrors && nestedObjectErrors.length;\n return (\n <VulcanComponents.FormNestedObjectLayout\n hasErrors={hasErrors}\n label={props.label}\n content={[\n <VulcanComponents.FormNestedItem\n key=\"form-nested-item\"\n {...properties}\n path={`${props.path}`}\n />,\n hasErrors ? (\n <VulcanComponents.FieldErrors\n key=\"form-nested-errors\"\n errors={nestedObjectErrors}\n />\n ) : null,\n ]}\n />\n );\n};\n\nFormNestedObject.propTypes = {\n currentValues: PropTypes.object,\n path: PropTypes.string,\n label: PropTypes.string,\n errors: PropTypes.array.isRequired,\n formComponents: PropTypes.object,\n};\n\nexport default FormNestedObject;\n","export * from \"./BasicInputs\";\nexport * from \"./RadioGroup\";\nexport * from \"./Checkboxgroup\";\nexport * from \"./SelectInputs\";\n\nexport * from \"./FormItem\";\nexport * from \"./FormOptionLabel\";\n\nexport * from \"./AutocompleteMultiple\";\n","import React from \"react\";\nimport { FormInputProps, FormTextAreaProps } from \"../core/FormComponentInner\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\n\n/**\n * Converts props passed by Vulcan to an HTML Input\n * @see packages/vulcan-ui-bootstrap/lib/components/forms/FormItem.jsx in Vulcan\n * @param param0\n * @returns\n */\nconst HTMLInputAdapter = (props: FormInputProps & { type: string }) => {\n const Components = useVulcanComponents();\n const { inputProperties = {}, itemProperties = {}, path } = props;\n const { label, name, ...otherInputProperties } = inputProperties;\n\n return (\n <Components.FormItem\n name={name}\n path={path}\n label={label}\n inputProperties={inputProperties}\n {...itemProperties}\n >\n {/* @ts-ignore FIXME: leads to \"Types of property 'capture' are incompatible\" when trying to build the types... */}\n <input\n {...otherInputProperties}\n id={name} // needed for accessibility. NOTE: we might need to use \"context\" as a prefix when having\n // multiple forms for the same kind of data\n name={name}\n type={props.type}\n />\n </Components.FormItem>\n );\n};\n\nexport const FormComponentDefault = (props: FormInputProps) => (\n <HTMLInputAdapter type=\"text\" {...props} />\n);\nexport const FormComponentPassword = (props: FormInputProps) => (\n <HTMLInputAdapter type=\"password\" {...props} />\n);\nexport const FormComponentNumber = (props: FormInputProps) => (\n <HTMLInputAdapter type=\"number\" {...props} />\n);\nexport const FormComponentUrl = (props: FormInputProps) => (\n <HTMLInputAdapter type=\"url\" {...props} />\n);\nexport const FormComponentEmail = (props: FormInputProps) => (\n <HTMLInputAdapter type=\"email\" {...props} />\n);\n// TODO: at the moment we use a select instead\nexport const FormComponentCheckbox = (props: FormInputProps) => {\n return <HTMLInputAdapter type=\"checkbox\" {...props} />;\n //<HTMLSelectAdapter type=\"checkbox\" {...props} />\n};\n\nexport const FormComponentDate = (props) => (\n <HTMLInputAdapter type=\"date\" {...props} />\n);\n/*\nexport const FormComponentDate2 = (props) => (\n <HTMLInputAdapter {...props} />\n);\n*/\nexport const FormComponentDateTime = (props) => (\n <HTMLInputAdapter type=\"datetime-local\" {...props} />\n);\nexport const FormComponentTime = (props) => (\n <HTMLInputAdapter type=\"time\" {...props} />\n);\nexport const FormComponentStaticText = (props: FormInputProps) => {\n const { inputProperties } = props;\n return <input {...inputProperties} disabled />;\n};\nexport const FormComponentLikert = (props) =>\n \"Likert component not yet implemented\";\nexport const FormComponentAutocomplete = (props) =>\n \"Autocomplete component not yet implemented\";\n//export const FormComponentMultiAutocomplete = (props) =>\n// \"MultiAutocomplete component not yet implemented\";\n\nexport const FormComponentTextarea = (props: FormTextAreaProps) => {\n const Components = useVulcanComponents();\n const { inputProperties = {}, itemProperties = {}, path } = props;\n const { label, name, ...otherInputProperties } = inputProperties;\n return (\n <Components.FormItem\n name={name}\n path={path}\n label={label}\n inputProperties={inputProperties}\n {...itemProperties}\n >\n <label htmlFor=\"name\">{label}</label>\n <textarea {...inputProperties} />\n </Components.FormItem>\n );\n};\n","import React from \"react\";\nimport { FormInputProps } from \"../core/FormComponentInner\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\n/**\n *\n * @param props\n * @returns\n */\nexport const FormComponentRadioGroup = (props: FormInputProps) => {\n const { path, inputProperties, options = [], itemProperties } = props;\n const { label, name } = inputProperties;\n if (!Array.isArray(options))\n throw new Error(\"RadioGroup not yet supporting functional options\");\n\n const Components = useVulcanComponents();\n return (\n <Components.FormItem\n path={path}\n name={name}\n label={label}\n inputProperties={inputProperties}\n {...itemProperties}\n >\n {/** TODO: whitelisting feature should be smarter to differentiate select and input */}\n {options.map((option) => {\n // NOTE: option can also have custom values, used by the FormOptionLabel component\n const { value, label } = option;\n return (\n <div key={value} className=\"form-radio-group-radio-item\">\n <Components.FormOptionLabel option={option} />\n <input\n type=\"radio\"\n id={value}\n name={name}\n key={value}\n {...inputProperties}\n value={value}\n checked={value === inputProperties.value}\n />\n </div>\n );\n })}\n </Components.FormItem>\n );\n};\n","import React, { useState } from \"react\";\nimport without from \"lodash/without.js\";\nimport omit from \"lodash/omit.js\";\nimport uniq from \"lodash/uniq.js\";\nimport isEmpty from \"lodash/isEmpty.js\";\nimport { useVulcanComponents } from \"../../VulcanComponents\";\nimport { FormInputProps } from \"../core/FormComponentInner\";\nimport { useFormContext } from \"..\";\n\n// this marker is used to identify \"other\" values\nexport const otherMarker = \"[other]\";\n\n// check if a string is an \"other\" value\nexport const isOtherValue = (s) =>\n s && typeof s === \"string\" && s.substr(0, otherMarker.length) === otherMarker;\n\n// remove the \"other\" marker from a string\nexport const removeOtherMarker = (s) =>\n s && typeof s === \"string\" && s.substr(otherMarker.length);\n\n// add the \"other\" marker to a string\nexport const addOtherMarker = (s) => `${otherMarker}${s}`;\n\n// return array of values without the \"other\" value\nexport const removeOtherValue = (a) => {\n return a.filter((s) => !isOtherValue(s));\n};\n\nconst OtherComponent = ({\n value,\n path,\n}: {\n value: Array<any>;\n path: string;\n}) => {\n const { updateCurrentValues } = useFormContext();\n const Components = useVulcanComponents();\n\n const otherValue = removeOtherMarker(value.find(isOtherValue));\n // get copy of checkbox group values with \"other\" value removed\n const withoutOtherValue = removeOtherValue(value);\n\n // keep track of whether \"other\" field is shown or not\n const [showOther, setShowOther] = useState(!!otherValue);\n\n // keep track of \"other\" field value locally\n const [textFieldValue, setTextFieldValue] = useState(otherValue);\n\n // textfield properties\n const textFieldInputProperties = {\n name,\n value: textFieldValue,\n onChange: (event) => {\n const fieldValue = event.target.value;\n // first, update local state\n setTextFieldValue(fieldValue);\n // then update global form state\n const newValue = isEmpty(fieldValue)\n ? withoutOtherValue\n : [...withoutOtherValue, addOtherMarker(fieldValue)];\n updateCurrentValues({ [path]: newValue });\n },\n };\n const textFieldItemProperties = { layout: \"elementOnly\" };\n\n return (\n <div className=\"form-option-other\">\n <Components.FormComponentCheckbox\n layout=\"elementOnly\"\n label={\"Other\"}\n value={showOther}\n checked={showOther}\n onClick={(event) => {\n const isChecked = event.target.checked;\n setShowOther(isChecked);\n if (isChecked) {\n // if checkbox is checked and textfield has value, update global form state with current textfield value\n if (textFieldValue) {\n updateCurrentValues({\n [path]: [...withoutOtherValue, addOtherMarker(textFieldValue)],\n });\n }\n } else {\n // if checkbox is unchecked, also clear out field value from global form state\n updateCurrentValues({ [path]: withoutOtherValue });\n }\n }}\n />\n {showOther && (\n <Components.FormComponentText\n inputProperties={textFieldInputProperties}\n itemProperties={textFieldItemProperties}\n />\n )}\n </div>\n );\n};\n\nexport const FormComponentCheckboxGroup = (props: FormInputProps) => {\n const { updateCurrentValues } = useFormContext();\n const {\n value: valueFromProps,\n multiple,\n inputProperties = {},\n options = [],\n itemProperties,\n path,\n } = props;\n const { label, name } = inputProperties;\n\n // Previously options were retrived from inputProperties?\n //const { options = [], name } = inputProperties;\n\n const Components = useVulcanComponents();\n\n if (!Array.isArray(options))\n throw new Error(\n \"FormComponentCheckboxGroup not yet supporting functional options\"\n );\n\n // get rid of duplicate values; or any values that are not included in the options provided\n // (unless they have the \"other\" marker)\n const value: Array<string | number | null> = valueFromProps\n ? uniq(\n valueFromProps.filter(\n (v) => isOtherValue(v) || options.map((o) => o.value).includes(v)\n )\n )\n : [];\n\n const hasValue = value.length > 0;\n\n // if this is a \"new document\" form check options' \"checked\" property to populate value\n /*\n TODO: not sure how to get formType value\n if (formType === \"new\" && value.length === 0) {\n const checkedValues = options.filter(o => !!o.checked).map(\n (option) => option.value\n );\n if (checkedValues.length) {\n value = checkedValues;\n }\n }*/\n return (\n <Components.FormItem\n name={name}\n label={label}\n path={path}\n inputProperties={inputProperties}\n {...itemProperties}\n >\n <div className=\"form-item-options\">\n {options.map((option, i) => {\n const isChecked = value.includes(option.value);\n const checkClass = hasValue\n ? isChecked\n ? \"form-check-checked\"\n : \"form-check-unchecked\"\n : \"\";\n return (\n <div className=\"form-item-option\" key={option.value}>\n <Components.FormOptionLabel option={option} name={name} />\n <input\n type=\"checkbox\"\n {...omit(inputProperties, \"value\")}\n name={name}\n //layout=\"elementOnly\"\n key={i}\n /*label={\n <Components.FormOptionLabel option={option} name={name} />\n }*/\n //value={isChecked}\n checked={isChecked}\n id={`${path}.${i}`}\n // path={`${path}.${i}`}\n //ref={refFunction}\n onChange={(event) => {\n const isChecked = event.target.checked;\n const newValue = isChecked\n ? [...value, option.value]\n : without(value, option.value);\n updateCurrentValues({ [path]: newValue });\n }}\n className={checkClass}\n />\n </div>\n );\n })}\n {itemProperties.showOther && (\n <OtherComponent value={value} path={path} />\n )}\n </div>\n </Components.FormItem>\n );\n};\n","import React from \"react\";\nimport type { FormInputProps } from \"../core/FormComponentInner\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\n\nconst HTMLSelectAdapter = (props: FormInputProps<HTMLSelectElement>) => {\n const {\n multiple,\n path,\n inputProperties = {},\n options = [],\n itemProperties,\n } = props;\n const { label, name } = inputProperties;\n if (!Array.isArray(options))\n throw new Error(\"HTMLSelectAdapater not yet supporting functional options\");\n\n const Components = useVulcanComponents();\n return (\n <Components.FormItem\n name={name}\n label={label}\n path={path}\n inputProperties={inputProperties}\n {...itemProperties}\n >\n {/** TODO: whitelisting feature should be smarter to differentiate select and input */}\n <select\n multiple={multiple}\n {...inputProperties}\n value={\n inputProperties.value === null ? undefined : inputProperties.value\n }\n >\n {options.map(({ label, value }) => (\n <option key={value} label={label} value={value}></option>\n ))}\n </select>\n </Components.FormItem>\n );\n};\n\nexport const FormComponentSelect = (\n props: FormInputProps<HTMLSelectElement>\n) => <HTMLSelectAdapter {...props} />;\n\nexport const FormComponentSelectMultiple = (props) => {\n const Components = useVulcanComponents();\n return <Components.FormComponentSelect multiple {...props} />;\n};\n","import React from \"react\";\nimport { FormInputProps } from \"../core/FormComponentInner\";\n\n// TODO: might need some sanitization\n// For consistency with Vulcan Meteor ui bootstrap and ui material\n// @see packages/vulcan-ui-bootstrap/lib/components/forms/FormItem.jsx\nexport const FormItem = (\n props: FormInputProps[\"itemProperties\"] &\n Pick<FormInputProps[\"inputProperties\"], \"label\" | \"name\">\n) => {\n const { inputProperties, label, name } = props;\n return (\n <div className={`form-item ${name}`}>\n <label htmlFor={name}>{label}</label>\n {props.children}\n </div>\n );\n};\n","import React from \"react\";\nimport type { FormOption } from \"../core/FormComponent\";\n\nexport interface FormOptionLabelProps\n extends React.HTMLProps<HTMLLabelElement> {\n option: FormOption;\n}\nexport const FormOptionLabel = ({ option, name }: FormOptionLabelProps) => {\n const { label } = option;\n // NOTE: for radio groups we might need to wrap this with a label? And maybe even for select?\n return (\n <label htmlFor={name} className=\"form-option-label\">\n {label}\n </label>\n );\n};\n","/**\n *\n * // Copied for bootstrap package\n * // TODO: find a more generic implementation\n *\n * Ideally for such a rich component we should also expose\n * hooks and internal logic so users can build their own\n */\nimport { AsyncTypeahead } from \"react-bootstrap-typeahead\"; // ES2015\nimport React, { useState } from \"react\";\n// We don't auto-expand queries in Vulcan NPM, since we don't use the registry pattern\n// anymore. Instead, provide the right fragments directly, using composition with string templates.\n//import { expandQueryFragments } from \"meteor/vulcan:core\";\nimport { useLazyQuery } from \"@apollo/client\";\nimport gql from \"graphql-tag\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\nimport type { FormInputProps } from \"../core/FormComponentInner\";\nimport { useFormContext } from \"../core/FormContext\";\n\nexport interface AutocompleteMultipleProps extends FormInputProps {}\nexport const AutocompleteMultiple = (props: AutocompleteMultipleProps) => {\n // TODO: some props are now comming from the context\n const {\n queryData,\n //updateCurrentValues,\n refFunction,\n path,\n inputProperties = {},\n itemProperties = {},\n autocompleteQuery,\n optionsFunction,\n } = props;\n\n const { updateCurrentValues } = useFormContext();\n\n const Components = useVulcanComponents();\n // MergeWithComponents should be handled at the Form level\n // by creating a new VulcanComponents context that merges default components\n // and components passed via props\n //const Components = mergeWithComponents(formComponents);\n\n const { value, label } = inputProperties;\n\n // store current autocomplete query string in local component state\n const [queryString, setQueryString] = useState<string | undefined>();\n\n // get component's autocomplete query and use it to load autocomplete suggestions\n // note: we use useLazyQuery because\n // we don't want to trigger the query until the user has actually typed in something\n const [loadAutocompleteOptions, { loading, error, data }] = useLazyQuery(\n gql(/*expandQueryFragments(*/ autocompleteQuery() /*)*/),\n {\n variables: { queryString },\n }\n );\n\n if (error) {\n // TODO: probably not the best way to displat the error\n throw new Error(error.message);\n }\n // apply options function to data to get suggestions in { value, label } pairs\n const autocompleteOptions = data && optionsFunction({ data });\n\n // apply same function to loaded data; filter by current value to avoid displaying any\n // extra unwanted items if field-level data loading loaded too many items\n const selectedItems =\n queryData &&\n optionsFunction({ data: queryData }).filter((d) =>\n (value as Array<any>).includes(d.value)\n );\n\n // console.log(queryData)\n // console.log(queryData && optionsFunction({ data: queryData }));\n // console.log(value)\n // console.log(selectedItems)\n\n return (\n <Components.FormItem\n {...props} /*path={path} label={label} {...itemProperties}*/\n {...itemProperties}\n name={path}\n >\n {/** @ts-ignore */}\n <AsyncTypeahead\n {...inputProperties}\n multiple\n onChange={(selected) => {\n const selectedIds = selected.map(\n // @ts-ignore Typing is wrong for some reason\n ({ value }) => value\n );\n updateCurrentValues({ [path]: selectedIds });\n }}\n options={autocompleteOptions}\n id={path}\n // passing id doesn't seem to work, we need input props\n inputProps={{ id: path }}\n ref={refFunction}\n onSearch={(queryString) => {\n setQueryString(queryString);\n loadAutocompleteOptions();\n }}\n isLoading={loading}\n selected={selectedItems}\n />\n </Components.FormItem>\n );\n};\n\n//registerComponent(\"FormComponentMultiAutocomplete\", MultiAutocomplete);\n","import { DatatableComponents } from \"../typings\";\n\nimport {\n Datatable,\n DatatableAbove,\n DatatableAboveLayout,\n DatatableAboveLeft,\n DatatableAboveRight,\n DatatableAboveSearchInput,\n DatatableLayout,\n} from \"../../Datatable/Datatable\";\nimport {\n DatatableContents,\n DatatableContentsBodyLayout,\n DatatableContentsHeadLayout,\n DatatableContentsInnerLayout,\n DatatableContentsLayout,\n DatatableContentsMoreLayout,\n DatatableEmpty,\n DatatableLoadMoreButton,\n DatatableTitle,\n} from \"../../Datatable/DatatableContents\";\nimport {\n DatatableHeader,\n DatatableHeaderCellLayout,\n} from \"../../Datatable/DatatableHeader\";\nimport { DatatableRow, DatatableRowLayout } from \"../../Datatable/DatatableRow\";\nimport {\n DatatableCell,\n DatatableCellLayout,\n DatatableDefaultCell,\n} from \"../../Datatable/DatatableCell\";\nimport {\n DatatableFilter,\n DatatableFilterBooleans,\n DatatableFilterCheckboxes,\n DatatableFilterContents,\n DatatableFilterContentsWithData,\n DatatableFilterDates,\n DatatableFilterNumbers,\n} from \"../../Datatable/DatatableFilter\";\nimport { DatatableSorter } from \"../../Datatable/DatatableSorter\";\nimport { DatatableSelect } from \"../../Datatable/DatatableSelect\";\nimport { DatatableSubmitSelected } from \"../../Datatable/DatatableSubmitSelected\";\nimport { EditButton, EditForm } from \"../../Datatable/others/EditButton\";\nimport { NewButton, NewForm } from \"../../Datatable/others/NewButton\";\nimport { DeleteButton } from \"../../Datatable/others/DeleteButton\";\n\nexport const defaultDatatableComponents: DatatableComponents = {\n Datatable: Datatable,\n // DatatableContents: DatatableContents\n DatatableAbove: DatatableAbove,\n DatatableAboveLayout: DatatableAboveLayout,\n DatatableAboveLeft: DatatableAboveLeft,\n DatatableAboveRight: DatatableAboveRight,\n DatatableAboveSearchInput: DatatableAboveSearchInput,\n DatatableLayout: DatatableLayout,\n // Contents\n DatatableContents: DatatableContents,\n DatatableContentsBodyLayout: DatatableContentsBodyLayout,\n DatatableContentsHeadLayout: DatatableContentsHeadLayout,\n DatatableContentsInnerLayout: DatatableContentsInnerLayout,\n DatatableContentsLayout: DatatableContentsLayout,\n DatatableContentsMoreLayout: DatatableContentsMoreLayout,\n DatatableEmpty: DatatableEmpty,\n DatatableLoadMoreButton: DatatableLoadMoreButton,\n DatatableTitle: DatatableTitle,\n // Header\n DatatableHeader: DatatableHeader,\n DatatableHeaderCellLayout: DatatableHeaderCellLayout,\n // Row\n DatatableRow: DatatableRow,\n DatatableRowLayout: DatatableRowLayout,\n // Cell\n DatatableCell: DatatableCell,\n DatatableCellLayout: DatatableCellLayout,\n DatatableDefaultCell: DatatableDefaultCell,\n // Filter\n DatatableFilter: DatatableFilter,\n DatatableFilterBooleans: DatatableFilterBooleans,\n DatatableFilterCheckboxes: DatatableFilterCheckboxes,\n DatatableFilterContents: DatatableFilterContents,\n DatatableFilterContentsWithData: DatatableFilterContentsWithData,\n DatatableFilterDates: DatatableFilterDates,\n DatatableFilterNumbers: DatatableFilterNumbers,\n // Sort\n DatatableSorter: DatatableSorter,\n // Select\n DatatableSelect: DatatableSelect,\n // SubmitSelect\n DatatableSubmitSelected: DatatableSubmitSelected,\n // Core\n EditButton: EditButton,\n EditForm: EditForm,\n NewButton: NewButton,\n NewForm: NewForm,\n DeleteButton: DeleteButton,\n};\n","//import { Utils, registerComponent, getCollection } from \"meteor/vulcan:lib\";\nimport React, { useEffect, useState } from \"react\";\n// import { intlShape } from \"meteor/vulcan:i18n\";\n// import qs from \"qs\";\n// import { withRouter } from \"react-router\";\n//import compose from \"recompose/compose\";\nimport _isEmpty from \"lodash/isEmpty.js\";\nimport _set from \"lodash/set.js\";\nimport _cloneDeep from \"lodash/cloneDeep.js\";\n//import withCurrentUser from \"../../containers/currentUser.js\";\n//import withComponents from \"../../containers/withComponents\";\n//import withMulti from \"../../containers/multi2.js\";\n//import Users from \"meteor/vulcan:users\";\nimport _get from \"lodash/get.js\";\n//import { getFieldType } from \"../form/modules/utils\";\nimport { useMulti } from \"@vulcanjs/react-hooks\";\nimport { VulcanModel } from \"@vulcanjs/model\";\nimport { VulcanGraphqlModel } from \"@vulcanjs/graphql\";\nimport { isAdmin } from \"@vulcanjs/permissions\";\n// NOTE: import from \"CONSUMER\" to avoid infinite loop\nimport { useVulcanComponents } from \"../VulcanComponents/Consumer\";\nimport { useIntlContext } from \"@vulcanjs/react-i18n\";\nimport { permissionCheck } from \"@vulcanjs/permissions\";\n\nconst ascSortOperator = \"asc\";\nconst descSortOperator = \"desc\";\n\n//const convertToBoolean = (s) => (s === \"true\" ? true : false);\n\n/*\n\nDatatable Component\n\n*/\n\n// see: http://stackoverflow.com/questions/1909441/jquery-keyup-delay\nconst delay = (function () {\n var timer: ReturnType<typeof setTimeout>;\n return function (callback, ms) {\n if (timer) {\n clearTimeout(timer);\n }\n timer = setTimeout(callback, ms);\n };\n})();\n\nexport interface DatatableProps<TData = any> {\n model: VulcanGraphqlModel;\n initialState?: any;\n /** Datatable will automatically alter the URL. Set to false when using more than 1 datatable on a page. */\n useUrlState?: boolean;\n\n title?: string;\n columns?: Array<any>;\n /** Force some data when using the datatable as a controlled input */\n data?: Array<TData>;\n options?: any;\n showEdit?: boolean;\n showDelete?: boolean;\n showNew?: boolean;\n showSearch?: boolean;\n newFormProps?: any;\n editFormProps?: any;\n rowClass?: any; //PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n // TODO: url management should happen via a hook, with the possibility to synchronize\n // or not the table based on the URL (in case we have 2 tables it must be disabled)\n location?: any; //PropTypes.shape({ search: PropTypes.string }).isRequired,\n // TODO: this props replace the direct calls to \"history\" to limit dependency to React router\n // it's type is similar to \"history.push\" from React router for the moment\n push: (options: { search?: string }) => void;\n\n currentUser?: any;\n modalProps?: any;\n onSubmitSelected?: any;\n}\n\n/**\n * TODO: currently we can only have one datable per page as they interact with the url directly\n * @param props\n * @returns\n */\nexport const Datatable = (props: DatatableProps) => {\n const [state, setState] = useState<any>({});\n const { initialState /*useUrlState, push*/ } = props;\n let initState: any = {\n searchValue: \"\",\n search: \"\",\n currentSort: {},\n currentFilters: {},\n selectedItems: [],\n };\n useEffect(() => {\n // initial state can be defined via props\n // note: this prop-originating initial state will *not* be reflected in the URL\n if (initialState) {\n if (initialState.search) {\n initState.searchValue = initialState.search;\n initState.search = initialState.search;\n }\n if (initialState.sort) {\n initState.currentSort = initialState.sort;\n }\n if (initialState.filter) {\n initState.currentFilters = initialState.filter;\n }\n }\n setState(initState);\n }, []);\n\n /** TODO: should be passed by the parent, we could expose helpers */\n /*\n const getUrlState = () => {\n const { location } = props;\n return qs.parse(location.search, { ignoreQueryPrefix: true });\n };*/\n\n /**\n * Convert url filter to number\n *\n * TODO: should be part of reusable hook\n * @param urlStateFilters\n * @returns\n */\n /*\n const convertToNumbers = (urlStateFilters) => {\n const convertedFilters = _cloneDeep(urlStateFilters);\n const { model } = props;\n\n // only try to convert when we have a collection schema\n if (model) {\n const schema = model.schema;\n\n Object.keys(urlStateFilters).forEach((fieldName) => {\n const field = schema[fieldName];\n const fieldType = getFieldType(field);\n const filter = urlStateFilters[fieldName];\n // the \"operator\" can be _in, _eq, _gte, etc.\n const [operator] = Object.keys(filter);\n const value = urlStateFilters[fieldName][operator];\n let convertedValue = value;\n // for each field, check if it's supposed to be a number\n if (fieldType === Number) {\n // value can be a single value or an array, depending on filter type\n convertedValue = Array.isArray(value)\n ? value.map(parseFloat)\n : parseFloat(value);\n } else if (fieldType === Boolean) {\n // value can be a single value or an array, depending on filter type\n convertedValue = Array.isArray(value)\n ? value.map(convertToBoolean)\n : convertToBoolean(value);\n }\n _set(convertedFilters, `${fieldName}.${operator}`, convertedValue);\n });\n }\n return convertedFilters;\n };*/\n\n // only load urlState if useUrlState is enabled\n /*\n if (useUrlState) {\n const urlState = getUrlState();\n if (urlState.search) {\n initState.searchValue = urlState.search;\n initState.search = urlState.search;\n }\n if (typeof urlState.sort === \"string\") {\n const [sortKey, sortValue] = urlState.sort.split(\"|\");\n initState.currentSort = { [sortKey]: sortValue };\n }\n if (urlState.filter) {\n // all URL values are stored as strings, so convert them back to numbers if needed\n initState.currentFilters = convertToNumbers(urlState.filter);\n }\n }*/\n\n /*\n\n If useUrlState is not enabled, do nothing\n\n */\n /*\n const updateQueryParameter = (key, value) => {\n if (useUrlState) {\n const urlState = getUrlState();\n\n if (value === null || value === \"\") {\n // when value is null or empty, remove key from URL state\n delete urlState[key];\n } else {\n urlState[key] = value;\n }\n const queryString = qs.stringify(urlState);\n push({\n search: `?${queryString}`,\n });\n /*\n history.push({\n search: `?${queryString}`,\n });\n */ /*\n }\n };\n*/\n /*\n\n Note: when state is asc, toggling goes to desc;\n but when state is desc toggling again removes sort.\n\n */\n const toggleSort = (column) => {\n let currentSort;\n let urlValue;\n if (!state.currentSort[column]) {\n currentSort = { [column]: ascSortOperator };\n urlValue = `${column}|${ascSortOperator}`;\n } else if (state.currentSort[column] === ascSortOperator) {\n currentSort = { [column]: descSortOperator };\n urlValue = `${column}|${descSortOperator}`;\n } else {\n currentSort = {};\n urlValue = null;\n }\n setState((currentState) => ({ ...currentState, currentSort }));\n // updateQueryParameter(\"sort\", urlValue);\n };\n\n const submitFilters = ({ name, filters }) => {\n // clone state filters object\n let newFilters = Object.assign({}, state.currentFilters);\n if (_isEmpty(filters)) {\n // if there are no filter options, remove column filter from state altogether\n delete newFilters[name];\n } else {\n // else, update filters\n newFilters[name] = filters;\n }\n setState((currentState) => ({\n ...currentState,\n currentFilters: newFilters,\n }));\n // updateQueryParameter(\"filter\", _isEmpty(newFilters) ? null : newFilters);\n };\n\n const updateSearch = (e) => {\n e.persist();\n e.preventDefault();\n const searchValue = e.target.value;\n setState({\n searchValue,\n });\n delay(() => {\n setState((currentState) => ({\n ...currentState,\n search: searchValue,\n }));\n // updateQueryParameter(\"search\", searchValue);\n }, 700);\n };\n\n const toggleItem = (id) => {\n const { selectedItems } = state;\n const newSelectedItems = selectedItems.includes(id)\n ? selectedItems.filter((x) => x !== id)\n : [...selectedItems, id];\n setState({\n selectedItems: newSelectedItems,\n });\n };\n\n const Components = useVulcanComponents();\n\n const { modalProps, data, currentUser, onSubmitSelected, model, options } =\n props;\n\n // Skip query when data are already provided via props\n const multiRes = useMulti({\n ...options,\n model,\n queryOptions: { skip: !!data },\n });\n if (data) {\n // static JSON datatable\n return (\n <Components.DatatableContents\n {...props}\n datatableData={data}\n totalCount={data.length}\n results={data}\n showEdit={false}\n showDelete={false}\n showNew={false}\n modalProps={modalProps}\n />\n );\n }\n // dynamic datatable with data loading\n /*\n const options = {\n collection\n ...options,\n };\n\n const DatatableWithMulti = compose(withMulti(options))(\n Components.DatatableContents\n );*/\n\n let canCreate = false;\n // new APIs\n const check = model.permissions.canCreate;\n\n // openCRUD backwards compatibility\n //const check = model.graphql.mutations.create.check;\n //_get(collection, \"options.mutations.new.check\") ||\n //_get(collection, \"options.mutations.create.check\");\n\n if (isAdmin(currentUser)) {\n canCreate = true;\n } else if (check) {\n canCreate = permissionCheck({\n check,\n user: currentUser,\n //context: { Users },\n operationName: \"create\",\n });\n } /* legacy \n else if (check) {\n canCreate = check && check(currentUser, {}, { Users });\n }*/\n\n const input: { search?: string; sort?: any; filter?: any } = {};\n if (!_isEmpty(state.search)) {\n input.search = state.search;\n }\n if (!_isEmpty(state.currentSort)) {\n input.sort = state.currentSort;\n }\n if (!_isEmpty(state.currentFilters)) {\n input.filter = state.currentFilters;\n }\n\n return (\n <Components.DatatableLayout\n model={model}\n //collectionName={collection.options.collectionName}\n >\n <Components.DatatableAbove\n {...props}\n model={model}\n canInsert={canCreate}\n canCreate={canCreate}\n searchValue={state.searchValue}\n updateSearch={updateSearch}\n selectedItems={state.selectedItems}\n onSubmitSelected={onSubmitSelected}\n />\n <Components.DatatableContents\n {...props}\n //datatableData={multiRes.documents}\n results={multiRes.documents}\n totalCount={multiRes.totalCount}\n count={multiRes.count}\n model={model}\n // TODO: check where this prop is used\n currentUser={currentUser}\n toggleSort={toggleSort}\n currentSort={state.currentSort}\n submitFilters={submitFilters}\n currentFilters={state.currentFilters}\n selectedItems={state.selectedItems}\n //input={input}\n toggleItem={toggleItem}\n />\n </Components.DatatableLayout>\n );\n};\n\nexport const DatatableLayout = ({\n model,\n children,\n}: {\n model: VulcanModel;\n children: React.ReactNode;\n}) => (\n <div className={`datatable datatable-${model.name.toLowerCase()}`}>\n {children}\n </div>\n);\n\n/*\n\nDatatableAbove Component\n\n*/\nexport const DatatableAbove = (props: any) => {\n const Components = useVulcanComponents();\n\n return (\n <Components.DatatableAboveLayout>\n <Components.DatatableAboveLeft {...props} />\n <Components.DatatableAboveRight {...props} />\n </Components.DatatableAboveLayout>\n );\n};\n\nexport const DatatableAboveLeft = (props) => {\n const { showSearch, searchValue, updateSearch } = props;\n const Components = useVulcanComponents();\n const intl = useIntlContext();\n return (\n <div className=\"datatable-above-left\">\n {showSearch && (\n <Components.DatatableAboveSearchInput\n className=\"datatable-search form-control\"\n inputProperties={{\n path: \"datatableSearchQuery\",\n placeholder: `${intl.formatMessage({\n id: \"datatable.search\",\n defaultMessage: \"Search\",\n })}…`,\n value: searchValue,\n onChange: updateSearch,\n }}\n />\n )}\n </div>\n );\n};\n\nexport const DatatableAboveRight = (props) => {\n const {\n currentUser,\n showNew,\n canInsert,\n options,\n newFormOptions,\n newFormProps,\n showSelect,\n selectedItems,\n onSubmitSelected,\n model,\n } = props;\n const Components = useVulcanComponents();\n return (\n <div className=\"datatable-above-right\">\n {showSelect && selectedItems.length > 0 && (\n <div className=\"datatable-above-item\">\n <Components.DatatableSubmitSelected\n selectedItems={selectedItems}\n onSubmitSelected={onSubmitSelected}\n />\n </div>\n )}\n {showNew && canInsert && (\n <div className=\"datatable-above-item\">\n <Components.NewButton\n model={model}\n currentUser={currentUser}\n mutationFragmentName={options && options.fragmentName}\n {...newFormOptions}\n {...newFormProps}\n />\n </div>\n )}\n </div>\n );\n};\n\nexport const DatatableAboveSearchInput = (props) => {\n const Components = useVulcanComponents();\n return (\n <div className=\"datatable-above-search-input\">\n <Components.FormComponentText {...props} />\n </div>\n );\n};\n\nexport const DatatableAboveLayout = ({ children }) => (\n <div className=\"datatable-above\">{children}</div>\n);\n","import React, { memo } from \"react\";\nimport _sortBy from \"lodash/sortBy.js\";\nimport { VulcanGraphqlModel } from \"@vulcanjs/graphql\";\nimport { useVulcanComponents } from \"../VulcanComponents\";\nimport { DatatableSelectControlledProps } from \"./DatatableSelect\";\n\nconst wrapColumns = (c) => ({ name: c });\n\nconst getColumns = (columns, results, data) => {\n if (columns) {\n // convert all columns to objects\n const convertedColums = columns.map((column) =>\n typeof column === \"object\" ? column : { name: column }\n );\n const sortedColumns = _sortBy(convertedColums, (column) => column.order);\n return sortedColumns;\n } else if (results && results.length > 0) {\n // if no columns are provided, default to using keys of first array item\n return Object.keys(results[0])\n .filter((k) => k !== \"__typename\")\n .map(wrapColumns);\n } else if (data) {\n // note: withMulti HoC also passes a prop named data, but in this case\n // data should be the prop passed to the Datatable\n return Object.keys(data[0]).map(wrapColumns);\n }\n return [];\n};\n\n/*\n\nDatatableContents Component\n\n*/\n\nexport interface DatatableContentsProps\n extends Partial<DatatableSelectControlledProps> {\n title?: string;\n model: VulcanGraphqlModel;\n datatableData?: Array<any>;\n results?: Array<any>; // = [],\n columns?: Array<any>;\n loading?: boolean;\n // Function passed by the hook\n // TODO: get from a \"typeof\" on useQuzery instead\n loadMore?: any;\n networkStatus?: any;\n //\n count?: number;\n totalCount?: number;\n showEdit?: boolean;\n showDelete?: boolean;\n showNew?: boolean;\n currentUser?: any;\n toggleSort?: any;\n currentSort?: any;\n submitFilters?: any;\n currentFilters?: any;\n modalProps?: any;\n error?: any;\n showSelect?: boolean;\n}\n\nexport const DatatableContents = (props: DatatableContentsProps) => {\n let {\n title = \"\",\n datatableData,\n results = [],\n columns,\n loading,\n loadMore,\n count = 0,\n totalCount = 0,\n networkStatus,\n showEdit,\n showDelete,\n currentUser,\n toggleSort,\n currentSort,\n submitFilters,\n currentFilters,\n modalProps,\n error,\n showSelect,\n model,\n } = props;\n const Components = useVulcanComponents();\n\n if (loading) {\n return (\n <div className=\"datatable-list datatable-list-loading\">\n <Components.Loading />\n </div>\n );\n }\n\n const isLoadingMore = networkStatus === 2;\n const hasMore = results && totalCount > results.length;\n\n const sortedColumns = getColumns(columns, results, datatableData);\n\n return (\n <Components.DatatableContentsLayout>\n {/* note: we want to be able to show potential errors while still showing the data below */}\n {error && (\n <Components.Alert variant=\"danger\">{error.message}</Components.Alert>\n )}\n {title && <Components.DatatableTitle title={title} />}\n <Components.DatatableContentsInnerLayout>\n <Components.DatatableContentsHeadLayout>\n {showSelect && <th />}\n {sortedColumns.map((column, index) => (\n <Components.DatatableHeader\n key={index}\n model={model}\n column={column}\n toggleSort={toggleSort}\n currentSort={currentSort}\n submitFilters={submitFilters}\n currentFilters={currentFilters}\n />\n ))}\n {showEdit ? (\n <th>\n <Components.FormattedMessage\n id=\"datatable.edit\"\n defaultMessage=\"Edit\"\n />\n </th>\n ) : null}\n {showDelete ? (\n <th>\n <Components.FormattedMessage\n id=\"datatable.delete\"\n defaultMessage=\"Delete\"\n />\n </th>\n ) : null}\n </Components.DatatableContentsHeadLayout>\n <Components.DatatableContentsBodyLayout>\n {results && results.length ? (\n results.map((document, index) => (\n <Components.DatatableRow\n {...props}\n model={model}\n columns={sortedColumns}\n document={document}\n key={index}\n showEdit={showEdit}\n showDelete={showDelete}\n currentUser={currentUser}\n modalProps={modalProps}\n />\n ))\n ) : (\n <Components.DatatableEmpty />\n )}\n </Components.DatatableContentsBodyLayout>\n </Components.DatatableContentsInnerLayout>\n {hasMore && (\n <Components.DatatableContentsMoreLayout>\n {isLoadingMore ? (\n <Components.Loading />\n ) : (\n <Components.DatatableLoadMoreButton\n count={count}\n totalCount={totalCount}\n onClick={(e) => {\n e.preventDefault();\n loadMore();\n }}\n >\n Load More ({count}/{totalCount})\n </Components.DatatableLoadMoreButton>\n )}\n </Components.DatatableContentsMoreLayout>\n )}\n </Components.DatatableContentsLayout>\n );\n};\nexport const DatatableContentsLayout = ({ children }) => (\n <div className=\"datatable-list\">{children}</div>\n);\n\nexport const DatatableContentsInnerLayout = ({ children }) => (\n <table className=\"table\">{children}</table>\n);\n\nexport const DatatableContentsHeadLayout = ({ children }) => (\n <thead>\n <tr>{children}</tr>\n </thead>\n);\n\nexport const DatatableContentsBodyLayout = ({ children }) => (\n <tbody>{children}</tbody>\n);\n\nexport const DatatableContentsMoreLayout = ({ children }) => (\n <div className=\"datatable-list-load-more\">{children}</div>\n);\n\nexport const DatatableLoadMoreButton = ({\n count,\n totalCount,\n children,\n ...otherProps\n}) => {\n const Components = useVulcanComponents();\n return (\n <Components.Button variant=\"primary\" {...otherProps}>\n {children}\n </Components.Button>\n );\n};\n/*\n\nDatatableTitle Component\n\n*/\nexport const DatatableTitle = ({ title }) => (\n <div className=\"datatable-title\">{title}</div>\n);\n\n/*\n\nDatatableEmpty Component\n\n*/\nexport const DatatableEmpty = () => {\n const Components = useVulcanComponents();\n return (\n <tr>\n <td colSpan={99}>\n <div style={{ textAlign: \"center\", padding: 10 }}>\n <Components.FormattedMessage\n id=\"datatable.empty\"\n defaultMessage=\"No items to display.\"\n />\n </div>\n </td>\n </tr>\n );\n};\n","import React from \"react\";\nimport { useIntlContext } from \"@vulcanjs/react-i18n\";\nimport { formatLabel } from \"@vulcanjs/i18n\";\nimport { VulcanModel } from \"@vulcanjs/model\";\nimport { useVulcanComponents } from \"../VulcanComponents\";\n\nexport interface DatatableColumnDefinition {\n name: string;\n label?: string;\n options?: any;\n filterComponent?: any;\n sortable?: boolean;\n filterable?: boolean;\n}\n/*\n\nDatatableHeader Component\n\n*/\nexport const DatatableHeader = ({\n model,\n column,\n toggleSort,\n currentSort,\n submitFilters,\n currentFilters,\n}: {\n model: VulcanModel;\n column: DatatableColumnDefinition;\n // TODO: reuse this type\n toggleSort?: any;\n currentSort?: any;\n submitFilters?: any;\n currentFilters?: any;\n}) => {\n const Components = useVulcanComponents();\n const intl = useIntlContext();\n // column label\n let formattedLabel;\n\n if (model) {\n const schema = model.schema;\n const field = schema[column.name];\n\n if (column.label) {\n formattedLabel = column.label;\n } else {\n /*\n \n use either:\n \n 1. the column name translation : `${collectionName}.${columnName}`, `global.${columnName}`, columnName\n 2. the column name label in the schema (if the column name matches a schema field)\n 3. the raw column name.\n \n */\n formattedLabel = formatLabel({\n intl,\n fieldName: column.name,\n collectionName: model.name,\n schema: schema,\n });\n }\n\n const fieldOptions = field && field.options;\n\n // for filter options, use either column.options or else the options property defined on the schema field\n const filterOptions = column.options ? column.options : fieldOptions;\n const filterQuery = field && field.staticQuery;\n\n return (\n <Components.DatatableHeaderCellLayout\n className={`datatable-header-${column.name}`}\n >\n <span className=\"datatable-header-cell-label\">{formattedLabel}</span>\n {column.sortable && (\n <Components.DatatableSorter\n name={column.name}\n label={formattedLabel}\n toggleSort={toggleSort}\n currentSort={currentSort}\n // TODO: those props were maybe needed when extending this component?\n // They are not used by the default version though\n //model={model}\n //field={field}\n //sortable={column.sortable}\n />\n )}\n {column.filterable && (\n <Components.DatatableFilter\n model={model}\n field={field}\n name={column.name}\n label={formattedLabel}\n query={filterQuery}\n options={filterOptions}\n submitFilters={submitFilters}\n columnFilters={currentFilters[column.name]}\n filterComponent={column.filterComponent}\n />\n )}\n </Components.DatatableHeaderCellLayout>\n );\n } else {\n const formattedLabel =\n column.label ||\n intl.formatMessage({ id: column.name, defaultMessage: column.name });\n return (\n <Components.DatatableHeaderCellLayout\n className={`datatable-th-${formattedLabel\n .toLowerCase()\n .replace(/\\s/g, \"-\")}`}\n >\n {formattedLabel}\n </Components.DatatableHeaderCellLayout>\n );\n }\n};\n\nexport const DatatableHeaderCellLayout = ({ children, ...otherProps }) => (\n <th {...otherProps}>\n <div className=\"datatable-header-cell-inner\">{children}</div>\n </th>\n);\n","import React, { memo } from \"react\";\nimport _isFunction from \"lodash/isFunction.js\";\nimport { useVulcanComponents } from \"../VulcanComponents\";\nimport { VulcanGraphqlModel } from \"@vulcanjs/graphql\";\nimport { isAdmin, permissionCheck, VulcanUser } from \"@vulcanjs/permissions\";\nimport { VulcanDocument } from \"@vulcanjs/schema\";\n\n/*\n\nDatatableRow Component\n\n*/\nexport const DatatableRow = (props: {\n model: VulcanGraphqlModel;\n columns: Array<any>;\n document: VulcanDocument;\n showEdit?: boolean;\n showDelete?: boolean;\n currentUser?: VulcanUser;\n options?: any;\n editFormOptions?: any;\n editFormProps?: any;\n rowClass?: any;\n showSelect?: any;\n toggleItem?: any;\n selectedItems?: any;\n modalProps?: any;\n}) => {\n const {\n model,\n columns,\n document,\n showEdit,\n showDelete,\n currentUser,\n options,\n editFormOptions,\n editFormProps,\n rowClass,\n showSelect,\n toggleItem,\n selectedItems,\n } = props;\n const Components = useVulcanComponents();\n\n let canUpdate = false;\n\n // new APIs\n const check = model.permissions.canUpdate;\n //get(collection, \"options.permissions.canUpdate\");\n // openCRUD backwards compatibility\n //const check =\n // get(collection, \"options.mutations.edit.check\") ||\n // get(collection, \"options.mutations.update.check\");\n\n if (isAdmin(currentUser)) {\n canUpdate = true;\n } else if (check) {\n canUpdate = permissionCheck({\n check,\n user: currentUser,\n document,\n //context: { Users },\n operationName: \"update\",\n });\n } /*\n legacy\n else if (check) {\n canUpdate = check && check(currentUser, document, { Users });\n }*/\n\n const row =\n typeof rowClass === \"function\" ? rowClass(document) : rowClass || \"\";\n const { modalProps = {} } = props;\n const defaultModalProps = { title: <code>{document._id}</code> };\n const customModalProps = {\n ...defaultModalProps,\n ...(_isFunction(modalProps) ? modalProps(document) : modalProps),\n };\n\n const isSelected = selectedItems && selectedItems.includes(document._id);\n\n return (\n <Components.DatatableRowLayout\n className={`datatable-item ${row} ${\n isSelected ? \"datatable-item-selected\" : \"\"\n }`}\n >\n {showSelect && (\n <Components.DatatableSelect\n document={document}\n toggleItem={toggleItem}\n selectedItems={selectedItems}\n />\n )}\n {columns.map((column, index) => (\n <Components.DatatableCell\n key={index}\n column={column}\n document={document}\n currentUser={currentUser}\n model={model}\n />\n ))}\n {showEdit && canUpdate ? ( // openCRUD backwards compatibility\n <Components.DatatableCellLayout className=\"datatable-edit\">\n <Components.EditButton\n model={model}\n documentId={document._id}\n currentUser={currentUser}\n mutationFragmentName={options && options.fragmentName}\n modalProps={customModalProps}\n {...editFormOptions}\n {...editFormProps}\n />\n </Components.DatatableCellLayout>\n ) : null}\n {showDelete && canUpdate ? ( // openCRUD backwards compatibility\n <Components.DatatableCellLayout className=\"datatable-delete\">\n <Components.DeleteButton\n model={model}\n documentId={document._id}\n currentUser={currentUser}\n //mutationFragmentName={options && options.fragmentName}\n />\n </Components.DatatableCellLayout>\n ) : null}\n </Components.DatatableRowLayout>\n );\n};\nexport const DatatableRowLayout = ({ children, ...otherProps }) => (\n <tr {...otherProps}>{children}</tr>\n);\n","import { VulcanModel } from \"@vulcanjs/model\";\nimport { VulcanUser } from \"@vulcanjs/permissions\";\nimport { VulcanDocument } from \"@vulcanjs/schema\";\nimport React from \"react\";\nimport {\n PossibleVulcanComponents,\n useVulcanComponents,\n} from \"../VulcanComponents\";\n\n/*\n\nDatatableCell Component\n\n*/\nexport const DatatableCell = ({\n column,\n document,\n currentUser,\n model,\n}: {\n column: {\n /** TODO: type should be more precise */\n component?: React.ComponentType<any>;\n /** @deprecated Prefer passing a component directly, except for Vulcan core form components\n * TODO: it should more precisely accept Cell components, they need to be listed specifically\n *\n */\n componentName?: keyof PossibleVulcanComponents;\n name?: string;\n label?: string;\n };\n document?: VulcanDocument;\n currentUser?: VulcanUser;\n model: VulcanModel;\n}) => {\n const Components = useVulcanComponents();\n const Component =\n column.component ||\n (column.componentName && Components[column.componentName]) ||\n Components.DatatableDefaultCell;\n const columnName = column.label || column.name;\n if (!columnName) throw new Error(\"Column should have name or label\");\n\n return (\n <Components.DatatableCellLayout\n className={`datatable-item-${columnName\n .toLowerCase()\n .replace(/\\s/g, \"-\")}`}\n >\n <Component\n column={column}\n document={document}\n currentUser={currentUser}\n model={model}\n />\n </Components.DatatableCellLayout>\n );\n};\n\nexport const DatatableCellLayout = ({ children, ...otherProps }) => (\n <td {...otherProps}>\n <div className=\"cell-contents\">{children}</div>\n </td>\n);\n\n/*\n\nDatatableDefaultCell Component\n\n*/\nexport const DatatableDefaultCell = ({ column, document, ...rest }) => {\n const Components = useVulcanComponents();\n return (\n <Components.CardItemSwitcher\n value={document[column.name]}\n document={document}\n fieldName={column.name}\n {...column}\n {...rest}\n />\n );\n};\n","import React, { useState } from \"react\";\nimport type { DocumentNode } from \"@apollo/client\";\n//import gql from \"graphql-tag\";\nimport { useQuery } from \"@apollo/client\";\nimport moment from \"moment\";\nimport isEmpty from \"lodash/isEmpty.js\";\nimport { useVulcanComponents } from \"../VulcanComponents\";\nimport { getFieldType } from \"../form/utils/utils\";\n\nconst getCount = (columnFilters) => {\n if (!columnFilters) {\n return 0;\n } else if (Array.isArray(columnFilters._in)) {\n return columnFilters._in.length;\n } else if (columnFilters._gte || columnFilters._lte) {\n if (columnFilters._gte && columnFilters._lte) {\n return 2;\n } else {\n return 1;\n }\n }\n return 0;\n};\n\nconst Filter = ({ count }) => (\n <svg\n width=\"16\"\n height=\"16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 448 512\"\n >\n <path\n fill=\"#000\"\n d=\"M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-6 400H54c-3.3 0-6-2.7-6-6V86c0-3.3 2.7-6 6-6h340c3.3 0 6 2.7 6 6v340c0 3.3-2.7 6-6 6z\"\n fillOpacity={count ? 0.8 : 0.3}\n />\n {count ? (\n <text\n x=\"50%\"\n y=\"55%\"\n fill=\"#000\"\n fontSize=\"300px\"\n textAnchor=\"middle\"\n alignmentBaseline=\"middle\"\n fillOpacity={0.8}\n >\n {count}\n </text>\n ) : (\n <path\n fill=\"#000\"\n d=\"M224 200v-16c0-13.3-10.7-24-24-24h-24v-20c0-6.6-5.4-12-12-12h-8c-6.6 0-12 5.4-12 12v20h-24c-13.3 0-24 10.7-24 24v16c0 13.3 10.7 24 24 24h24v148c0 6.6 5.4 12 12 12h8c6.6 0 12-5.4 12-12V224h24c13.3 0 24-10.7 24-24zM352 328v-16c0-13.3-10.7-24-24-24h-24V140c0-6.6-5.4-12-12-12h-8c-6.6 0-12 5.4-12 12v148h-24c-13.3 0-24 10.7-24 24v16c0 13.3 10.7 24 24 24h24v20c0 6.6 5.4 12 12 12h8c6.6 0 12-5.4 12-12v-20h24c13.3 0 24-10.7 24-24z\"\n fillOpacity={0.3}\n />\n )}\n </svg>\n);\n\nexport const DatatableFilter = (props) => {\n const Components = useVulcanComponents();\n const { columnFilters, label, query } = props;\n return (\n <span className=\"datatable-filter\">\n <Components.ModalTrigger\n title={\n <Components.FormattedMessage\n id=\"datatable.filter_column\"\n values={{ label }}\n defaultMessage={`Filter “${label}”`}\n />\n }\n size=\"small\"\n trigger={<Filter count={getCount(columnFilters)} />}\n >\n {query ? (\n <Components.DatatableFilterContentsWithData {...props} />\n ) : (\n <Components.DatatableFilterContents {...props} />\n )}\n </Components.ModalTrigger>\n </span>\n );\n};\n\n/*\n\nDatatableFilterContents Components\n\n*/\n\nexport const DatatableFilterContentsWithData = (props: {\n /** NOTE: previously we were expecting text, now we want a gql document directly */\n query: DocumentNode | ((options: { mode: \"static\" }) => DocumentNode);\n options?: any;\n}) => {\n const Components = useVulcanComponents();\n const { query, options } = props;\n\n // if query is a function, execute it\n const queryGql =\n typeof query === \"function\" ? query({ mode: \"static\" }) : query;\n const filterQuery = queryGql;\n\n const { loading, error, data } = useQuery(filterQuery);\n\n if (loading) {\n return <Components.Loading />;\n } else if (error) {\n return <p>error</p>;\n } else {\n // note: options function expects the entire props object\n const queryOptions = options({ data });\n return (\n <Components.DatatableFilterContents {...props} options={queryOptions} />\n );\n }\n};\n\nexport const DatatableFilterContents = (props) => {\n const {\n name,\n field,\n options,\n columnFilters,\n submitFilters,\n filterComponent,\n } = props;\n const Components = useVulcanComponents();\n const fieldType = getFieldType(field);\n\n const [filters, setFilters] = useState(columnFilters);\n\n const filterProps = { ...props, filters, setFilters };\n\n let contents;\n\n if (filterComponent) {\n const CustomFilter = filterComponent;\n contents = <CustomFilter {...filterProps} />;\n } else if (options) {\n contents = <Components.DatatableFilterCheckboxes {...filterProps} />;\n } else {\n switch (fieldType) {\n case Date:\n contents = <Components.DatatableFilterDates {...filterProps} />;\n break;\n\n case Number:\n contents = <Components.DatatableFilterNumbers {...filterProps} />;\n break;\n\n case Boolean:\n contents = <Components.DatatableFilterBooleans {...filterProps} />;\n break;\n\n default:\n contents = (\n <p>\n <Components.FormattedMessage\n id=\"datatable.specify_option\"\n defaultMessage=\"Please specify an options property on your schema field.\"\n />\n </p>\n );\n }\n }\n\n return (\n <form>\n {contents}\n <Components.Button\n variant=\"link\"\n style={{ display: \"inline-block\", marginRight: 10 }}\n className=\"datatable_filter_clear\"\n onClick={() => {\n setFilters(undefined);\n }}\n >\n <Components.FormattedMessage\n id=\"datatable.clear_all\"\n defaultMessage=\"Clear All\"\n />\n </Components.Button>\n <Components.Button\n type=\"submit\"\n className=\"datatable_filter_submit\"\n onClick={() => {\n submitFilters({ name, filters });\n }}\n >\n <Components.FormattedMessage\n id=\"datatable.submit\"\n defaultMessage=\"Submit\"\n />\n </Components.Button>\n </form>\n );\n};\n\n/*\n\nFilter Types Components\n\nNote: the operators used here should match the ones handled server-side by\nthe filtering API (_in, _gte, _lte, etc.)\n\n*/\n\n/*\n\nCheckboxes\n\nOperator: _in\n\n*/\nexport type CheckboxOperator = \"_in\";\nconst checkboxOperator: CheckboxOperator = \"_in\";\nexport const DatatableFilterCheckboxes = ({\n options,\n filters = { _in: [] },\n setFilters,\n}: {\n options?: any;\n filters?: { [operator in CheckboxOperator]: Array<any> };\n setFilters?: any;\n}) => {\n const Components = useVulcanComponents();\n return (\n <Components.FormComponentCheckboxGroup\n path=\"filter\"\n itemProperties={{ layout: \"inputOnly\" }}\n inputProperties={{ options }}\n value={filters[checkboxOperator]}\n updateCurrentValues={({ filter: newValues }) => {\n if (isEmpty(newValues)) {\n setFilters(undefined);\n } else {\n setFilters({ [checkboxOperator]: newValues });\n }\n }}\n />\n );\n};\n\n/*\n\nBooleans\n\n*/\nconst booleanOptions = [\n { label: \"True\", value: true },\n { label: \"False\", value: false },\n];\nexport const DatatableFilterBooleans = ({\n filters = { _eq: [] },\n setFilters,\n}) => {\n const Components = useVulcanComponents();\n return (\n <Components.FormComponentRadioGroup\n path=\"filter\"\n itemProperties={{ layout: \"inputOnly\" }}\n inputProperties={{\n options: booleanOptions,\n value: filters[\"_eq\"],\n onChange: (e) => {\n const value = e.target.value; // note: this will be a string\n setFilters({ _eq: value === \"true\" ? true : false });\n },\n }}\n />\n );\n};\n\n/*\n\nDates\n\nOperators: _gte and _lte\n\n*/\nexport const DatatableFilterDates = ({ filters, setFilters }) => {\n const Components = useVulcanComponents();\n return (\n <div>\n <Components.FormComponentDate\n path=\"_gte\"\n itemProperties={{\n label: (\n <Components.FormattedMessage\n id=\"datatable.after\"\n defaultMessage=\"After\"\n />\n ),\n layout: \"horizontal\",\n }}\n inputProperties={{}}\n value={filters && moment(filters._gte, \"YYYY-MM-DD\")}\n updateCurrentValues={(newValues) => {\n if (!newValues._gte || newValues._gte === \"\") {\n const newFilters = Object.assign({}, filters);\n delete newFilters._gte;\n setFilters(newFilters);\n } else {\n setFilters({\n ...filters,\n _gte: newValues._gte.format(\"YYYY-MM-DD\"),\n });\n }\n }}\n />\n <Components.FormComponentDate\n path=\"_lte\"\n itemProperties={{\n label: (\n <Components.FormattedMessage\n id=\"datatable.before\"\n defaultMessage=\"Before\"\n />\n ),\n layout: \"horizontal\",\n }}\n inputProperties={{}}\n value={filters && moment(filters._lte, \"YYYY-MM-DD\")}\n updateCurrentValues={(newValues) => {\n if (!newValues._lte || newValues._lte === \"\") {\n const newFilters = Object.assign({}, filters);\n delete newFilters._lte;\n setFilters(newFilters);\n } else {\n setFilters({\n ...filters,\n _lte: newValues._lte.format(\"YYYY-MM-DD\"),\n });\n }\n }}\n />\n </div>\n );\n};\n\n/*\n\nNumbers\n\nOperators: _gte and _lte\n\n*/\nexport const DatatableFilterNumbers = ({ filters, setFilters }) => {\n const Components = useVulcanComponents();\n return (\n <div>\n <Components.FormComponentNumber\n path=\"_gte\"\n itemProperties={{\n label: (\n <Components.FormattedMessage\n id=\"datatable.greater_than\"\n defaultMessage=\"Greater than\"\n />\n ),\n layout: \"horizontal\",\n }}\n inputProperties={{\n onChange: (event) => {\n const value = event.target.value;\n if (!value || value === \"\") {\n const newFilters = Object.assign({}, filters);\n delete newFilters._gte;\n setFilters(newFilters);\n } else {\n setFilters({ ...filters, _gte: value });\n }\n },\n value: filters && parseFloat(filters._gte),\n }}\n />\n <Components.FormComponentNumber\n path=\"_lte\"\n itemProperties={{\n label: (\n <Components.FormattedMessage\n id=\"datatable.lower_than\"\n defaultMessage=\"Lower than\"\n />\n ),\n layout: \"horizontal\",\n }}\n inputProperties={{\n onChange: (event) => {\n const value = event.target.value;\n if (!value) {\n const newFilters = Object.assign({}, filters);\n delete newFilters._lte;\n setFilters(newFilters);\n } else {\n setFilters({ ...filters, _lte: value });\n }\n },\n value: filters && parseFloat(filters._lte),\n }}\n />\n </div>\n );\n};\n","import React from \"react\";\n\nconst SortNone = () => (\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 438 438\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M25.7368 247.243H280.263C303.149 247.243 314.592 274.958 298.444 291.116L171.18 418.456C161.128 428.515 144.872 428.515 134.926 418.456L7.55631 291.116C-8.59221 274.958 2.85078 247.243 25.7368 247.243ZM298.444 134.884L171.18 7.54408C161.128 -2.51469 144.872 -2.51469 134.926 7.54408L7.55631 134.884C-8.59221 151.042 2.85078 178.757 25.7368 178.757H280.263C303.149 178.757 314.592 151.042 298.444 134.884Z\"\n transform=\"translate(66 6)\"\n fill=\"#000\"\n fillOpacity=\"0.2\"\n />\n </svg>\n);\n\nconst SortDesc = () => (\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 438 438\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M25.7368 0H280.263C303.149 0 314.592 27.7151 298.444 43.8734L171.18 171.213C161.128 181.272 144.872 181.272 134.926 171.213L7.55631 43.8734C-8.59221 27.7151 2.85078 0 25.7368 0Z\"\n transform=\"translate(66 253.243)\"\n fill=\"black\"\n fillOpacity=\"0.7\"\n />\n <path\n d=\"M171.18 7.54408L298.444 134.884C314.592 151.042 303.149 178.757 280.263 178.757H25.7368C2.85078 178.757 -8.59221 151.042 7.55631 134.884L134.926 7.54408C144.872 -2.51469 161.128 -2.51469 171.18 7.54408Z\"\n transform=\"translate(66 6)\"\n fill=\"black\"\n fillOpacity=\"0.2\"\n />\n </svg>\n);\n\nconst SortAsc = () => (\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 438 438\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M298.444 134.884L171.18 7.54408C161.128 -2.51469 144.872 -2.51469 134.926 7.54408L7.55631 134.884C-8.59221 151.042 2.85078 178.757 25.7368 178.757H280.263C303.149 178.757 314.592 151.042 298.444 134.884Z\"\n transform=\"translate(66 6)\"\n fill=\"black\"\n fillOpacity=\"0.7\"\n />\n <path\n d=\"M280.263 0H25.7368C2.85078 0 -8.59221 27.7151 7.55631 43.8734L134.926 171.213C144.872 181.272 161.128 181.272 171.18 171.213L298.444 43.8734C314.592 27.7151 303.149 0 280.263 0Z\"\n transform=\"translate(66 253.243)\"\n fill=\"black\"\n fillOpacity=\"0.2\"\n />\n </svg>\n);\n\nexport const DatatableSorter = ({ name, label, toggleSort, currentSort }) => (\n <span\n className=\"datatable-sorter\"\n onClick={() => {\n toggleSort(name);\n }}\n >\n {!currentSort[name] ? (\n <SortNone />\n ) : currentSort[name] === \"asc\" ? (\n <SortAsc />\n ) : (\n <SortDesc />\n )}\n </span>\n);\n","import { VulcanDocument } from \"@vulcanjs/schema\";\nimport React from \"react\";\nimport { useVulcanComponents } from \"../VulcanComponents\";\n\nexport interface DatatableSelectControlledProps {\n selectedItems: Array<string>;\n toggleItem: (itemId: string) => void;\n}\nexport interface DatatableSelectProps extends DatatableSelectControlledProps {\n document: VulcanDocument;\n}\n/*\n\nDatatableSelect Component\n\n*/\nexport const DatatableSelect = ({\n toggleItem,\n selectedItems,\n document,\n}: DatatableSelectProps) => {\n const value = selectedItems.includes(document._id || \"\");\n const onChange = (e) => {\n if (!document._id) throw new Error(\"Cannot toggle item without _id\");\n toggleItem(document._id);\n };\n const Components = useVulcanComponents();\n return (\n <Components.DatatableCellLayout className=\"datatable-check\">\n <Components.FormComponentCheckbox\n inputProperties={{ value, onChange }}\n itemProperties={{ layout: \"elementOnly\" }}\n />\n </Components.DatatableCellLayout>\n );\n};\n","import React from \"react\";\nimport { useVulcanComponents } from \"../VulcanComponents\";\n\n/*\n\nDatatableSelect Component\n\n*/\nexport const DatatableSubmitSelected = ({\n selectedItems,\n onSubmitSelected,\n}) => {\n const Components = useVulcanComponents();\n\n return (\n <Components.Button\n className=\"datatable-submit-selected\"\n onClick={(e) => {\n e.preventDefault();\n onSubmitSelected(selectedItems);\n }}\n >\n <Components.FormattedMessage id=\"datatable.submit\" />\n </Components.Button>\n );\n};\n","import { useIntlContext } from \"@vulcanjs/react-i18n\";\nimport { VulcanDocument } from \"@vulcanjs/schema\";\nimport React from \"react\";\nimport { useVulcanComponents } from \"../../VulcanComponents\";\n\nexport const EditButton = ({\n style = \"primary\",\n variant,\n label,\n size,\n showId,\n modalProps,\n formProps,\n component,\n ...props\n}) => {\n const Components = useVulcanComponents();\n const intl = useIntlContext();\n return (\n <Components.ModalTrigger\n label={\n label ||\n intl.formatMessage({ id: \"datatable.edit\", defaultMessage: \"Edit\" })\n }\n component={\n component ? (\n component\n ) : (\n <Components.Button size={size} variant={variant || style}>\n {label || (\n <Components.FormattedMessage\n id=\"datatable.edit\"\n defaultMessage=\"Edit\"\n />\n )}\n </Components.Button>\n )\n }\n modalProps={modalProps}\n >\n <Components.EditForm\n closeModal={() => {\n console.warn(\"closeModal not defined\");\n }}\n {...props}\n formProps={formProps}\n />\n </Components.ModalTrigger>\n );\n};\n\n/*\n\nEditForm Component\n\n*/\nexport const EditForm = ({\n closeModal,\n successCallback,\n removeSuccessCallback,\n formProps,\n ...props\n}: {\n successCallback?: (document: VulcanDocument) => void;\n closeModal: () => void;\n removeSuccessCallback?: (document: VulcanDocument) => void;\n formProps?: any;\n}) => {\n const Components = useVulcanComponents();\n const success = successCallback\n ? (document) => {\n successCallback(document);\n closeModal();\n }\n : () => {\n closeModal();\n };\n\n const remove = removeSuccessCallback\n ? (document) => {\n removeSuccessCallback(document);\n closeModal();\n }\n : () => {\n closeModal();\n };\n\n return (\n <Components.SmartForm\n successCallback={success}\n removeSuccessCallback={remove}\n {...formProps}\n {...props}\n />\n );\n};\n","import { useIntlContext } from \"@vulcanjs/react-i18n\";\nimport { VulcanModel } from \"@vulcanjs/model\";\nimport { VulcanDocument } from \"@vulcanjs/schema\";\nimport React from \"react\";\nimport type { SmartFormProps } from \"../../form\";\nimport type { ButtonProps } from \"../../core/Button\";\nimport { useVulcanComponents } from \"../../VulcanComponents\";\n\nexport const NewButton = ({\n size,\n label,\n style = \"primary\",\n formProps,\n ...props\n}: {\n model: VulcanModel;\n label?: string;\n formProps?: Partial<SmartFormProps>;\n} & Pick<ButtonProps, \"size\"> & {\n style?: ButtonProps[\"variant\"];\n } & NewFormProps) => {\n const intl = useIntlContext();\n const Components = useVulcanComponents();\n return (\n <Components.ModalTrigger\n label={label || intl.formatMessage({ id: \"datatable.new\" })}\n title={label || intl.formatMessage({ id: \"datatable.new\" })}\n component={\n <Components.Button variant={style} size={size}>\n {label || <Components.FormattedMessage id=\"datatable.new\" />}\n </Components.Button>\n }\n >\n <Components.NewForm formProps={formProps} {...props} />\n </Components.ModalTrigger>\n );\n};\n\nexport interface NewFormProps {\n model: VulcanModel;\n successCallback?: (document: VulcanDocument) => void;\n closeModal: () => void;\n formProps?: Partial<SmartFormProps>;\n}\n/*\n\nNewForm Component\n\n*/\nexport const NewForm = ({\n model,\n closeModal,\n successCallback,\n formProps,\n}: NewFormProps) => {\n const Components = useVulcanComponents();\n const success = successCallback\n ? (document) => {\n successCallback(document);\n closeModal();\n }\n : () => {\n closeModal();\n };\n\n return (\n <Components.SmartForm\n model={model}\n successCallback={success}\n {...(formProps || {})}\n />\n );\n};\n","import { VulcanGraphqlModel } from \"@vulcanjs/graphql\";\nimport { VulcanUser } from \"@vulcanjs/permissions\";\nimport { useDelete } from \"@vulcanjs/react-hooks\";\nimport { DocumentNode } from \"graphql\";\nimport React from \"react\";\nimport { useVulcanComponents } from \"../../VulcanComponents\";\n\nexport const DeleteButton = (props: {\n label?: string;\n fragment?: DocumentNode;\n documentId?: string;\n mutationOptions?: any;\n currentUser?: VulcanUser;\n model: VulcanGraphqlModel;\n}) => {\n const Components = useVulcanComponents();\n const {\n label,\n fragment,\n documentId,\n mutationOptions,\n currentUser,\n model,\n ...rest\n } = props;\n const [deleteFunction, { loading }] = useDelete({\n model,\n fragment,\n mutationOptions,\n });\n\n return (\n <Components.LoadingButton\n loading={loading}\n onClick={() => {\n deleteFunction({ input: { id: documentId } });\n }}\n label={\n label || (\n <Components.FormattedMessage\n id=\"datatable.delete\"\n defaultMessage=\"Delete\"\n />\n )\n }\n {...rest}\n />\n );\n};\n","/**\n * Used by DataTable and Cards\n */\nimport { CellComponents } from \"..\";\nimport { CardItemSwitcher } from \"../../cell/CardItem\";\nimport {\n CardItemRelationItem,\n DefaultCell,\n UserCell,\n} from \"../../cell/CardItemRelationItem\";\nimport { CardItemArray } from \"../../cell/CardItemArray\";\nimport { CardItemDate } from \"../../cell/CardItemDate\";\nimport { CardItemDefault } from \"../../cell/CardItemDefault\";\nimport { CardItemHTML } from \"../../cell/CardItemHTML\";\nimport { CardItemImage } from \"../../cell/CardItemImage\";\nimport { CardItemNumber } from \"../../cell/CardItemNumber\";\nimport { CardItemObject } from \"../../cell/CardItemObject\";\nimport { CardItemRelationHasMany } from \"../../cell/CardItemRelationHasMany\";\nimport { CardItemRelationHasOne } from \"../../cell/CardItemRelationHasOne\";\nimport { CardItemString } from \"../../cell/CardItemString\";\nimport { CardItemURL } from \"../../cell/CardItemURL\";\n\nexport const defaultCellComponents: CellComponents = {\n CardItemSwitcher: CardItemSwitcher,\n CardItem: CardItemSwitcher,\n DefaultCell: DefaultCell,\n UserCell: UserCell,\n CardItemArray: CardItemArray,\n CardItemDate: CardItemDate,\n CardItemDefault: CardItemDefault,\n CardItemHTML: CardItemHTML,\n CardItemImage: CardItemImage,\n CardItemNumber: CardItemNumber,\n CardItemObject: CardItemObject,\n CardItemRelationHasMany: CardItemRelationHasMany,\n CardItemRelationHasOne: CardItemRelationHasOne,\n CardItemRelationItem: CardItemRelationItem,\n CardItemString: CardItemString,\n CardItemURL: CardItemURL,\n};\n","import { VulcanGraphqlModel } from \"@vulcanjs/graphql\";\nimport { VulcanFieldSchema } from \"@vulcanjs/schema\";\nimport { VulcanDocument } from \"@vulcanjs/schema\";\nimport React from \"react\";\nimport { useVulcanComponents } from \"../VulcanComponents\";\n\nconst getTypeName = (\n value: any,\n fieldName: string,\n model: VulcanGraphqlModel\n) => {\n const schema = model.schema;\n const fieldSchema = schema && schema[fieldName];\n if (fieldSchema) {\n // TODO: not 100% sure it works\n const type = fieldSchema.type; //.singleType;\n const typeName = typeof type === \"function\" ? type.name : type;\n return typeName + \"\";\n } else {\n return typeof value;\n }\n};\n\nconst getFieldSchema = (fieldName: string, model: VulcanGraphqlModel) => {\n const schema = model.schema;\n const fieldSchema = schema && schema[fieldName];\n return fieldSchema;\n};\n\nexport interface CellProps {\n nestingLevel?: number;\n value?: any;\n typeName?: string;\n contents?: any;\n fieldName?: string;\n model?: VulcanGraphqlModel;\n document?: VulcanDocument;\n}\n/**\n * Also used by the DataTable to render each cell\n *\n * TODO: move to its own \"Cell\" folder\n * TODO: nesting and relations are not yet very well handled\n * @param props\n * @returns\n */\nexport const CardItemSwitcher = (props: CellProps) => {\n const Components = useVulcanComponents();\n // if typeName is not provided, default to typeof value\n // note: contents provides additional clues about the contents (image, video, etc.)\n\n const {\n nestingLevel = 0,\n value,\n contents,\n fieldName,\n document,\n model,\n } = props;\n let { typeName } = props;\n\n // NOTE: we don't necessarilly have a model or schema, eg when nesting the render\n const fieldSchema =\n model && fieldName ? getFieldSchema(fieldName, model) : undefined;\n\n if (!typeName) {\n if (model && fieldName) {\n typeName = getTypeName(value, fieldName, model);\n } else {\n typeName = typeof value;\n }\n }\n\n // no value; we return an empty string\n if (typeof value === \"undefined\" || value === null) {\n return <>\"\"</>;\n }\n\n const itemProps: Pick<\n CellProps,\n \"nestingLevel\" | \"document\" | \"fieldName\" | \"model\"\n > & { value: any } & {\n fieldSchema?: VulcanFieldSchema;\n relatedFieldName?: string;\n relatedDocument?: any;\n relatedModel?: VulcanGraphqlModel;\n } = {\n nestingLevel: nestingLevel + 1,\n value,\n document,\n fieldName,\n model,\n fieldSchema,\n };\n\n // JSX element\n if (React.isValidElement(itemProps.value)) {\n return itemProps.value;\n }\n\n // Relation\n if (fieldSchema && fieldSchema.resolveAs && fieldSchema.resolveAs.relation) {\n itemProps.relatedFieldName =\n //fieldSchema.resolveAs?.fieldName ||\n fieldSchema.relation?.fieldName || fieldName;\n itemProps.relatedDocument = document?.[itemProps.relatedFieldName || \"\"];\n // TODO: typing is not good\n // @ts-ignore\n itemProps.relatedModel = fieldSchema.relation?.model;\n // TODO: how to get the model from a resolveAs or relation?\n /*\n itemProps.relatedCollection = getCollectionByTypeName(\n fieldSchema.resolveAs.typeName || fieldSchema.resolveAs.type\n );*/\n\n if (!itemProps.relatedDocument) {\n return (\n <span>\n Missing data for sub-document <code>{value}</code> of type{\" \"}\n <code>{typeName}</code> (<code>{itemProps.relatedFieldName}</code>)\n </span>\n );\n }\n\n switch (fieldSchema.relation?.kind) {\n case \"hasOne\":\n return <Components.CardItemRelationHasOne {...itemProps} />;\n\n case \"hasMany\":\n return <Components.CardItemRelationHasMany {...itemProps} />;\n\n default:\n return <Components.CardItemDefault {...itemProps} />;\n }\n }\n\n // Array\n if (Array.isArray(value)) {\n typeName = \"Array\";\n }\n\n switch (typeName) {\n case \"Boolean\":\n case \"boolean\":\n case \"Number\":\n case \"number\":\n case \"SimpleSchema.Integer\":\n return <Components.CardItemNumber {...itemProps} />;\n\n case \"Array\":\n return <Components.CardItemArray {...itemProps} />;\n\n case \"Object\":\n case \"object\":\n return <Components.CardItemObject {...itemProps} />;\n\n case \"Date\":\n return <Components.CardItemDate {...itemProps} />;\n\n case \"String\":\n case \"string\":\n switch (contents) {\n case \"html\":\n return <Components.CardItemHTML {...itemProps} />;\n\n case \"date\":\n return <Components.CardItemDate {...itemProps} />;\n\n case \"image\":\n return <Components.CardItemImage {...itemProps} force={true} />;\n\n case \"url\":\n return <Components.CardItemURL {...itemProps} force={true} />;\n\n default:\n // still attempt to parse string as an image or URL if possible\n return <Components.CardItemImage {...itemProps} />;\n }\n\n default:\n return <Components.CardItemDefault {...itemProps} />;\n }\n};\n","import { VulcanGraphqlModel } from \"@vulcanjs/graphql\";\nimport { VulcanDocument } from \"@vulcanjs/schema\";\nimport React from \"react\";\n// import { Link } from \"react-router-dom\";\nimport { useVulcanComponents } from \"../VulcanComponents\";\n\n/*\n\nTokens are components used to display an invidual element like a user name, \nlink to a post, category name, etc. \n\nThe naming convention is Type+Token, e.g. UserToken, PostToken, CategoryToken…\n\n*/\n\n// Relation Item\nexport const CardItemRelationItem = ({\n relatedDocument,\n relatedModel,\n}: {\n relatedDocument: VulcanDocument;\n relatedModel: VulcanGraphqlModel;\n}) => {\n const Components = useVulcanComponents();\n const label =\n // TODO: we could reenable this getLabel option to label documents of a model\n /*relatedModel.options.getLabel\n ? relatedModel.options.getLabel(relatedDocument)\n :*/ relatedDocument._id;\n const typeName = relatedDocument.__typename;\n const Cell = Components[`${typeName}Cell`];\n return Cell ? (\n <Cell document={relatedDocument} label={label} Components={Components} />\n ) : (\n <Components.DefaultCell document={relatedDocument} label={label} />\n );\n};\n\n// Default Cell\nexport const DefaultCell = ({ document, label }) => (\n <li className=\"relation-default-cell\">\n {document.pagePath ? (\n //<Link to={document.pagePath}>{label}</Link>\n <a href={document.pagePath}>{label}</a>\n ) : (\n <span>{label}</span>\n )}\n </li>\n);\n\n// User Token\nexport const UserCell = ({ document }) => {\n const Components = useVulcanComponents();\n return (\n <div className=\"contents-user user-item\">\n {/*<Components.Avatar size=\"small\" user={document} />*/}\n {document.pagePath ? (\n <a className=\"user-item-name\" href={document.pagePath}>\n {document.displayName}\n </a>\n ) : (\n /*\n <Link className=\"user-item-name\" to={document.pagePath}>\n {document.displayName}\n </Link>\n */\n <span className=\"user-item-name\">{document.displayName}</span>\n )}\n </div>\n );\n};\n","import React from \"react\";\nimport { useVulcanComponents } from \"../VulcanComponents\";\n\n// Array\nexport const CardItemArray = ({\n nestingLevel,\n value,\n}: {\n nestingLevel?: number;\n value: any;\n}) => {\n const Components = useVulcanComponents();\n return (\n <ol className=\"contents-array\">\n {value.map((item, index) => (\n <li key={index}>\n {\n <Components.CardItem\n value={item}\n typeName={typeof item}\n nestingLevel={nestingLevel}\n />\n }\n </li>\n ))}\n </ol>\n );\n};\n","import React from \"react\";\n// TODO: load moment dynamically instead?\nimport moment from \"moment\";\n\n// Date\nexport const CardItemDate = ({ value }) => (\n <span className=\"contents-date\">\n {moment(new Date(value)).format(\"YYYY/MM/DD, hh:mm\")}\n </span>\n);\n","import React from \"react\";\n\n// Default\nexport const CardItemDefault = ({ value }: { value?: any }) => (\n <span>{value && value.toString()}</span>\n);\n","import React from \"react\";\n\n// HTML\nexport const CardItemHTML = ({ value }) => (\n <div className=\"contents-html\" dangerouslySetInnerHTML={{ __html: value }} />\n);\n","import React from \"react\";\nimport { useVulcanComponents } from \"../VulcanComponents\";\n\n/*\n\nCard Item Components\n\n*/\n\n/**\n * NOTE: in Next.js you might want to replace this component with\n * the built-in image component?\n *\n * @param param0\n * @returns\n */\nexport const CardItemImage = ({ value, force = false }) => {\n const Components = useVulcanComponents();\n const isImage =\n [\".png\", \".jpg\", \".gif\"].indexOf(value.substr(-4)) !== -1 ||\n [\".webp\", \".jpeg\"].indexOf(value.substr(-5)) !== -1;\n return isImage || force ? (\n <img\n className=\"contents-image\"\n style={{ width: \"100%\", minWidth: 80, maxWidth: 200, display: \"block\" }}\n src={value}\n alt={value}\n />\n ) : (\n <Components.CardItemURL value={value} />\n );\n};\n","import React from \"react\";\n\n// Number\nexport const CardItemNumber = ({ value }: { value?: any }) => (\n <code className=\"contents-number\">{value.toString()}</code>\n);\n","import React from \"react\";\n// import { Link } from \"react-router-dom\";\nimport without from \"lodash/without.js\";\nimport { useVulcanComponents } from \"../VulcanComponents\";\n\n// Object\nexport const CardItemObject = (props) => {\n const { nestingLevel, value, showExpand } = props;\n const Components = useVulcanComponents();\n const showExpandControl = showExpand || nestingLevel > 1;\n if (value.__typename === \"User\") {\n const user = value;\n\n return (\n <div className=\"dashboard-user\" style={{ whiteSpace: \"nowrap\" }}>\n {/* TODO: we should allow to pass a custom cell for each model instead of providing our own cell for users */}\n {/*<Components.Avatar size=\"small\" user={user} link />*/}\n {user.pagePath ? (\n <a href={user.pagePath}>{user.displayName}</a>\n ) : (\n /*<Link to={user.pagePath}>{user.displayName}</Link>*/\n <span>{user.displayName}</span>\n )}\n </div>\n );\n } else {\n return (\n <div className=\"card-item-details\">\n {showExpandControl ? (\n <details>\n <summary>Expand</summary>\n <CardItemObjectContents {...props} />\n </details>\n ) : (\n <CardItemObjectContents {...props} />\n )}\n </div>\n );\n }\n};\n\nconst CardItemObjectContents = ({ nestingLevel, value: object }) => {\n const Components = useVulcanComponents();\n return (\n <table className=\"table table-bordered\">\n <tbody>\n {without(Object.keys(object), \"__typename\").map((key) => (\n <tr key={key}>\n <td>\n <strong>{key}</strong>\n </td>\n <td>\n <Components.CardItemSwitcher\n nestingLevel={nestingLevel}\n value={object[key]}\n typeName={typeof object[key]}\n />\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n );\n};\n","import React from \"react\";\nimport { useVulcanComponents } from \"../VulcanComponents\";\n\n// HasMany Relation\nexport const CardItemRelationHasMany = ({\n relatedDocument: relatedDocuments,\n ...rest\n}: any) => {\n const Components = useVulcanComponents();\n return (\n <div className=\"contents-hasmany\">\n {relatedDocuments.map((relatedDocument) => (\n <Components.CardItemRelationItem\n key={relatedDocument._id}\n relatedDocument={relatedDocument}\n {...rest}\n />\n ))}\n </div>\n );\n};\n","import React from \"react\";\nimport { useVulcanComponents } from \"../VulcanComponents\";\n\n// HasOne Relation\nexport const CardItemRelationHasOne = ({ ...rest }: any) => {\n const Components = useVulcanComponents();\n return (\n <div className=\"contents-hasone\">\n {<Components.CardItemRelationItem {...rest} />}\n </div>\n );\n};\n","import React from \"react\";\n\n// String\nexport const CardItemString = ({ string }) => (\n <div className=\"contents-string\">\n {string.indexOf(\" \") === -1 && string.length > 30 ? (\n <span title={string}>{string.substr(0, 30)}…</span>\n ) : (\n <span>{string}</span>\n )}\n </div>\n);\n","import React from \"react\";\nimport { useVulcanComponents } from \"../VulcanComponents\";\n\n// URL\nexport const CardItemURL = ({\n value,\n force,\n}: {\n value?: any;\n force?: boolean;\n}) => {\n const Components = useVulcanComponents();\n return force || value.slice(0, 4) === \"http\" ? (\n <a\n className=\"contents-link\"\n href={value}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <Components.CardItemString string={value} />\n </a>\n ) : (\n <Components.CardItemString string={value} />\n );\n};\n","import { FormattedMessage } from \"@vulcanjs/react-i18n\";\nimport { Button } from \"../../core/Button\";\nimport { Loading } from \"../../core/Loading\";\n\nimport { LoadingButton } from \"../../LoadingButton\";\nimport { MutationButton } from \"../../MutationButton\";\nimport { HeadTags } from \"../../HeadTags\";\n\n// TODO: rewrite to remove dep to react-bootstrap\nimport { TooltipTrigger } from \"../../bootstrap/TooltipTrigger\";\nimport Dropdown from \"../../bootstrap/Dropdown\";\n\nimport type { PossibleCoreComponents } from \"../typings\";\nimport { BootstrapModal } from \"../../bootstrap/Modal\";\nimport { ModalTrigger } from \"../../bootstrap/ModalTrigger\";\n\n/**\n * Minimal set of components, mandatory to operate Vulcan React UI\n */\nexport const defaultCoreComponents: PossibleCoreComponents = {\n // core components taht were used in forms\n Loading,\n Alert: () => null,\n Button,\n Icon: () => null,\n // i18n\n FormattedMessage,\n // core\n LoadingButton,\n MutationButton,\n HeadTags,\n //\n TooltipTrigger,\n Dropdown,\n Modal: BootstrapModal,\n ModalTrigger,\n};\n","import React from \"react\";\n\n// @see https://stackoverflow.com/questions/51835611/specify-specific-props-and-accept-general-html-props-in-typescript-react-app\nexport type ButtonProps = React.DetailedHTMLProps<\n React.HTMLAttributes<HTMLButtonElement>,\n HTMLButtonElement\n> &\n // The any is important here: we allow end-application to \"hack\" the component with a custom replacement implementation,\n // so we authorize them to pass additionnal unknown props\n any;\n\n// TODO: whitelist HTMLButton props\nexport const Button: React.FC = ({ children, ...props }) => (\n <button {...props}>{children}</button>\n);\n","import React from \"react\";\n// @see https://dockyard.com/blog/2020/03/02/accessible-loading-indicatorswith-no-extra-elements\nexport const Loading = () => (\n <span aria-live=\"polite\" aria-busy=\"true\">\n Loading...\n </span>\n);\n","import React, { CSSProperties } from \"react\";\nimport type { ButtonProps } from \"./core/Button\";\nimport { useVulcanComponents } from \"./VulcanComponents/Consumer\";\nexport interface LoadingButtonProps extends ButtonProps {\n loading?: boolean;\n label?: string | React.ReactNode;\n onClick?: any;\n children?: React.ReactNode;\n className?: string;\n}\nexport const LoadingButton = ({\n loading,\n label,\n onClick,\n children,\n className = \"\",\n ...rest\n}: LoadingButtonProps & any) => {\n const Components = useVulcanComponents();\n\n const wrapperStyle: CSSProperties = {\n position: \"relative\",\n };\n\n const labelStyle = loading ? { opacity: 0.5 } : {};\n\n const loadingStyle: CSSProperties = loading\n ? {\n position: \"absolute\",\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n }\n : { display: \"none\" };\n\n return (\n <Components.Button\n className={`loading-button ${\n loading ? \"loading-button-loading\" : \"loading-button-notloading\"\n } ${className}`}\n onClick={onClick}\n {...rest}\n >\n <span style={wrapperStyle}>\n <span style={labelStyle}>{label || children}</span>\n <span style={loadingStyle}>\n <Components.Loading />\n </span>\n </span>\n </Components.Button>\n );\n};\n","/*\n\nExample Usage\n\n<Components.MutationButton\n label=\"Cancel Subscription\"\n variant=\"primary\"\n mutationOptions={{\n name: 'cancelSubscription',\n args: { bookingId: 'String' },\n fragmentName: 'BookingsStripeDataFragment',\n }}\n mutationArguments={{ bookingId: booking._id }}\n submitCallback={() => {}}\n successCallback={result => { console.log(result) }}\n/>\n\n*/\nimport React, { useState } from \"react\";\nimport { DocumentNode } from \"graphql\";\nimport { MutationHookOptions, useMutation } from \"@apollo/client\";\nimport gql from \"graphql-tag\";\nimport { useVulcanComponents } from \"./VulcanComponents/Consumer\";\nimport { LoadingButtonProps } from \"./LoadingButton\";\n// import withMutation from '../containers/registeredMutation';\n\n// TODO:\n/**\n * Difference with Vulcan Meteor: there is no\n * registered mutation anymore,\n * so you need to pass your mutations explicitely, using graphql\n */\n/*\nexport class MutationButton extends PureComponent {\n constructor(props) {\n super(props);\n this.button = withMutation(props.mutationOptions)(MutationButtonInner);\n }\n\n render() {\n const Component = this.button;\n return <Component {...this.props} />;\n }\n}*/\n\nexport interface MutationButtonProps {\n /**\n * NOTE: in Vulcan Meteor you had to write:\n * mutationOptions: { name: \"foobar\", mutationOptions: {refetchQueries:[\"hello\"]}}\n *\n * In Vulcan Next, you can only pass the \"mutationOptions\" object:\n * mutationOptions: { refetchQueries:[\"hello\"]}\n * and the mutation is provided via the new \"mutation\" prop\n */\n mutationOptions?: MutationHookOptions;\n /**\n * @example\n mutation: gql`\n mutation sampleMutation($input: Input) {\n hello\n }\n `,\n */\n mutation: string | DocumentNode;\n /** Variables passed to the mutation (NOTE: we can't pass other options at the moment) */\n mutationArguments?: MutationHookOptions<any>[\"variables\"];\n /** Callback run before submitting. Can optionnaly return mutationArguments that will override current ones. */\n submitCallback?: (\n mutationArgumentsFromProps: MutationHookOptions<any>[\"variables\"]\n ) =>\n | void\n | { mutationArguments: MutationHookOptions<any>[\"variables\"] }\n | Promise<void | {\n mutationArguments: MutationHookOptions<any>[\"variables\"];\n }>;\n successCallback?: (res: any) => void | Promise<void>;\n errorCallback?: (err: any) => void | Promise<void>;\n /** Now isolated into their own object to avoid needed to explicitely pick/omit */\n loadingButtonProps?: LoadingButtonProps;\n /** Shortcut for loadingButtonProps.label */\n label?: string | React.ReactNode;\n}\nexport const MutationButton = (props: MutationButtonProps) => {\n const Components = useVulcanComponents();\n const [loading, setLoading] = useState<boolean>(false);\n const [error, setError] = useState<any | undefined>();\n\n const {\n //mutationOptions,\n mutation,\n loadingButtonProps = {},\n label,\n } = props;\n let { mutationArguments } = props;\n const mutationAsNode =\n typeof mutation === \"string\"\n ? gql`\n ${mutation}\n `\n : mutation;\n const [mutationFunc] = useMutation(mutationAsNode);\n\n const handleClick = async (e) => {\n e.preventDefault();\n setLoading(true);\n setError(undefined);\n const {\n //mutationOptions,\n submitCallback,\n successCallback,\n errorCallback,\n } = props;\n //const mutationName = mutationOptions.name;\n //const mutation = this.props[mutationName];\n\n try {\n if (submitCallback) {\n const callbackReturn = await submitCallback(mutationArguments);\n if (callbackReturn && callbackReturn.mutationArguments) {\n mutationArguments = callbackReturn.mutationArguments;\n }\n }\n const result = await mutationFunc({ variables: mutationArguments });\n if (successCallback) {\n await successCallback(result);\n }\n } catch (error) {\n // TODO: may not work because the mutationFunc may not throw in case of error\n setError(error);\n if (errorCallback) {\n await errorCallback(error);\n }\n } finally {\n setLoading(false);\n }\n\n // mutation(mutationArguments)\n // .then(result => {\n // this.setState({ loading: false });\n // if (successCallback) {\n // successCallback(result);\n // }\n // })\n // .catch(error => {\n // this.setState({ loading: false });\n // if (errorCallback) {\n // errorCallback(error);\n // }\n // });\n };\n\n //const mutationName = this.props.mutationOptions.name;\n\n const loadingButton = (\n <Components.LoadingButton\n loading={loading}\n onClick={handleClick}\n label={label}\n {...loadingButtonProps}\n />\n );\n\n if (error) {\n return (\n <Components.TooltipTrigger trigger={loadingButton} defaultShow={true}>\n {error.message.replace(\"GraphQL error: \", \"\")}\n </Components.TooltipTrigger>\n );\n }\n return loadingButton;\n};\n","import React, { PureComponent } from \"react\";\nimport PropTypes from \"prop-types\";\n// import { Helmet } from 'react-helmet';\n// import { registerComponent, Utils, getSetting, registerSetting, Head } from 'meteor/vulcan:lib';\n// import compose from \"recompose/compose\";\n\n// registerSetting('logoUrl', null, 'Absolute URL for the logo image');\n// registerSetting('title', 'My App', 'App title');\n// registerSetting('tagline', null, 'App tagline');\n// registerSetting('description');\n// registerSetting('siteImage', null, 'An image used to represent the site on social media');\n// registerSetting('faviconUrl', '/img/favicon.ico', 'Favicon absolute URL');\n\nexport interface HeadTagsProps {\n url: string;\n title: string;\n description?: string;\n image: string;\n siteUrl: string;\n faviconUrl?: string;\n}\n/**\n *\n * Create basic social meta tags for a page\n * (Facebook, Twitter)\n *\n * NOTE: you are responsible for wrapping those tags in\n * next/head, Helmet or whatever solution you use for\n * head tags decentralization\n *\n *\n */\nexport class HeadTags extends PureComponent<HeadTagsProps> {\n render() {\n console.warn(\n \"HeadTags won't work in Next.js, because Head doesn't support nesting. Define meta directly in your app instead.\"\n );\n const { url, title, description, siteUrl, faviconUrl } = this.props;\n let image = this.props.image;\n /*\n const url = url; //|| Utils.getSiteUrl();\n const title = title; //|| getSetting(\"title\", \"My App\");\n const description = description; /* ||\n getSetting(\"tagline\") ||\n getSetting(\"description\"); */\n // default image meta: logo url, else site image defined in settings\n //let image = logoUrl; /*!!getSetting(\"siteImage\")\n //? getSetting(\"siteImage\")\n //: getSetting(\"logoUrl\");*/\n\n // overwrite default image if one is passed as props\n //if (!!this.props.image) {\n // image = this.props.image;\n //}\n\n // add site url base if the image is stored locally\n if (!!image && image.indexOf(\"//\") === -1) {\n // remove starting slash from image path if needed\n if (image.charAt(0) === \"/\") {\n image = image.slice(1);\n }\n image = /*getSiteUrl()*/ siteUrl + image;\n }\n\n return (\n <>\n <title>{title}</title>\n\n <meta charSet=\"utf-8\" />\n <meta name=\"description\" content={description} />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n\n {/* facebook */}\n <meta property=\"og:type\" content=\"article\" />\n <meta property=\"og:url\" content={url} />\n <meta property=\"og:image\" content={image} />\n <meta property=\"og:title\" content={title} />\n <meta property=\"og:description\" content={description} />\n\n {/* twitter */}\n <meta name=\"twitter:card\" content=\"summary\" />\n <meta name=\"twitter:image:src\" content={image} />\n <meta name=\"twitter:title\" content={title} />\n <meta name=\"twitter:description\" content={description} />\n\n <link rel=\"canonical\" href={url} />\n <link\n //name=\"favicon\"\n rel=\"shortcut icon\"\n href={faviconUrl || \"/favicon.ico\"}\n />\n\n {/**\n * Not needed as we expect the end application use either Helmet at app level\n * or next/head\n * \n {Head.meta.map((tag, index) => (\n <meta key={index} {...tag} />\n ))}\n {Head.link.map((tag, index) => (\n <link key={index} {...tag} />\n ))}\n {Head.script.map((tag, index) => (\n <script key={index} {...tag}>\n {tag.contents}\n </script>\n ))}\n\n {Head.components.map((componentOrArray, index) => {\n let HeadComponent;\n if (Array.isArray(componentOrArray)) {\n const [component, ...hocs] = componentOrArray;\n HeadComponent = compose(...hocs)(component);\n } else {\n HeadComponent = componentOrArray;\n }\n return <HeadComponent key={index} />;\n })}\n */}\n </>\n );\n }\n}\n\n/*\nHeadTags.propTypes = {\n url: PropTypes.string,\n title: PropTypes.string,\n description: PropTypes.string,\n image: PropTypes.string,\n};\n*/\n","/*\n\nchildren: the content of the tooltip\ntrigger: the component that triggers the tooltip to appear\n\n*/\nimport React from \"react\";\n// import Tooltip from 'react-bootstrap/Tooltip';\n// import OverlayTrigger from 'react-bootstrap/OverlayTrigger';\n\n/**\n * Display a tooltip when hovering an item\n */\nexport const TooltipTrigger = ({\n children,\n trigger,\n //placement = \"top\",\n //...rest\n}) => {\n return <div title={children}>{trigger}</div>;\n /*\n const tooltip = <Tooltip id=\"tooltip\">{children}</Tooltip>;\n\n return (\n <OverlayTrigger placement={placement} {...rest} overlay={tooltip}>\n {trigger}\n </OverlayTrigger>\n );*/\n};\n","// TODO: uses react bootstrap a lot, need a refactor\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Dropdown, DropdownButton } from \"react-bootstrap\";\nconst DropdownItem = Dropdown.Item;\nimport { useVulcanComponents } from \"../VulcanComponents\";\n// import { LinkContainer } from \"react-router-bootstrap\";\n\n/*\n\nNote: `rest` is used to ensure auto-generated props from parent dropdown\ncomponents are properly passed down to MenuItem\n\n*/\nconst Item = ({\n index,\n //to,\n labelId,\n label,\n component,\n componentProps = {},\n itemProps,\n //linkProps,\n ...rest\n}: any) => {\n const Components = useVulcanComponents();\n let menuComponent;\n\n if (component) {\n menuComponent = React.cloneElement(component, componentProps);\n } else if (labelId) {\n menuComponent = <Components.FormattedMessage id={labelId} />;\n } else {\n menuComponent = <span>{label}</span>;\n }\n\n const item = (\n <DropdownItem eventKey={index} {...itemProps} {...rest}>\n {menuComponent}\n </DropdownItem>\n );\n\n /*\n @depreacted Instead wrap the item yourself with the relevant link\n return to ? (\n <LinkContainer to={to} {...linkProps}>\n {item}\n </LinkContainer>\n ) : (\n item\n );*/\n return item;\n};\n\nItem.propTypes = {\n index: PropTypes.number, // index\n to: PropTypes.any, // a string or object, used to generate the router path for the menu item\n labelId: PropTypes.string, // an i18n id for the item label\n label: PropTypes.string, // item label string, used if id is not provided\n component: PropTypes.object, // a component to use as menu item\n componentProps: PropTypes.object, // props passed to the component\n itemProps: PropTypes.object, // props for the <MenuItem/> component\n};\n/*\n\nA node contains a menu item, and optionally a list of child items\n\n*/\nconst Node = ({ childrenItems, ...rest }) => {\n return (\n <>\n <Item {...rest} />\n {childrenItems && !!childrenItems.length && (\n <div className=\"menu-node-children\">\n {childrenItems.map((item, index) => (\n <Item key={index} {...item} />\n ))}\n </div>\n )}\n </>\n );\n};\n\nNode.propTypes = {\n childrenItems: PropTypes.array, // an array of dropdown items used as children of the current item\n};\n\nconst BootstrapDropdown = ({\n label,\n labelId,\n trigger,\n menuItems,\n menuContents,\n variant = \"dropdown\",\n buttonProps,\n ...dropdownProps\n}) => {\n const Components = useVulcanComponents();\n const menuBody = menuContents\n ? menuContents\n : menuItems.map((item, index) => {\n if (item === \"divider\") {\n return <Dropdown.Divider key={index} />;\n } else {\n return <Node {...item} key={index} index={index} />;\n }\n });\n\n if (variant === \"flat\") {\n return menuBody;\n } else {\n if (trigger) {\n // if a trigger component has been provided, use it\n return (\n <Dropdown {...dropdownProps}>\n <Dropdown.Toggle>{trigger}</Dropdown.Toggle>\n <Dropdown.Menu>{menuBody}</Dropdown.Menu>\n </Dropdown>\n );\n } else {\n // else default to DropdownButton\n return (\n <DropdownButton\n {...buttonProps}\n title={labelId ? <Components.FormattedMessage id={labelId} /> : label}\n {...dropdownProps}\n >\n {menuBody}\n </DropdownButton>\n );\n }\n }\n};\n\nBootstrapDropdown.propTypes = {\n labelId: PropTypes.string, // menu title/label i18n string\n label: PropTypes.string, // menu title/label\n trigger: PropTypes.object, // component used as menu trigger (the part you click to open the menu)\n menuContents: PropTypes.object, // a component specifying the menu contents\n menuItems: PropTypes.array, // an array of menu items, used if menuContents is not provided\n variant: PropTypes.string, // dropdown (default) or flat\n buttonProps: PropTypes.object, // props specific to the dropdown button\n};\n\nexport default BootstrapDropdown;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Modal } from \"react-bootstrap\";\n\nexport const BootstrapModal = ({\n children,\n size = \"lg\" as const,\n show = false,\n onHide,\n title,\n showCloseButton = true,\n header,\n footer,\n ...rest\n}) => {\n let headerComponent;\n if (header) {\n headerComponent = <Modal.Header>{header}</Modal.Header>;\n } else if (title) {\n headerComponent = (\n <Modal.Header closeButton={showCloseButton}>\n <Modal.Title>{title}</Modal.Title>\n </Modal.Header>\n );\n } else {\n headerComponent = (\n <Modal.Header closeButton={showCloseButton}></Modal.Header>\n );\n }\n\n const footerComponent = footer ? <Modal.Footer>{footer}</Modal.Footer> : null;\n\n return (\n <Modal size={size} show={show} onHide={onHide} {...rest}>\n {headerComponent}\n <Modal.Body>{children}</Modal.Body>\n {footerComponent}\n </Modal>\n );\n};\n\nBootstrapModal.propTypes = {\n size: PropTypes.string,\n show: PropTypes.bool,\n showCloseButton: PropTypes.bool,\n onHide: PropTypes.func,\n title: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n header: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n footer: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n};\n","import React, { useState } from \"react\";\nimport { useVulcanComponents } from \"../VulcanComponents\";\n\nexport const ModalTrigger = (props: {\n openCallback?: () => void;\n closeCallback?: () => void;\n onClick?: () => void;\n trigger?: any;\n component?: any;\n children?: any;\n label?: string | React.ReactNode;\n size?: string;\n className?: string;\n dialogClassName?: string;\n title?: string | React.ReactNode;\n modalProps?: any;\n header?: any;\n footer?: any;\n}) => {\n const [modalIsOpen, setModalIsOpen] = useState(false);\n const { onClick, openCallback, closeCallback } = props;\n\n const clickHandler = (e) => {\n e.preventDefault();\n if (onClick) {\n onClick();\n }\n openModal();\n };\n\n const openModal = () => {\n if (openCallback) {\n openCallback();\n }\n setModalIsOpen(true);\n };\n\n const closeModal = () => {\n if (closeCallback) {\n closeCallback();\n }\n setModalIsOpen(false);\n };\n const Components = useVulcanComponents();\n\n const {\n trigger,\n component,\n children,\n label,\n size,\n className,\n dialogClassName,\n title,\n modalProps,\n header,\n footer,\n } = props;\n\n let triggerComponent = trigger || component;\n triggerComponent = triggerComponent ? (\n <span onClick={clickHandler}>{triggerComponent}</span>\n ) : (\n <Components.Button onClick={clickHandler}>{label}</Components.Button>\n );\n const childrenComponent = React.cloneElement(children, {\n closeModal,\n });\n const headerComponent = header && React.cloneElement(header, { closeModal });\n const footerComponent = footer && React.cloneElement(footer, { closeModal });\n\n return (\n <div className=\"modal-trigger\">\n {triggerComponent}\n <Components.Modal\n size={size}\n className={className}\n show={modalIsOpen}\n onHide={closeModal}\n dialogClassName={dialogClassName}\n title={title}\n header={headerComponent}\n footer={footerComponent}\n {...modalProps}\n >\n {childrenComponent}\n </Components.Modal>\n </div>\n );\n};\n","import React from \"react\";\n// Load only the type, to define the API for each component\n// TODO: maybe do the reverse, define the props here and an unstyled version of the component?\nimport type { FormSubmitProps } from \"../form/elements\";\nimport type { ButtonProps } from \"../core/Button\";\nimport type { MutationButtonProps } from \"../MutationButton\";\n\n// datatable\nimport type {\n Datatable,\n DatatableAbove,\n DatatableAboveLayout,\n DatatableAboveLeft,\n DatatableAboveRight,\n DatatableAboveSearchInput,\n DatatableLayout,\n} from \"../Datatable/Datatable\";\nimport type {\n DatatableContents,\n DatatableContentsBodyLayout,\n DatatableContentsHeadLayout,\n DatatableContentsInnerLayout,\n DatatableContentsLayout,\n DatatableContentsMoreLayout,\n DatatableEmpty,\n DatatableLoadMoreButton,\n DatatableTitle,\n} from \"../Datatable/DatatableContents\";\nimport type {\n DatatableHeader,\n DatatableHeaderCellLayout,\n} from \"../Datatable/DatatableHeader\";\nimport type {\n DatatableRow,\n DatatableRowLayout,\n} from \"../Datatable/DatatableRow\";\nimport type {\n DatatableCell,\n DatatableCellLayout,\n DatatableDefaultCell,\n} from \"../Datatable/DatatableCell\";\nimport type {\n DatatableFilter,\n DatatableFilterBooleans,\n DatatableFilterCheckboxes,\n DatatableFilterContents,\n DatatableFilterContentsWithData,\n DatatableFilterDates,\n DatatableFilterNumbers,\n} from \"../Datatable/DatatableFilter\";\nimport type { DatatableSorter } from \"../Datatable/DatatableSorter\";\nimport type { DatatableSelect } from \"../Datatable/DatatableSelect\";\nimport type { DatatableSubmitSelected } from \"../Datatable/DatatableSubmitSelected\";\nimport type { EditButton, EditForm } from \"../Datatable/others/EditButton\";\nimport type { NewButton, NewForm } from \"../Datatable/others/NewButton\";\nimport type { DeleteButton } from \"../Datatable/others/DeleteButton\";\nimport type { BootstrapModal as Modal } from \"../bootstrap/Modal\";\n// Cell\nimport type { CardItemSwitcher } from \"../cell/CardItem\";\nimport type {\n CardItemRelationItem,\n DefaultCell,\n UserCell,\n} from \"../cell/CardItemRelationItem\";\nimport type { CardItemArray } from \"../cell/CardItemArray\";\nimport type { CardItemDate } from \"../cell/CardItemDate\";\nimport type { CardItemDefault } from \"../cell/CardItemDefault\";\nimport type { CardItemHTML } from \"../cell/CardItemHTML\";\nimport type { CardItemImage } from \"../cell/CardItemImage\";\nimport type { CardItemNumber } from \"../cell/CardItemNumber\";\nimport type { CardItemObject } from \"../cell/CardItemObject\";\nimport type { CardItemRelationHasMany } from \"../cell/CardItemRelationHasMany\";\nimport type { CardItemRelationHasOne } from \"../cell/CardItemRelationHasOne\";\nimport type { CardItemString } from \"../cell/CardItemString\";\nimport type { CardItemURL } from \"../cell/CardItemURL\";\nimport type { ModalTrigger } from \"../bootstrap/ModalTrigger\";\nimport type { FormOptionLabelProps } from \"../form/inputs/FormOptionLabel\";\n\nexport interface PossibleCoreComponents {\n Loading: any;\n FormattedMessage: any;\n Alert: any;\n Button: React.ComponentType<ButtonProps>;\n Icon: any;\n // TODO: define props more precisely\n MutationButton: React.ComponentType<MutationButtonProps>;\n LoadingButton: React.ComponentType<any>;\n HeadTags: React.ComponentType<any>;\n // Previously from Bootstrap and Mui\n TooltipTrigger: React.ComponentType<any>;\n Dropdown: React.ComponentType<any>;\n Modal: typeof Modal;\n ModalTrigger: typeof ModalTrigger;\n}\n// TODO: differentiate components that are provided out of the box and those that require a UI frameworK?\nexport interface PossibleFormComponents {\n FormError: any; // FieldErrors\n // From FormComponent\n FormComponentDefault: any;\n /** Alias of the default FormComponent */\n FormComponentText: any;\n FormComponentPassword: any;\n FormComponentNumber: any;\n FormComponentUrl: any;\n FormComponentEmail: any;\n FormComponentTextarea: any;\n FormComponentCheckbox: any;\n FormComponentCheckboxGroup: any;\n FormComponentRadioGroup: any;\n FormComponentSelect: any;\n FormComponentSelectMultiple: any;\n FormComponentDateTime: any;\n FormComponentDate: any;\n // FormComponentDate2: any;\n FormComponentTime: any;\n FormComponentStaticText: any;\n FormComponentLikert: any;\n FormComponentAutocomplete: any;\n FormComponentMultiAutocomplete: any;\n //\n FormComponent: any;\n FormComponentInner: any;\n FormComponentLoader: any;\n FormElement: any;\n FormGroup: any;\n FormGroupLayout: any;\n FormGroupHeader: any;\n // intl\n FormIntlLayout: any;\n FormIntlItemLayout: any;\n FormIntl: any;\n // Layout\n FormErrors: any;\n FormSubmit: React.ComponentType<FormSubmitProps>;\n FormLayout: any;\n\n // arrays and objects\n FormNestedArray: any;\n FormNestedArrayInnerLayout: any;\n FormNestedArrayLayout: any;\n FormNestedItem: any;\n IconAdd: any;\n IconRemove: any;\n FieldErrors: any;\n FormNestedDivider: any;\n //\n FormNestedItemLayout: any;\n FormNestedObjectLayout: any;\n FormNestedObject: any;\n FormOptionLabel: React.ComponentType<FormOptionLabelProps>;\n // Form\n Form: any;\n SmartForm: any;\n // Used by ui-boostrap and ui-material\n FormItem;\n // flag to detect parent state\n __not_initialized?: boolean;\n}\n\nexport interface DatatableComponents {\n Datatable: typeof Datatable;\n // DatatableContents: typeof DatatableContents\n DatatableAbove: typeof DatatableAbove;\n DatatableAboveLayout: typeof DatatableAboveLayout;\n DatatableAboveLeft: typeof DatatableAboveLeft;\n DatatableAboveRight: typeof DatatableAboveRight;\n DatatableAboveSearchInput: typeof DatatableAboveSearchInput;\n DatatableLayout: typeof DatatableLayout;\n // Contents\n DatatableContents: typeof DatatableContents;\n DatatableContentsBodyLayout: typeof DatatableContentsBodyLayout;\n DatatableContentsHeadLayout: typeof DatatableContentsHeadLayout;\n DatatableContentsInnerLayout: typeof DatatableContentsInnerLayout;\n DatatableContentsLayout: typeof DatatableContentsLayout;\n DatatableContentsMoreLayout: typeof DatatableContentsMoreLayout;\n DatatableEmpty: typeof DatatableEmpty;\n DatatableLoadMoreButton: typeof DatatableLoadMoreButton;\n DatatableTitle: typeof DatatableTitle;\n // Header\n DatatableHeader: typeof DatatableHeader;\n DatatableHeaderCellLayout: typeof DatatableHeaderCellLayout;\n // Row\n DatatableRow: typeof DatatableRow;\n DatatableRowLayout: typeof DatatableRowLayout;\n // Cell\n DatatableCell: typeof DatatableCell;\n DatatableCellLayout: typeof DatatableCellLayout;\n DatatableDefaultCell: typeof DatatableDefaultCell;\n // Filter\n DatatableFilter: typeof DatatableFilter;\n DatatableFilterBooleans: typeof DatatableFilterBooleans;\n DatatableFilterCheckboxes: typeof DatatableFilterCheckboxes;\n DatatableFilterContents: typeof DatatableFilterContents;\n DatatableFilterContentsWithData: typeof DatatableFilterContentsWithData;\n DatatableFilterDates: typeof DatatableFilterDates;\n DatatableFilterNumbers: typeof DatatableFilterNumbers;\n // Sort\n DatatableSorter: typeof DatatableSorter;\n // Select\n DatatableSelect: typeof DatatableSelect;\n // SubmitSelect\n DatatableSubmitSelected: typeof DatatableSubmitSelected;\n // Core\n EditButton: typeof EditButton;\n EditForm: typeof EditForm;\n NewButton: typeof NewButton;\n NewForm: typeof NewForm;\n DeleteButton: typeof DeleteButton;\n}\n\nexport interface CellComponents {\n CardItemSwitcher: typeof CardItemSwitcher;\n CardItem: typeof CardItemSwitcher;\n DefaultCell: typeof DefaultCell;\n UserCell: typeof UserCell;\n CardItemArray: typeof CardItemArray;\n CardItemDate: typeof CardItemDate;\n CardItemDefault: typeof CardItemDefault;\n CardItemHTML: typeof CardItemHTML;\n CardItemImage: typeof CardItemImage;\n CardItemNumber: typeof CardItemNumber;\n CardItemObject: typeof CardItemObject;\n CardItemRelationHasMany: typeof CardItemRelationHasMany;\n CardItemRelationHasOne: typeof CardItemRelationHasOne;\n CardItemRelationItem: typeof CardItemRelationItem;\n CardItemString: typeof CardItemString;\n CardItemURL: typeof CardItemURL;\n}\n\nexport type PossibleVulcanComponents = PossibleCoreComponents &\n PossibleFormComponents &\n DatatableComponents &\n CellComponents;\n","export * from \"./Consumer\";\nexport * from \"./Provider\";\n","/**\n * NOTE: KEEP SEPARATED FROM THE HOOKS TO CONSUME THE CONTEXT\n * otherwise you'll end up with circular dependencies because of the default components\n */\n// TODO: we might need to adapt the provider to merge its value with a potentially higher up context\nimport React from \"react\";\n\nimport {\n VulcanCurrentUserContext,\n VulcanCurrentUserContextType,\n} from \"./Context\";\n\n// So that you can override only some components by adding an additional context while keeping the defaults\nexport const VulcanCurrentUserProvider = ({\n value,\n ...props\n}: {\n value: VulcanCurrentUserContextType;\n children: React.ReactNode;\n}) => (\n <VulcanCurrentUserContext.Provider\n value={value} // merge provided components so the user can provide only a partial replacement\n {...props}\n />\n);\n","// import { compose } from \"recompose\";\nimport React from \"react\";\n\nexport const Components = {}; // will be populated on startup\nexport const ComponentsTable = {}; // storage for infos about components\n\nexport const coreComponents = [\n \"Alert\",\n \"Button\",\n \"Modal\",\n \"ModalTrigger\",\n \"Table\",\n \"FormComponentCheckbox\",\n \"FormComponentCheckboxGroup\",\n \"FormComponentDate\",\n \"FormComponentDate2\",\n \"FormComponentDateTime\",\n \"FormComponentDefault\",\n \"FormComponentText\",\n \"FormComponentEmail\",\n \"FormComponentNumber\",\n \"FormComponentRadioGroup\",\n \"FormComponentSelect\",\n \"FormComponentSelectMultiple\",\n \"FormComponentStaticText\",\n \"FormComponentTextarea\",\n \"FormComponentTime\",\n \"FormComponentUrl\",\n \"FormComponentInner\",\n \"FormControl\",\n \"FormElement\",\n];\n\n/**\n * Register a Vulcan component with a name, a raw component than can be extended\n * and one or more optional higher order components.\n *\n * @param {String} name The name of the component to register.\n * @param {Component} rawComponent Interchangeable/extendable react component.\n * @param {...(Function|Array)} hocs The HOCs to compose with the raw component.\n *\n * Note: when a component is registered without higher order component, `hocs` will be\n * an empty array, and it's ok!\n * See https://github.com/reactjs/redux/blob/master/src/compose.js#L13-L15\n *\n * @returns Structure of a component in the list:\n *\n * ComponentsTable.Foo = {\n * name: 'Foo',\n * hocs: [fn1, fn2],\n * rawComponent: React.Component,\n * call: () => compose(...hocs)(rawComponent),\n * }\n *\n */\n/*\nexport function registerComponent(name, rawComponent, ...hocs) {\n // support single-argument syntax\n if (typeof arguments[0] === \"object\") {\n // note: cannot use `const` because name, components, hocs are already defined\n // as arguments so destructuring cannot work\n // eslint-disable-next-line no-redeclare\n var {\n name,\n component,\n // @ts-ignore\n hocs = [],\n } = arguments[0];\n rawComponent = component;\n }\n // store the component in the table\n ComponentsTable[name] = {\n name,\n rawComponent,\n hocs,\n };\n}\n*/\n\n/**\n * Returns true if a component with the given name has been registered with\n * registerComponent(name, component, ...hocs).\n *\n * @param {String} name The name of the component to get.\n * @returns {Boolean}\n */\nexport const componentExists = (name) => {\n const component = ComponentsTable[name];\n return !!component;\n};\n\n/**\n * Get a component registered with registerComponent(name, component, ...hocs).\n *\n * @param {String} name The name of the component to get.\n * @returns {Function|React Component} A (wrapped) React component\n */\n/*\nexport const getComponent = (name) => {\n const component = ComponentsTable[name];\n if (!component) {\n throw new Error(`Component ${name} not registered.`);\n }\n if (component.hocs && component.hocs.length) {\n const hocs = component.hocs.map((hoc) => {\n if (!Array.isArray(hoc)) {\n if (typeof hoc !== \"function\") {\n throw new Error(\n `In registered component ${name}, an hoc is of type ${typeof hoc}`\n );\n }\n return hoc;\n }\n const [actualHoc, ...args] = hoc;\n if (typeof actualHoc !== \"function\") {\n throw new Error(\n `In registered component ${name}, an hoc is of type ${typeof actualHoc}`\n );\n }\n return actualHoc(...args);\n });\n return compose(...hocs)(component.rawComponent);\n } else {\n return component.rawComponent;\n }\n};\n*/\n\n/**\n * Populate the lookup table for components to be callable\n * ℹ️ Called once on app startup\n **/\n/*\nexport const populateComponentsApp = () => {\n const registeredComponents = Object.keys(ComponentsTable);\n\n // loop over each component in the list\n registeredComponents.map((name) => {\n // populate an entry in the lookup table\n Components[name] = getComponent(name);\n\n // uncomment for debug\n // console.log('init component:', name);\n });\n\n const missingComponents = difference(coreComponents, registeredComponents);\n\n if (missingComponents.length) {\n // eslint-disable-next-line no-console\n console.warn(\n `Found the following missing core components: ${missingComponents.join(\n \", \"\n )}. Include a UI package such as vulcan:ui-bootstrap to add them.`\n );\n }\n};\n*/\n/**\n * Get the **raw** (original) component registered with registerComponent\n * without the possible HOCs wrapping it.\n *\n * @param {String} name The name of the component to get.\n * @returns {Function|React Component} An interchangeable/extendable React component\n */\nexport const getRawComponent = (name) => {\n return ComponentsTable[name].rawComponent;\n};\n\n/**\n * Replace a Vulcan component with the same name with a new component or\n * an extension of the raw component and one or more optional higher order components.\n * This function keeps track of the previous HOCs and wrap the new HOCs around previous ones\n *\n * @param {String} name The name of the component to register.\n * @param {React Component} newComponent Interchangeable/extendable component.\n * @param {...Function} newHocs The HOCs to compose with the raw component.\n * @returns {Function|React Component} A component callable with Components[name]\n *\n * Note: when a component is registered without higher order component, `hocs` will be\n * an empty array, and it's ok!\n * See https://github.com/reactjs/redux/blob/master/src/compose.js#L13-L15\n */\n/*\nexport function replaceComponent(name, newComponent, ...newHocs) {\n // support single argument syntax\n if (typeof arguments[0] === \"object\") {\n // eslint-disable-next-line no-redeclare\n var { name, component, hocs = [] } = arguments[0];\n newComponent = component;\n newHocs = hocs;\n }\n\n const previousComponent = ComponentsTable[name];\n const previousHocs = (previousComponent && previousComponent.hocs) || [];\n\n if (!previousComponent) {\n // eslint-disable-next-line no-console\n console.warn(\n `Trying to replace non-registered component ${name}. The component is ` +\n \"being registered. If you were trying to replace a component defined by \" +\n \"another package, make sure that you haven't misspelled the name. Check \" +\n \"also if the original component is still being registered or that it \" +\n \"hasn't been renamed.\"\n );\n }\n\n return registerComponent(name, newComponent, ...newHocs, ...previousHocs);\n}\n*/\n\n/*\nexport const copyHoCs = (sourceComponent, targetComponent) => {\n return compose(...sourceComponent.hocs)(targetComponent);\n};\n*/\n\n/**\n * Returns an instance of the given component name of function\n * @param {string|function} component A component, the name of a component, or a react element\n * @param {Object} [props] Optional properties to pass to the component\n */\n//eslint-disable-next-line react/display-name\n// legacy\nexport const instantiateComponent = (\n component?: React.ComponentType | Function | any,\n props?: any\n) => {\n if (!component) {\n return null;\n } /*else if (typeof component === \"string\") {\n const Component = Components[component];\n return <Component {...props} />;\n } */ else if (React.isValidElement(component)) {\n return React.cloneElement(component, props);\n } else if (\n typeof component === \"function\" &&\n component.prototype &&\n component.prototype.isReactComponent\n ) {\n const Component = component as React.ComponentType<any>;\n return <Component {...props} />;\n } else if (typeof component === \"function\") {\n return component(props);\n } else if (\n typeof component === \"object\" &&\n component.$$typeof &&\n component.render\n ) {\n const Component = component as React.ComponentType<any>;\n return <Component {...props} />;\n } else {\n return component;\n }\n};\n\n/**\n * Creates a component that will render the registered component with the given name.\n *\n * This function may be useful when in need for some registered component, but in contexts\n * where they have not yet been initialized, for example at compile time execution. In other\n * words, when using `Components.ComponentName` is not allowed (because it has not yet been\n * populated, hence would be `undefined`), then `delayedComponent('ComponentName')` can be\n * used instead.\n *\n * @example Create a container for a registered component\n * // SomeContainer.js\n * import compose from 'recompose/compose';\n * import { delayedComponent } from 'meteor/vulcan:core';\n *\n * export default compose(\n * // ...some hocs with container logic\n * )(delayedComponent('ComponentName')); // cannot use Components.ComponentName in this context!\n *\n * @example {@link dynamicLoader}\n * @param {String} name Component name\n * @return {Function}\n * Functional component that will render the given registered component\n */\nexport const delayedComponent = (name) => {\n return (props) => {\n const Component = Components[name] || null;\n return Component && <Component {...props} />;\n };\n};\n\n// Example with Proxy (might be unstable/hard to reason about)\n//const mergeWithComponents = (myComponents = {}) => {\n// const handler = {\n// get: function(target, name) {\n// return name in target ? target[name] : Components[name];\n// }\n// };\n// const proxy = new Proxy(myComponents, handler);\n// return proxy;\n//};\nexport const mergeWithComponents = (myComponents) =>\n myComponents ? { ...Components, ...myComponents } : Components;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;AA4BkB,QAAA;AAClB,QAAI;AACJ,QAAI;AACJ,QAAI;AACJ,QAAI;AACJ,QAAI;AACJ,QAAI;AACJ,QAAI;AACJ,QAAI;AACJ,QAAI;AACJ,QAAI;AACJ,QAAI;AACJ,QAAC;QACG;QACA;;;;;;;;;;;cASA,SAAS;UACL,OAAI,OAAO,WAAW,WAAA,SAAA,OAAA,SAAA,WAAA,OAAA,OAAA,SAAA,WAAA,OAAA,CAAA;iBAClB,WAAW,cAAa,OAAK,KAAU;wBAC5B;;oBAAuD,UAAA;kBAE7D,eAAA,MAAA,eAAA,QAAA,CAAA,CAAA;;iBAEJ,OAAA,WAAA,YAAA,OAAA,OAAA,YAAA,UAAA;gBACJ,eAAA,MAAA,eAAA,OAAA,OAAA,CAAA,CAAA;aACD;gBAA0B,eAAkB,IAAG,CAAA;;8BAClD,UAAA,UAAA;AAEJ,YAAU,aAAU,MAAA;AACb,cAAA,OAAa,OAAS,WAAC,YACtB;AAAE,mBAAa,eAAA,UAAA,cAAA;cAAc,OAAS;YAAoB,CAAA;UAC3D,OAAW;AAAgB,qBAAQ,aAAW;UAAoD;QAEtG;AACI,eAAI,SAAQ,IAAK,GAAA;AAEjB,iBAAA,SAAmB,MAAC,WAAA,SAAA,IAAA,CAAA,IAAA;QACpB;;AAXH;gBAW0C,UAAA;UACvC,gBAAe,OAAK,kBAAsB;QAC5C,WAAA,CAAA;MAEF,aAAW,SAAO,SAAU,GAAA,GAAW;AAC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C;KACI,KAAK,CAAA;GAT4B;;;ACZzC;AAAA;AAAA,sBAAA;;;;;;;;;;;;;;AAAA;AAEO,IAAM,aAAa,CAAA;AACnB,IAAM,kBAAkB,CAAA;AAExB,IAAM,iBAAiB;EAC5B;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAwDK,IAAM,kBAAkB,wBAAC,UAAS;AACvC,QAAM,YAAY,gBAAgB;AAClC,SAAO,CAAC,CAAC;GAFoB;AA8ExB,IAAM,kBAAkB,wBAAC,UAAS;AACvC,SAAO,gBAAgB,OAAM;GADA;AA2DxB,IAAM,uBAAuB,wBAClC,WACA,UACG;AACH,MAAI,CAAC,WAAW;AACd,WAAO;aAIK,wBAAM,eAAe,SAAS,GAAG;AAC7C,WAAO,wBAAM,aAAa,WAAW,KAAK;aAE1C,OAAO,cAAc,cACrB,UAAU,aACV,UAAU,UAAU,kBACpB;AACA,UAAM,YAAY;AAClB,WAAO,wBAAA,cAAC,WAAS,WAAA,CAAA,GAAK,KAAK,CAAA;aAClB,OAAO,cAAc,YAAY;AAC1C,WAAO,UAAU,KAAK;aAEtB,OAAO,cAAc,YACrB,UAAU,YACV,UAAU,QACV;AACA,UAAM,YAAY;AAClB,WAAO,wBAAA,cAAC,WAAS,WAAA,CAAA,GAAK,KAAK,CAAA;SACtB;AACL,WAAO;;GA5ByB;AAuD7B,IAAM,mBAAmB,wBAAC,UAAS;AACxC,SAAO,CAAC,UAAU;AAChB,UAAM,YAAY,WAAW,UAAS;AACtC,WAAO,aAAa,wBAAA,cAAC,WAAS,WAAA,CAAA,GAAK,KAAK,CAAA;;GAHZ;AAiBzB,IAAM,sBAAsB,wBAAC,iBAClC,eAAe,kCAAK,aAAe,gBAAiB,YADnB;","names":[]}
1
+ {"version":3,"sources":["../../../node_modules/tslib/tslib.js","../../../node_modules/react-is/cjs/react-is.production.min.js","../../../node_modules/react-is/cjs/react-is.development.js","../../../node_modules/react-is/index.js","../../../node_modules/object-assign/index.js","../../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../../node_modules/prop-types/lib/has.js","../../../node_modules/prop-types/checkPropTypes.js","../../../node_modules/prop-types/factoryWithTypeCheckers.js","../../../node_modules/prop-types/factoryWithThrowingShims.js","../../../node_modules/prop-types/index.js","../../../node_modules/moment/moment.js","../index.ts","../components/form/index.ts","../components/form/core/FormContainer.tsx","../../../node_modules/graphql-tag/lib/index.js","../../../node_modules/tslib/modules/index.js","../../../node_modules/graphql/index.mjs","../../../node_modules/graphql/language/parser.mjs","../../../node_modules/graphql/error/syntaxError.mjs","../../../node_modules/graphql/error/GraphQLError.mjs","../../../node_modules/graphql/jsutils/isObjectLike.mjs","../../../node_modules/graphql/polyfills/symbols.mjs","../../../node_modules/graphql/language/location.mjs","../../../node_modules/graphql/language/printLocation.mjs","../../../node_modules/graphql/language/kinds.mjs","../../../node_modules/graphql/language/ast.mjs","../../../node_modules/graphql/jsutils/defineInspect.mjs","../../../node_modules/graphql/jsutils/invariant.mjs","../../../node_modules/graphql/jsutils/nodejsCustomInspectSymbol.mjs","../../../node_modules/graphql/language/tokenKind.mjs","../../../node_modules/graphql/language/source.mjs","../../../node_modules/graphql/jsutils/inspect.mjs","../../../node_modules/graphql/jsutils/devAssert.mjs","../../../node_modules/graphql/jsutils/instanceOf.mjs","../../../node_modules/graphql/language/directiveLocation.mjs","../../../node_modules/graphql/language/lexer.mjs","../../../node_modules/graphql/language/blockString.mjs","../../../node_modules/graphql/language/index.mjs","../components/form/utils/formFragments.ts","../components/VulcanComponents/Consumer.tsx","../components/VulcanComponents/Context.ts","../components/VulcanComponents/Dummy.tsx","../components/VulcanCurrentUser/Consumer.tsx","../components/VulcanCurrentUser/Context.ts","../components/form/core/Form/index.ts","../components/form/core/Form/Form.tsx","../components/form/utils/schema_utils.ts","../components/form/utils/utils.ts","../components/form/utils/path_utils.ts","../components/form/core/FormContext.tsx","../components/form/core/Form/fields.ts","../components/form/core/Form/utils.ts","../components/form/hooks/useWarnOnUnsaved/index.ts","../components/form/hooks/useWarnOnUnsaved/useWarnOnUnsaved.ts","../components/form/hooks/useBlockTransition/useBlockTransition.ts","../components/form/hooks/useBlockTransition/block.ts","../components/form/core/Form/typings.ts","../components/VulcanComponents/index.ts","../components/VulcanComponents/Provider.tsx","../components/VulcanComponents/typings.ts","../components/VulcanComponents/defaultVulcanComponents/index.ts","../components/VulcanComponents/defaultVulcanComponents/formComponents.ts","../components/form/elements/index.ts","../components/form/elements/FieldErrors.tsx","../components/form/elements/FormError.tsx","../components/form/elements/FormErrors.tsx","../components/form/elements/FormSubmit.tsx","../components/form/elements/FormLayout.tsx","../components/form/elements/FormElement.tsx","../components/form/core/index.ts","../components/form/core/FormComponent.tsx","../components/form/inputs/consts.ts","../components/form/core/FormComponentInner.tsx","../components/form/utils/ui_utils.ts","../components/form/core/FormComponentLoader.tsx","../components/form/core/FormGroup.tsx","../components/form/intl/FormIntl.tsx","../components/form/nested/index.ts","../components/form/nested/FormNestedArray.tsx","../components/form/nested/FormNestedArrayLayout.tsx","../components/form/nested/FormNestedItem.tsx","../components/form/nested/FormNestedDivider.tsx","../components/form/nested/FormNestedObject.tsx","../components/form/inputs/index.ts","../components/form/inputs/BasicInputs.tsx","../components/form/inputs/RadioGroup.tsx","../components/form/inputs/Checkboxgroup.tsx","../components/form/inputs/SelectInputs.tsx","../components/form/inputs/FormItem.tsx","../components/form/inputs/FormOptionLabel.tsx","../components/form/inputs/AutocompleteMultiple.tsx","../components/VulcanComponents/defaultVulcanComponents/datatableComponents.ts","../components/Datatable/Datatable.tsx","../components/Datatable/DatatableContents.tsx","../components/Datatable/DatatableHeader.tsx","../components/Datatable/DatatableRow.tsx","../components/Datatable/DatatableCell.tsx","../components/Datatable/DatatableFilter.tsx","../components/Datatable/DatatableSorter.tsx","../components/Datatable/DatatableSelect.tsx","../components/Datatable/DatatableSubmitSelected.tsx","../components/Datatable/others/EditButton.tsx","../components/Datatable/others/NewButton.tsx","../components/Datatable/others/DeleteButton.tsx","../components/VulcanComponents/defaultVulcanComponents/cellComponents.ts","../components/cell/CardItem.tsx","../components/cell/CardItemRelationItem.tsx","../components/cell/CardItemArray.tsx","../components/cell/CardItemDate.tsx","../components/cell/CardItemDefault.tsx","../components/cell/CardItemHTML.tsx","../components/cell/CardItemImage.tsx","../components/cell/CardItemNumber.tsx","../components/cell/CardItemObject.tsx","../components/cell/CardItemRelationHasMany.tsx","../components/cell/CardItemRelationHasOne.tsx","../components/cell/CardItemString.tsx","../components/cell/CardItemURL.tsx","../components/VulcanComponents/defaultVulcanComponents/coreComponents.ts","../components/core/Button.tsx","../components/core/Loading.tsx","../components/LoadingButton.tsx","../components/MutationButton.tsx","../components/HeadTags.tsx","../components/bootstrap/TooltipTrigger.tsx","../components/bootstrap/Dropdown.tsx","../components/bootstrap/Modal.tsx","../components/bootstrap/ModalTrigger.tsx","../components/VulcanCurrentUser/index.ts","../components/VulcanCurrentUser/Provider.tsx","../componentsHelpers.tsx"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global global, define, System, Reflect, Promise */\r\nvar __extends;\r\nvar __assign;\r\nvar __rest;\r\nvar __decorate;\r\nvar __param;\r\nvar __metadata;\r\nvar __awaiter;\r\nvar __generator;\r\nvar __exportStar;\r\nvar __values;\r\nvar __read;\r\nvar __spread;\r\nvar __spreadArrays;\r\nvar __spreadArray;\r\nvar __await;\r\nvar __asyncGenerator;\r\nvar __asyncDelegator;\r\nvar __asyncValues;\r\nvar __makeTemplateObject;\r\nvar __importStar;\r\nvar __importDefault;\r\nvar __classPrivateFieldGet;\r\nvar __classPrivateFieldSet;\r\nvar __classPrivateFieldIn;\r\nvar __createBinding;\r\n(function (factory) {\r\n var root = typeof global === \"object\" ? global : typeof self === \"object\" ? self : typeof this === \"object\" ? this : {};\r\n if (typeof define === \"function\" && define.amd) {\r\n define(\"tslib\", [\"exports\"], function (exports) { factory(createExporter(root, createExporter(exports))); });\r\n }\r\n else if (typeof module === \"object\" && typeof module.exports === \"object\") {\r\n factory(createExporter(root, createExporter(module.exports)));\r\n }\r\n else {\r\n factory(createExporter(root));\r\n }\r\n function createExporter(exports, previous) {\r\n if (exports !== root) {\r\n if (typeof Object.create === \"function\") {\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n }\r\n else {\r\n exports.__esModule = true;\r\n }\r\n }\r\n return function (id, v) { return exports[id] = previous ? previous(id, v) : v; };\r\n }\r\n})\r\n(function (exporter) {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n\r\n __extends = function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n\r\n __assign = Object.assign || function (t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n\r\n __rest = function (s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n };\r\n\r\n __decorate = function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n };\r\n\r\n __param = function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n };\r\n\r\n __metadata = function (metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n };\r\n\r\n __awaiter = function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n };\r\n\r\n __generator = function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n };\r\n\r\n __exportStar = function(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n };\r\n\r\n __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n }) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n });\r\n\r\n __values = function (o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n };\r\n\r\n __read = function (o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n };\r\n\r\n /** @deprecated */\r\n __spread = function () {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n };\r\n\r\n /** @deprecated */\r\n __spreadArrays = function () {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n };\r\n\r\n __spreadArray = function (to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n };\r\n\r\n __await = function (v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n };\r\n\r\n __asyncGenerator = function (thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n };\r\n\r\n __asyncDelegator = function (o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n };\r\n\r\n __asyncValues = function (o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n };\r\n\r\n __makeTemplateObject = function (cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n };\r\n\r\n var __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n }) : function(o, v) {\r\n o[\"default\"] = v;\r\n };\r\n\r\n __importStar = function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n };\r\n\r\n __importDefault = function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n };\r\n\r\n __classPrivateFieldGet = function (receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n };\r\n\r\n __classPrivateFieldSet = function (receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n };\r\n\r\n __classPrivateFieldIn = function (state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n };\r\n\r\n exporter(\"__extends\", __extends);\r\n exporter(\"__assign\", __assign);\r\n exporter(\"__rest\", __rest);\r\n exporter(\"__decorate\", __decorate);\r\n exporter(\"__param\", __param);\r\n exporter(\"__metadata\", __metadata);\r\n exporter(\"__awaiter\", __awaiter);\r\n exporter(\"__generator\", __generator);\r\n exporter(\"__exportStar\", __exportStar);\r\n exporter(\"__createBinding\", __createBinding);\r\n exporter(\"__values\", __values);\r\n exporter(\"__read\", __read);\r\n exporter(\"__spread\", __spread);\r\n exporter(\"__spreadArrays\", __spreadArrays);\r\n exporter(\"__spreadArray\", __spreadArray);\r\n exporter(\"__await\", __await);\r\n exporter(\"__asyncGenerator\", __asyncGenerator);\r\n exporter(\"__asyncDelegator\", __asyncDelegator);\r\n exporter(\"__asyncValues\", __asyncValues);\r\n exporter(\"__makeTemplateObject\", __makeTemplateObject);\r\n exporter(\"__importStar\", __importStar);\r\n exporter(\"__importDefault\", __importDefault);\r\n exporter(\"__classPrivateFieldGet\", __classPrivateFieldGet);\r\n exporter(\"__classPrivateFieldSet\", __classPrivateFieldSet);\r\n exporter(\"__classPrivateFieldIn\", __classPrivateFieldIn);\r\n});\r\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","/** @license React v16.13.1\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n// (unstable) APIs that have been removed. Can we remove the symbols?\n\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\nvar REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\nvar REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_ASYNC_MODE_TYPE:\n case REACT_CONCURRENT_MODE_TYPE:\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n} // AsyncMode is deprecated along with isAsyncMode\n\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","module.exports = Function.call.bind(Object.prototype.hasOwnProperty);\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n var has = require('./lib/has');\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) { /**/ }\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +\n 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n );\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n if (process.env.NODE_ENV !== 'production') {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactIs = require('react-is');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar has = require('./lib/has');\nvar checkPropTypes = require('./checkPropTypes');\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<<anonymous>>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bigint: createPrimitiveTypeChecker('bigint'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message, data) {\n this.message = message;\n this.data = data && typeof data === 'object' ? data: {};\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),\n {expectedType: expectedType}\n );\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (process.env.NODE_ENV !== 'production') {\n if (arguments.length > 1) {\n printWarning(\n 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n );\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n if (type === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var expectedTypes = [];\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);\n if (checkerResult == null) {\n return null;\n }\n if (checkerResult.data && has(checkerResult.data, 'expectedType')) {\n expectedTypes.push(checkerResult.data.expectedType);\n }\n }\n var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function invalidValidatorError(componentName, location, propFullName, key, type) {\n return new PropTypeError(\n (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'\n );\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (has(shapeTypes, key) && typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // falsy value can't be a Symbol\n if (!propValue) {\n return false;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","//! moment.js\n//! version : 2.29.3\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n global.moment = factory()\n}(this, (function () { 'use strict';\n\n var hookCallback;\n\n function hooks() {\n return hookCallback.apply(null, arguments);\n }\n\n // This is done to register the method called with moment()\n // without creating circular dependencies.\n function setHookCallback(callback) {\n hookCallback = callback;\n }\n\n function isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n }\n\n function isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n }\n\n function hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n }\n\n function isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n }\n\n function isUndefined(input) {\n return input === void 0;\n }\n\n function isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n }\n\n function isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n }\n\n function map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n }\n\n function extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n }\n\n function createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n }\n\n function defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n }\n\n function getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n }\n\n var some;\n if (Array.prototype.some) {\n some = Array.prototype.some;\n } else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n }\n\n function isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n }\n\n function createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n }\n\n // Plugins that add properties should also add the key here (null value),\n // so we can properly clone ourselves.\n var momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\n function copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n }\n\n // Moment prototype object\n function Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n }\n\n function isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n }\n\n function warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n }\n\n function deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n }\n\n var deprecations = {};\n\n function deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n }\n\n hooks.suppressDeprecationWarnings = false;\n hooks.deprecationHandler = null;\n\n function isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n }\n\n function set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n }\n\n function mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n }\n\n function Locale(config) {\n if (config != null) {\n this.set(config);\n }\n }\n\n var keys;\n\n if (Object.keys) {\n keys = Object.keys;\n } else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n }\n\n var defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n };\n\n function calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n }\n\n function zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n }\n\n var formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n // token: 'M'\n // padded: ['MM', 2]\n // ordinal: 'Mo'\n // callback: function () { this.month() + 1 }\n function addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n }\n\n function removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n }\n\n function makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n }\n\n // format date using native date object\n function formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n }\n\n function expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n }\n\n var defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n };\n\n function longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n }\n\n var defaultInvalidDate = 'Invalid date';\n\n function invalidDate() {\n return this._invalidDate;\n }\n\n var defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\n function ordinal(number) {\n return this._ordinal.replace('%d', number);\n }\n\n var defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n };\n\n function relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n }\n\n function pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n }\n\n var aliases = {};\n\n function addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n }\n\n function normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n }\n\n function normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n }\n\n var priorities = {};\n\n function addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n }\n\n function getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n }\n\n function isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n }\n\n function absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n }\n\n function toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n }\n\n function makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n }\n\n function get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n }\n\n function set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n }\n\n // MOMENTS\n\n function stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n }\n\n function stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n }\n\n var match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\n regexes = {};\n\n function addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n }\n\n function getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n }\n\n // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n function unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n }\n\n function regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n\n var tokens = {};\n\n function addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n }\n\n function addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n }\n\n function addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n }\n\n var YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\n function mod(n, x) {\n return ((n % x) + x) % x;\n }\n\n var indexOf;\n\n if (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n } else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n }\n\n function daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n }\n\n // FORMATTING\n\n addFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n });\n\n addFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n });\n\n addFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n });\n\n // ALIASES\n\n addUnitAlias('month', 'M');\n\n // PRIORITY\n\n addUnitPriority('month', 8);\n\n // PARSING\n\n addRegexToken('M', match1to2);\n addRegexToken('MM', match1to2, match2);\n addRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n });\n addRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n });\n\n addParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n });\n\n addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n });\n\n // LOCALES\n\n var defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\n function localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n }\n\n function localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n }\n\n function handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n }\n\n // MOMENTS\n\n function setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n }\n\n function getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n }\n\n function getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n }\n\n function monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n }\n\n function monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n }\n\n function computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n }\n\n // FORMATTING\n\n addFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n });\n\n addFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n });\n\n addFormatToken(0, ['YYYY', 4], 0, 'year');\n addFormatToken(0, ['YYYYY', 5], 0, 'year');\n addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n // ALIASES\n\n addUnitAlias('year', 'y');\n\n // PRIORITIES\n\n addUnitPriority('year', 1);\n\n // PARSING\n\n addRegexToken('Y', matchSigned);\n addRegexToken('YY', match1to2, match2);\n addRegexToken('YYYY', match1to4, match4);\n addRegexToken('YYYYY', match1to6, match6);\n addRegexToken('YYYYYY', match1to6, match6);\n\n addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n addParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n });\n addParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n });\n addParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n });\n\n // HELPERS\n\n function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n }\n\n // HOOKS\n\n hooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n };\n\n // MOMENTS\n\n var getSetYear = makeGetSet('FullYear', true);\n\n function getIsLeapYear() {\n return isLeapYear(this.year());\n }\n\n function createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n }\n\n function createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n }\n\n // start-of-first-week - start-of-year\n function firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n }\n\n // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n }\n\n function weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n }\n\n function weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n }\n\n // FORMATTING\n\n addFormatToken('w', ['ww', 2], 'wo', 'week');\n addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n // ALIASES\n\n addUnitAlias('week', 'w');\n addUnitAlias('isoWeek', 'W');\n\n // PRIORITIES\n\n addUnitPriority('week', 5);\n addUnitPriority('isoWeek', 5);\n\n // PARSING\n\n addRegexToken('w', match1to2);\n addRegexToken('ww', match1to2, match2);\n addRegexToken('W', match1to2);\n addRegexToken('WW', match1to2, match2);\n\n addWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n );\n\n // HELPERS\n\n // LOCALES\n\n function localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n }\n\n var defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n };\n\n function localeFirstDayOfWeek() {\n return this._week.dow;\n }\n\n function localeFirstDayOfYear() {\n return this._week.doy;\n }\n\n // MOMENTS\n\n function getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n function getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n // FORMATTING\n\n addFormatToken('d', 0, 'do', 'day');\n\n addFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n });\n\n addFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n });\n\n addFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n });\n\n addFormatToken('e', 0, 0, 'weekday');\n addFormatToken('E', 0, 0, 'isoWeekday');\n\n // ALIASES\n\n addUnitAlias('day', 'd');\n addUnitAlias('weekday', 'e');\n addUnitAlias('isoWeekday', 'E');\n\n // PRIORITY\n addUnitPriority('day', 11);\n addUnitPriority('weekday', 11);\n addUnitPriority('isoWeekday', 11);\n\n // PARSING\n\n addRegexToken('d', match1to2);\n addRegexToken('e', match1to2);\n addRegexToken('E', match1to2);\n addRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n });\n addRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n });\n addRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n });\n\n addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n });\n\n addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n });\n\n // HELPERS\n\n function parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n }\n\n function parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n }\n\n // LOCALES\n function shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n }\n\n var defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\n function localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n }\n\n function localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n }\n\n function localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n }\n\n function handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n }\n\n // MOMENTS\n\n function getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n }\n\n function getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n }\n\n function getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n }\n\n function weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n }\n\n function weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n }\n\n function weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n }\n\n function computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n }\n\n // FORMATTING\n\n function hFormat() {\n return this.hours() % 12 || 12;\n }\n\n function kFormat() {\n return this.hours() || 24;\n }\n\n addFormatToken('H', ['HH', 2], 0, 'hour');\n addFormatToken('h', ['hh', 2], 0, hFormat);\n addFormatToken('k', ['kk', 2], 0, kFormat);\n\n addFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n });\n\n addFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n });\n\n addFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n });\n\n addFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n });\n\n function meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n }\n\n meridiem('a', true);\n meridiem('A', false);\n\n // ALIASES\n\n addUnitAlias('hour', 'h');\n\n // PRIORITY\n addUnitPriority('hour', 13);\n\n // PARSING\n\n function matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n }\n\n addRegexToken('a', matchMeridiem);\n addRegexToken('A', matchMeridiem);\n addRegexToken('H', match1to2);\n addRegexToken('h', match1to2);\n addRegexToken('k', match1to2);\n addRegexToken('HH', match1to2, match2);\n addRegexToken('hh', match1to2, match2);\n addRegexToken('kk', match1to2, match2);\n\n addRegexToken('hmm', match3to4);\n addRegexToken('hmmss', match5to6);\n addRegexToken('Hmm', match3to4);\n addRegexToken('Hmmss', match5to6);\n\n addParseToken(['H', 'HH'], HOUR);\n addParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n });\n addParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n });\n addParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n });\n addParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n });\n\n // LOCALES\n\n function localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n }\n\n var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\n function localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n }\n\n var baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n };\n\n // internal storage for locale config files\n var locales = {},\n localeFamilies = {},\n globalLocale;\n\n function commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n }\n\n function normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n }\n\n // pick the locale from the array\n // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n function chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n }\n\n function isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n }\n\n function loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n }\n\n // This function will load locale and then set the global locale. If\n // no arguments are passed in, it will simply return the current global\n // locale key.\n function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n }\n\n function defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n }\n\n function updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n }\n\n // returns locale data\n function getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n }\n\n function listLocales() {\n return keys(locales);\n }\n\n function checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n }\n\n // iso 8601 regex\n // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\n var extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n // date from iso format\n function configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }\n\n function extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n ) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n }\n\n function untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n }\n\n function preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^)]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n }\n\n function checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n }\n\n function calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n }\n\n // date and time from ref 2822 format\n function configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n }\n\n // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\n function configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n }\n\n hooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n );\n\n // Pick the first defined of two or three arguments.\n function defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n }\n\n function currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n }\n\n // convert an array to a date.\n // the array should mirror the parameters below\n // note: all values past the year are optional and will default to the lowest possible value.\n // [year, month, day , hour, minute, second, millisecond]\n function configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n }\n\n function dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n }\n\n // constant that refers to the ISO standard\n hooks.ISO_8601 = function () {};\n\n // constant that refers to the RFC 2822 form\n hooks.RFC_2822 = function () {};\n\n // date from string and format string\n function configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n }\n\n function meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n }\n\n // date from string and array of format strings\n function configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }\n\n function configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n }\n\n function createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n }\n\n function prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n }\n\n function configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n }\n\n function createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n }\n\n function createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n }\n\n var prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n // Pick a moment m from moments so that m[fn](other) is true for all\n // other. This relies on the function fn to be transitive.\n //\n // moments should either be an array of moment objects or an array, whose\n // first element is an array of moment objects.\n function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }\n\n // TODO: Use [].sort instead?\n function min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n }\n\n function max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n }\n\n var now = function () {\n return Date.now ? Date.now() : +new Date();\n };\n\n var ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n ];\n\n function isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n }\n\n function isValid$1() {\n return this._isValid;\n }\n\n function createInvalid$1() {\n return createDuration(NaN);\n }\n\n function Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n }\n\n function isDuration(obj) {\n return obj instanceof Duration;\n }\n\n function absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n }\n\n // compare two arrays, return the number of differences\n function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }\n\n // FORMATTING\n\n function offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n }\n\n offset('Z', ':');\n offset('ZZ', '');\n\n // PARSING\n\n addRegexToken('Z', matchShortOffset);\n addRegexToken('ZZ', matchShortOffset);\n addParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n });\n\n // HELPERS\n\n // timezone chunker\n // '+10:00' > ['10', '00']\n // '-1530' > ['-15', '30']\n var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n function offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n }\n\n // Return a moment from input, that is local/utc/zone equivalent to model.\n function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }\n\n function getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n }\n\n // HOOKS\n\n // This function will be called whenever a moment is mutated.\n // It is intended to keep the offset in sync with the timezone.\n hooks.updateOffset = function () {};\n\n // MOMENTS\n\n // keepLocalTime = true means only change the timezone, without\n // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n // +0200, so we adjust the time as needed, to be valid.\n //\n // Keeping the time actually adds/subtracts (one hour)\n // from the actual represented time. That is why we call updateOffset\n // a second time. In case it wants us to change the offset again\n // _changeInProgress == true case, then we have to adjust, because\n // there is no such time in the given timezone.\n function getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }\n\n function getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n }\n\n function setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n }\n\n function setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n }\n\n function setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n }\n\n function hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n }\n\n function isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n }\n\n function isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n }\n\n function isLocal() {\n return this.isValid() ? !this._isUTC : false;\n }\n\n function isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n }\n\n function isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n }\n\n // ASP.NET json date format regex\n var aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n function createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n }\n\n createDuration.fn = Duration.prototype;\n createDuration.invalid = createInvalid$1;\n\n function parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n }\n\n function positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n }\n\n function momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n }\n\n // TODO: remove 'name' arg after deprecation is removed\n function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }\n\n function addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n }\n\n var add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\n function isString(input) {\n return typeof input === 'string' || input instanceof String;\n }\n\n // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\n function isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n }\n\n function isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n }\n\n function isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n }\n\n function isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n }\n\n function getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n }\n\n function calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n }\n\n function clone() {\n return new Moment(this);\n }\n\n function isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n }\n\n function isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n }\n\n function isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n }\n\n function isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n }\n\n function isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n }\n\n function isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n }\n\n function diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n }\n\n function monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n }\n\n hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n function toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n }\n\n function toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n\n /**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\n function inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n }\n\n function format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n }\n\n function from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n }\n\n function to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n }\n\n // If passed a locale key, it will set the locale for this\n // instance. Otherwise, it will return the locale configuration\n // variables for this instance.\n function locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n }\n\n var lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n );\n\n function localeData() {\n return this._locale;\n }\n\n var MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n // actual modulo - handles negative numbers (for dates before 1970):\n function mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n }\n\n function localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n }\n\n function utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n }\n\n function startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n }\n\n function endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n }\n\n function valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n }\n\n function unix() {\n return Math.floor(this.valueOf() / 1000);\n }\n\n function toDate() {\n return new Date(this.valueOf());\n }\n\n function toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n }\n\n function toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n }\n\n function toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n }\n\n function isValid$2() {\n return isValid(this);\n }\n\n function parsingFlags() {\n return extend({}, getParsingFlags(this));\n }\n\n function invalidAt() {\n return getParsingFlags(this).overflow;\n }\n\n function creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n }\n\n addFormatToken('N', 0, 0, 'eraAbbr');\n addFormatToken('NN', 0, 0, 'eraAbbr');\n addFormatToken('NNN', 0, 0, 'eraAbbr');\n addFormatToken('NNNN', 0, 0, 'eraName');\n addFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\n addFormatToken('y', ['y', 1], 'yo', 'eraYear');\n addFormatToken('y', ['yy', 2], 0, 'eraYear');\n addFormatToken('y', ['yyy', 3], 0, 'eraYear');\n addFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\n addRegexToken('N', matchEraAbbr);\n addRegexToken('NN', matchEraAbbr);\n addRegexToken('NNN', matchEraAbbr);\n addRegexToken('NNNN', matchEraName);\n addRegexToken('NNNNN', matchEraNarrow);\n\n addParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n );\n\n addRegexToken('y', matchUnsigned);\n addRegexToken('yy', matchUnsigned);\n addRegexToken('yyy', matchUnsigned);\n addRegexToken('yyyy', matchUnsigned);\n addRegexToken('yo', matchEraYearOrdinal);\n\n addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\n addParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n });\n\n function localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n }\n\n function localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n }\n\n function localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n }\n\n function getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n }\n\n function getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n }\n\n function getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n }\n\n function getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n }\n\n function erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n }\n\n function erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n }\n\n function erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n }\n\n function matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n }\n\n function matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n }\n\n function matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n }\n\n function matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n }\n\n function computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n }\n\n // FORMATTING\n\n addFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n });\n\n addFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n });\n\n function addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n }\n\n addWeekYearFormatToken('gggg', 'weekYear');\n addWeekYearFormatToken('ggggg', 'weekYear');\n addWeekYearFormatToken('GGGG', 'isoWeekYear');\n addWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n // ALIASES\n\n addUnitAlias('weekYear', 'gg');\n addUnitAlias('isoWeekYear', 'GG');\n\n // PRIORITY\n\n addUnitPriority('weekYear', 1);\n addUnitPriority('isoWeekYear', 1);\n\n // PARSING\n\n addRegexToken('G', matchSigned);\n addRegexToken('g', matchSigned);\n addRegexToken('GG', match1to2, match2);\n addRegexToken('gg', match1to2, match2);\n addRegexToken('GGGG', match1to4, match4);\n addRegexToken('gggg', match1to4, match4);\n addRegexToken('GGGGG', match1to6, match6);\n addRegexToken('ggggg', match1to6, match6);\n\n addWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n );\n\n addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n });\n\n // MOMENTS\n\n function getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n }\n\n function getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n }\n\n function getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n }\n\n function getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n }\n\n function getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n }\n\n function getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n }\n\n function getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n }\n\n function setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n }\n\n // FORMATTING\n\n addFormatToken('Q', 0, 'Qo', 'quarter');\n\n // ALIASES\n\n addUnitAlias('quarter', 'Q');\n\n // PRIORITY\n\n addUnitPriority('quarter', 7);\n\n // PARSING\n\n addRegexToken('Q', match1);\n addParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n });\n\n // MOMENTS\n\n function getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n }\n\n // FORMATTING\n\n addFormatToken('D', ['DD', 2], 'Do', 'date');\n\n // ALIASES\n\n addUnitAlias('date', 'D');\n\n // PRIORITY\n addUnitPriority('date', 9);\n\n // PARSING\n\n addRegexToken('D', match1to2);\n addRegexToken('DD', match1to2, match2);\n addRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n });\n\n addParseToken(['D', 'DD'], DATE);\n addParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n });\n\n // MOMENTS\n\n var getSetDayOfMonth = makeGetSet('Date', true);\n\n // FORMATTING\n\n addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n // ALIASES\n\n addUnitAlias('dayOfYear', 'DDD');\n\n // PRIORITY\n addUnitPriority('dayOfYear', 4);\n\n // PARSING\n\n addRegexToken('DDD', match1to3);\n addRegexToken('DDDD', match3);\n addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n });\n\n // HELPERS\n\n // MOMENTS\n\n function getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n }\n\n // FORMATTING\n\n addFormatToken('m', ['mm', 2], 0, 'minute');\n\n // ALIASES\n\n addUnitAlias('minute', 'm');\n\n // PRIORITY\n\n addUnitPriority('minute', 14);\n\n // PARSING\n\n addRegexToken('m', match1to2);\n addRegexToken('mm', match1to2, match2);\n addParseToken(['m', 'mm'], MINUTE);\n\n // MOMENTS\n\n var getSetMinute = makeGetSet('Minutes', false);\n\n // FORMATTING\n\n addFormatToken('s', ['ss', 2], 0, 'second');\n\n // ALIASES\n\n addUnitAlias('second', 's');\n\n // PRIORITY\n\n addUnitPriority('second', 15);\n\n // PARSING\n\n addRegexToken('s', match1to2);\n addRegexToken('ss', match1to2, match2);\n addParseToken(['s', 'ss'], SECOND);\n\n // MOMENTS\n\n var getSetSecond = makeGetSet('Seconds', false);\n\n // FORMATTING\n\n addFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n });\n\n addFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n });\n\n addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n addFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n });\n addFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n });\n addFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n });\n addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n });\n addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n });\n addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n });\n\n // ALIASES\n\n addUnitAlias('millisecond', 'ms');\n\n // PRIORITY\n\n addUnitPriority('millisecond', 16);\n\n // PARSING\n\n addRegexToken('S', match1to3, match1);\n addRegexToken('SS', match1to3, match2);\n addRegexToken('SSS', match1to3, match3);\n\n var token, getSetMillisecond;\n for (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n }\n\n function parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n }\n\n for (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n }\n\n getSetMillisecond = makeGetSet('Milliseconds', false);\n\n // FORMATTING\n\n addFormatToken('z', 0, 0, 'zoneAbbr');\n addFormatToken('zz', 0, 0, 'zoneName');\n\n // MOMENTS\n\n function getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n }\n\n function getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n }\n\n var proto = Moment.prototype;\n\n proto.add = add;\n proto.calendar = calendar$1;\n proto.clone = clone;\n proto.diff = diff;\n proto.endOf = endOf;\n proto.format = format;\n proto.from = from;\n proto.fromNow = fromNow;\n proto.to = to;\n proto.toNow = toNow;\n proto.get = stringGet;\n proto.invalidAt = invalidAt;\n proto.isAfter = isAfter;\n proto.isBefore = isBefore;\n proto.isBetween = isBetween;\n proto.isSame = isSame;\n proto.isSameOrAfter = isSameOrAfter;\n proto.isSameOrBefore = isSameOrBefore;\n proto.isValid = isValid$2;\n proto.lang = lang;\n proto.locale = locale;\n proto.localeData = localeData;\n proto.max = prototypeMax;\n proto.min = prototypeMin;\n proto.parsingFlags = parsingFlags;\n proto.set = stringSet;\n proto.startOf = startOf;\n proto.subtract = subtract;\n proto.toArray = toArray;\n proto.toObject = toObject;\n proto.toDate = toDate;\n proto.toISOString = toISOString;\n proto.inspect = inspect;\n if (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n }\n proto.toJSON = toJSON;\n proto.toString = toString;\n proto.unix = unix;\n proto.valueOf = valueOf;\n proto.creationData = creationData;\n proto.eraName = getEraName;\n proto.eraNarrow = getEraNarrow;\n proto.eraAbbr = getEraAbbr;\n proto.eraYear = getEraYear;\n proto.year = getSetYear;\n proto.isLeapYear = getIsLeapYear;\n proto.weekYear = getSetWeekYear;\n proto.isoWeekYear = getSetISOWeekYear;\n proto.quarter = proto.quarters = getSetQuarter;\n proto.month = getSetMonth;\n proto.daysInMonth = getDaysInMonth;\n proto.week = proto.weeks = getSetWeek;\n proto.isoWeek = proto.isoWeeks = getSetISOWeek;\n proto.weeksInYear = getWeeksInYear;\n proto.weeksInWeekYear = getWeeksInWeekYear;\n proto.isoWeeksInYear = getISOWeeksInYear;\n proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\n proto.date = getSetDayOfMonth;\n proto.day = proto.days = getSetDayOfWeek;\n proto.weekday = getSetLocaleDayOfWeek;\n proto.isoWeekday = getSetISODayOfWeek;\n proto.dayOfYear = getSetDayOfYear;\n proto.hour = proto.hours = getSetHour;\n proto.minute = proto.minutes = getSetMinute;\n proto.second = proto.seconds = getSetSecond;\n proto.millisecond = proto.milliseconds = getSetMillisecond;\n proto.utcOffset = getSetOffset;\n proto.utc = setOffsetToUTC;\n proto.local = setOffsetToLocal;\n proto.parseZone = setOffsetToParsedOffset;\n proto.hasAlignedHourOffset = hasAlignedHourOffset;\n proto.isDST = isDaylightSavingTime;\n proto.isLocal = isLocal;\n proto.isUtcOffset = isUtcOffset;\n proto.isUtc = isUtc;\n proto.isUTC = isUtc;\n proto.zoneAbbr = getZoneAbbr;\n proto.zoneName = getZoneName;\n proto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n );\n proto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n );\n proto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n );\n proto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n );\n proto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n );\n\n function createUnix(input) {\n return createLocal(input * 1000);\n }\n\n function createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n }\n\n function preParsePostFormat(string) {\n return string;\n }\n\n var proto$1 = Locale.prototype;\n\n proto$1.calendar = calendar;\n proto$1.longDateFormat = longDateFormat;\n proto$1.invalidDate = invalidDate;\n proto$1.ordinal = ordinal;\n proto$1.preparse = preParsePostFormat;\n proto$1.postformat = preParsePostFormat;\n proto$1.relativeTime = relativeTime;\n proto$1.pastFuture = pastFuture;\n proto$1.set = set;\n proto$1.eras = localeEras;\n proto$1.erasParse = localeErasParse;\n proto$1.erasConvertYear = localeErasConvertYear;\n proto$1.erasAbbrRegex = erasAbbrRegex;\n proto$1.erasNameRegex = erasNameRegex;\n proto$1.erasNarrowRegex = erasNarrowRegex;\n\n proto$1.months = localeMonths;\n proto$1.monthsShort = localeMonthsShort;\n proto$1.monthsParse = localeMonthsParse;\n proto$1.monthsRegex = monthsRegex;\n proto$1.monthsShortRegex = monthsShortRegex;\n proto$1.week = localeWeek;\n proto$1.firstDayOfYear = localeFirstDayOfYear;\n proto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\n proto$1.weekdays = localeWeekdays;\n proto$1.weekdaysMin = localeWeekdaysMin;\n proto$1.weekdaysShort = localeWeekdaysShort;\n proto$1.weekdaysParse = localeWeekdaysParse;\n\n proto$1.weekdaysRegex = weekdaysRegex;\n proto$1.weekdaysShortRegex = weekdaysShortRegex;\n proto$1.weekdaysMinRegex = weekdaysMinRegex;\n\n proto$1.isPM = localeIsPM;\n proto$1.meridiem = localeMeridiem;\n\n function get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n }\n\n function listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n }\n\n // ()\n // (5)\n // (fmt, 5)\n // (fmt)\n // (true)\n // (true, 5)\n // (true, fmt, 5)\n // (true, fmt)\n function listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n }\n\n function listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n }\n\n function listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n }\n\n function listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n }\n\n function listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n }\n\n function listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n }\n\n getSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n });\n\n // Side effect imports\n\n hooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n );\n hooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n );\n\n var mathAbs = Math.abs;\n\n function abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n }\n\n function addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n }\n\n // supports only 2.0-style add(1, 's') or add(duration)\n function add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n }\n\n // supports only 2.0-style subtract(1, 's') or subtract(duration)\n function subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n }\n\n function absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n }\n\n function bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n }\n\n function daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n }\n\n function monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n }\n\n function as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n }\n\n // TODO: Use this.as('ms')?\n function valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n }\n\n function makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n }\n\n var asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\n function clone$1() {\n return createDuration(this);\n }\n\n function get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n }\n\n function makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n }\n\n var milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\n function weeks() {\n return absFloor(this.days() / 7);\n }\n\n var round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n }\n\n function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n }\n\n // This function allows you to set the rounding function for relative time strings\n function getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }\n\n // This function allows you to set a threshold for relative time strings\n function getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }\n\n function humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n }\n\n var abs$1 = Math.abs;\n\n function sign(x) {\n return (x > 0) - (x < 0) || +x;\n }\n\n function toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n }\n\n var proto$2 = Duration.prototype;\n\n proto$2.isValid = isValid$1;\n proto$2.abs = abs;\n proto$2.add = add$1;\n proto$2.subtract = subtract$1;\n proto$2.as = as;\n proto$2.asMilliseconds = asMilliseconds;\n proto$2.asSeconds = asSeconds;\n proto$2.asMinutes = asMinutes;\n proto$2.asHours = asHours;\n proto$2.asDays = asDays;\n proto$2.asWeeks = asWeeks;\n proto$2.asMonths = asMonths;\n proto$2.asQuarters = asQuarters;\n proto$2.asYears = asYears;\n proto$2.valueOf = valueOf$1;\n proto$2._bubble = bubble;\n proto$2.clone = clone$1;\n proto$2.get = get$2;\n proto$2.milliseconds = milliseconds;\n proto$2.seconds = seconds;\n proto$2.minutes = minutes;\n proto$2.hours = hours;\n proto$2.days = days;\n proto$2.weeks = weeks;\n proto$2.months = months;\n proto$2.years = years;\n proto$2.humanize = humanize;\n proto$2.toISOString = toISOString$1;\n proto$2.toString = toISOString$1;\n proto$2.toJSON = toISOString$1;\n proto$2.locale = locale;\n proto$2.localeData = localeData;\n\n proto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n );\n proto$2.lang = lang;\n\n // FORMATTING\n\n addFormatToken('X', 0, 0, 'unix');\n addFormatToken('x', 0, 0, 'valueOf');\n\n // PARSING\n\n addRegexToken('x', matchSigned);\n addRegexToken('X', matchTimestamp);\n addParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n });\n addParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n });\n\n //! moment.js\n\n hooks.version = '2.29.3';\n\n setHookCallback(createLocal);\n\n hooks.fn = proto;\n hooks.min = min;\n hooks.max = max;\n hooks.now = now;\n hooks.utc = createUTC;\n hooks.unix = createUnix;\n hooks.months = listMonths;\n hooks.isDate = isDate;\n hooks.locale = getSetGlobalLocale;\n hooks.invalid = createInvalid;\n hooks.duration = createDuration;\n hooks.isMoment = isMoment;\n hooks.weekdays = listWeekdays;\n hooks.parseZone = createInZone;\n hooks.localeData = getLocale;\n hooks.isDuration = isDuration;\n hooks.monthsShort = listMonthsShort;\n hooks.weekdaysMin = listWeekdaysMin;\n hooks.defineLocale = defineLocale;\n hooks.updateLocale = updateLocale;\n hooks.locales = listLocales;\n hooks.weekdaysShort = listWeekdaysShort;\n hooks.normalizeUnits = normalizeUnits;\n hooks.relativeTimeRounding = getSetRelativeTimeRounding;\n hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\n hooks.calendarFormat = getCalendarFormat;\n hooks.prototype = proto;\n\n // currently HTML5 input type only supports 24-hour formats\n hooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // <input type=\"datetime-local\" />\n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type=\"datetime-local\" step=\"1\" />\n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type=\"datetime-local\" step=\"0.001\" />\n DATE: 'YYYY-MM-DD', // <input type=\"date\" />\n TIME: 'HH:mm', // <input type=\"time\" />\n TIME_SECONDS: 'HH:mm:ss', // <input type=\"time\" step=\"1\" />\n TIME_MS: 'HH:mm:ss.SSS', // <input type=\"time\" step=\"0.001\" />\n WEEK: 'GGGG-[W]WW', // <input type=\"week\" />\n MONTH: 'YYYY-MM', // <input type=\"month\" />\n };\n\n return hooks;\n\n})));\n","export * from \"./components/form\";\nexport * from \"./components/VulcanComponents\";\nexport * from \"./components/VulcanCurrentUser\";\nexport * from \"./componentsHelpers\";\n","export * from \"./core/FormContainer\";\nexport * from \"./core/Form\";\n\nexport * from \"./core/FormContext\";\n\nexport type { FormInputProps } from \"./core/FormComponentInner\";\n","/*\n\nFormContainer aka SmartForm\n\nChanges compared to Vulcan Meteor:\n\n- previously was named FormWrapper\n- accepts a model instead of collection\n- no queryFragmentName (resp. mutation name), instead you need to pass the fragment explicitely\n\nTechnically, this is a GraphqlSmartForm, while Form.tsx is the more\ngeneric SmartForm, or a \"ModelForm\".\n\n\n---\n\nGenerate the appropriate fragment for the current form, then\nwrap the main Form component with the necessary HoCs while passing\nthem the fragment.\n\nThis component is itself wrapped with:\n\n- withCurrentUser\n- withApollo (used to access the Apollo client for form pre-population)\n\nAnd wraps the Form component with:\n\n- withNew\n\nOr:\n\n- withSingle\n- withUpdate\n- withDelete\n\n(When wrapping with withSingle, withUpdate, and withDelete, a special Loader\ncomponent is also added to wait for withSingle's loading prop to be false)\n\n*/\nimport React, { useRef } from \"react\";\n// import // withCurrentUser,\n// Utils,\n// getFragment,\n//\"meteor/vulcan:core\";\nimport { DocumentNode } from \"@apollo/client\";\nimport gql from \"graphql-tag\";\n\nimport getFormFragments from \"../utils/formFragments\";\n// import { VulcanModel } from \"@vulcanjs/model\";\nimport { VulcanGraphqlModel, getFragmentName } from \"@vulcanjs/graphql\";\nimport type {\n CreateVariables,\n UpdateVariables,\n DeleteVariables,\n} from \"@vulcanjs/crud\";\nimport { capitalize } from \"@vulcanjs/utils\";\nimport {\n useSingle,\n useCreate,\n useUpdate,\n useDelete,\n UseSingleOptions,\n} from \"@vulcanjs/react-hooks\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\nimport { FetchResult } from \"@apollo/client\";\n// import { FormType } from \"./typings\";\nimport { debugVulcan } from \"@vulcanjs/utils\";\nimport { useVulcanCurrentUser } from \"../../VulcanCurrentUser/Consumer\";\nimport { VulcanUser } from \"@vulcanjs/permissions\";\nimport { PassedDownFormProps } from \"./Form/typings\";\nconst debugForm = debugVulcan(\"form\");\n\n// Mutation that yield a success result\ntype SuccessfulFetchResult<TData = Object> = FetchResult<TData> & {\n data: TData;\n};\n/**\n * Typeguared to allow considering the request as successful\n */\nconst isSuccessful = function <T = any>(\n result: FetchResult<T> | undefined\n): result is SuccessfulFetchResult<T> {\n return !!result?.data;\n};\n\nexport interface FormContainerProps extends PassedDownFormProps {\n model: VulcanGraphqlModel;\n /** Document id for edition mode, will automatically fetch the document */\n documentId?: string;\n /** Slug (= human readable unique id) for edition mode, will automatically fetch the document */\n slug?: string;\n /**\n * List only those fields in the form\n */\n fields?: Array<string>;\n /**\n * List default fields + those additional fields as well\n */\n addFields?: Array<string>;\n /**\n * Force a currentUser, overriding the currentUser obtained\n * via Context\n *\n * If you use many forms in your app,\n * it might be better to set VulcanCurrentUserContext\n * at the top-level of your app\n * (eg in \"pages/_app.js\" for Next.js)\n */\n currentUser?: VulcanUser | null;\n loadingCurrentUser?: boolean;\n}\nexport type SmartFormProps = FormContainerProps;\n\nconst useFragments = (\n props: Pick<\n FormContainerProps,\n | \"mutationFragment\"\n | \"mutationFragmentName\"\n | \"queryFragment\"\n | \"queryFragmentName\"\n // for auto generation\n | \"model\"\n | \"fields\"\n | \"addFields\"\n >,\n formType: \"edit\" | \"new\"\n) => {\n // get fragment used to decide what data to load from the server to populate the form,\n // as well as what data to ask for as return value for the mutation\n // TODO: move out of the component\n //const getFragments = () => {\n let queryFragment: DocumentNode | undefined;\n let queryFragmentName: string | undefined;\n let mutationFragment: DocumentNode | undefined;\n let mutationFragmentName: string | undefined;\n\n // if queryFragment or mutationFragment props are specified, accept either fragment object or fragment string\n // TODO: not sure we actually need that, gApollo accepts fragments or string normally\n if (props.queryFragment) {\n if (typeof props.queryFragment === \"string\") {\n queryFragment = gql`\n ${props.queryFragment}\n `;\n if (!props.queryFragmentName)\n throw new Error(\n \"When using a string queryFragment, queryFragmentName is mandatory\"\n );\n queryFragmentName = props.queryFragmentName;\n } else {\n // DocumentNode\n queryFragment = props.queryFragment;\n // automatically compute the fragment name\n queryFragmentName =\n props.queryFragmentName || getFragmentName(props.queryFragment);\n }\n }\n if (props.mutationFragment) {\n if (typeof props.mutationFragment === \"string\") {\n mutationFragment = gql`\n ${props.mutationFragment}\n `;\n if (!props.mutationFragmentName)\n throw new Error(\n \"When using a string mutationFragment, mutationFragmentName is mandatory\"\n );\n queryFragmentName = props.mutationFragmentName;\n } else {\n // DocumentNode\n mutationFragment = props.mutationFragment;\n // automatically compute the fragment name\n mutationFragmentName =\n props.mutationFragmentName || getFragmentName(props.mutationFragment);\n }\n }\n // auto generate fragments\n let autoFormFragments;\n if (!props.queryFragment || !props.mutationFragment) {\n const { model, fields, addFields } = props;\n // autogenerated fragments\n autoFormFragments = getFormFragments({\n formType,\n model,\n fields,\n addFields,\n });\n }\n // use autogenerated value if necessary\n if (!props.queryFragment) {\n queryFragment = autoFormFragments.queryFragment;\n queryFragmentName = autoFormFragments.queryFragmentName;\n }\n if (!props.mutationFragment) {\n mutationFragment = autoFormFragments.mutationFragment;\n mutationFragmentName = autoFormFragments.mutationFragmentName;\n }\n return {\n mutationFragment: mutationFragment as DocumentNode,\n mutationFragmentName: mutationFragmentName as string,\n queryFragment: queryFragment as DocumentNode,\n queryFragmentName: queryFragmentName as string,\n };\n};\n// Fonctionnal version to be able to use hooks\nexport const FormContainer = (props: FormContainerProps) => {\n const {\n model,\n documentId,\n slug,\n fields,\n addFields,\n currentUser: currentUserFromProps,\n loadingCurrentUser: loadingCurrentUserFromProps,\n } = props;\n const { schema } = model;\n // if a document is being passed, this is an edit form\n const isEdit = documentId || slug;\n const selector = {\n documentId,\n slug,\n };\n const formType = isEdit ? \"edit\" : \"new\";\n const VulcanComponents = useVulcanComponents();\n\n // get query & mutation fragments from props or else default to same as generatedFragment\n //return {\n // queryFragment,\n // mutationFragment,\n //};\n //}\n\n const prefix = `${model.name}${capitalize(formType)}`;\n // props to pass on to child component (i.e. <Form />)\n const childProps = {\n formType,\n schema,\n };\n\n const {\n mutationFragment,\n mutationFragmentName,\n queryFragment,\n queryFragmentName,\n } = useFragments(props, formType);\n\n // options for useCreate, useUpdate and useDelete\n const mutationOptions = {\n model,\n // collection: this.props.collection,\n fragment: mutationFragment,\n fragmentName: mutationFragmentName,\n };\n\n const queryOptions: UseSingleOptions<any> = {\n model,\n // TODO: what this option does?\n // queryName: `${prefix}FormQuery`,\n fragment: queryFragment,\n fragmentName: queryFragmentName,\n // fragmentName?\n input: {\n id: documentId,\n enableCache: false,\n // TODO: support slug\n },\n queryOptions: {\n // we always want to load a fresh copy of the document\n fetchPolicy: \"network-only\" as \"network-only\", // cast is for fixing annoying TS issue... https://github.com/vuejs/vue-apollo/issues/936\n pollInterval: 0, // no polling, only load data once\n skip: formType === \"new\",\n },\n };\n /* debug\n console.log(\n \"MUT\",\n (mutationFragment as any).loc.source.body,\n mutationFragmentName\n );\n console.log(\n \"QUERY\",\n (queryFragment as any).loc.source.body,\n queryFragmentName\n );*/\n const { data, document, loading, refetch } = useSingle(queryOptions);\n if (formType !== \"new\") {\n debugForm(\n \"useSingle result\",\n \"data\",\n data,\n \"document\",\n document,\n \"loading\",\n loading\n );\n }\n // TODO: pass the creation functions down to the Form\n const [createDocument] = useCreate(mutationOptions);\n const [updateDocument] = useUpdate(mutationOptions);\n const [deleteDocument] = useDelete(mutationOptions);\n\n const {\n currentUser: currentUserFromContext,\n loading: loadingCurrentUserFromContext,\n } = useVulcanCurrentUser();\n const shouldGetCurrentUserFromProps =\n typeof currentUserFromProps !== \"undefined\";\n const currentUser = shouldGetCurrentUserFromProps\n ? currentUserFromProps\n : currentUserFromContext;\n const loadingCurrentUser = shouldGetCurrentUserFromProps\n ? loadingCurrentUserFromProps\n : loadingCurrentUserFromContext;\n\n // callbacks\n /*\n const formRef = useRef(null);\n const newMutationSuccessCallback = function <TData = Object>(\n result: SuccessfulFetchResult<TData>\n ) {\n getDocumentFromResult(result, \"new\");\n };\n const editMutationSuccessCallback = function <TData = Object>(\n result: SuccessfulFetchResult<TData>\n ) {\n getDocumentFromResult(result, \"edit\");\n };\n */\n\n /*\n The create hook already creates a document prop in a more stable way\n const getDocumentFromResult = function <TData = Object>(\n // must be called only on valid results\n result: SuccessfulFetchResult<TData> | undefined\n ) {\n if (!result) return undefined;\n // TODO: quite risky... we should have a better way to get the document\n let document = result.data[Object.keys(result.data)[0]].data; // document is always on first property\n\n return document;\n };*/\n // for new mutation, run refetch function if it exists\n /*\n if (mutationType === \"new\" && refetch) refetch();\n */\n\n const createAndReturnDocument = async (variables: CreateVariables) => {\n const result = await createDocument(variables);\n const { errors, document } = result;\n return {\n document,\n errors,\n };\n };\n const updateAndReturnDocument = async (variables: UpdateVariables) => {\n const result = await updateDocument(variables);\n const { errors, document } = result;\n return {\n document,\n errors,\n };\n };\n\n const deleteDocumentAndRefetch = async (variables: DeleteVariables) => {\n await deleteDocument(variables as any);\n };\n\n if (isEdit && loading) {\n return <VulcanComponents.Loading />;\n }\n return (\n <VulcanComponents.Form\n document={document}\n loading={loading || loadingCurrentUser}\n createDocument={createAndReturnDocument /*createDocument*/}\n updateDocument={updateAndReturnDocument}\n deleteDocument={deleteDocumentAndRefetch}\n refetch={refetch}\n currentUser={currentUser}\n {...childProps}\n {...props}\n />\n );\n};\n\n/*\nFormContainer.propTypes = {\n // main options\n documentId: PropTypes.string, // if a document is passed, this will be an edit form\n mutationFragment: PropTypes.object,\n mutationFragmentName: PropTypes.string,\n\n // graphQL\n // createFoo, deleteFoo, updateFoo\n // newMutation: PropTypes.func, // the new mutation\n // editMutation: PropTypes.func, // the edit mutation\n // removeMutation: PropTypes.func, // the remove mutation\n\n // form\n prefilledProps: PropTypes.object,\n layout: PropTypes.string,\n fields: PropTypes.arrayOf(PropTypes.string),\n hideFields: PropTypes.arrayOf(PropTypes.string),\n addFields: PropTypes.arrayOf(PropTypes.string),\n showRemove: PropTypes.bool,\n submitLabel: PropTypes.node,\n cancelLabel: PropTypes.node,\n revertLabel: PropTypes.node,\n repeatErrors: PropTypes.bool,\n warnUnsavedChanges: PropTypes.bool,\n formComponents: PropTypes.object,\n disabled: PropTypes.bool,\n itemProperties: PropTypes.object,\n successComponent: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n contextName: PropTypes.string,\n\n // callbacks\n ...callbackProps,\n\n currentUser: PropTypes.object,\n client: PropTypes.object,\n};\n\nFormContainer.defaultProps = {\n layout: \"horizontal\",\n};\n*/\n\n/*\nregisterComponent({\n name: 'SmartForm',\n component: FormContainer,\n hocs: [withCurrentUser, withApollo, withRouter, withCollectionProps],\n});\n*/\n\nexport const SmartForm = FormContainer;\n\nexport default FormContainer;\n","import { __assign } from \"tslib\";\nimport { parse } from 'graphql';\nvar docCache = new Map();\nvar fragmentSourceMap = new Map();\nvar printFragmentWarnings = true;\nvar experimentalFragmentVariables = false;\nfunction normalize(string) {\n return string.replace(/[\\s,]+/g, ' ').trim();\n}\nfunction cacheKeyFromLoc(loc) {\n return normalize(loc.source.body.substring(loc.start, loc.end));\n}\nfunction processFragments(ast) {\n var seenKeys = new Set();\n var definitions = [];\n ast.definitions.forEach(function (fragmentDefinition) {\n if (fragmentDefinition.kind === 'FragmentDefinition') {\n var fragmentName = fragmentDefinition.name.value;\n var sourceKey = cacheKeyFromLoc(fragmentDefinition.loc);\n var sourceKeySet = fragmentSourceMap.get(fragmentName);\n if (sourceKeySet && !sourceKeySet.has(sourceKey)) {\n if (printFragmentWarnings) {\n console.warn(\"Warning: fragment with name \" + fragmentName + \" already exists.\\n\"\n + \"graphql-tag enforces all fragment names across your application to be unique; read more about\\n\"\n + \"this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names\");\n }\n }\n else if (!sourceKeySet) {\n fragmentSourceMap.set(fragmentName, sourceKeySet = new Set);\n }\n sourceKeySet.add(sourceKey);\n if (!seenKeys.has(sourceKey)) {\n seenKeys.add(sourceKey);\n definitions.push(fragmentDefinition);\n }\n }\n else {\n definitions.push(fragmentDefinition);\n }\n });\n return __assign(__assign({}, ast), { definitions: definitions });\n}\nfunction stripLoc(doc) {\n var workSet = new Set(doc.definitions);\n workSet.forEach(function (node) {\n if (node.loc)\n delete node.loc;\n Object.keys(node).forEach(function (key) {\n var value = node[key];\n if (value && typeof value === 'object') {\n workSet.add(value);\n }\n });\n });\n var loc = doc.loc;\n if (loc) {\n delete loc.startToken;\n delete loc.endToken;\n }\n return doc;\n}\nfunction parseDocument(source) {\n var cacheKey = normalize(source);\n if (!docCache.has(cacheKey)) {\n var parsed = parse(source, {\n experimentalFragmentVariables: experimentalFragmentVariables,\n allowLegacyFragmentVariables: experimentalFragmentVariables\n });\n if (!parsed || parsed.kind !== 'Document') {\n throw new Error('Not a valid GraphQL document.');\n }\n docCache.set(cacheKey, stripLoc(processFragments(parsed)));\n }\n return docCache.get(cacheKey);\n}\nexport function gql(literals) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (typeof literals === 'string') {\n literals = [literals];\n }\n var result = literals[0];\n args.forEach(function (arg, i) {\n if (arg && arg.kind === 'Document') {\n result += arg.loc.source.body;\n }\n else {\n result += arg;\n }\n result += literals[i + 1];\n });\n return parseDocument(result);\n}\nexport function resetCaches() {\n docCache.clear();\n fragmentSourceMap.clear();\n}\nexport function disableFragmentWarnings() {\n printFragmentWarnings = false;\n}\nexport function enableExperimentalFragmentVariables() {\n experimentalFragmentVariables = true;\n}\nexport function disableExperimentalFragmentVariables() {\n experimentalFragmentVariables = false;\n}\nvar extras = {\n gql: gql,\n resetCaches: resetCaches,\n disableFragmentWarnings: disableFragmentWarnings,\n enableExperimentalFragmentVariables: enableExperimentalFragmentVariables,\n disableExperimentalFragmentVariables: disableExperimentalFragmentVariables\n};\n(function (gql_1) {\n gql_1.gql = extras.gql, gql_1.resetCaches = extras.resetCaches, gql_1.disableFragmentWarnings = extras.disableFragmentWarnings, gql_1.enableExperimentalFragmentVariables = extras.enableExperimentalFragmentVariables, gql_1.disableExperimentalFragmentVariables = extras.disableExperimentalFragmentVariables;\n})(gql || (gql = {}));\ngql[\"default\"] = gql;\nexport default gql;\n//# sourceMappingURL=index.js.map","import tslib from '../tslib.js';\r\nconst {\r\n __extends,\r\n __assign,\r\n __rest,\r\n __decorate,\r\n __param,\r\n __metadata,\r\n __awaiter,\r\n __generator,\r\n __exportStar,\r\n __createBinding,\r\n __values,\r\n __read,\r\n __spread,\r\n __spreadArrays,\r\n __spreadArray,\r\n __await,\r\n __asyncGenerator,\r\n __asyncDelegator,\r\n __asyncValues,\r\n __makeTemplateObject,\r\n __importStar,\r\n __importDefault,\r\n __classPrivateFieldGet,\r\n __classPrivateFieldSet,\r\n __classPrivateFieldIn,\r\n} = tslib;\r\nexport {\r\n __extends,\r\n __assign,\r\n __rest,\r\n __decorate,\r\n __param,\r\n __metadata,\r\n __awaiter,\r\n __generator,\r\n __exportStar,\r\n __createBinding,\r\n __values,\r\n __read,\r\n __spread,\r\n __spreadArrays,\r\n __spreadArray,\r\n __await,\r\n __asyncGenerator,\r\n __asyncDelegator,\r\n __asyncValues,\r\n __makeTemplateObject,\r\n __importStar,\r\n __importDefault,\r\n __classPrivateFieldGet,\r\n __classPrivateFieldSet,\r\n __classPrivateFieldIn,\r\n};\r\n","/**\n * GraphQL.js provides a reference implementation for the GraphQL specification\n * but is also a useful utility for operating on GraphQL files and building\n * sophisticated tools.\n *\n * This primary module exports a general purpose function for fulfilling all\n * steps of the GraphQL specification in a single operation, but also includes\n * utilities for every part of the GraphQL specification:\n *\n * - Parsing the GraphQL language.\n * - Building a GraphQL type schema.\n * - Validating a GraphQL request against a type schema.\n * - Executing a GraphQL request against a type schema.\n *\n * This also includes utility functions for operating on GraphQL types and\n * GraphQL documents to facilitate building tools.\n *\n * You may also import from each sub-directory directly. For example, the\n * following two import statements are equivalent:\n *\n * import { parse } from 'graphql';\n * import { parse } from 'graphql/language';\n */\n// The GraphQL.js version info.\nexport { version, versionInfo } from \"./version.mjs\"; // The primary entry point into fulfilling a GraphQL request.\n\nexport { graphql, graphqlSync } from \"./graphql.mjs\"; // Create and operate on GraphQL type definitions and schema.\n\nexport { // Definitions\nGraphQLSchema, GraphQLDirective, GraphQLScalarType, GraphQLObjectType, GraphQLInterfaceType, GraphQLUnionType, GraphQLEnumType, GraphQLInputObjectType, GraphQLList, GraphQLNonNull // Standard GraphQL Scalars\n, specifiedScalarTypes, GraphQLInt, GraphQLFloat, GraphQLString, GraphQLBoolean, GraphQLID // Built-in Directives defined by the Spec\n, specifiedDirectives, GraphQLIncludeDirective, GraphQLSkipDirective, GraphQLDeprecatedDirective, GraphQLSpecifiedByDirective // \"Enum\" of Type Kinds\n, TypeKind // Constant Deprecation Reason\n, DEFAULT_DEPRECATION_REASON // GraphQL Types for introspection.\n, introspectionTypes, __Schema, __Directive, __DirectiveLocation, __Type, __Field, __InputValue, __EnumValue, __TypeKind // Meta-field definitions.\n, SchemaMetaFieldDef, TypeMetaFieldDef, TypeNameMetaFieldDef // Predicates\n, isSchema, isDirective, isType, isScalarType, isObjectType, isInterfaceType, isUnionType, isEnumType, isInputObjectType, isListType, isNonNullType, isInputType, isOutputType, isLeafType, isCompositeType, isAbstractType, isWrappingType, isNullableType, isNamedType, isRequiredArgument, isRequiredInputField, isSpecifiedScalarType, isIntrospectionType, isSpecifiedDirective // Assertions\n, assertSchema, assertDirective, assertType, assertScalarType, assertObjectType, assertInterfaceType, assertUnionType, assertEnumType, assertInputObjectType, assertListType, assertNonNullType, assertInputType, assertOutputType, assertLeafType, assertCompositeType, assertAbstractType, assertWrappingType, assertNullableType, assertNamedType // Un-modifiers\n, getNullableType, getNamedType // Validate GraphQL schema.\n, validateSchema, assertValidSchema } from \"./type/index.mjs\";\n// Parse and operate on GraphQL language source files.\nexport { Token, Source, Location, getLocation // Print source location\n, printLocation, printSourceLocation // Lex\n, Lexer, TokenKind // Parse\n, parse, parseValue, parseType // Print\n, print // Visit\n, visit, visitInParallel, getVisitFn, BREAK, Kind, DirectiveLocation // Predicates\n, isDefinitionNode, isExecutableDefinitionNode, isSelectionNode, isValueNode, isTypeNode, isTypeSystemDefinitionNode, isTypeDefinitionNode, isTypeSystemExtensionNode, isTypeExtensionNode } from \"./language/index.mjs\";\n// Execute GraphQL queries.\nexport { execute, executeSync, defaultFieldResolver, defaultTypeResolver, responsePathAsArray, getDirectiveValues } from \"./execution/index.mjs\";\nexport { subscribe, createSourceEventStream } from \"./subscription/index.mjs\";\n// Validate GraphQL documents.\nexport { validate, ValidationContext // All validation rules in the GraphQL Specification.\n, specifiedRules // Individual validation rules.\n, ExecutableDefinitionsRule, FieldsOnCorrectTypeRule, FragmentsOnCompositeTypesRule, KnownArgumentNamesRule, KnownDirectivesRule, KnownFragmentNamesRule, KnownTypeNamesRule, LoneAnonymousOperationRule, NoFragmentCyclesRule, NoUndefinedVariablesRule, NoUnusedFragmentsRule, NoUnusedVariablesRule, OverlappingFieldsCanBeMergedRule, PossibleFragmentSpreadsRule, ProvidedRequiredArgumentsRule, ScalarLeafsRule, SingleFieldSubscriptionsRule, UniqueArgumentNamesRule, UniqueDirectivesPerLocationRule, UniqueFragmentNamesRule, UniqueInputFieldNamesRule, UniqueOperationNamesRule, UniqueVariableNamesRule, ValuesOfCorrectTypeRule, VariablesAreInputTypesRule, VariablesInAllowedPositionRule // SDL-specific validation rules\n, LoneSchemaDefinitionRule, UniqueOperationTypesRule, UniqueTypeNamesRule, UniqueEnumValueNamesRule, UniqueFieldDefinitionNamesRule, UniqueDirectiveNamesRule, PossibleTypeExtensionsRule // Custom validation rules\n, NoDeprecatedCustomRule, NoSchemaIntrospectionCustomRule } from \"./validation/index.mjs\";\n// Create, format, and print GraphQL errors.\nexport { GraphQLError, syntaxError, locatedError, printError, formatError } from \"./error/index.mjs\";\n// Utilities for operating on GraphQL type schema and parsed sources.\nexport { // Produce the GraphQL query recommended for a full schema introspection.\n// Accepts optional IntrospectionOptions.\ngetIntrospectionQuery // Gets the target Operation from a Document.\n, getOperationAST // Gets the Type for the target Operation AST.\n, getOperationRootType // Convert a GraphQLSchema to an IntrospectionQuery.\n, introspectionFromSchema // Build a GraphQLSchema from an introspection result.\n, buildClientSchema // Build a GraphQLSchema from a parsed GraphQL Schema language AST.\n, buildASTSchema // Build a GraphQLSchema from a GraphQL schema language document.\n, buildSchema // @deprecated: Get the description from a schema AST node and supports legacy\n// syntax for specifying descriptions - will be removed in v16.\n, getDescription // Extends an existing GraphQLSchema from a parsed GraphQL Schema\n// language AST.\n, extendSchema // Sort a GraphQLSchema.\n, lexicographicSortSchema // Print a GraphQLSchema to GraphQL Schema language.\n, printSchema // Print a GraphQLType to GraphQL Schema language.\n, printType // Prints the built-in introspection schema in the Schema Language\n// format.\n, printIntrospectionSchema // Create a GraphQLType from a GraphQL language AST.\n, typeFromAST // Create a JavaScript value from a GraphQL language AST with a Type.\n, valueFromAST // Create a JavaScript value from a GraphQL language AST without a Type.\n, valueFromASTUntyped // Create a GraphQL language AST from a JavaScript value.\n, astFromValue // A helper to use within recursive-descent visitors which need to be aware of\n// the GraphQL type system.\n, TypeInfo, visitWithTypeInfo // Coerces a JavaScript value to a GraphQL type, or produces errors.\n, coerceInputValue // Concatenates multiple AST together.\n, concatAST // Separates an AST into an AST per Operation.\n, separateOperations // Strips characters that are not significant to the validity or execution\n// of a GraphQL document.\n, stripIgnoredCharacters // Comparators for types\n, isEqualType, isTypeSubTypeOf, doTypesOverlap // Asserts a string is a valid GraphQL name.\n, assertValidName // Determine if a string is a valid GraphQL name.\n, isValidNameError // Compares two GraphQLSchemas and detects breaking changes.\n, BreakingChangeType, DangerousChangeType, findBreakingChanges, findDangerousChanges // @deprecated: Report all deprecated usage within a GraphQL document.\n, findDeprecatedUsages } from \"./utilities/index.mjs\";\n","import { syntaxError } from \"../error/syntaxError.mjs\";\nimport { Kind } from \"./kinds.mjs\";\nimport { Location } from \"./ast.mjs\";\nimport { TokenKind } from \"./tokenKind.mjs\";\nimport { Source, isSource } from \"./source.mjs\";\nimport { DirectiveLocation } from \"./directiveLocation.mjs\";\nimport { Lexer, isPunctuatorTokenKind } from \"./lexer.mjs\";\n/**\n * Configuration options to control parser behavior\n */\n\n/**\n * Given a GraphQL source, parses it into a Document.\n * Throws GraphQLError if a syntax error is encountered.\n */\nexport function parse(source, options) {\n var parser = new Parser(source, options);\n return parser.parseDocument();\n}\n/**\n * Given a string containing a GraphQL value (ex. `[42]`), parse the AST for\n * that value.\n * Throws GraphQLError if a syntax error is encountered.\n *\n * This is useful within tools that operate upon GraphQL Values directly and\n * in isolation of complete GraphQL documents.\n *\n * Consider providing the results to the utility function: valueFromAST().\n */\n\nexport function parseValue(source, options) {\n var parser = new Parser(source, options);\n parser.expectToken(TokenKind.SOF);\n var value = parser.parseValueLiteral(false);\n parser.expectToken(TokenKind.EOF);\n return value;\n}\n/**\n * Given a string containing a GraphQL Type (ex. `[Int!]`), parse the AST for\n * that type.\n * Throws GraphQLError if a syntax error is encountered.\n *\n * This is useful within tools that operate upon GraphQL Types directly and\n * in isolation of complete GraphQL documents.\n *\n * Consider providing the results to the utility function: typeFromAST().\n */\n\nexport function parseType(source, options) {\n var parser = new Parser(source, options);\n parser.expectToken(TokenKind.SOF);\n var type = parser.parseTypeReference();\n parser.expectToken(TokenKind.EOF);\n return type;\n}\n/**\n * This class is exported only to assist people in implementing their own parsers\n * without duplicating too much code and should be used only as last resort for cases\n * such as experimental syntax or if certain features could not be contributed upstream.\n *\n * It is still part of the internal API and is versioned, so any changes to it are never\n * considered breaking changes. If you still need to support multiple versions of the\n * library, please use the `versionInfo` variable for version detection.\n *\n * @internal\n */\n\nexport var Parser = /*#__PURE__*/function () {\n function Parser(source, options) {\n var sourceObj = isSource(source) ? source : new Source(source);\n this._lexer = new Lexer(sourceObj);\n this._options = options;\n }\n /**\n * Converts a name lex token into a name parse node.\n */\n\n\n var _proto = Parser.prototype;\n\n _proto.parseName = function parseName() {\n var token = this.expectToken(TokenKind.NAME);\n return {\n kind: Kind.NAME,\n value: token.value,\n loc: this.loc(token)\n };\n } // Implements the parsing rules in the Document section.\n\n /**\n * Document : Definition+\n */\n ;\n\n _proto.parseDocument = function parseDocument() {\n var start = this._lexer.token;\n return {\n kind: Kind.DOCUMENT,\n definitions: this.many(TokenKind.SOF, this.parseDefinition, TokenKind.EOF),\n loc: this.loc(start)\n };\n }\n /**\n * Definition :\n * - ExecutableDefinition\n * - TypeSystemDefinition\n * - TypeSystemExtension\n *\n * ExecutableDefinition :\n * - OperationDefinition\n * - FragmentDefinition\n */\n ;\n\n _proto.parseDefinition = function parseDefinition() {\n if (this.peek(TokenKind.NAME)) {\n switch (this._lexer.token.value) {\n case 'query':\n case 'mutation':\n case 'subscription':\n return this.parseOperationDefinition();\n\n case 'fragment':\n return this.parseFragmentDefinition();\n\n case 'schema':\n case 'scalar':\n case 'type':\n case 'interface':\n case 'union':\n case 'enum':\n case 'input':\n case 'directive':\n return this.parseTypeSystemDefinition();\n\n case 'extend':\n return this.parseTypeSystemExtension();\n }\n } else if (this.peek(TokenKind.BRACE_L)) {\n return this.parseOperationDefinition();\n } else if (this.peekDescription()) {\n return this.parseTypeSystemDefinition();\n }\n\n throw this.unexpected();\n } // Implements the parsing rules in the Operations section.\n\n /**\n * OperationDefinition :\n * - SelectionSet\n * - OperationType Name? VariableDefinitions? Directives? SelectionSet\n */\n ;\n\n _proto.parseOperationDefinition = function parseOperationDefinition() {\n var start = this._lexer.token;\n\n if (this.peek(TokenKind.BRACE_L)) {\n return {\n kind: Kind.OPERATION_DEFINITION,\n operation: 'query',\n name: undefined,\n variableDefinitions: [],\n directives: [],\n selectionSet: this.parseSelectionSet(),\n loc: this.loc(start)\n };\n }\n\n var operation = this.parseOperationType();\n var name;\n\n if (this.peek(TokenKind.NAME)) {\n name = this.parseName();\n }\n\n return {\n kind: Kind.OPERATION_DEFINITION,\n operation: operation,\n name: name,\n variableDefinitions: this.parseVariableDefinitions(),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n loc: this.loc(start)\n };\n }\n /**\n * OperationType : one of query mutation subscription\n */\n ;\n\n _proto.parseOperationType = function parseOperationType() {\n var operationToken = this.expectToken(TokenKind.NAME);\n\n switch (operationToken.value) {\n case 'query':\n return 'query';\n\n case 'mutation':\n return 'mutation';\n\n case 'subscription':\n return 'subscription';\n }\n\n throw this.unexpected(operationToken);\n }\n /**\n * VariableDefinitions : ( VariableDefinition+ )\n */\n ;\n\n _proto.parseVariableDefinitions = function parseVariableDefinitions() {\n return this.optionalMany(TokenKind.PAREN_L, this.parseVariableDefinition, TokenKind.PAREN_R);\n }\n /**\n * VariableDefinition : Variable : Type DefaultValue? Directives[Const]?\n */\n ;\n\n _proto.parseVariableDefinition = function parseVariableDefinition() {\n var start = this._lexer.token;\n return {\n kind: Kind.VARIABLE_DEFINITION,\n variable: this.parseVariable(),\n type: (this.expectToken(TokenKind.COLON), this.parseTypeReference()),\n defaultValue: this.expectOptionalToken(TokenKind.EQUALS) ? this.parseValueLiteral(true) : undefined,\n directives: this.parseDirectives(true),\n loc: this.loc(start)\n };\n }\n /**\n * Variable : $ Name\n */\n ;\n\n _proto.parseVariable = function parseVariable() {\n var start = this._lexer.token;\n this.expectToken(TokenKind.DOLLAR);\n return {\n kind: Kind.VARIABLE,\n name: this.parseName(),\n loc: this.loc(start)\n };\n }\n /**\n * SelectionSet : { Selection+ }\n */\n ;\n\n _proto.parseSelectionSet = function parseSelectionSet() {\n var start = this._lexer.token;\n return {\n kind: Kind.SELECTION_SET,\n selections: this.many(TokenKind.BRACE_L, this.parseSelection, TokenKind.BRACE_R),\n loc: this.loc(start)\n };\n }\n /**\n * Selection :\n * - Field\n * - FragmentSpread\n * - InlineFragment\n */\n ;\n\n _proto.parseSelection = function parseSelection() {\n return this.peek(TokenKind.SPREAD) ? this.parseFragment() : this.parseField();\n }\n /**\n * Field : Alias? Name Arguments? Directives? SelectionSet?\n *\n * Alias : Name :\n */\n ;\n\n _proto.parseField = function parseField() {\n var start = this._lexer.token;\n var nameOrAlias = this.parseName();\n var alias;\n var name;\n\n if (this.expectOptionalToken(TokenKind.COLON)) {\n alias = nameOrAlias;\n name = this.parseName();\n } else {\n name = nameOrAlias;\n }\n\n return {\n kind: Kind.FIELD,\n alias: alias,\n name: name,\n arguments: this.parseArguments(false),\n directives: this.parseDirectives(false),\n selectionSet: this.peek(TokenKind.BRACE_L) ? this.parseSelectionSet() : undefined,\n loc: this.loc(start)\n };\n }\n /**\n * Arguments[Const] : ( Argument[?Const]+ )\n */\n ;\n\n _proto.parseArguments = function parseArguments(isConst) {\n var item = isConst ? this.parseConstArgument : this.parseArgument;\n return this.optionalMany(TokenKind.PAREN_L, item, TokenKind.PAREN_R);\n }\n /**\n * Argument[Const] : Name : Value[?Const]\n */\n ;\n\n _proto.parseArgument = function parseArgument() {\n var start = this._lexer.token;\n var name = this.parseName();\n this.expectToken(TokenKind.COLON);\n return {\n kind: Kind.ARGUMENT,\n name: name,\n value: this.parseValueLiteral(false),\n loc: this.loc(start)\n };\n };\n\n _proto.parseConstArgument = function parseConstArgument() {\n var start = this._lexer.token;\n return {\n kind: Kind.ARGUMENT,\n name: this.parseName(),\n value: (this.expectToken(TokenKind.COLON), this.parseValueLiteral(true)),\n loc: this.loc(start)\n };\n } // Implements the parsing rules in the Fragments section.\n\n /**\n * Corresponds to both FragmentSpread and InlineFragment in the spec.\n *\n * FragmentSpread : ... FragmentName Directives?\n *\n * InlineFragment : ... TypeCondition? Directives? SelectionSet\n */\n ;\n\n _proto.parseFragment = function parseFragment() {\n var start = this._lexer.token;\n this.expectToken(TokenKind.SPREAD);\n var hasTypeCondition = this.expectOptionalKeyword('on');\n\n if (!hasTypeCondition && this.peek(TokenKind.NAME)) {\n return {\n kind: Kind.FRAGMENT_SPREAD,\n name: this.parseFragmentName(),\n directives: this.parseDirectives(false),\n loc: this.loc(start)\n };\n }\n\n return {\n kind: Kind.INLINE_FRAGMENT,\n typeCondition: hasTypeCondition ? this.parseNamedType() : undefined,\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n loc: this.loc(start)\n };\n }\n /**\n * FragmentDefinition :\n * - fragment FragmentName on TypeCondition Directives? SelectionSet\n *\n * TypeCondition : NamedType\n */\n ;\n\n _proto.parseFragmentDefinition = function parseFragmentDefinition() {\n var _this$_options;\n\n var start = this._lexer.token;\n this.expectKeyword('fragment'); // Experimental support for defining variables within fragments changes\n // the grammar of FragmentDefinition:\n // - fragment FragmentName VariableDefinitions? on TypeCondition Directives? SelectionSet\n\n if (((_this$_options = this._options) === null || _this$_options === void 0 ? void 0 : _this$_options.experimentalFragmentVariables) === true) {\n return {\n kind: Kind.FRAGMENT_DEFINITION,\n name: this.parseFragmentName(),\n variableDefinitions: this.parseVariableDefinitions(),\n typeCondition: (this.expectKeyword('on'), this.parseNamedType()),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n loc: this.loc(start)\n };\n }\n\n return {\n kind: Kind.FRAGMENT_DEFINITION,\n name: this.parseFragmentName(),\n typeCondition: (this.expectKeyword('on'), this.parseNamedType()),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n loc: this.loc(start)\n };\n }\n /**\n * FragmentName : Name but not `on`\n */\n ;\n\n _proto.parseFragmentName = function parseFragmentName() {\n if (this._lexer.token.value === 'on') {\n throw this.unexpected();\n }\n\n return this.parseName();\n } // Implements the parsing rules in the Values section.\n\n /**\n * Value[Const] :\n * - [~Const] Variable\n * - IntValue\n * - FloatValue\n * - StringValue\n * - BooleanValue\n * - NullValue\n * - EnumValue\n * - ListValue[?Const]\n * - ObjectValue[?Const]\n *\n * BooleanValue : one of `true` `false`\n *\n * NullValue : `null`\n *\n * EnumValue : Name but not `true`, `false` or `null`\n */\n ;\n\n _proto.parseValueLiteral = function parseValueLiteral(isConst) {\n var token = this._lexer.token;\n\n switch (token.kind) {\n case TokenKind.BRACKET_L:\n return this.parseList(isConst);\n\n case TokenKind.BRACE_L:\n return this.parseObject(isConst);\n\n case TokenKind.INT:\n this._lexer.advance();\n\n return {\n kind: Kind.INT,\n value: token.value,\n loc: this.loc(token)\n };\n\n case TokenKind.FLOAT:\n this._lexer.advance();\n\n return {\n kind: Kind.FLOAT,\n value: token.value,\n loc: this.loc(token)\n };\n\n case TokenKind.STRING:\n case TokenKind.BLOCK_STRING:\n return this.parseStringLiteral();\n\n case TokenKind.NAME:\n this._lexer.advance();\n\n switch (token.value) {\n case 'true':\n return {\n kind: Kind.BOOLEAN,\n value: true,\n loc: this.loc(token)\n };\n\n case 'false':\n return {\n kind: Kind.BOOLEAN,\n value: false,\n loc: this.loc(token)\n };\n\n case 'null':\n return {\n kind: Kind.NULL,\n loc: this.loc(token)\n };\n\n default:\n return {\n kind: Kind.ENUM,\n value: token.value,\n loc: this.loc(token)\n };\n }\n\n case TokenKind.DOLLAR:\n if (!isConst) {\n return this.parseVariable();\n }\n\n break;\n }\n\n throw this.unexpected();\n };\n\n _proto.parseStringLiteral = function parseStringLiteral() {\n var token = this._lexer.token;\n\n this._lexer.advance();\n\n return {\n kind: Kind.STRING,\n value: token.value,\n block: token.kind === TokenKind.BLOCK_STRING,\n loc: this.loc(token)\n };\n }\n /**\n * ListValue[Const] :\n * - [ ]\n * - [ Value[?Const]+ ]\n */\n ;\n\n _proto.parseList = function parseList(isConst) {\n var _this = this;\n\n var start = this._lexer.token;\n\n var item = function item() {\n return _this.parseValueLiteral(isConst);\n };\n\n return {\n kind: Kind.LIST,\n values: this.any(TokenKind.BRACKET_L, item, TokenKind.BRACKET_R),\n loc: this.loc(start)\n };\n }\n /**\n * ObjectValue[Const] :\n * - { }\n * - { ObjectField[?Const]+ }\n */\n ;\n\n _proto.parseObject = function parseObject(isConst) {\n var _this2 = this;\n\n var start = this._lexer.token;\n\n var item = function item() {\n return _this2.parseObjectField(isConst);\n };\n\n return {\n kind: Kind.OBJECT,\n fields: this.any(TokenKind.BRACE_L, item, TokenKind.BRACE_R),\n loc: this.loc(start)\n };\n }\n /**\n * ObjectField[Const] : Name : Value[?Const]\n */\n ;\n\n _proto.parseObjectField = function parseObjectField(isConst) {\n var start = this._lexer.token;\n var name = this.parseName();\n this.expectToken(TokenKind.COLON);\n return {\n kind: Kind.OBJECT_FIELD,\n name: name,\n value: this.parseValueLiteral(isConst),\n loc: this.loc(start)\n };\n } // Implements the parsing rules in the Directives section.\n\n /**\n * Directives[Const] : Directive[?Const]+\n */\n ;\n\n _proto.parseDirectives = function parseDirectives(isConst) {\n var directives = [];\n\n while (this.peek(TokenKind.AT)) {\n directives.push(this.parseDirective(isConst));\n }\n\n return directives;\n }\n /**\n * Directive[Const] : @ Name Arguments[?Const]?\n */\n ;\n\n _proto.parseDirective = function parseDirective(isConst) {\n var start = this._lexer.token;\n this.expectToken(TokenKind.AT);\n return {\n kind: Kind.DIRECTIVE,\n name: this.parseName(),\n arguments: this.parseArguments(isConst),\n loc: this.loc(start)\n };\n } // Implements the parsing rules in the Types section.\n\n /**\n * Type :\n * - NamedType\n * - ListType\n * - NonNullType\n */\n ;\n\n _proto.parseTypeReference = function parseTypeReference() {\n var start = this._lexer.token;\n var type;\n\n if (this.expectOptionalToken(TokenKind.BRACKET_L)) {\n type = this.parseTypeReference();\n this.expectToken(TokenKind.BRACKET_R);\n type = {\n kind: Kind.LIST_TYPE,\n type: type,\n loc: this.loc(start)\n };\n } else {\n type = this.parseNamedType();\n }\n\n if (this.expectOptionalToken(TokenKind.BANG)) {\n return {\n kind: Kind.NON_NULL_TYPE,\n type: type,\n loc: this.loc(start)\n };\n }\n\n return type;\n }\n /**\n * NamedType : Name\n */\n ;\n\n _proto.parseNamedType = function parseNamedType() {\n var start = this._lexer.token;\n return {\n kind: Kind.NAMED_TYPE,\n name: this.parseName(),\n loc: this.loc(start)\n };\n } // Implements the parsing rules in the Type Definition section.\n\n /**\n * TypeSystemDefinition :\n * - SchemaDefinition\n * - TypeDefinition\n * - DirectiveDefinition\n *\n * TypeDefinition :\n * - ScalarTypeDefinition\n * - ObjectTypeDefinition\n * - InterfaceTypeDefinition\n * - UnionTypeDefinition\n * - EnumTypeDefinition\n * - InputObjectTypeDefinition\n */\n ;\n\n _proto.parseTypeSystemDefinition = function parseTypeSystemDefinition() {\n // Many definitions begin with a description and require a lookahead.\n var keywordToken = this.peekDescription() ? this._lexer.lookahead() : this._lexer.token;\n\n if (keywordToken.kind === TokenKind.NAME) {\n switch (keywordToken.value) {\n case 'schema':\n return this.parseSchemaDefinition();\n\n case 'scalar':\n return this.parseScalarTypeDefinition();\n\n case 'type':\n return this.parseObjectTypeDefinition();\n\n case 'interface':\n return this.parseInterfaceTypeDefinition();\n\n case 'union':\n return this.parseUnionTypeDefinition();\n\n case 'enum':\n return this.parseEnumTypeDefinition();\n\n case 'input':\n return this.parseInputObjectTypeDefinition();\n\n case 'directive':\n return this.parseDirectiveDefinition();\n }\n }\n\n throw this.unexpected(keywordToken);\n };\n\n _proto.peekDescription = function peekDescription() {\n return this.peek(TokenKind.STRING) || this.peek(TokenKind.BLOCK_STRING);\n }\n /**\n * Description : StringValue\n */\n ;\n\n _proto.parseDescription = function parseDescription() {\n if (this.peekDescription()) {\n return this.parseStringLiteral();\n }\n }\n /**\n * SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ }\n */\n ;\n\n _proto.parseSchemaDefinition = function parseSchemaDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n this.expectKeyword('schema');\n var directives = this.parseDirectives(true);\n var operationTypes = this.many(TokenKind.BRACE_L, this.parseOperationTypeDefinition, TokenKind.BRACE_R);\n return {\n kind: Kind.SCHEMA_DEFINITION,\n description: description,\n directives: directives,\n operationTypes: operationTypes,\n loc: this.loc(start)\n };\n }\n /**\n * OperationTypeDefinition : OperationType : NamedType\n */\n ;\n\n _proto.parseOperationTypeDefinition = function parseOperationTypeDefinition() {\n var start = this._lexer.token;\n var operation = this.parseOperationType();\n this.expectToken(TokenKind.COLON);\n var type = this.parseNamedType();\n return {\n kind: Kind.OPERATION_TYPE_DEFINITION,\n operation: operation,\n type: type,\n loc: this.loc(start)\n };\n }\n /**\n * ScalarTypeDefinition : Description? scalar Name Directives[Const]?\n */\n ;\n\n _proto.parseScalarTypeDefinition = function parseScalarTypeDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n this.expectKeyword('scalar');\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n return {\n kind: Kind.SCALAR_TYPE_DEFINITION,\n description: description,\n name: name,\n directives: directives,\n loc: this.loc(start)\n };\n }\n /**\n * ObjectTypeDefinition :\n * Description?\n * type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition?\n */\n ;\n\n _proto.parseObjectTypeDefinition = function parseObjectTypeDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n this.expectKeyword('type');\n var name = this.parseName();\n var interfaces = this.parseImplementsInterfaces();\n var directives = this.parseDirectives(true);\n var fields = this.parseFieldsDefinition();\n return {\n kind: Kind.OBJECT_TYPE_DEFINITION,\n description: description,\n name: name,\n interfaces: interfaces,\n directives: directives,\n fields: fields,\n loc: this.loc(start)\n };\n }\n /**\n * ImplementsInterfaces :\n * - implements `&`? NamedType\n * - ImplementsInterfaces & NamedType\n */\n ;\n\n _proto.parseImplementsInterfaces = function parseImplementsInterfaces() {\n var _this$_options2;\n\n if (!this.expectOptionalKeyword('implements')) {\n return [];\n }\n\n if (((_this$_options2 = this._options) === null || _this$_options2 === void 0 ? void 0 : _this$_options2.allowLegacySDLImplementsInterfaces) === true) {\n var types = []; // Optional leading ampersand\n\n this.expectOptionalToken(TokenKind.AMP);\n\n do {\n types.push(this.parseNamedType());\n } while (this.expectOptionalToken(TokenKind.AMP) || this.peek(TokenKind.NAME));\n\n return types;\n }\n\n return this.delimitedMany(TokenKind.AMP, this.parseNamedType);\n }\n /**\n * FieldsDefinition : { FieldDefinition+ }\n */\n ;\n\n _proto.parseFieldsDefinition = function parseFieldsDefinition() {\n var _this$_options3;\n\n // Legacy support for the SDL?\n if (((_this$_options3 = this._options) === null || _this$_options3 === void 0 ? void 0 : _this$_options3.allowLegacySDLEmptyFields) === true && this.peek(TokenKind.BRACE_L) && this._lexer.lookahead().kind === TokenKind.BRACE_R) {\n this._lexer.advance();\n\n this._lexer.advance();\n\n return [];\n }\n\n return this.optionalMany(TokenKind.BRACE_L, this.parseFieldDefinition, TokenKind.BRACE_R);\n }\n /**\n * FieldDefinition :\n * - Description? Name ArgumentsDefinition? : Type Directives[Const]?\n */\n ;\n\n _proto.parseFieldDefinition = function parseFieldDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n var name = this.parseName();\n var args = this.parseArgumentDefs();\n this.expectToken(TokenKind.COLON);\n var type = this.parseTypeReference();\n var directives = this.parseDirectives(true);\n return {\n kind: Kind.FIELD_DEFINITION,\n description: description,\n name: name,\n arguments: args,\n type: type,\n directives: directives,\n loc: this.loc(start)\n };\n }\n /**\n * ArgumentsDefinition : ( InputValueDefinition+ )\n */\n ;\n\n _proto.parseArgumentDefs = function parseArgumentDefs() {\n return this.optionalMany(TokenKind.PAREN_L, this.parseInputValueDef, TokenKind.PAREN_R);\n }\n /**\n * InputValueDefinition :\n * - Description? Name : Type DefaultValue? Directives[Const]?\n */\n ;\n\n _proto.parseInputValueDef = function parseInputValueDef() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n var name = this.parseName();\n this.expectToken(TokenKind.COLON);\n var type = this.parseTypeReference();\n var defaultValue;\n\n if (this.expectOptionalToken(TokenKind.EQUALS)) {\n defaultValue = this.parseValueLiteral(true);\n }\n\n var directives = this.parseDirectives(true);\n return {\n kind: Kind.INPUT_VALUE_DEFINITION,\n description: description,\n name: name,\n type: type,\n defaultValue: defaultValue,\n directives: directives,\n loc: this.loc(start)\n };\n }\n /**\n * InterfaceTypeDefinition :\n * - Description? interface Name Directives[Const]? FieldsDefinition?\n */\n ;\n\n _proto.parseInterfaceTypeDefinition = function parseInterfaceTypeDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n this.expectKeyword('interface');\n var name = this.parseName();\n var interfaces = this.parseImplementsInterfaces();\n var directives = this.parseDirectives(true);\n var fields = this.parseFieldsDefinition();\n return {\n kind: Kind.INTERFACE_TYPE_DEFINITION,\n description: description,\n name: name,\n interfaces: interfaces,\n directives: directives,\n fields: fields,\n loc: this.loc(start)\n };\n }\n /**\n * UnionTypeDefinition :\n * - Description? union Name Directives[Const]? UnionMemberTypes?\n */\n ;\n\n _proto.parseUnionTypeDefinition = function parseUnionTypeDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n this.expectKeyword('union');\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n var types = this.parseUnionMemberTypes();\n return {\n kind: Kind.UNION_TYPE_DEFINITION,\n description: description,\n name: name,\n directives: directives,\n types: types,\n loc: this.loc(start)\n };\n }\n /**\n * UnionMemberTypes :\n * - = `|`? NamedType\n * - UnionMemberTypes | NamedType\n */\n ;\n\n _proto.parseUnionMemberTypes = function parseUnionMemberTypes() {\n return this.expectOptionalToken(TokenKind.EQUALS) ? this.delimitedMany(TokenKind.PIPE, this.parseNamedType) : [];\n }\n /**\n * EnumTypeDefinition :\n * - Description? enum Name Directives[Const]? EnumValuesDefinition?\n */\n ;\n\n _proto.parseEnumTypeDefinition = function parseEnumTypeDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n this.expectKeyword('enum');\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n var values = this.parseEnumValuesDefinition();\n return {\n kind: Kind.ENUM_TYPE_DEFINITION,\n description: description,\n name: name,\n directives: directives,\n values: values,\n loc: this.loc(start)\n };\n }\n /**\n * EnumValuesDefinition : { EnumValueDefinition+ }\n */\n ;\n\n _proto.parseEnumValuesDefinition = function parseEnumValuesDefinition() {\n return this.optionalMany(TokenKind.BRACE_L, this.parseEnumValueDefinition, TokenKind.BRACE_R);\n }\n /**\n * EnumValueDefinition : Description? EnumValue Directives[Const]?\n *\n * EnumValue : Name\n */\n ;\n\n _proto.parseEnumValueDefinition = function parseEnumValueDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n return {\n kind: Kind.ENUM_VALUE_DEFINITION,\n description: description,\n name: name,\n directives: directives,\n loc: this.loc(start)\n };\n }\n /**\n * InputObjectTypeDefinition :\n * - Description? input Name Directives[Const]? InputFieldsDefinition?\n */\n ;\n\n _proto.parseInputObjectTypeDefinition = function parseInputObjectTypeDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n this.expectKeyword('input');\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n var fields = this.parseInputFieldsDefinition();\n return {\n kind: Kind.INPUT_OBJECT_TYPE_DEFINITION,\n description: description,\n name: name,\n directives: directives,\n fields: fields,\n loc: this.loc(start)\n };\n }\n /**\n * InputFieldsDefinition : { InputValueDefinition+ }\n */\n ;\n\n _proto.parseInputFieldsDefinition = function parseInputFieldsDefinition() {\n return this.optionalMany(TokenKind.BRACE_L, this.parseInputValueDef, TokenKind.BRACE_R);\n }\n /**\n * TypeSystemExtension :\n * - SchemaExtension\n * - TypeExtension\n *\n * TypeExtension :\n * - ScalarTypeExtension\n * - ObjectTypeExtension\n * - InterfaceTypeExtension\n * - UnionTypeExtension\n * - EnumTypeExtension\n * - InputObjectTypeDefinition\n */\n ;\n\n _proto.parseTypeSystemExtension = function parseTypeSystemExtension() {\n var keywordToken = this._lexer.lookahead();\n\n if (keywordToken.kind === TokenKind.NAME) {\n switch (keywordToken.value) {\n case 'schema':\n return this.parseSchemaExtension();\n\n case 'scalar':\n return this.parseScalarTypeExtension();\n\n case 'type':\n return this.parseObjectTypeExtension();\n\n case 'interface':\n return this.parseInterfaceTypeExtension();\n\n case 'union':\n return this.parseUnionTypeExtension();\n\n case 'enum':\n return this.parseEnumTypeExtension();\n\n case 'input':\n return this.parseInputObjectTypeExtension();\n }\n }\n\n throw this.unexpected(keywordToken);\n }\n /**\n * SchemaExtension :\n * - extend schema Directives[Const]? { OperationTypeDefinition+ }\n * - extend schema Directives[Const]\n */\n ;\n\n _proto.parseSchemaExtension = function parseSchemaExtension() {\n var start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('schema');\n var directives = this.parseDirectives(true);\n var operationTypes = this.optionalMany(TokenKind.BRACE_L, this.parseOperationTypeDefinition, TokenKind.BRACE_R);\n\n if (directives.length === 0 && operationTypes.length === 0) {\n throw this.unexpected();\n }\n\n return {\n kind: Kind.SCHEMA_EXTENSION,\n directives: directives,\n operationTypes: operationTypes,\n loc: this.loc(start)\n };\n }\n /**\n * ScalarTypeExtension :\n * - extend scalar Name Directives[Const]\n */\n ;\n\n _proto.parseScalarTypeExtension = function parseScalarTypeExtension() {\n var start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('scalar');\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n\n if (directives.length === 0) {\n throw this.unexpected();\n }\n\n return {\n kind: Kind.SCALAR_TYPE_EXTENSION,\n name: name,\n directives: directives,\n loc: this.loc(start)\n };\n }\n /**\n * ObjectTypeExtension :\n * - extend type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition\n * - extend type Name ImplementsInterfaces? Directives[Const]\n * - extend type Name ImplementsInterfaces\n */\n ;\n\n _proto.parseObjectTypeExtension = function parseObjectTypeExtension() {\n var start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('type');\n var name = this.parseName();\n var interfaces = this.parseImplementsInterfaces();\n var directives = this.parseDirectives(true);\n var fields = this.parseFieldsDefinition();\n\n if (interfaces.length === 0 && directives.length === 0 && fields.length === 0) {\n throw this.unexpected();\n }\n\n return {\n kind: Kind.OBJECT_TYPE_EXTENSION,\n name: name,\n interfaces: interfaces,\n directives: directives,\n fields: fields,\n loc: this.loc(start)\n };\n }\n /**\n * InterfaceTypeExtension :\n * - extend interface Name ImplementsInterfaces? Directives[Const]? FieldsDefinition\n * - extend interface Name ImplementsInterfaces? Directives[Const]\n * - extend interface Name ImplementsInterfaces\n */\n ;\n\n _proto.parseInterfaceTypeExtension = function parseInterfaceTypeExtension() {\n var start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('interface');\n var name = this.parseName();\n var interfaces = this.parseImplementsInterfaces();\n var directives = this.parseDirectives(true);\n var fields = this.parseFieldsDefinition();\n\n if (interfaces.length === 0 && directives.length === 0 && fields.length === 0) {\n throw this.unexpected();\n }\n\n return {\n kind: Kind.INTERFACE_TYPE_EXTENSION,\n name: name,\n interfaces: interfaces,\n directives: directives,\n fields: fields,\n loc: this.loc(start)\n };\n }\n /**\n * UnionTypeExtension :\n * - extend union Name Directives[Const]? UnionMemberTypes\n * - extend union Name Directives[Const]\n */\n ;\n\n _proto.parseUnionTypeExtension = function parseUnionTypeExtension() {\n var start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('union');\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n var types = this.parseUnionMemberTypes();\n\n if (directives.length === 0 && types.length === 0) {\n throw this.unexpected();\n }\n\n return {\n kind: Kind.UNION_TYPE_EXTENSION,\n name: name,\n directives: directives,\n types: types,\n loc: this.loc(start)\n };\n }\n /**\n * EnumTypeExtension :\n * - extend enum Name Directives[Const]? EnumValuesDefinition\n * - extend enum Name Directives[Const]\n */\n ;\n\n _proto.parseEnumTypeExtension = function parseEnumTypeExtension() {\n var start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('enum');\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n var values = this.parseEnumValuesDefinition();\n\n if (directives.length === 0 && values.length === 0) {\n throw this.unexpected();\n }\n\n return {\n kind: Kind.ENUM_TYPE_EXTENSION,\n name: name,\n directives: directives,\n values: values,\n loc: this.loc(start)\n };\n }\n /**\n * InputObjectTypeExtension :\n * - extend input Name Directives[Const]? InputFieldsDefinition\n * - extend input Name Directives[Const]\n */\n ;\n\n _proto.parseInputObjectTypeExtension = function parseInputObjectTypeExtension() {\n var start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('input');\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n var fields = this.parseInputFieldsDefinition();\n\n if (directives.length === 0 && fields.length === 0) {\n throw this.unexpected();\n }\n\n return {\n kind: Kind.INPUT_OBJECT_TYPE_EXTENSION,\n name: name,\n directives: directives,\n fields: fields,\n loc: this.loc(start)\n };\n }\n /**\n * DirectiveDefinition :\n * - Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations\n */\n ;\n\n _proto.parseDirectiveDefinition = function parseDirectiveDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n this.expectKeyword('directive');\n this.expectToken(TokenKind.AT);\n var name = this.parseName();\n var args = this.parseArgumentDefs();\n var repeatable = this.expectOptionalKeyword('repeatable');\n this.expectKeyword('on');\n var locations = this.parseDirectiveLocations();\n return {\n kind: Kind.DIRECTIVE_DEFINITION,\n description: description,\n name: name,\n arguments: args,\n repeatable: repeatable,\n locations: locations,\n loc: this.loc(start)\n };\n }\n /**\n * DirectiveLocations :\n * - `|`? DirectiveLocation\n * - DirectiveLocations | DirectiveLocation\n */\n ;\n\n _proto.parseDirectiveLocations = function parseDirectiveLocations() {\n return this.delimitedMany(TokenKind.PIPE, this.parseDirectiveLocation);\n }\n /*\n * DirectiveLocation :\n * - ExecutableDirectiveLocation\n * - TypeSystemDirectiveLocation\n *\n * ExecutableDirectiveLocation : one of\n * `QUERY`\n * `MUTATION`\n * `SUBSCRIPTION`\n * `FIELD`\n * `FRAGMENT_DEFINITION`\n * `FRAGMENT_SPREAD`\n * `INLINE_FRAGMENT`\n *\n * TypeSystemDirectiveLocation : one of\n * `SCHEMA`\n * `SCALAR`\n * `OBJECT`\n * `FIELD_DEFINITION`\n * `ARGUMENT_DEFINITION`\n * `INTERFACE`\n * `UNION`\n * `ENUM`\n * `ENUM_VALUE`\n * `INPUT_OBJECT`\n * `INPUT_FIELD_DEFINITION`\n */\n ;\n\n _proto.parseDirectiveLocation = function parseDirectiveLocation() {\n var start = this._lexer.token;\n var name = this.parseName();\n\n if (DirectiveLocation[name.value] !== undefined) {\n return name;\n }\n\n throw this.unexpected(start);\n } // Core parsing utility functions\n\n /**\n * Returns a location object, used to identify the place in the source that created a given parsed object.\n */\n ;\n\n _proto.loc = function loc(startToken) {\n var _this$_options4;\n\n if (((_this$_options4 = this._options) === null || _this$_options4 === void 0 ? void 0 : _this$_options4.noLocation) !== true) {\n return new Location(startToken, this._lexer.lastToken, this._lexer.source);\n }\n }\n /**\n * Determines if the next token is of a given kind\n */\n ;\n\n _proto.peek = function peek(kind) {\n return this._lexer.token.kind === kind;\n }\n /**\n * If the next token is of the given kind, return that token after advancing the lexer.\n * Otherwise, do not change the parser state and throw an error.\n */\n ;\n\n _proto.expectToken = function expectToken(kind) {\n var token = this._lexer.token;\n\n if (token.kind === kind) {\n this._lexer.advance();\n\n return token;\n }\n\n throw syntaxError(this._lexer.source, token.start, \"Expected \".concat(getTokenKindDesc(kind), \", found \").concat(getTokenDesc(token), \".\"));\n }\n /**\n * If the next token is of the given kind, return that token after advancing the lexer.\n * Otherwise, do not change the parser state and return undefined.\n */\n ;\n\n _proto.expectOptionalToken = function expectOptionalToken(kind) {\n var token = this._lexer.token;\n\n if (token.kind === kind) {\n this._lexer.advance();\n\n return token;\n }\n\n return undefined;\n }\n /**\n * If the next token is a given keyword, advance the lexer.\n * Otherwise, do not change the parser state and throw an error.\n */\n ;\n\n _proto.expectKeyword = function expectKeyword(value) {\n var token = this._lexer.token;\n\n if (token.kind === TokenKind.NAME && token.value === value) {\n this._lexer.advance();\n } else {\n throw syntaxError(this._lexer.source, token.start, \"Expected \\\"\".concat(value, \"\\\", found \").concat(getTokenDesc(token), \".\"));\n }\n }\n /**\n * If the next token is a given keyword, return \"true\" after advancing the lexer.\n * Otherwise, do not change the parser state and return \"false\".\n */\n ;\n\n _proto.expectOptionalKeyword = function expectOptionalKeyword(value) {\n var token = this._lexer.token;\n\n if (token.kind === TokenKind.NAME && token.value === value) {\n this._lexer.advance();\n\n return true;\n }\n\n return false;\n }\n /**\n * Helper function for creating an error when an unexpected lexed token is encountered.\n */\n ;\n\n _proto.unexpected = function unexpected(atToken) {\n var token = atToken !== null && atToken !== void 0 ? atToken : this._lexer.token;\n return syntaxError(this._lexer.source, token.start, \"Unexpected \".concat(getTokenDesc(token), \".\"));\n }\n /**\n * Returns a possibly empty list of parse nodes, determined by the parseFn.\n * This list begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n */\n ;\n\n _proto.any = function any(openKind, parseFn, closeKind) {\n this.expectToken(openKind);\n var nodes = [];\n\n while (!this.expectOptionalToken(closeKind)) {\n nodes.push(parseFn.call(this));\n }\n\n return nodes;\n }\n /**\n * Returns a list of parse nodes, determined by the parseFn.\n * It can be empty only if open token is missing otherwise it will always return non-empty list\n * that begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n */\n ;\n\n _proto.optionalMany = function optionalMany(openKind, parseFn, closeKind) {\n if (this.expectOptionalToken(openKind)) {\n var nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (!this.expectOptionalToken(closeKind));\n\n return nodes;\n }\n\n return [];\n }\n /**\n * Returns a non-empty list of parse nodes, determined by the parseFn.\n * This list begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n */\n ;\n\n _proto.many = function many(openKind, parseFn, closeKind) {\n this.expectToken(openKind);\n var nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (!this.expectOptionalToken(closeKind));\n\n return nodes;\n }\n /**\n * Returns a non-empty list of parse nodes, determined by the parseFn.\n * This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind.\n * Advances the parser to the next lex token after last item in the list.\n */\n ;\n\n _proto.delimitedMany = function delimitedMany(delimiterKind, parseFn) {\n this.expectOptionalToken(delimiterKind);\n var nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (this.expectOptionalToken(delimiterKind));\n\n return nodes;\n };\n\n return Parser;\n}();\n/**\n * A helper function to describe a token as a string for debugging.\n */\n\nfunction getTokenDesc(token) {\n var value = token.value;\n return getTokenKindDesc(token.kind) + (value != null ? \" \\\"\".concat(value, \"\\\"\") : '');\n}\n/**\n * A helper function to describe a token kind as a string for debugging.\n */\n\n\nfunction getTokenKindDesc(kind) {\n return isPunctuatorTokenKind(kind) ? \"\\\"\".concat(kind, \"\\\"\") : kind;\n}\n","import { GraphQLError } from \"./GraphQLError.mjs\";\n/**\n * Produces a GraphQLError representing a syntax error, containing useful\n * descriptive information about the syntax error's position in the source.\n */\n\nexport function syntaxError(source, position, description) {\n return new GraphQLError(\"Syntax Error: \".concat(description), undefined, source, [position]);\n}\n","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _wrapNativeSuper(Class) { var _cache = typeof Map === \"function\" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== \"function\") { throw new TypeError(\"Super expression must either be null or a function\"); } if (typeof _cache !== \"undefined\") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }\n\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _isNativeFunction(fn) { return Function.toString.call(fn).indexOf(\"[native code]\") !== -1; }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nimport isObjectLike from \"../jsutils/isObjectLike.mjs\";\nimport { SYMBOL_TO_STRING_TAG } from \"../polyfills/symbols.mjs\";\nimport { getLocation } from \"../language/location.mjs\";\nimport { printLocation, printSourceLocation } from \"../language/printLocation.mjs\";\n/**\n * A GraphQLError describes an Error found during the parse, validate, or\n * execute phases of performing a GraphQL operation. In addition to a message\n * and stack trace, it also includes information about the locations in a\n * GraphQL document and/or execution result that correspond to the Error.\n */\n\nexport var GraphQLError = /*#__PURE__*/function (_Error) {\n _inherits(GraphQLError, _Error);\n\n var _super = _createSuper(GraphQLError);\n\n /**\n * An array of { line, column } locations within the source GraphQL document\n * which correspond to this error.\n *\n * Errors during validation often contain multiple locations, for example to\n * point out two things with the same name. Errors during execution include a\n * single location, the field which produced the error.\n *\n * Enumerable, and appears in the result of JSON.stringify().\n */\n\n /**\n * An array describing the JSON-path into the execution response which\n * corresponds to this error. Only included for errors during execution.\n *\n * Enumerable, and appears in the result of JSON.stringify().\n */\n\n /**\n * An array of GraphQL AST Nodes corresponding to this error.\n */\n\n /**\n * The source GraphQL document for the first location of this error.\n *\n * Note that if this Error represents more than one node, the source may not\n * represent nodes after the first node.\n */\n\n /**\n * An array of character offsets within the source GraphQL document\n * which correspond to this error.\n */\n\n /**\n * The original error thrown from a field resolver during execution.\n */\n\n /**\n * Extension fields to add to the formatted error.\n */\n function GraphQLError(message, nodes, source, positions, path, originalError, extensions) {\n var _nodeLocations, _nodeLocations2, _nodeLocations3;\n\n var _this;\n\n _classCallCheck(this, GraphQLError);\n\n _this = _super.call(this, message);\n _this.name = 'GraphQLError';\n _this.originalError = originalError !== null && originalError !== void 0 ? originalError : undefined; // Compute list of blame nodes.\n\n _this.nodes = undefinedIfEmpty(Array.isArray(nodes) ? nodes : nodes ? [nodes] : undefined);\n var nodeLocations = [];\n\n for (var _i2 = 0, _ref3 = (_this$nodes = _this.nodes) !== null && _this$nodes !== void 0 ? _this$nodes : []; _i2 < _ref3.length; _i2++) {\n var _this$nodes;\n\n var _ref4 = _ref3[_i2];\n var loc = _ref4.loc;\n\n if (loc != null) {\n nodeLocations.push(loc);\n }\n }\n\n nodeLocations = undefinedIfEmpty(nodeLocations); // Compute locations in the source for the given nodes/positions.\n\n _this.source = source !== null && source !== void 0 ? source : (_nodeLocations = nodeLocations) === null || _nodeLocations === void 0 ? void 0 : _nodeLocations[0].source;\n _this.positions = positions !== null && positions !== void 0 ? positions : (_nodeLocations2 = nodeLocations) === null || _nodeLocations2 === void 0 ? void 0 : _nodeLocations2.map(function (loc) {\n return loc.start;\n });\n _this.locations = positions && source ? positions.map(function (pos) {\n return getLocation(source, pos);\n }) : (_nodeLocations3 = nodeLocations) === null || _nodeLocations3 === void 0 ? void 0 : _nodeLocations3.map(function (loc) {\n return getLocation(loc.source, loc.start);\n });\n _this.path = path !== null && path !== void 0 ? path : undefined;\n var originalExtensions = originalError === null || originalError === void 0 ? void 0 : originalError.extensions;\n\n if (extensions == null && isObjectLike(originalExtensions)) {\n _this.extensions = _objectSpread({}, originalExtensions);\n } else {\n _this.extensions = extensions !== null && extensions !== void 0 ? extensions : {};\n } // By being enumerable, JSON.stringify will include bellow properties in the resulting output.\n // This ensures that the simplest possible GraphQL service adheres to the spec.\n\n\n Object.defineProperties(_assertThisInitialized(_this), {\n message: {\n enumerable: true\n },\n locations: {\n enumerable: _this.locations != null\n },\n path: {\n enumerable: _this.path != null\n },\n extensions: {\n enumerable: _this.extensions != null && Object.keys(_this.extensions).length > 0\n },\n name: {\n enumerable: false\n },\n nodes: {\n enumerable: false\n },\n source: {\n enumerable: false\n },\n positions: {\n enumerable: false\n },\n originalError: {\n enumerable: false\n }\n }); // Include (non-enumerable) stack trace.\n\n if (originalError !== null && originalError !== void 0 && originalError.stack) {\n Object.defineProperty(_assertThisInitialized(_this), 'stack', {\n value: originalError.stack,\n writable: true,\n configurable: true\n });\n return _possibleConstructorReturn(_this);\n } // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')\n\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(_assertThisInitialized(_this), GraphQLError);\n } else {\n Object.defineProperty(_assertThisInitialized(_this), 'stack', {\n value: Error().stack,\n writable: true,\n configurable: true\n });\n }\n\n return _this;\n }\n\n _createClass(GraphQLError, [{\n key: \"toString\",\n value: function toString() {\n return printError(this);\n } // FIXME: workaround to not break chai comparisons, should be remove in v16\n // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet\n\n }, {\n key: SYMBOL_TO_STRING_TAG,\n get: function get() {\n return 'Object';\n }\n }]);\n\n return GraphQLError;\n}( /*#__PURE__*/_wrapNativeSuper(Error));\n\nfunction undefinedIfEmpty(array) {\n return array === undefined || array.length === 0 ? undefined : array;\n}\n/**\n * Prints a GraphQLError to a string, representing useful location information\n * about the error's position in the source.\n */\n\n\nexport function printError(error) {\n var output = error.message;\n\n if (error.nodes) {\n for (var _i4 = 0, _error$nodes2 = error.nodes; _i4 < _error$nodes2.length; _i4++) {\n var node = _error$nodes2[_i4];\n\n if (node.loc) {\n output += '\\n\\n' + printLocation(node.loc);\n }\n }\n } else if (error.source && error.locations) {\n for (var _i6 = 0, _error$locations2 = error.locations; _i6 < _error$locations2.length; _i6++) {\n var location = _error$locations2[_i6];\n output += '\\n\\n' + printSourceLocation(error.source, location);\n }\n }\n\n return output;\n}\n","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/**\n * Return true if `value` is object-like. A value is object-like if it's not\n * `null` and has a `typeof` result of \"object\".\n */\nexport default function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}\n","// In ES2015 (or a polyfilled) environment, this will be Symbol.iterator\n// istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')\nexport var SYMBOL_ITERATOR = typeof Symbol === 'function' && Symbol.iterator != null ? Symbol.iterator : '@@iterator'; // In ES2017 (or a polyfilled) environment, this will be Symbol.asyncIterator\n// istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')\n\nexport var SYMBOL_ASYNC_ITERATOR = typeof Symbol === 'function' && Symbol.asyncIterator != null ? Symbol.asyncIterator : '@@asyncIterator'; // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')\n\nexport var SYMBOL_TO_STRING_TAG = typeof Symbol === 'function' && Symbol.toStringTag != null ? Symbol.toStringTag : '@@toStringTag';\n","/**\n * Represents a location in a Source.\n */\n\n/**\n * Takes a Source and a UTF-8 character offset, and returns the corresponding\n * line and column as a SourceLocation.\n */\nexport function getLocation(source, position) {\n var lineRegexp = /\\r\\n|[\\n\\r]/g;\n var line = 1;\n var column = position + 1;\n var match;\n\n while ((match = lineRegexp.exec(source.body)) && match.index < position) {\n line += 1;\n column = position + 1 - (match.index + match[0].length);\n }\n\n return {\n line: line,\n column: column\n };\n}\n","import { getLocation } from \"./location.mjs\";\n/**\n * Render a helpful description of the location in the GraphQL Source document.\n */\n\nexport function printLocation(location) {\n return printSourceLocation(location.source, getLocation(location.source, location.start));\n}\n/**\n * Render a helpful description of the location in the GraphQL Source document.\n */\n\nexport function printSourceLocation(source, sourceLocation) {\n var firstLineColumnOffset = source.locationOffset.column - 1;\n var body = whitespace(firstLineColumnOffset) + source.body;\n var lineIndex = sourceLocation.line - 1;\n var lineOffset = source.locationOffset.line - 1;\n var lineNum = sourceLocation.line + lineOffset;\n var columnOffset = sourceLocation.line === 1 ? firstLineColumnOffset : 0;\n var columnNum = sourceLocation.column + columnOffset;\n var locationStr = \"\".concat(source.name, \":\").concat(lineNum, \":\").concat(columnNum, \"\\n\");\n var lines = body.split(/\\r\\n|[\\n\\r]/g);\n var locationLine = lines[lineIndex]; // Special case for minified documents\n\n if (locationLine.length > 120) {\n var subLineIndex = Math.floor(columnNum / 80);\n var subLineColumnNum = columnNum % 80;\n var subLines = [];\n\n for (var i = 0; i < locationLine.length; i += 80) {\n subLines.push(locationLine.slice(i, i + 80));\n }\n\n return locationStr + printPrefixedLines([[\"\".concat(lineNum), subLines[0]]].concat(subLines.slice(1, subLineIndex + 1).map(function (subLine) {\n return ['', subLine];\n }), [[' ', whitespace(subLineColumnNum - 1) + '^'], ['', subLines[subLineIndex + 1]]]));\n }\n\n return locationStr + printPrefixedLines([// Lines specified like this: [\"prefix\", \"string\"],\n [\"\".concat(lineNum - 1), lines[lineIndex - 1]], [\"\".concat(lineNum), locationLine], ['', whitespace(columnNum - 1) + '^'], [\"\".concat(lineNum + 1), lines[lineIndex + 1]]]);\n}\n\nfunction printPrefixedLines(lines) {\n var existingLines = lines.filter(function (_ref) {\n var _ = _ref[0],\n line = _ref[1];\n return line !== undefined;\n });\n var padLen = Math.max.apply(Math, existingLines.map(function (_ref2) {\n var prefix = _ref2[0];\n return prefix.length;\n }));\n return existingLines.map(function (_ref3) {\n var prefix = _ref3[0],\n line = _ref3[1];\n return leftPad(padLen, prefix) + (line ? ' | ' + line : ' |');\n }).join('\\n');\n}\n\nfunction whitespace(len) {\n return Array(len + 1).join(' ');\n}\n\nfunction leftPad(len, str) {\n return whitespace(len - str.length) + str;\n}\n","/**\n * The set of allowed kind values for AST nodes.\n */\nexport var Kind = Object.freeze({\n // Name\n NAME: 'Name',\n // Document\n DOCUMENT: 'Document',\n OPERATION_DEFINITION: 'OperationDefinition',\n VARIABLE_DEFINITION: 'VariableDefinition',\n SELECTION_SET: 'SelectionSet',\n FIELD: 'Field',\n ARGUMENT: 'Argument',\n // Fragments\n FRAGMENT_SPREAD: 'FragmentSpread',\n INLINE_FRAGMENT: 'InlineFragment',\n FRAGMENT_DEFINITION: 'FragmentDefinition',\n // Values\n VARIABLE: 'Variable',\n INT: 'IntValue',\n FLOAT: 'FloatValue',\n STRING: 'StringValue',\n BOOLEAN: 'BooleanValue',\n NULL: 'NullValue',\n ENUM: 'EnumValue',\n LIST: 'ListValue',\n OBJECT: 'ObjectValue',\n OBJECT_FIELD: 'ObjectField',\n // Directives\n DIRECTIVE: 'Directive',\n // Types\n NAMED_TYPE: 'NamedType',\n LIST_TYPE: 'ListType',\n NON_NULL_TYPE: 'NonNullType',\n // Type System Definitions\n SCHEMA_DEFINITION: 'SchemaDefinition',\n OPERATION_TYPE_DEFINITION: 'OperationTypeDefinition',\n // Type Definitions\n SCALAR_TYPE_DEFINITION: 'ScalarTypeDefinition',\n OBJECT_TYPE_DEFINITION: 'ObjectTypeDefinition',\n FIELD_DEFINITION: 'FieldDefinition',\n INPUT_VALUE_DEFINITION: 'InputValueDefinition',\n INTERFACE_TYPE_DEFINITION: 'InterfaceTypeDefinition',\n UNION_TYPE_DEFINITION: 'UnionTypeDefinition',\n ENUM_TYPE_DEFINITION: 'EnumTypeDefinition',\n ENUM_VALUE_DEFINITION: 'EnumValueDefinition',\n INPUT_OBJECT_TYPE_DEFINITION: 'InputObjectTypeDefinition',\n // Directive Definitions\n DIRECTIVE_DEFINITION: 'DirectiveDefinition',\n // Type System Extensions\n SCHEMA_EXTENSION: 'SchemaExtension',\n // Type Extensions\n SCALAR_TYPE_EXTENSION: 'ScalarTypeExtension',\n OBJECT_TYPE_EXTENSION: 'ObjectTypeExtension',\n INTERFACE_TYPE_EXTENSION: 'InterfaceTypeExtension',\n UNION_TYPE_EXTENSION: 'UnionTypeExtension',\n ENUM_TYPE_EXTENSION: 'EnumTypeExtension',\n INPUT_OBJECT_TYPE_EXTENSION: 'InputObjectTypeExtension'\n});\n/**\n * The enum type representing the possible kind values of AST nodes.\n */\n","import defineInspect from \"../jsutils/defineInspect.mjs\";\n\n/**\n * Contains a range of UTF-8 character offsets and token references that\n * identify the region of the source from which the AST derived.\n */\nexport var Location = /*#__PURE__*/function () {\n /**\n * The character offset at which this Node begins.\n */\n\n /**\n * The character offset at which this Node ends.\n */\n\n /**\n * The Token at which this Node begins.\n */\n\n /**\n * The Token at which this Node ends.\n */\n\n /**\n * The Source document the AST represents.\n */\n function Location(startToken, endToken, source) {\n this.start = startToken.start;\n this.end = endToken.end;\n this.startToken = startToken;\n this.endToken = endToken;\n this.source = source;\n }\n\n var _proto = Location.prototype;\n\n _proto.toJSON = function toJSON() {\n return {\n start: this.start,\n end: this.end\n };\n };\n\n return Location;\n}(); // Print a simplified form when appearing in `inspect` and `util.inspect`.\n\ndefineInspect(Location);\n/**\n * Represents a range of characters represented by a lexical token\n * within a Source.\n */\n\nexport var Token = /*#__PURE__*/function () {\n /**\n * The kind of Token.\n */\n\n /**\n * The character offset at which this Node begins.\n */\n\n /**\n * The character offset at which this Node ends.\n */\n\n /**\n * The 1-indexed line number on which this Token appears.\n */\n\n /**\n * The 1-indexed column number at which this Token begins.\n */\n\n /**\n * For non-punctuation tokens, represents the interpreted value of the token.\n */\n\n /**\n * Tokens exist as nodes in a double-linked-list amongst all tokens\n * including ignored tokens. <SOF> is always the first node and <EOF>\n * the last.\n */\n function Token(kind, start, end, line, column, prev, value) {\n this.kind = kind;\n this.start = start;\n this.end = end;\n this.line = line;\n this.column = column;\n this.value = value;\n this.prev = prev;\n this.next = null;\n }\n\n var _proto2 = Token.prototype;\n\n _proto2.toJSON = function toJSON() {\n return {\n kind: this.kind,\n value: this.value,\n line: this.line,\n column: this.column\n };\n };\n\n return Token;\n}(); // Print a simplified form when appearing in `inspect` and `util.inspect`.\n\ndefineInspect(Token);\n/**\n * @internal\n */\n\nexport function isNode(maybeNode) {\n return maybeNode != null && typeof maybeNode.kind === 'string';\n}\n/**\n * The list of all possible AST node types.\n */\n","import invariant from \"./invariant.mjs\";\nimport nodejsCustomInspectSymbol from \"./nodejsCustomInspectSymbol.mjs\";\n/**\n * The `defineInspect()` function defines `inspect()` prototype method as alias of `toJSON`\n */\n\nexport default function defineInspect(classObject) {\n var fn = classObject.prototype.toJSON;\n typeof fn === 'function' || invariant(0);\n classObject.prototype.inspect = fn; // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2317')\n\n if (nodejsCustomInspectSymbol) {\n classObject.prototype[nodejsCustomInspectSymbol] = fn;\n }\n}\n","export default function invariant(condition, message) {\n var booleanCondition = Boolean(condition); // istanbul ignore else (See transformation done in './resources/inlineInvariant.js')\n\n if (!booleanCondition) {\n throw new Error(message != null ? message : 'Unexpected invariant triggered.');\n }\n}\n","// istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')\nvar nodejsCustomInspectSymbol = typeof Symbol === 'function' && typeof Symbol.for === 'function' ? Symbol.for('nodejs.util.inspect.custom') : undefined;\nexport default nodejsCustomInspectSymbol;\n","/**\n * An exported enum describing the different kinds of tokens that the\n * lexer emits.\n */\nexport var TokenKind = Object.freeze({\n SOF: '<SOF>',\n EOF: '<EOF>',\n BANG: '!',\n DOLLAR: '$',\n AMP: '&',\n PAREN_L: '(',\n PAREN_R: ')',\n SPREAD: '...',\n COLON: ':',\n EQUALS: '=',\n AT: '@',\n BRACKET_L: '[',\n BRACKET_R: ']',\n BRACE_L: '{',\n PIPE: '|',\n BRACE_R: '}',\n NAME: 'Name',\n INT: 'Int',\n FLOAT: 'Float',\n STRING: 'String',\n BLOCK_STRING: 'BlockString',\n COMMENT: 'Comment'\n});\n/**\n * The enum type representing the token kinds values.\n */\n","function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nimport { SYMBOL_TO_STRING_TAG } from \"../polyfills/symbols.mjs\";\nimport inspect from \"../jsutils/inspect.mjs\";\nimport devAssert from \"../jsutils/devAssert.mjs\";\nimport instanceOf from \"../jsutils/instanceOf.mjs\";\n\n/**\n * A representation of source input to GraphQL. The `name` and `locationOffset` parameters are\n * optional, but they are useful for clients who store GraphQL documents in source files.\n * For example, if the GraphQL input starts at line 40 in a file named `Foo.graphql`, it might\n * be useful for `name` to be `\"Foo.graphql\"` and location to be `{ line: 40, column: 1 }`.\n * The `line` and `column` properties in `locationOffset` are 1-indexed.\n */\nexport var Source = /*#__PURE__*/function () {\n function Source(body) {\n var name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'GraphQL request';\n var locationOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {\n line: 1,\n column: 1\n };\n typeof body === 'string' || devAssert(0, \"Body must be a string. Received: \".concat(inspect(body), \".\"));\n this.body = body;\n this.name = name;\n this.locationOffset = locationOffset;\n this.locationOffset.line > 0 || devAssert(0, 'line in locationOffset is 1-indexed and must be positive.');\n this.locationOffset.column > 0 || devAssert(0, 'column in locationOffset is 1-indexed and must be positive.');\n } // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet\n\n\n _createClass(Source, [{\n key: SYMBOL_TO_STRING_TAG,\n get: function get() {\n return 'Source';\n }\n }]);\n\n return Source;\n}();\n/**\n * Test if the given value is a Source object.\n *\n * @internal\n */\n\n// eslint-disable-next-line no-redeclare\nexport function isSource(source) {\n return instanceOf(source, Source);\n}\n","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/* eslint-disable flowtype/no-weak-types */\nimport nodejsCustomInspectSymbol from \"./nodejsCustomInspectSymbol.mjs\";\nvar MAX_ARRAY_LENGTH = 10;\nvar MAX_RECURSIVE_DEPTH = 2;\n/**\n * Used to print values in error messages.\n */\n\nexport default function inspect(value) {\n return formatValue(value, []);\n}\n\nfunction formatValue(value, seenValues) {\n switch (_typeof(value)) {\n case 'string':\n return JSON.stringify(value);\n\n case 'function':\n return value.name ? \"[function \".concat(value.name, \"]\") : '[function]';\n\n case 'object':\n if (value === null) {\n return 'null';\n }\n\n return formatObjectValue(value, seenValues);\n\n default:\n return String(value);\n }\n}\n\nfunction formatObjectValue(value, previouslySeenValues) {\n if (previouslySeenValues.indexOf(value) !== -1) {\n return '[Circular]';\n }\n\n var seenValues = [].concat(previouslySeenValues, [value]);\n var customInspectFn = getCustomFn(value);\n\n if (customInspectFn !== undefined) {\n var customValue = customInspectFn.call(value); // check for infinite recursion\n\n if (customValue !== value) {\n return typeof customValue === 'string' ? customValue : formatValue(customValue, seenValues);\n }\n } else if (Array.isArray(value)) {\n return formatArray(value, seenValues);\n }\n\n return formatObject(value, seenValues);\n}\n\nfunction formatObject(object, seenValues) {\n var keys = Object.keys(object);\n\n if (keys.length === 0) {\n return '{}';\n }\n\n if (seenValues.length > MAX_RECURSIVE_DEPTH) {\n return '[' + getObjectTag(object) + ']';\n }\n\n var properties = keys.map(function (key) {\n var value = formatValue(object[key], seenValues);\n return key + ': ' + value;\n });\n return '{ ' + properties.join(', ') + ' }';\n}\n\nfunction formatArray(array, seenValues) {\n if (array.length === 0) {\n return '[]';\n }\n\n if (seenValues.length > MAX_RECURSIVE_DEPTH) {\n return '[Array]';\n }\n\n var len = Math.min(MAX_ARRAY_LENGTH, array.length);\n var remaining = array.length - len;\n var items = [];\n\n for (var i = 0; i < len; ++i) {\n items.push(formatValue(array[i], seenValues));\n }\n\n if (remaining === 1) {\n items.push('... 1 more item');\n } else if (remaining > 1) {\n items.push(\"... \".concat(remaining, \" more items\"));\n }\n\n return '[' + items.join(', ') + ']';\n}\n\nfunction getCustomFn(object) {\n var customInspectFn = object[String(nodejsCustomInspectSymbol)];\n\n if (typeof customInspectFn === 'function') {\n return customInspectFn;\n }\n\n if (typeof object.inspect === 'function') {\n return object.inspect;\n }\n}\n\nfunction getObjectTag(object) {\n var tag = Object.prototype.toString.call(object).replace(/^\\[object /, '').replace(/]$/, '');\n\n if (tag === 'Object' && typeof object.constructor === 'function') {\n var name = object.constructor.name;\n\n if (typeof name === 'string' && name !== '') {\n return name;\n }\n }\n\n return tag;\n}\n","export default function devAssert(condition, message) {\n var booleanCondition = Boolean(condition); // istanbul ignore else (See transformation done in './resources/inlineInvariant.js')\n\n if (!booleanCondition) {\n throw new Error(message);\n }\n}\n","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport inspect from \"./inspect.mjs\";\n/**\n * A replacement for instanceof which includes an error warning when multi-realm\n * constructors are detected.\n */\n\n// See: https://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production\n// See: https://webpack.js.org/guides/production/\nexport default process.env.NODE_ENV === 'production' ? // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')\n// eslint-disable-next-line no-shadow\nfunction instanceOf(value, constructor) {\n return value instanceof constructor;\n} : // eslint-disable-next-line no-shadow\nfunction instanceOf(value, constructor) {\n if (value instanceof constructor) {\n return true;\n }\n\n if (_typeof(value) === 'object' && value !== null) {\n var _value$constructor;\n\n var className = constructor.prototype[Symbol.toStringTag];\n var valueClassName = // We still need to support constructor's name to detect conflicts with older versions of this library.\n Symbol.toStringTag in value ? value[Symbol.toStringTag] : (_value$constructor = value.constructor) === null || _value$constructor === void 0 ? void 0 : _value$constructor.name;\n\n if (className === valueClassName) {\n var stringifiedValue = inspect(value);\n throw new Error(\"Cannot use \".concat(className, \" \\\"\").concat(stringifiedValue, \"\\\" from another module or realm.\\n\\nEnsure that there is only one instance of \\\"graphql\\\" in the node_modules\\ndirectory. If different versions of \\\"graphql\\\" are the dependencies of other\\nrelied on modules, use \\\"resolutions\\\" to ensure only one version is installed.\\n\\nhttps://yarnpkg.com/en/docs/selective-version-resolutions\\n\\nDuplicate \\\"graphql\\\" modules cannot be used at the same time since different\\nversions may have different capabilities and behavior. The data from one\\nversion used in the function from another could produce confusing and\\nspurious results.\"));\n }\n }\n\n return false;\n};\n","/**\n * The set of allowed directive location values.\n */\nexport var DirectiveLocation = Object.freeze({\n // Request Definitions\n QUERY: 'QUERY',\n MUTATION: 'MUTATION',\n SUBSCRIPTION: 'SUBSCRIPTION',\n FIELD: 'FIELD',\n FRAGMENT_DEFINITION: 'FRAGMENT_DEFINITION',\n FRAGMENT_SPREAD: 'FRAGMENT_SPREAD',\n INLINE_FRAGMENT: 'INLINE_FRAGMENT',\n VARIABLE_DEFINITION: 'VARIABLE_DEFINITION',\n // Type System Definitions\n SCHEMA: 'SCHEMA',\n SCALAR: 'SCALAR',\n OBJECT: 'OBJECT',\n FIELD_DEFINITION: 'FIELD_DEFINITION',\n ARGUMENT_DEFINITION: 'ARGUMENT_DEFINITION',\n INTERFACE: 'INTERFACE',\n UNION: 'UNION',\n ENUM: 'ENUM',\n ENUM_VALUE: 'ENUM_VALUE',\n INPUT_OBJECT: 'INPUT_OBJECT',\n INPUT_FIELD_DEFINITION: 'INPUT_FIELD_DEFINITION'\n});\n/**\n * The enum type representing the directive location values.\n */\n","import { syntaxError } from \"../error/syntaxError.mjs\";\nimport { Token } from \"./ast.mjs\";\nimport { TokenKind } from \"./tokenKind.mjs\";\nimport { dedentBlockStringValue } from \"./blockString.mjs\";\n/**\n * Given a Source object, creates a Lexer for that source.\n * A Lexer is a stateful stream generator in that every time\n * it is advanced, it returns the next token in the Source. Assuming the\n * source lexes, the final Token emitted by the lexer will be of kind\n * EOF, after which the lexer will repeatedly return the same EOF token\n * whenever called.\n */\n\nexport var Lexer = /*#__PURE__*/function () {\n /**\n * The previously focused non-ignored token.\n */\n\n /**\n * The currently focused non-ignored token.\n */\n\n /**\n * The (1-indexed) line containing the current token.\n */\n\n /**\n * The character offset at which the current line begins.\n */\n function Lexer(source) {\n var startOfFileToken = new Token(TokenKind.SOF, 0, 0, 0, 0, null);\n this.source = source;\n this.lastToken = startOfFileToken;\n this.token = startOfFileToken;\n this.line = 1;\n this.lineStart = 0;\n }\n /**\n * Advances the token stream to the next non-ignored token.\n */\n\n\n var _proto = Lexer.prototype;\n\n _proto.advance = function advance() {\n this.lastToken = this.token;\n var token = this.token = this.lookahead();\n return token;\n }\n /**\n * Looks ahead and returns the next non-ignored token, but does not change\n * the state of Lexer.\n */\n ;\n\n _proto.lookahead = function lookahead() {\n var token = this.token;\n\n if (token.kind !== TokenKind.EOF) {\n do {\n var _token$next;\n\n // Note: next is only mutable during parsing, so we cast to allow this.\n token = (_token$next = token.next) !== null && _token$next !== void 0 ? _token$next : token.next = readToken(this, token);\n } while (token.kind === TokenKind.COMMENT);\n }\n\n return token;\n };\n\n return Lexer;\n}();\n/**\n * @internal\n */\n\nexport function isPunctuatorTokenKind(kind) {\n return kind === TokenKind.BANG || kind === TokenKind.DOLLAR || kind === TokenKind.AMP || kind === TokenKind.PAREN_L || kind === TokenKind.PAREN_R || kind === TokenKind.SPREAD || kind === TokenKind.COLON || kind === TokenKind.EQUALS || kind === TokenKind.AT || kind === TokenKind.BRACKET_L || kind === TokenKind.BRACKET_R || kind === TokenKind.BRACE_L || kind === TokenKind.PIPE || kind === TokenKind.BRACE_R;\n}\n\nfunction printCharCode(code) {\n return (// NaN/undefined represents access beyond the end of the file.\n isNaN(code) ? TokenKind.EOF : // Trust JSON for ASCII.\n code < 0x007f ? JSON.stringify(String.fromCharCode(code)) : // Otherwise print the escaped form.\n \"\\\"\\\\u\".concat(('00' + code.toString(16).toUpperCase()).slice(-4), \"\\\"\")\n );\n}\n/**\n * Gets the next token from the source starting at the given position.\n *\n * This skips over whitespace until it finds the next lexable token, then lexes\n * punctuators immediately or calls the appropriate helper function for more\n * complicated tokens.\n */\n\n\nfunction readToken(lexer, prev) {\n var source = lexer.source;\n var body = source.body;\n var bodyLength = body.length;\n var pos = prev.end;\n\n while (pos < bodyLength) {\n var code = body.charCodeAt(pos);\n var _line = lexer.line;\n\n var _col = 1 + pos - lexer.lineStart; // SourceCharacter\n\n\n switch (code) {\n case 0xfeff: // <BOM>\n\n case 9: // \\t\n\n case 32: // <space>\n\n case 44:\n // ,\n ++pos;\n continue;\n\n case 10:\n // \\n\n ++pos;\n ++lexer.line;\n lexer.lineStart = pos;\n continue;\n\n case 13:\n // \\r\n if (body.charCodeAt(pos + 1) === 10) {\n pos += 2;\n } else {\n ++pos;\n }\n\n ++lexer.line;\n lexer.lineStart = pos;\n continue;\n\n case 33:\n // !\n return new Token(TokenKind.BANG, pos, pos + 1, _line, _col, prev);\n\n case 35:\n // #\n return readComment(source, pos, _line, _col, prev);\n\n case 36:\n // $\n return new Token(TokenKind.DOLLAR, pos, pos + 1, _line, _col, prev);\n\n case 38:\n // &\n return new Token(TokenKind.AMP, pos, pos + 1, _line, _col, prev);\n\n case 40:\n // (\n return new Token(TokenKind.PAREN_L, pos, pos + 1, _line, _col, prev);\n\n case 41:\n // )\n return new Token(TokenKind.PAREN_R, pos, pos + 1, _line, _col, prev);\n\n case 46:\n // .\n if (body.charCodeAt(pos + 1) === 46 && body.charCodeAt(pos + 2) === 46) {\n return new Token(TokenKind.SPREAD, pos, pos + 3, _line, _col, prev);\n }\n\n break;\n\n case 58:\n // :\n return new Token(TokenKind.COLON, pos, pos + 1, _line, _col, prev);\n\n case 61:\n // =\n return new Token(TokenKind.EQUALS, pos, pos + 1, _line, _col, prev);\n\n case 64:\n // @\n return new Token(TokenKind.AT, pos, pos + 1, _line, _col, prev);\n\n case 91:\n // [\n return new Token(TokenKind.BRACKET_L, pos, pos + 1, _line, _col, prev);\n\n case 93:\n // ]\n return new Token(TokenKind.BRACKET_R, pos, pos + 1, _line, _col, prev);\n\n case 123:\n // {\n return new Token(TokenKind.BRACE_L, pos, pos + 1, _line, _col, prev);\n\n case 124:\n // |\n return new Token(TokenKind.PIPE, pos, pos + 1, _line, _col, prev);\n\n case 125:\n // }\n return new Token(TokenKind.BRACE_R, pos, pos + 1, _line, _col, prev);\n\n case 34:\n // \"\n if (body.charCodeAt(pos + 1) === 34 && body.charCodeAt(pos + 2) === 34) {\n return readBlockString(source, pos, _line, _col, prev, lexer);\n }\n\n return readString(source, pos, _line, _col, prev);\n\n case 45: // -\n\n case 48: // 0\n\n case 49: // 1\n\n case 50: // 2\n\n case 51: // 3\n\n case 52: // 4\n\n case 53: // 5\n\n case 54: // 6\n\n case 55: // 7\n\n case 56: // 8\n\n case 57:\n // 9\n return readNumber(source, pos, code, _line, _col, prev);\n\n case 65: // A\n\n case 66: // B\n\n case 67: // C\n\n case 68: // D\n\n case 69: // E\n\n case 70: // F\n\n case 71: // G\n\n case 72: // H\n\n case 73: // I\n\n case 74: // J\n\n case 75: // K\n\n case 76: // L\n\n case 77: // M\n\n case 78: // N\n\n case 79: // O\n\n case 80: // P\n\n case 81: // Q\n\n case 82: // R\n\n case 83: // S\n\n case 84: // T\n\n case 85: // U\n\n case 86: // V\n\n case 87: // W\n\n case 88: // X\n\n case 89: // Y\n\n case 90: // Z\n\n case 95: // _\n\n case 97: // a\n\n case 98: // b\n\n case 99: // c\n\n case 100: // d\n\n case 101: // e\n\n case 102: // f\n\n case 103: // g\n\n case 104: // h\n\n case 105: // i\n\n case 106: // j\n\n case 107: // k\n\n case 108: // l\n\n case 109: // m\n\n case 110: // n\n\n case 111: // o\n\n case 112: // p\n\n case 113: // q\n\n case 114: // r\n\n case 115: // s\n\n case 116: // t\n\n case 117: // u\n\n case 118: // v\n\n case 119: // w\n\n case 120: // x\n\n case 121: // y\n\n case 122:\n // z\n return readName(source, pos, _line, _col, prev);\n }\n\n throw syntaxError(source, pos, unexpectedCharacterMessage(code));\n }\n\n var line = lexer.line;\n var col = 1 + pos - lexer.lineStart;\n return new Token(TokenKind.EOF, bodyLength, bodyLength, line, col, prev);\n}\n/**\n * Report a message that an unexpected character was encountered.\n */\n\n\nfunction unexpectedCharacterMessage(code) {\n if (code < 0x0020 && code !== 0x0009 && code !== 0x000a && code !== 0x000d) {\n return \"Cannot contain the invalid character \".concat(printCharCode(code), \".\");\n }\n\n if (code === 39) {\n // '\n return 'Unexpected single quote character (\\'), did you mean to use a double quote (\")?';\n }\n\n return \"Cannot parse the unexpected character \".concat(printCharCode(code), \".\");\n}\n/**\n * Reads a comment token from the source file.\n *\n * #[\\u0009\\u0020-\\uFFFF]*\n */\n\n\nfunction readComment(source, start, line, col, prev) {\n var body = source.body;\n var code;\n var position = start;\n\n do {\n code = body.charCodeAt(++position);\n } while (!isNaN(code) && ( // SourceCharacter but not LineTerminator\n code > 0x001f || code === 0x0009));\n\n return new Token(TokenKind.COMMENT, start, position, line, col, prev, body.slice(start + 1, position));\n}\n/**\n * Reads a number token from the source file, either a float\n * or an int depending on whether a decimal point appears.\n *\n * Int: -?(0|[1-9][0-9]*)\n * Float: -?(0|[1-9][0-9]*)(\\.[0-9]+)?((E|e)(+|-)?[0-9]+)?\n */\n\n\nfunction readNumber(source, start, firstCode, line, col, prev) {\n var body = source.body;\n var code = firstCode;\n var position = start;\n var isFloat = false;\n\n if (code === 45) {\n // -\n code = body.charCodeAt(++position);\n }\n\n if (code === 48) {\n // 0\n code = body.charCodeAt(++position);\n\n if (code >= 48 && code <= 57) {\n throw syntaxError(source, position, \"Invalid number, unexpected digit after 0: \".concat(printCharCode(code), \".\"));\n }\n } else {\n position = readDigits(source, position, code);\n code = body.charCodeAt(position);\n }\n\n if (code === 46) {\n // .\n isFloat = true;\n code = body.charCodeAt(++position);\n position = readDigits(source, position, code);\n code = body.charCodeAt(position);\n }\n\n if (code === 69 || code === 101) {\n // E e\n isFloat = true;\n code = body.charCodeAt(++position);\n\n if (code === 43 || code === 45) {\n // + -\n code = body.charCodeAt(++position);\n }\n\n position = readDigits(source, position, code);\n code = body.charCodeAt(position);\n } // Numbers cannot be followed by . or NameStart\n\n\n if (code === 46 || isNameStart(code)) {\n throw syntaxError(source, position, \"Invalid number, expected digit but got: \".concat(printCharCode(code), \".\"));\n }\n\n return new Token(isFloat ? TokenKind.FLOAT : TokenKind.INT, start, position, line, col, prev, body.slice(start, position));\n}\n/**\n * Returns the new position in the source after reading digits.\n */\n\n\nfunction readDigits(source, start, firstCode) {\n var body = source.body;\n var position = start;\n var code = firstCode;\n\n if (code >= 48 && code <= 57) {\n // 0 - 9\n do {\n code = body.charCodeAt(++position);\n } while (code >= 48 && code <= 57); // 0 - 9\n\n\n return position;\n }\n\n throw syntaxError(source, position, \"Invalid number, expected digit but got: \".concat(printCharCode(code), \".\"));\n}\n/**\n * Reads a string token from the source file.\n *\n * \"([^\"\\\\\\u000A\\u000D]|(\\\\(u[0-9a-fA-F]{4}|[\"\\\\/bfnrt])))*\"\n */\n\n\nfunction readString(source, start, line, col, prev) {\n var body = source.body;\n var position = start + 1;\n var chunkStart = position;\n var code = 0;\n var value = '';\n\n while (position < body.length && !isNaN(code = body.charCodeAt(position)) && // not LineTerminator\n code !== 0x000a && code !== 0x000d) {\n // Closing Quote (\")\n if (code === 34) {\n value += body.slice(chunkStart, position);\n return new Token(TokenKind.STRING, start, position + 1, line, col, prev, value);\n } // SourceCharacter\n\n\n if (code < 0x0020 && code !== 0x0009) {\n throw syntaxError(source, position, \"Invalid character within String: \".concat(printCharCode(code), \".\"));\n }\n\n ++position;\n\n if (code === 92) {\n // \\\n value += body.slice(chunkStart, position - 1);\n code = body.charCodeAt(position);\n\n switch (code) {\n case 34:\n value += '\"';\n break;\n\n case 47:\n value += '/';\n break;\n\n case 92:\n value += '\\\\';\n break;\n\n case 98:\n value += '\\b';\n break;\n\n case 102:\n value += '\\f';\n break;\n\n case 110:\n value += '\\n';\n break;\n\n case 114:\n value += '\\r';\n break;\n\n case 116:\n value += '\\t';\n break;\n\n case 117:\n {\n // uXXXX\n var charCode = uniCharCode(body.charCodeAt(position + 1), body.charCodeAt(position + 2), body.charCodeAt(position + 3), body.charCodeAt(position + 4));\n\n if (charCode < 0) {\n var invalidSequence = body.slice(position + 1, position + 5);\n throw syntaxError(source, position, \"Invalid character escape sequence: \\\\u\".concat(invalidSequence, \".\"));\n }\n\n value += String.fromCharCode(charCode);\n position += 4;\n break;\n }\n\n default:\n throw syntaxError(source, position, \"Invalid character escape sequence: \\\\\".concat(String.fromCharCode(code), \".\"));\n }\n\n ++position;\n chunkStart = position;\n }\n }\n\n throw syntaxError(source, position, 'Unterminated string.');\n}\n/**\n * Reads a block string token from the source file.\n *\n * \"\"\"(\"?\"?(\\\\\"\"\"|\\\\(?!=\"\"\")|[^\"\\\\]))*\"\"\"\n */\n\n\nfunction readBlockString(source, start, line, col, prev, lexer) {\n var body = source.body;\n var position = start + 3;\n var chunkStart = position;\n var code = 0;\n var rawValue = '';\n\n while (position < body.length && !isNaN(code = body.charCodeAt(position))) {\n // Closing Triple-Quote (\"\"\")\n if (code === 34 && body.charCodeAt(position + 1) === 34 && body.charCodeAt(position + 2) === 34) {\n rawValue += body.slice(chunkStart, position);\n return new Token(TokenKind.BLOCK_STRING, start, position + 3, line, col, prev, dedentBlockStringValue(rawValue));\n } // SourceCharacter\n\n\n if (code < 0x0020 && code !== 0x0009 && code !== 0x000a && code !== 0x000d) {\n throw syntaxError(source, position, \"Invalid character within String: \".concat(printCharCode(code), \".\"));\n }\n\n if (code === 10) {\n // new line\n ++position;\n ++lexer.line;\n lexer.lineStart = position;\n } else if (code === 13) {\n // carriage return\n if (body.charCodeAt(position + 1) === 10) {\n position += 2;\n } else {\n ++position;\n }\n\n ++lexer.line;\n lexer.lineStart = position;\n } else if ( // Escape Triple-Quote (\\\"\"\")\n code === 92 && body.charCodeAt(position + 1) === 34 && body.charCodeAt(position + 2) === 34 && body.charCodeAt(position + 3) === 34) {\n rawValue += body.slice(chunkStart, position) + '\"\"\"';\n position += 4;\n chunkStart = position;\n } else {\n ++position;\n }\n }\n\n throw syntaxError(source, position, 'Unterminated string.');\n}\n/**\n * Converts four hexadecimal chars to the integer that the\n * string represents. For example, uniCharCode('0','0','0','f')\n * will return 15, and uniCharCode('0','0','f','f') returns 255.\n *\n * Returns a negative number on error, if a char was invalid.\n *\n * This is implemented by noting that char2hex() returns -1 on error,\n * which means the result of ORing the char2hex() will also be negative.\n */\n\n\nfunction uniCharCode(a, b, c, d) {\n return char2hex(a) << 12 | char2hex(b) << 8 | char2hex(c) << 4 | char2hex(d);\n}\n/**\n * Converts a hex character to its integer value.\n * '0' becomes 0, '9' becomes 9\n * 'A' becomes 10, 'F' becomes 15\n * 'a' becomes 10, 'f' becomes 15\n *\n * Returns -1 on error.\n */\n\n\nfunction char2hex(a) {\n return a >= 48 && a <= 57 ? a - 48 // 0-9\n : a >= 65 && a <= 70 ? a - 55 // A-F\n : a >= 97 && a <= 102 ? a - 87 // a-f\n : -1;\n}\n/**\n * Reads an alphanumeric + underscore name from the source.\n *\n * [_A-Za-z][_0-9A-Za-z]*\n */\n\n\nfunction readName(source, start, line, col, prev) {\n var body = source.body;\n var bodyLength = body.length;\n var position = start + 1;\n var code = 0;\n\n while (position !== bodyLength && !isNaN(code = body.charCodeAt(position)) && (code === 95 || // _\n code >= 48 && code <= 57 || // 0-9\n code >= 65 && code <= 90 || // A-Z\n code >= 97 && code <= 122) // a-z\n ) {\n ++position;\n }\n\n return new Token(TokenKind.NAME, start, position, line, col, prev, body.slice(start, position));\n} // _ A-Z a-z\n\n\nfunction isNameStart(code) {\n return code === 95 || code >= 65 && code <= 90 || code >= 97 && code <= 122;\n}\n","/**\n * Produces the value of a block string from its parsed raw value, similar to\n * CoffeeScript's block string, Python's docstring trim or Ruby's strip_heredoc.\n *\n * This implements the GraphQL spec's BlockStringValue() static algorithm.\n *\n * @internal\n */\nexport function dedentBlockStringValue(rawString) {\n // Expand a block string's raw value into independent lines.\n var lines = rawString.split(/\\r\\n|[\\n\\r]/g); // Remove common indentation from all lines but first.\n\n var commonIndent = getBlockStringIndentation(rawString);\n\n if (commonIndent !== 0) {\n for (var i = 1; i < lines.length; i++) {\n lines[i] = lines[i].slice(commonIndent);\n }\n } // Remove leading and trailing blank lines.\n\n\n var startLine = 0;\n\n while (startLine < lines.length && isBlank(lines[startLine])) {\n ++startLine;\n }\n\n var endLine = lines.length;\n\n while (endLine > startLine && isBlank(lines[endLine - 1])) {\n --endLine;\n } // Return a string of the lines joined with U+000A.\n\n\n return lines.slice(startLine, endLine).join('\\n');\n}\n\nfunction isBlank(str) {\n for (var i = 0; i < str.length; ++i) {\n if (str[i] !== ' ' && str[i] !== '\\t') {\n return false;\n }\n }\n\n return true;\n}\n/**\n * @internal\n */\n\n\nexport function getBlockStringIndentation(value) {\n var _commonIndent;\n\n var isFirstLine = true;\n var isEmptyLine = true;\n var indent = 0;\n var commonIndent = null;\n\n for (var i = 0; i < value.length; ++i) {\n switch (value.charCodeAt(i)) {\n case 13:\n // \\r\n if (value.charCodeAt(i + 1) === 10) {\n ++i; // skip \\r\\n as one symbol\n }\n\n // falls through\n\n case 10:\n // \\n\n isFirstLine = false;\n isEmptyLine = true;\n indent = 0;\n break;\n\n case 9: // \\t\n\n case 32:\n // <space>\n ++indent;\n break;\n\n default:\n if (isEmptyLine && !isFirstLine && (commonIndent === null || indent < commonIndent)) {\n commonIndent = indent;\n }\n\n isEmptyLine = false;\n }\n }\n\n return (_commonIndent = commonIndent) !== null && _commonIndent !== void 0 ? _commonIndent : 0;\n}\n/**\n * Print a block string in the indented block form by adding a leading and\n * trailing blank line. However, if a block string starts with whitespace and is\n * a single-line, adding a leading blank line would strip that whitespace.\n *\n * @internal\n */\n\nexport function printBlockString(value) {\n var indentation = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n var preferMultipleLines = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var isSingleLine = value.indexOf('\\n') === -1;\n var hasLeadingSpace = value[0] === ' ' || value[0] === '\\t';\n var hasTrailingQuote = value[value.length - 1] === '\"';\n var hasTrailingSlash = value[value.length - 1] === '\\\\';\n var printAsMultipleLines = !isSingleLine || hasTrailingQuote || hasTrailingSlash || preferMultipleLines;\n var result = ''; // Format a multi-line block quote to account for leading space.\n\n if (printAsMultipleLines && !(isSingleLine && hasLeadingSpace)) {\n result += '\\n' + indentation;\n }\n\n result += indentation ? value.replace(/\\n/g, '\\n' + indentation) : value;\n\n if (printAsMultipleLines) {\n result += '\\n';\n }\n\n return '\"\"\"' + result.replace(/\"\"\"/g, '\\\\\"\"\"') + '\"\"\"';\n}\n","export { Source } from \"./source.mjs\";\nexport { getLocation } from \"./location.mjs\";\nexport { printLocation, printSourceLocation } from \"./printLocation.mjs\";\nexport { Kind } from \"./kinds.mjs\";\nexport { TokenKind } from \"./tokenKind.mjs\";\nexport { Lexer } from \"./lexer.mjs\";\nexport { parse, parseValue, parseType } from \"./parser.mjs\";\nexport { print } from \"./printer.mjs\";\nexport { visit, visitInParallel, getVisitFn, BREAK } from \"./visitor.mjs\";\nexport { Location, Token } from \"./ast.mjs\";\nexport { isDefinitionNode, isExecutableDefinitionNode, isSelectionNode, isValueNode, isTypeNode, isTypeSystemDefinitionNode, isTypeDefinitionNode, isTypeSystemExtensionNode, isTypeExtensionNode } from \"./predicates.mjs\";\nexport { DirectiveLocation } from \"./directiveLocation.mjs\";\n","/**\n * Generate mutation and query fragments for a form based on the schema\n * TODO: refactor to mutualize more code with vulcan-core defaultFragment functions\n * TODO: move to lib when refactored\n */\nimport _uniq from \"lodash/uniq.js\";\nimport _intersection from \"lodash/intersection.js\";\nimport gql from \"graphql-tag\";\nimport {\n getCreateableFields,\n getUpdateableFields,\n getFragmentFieldNames,\n //isBlackbox,\n} from \"@vulcanjs/schema\";\nimport {\n getFieldFragment,\n VulcanGraphqlModel,\n //isBlackbox,\n} from \"@vulcanjs/graphql\";\nimport { capitalize } from \"@vulcanjs/utils\";\nimport type { FormType } from \"../typings\";\nimport compact from \"lodash/compact.js\";\n// getFieldFragment,\nconst intlSuffix = \"_intl\";\n\n// PostsEditFormQueryFragment/PostsNewFormMutationFragment/etc.\nconst getFragmentName = (\n formType: FormType,\n multiTypeName: string,\n fragmentType: \"mutation\" | \"query\"\n) =>\n [multiTypeName, formType, \"form\", fragmentType, \"fragment\"]\n .map(capitalize)\n .join(\"\");\n\n// get modifiable fields in the query either for update or create operations\nconst getQueryFieldNames = ({ schema, options }) => {\n const queryFields =\n options.formType === \"new\"\n ? getCreateableFields(schema)\n : getUpdateableFields(schema);\n return queryFields;\n};\n// add readable fields to mutation fields\nconst getMutationFieldNames = ({ readableFieldNames, queryFieldNames }) => {\n return _uniq(queryFieldNames.concat(readableFieldNames));\n};\n\n/*\nconst getFieldFragment = ({ schema, fieldName, options }) => {\n let fieldFragment = fieldName;\n const field = schema[fieldName];\n if (!(field && field.type)) return fieldName;\n const fieldType = field.type.singleType;\n const fieldTypeName =\n typeof fieldType === 'object'\n ? 'Object'\n : typeof fieldType === 'function'\n ? fieldType.name\n : fieldType;\n\n if (fieldName.slice(-5) === intlSuffix) {\n fieldFragment = `${fieldName}{ locale value }`;\n } else {\n switch (fieldTypeName) {\n // recursive call for nested arrays and objects\n case 'Object':\n if (!isBlackbox(field) && fieldType._schema) {\n fieldFragment =\n getSchemaFragment({\n fragmentName: fieldName,\n schema: fieldType._schema,\n options,\n }) || null;\n }\n break;\n case 'Array':\n const arrayItemFieldName = `${fieldName}.$`;\n const arrayItemField = schema[arrayItemFieldName];\n // note: make sure field has an associated array item field\n if (arrayItemField) {\n // child will either be native value or a an object (first case)\n const arrayItemFieldType = arrayItemField.type.singleType;\n if (!arrayItemField.blackbox && arrayItemFieldType._schema) {\n fieldFragment =\n getSchemaFragment({\n fragmentName: fieldName,\n schema: arrayItemFieldType._schema,\n options,\n }) || null;\n }\n }\n break;\n default:\n // handle intl or return fieldName\n fieldFragment = fieldName;\n break;\n }\n }\n return fieldFragment;\n};\n*/\n\n// get fragment for a whole schema (root schema or nested schema of an object or an array)\nconst getSchemaFragment = ({\n schema,\n fragmentName,\n options,\n fieldNames: providedFieldNames,\n}) => {\n // differentiate mutation/query and create/update cases\n // respect provided fieldNames if any (needed for the root schema)\n const fieldNames =\n providedFieldNames ||\n (options.isMutation\n ? getMutationFieldNames({\n queryFieldNames: getQueryFieldNames({ schema, options }),\n readableFieldNames: getFragmentFieldNames({\n schema,\n options: { onlyViewable: true },\n }),\n })\n : getQueryFieldNames({ schema, options }));\n\n const childFragments =\n fieldNames.length &&\n fieldNames\n .map((fieldName) =>\n getFieldFragment({\n schema,\n fieldName,\n options,\n getObjectFragment: getSchemaFragment, // allow to reuse the code from defaultFragment with another behaviour\n })\n )\n // remove empty values\n .filter((f) => !!f);\n if (childFragments.length) {\n return `${fragmentName} { ${childFragments.join(\"\\n\")} }`;\n }\n return null;\n};\n\n/**\n * Generate query and mutation fragments for forms, dynamically based on the selected fields\n */\nconst getFormFragments = ({\n formType = \"new\",\n model,\n fields, // restrict on certain fields\n addFields, // add additional fields (eg to display static fields)\n}: {\n model: VulcanGraphqlModel;\n formType: FormType;\n fields?: Array<string>; // restrict on certain fields\n addFields?: Array<string>; // add additional fields (eg to display static fields)\n}) => {\n const { schema, name, graphql } = model;\n const { typeName, multiTypeName } = graphql;\n // get the root schema fieldNames\n let queryFieldNames = getQueryFieldNames({ schema, options: { formType } });\n let mutationFieldNames = getMutationFieldNames({\n queryFieldNames,\n readableFieldNames: getFragmentFieldNames({\n schema,\n options: { onlyViewable: true },\n }),\n });\n\n // if \"fields\" prop is specified, restrict list of fields to it\n if (fields && fields?.length > 0) {\n // add \"_intl\" suffix to all fields in case some of them are intl fields\n const fieldsWithIntlSuffix = fields.map((field) => `${field}${intlSuffix}`);\n const allFields = [...fields, ...fieldsWithIntlSuffix];\n queryFieldNames = _intersection(queryFieldNames, allFields);\n mutationFieldNames = _intersection(mutationFieldNames, allFields);\n }\n\n // add \"addFields\" prop contents to list of fields\n if (addFields?.length) {\n queryFieldNames = queryFieldNames.concat(addFields);\n mutationFieldNames = mutationFieldNames.concat(addFields);\n }\n\n // userId is used to check for permissions, so add it to fragments if possible\n if (schema.userId) {\n queryFieldNames.unshift(\"userId\");\n mutationFieldNames.unshift(\"userId\");\n }\n\n if (schema._id) {\n queryFieldNames.unshift(\"_id\");\n mutationFieldNames.unshift(\"_id\");\n }\n\n // check unicity (_id can be added twice)\n queryFieldNames = _uniq(queryFieldNames);\n mutationFieldNames = _uniq(mutationFieldNames);\n\n if (queryFieldNames.length === 0)\n // NOTE: in theory, you could have no queriable fields, but mutable fields =>\n // a form for data that you can create but can never see...\n // Since that doesn't make much sense, we throw an error to secure the end user\n throw new Error(\n `Model \"${model.name}\" has no queryable fields, cannot create a form for it. Please add readable/createable/updateable fields to the model schema.`\n );\n if (mutationFieldNames.length === 0)\n throw new Error(\n `Model \"${model.name}\" has no mutable fields, cannot create a form for it. Please add createable/updateable fields to model schema.`\n );\n\n const queryFragmentName = getFragmentName(\n formType,\n multiTypeName, // previously collectionName //name,\n \"query\"\n );\n // generate query fragment based on the fields that can be edited. Note: always add _id, and userId if possible.\n // TODO: support nesting\n const queryFragmentText = getSchemaFragment({\n schema,\n fragmentName: `fragment ${queryFragmentName} on ${typeName}`,\n options: { formType, isMutation: false },\n fieldNames: queryFieldNames,\n });\n if (!queryFragmentText) {\n // NOTE: this should never happen if we don't have an empty array for field names\n throw new Error(\n `Model ${model.name} with fields ${queryFieldNames} yield an empty query fragment.`\n );\n }\n const generatedQueryFragment = gql(queryFragmentText);\n\n const mutationFragmentName = getFragmentName(\n formType,\n multiTypeName, // previously collectionName,\n \"mutation\"\n );\n const mutationFragmentText = getSchemaFragment({\n schema,\n fragmentName: `fragment ${mutationFragmentName} on ${typeName}`,\n options: { formType, isMutation: true },\n fieldNames: mutationFieldNames,\n });\n if (!mutationFragmentText) {\n // NOTE: this should never happen if we don't have an empty array for field names\n throw new Error(\n `Model ${model.name} with fields ${mutationFieldNames} yield an empty mutation fragment.`\n );\n }\n // generate mutation fragment based on the fields that can be edited and/or viewed. Note: always add _id, and userId if possible.\n // TODO: support nesting\n const generatedMutationFragment = gql(mutationFragmentText);\n\n // if any field specifies extra queries, add them\n const extraQueries = compact(\n getQueryFieldNames({ schema, options: { formType } }).map((fieldName) => {\n const field = schema[fieldName];\n return field.query;\n })\n );\n // get query & mutation fragments from props or else default to same as generatedFragment\n return {\n queryFragment: generatedQueryFragment,\n mutationFragment: generatedMutationFragment,\n queryFragmentName,\n mutationFragmentName,\n extraQueries,\n };\n};\n\nexport default getFormFragments;\n","import { deprecate } from \"@vulcanjs/utils\";\nimport React, { useContext, useEffect } from \"react\";\nimport { VulcanComponentsContext } from \"./Context\";\n\nexport const VulcanComponentsConsumer = VulcanComponentsContext.Consumer;\n\nexport const useVulcanComponents = () => {\n const val = useContext(VulcanComponentsContext);\n return val;\n};\n\nexport const withVulcanComponents = (C) => (props) => {\n const vulcanComponents = useVulcanComponents();\n deprecate(\n \"0.0.0\",\n \"Using withVulcanComponents HOC => prefer useVulcanComponents with hooks\"\n );\n return <C vulcanComponents={vulcanComponents} {...props} />;\n};\n","import React from \"react\";\nimport type { PossibleVulcanComponents } from \"./typings\";\nimport { Dummy } from \"./Dummy\";\n\nconst dummyHandler = {\n get(target, property) {\n //console.log(\"target\", property);\n if (property in target) {\n return target[property];\n }\n console.log(\n `Property ${property} not in possible Vulcan components, returning Dummy`\n );\n return Dummy;\n },\n};\n// We need this to shut TypeScript up\n// You should use the Provider to get the right default values\nexport const VulcanComponentsContext =\n React.createContext<PossibleVulcanComponents>(\n // @ts-ignore\n new Proxy(\n {\n __not_initialized: true,\n },\n dummyHandler\n )\n );\n\n// Needed to guarantee that the exports stays named\nVulcanComponentsContext.displayName = \"VulcanComponentsContext\";\n","import React from \"react\";\nexport interface DummyProps {}\n\nexport const Dummy = () => (\n <span>\n You have not setup VulcanComponentsProvider. Please add following code in\n your app:{\" \"}\n <code>{`import { VulcanComponentsProvider } from \"@vulcanjs/react-ui\"; const YourApp = <VulcanComponentsProvider>{/* your app */}</VulcanComponentsProvider>;}`}</code>\n </span>\n);\n","import { useContext } from \"react\";\nimport { VulcanCurrentUserContext } from \"./Context\";\n\nexport const VulcanCurrentUserConsumer = VulcanCurrentUserContext.Consumer;\n\nexport const useVulcanCurrentUser = () => useContext(VulcanCurrentUserContext);\n","import React from \"react\";\nimport type { VulcanUser } from \"@vulcanjs/permissions\";\n\nexport type VulcanCurrentUserContextType =\n | { currentUser: VulcanUser | null; loading: false }\n | { loading: true; currentUser: any };\n// We need this to shut TypeScript up\n// You should use the Provider to get the right default values\nexport const VulcanCurrentUserContext =\n React.createContext<VulcanCurrentUserContextType>({\n currentUser: null,\n loading: false,\n });\n","export * from \"./Form\";\nexport * from \"./typings\";\n","/*\n\nMain form component.\n\nThis component expects:\n\n### All Forms:\n\n- collection\n- currentUser\n- client (Apollo client)\n\n*/\n\nimport React, { useEffect, useRef, useState } from \"react\";\nimport { runCallbacks, getErrors } from \"@vulcanjs/core\";\nimport { useIntlContext } from \"@vulcanjs/react-i18n\";\nimport { removeProperty } from \"@vulcanjs/utils\";\nimport _filter from \"lodash/filter.js\";\nimport cloneDeep from \"lodash/cloneDeep.js\";\nimport compact from \"lodash/compact.js\";\nimport get from \"lodash/get.js\";\nimport isObject from \"lodash/isObject.js\";\nimport mapValues from \"lodash/mapValues.js\";\nimport merge from \"lodash/merge.js\";\nimport omit from \"lodash/omit.js\";\nimport omitBy from \"lodash/omitBy.js\";\nimport pick from \"lodash/pick.js\";\nimport pickBy from \"lodash/pickBy.js\";\nimport set from \"lodash/set.js\";\nimport unset from \"lodash/unset.js\";\nimport update from \"lodash/update.js\";\nimport without from \"lodash/without.js\";\nimport isEmpty from \"lodash/isEmpty.js\";\nimport type { FormLayoutProps } from \"../../elements/FormLayout\";\nimport type { FormSubmitProps } from \"../../elements/FormSubmit\";\n\nimport {\n convertSchema,\n getEditableFields,\n getInsertableFields,\n} from \"../../utils/schema_utils\";\nimport { isEmptyValue } from \"../../utils/utils\";\nimport { getParentPath } from \"../../utils/path_utils\";\n// import withCollectionProps from \"./withCollectionProps\";\nimport { FormContext } from \"../FormContext\";\nimport { getFieldGroups, getFieldNames, getLabel } from \"./fields\";\nimport { isNotSameDocument } from \"./utils\";\nimport { useWarnOnUnsaved } from \"../../hooks/useWarnOnUnsaved\";\nimport { useVulcanComponents } from \"../../../VulcanComponents/Consumer\";\n\nimport type { FormType } from \"../../typings\";\nimport {\n CreateDocumentResult,\n FormProps,\n FormState,\n UpdateDocumentResult,\n} from \"./typings\";\nimport { MutationResult } from \"@apollo/client\";\n\n// props that should trigger a form reset\nconst RESET_PROPS = [\n \"model\",\n // \"collection\",\n // \"collectionName\",\n \"document\",\n \"schema\",\n \"currentUser\",\n \"fields\",\n \"removeFields\",\n \"prefilledProps\", // TODO: prefilledProps should be merged instead?\n];\n\nconst compactParent = (object, path) => {\n const parentPath = getParentPath(path);\n\n // note: we only want to compact arrays, not objects\n const compactIfArray = (x) => (Array.isArray(x) ? compact(x) : x);\n\n update(object, parentPath, compactIfArray);\n};\n\nconst getDefaultValues = (convertedSchema) => {\n // TODO: make this work with nested schemas, too\n return pickBy(\n mapValues(convertedSchema, (field) => field.defaultValue),\n (value) => value\n );\n};\n\nconst compactObject = (o) => omitBy(o, (f) => f === null || f === undefined);\n\nconst getInitialStateFromProps = (nextProps: FormProps): FormState => {\n const schema = nextProps.schema || nextProps.model.schema;\n const convertedSchema = convertSchema(schema);\n const formType: FormType = nextProps.document ? \"edit\" : \"new\";\n // for new document forms, add default values to initial document\n const defaultValues =\n formType === \"new\" ? getDefaultValues(convertedSchema) : {};\n // note: we remove null/undefined values from the loaded document so they don't overwrite possible prefilledProps\n const initialDocument = merge(\n {},\n defaultValues,\n nextProps.prefilledProps,\n compactObject(nextProps.document)\n );\n\n //if minCount is specified, go ahead and create empty nested documents\n Object.keys(convertedSchema).forEach((key) => {\n let minCount = convertedSchema[key].minCount;\n if (minCount) {\n initialDocument[key] = initialDocument[key] || [];\n while (initialDocument[key].length < minCount)\n initialDocument[key].push({});\n }\n });\n\n // remove all instances of the `__typename` property from document\n removeProperty(initialDocument, \"__typename\");\n\n return {\n disabled: nextProps.disabled,\n errors: [],\n deletedValues: [],\n currentValues: {},\n originalSchema: convertSchema(schema, { removeArrays: false }),\n // convert SimpleSchema schema into JSON object\n schema: convertedSchema,\n // Also store all field schemas (including nested schemas) in a flat structure\n flatSchema: convertSchema(schema, { flatten: true }),\n // the initial document passed as props\n initialDocument,\n // initialize the current document to be the same as the initial document\n currentDocument: initialDocument,\n };\n};\n\nconst getChildrenProps = (\n props: FormProps,\n state: Pick<FormState, \"disabled\" | \"currentDocument\">,\n options: { formType: FormType },\n // TODO: that belongs to the context instead\n callbacks: { deleteDocument: Function }\n): {\n formLayoutProps: FormLayoutProps;\n formGroupProps: Function;\n commonProps: any;\n formSubmitProps: FormSubmitProps;\n} => {\n const {\n currentUser,\n repeatErrors,\n submitLabel,\n cancelLabel,\n revertLabel,\n cancelCallback,\n revertCallback,\n id,\n model,\n prefilledProps,\n itemProperties,\n contextName,\n showRemove,\n showDelete,\n } = props;\n const { disabled, currentDocument } = state;\n const { formType } = options;\n const { deleteDocument } = callbacks;\n const commonProps = {\n document: currentDocument,\n formType,\n currentUser,\n disabled,\n prefilledProps,\n itemProperties,\n contextName,\n };\n\n const docClassName = `document-${formType}`;\n const modelName = model.name.toLowerCase();\n const formProps = {\n className: `${docClassName} ${docClassName}-${modelName}`,\n id: id,\n // It's the form element responsibility to get submitForm from context\n // onSubmit: this.submitForm(formType),\n // TODO: update to useRef\n //ref: (e) => {\n // this.form = e;\n //},\n };\n\n const formGroupProps = (group) => ({\n key: group.name,\n ...group,\n group: omit(group, [\"fields\"]),\n ...commonProps,\n });\n\n const formSubmitProps = {\n model,\n currentUser,\n submitLabel,\n cancelLabel,\n revertLabel,\n cancelCallback,\n revertCallback,\n document: currentDocument,\n // TODO: should probably be passed through context\n deleteDocument:\n (formType === \"edit\" && showRemove && showDelete && deleteDocument) ||\n null,\n };\n\n const formLayoutProps = {\n formProps: formProps,\n repeatErrors: repeatErrors,\n submitProps: formSubmitProps,\n commonProps,\n };\n return {\n commonProps,\n formSubmitProps,\n formGroupProps,\n formLayoutProps,\n };\n};\n\n// component form until we go stateless\nconst FormWarnUnsaved = ({\n isChanged,\n warnUnsavedChanges,\n children,\n}: {\n isChanged: boolean;\n warnUnsavedChanges?: boolean;\n children: React.ReactNode;\n}) => {\n useWarnOnUnsaved({\n isChanged,\n warnUnsavedChanges,\n });\n return <>{children}</>;\n};\n\n/*\n\n Like getDocument, but cross-reference with getFieldNames()\n to only return fields that actually need to be submitted\n\n Also remove any deleted values.\n\n */\nconst getData = (\n customArgs,\n props: FormProps,\n state: Pick<FormState, \"currentDocument\" | \"deletedValues\">,\n // previously from \"this\" object\n { submitFormCallbacks, form }: any\n) => {\n const { currentDocument } = state;\n const { model, prefilledProps } = props;\n // we want to keep prefilled data even for hidden/removed fields\n let data = prefilledProps || {};\n\n // omit prefilled props for nested fields\n data = omitBy(data, (value, key) => key.endsWith(\".$\"));\n\n const args = {\n schema: model.schema,\n excludeRemovedFields: false,\n excludeHiddenFields: false,\n replaceIntlFields: true,\n addExtraFields: false,\n ...customArgs,\n };\n\n // only keep relevant fields\n // for intl fields, make sure we look in foo_intl and not foo\n const fields = getFieldNames(props, currentDocument, args);\n data = { ...data, ...pick(currentDocument, ...fields) };\n\n // compact deleted values\n state.deletedValues.forEach((path) => {\n if (path.includes(\".\")) {\n /*\n\n If deleted field is a nested field, nested array, or nested array item, try to compact its parent array\n\n - Nested field: 'address.city'\n - Nested array: 'addresses.1'\n - Nested array item: 'addresses.1.city'\n\n */\n compactParent(data, path);\n }\n });\n\n // run data object through submitForm callbacks\n data = runCallbacks({\n callbacks: submitFormCallbacks,\n iterator: data,\n args: [\n {\n /*form: this*/\n },\n ],\n });\n\n return data;\n};\n\nexport const Form = (props: FormProps) => {\n const { initCallback, createDocument, updateDocument, deleteDocument } =\n props;\n const initialState = getInitialStateFromProps(props);\n const { schema, originalSchema, flatSchema, initialDocument } = initialState;\n const isFirstRender = useRef(true);\n useEffect(() => {\n if (isFirstRender.current) {\n isFirstRender.current = false; // toggle flag after first render/mounting\n return;\n }\n if (initCallback) initCallback(initialState.currentDocument);\n }, [initCallback]);\n const defaultProps = {\n layout: \"horizontal\",\n prefilledProps: {},\n repeatErrors: false,\n showRemove: true,\n showDelete: true,\n };\n const allProps = { ...defaultProps, ...props };\n const defaultValues = {};\n const submitFormCallbacks: Array<Function> = [];\n const successFormCallbacks: Array<Function> = [];\n const failureFormCallbacks: Array<Function> = [];\n const intl = useIntlContext();\n\n // --------------------------------------------------------------------- //\n // ------------------------------- Errors ------------------------------ //\n // --------------------------------------------------------------------- //\n\n /*\n\n Add error to form state\n\n Errors can have the following properties:\n - id: used as an internationalization key, for example `errors.required`\n - path: for field-specific errors, the path of the field with the issue\n - properties: additional data. Will be passed to vulcan-i18n as values\n - message: if id cannot be used as i81n key, message will be used\n\n */\n const [errors, setErrors] = useState<Array<any>>([]);\n const throwError = (error) => {\n let formErrors = getErrors(error);\n\n // eslint-disable-next-line no-console\n console.log(formErrors);\n\n // add error(s) to state\n setErrors((prevErrors) => [...prevErrors, ...formErrors]);\n };\n\n /*\n\n Clear errors for a field\n\n */\n const clearFieldErrors = (path) => {\n setErrors((prevErrors) =>\n prevErrors.filter((error) => error.path !== path)\n );\n };\n\n // --------------------------------------------------------------------- //\n // ------------------------------- Context ----------------------------- //\n // --------------------------------------------------------------------- //\n\n const [deletedValues, setDeletedValues] = useState<Array<any>>([]);\n\n // add something to deleted values\n const addToDeletedValues = (name) => {\n setDeletedValues((prevDeletedValues) => [...prevDeletedValues, name]);\n };\n\n interface Callbacks {\n submitFormCallbacks: Array<any>;\n successFormCallbacks: Array<any>;\n failureFormCallbacks: Array<any>;\n }\n const [callbacks, setCallbacks] = useState<Callbacks>({\n submitFormCallbacks: [],\n successFormCallbacks: [],\n failureFormCallbacks: [],\n });\n // add a callback to the form submission\n const addToSubmitForm = (callback) => {\n setCallbacks((cbs) => ({\n ...cbs,\n // submitFormCallbacks: [...cbs.submitFormCallbacks, callback],\n }));\n };\n\n // add a callback to form submission success\n const addToSuccessForm = (callback) => {\n setCallbacks((cbs) => ({\n ...cbs,\n successFormCallbacks: [...cbs.successFormCallbacks, callback],\n }));\n };\n\n // add a callback to form submission failure\n const addToFailureForm = (callback) => {\n setCallbacks((cbs) => ({\n ...cbs,\n failureFormCallbacks: [...cbs.failureFormCallbacks, callback],\n }));\n };\n\n const clearFormCallbacks = () => {\n setCallbacks({\n submitFormCallbacks: [],\n successFormCallbacks: [],\n failureFormCallbacks: [],\n });\n };\n\n /*\n setFormState = (fn) => {\n this.setState(fn);\n };\n */\n\n const [currentValues, setCurrentValues] = useState<Object>({});\n\n const submitFormContext = (formType: FormType) => (event /*newValues*/) => {\n /*\n TODO: previously this callback was updating the current values with new values after this call\n Need to check how this worked in Vulcan initially\n setCurrentValues((prevCurrentValues) => ({\n ...prevCurrentValues,\n ...newValues,\n }));\n */\n // TODO: previously, this was using a callback from setCurrentValues\n // this needs to be rearchitectured to work without, will need some check\n // https://stackoverflow.com/questions/56247433/how-to-use-setstate-callback-on-react-hooks\n submitForm(formType)(event);\n };\n\n // --------------------------------------------------------------------- //\n // ------------------------------ Lifecycle ---------------------------- //\n // --------------------------------------------------------------------- //\n\n /*\n\n When props change, reinitialize the form state\n Triggered only for data related props (collection, document, currentUser etc.)\n\n @see https://reactjs.org/blog/2018/06/07/you-probably-dont-need-derived-state.html\n\n */\n /*\n UNSAFE_componentWillReceiveProps(nextProps) {\n const needReset = !!RESET_PROPS.find(\n (prop) => !isEqual(this.props[prop], nextProps[prop])\n );\n if (needReset) {\n const newState = getInitialStateFromProps(nextProps);\n this.setState(newState);\n if (nextProps.initCallback)\n nextProps.initCallback(newState.currentDocument);\n }\n }*/\n\n const [currentDocument, setCurrentDocument] = useState<{\n title?: string;\n _id?: string;\n name?: string;\n }>(initialDocument);\n\n /*\n\n Manually update the current values of one or more fields(i.e. on change or blur).\n\n */\n const updateCurrentValues = (newValues, options: { mode?: string } = {}) => {\n // default to overwriting old value with new\n const { mode = \"overwrite\" } = options;\n const { changeCallback } = props;\n\n // keep the previous ones and extend (with possible replacement) with new ones\n // keep only the relevant properties\n const newState = {\n currentValues: cloneDeep(currentValues),\n currentDocument: cloneDeep(currentDocument),\n deletedValues: cloneDeep(deletedValues),\n };\n\n Object.keys(newValues).forEach((key) => {\n const path = key;\n let value = newValues[key];\n\n if (isEmptyValue(value)) {\n // delete value\n unset(newState.currentValues, path);\n set(newState.currentDocument, path, null);\n newState.deletedValues = [...newState.deletedValues, path];\n } else {\n // 1. update currentValues\n set(newState.currentValues, path, value);\n\n // 2. update currentDocument\n // For arrays and objects, give option to merge instead of overwrite\n if (mode === \"merge\" && (Array.isArray(value) || isObject(value))) {\n const oldValue = get(newState.currentDocument, path);\n set(newState.currentDocument, path, merge(oldValue, value));\n } else {\n set(newState.currentDocument, path, value);\n }\n\n // 3. in case value had previously been deleted, \"undelete\" it\n newState.deletedValues = without(newState.deletedValues, path);\n }\n });\n if (changeCallback) changeCallback(newState.currentDocument);\n\n // TODO: prefer a reducer\n setCurrentValues(newState.currentValues);\n setCurrentDocument(newState.currentDocument);\n setDeletedValues(newState.deletedValues);\n };\n\n /*\n\n Refetch the document from the database (in case it was updated by another process or to reset the form)\n\n */\n const refetchForm = () => {\n if (props.refetch) {\n props.refetch();\n }\n };\n\n const [disabled, setDisabled] = useState<boolean>(false); // TODO\n const [success, setSuccess] = useState<boolean>(false); // TODO\n /**\n * Clears form errors and values.\n *\n * @example Clear form\n * // form will be fully emptied, with exception of prefilled values\n * clearForm({ document: {} });\n *\n * @example Reset/revert form\n * // form will be reverted to its initial state\n * clearForm();\n *\n * @example Clear with new values\n * // form will be cleared but initialized with the new document\n * const document = {\n * // ... some values\n * };\n * clearForm({ document });\n *\n * @param {Object=} options\n * @param {Object=} options.document\n * Document to use as new initial document when values are cleared instead of\n * the existing one. Note that prefilled props will be merged\n */\n const clearForm = (options: { document?: any } = {}) => {\n const { document: optionsDocument } = options;\n const document = optionsDocument\n ? merge({}, props.prefilledProps, optionsDocument)\n : null;\n // TODO: prefer a reducer\n setErrors([]);\n setCurrentValues({});\n setDeletedValues([]);\n setCurrentDocument(document || initialDocument);\n // setInitialDocument(document || initialDocument);\n setDisabled(false);\n };\n\n const newMutationSuccessCallback = function <TModel = Object>(\n result: CreateDocumentResult<TModel>\n ) {\n mutationSuccessCallback(result, \"new\");\n };\n\n const editMutationSuccessCallback = function <TModel = Object>(\n result: UpdateDocumentResult<TModel>\n ) {\n mutationSuccessCallback(result, \"edit\");\n };\n\n const formRef = useRef(null);\n const mutationSuccessCallback = function <TModel = Object>(\n // must be called only on valid results\n result: CreateDocumentResult<TModel>,\n mutationType: FormType\n ) {\n // TODO: use a reducer\n setDisabled(false);\n setSuccess(true);\n // for new mutation, run refetch function if it exists\n // TODO: the create mutation should already return the freshest value, do we really need that?\n // instead we might want to update currentResult with the result of the creation\n if (mutationType === \"new\") refetchForm();\n let { document } = result;\n\n // call the clear form method (i.e. trigger setState) only if the form has not been unmounted\n // (we are in an async callback, everything can happen!)\n // TODO: this should rely on a ref\n if (formRef.current) {\n clearForm({\n document: mutationType === \"edit\" ? document : undefined,\n });\n }\n\n // run document through mutation success callbacks\n document = runCallbacks({\n callbacks: successFormCallbacks,\n iterator: document,\n args: [{ form: formRef.current }],\n });\n\n // run success callback if it exists\n if (props.successCallback) props.successCallback(document, { form: this });\n };\n\n // catch graphql errors\n const mutationErrorCallback = (document, error) => {\n setDisabled(false);\n\n // eslint-disable-next-line no-console\n console.error(\"// graphQL Error\");\n // eslint-disable-next-line no-console\n console.error(error);\n\n // run mutation failure callbacks on error, we do not allow the callbacks to change the error\n runCallbacks({\n callbacks: failureFormCallbacks,\n iterator: error,\n args: [{ error, form: formRef.current }],\n });\n\n if (!isEmpty(error)) {\n // add error to state\n throwError(error);\n }\n\n // run error callback if it exists\n if (props.errorCallback)\n props.errorCallback(document, error, { form: this });\n\n // scroll back up to show error messages\n // TODO: migrate this to scroll on top of the form\n //Utils.scrollIntoView(\".flash-message\");\n };\n\n /*\n\n Submit form handler\n\n */\n const submitForm = (formType: FormType) => async (event?: Event) => {\n event && event.preventDefault();\n event && event.stopPropagation();\n\n const { contextName } = props;\n\n // if form is disabled (there is already a submit handler running) don't do anything\n if (disabled) {\n return;\n }\n\n // clear errors and disable form while it's submitting\n setErrors([]);\n setDisabled(true);\n\n // complete the data with values from custom components\n // note: it follows the same logic as SmartForm's getDocument method\n let data = getData(\n { replaceIntlFields: true, addExtraFields: false, mutableFields },\n props,\n {\n currentDocument,\n deletedValues,\n },\n { form: formRef.current, submitFormCallbacks }\n );\n\n // if there's a submit callback, run it\n if (props.submitCallback) {\n data = props.submitCallback(data) || data;\n }\n\n if (formType === \"new\") {\n // create document form\n try {\n const result = await createDocument({\n input: {\n data,\n contextName,\n },\n });\n if (result.errors?.length) {\n // TODO: previously got from meta, we could have more than 1 error\n mutationErrorCallback(document, result.errors[0]);\n } else {\n newMutationSuccessCallback(result);\n }\n } catch (error) {\n mutationErrorCallback(document, error);\n }\n } else {\n // update document form\n try {\n const documentId = currentDocument._id;\n const result = await updateDocument({\n input: {\n id: documentId,\n data,\n contextName,\n },\n });\n // TODO: handle more than 1 error\n if (result.errors?.length) {\n mutationErrorCallback(document, result.errors[0]);\n } else {\n editMutationSuccessCallback(result);\n }\n } catch (error) {\n mutationErrorCallback(document, error);\n }\n }\n };\n\n /*\n\n Delete document handler\n\n */\n const deleteDocumentWithConfirm = () => {\n const document = currentDocument;\n const documentId = props.document._id;\n const documentTitle = document.title || document.name || \"\";\n\n const deleteDocumentConfirm = intl.formatMessage(\n { id: \"forms.delete_confirm\" },\n { title: documentTitle }\n );\n\n if (window.confirm(deleteDocumentConfirm)) {\n deleteDocument({ input: { id: documentId } })\n .then((mutationResult) => {\n // the mutation result looks like {data:{collectionRemove: null}} if succeeded\n if (props.removeSuccessCallback)\n props.removeSuccessCallback({ documentId, documentTitle });\n refetchForm();\n })\n .catch((error) => {\n // eslint-disable-next-line no-console\n console.log(error);\n });\n }\n };\n\n // --------------------------------------------------------------------- //\n // ------------------------- Props to Pass ----------------------------- //\n // --------------------------------------------------------------------- //\n\n // --------------------------------------------------------------------- //\n // ----------------------------- Render -------------------------------- //\n // --------------------------------------------------------------------- //\n\n const { successComponent, document, currentUser, model, warnUnsavedChanges } =\n props;\n const FormComponents = useVulcanComponents();\n\n const formType: \"edit\" | \"new\" = document ? \"edit\" : \"new\";\n\n // Fields computation\n const mutableFields =\n formType === \"edit\"\n ? getEditableFields(schema, currentUser, initialDocument)\n : getInsertableFields(schema, currentUser);\n\n const { formLayoutProps, formGroupProps } = getChildrenProps(\n props,\n { disabled, currentDocument },\n {\n formType,\n },\n {\n deleteDocument: deleteDocumentWithConfirm,\n }\n );\n const isChanged = isNotSameDocument(initialDocument, currentDocument);\n\n return success && successComponent ? (\n successComponent\n ) : (\n <FormWarnUnsaved\n isChanged={isChanged}\n warnUnsavedChanges={warnUnsavedChanges}\n >\n <FormContext.Provider\n value={{\n throwError,\n clearForm,\n refetchForm,\n isChanged,\n submitForm: submitFormContext(formType), //Change in name because we already have a function\n // called submitForm, but no reason for the user to know\n // about that\n addToDeletedValues: addToDeletedValues,\n updateCurrentValues: updateCurrentValues,\n getDocument: () => currentDocument,\n getLabel: (fieldName, fieldLocale) =>\n getLabel(model, flatSchema, intl, fieldName, fieldLocale),\n initialDocument: initialDocument,\n // TODO BAD: check where used\n //setFormState: this.setFormState,\n addToSubmitForm,\n addToSuccessForm,\n addToFailureForm,\n clearFormCallbacks,\n errors,\n currentValues,\n deletedValues,\n clearFieldErrors,\n }}\n >\n <FormComponents.FormLayout {...formLayoutProps}>\n {getFieldGroups(\n props,\n {\n currentDocument,\n schema,\n flatSchema,\n originalSchema,\n },\n intl,\n mutableFields,\n intl.formatMessage\n ).map((group, i) => (\n <FormComponents.FormGroup key={i} {...formGroupProps(group)} />\n ))}\n </FormComponents.FormLayout>\n </FormContext.Provider>\n </FormWarnUnsaved>\n );\n};\n\n// Mutation that yield a success result\ntype SuccessfulMutationResult<TData = Object> = MutationResult<TData> & {\n data: TData;\n};\n/**\n * Typeguared to allow considering the request as successful\n */\nconst isSuccessful = function <T = any>(\n result: MutationResult<T> | undefined\n): result is SuccessfulMutationResult<T> {\n return !!result?.data;\n};\n\nexport default Form;\n","/*\n * Schema converter/getters\n */\nimport { canCreateField, canUpdateField } from \"@vulcanjs/permissions\";\nimport { VulcanFieldSchema, VulcanSchema } from \"@vulcanjs/schema\";\nimport { getFieldType } from \"./utils\";\n\n/* getters */\n// filter out fields with \".\" or \"$\"\nexport const getValidFields = (schema) => {\n return Object.keys(schema).filter(\n (fieldName) => !fieldName.includes(\"$\") && !fieldName.includes(\".\")\n );\n};\n\n/*\n\nConvert a nested SimpleSchema schema into a JSON object\nIf flatten = true, will create a flat object instead of nested tree\n\n/* permissions */\n\n/**\n * @method Mongo.Collection.getInsertableFields\n * Get an array of all fields editable by a specific user for a given collection\n * @param {Object} user – the user for which to check field permissions\n */\nexport const getInsertableFields = function (schema, user) {\n const fields = Object.keys(schema).filter(function (fieldName) {\n var field = schema[fieldName];\n return canCreateField(user, field);\n });\n return fields;\n};\n\n/**\n * @method Mongo.Collection.getEditableFields\n * Get an array of all fields editable by a specific user for a given collection (and optionally document)\n * @param {Object} user – the user for which to check field permissions\n */\nexport const getEditableFields = function (schema, user, document) {\n const fields = Object.keys(schema).filter(function (fieldName) {\n var field = schema[fieldName];\n return canUpdateField(user, field, document);\n });\n return fields;\n};\n\nconst isNestedSchema = (schema: any): schema is VulcanSchema => {\n return typeof schema === \"object\";\n};\n\n/**\n * Vulcan Schema => Form Schema\n * TODO: type this better\n * @param schema\n * @param options\n * @returns\n */\nexport const convertSchema = (\n schema: VulcanSchema,\n options: { flatten?: boolean; removeArrays?: boolean } = {}\n) => {\n const { flatten = false, removeArrays = true } = options;\n\n let jsonSchema = {};\n\n Object.keys(schema).forEach((fieldName) => {\n // exclude array fields\n if (removeArrays && fieldName.includes(\"$\")) {\n return;\n }\n\n // extract schema\n jsonSchema[fieldName] = getFieldSchema(fieldName, schema);\n\n // check for existence of nested field\n // and get its schema if possible or its type otherwise\n const subSchemaOrType = getNestedFieldSchemaOrType(fieldName, schema);\n if (subSchemaOrType) {\n // remember the subschema if it exists, allow to customize labels for each group of items for arrays of objects\n jsonSchema[fieldName].arrayFieldSchema = getFieldSchema(\n `${fieldName}.$`,\n schema\n );\n\n // nested schema can be a field schema ({type, canRead, etc.}) (convertedSchema will be null)\n // or a schema on its own with subfields (convertedSchema will return smth)\n if (isNestedSchema(subSchemaOrType)) {\n // call convertSchema recursively on the subSchema\n const convertedSubSchema = convertSchema(subSchemaOrType, options);\n // subSchema is a full schema with multiple fields (eg array of objects)\n if (flatten) {\n jsonSchema = { ...jsonSchema, ...convertedSubSchema };\n } else {\n jsonSchema[fieldName].schema = convertedSubSchema;\n }\n } else {\n // subSchema is a simple field in this case (eg array of numbers)\n jsonSchema[fieldName].isSimpleArrayField = true; //getFieldSchema(`${fieldName}.$`, schema);\n }\n }\n });\n return jsonSchema;\n};\n\n/*\n\nGet a JSON object representing a field's schema\n\n*/\nexport const getFieldSchema = (fieldName: string, schema: VulcanSchema) => {\n let fieldSchema = {};\n schemaProperties.forEach((property) => {\n const propertyValue = schema[fieldName]?.[property];\n if (propertyValue) {\n fieldSchema[property] = propertyValue;\n }\n });\n return fieldSchema;\n};\n\n// type is an array due to the possibility of using SimpleSchema.oneOf\n// right now we support only fields with one type\nexport const getSchemaType = (fieldSchema: VulcanFieldSchema) =>\n getFieldType(fieldSchema);\n\nconst getArrayNestedSchema = (fieldName: string, schema: VulcanSchema) => {\n const arrayItemSchema = schema[`${fieldName}.$`];\n const nestedSchema = arrayItemSchema && getSchemaType(arrayItemSchema);\n return nestedSchema;\n};\n\n// TODO: not 100% it's valid with current implementation\nconst isNestedSchemaField = (fieldSchema: VulcanFieldSchema) => {\n const fieldType = getSchemaType(fieldSchema);\n return fieldType && typeof fieldType === \"object\";\n};\nconst getObjectNestedSchema = (fieldName: string, schema: VulcanSchema) => {\n const fieldSchema = schema[fieldName];\n if (!isNestedSchemaField(fieldSchema)) return null;\n const nestedSchema = fieldSchema && getSchemaType(fieldSchema);\n return nestedSchema;\n};\n/*\n\nGiven an array field, get its nested schema\nIf the field is not an object, this will return the subfield type instead\n*/\nexport const getNestedFieldSchemaOrType = (fieldName, schema) => {\n const arrayItemSchema = getArrayNestedSchema(fieldName, schema);\n if (!arrayItemSchema) {\n // look for an object schema\n const objectItemSchema = getObjectNestedSchema(fieldName, schema);\n // no schema was found\n if (!objectItemSchema) return null;\n return objectItemSchema;\n }\n return arrayItemSchema;\n};\n\nexport const schemaProperties = [\n \"type\",\n \"label\",\n \"optional\",\n \"required\",\n \"min\",\n \"max\",\n \"exclusiveMin\",\n \"exclusiveMax\",\n \"minCount\",\n \"maxCount\",\n \"allowedValues\",\n \"regEx\",\n \"blackbox\",\n \"trim\",\n \"custom\",\n \"defaultValue\",\n \"autoValue\",\n \"hidden\", // hidden: true means the field is never shown in a form no matter what\n \"mustComplete\", // mustComplete: true means the field is required to have a complete profile\n \"form\", // form placeholder\n \"inputProperties\", // form placeholder\n \"itemProperties\",\n \"control\", // SmartForm control (String or React component)\n \"input\", // SmartForm control (String or React component)\n \"autoform\", // legacy form placeholder; backward compatibility (not used anymore)\n \"order\", // position in the form\n \"group\", // form fieldset group\n \"onCreate\", // field insert callback\n \"onUpdate\", // field edit callback\n \"onDelete\", // field remove callback\n \"onInsert\", // OpenCRUD backwards compatibility\n \"onEdit\", // OpenCRUD backwards compatibility\n \"onRemove\", // OpenCRUD backwards compatibility\n \"canRead\",\n \"canCreate\",\n \"canUpdate\",\n \"viewableBy\", // OpenCRUD backwards compatibility\n \"insertableBy\", // OpenCRUD backwards compatibility\n \"editableBy\", // OpenCRUD backwards compatibility\n \"resolveAs\",\n \"searchable\",\n \"description\",\n \"beforeComponent\",\n \"afterComponent\",\n \"placeholder\",\n \"options\",\n \"query\",\n \"queryWaitsForValue\",\n \"autocompleteQuery\",\n \"fieldProperties\",\n \"intl\",\n \"intlId\",\n];\n\nexport const formProperties = [\n \"optional\",\n \"required\",\n \"min\",\n \"max\",\n \"exclusiveMin\",\n \"exclusiveMax\",\n \"minCount\",\n \"maxCount\",\n \"allowedValues\",\n \"regEx\",\n \"blackbox\",\n \"trim\",\n \"custom\",\n \"defaultValue\",\n \"autoValue\",\n \"mustComplete\", // mustComplete: true means the field is required to have a complete profile\n \"form\", // form placeholder\n \"inputProperties\", // form placeholder\n \"itemProperties\",\n \"control\", // SmartForm control (String or React component)\n \"input\", // SmartForm control (String or React component)\n \"order\", // position in the form\n \"group\", // form fieldset group\n \"description\",\n \"beforeComponent\",\n \"afterComponent\",\n \"placeholder\",\n \"options\",\n \"query\",\n \"queryWaitsForValue\",\n \"autocompleteQuery\",\n \"fieldProperties\",\n];\n","import merge from \"lodash/merge.js\";\nimport find from \"lodash/find.js\";\nimport isPlainObject from \"lodash/isPlainObject.js\";\nimport set from \"lodash/set.js\";\nimport size from \"lodash/size.js\";\n\nimport { removePrefix, filterPathsByPrefix } from \"./path_utils\";\nimport { VulcanFieldSchema } from \"@vulcanjs/schema\";\n\n// add support for nested properties\nexport const deepValue = function (obj, path) {\n const pathArray = path.split(\".\");\n\n for (var i = 0; i < pathArray.length; i++) {\n obj = obj[pathArray[i]];\n }\n\n return obj;\n};\n\n// see http://stackoverflow.com/questions/19098797/fastest-way-to-flatten-un-flatten-nested-json-objects\nexport const flatten = function (data) {\n var result = {};\n function recurse(cur, prop) {\n if (Object.prototype.toString.call(cur) !== \"[object Object]\") {\n result[prop] = cur;\n } else if (Array.isArray(cur)) {\n for (var i = 0, l = cur.length; i < l; i++)\n recurse(cur[i], prop + \"[\" + i + \"]\");\n if (l == 0) result[prop] = [];\n } else {\n var isEmpty = true;\n for (var p in cur) {\n isEmpty = false;\n recurse(cur[p], prop ? prop + \".\" + p : p);\n }\n if (isEmpty && prop) result[prop] = {};\n }\n }\n recurse(data, \"\");\n return result;\n};\n\nexport const isEmptyValue = (value) =>\n typeof value === \"undefined\" ||\n value === null ||\n value === \"\" ||\n (Array.isArray(value) && value.length === 0);\n\n/**\n * Merges values. It takes into account the current, original and deleted values,\n * and the merge produces the proper type for simple objects or arrays.\n *\n * @param {Object} props\n * Form component props. Only specific properties for this function are documented.\n * @param {*} props.currentValue\n * Current value of the field\n * @param {*} props.documentValue\n * Original value of the field\n * @return {*|undefined}\n * Merged value or undefined if no merge was performed\n */\nexport const mergeValue = ({\n currentValue,\n documentValue,\n deletedValues: deletedFields,\n path,\n locale,\n datatype,\n}) => {\n if (locale) {\n // note: intl fields are of type Object but should be treated as Strings\n return currentValue || documentValue || \"\";\n }\n\n // note: retrieve nested deleted values is performed here to avoid skipping\n // the merge in case the current field is not in `currentValues` but a nested\n // property has been removed directly by path\n const deletedValues = getNestedDeletedValues(path, deletedFields);\n const hasDeletedValues = !!size(deletedValues);\n if (\n (Array.isArray(currentValue) || hasDeletedValues) &&\n find(datatype, [\"type\", Array])\n ) {\n return merge([], documentValue, currentValue, deletedValues);\n } else if (\n (isPlainObject(currentValue) || hasDeletedValues) &&\n find(datatype, [\"type\", Object])\n ) {\n return merge({}, documentValue, currentValue, deletedValues);\n }\n return undefined;\n};\n\n/**\n * Converts a list of field names to an object of deleted values.\n *\n * @param {string[]|Object.<string|string>} deletedFields\n * List of deleted field names or paths\n * @param {Object|Array=} accumulator={}\n * Value to reduce the values to\n * @return {Object|Array}\n * Deleted values, with the structure defined by taking the received deleted\n * fields as paths\n * @example\n * const deletedFields = [\n * 'field.subField',\n * 'field.subFieldArray[0]',\n * 'fieldArray[0]',\n * 'fieldArray[2].name',\n * ];\n * getNestedDeletedValues(deletedFields);\n * // => { 'field': { 'subField': null, 'subFieldArray': [null] }, 'fieldArray': [null, undefined, { name: null } }\n */\nexport const getDeletedValues = (deletedFields, accumulator = {}) =>\n deletedFields.reduce(\n (deletedValues, path) => set(deletedValues, path, null),\n accumulator\n );\n\n/**\n * Filters the given field names by prefix, removes it from each one of them\n * and convert the list to an object of deleted values.\n *\n * @param {string=} prefix\n * Prefix to filter and remove from deleted fields\n * @param {string[]|Object.<string|string>} deletedFields\n * List of deleted field names or paths\n * @param {Object|Array=} accumulator={}\n * Value to reduce the values to\n * @return {Object.<string, null>}\n * Object keyed with the given deleted fields, valued with `null`\n * @example\n * const deletedFields = [\n * 'field.subField',\n * 'field.subFieldArray[0]',\n * 'fieldArray[0]',\n * 'fieldArray[2].name',\n * ];\n * getNestedDeletedValues('field', deletedFields);\n * // => { 'subField': null, 'subFieldArray': [null] }\n * getNestedDeletedValues('fieldArray', deletedFields);\n * // => { '0': null, '2': { 'name': null } }\n * getNestedDeletedValues('fieldArray', deletedFields, []);\n * // => [null, undefined, { 'name': null } ]\n */\nexport const getNestedDeletedValues = (\n prefix,\n deletedFields,\n accumulator = {}\n) =>\n getDeletedValues(\n removePrefix(prefix, filterPathsByPrefix(prefix, deletedFields)),\n accumulator\n );\n\n//TODO: check if it still works as expected\n// previously was dataType[0].type\nexport const getFieldType = (fieldSchema: VulcanFieldSchema) =>\n fieldSchema.type;\n/**\n * Get appropriate null value for various field types\n *\n * @param {Array} datatype\n * Field's datatype property\n */\nexport const getNullValue = (datatype) => {\n const fieldType = getFieldType(datatype);\n if (fieldType === Array) {\n return [];\n } else if (fieldType === Boolean) {\n return false;\n } else if (fieldType === String) {\n return \"\";\n } else if (fieldType === Number) {\n return \"\";\n } else {\n // normalize to null\n return null;\n }\n};\n","import toPath from \"lodash/toPath.js\";\nimport initial from \"lodash/initial.js\";\nimport flow from \"lodash/fp/flow.js\";\nimport takeRight from \"lodash/takeRight.js\";\n\n/**\n * Splits a path in string format into an array.\n */\nexport const splitPath = (string: string) => toPath(string);\n\n/**\n * Joins a path in array format into a string.\n */\nexport const joinPath = (array: Array<string | number>): string =>\n array.reduce<string>(\n (string, item) =>\n string +\n (Number.isNaN(Number(item))\n ? `${string === \"\" ? \"\" : \".\"}${item}`\n : `[${item}]`),\n \"\"\n );\n\n/**\n * Retrieves parent path from the given one.\n *\n * @param {String} string\n * Path in string format\n * @return {String}\n */\nexport const getParentPath = flow(splitPath, initial, joinPath);\n\n/**\n * Removes prefix from the given paths.\n *\n * @param {String} prefix\n * @param {String[]} paths\n * @return {String[]}\n */\nexport const removePrefix = (\n prefix: string,\n paths: Array<string>\n): Array<string> => {\n const explodedPrefix = splitPath(prefix);\n return paths.map((path) => {\n if (path === prefix) {\n return path;\n }\n const explodedPath = splitPath(path);\n const explodedSuffix = takeRight(\n explodedPath,\n explodedPath.length - explodedPrefix.length\n );\n return joinPath(explodedSuffix);\n });\n};\n\n/**\n * Filters paths that have the given prefix.\n *\n * @param {String} prefix\n * @param {String[]} paths\n * @return {String[]}\n */\nexport const filterPathsByPrefix = (prefix: string, paths: Array<string>) =>\n paths.filter(\n (path) =>\n path === prefix ||\n path.startsWith(`${prefix}.`) ||\n path.startsWith(`${prefix}[`)\n );\n","import React, { useContext } from \"react\";\n\ninterface FormContextValue {\n addToDeletedValues: Function;\n addToFailureForm: Function;\n addToSubmitForm: Function;\n addToSuccessForm: Function;\n clearForm: Function;\n clearFormCallbacks: Function;\n clearFieldErrors: Function;\n currentValues: object;\n deletedValues: Array<any>;\n errors: Array<any>;\n getDocument: Function;\n getLabel: (fieldName: string, fieldLocale?: string) => string;\n initialDocument: object;\n isChanged: boolean;\n refetchForm: Function;\n // TODO: we deprecate this, it doesn't make sense to allow a child to setState this way\n // setFormState: Function;\n // FIXME: this type doesn't work, it doesn't necessarily have the event + it has to be defined\n submitForm: Function; //React.HTMLAttributes<HTMLFormElement>[\"onSubmit\"];\n throwError: Function;\n updateCurrentValues: Function;\n}\n\nexport const FormContext =\n React.createContext<FormContextValue | undefined>(undefined);\n\nexport const useFormContext = () => {\n const formContext = useContext(FormContext);\n if (!formContext)\n throw new Error(\n \"A component is trying to access form context but it is undefined. Please wrap your component with a <Form>.\"\n );\n return formContext;\n};\n","/**\n * Field processing functions that computes groups and add relevant props for i18n\n */\nimport { formProperties } from \"../../utils/schema_utils\";\nimport { FieldGroup } from \"@vulcanjs/schema\";\nimport { FormField } from \"../../typings\";\nimport { FormProps, FormState } from \"./typings\";\n\n/**\n * Field related functions\n */\n\nimport { VulcanSchema } from \"@vulcanjs/schema\";\nimport uniq from \"lodash/uniq.js\";\nimport compact from \"lodash/compact.js\";\nimport get from \"lodash/get.js\";\nimport pick from \"lodash/pick.js\";\nimport {\n isIntlField,\n formatLabel,\n getIntlKeys,\n getIntlLabel,\n} from \"@vulcanjs/i18n\";\n\nimport { IntlProviderContextValue } from \"@vulcanjs/react-i18n\";\nimport map from \"lodash/map.js\";\nimport sortBy from \"lodash/sortBy.js\";\nimport uniqBy from \"lodash/uniqBy.js\";\nimport difference from \"lodash/difference.js\";\nimport reject from \"lodash/reject.js\";\nimport intersection from \"lodash/intersection.js\";\nimport _filter from \"lodash/filter.js\";\nimport { capitalize } from \"@vulcanjs/utils\";\nimport { VulcanFieldSchema } from \"@vulcanjs/schema\";\nimport { VulcanModel } from \"@vulcanjs/model\";\n\n/*\n\n Get a field's intl keys (useful for debugging)\n\n */\nconst getModelIntlKeys = (\n model: VulcanModel,\n flatSchema: any,\n fieldName: string\n) => {\n return getIntlKeys({\n fieldName: fieldName,\n modelName: model.name,\n schema: flatSchema,\n });\n};\n\n/*\n\n Get a field's label\n\n */\nexport const getLabel = (\n model: VulcanModel,\n flatSchema: any,\n context: IntlProviderContextValue,\n fieldName: string,\n fieldLocale?: string\n) => {\n const collectionName = model.name.toLowerCase();\n const label = formatLabel({\n intl: context,\n fieldName: fieldName,\n collectionName: collectionName,\n schema: flatSchema,\n });\n if (fieldLocale) {\n const intlFieldLocale = context.formatMessage({\n id: `locales.${fieldLocale}`,\n defaultMessage: fieldLocale,\n });\n return `${label} (${intlFieldLocale})`;\n } else {\n return label;\n }\n};\n\n/*\n\n Get a field's description\n\n (Same as getLabel but pass isDescription: true )\n */\nconst getDescription = (\n model: VulcanModel,\n flatSchema: any,\n context: any,\n fieldName: string\n) => {\n const collectionName = model.name.toLowerCase();\n const description = getIntlLabel({\n intl: context,\n fieldName: fieldName,\n collectionName: collectionName,\n schema: flatSchema,\n isDescription: true,\n });\n return description || null;\n};\n\n/*\n\n Get a field option's label\n\n */\nconst getOptionLabel = (\n model: VulcanModel,\n context: { formatMessage: Function },\n fieldName: string,\n option: { intlId?: string; label: string; value?: any }\n) => {\n const collectionName = model.name.toLowerCase();\n const intlId =\n option.intlId || `${collectionName}.${fieldName}.${option.value}`;\n return context.formatMessage({\n id: intlId,\n defaultMessage: option.label,\n });\n};\n\n/*\n\n Get a list of the fields to be included in the current form\n\n Note: when submitting the form (getData()), do not include any extra fields.\n\n */\nexport const getFieldNames = (\n props: Pick<FormProps, \"fields\" | \"addFields\" | \"removeFields\">,\n currentDocument,\n optionsFromArgs: {\n excludeHiddenFields?: boolean;\n excludeRemovedFields?: boolean;\n replaceIntlFields?: boolean;\n addExtraFields?: boolean;\n schema?: VulcanSchema;\n mutableFields?: Array<any>;\n }\n) => {\n const { fields, addFields, removeFields } = props;\n const defaultOptions = {\n excludeHiddenFields: true,\n excludeRemovedFields: true,\n replaceIntlFields: false,\n addExtraFields: false,\n };\n const options = {\n ...defaultOptions,\n ...optionsFromArgs,\n };\n const {\n schema,\n mutableFields,\n excludeRemovedFields,\n excludeHiddenFields,\n addExtraFields,\n replaceIntlFields,\n } = options;\n\n // get all editable/insertable fields (depending on current form type)\n let relevantFields = mutableFields;\n\n // if \"fields\" prop is specified, restrict list of fields to it\n if (typeof fields !== \"undefined\" && fields.length > 0) {\n relevantFields = intersection(relevantFields, fields);\n }\n\n // if \"hideFields\" prop is specified, remove its fields\n if (excludeRemovedFields) {\n // OpenCRUD backwards compatibility\n //const removeFields = removeFields || hideFields;\n if (typeof removeFields !== \"undefined\" && removeFields.length > 0) {\n relevantFields = difference(relevantFields, removeFields);\n }\n }\n\n // if \"addFields\" prop is specified, add its fields\n if (\n addExtraFields &&\n typeof addFields !== \"undefined\" &&\n addFields.length > 0\n ) {\n relevantFields = relevantFields?.concat(addFields);\n }\n\n // remove all hidden fields\n if (excludeHiddenFields) {\n const document = currentDocument;\n relevantFields = reject(relevantFields, (fieldName) => {\n const hidden = schema?.[fieldName].hidden;\n return typeof hidden === \"function\"\n ? hidden({ props, document })\n : hidden;\n });\n }\n\n // replace intl fields\n if (replaceIntlFields) {\n relevantFields = relevantFields?.map((fieldName) =>\n isIntlField(schema?.[fieldName]) ? `${fieldName}_intl` : fieldName\n );\n }\n\n // remove any duplicates\n relevantFields = uniq(relevantFields);\n\n return relevantFields;\n};\n\n// --------------------------------------------------------------------- //\n// -------------------------------- Fields ----------------------------- //\n// --------------------------------------------------------------------- //\n\nconst initField = (\n props: { model: VulcanModel; layout?: \"horizontal\" | \"vertical\" },\n state: Pick<FormState, \"currentDocument\" | \"flatSchema\" | \"originalSchema\">,\n context: any,\n fieldName: string,\n fieldSchema: VulcanFieldSchema\n) => {\n const { model } = props;\n const { currentDocument, flatSchema } = state;\n const isArray = fieldSchema.type === Array;\n\n // intialize properties\n let field: Partial<FormField> = {\n ...pick(fieldSchema, formProperties),\n name: fieldName,\n datatype: fieldSchema.type,\n layout: props.layout, // A layout property used to control how the form fields are displayed. Defaults to horizontal.\n input: fieldSchema.input || fieldSchema.control, // TODO\n };\n\n // if this is an array field also store its array item type\n if (isArray) {\n const itemFieldSchema = state.originalSchema[`${fieldName}.$`];\n field.itemDatatype = get(itemFieldSchema, \"type.0.type\");\n }\n\n field.label = getLabel(model, flatSchema, context, fieldName);\n field.intlKeys = getIntlKeys({\n fieldName,\n modelName: model.name,\n schema: model.schema,\n });\n // // replace value by prefilled value if value is empty\n // const prefill = fieldSchema.prefill || (fieldSchema.form && fieldSchema.form.prefill);\n // if (prefill) {\n // const prefilledValue = typeof prefill === 'function' ? prefill.call(fieldSchema) : prefill;\n // if (!!prefilledValue && !field.value) {\n // field.prefilledValue = prefilledValue;\n // field.value = prefilledValue;\n // }\n // }\n\n const document = currentDocument;\n field.document = document;\n\n // internationalize field options labels\n if (field.options && Array.isArray(field.options)) {\n field.options = field.options.map((option) => ({\n ...option,\n label: getOptionLabel(model, context, fieldName, option),\n }));\n }\n\n // if this an intl'd field, use a special intlInput\n if (isIntlField(fieldSchema)) {\n field.intlInput = true;\n }\n\n // add any properties specified in fieldSchema.form as extra props passed on\n // to the form component, calling them if they are functions\n const inputProperties = fieldSchema.form || fieldSchema.inputProperties || {};\n for (const prop in inputProperties) {\n const property = inputProperties[prop];\n field[prop] =\n typeof property === \"function\"\n ? property.call(fieldSchema, {\n ...props,\n fieldName,\n document,\n intl: context,\n })\n : property;\n }\n\n // add description as help prop\n const description = getDescription(model, flatSchema, context, fieldName);\n if (description) {\n field.help = description;\n }\n\n return field as FormField;\n};\nconst handleFieldPath = (\n field: FormField,\n fieldName: string,\n parentPath?: string\n) => {\n const fieldPath = parentPath ? `${parentPath}.${fieldName}` : fieldName;\n field.path = fieldPath;\n // TODO: reintroduce this side effect to correctly set the default values\n // (previously was in Form.tsx)\n // Note sure if this is actually needed\n // if (field.defaultValue) {\n // set(this.defaultValues, fieldPath, field.defaultValue);\n // }\n return field;\n};\nconst handleFieldParent = (field: FormField, parentFieldName?: string) => {\n // if field has a parent field, pass it on\n if (parentFieldName) {\n field.parentFieldName = parentFieldName;\n }\n\n return field;\n};\nconst handlePermissions = (\n field: FormField,\n fieldName: string,\n mutableFields: Array<any>\n) => {\n // if field is not creatable/updatable, disable it\n if (!mutableFields.includes(fieldName)) {\n field.disabled = true;\n }\n return field;\n};\nconst handleFieldChildren = (\n props: FormProps,\n state: Pick<FormState, \"currentDocument\" | \"flatSchema\" | \"originalSchema\">,\n context: any,\n field: FormField,\n fieldName: string,\n fieldSchema: any, // TODO: not a VulcanField, more a FormField\n schema: VulcanSchema,\n mutableFields: Array<any>\n) => {\n const { currentDocument } = state;\n // array field\n if (fieldSchema.arrayFieldSchema) {\n field.arrayFieldSchema = fieldSchema.arrayFieldSchema;\n // create a field that can be exploited by the form\n field.arrayField = createArraySubField(\n props,\n state,\n context,\n fieldName,\n field.arrayFieldSchema,\n schema,\n mutableFields\n );\n //field.nestedInput = true\n }\n // nested fields: set input to \"nested\"\n if (fieldSchema.schema) {\n field.nestedSchema = fieldSchema.schema;\n field.nestedInput = true;\n\n // get nested schema\n // for each nested field, get field object by calling createField recursively\n field.nestedFields = getFieldNames(props, currentDocument, {\n schema: field.nestedSchema,\n addExtraFields: false,\n }).map((subFieldName) => {\n return createField(\n props,\n state,\n context,\n subFieldName,\n field.nestedSchema,\n mutableFields,\n fieldName,\n field.path\n );\n });\n }\n return field;\n};\n\n/*\n Given a field's name, the containing schema, and parent, create the\n complete field object to be passed to the component\n\n */\nconst createField = (\n props: FormProps,\n state: Pick<FormState, \"currentDocument\" | \"flatSchema\" | \"originalSchema\">,\n context: any,\n fieldName: string,\n schema: any,\n mutableFields: Array<any>,\n parentFieldName?: string,\n parentPath?: string\n): FormField => {\n const fieldSchema = schema[fieldName];\n let field = initField(props, state, context, fieldName, fieldSchema);\n field = handleFieldPath(field, fieldName, parentPath);\n field = handleFieldParent(field, parentFieldName);\n field = handlePermissions(field, fieldName, mutableFields);\n field = handleFieldChildren(\n props,\n state,\n context,\n field,\n fieldName,\n fieldSchema,\n schema,\n mutableFields\n );\n return field;\n};\nconst createArraySubField = (\n props: FormProps,\n state: Pick<FormState, \"currentDocument\" | \"flatSchema\" | \"originalSchema\">,\n context: any,\n fieldName: string,\n subFieldSchema: VulcanFieldSchema,\n schema: VulcanSchema,\n mutableFields: Array<string>\n) => {\n const subFieldName = `${fieldName}.$`;\n let subField = initField(props, state, context, subFieldName, subFieldSchema);\n // array subfield has the same path and permissions as its parent\n // so we use parent name (fieldName) and not subfieldName\n subField = handleFieldPath(subField, fieldName);\n subField = handlePermissions(subField, fieldName, mutableFields /*schema*/);\n // we do not allow nesting yet\n //subField = this.handleFieldChildren(field, fieldSchema)\n return subField;\n};\n\n// Group of multiple fields (obtained by parsing the whole schema)\ninterface GroupWithFields extends FieldGroup {\n fields: Array<FormField>;\n}\n\ntype FormSchemaState = Pick<\n FormState,\n \"currentDocument\" | \"schema\" | \"flatSchema\" | \"originalSchema\"\n>;\n\n/*\n\n Get all field groups\n\n */\nexport const getFieldGroups = (\n props: FormProps,\n state: FormSchemaState,\n context: IntlProviderContextValue,\n mutableFields: Array<string>,\n formatMessage: any\n) => {\n const { schema, currentDocument } = state;\n // build fields array by iterating over the list of field names\n let fields = getFieldNames(props, currentDocument, {\n mutableFields,\n schema,\n }).map((fieldName) => {\n // get schema for the current field\n return createField(props, state, context, fieldName, schema, mutableFields);\n });\n\n fields = sortBy(fields, \"order\");\n\n // get list of all unique groups (based on their name) used in current fields, remove \"empty\" group\n let groups = compact(uniqBy(map(fields, \"group\"), (g) => (g ? g.name : \"\")));\n\n // for each group, add relevant fields\n let groupsWithFields = groups.map((group) => {\n const label =\n group.label ||\n //this.context.formatMessage({ id: group.name }) ||\n capitalize(group.name);\n const groupFields = _filter<FormField>(fields, (field) => {\n return field.group && field.group.name === group.name;\n });\n const groupWithFields: GroupWithFields = {\n ...group,\n label,\n fields: groupFields,\n };\n return groupWithFields;\n });\n\n // add default group if necessary\n const defaultGroupFields = _filter(fields, (field) => !field.group);\n if (defaultGroupFields.length) {\n const defaultGroup: GroupWithFields = {\n name: \"default\",\n label: \"default\",\n order: 0,\n fields: defaultGroupFields,\n };\n groupsWithFields = [defaultGroup].concat(groupsWithFields);\n }\n\n // sort by order\n groupsWithFields = sortBy(groupsWithFields, \"order\");\n\n // console.log(groups);\n\n return groupsWithFields;\n};\n","import find from \"lodash/find.js\";\nimport isEqualWith from \"lodash/isEqualWith.js\";\nexport const isNotSameDocument = (initialDocument, changedDocument) => {\n const changedValue = find(changedDocument, (value, key, collection) => {\n return !isEqualWith(value, initialDocument[key], (objValue, othValue) => {\n if (!objValue && !othValue) return true;\n });\n });\n return typeof changedValue !== \"undefined\";\n};\n","export * from \"./useWarnOnUnsaved\";\n","import { useBlockTransition } from \"../useBlockTransition/useBlockTransition\";\nimport debug from \"debug\";\nimport { useIntlContext } from \"@vulcanjs/react-i18n\";\nconst debugTransitions = debug(\"vn:route-transitions\");\n\n/**\n * Can trigger an alert on unsaved changes\n *\n * Triggers event so you can also block SPA transition (implementation is NOT provided by this hook, you\n * need listeners whose implementation depends on your router (React Router, Next Router...), see block.ts)\n *\n * @see https://github.com/ReactTraining/history/blob/master/docs/blocking-transitions.md\n *\n * @param param0\n */\nexport const useWarnOnUnsaved = ({\n isChanged,\n warnUnsavedChanges,\n}: {\n isChanged: boolean;\n warnUnsavedChanges?: boolean;\n}) => {\n const context = useIntlContext();\n /**\n * To be passed to onbeforeunload event. The returned message will be displayed\n * by the prompt.\n *\n * see https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onbeforeunload\n * the message returned is actually ignored by most browsers and a default message 'Are you sure you want to leave this page? You might have unsaved changes' is displayed. See the Notes section on the mozilla docs above\n */\n const getBlockedMessage = (event?: BeforeUnloadEvent) => {\n debugTransitions(\"running handlePageLeave\", event);\n const message = context.formatMessage({\n id: \"forms.confirm_discard\",\n defaultMessage: \"Are you sure you want to discard your changes?\",\n });\n return message;\n };\n useBlockTransition({\n shouldBlock: !!(warnUnsavedChanges && isChanged),\n getBlockedMessage: getBlockedMessage,\n });\n};\n","import { useEffect, useRef } from \"react\";\nimport { block } from \"./block\";\nimport debug from \"debug\";\nconst debugTransitions = debug(\"vn:router-transitions\");\n\n/**\n * Can trigger an alert on unsaved changes\n *\n * Triggers event so you can also block SPA transition (implementation is NOT provided by this hook, you\n * need listeners whose implementation depends on your router (React Router, Next Router...), see block.ts)\n *\n * @see https://github.com/ReactTraining/history/blob/master/docs/blocking-transitions.md\n *\n * @param param0\n */\nexport const useBlockTransition = ({\n shouldBlock,\n getBlockedMessage,\n}: {\n shouldBlock: boolean;\n getBlockedMessage: (evt?: BeforeUnloadEvent) => string;\n}) => {\n // function to unblock the form\n const unblockRef = useRef<Function | undefined>();\n\n useEffect(() => {\n const isBlocking = !!unblockRef.current;\n debugTransitions(\n \"running effect\",\n \"should block\",\n shouldBlock,\n \"currently blocked\",\n isBlocking\n );\n\n const onUnblock = () => {\n debugTransitions(\"running unblock from effect\");\n if (!shouldBlock) {\n if (unblockRef.current) {\n unblockRef.current();\n }\n }\n };\n // block\n const onBlocked = (evt?: BeforeUnloadEvent): string => {\n const message = getBlockedMessage(evt);\n debugTransitions(\n \"user is being blocked after trying to leave the page, with message: \" +\n message\n );\n if (evt) {\n evt.returnValue = message;\n }\n return message;\n };\n if (shouldBlock) {\n debugTransitions(\n \"should block transition, setting up relevant event listener\"\n );\n unblockRef.current = block(onBlocked, onUnblock);\n }\n // unblock if not blocking anymore and was blocking previously\n if (!shouldBlock && isBlocking) {\n debugTransitions(\"should unblock (state has been reinitialized)\");\n if (unblockRef.current) {\n unblockRef.current();\n }\n }\n // trigger the potentially registered unblock function when component unmounts\n //return onUnblock;\n }, [shouldBlock]);\n};\n","import debug from \"debug\";\nconst debugTransitions = debug(\"vn:route-transition\");\nconst BeforeUnloadEventType = \"beforeunload\";\n/**\n * Event triggered when a warning on unsaved changes is necessary\n * The app should listen for this event to setup relevant blocking methods depending on the framework\n *\n * For instance with React Router:\n *\n * let unblock\n * window.addEventListener(\"blocktransition\", () => {\n * unblock = router.history.block(...)\n * })\n * window.addEventListener(\"unblocktransition\", () => {\n * unblock()\n * })\n *\n * For Next.js, you would do something similar\n * Check https://github.com/vercel/next.js/discussions/12348\n *\n */\nexport const BLOCK_TRANSITION_EVENT_TYPE = \"blocktransition\";\n/**\n * Called when blocking is not necessary anymore:\n * - there are no unsaved changes anymore\n * - user has confirmed they want to leave\n */\nexport const UNBLOCK_TRANSITION_EVENT_TYPE = \"unblocktransition\";\n/**\n * Intercepts the beforeunload event\n *\n * Code taken from React Router history feature\n * @see https://github.com/ReactTraining/history/blob/master/docs/blocking-transitions.md\n */\nfunction blockBeforeUnload(event: BeforeUnloadEvent) {\n // Cancel the event.\n event.preventDefault();\n // Chrome (and legacy IE) requires returnValue to be set.\n event.returnValue = \"\";\n}\n\n/**\n * Blocks transition\n *\n * /!\\ In order to catch SPA transition, you need to implement\n * an event listener in your own app.\n *\n *\n * @param onUnblock Callback to call on unblock, for custom behaviour\n * @returns A function to unblock the transition (eg if the form is back to\n * its original state)\n */\nexport const block = (\n setConfirmationMessage: (event?: BeforeUnloadEvent) => string,\n onUnblock?: Function\n) => {\n debugTransitions(\"running block function\");\n // trigger a block event, to be handled at the framework level\n // TODO: setConfirmationMessage should be passed as well\n const blockEvent = new Event(BLOCK_TRANSITION_EVENT_TYPE);\n window.dispatchEvent(blockEvent);\n // block at browser level\n window.addEventListener(BeforeUnloadEventType, blockBeforeUnload);\n window.addEventListener(BeforeUnloadEventType, setConfirmationMessage);\n // return an unblock function to cancel\n const unblock = () => {\n debugTransitions(\"running unblock function\");\n if (onUnblock) {\n debugTransitions(\"running user defined function\");\n onUnblock(); // callback from user land\n }\n // trigger an unblock event, to be handled at the framework level\n const unblockEvent = new Event(UNBLOCK_TRANSITION_EVENT_TYPE);\n window.dispatchEvent(unblockEvent);\n // remove the browser level events\n window.removeEventListener(BeforeUnloadEventType, blockBeforeUnload);\n window.removeEventListener(BeforeUnloadEventType, setConfirmationMessage);\n // unblock browser change\n // @ts-ignore\n window.onbeforeunload = undefined; //undefined instead of null to support IE\n };\n return unblock;\n};\n","import type {\n CreateVariables,\n UpdateVariables,\n DeleteVariables,\n} from \"@vulcanjs/crud\";\nimport { VulcanModel } from \"@vulcanjs/model\";\nimport { VulcanUser } from \"@vulcanjs/permissions\";\nimport { VulcanSchema } from \"@vulcanjs/schema\";\nimport { DocumentNode } from \"graphql\";\n\nexport interface FormState {\n schema: any;\n initialDocument: Object;\n currentDocument: Object;\n deletedValues: any;\n errors: any;\n currentValues: any;\n disabled: any;\n success?: any;\n flatSchema: any;\n originalSchema: any;\n}\n\n/**\n * Props that can be passed to the FormContainer (= SmartForm)\n * and will be passed down to the Form\n *\n * TODO: this might not be complete yet. We need to move relevant props from \"FormProps\" to this type,\n * based on current usage of the SmartForm in existing apps\n */\nexport interface PassedDownFormProps {\n itemProperties?: Object;\n showDelete?: boolean;\n /**\n * Disable the form\n */\n disabled?: boolean;\n /**\n * Will prevent leaving the page/unmounting the form on unsaved changes\n */\n warnUnsavedChanges?: boolean;\n /*A callback called on form submission on the form data. Can return the submitted data object as well.*/\n submitCallback?: (data) => any;\n /*A callback called on mutation success.*/\n successCallback?: (document, meta: { form: any }) => void;\n /*A callback called on mutation failure.*/\n errorCallback?: (document, error, meta: { form: any }) => void;\n\n // Fragments\n /**\n * A GraphQL fragment used to specify the data to fetch to populate edit forms.\n * If no fragment is passed, SmartForm will do its best to figure out what data to load based on the fields included in the form.\n *\n * Can be either a string or a DocumentNode (using \"gql\" tag)\n */\n queryFragment?: DocumentNode | string;\n /**\n * A GraphQL fragment used to specify the data to return once a mutation is complete.\n\nIf no fragment is passed, SmartForm will only return fields used in the form, but note that this might sometimes lead to discrepancies when compared with documents already loaded on the client.\n\nAn example would be a createdAt date added automatically on creation even though it’s not part of the actual form. If you’d like that field to be returned after the mutation, you can define a custom mutationFragment that includes it explicitly.\n\n * Can be either a string or a DocumentNode (using \"gql\" tag)\n*/\n mutationFragment?: DocumentNode | string;\n /** Force a query fragment name\n *\n * NOTE: needed only for string fragments\n * If you use a DocumentNode (with \"gql\" tag), it will be computed automatically\n *\n * @deprecated Prefer using DocumentNode fragment, using the gql tag\n */\n queryFragmentName?: string;\n /** Force a mutation fragment name\n *\n *NOTE: needed only for string fragments\n *If you use a DocumentNode (with \"gql\" tag), it will be computed automatically\n *\n * @deprecated Prefer using DocumentNode fragment, using the gql tag\n */\n mutationFragmentName?: string;\n}\n\nexport interface FormProps<TModel = { [key in string]: any }>\n extends PassedDownFormProps {\n /**\n * Function that retriggers data fetching in edit mode\n * Usually provided by the useSingle but could be any function\n */\n refetch?: () => void;\n /**\n * Document id in update mode\n */\n id?: string;\n /* The model in which to edit or insert a document. */\n model: VulcanModel;\n /** Passing directly a raw schema (TODO: model is still mandatory atm) */\n schema?: VulcanSchema;\n /**\n * Passing directly a document (TODO: not yet tested in the new version)\n */\n document?: any;\n /**\n * currentUser to check authorizations to update/create some fields\n */\n currentUser?: VulcanUser;\n addFields?: Array<string>;\n removeFields?: Array<string>;\n // deprecated\n //hideFields?: any;\n /**\n * Label so that graphql queries are contextualized\n */\n contextName?: string;\n // labels\n cancelLabel?: string;\n revertLabel?: string;\n //\n revertCallback?: Function;\n // TODO: probably should be removed\n successComponent?: any;\n /* Instead of passing collection you can pass the name of the collection.*/\n // collectionName?: string;\n /*If present, the document to edit. If not present, the form will be a “new document” form.*/\n documentId?: string;\n /*An array of field names, if you want to restrict the form to a specific set of fields.*/\n fields?: Array<keyof TModel>;\n /*The text inside the submit button of the form.*/\n submitLabel?: string;\n /*A layout property used to control how the form fields are displayed. Defaults to horizontal.*/\n layout?: \"horizontal\" | \"vertical\";\n /*Whether to show a “delete document” link on edit forms.*/\n showRemove?: boolean;\n /*A set of props used to prefill the form. */\n prefilledProps?: TModel & Object; // TODO: should it allow only fields from the Model or also additional fields?\n /*Whether to repeat validation errors at the bottom of the form.*/\n repeatErrors?: boolean;\n //Callbacks\n /** Callback ran on first render */\n initCallback?: Function;\n /*If a cancelCallback function is provided, a “cancel” link will be shown next to the form’s submit button and the callback will be called on click.*/\n cancelCallback?: (document) => void;\n /*A callback to call when a document is successfully removed (deleted).*/\n removeSuccessCallback?: (document) => void;\n\n /*A callback called a every change or blur event inside the form.*/\n changeCallback: (currentDocument) => void;\n\n // mutations from container\n // => replace the \"onSubmit\" of a normal form\n /**\n * The result is usually extracted from a graphql mutation\n * But we have a simplified abstracted API, so we could also use the Form without graphql\n */\n createDocument: <TModel = any>(\n createVars: CreateVariables\n ) => Promise<CreateDocumentResult<TModel>>;\n updateDocument: <TModel = any>(\n vars: UpdateVariables\n ) => Promise<UpdateDocumentResult<TModel>>;\n deleteDocument: (vars: DeleteVariables) => Promise<void>;\n // Other results from the Apollo query => should be ignored, in order to avoid dependency to graphql in the Form\n // instead the container is responsible for passing errors and stuff\n // createDocumentMeta?: { error?: any };\n // updateDocumentMeta?: { error?: any };\n // EXPERIMENTAL: allowing to manually set the form children\n children?: React.ReactNode;\n}\n\nexport interface CreateDocumentResult<TDocument = any> {\n document: TDocument;\n errors: Array<any>;\n}\n\nexport interface UpdateDocumentResult<TDocument = any> {\n document: TDocument;\n errors: Array<any>;\n}\n","export * from \"./Provider\";\nexport * from \"./Context\";\nexport * from \"./Consumer\";\nexport * from \"./typings\";\n\nexport * from \"./defaultVulcanComponents\";\n","/**\n * NOTE: KEEP SEPARATED FROM THE HOOKS TO CONSUME THE CONTEXT\n * otherwise you'll end up with circular dependencies because of the default components\n */\n// TODO: we might need to adapt the provider to merge its value with a potentially higher up context\nimport React from \"react\";\n\nimport { PossibleVulcanComponents } from \"./typings\";\nimport { VulcanComponentsContext } from \"./Context\";\nimport { useVulcanComponents } from \"./Consumer\";\nimport { debugVulcan } from \"@vulcanjs/utils\";\nconst debugComponents = debugVulcan(\"components\"); //console.log;\n\n/**\n *\n * @param options.value An object of Vulcan components to be overriden.\n */\nexport const VulcanComponentsProvider = ({\n value,\n ...props\n}: {\n value?: Partial<PossibleVulcanComponents>;\n children: React.ReactNode;\n}) => {\n const currentComponents = useVulcanComponents();\n debugComponents(\n \"Current components __not_initialized?\",\n currentComponents.__not_initialized\n );\n const mergedComponents = {\n // merge with a parent Provider if needed\n ...(currentComponents?.__not_initialized ? {} : currentComponents || {}),\n ...(value || {}),\n };\n debugComponents(\"Merged components\", mergedComponents);\n // For preserving displayName, that is lost after build somehow\n Object.keys(mergedComponents).forEach((componentName) => {\n if (mergedComponents[componentName]) {\n mergedComponents[componentName].displayName = \"Vulcan.\" + componentName;\n } else {\n console.warn(`Encountered an undefined component: ${componentName}.\n The component may not be registered, or import failed.\n For instance due to an infinite import loop when importing\n \"useVulcanComponents\" from index instead of Consumer.`);\n }\n });\n return (\n <VulcanComponentsContext.Provider\n // We make the assumption that all components are there, user is responsible\n // for adding them correctly in the context where necessary\n value={mergedComponents as PossibleVulcanComponents} // merge provided components so the user can provide only a partial replacement\n {...props}\n />\n );\n};\n","import React from \"react\";\n// Load only the type, to define the API for each component\n// TODO: maybe do the reverse, define the props here and an unstyled version of the component?\nimport type { FormSubmitProps } from \"../form/elements\";\nimport type { ButtonProps } from \"../core/Button\";\nimport type { MutationButtonProps } from \"../MutationButton\";\n\n// datatable\nimport type {\n Datatable,\n DatatableAbove,\n DatatableAboveLayout,\n DatatableAboveLeft,\n DatatableAboveRight,\n DatatableAboveSearchInput,\n DatatableLayout,\n} from \"../Datatable/Datatable\";\nimport type {\n DatatableContents,\n DatatableContentsBodyLayout,\n DatatableContentsHeadLayout,\n DatatableContentsInnerLayout,\n DatatableContentsLayout,\n DatatableContentsMoreLayout,\n DatatableEmpty,\n DatatableLoadMoreButton,\n DatatableTitle,\n} from \"../Datatable/DatatableContents\";\nimport type {\n DatatableHeader,\n DatatableHeaderCellLayout,\n} from \"../Datatable/DatatableHeader\";\nimport type {\n DatatableRow,\n DatatableRowLayout,\n} from \"../Datatable/DatatableRow\";\nimport type {\n DatatableCell,\n DatatableCellLayout,\n DatatableDefaultCell,\n} from \"../Datatable/DatatableCell\";\nimport type {\n DatatableFilter,\n DatatableFilterBooleans,\n DatatableFilterCheckboxes,\n DatatableFilterContents,\n DatatableFilterContentsWithData,\n DatatableFilterDates,\n DatatableFilterNumbers,\n} from \"../Datatable/DatatableFilter\";\nimport type { DatatableSorter } from \"../Datatable/DatatableSorter\";\nimport type { DatatableSelect } from \"../Datatable/DatatableSelect\";\nimport type { DatatableSubmitSelected } from \"../Datatable/DatatableSubmitSelected\";\nimport type { EditButton, EditForm } from \"../Datatable/others/EditButton\";\nimport type { NewButton, NewForm } from \"../Datatable/others/NewButton\";\nimport type { DeleteButton } from \"../Datatable/others/DeleteButton\";\nimport type { BootstrapModal as Modal } from \"../bootstrap/Modal\";\n// Cell\nimport type { CardItemSwitcher } from \"../cell/CardItem\";\nimport type {\n CardItemRelationItem,\n DefaultCell,\n UserCell,\n} from \"../cell/CardItemRelationItem\";\nimport type { CardItemArray } from \"../cell/CardItemArray\";\nimport type { CardItemDate } from \"../cell/CardItemDate\";\nimport type { CardItemDefault } from \"../cell/CardItemDefault\";\nimport type { CardItemHTML } from \"../cell/CardItemHTML\";\nimport type { CardItemImage } from \"../cell/CardItemImage\";\nimport type { CardItemNumber } from \"../cell/CardItemNumber\";\nimport type { CardItemObject } from \"../cell/CardItemObject\";\nimport type { CardItemRelationHasMany } from \"../cell/CardItemRelationHasMany\";\nimport type { CardItemRelationHasOne } from \"../cell/CardItemRelationHasOne\";\nimport type { CardItemString } from \"../cell/CardItemString\";\nimport type { CardItemURL } from \"../cell/CardItemURL\";\nimport type { ModalTrigger } from \"../bootstrap/ModalTrigger\";\nimport type { FormOptionLabelProps } from \"../form/inputs/FormOptionLabel\";\n\nexport interface PossibleCoreComponents {\n Loading: any;\n FormattedMessage: any;\n Alert: any;\n Button: React.ComponentType<ButtonProps>;\n Icon: any;\n // TODO: define props more precisely\n MutationButton: React.ComponentType<MutationButtonProps>;\n LoadingButton: React.ComponentType<any>;\n HeadTags: React.ComponentType<any>;\n // Previously from Bootstrap and Mui\n TooltipTrigger: React.ComponentType<any>;\n Dropdown: React.ComponentType<any>;\n Modal: typeof Modal;\n ModalTrigger: typeof ModalTrigger;\n}\n// TODO: differentiate components that are provided out of the box and those that require a UI frameworK?\nexport interface PossibleFormComponents {\n FormError: any; // FieldErrors\n // From FormComponent\n FormComponentDefault: any;\n /** Alias of the default FormComponent */\n FormComponentText: any;\n FormComponentPassword: any;\n FormComponentNumber: any;\n FormComponentUrl: any;\n FormComponentEmail: any;\n FormComponentTextarea: any;\n FormComponentCheckbox: any;\n FormComponentCheckboxGroup: any;\n FormComponentRadioGroup: any;\n FormComponentSelect: any;\n FormComponentSelectMultiple: any;\n FormComponentDateTime: any;\n FormComponentDate: any;\n // FormComponentDate2: any;\n FormComponentTime: any;\n FormComponentStaticText: any;\n FormComponentLikert: any;\n FormComponentAutocomplete: any;\n FormComponentMultiAutocomplete: any;\n //\n FormComponent: any;\n FormComponentInner: any;\n FormComponentLoader: any;\n FormElement: any;\n FormGroup: any;\n FormGroupLayout: any;\n FormGroupHeader: any;\n // intl\n FormIntlLayout: any;\n FormIntlItemLayout: any;\n FormIntl: any;\n // Layout\n FormErrors: any;\n FormSubmit: React.ComponentType<FormSubmitProps>;\n FormLayout: any;\n\n // arrays and objects\n FormNestedArray: any;\n FormNestedArrayInnerLayout: any;\n FormNestedArrayLayout: any;\n FormNestedItem: any;\n IconAdd: any;\n IconRemove: any;\n FieldErrors: any;\n FormNestedDivider: any;\n //\n FormNestedItemLayout: any;\n FormNestedObjectLayout: any;\n FormNestedObject: any;\n FormOptionLabel: React.ComponentType<FormOptionLabelProps>;\n // Form\n Form: any;\n SmartForm: any;\n // Used by ui-boostrap and ui-material\n FormItem;\n // flag to detect parent state\n __not_initialized?: boolean;\n}\n\nexport interface DatatableComponents {\n Datatable: typeof Datatable;\n // DatatableContents: typeof DatatableContents\n DatatableAbove: typeof DatatableAbove;\n DatatableAboveLayout: typeof DatatableAboveLayout;\n DatatableAboveLeft: typeof DatatableAboveLeft;\n DatatableAboveRight: typeof DatatableAboveRight;\n DatatableAboveSearchInput: typeof DatatableAboveSearchInput;\n DatatableLayout: typeof DatatableLayout;\n // Contents\n DatatableContents: typeof DatatableContents;\n DatatableContentsBodyLayout: typeof DatatableContentsBodyLayout;\n DatatableContentsHeadLayout: typeof DatatableContentsHeadLayout;\n DatatableContentsInnerLayout: typeof DatatableContentsInnerLayout;\n DatatableContentsLayout: typeof DatatableContentsLayout;\n DatatableContentsMoreLayout: typeof DatatableContentsMoreLayout;\n DatatableEmpty: typeof DatatableEmpty;\n DatatableLoadMoreButton: typeof DatatableLoadMoreButton;\n DatatableTitle: typeof DatatableTitle;\n // Header\n DatatableHeader: typeof DatatableHeader;\n DatatableHeaderCellLayout: typeof DatatableHeaderCellLayout;\n // Row\n DatatableRow: typeof DatatableRow;\n DatatableRowLayout: typeof DatatableRowLayout;\n // Cell\n DatatableCell: typeof DatatableCell;\n DatatableCellLayout: typeof DatatableCellLayout;\n DatatableDefaultCell: typeof DatatableDefaultCell;\n // Filter\n DatatableFilter: typeof DatatableFilter;\n DatatableFilterBooleans: typeof DatatableFilterBooleans;\n DatatableFilterCheckboxes: typeof DatatableFilterCheckboxes;\n DatatableFilterContents: typeof DatatableFilterContents;\n DatatableFilterContentsWithData: typeof DatatableFilterContentsWithData;\n DatatableFilterDates: typeof DatatableFilterDates;\n DatatableFilterNumbers: typeof DatatableFilterNumbers;\n // Sort\n DatatableSorter: typeof DatatableSorter;\n // Select\n DatatableSelect: typeof DatatableSelect;\n // SubmitSelect\n DatatableSubmitSelected: typeof DatatableSubmitSelected;\n // Core\n EditButton: typeof EditButton;\n EditForm: typeof EditForm;\n NewButton: typeof NewButton;\n NewForm: typeof NewForm;\n DeleteButton: typeof DeleteButton;\n}\n\nexport interface CellComponents {\n CardItemSwitcher: typeof CardItemSwitcher;\n CardItem: typeof CardItemSwitcher;\n DefaultCell: typeof DefaultCell;\n UserCell: typeof UserCell;\n CardItemArray: typeof CardItemArray;\n CardItemDate: typeof CardItemDate;\n CardItemDefault: typeof CardItemDefault;\n CardItemHTML: typeof CardItemHTML;\n CardItemImage: typeof CardItemImage;\n CardItemNumber: typeof CardItemNumber;\n CardItemObject: typeof CardItemObject;\n CardItemRelationHasMany: typeof CardItemRelationHasMany;\n CardItemRelationHasOne: typeof CardItemRelationHasOne;\n CardItemRelationItem: typeof CardItemRelationItem;\n CardItemString: typeof CardItemString;\n CardItemURL: typeof CardItemURL;\n}\n\nexport type PossibleVulcanComponents = PossibleCoreComponents &\n PossibleFormComponents &\n DatatableComponents &\n CellComponents;\n","export { defaultFormComponents } from \"./formComponents\";\nexport { defaultDatatableComponents } from \"./datatableComponents\";\nexport { defaultCellComponents } from \"./cellComponents\";\nexport { defaultCoreComponents } from \"./coreComponents\";\n\nimport { defaultFormComponents } from \"./formComponents\";\nimport { defaultDatatableComponents } from \"./datatableComponents\";\nimport { defaultCellComponents } from \"./cellComponents\";\nimport { defaultCoreComponents } from \"./coreComponents\";\n\n/**\n * @deprecated 0.6.1\n * Use each type of components instead of loading all of them at once\n * This will avoid loading form and datatable components, that are very heavy, on every page\n * even when they are anot actually used\n */\nexport const defaultVulcanComponents = {\n ...defaultDatatableComponents,\n ...defaultCellComponents,\n ...defaultCoreComponents,\n ...defaultFormComponents,\n};\n","import type { PossibleFormComponents } from \"../typings\";\nimport {\n FormError,\n FormErrors,\n FormSubmit,\n FormLayout,\n FormElement,\n FieldErrors,\n} from \"../../form/elements\";\n// TODO: currently we need the default export because we pass components manually\nimport {\n FormContainer,\n FormComponent,\n FormComponentInner,\n FormComponentLoader,\n} from \"../../form/core/index\";\nimport { Form } from \"../../form/core/Form\";\nimport {\n FormGroup,\n FormGroupLayout,\n FormGroupHeader,\n} from \"../../form/core/FormGroup\";\nimport {\n FormIntl,\n FormIntlItemLayout,\n FormIntlLayout,\n} from \"../../form/intl/FormIntl\";\nimport {\n FormNestedArray,\n FormNestedArrayInnerLayout,\n IconAdd,\n IconRemove,\n //\n FormNestedDivider,\n //\n FormNestedArrayLayout,\n //\n FormNestedItem,\n FormNestedItemLayout,\n //\n FormNestedObject,\n FormNestedObjectLayout,\n} from \"../../form/nested\";\n\nimport {\n FormComponentDefault,\n FormComponentPassword,\n FormComponentNumber,\n FormComponentUrl,\n FormComponentEmail,\n FormComponentCheckbox,\n FormComponentTextarea,\n FormComponentSelect,\n FormComponentSelectMultiple,\n FormComponentDateTime,\n FormComponentDate,\n FormComponentTime,\n FormComponentStaticText,\n FormComponentLikert,\n FormComponentAutocomplete,\n FormComponentCheckboxGroup,\n FormComponentRadioGroup,\n // input utilities\n FormItem,\n FormOptionLabel,\n //\n AutocompleteMultiple,\n} from \"../../form/inputs\";\n\nexport const defaultFormComponents: PossibleFormComponents = {\n FormError, // used by: FieldErrors\n // To be defined by the UI framework\n // TODO: add defaults in React components\n FormComponentDefault,\n FormComponentText: FormComponentDefault,\n FormComponentPassword,\n FormComponentNumber,\n FormComponentUrl,\n FormComponentEmail,\n FormComponentTextarea,\n FormComponentCheckbox,\n FormComponentCheckboxGroup,\n FormComponentRadioGroup,\n FormComponentSelect,\n FormComponentSelectMultiple,\n FormComponentDateTime,\n FormComponentDate,\n //FormComponentDate2,\n FormComponentTime,\n FormComponentStaticText,\n FormComponentLikert,\n //FormComponentAutocomplete,\n //FormComponentMultiAutocomplete,\n // Components defined in default vulcan/forms\n FormComponent,\n FormComponentInner,\n FormComponentLoader,\n FormElement,\n FormGroup,\n FormGroupLayout,\n FormGroupHeader,\n FormIntl,\n FormIntlItemLayout,\n FormIntlLayout,\n\n // Layout\n FieldErrors,\n FormErrors,\n FormSubmit,\n FormLayout,\n\n FormNestedArray,\n FormNestedArrayInnerLayout,\n FormNestedArrayLayout,\n FormNestedItem,\n IconAdd,\n IconRemove,\n FormNestedDivider,\n // nested item\n FormNestedItemLayout,\n FormNestedObjectLayout,\n FormNestedObject,\n FormOptionLabel,\n //\n Form,\n SmartForm: FormContainer,\n //\n FormItem,\n FormComponentAutocomplete,\n FormComponentMultiAutocomplete: AutocompleteMultiple,\n};\n","export * from \"./FieldErrors\";\nexport * from \"./FormError\";\nexport * from \"./FormErrors\";\nexport * from \"./FormSubmit\";\nexport * from \"./FormLayout\";\nexport * from \"./FormElement\";\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\n\n// Track dependencies, not used yet\nconst formComponentsDependencies = [\"FormError\"];\n\n/**\n * Errors for one specif fields\n * @returns\n */\nexport const FieldErrors = ({\n errors,\n}: {\n /**\n * Errors for this specific field only\n */\n errors: Array<any>;\n}) => {\n const VulcanComponents = useVulcanComponents();\n return (\n <ul className=\"form-input-errors\">\n {errors.map((error, index) => (\n <li key={index}>\n <VulcanComponents.FormError error={error} errorContext=\"field\" />\n </li>\n ))}\n </ul>\n );\n};\n","import React from \"react\";\n// import PropTypes from \"prop-types\";\n// import getContext from 'recompose/getContext';\n// import { Components, registerComponent } from 'meteor/vulcan:core';\nimport get from \"lodash/get.js\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\nimport { useFormContext } from \"../core/FormContext\";\n\nexport const FormError = ({ error, errorContext }) => {\n const VulcanComponents = useVulcanComponents();\n const { getLabel } = useFormContext();\n // use the error or error message as default message\n const defaultMessage = JSON.stringify(error.message || error);\n const id = error.id || \"app.defaultError\";\n\n // default props for all errors\n let messageProps = {\n id,\n defaultMessage,\n values: {\n errorContext,\n defaultMessage,\n },\n };\n\n // additional properties to enhance the message\n if (error.properties) {\n // in case this is a nested fields, only keep last segment of path\n const errorName =\n error.properties.name && error.properties.name.split(\".\").slice(-1)[0];\n messageProps.values = {\n ...messageProps.values,\n // if the error is triggered by a field, get the relevant label\n label: errorName && getLabel(errorName, error.properties.locale),\n ...error.properties,\n };\n }\n\n if (error.data) {\n messageProps.values = {\n ...messageProps.values,\n ...error.data, // backwards compatibility\n };\n }\n\n const exception = get(error, \"extensions.exception\");\n if (exception) {\n messageProps = {\n ...messageProps,\n id: exception.id,\n values: exception.data,\n };\n }\n return <VulcanComponents.FormattedMessage html={true} {...messageProps} />;\n};\n\nFormError.defaultProps = {\n errorContext: \"\", // default context so format message does not complain\n};\n","import React from \"react\";\nimport { useFormContext } from \"../core/FormContext\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\n\n/**\n * Display errors for the current form, based on the context\n */\nexport const FormErrors = () => {\n const VulcanComponents = useVulcanComponents();\n const { errors } = useFormContext();\n\n return (\n <div className=\"form-errors\">\n {!!errors.length && (\n <VulcanComponents.Alert className=\"flash-message\" variant=\"danger\">\n <ul>\n {errors.map((error, index) => (\n <li key={index}>\n <VulcanComponents.FormError error={error} errorContext=\"form\" />\n </li>\n ))}\n </ul>\n </VulcanComponents.Alert>\n )}\n </div>\n );\n};\n\n// /*\n\n// Render errors\n\n// */\n// renderErrors = () => {\n// return (\n// <div className=\"form-errors\">\n// {this.state.errors.map((error, index) => {\n// let message;\n\n// if (error.data && error.data.errors) {\n// // this error is a \"multi-error\" with multiple sub-errors\n\n// message = error.data.errors.map(error => {\n// return {\n// content: this.getErrorMessage(error),\n// data: error.data,\n// };\n// });\n// } else {\n// // this is a regular error\n\n// message = {\n// content:\n// error.message ||\n// this.context.intl.formatMessage({ id: error.id, defaultMessage: error.id }, error.data),\n// };\n// }\n\n// return <Components.FormFlash key={index} message={message} type=\"error\" />;\n// })}\n// </div>\n// );\n// };\n","/**\n * Change compared to Vulcan:\n * - using a model instead of a collectionName\n */\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { canDeleteDocument } from \"@vulcanjs/permissions\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\nimport { useFormContext } from \"../core/FormContext\";\n\nexport interface FormSubmitProps {\n submitLabel: any;\n cancelLabel: any;\n cancelCallback: any;\n revertLabel: any;\n revertCallback: any;\n document: any;\n deleteDocument: any;\n model: any;\n // classes: any,\n currentUser: any;\n}\nexport const FormSubmit = ({\n submitLabel,\n cancelLabel,\n cancelCallback,\n revertLabel,\n revertCallback,\n document,\n deleteDocument,\n model,\n // classes,\n currentUser,\n}) => {\n const VulcanComponents = useVulcanComponents();\n const { clearForm } = useFormContext();\n return (\n <div className=\"form-submit\">\n <VulcanComponents.Button type=\"submit\" variant=\"primary\">\n {submitLabel ? (\n submitLabel\n ) : (\n <VulcanComponents.FormattedMessage\n id=\"forms.submit\"\n defaultMessage=\"Submit\"\n />\n )}\n </VulcanComponents.Button>\n\n {cancelCallback ? (\n <a\n className=\"form-cancel\"\n onClick={(e) => {\n e.preventDefault();\n cancelCallback(document);\n }}\n >\n {cancelLabel ? (\n cancelLabel\n ) : (\n <VulcanComponents.FormattedMessage\n id=\"forms.cancel\"\n defaultMessage=\"Cancel\"\n />\n )}\n </a>\n ) : null}\n\n {revertCallback ? (\n <a\n className=\"form-cancel\"\n onClick={(e) => {\n e.preventDefault();\n clearForm();\n revertCallback(document);\n }}\n >\n {revertLabel ? (\n revertLabel\n ) : (\n <VulcanComponents.FormattedMessage\n id=\"forms.revert\"\n defaultMessage=\"Revert\"\n />\n )}\n </a>\n ) : null}\n\n {deleteDocument &&\n canDeleteDocument({\n user: currentUser,\n document,\n model,\n }) ? (\n <div>\n <hr />\n <VulcanComponents.Button\n variant=\"link\"\n onClick={deleteDocument}\n className={`delete-link ${model.name}-delete-link`}\n >\n <VulcanComponents.Icon name=\"close\" />{\" \"}\n <VulcanComponents.FormattedMessage\n id=\"forms.delete\"\n defaultMessage=\"Delete\"\n />\n </VulcanComponents.Button>\n </div>\n ) : null}\n </div>\n );\n};\n\nFormSubmit.propTypes = {\n submitLabel: PropTypes.node,\n cancelLabel: PropTypes.node,\n cancelCallback: PropTypes.func,\n revertLabel: PropTypes.node,\n revertCallback: PropTypes.func,\n document: PropTypes.object,\n deleteDocument: PropTypes.func,\n collectionName: PropTypes.string,\n classes: PropTypes.object,\n};\n","import React from \"react\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\n\nexport interface FormLayoutProps {\n commonProps: any;\n formProps: any;\n submitProps: any;\n repeatErrors?: boolean;\n}\nexport const FormLayout: React.FC<FormLayoutProps> = ({\n commonProps,\n formProps,\n repeatErrors,\n submitProps,\n children,\n}) => {\n const VulcanComponents = useVulcanComponents();\n return (\n <VulcanComponents.FormElement {...formProps}>\n <VulcanComponents.FormErrors {...commonProps} />\n\n {children}\n\n {repeatErrors && <VulcanComponents.FormErrors {...commonProps} />}\n\n <VulcanComponents.FormSubmit {...commonProps} {...submitProps} />\n </VulcanComponents.FormElement>\n );\n};\n\nexport const formComponentsDependencies = [\n \"FormErrors\",\n \"FormSubmit\",\n \"FormElement\",\n];\n","import React, { HTMLAttributes, PropsWithChildren } from \"react\";\nimport { useFormContext } from \"../core/FormContext\";\n\nexport type FormElementProps = HTMLAttributes<HTMLFormElement>;\n/**\n * The actual wrapper of the form\n */\nexport const FormElement = React.forwardRef<HTMLFormElement>(\n ({ children, ...otherProps }: PropsWithChildren<FormElementProps>, ref) => {\n const { submitForm } = useFormContext();\n return (\n <form\n {...otherProps}\n // @ts-ignore\n onSubmit={submitForm}\n ref={ref}\n >\n {children}\n </form>\n );\n }\n);\n","export * from \"./FormComponent\";\nexport { default as FormComponent } from \"./FormComponent\";\n\nexport * from \"./FormComponentInner\";\nexport * from \"./FormComponentLoader\";\n\nexport * from \"./FormContext\";\nexport * from \"./FormContainer\";\n","/**\n * TODO: rename \"FieldComponent\" to clarify\n * Change compared to Meteor:\n * - custom inputs cannot be a reference anymore, you need to pass the whole component and not just the name\n * - FormComponents context is limited to default component. Other components must be passed through the schema instead\n * (it means you can't extend the SmartForm with new inputType, instead use a fully custom input)\n */\nimport React, { ComponentType, useEffect, useState } from \"react\";\nimport get from \"lodash/get.js\";\nimport SimpleSchema from \"simpl-schema\";\nimport { isEmptyValue, getNullValue } from \"../utils/utils\";\nimport type {\n PossibleFormComponents,\n PossibleVulcanComponents,\n} from \"../../VulcanComponents/typings\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\nimport { FormField } from \"../typings\";\nimport {\n VulcanFieldSchema,\n VulcanFieldInput,\n VulcanFieldType,\n} from \"@vulcanjs/schema\";\nimport { getAutoInputFromType } from \"../inputs/consts\";\nimport { useFormContext } from \"./FormContext\";\n\nconst getCharacterCounts = (value: any, max: number) => {\n const characterCount: number = value && value.length ? value.length : 0;\n return { charsRemaining: max - characterCount, charsCount: characterCount };\n};\n\n/**\n * Get field path, taking intlInput fields into account\n */\nconst getPath = ({\n intlInput,\n path,\n}: {\n intlInput?: boolean;\n path: string;\n}) => {\n return intlInput ? `${path}_intl` : path;\n};\n\nconst getCharacterCountsFromProps = ({\n document,\n max,\n intlInput,\n path,\n}: Pick<FormComponentProps, \"document\" | \"max\" | \"intlInput\" | \"path\">) => {\n if (!max) {\n return null;\n }\n const fieldPath = getPath({ intlInput, path });\n const intlOrRegularValue = document?.[fieldPath];\n const value =\n intlOrRegularValue && typeof intlOrRegularValue === \"object\"\n ? intlOrRegularValue.value\n : intlOrRegularValue;\n return getCharacterCounts(value, max);\n};\n\n// TODO: move to schema helpers\nconst isArrayField = (type: VulcanFieldSchema[\"type\"]) => {\n return type === Array;\n};\n\n// TODO: not up to date\nconst isObjectField = (type: VulcanFieldSchema[\"type\"]) => {\n return type instanceof SimpleSchema;\n};\n\n/*\n\n Get form input type, either based on input props, or by guessing based on form field type\n\n */\nconst getInputName = (fieldType: VulcanFieldType, input?: VulcanFieldInput) => {\n if (input) return input;\n return getAutoInputFromType(fieldType);\n};\n\n/*\n Returns true if the passed input type is a custom\n NOTE: it also accept non-standard name, if you want to add a new type of Input in the context\n */\n/*\nconst isCustomInput = (inputType: VulcanFieldInput) => {\n if (typeof inputType !== \"string\") return true;\n const isStandardInput = allVulcanInputs.includes(inputType);\n return !isStandardInput;\n};\n*/\n\n/*\n\n Function passed to FormComponentInner to help with rendering the component\n\n */\nconst getFormInput = ({\n type,\n input,\n FormComponents,\n}: {\n type: VulcanFieldType;\n input: VulcanFieldInput;\n FormComponents: PossibleFormComponents;\n}): // TODO: we could type the props here, it's an InputComponent to be more precise\nComponentType => {\n // if input is a React component, use it\n // NOTE: does it work with class components?\n if (typeof input === \"function\") {\n const InputComponent = input;\n return InputComponent;\n } else {\n const inputName = getInputName(type, input);\n // else pick a predefined component\n switch (inputName) {\n case \"text\":\n return FormComponents.FormComponentDefault;\n\n case \"password\":\n return FormComponents.FormComponentPassword;\n\n case \"number\":\n return FormComponents.FormComponentNumber;\n\n case \"url\":\n return FormComponents.FormComponentUrl;\n\n case \"email\":\n return FormComponents.FormComponentEmail;\n\n case \"textarea\":\n return FormComponents.FormComponentTextarea;\n\n case \"checkbox\":\n return FormComponents.FormComponentCheckbox;\n\n case \"checkboxgroup\":\n return FormComponents.FormComponentCheckboxGroup;\n\n case \"radiogroup\":\n return FormComponents.FormComponentRadioGroup;\n\n case \"select\":\n return FormComponents.FormComponentSelect;\n\n case \"selectmultiple\":\n return FormComponents.FormComponentSelectMultiple;\n\n case \"datetime\":\n return FormComponents.FormComponentDateTime;\n\n case \"date\":\n return FormComponents.FormComponentDate;\n\n // case \"date2\":\n // return FormComponents.FormComponentDate2;\n\n case \"time\":\n return FormComponents.FormComponentTime;\n\n case \"statictext\":\n return FormComponents.FormComponentStaticText;\n\n case \"likert\":\n return FormComponents.FormComponentLikert;\n\n case \"autocomplete\":\n return FormComponents.FormComponentAutocomplete;\n\n case \"multiautocomplete\":\n return FormComponents.FormComponentMultiAutocomplete;\n\n default:\n // @see https://github.com/VulcanJS/vulcan-npm/pull/31 discussions about custom components support from the context\n throw new Error(\n `Input name \"${inputName}\" is not a standard Vulcan form input (type: ${type}, input: ${input})`\n );\n }\n }\n};\n\nexport type FormOption<TField = any> = {\n label: string;\n value: TField;\n /** Can force a default value */\n checked?: boolean;\n};\n\nexport interface FormComponentProps<TField = any>\n extends Omit<FormField, \"type\"> {\n document: any;\n datatype: VulcanFieldType; // TODO: type of the field, replace this by a cleaner value like we do in graphql to get the field type\n disabled: boolean;\n errors: Array<any>;\n /** Help text for the form */\n help?: string;\n /** Path of the field if nested */\n path: string;\n defaultValue?: TField;\n max?: number;\n locale?: string;\n /** Input for this field */\n input?: VulcanFieldInput | string | React.Component;\n formType: \"new\" | \"edit\"; // new or edit\n intlInput?: boolean;\n nestedInput?: boolean;\n /** Graphql query you can pass to fetch the options asynchronously */\n query?: string;\n options?: Array<FormOption> | ((fciProps?: any) => Array<FormOption>);\n vulcanComponents?: PossibleVulcanComponents;\n}\n/**\n * Component for the display of any field of the form\n */\nexport const FormComponent = (props: FormComponentProps) => {\n /*\n TODO: replace with a useMemo\n shouldComponentUpdate(nextProps, nextState) {\n // allow custom controls to determine if they should update\n if (this.isCustomInput(this.getInputType(nextProps))) {\n return true;\n }\n\n const { document, deletedValues, errors } = nextProps;\n const path = getPath(this.props);\n\n // when checking for deleted values, both current path ('foo') and child path ('foo.0.bar') should trigger updates\n const includesPathOrChildren = (deletedValues) =>\n deletedValues.some((deletedPath) => deletedPath.includes(path));\n\n const valueChanged = !isEqual(\n get(document, path),\n get(this.props.document, path)\n );\n const errorChanged = !isEqual(this.getErrors(errors), this.getErrors());\n const deleteChanged =\n includesPathOrChildren(deletedValues) !==\n includesPathOrChildren(this.props.deletedValues);\n const charsChanged = nextState.charsRemaining !== this.state.charsRemaining;\n const disabledChanged = nextProps.disabled !== this.props.disabled;\n const helpChanged = nextProps.help !== this.props.help;\n\n const shouldUpdate =\n valueChanged ||\n errorChanged ||\n deleteChanged ||\n charsChanged ||\n disabledChanged ||\n helpChanged;\n\n return shouldUpdate;\n }*/\n\n const {\n locale,\n max,\n path,\n //type,\n datatype,\n input,\n intlInput,\n nestedInput,\n query,\n options,\n } = props;\n const { updateCurrentValues, deletedValues, clearFieldErrors } =\n useFormContext();\n\n const type = datatype;\n const countFromProps = getCharacterCountsFromProps(props);\n // equivalent to getDerivedStateFromProps\n const [charsCountState, setCharacterCounts] = useState<{\n charsCount: number;\n charsRemaining: number;\n } | null>(countFromProps);\n\n // TODO: move this logic somewhere else, as it is specific to String components.\n // Eg using an intermediate FormComponentText\n /*\n Updates the state of charsCount and charsRemaining as the users types\n */\n const updateCharacterCount = (value) => {\n if (!max)\n throw new Error(\n \"Cannot update character count when no max value is set.\"\n );\n setCharacterCounts(getCharacterCounts(value, max));\n };\n useEffect(() => {\n if (countFromProps) {\n setCharacterCounts(countFromProps);\n }\n }, [countFromProps?.charsCount, countFromProps?.charsRemaining]);\n /*\n\n Whether to keep track of and show remaining chars\n\n */\n let showCharsRemaining = false;\n let inputName = null;\n if (typeof input === \"string\") {\n inputName = getInputName(type, input);\n showCharsRemaining = !!(\n typeof max !== \"undefined\" &&\n inputName &&\n [\"url\", \"email\", \"textarea\", \"text\"].includes(inputName)\n );\n }\n // const inputType = inputName; // TODO: rename inputType in the corresponding child components\n\n /*\n Function passed to form controls (always controlled) to update their value\n (Note: we could use the context instead?)\n */\n const handleChange = (value) => {\n // if value is an empty string, delete the field\n if (value === \"\") {\n value = null;\n }\n // if this is a number field, convert value before sending it up to Form\n if (type === Number && value != null) {\n value = Number(value);\n } else if (type === SimpleSchema.Integer && value != null) {\n value = parseInt(value);\n }\n\n if (value !== getValue()) {\n const updateValue = locale ? { locale: locale, value } : value;\n updateCurrentValues({ [getPath(props)]: updateValue });\n clearFieldErrors(getPath(props));\n }\n\n // for text fields, update character count on change\n if (showCharsRemaining) {\n updateCharacterCount(value);\n }\n };\n\n /*\n Get value from Form state through document and currentValues props\n // TODO: get document from context\n */\n const getValue = () => {\n //const c = context || this.context;\n const { locale, defaultValue, formType, datatype } = props;\n const path = locale ? `${getPath(props)}.value` : getPath(props);\n const currentDocument = props.document;\n let value = get(currentDocument, path);\n // note: force intl fields to be treated like strings\n const nullValue = locale ? \"\" : getNullValue(datatype);\n\n // handle deleted & empty value\n if (deletedValues.includes(path)) {\n value = nullValue;\n } else if (isEmptyValue(value)) {\n // replace empty value by the default value from the schema if it exists – for new forms only\n value = formType === \"new\" && defaultValue ? defaultValue : nullValue;\n }\n return value;\n };\n\n /*\n\n Get errors from Form state through context\n\n Note: we use `includes` to get all errors from nested components, which have longer paths\n\n */\n const getErrors = (errors?: Array<any>) => {\n errors = errors || props.errors || [];\n const fieldErrors = errors.filter(\n (error) => error.path && error.path.includes(path)\n );\n return fieldErrors;\n };\n\n /*\n\n Function passed to form controls to clear their contents (set their value to null)\n\n */\n const clearField = (event) => {\n event.preventDefault();\n event.stopPropagation();\n updateCurrentValues({ [path]: null });\n if (showCharsRemaining) {\n updateCharacterCount(null);\n }\n };\n\n const FormComponents = useVulcanComponents();\n\n if (intlInput) {\n return <FormComponents.FormIntl {...props} />;\n } else if (!input && nestedInput) {\n if (isArrayField(type)) {\n return (\n <FormComponents.FormNestedArray\n {...props}\n formComponents={FormComponents}\n errors={getErrors()}\n value={getValue()}\n />\n );\n } else if (isObjectField(type)) {\n return (\n <FormComponents.FormNestedObject\n {...props}\n formComponents={FormComponents}\n errors={getErrors()}\n value={getValue()}\n />\n );\n }\n }\n\n const fciProps = {\n ...props,\n ...(charsCountState || {}),\n inputType: getInputName(type, input),\n value: getValue(),\n errors: getErrors(),\n showCharsRemaining: !!showCharsRemaining,\n handleChange: handleChange,\n clearField: clearField,\n formInput: getFormInput({ FormComponents, input, type }),\n };\n\n // if there is no query, handle options here; otherwise they will be handled by\n // the FormComponentLoader component\n if (!query && typeof options === \"function\") {\n fciProps.options = options(fciProps);\n }\n\n const fci = <FormComponents.FormComponentInner {...fciProps} />;\n\n return query ? (\n <FormComponents.FormComponentLoader {...fciProps}>\n {fci}\n </FormComponents.FormComponentLoader>\n ) : (\n fci\n );\n};\n\nexport const formComponentsDependencies = [\n \"FormComponentDefault\",\n \"FormComponentPassword\",\n \"FormComponentNumber\",\n \"FormComponentUrl\",\n \"FormComponentEmail\",\n \"FormComponentTextarea\",\n \"FormComponentCheckbox\",\n \"FormComponentCheckboxGroup\",\n \"FormComponentRadioGroup\",\n \"FormComponentSelect\",\n \"FormComponentSelectMultiple\",\n \"FormComponentDateTime\",\n \"FormComponentDate\",\n \"FormComponentDate2\",\n \"FormComponentTime\",\n \"FormComponentStaticText\",\n \"FormComponentLikert\",\n \"FormComponentAutocomplete\",\n \"FormComponentMultiAutocomplete\",\n];\n\nexport default FormComponent;\n","import type { VulcanFieldType, VulcanCoreInput } from \"@vulcanjs/schema\";\n// import SimpleSchema from \"simpl-schema\";\n\nexport const standardInputs: Array<VulcanCoreInput> = [\n \"number\",\n \"url\",\n \"email\",\n \"textarea\",\n \"checkbox\",\n \"checkboxgroup\",\n \"radiogroup\",\n \"select\",\n \"selectmultiple\",\n \"datetime\",\n \"date\",\n \"time\",\n \"text\",\n \"password\",\n];\n\nexport const clearableInputs: Array<VulcanCoreInput> = [\n \"date\",\n // \"date2\",\n \"datetime\",\n \"time\",\n \"select\",\n \"radiogroup\",\n];\nexport const advancedInputs: Array<VulcanCoreInput> = [\n \"likert\",\n \"autocomplete\",\n \"multiautocomplete\",\n];\nexport type DerivedInput = \"nested\";\nexport const derivedInputs: Array<DerivedInput> = [\"nested\"];\nexport const allVulcanInputs: Array<VulcanCoreInput | DerivedInput> = [\n ...standardInputs,\n ...advancedInputs,\n // derived inputs are specific to the Form internal computations\n // it can't be set by the user\n ...derivedInputs,\n];\n\nexport const getAutoInputFromType = (\n fieldType: VulcanFieldType\n): VulcanCoreInput => {\n const autoType =\n fieldType === Number //|| fieldType === SimpleSchema.Integer\n ? \"number\"\n : fieldType === Boolean\n ? \"checkbox\"\n : fieldType === Date\n ? \"date\"\n : \"text\";\n return autoType;\n};\n","import React, { MouseEventHandler } from \"react\";\nimport { useIntlContext } from \"@vulcanjs/react-i18n\";\nimport { whitelistInputProps } from \"../utils/ui_utils\";\nimport { FormComponentProps } from \"./FormComponent\";\n/*\nimport {\n instantiateComponent,\n whitelistInputProps,\n} from \"meteor/vulcan:core\";\n*/\nimport classNames from \"classnames\";\nimport { VulcanCoreInput } from \"@vulcanjs/schema\";\nimport { PossibleVulcanComponents } from \"../../VulcanComponents/typings\";\nimport { clearableInputs } from \"../inputs/consts\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\n\nexport interface FormComponentInnerProps extends FormComponentProps {\n inputType: VulcanCoreInput;\n //disabled?: boolean;\n // help?: string;\n /**\n * Callback called when clicking on the \"clear input\" button\n */\n clearField?: MouseEventHandler<HTMLButtonElement>;\n /**\n * TODO: not sure if it should be mandatory or not (eg for uncontrolled components?)\n */\n handleChange?: Function;\n itemProperties?: any;\n description?: string;\n loading?: boolean;\n submitForm: any;\n formComponents: PossibleVulcanComponents;\n intlKeys?: any;\n inputClassName: any;\n name?: string;\n input: any;\n beforeComponent: any;\n afterComponent: any;\n errors: any;\n showCharsRemaining: any;\n charsRemaining: any;\n renderComponent: any;\n formInput: any;\n}\n\nexport const FormComponentInner = (props: FormComponentInnerProps) => {\n const intl = useIntlContext();\n const { inputType, disabled, clearField } = props;\n\n const renderClear = () => {\n if (clearableInputs.includes(inputType) && !disabled) {\n /*\n From bootstrap:\n <Components.TooltipTrigger\n trigger={\n <button\n className=\"form-component-clear\"\n title={this.context.intl.formatMessage({\n id: \"forms.clear_field\",\n })}\n onClick={this.props.clearField}\n >\n <span>✕</span>\n </button>\n }\n >\n <Components.FormattedMessage id=\"forms.clear_field\" />\n </Components.TooltipTrigger>\n */\n return (\n <button\n className=\"form-component-clear\"\n title={intl.formatMessage({\n id: \"forms.clear_field\",\n })}\n onClick={clearField}\n >\n <span>✕</span>\n </button>\n );\n }\n };\n\n const getProperties = (): FormInputProps => {\n const {\n handleChange,\n inputType,\n itemProperties,\n help,\n description,\n loading,\n submitForm,\n formComponents,\n intlKeys,\n } = props;\n const properties = {\n ...props,\n inputProperties: {\n ...whitelistInputProps(props),\n onChange: (event) => {\n // FormComponent's handleChange expects value as argument; look in target.checked or target.value\n const inputValue =\n inputType === \"checkbox\"\n ? // TODO: not sure why we need an ignore there\n // @ts-ignore\n event.target.checked\n : // @ts-ignore\n event.target.value;\n if (handleChange) {\n handleChange(inputValue);\n }\n },\n /*\n TODO: check if this creates regression\n onKeyPress: (event) => {\n if (event.key === \"Enter\" && inputType !== \"textarea\") {\n submitForm();\n }\n },\n */\n },\n\n itemProperties: {\n ...itemProperties,\n intlKeys,\n Components: formComponents,\n description: description || help,\n loading,\n },\n };\n return properties;\n };\n\n const {\n inputClassName,\n name,\n input,\n //inputType,\n beforeComponent,\n afterComponent,\n errors,\n showCharsRemaining,\n charsRemaining,\n renderComponent,\n formInput,\n } = props;\n\n const FormComponents = useVulcanComponents();\n //const FormComponents = formComponents;\n\n const hasErrors = errors && errors.length;\n\n const inputName = typeof input === \"function\" ? input.name : inputType;\n const inputClass = classNames(\n \"form-input\",\n inputClassName,\n `input-${name}`,\n `form-component-${inputName || \"default\"}`,\n {\n \"input-error\": hasErrors,\n }\n );\n const properties = getProperties();\n\n const FormInput = formInput;\n\n return (\n <div className={inputClass}>\n {/*instantiateComponent(beforeComponent, properties)*/}\n <FormInput {...properties} />\n {hasErrors ? <FormComponents.FieldErrors errors={errors} /> : null}\n {renderClear()}\n {showCharsRemaining && (\n <div\n className={classNames(\"form-control-limit\", {\n danger: charsRemaining < 10,\n })}\n >\n {charsRemaining}\n </div>\n )}\n {/*instantiateComponent(afterComponent, properties)*/}\n </div>\n );\n};\n\n/**\n * Props passed to Vulcan Smart Form input\n * Use those props to define custom inputs\n */\nexport interface FormInputProps<TInput = HTMLInputElement>\n extends FormComponentInnerProps {\n // TODO: note sure about this, there also seems to be label and other props that are not HTMLInput props per se\n // It may depend on the type of input as well, maybe the type is more an union\n /**\n * Input properties will contain all props that can be safely passed down to the root input\n * (often an HTML \"input\" or textarea)\n *\n * This includes the current \"value\", that can be obtained either from \"props\" or \"props.inputProperties.value\"\n * in input components\n */\n inputProperties: React.HTMLProps<TInput>;\n itemProperties: any; // TODO\n}\nexport type FormTextAreaProps = FormInputProps<HTMLTextAreaElement>;\n","import pick from \"lodash/pick.js\";\n\n/**\n * Extract input props for the FormComponentInner\n * @param {*} props All component props\n * @returns Initial props + props specific to the HTML input in an inputProperties object\n */\nexport const getHtmlInputProps = (props) => {\n const { name, path, options, label, onChange, onBlur, value, disabled } =\n props;\n\n // these properties are whitelisted so that they can be safely passed to the actual form input\n // and avoid https://facebook.github.io/react/warnings/unknown-prop.html warnings\n const inputProperties = {\n ...props.inputProperties,\n name,\n path,\n options,\n label,\n onChange,\n onBlur,\n value,\n disabled,\n };\n\n return {\n ...props,\n inputProperties,\n };\n};\n\n/**\n * Extract input props for the FormComponentInner\n * @param {*} props All component props\n * @returns Initial props + props specific to the HTML input in an inputProperties object\n */\nexport const whitelistInputProps = (\n props: any\n): React.HTMLProps<HTMLInputElement> => {\n const whitelist = [\n \"name\",\n \"path\",\n \"options\",\n \"label\",\n \"onChange\",\n \"onBlur\",\n \"value\",\n \"disabled\",\n \"placeholder\",\n ];\n const value = props.value;\n let safeValue = value;\n // No null values in HTML inputs\n if (value === null) safeValue = undefined;\n // if value is null, return undefined\n return { ...pick(props, whitelist), value: safeValue };\n};\n","/**\n * Changes from Vulcan Meteor:\n * - query is not expanded: you need to pass the full query with fragments already\n */\nimport React, { useEffect } from \"react\";\n// @see packages/vulcan-lib/lib/modules/fragments.js in Vulcan\n// should we reenable this?\n// import { expandQueryFragments } from \"meteor/vulcan:core\";\nimport { useLazyQuery } from \"@apollo/client\";\nimport gql from \"graphql-tag\";\nimport isEmpty from \"lodash/isEmpty.js\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\n\nexport interface FormComponentLoaderProps {\n query: string | (({ value: any }) => string);\n children: React.ReactNode;\n options: any;\n value: any;\n /** Run the query only when value is not empty */\n queryWaitsForValue?: boolean;\n}\nexport const FormComponentLoader = (props: FormComponentLoaderProps) => {\n const VulcanComponents = useVulcanComponents();\n const { query, children, options, value, queryWaitsForValue } = props;\n\n // if query is a function, execute it\n const queryText = typeof query === \"function\" ? query({ value }) : query;\n\n const [loadFieldQuery, { loading, error, data }] = useLazyQuery(\n gql(queryText)\n // gql(expandQueryFragments(queryText))\n );\n\n const valueIsEmpty =\n isEmpty(value) || (Array.isArray(value) && value.length) === 0;\n\n useEffect(() => {\n if (queryWaitsForValue && valueIsEmpty) {\n // we don't want to run this query until we have a value to pass to it\n // so do nothing\n } else {\n loadFieldQuery({\n variables: { value },\n });\n }\n }, [valueIsEmpty, value, queryWaitsForValue]);\n\n if (error) {\n throw new Error(error.toString());\n }\n\n if (loading) {\n return (\n <div className=\"form-component-loader\">\n <VulcanComponents.Loading />\n </div>\n );\n }\n\n // pass newly loaded data (and options if needed) to child component\n const extraProps: {\n data: any;\n queryData: any;\n queryError: any;\n loading: boolean;\n optionsFunction?: Function;\n options?: Array<any>;\n } = { data, queryData: data, queryError: error, loading };\n if (typeof options === \"function\") {\n extraProps.optionsFunction = options;\n extraProps.options = options.call({}, { ...props, data });\n }\n if (!React.isValidElement(children)) {\n throw new Error(\n \"Children of FormComponentLoader must be a React element, got \" + children\n );\n }\n const fci = React.cloneElement(children, extraProps);\n\n return <div className=\"form-component-loader\">{fci}</div>;\n};\n\nFormComponentLoader.propTypes = {};\n","import React, { PureComponent, useState } from \"react\";\nimport _some from \"lodash/some.js\";\nimport { VulcanUser, isAdmin } from \"@vulcanjs/permissions\";\nimport { FieldGroup } from \"@vulcanjs/schema\";\nimport { FormField } from \"../typings\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\nimport { useFormContext } from \"./FormContext\";\n\nexport interface FormGroupProps {\n name: string;\n label: string;\n group: FieldGroup /*{\n adminsOnly?: boolean;\n beforeComponent?: any;\n };*/;\n fields: Array<FormField>;\n hidden?: boolean | Function;\n disabled?: boolean;\n document: any;\n currentUser?: VulcanUser;\n itemProperties: any;\n formType: any;\n prefilledProps: any;\n}\n\n/**\n * TODO: take unused props into account\n * @param param0\n * @returns\n */\nexport const FormGroupLayout = ({\n anchorName,\n collapsed,\n hasErrors,\n group,\n document,\n toggle,\n ...props\n}) => {\n return <fieldset {...props} />;\n};\n\nexport const FormGroupHeader = (props) => <h2 {...props} />;\n\nexport const FormGroup /*<FormGroupProps, FormGroupState>*/ = (\n props: FormGroupProps\n) => {\n // TODO: get value/update methods from context instead\n const {\n name,\n label,\n group,\n fields,\n hidden,\n document,\n currentUser,\n disabled,\n itemProperties,\n prefilledProps,\n formType,\n } = props;\n const { errors, clearFieldErrors } = useFormContext();\n const [collapsed, setCollapsed] = useState<boolean>(\n group.startCollapsed || false\n );\n const toggle = () => setCollapsed((collapsed) => !collapsed);\n // if at least one of the fields in the group has an error, the group as a whole has an error\n const hasErrors = _some(fields, (field) => {\n return !!errors.filter((error) => error.path === field.path).length;\n });\n const VulcanComponents = useVulcanComponents();\n\n const isHidden =\n typeof hidden === \"function\"\n ? hidden({ ...props, document })\n : hidden || false;\n /*\n static propTypes = {\n name: PropTypes.string,\n label: PropTypes.string,\n order: PropTypes.number,\n hidden: PropTypes.func,\n fields: PropTypes.array.isRequired,\n group: PropTypes.object.isRequired,\n errors: PropTypes.array.isRequired,\n throwError: PropTypes.func.isRequired,\n currentValues: PropTypes.object.isRequired,\n updateCurrentValues: PropTypes.func.isRequired,\n deletedValues: PropTypes.array.isRequired,\n addToDeletedValues: PropTypes.func.isRequired,\n clearFieldErrors: PropTypes.func.isRequired,\n formType: PropTypes.string.isRequired,\n currentUser: PropTypes.object,\n prefilledProps: PropTypes.object,\n };*/\n\n const heading = (\n <VulcanComponents.FormGroupHeader\n toggle={toggle}\n label={label}\n collapsed={collapsed}\n hidden={isHidden}\n group={group}\n />\n );\n\n if (group.adminsOnly && !isAdmin(currentUser)) {\n return null;\n }\n const anchorName = name.split(\".\").length > 1 ? name.split(\".\")[1] : name;\n\n return (\n <VulcanComponents.FormGroupLayout\n label={label}\n anchorName={anchorName}\n toggle={toggle}\n collapsed={collapsed}\n hidden={isHidden}\n group={group}\n heading={name === \"default\" ? null : heading}\n hasErrors={hasErrors}\n document={document}\n >\n {/* TODO: create TS error at the moment: group.beforeComponent && <group.beforeComponent {...props} />*/}\n {/** TODO: we pass all the functions as props to the FormComponent,\n * but it should rely on the context instead for methods\n */}\n\n {fields.map((field) => (\n <VulcanComponents.FormComponent\n key={field.name}\n disabled={disabled}\n {...field}\n document={document}\n itemProperties={{\n ...itemProperties,\n ...field.itemProperties,\n }}\n clearFieldErrors={clearFieldErrors}\n formType={formType}\n currentUser={currentUser}\n prefilledProps={prefilledProps}\n />\n ))}\n\n {/* TODO: create TS error at the moment: group.afterComponent && <group.afterComponent {...props} />*/}\n </VulcanComponents.FormGroupLayout>\n );\n};\n\nexport default FormGroup;\n","import React from \"react\";\nimport omit from \"lodash/omit.js\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\nimport { useFormContext } from \"../core/FormContext\";\n//import type { LocaleType } from \"@vulcanjs/i18n\";\n\n// const Locales: Array<{ id: string }> = []; // ?? might need to get this from context\nexport const FormIntlLayout = ({ children }) => (\n <div className=\"form-intl\">{children}</div>\n);\nexport const FormIntlItemLayout = ({ locale, children }) => (\n <div className={`form-intl-${locale.id}`}>{children}</div>\n);\n\ninterface FormIntlProps {\n path: string;\n name: string;\n // TODO: this should probably be provided by i18n context instead\n //Locales: Array<LocaleType>;\n}\n\nexport const FormIntl = (props: FormIntlProps) => {\n const FormComponents = useVulcanComponents();\n const { getLabel } = useFormContext();\n // TODO: we don't have a globale \"Locales\" object anymore\n // so we need to get this from context somehow\n //const { Locales } = props;\n const Locales: Array<any> = []; // TODO: get it from i18n context instead that exposes the LocalesRegistry\n /*\n Note: ideally we'd try to make sure to return the right path no matter\n the order translations are stored in, but in practice we can't guarantee it\n so we just use the order of the Locales array.\n\n */\n const getLocalePath = (defaultIndex) => {\n return `${props.path}_intl.${defaultIndex}`;\n };\n\n const { name } = props;\n\n // do not pass FormIntl's own value, inputProperties, and intlInput props down\n const properties = omit(\n props,\n \"value\",\n \"inputProperties\",\n \"intlInput\",\n \"nestedInput\"\n );\n return (\n <FormComponents.FormIntlLayout>\n {Locales.map((locale, i) => (\n <FormComponents.FormIntlItemLayout key={locale.id} locale={locale}>\n <FormComponents.FormComponent\n {...properties}\n label={getLabel(name, locale.id)}\n path={getLocalePath(i)}\n locale={locale.id}\n />\n </FormComponents.FormIntlItemLayout>\n ))}\n </FormComponents.FormIntlLayout>\n );\n};\n","export * from \"./FormNestedArray\";\nexport * from \"./FormNestedArrayLayout\";\nexport * from \"./FormNestedItem\";\nexport * from \"./FormNestedDivider\";\nexport * from \"./FormNestedObject\";\n","/**\n * Change compared to Vulcan Meteor:\n * after/before => After, Before with titlecase\n */\nimport React, { useEffect } from \"react\";\nimport _omit from \"lodash/omit.js\";\nimport _get from \"lodash/get.js\";\nimport { useFormContext } from \"../core/FormContext\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\n\n// Wraps the FormNestedItem, repeated for each object\n// Allow for example to have a label per object\nexport const FormNestedArrayInnerLayout = (props) => {\n const { label, children, addItem, BeforeComponent, AfterComponent } = props;\n const FormComponents = useVulcanComponents();\n return (\n <div className=\"form-nested-array-inner-layout\">\n <BeforeComponent {...props} />\n {children}\n <FormComponents.FormNestedDivider label={label} addItem={addItem} />\n <AfterComponent {...props} />\n </div>\n );\n};\n\nexport interface FormNestedArrayProps<TValue = any> {\n value: TValue;\n /** Path for the nested object */\n path: string;\n itemProperties: any;\n minCount?: number;\n maxCount?: number;\n arrayField?: boolean;\n nestedArrayErrors: any;\n hasErrors?: boolean;\n // TODO: get from context\n prefilledProps?: any;\n addItem: Function | null;\n}\nexport const FormNestedArray = (props: FormNestedArrayProps) => {\n const { updateCurrentValues, deletedValues, errors } = useFormContext();\n /*static defaultProps = {\n itemProperties: {},\n };*/\n const value = props.value || [];\n\n const addItem = () => {\n const { prefilledProps, path } = props;\n updateCurrentValues(\n { [`${path}.${value.length}`]: _get(prefilledProps, `${path}.$`) || {} },\n { mode: \"merge\" }\n );\n };\n\n const removeItem = (index) => {\n updateCurrentValues({ [`${props.path}.${index}`]: null });\n };\n\n /*\n\n Go through this.context.deletedValues and see if any value matches both the current field\n and the given index (ex: if we want to know if the second address is deleted, we\n look for the presence of 'addresses.1')\n */\n const isDeleted = (index) => {\n return deletedValues.includes(`${props.path}.${index}`);\n };\n\n const computeVisibleIndex = (values) => {\n let currentIndex = 0;\n const visibleIndexes = values.map((subDocument, subDocumentIndx) => {\n if (isDeleted(subDocumentIndx)) {\n return 0;\n } else {\n currentIndex = currentIndex + 1;\n return currentIndex;\n }\n });\n return visibleIndexes;\n };\n\n useEffect(() => {\n if (props.itemProperties.openNested) addItem();\n }, []);\n\n const visibleItemIndexes = computeVisibleIndex(value);\n // do not pass FormNested's own value, input and inputProperties props down\n const properties = {\n ..._omit(\n props,\n \"value\",\n \"input\",\n \"inputProperties\",\n \"nestedInput\",\n \"beforeComponent\",\n \"afterComponent\"\n ),\n };\n const { path, minCount, maxCount, arrayField } = props;\n const FormComponents = useVulcanComponents();\n\n //filter out null values to calculate array length\n let arrayLength = value.filter((singleValue) => {\n return typeof singleValue !== \"undefined\" && singleValue !== null;\n }).length;\n properties.addItem = !maxCount || arrayLength < maxCount ? addItem : null;\n\n // only keep errors specific to the nested array (and not its subfields)\n properties.nestedArrayErrors = errors.filter(\n (error) => error.path && error.path === path\n );\n properties.hasErrors = !!(\n properties.nestedArrayErrors && properties.nestedArrayErrors.length\n );\n\n return (\n <FormComponents.FormNestedArrayLayout {...properties}>\n {value.map((subDocument, i) => {\n if (isDeleted(i)) return null;\n const path = `${props.path}.${i}`;\n const visibleItemIndex = visibleItemIndexes[i];\n return (\n <FormComponents.FormNestedArrayInnerLayout\n {...arrayField}\n key={path}\n addItem={addItem}\n itemIndex={i}\n visibleItemIndex={visibleItemIndex}\n path={path}\n >\n <FormComponents.FormNestedItem\n {...properties}\n itemIndex={i}\n visibleItemIndex={visibleItemIndex}\n path={path}\n removeItem={() => {\n removeItem(i);\n }}\n hideRemove={!!minCount && arrayLength <= minCount}\n />\n </FormComponents.FormNestedArrayInnerLayout>\n );\n })}\n </FormComponents.FormNestedArrayLayout>\n );\n};\n\nexport const formComponentsDependencies = [\n \"FormNestedArrayInnerLayout\",\n \"FormNestedArrayLayout\",\n];\n\nexport default FormNestedArray;\n\nexport const IconAdd = ({ width = 24, height = 24 }) => (\n <svg\n width={width}\n height={height}\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 448 512\"\n >\n <path\n fill=\"currentColor\"\n d=\"M448 294.2v-76.4c0-13.3-10.7-24-24-24H286.2V56c0-13.3-10.7-24-24-24h-76.4c-13.3 0-24 10.7-24 24v137.8H24c-13.3 0-24 10.7-24 24v76.4c0 13.3 10.7 24 24 24h137.8V456c0 13.3 10.7 24 24 24h76.4c13.3 0 24-10.7 24-24V318.2H424c13.3 0 24-10.7 24-24z\"\n />\n </svg>\n);\n\nexport const IconRemove = ({ width = 24, height = 24 }) => (\n <svg\n width={width}\n height={height}\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 448 512\"\n >\n <path\n fill=\"currentColor\"\n d=\"M424 318.2c13.3 0 24-10.7 24-24v-76.4c0-13.3-10.7-24-24-24H24c-13.3 0-24 10.7-24 24v76.4c0 13.3 10.7 24 24 24h400z\"\n />\n </svg>\n);\n","import PropTypes from \"prop-types\";\nimport React from \"react\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\n\n// Replaceable layout, default implementation\nexport const FormNestedArrayLayout = (props) => {\n const {\n hasErrors,\n nestedArrayErrors,\n label,\n addItem,\n BeforeComponent,\n AfterComponent,\n children,\n } = props;\n const VulcanComponents = useVulcanComponents();\n\n return (\n <div\n className={`form-group row form-nested ${hasErrors ? \"input-error\" : \"\"}`}\n >\n {BeforeComponent && <BeforeComponent {...props} />}\n\n <label className=\"control-label col-sm-3\">{label}</label>\n\n <div className=\"col-sm-9\">\n {children}\n {addItem && (\n <VulcanComponents.Button\n className=\"form-nested-button form-nested-add\"\n size=\"sm\"\n variant=\"success\"\n onClick={addItem}\n >\n <VulcanComponents.IconAdd height={12} width={12} />\n </VulcanComponents.Button>\n )}\n {props.hasErrors ? (\n <VulcanComponents.FieldErrors\n key=\"form-nested-errors\"\n errors={nestedArrayErrors}\n />\n ) : null}\n </div>\n\n {AfterComponent && <AfterComponent {...props} />}\n </div>\n );\n};\n\nFormNestedArrayLayout.propTypes = {\n hasErrors: PropTypes.bool.isRequired,\n nestedArrayErrors: PropTypes.array,\n label: PropTypes.node,\n hideLabel: PropTypes.bool,\n addItem: PropTypes.func,\n beforeComponent: PropTypes.node,\n afterComponent: PropTypes.node,\n formComponents: PropTypes.object,\n children: PropTypes.node,\n};\n\nexport default FormNestedArrayLayout;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { intlShape } from \"@vulcanjs/react-i18n\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\nimport { useIntlContext } from \"@vulcanjs/react-i18n\";\n\nexport const FormNestedItemLayout = ({ content, removeButton }) => (\n <div className=\"form-nested-item\">\n <div className=\"form-nested-item-inner\">{content}</div>\n {removeButton && [\n <div key=\"remove-button\" className=\"form-nested-item-remove\">\n {removeButton}\n </div>,\n <div\n key=\"remove-button-overlay\"\n className=\"form-nested-item-deleted-overlay\"\n />,\n ]}\n </div>\n);\nFormNestedItemLayout.propTypes = {\n content: PropTypes.node.isRequired,\n removeButton: PropTypes.node,\n};\n\nexport const FormNestedItem = ({\n nestedFields,\n name,\n path,\n removeItem,\n itemIndex,\n formComponents,\n hideRemove,\n label,\n ...props\n}) => {\n const VulcanComponents = useVulcanComponents();\n const intl = useIntlContext();\n const isArray = typeof itemIndex !== \"undefined\";\n return (\n <VulcanComponents.FormNestedItemLayout\n content={nestedFields.map((field, i) => {\n return (\n <VulcanComponents.FormComponent\n key={i}\n {...props}\n {...field}\n path={`${path}.${field.name}`}\n itemIndex={itemIndex}\n />\n );\n })}\n removeButton={\n isArray &&\n !hideRemove && [\n <div key=\"remove-button\" className=\"form-nested-item-remove\">\n <VulcanComponents.Button\n className=\"form-nested-button\"\n variant=\"danger\"\n size=\"sm\"\n iconButton\n tabIndex={-1}\n onClick={() => {\n removeItem(name);\n }}\n aria-label={intl.formatMessage(\n { id: \"forms.delete_nested_field\" },\n { label: label }\n )}\n >\n <VulcanComponents.IconRemove height={12} width={12} />\n </VulcanComponents.Button>\n </div>,\n <div\n key=\"remove-button-overlay\"\n className=\"form-nested-item-deleted-overlay\"\n />,\n ]\n }\n />\n );\n};\n\nFormNestedItem.propTypes = {\n path: PropTypes.string.isRequired,\n itemIndex: PropTypes.number,\n formComponents: PropTypes.object,\n hideRemove: PropTypes.bool,\n};\n\nFormNestedItem.contextTypes = {\n errors: PropTypes.array,\n intl: intlShape,\n};\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nexport const FormNestedDivider = ({ label, addItem }) => <div />;\n\nFormNestedDivider.propTypes = {\n label: PropTypes.string,\n addItem: PropTypes.func,\n};\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport _omit from \"lodash/omit.js\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\nimport { useFormContext } from \"../core/FormContext\";\n\n// Replaceable layout\nexport const FormNestedObjectLayout = ({ hasErrors, label, content }) => (\n <div\n className={`form-group row form-nested ${hasErrors ? \"input-error\" : \"\"}`}\n >\n <label className=\"control-label col-sm-3\">{label}</label>\n <div className=\"col-sm-9\">{content}</div>\n </div>\n);\nFormNestedObjectLayout.propTypes = {\n hasErrors: PropTypes.oneOfType([PropTypes.number, PropTypes.bool]),\n label: PropTypes.node,\n content: PropTypes.node,\n};\n\ninterface FormNestedObjectProps {\n label?: string;\n value: any;\n input: any;\n inputProperties: any;\n nestedInput: any;\n errors: Array<any>;\n path: string;\n}\nexport const FormNestedObject = (props: FormNestedObjectProps) => {\n const VulcanComponents = useVulcanComponents();\n //const value = this.getCurrentValue()\n // do not pass FormNested's own value, input and inputProperties props down\n const properties = _omit(\n props,\n \"value\",\n \"input\",\n \"inputProperties\",\n \"nestedInput\"\n );\n const { errors } = useFormContext();\n // only keep errors specific to the nested array (and not its subfields)\n const nestedObjectErrors = errors.filter(\n (error) => error.path && error.path === props.path\n );\n const hasErrors = nestedObjectErrors && nestedObjectErrors.length;\n return (\n <VulcanComponents.FormNestedObjectLayout\n hasErrors={hasErrors}\n label={props.label}\n content={[\n <VulcanComponents.FormNestedItem\n key=\"form-nested-item\"\n {...properties}\n path={`${props.path}`}\n />,\n hasErrors ? (\n <VulcanComponents.FieldErrors\n key=\"form-nested-errors\"\n errors={nestedObjectErrors}\n />\n ) : null,\n ]}\n />\n );\n};\n\nFormNestedObject.propTypes = {\n currentValues: PropTypes.object,\n path: PropTypes.string,\n label: PropTypes.string,\n errors: PropTypes.array.isRequired,\n formComponents: PropTypes.object,\n};\n\nexport default FormNestedObject;\n","export * from \"./BasicInputs\";\nexport * from \"./RadioGroup\";\nexport * from \"./Checkboxgroup\";\nexport * from \"./SelectInputs\";\n\nexport * from \"./FormItem\";\nexport * from \"./FormOptionLabel\";\n\nexport * from \"./AutocompleteMultiple\";\n","import React from \"react\";\nimport { FormInputProps, FormTextAreaProps } from \"../core/FormComponentInner\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\n\n/**\n * Converts props passed by Vulcan to an HTML Input\n * @see packages/vulcan-ui-bootstrap/lib/components/forms/FormItem.jsx in Vulcan\n * @param param0\n * @returns\n */\nconst HTMLInputAdapter = (props: FormInputProps & { type: string }) => {\n const Components = useVulcanComponents();\n const { inputProperties = {}, itemProperties = {}, path } = props;\n const { label, name, ...otherInputProperties } = inputProperties;\n\n return (\n <Components.FormItem\n name={name}\n path={path}\n label={label}\n inputProperties={inputProperties}\n {...itemProperties}\n >\n {/* @ts-ignore FIXME: leads to \"Types of property 'capture' are incompatible\" when trying to build the types... */}\n <input\n {...otherInputProperties}\n id={name} // needed for accessibility. NOTE: we might need to use \"context\" as a prefix when having\n // multiple forms for the same kind of data\n name={name}\n type={props.type}\n />\n </Components.FormItem>\n );\n};\n\nexport const FormComponentDefault = (props: FormInputProps) => (\n <HTMLInputAdapter type=\"text\" {...props} />\n);\nexport const FormComponentPassword = (props: FormInputProps) => (\n <HTMLInputAdapter type=\"password\" {...props} />\n);\nexport const FormComponentNumber = (props: FormInputProps) => (\n <HTMLInputAdapter type=\"number\" {...props} />\n);\nexport const FormComponentUrl = (props: FormInputProps) => (\n <HTMLInputAdapter type=\"url\" {...props} />\n);\nexport const FormComponentEmail = (props: FormInputProps) => (\n <HTMLInputAdapter type=\"email\" {...props} />\n);\n// TODO: at the moment we use a select instead\nexport const FormComponentCheckbox = (props: FormInputProps) => {\n return <HTMLInputAdapter type=\"checkbox\" {...props} />;\n //<HTMLSelectAdapter type=\"checkbox\" {...props} />\n};\n\nexport const FormComponentDate = (props) => (\n <HTMLInputAdapter type=\"date\" {...props} />\n);\n/*\nexport const FormComponentDate2 = (props) => (\n <HTMLInputAdapter {...props} />\n);\n*/\nexport const FormComponentDateTime = (props) => (\n <HTMLInputAdapter type=\"datetime-local\" {...props} />\n);\nexport const FormComponentTime = (props) => (\n <HTMLInputAdapter type=\"time\" {...props} />\n);\nexport const FormComponentStaticText = (props: FormInputProps) => {\n const { inputProperties } = props;\n return <input {...inputProperties} disabled />;\n};\nexport const FormComponentLikert = (props) =>\n \"Likert component not yet implemented\";\nexport const FormComponentAutocomplete = (props) =>\n \"Autocomplete component not yet implemented\";\n//export const FormComponentMultiAutocomplete = (props) =>\n// \"MultiAutocomplete component not yet implemented\";\n\nexport const FormComponentTextarea = (props: FormTextAreaProps) => {\n const Components = useVulcanComponents();\n const { inputProperties = {}, itemProperties = {}, path } = props;\n const { label, name, ...otherInputProperties } = inputProperties;\n return (\n <Components.FormItem\n name={name}\n path={path}\n label={label}\n inputProperties={inputProperties}\n {...itemProperties}\n >\n <label htmlFor=\"name\">{label}</label>\n <textarea {...inputProperties} />\n </Components.FormItem>\n );\n};\n","import React from \"react\";\nimport { FormInputProps } from \"../core/FormComponentInner\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\n/**\n *\n * @param props\n * @returns\n */\nexport const FormComponentRadioGroup = (props: FormInputProps) => {\n const {\n value: propsValue,\n path,\n inputProperties,\n options = [],\n itemProperties,\n } = props;\n // NOTE: inputProperties.value is undefined\n // use \"props.value\" instead\n const { label, name } = inputProperties;\n if (!Array.isArray(options))\n throw new Error(\"RadioGroup not yet supporting functional options\");\n\n const Components = useVulcanComponents();\n return (\n <Components.FormItem\n path={path}\n name={name}\n label={label}\n inputProperties={inputProperties}\n {...itemProperties}\n >\n {/** TODO: whitelisting feature should be smarter to differentiate select and input */}\n {options.map((option) => {\n // NOTE: option can also have custom values, used by the FormOptionLabel component\n const { value, label } = option;\n return (\n <div key={value} className=\"form-radio-group-radio-item\">\n <Components.FormOptionLabel option={option} />\n <input\n type=\"radio\"\n id={value}\n name={name}\n key={value}\n {...inputProperties}\n value={value}\n checked={value === propsValue}\n />\n </div>\n );\n })}\n </Components.FormItem>\n );\n};\n","import React, { useState } from \"react\";\nimport without from \"lodash/without.js\";\nimport omit from \"lodash/omit.js\";\nimport uniq from \"lodash/uniq.js\";\nimport isEmpty from \"lodash/isEmpty.js\";\nimport { useVulcanComponents } from \"../../VulcanComponents\";\nimport { FormInputProps } from \"../core/FormComponentInner\";\nimport { useFormContext } from \"..\";\n\n// this marker is used to identify \"other\" values\nexport const otherMarker = \"[other]\";\n\n// check if a string is an \"other\" value\nexport const isOtherValue = (s) =>\n s && typeof s === \"string\" && s.substr(0, otherMarker.length) === otherMarker;\n\n// remove the \"other\" marker from a string\nexport const removeOtherMarker = (s) =>\n s && typeof s === \"string\" && s.substr(otherMarker.length);\n\n// add the \"other\" marker to a string\nexport const addOtherMarker = (s) => `${otherMarker}${s}`;\n\n// return array of values without the \"other\" value\nexport const removeOtherValue = (a) => {\n return a.filter((s) => !isOtherValue(s));\n};\n\nconst OtherComponent = ({\n value,\n path,\n}: {\n value: Array<any>;\n path: string;\n}) => {\n const { updateCurrentValues } = useFormContext();\n const Components = useVulcanComponents();\n\n const otherValue = removeOtherMarker(value.find(isOtherValue));\n // get copy of checkbox group values with \"other\" value removed\n const withoutOtherValue = removeOtherValue(value);\n\n // keep track of whether \"other\" field is shown or not\n const [showOther, setShowOther] = useState(!!otherValue);\n\n // keep track of \"other\" field value locally\n const [textFieldValue, setTextFieldValue] = useState(otherValue);\n\n // textfield properties\n const textFieldInputProperties = {\n name,\n value: textFieldValue,\n onChange: (event) => {\n const fieldValue = event.target.value;\n // first, update local state\n setTextFieldValue(fieldValue);\n // then update global form state\n const newValue = isEmpty(fieldValue)\n ? withoutOtherValue\n : [...withoutOtherValue, addOtherMarker(fieldValue)];\n updateCurrentValues({ [path]: newValue });\n },\n };\n const textFieldItemProperties = { layout: \"elementOnly\" };\n\n return (\n <div className=\"form-option-other\">\n <Components.FormComponentCheckbox\n layout=\"elementOnly\"\n label={\"Other\"}\n value={showOther}\n checked={showOther}\n onClick={(event) => {\n const isChecked = event.target.checked;\n setShowOther(isChecked);\n if (isChecked) {\n // if checkbox is checked and textfield has value, update global form state with current textfield value\n if (textFieldValue) {\n updateCurrentValues({\n [path]: [...withoutOtherValue, addOtherMarker(textFieldValue)],\n });\n }\n } else {\n // if checkbox is unchecked, also clear out field value from global form state\n updateCurrentValues({ [path]: withoutOtherValue });\n }\n }}\n />\n {showOther && (\n <Components.FormComponentText\n inputProperties={textFieldInputProperties}\n itemProperties={textFieldItemProperties}\n />\n )}\n </div>\n );\n};\n\nexport const FormComponentCheckboxGroup = (props: FormInputProps) => {\n const { updateCurrentValues } = useFormContext();\n const {\n value: valueFromProps,\n multiple,\n inputProperties = {},\n options = [],\n itemProperties,\n path,\n } = props;\n const { label, name } = inputProperties;\n\n // Previously options were retrived from inputProperties?\n //const { options = [], name } = inputProperties;\n\n const Components = useVulcanComponents();\n\n if (!Array.isArray(options))\n throw new Error(\n \"FormComponentCheckboxGroup not yet supporting functional options\"\n );\n\n // get rid of duplicate values; or any values that are not included in the options provided\n // (unless they have the \"other\" marker)\n const value: Array<string | number | null> = valueFromProps\n ? uniq(\n valueFromProps.filter(\n (v) => isOtherValue(v) || options.map((o) => o.value).includes(v)\n )\n )\n : [];\n\n const hasValue = value.length > 0;\n\n // if this is a \"new document\" form check options' \"checked\" property to populate value\n /*\n TODO: not sure how to get formType value\n if (formType === \"new\" && value.length === 0) {\n const checkedValues = options.filter(o => !!o.checked).map(\n (option) => option.value\n );\n if (checkedValues.length) {\n value = checkedValues;\n }\n }*/\n return (\n <Components.FormItem\n name={name}\n label={label}\n path={path}\n inputProperties={inputProperties}\n {...itemProperties}\n >\n <div className=\"form-item-options\">\n {options.map((option, i) => {\n const isChecked = value.includes(option.value);\n const checkClass = hasValue\n ? isChecked\n ? \"form-check-checked\"\n : \"form-check-unchecked\"\n : \"\";\n return (\n <div className=\"form-item-option\" key={option.value}>\n <Components.FormOptionLabel option={option} name={name} />\n <input\n type=\"checkbox\"\n {...omit(inputProperties, \"value\")}\n name={name}\n //layout=\"elementOnly\"\n key={i}\n /*label={\n <Components.FormOptionLabel option={option} name={name} />\n }*/\n //value={isChecked}\n checked={isChecked}\n id={`${path}.${i}`}\n // path={`${path}.${i}`}\n //ref={refFunction}\n onChange={(event) => {\n const isChecked = event.target.checked;\n const newValue = isChecked\n ? [...value, option.value]\n : without(value, option.value);\n updateCurrentValues({ [path]: newValue });\n }}\n className={checkClass}\n />\n </div>\n );\n })}\n {itemProperties.showOther && (\n <OtherComponent value={value} path={path} />\n )}\n </div>\n </Components.FormItem>\n );\n};\n","import React from \"react\";\nimport type { FormInputProps } from \"../core/FormComponentInner\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\n\nconst HTMLSelectAdapter = (props: FormInputProps<HTMLSelectElement>) => {\n const {\n multiple,\n path,\n inputProperties = {},\n options = [],\n itemProperties,\n } = props;\n const { label, name } = inputProperties;\n if (!Array.isArray(options))\n throw new Error(\"HTMLSelectAdapater not yet supporting functional options\");\n\n const Components = useVulcanComponents();\n return (\n <Components.FormItem\n name={name}\n label={label}\n path={path}\n inputProperties={inputProperties}\n {...itemProperties}\n >\n {/** TODO: whitelisting feature should be smarter to differentiate select and input */}\n <select\n multiple={multiple}\n {...inputProperties}\n value={\n inputProperties.value === null ? undefined : inputProperties.value\n }\n >\n {options.map(({ label, value }) => (\n <option key={value} label={label} value={value}></option>\n ))}\n </select>\n </Components.FormItem>\n );\n};\n\nexport const FormComponentSelect = (\n props: FormInputProps<HTMLSelectElement>\n) => <HTMLSelectAdapter {...props} />;\n\nexport const FormComponentSelectMultiple = (props) => {\n const Components = useVulcanComponents();\n return <Components.FormComponentSelect multiple {...props} />;\n};\n","import React from \"react\";\nimport { FormInputProps } from \"../core/FormComponentInner\";\n\n// TODO: might need some sanitization\n// For consistency with Vulcan Meteor ui bootstrap and ui material\n// @see packages/vulcan-ui-bootstrap/lib/components/forms/FormItem.jsx\nexport const FormItem = (\n props: FormInputProps[\"itemProperties\"] &\n Pick<FormInputProps[\"inputProperties\"], \"label\" | \"name\">\n) => {\n const { inputProperties, label, name } = props;\n return (\n <div className={`form-item ${name}`}>\n <label htmlFor={name}>{label}</label>\n {props.children}\n </div>\n );\n};\n","import React from \"react\";\nimport type { FormOption } from \"../core/FormComponent\";\n\nexport interface FormOptionLabelProps\n extends React.HTMLProps<HTMLLabelElement> {\n option: FormOption;\n}\nexport const FormOptionLabel = ({ option, name }: FormOptionLabelProps) => {\n const { label } = option;\n // NOTE: for radio groups we might need to wrap this with a label? And maybe even for select?\n return (\n <label htmlFor={name} className=\"form-option-label\">\n {label}\n </label>\n );\n};\n","/**\n *\n * // Copied for bootstrap package\n * // TODO: find a more generic implementation\n *\n * Ideally for such a rich component we should also expose\n * hooks and internal logic so users can build their own\n */\nimport { AsyncTypeahead } from \"react-bootstrap-typeahead\"; // ES2015\nimport React, { useState } from \"react\";\n// We don't auto-expand queries in Vulcan NPM, since we don't use the registry pattern\n// anymore. Instead, provide the right fragments directly, using composition with string templates.\n//import { expandQueryFragments } from \"meteor/vulcan:core\";\nimport { useLazyQuery } from \"@apollo/client\";\nimport gql from \"graphql-tag\";\nimport { useVulcanComponents } from \"../../VulcanComponents/Consumer\";\nimport type { FormInputProps } from \"../core/FormComponentInner\";\nimport { useFormContext } from \"../core/FormContext\";\n\nexport interface AutocompleteMultipleProps extends FormInputProps {}\nexport const AutocompleteMultiple = (props: AutocompleteMultipleProps) => {\n // TODO: some props are now comming from the context\n const {\n queryData,\n //updateCurrentValues,\n refFunction,\n path,\n inputProperties = {},\n itemProperties = {},\n autocompleteQuery,\n optionsFunction,\n } = props;\n\n const { updateCurrentValues } = useFormContext();\n\n const Components = useVulcanComponents();\n // MergeWithComponents should be handled at the Form level\n // by creating a new VulcanComponents context that merges default components\n // and components passed via props\n //const Components = mergeWithComponents(formComponents);\n\n const { value, label } = inputProperties;\n\n // store current autocomplete query string in local component state\n const [queryString, setQueryString] = useState<string | undefined>();\n\n // get component's autocomplete query and use it to load autocomplete suggestions\n // note: we use useLazyQuery because\n // we don't want to trigger the query until the user has actually typed in something\n const [loadAutocompleteOptions, { loading, error, data }] = useLazyQuery(\n gql(/*expandQueryFragments(*/ autocompleteQuery() /*)*/),\n {\n variables: { queryString },\n }\n );\n\n if (error) {\n // TODO: probably not the best way to displat the error\n throw new Error(error.message);\n }\n // apply options function to data to get suggestions in { value, label } pairs\n const autocompleteOptions = data && optionsFunction({ data });\n\n // apply same function to loaded data; filter by current value to avoid displaying any\n // extra unwanted items if field-level data loading loaded too many items\n const selectedItems =\n queryData &&\n optionsFunction({ data: queryData }).filter((d) =>\n (value as Array<any>).includes(d.value)\n );\n\n // console.log(queryData)\n // console.log(queryData && optionsFunction({ data: queryData }));\n // console.log(value)\n // console.log(selectedItems)\n\n return (\n <Components.FormItem\n {...props} /*path={path} label={label} {...itemProperties}*/\n {...itemProperties}\n name={path}\n >\n {/** @ts-ignore */}\n <AsyncTypeahead\n {...inputProperties}\n multiple\n onChange={(selected) => {\n const selectedIds = selected.map(\n // @ts-ignore Typing is wrong for some reason\n ({ value }) => value\n );\n updateCurrentValues({ [path]: selectedIds });\n }}\n options={autocompleteOptions}\n id={path}\n // passing id doesn't seem to work, we need input props\n inputProps={{ id: path }}\n ref={refFunction}\n onSearch={(queryString) => {\n setQueryString(queryString);\n loadAutocompleteOptions();\n }}\n isLoading={loading}\n selected={selectedItems}\n />\n </Components.FormItem>\n );\n};\n\n//registerComponent(\"FormComponentMultiAutocomplete\", MultiAutocomplete);\n","import { DatatableComponents } from \"../typings\";\n\nimport {\n Datatable,\n DatatableAbove,\n DatatableAboveLayout,\n DatatableAboveLeft,\n DatatableAboveRight,\n DatatableAboveSearchInput,\n DatatableLayout,\n} from \"../../Datatable/Datatable\";\nimport {\n DatatableContents,\n DatatableContentsBodyLayout,\n DatatableContentsHeadLayout,\n DatatableContentsInnerLayout,\n DatatableContentsLayout,\n DatatableContentsMoreLayout,\n DatatableEmpty,\n DatatableLoadMoreButton,\n DatatableTitle,\n} from \"../../Datatable/DatatableContents\";\nimport {\n DatatableHeader,\n DatatableHeaderCellLayout,\n} from \"../../Datatable/DatatableHeader\";\nimport { DatatableRow, DatatableRowLayout } from \"../../Datatable/DatatableRow\";\nimport {\n DatatableCell,\n DatatableCellLayout,\n DatatableDefaultCell,\n} from \"../../Datatable/DatatableCell\";\nimport {\n DatatableFilter,\n DatatableFilterBooleans,\n DatatableFilterCheckboxes,\n DatatableFilterContents,\n DatatableFilterContentsWithData,\n DatatableFilterDates,\n DatatableFilterNumbers,\n} from \"../../Datatable/DatatableFilter\";\nimport { DatatableSorter } from \"../../Datatable/DatatableSorter\";\nimport { DatatableSelect } from \"../../Datatable/DatatableSelect\";\nimport { DatatableSubmitSelected } from \"../../Datatable/DatatableSubmitSelected\";\nimport { EditButton, EditForm } from \"../../Datatable/others/EditButton\";\nimport { NewButton, NewForm } from \"../../Datatable/others/NewButton\";\nimport { DeleteButton } from \"../../Datatable/others/DeleteButton\";\n\nexport const defaultDatatableComponents: DatatableComponents = {\n Datatable: Datatable,\n // DatatableContents: DatatableContents\n DatatableAbove: DatatableAbove,\n DatatableAboveLayout: DatatableAboveLayout,\n DatatableAboveLeft: DatatableAboveLeft,\n DatatableAboveRight: DatatableAboveRight,\n DatatableAboveSearchInput: DatatableAboveSearchInput,\n DatatableLayout: DatatableLayout,\n // Contents\n DatatableContents: DatatableContents,\n DatatableContentsBodyLayout: DatatableContentsBodyLayout,\n DatatableContentsHeadLayout: DatatableContentsHeadLayout,\n DatatableContentsInnerLayout: DatatableContentsInnerLayout,\n DatatableContentsLayout: DatatableContentsLayout,\n DatatableContentsMoreLayout: DatatableContentsMoreLayout,\n DatatableEmpty: DatatableEmpty,\n DatatableLoadMoreButton: DatatableLoadMoreButton,\n DatatableTitle: DatatableTitle,\n // Header\n DatatableHeader: DatatableHeader,\n DatatableHeaderCellLayout: DatatableHeaderCellLayout,\n // Row\n DatatableRow: DatatableRow,\n DatatableRowLayout: DatatableRowLayout,\n // Cell\n DatatableCell: DatatableCell,\n DatatableCellLayout: DatatableCellLayout,\n DatatableDefaultCell: DatatableDefaultCell,\n // Filter\n DatatableFilter: DatatableFilter,\n DatatableFilterBooleans: DatatableFilterBooleans,\n DatatableFilterCheckboxes: DatatableFilterCheckboxes,\n DatatableFilterContents: DatatableFilterContents,\n DatatableFilterContentsWithData: DatatableFilterContentsWithData,\n DatatableFilterDates: DatatableFilterDates,\n DatatableFilterNumbers: DatatableFilterNumbers,\n // Sort\n DatatableSorter: DatatableSorter,\n // Select\n DatatableSelect: DatatableSelect,\n // SubmitSelect\n DatatableSubmitSelected: DatatableSubmitSelected,\n // Core\n EditButton: EditButton,\n EditForm: EditForm,\n NewButton: NewButton,\n NewForm: NewForm,\n DeleteButton: DeleteButton,\n};\n","//import { Utils, registerComponent, getCollection } from \"meteor/vulcan:lib\";\nimport React, { useEffect, useState } from \"react\";\n// import { intlShape } from \"meteor/vulcan:i18n\";\n// import qs from \"qs\";\n// import { withRouter } from \"react-router\";\n//import compose from \"recompose/compose\";\nimport _isEmpty from \"lodash/isEmpty.js\";\nimport _set from \"lodash/set.js\";\nimport _cloneDeep from \"lodash/cloneDeep.js\";\n//import withCurrentUser from \"../../containers/currentUser.js\";\n//import withComponents from \"../../containers/withComponents\";\n//import withMulti from \"../../containers/multi2.js\";\n//import Users from \"meteor/vulcan:users\";\nimport _get from \"lodash/get.js\";\n//import { getFieldType } from \"../form/modules/utils\";\nimport { useMulti } from \"@vulcanjs/react-hooks\";\nimport { VulcanModel } from \"@vulcanjs/model\";\nimport { VulcanGraphqlModel } from \"@vulcanjs/graphql\";\nimport { isAdmin } from \"@vulcanjs/permissions\";\n// NOTE: import from \"CONSUMER\" to avoid infinite loop\nimport { useVulcanComponents } from \"../VulcanComponents/Consumer\";\nimport { useIntlContext } from \"@vulcanjs/react-i18n\";\nimport { permissionCheck } from \"@vulcanjs/permissions\";\n\nconst ascSortOperator = \"asc\";\nconst descSortOperator = \"desc\";\n\n//const convertToBoolean = (s) => (s === \"true\" ? true : false);\n\n/*\n\nDatatable Component\n\n*/\n\n// see: http://stackoverflow.com/questions/1909441/jquery-keyup-delay\nconst delay = (function () {\n var timer: ReturnType<typeof setTimeout>;\n return function (callback, ms) {\n if (timer) {\n clearTimeout(timer);\n }\n timer = setTimeout(callback, ms);\n };\n})();\n\nexport interface DatatableProps<TData = any> {\n model: VulcanGraphqlModel;\n initialState?: any;\n /** Datatable will automatically alter the URL. Set to false when using more than 1 datatable on a page. */\n useUrlState?: boolean;\n\n title?: string;\n columns?: Array<any>;\n /** Force some data when using the datatable as a controlled input */\n data?: Array<TData>;\n options?: any;\n showEdit?: boolean;\n showDelete?: boolean;\n showNew?: boolean;\n showSearch?: boolean;\n newFormProps?: any;\n editFormProps?: any;\n rowClass?: any; //PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n // TODO: url management should happen via a hook, with the possibility to synchronize\n // or not the table based on the URL (in case we have 2 tables it must be disabled)\n location?: any; //PropTypes.shape({ search: PropTypes.string }).isRequired,\n // TODO: this props replace the direct calls to \"history\" to limit dependency to React router\n // it's type is similar to \"history.push\" from React router for the moment\n push: (options: { search?: string }) => void;\n\n currentUser?: any;\n modalProps?: any;\n onSubmitSelected?: any;\n}\n\n/**\n * TODO: currently we can only have one datable per page as they interact with the url directly\n * @param props\n * @returns\n */\nexport const Datatable = (props: DatatableProps) => {\n const [state, setState] = useState<any>({});\n const { initialState /*useUrlState, push*/ } = props;\n let initState: any = {\n searchValue: \"\",\n search: \"\",\n currentSort: {},\n currentFilters: {},\n selectedItems: [],\n };\n useEffect(() => {\n // initial state can be defined via props\n // note: this prop-originating initial state will *not* be reflected in the URL\n if (initialState) {\n if (initialState.search) {\n initState.searchValue = initialState.search;\n initState.search = initialState.search;\n }\n if (initialState.sort) {\n initState.currentSort = initialState.sort;\n }\n if (initialState.filter) {\n initState.currentFilters = initialState.filter;\n }\n }\n setState(initState);\n }, []);\n\n /** TODO: should be passed by the parent, we could expose helpers */\n /*\n const getUrlState = () => {\n const { location } = props;\n return qs.parse(location.search, { ignoreQueryPrefix: true });\n };*/\n\n /**\n * Convert url filter to number\n *\n * TODO: should be part of reusable hook\n * @param urlStateFilters\n * @returns\n */\n /*\n const convertToNumbers = (urlStateFilters) => {\n const convertedFilters = _cloneDeep(urlStateFilters);\n const { model } = props;\n\n // only try to convert when we have a collection schema\n if (model) {\n const schema = model.schema;\n\n Object.keys(urlStateFilters).forEach((fieldName) => {\n const field = schema[fieldName];\n const fieldType = getFieldType(field);\n const filter = urlStateFilters[fieldName];\n // the \"operator\" can be _in, _eq, _gte, etc.\n const [operator] = Object.keys(filter);\n const value = urlStateFilters[fieldName][operator];\n let convertedValue = value;\n // for each field, check if it's supposed to be a number\n if (fieldType === Number) {\n // value can be a single value or an array, depending on filter type\n convertedValue = Array.isArray(value)\n ? value.map(parseFloat)\n : parseFloat(value);\n } else if (fieldType === Boolean) {\n // value can be a single value or an array, depending on filter type\n convertedValue = Array.isArray(value)\n ? value.map(convertToBoolean)\n : convertToBoolean(value);\n }\n _set(convertedFilters, `${fieldName}.${operator}`, convertedValue);\n });\n }\n return convertedFilters;\n };*/\n\n // only load urlState if useUrlState is enabled\n /*\n if (useUrlState) {\n const urlState = getUrlState();\n if (urlState.search) {\n initState.searchValue = urlState.search;\n initState.search = urlState.search;\n }\n if (typeof urlState.sort === \"string\") {\n const [sortKey, sortValue] = urlState.sort.split(\"|\");\n initState.currentSort = { [sortKey]: sortValue };\n }\n if (urlState.filter) {\n // all URL values are stored as strings, so convert them back to numbers if needed\n initState.currentFilters = convertToNumbers(urlState.filter);\n }\n }*/\n\n /*\n\n If useUrlState is not enabled, do nothing\n\n */\n /*\n const updateQueryParameter = (key, value) => {\n if (useUrlState) {\n const urlState = getUrlState();\n\n if (value === null || value === \"\") {\n // when value is null or empty, remove key from URL state\n delete urlState[key];\n } else {\n urlState[key] = value;\n }\n const queryString = qs.stringify(urlState);\n push({\n search: `?${queryString}`,\n });\n /*\n history.push({\n search: `?${queryString}`,\n });\n */ /*\n }\n };\n*/\n /*\n\n Note: when state is asc, toggling goes to desc;\n but when state is desc toggling again removes sort.\n\n */\n const toggleSort = (column) => {\n let currentSort;\n let urlValue;\n if (!state.currentSort[column]) {\n currentSort = { [column]: ascSortOperator };\n urlValue = `${column}|${ascSortOperator}`;\n } else if (state.currentSort[column] === ascSortOperator) {\n currentSort = { [column]: descSortOperator };\n urlValue = `${column}|${descSortOperator}`;\n } else {\n currentSort = {};\n urlValue = null;\n }\n setState((currentState) => ({ ...currentState, currentSort }));\n // updateQueryParameter(\"sort\", urlValue);\n };\n\n const submitFilters = ({ name, filters }) => {\n // clone state filters object\n let newFilters = Object.assign({}, state.currentFilters);\n if (_isEmpty(filters)) {\n // if there are no filter options, remove column filter from state altogether\n delete newFilters[name];\n } else {\n // else, update filters\n newFilters[name] = filters;\n }\n setState((currentState) => ({\n ...currentState,\n currentFilters: newFilters,\n }));\n // updateQueryParameter(\"filter\", _isEmpty(newFilters) ? null : newFilters);\n };\n\n const updateSearch = (e) => {\n e.persist();\n e.preventDefault();\n const searchValue = e.target.value;\n setState({\n searchValue,\n });\n delay(() => {\n setState((currentState) => ({\n ...currentState,\n search: searchValue,\n }));\n // updateQueryParameter(\"search\", searchValue);\n }, 700);\n };\n\n const toggleItem = (id) => {\n const { selectedItems } = state;\n const newSelectedItems = selectedItems.includes(id)\n ? selectedItems.filter((x) => x !== id)\n : [...selectedItems, id];\n setState({\n selectedItems: newSelectedItems,\n });\n };\n\n const Components = useVulcanComponents();\n\n const { modalProps, data, currentUser, onSubmitSelected, model, options } =\n props;\n\n // Skip query when data are already provided via props\n const multiRes = useMulti({\n ...options,\n model,\n queryOptions: { skip: !!data },\n });\n if (data) {\n // static JSON datatable\n return (\n <Components.DatatableContents\n {...props}\n datatableData={data}\n totalCount={data.length}\n results={data}\n showEdit={false}\n showDelete={false}\n showNew={false}\n modalProps={modalProps}\n />\n );\n }\n // dynamic datatable with data loading\n /*\n const options = {\n collection\n ...options,\n };\n\n const DatatableWithMulti = compose(withMulti(options))(\n Components.DatatableContents\n );*/\n\n let canCreate = false;\n // new APIs\n const check = model.permissions.canCreate;\n\n // openCRUD backwards compatibility\n //const check = model.graphql.mutations.create.check;\n //_get(collection, \"options.mutations.new.check\") ||\n //_get(collection, \"options.mutations.create.check\");\n\n if (isAdmin(currentUser)) {\n canCreate = true;\n } else if (check) {\n canCreate = permissionCheck({\n check,\n user: currentUser,\n //context: { Users },\n operationName: \"create\",\n });\n } /* legacy \n else if (check) {\n canCreate = check && check(currentUser, {}, { Users });\n }*/\n\n const input: { search?: string; sort?: any; filter?: any } = {};\n if (!_isEmpty(state.search)) {\n input.search = state.search;\n }\n if (!_isEmpty(state.currentSort)) {\n input.sort = state.currentSort;\n }\n if (!_isEmpty(state.currentFilters)) {\n input.filter = state.currentFilters;\n }\n\n return (\n <Components.DatatableLayout\n model={model}\n //collectionName={collection.options.collectionName}\n >\n <Components.DatatableAbove\n {...props}\n model={model}\n canInsert={canCreate}\n canCreate={canCreate}\n searchValue={state.searchValue}\n updateSearch={updateSearch}\n selectedItems={state.selectedItems}\n onSubmitSelected={onSubmitSelected}\n />\n <Components.DatatableContents\n {...props}\n //datatableData={multiRes.documents}\n results={multiRes.documents}\n totalCount={multiRes.totalCount}\n count={multiRes.count}\n model={model}\n // TODO: check where this prop is used\n currentUser={currentUser}\n toggleSort={toggleSort}\n currentSort={state.currentSort}\n submitFilters={submitFilters}\n currentFilters={state.currentFilters}\n selectedItems={state.selectedItems}\n //input={input}\n toggleItem={toggleItem}\n />\n </Components.DatatableLayout>\n );\n};\n\nexport const DatatableLayout = ({\n model,\n children,\n}: {\n model: VulcanModel;\n children: React.ReactNode;\n}) => (\n <div className={`datatable datatable-${model.name.toLowerCase()}`}>\n {children}\n </div>\n);\n\n/*\n\nDatatableAbove Component\n\n*/\nexport const DatatableAbove = (props: any) => {\n const Components = useVulcanComponents();\n\n return (\n <Components.DatatableAboveLayout>\n <Components.DatatableAboveLeft {...props} />\n <Components.DatatableAboveRight {...props} />\n </Components.DatatableAboveLayout>\n );\n};\n\nexport const DatatableAboveLeft = (props) => {\n const { showSearch, searchValue, updateSearch } = props;\n const Components = useVulcanComponents();\n const intl = useIntlContext();\n return (\n <div className=\"datatable-above-left\">\n {showSearch && (\n <Components.DatatableAboveSearchInput\n className=\"datatable-search form-control\"\n inputProperties={{\n path: \"datatableSearchQuery\",\n placeholder: `${intl.formatMessage({\n id: \"datatable.search\",\n defaultMessage: \"Search\",\n })}…`,\n value: searchValue,\n onChange: updateSearch,\n }}\n />\n )}\n </div>\n );\n};\n\nexport const DatatableAboveRight = (props) => {\n const {\n currentUser,\n showNew,\n canInsert,\n options,\n newFormOptions,\n newFormProps,\n showSelect,\n selectedItems,\n onSubmitSelected,\n model,\n } = props;\n const Components = useVulcanComponents();\n return (\n <div className=\"datatable-above-right\">\n {showSelect && selectedItems.length > 0 && (\n <div className=\"datatable-above-item\">\n <Components.DatatableSubmitSelected\n selectedItems={selectedItems}\n onSubmitSelected={onSubmitSelected}\n />\n </div>\n )}\n {showNew && canInsert && (\n <div className=\"datatable-above-item\">\n <Components.NewButton\n model={model}\n currentUser={currentUser}\n mutationFragmentName={options && options.fragmentName}\n {...newFormOptions}\n {...newFormProps}\n />\n </div>\n )}\n </div>\n );\n};\n\nexport const DatatableAboveSearchInput = (props) => {\n const Components = useVulcanComponents();\n return (\n <div className=\"datatable-above-search-input\">\n <Components.FormComponentText {...props} />\n </div>\n );\n};\n\nexport const DatatableAboveLayout = ({ children }) => (\n <div className=\"datatable-above\">{children}</div>\n);\n","import React, { memo } from \"react\";\nimport _sortBy from \"lodash/sortBy.js\";\nimport { VulcanGraphqlModel } from \"@vulcanjs/graphql\";\nimport { useVulcanComponents } from \"../VulcanComponents\";\nimport { DatatableSelectControlledProps } from \"./DatatableSelect\";\n\nconst wrapColumns = (c) => ({ name: c });\n\nconst getColumns = (columns, results, data) => {\n if (columns) {\n // convert all columns to objects\n const convertedColums = columns.map((column) =>\n typeof column === \"object\" ? column : { name: column }\n );\n const sortedColumns = _sortBy(convertedColums, (column) => column.order);\n return sortedColumns;\n } else if (results && results.length > 0) {\n // if no columns are provided, default to using keys of first array item\n return Object.keys(results[0])\n .filter((k) => k !== \"__typename\")\n .map(wrapColumns);\n } else if (data) {\n // note: withMulti HoC also passes a prop named data, but in this case\n // data should be the prop passed to the Datatable\n return Object.keys(data[0]).map(wrapColumns);\n }\n return [];\n};\n\n/*\n\nDatatableContents Component\n\n*/\n\nexport interface DatatableContentsProps\n extends Partial<DatatableSelectControlledProps> {\n title?: string;\n model: VulcanGraphqlModel;\n datatableData?: Array<any>;\n results?: Array<any>; // = [],\n columns?: Array<any>;\n loading?: boolean;\n // Function passed by the hook\n // TODO: get from a \"typeof\" on useQuzery instead\n loadMore?: any;\n networkStatus?: any;\n //\n count?: number;\n totalCount?: number;\n showEdit?: boolean;\n showDelete?: boolean;\n showNew?: boolean;\n currentUser?: any;\n toggleSort?: any;\n currentSort?: any;\n submitFilters?: any;\n currentFilters?: any;\n modalProps?: any;\n error?: any;\n showSelect?: boolean;\n}\n\nexport const DatatableContents = (props: DatatableContentsProps) => {\n let {\n title = \"\",\n datatableData,\n results = [],\n columns,\n loading,\n loadMore,\n count = 0,\n totalCount = 0,\n networkStatus,\n showEdit,\n showDelete,\n currentUser,\n toggleSort,\n currentSort,\n submitFilters,\n currentFilters,\n modalProps,\n error,\n showSelect,\n model,\n } = props;\n const Components = useVulcanComponents();\n\n if (loading) {\n return (\n <div className=\"datatable-list datatable-list-loading\">\n <Components.Loading />\n </div>\n );\n }\n\n const isLoadingMore = networkStatus === 2;\n const hasMore = results && totalCount > results.length;\n\n const sortedColumns = getColumns(columns, results, datatableData);\n\n return (\n <Components.DatatableContentsLayout>\n {/* note: we want to be able to show potential errors while still showing the data below */}\n {error && (\n <Components.Alert variant=\"danger\">{error.message}</Components.Alert>\n )}\n {title && <Components.DatatableTitle title={title} />}\n <Components.DatatableContentsInnerLayout>\n <Components.DatatableContentsHeadLayout>\n {showSelect && <th />}\n {sortedColumns.map((column, index) => (\n <Components.DatatableHeader\n key={index}\n model={model}\n column={column}\n toggleSort={toggleSort}\n currentSort={currentSort}\n submitFilters={submitFilters}\n currentFilters={currentFilters}\n />\n ))}\n {showEdit ? (\n <th>\n <Components.FormattedMessage\n id=\"datatable.edit\"\n defaultMessage=\"Edit\"\n />\n </th>\n ) : null}\n {showDelete ? (\n <th>\n <Components.FormattedMessage\n id=\"datatable.delete\"\n defaultMessage=\"Delete\"\n />\n </th>\n ) : null}\n </Components.DatatableContentsHeadLayout>\n <Components.DatatableContentsBodyLayout>\n {results && results.length ? (\n results.map((document, index) => (\n <Components.DatatableRow\n {...props}\n model={model}\n columns={sortedColumns}\n document={document}\n key={index}\n showEdit={showEdit}\n showDelete={showDelete}\n currentUser={currentUser}\n modalProps={modalProps}\n />\n ))\n ) : (\n <Components.DatatableEmpty />\n )}\n </Components.DatatableContentsBodyLayout>\n </Components.DatatableContentsInnerLayout>\n {hasMore && (\n <Components.DatatableContentsMoreLayout>\n {isLoadingMore ? (\n <Components.Loading />\n ) : (\n <Components.DatatableLoadMoreButton\n count={count}\n totalCount={totalCount}\n onClick={(e) => {\n e.preventDefault();\n loadMore();\n }}\n >\n Load More ({count}/{totalCount})\n </Components.DatatableLoadMoreButton>\n )}\n </Components.DatatableContentsMoreLayout>\n )}\n </Components.DatatableContentsLayout>\n );\n};\nexport const DatatableContentsLayout = ({ children }) => (\n <div className=\"datatable-list\">{children}</div>\n);\n\nexport const DatatableContentsInnerLayout = ({ children }) => (\n <table className=\"table\">{children}</table>\n);\n\nexport const DatatableContentsHeadLayout = ({ children }) => (\n <thead>\n <tr>{children}</tr>\n </thead>\n);\n\nexport const DatatableContentsBodyLayout = ({ children }) => (\n <tbody>{children}</tbody>\n);\n\nexport const DatatableContentsMoreLayout = ({ children }) => (\n <div className=\"datatable-list-load-more\">{children}</div>\n);\n\nexport const DatatableLoadMoreButton = ({\n count,\n totalCount,\n children,\n ...otherProps\n}) => {\n const Components = useVulcanComponents();\n return (\n <Components.Button variant=\"primary\" {...otherProps}>\n {children}\n </Components.Button>\n );\n};\n/*\n\nDatatableTitle Component\n\n*/\nexport const DatatableTitle = ({ title }) => (\n <div className=\"datatable-title\">{title}</div>\n);\n\n/*\n\nDatatableEmpty Component\n\n*/\nexport const DatatableEmpty = () => {\n const Components = useVulcanComponents();\n return (\n <tr>\n <td colSpan={99}>\n <div style={{ textAlign: \"center\", padding: 10 }}>\n <Components.FormattedMessage\n id=\"datatable.empty\"\n defaultMessage=\"No items to display.\"\n />\n </div>\n </td>\n </tr>\n );\n};\n","import React from \"react\";\nimport { useIntlContext } from \"@vulcanjs/react-i18n\";\nimport { formatLabel } from \"@vulcanjs/i18n\";\nimport { VulcanModel } from \"@vulcanjs/model\";\nimport { useVulcanComponents } from \"../VulcanComponents\";\n\nexport interface DatatableColumnDefinition {\n name: string;\n label?: string;\n options?: any;\n filterComponent?: any;\n sortable?: boolean;\n filterable?: boolean;\n}\n/*\n\nDatatableHeader Component\n\n*/\nexport const DatatableHeader = ({\n model,\n column,\n toggleSort,\n currentSort,\n submitFilters,\n currentFilters,\n}: {\n model: VulcanModel;\n column: DatatableColumnDefinition;\n // TODO: reuse this type\n toggleSort?: any;\n currentSort?: any;\n submitFilters?: any;\n currentFilters?: any;\n}) => {\n const Components = useVulcanComponents();\n const intl = useIntlContext();\n // column label\n let formattedLabel;\n\n if (model) {\n const schema = model.schema;\n const field = schema[column.name];\n\n if (column.label) {\n formattedLabel = column.label;\n } else {\n /*\n \n use either:\n \n 1. the column name translation : `${collectionName}.${columnName}`, `global.${columnName}`, columnName\n 2. the column name label in the schema (if the column name matches a schema field)\n 3. the raw column name.\n \n */\n formattedLabel = formatLabel({\n intl,\n fieldName: column.name,\n collectionName: model.name,\n schema: schema,\n });\n }\n\n const fieldOptions = field && field.options;\n\n // for filter options, use either column.options or else the options property defined on the schema field\n const filterOptions = column.options ? column.options : fieldOptions;\n const filterQuery = field && field.staticQuery;\n\n return (\n <Components.DatatableHeaderCellLayout\n className={`datatable-header-${column.name}`}\n >\n <span className=\"datatable-header-cell-label\">{formattedLabel}</span>\n {column.sortable && (\n <Components.DatatableSorter\n name={column.name}\n label={formattedLabel}\n toggleSort={toggleSort}\n currentSort={currentSort}\n // TODO: those props were maybe needed when extending this component?\n // They are not used by the default version though\n //model={model}\n //field={field}\n //sortable={column.sortable}\n />\n )}\n {column.filterable && (\n <Components.DatatableFilter\n model={model}\n field={field}\n name={column.name}\n label={formattedLabel}\n query={filterQuery}\n options={filterOptions}\n submitFilters={submitFilters}\n columnFilters={currentFilters[column.name]}\n filterComponent={column.filterComponent}\n />\n )}\n </Components.DatatableHeaderCellLayout>\n );\n } else {\n const formattedLabel =\n column.label ||\n intl.formatMessage({ id: column.name, defaultMessage: column.name });\n return (\n <Components.DatatableHeaderCellLayout\n className={`datatable-th-${formattedLabel\n .toLowerCase()\n .replace(/\\s/g, \"-\")}`}\n >\n {formattedLabel}\n </Components.DatatableHeaderCellLayout>\n );\n }\n};\n\nexport const DatatableHeaderCellLayout = ({ children, ...otherProps }) => (\n <th {...otherProps}>\n <div className=\"datatable-header-cell-inner\">{children}</div>\n </th>\n);\n","import React, { memo } from \"react\";\nimport _isFunction from \"lodash/isFunction.js\";\nimport { useVulcanComponents } from \"../VulcanComponents\";\nimport { VulcanGraphqlModel } from \"@vulcanjs/graphql\";\nimport { isAdmin, permissionCheck, VulcanUser } from \"@vulcanjs/permissions\";\nimport { VulcanDocument } from \"@vulcanjs/schema\";\n\n/*\n\nDatatableRow Component\n\n*/\nexport const DatatableRow = (props: {\n model: VulcanGraphqlModel;\n columns: Array<any>;\n document: VulcanDocument;\n showEdit?: boolean;\n showDelete?: boolean;\n currentUser?: VulcanUser;\n options?: any;\n editFormOptions?: any;\n editFormProps?: any;\n rowClass?: any;\n showSelect?: any;\n toggleItem?: any;\n selectedItems?: any;\n modalProps?: any;\n}) => {\n const {\n model,\n columns,\n document,\n showEdit,\n showDelete,\n currentUser,\n options,\n editFormOptions,\n editFormProps,\n rowClass,\n showSelect,\n toggleItem,\n selectedItems,\n } = props;\n const Components = useVulcanComponents();\n\n let canUpdate = false;\n\n // new APIs\n const check = model.permissions.canUpdate;\n //get(collection, \"options.permissions.canUpdate\");\n // openCRUD backwards compatibility\n //const check =\n // get(collection, \"options.mutations.edit.check\") ||\n // get(collection, \"options.mutations.update.check\");\n\n if (isAdmin(currentUser)) {\n canUpdate = true;\n } else if (check) {\n canUpdate = permissionCheck({\n check,\n user: currentUser,\n document,\n //context: { Users },\n operationName: \"update\",\n });\n } /*\n legacy\n else if (check) {\n canUpdate = check && check(currentUser, document, { Users });\n }*/\n\n const row =\n typeof rowClass === \"function\" ? rowClass(document) : rowClass || \"\";\n const { modalProps = {} } = props;\n const defaultModalProps = { title: <code>{document._id}</code> };\n const customModalProps = {\n ...defaultModalProps,\n ...(_isFunction(modalProps) ? modalProps(document) : modalProps),\n };\n\n const isSelected = selectedItems && selectedItems.includes(document._id);\n\n return (\n <Components.DatatableRowLayout\n className={`datatable-item ${row} ${\n isSelected ? \"datatable-item-selected\" : \"\"\n }`}\n >\n {showSelect && (\n <Components.DatatableSelect\n document={document}\n toggleItem={toggleItem}\n selectedItems={selectedItems}\n />\n )}\n {columns.map((column, index) => (\n <Components.DatatableCell\n key={index}\n column={column}\n document={document}\n currentUser={currentUser}\n model={model}\n />\n ))}\n {showEdit && canUpdate ? ( // openCRUD backwards compatibility\n <Components.DatatableCellLayout className=\"datatable-edit\">\n <Components.EditButton\n model={model}\n documentId={document._id}\n currentUser={currentUser}\n mutationFragmentName={options && options.fragmentName}\n modalProps={customModalProps}\n {...editFormOptions}\n {...editFormProps}\n />\n </Components.DatatableCellLayout>\n ) : null}\n {showDelete && canUpdate ? ( // openCRUD backwards compatibility\n <Components.DatatableCellLayout className=\"datatable-delete\">\n <Components.DeleteButton\n model={model}\n documentId={document._id}\n currentUser={currentUser}\n //mutationFragmentName={options && options.fragmentName}\n />\n </Components.DatatableCellLayout>\n ) : null}\n </Components.DatatableRowLayout>\n );\n};\nexport const DatatableRowLayout = ({ children, ...otherProps }) => (\n <tr {...otherProps}>{children}</tr>\n);\n","import { VulcanModel } from \"@vulcanjs/model\";\nimport { VulcanUser } from \"@vulcanjs/permissions\";\nimport { VulcanDocument } from \"@vulcanjs/schema\";\nimport React from \"react\";\nimport {\n PossibleVulcanComponents,\n useVulcanComponents,\n} from \"../VulcanComponents\";\n\n/*\n\nDatatableCell Component\n\n*/\nexport const DatatableCell = ({\n column,\n document,\n currentUser,\n model,\n}: {\n column: {\n /** TODO: type should be more precise */\n component?: React.ComponentType<any>;\n /** @deprecated Prefer passing a component directly, except for Vulcan core form components\n * TODO: it should more precisely accept Cell components, they need to be listed specifically\n *\n */\n componentName?: keyof PossibleVulcanComponents;\n name?: string;\n label?: string;\n };\n document?: VulcanDocument;\n currentUser?: VulcanUser;\n model: VulcanModel;\n}) => {\n const Components = useVulcanComponents();\n const Component =\n column.component ||\n (column.componentName && Components[column.componentName]) ||\n Components.DatatableDefaultCell;\n const columnName = column.label || column.name;\n if (!columnName) throw new Error(\"Column should have name or label\");\n\n return (\n <Components.DatatableCellLayout\n className={`datatable-item-${columnName\n .toLowerCase()\n .replace(/\\s/g, \"-\")}`}\n >\n <Component\n column={column}\n document={document}\n currentUser={currentUser}\n model={model}\n />\n </Components.DatatableCellLayout>\n );\n};\n\nexport const DatatableCellLayout = ({ children, ...otherProps }) => (\n <td {...otherProps}>\n <div className=\"cell-contents\">{children}</div>\n </td>\n);\n\n/*\n\nDatatableDefaultCell Component\n\n*/\nexport const DatatableDefaultCell = ({ column, document, ...rest }) => {\n const Components = useVulcanComponents();\n return (\n <Components.CardItemSwitcher\n value={document[column.name]}\n document={document}\n fieldName={column.name}\n {...column}\n {...rest}\n />\n );\n};\n","import React, { useState } from \"react\";\nimport type { DocumentNode } from \"@apollo/client\";\n//import gql from \"graphql-tag\";\nimport { useQuery } from \"@apollo/client\";\nimport moment from \"moment\";\nimport isEmpty from \"lodash/isEmpty.js\";\nimport { useVulcanComponents } from \"../VulcanComponents\";\nimport { getFieldType } from \"../form/utils/utils\";\n\nconst getCount = (columnFilters) => {\n if (!columnFilters) {\n return 0;\n } else if (Array.isArray(columnFilters._in)) {\n return columnFilters._in.length;\n } else if (columnFilters._gte || columnFilters._lte) {\n if (columnFilters._gte && columnFilters._lte) {\n return 2;\n } else {\n return 1;\n }\n }\n return 0;\n};\n\nconst Filter = ({ count }) => (\n <svg\n width=\"16\"\n height=\"16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 448 512\"\n >\n <path\n fill=\"#000\"\n d=\"M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-6 400H54c-3.3 0-6-2.7-6-6V86c0-3.3 2.7-6 6-6h340c3.3 0 6 2.7 6 6v340c0 3.3-2.7 6-6 6z\"\n fillOpacity={count ? 0.8 : 0.3}\n />\n {count ? (\n <text\n x=\"50%\"\n y=\"55%\"\n fill=\"#000\"\n fontSize=\"300px\"\n textAnchor=\"middle\"\n alignmentBaseline=\"middle\"\n fillOpacity={0.8}\n >\n {count}\n </text>\n ) : (\n <path\n fill=\"#000\"\n d=\"M224 200v-16c0-13.3-10.7-24-24-24h-24v-20c0-6.6-5.4-12-12-12h-8c-6.6 0-12 5.4-12 12v20h-24c-13.3 0-24 10.7-24 24v16c0 13.3 10.7 24 24 24h24v148c0 6.6 5.4 12 12 12h8c6.6 0 12-5.4 12-12V224h24c13.3 0 24-10.7 24-24zM352 328v-16c0-13.3-10.7-24-24-24h-24V140c0-6.6-5.4-12-12-12h-8c-6.6 0-12 5.4-12 12v148h-24c-13.3 0-24 10.7-24 24v16c0 13.3 10.7 24 24 24h24v20c0 6.6 5.4 12 12 12h8c6.6 0 12-5.4 12-12v-20h24c13.3 0 24-10.7 24-24z\"\n fillOpacity={0.3}\n />\n )}\n </svg>\n);\n\nexport const DatatableFilter = (props) => {\n const Components = useVulcanComponents();\n const { columnFilters, label, query } = props;\n return (\n <span className=\"datatable-filter\">\n <Components.ModalTrigger\n title={\n <Components.FormattedMessage\n id=\"datatable.filter_column\"\n values={{ label }}\n defaultMessage={`Filter “${label}”`}\n />\n }\n size=\"small\"\n trigger={<Filter count={getCount(columnFilters)} />}\n >\n {query ? (\n <Components.DatatableFilterContentsWithData {...props} />\n ) : (\n <Components.DatatableFilterContents {...props} />\n )}\n </Components.ModalTrigger>\n </span>\n );\n};\n\n/*\n\nDatatableFilterContents Components\n\n*/\n\nexport const DatatableFilterContentsWithData = (props: {\n /** NOTE: previously we were expecting text, now we want a gql document directly */\n query: DocumentNode | ((options: { mode: \"static\" }) => DocumentNode);\n options?: any;\n}) => {\n const Components = useVulcanComponents();\n const { query, options } = props;\n\n // if query is a function, execute it\n const queryGql =\n typeof query === \"function\" ? query({ mode: \"static\" }) : query;\n const filterQuery = queryGql;\n\n const { loading, error, data } = useQuery(filterQuery);\n\n if (loading) {\n return <Components.Loading />;\n } else if (error) {\n return <p>error</p>;\n } else {\n // note: options function expects the entire props object\n const queryOptions = options({ data });\n return (\n <Components.DatatableFilterContents {...props} options={queryOptions} />\n );\n }\n};\n\nexport const DatatableFilterContents = (props) => {\n const {\n name,\n field,\n options,\n columnFilters,\n submitFilters,\n filterComponent,\n } = props;\n const Components = useVulcanComponents();\n const fieldType = getFieldType(field);\n\n const [filters, setFilters] = useState(columnFilters);\n\n const filterProps = { ...props, filters, setFilters };\n\n let contents;\n\n if (filterComponent) {\n const CustomFilter = filterComponent;\n contents = <CustomFilter {...filterProps} />;\n } else if (options) {\n contents = <Components.DatatableFilterCheckboxes {...filterProps} />;\n } else {\n switch (fieldType) {\n case Date:\n contents = <Components.DatatableFilterDates {...filterProps} />;\n break;\n\n case Number:\n contents = <Components.DatatableFilterNumbers {...filterProps} />;\n break;\n\n case Boolean:\n contents = <Components.DatatableFilterBooleans {...filterProps} />;\n break;\n\n default:\n contents = (\n <p>\n <Components.FormattedMessage\n id=\"datatable.specify_option\"\n defaultMessage=\"Please specify an options property on your schema field.\"\n />\n </p>\n );\n }\n }\n\n return (\n <form>\n {contents}\n <Components.Button\n variant=\"link\"\n style={{ display: \"inline-block\", marginRight: 10 }}\n className=\"datatable_filter_clear\"\n onClick={() => {\n setFilters(undefined);\n }}\n >\n <Components.FormattedMessage\n id=\"datatable.clear_all\"\n defaultMessage=\"Clear All\"\n />\n </Components.Button>\n <Components.Button\n type=\"submit\"\n className=\"datatable_filter_submit\"\n onClick={() => {\n submitFilters({ name, filters });\n }}\n >\n <Components.FormattedMessage\n id=\"datatable.submit\"\n defaultMessage=\"Submit\"\n />\n </Components.Button>\n </form>\n );\n};\n\n/*\n\nFilter Types Components\n\nNote: the operators used here should match the ones handled server-side by\nthe filtering API (_in, _gte, _lte, etc.)\n\n*/\n\n/*\n\nCheckboxes\n\nOperator: _in\n\n*/\nexport type CheckboxOperator = \"_in\";\nconst checkboxOperator: CheckboxOperator = \"_in\";\nexport const DatatableFilterCheckboxes = ({\n options,\n filters = { _in: [] },\n setFilters,\n}: {\n options?: any;\n filters?: { [operator in CheckboxOperator]: Array<any> };\n setFilters?: any;\n}) => {\n const Components = useVulcanComponents();\n return (\n <Components.FormComponentCheckboxGroup\n path=\"filter\"\n itemProperties={{ layout: \"inputOnly\" }}\n inputProperties={{ options }}\n value={filters[checkboxOperator]}\n updateCurrentValues={({ filter: newValues }) => {\n if (isEmpty(newValues)) {\n setFilters(undefined);\n } else {\n setFilters({ [checkboxOperator]: newValues });\n }\n }}\n />\n );\n};\n\n/*\n\nBooleans\n\n*/\nconst booleanOptions = [\n { label: \"True\", value: true },\n { label: \"False\", value: false },\n];\nexport const DatatableFilterBooleans = ({\n filters = { _eq: [] },\n setFilters,\n}) => {\n const Components = useVulcanComponents();\n return (\n <Components.FormComponentRadioGroup\n path=\"filter\"\n itemProperties={{ layout: \"inputOnly\" }}\n inputProperties={{\n options: booleanOptions,\n value: filters[\"_eq\"],\n onChange: (e) => {\n const value = e.target.value; // note: this will be a string\n setFilters({ _eq: value === \"true\" ? true : false });\n },\n }}\n />\n );\n};\n\n/*\n\nDates\n\nOperators: _gte and _lte\n\n*/\nexport const DatatableFilterDates = ({ filters, setFilters }) => {\n const Components = useVulcanComponents();\n return (\n <div>\n <Components.FormComponentDate\n path=\"_gte\"\n itemProperties={{\n label: (\n <Components.FormattedMessage\n id=\"datatable.after\"\n defaultMessage=\"After\"\n />\n ),\n layout: \"horizontal\",\n }}\n inputProperties={{}}\n value={filters && moment(filters._gte, \"YYYY-MM-DD\")}\n updateCurrentValues={(newValues) => {\n if (!newValues._gte || newValues._gte === \"\") {\n const newFilters = Object.assign({}, filters);\n delete newFilters._gte;\n setFilters(newFilters);\n } else {\n setFilters({\n ...filters,\n _gte: newValues._gte.format(\"YYYY-MM-DD\"),\n });\n }\n }}\n />\n <Components.FormComponentDate\n path=\"_lte\"\n itemProperties={{\n label: (\n <Components.FormattedMessage\n id=\"datatable.before\"\n defaultMessage=\"Before\"\n />\n ),\n layout: \"horizontal\",\n }}\n inputProperties={{}}\n value={filters && moment(filters._lte, \"YYYY-MM-DD\")}\n updateCurrentValues={(newValues) => {\n if (!newValues._lte || newValues._lte === \"\") {\n const newFilters = Object.assign({}, filters);\n delete newFilters._lte;\n setFilters(newFilters);\n } else {\n setFilters({\n ...filters,\n _lte: newValues._lte.format(\"YYYY-MM-DD\"),\n });\n }\n }}\n />\n </div>\n );\n};\n\n/*\n\nNumbers\n\nOperators: _gte and _lte\n\n*/\nexport const DatatableFilterNumbers = ({ filters, setFilters }) => {\n const Components = useVulcanComponents();\n return (\n <div>\n <Components.FormComponentNumber\n path=\"_gte\"\n itemProperties={{\n label: (\n <Components.FormattedMessage\n id=\"datatable.greater_than\"\n defaultMessage=\"Greater than\"\n />\n ),\n layout: \"horizontal\",\n }}\n inputProperties={{\n onChange: (event) => {\n const value = event.target.value;\n if (!value || value === \"\") {\n const newFilters = Object.assign({}, filters);\n delete newFilters._gte;\n setFilters(newFilters);\n } else {\n setFilters({ ...filters, _gte: value });\n }\n },\n value: filters && parseFloat(filters._gte),\n }}\n />\n <Components.FormComponentNumber\n path=\"_lte\"\n itemProperties={{\n label: (\n <Components.FormattedMessage\n id=\"datatable.lower_than\"\n defaultMessage=\"Lower than\"\n />\n ),\n layout: \"horizontal\",\n }}\n inputProperties={{\n onChange: (event) => {\n const value = event.target.value;\n if (!value) {\n const newFilters = Object.assign({}, filters);\n delete newFilters._lte;\n setFilters(newFilters);\n } else {\n setFilters({ ...filters, _lte: value });\n }\n },\n value: filters && parseFloat(filters._lte),\n }}\n />\n </div>\n );\n};\n","import React from \"react\";\n\nconst SortNone = () => (\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 438 438\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M25.7368 247.243H280.263C303.149 247.243 314.592 274.958 298.444 291.116L171.18 418.456C161.128 428.515 144.872 428.515 134.926 418.456L7.55631 291.116C-8.59221 274.958 2.85078 247.243 25.7368 247.243ZM298.444 134.884L171.18 7.54408C161.128 -2.51469 144.872 -2.51469 134.926 7.54408L7.55631 134.884C-8.59221 151.042 2.85078 178.757 25.7368 178.757H280.263C303.149 178.757 314.592 151.042 298.444 134.884Z\"\n transform=\"translate(66 6)\"\n fill=\"#000\"\n fillOpacity=\"0.2\"\n />\n </svg>\n);\n\nconst SortDesc = () => (\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 438 438\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M25.7368 0H280.263C303.149 0 314.592 27.7151 298.444 43.8734L171.18 171.213C161.128 181.272 144.872 181.272 134.926 171.213L7.55631 43.8734C-8.59221 27.7151 2.85078 0 25.7368 0Z\"\n transform=\"translate(66 253.243)\"\n fill=\"black\"\n fillOpacity=\"0.7\"\n />\n <path\n d=\"M171.18 7.54408L298.444 134.884C314.592 151.042 303.149 178.757 280.263 178.757H25.7368C2.85078 178.757 -8.59221 151.042 7.55631 134.884L134.926 7.54408C144.872 -2.51469 161.128 -2.51469 171.18 7.54408Z\"\n transform=\"translate(66 6)\"\n fill=\"black\"\n fillOpacity=\"0.2\"\n />\n </svg>\n);\n\nconst SortAsc = () => (\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 438 438\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M298.444 134.884L171.18 7.54408C161.128 -2.51469 144.872 -2.51469 134.926 7.54408L7.55631 134.884C-8.59221 151.042 2.85078 178.757 25.7368 178.757H280.263C303.149 178.757 314.592 151.042 298.444 134.884Z\"\n transform=\"translate(66 6)\"\n fill=\"black\"\n fillOpacity=\"0.7\"\n />\n <path\n d=\"M280.263 0H25.7368C2.85078 0 -8.59221 27.7151 7.55631 43.8734L134.926 171.213C144.872 181.272 161.128 181.272 171.18 171.213L298.444 43.8734C314.592 27.7151 303.149 0 280.263 0Z\"\n transform=\"translate(66 253.243)\"\n fill=\"black\"\n fillOpacity=\"0.2\"\n />\n </svg>\n);\n\nexport const DatatableSorter = ({ name, label, toggleSort, currentSort }) => (\n <span\n className=\"datatable-sorter\"\n onClick={() => {\n toggleSort(name);\n }}\n >\n {!currentSort[name] ? (\n <SortNone />\n ) : currentSort[name] === \"asc\" ? (\n <SortAsc />\n ) : (\n <SortDesc />\n )}\n </span>\n);\n","import { VulcanDocument } from \"@vulcanjs/schema\";\nimport React from \"react\";\nimport { useVulcanComponents } from \"../VulcanComponents\";\n\nexport interface DatatableSelectControlledProps {\n selectedItems: Array<string>;\n toggleItem: (itemId: string) => void;\n}\nexport interface DatatableSelectProps extends DatatableSelectControlledProps {\n document: VulcanDocument;\n}\n/*\n\nDatatableSelect Component\n\n*/\nexport const DatatableSelect = ({\n toggleItem,\n selectedItems,\n document,\n}: DatatableSelectProps) => {\n const value = selectedItems.includes(document._id || \"\");\n const onChange = (e) => {\n if (!document._id) throw new Error(\"Cannot toggle item without _id\");\n toggleItem(document._id);\n };\n const Components = useVulcanComponents();\n return (\n <Components.DatatableCellLayout className=\"datatable-check\">\n <Components.FormComponentCheckbox\n inputProperties={{ value, onChange }}\n itemProperties={{ layout: \"elementOnly\" }}\n />\n </Components.DatatableCellLayout>\n );\n};\n","import React from \"react\";\nimport { useVulcanComponents } from \"../VulcanComponents\";\n\n/*\n\nDatatableSelect Component\n\n*/\nexport const DatatableSubmitSelected = ({\n selectedItems,\n onSubmitSelected,\n}) => {\n const Components = useVulcanComponents();\n\n return (\n <Components.Button\n className=\"datatable-submit-selected\"\n onClick={(e) => {\n e.preventDefault();\n onSubmitSelected(selectedItems);\n }}\n >\n <Components.FormattedMessage id=\"datatable.submit\" />\n </Components.Button>\n );\n};\n","import { useIntlContext } from \"@vulcanjs/react-i18n\";\nimport { VulcanDocument } from \"@vulcanjs/schema\";\nimport React from \"react\";\nimport { useVulcanComponents } from \"../../VulcanComponents\";\n\nexport const EditButton = ({\n style = \"primary\",\n variant,\n label,\n size,\n showId,\n modalProps,\n formProps,\n component,\n ...props\n}) => {\n const Components = useVulcanComponents();\n const intl = useIntlContext();\n return (\n <Components.ModalTrigger\n label={\n label ||\n intl.formatMessage({ id: \"datatable.edit\", defaultMessage: \"Edit\" })\n }\n component={\n component ? (\n component\n ) : (\n <Components.Button size={size} variant={variant || style}>\n {label || (\n <Components.FormattedMessage\n id=\"datatable.edit\"\n defaultMessage=\"Edit\"\n />\n )}\n </Components.Button>\n )\n }\n modalProps={modalProps}\n >\n <Components.EditForm\n closeModal={() => {\n console.warn(\"closeModal not defined\");\n }}\n {...props}\n formProps={formProps}\n />\n </Components.ModalTrigger>\n );\n};\n\n/*\n\nEditForm Component\n\n*/\nexport const EditForm = ({\n closeModal,\n successCallback,\n removeSuccessCallback,\n formProps,\n ...props\n}: {\n successCallback?: (document: VulcanDocument) => void;\n closeModal: () => void;\n removeSuccessCallback?: (document: VulcanDocument) => void;\n formProps?: any;\n}) => {\n const Components = useVulcanComponents();\n const success = successCallback\n ? (document) => {\n successCallback(document);\n closeModal();\n }\n : () => {\n closeModal();\n };\n\n const remove = removeSuccessCallback\n ? (document) => {\n removeSuccessCallback(document);\n closeModal();\n }\n : () => {\n closeModal();\n };\n\n return (\n <Components.SmartForm\n successCallback={success}\n removeSuccessCallback={remove}\n {...formProps}\n {...props}\n />\n );\n};\n","import { useIntlContext } from \"@vulcanjs/react-i18n\";\nimport { VulcanModel } from \"@vulcanjs/model\";\nimport { VulcanDocument } from \"@vulcanjs/schema\";\nimport React from \"react\";\nimport type { SmartFormProps } from \"../../form\";\nimport type { ButtonProps } from \"../../core/Button\";\nimport { useVulcanComponents } from \"../../VulcanComponents\";\n\nexport const NewButton = ({\n size,\n label,\n style = \"primary\",\n formProps,\n ...props\n}: {\n model: VulcanModel;\n label?: string;\n formProps?: Partial<SmartFormProps>;\n} & Pick<ButtonProps, \"size\"> & {\n style?: ButtonProps[\"variant\"];\n } & NewFormProps) => {\n const intl = useIntlContext();\n const Components = useVulcanComponents();\n return (\n <Components.ModalTrigger\n label={label || intl.formatMessage({ id: \"datatable.new\" })}\n title={label || intl.formatMessage({ id: \"datatable.new\" })}\n component={\n <Components.Button variant={style} size={size}>\n {label || <Components.FormattedMessage id=\"datatable.new\" />}\n </Components.Button>\n }\n >\n <Components.NewForm formProps={formProps} {...props} />\n </Components.ModalTrigger>\n );\n};\n\nexport interface NewFormProps {\n model: VulcanModel;\n successCallback?: (document: VulcanDocument) => void;\n closeModal: () => void;\n formProps?: Partial<SmartFormProps>;\n}\n/*\n\nNewForm Component\n\n*/\nexport const NewForm = ({\n model,\n closeModal,\n successCallback,\n formProps,\n}: NewFormProps) => {\n const Components = useVulcanComponents();\n const success = successCallback\n ? (document) => {\n successCallback(document);\n closeModal();\n }\n : () => {\n closeModal();\n };\n\n return (\n <Components.SmartForm\n model={model}\n successCallback={success}\n {...(formProps || {})}\n />\n );\n};\n","import { VulcanGraphqlModel } from \"@vulcanjs/graphql\";\nimport { VulcanUser } from \"@vulcanjs/permissions\";\nimport { useDelete } from \"@vulcanjs/react-hooks\";\nimport { DocumentNode } from \"graphql\";\nimport React from \"react\";\nimport { useVulcanComponents } from \"../../VulcanComponents\";\n\nexport const DeleteButton = (props: {\n label?: string;\n fragment?: DocumentNode;\n documentId?: string;\n mutationOptions?: any;\n currentUser?: VulcanUser;\n model: VulcanGraphqlModel;\n}) => {\n const Components = useVulcanComponents();\n const {\n label,\n fragment,\n documentId,\n mutationOptions,\n currentUser,\n model,\n ...rest\n } = props;\n const [deleteFunction, { loading }] = useDelete({\n model,\n fragment,\n mutationOptions,\n });\n\n return (\n <Components.LoadingButton\n loading={loading}\n onClick={() => {\n deleteFunction({ input: { id: documentId } });\n }}\n label={\n label || (\n <Components.FormattedMessage\n id=\"datatable.delete\"\n defaultMessage=\"Delete\"\n />\n )\n }\n {...rest}\n />\n );\n};\n","/**\n * Used by DataTable and Cards\n */\nimport { CellComponents } from \"..\";\nimport { CardItemSwitcher } from \"../../cell/CardItem\";\nimport {\n CardItemRelationItem,\n DefaultCell,\n UserCell,\n} from \"../../cell/CardItemRelationItem\";\nimport { CardItemArray } from \"../../cell/CardItemArray\";\nimport { CardItemDate } from \"../../cell/CardItemDate\";\nimport { CardItemDefault } from \"../../cell/CardItemDefault\";\nimport { CardItemHTML } from \"../../cell/CardItemHTML\";\nimport { CardItemImage } from \"../../cell/CardItemImage\";\nimport { CardItemNumber } from \"../../cell/CardItemNumber\";\nimport { CardItemObject } from \"../../cell/CardItemObject\";\nimport { CardItemRelationHasMany } from \"../../cell/CardItemRelationHasMany\";\nimport { CardItemRelationHasOne } from \"../../cell/CardItemRelationHasOne\";\nimport { CardItemString } from \"../../cell/CardItemString\";\nimport { CardItemURL } from \"../../cell/CardItemURL\";\n\nexport const defaultCellComponents: CellComponents = {\n CardItemSwitcher: CardItemSwitcher,\n CardItem: CardItemSwitcher,\n DefaultCell: DefaultCell,\n UserCell: UserCell,\n CardItemArray: CardItemArray,\n CardItemDate: CardItemDate,\n CardItemDefault: CardItemDefault,\n CardItemHTML: CardItemHTML,\n CardItemImage: CardItemImage,\n CardItemNumber: CardItemNumber,\n CardItemObject: CardItemObject,\n CardItemRelationHasMany: CardItemRelationHasMany,\n CardItemRelationHasOne: CardItemRelationHasOne,\n CardItemRelationItem: CardItemRelationItem,\n CardItemString: CardItemString,\n CardItemURL: CardItemURL,\n};\n","import { VulcanGraphqlModel } from \"@vulcanjs/graphql\";\nimport { VulcanFieldSchema } from \"@vulcanjs/schema\";\nimport { VulcanDocument } from \"@vulcanjs/schema\";\nimport React from \"react\";\nimport { useVulcanComponents } from \"../VulcanComponents\";\n\nconst getTypeName = (\n value: any,\n fieldName: string,\n model: VulcanGraphqlModel\n) => {\n const schema = model.schema;\n const fieldSchema = schema && schema[fieldName];\n if (fieldSchema) {\n // TODO: not 100% sure it works\n const type = fieldSchema.type; //.singleType;\n const typeName = typeof type === \"function\" ? type.name : type;\n return typeName + \"\";\n } else {\n return typeof value;\n }\n};\n\nconst getFieldSchema = (fieldName: string, model: VulcanGraphqlModel) => {\n const schema = model.schema;\n const fieldSchema = schema && schema[fieldName];\n return fieldSchema;\n};\n\nexport interface CellProps {\n nestingLevel?: number;\n value?: any;\n typeName?: string;\n contents?: any;\n fieldName?: string;\n model?: VulcanGraphqlModel;\n document?: VulcanDocument;\n}\n/**\n * Also used by the DataTable to render each cell\n *\n * TODO: move to its own \"Cell\" folder\n * TODO: nesting and relations are not yet very well handled\n * @param props\n * @returns\n */\nexport const CardItemSwitcher = (props: CellProps) => {\n const Components = useVulcanComponents();\n // if typeName is not provided, default to typeof value\n // note: contents provides additional clues about the contents (image, video, etc.)\n\n const {\n nestingLevel = 0,\n value,\n contents,\n fieldName,\n document,\n model,\n } = props;\n let { typeName } = props;\n\n // NOTE: we don't necessarilly have a model or schema, eg when nesting the render\n const fieldSchema =\n model && fieldName ? getFieldSchema(fieldName, model) : undefined;\n\n if (!typeName) {\n if (model && fieldName) {\n typeName = getTypeName(value, fieldName, model);\n } else {\n typeName = typeof value;\n }\n }\n\n // no value; we return an empty string\n if (typeof value === \"undefined\" || value === null) {\n return <>\"\"</>;\n }\n\n const itemProps: Pick<\n CellProps,\n \"nestingLevel\" | \"document\" | \"fieldName\" | \"model\"\n > & { value: any } & {\n fieldSchema?: VulcanFieldSchema;\n relatedFieldName?: string;\n relatedDocument?: any;\n relatedModel?: VulcanGraphqlModel;\n } = {\n nestingLevel: nestingLevel + 1,\n value,\n document,\n fieldName,\n model,\n fieldSchema,\n };\n\n // JSX element\n if (React.isValidElement(itemProps.value)) {\n return itemProps.value;\n }\n\n // Relation\n if (fieldSchema && fieldSchema.resolveAs && fieldSchema.resolveAs.relation) {\n itemProps.relatedFieldName =\n //fieldSchema.resolveAs?.fieldName ||\n fieldSchema.relation?.fieldName || fieldName;\n itemProps.relatedDocument = document?.[itemProps.relatedFieldName || \"\"];\n // TODO: typing is not good\n // @ts-ignore\n itemProps.relatedModel = fieldSchema.relation?.model;\n // TODO: how to get the model from a resolveAs or relation?\n /*\n itemProps.relatedCollection = getCollectionByTypeName(\n fieldSchema.resolveAs.typeName || fieldSchema.resolveAs.type\n );*/\n\n if (!itemProps.relatedDocument) {\n return (\n <span>\n Missing data for sub-document <code>{value}</code> of type{\" \"}\n <code>{typeName}</code> (<code>{itemProps.relatedFieldName}</code>)\n </span>\n );\n }\n\n switch (fieldSchema.relation?.kind) {\n case \"hasOne\":\n return <Components.CardItemRelationHasOne {...itemProps} />;\n\n case \"hasMany\":\n return <Components.CardItemRelationHasMany {...itemProps} />;\n\n default:\n return <Components.CardItemDefault {...itemProps} />;\n }\n }\n\n // Array\n if (Array.isArray(value)) {\n typeName = \"Array\";\n }\n\n switch (typeName) {\n case \"Boolean\":\n case \"boolean\":\n case \"Number\":\n case \"number\":\n case \"SimpleSchema.Integer\":\n return <Components.CardItemNumber {...itemProps} />;\n\n case \"Array\":\n return <Components.CardItemArray {...itemProps} />;\n\n case \"Object\":\n case \"object\":\n return <Components.CardItemObject {...itemProps} />;\n\n case \"Date\":\n return <Components.CardItemDate {...itemProps} />;\n\n case \"String\":\n case \"string\":\n switch (contents) {\n case \"html\":\n return <Components.CardItemHTML {...itemProps} />;\n\n case \"date\":\n return <Components.CardItemDate {...itemProps} />;\n\n case \"image\":\n return <Components.CardItemImage {...itemProps} force={true} />;\n\n case \"url\":\n return <Components.CardItemURL {...itemProps} force={true} />;\n\n default:\n // still attempt to parse string as an image or URL if possible\n return <Components.CardItemImage {...itemProps} />;\n }\n\n default:\n return <Components.CardItemDefault {...itemProps} />;\n }\n};\n","import { VulcanGraphqlModel } from \"@vulcanjs/graphql\";\nimport { VulcanDocument } from \"@vulcanjs/schema\";\nimport React from \"react\";\n// import { Link } from \"react-router-dom\";\nimport { useVulcanComponents } from \"../VulcanComponents\";\n\n/*\n\nTokens are components used to display an invidual element like a user name, \nlink to a post, category name, etc. \n\nThe naming convention is Type+Token, e.g. UserToken, PostToken, CategoryToken…\n\n*/\n\n// Relation Item\nexport const CardItemRelationItem = ({\n relatedDocument,\n relatedModel,\n}: {\n relatedDocument: VulcanDocument;\n relatedModel: VulcanGraphqlModel;\n}) => {\n const Components = useVulcanComponents();\n const label =\n // TODO: we could reenable this getLabel option to label documents of a model\n /*relatedModel.options.getLabel\n ? relatedModel.options.getLabel(relatedDocument)\n :*/ relatedDocument._id;\n const typeName = relatedDocument.__typename;\n const Cell = Components[`${typeName}Cell`];\n return Cell ? (\n <Cell document={relatedDocument} label={label} Components={Components} />\n ) : (\n <Components.DefaultCell document={relatedDocument} label={label} />\n );\n};\n\n// Default Cell\nexport const DefaultCell = ({ document, label }) => (\n <li className=\"relation-default-cell\">\n {document.pagePath ? (\n //<Link to={document.pagePath}>{label}</Link>\n <a href={document.pagePath}>{label}</a>\n ) : (\n <span>{label}</span>\n )}\n </li>\n);\n\n// User Token\nexport const UserCell = ({ document }) => {\n const Components = useVulcanComponents();\n return (\n <div className=\"contents-user user-item\">\n {/*<Components.Avatar size=\"small\" user={document} />*/}\n {document.pagePath ? (\n <a className=\"user-item-name\" href={document.pagePath}>\n {document.displayName}\n </a>\n ) : (\n /*\n <Link className=\"user-item-name\" to={document.pagePath}>\n {document.displayName}\n </Link>\n */\n <span className=\"user-item-name\">{document.displayName}</span>\n )}\n </div>\n );\n};\n","import React from \"react\";\nimport { useVulcanComponents } from \"../VulcanComponents\";\n\n// Array\nexport const CardItemArray = ({\n nestingLevel,\n value,\n}: {\n nestingLevel?: number;\n value: any;\n}) => {\n const Components = useVulcanComponents();\n return (\n <ol className=\"contents-array\">\n {value.map((item, index) => (\n <li key={index}>\n {\n <Components.CardItem\n value={item}\n typeName={typeof item}\n nestingLevel={nestingLevel}\n />\n }\n </li>\n ))}\n </ol>\n );\n};\n","import React from \"react\";\n// TODO: load moment dynamically instead?\nimport moment from \"moment\";\n\n// Date\nexport const CardItemDate = ({ value }) => (\n <span className=\"contents-date\">\n {moment(new Date(value)).format(\"YYYY/MM/DD, hh:mm\")}\n </span>\n);\n","import React from \"react\";\n\n// Default\nexport const CardItemDefault = ({ value }: { value?: any }) => (\n <span>{value && value.toString()}</span>\n);\n","import React from \"react\";\n\n// HTML\nexport const CardItemHTML = ({ value }) => (\n <div className=\"contents-html\" dangerouslySetInnerHTML={{ __html: value }} />\n);\n","import React from \"react\";\nimport { useVulcanComponents } from \"../VulcanComponents\";\n\n/*\n\nCard Item Components\n\n*/\n\n/**\n * NOTE: in Next.js you might want to replace this component with\n * the built-in image component?\n *\n * @param param0\n * @returns\n */\nexport const CardItemImage = ({ value, force = false }) => {\n const Components = useVulcanComponents();\n const isImage =\n [\".png\", \".jpg\", \".gif\"].indexOf(value.substr(-4)) !== -1 ||\n [\".webp\", \".jpeg\"].indexOf(value.substr(-5)) !== -1;\n return isImage || force ? (\n <img\n className=\"contents-image\"\n style={{ width: \"100%\", minWidth: 80, maxWidth: 200, display: \"block\" }}\n src={value}\n alt={value}\n />\n ) : (\n <Components.CardItemURL value={value} />\n );\n};\n","import React from \"react\";\n\n// Number\nexport const CardItemNumber = ({ value }: { value?: any }) => (\n <code className=\"contents-number\">{value.toString()}</code>\n);\n","import React from \"react\";\n// import { Link } from \"react-router-dom\";\nimport without from \"lodash/without.js\";\nimport { useVulcanComponents } from \"../VulcanComponents\";\n\n// Object\nexport const CardItemObject = (props) => {\n const { nestingLevel, value, showExpand } = props;\n const Components = useVulcanComponents();\n const showExpandControl = showExpand || nestingLevel > 1;\n if (value.__typename === \"User\") {\n const user = value;\n\n return (\n <div className=\"dashboard-user\" style={{ whiteSpace: \"nowrap\" }}>\n {/* TODO: we should allow to pass a custom cell for each model instead of providing our own cell for users */}\n {/*<Components.Avatar size=\"small\" user={user} link />*/}\n {user.pagePath ? (\n <a href={user.pagePath}>{user.displayName}</a>\n ) : (\n /*<Link to={user.pagePath}>{user.displayName}</Link>*/\n <span>{user.displayName}</span>\n )}\n </div>\n );\n } else {\n return (\n <div className=\"card-item-details\">\n {showExpandControl ? (\n <details>\n <summary>Expand</summary>\n <CardItemObjectContents {...props} />\n </details>\n ) : (\n <CardItemObjectContents {...props} />\n )}\n </div>\n );\n }\n};\n\nconst CardItemObjectContents = ({ nestingLevel, value: object }) => {\n const Components = useVulcanComponents();\n return (\n <table className=\"table table-bordered\">\n <tbody>\n {without(Object.keys(object), \"__typename\").map((key) => (\n <tr key={key}>\n <td>\n <strong>{key}</strong>\n </td>\n <td>\n <Components.CardItemSwitcher\n nestingLevel={nestingLevel}\n value={object[key]}\n typeName={typeof object[key]}\n />\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n );\n};\n","import React from \"react\";\nimport { useVulcanComponents } from \"../VulcanComponents\";\n\n// HasMany Relation\nexport const CardItemRelationHasMany = ({\n relatedDocument: relatedDocuments,\n ...rest\n}: any) => {\n const Components = useVulcanComponents();\n return (\n <div className=\"contents-hasmany\">\n {relatedDocuments.map((relatedDocument) => (\n <Components.CardItemRelationItem\n key={relatedDocument._id}\n relatedDocument={relatedDocument}\n {...rest}\n />\n ))}\n </div>\n );\n};\n","import React from \"react\";\nimport { useVulcanComponents } from \"../VulcanComponents\";\n\n// HasOne Relation\nexport const CardItemRelationHasOne = ({ ...rest }: any) => {\n const Components = useVulcanComponents();\n return (\n <div className=\"contents-hasone\">\n {<Components.CardItemRelationItem {...rest} />}\n </div>\n );\n};\n","import React from \"react\";\n\n// String\nexport const CardItemString = ({ string }) => (\n <div className=\"contents-string\">\n {string.indexOf(\" \") === -1 && string.length > 30 ? (\n <span title={string}>{string.substr(0, 30)}…</span>\n ) : (\n <span>{string}</span>\n )}\n </div>\n);\n","import React from \"react\";\nimport { useVulcanComponents } from \"../VulcanComponents\";\n\n// URL\nexport const CardItemURL = ({\n value,\n force,\n}: {\n value?: any;\n force?: boolean;\n}) => {\n const Components = useVulcanComponents();\n return force || value.slice(0, 4) === \"http\" ? (\n <a\n className=\"contents-link\"\n href={value}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <Components.CardItemString string={value} />\n </a>\n ) : (\n <Components.CardItemString string={value} />\n );\n};\n","import { FormattedMessage } from \"@vulcanjs/react-i18n\";\nimport { Button } from \"../../core/Button\";\nimport { Loading } from \"../../core/Loading\";\n\nimport { LoadingButton } from \"../../LoadingButton\";\nimport { MutationButton } from \"../../MutationButton\";\nimport { HeadTags } from \"../../HeadTags\";\n\n// TODO: rewrite to remove dep to react-bootstrap\nimport { TooltipTrigger } from \"../../bootstrap/TooltipTrigger\";\nimport Dropdown from \"../../bootstrap/Dropdown\";\n\nimport type { PossibleCoreComponents } from \"../typings\";\nimport { BootstrapModal } from \"../../bootstrap/Modal\";\nimport { ModalTrigger } from \"../../bootstrap/ModalTrigger\";\n\n/**\n * Minimal set of components, mandatory to operate Vulcan React UI\n */\nexport const defaultCoreComponents: PossibleCoreComponents = {\n // core components taht were used in forms\n Loading,\n Alert: () => null,\n Button,\n Icon: () => null,\n // i18n\n FormattedMessage,\n // core\n LoadingButton,\n MutationButton,\n HeadTags,\n //\n TooltipTrigger,\n Dropdown,\n Modal: BootstrapModal,\n ModalTrigger,\n};\n","import React from \"react\";\n\n// @see https://stackoverflow.com/questions/51835611/specify-specific-props-and-accept-general-html-props-in-typescript-react-app\nexport type ButtonProps = React.DetailedHTMLProps<\n React.HTMLAttributes<HTMLButtonElement>,\n HTMLButtonElement\n> &\n // The any is important here: we allow end-application to \"hack\" the component with a custom replacement implementation,\n // so we authorize them to pass additionnal unknown props\n any;\n\n// TODO: whitelist HTMLButton props\nexport const Button: React.FC = ({ children, ...props }) => (\n <button {...props}>{children}</button>\n);\n","import React from \"react\";\n// @see https://dockyard.com/blog/2020/03/02/accessible-loading-indicatorswith-no-extra-elements\nexport const Loading = () => (\n <span aria-live=\"polite\" aria-busy=\"true\">\n Loading...\n </span>\n);\n","import React, { CSSProperties } from \"react\";\nimport type { ButtonProps } from \"./core/Button\";\nimport { useVulcanComponents } from \"./VulcanComponents/Consumer\";\nexport interface LoadingButtonProps extends ButtonProps {\n loading?: boolean;\n label?: string | React.ReactNode;\n onClick?: any;\n children?: React.ReactNode;\n className?: string;\n}\nexport const LoadingButton = ({\n loading,\n label,\n onClick,\n children,\n className = \"\",\n ...rest\n}: LoadingButtonProps & any) => {\n const Components = useVulcanComponents();\n\n const wrapperStyle: CSSProperties = {\n position: \"relative\",\n };\n\n const labelStyle = loading ? { opacity: 0.5 } : {};\n\n const loadingStyle: CSSProperties = loading\n ? {\n position: \"absolute\",\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n }\n : { display: \"none\" };\n\n return (\n <Components.Button\n className={`loading-button ${\n loading ? \"loading-button-loading\" : \"loading-button-notloading\"\n } ${className}`}\n onClick={onClick}\n {...rest}\n >\n <span style={wrapperStyle}>\n <span style={labelStyle}>{label || children}</span>\n <span style={loadingStyle}>\n <Components.Loading />\n </span>\n </span>\n </Components.Button>\n );\n};\n","/*\n\nExample Usage\n\n<Components.MutationButton\n label=\"Cancel Subscription\"\n variant=\"primary\"\n mutationOptions={{\n name: 'cancelSubscription',\n args: { bookingId: 'String' },\n fragmentName: 'BookingsStripeDataFragment',\n }}\n mutationArguments={{ bookingId: booking._id }}\n submitCallback={() => {}}\n successCallback={result => { console.log(result) }}\n/>\n\n*/\nimport React, { useState } from \"react\";\nimport { DocumentNode } from \"graphql\";\nimport { MutationHookOptions, useMutation } from \"@apollo/client\";\nimport gql from \"graphql-tag\";\nimport { useVulcanComponents } from \"./VulcanComponents/Consumer\";\nimport { LoadingButtonProps } from \"./LoadingButton\";\n// import withMutation from '../containers/registeredMutation';\n\n// TODO:\n/**\n * Difference with Vulcan Meteor: there is no\n * registered mutation anymore,\n * so you need to pass your mutations explicitely, using graphql\n */\n/*\nexport class MutationButton extends PureComponent {\n constructor(props) {\n super(props);\n this.button = withMutation(props.mutationOptions)(MutationButtonInner);\n }\n\n render() {\n const Component = this.button;\n return <Component {...this.props} />;\n }\n}*/\n\nexport interface MutationButtonProps {\n /**\n * NOTE: in Vulcan Meteor you had to write:\n * mutationOptions: { name: \"foobar\", mutationOptions: {refetchQueries:[\"hello\"]}}\n *\n * In Vulcan Next, you can only pass the \"mutationOptions\" object:\n * mutationOptions: { refetchQueries:[\"hello\"]}\n * and the mutation is provided via the new \"mutation\" prop\n */\n mutationOptions?: MutationHookOptions;\n /**\n * @example\n mutation: gql`\n mutation sampleMutation($input: Input) {\n hello\n }\n `,\n */\n mutation: string | DocumentNode;\n /** Variables passed to the mutation (NOTE: we can't pass other options at the moment) */\n mutationArguments?: MutationHookOptions<any>[\"variables\"];\n /** Callback run before submitting. Can optionnaly return mutationArguments that will override current ones. */\n submitCallback?: (\n mutationArgumentsFromProps: MutationHookOptions<any>[\"variables\"]\n ) =>\n | void\n | { mutationArguments: MutationHookOptions<any>[\"variables\"] }\n | Promise<void | {\n mutationArguments: MutationHookOptions<any>[\"variables\"];\n }>;\n successCallback?: (res: any) => void | Promise<void>;\n errorCallback?: (err: any) => void | Promise<void>;\n /** Now isolated into their own object to avoid needed to explicitely pick/omit */\n loadingButtonProps?: LoadingButtonProps;\n /** Shortcut for loadingButtonProps.label */\n label?: string | React.ReactNode;\n}\nexport const MutationButton = (props: MutationButtonProps) => {\n const Components = useVulcanComponents();\n const [loading, setLoading] = useState<boolean>(false);\n const [error, setError] = useState<any | undefined>();\n\n const {\n //mutationOptions,\n mutation,\n loadingButtonProps = {},\n label,\n } = props;\n let { mutationArguments } = props;\n const mutationAsNode =\n typeof mutation === \"string\"\n ? gql`\n ${mutation}\n `\n : mutation;\n const [mutationFunc] = useMutation(mutationAsNode);\n\n const handleClick = async (e) => {\n e.preventDefault();\n setLoading(true);\n setError(undefined);\n const {\n //mutationOptions,\n submitCallback,\n successCallback,\n errorCallback,\n } = props;\n //const mutationName = mutationOptions.name;\n //const mutation = this.props[mutationName];\n\n try {\n if (submitCallback) {\n const callbackReturn = await submitCallback(mutationArguments);\n if (callbackReturn && callbackReturn.mutationArguments) {\n mutationArguments = callbackReturn.mutationArguments;\n }\n }\n const result = await mutationFunc({ variables: mutationArguments });\n if (successCallback) {\n await successCallback(result);\n }\n } catch (error) {\n // TODO: may not work because the mutationFunc may not throw in case of error\n setError(error);\n if (errorCallback) {\n await errorCallback(error);\n }\n } finally {\n setLoading(false);\n }\n\n // mutation(mutationArguments)\n // .then(result => {\n // this.setState({ loading: false });\n // if (successCallback) {\n // successCallback(result);\n // }\n // })\n // .catch(error => {\n // this.setState({ loading: false });\n // if (errorCallback) {\n // errorCallback(error);\n // }\n // });\n };\n\n //const mutationName = this.props.mutationOptions.name;\n\n const loadingButton = (\n <Components.LoadingButton\n loading={loading}\n onClick={handleClick}\n label={label}\n {...loadingButtonProps}\n />\n );\n\n if (error) {\n return (\n <Components.TooltipTrigger trigger={loadingButton} defaultShow={true}>\n {error.message.replace(\"GraphQL error: \", \"\")}\n </Components.TooltipTrigger>\n );\n }\n return loadingButton;\n};\n","import React, { PureComponent } from \"react\";\nimport PropTypes from \"prop-types\";\n// import { Helmet } from 'react-helmet';\n// import { registerComponent, Utils, getSetting, registerSetting, Head } from 'meteor/vulcan:lib';\n// import compose from \"recompose/compose\";\n\n// registerSetting('logoUrl', null, 'Absolute URL for the logo image');\n// registerSetting('title', 'My App', 'App title');\n// registerSetting('tagline', null, 'App tagline');\n// registerSetting('description');\n// registerSetting('siteImage', null, 'An image used to represent the site on social media');\n// registerSetting('faviconUrl', '/img/favicon.ico', 'Favicon absolute URL');\n\nexport interface HeadTagsProps {\n url: string;\n title: string;\n description?: string;\n image: string;\n siteUrl: string;\n faviconUrl?: string;\n}\n/**\n *\n * Create basic social meta tags for a page\n * (Facebook, Twitter)\n *\n * NOTE: you are responsible for wrapping those tags in\n * next/head, Helmet or whatever solution you use for\n * head tags decentralization\n *\n *\n */\nexport class HeadTags extends PureComponent<HeadTagsProps> {\n render() {\n console.warn(\n \"HeadTags won't work in Next.js, because Head doesn't support nesting. Define meta directly in your app instead.\"\n );\n const { url, title, description, siteUrl, faviconUrl } = this.props;\n let image = this.props.image;\n /*\n const url = url; //|| Utils.getSiteUrl();\n const title = title; //|| getSetting(\"title\", \"My App\");\n const description = description; /* ||\n getSetting(\"tagline\") ||\n getSetting(\"description\"); */\n // default image meta: logo url, else site image defined in settings\n //let image = logoUrl; /*!!getSetting(\"siteImage\")\n //? getSetting(\"siteImage\")\n //: getSetting(\"logoUrl\");*/\n\n // overwrite default image if one is passed as props\n //if (!!this.props.image) {\n // image = this.props.image;\n //}\n\n // add site url base if the image is stored locally\n if (!!image && image.indexOf(\"//\") === -1) {\n // remove starting slash from image path if needed\n if (image.charAt(0) === \"/\") {\n image = image.slice(1);\n }\n image = /*getSiteUrl()*/ siteUrl + image;\n }\n\n return (\n <>\n <title>{title}</title>\n\n <meta charSet=\"utf-8\" />\n <meta name=\"description\" content={description} />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n\n {/* facebook */}\n <meta property=\"og:type\" content=\"article\" />\n <meta property=\"og:url\" content={url} />\n <meta property=\"og:image\" content={image} />\n <meta property=\"og:title\" content={title} />\n <meta property=\"og:description\" content={description} />\n\n {/* twitter */}\n <meta name=\"twitter:card\" content=\"summary\" />\n <meta name=\"twitter:image:src\" content={image} />\n <meta name=\"twitter:title\" content={title} />\n <meta name=\"twitter:description\" content={description} />\n\n <link rel=\"canonical\" href={url} />\n <link\n //name=\"favicon\"\n rel=\"shortcut icon\"\n href={faviconUrl || \"/favicon.ico\"}\n />\n\n {/**\n * Not needed as we expect the end application use either Helmet at app level\n * or next/head\n * \n {Head.meta.map((tag, index) => (\n <meta key={index} {...tag} />\n ))}\n {Head.link.map((tag, index) => (\n <link key={index} {...tag} />\n ))}\n {Head.script.map((tag, index) => (\n <script key={index} {...tag}>\n {tag.contents}\n </script>\n ))}\n\n {Head.components.map((componentOrArray, index) => {\n let HeadComponent;\n if (Array.isArray(componentOrArray)) {\n const [component, ...hocs] = componentOrArray;\n HeadComponent = compose(...hocs)(component);\n } else {\n HeadComponent = componentOrArray;\n }\n return <HeadComponent key={index} />;\n })}\n */}\n </>\n );\n }\n}\n\n/*\nHeadTags.propTypes = {\n url: PropTypes.string,\n title: PropTypes.string,\n description: PropTypes.string,\n image: PropTypes.string,\n};\n*/\n","/*\n\nchildren: the content of the tooltip\ntrigger: the component that triggers the tooltip to appear\n\n*/\nimport React from \"react\";\n// import Tooltip from 'react-bootstrap/Tooltip';\n// import OverlayTrigger from 'react-bootstrap/OverlayTrigger';\n\n/**\n * Display a tooltip when hovering an item\n */\nexport const TooltipTrigger = ({\n children,\n trigger,\n //placement = \"top\",\n //...rest\n}) => {\n return <div title={children}>{trigger}</div>;\n /*\n const tooltip = <Tooltip id=\"tooltip\">{children}</Tooltip>;\n\n return (\n <OverlayTrigger placement={placement} {...rest} overlay={tooltip}>\n {trigger}\n </OverlayTrigger>\n );*/\n};\n","// TODO: uses react bootstrap a lot, need a refactor\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Dropdown, DropdownButton } from \"react-bootstrap\";\nconst DropdownItem = Dropdown.Item;\nimport { useVulcanComponents } from \"../VulcanComponents\";\n// import { LinkContainer } from \"react-router-bootstrap\";\n\n/*\n\nNote: `rest` is used to ensure auto-generated props from parent dropdown\ncomponents are properly passed down to MenuItem\n\n*/\nconst Item = ({\n index,\n //to,\n labelId,\n label,\n component,\n componentProps = {},\n itemProps,\n //linkProps,\n ...rest\n}: any) => {\n const Components = useVulcanComponents();\n let menuComponent;\n\n if (component) {\n menuComponent = React.cloneElement(component, componentProps);\n } else if (labelId) {\n menuComponent = <Components.FormattedMessage id={labelId} />;\n } else {\n menuComponent = <span>{label}</span>;\n }\n\n const item = (\n <DropdownItem eventKey={index} {...itemProps} {...rest}>\n {menuComponent}\n </DropdownItem>\n );\n\n /*\n @depreacted Instead wrap the item yourself with the relevant link\n return to ? (\n <LinkContainer to={to} {...linkProps}>\n {item}\n </LinkContainer>\n ) : (\n item\n );*/\n return item;\n};\n\nItem.propTypes = {\n index: PropTypes.number, // index\n to: PropTypes.any, // a string or object, used to generate the router path for the menu item\n labelId: PropTypes.string, // an i18n id for the item label\n label: PropTypes.string, // item label string, used if id is not provided\n component: PropTypes.object, // a component to use as menu item\n componentProps: PropTypes.object, // props passed to the component\n itemProps: PropTypes.object, // props for the <MenuItem/> component\n};\n/*\n\nA node contains a menu item, and optionally a list of child items\n\n*/\nconst Node = ({ childrenItems, ...rest }) => {\n return (\n <>\n <Item {...rest} />\n {childrenItems && !!childrenItems.length && (\n <div className=\"menu-node-children\">\n {childrenItems.map((item, index) => (\n <Item key={index} {...item} />\n ))}\n </div>\n )}\n </>\n );\n};\n\nNode.propTypes = {\n childrenItems: PropTypes.array, // an array of dropdown items used as children of the current item\n};\n\nconst BootstrapDropdown = ({\n label,\n labelId,\n trigger,\n menuItems,\n menuContents,\n variant = \"dropdown\",\n buttonProps,\n ...dropdownProps\n}) => {\n const Components = useVulcanComponents();\n const menuBody = menuContents\n ? menuContents\n : menuItems.map((item, index) => {\n if (item === \"divider\") {\n return <Dropdown.Divider key={index} />;\n } else {\n return <Node {...item} key={index} index={index} />;\n }\n });\n\n if (variant === \"flat\") {\n return menuBody;\n } else {\n if (trigger) {\n // if a trigger component has been provided, use it\n return (\n <Dropdown {...dropdownProps}>\n <Dropdown.Toggle>{trigger}</Dropdown.Toggle>\n <Dropdown.Menu>{menuBody}</Dropdown.Menu>\n </Dropdown>\n );\n } else {\n // else default to DropdownButton\n return (\n <DropdownButton\n {...buttonProps}\n title={labelId ? <Components.FormattedMessage id={labelId} /> : label}\n {...dropdownProps}\n >\n {menuBody}\n </DropdownButton>\n );\n }\n }\n};\n\nBootstrapDropdown.propTypes = {\n labelId: PropTypes.string, // menu title/label i18n string\n label: PropTypes.string, // menu title/label\n trigger: PropTypes.object, // component used as menu trigger (the part you click to open the menu)\n menuContents: PropTypes.object, // a component specifying the menu contents\n menuItems: PropTypes.array, // an array of menu items, used if menuContents is not provided\n variant: PropTypes.string, // dropdown (default) or flat\n buttonProps: PropTypes.object, // props specific to the dropdown button\n};\n\nexport default BootstrapDropdown;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Modal } from \"react-bootstrap\";\n\nexport const BootstrapModal = ({\n children,\n size = \"lg\" as const,\n show = false,\n onHide,\n title,\n showCloseButton = true,\n header,\n footer,\n ...rest\n}) => {\n let headerComponent;\n if (header) {\n headerComponent = <Modal.Header>{header}</Modal.Header>;\n } else if (title) {\n headerComponent = (\n <Modal.Header closeButton={showCloseButton}>\n <Modal.Title>{title}</Modal.Title>\n </Modal.Header>\n );\n } else {\n headerComponent = (\n <Modal.Header closeButton={showCloseButton}></Modal.Header>\n );\n }\n\n const footerComponent = footer ? <Modal.Footer>{footer}</Modal.Footer> : null;\n\n return (\n <Modal size={size} show={show} onHide={onHide} {...rest}>\n {headerComponent}\n <Modal.Body>{children}</Modal.Body>\n {footerComponent}\n </Modal>\n );\n};\n\nBootstrapModal.propTypes = {\n size: PropTypes.string,\n show: PropTypes.bool,\n showCloseButton: PropTypes.bool,\n onHide: PropTypes.func,\n title: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n header: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n footer: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n};\n","import React, { useState } from \"react\";\nimport { useVulcanComponents } from \"../VulcanComponents\";\n\nexport const ModalTrigger = (props: {\n openCallback?: () => void;\n closeCallback?: () => void;\n onClick?: () => void;\n trigger?: any;\n component?: any;\n children?: any;\n label?: string | React.ReactNode;\n size?: string;\n className?: string;\n dialogClassName?: string;\n title?: string | React.ReactNode;\n modalProps?: any;\n header?: any;\n footer?: any;\n}) => {\n const [modalIsOpen, setModalIsOpen] = useState(false);\n const { onClick, openCallback, closeCallback } = props;\n\n const clickHandler = (e) => {\n e.preventDefault();\n if (onClick) {\n onClick();\n }\n openModal();\n };\n\n const openModal = () => {\n if (openCallback) {\n openCallback();\n }\n setModalIsOpen(true);\n };\n\n const closeModal = () => {\n if (closeCallback) {\n closeCallback();\n }\n setModalIsOpen(false);\n };\n const Components = useVulcanComponents();\n\n const {\n trigger,\n component,\n children,\n label,\n size,\n className,\n dialogClassName,\n title,\n modalProps,\n header,\n footer,\n } = props;\n\n let triggerComponent = trigger || component;\n triggerComponent = triggerComponent ? (\n <span onClick={clickHandler}>{triggerComponent}</span>\n ) : (\n <Components.Button onClick={clickHandler}>{label}</Components.Button>\n );\n const childrenComponent = React.cloneElement(children, {\n closeModal,\n });\n const headerComponent = header && React.cloneElement(header, { closeModal });\n const footerComponent = footer && React.cloneElement(footer, { closeModal });\n\n return (\n <div className=\"modal-trigger\">\n {triggerComponent}\n <Components.Modal\n size={size}\n className={className}\n show={modalIsOpen}\n onHide={closeModal}\n dialogClassName={dialogClassName}\n title={title}\n header={headerComponent}\n footer={footerComponent}\n {...modalProps}\n >\n {childrenComponent}\n </Components.Modal>\n </div>\n );\n};\n","export * from \"./Consumer\";\nexport * from \"./Provider\";\n","/**\n * NOTE: KEEP SEPARATED FROM THE HOOKS TO CONSUME THE CONTEXT\n * otherwise you'll end up with circular dependencies because of the default components\n */\n// TODO: we might need to adapt the provider to merge its value with a potentially higher up context\nimport React from \"react\";\n\nimport {\n VulcanCurrentUserContext,\n VulcanCurrentUserContextType,\n} from \"./Context\";\n\n// So that you can override only some components by adding an additional context while keeping the defaults\nexport const VulcanCurrentUserProvider = ({\n value,\n ...props\n}: {\n value: VulcanCurrentUserContextType;\n children: React.ReactNode;\n}) => (\n <VulcanCurrentUserContext.Provider\n value={value} // merge provided components so the user can provide only a partial replacement\n {...props}\n />\n);\n","// import { compose } from \"recompose\";\nimport React from \"react\";\n\nexport const Components = {}; // will be populated on startup\nexport const ComponentsTable = {}; // storage for infos about components\n\nexport const coreComponents = [\n \"Alert\",\n \"Button\",\n \"Modal\",\n \"ModalTrigger\",\n \"Table\",\n \"FormComponentCheckbox\",\n \"FormComponentCheckboxGroup\",\n \"FormComponentDate\",\n \"FormComponentDate2\",\n \"FormComponentDateTime\",\n \"FormComponentDefault\",\n \"FormComponentText\",\n \"FormComponentEmail\",\n \"FormComponentNumber\",\n \"FormComponentRadioGroup\",\n \"FormComponentSelect\",\n \"FormComponentSelectMultiple\",\n \"FormComponentStaticText\",\n \"FormComponentTextarea\",\n \"FormComponentTime\",\n \"FormComponentUrl\",\n \"FormComponentInner\",\n \"FormControl\",\n \"FormElement\",\n];\n\n/**\n * Register a Vulcan component with a name, a raw component than can be extended\n * and one or more optional higher order components.\n *\n * @param {String} name The name of the component to register.\n * @param {Component} rawComponent Interchangeable/extendable react component.\n * @param {...(Function|Array)} hocs The HOCs to compose with the raw component.\n *\n * Note: when a component is registered without higher order component, `hocs` will be\n * an empty array, and it's ok!\n * See https://github.com/reactjs/redux/blob/master/src/compose.js#L13-L15\n *\n * @returns Structure of a component in the list:\n *\n * ComponentsTable.Foo = {\n * name: 'Foo',\n * hocs: [fn1, fn2],\n * rawComponent: React.Component,\n * call: () => compose(...hocs)(rawComponent),\n * }\n *\n */\n/*\nexport function registerComponent(name, rawComponent, ...hocs) {\n // support single-argument syntax\n if (typeof arguments[0] === \"object\") {\n // note: cannot use `const` because name, components, hocs are already defined\n // as arguments so destructuring cannot work\n // eslint-disable-next-line no-redeclare\n var {\n name,\n component,\n // @ts-ignore\n hocs = [],\n } = arguments[0];\n rawComponent = component;\n }\n // store the component in the table\n ComponentsTable[name] = {\n name,\n rawComponent,\n hocs,\n };\n}\n*/\n\n/**\n * Returns true if a component with the given name has been registered with\n * registerComponent(name, component, ...hocs).\n *\n * @param {String} name The name of the component to get.\n * @returns {Boolean}\n */\nexport const componentExists = (name) => {\n const component = ComponentsTable[name];\n return !!component;\n};\n\n/**\n * Get a component registered with registerComponent(name, component, ...hocs).\n *\n * @param {String} name The name of the component to get.\n * @returns {Function|React Component} A (wrapped) React component\n */\n/*\nexport const getComponent = (name) => {\n const component = ComponentsTable[name];\n if (!component) {\n throw new Error(`Component ${name} not registered.`);\n }\n if (component.hocs && component.hocs.length) {\n const hocs = component.hocs.map((hoc) => {\n if (!Array.isArray(hoc)) {\n if (typeof hoc !== \"function\") {\n throw new Error(\n `In registered component ${name}, an hoc is of type ${typeof hoc}`\n );\n }\n return hoc;\n }\n const [actualHoc, ...args] = hoc;\n if (typeof actualHoc !== \"function\") {\n throw new Error(\n `In registered component ${name}, an hoc is of type ${typeof actualHoc}`\n );\n }\n return actualHoc(...args);\n });\n return compose(...hocs)(component.rawComponent);\n } else {\n return component.rawComponent;\n }\n};\n*/\n\n/**\n * Populate the lookup table for components to be callable\n * ℹ️ Called once on app startup\n **/\n/*\nexport const populateComponentsApp = () => {\n const registeredComponents = Object.keys(ComponentsTable);\n\n // loop over each component in the list\n registeredComponents.map((name) => {\n // populate an entry in the lookup table\n Components[name] = getComponent(name);\n\n // uncomment for debug\n // console.log('init component:', name);\n });\n\n const missingComponents = difference(coreComponents, registeredComponents);\n\n if (missingComponents.length) {\n // eslint-disable-next-line no-console\n console.warn(\n `Found the following missing core components: ${missingComponents.join(\n \", \"\n )}. Include a UI package such as vulcan:ui-bootstrap to add them.`\n );\n }\n};\n*/\n/**\n * Get the **raw** (original) component registered with registerComponent\n * without the possible HOCs wrapping it.\n *\n * @param {String} name The name of the component to get.\n * @returns {Function|React Component} An interchangeable/extendable React component\n */\nexport const getRawComponent = (name) => {\n return ComponentsTable[name].rawComponent;\n};\n\n/**\n * Replace a Vulcan component with the same name with a new component or\n * an extension of the raw component and one or more optional higher order components.\n * This function keeps track of the previous HOCs and wrap the new HOCs around previous ones\n *\n * @param {String} name The name of the component to register.\n * @param {React Component} newComponent Interchangeable/extendable component.\n * @param {...Function} newHocs The HOCs to compose with the raw component.\n * @returns {Function|React Component} A component callable with Components[name]\n *\n * Note: when a component is registered without higher order component, `hocs` will be\n * an empty array, and it's ok!\n * See https://github.com/reactjs/redux/blob/master/src/compose.js#L13-L15\n */\n/*\nexport function replaceComponent(name, newComponent, ...newHocs) {\n // support single argument syntax\n if (typeof arguments[0] === \"object\") {\n // eslint-disable-next-line no-redeclare\n var { name, component, hocs = [] } = arguments[0];\n newComponent = component;\n newHocs = hocs;\n }\n\n const previousComponent = ComponentsTable[name];\n const previousHocs = (previousComponent && previousComponent.hocs) || [];\n\n if (!previousComponent) {\n // eslint-disable-next-line no-console\n console.warn(\n `Trying to replace non-registered component ${name}. The component is ` +\n \"being registered. If you were trying to replace a component defined by \" +\n \"another package, make sure that you haven't misspelled the name. Check \" +\n \"also if the original component is still being registered or that it \" +\n \"hasn't been renamed.\"\n );\n }\n\n return registerComponent(name, newComponent, ...newHocs, ...previousHocs);\n}\n*/\n\n/*\nexport const copyHoCs = (sourceComponent, targetComponent) => {\n return compose(...sourceComponent.hocs)(targetComponent);\n};\n*/\n\n/**\n * Returns an instance of the given component name of function\n * @param {string|function} component A component, the name of a component, or a react element\n * @param {Object} [props] Optional properties to pass to the component\n */\n//eslint-disable-next-line react/display-name\n// legacy\nexport const instantiateComponent = (\n component?: React.ComponentType | Function | any,\n props?: any\n) => {\n if (!component) {\n return null;\n } /*else if (typeof component === \"string\") {\n const Component = Components[component];\n return <Component {...props} />;\n } */ else if (React.isValidElement(component)) {\n return React.cloneElement(component, props);\n } else if (\n typeof component === \"function\" &&\n component.prototype &&\n component.prototype.isReactComponent\n ) {\n const Component = component as React.ComponentType<any>;\n return <Component {...props} />;\n } else if (typeof component === \"function\") {\n return component(props);\n } else if (\n typeof component === \"object\" &&\n component.$$typeof &&\n component.render\n ) {\n const Component = component as React.ComponentType<any>;\n return <Component {...props} />;\n } else {\n return component;\n }\n};\n\n/**\n * Creates a component that will render the registered component with the given name.\n *\n * This function may be useful when in need for some registered component, but in contexts\n * where they have not yet been initialized, for example at compile time execution. In other\n * words, when using `Components.ComponentName` is not allowed (because it has not yet been\n * populated, hence would be `undefined`), then `delayedComponent('ComponentName')` can be\n * used instead.\n *\n * @example Create a container for a registered component\n * // SomeContainer.js\n * import compose from 'recompose/compose';\n * import { delayedComponent } from 'meteor/vulcan:core';\n *\n * export default compose(\n * // ...some hocs with container logic\n * )(delayedComponent('ComponentName')); // cannot use Components.ComponentName in this context!\n *\n * @example {@link dynamicLoader}\n * @param {String} name Component name\n * @return {Function}\n * Functional component that will render the given registered component\n */\nexport const delayedComponent = (name) => {\n return (props) => {\n const Component = Components[name] || null;\n return Component && <Component {...props} />;\n };\n};\n\n// Example with Proxy (might be unstable/hard to reason about)\n//const mergeWithComponents = (myComponents = {}) => {\n// const handler = {\n// get: function(target, name) {\n// return name in target ? target[name] : Components[name];\n// }\n// };\n// const proxy = new Proxy(myComponents, handler);\n// return proxy;\n//};\nexport const mergeWithComponents = (myComponents) =>\n myComponents ? { ...Components, ...myComponents } : Components;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;AA4BkB,QAAA;AAClB,QAAI;AACJ,QAAI;AACJ,QAAI;AACJ,QAAI;AACJ,QAAI;AACJ,QAAI;AACJ,QAAI;AACJ,QAAI;AACJ,QAAI;AACJ,QAAI;AACJ,QAAI;AACJ,QAAC;QACG;QACA;;;;;;;;;;;cASA,SAAS;UACL,OAAI,OAAO,WAAW,WAAA,SAAA,OAAA,SAAA,WAAA,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G,WAAO;AAC9C,QAAM,eAAe,eAAe,cAAc,WAAW;AAC7D,SAAO;GAJqB;AAWvB,IAAM,6BAA6B,wBAAC,WAAW,WAAW;AAC/D,QAAM,kBAAkB,qBAAqB,WAAW,MAAM;AAC9D,MAAI,CAAC,iBAAiB;AAEpB,UAAM,mBAAmB,sBAAsB,WAAW,MAAM;AAEhE,QAAI,CAAC;AAAkB,aAAO;AAC9B,WAAO;;AAET,SAAO;GATiC;AAYnC,IAAM,mBAAmB;EAC9B;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGK,IAAM,iBAAiB;EAC5B;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;;AGxPF;;AA0BO,IAAM,cACX,uBAAM,cAA4C,MAAS;AAEtD,IAAM,iBAAiB,6BAAM;AAClC,QAAM,cAAc,YAAW,WAAW;AAC1C,MAAI,CAAC;AACH,UAAM,IAAI,MACR,6GAA6G;AAEjH,SAAO;GANqB;;;AC7B9B;AAaA;AACA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA0BO,IAAM,WAAW,wBACtB,OACA,YACA,SACA,WACA,gBACG;AACH,QAAM,iBAAiB,MAAM,KAAK,YAAW;AAC7C,QAAM,QAAQ,YAAY;IACxB,MAAM;IACN;IACA;IACA,QAAQ;GACT;AACD,MAAI,aAAa;AACf,UAAM,kBAAkB,QAAQ,cAAc;MAC5C,IAAI,WAAW;MACf,gBAAgB;KACjB;A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