@kaspernj/api-maker 1.0.2054 → 1.0.2055
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/api.js +64 -212
- package/build/api.js.map +1 -1
- package/build/attribute-not-loaded-error.js +2 -25
- package/build/attribute-not-loaded-error.js.map +1 -1
- package/build/base-component.js +3 -26
- package/build/base-component.js.map +1 -1
- package/build/base-error.js +20 -45
- package/build/base-error.js.map +1 -1
- package/build/base-model/attribute.js +14 -21
- package/build/base-model/attribute.js.map +1 -1
- package/build/base-model/column.js +4 -8
- package/build/base-model/column.js.map +1 -1
- package/build/base-model/reflection.js +11 -51
- package/build/base-model/reflection.js.map +1 -1
- package/build/base-model/scope.js +8 -45
- package/build/base-model/scope.js.map +1 -1
- package/build/base-model.js +583 -836
- package/build/base-model.js.map +1 -1
- package/build/bootstrap/attribute-row.js +87 -172
- package/build/bootstrap/attribute-row.js.map +1 -1
- package/build/bootstrap/attribute-rows.js +21 -50
- package/build/bootstrap/attribute-rows.js.map +1 -1
- package/build/bootstrap/card.js +76 -159
- package/build/bootstrap/card.js.map +1 -1
- package/build/bootstrap/checkbox.js +53 -102
- package/build/bootstrap/checkbox.js.map +1 -1
- package/build/bootstrap/checkboxes.js +116 -202
- package/build/bootstrap/checkboxes.js.map +1 -1
- package/build/bootstrap/input.js +80 -131
- package/build/bootstrap/input.js.map +1 -1
- package/build/bootstrap/invalid-feedback.js +18 -46
- package/build/bootstrap/invalid-feedback.js.map +1 -1
- package/build/bootstrap/paginate.js +99 -164
- package/build/bootstrap/paginate.js.map +1 -1
- package/build/bootstrap/radio-buttons.js +43 -80
- package/build/bootstrap/radio-buttons.js.map +1 -1
- package/build/bootstrap/select.js +43 -90
- package/build/bootstrap/select.js.map +1 -1
- package/build/bootstrap/sort-link.js +68 -151
- package/build/bootstrap/sort-link.js.map +1 -1
- package/build/cable-connection-pool.js +43 -65
- package/build/cable-connection-pool.js.map +1 -1
- package/build/cable-subscription-pool.js +104 -161
- package/build/cable-subscription-pool.js.map +1 -1
- package/build/cable-subscription.js +9 -16
- package/build/cable-subscription.js.map +1 -1
- package/build/cache-key-generator.js +27 -36
- package/build/cache-key-generator.js.map +1 -1
- package/build/can-can.js +80 -201
- package/build/can-can.js.map +1 -1
- package/build/channels-consumer.js +5 -10
- package/build/channels-consumer.js.map +1 -1
- package/build/collection-loader.js +35 -53
- package/build/collection-loader.js.map +1 -1
- package/build/collection.js +160 -307
- package/build/collection.js.map +1 -1
- package/build/command-submit-data.d.ts +1 -1
- package/build/command-submit-data.d.ts.map +1 -1
- package/build/command-submit-data.js +29 -38
- package/build/command-submit-data.js.map +1 -1
- package/build/commands-pool.js +139 -215
- package/build/commands-pool.js.map +1 -1
- package/build/compose.js +3 -11
- package/build/compose.js.map +1 -1
- package/build/config.js +20 -67
- package/build/config.js.map +1 -1
- package/build/custom-error.js +4 -29
- package/build/custom-error.js.map +1 -1
- package/build/data-set-to-attributes.js +5 -41
- package/build/data-set-to-attributes.js.map +1 -1
- package/build/deserializer.js +26 -79
- package/build/deserializer.js.map +1 -1
- package/build/destroy-error.js +4 -29
- package/build/destroy-error.js.map +1 -1
- package/build/devise.js +83 -187
- package/build/devise.js.map +1 -1
- package/build/draggable-sort/controller.js +87 -110
- package/build/draggable-sort/controller.js.map +1 -1
- package/build/draggable-sort/index.js +67 -144
- package/build/draggable-sort/index.js.map +1 -1
- package/build/draggable-sort/item.js +131 -197
- package/build/draggable-sort/item.js.map +1 -1
- package/build/error-logger.js +78 -163
- package/build/error-logger.js.map +1 -1
- package/build/error-messages.js +4 -7
- package/build/error-messages.js.map +1 -1
- package/build/event-connection.js +23 -61
- package/build/event-connection.js.map +1 -1
- package/build/event-emitter-listener.js +6 -23
- package/build/event-emitter-listener.js.map +1 -1
- package/build/event-model-class.js +19 -46
- package/build/event-model-class.js.map +1 -1
- package/build/events.js +3 -8
- package/build/events.js.map +1 -1
- package/build/form.js +65 -153
- package/build/form.js.map +1 -1
- package/build/history-expo.js +12 -24
- package/build/history-expo.js.map +1 -1
- package/build/history-react-native.js +14 -26
- package/build/history-react-native.js.map +1 -1
- package/build/history.js +2 -4
- package/build/history.js.map +1 -1
- package/build/index.js +2 -5
- package/build/index.js.map +1 -1
- package/build/inputs/attachment.js +71 -122
- package/build/inputs/attachment.js.map +1 -1
- package/build/inputs/auto-submit.js +15 -54
- package/build/inputs/auto-submit.js.map +1 -1
- package/build/inputs/checkbox.js +77 -166
- package/build/inputs/checkbox.js.map +1 -1
- package/build/inputs/checkboxes.js +75 -158
- package/build/inputs/checkboxes.js.map +1 -1
- package/build/inputs/id-for-component.js +4 -40
- package/build/inputs/id-for-component.js.map +1 -1
- package/build/inputs/input-wrapper.js +7 -26
- package/build/inputs/input-wrapper.js.map +1 -1
- package/build/inputs/input.js +158 -244
- package/build/inputs/input.js.map +1 -1
- package/build/inputs/money.js +123 -185
- package/build/inputs/money.js.map +1 -1
- package/build/inputs/name-for-component.js +4 -40
- package/build/inputs/name-for-component.js.map +1 -1
- package/build/inputs/select.js +68 -122
- package/build/inputs/select.js.map +1 -1
- package/build/instance-of-class-name.js +15 -20
- package/build/instance-of-class-name.js.map +1 -1
- package/build/is-expo.js +8 -10
- package/build/is-expo.js.map +1 -1
- package/build/key-value-store.js +51 -127
- package/build/key-value-store.js.map +1 -1
- package/build/link.js +51 -114
- package/build/link.js.map +1 -1
- package/build/logger.js +19 -25
- package/build/logger.js.map +1 -1
- package/build/merge-styles.js +5 -9
- package/build/merge-styles.js.map +1 -1
- package/build/modal.js +14 -61
- package/build/modal.js.map +1 -1
- package/build/model-class-require.js +8 -43
- package/build/model-class-require.js.map +1 -1
- package/build/model-events.js +24 -33
- package/build/model-events.js.map +1 -1
- package/build/model-name.js +15 -56
- package/build/model-name.js.map +1 -1
- package/build/model-prop-type.js +51 -62
- package/build/model-prop-type.js.map +1 -1
- package/build/model-recipes-loader.js +16 -24
- package/build/model-recipes-loader.js.map +1 -1
- package/build/model-recipes-model-loader.d.ts +1 -1
- package/build/model-recipes-model-loader.js +129 -207
- package/build/model-recipes-model-loader.js.map +1 -1
- package/build/models-response-reader.js +24 -65
- package/build/models-response-reader.js.map +1 -1
- package/build/models.js +5 -10
- package/build/models.js.map +1 -1
- package/build/money-formatter.d.ts +2 -2
- package/build/money-formatter.d.ts.map +1 -1
- package/build/money-formatter.js +45 -55
- package/build/money-formatter.js.map +1 -1
- package/build/not-loaded-error.js +2 -25
- package/build/not-loaded-error.js.map +1 -1
- package/build/params.js +31 -41
- package/build/params.js.map +1 -1
- package/build/preloaded.js +18 -58
- package/build/preloaded.js.map +1 -1
- package/build/resize-observer.js +5 -11
- package/build/resize-observer.js.map +1 -1
- package/build/rest-props-validator.js +4 -6
- package/build/rest-props-validator.js.map +1 -1
- package/build/result.js +10 -14
- package/build/result.js.map +1 -1
- package/build/router/route.js +178 -311
- package/build/router/route.js.map +1 -1
- package/build/router/switch.js +55 -129
- package/build/router/switch.js.map +1 -1
- package/build/router.js +33 -93
- package/build/router.js.map +1 -1
- package/build/routes-native.js +63 -147
- package/build/routes-native.js.map +1 -1
- package/build/routes.js +25 -79
- package/build/routes.js.map +1 -1
- package/build/run-last.js +19 -24
- package/build/run-last.js.map +1 -1
- package/build/serializer.js +28 -33
- package/build/serializer.js.map +1 -1
- package/build/services.js +9 -18
- package/build/services.js.map +1 -1
- package/build/session-status-updater.js +84 -183
- package/build/session-status-updater.js.map +1 -1
- package/build/source-maps-loader.d.ts +37 -0
- package/build/source-maps-loader.d.ts.map +1 -0
- package/build/source-maps-loader.js +102 -224
- package/build/source-maps-loader.js.map +1 -1
- package/build/super-admin/config-reader.d.ts +2 -2
- package/build/super-admin/config-reader.js +41 -82
- package/build/super-admin/config-reader.js.map +1 -1
- package/build/super-admin/edit-page/edit-attribute-checkbox.js +52 -114
- package/build/super-admin/edit-page/edit-attribute-checkbox.js.map +1 -1
- package/build/super-admin/edit-page/edit-attribute-content.js +46 -76
- package/build/super-admin/edit-page/edit-attribute-content.js.map +1 -1
- package/build/super-admin/edit-page/edit-attribute-input.js +56 -118
- package/build/super-admin/edit-page/edit-attribute-input.js.map +1 -1
- package/build/super-admin/edit-page/edit-attribute.js +39 -103
- package/build/super-admin/edit-page/edit-attribute.js.map +1 -1
- package/build/super-admin/edit-page.js +87 -200
- package/build/super-admin/edit-page.js.map +1 -1
- package/build/super-admin/has-edit-config.js +6 -12
- package/build/super-admin/has-edit-config.js.map +1 -1
- package/build/super-admin/index-page.js +16 -43
- package/build/super-admin/index-page.js.map +1 -1
- package/build/super-admin/index.js +86 -209
- package/build/super-admin/index.js.map +1 -1
- package/build/super-admin/layout/header/index.js +90 -151
- package/build/super-admin/layout/header/index.js.map +1 -1
- package/build/super-admin/layout/index.js +69 -152
- package/build/super-admin/layout/index.js.map +1 -1
- package/build/super-admin/layout/menu/index.js +84 -160
- package/build/super-admin/layout/menu/index.js.map +1 -1
- package/build/super-admin/layout/menu/menu-content.js +24 -84
- package/build/super-admin/layout/menu/menu-content.js.map +1 -1
- package/build/super-admin/layout/menu/menu-item.js +51 -101
- package/build/super-admin/layout/menu/menu-item.js.map +1 -1
- package/build/super-admin/layout/no-access.js +18 -44
- package/build/super-admin/layout/no-access.js.map +1 -1
- package/build/super-admin/model-class-table.js +44 -128
- package/build/super-admin/model-class-table.js.map +1 -1
- package/build/super-admin/models.js +5 -41
- package/build/super-admin/models.js.map +1 -1
- package/build/super-admin/show-nav.js +26 -88
- package/build/super-admin/show-nav.js.map +1 -1
- package/build/super-admin/show-page/belongs-to-attribute-row.js +17 -75
- package/build/super-admin/show-page/belongs-to-attribute-row.js.map +1 -1
- package/build/super-admin/show-page/index.js +100 -186
- package/build/super-admin/show-page/index.js.map +1 -1
- package/build/super-admin/show-reflection-actions.js +38 -99
- package/build/super-admin/show-reflection-actions.js.map +1 -1
- package/build/super-admin/show-reflection-link.js +26 -98
- package/build/super-admin/show-reflection-link.js.map +1 -1
- package/build/super-admin/show-reflection-page.js +33 -96
- package/build/super-admin/show-reflection-page.js.map +1 -1
- package/build/table/column-content.js +76 -120
- package/build/table/column-content.js.map +1 -1
- package/build/table/column-identifier.js +6 -10
- package/build/table/column-identifier.js.map +1 -1
- package/build/table/column-visible.js +1 -4
- package/build/table/column-visible.js.map +1 -1
- package/build/table/components/column.js +12 -59
- package/build/table/components/column.js.map +1 -1
- package/build/table/components/flat-list.js +12 -59
- package/build/table/components/flat-list.js.map +1 -1
- package/build/table/components/header.js +14 -61
- package/build/table/components/header.js.map +1 -1
- package/build/table/components/row.js +15 -62
- package/build/table/components/row.js.map +1 -1
- package/build/table/filters/attribute-element.js +33 -61
- package/build/table/filters/attribute-element.js.map +1 -1
- package/build/table/filters/filter-form.js +279 -482
- package/build/table/filters/filter-form.js.map +1 -1
- package/build/table/filters/filter.js +44 -72
- package/build/table/filters/filter.js.map +1 -1
- package/build/table/filters/index.js +94 -138
- package/build/table/filters/index.js.map +1 -1
- package/build/table/filters/load-search-modal.js +63 -211
- package/build/table/filters/load-search-modal.js.map +1 -1
- package/build/table/filters/reflection-element.js +26 -54
- package/build/table/filters/reflection-element.js.map +1 -1
- package/build/table/filters/save-search-modal.js +43 -139
- package/build/table/filters/save-search-modal.js.map +1 -1
- package/build/table/filters/scope-element.js +27 -55
- package/build/table/filters/scope-element.js.map +1 -1
- package/build/table/header-column-content.js +32 -70
- package/build/table/header-column-content.js.map +1 -1
- package/build/table/header-column.js +88 -217
- package/build/table/header-column.js.map +1 -1
- package/build/table/header-select.js +44 -76
- package/build/table/header-select.js.map +1 -1
- package/build/table/model-callback-args.js +4 -40
- package/build/table/model-callback-args.js.map +1 -1
- package/build/table/model-column.js +58 -143
- package/build/table/model-column.js.map +1 -1
- package/build/table/model-row.js +74 -186
- package/build/table/model-row.js.map +1 -1
- package/build/table/select-calculator.js +26 -85
- package/build/table/select-calculator.js.map +1 -1
- package/build/table/settings/column-row.js +65 -185
- package/build/table/settings/column-row.js.map +1 -1
- package/build/table/settings/download-action.js +37 -73
- package/build/table/settings/download-action.js.map +1 -1
- package/build/table/settings/index.js +37 -101
- package/build/table/settings/index.js.map +1 -1
- package/build/table/table-settings.js +184 -322
- package/build/table/table-settings.js.map +1 -1
- package/build/table/table.js +582 -780
- package/build/table/table.js.map +1 -1
- package/build/table/use-sorting.js +15 -34
- package/build/table/use-sorting.js.map +1 -1
- package/build/table/widths.js +31 -37
- package/build/table/widths.js.map +1 -1
- package/build/table/worker-plugins-check-all-checkbox.js +76 -224
- package/build/table/worker-plugins-check-all-checkbox.js.map +1 -1
- package/build/table/worker-plugins-checkbox.js +73 -184
- package/build/table/worker-plugins-checkbox.js.map +1 -1
- package/build/translated-attributes.js +5 -10
- package/build/translated-attributes.js.map +1 -1
- package/build/translated-collections.js +10 -19
- package/build/translated-collections.js.map +1 -1
- package/build/updated-attribute.js +46 -119
- package/build/updated-attribute.js.map +1 -1
- package/build/url-encode.js +5 -11
- package/build/url-encode.js.map +1 -1
- package/build/use-breakpoint.js +42 -94
- package/build/use-breakpoint.js.map +1 -1
- package/build/use-can-can.js +29 -91
- package/build/use-can-can.js.map +1 -1
- package/build/use-collection.js +118 -228
- package/build/use-collection.js.map +1 -1
- package/build/use-created-event.js +26 -43
- package/build/use-created-event.js.map +1 -1
- package/build/use-current-user-context.js +56 -150
- package/build/use-current-user-context.js.map +1 -1
- package/build/use-current-user.js +13 -31
- package/build/use-current-user.js.map +1 -1
- package/build/use-destroyed-event.js +21 -42
- package/build/use-destroyed-event.js.map +1 -1
- package/build/use-event-emitter.js +9 -14
- package/build/use-event-emitter.js.map +1 -1
- package/build/use-event-listener.js +12 -21
- package/build/use-event-listener.js.map +1 -1
- package/build/use-input.js +48 -68
- package/build/use-input.js.map +1 -1
- package/build/use-model-event.js +21 -42
- package/build/use-model-event.js.map +1 -1
- package/build/use-model.js +95 -198
- package/build/use-model.js.map +1 -1
- package/build/use-resize-observer.js +10 -20
- package/build/use-resize-observer.js.map +1 -1
- package/build/use-router.js +64 -106
- package/build/use-router.js.map +1 -1
- package/build/use-screen-layout.js +16 -18
- package/build/use-screen-layout.js.map +1 -1
- package/build/use-styles.js +23 -74
- package/build/use-styles.js.map +1 -1
- package/build/use-updated-event.js +21 -43
- package/build/use-updated-event.js.map +1 -1
- package/build/use-validation-errors.js +11 -17
- package/build/use-validation-errors.js.map +1 -1
- package/build/utils/button.js +85 -135
- package/build/utils/button.js.map +1 -1
- package/build/utils/card.js +30 -105
- package/build/utils/card.js.map +1 -1
- package/build/utils/checkbox.js +50 -111
- package/build/utils/checkbox.js.map +1 -1
- package/build/utils/checkboxes.js +108 -181
- package/build/utils/checkboxes.js.map +1 -1
- package/build/utils/default-style.js +28 -102
- package/build/utils/default-style.js.map +1 -1
- package/build/utils/header.js +7 -34
- package/build/utils/header.js.map +1 -1
- package/build/utils/icon.js +35 -116
- package/build/utils/icon.js.map +1 -1
- package/build/utils/invalid-feedback.js +15 -42
- package/build/utils/invalid-feedback.js.map +1 -1
- package/build/utils/modal.js +24 -107
- package/build/utils/modal.js.map +1 -1
- package/build/utils/text.js +9 -36
- package/build/utils/text.js.map +1 -1
- package/build/validation-error.js +30 -88
- package/build/validation-error.js.map +1 -1
- package/build/validation-errors.js +60 -110
- package/build/validation-errors.js.map +1 -1
- package/build/with-api-maker.js +14 -66
- package/build/with-api-maker.js.map +1 -1
- package/build/with-collection.js +13 -63
- package/build/with-collection.js.map +1 -1
- package/build/with-current-user.js +6 -22
- package/build/with-current-user.js.map +1 -1
- package/build/with-model.js +10 -26
- package/build/with-model.js.map +1 -1
- package/build/with-router.js +7 -34
- package/build/with-router.js.map +1 -1
- package/package.json +1 -1
package/build/router/route.js
CHANGED
|
@@ -1,326 +1,193 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
-
}
|
|
23
|
-
Object.defineProperty(o, k2, desc);
|
|
24
|
-
}) : (function(o, m, k, k2) {
|
|
25
|
-
if (k2 === undefined) k2 = k;
|
|
26
|
-
o[k2] = m[k];
|
|
27
|
-
}));
|
|
28
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
-
}) : function(o, v) {
|
|
31
|
-
o["default"] = v;
|
|
32
|
-
});
|
|
33
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
34
|
-
var ownKeys = function(o) {
|
|
35
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
36
|
-
var ar = [];
|
|
37
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
38
|
-
return ar;
|
|
39
|
-
};
|
|
40
|
-
return ownKeys(o);
|
|
41
|
-
};
|
|
42
|
-
return function (mod) {
|
|
43
|
-
if (mod && mod.__esModule) return mod;
|
|
44
|
-
var result = {};
|
|
45
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
46
|
-
__setModuleDefault(result, mod);
|
|
47
|
-
return result;
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import BaseComponent from "../base-component.js";
|
|
3
|
+
import React, { createContext, useContext, useMemo } from "react";
|
|
4
|
+
import memo from "set-state-compare/build/memo.js";
|
|
5
|
+
import PropTypes from "prop-types";
|
|
6
|
+
import propTypesExact from "prop-types-exact";
|
|
7
|
+
import { shapeComponent } from "set-state-compare/build/shape-component.js";
|
|
8
|
+
import Switch, { CurrentSwitchContext } from "./switch";
|
|
9
|
+
import useI18n from "i18n-on-steroids/src/use-i18n.mjs";
|
|
10
|
+
const CurrentPathContext = createContext([]);
|
|
11
|
+
const ParamsContext = createContext({});
|
|
12
|
+
const RequireComponentContext = createContext(null);
|
|
13
|
+
const RouteContext = createContext(null);
|
|
14
|
+
const useParams = () => useContext(ParamsContext);
|
|
15
|
+
const Route = memo(shapeComponent(class Route extends BaseComponent {
|
|
16
|
+
static defaultProps = {
|
|
17
|
+
exact: false,
|
|
18
|
+
fallback: false,
|
|
19
|
+
includeInPath: true
|
|
48
20
|
};
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
21
|
+
static propTypes = propTypesExact({
|
|
22
|
+
children: PropTypes.any,
|
|
23
|
+
component: PropTypes.string,
|
|
24
|
+
componentPath: PropTypes.string,
|
|
25
|
+
exact: PropTypes.bool.isRequired,
|
|
26
|
+
fallback: PropTypes.bool.isRequired,
|
|
27
|
+
includeInPath: PropTypes.bool.isRequired,
|
|
28
|
+
onMatch: PropTypes.func,
|
|
29
|
+
path: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(RegExp)])
|
|
57
30
|
});
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
op = body.call(thisArg, _);
|
|
82
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
83
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
87
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
88
|
-
if (ar || !(i in from)) {
|
|
89
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
90
|
-
ar[i] = from[i];
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
94
|
-
};
|
|
95
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
96
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
97
|
-
};
|
|
98
|
-
var _a;
|
|
99
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
100
|
-
exports.useParams = exports.Switch = exports.RouteContext = exports.RequireComponentContext = void 0;
|
|
101
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
102
|
-
var base_component_js_1 = __importDefault(require("../base-component.js"));
|
|
103
|
-
var react_1 = __importStar(require("react"));
|
|
104
|
-
var memo_js_1 = __importDefault(require("set-state-compare/build/memo.js"));
|
|
105
|
-
var prop_types_1 = __importDefault(require("prop-types"));
|
|
106
|
-
var prop_types_exact_1 = __importDefault(require("prop-types-exact"));
|
|
107
|
-
var shape_component_js_1 = require("set-state-compare/build/shape-component.js");
|
|
108
|
-
var switch_1 = __importStar(require("./switch"));
|
|
109
|
-
exports.Switch = switch_1.default;
|
|
110
|
-
var use_i18n_mjs_1 = __importDefault(require("i18n-on-steroids/src/use-i18n.mjs"));
|
|
111
|
-
var CurrentPathContext = (0, react_1.createContext)([]);
|
|
112
|
-
var ParamsContext = (0, react_1.createContext)({});
|
|
113
|
-
var RequireComponentContext = (0, react_1.createContext)(null);
|
|
114
|
-
exports.RequireComponentContext = RequireComponentContext;
|
|
115
|
-
var RouteContext = (0, react_1.createContext)(null);
|
|
116
|
-
exports.RouteContext = RouteContext;
|
|
117
|
-
var useParams = function () { return (0, react_1.useContext)(ParamsContext); };
|
|
118
|
-
exports.useParams = useParams;
|
|
119
|
-
var Route = (0, memo_js_1.default)((0, shape_component_js_1.shapeComponent)((_a = /** @class */ (function (_super) {
|
|
120
|
-
__extends(Route, _super);
|
|
121
|
-
function Route() {
|
|
122
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
123
|
-
_this.match = null;
|
|
124
|
-
_this.newParams = null;
|
|
125
|
-
_this.pathParts = null;
|
|
126
|
-
_this.hasSwitchMatch = function () { return _this.switchGroup.s.pathShown && _this.switchGroup.s.pathShown == _this.pathId(); };
|
|
127
|
-
return _this;
|
|
128
|
-
}
|
|
129
|
-
Route.prototype.setup = function () {
|
|
130
|
-
var _this = this;
|
|
131
|
-
var t = (0, use_i18n_mjs_1.default)({ namespace: "js.api_maker.router.route" }).t;
|
|
132
|
-
var path = this.props.path;
|
|
133
|
-
var _b = (0, react_1.useContext)(switch_1.CurrentSwitchContext), pathsMatched = _b.pathsMatched, switchGroup = _b.switchGroup;
|
|
134
|
-
var givenRoute = (0, react_1.useContext)(RouteContext);
|
|
135
|
-
var pathShown = switchGroup.s.pathShown;
|
|
136
|
-
this.debug = false;
|
|
137
|
-
this.log(function () { return ({ givenRoute: givenRoute }); });
|
|
138
|
-
this.t = t;
|
|
139
|
-
this.requireComponent = (0, react_1.useContext)(RequireComponentContext);
|
|
140
|
-
this.currentParams = (0, react_1.useContext)(ParamsContext);
|
|
141
|
-
this.currentPath = (0, react_1.useContext)(CurrentPathContext);
|
|
142
|
-
this.switchGroup = switchGroup;
|
|
143
|
-
this.routeParts = (0, react_1.useMemo)(function () { return givenRoute === null || givenRoute === void 0 ? void 0 : givenRoute.split("/"); }, [path, givenRoute]);
|
|
144
|
-
this.pathParts = (0, react_1.useMemo)(function () { return path === null || path === void 0 ? void 0 : path.split("/"); }, [path]);
|
|
145
|
-
this.newRouteParts = (0, react_1.useMemo)(function () {
|
|
146
|
-
if (!path) {
|
|
147
|
-
if (givenRoute == "") {
|
|
148
|
-
return [];
|
|
149
|
-
}
|
|
150
|
-
else {
|
|
151
|
-
return _this.routeParts;
|
|
152
|
-
}
|
|
31
|
+
match = null;
|
|
32
|
+
newParams = null;
|
|
33
|
+
pathParts = null;
|
|
34
|
+
setup() {
|
|
35
|
+
const { t } = useI18n({ namespace: "js.api_maker.router.route" });
|
|
36
|
+
const { path } = this.props;
|
|
37
|
+
const { pathsMatched, switchGroup } = useContext(CurrentSwitchContext);
|
|
38
|
+
const givenRoute = useContext(RouteContext);
|
|
39
|
+
const { pathShown } = switchGroup.s;
|
|
40
|
+
this.debug = false;
|
|
41
|
+
this.log(() => ({ givenRoute }));
|
|
42
|
+
this.t = t;
|
|
43
|
+
this.requireComponent = useContext(RequireComponentContext);
|
|
44
|
+
this.currentParams = useContext(ParamsContext);
|
|
45
|
+
this.currentPath = useContext(CurrentPathContext);
|
|
46
|
+
this.switchGroup = switchGroup;
|
|
47
|
+
this.routeParts = useMemo(() => givenRoute?.split("/"), [path, givenRoute]);
|
|
48
|
+
this.pathParts = useMemo(() => path?.split("/"), [path]);
|
|
49
|
+
this.newRouteParts = useMemo(() => {
|
|
50
|
+
if (!path) {
|
|
51
|
+
if (givenRoute == "") {
|
|
52
|
+
return [];
|
|
153
53
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
this.useStates({ Component: null, componentNotFound: null, matches: false });
|
|
157
|
-
(0, react_1.useMemo)(function () {
|
|
158
|
-
_this.loadMatches();
|
|
159
|
-
}, [givenRoute, path, pathsMatched]);
|
|
160
|
-
(0, react_1.useMemo)(function () {
|
|
161
|
-
if (_this.hasSwitchMatch() && !_this.s.Component && _this.s.matches) {
|
|
162
|
-
if (_this.props.onMatch) {
|
|
163
|
-
_this.props.onMatch();
|
|
164
|
-
}
|
|
165
|
-
if (!_this.props.children && (_this.props.path || _this.props.component || _this.props.componentPath)) {
|
|
166
|
-
_this.loadComponent();
|
|
167
|
-
}
|
|
54
|
+
else {
|
|
55
|
+
return this.routeParts;
|
|
168
56
|
}
|
|
169
|
-
}, [path, pathShown, this.s.matches]);
|
|
170
|
-
};
|
|
171
|
-
Route.prototype.pathId = function () {
|
|
172
|
-
var fallback = this.p.fallback;
|
|
173
|
-
var path = this.props.path;
|
|
174
|
-
var pathId;
|
|
175
|
-
if (fallback) {
|
|
176
|
-
pathId = "[FALLBACK]";
|
|
177
57
|
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
var _b, _c;
|
|
189
|
-
var _d = this.tt, newRouteParts = _d.newRouteParts, t = _d.t;
|
|
190
|
-
var _e = this.props, component = _e.component, path = _e.path;
|
|
191
|
-
var _f = this.p, exact = _f.exact, includeInPath = _f.includeInPath, fallback = _f.fallback;
|
|
192
|
-
var matches = true;
|
|
193
|
-
var params = {};
|
|
194
|
-
var componentPathParts = __spreadArray([], this.currentPath, true);
|
|
195
|
-
this.log(function () { return [_this.props.path, "Start generating component paths", JSON.stringify(componentPathParts)]; });
|
|
196
|
-
var _loop_1 = function (pathPartIndex) {
|
|
197
|
-
var pathPart = this_1.pathParts[pathPartIndex];
|
|
198
|
-
var translatedPathPart = t("routes.".concat(pathPart), { defaultValue: pathPart });
|
|
199
|
-
if (!(pathPartIndex in this_1.routeParts)) {
|
|
200
|
-
this_1.log(function () { return "No match for: ".concat(pathPartIndex); });
|
|
201
|
-
matches = false;
|
|
202
|
-
return "break";
|
|
203
|
-
}
|
|
204
|
-
var routePart = decodeURIComponent(this_1.routeParts[pathPartIndex]);
|
|
205
|
-
if (pathPart.startsWith(":") && routePart) {
|
|
206
|
-
var paramName = pathPart.slice(1, pathPart.length);
|
|
207
|
-
params[paramName] = routePart;
|
|
58
|
+
return this.routeParts.slice(this.pathParts.length, this.routeParts.length);
|
|
59
|
+
}, [givenRoute].concat(this.pathParts));
|
|
60
|
+
this.useStates({ Component: null, componentNotFound: null, matches: false });
|
|
61
|
+
useMemo(() => {
|
|
62
|
+
this.loadMatches();
|
|
63
|
+
}, [givenRoute, path, pathsMatched]);
|
|
64
|
+
useMemo(() => {
|
|
65
|
+
if (this.hasSwitchMatch() && !this.s.Component && this.s.matches) {
|
|
66
|
+
if (this.props.onMatch) {
|
|
67
|
+
this.props.onMatch();
|
|
208
68
|
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
return "break";
|
|
69
|
+
if (!this.props.children && (this.props.path || this.props.component || this.props.componentPath)) {
|
|
70
|
+
this.loadComponent();
|
|
212
71
|
}
|
|
213
|
-
else if (!component && includeInPath) {
|
|
214
|
-
componentPathParts.push(pathPart);
|
|
215
|
-
}
|
|
216
|
-
};
|
|
217
|
-
var this_1 = this;
|
|
218
|
-
for (var pathPartIndex in this.pathParts) {
|
|
219
|
-
var state_1 = _loop_1(pathPartIndex);
|
|
220
|
-
if (state_1 === "break")
|
|
221
|
-
break;
|
|
222
72
|
}
|
|
223
|
-
|
|
224
|
-
|
|
73
|
+
}, [path, pathShown, this.s.matches]);
|
|
74
|
+
}
|
|
75
|
+
hasSwitchMatch = () => this.switchGroup.s.pathShown && this.switchGroup.s.pathShown == this.pathId();
|
|
76
|
+
pathId() {
|
|
77
|
+
const { fallback } = this.p;
|
|
78
|
+
const { path } = this.props;
|
|
79
|
+
let pathId;
|
|
80
|
+
if (fallback) {
|
|
81
|
+
pathId = "[FALLBACK]";
|
|
82
|
+
}
|
|
83
|
+
else if (!path) {
|
|
84
|
+
pathId = "[PATH-EMPTY]";
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
pathId = path;
|
|
88
|
+
}
|
|
89
|
+
return pathId;
|
|
90
|
+
}
|
|
91
|
+
loadMatches() {
|
|
92
|
+
const { newRouteParts, t } = this.tt;
|
|
93
|
+
const { component, path } = this.props;
|
|
94
|
+
const { exact, includeInPath, fallback } = this.p;
|
|
95
|
+
let matches = true;
|
|
96
|
+
const params = {};
|
|
97
|
+
const componentPathParts = [...this.currentPath];
|
|
98
|
+
this.log(() => [this.props.path, "Start generating component paths", JSON.stringify(componentPathParts)]);
|
|
99
|
+
for (const pathPartIndex in this.pathParts) {
|
|
100
|
+
const pathPart = this.pathParts[pathPartIndex];
|
|
101
|
+
const translatedPathPart = t(`routes.${pathPart}`, { defaultValue: pathPart });
|
|
102
|
+
if (!(pathPartIndex in this.routeParts)) {
|
|
103
|
+
this.log(() => `No match for: ${pathPartIndex}`);
|
|
225
104
|
matches = false;
|
|
105
|
+
break;
|
|
226
106
|
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
matches = true;
|
|
232
|
-
}
|
|
233
|
-
var matchId = this.pathId();
|
|
234
|
-
if (!matches && fallback) {
|
|
235
|
-
matches = true;
|
|
236
|
-
}
|
|
237
|
-
this.log(function () { return [_this.props.path, "End generating component paths", JSON.stringify(componentPathParts), { matches: matches }]; });
|
|
238
|
-
if (matches) {
|
|
239
|
-
if (component && includeInPath) {
|
|
240
|
-
componentPathParts.push(component);
|
|
241
|
-
}
|
|
242
|
-
var newParams = Object.assign({}, this.currentParams, params);
|
|
243
|
-
this.setInstance({ componentPathParts: componentPathParts, match: { params: params }, newParams: newParams });
|
|
244
|
-
this.setState({ matches: matches });
|
|
245
|
-
(_b = this.switchGroup) === null || _b === void 0 ? void 0 : _b.setPathMatched(matchId, true);
|
|
246
|
-
}
|
|
247
|
-
else {
|
|
248
|
-
this.setInstance({ componentPathParts: null, match: null, newParams: null });
|
|
249
|
-
this.setState({ matches: matches });
|
|
250
|
-
(_c = this.switchGroup) === null || _c === void 0 ? void 0 : _c.setPathMatched(matchId, false);
|
|
107
|
+
const routePart = decodeURIComponent(this.routeParts[pathPartIndex]);
|
|
108
|
+
if (pathPart.startsWith(":") && routePart) {
|
|
109
|
+
const paramName = pathPart.slice(1, pathPart.length);
|
|
110
|
+
params[paramName] = routePart;
|
|
251
111
|
}
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
var actualComponentPath, Component, componentImport, error_1;
|
|
256
|
-
var _this = this;
|
|
257
|
-
return __generator(this, function (_b) {
|
|
258
|
-
switch (_b.label) {
|
|
259
|
-
case 0:
|
|
260
|
-
actualComponentPath = this.props.componentPath || this.tt.componentPathParts.join("/");
|
|
261
|
-
this.log(function () { return ["loadComponent", { componentPath: _this.props.componentPath, componentPathParts: _this.componentPathParts, actualComponentPath: actualComponentPath }]; });
|
|
262
|
-
_b.label = 1;
|
|
263
|
-
case 1:
|
|
264
|
-
_b.trys.push([1, 3, , 4]);
|
|
265
|
-
return [4 /*yield*/, this.tt.requireComponent({ routeDefinition: { component: actualComponentPath } })];
|
|
266
|
-
case 2:
|
|
267
|
-
componentImport = _b.sent();
|
|
268
|
-
Component = componentImport;
|
|
269
|
-
return [3 /*break*/, 4];
|
|
270
|
-
case 3:
|
|
271
|
-
error_1 = _b.sent();
|
|
272
|
-
console.error("Couldn't find component: ".concat(actualComponentPath));
|
|
273
|
-
throw error_1;
|
|
274
|
-
case 4:
|
|
275
|
-
this.setState({ Component: Component, componentNotFound: !Component });
|
|
276
|
-
return [2 /*return*/];
|
|
277
|
-
}
|
|
278
|
-
});
|
|
279
|
-
});
|
|
280
|
-
};
|
|
281
|
-
Route.prototype.log = function (callbackArgs) {
|
|
282
|
-
if (this.debug) {
|
|
283
|
-
var args = callbackArgs();
|
|
284
|
-
if (!Array.isArray(args))
|
|
285
|
-
args = [args];
|
|
286
|
-
console.log.apply(console, args);
|
|
287
|
-
}
|
|
288
|
-
};
|
|
289
|
-
Route.prototype.render = function () {
|
|
290
|
-
var _b = this.tt, componentPathParts = _b.componentPathParts, match = _b.match, newParams = _b.newParams, newRouteParts = _b.newRouteParts;
|
|
291
|
-
var _c = this.props, children = _c.children, component = _c.component, path = _c.path;
|
|
292
|
-
var _d = this.s, Component = _d.Component, componentNotFound = _d.componentNotFound, matches = _d.matches;
|
|
293
|
-
if (!matches || !this.hasSwitchMatch()) {
|
|
294
|
-
// Route isn't matching and shouldn't be rendered at all.
|
|
295
|
-
return null;
|
|
112
|
+
else if (translatedPathPart != routePart) {
|
|
113
|
+
matches = false;
|
|
114
|
+
break;
|
|
296
115
|
}
|
|
297
|
-
if (!
|
|
298
|
-
|
|
299
|
-
return ((0, jsx_runtime_1.jsxs)("div", { children: ["Loading ", component || this.props.componentPath || componentPathParts.join("/")] }));
|
|
116
|
+
else if (!component && includeInPath) {
|
|
117
|
+
componentPathParts.push(pathPart);
|
|
300
118
|
}
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
119
|
+
}
|
|
120
|
+
if (exact && newRouteParts.length > 0) {
|
|
121
|
+
this.log(() => ["Exact and more route parts", { newRouteParts, pathParts: this.pathParts, routeParts: this.routeParts }]);
|
|
122
|
+
matches = false;
|
|
123
|
+
}
|
|
124
|
+
else if (matches && path) {
|
|
125
|
+
matches = true;
|
|
126
|
+
}
|
|
127
|
+
else if (this.routeParts.length == 0) {
|
|
128
|
+
matches = true;
|
|
129
|
+
}
|
|
130
|
+
const matchId = this.pathId();
|
|
131
|
+
if (!matches && fallback) {
|
|
132
|
+
matches = true;
|
|
133
|
+
}
|
|
134
|
+
this.log(() => [this.props.path, "End generating component paths", JSON.stringify(componentPathParts), { matches }]);
|
|
135
|
+
if (matches) {
|
|
136
|
+
if (component && includeInPath) {
|
|
137
|
+
componentPathParts.push(component);
|
|
304
138
|
}
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
componentPath
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
139
|
+
const newParams = Object.assign({}, this.currentParams, params);
|
|
140
|
+
this.setInstance({ componentPathParts, match: { params }, newParams });
|
|
141
|
+
this.setState({ matches });
|
|
142
|
+
this.switchGroup?.setPathMatched(matchId, true);
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
this.setInstance({ componentPathParts: null, match: null, newParams: null });
|
|
146
|
+
this.setState({ matches });
|
|
147
|
+
this.switchGroup?.setPathMatched(matchId, false);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
async loadComponent() {
|
|
151
|
+
const actualComponentPath = this.props.componentPath || this.tt.componentPathParts.join("/");
|
|
152
|
+
let Component;
|
|
153
|
+
this.log(() => ["loadComponent", { componentPath: this.props.componentPath, componentPathParts: this.componentPathParts, actualComponentPath }]);
|
|
154
|
+
try {
|
|
155
|
+
const componentImport = await this.tt.requireComponent({ routeDefinition: { component: actualComponentPath } });
|
|
156
|
+
Component = componentImport;
|
|
157
|
+
}
|
|
158
|
+
catch (error) {
|
|
159
|
+
console.error(`Couldn't find component: ${actualComponentPath}`);
|
|
160
|
+
throw error;
|
|
161
|
+
}
|
|
162
|
+
this.setState({ Component, componentNotFound: !Component });
|
|
163
|
+
}
|
|
164
|
+
log(callbackArgs) {
|
|
165
|
+
if (this.debug) {
|
|
166
|
+
let args = callbackArgs();
|
|
167
|
+
if (!Array.isArray(args))
|
|
168
|
+
args = [args];
|
|
169
|
+
console.log(...args);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
render() {
|
|
173
|
+
const { componentPathParts, match, newParams, newRouteParts } = this.tt;
|
|
174
|
+
const { children, component, path } = this.props;
|
|
175
|
+
const { Component, componentNotFound, matches } = this.s;
|
|
176
|
+
if (!matches || !this.hasSwitchMatch()) {
|
|
177
|
+
// Route isn't matching and shouldn't be rendered at all.
|
|
178
|
+
return null;
|
|
179
|
+
}
|
|
180
|
+
if (!Component && !children && !componentNotFound) {
|
|
181
|
+
// Route is matching but hasn't been loaded yet.
|
|
182
|
+
return (_jsxs("div", { children: ["Loading ", component || this.props.componentPath || componentPathParts.join("/")] }));
|
|
183
|
+
}
|
|
184
|
+
if (!Component && !children && componentNotFound) {
|
|
185
|
+
// Don't render anything if the component couldn't be found.
|
|
186
|
+
return null;
|
|
187
|
+
}
|
|
188
|
+
return (_jsx(CurrentPathContext.Provider, { value: componentPathParts, children: _jsx(RouteContext.Provider, { value: newRouteParts.join("/"), children: _jsx(ParamsContext.Provider, { value: newParams, children: _jsxs(Switch, { name: `route-group-${path}`, single: false, children: [Component && _jsx(Component, { match: match }), children] }) }) }) }));
|
|
189
|
+
}
|
|
190
|
+
}));
|
|
191
|
+
export { RequireComponentContext, RouteContext, Switch, useParams };
|
|
192
|
+
export default Route;
|
|
326
193
|
//# sourceMappingURL=route.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route.js","sourceRoot":"/src/","sources":["router/route.jsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"route.js","sourceRoot":"/src/","sources":["router/route.jsx"],"names":[],"mappings":";AAAA,OAAO,aAAa,MAAM,sBAAsB,CAAA;AAChD,OAAO,KAAK,EAAE,EAAC,aAAa,EAAE,UAAU,EAAE,OAAO,EAAC,MAAM,OAAO,CAAA;AAC/D,OAAO,IAAI,MAAM,iCAAiC,CAAA;AAClD,OAAO,SAAS,MAAM,YAAY,CAAA;AAClC,OAAO,cAAc,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAC,cAAc,EAAC,MAAM,4CAA4C,CAAA;AACzE,OAAO,MAAM,EAAE,EAAC,oBAAoB,EAAC,MAAM,UAAU,CAAA;AACrD,OAAO,OAAO,MAAM,mCAAmC,CAAA;AAEvD,MAAM,kBAAkB,GAAG,aAAa,CAAC,EAAE,CAAC,CAAA;AAC5C,MAAM,aAAa,GAAG,aAAa,CAAC,EAAE,CAAC,CAAA;AACvC,MAAM,uBAAuB,GAAG,aAAa,CAAC,IAAI,CAAC,CAAA;AACnD,MAAM,YAAY,GAAG,aAAa,CAAC,IAAI,CAAC,CAAA;AACxC,MAAM,SAAS,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,CAAA;AAEjD,MAAM,KAAK,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,KAAM,SAAQ,aAA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