@darajs/core 1.29.4 → 1.29.7
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/README.md +3 -2
- package/dist/actions/download-variable.d.ts +8 -0
- package/dist/actions/download-variable.d.ts.map +1 -1
- package/dist/actions/download-variable.js +12 -3
- package/dist/actions/download-variable.js.map +1 -1
- package/dist/actions/navigate-to.js +1 -1
- package/dist/actions/navigate-to.js.map +1 -1
- package/dist/api/http.d.ts.map +1 -1
- package/dist/api/http.js +14 -0
- package/dist/api/http.js.map +1 -1
- package/dist/api/websocket.d.ts +293 -102
- package/dist/api/websocket.d.ts.map +1 -1
- package/dist/api/websocket.js +140 -7
- package/dist/api/websocket.js.map +1 -1
- package/dist/auth/basic/basic-auth-login.js +7 -7
- package/dist/auth/basic/basic-auth-login.js.map +1 -1
- package/dist/auth/basic/basic-auth-logout.js +1 -1
- package/dist/auth/basic/basic-auth-logout.js.map +1 -1
- package/dist/auth/default/default-auth-login.js +4 -4
- package/dist/auth/default/default-auth-login.js.map +1 -1
- package/dist/auth/oidc/oidc-login.js +3 -3
- package/dist/auth/oidc/oidc-login.js.map +1 -1
- package/dist/auth/oidc/oidc-logout.js +2 -2
- package/dist/auth/oidc/oidc-logout.js.map +1 -1
- package/dist/auth/oidc/sso-callback.js +2 -2
- package/dist/auth/oidc/sso-callback.js.map +1 -1
- package/dist/auth/origin-security.d.ts.map +1 -1
- package/dist/auth/origin-security.js +8 -2
- package/dist/auth/origin-security.js.map +1 -1
- package/dist/components/link.js +1 -2
- package/dist/components/link.js.map +1 -1
- package/dist/components/menu-link.d.ts.map +1 -1
- package/dist/components/menu-link.js +1 -2
- package/dist/components/menu-link.js.map +1 -1
- package/dist/components/menu.d.ts.map +1 -1
- package/dist/components/menu.js +1 -2
- package/dist/components/menu.js.map +1 -1
- package/dist/components/side-bar-frame.d.ts.map +1 -1
- package/dist/components/side-bar-frame.js +7 -1
- package/dist/components/side-bar-frame.js.map +1 -1
- package/dist/components/top-bar-frame.d.ts.map +1 -1
- package/dist/components/top-bar-frame.js +7 -2
- package/dist/components/top-bar-frame.js.map +1 -1
- package/dist/{dara_core-1.29.4-py3-none-any.whl → dara_core-1.29.7-py3-none-any.whl} +0 -0
- package/dist/devtools/backend-errors/backend-errors.d.ts.map +1 -1
- package/dist/devtools/backend-errors/backend-errors.js +0 -1
- package/dist/devtools/backend-errors/backend-errors.js.map +1 -1
- package/dist/devtools/devtools-content.d.ts.map +1 -1
- package/dist/devtools/devtools-content.js +2 -3
- package/dist/devtools/devtools-content.js.map +1 -1
- package/dist/devtools/floating-button.js +3 -3
- package/dist/devtools/floating-button.js.map +1 -1
- package/dist/devtools/resizer.js +1 -1
- package/dist/pages/error-page.js +2 -2
- package/dist/pages/error-page.js.map +1 -1
- package/dist/pages/error-status-code-page.js +2 -2
- package/dist/pages/error-status-code-page.js.map +1 -1
- package/dist/pages/route-error-boundary.js +1 -1
- package/dist/pages/route-error-boundary.js.map +1 -1
- package/dist/router/fetching.d.ts.map +1 -1
- package/dist/router/fetching.js +57 -32
- package/dist/router/fetching.js.map +1 -1
- package/dist/shared/context/global-task-context.js +1 -1
- package/dist/shared/context/global-task-context.js.map +1 -1
- package/dist/shared/context/variable-context.d.ts +5 -0
- package/dist/shared/context/variable-context.d.ts.map +1 -1
- package/dist/shared/context/variable-context.js.map +1 -1
- package/dist/shared/dynamic-component/dynamic-component.d.ts.map +1 -1
- package/dist/shared/dynamic-component/dynamic-component.js +13 -6
- package/dist/shared/dynamic-component/dynamic-component.js.map +1 -1
- package/dist/shared/error-handling/error-display.js +6 -6
- package/dist/shared/error-handling/error-display.js.map +1 -1
- package/dist/shared/interactivity/derived-variable.d.ts +14 -8
- package/dist/shared/interactivity/derived-variable.d.ts.map +1 -1
- package/dist/shared/interactivity/derived-variable.js +180 -129
- package/dist/shared/interactivity/derived-variable.js.map +1 -1
- package/dist/shared/interactivity/filtering.js +2 -1
- package/dist/shared/interactivity/filtering.js.map +1 -1
- package/dist/shared/interactivity/persistence.js +6 -5
- package/dist/shared/interactivity/persistence.js.map +1 -1
- package/dist/shared/interactivity/plain-variable.d.ts.map +1 -1
- package/dist/shared/interactivity/plain-variable.js +2 -2
- package/dist/shared/interactivity/plain-variable.js.map +1 -1
- package/dist/shared/interactivity/polling.d.ts +116 -0
- package/dist/shared/interactivity/polling.d.ts.map +1 -0
- package/dist/shared/interactivity/polling.js +723 -0
- package/dist/shared/interactivity/polling.js.map +1 -0
- package/dist/shared/interactivity/resolve-variable.d.ts.map +1 -1
- package/dist/shared/interactivity/resolve-variable.js +18 -11
- package/dist/shared/interactivity/resolve-variable.js.map +1 -1
- package/dist/shared/interactivity/server-variable.d.ts.map +1 -1
- package/dist/shared/interactivity/server-variable.js +2 -1
- package/dist/shared/interactivity/server-variable.js.map +1 -1
- package/dist/shared/interactivity/store.d.ts +6 -0
- package/dist/shared/interactivity/store.d.ts.map +1 -1
- package/dist/shared/interactivity/store.js +21 -1
- package/dist/shared/interactivity/store.js.map +1 -1
- package/dist/shared/interactivity/stream-variable.d.ts +1 -1
- package/dist/shared/interactivity/stream-variable.d.ts.map +1 -1
- package/dist/shared/interactivity/stream-variable.js +108 -43
- package/dist/shared/interactivity/stream-variable.js.map +1 -1
- package/dist/shared/interactivity/use-action.d.ts.map +1 -1
- package/dist/shared/interactivity/use-action.js +5 -5
- package/dist/shared/interactivity/use-action.js.map +1 -1
- package/dist/shared/interactivity/use-server-component.d.ts +9 -0
- package/dist/shared/interactivity/use-server-component.d.ts.map +1 -1
- package/dist/shared/interactivity/use-server-component.js +132 -79
- package/dist/shared/interactivity/use-server-component.js.map +1 -1
- package/dist/shared/interactivity/use-variable.d.ts.map +1 -1
- package/dist/shared/interactivity/use-variable.js +2 -2
- package/dist/shared/interactivity/use-variable.js.map +1 -1
- package/dist/shared/root/authenticated-root.js +3 -3
- package/dist/shared/root/authenticated-root.js.map +1 -1
- package/dist/shared/root/insecure-origin-banner.js +2 -2
- package/dist/shared/root/insecure-origin-banner.js.map +1 -1
- package/dist/shared/utils/get-icon.d.ts.map +1 -1
- package/dist/shared/utils/get-icon.js.map +1 -1
- package/dist/shared/utils/use-component-styles.js +1 -2
- package/dist/shared/utils/use-component-styles.js.map +1 -1
- package/dist/types/core.d.ts +8 -8
- package/dist/types/core.d.ts.map +1 -1
- package/dist/types/utils.d.ts +3 -3
- package/dist/types/utils.d.ts.map +1 -1
- package/dist/types/utils.js.map +1 -1
- package/dist/umd/dara.core.umd.cjs +1786 -657
- package/dist/vitest-setup.js +2 -0
- package/dist/vitest-setup.js.map +1 -1
- package/package.json +18 -17
|
@@ -2992,7 +2992,7 @@
|
|
|
2992
2992
|
var { applyAtomValueWrites: applyAtomValueWrites$1 } = Recoil_RecoilValueInterface;
|
|
2993
2993
|
var { releaseScheduledRetainablesNow: releaseScheduledRetainablesNow$1 } = Recoil_Retention;
|
|
2994
2994
|
var { freshSnapshot: freshSnapshot$1 } = Recoil_Snapshot$1;
|
|
2995
|
-
var { useCallback: useCallback$27, useContext: useContext$16, useEffect: useEffect$
|
|
2995
|
+
var { useCallback: useCallback$27, useContext: useContext$16, useEffect: useEffect$55, useMemo: useMemo$32, useRef: useRef$1$2, useState: useState$48 } = react.default;
|
|
2996
2996
|
function notInAContext() {
|
|
2997
2997
|
throw Recoil_err$2("This component must be used inside a <RecoilRoot> component.");
|
|
2998
2998
|
}
|
|
@@ -3079,13 +3079,13 @@
|
|
|
3079
3079
|
const storeRef = useStoreRef();
|
|
3080
3080
|
const [, setState] = useState$48([]);
|
|
3081
3081
|
setNotifyBatcherOfChange(() => setState({}));
|
|
3082
|
-
useEffect$
|
|
3082
|
+
useEffect$55(() => {
|
|
3083
3083
|
setNotifyBatcherOfChange(() => setState({}));
|
|
3084
3084
|
return () => {
|
|
3085
3085
|
setNotifyBatcherOfChange(() => {});
|
|
3086
3086
|
};
|
|
3087
3087
|
}, [setNotifyBatcherOfChange]);
|
|
3088
|
-
useEffect$
|
|
3088
|
+
useEffect$55(() => {
|
|
3089
3089
|
Recoil_Queue.enqueueExecution("Batcher", () => {
|
|
3090
3090
|
endBatch(storeRef.current);
|
|
3091
3091
|
});
|
|
@@ -3190,7 +3190,7 @@
|
|
|
3190
3190
|
if (storeProp != null) storeRef.current = storeProp;
|
|
3191
3191
|
storeStateRef = Recoil_useRefInitOnce(() => initializeState_DEPRECATED != null ? initialStoreState_DEPRECATED(storeRef.current, initializeState_DEPRECATED) : initializeState != null ? initialStoreState(initializeState) : makeEmptyStoreState$2());
|
|
3192
3192
|
const mutableSource = useMemo$32(() => createMutableSource$1 === null || createMutableSource$1 === void 0 ? void 0 : createMutableSource$1(storeStateRef, () => storeStateRef.current.currentTree.version), [storeStateRef]);
|
|
3193
|
-
useEffect$
|
|
3193
|
+
useEffect$55(() => {
|
|
3194
3194
|
const store = storeRef.current;
|
|
3195
3195
|
for (const atomKey of new Set(store.getState().knownAtoms)) initializeNode$2(store, atomKey, "get");
|
|
3196
3196
|
return () => {
|
|
@@ -10129,6 +10129,9 @@
|
|
|
10129
10129
|
* See the License for the specific language governing permissions and
|
|
10130
10130
|
* limitations under the License.
|
|
10131
10131
|
*/
|
|
10132
|
+
function getMaxItems$1(maxItems) {
|
|
10133
|
+
return maxItems || 5;
|
|
10134
|
+
}
|
|
10132
10135
|
var List = dist_default.div`
|
|
10133
10136
|
z-index: 5000;
|
|
10134
10137
|
|
|
@@ -10136,8 +10139,7 @@
|
|
|
10136
10139
|
display: ${(props) => props.isOpen ? "flex" : "none"};
|
|
10137
10140
|
flex-direction: column;
|
|
10138
10141
|
|
|
10139
|
-
max-height: calc(${(props) => (props.maxItems
|
|
10140
|
-
|
|
10142
|
+
max-height: calc(${(props) => getMaxItems$1(props.maxItems) * 2}em + 2px);
|
|
10141
10143
|
border: 1px solid ${(props) => props.theme.colors.grey3};
|
|
10142
10144
|
`;
|
|
10143
10145
|
var NoItemsLabel = dist_default.span`
|
|
@@ -11930,48 +11932,6 @@
|
|
|
11930
11932
|
return isFunction(resultSelector) ? mergeMap(project, resultSelector, 1) : mergeMap(project, 1);
|
|
11931
11933
|
}
|
|
11932
11934
|
//#endregion
|
|
11933
|
-
//#region ../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/debounceTime.js
|
|
11934
|
-
function debounceTime(dueTime, scheduler) {
|
|
11935
|
-
if (scheduler === void 0) scheduler = asyncScheduler;
|
|
11936
|
-
return operate(function(source, subscriber) {
|
|
11937
|
-
var activeTask = null;
|
|
11938
|
-
var lastValue = null;
|
|
11939
|
-
var lastTime = null;
|
|
11940
|
-
var emit = function() {
|
|
11941
|
-
if (activeTask) {
|
|
11942
|
-
activeTask.unsubscribe();
|
|
11943
|
-
activeTask = null;
|
|
11944
|
-
var value = lastValue;
|
|
11945
|
-
lastValue = null;
|
|
11946
|
-
subscriber.next(value);
|
|
11947
|
-
}
|
|
11948
|
-
};
|
|
11949
|
-
function emitWhenIdle() {
|
|
11950
|
-
var targetTime = lastTime + dueTime;
|
|
11951
|
-
var now = scheduler.now();
|
|
11952
|
-
if (now < targetTime) {
|
|
11953
|
-
activeTask = this.schedule(void 0, targetTime - now);
|
|
11954
|
-
subscriber.add(activeTask);
|
|
11955
|
-
return;
|
|
11956
|
-
}
|
|
11957
|
-
emit();
|
|
11958
|
-
}
|
|
11959
|
-
source.subscribe(createOperatorSubscriber(subscriber, function(value) {
|
|
11960
|
-
lastValue = value;
|
|
11961
|
-
lastTime = scheduler.now();
|
|
11962
|
-
if (!activeTask) {
|
|
11963
|
-
activeTask = scheduler.schedule(emitWhenIdle, dueTime);
|
|
11964
|
-
subscriber.add(activeTask);
|
|
11965
|
-
}
|
|
11966
|
-
}, function() {
|
|
11967
|
-
emit();
|
|
11968
|
-
subscriber.complete();
|
|
11969
|
-
}, void 0, function() {
|
|
11970
|
-
lastValue = activeTask = null;
|
|
11971
|
-
}));
|
|
11972
|
-
});
|
|
11973
|
-
}
|
|
11974
|
-
//#endregion
|
|
11975
11935
|
//#region ../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/take.js
|
|
11976
11936
|
function take(count) {
|
|
11977
11937
|
return count <= 0 ? function() {
|
|
@@ -12020,106 +11980,6 @@
|
|
|
12020
11980
|
});
|
|
12021
11981
|
}
|
|
12022
11982
|
//#endregion
|
|
12023
|
-
//#region ../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/share.js
|
|
12024
|
-
function share(options) {
|
|
12025
|
-
if (options === void 0) options = {};
|
|
12026
|
-
var _a = options.connector, connector = _a === void 0 ? function() {
|
|
12027
|
-
return new Subject();
|
|
12028
|
-
} : _a, _b = options.resetOnError, resetOnError = _b === void 0 ? true : _b, _c = options.resetOnComplete, resetOnComplete = _c === void 0 ? true : _c, _d = options.resetOnRefCountZero, resetOnRefCountZero = _d === void 0 ? true : _d;
|
|
12029
|
-
return function(wrapperSource) {
|
|
12030
|
-
var connection;
|
|
12031
|
-
var resetConnection;
|
|
12032
|
-
var subject;
|
|
12033
|
-
var refCount = 0;
|
|
12034
|
-
var hasCompleted = false;
|
|
12035
|
-
var hasErrored = false;
|
|
12036
|
-
var cancelReset = function() {
|
|
12037
|
-
resetConnection === null || resetConnection === void 0 || resetConnection.unsubscribe();
|
|
12038
|
-
resetConnection = void 0;
|
|
12039
|
-
};
|
|
12040
|
-
var reset = function() {
|
|
12041
|
-
cancelReset();
|
|
12042
|
-
connection = subject = void 0;
|
|
12043
|
-
hasCompleted = hasErrored = false;
|
|
12044
|
-
};
|
|
12045
|
-
var resetAndUnsubscribe = function() {
|
|
12046
|
-
var conn = connection;
|
|
12047
|
-
reset();
|
|
12048
|
-
conn === null || conn === void 0 || conn.unsubscribe();
|
|
12049
|
-
};
|
|
12050
|
-
return operate(function(source, subscriber) {
|
|
12051
|
-
refCount++;
|
|
12052
|
-
if (!hasErrored && !hasCompleted) cancelReset();
|
|
12053
|
-
var dest = subject = subject !== null && subject !== void 0 ? subject : connector();
|
|
12054
|
-
subscriber.add(function() {
|
|
12055
|
-
refCount--;
|
|
12056
|
-
if (refCount === 0 && !hasErrored && !hasCompleted) resetConnection = handleReset(resetAndUnsubscribe, resetOnRefCountZero);
|
|
12057
|
-
});
|
|
12058
|
-
dest.subscribe(subscriber);
|
|
12059
|
-
if (!connection && refCount > 0) {
|
|
12060
|
-
connection = new SafeSubscriber({
|
|
12061
|
-
next: function(value) {
|
|
12062
|
-
return dest.next(value);
|
|
12063
|
-
},
|
|
12064
|
-
error: function(err) {
|
|
12065
|
-
hasErrored = true;
|
|
12066
|
-
cancelReset();
|
|
12067
|
-
resetConnection = handleReset(reset, resetOnError, err);
|
|
12068
|
-
dest.error(err);
|
|
12069
|
-
},
|
|
12070
|
-
complete: function() {
|
|
12071
|
-
hasCompleted = true;
|
|
12072
|
-
cancelReset();
|
|
12073
|
-
resetConnection = handleReset(reset, resetOnComplete);
|
|
12074
|
-
dest.complete();
|
|
12075
|
-
}
|
|
12076
|
-
});
|
|
12077
|
-
innerFrom(source).subscribe(connection);
|
|
12078
|
-
}
|
|
12079
|
-
})(wrapperSource);
|
|
12080
|
-
};
|
|
12081
|
-
}
|
|
12082
|
-
function handleReset(reset, on) {
|
|
12083
|
-
var args = [];
|
|
12084
|
-
for (var _i = 2; _i < arguments.length; _i++) args[_i - 2] = arguments[_i];
|
|
12085
|
-
if (on === true) {
|
|
12086
|
-
reset();
|
|
12087
|
-
return;
|
|
12088
|
-
}
|
|
12089
|
-
if (on === false) return;
|
|
12090
|
-
var onSubscriber = new SafeSubscriber({ next: function() {
|
|
12091
|
-
onSubscriber.unsubscribe();
|
|
12092
|
-
reset();
|
|
12093
|
-
} });
|
|
12094
|
-
return innerFrom(on.apply(void 0, __spreadArray([], __read(args)))).subscribe(onSubscriber);
|
|
12095
|
-
}
|
|
12096
|
-
//#endregion
|
|
12097
|
-
//#region ../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/switchMap.js
|
|
12098
|
-
function switchMap(project, resultSelector) {
|
|
12099
|
-
return operate(function(source, subscriber) {
|
|
12100
|
-
var innerSubscriber = null;
|
|
12101
|
-
var index = 0;
|
|
12102
|
-
var isComplete = false;
|
|
12103
|
-
var checkComplete = function() {
|
|
12104
|
-
return isComplete && !innerSubscriber && subscriber.complete();
|
|
12105
|
-
};
|
|
12106
|
-
source.subscribe(createOperatorSubscriber(subscriber, function(value) {
|
|
12107
|
-
innerSubscriber === null || innerSubscriber === void 0 || innerSubscriber.unsubscribe();
|
|
12108
|
-
var innerIndex = 0;
|
|
12109
|
-
var outerIndex = index++;
|
|
12110
|
-
innerFrom(project(value, outerIndex)).subscribe(innerSubscriber = createOperatorSubscriber(subscriber, function(innerValue) {
|
|
12111
|
-
return subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue);
|
|
12112
|
-
}, function() {
|
|
12113
|
-
innerSubscriber = null;
|
|
12114
|
-
checkComplete();
|
|
12115
|
-
}));
|
|
12116
|
-
}, function() {
|
|
12117
|
-
isComplete = true;
|
|
12118
|
-
checkComplete();
|
|
12119
|
-
}));
|
|
12120
|
-
});
|
|
12121
|
-
}
|
|
12122
|
-
//#endregion
|
|
12123
11983
|
//#region ../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/takeWhile.js
|
|
12124
11984
|
function takeWhile(predicate, inclusive) {
|
|
12125
11985
|
if (inclusive === void 0) inclusive = false;
|
|
@@ -17644,14 +17504,14 @@
|
|
|
17644
17504
|
* earlier React versions.
|
|
17645
17505
|
* @see https://floating-ui.com/docs/react-utils#useid
|
|
17646
17506
|
*/
|
|
17647
|
-
var useId$
|
|
17507
|
+
var useId$2 = SafeReact.useId || useFloatingId;
|
|
17648
17508
|
/**
|
|
17649
17509
|
* Renders a pointing arrow triangle.
|
|
17650
17510
|
* @see https://floating-ui.com/docs/FloatingArrow
|
|
17651
17511
|
*/
|
|
17652
17512
|
var FloatingArrow = /*#__PURE__*/ react$3.forwardRef(function FloatingArrow(props, ref) {
|
|
17653
17513
|
const { context: { placement, elements: { floating }, middlewareData: { arrow, shift } }, width = 14, height = 7, tipRadius = 0, strokeWidth = 0, staticOffset, stroke, d, style: { transform, ...restStyle } = {}, ...rest } = props;
|
|
17654
|
-
const clipPathId = useId$
|
|
17514
|
+
const clipPathId = useId$2();
|
|
17655
17515
|
const [isRTL, setIsRTL] = react$3.useState(false);
|
|
17656
17516
|
index(() => {
|
|
17657
17517
|
if (!floating) return;
|
|
@@ -18140,7 +18000,7 @@
|
|
|
18140
18000
|
function useFloatingPortalNode(props) {
|
|
18141
18001
|
if (props === void 0) props = {};
|
|
18142
18002
|
const { id, root } = props;
|
|
18143
|
-
const uniqueId = useId$
|
|
18003
|
+
const uniqueId = useId$2();
|
|
18144
18004
|
const portalContext = usePortalContext();
|
|
18145
18005
|
const [portalNode, setPortalNode] = react$3.useState(null);
|
|
18146
18006
|
const portalNodeRef = react$3.useRef(null);
|
|
@@ -18569,7 +18429,7 @@
|
|
|
18569
18429
|
}
|
|
18570
18430
|
function useFloatingRootContext(options) {
|
|
18571
18431
|
const { open = false, onOpenChange: onOpenChangeProp, elements: elementsProp } = options;
|
|
18572
|
-
const floatingId = useId$
|
|
18432
|
+
const floatingId = useId$2();
|
|
18573
18433
|
const dataRef = react$3.useRef({});
|
|
18574
18434
|
const [events] = react$3.useState(() => createPubSub());
|
|
18575
18435
|
const nested = useFloatingParentNodeId() != null;
|
|
@@ -18872,7 +18732,7 @@
|
|
|
18872
18732
|
const { open, floatingId } = context;
|
|
18873
18733
|
const { enabled = true, role = "dialog" } = props;
|
|
18874
18734
|
const ariaRole = (_componentRoleToAriaR = componentRoleToAriaRoleMap.get(role)) != null ? _componentRoleToAriaR : role;
|
|
18875
|
-
const referenceId = useId$
|
|
18735
|
+
const referenceId = useId$2();
|
|
18876
18736
|
const isNested = useFloatingParentNodeId() != null;
|
|
18877
18737
|
const reference = react$3.useMemo(() => {
|
|
18878
18738
|
if (ariaRole === "tooltip" || role === "label") return { ["aria-" + (role === "label" ? "labelledby" : "describedby")]: open ? floatingId : void 0 };
|
|
@@ -18984,12 +18844,12 @@
|
|
|
18984
18844
|
*/
|
|
18985
18845
|
var AccordionItemWrapper = dist_default.div`
|
|
18986
18846
|
width: 100%;
|
|
18847
|
+
border: 1px solid ${(props) => props.theme.colors.grey1};
|
|
18848
|
+
border-radius: 0.25rem;
|
|
18987
18849
|
background-color: ${(props) => {
|
|
18988
18850
|
var _a;
|
|
18989
18851
|
return (_a = props.backgroundColor) !== null && _a !== void 0 ? _a : props.theme.colors.blue1;
|
|
18990
18852
|
}};
|
|
18991
|
-
border: 1px solid ${(props) => props.theme.colors.grey1};
|
|
18992
|
-
border-radius: 0.25rem;
|
|
18993
18853
|
|
|
18994
18854
|
/* Define the animation used for collapsing */
|
|
18995
18855
|
/* stylelint-disable-next-line -- external classname */
|
|
@@ -19006,14 +18866,14 @@
|
|
|
19006
18866
|
|
|
19007
18867
|
width: 100%;
|
|
19008
18868
|
padding: 0.5rem 1rem;
|
|
18869
|
+
border: none;
|
|
18870
|
+
border-radius: ${(props) => props.isOpen ? "0.25rem 0.25rem 0rem 0rem" : "0.25rem"};
|
|
19009
18871
|
|
|
19010
18872
|
font-size: 1.2em;
|
|
19011
18873
|
font-weight: 400;
|
|
19012
18874
|
color: ${(props) => props.theme.colors.text};
|
|
19013
18875
|
|
|
19014
18876
|
background-color: ${(props) => props.theme.colors.grey1};
|
|
19015
|
-
border: none;
|
|
19016
|
-
border-radius: ${(props) => props.isOpen ? "0.25rem 0.25rem 0rem 0rem" : "0.25rem"};
|
|
19017
18877
|
|
|
19018
18878
|
&:hover {
|
|
19019
18879
|
background-color: ${(props) => props.theme.colors.grey2};
|
|
@@ -19093,6 +18953,10 @@
|
|
|
19093
18953
|
* limitations under the License.
|
|
19094
18954
|
*/
|
|
19095
18955
|
var shouldForwardProp$4 = (prop) => !["color", "width"].includes(prop);
|
|
18956
|
+
function getWidth$1(width) {
|
|
18957
|
+
if (width) return width;
|
|
18958
|
+
return "auto";
|
|
18959
|
+
}
|
|
19096
18960
|
/**
|
|
19097
18961
|
* A simple badge component
|
|
19098
18962
|
*
|
|
@@ -19103,17 +18967,17 @@
|
|
|
19103
18967
|
align-items: center;
|
|
19104
18968
|
justify-content: center;
|
|
19105
18969
|
|
|
19106
|
-
width: ${(props) => props.width
|
|
18970
|
+
width: ${(props) => getWidth$1(props.width)};
|
|
19107
18971
|
height: ${(props) => props.height ? `${props.height}px` : "2rem"};
|
|
19108
18972
|
padding: 0 0.75rem;
|
|
18973
|
+
border: 1px solid ${(props) => props.color};
|
|
18974
|
+
border-radius: ${(props) => props.height ? `${props.height / 2}px` : "1rem"};
|
|
19109
18975
|
|
|
19110
18976
|
font-size: 0.875rem;
|
|
19111
18977
|
font-weight: 400;
|
|
19112
18978
|
color: ${(props) => props.outline ? props.color : props.theme.colors.blue1};
|
|
19113
18979
|
|
|
19114
18980
|
background-color: ${(props) => props.outline ? props.theme.colors.blue1 : props.color};
|
|
19115
|
-
border: 1px solid ${(props) => props.color};
|
|
19116
|
-
border-radius: ${(props) => props.height ? `${props.height / 2}px` : "1rem"};
|
|
19117
18981
|
`;
|
|
19118
18982
|
//#endregion
|
|
19119
18983
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.26.10/node_modules/@babel/runtime/helpers/esm/extends.js
|
|
@@ -19702,12 +19566,12 @@
|
|
|
19702
19566
|
|
|
19703
19567
|
width: 25%;
|
|
19704
19568
|
height: 25%;
|
|
19569
|
+
border-radius: 100%;
|
|
19705
19570
|
|
|
19706
19571
|
background-color: ${(props) => {
|
|
19707
19572
|
var _a;
|
|
19708
19573
|
return (_a = props.color) !== null && _a !== void 0 ? _a : props.theme.colors.grey4;
|
|
19709
19574
|
}};
|
|
19710
|
-
border-radius: 100%;
|
|
19711
19575
|
|
|
19712
19576
|
animation: sk-chase-dot-before 2s infinite ease-in-out both;
|
|
19713
19577
|
}
|
|
@@ -19805,7 +19669,7 @@
|
|
|
19805
19669
|
(0, import_jsx_runtime.jsx)("div", { className: "sk-chase-dot" }),
|
|
19806
19670
|
(0, import_jsx_runtime.jsx)("div", { className: "sk-chase-dot" })
|
|
19807
19671
|
]
|
|
19808
|
-
}), (props.showText || props.text) && (0, import_jsx_runtime.jsx)(LoadingText, {
|
|
19672
|
+
}), (Boolean(props.showText) || Boolean(props.text)) && (0, import_jsx_runtime.jsx)(LoadingText, {
|
|
19809
19673
|
color: props.color,
|
|
19810
19674
|
children: (_a = props.text) !== null && _a !== void 0 ? _a : "LOADING"
|
|
19811
19675
|
})]
|
|
@@ -19848,13 +19712,12 @@
|
|
|
19848
19712
|
height: 2.5rem;
|
|
19849
19713
|
padding: ${(props) => props.$hasAnchor ? 0 : "0 1rem"};
|
|
19850
19714
|
padding: 0 1rem;
|
|
19715
|
+
border: none;
|
|
19716
|
+
border-radius: 0.25rem;
|
|
19851
19717
|
|
|
19852
19718
|
font-size: 1rem;
|
|
19853
19719
|
font-weight: 600;
|
|
19854
19720
|
|
|
19855
|
-
border: none;
|
|
19856
|
-
border-radius: 0.25rem;
|
|
19857
|
-
|
|
19858
19721
|
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
19859
19722
|
transition-duration: 150ms;
|
|
19860
19723
|
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
|
|
@@ -19985,7 +19848,7 @@
|
|
|
19985
19848
|
$hasAnchor: !!href,
|
|
19986
19849
|
autoFocus,
|
|
19987
19850
|
className,
|
|
19988
|
-
disabled: disabled || loading,
|
|
19851
|
+
disabled: Boolean(disabled) || Boolean(loading),
|
|
19989
19852
|
id,
|
|
19990
19853
|
onClick,
|
|
19991
19854
|
outline,
|
|
@@ -20021,7 +19884,6 @@
|
|
|
20021
19884
|
flex: 1 1 auto;
|
|
20022
19885
|
|
|
20023
19886
|
height: 2.5rem;
|
|
20024
|
-
|
|
20025
19887
|
border: 1px solid ${(props) => {
|
|
20026
19888
|
var _a;
|
|
20027
19889
|
return props.disabled ? props.theme.colors.grey2 : (_a = props.theme.colors) === null || _a === void 0 ? void 0 : _a[props.styling];
|
|
@@ -20160,11 +20022,11 @@
|
|
|
20160
20022
|
align-items: center;
|
|
20161
20023
|
|
|
20162
20024
|
padding: 0;
|
|
20025
|
+
border: none;
|
|
20163
20026
|
|
|
20164
20027
|
color: ${(props) => props.theme.colors.grey4};
|
|
20165
20028
|
|
|
20166
20029
|
background-color: inherit;
|
|
20167
|
-
border: none;
|
|
20168
20030
|
|
|
20169
20031
|
:hover {
|
|
20170
20032
|
color: ${(props) => props.theme.colors.grey5};
|
|
@@ -20177,11 +20039,11 @@
|
|
|
20177
20039
|
z-index: 3;
|
|
20178
20040
|
|
|
20179
20041
|
padding: 0;
|
|
20042
|
+
border: none;
|
|
20180
20043
|
|
|
20181
20044
|
color: ${(props) => props.selected ? props.theme.colors.grey4 : props.theme.colors.grey3};
|
|
20182
20045
|
|
|
20183
20046
|
background-color: inherit;
|
|
20184
|
-
border: none;
|
|
20185
20047
|
|
|
20186
20048
|
:hover {
|
|
20187
20049
|
color: ${(props) => props.theme.colors.grey4};
|
|
@@ -20252,13 +20114,13 @@
|
|
|
20252
20114
|
height: 100%;
|
|
20253
20115
|
min-height: 3.4rem;
|
|
20254
20116
|
padding: 1rem;
|
|
20117
|
+
border: 1px solid ${(props) => props.isErrored ? props.theme.colors.error : props.theme.colors.grey1};
|
|
20118
|
+
border-radius: 0.25rem;
|
|
20255
20119
|
|
|
20256
20120
|
font-size: 1rem;
|
|
20257
20121
|
color: ${(props) => props.disabled ? props.theme.colors.grey2 : props.theme.colors.text};
|
|
20258
20122
|
|
|
20259
20123
|
background-color: ${(props) => props.theme.colors.grey1};
|
|
20260
|
-
border: 1px solid ${(props) => props.isErrored ? props.theme.colors.error : props.theme.colors.grey1};
|
|
20261
|
-
border-radius: 0.25rem;
|
|
20262
20124
|
outline: 0;
|
|
20263
20125
|
|
|
20264
20126
|
:hover:not(:disabled) {
|
|
@@ -27481,11 +27343,11 @@
|
|
|
27481
27343
|
justify-content: space-between;
|
|
27482
27344
|
|
|
27483
27345
|
padding: 0.5rem 1rem;
|
|
27346
|
+
border-radius: 0.25rem 0.25rem 0 0;
|
|
27484
27347
|
|
|
27485
27348
|
font-size: 0.875rem;
|
|
27486
27349
|
|
|
27487
27350
|
background-color: ${(props) => props.$isLightTheme ? theme.colors.blue2 : darkTheme.colors.blue2} !important;
|
|
27488
|
-
border-radius: 0.25rem 0.25rem 0 0;
|
|
27489
27351
|
`;
|
|
27490
27352
|
var CopyToClipboardContainer = dist_default.span`
|
|
27491
27353
|
:hover {
|
|
@@ -27506,9 +27368,9 @@
|
|
|
27506
27368
|
|
|
27507
27369
|
margin: 0;
|
|
27508
27370
|
padding: 1rem;
|
|
27371
|
+
border-radius: 0 0 0.25rem 0.25rem;
|
|
27509
27372
|
|
|
27510
27373
|
background-color: ${(props) => props.$isLightTheme ? theme.colors.blue1 : darkTheme.colors.blue1} !important;
|
|
27511
|
-
border-radius: 0 0 0.25rem 0.25rem;
|
|
27512
27374
|
`;
|
|
27513
27375
|
//#endregion
|
|
27514
27376
|
//#region ../ui-components/dist/markdown/markdown.js
|
|
@@ -27536,9 +27398,9 @@
|
|
|
27536
27398
|
|
|
27537
27399
|
code {
|
|
27538
27400
|
padding: 0.1rem;
|
|
27539
|
-
background-color: ${(props) => props.theme.colors.grey1};
|
|
27540
27401
|
border: 1px solid ${(props) => props.theme.colors.grey3};
|
|
27541
27402
|
border-radius: 0.25rem;
|
|
27403
|
+
background-color: ${(props) => props.theme.colors.grey1};
|
|
27542
27404
|
}
|
|
27543
27405
|
}
|
|
27544
27406
|
|
|
@@ -27558,7 +27420,8 @@
|
|
|
27558
27420
|
|
|
27559
27421
|
a {
|
|
27560
27422
|
color: ${(props) => props.theme.colors.primary};
|
|
27561
|
-
word-break:
|
|
27423
|
+
word-break: normal;
|
|
27424
|
+
overflow-wrap: anywhere;
|
|
27562
27425
|
}
|
|
27563
27426
|
|
|
27564
27427
|
blockquote {
|
|
@@ -27567,13 +27430,12 @@
|
|
|
27567
27430
|
margin-top: 1.5rem;
|
|
27568
27431
|
margin-bottom: 1.5rem;
|
|
27569
27432
|
padding-left: 1rem;
|
|
27433
|
+
border-left: 0.25rem solid ${(props) => props.theme.colors.grey3};
|
|
27570
27434
|
|
|
27571
27435
|
font-weight: 500;
|
|
27572
27436
|
font-style: italic;
|
|
27573
27437
|
color: ${(props) => props.theme.colors.grey6};
|
|
27574
27438
|
|
|
27575
|
-
border-left: 0.25rem solid ${(props) => props.theme.colors.grey3};
|
|
27576
|
-
|
|
27577
27439
|
p:first-of-type::before {
|
|
27578
27440
|
content: open-quote;
|
|
27579
27441
|
}
|
|
@@ -27663,13 +27525,13 @@
|
|
|
27663
27525
|
margin-top: 1.7rem;
|
|
27664
27526
|
margin-bottom: 1.7rem;
|
|
27665
27527
|
padding: 0 0.5em;
|
|
27528
|
+
border: 1px solid ${(props) => props.theme.colors.blue3};
|
|
27529
|
+
border-radius: 0.375rem;
|
|
27666
27530
|
|
|
27667
27531
|
font-size: 0.9rem;
|
|
27668
27532
|
line-height: 1.7;
|
|
27669
27533
|
|
|
27670
27534
|
background-color: ${(props) => props.theme.colors.blue2};
|
|
27671
|
-
border: 1px solid ${(props) => props.theme.colors.blue3};
|
|
27672
|
-
border-radius: 0.375rem;
|
|
27673
27535
|
|
|
27674
27536
|
div {
|
|
27675
27537
|
background-color: ${(props) => props.theme.colors.blue2} !important;
|
|
@@ -27701,9 +27563,9 @@
|
|
|
27701
27563
|
|
|
27702
27564
|
code {
|
|
27703
27565
|
padding: 0.1em;
|
|
27704
|
-
background-color: ${(props) => props.theme.colors.grey1};
|
|
27705
27566
|
border: 1px solid ${(props) => props.theme.colors.grey3};
|
|
27706
27567
|
border-radius: 0.25rem;
|
|
27568
|
+
background-color: ${(props) => props.theme.colors.grey1};
|
|
27707
27569
|
}
|
|
27708
27570
|
|
|
27709
27571
|
p {
|
|
@@ -27861,11 +27723,11 @@
|
|
|
27861
27723
|
|
|
27862
27724
|
max-width: 15rem;
|
|
27863
27725
|
padding: 0.75rem 1rem;
|
|
27864
|
-
|
|
27865
|
-
word-break: break-word;
|
|
27866
|
-
|
|
27867
27726
|
border-radius: 0.25rem;
|
|
27868
27727
|
|
|
27728
|
+
word-break: normal;
|
|
27729
|
+
overflow-wrap: anywhere;
|
|
27730
|
+
|
|
27869
27731
|
transition: opacity 150ms ease-in-out;
|
|
27870
27732
|
|
|
27871
27733
|
${(props) => {
|
|
@@ -27910,7 +27772,7 @@
|
|
|
27910
27772
|
];
|
|
27911
27773
|
}, [placement]);
|
|
27912
27774
|
const { refs, floatingStyles, context } = useFloating({
|
|
27913
|
-
open: visible !== void 0 ? visible : isOpen,
|
|
27775
|
+
open: visible !== null && visible !== void 0 ? visible : isOpen,
|
|
27914
27776
|
onOpenChange: visible !== void 0 ? void 0 : setIsOpen,
|
|
27915
27777
|
placement: placement === "auto" ? void 0 : placement,
|
|
27916
27778
|
middleware,
|
|
@@ -27937,7 +27799,7 @@
|
|
|
27937
27799
|
}),
|
|
27938
27800
|
useRole(context, { role: "tooltip" })
|
|
27939
27801
|
]);
|
|
27940
|
-
const isVisible = visible !== void 0 ? visible : isOpen;
|
|
27802
|
+
const isVisible = visible !== null && visible !== void 0 ? visible : isOpen;
|
|
27941
27803
|
const childRef = children && typeof children === "object" && "ref" in children ? children.ref : null;
|
|
27942
27804
|
const mergedRef = useMergeRefs([refs.setReference, childRef]);
|
|
27943
27805
|
const referenceElement = children ? react.cloneElement(children, getReferenceProps(Object.assign({ ref: mergedRef }, children.props))) : null;
|
|
@@ -27984,9 +27846,9 @@
|
|
|
27984
27846
|
gap: 0.5rem;
|
|
27985
27847
|
|
|
27986
27848
|
padding: 0.3rem;
|
|
27849
|
+
border-radius: 0.25rem;
|
|
27987
27850
|
|
|
27988
27851
|
background-color: ${(props) => props.theme.colors.blue1};
|
|
27989
|
-
border-radius: 0.25rem;
|
|
27990
27852
|
box-shadow: ${(props) => props.theme.shadow.medium};
|
|
27991
27853
|
`;
|
|
27992
27854
|
var MessageWrapper = dist_default.div`
|
|
@@ -27998,9 +27860,9 @@
|
|
|
27998
27860
|
|
|
27999
27861
|
width: 100%;
|
|
28000
27862
|
padding: 1rem;
|
|
27863
|
+
border-radius: 0.25rem;
|
|
28001
27864
|
|
|
28002
27865
|
background-color: ${(props) => props.$messageFromActiveUser ? props.theme.colors.blue2 : props.theme.colors.blue1};
|
|
28003
|
-
border-radius: 0.25rem;
|
|
28004
27866
|
box-shadow: ${(props) => props.theme.shadow.medium};
|
|
28005
27867
|
|
|
28006
27868
|
:hover ${InteractiveIcons} {
|
|
@@ -28075,11 +27937,10 @@
|
|
|
28075
27937
|
|
|
28076
27938
|
width: 2rem;
|
|
28077
27939
|
height: 2rem;
|
|
27940
|
+
border-radius: 50%;
|
|
28078
27941
|
|
|
28079
27942
|
font-weight: 700;
|
|
28080
27943
|
color: white;
|
|
28081
|
-
|
|
28082
|
-
border-radius: 50%;
|
|
28083
27944
|
`;
|
|
28084
27945
|
//#endregion
|
|
28085
27946
|
//#region ../ui-components/dist/chat/chat.js
|
|
@@ -28108,9 +27969,9 @@
|
|
|
28108
27969
|
width: ${(props) => props.$isPopup ? "350px" : "100%"};
|
|
28109
27970
|
height: ${(props) => props.$isPopup ? "calc(100vh - 2rem)" : "100%"};
|
|
28110
27971
|
padding: 1.5rem;
|
|
27972
|
+
border-radius: ${(props) => props.$isPopup ? "0.4rem" : 0};
|
|
28111
27973
|
|
|
28112
27974
|
background-color: ${(props) => props.$isPopup ? `${props.theme.colors.background}e6` : "inherit"};
|
|
28113
|
-
border-radius: ${(props) => props.$isPopup ? "0.4rem" : 0};
|
|
28114
27975
|
box-shadow: ${(props) => props.theme.shadow.medium};
|
|
28115
27976
|
`;
|
|
28116
27977
|
var ReplyWrapper = dist_default.div`
|
|
@@ -30497,11 +30358,10 @@
|
|
|
30497
30358
|
|
|
30498
30359
|
width: ${(props) => props.isListStyle ? "100%" : "fit-content"};
|
|
30499
30360
|
padding: 0.5625rem 0 0.5625rem 2rem;
|
|
30361
|
+
border-radius: 0.25rem;
|
|
30500
30362
|
|
|
30501
30363
|
font-size: 1rem;
|
|
30502
30364
|
|
|
30503
|
-
border-radius: 0.25rem;
|
|
30504
|
-
|
|
30505
30365
|
${(props) => {
|
|
30506
30366
|
if (props.isListStyle && !props.disabled) return `
|
|
30507
30367
|
:hover {
|
|
@@ -30526,7 +30386,6 @@
|
|
|
30526
30386
|
|
|
30527
30387
|
width: 0.3125rem;
|
|
30528
30388
|
height: 0.625rem;
|
|
30529
|
-
|
|
30530
30389
|
border: solid ${(props) => props.theme.colors.grey5};
|
|
30531
30390
|
border-width: 0 2px 2px 0;
|
|
30532
30391
|
}
|
|
@@ -30539,12 +30398,12 @@
|
|
|
30539
30398
|
:hover {
|
|
30540
30399
|
span,
|
|
30541
30400
|
input:checked ~ span {
|
|
30401
|
+
border: 1px solid ${(props) => props.theme.colors.grey4};
|
|
30542
30402
|
background-color: ${(props) => {
|
|
30543
30403
|
if (props.disabled) return props.theme.colors.grey3;
|
|
30544
30404
|
if (props.isListStyle) return props.theme.colors.blue1;
|
|
30545
30405
|
return props.theme.colors.grey1;
|
|
30546
30406
|
}};
|
|
30547
|
-
border: 1px solid ${(props) => props.theme.colors.grey4};
|
|
30548
30407
|
}
|
|
30549
30408
|
}
|
|
30550
30409
|
|
|
@@ -30599,7 +30458,8 @@
|
|
|
30599
30458
|
* @param {CheckboxProps} props - the component props
|
|
30600
30459
|
*/
|
|
30601
30460
|
function Checkbox(props) {
|
|
30602
|
-
|
|
30461
|
+
var _a;
|
|
30462
|
+
const [checked, setChecked] = (0, react.useState)((_a = props.selected) !== null && _a !== void 0 ? _a : props.initialValue);
|
|
30603
30463
|
(0, react.useEffect)(() => {
|
|
30604
30464
|
if (props.selected !== void 0) setChecked(props.selected);
|
|
30605
30465
|
}, [props.selected]);
|
|
@@ -30683,7 +30543,10 @@
|
|
|
30683
30543
|
* @param {CheckboxGroupProps} props - the component props
|
|
30684
30544
|
*/
|
|
30685
30545
|
function CheckboxGroup(props) {
|
|
30686
|
-
const [values, setValues] = (0, react.useState)(() =>
|
|
30546
|
+
const [values, setValues] = (0, react.useState)(() => {
|
|
30547
|
+
var _a;
|
|
30548
|
+
return getInitialValue$3((_a = props.values) !== null && _a !== void 0 ? _a : props.initialValue);
|
|
30549
|
+
});
|
|
30687
30550
|
const [checkedState, setCheckedState] = (0, react.useState)(() => getInitialCheckedState(props.items, values));
|
|
30688
30551
|
const isSelectPermitted = (0, react.useMemo)(() => {
|
|
30689
30552
|
if (!props.selectMax || values.length < props.selectMax) return true;
|
|
@@ -30724,7 +30587,7 @@
|
|
|
30724
30587
|
className: props.className,
|
|
30725
30588
|
style: props.style,
|
|
30726
30589
|
id: props.id,
|
|
30727
|
-
children: [(props.selectMax || props.selectMin) && (0, import_jsx_runtime.jsx)(CheckboxInfo, { children: infoMessage }), props.items.map((item, index) => {
|
|
30590
|
+
children: [(Boolean(props.selectMax) || Boolean(props.selectMin)) && (0, import_jsx_runtime.jsx)(CheckboxInfo, { children: infoMessage }), props.items.map((item, index) => {
|
|
30728
30591
|
var _a, _b;
|
|
30729
30592
|
return (0, import_jsx_runtime.jsx)(CheckboxWrapper, {
|
|
30730
30593
|
"aria-disabled": props.disabled,
|
|
@@ -30773,13 +30636,13 @@
|
|
|
30773
30636
|
width: 100%;
|
|
30774
30637
|
height: 100%;
|
|
30775
30638
|
padding: 0 1rem;
|
|
30639
|
+
border: 1px solid ${(props) => props.isErrored ? props.theme.colors.error : props.theme.colors.grey1};
|
|
30640
|
+
border-radius: 0.25rem;
|
|
30776
30641
|
|
|
30777
30642
|
font-size: 1rem;
|
|
30778
30643
|
color: ${(props) => props.disabled ? props.theme.colors.grey2 : props.theme.colors.text};
|
|
30779
30644
|
|
|
30780
30645
|
background-color: ${(props) => props.theme.colors.grey1};
|
|
30781
|
-
border: 1px solid ${(props) => props.isErrored ? props.theme.colors.error : props.theme.colors.grey1};
|
|
30782
|
-
border-radius: 0.25rem;
|
|
30783
30646
|
outline: 0;
|
|
30784
30647
|
|
|
30785
30648
|
:active:not(:disabled),
|
|
@@ -30947,21 +30810,21 @@
|
|
|
30947
30810
|
|
|
30948
30811
|
width: 17.5rem;
|
|
30949
30812
|
padding: 1.25rem 0.5rem;
|
|
30813
|
+
border-radius: 0.25rem;
|
|
30950
30814
|
|
|
30951
30815
|
background-color: ${(props) => props.theme.colors.grey1};
|
|
30952
|
-
border-radius: 0.25rem;
|
|
30953
30816
|
box-shadow: ${(props) => props.theme.shadow.light};
|
|
30954
30817
|
`;
|
|
30955
30818
|
var StyledSearchBar = dist_default(SearchBar)`
|
|
30956
30819
|
width: 15.5rem;
|
|
30957
|
-
background-color: ${(props) => props.theme.colors.blue1};
|
|
30958
30820
|
border: 1px solid ${(props) => props.theme.colors.blue1};
|
|
30959
30821
|
border-radius: 0.25rem;
|
|
30822
|
+
background-color: ${(props) => props.theme.colors.blue1};
|
|
30960
30823
|
|
|
30961
30824
|
input {
|
|
30962
30825
|
width: 15.5rem;
|
|
30963
|
-
background-color: ${(props) => props.theme.colors.blue1};
|
|
30964
30826
|
border: none;
|
|
30827
|
+
background-color: ${(props) => props.theme.colors.blue1};
|
|
30965
30828
|
|
|
30966
30829
|
:active:not(:disabled),
|
|
30967
30830
|
:focus:not(:disabled) {
|
|
@@ -30970,22 +30833,23 @@
|
|
|
30970
30833
|
}
|
|
30971
30834
|
|
|
30972
30835
|
:hover:not(:disabled) {
|
|
30973
|
-
background-color: ${(props) => props.theme.colors.blue1};
|
|
30974
30836
|
border: 1px solid ${(props) => props.theme.colors.grey2};
|
|
30837
|
+
background-color: ${(props) => props.theme.colors.blue1};
|
|
30975
30838
|
|
|
30976
30839
|
input {
|
|
30977
|
-
background-color: ${(props) => props.theme.colors.blue1};
|
|
30978
30840
|
border: none;
|
|
30841
|
+
background-color: ${(props) => props.theme.colors.blue1};
|
|
30979
30842
|
}
|
|
30980
30843
|
}
|
|
30981
30844
|
`;
|
|
30982
30845
|
var FilterButtons = dist_default.button`
|
|
30846
|
+
border: none;
|
|
30847
|
+
|
|
30983
30848
|
font-size: 0.75rem;
|
|
30984
30849
|
font-weight: 400;
|
|
30985
30850
|
color: ${(props) => props.theme.colors.primary};
|
|
30986
30851
|
|
|
30987
30852
|
background-color: inherit;
|
|
30988
|
-
border: none;
|
|
30989
30853
|
|
|
30990
30854
|
:hover {
|
|
30991
30855
|
cursor: pointer;
|
|
@@ -31078,7 +30942,7 @@
|
|
|
31078
30942
|
values: filterValue
|
|
31079
30943
|
}) }),
|
|
31080
30944
|
(0, import_jsx_runtime.jsx)(ApplyButton, {
|
|
31081
|
-
disabled: props.disabled || previousFilter === filterValue,
|
|
30945
|
+
disabled: Boolean(props.disabled) || previousFilter === filterValue,
|
|
31082
30946
|
onClick: (e) => {
|
|
31083
30947
|
var _a, _b;
|
|
31084
30948
|
(_a = props.onChange) === null || _a === void 0 || _a.call(props, filterValue, e);
|
|
@@ -33282,6 +33146,7 @@
|
|
|
33282
33146
|
width: 100%;
|
|
33283
33147
|
min-height: 2rem;
|
|
33284
33148
|
padding: 0.25rem 1rem;
|
|
33149
|
+
border-bottom: 1px solid ${(props) => props.theme.colors.grey3};
|
|
33285
33150
|
|
|
33286
33151
|
font-size: ${(props) => props.size ? `${props.size}rem` : "1rem"};
|
|
33287
33152
|
font-weight: 300;
|
|
@@ -33294,7 +33159,6 @@
|
|
|
33294
33159
|
if (props.isHighlighted) return props.theme.colors.grey2;
|
|
33295
33160
|
return props.theme.colors.blue1;
|
|
33296
33161
|
}};
|
|
33297
|
-
border-bottom: 1px solid ${(props) => props.theme.colors.grey3};
|
|
33298
33162
|
|
|
33299
33163
|
:hover {
|
|
33300
33164
|
background-color: ${(props) => props.theme.colors.grey2};
|
|
@@ -33413,7 +33277,6 @@
|
|
|
33413
33277
|
width: 100%;
|
|
33414
33278
|
min-width: 4rem;
|
|
33415
33279
|
height: 2.5rem;
|
|
33416
|
-
|
|
33417
33280
|
border-radius: ${(props) => props.isOpen ? "0.25rem 0.25rem 0px 0px" : "0.25rem"};
|
|
33418
33281
|
|
|
33419
33282
|
${(props) => {
|
|
@@ -33443,12 +33306,12 @@
|
|
|
33443
33306
|
width: calc(100% - 1rem);
|
|
33444
33307
|
height: 100%;
|
|
33445
33308
|
padding: 0 0.25rem 0 1rem;
|
|
33309
|
+
border: none;
|
|
33310
|
+
border-radius: ${(props) => props.isOpen ? "0.25rem 0.25rem 0px 0px" : "0.25rem"};
|
|
33446
33311
|
|
|
33447
33312
|
color: ${(props) => props.disabled ? props.theme.colors.grey2 : props.theme.colors.text};
|
|
33448
33313
|
|
|
33449
33314
|
background-color: ${(props) => props.theme.colors.grey1};
|
|
33450
|
-
border: none;
|
|
33451
|
-
border-radius: ${(props) => props.isOpen ? "0.25rem 0.25rem 0px 0px" : "0.25rem"};
|
|
33452
33315
|
|
|
33453
33316
|
:hover {
|
|
33454
33317
|
background-color: ${(props) => props.disabled ? props.theme.colors.grey1 : props.theme.colors.grey2};
|
|
@@ -33465,6 +33328,7 @@
|
|
|
33465
33328
|
height: 100%;
|
|
33466
33329
|
margin-right: 0.5rem;
|
|
33467
33330
|
padding: 0;
|
|
33331
|
+
border: none;
|
|
33468
33332
|
|
|
33469
33333
|
font-size: ${(props) => props.size ? `${props.size}rem` : props.theme.font.size};
|
|
33470
33334
|
font-weight: 300;
|
|
@@ -33474,7 +33338,6 @@
|
|
|
33474
33338
|
white-space: nowrap;
|
|
33475
33339
|
|
|
33476
33340
|
background-color: transparent;
|
|
33477
|
-
border: none;
|
|
33478
33341
|
outline: 0;
|
|
33479
33342
|
|
|
33480
33343
|
:disabled {
|
|
@@ -33489,8 +33352,9 @@
|
|
|
33489
33352
|
display: flex;
|
|
33490
33353
|
flex-direction: column;
|
|
33491
33354
|
|
|
33492
|
-
background-color: ${(props) => props.theme.colors.blue1};
|
|
33493
33355
|
border-radius: 4px;
|
|
33356
|
+
|
|
33357
|
+
background-color: ${(props) => props.theme.colors.blue1};
|
|
33494
33358
|
outline: none;
|
|
33495
33359
|
box-shadow: rgb(0 0 0 / 10%) 0 2px 5px;
|
|
33496
33360
|
|
|
@@ -33542,14 +33406,14 @@
|
|
|
33542
33406
|
min-width: 160px;
|
|
33543
33407
|
height: fit-content;
|
|
33544
33408
|
padding: 5px 8px;
|
|
33409
|
+
border: none;
|
|
33410
|
+
border-radius: 4px;
|
|
33545
33411
|
|
|
33546
33412
|
font-size: 0.9rem;
|
|
33547
33413
|
color: ${(props) => props.theme.colors.text};
|
|
33548
33414
|
white-space: nowrap;
|
|
33549
33415
|
|
|
33550
33416
|
background-color: ${(props) => props.theme.colors.blue1};
|
|
33551
|
-
border: none;
|
|
33552
|
-
border-radius: 4px;
|
|
33553
33417
|
box-shadow: none;
|
|
33554
33418
|
|
|
33555
33419
|
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
@@ -38563,10 +38427,10 @@
|
|
|
38563
38427
|
width: 100%;
|
|
38564
38428
|
height: 100%;
|
|
38565
38429
|
padding: 0 0.5rem 0 1rem;
|
|
38430
|
+
border: none;
|
|
38566
38431
|
|
|
38567
38432
|
font-size: ${(props) => props.theme.font.size};
|
|
38568
38433
|
|
|
38569
|
-
border: none;
|
|
38570
38434
|
outline: 0;
|
|
38571
38435
|
|
|
38572
38436
|
:not(:enabled) {
|
|
@@ -38577,12 +38441,12 @@
|
|
|
38577
38441
|
|
|
38578
38442
|
width: 100%;
|
|
38579
38443
|
padding: 0 0.25rem;
|
|
38444
|
+
border-radius: 0.25rem;
|
|
38580
38445
|
|
|
38581
38446
|
font-size: 0.875rem;
|
|
38582
38447
|
color: ${(props) => props.theme.colors.text};
|
|
38583
38448
|
|
|
38584
38449
|
background-color: ${(props) => props.theme.colors.grey1};
|
|
38585
|
-
border-radius: 0.25rem;
|
|
38586
38450
|
|
|
38587
38451
|
:hover:enabled {
|
|
38588
38452
|
background-color: ${(props) => props.theme.colors.grey2};
|
|
@@ -38613,6 +38477,7 @@
|
|
|
38613
38477
|
width: 100%;
|
|
38614
38478
|
min-height: 2rem;
|
|
38615
38479
|
padding: 0.25rem 1.5rem;
|
|
38480
|
+
border-radius: 0.25rem;
|
|
38616
38481
|
|
|
38617
38482
|
font-size: 0.75rem;
|
|
38618
38483
|
font-weight: 300;
|
|
@@ -38625,7 +38490,6 @@
|
|
|
38625
38490
|
if (props.isHighlighted) return props.theme.colors.grey2;
|
|
38626
38491
|
return props.theme.colors.grey1;
|
|
38627
38492
|
}};
|
|
38628
|
-
border-radius: 0.25rem;
|
|
38629
38493
|
|
|
38630
38494
|
:hover {
|
|
38631
38495
|
background-color: ${(props) => props.isSelected ? props.theme.colors.primary : props.theme.colors.grey2};
|
|
@@ -38654,6 +38518,9 @@
|
|
|
38654
38518
|
children: item.label
|
|
38655
38519
|
}));
|
|
38656
38520
|
});
|
|
38521
|
+
function getMaxItems(maxItems) {
|
|
38522
|
+
return maxItems || 5;
|
|
38523
|
+
}
|
|
38657
38524
|
var StyledDropdownList = react.memo(dist_default(dropdown_list_default)`
|
|
38658
38525
|
overflow-y: auto;
|
|
38659
38526
|
display: ${(props) => props.isOpen ? "flex" : "none"};
|
|
@@ -38662,12 +38529,13 @@
|
|
|
38662
38529
|
|
|
38663
38530
|
width: 16.25rem;
|
|
38664
38531
|
max-height: calc(
|
|
38665
|
-
${(props) => (props.maxItems
|
|
38532
|
+
${(props) => getMaxItems(props.maxItems) * 2}em + 2px + (${(props) => getMaxItems(props.maxItems) - 1}) *
|
|
38533
|
+
0.125em
|
|
38666
38534
|
);
|
|
38667
38535
|
margin-left: ${(props) => props.displacement}rem;
|
|
38536
|
+
border: none;
|
|
38668
38537
|
|
|
38669
38538
|
background-color: ${(props) => props.theme.colors.grey1};
|
|
38670
|
-
border: none;
|
|
38671
38539
|
box-shadow: none;
|
|
38672
38540
|
`);
|
|
38673
38541
|
var DatepickerSelectButtonPrimary = react.memo(({ disabled, getToggleButtonProps, setReference, getReferenceProps, size, isOpen, selectedItem }) => (0, import_jsx_runtime.jsxs)(SelectButtonPrimary, Object.assign({ disabled }, getToggleButtonProps({
|
|
@@ -38835,12 +38703,12 @@
|
|
|
38835
38703
|
.react-datepicker {
|
|
38836
38704
|
width: 16.45rem;
|
|
38837
38705
|
height: 18.5rem;
|
|
38706
|
+
border: 1px solid ${(props) => props.theme.colors.grey1};
|
|
38838
38707
|
|
|
38839
38708
|
font-family: Manrope, sans-serif;
|
|
38840
38709
|
font-size: 0.75rem;
|
|
38841
38710
|
|
|
38842
38711
|
background-color: ${(props) => props.theme.colors.grey1};
|
|
38843
|
-
border: 1px solid ${(props) => props.theme.colors.grey1};
|
|
38844
38712
|
box-shadow: ${(props) => props.theme.shadow.light};
|
|
38845
38713
|
|
|
38846
38714
|
svg {
|
|
@@ -38872,11 +38740,11 @@
|
|
|
38872
38740
|
margin-right: 3px;
|
|
38873
38741
|
margin-left: 3px;
|
|
38874
38742
|
padding: 1.25em 0.75em 0;
|
|
38743
|
+
border: none;
|
|
38875
38744
|
|
|
38876
38745
|
color: ${(props) => props.theme.colors.text};
|
|
38877
38746
|
|
|
38878
38747
|
background-color: ${(props) => props.theme.colors.grey1};
|
|
38879
|
-
border: none;
|
|
38880
38748
|
|
|
38881
38749
|
.react-datepicker__day-names {
|
|
38882
38750
|
display: flex;
|
|
@@ -39040,15 +38908,15 @@
|
|
|
39040
38908
|
width: 8.5rem;
|
|
39041
38909
|
height: 2.5rem;
|
|
39042
38910
|
padding: 0 1rem;
|
|
38911
|
+
border: 1px solid ${(props) => props.theme.colors.grey1};
|
|
38912
|
+
border-radius: 0.25rem;
|
|
38913
|
+
border-radius: ${(props) => props.isTimeRange ? "0.25rem 0.25rem 0rem 0rem" : "0.25rem"};
|
|
39043
38914
|
|
|
39044
38915
|
font-size: 1rem;
|
|
39045
38916
|
color: ${(props) => props.disabled ? props.theme.colors.grey2 : props.theme.colors.text};
|
|
39046
38917
|
text-align: center;
|
|
39047
38918
|
|
|
39048
38919
|
background-color: ${(props) => props.theme.colors.grey1};
|
|
39049
|
-
border: 1px solid ${(props) => props.theme.colors.grey1};
|
|
39050
|
-
border-radius: 0.25rem;
|
|
39051
|
-
border-radius: ${(props) => props.isTimeRange ? "0.25rem 0.25rem 0rem 0rem" : "0.25rem"};
|
|
39052
38920
|
outline: 0;
|
|
39053
38921
|
|
|
39054
38922
|
:focus:not(:disabled) {
|
|
@@ -39082,13 +38950,12 @@
|
|
|
39082
38950
|
justify-content: center;
|
|
39083
38951
|
|
|
39084
38952
|
padding: 0.5rem;
|
|
38953
|
+
border-radius: ${(props) => props.isRange ? "0rem 0rem 0.25rem 0.25rem" : "0.25rem"};
|
|
39085
38954
|
|
|
39086
38955
|
font-size: 1rem;
|
|
39087
38956
|
color: ${(props) => props.theme.colors.text};
|
|
39088
38957
|
text-align: center;
|
|
39089
38958
|
|
|
39090
|
-
border-radius: ${(props) => props.isRange ? "0rem 0rem 0.25rem 0.25rem" : "0.25rem"};
|
|
39091
|
-
|
|
39092
38959
|
:focus:not(:disabled) {
|
|
39093
38960
|
border: 1px solid ${(props) => props.theme.colors.grey3};
|
|
39094
38961
|
}
|
|
@@ -39108,7 +38975,6 @@
|
|
|
39108
38975
|
display: block;
|
|
39109
38976
|
|
|
39110
38977
|
width: 6rem;
|
|
39111
|
-
|
|
39112
38978
|
border-top: ${(props) => props.isRange ? `1px solid ${props.theme.colors.grey2}` : "none"};
|
|
39113
38979
|
}
|
|
39114
38980
|
}
|
|
@@ -39228,7 +39094,7 @@
|
|
|
39228
39094
|
function DatePicker(props) {
|
|
39229
39095
|
var _a, _b, _c;
|
|
39230
39096
|
const value = (_a = props.value) !== null && _a !== void 0 ? _a : props.initialValue;
|
|
39231
|
-
const [selectedDate, setSelectedDate] = (0, react.useState)(value
|
|
39097
|
+
const [selectedDate, setSelectedDate] = (0, react.useState)(value !== null && value !== void 0 ? value : props.selectsRange ? [null, null] : null);
|
|
39232
39098
|
const [selectedTime, setSelectedTime] = (0, react.useState)(() => getInitialTime(value, props.selectsRange));
|
|
39233
39099
|
const formatToApply = (_b = props.dateFormat) !== null && _b !== void 0 ? _b : "dd/MM/yyyy";
|
|
39234
39100
|
const [startDate, setStartDate] = (0, react.useState)(() => getInitialDate(value, formatToApply, true));
|
|
@@ -39331,7 +39197,7 @@
|
|
|
39331
39197
|
(0, react.useEffect)(() => {
|
|
39332
39198
|
var _a;
|
|
39333
39199
|
const newValue = (_a = props.value) !== null && _a !== void 0 ? _a : props.initialValue;
|
|
39334
|
-
const newDate = newValue
|
|
39200
|
+
const newDate = newValue !== null && newValue !== void 0 ? newValue : props.selectsRange ? [null, null] : null;
|
|
39335
39201
|
if (JSON.stringify(newDate) === JSON.stringify(selectedDateRef.current)) return;
|
|
39336
39202
|
setSelectedDate(newDate);
|
|
39337
39203
|
const newTime = getInitialTime(newValue, props.selectsRange);
|
|
@@ -39460,6 +39326,7 @@
|
|
|
39460
39326
|
|
|
39461
39327
|
width: 10px;
|
|
39462
39328
|
height: 10px;
|
|
39329
|
+
border-radius: 5px;
|
|
39463
39330
|
|
|
39464
39331
|
color: ${(props) => {
|
|
39465
39332
|
var _a;
|
|
@@ -39470,7 +39337,6 @@
|
|
|
39470
39337
|
var _a;
|
|
39471
39338
|
return (_a = props.$grey4) !== null && _a !== void 0 ? _a : props.theme.colors.grey4;
|
|
39472
39339
|
}};
|
|
39473
|
-
border-radius: 5px;
|
|
39474
39340
|
|
|
39475
39341
|
animation: dot-flashing 1s infinite linear alternate;
|
|
39476
39342
|
animation-delay: 0.5s;
|
|
@@ -39488,6 +39354,7 @@
|
|
|
39488
39354
|
|
|
39489
39355
|
width: 10px;
|
|
39490
39356
|
height: 10px;
|
|
39357
|
+
border-radius: 5px;
|
|
39491
39358
|
|
|
39492
39359
|
color: ${(props) => {
|
|
39493
39360
|
var _a;
|
|
@@ -39498,7 +39365,6 @@
|
|
|
39498
39365
|
var _a;
|
|
39499
39366
|
return (_a = props.$grey4) !== null && _a !== void 0 ? _a : props.theme.colors.grey4;
|
|
39500
39367
|
}};
|
|
39501
|
-
border-radius: 5px;
|
|
39502
39368
|
|
|
39503
39369
|
animation: dot-flashing 1s infinite alternate;
|
|
39504
39370
|
animation-delay: 0s;
|
|
@@ -39509,6 +39375,7 @@
|
|
|
39509
39375
|
|
|
39510
39376
|
width: 10px;
|
|
39511
39377
|
height: 10px;
|
|
39378
|
+
border-radius: 5px;
|
|
39512
39379
|
|
|
39513
39380
|
color: ${(props) => {
|
|
39514
39381
|
var _a;
|
|
@@ -39519,7 +39386,6 @@
|
|
|
39519
39386
|
var _a;
|
|
39520
39387
|
return (_a = props.$grey4) !== null && _a !== void 0 ? _a : props.theme.colors.grey4;
|
|
39521
39388
|
}};
|
|
39522
|
-
border-radius: 5px;
|
|
39523
39389
|
|
|
39524
39390
|
animation: dot-flashing 1s infinite alternate;
|
|
39525
39391
|
animation-delay: 1s;
|
|
@@ -40632,12 +40498,11 @@
|
|
|
40632
40498
|
justify-content: center;
|
|
40633
40499
|
|
|
40634
40500
|
margin-top: 20px;
|
|
40635
|
-
|
|
40636
|
-
color: ${(props) => props.theme.colors.text};
|
|
40637
|
-
|
|
40638
40501
|
border: 1px dashed ${(props) => props.isDragActive ? props.theme.colors.primary : props.theme.colors.grey3};
|
|
40639
40502
|
border-radius: 0.25rem;
|
|
40640
40503
|
|
|
40504
|
+
color: ${(props) => props.theme.colors.text};
|
|
40505
|
+
|
|
40641
40506
|
:hover {
|
|
40642
40507
|
background-color: ${(props) => props.theme.colors.grey1};
|
|
40643
40508
|
}
|
|
@@ -40776,10 +40641,9 @@
|
|
|
40776
40641
|
width: 0.9rem;
|
|
40777
40642
|
height: 0.8rem;
|
|
40778
40643
|
margin-right: 0.1rem;
|
|
40644
|
+
border-bottom: thin solid ${(props) => props.theme.colors.grey6};
|
|
40779
40645
|
|
|
40780
40646
|
vertical-align: top;
|
|
40781
|
-
|
|
40782
|
-
border-bottom: thin solid ${(props) => props.theme.colors.grey6};
|
|
40783
40647
|
}
|
|
40784
40648
|
|
|
40785
40649
|
&:last-child {
|
|
@@ -40913,11 +40777,11 @@
|
|
|
40913
40777
|
max-height: 80vh;
|
|
40914
40778
|
margin-top: ${(props) => props.render ? 0 : "-50px"};
|
|
40915
40779
|
padding: 1.75rem;
|
|
40780
|
+
border-radius: 0.25rem;
|
|
40916
40781
|
|
|
40917
40782
|
font-size: ${(props) => props.theme.font.size};
|
|
40918
40783
|
|
|
40919
40784
|
background-color: ${(props) => props.theme.colors.grey1};
|
|
40920
|
-
border-radius: 0.25rem;
|
|
40921
40785
|
box-shadow: ${(props) => props.theme.shadow.medium};
|
|
40922
40786
|
|
|
40923
40787
|
transition: margin-top ease-in 0.1s;
|
|
@@ -40929,11 +40793,15 @@
|
|
|
40929
40793
|
justify-content: space-between;
|
|
40930
40794
|
margin-top: 1rem;
|
|
40931
40795
|
`;
|
|
40796
|
+
function getFlexDirection(flexDirection) {
|
|
40797
|
+
if (flexDirection) return flexDirection;
|
|
40798
|
+
return "column";
|
|
40799
|
+
}
|
|
40932
40800
|
/** Arranges the modal header and adds some space below it */
|
|
40933
40801
|
var ModalHeader = dist_default.div`
|
|
40934
40802
|
display: flex;
|
|
40935
40803
|
flex: 0 0 auto;
|
|
40936
|
-
flex-direction: ${(props) => props.flexDirection
|
|
40804
|
+
flex-direction: ${(props) => getFlexDirection(props.flexDirection)};
|
|
40937
40805
|
justify-content: space-between;
|
|
40938
40806
|
|
|
40939
40807
|
margin-bottom: 1rem;
|
|
@@ -40961,7 +40829,6 @@
|
|
|
40961
40829
|
width: 100%;
|
|
40962
40830
|
max-width: ${(props) => props.maxWidth};
|
|
40963
40831
|
max-height: ${(props) => props.maxRows * 2.5}rem;
|
|
40964
|
-
|
|
40965
40832
|
border-radius: ${(props) => props.isOpen ? "0.25rem 0.25rem 0rem 0rem" : "0.25rem"};
|
|
40966
40833
|
`;
|
|
40967
40834
|
var InputWrapper$3 = dist_default.div`
|
|
@@ -40975,12 +40842,12 @@
|
|
|
40975
40842
|
min-height: 2.5rem;
|
|
40976
40843
|
margin-right: 0.25rem;
|
|
40977
40844
|
padding: 0.25rem 0.5rem 0.25rem 1rem;
|
|
40845
|
+
border: none;
|
|
40846
|
+
border-radius: ${(props) => props.isOpen ? "0.25rem 0.25rem 0rem 0rem" : "0.25rem"};
|
|
40978
40847
|
|
|
40979
40848
|
color: ${(props) => props.isDisabled ? props.theme.colors.grey2 : props.theme.colors.text};
|
|
40980
40849
|
|
|
40981
40850
|
background-color: ${(props) => props.theme.colors.grey1};
|
|
40982
|
-
border: none;
|
|
40983
|
-
border-radius: ${(props) => props.isOpen ? "0.25rem 0.25rem 0rem 0rem" : "0.25rem"};
|
|
40984
40851
|
|
|
40985
40852
|
:hover {
|
|
40986
40853
|
background-color: ${(props) => props.isDisabled ? props.theme.colors.grey1 : props.theme.colors.grey2};
|
|
@@ -41015,6 +40882,7 @@
|
|
|
41015
40882
|
|
|
41016
40883
|
margin-right: 0.5rem;
|
|
41017
40884
|
padding: 0;
|
|
40885
|
+
border: none;
|
|
41018
40886
|
|
|
41019
40887
|
font-size: ${(props) => props.size ? `${props.size}rem` : props.theme.font.size};
|
|
41020
40888
|
font-weight: 300;
|
|
@@ -41024,7 +40892,6 @@
|
|
|
41024
40892
|
white-space: nowrap;
|
|
41025
40893
|
|
|
41026
40894
|
background-color: transparent;
|
|
41027
|
-
border: none;
|
|
41028
40895
|
outline: 0;
|
|
41029
40896
|
|
|
41030
40897
|
:disabled {
|
|
@@ -41049,13 +40916,13 @@
|
|
|
41049
40916
|
|
|
41050
40917
|
height: ${tagHeight}rem;
|
|
41051
40918
|
padding: 0 0.75rem;
|
|
40919
|
+
border: 1px solid ${(props) => props.theme.colors.primary};
|
|
40920
|
+
border-radius: 1rem;
|
|
41052
40921
|
|
|
41053
40922
|
font-size: 0.875rem;
|
|
41054
40923
|
color: ${(props) => props.disabled ? props.theme.colors.grey3 : props.theme.colors.text};
|
|
41055
40924
|
|
|
41056
40925
|
background-color: ${(props) => props.disabled ? props.theme.colors.grey3 : props.theme.colors.blue3};
|
|
41057
|
-
border: 1px solid ${(props) => props.theme.colors.primary};
|
|
41058
|
-
border-radius: 1rem;
|
|
41059
40926
|
|
|
41060
40927
|
svg {
|
|
41061
40928
|
width: 0.85rem;
|
|
@@ -41111,7 +40978,6 @@
|
|
|
41111
40978
|
width: 100%;
|
|
41112
40979
|
min-width: 4rem;
|
|
41113
40980
|
height: 2.5rem;
|
|
41114
|
-
|
|
41115
40981
|
border-radius: ${(props) => props.isOpen ? "0.25rem 0.25rem 0rem 0rem" : "0.25rem"};
|
|
41116
40982
|
|
|
41117
40983
|
${(props) => {
|
|
@@ -41138,13 +41004,13 @@
|
|
|
41138
41004
|
width: 100%;
|
|
41139
41005
|
height: 100%;
|
|
41140
41006
|
padding: 0 0.5rem 0 1rem;
|
|
41007
|
+
border: none;
|
|
41008
|
+
border-radius: ${(props) => props.isOpen ? "0.25rem 0.25rem 0rem 0rem" : "0.25rem"};
|
|
41141
41009
|
|
|
41142
41010
|
font-size: 1rem;
|
|
41143
41011
|
color: ${(props) => props.theme.colors.text};
|
|
41144
41012
|
|
|
41145
41013
|
background-color: ${(props) => props.theme.colors.grey1};
|
|
41146
|
-
border: none;
|
|
41147
|
-
border-radius: ${(props) => props.isOpen ? "0.25rem 0.25rem 0rem 0rem" : "0.25rem"};
|
|
41148
41014
|
outline: 0;
|
|
41149
41015
|
|
|
41150
41016
|
:not(:enabled) {
|
|
@@ -41304,12 +41170,12 @@
|
|
|
41304
41170
|
|
|
41305
41171
|
input {
|
|
41306
41172
|
width: ${(props) => props.showTwoInputs ? "106px" : "100%"};
|
|
41307
|
-
background-color: ${(props) => props.theme.colors.background};
|
|
41308
41173
|
border: 1px solid ${(props) => props.showError ? props.theme.colors.error : props.theme.colors.background};
|
|
41174
|
+
background-color: ${(props) => props.theme.colors.background};
|
|
41309
41175
|
|
|
41310
41176
|
:hover:not(:disabled) {
|
|
41311
|
-
background-color: ${(props) => props.theme.colors.background};
|
|
41312
41177
|
border: 1px solid ${(props) => props.showError ? props.theme.colors.error : props.theme.colors.grey3};
|
|
41178
|
+
background-color: ${(props) => props.theme.colors.background};
|
|
41313
41179
|
}
|
|
41314
41180
|
|
|
41315
41181
|
:active:not(:disabled),
|
|
@@ -41465,7 +41331,6 @@
|
|
|
41465
41331
|
|
|
41466
41332
|
box-sizing: border-box;
|
|
41467
41333
|
padding: 0.25rem 0;
|
|
41468
|
-
|
|
41469
41334
|
border-radius: 0 0.25rem 0.25rem 0;
|
|
41470
41335
|
`;
|
|
41471
41336
|
var StepperButton = dist_default(button_default)`
|
|
@@ -41552,11 +41417,11 @@
|
|
|
41552
41417
|
width: 22ch;
|
|
41553
41418
|
height: 2.5rem;
|
|
41554
41419
|
padding-right: 0.5rem;
|
|
41555
|
-
|
|
41556
|
-
background-color: ${(props) => props.theme.colors.grey1};
|
|
41557
41420
|
border: 1px solid ${(props) => props.errorMsg ? props.theme.colors.error : props.theme.colors.grey1};
|
|
41558
41421
|
border-radius: 0.25rem;
|
|
41559
41422
|
|
|
41423
|
+
background-color: ${(props) => props.theme.colors.grey1};
|
|
41424
|
+
|
|
41560
41425
|
input {
|
|
41561
41426
|
height: calc(2.5rem - 2px);
|
|
41562
41427
|
border: none;
|
|
@@ -41614,7 +41479,7 @@
|
|
|
41614
41479
|
* @param integerOnly whether to limit the input to only accept integers
|
|
41615
41480
|
*/
|
|
41616
41481
|
var numericFilter = (integerOnly) => (e) => {
|
|
41617
|
-
if (parseInt(e.key) || parseInt(e.key) === 0) return true;
|
|
41482
|
+
if (parseInt(e.key, 10) || parseInt(e.key, 10) === 0) return true;
|
|
41618
41483
|
if (CONTROL_KEYS.includes(e.key)) return true;
|
|
41619
41484
|
const target = e.target;
|
|
41620
41485
|
if (!integerOnly && e.key === Key.PERIOD && !target.value.includes(Key.PERIOD)) return true;
|
|
@@ -41673,7 +41538,7 @@
|
|
|
41673
41538
|
if (e.key === Key.DOWN) step(stepSkip * -1);
|
|
41674
41539
|
};
|
|
41675
41540
|
const handleOnChange = (0, react.useCallback)((v, e) => {
|
|
41676
|
-
const parsed = props.integerOnly ? parseInt(v) : parseFloat(v);
|
|
41541
|
+
const parsed = props.integerOnly ? parseInt(v, 10) : parseFloat(v);
|
|
41677
41542
|
if (value === void 0) {
|
|
41678
41543
|
setInput(v);
|
|
41679
41544
|
onChange === null || onChange === void 0 || onChange(parsed, e);
|
|
@@ -41776,11 +41641,11 @@
|
|
|
41776
41641
|
max-height: 100%;
|
|
41777
41642
|
margin: 2rem;
|
|
41778
41643
|
padding: 1rem;
|
|
41644
|
+
border-radius: 0.25rem;
|
|
41779
41645
|
|
|
41780
41646
|
color: ${(props) => props.theme.colors.text};
|
|
41781
41647
|
|
|
41782
41648
|
background-color: ${(props) => props.theme.colors.grey1};
|
|
41783
|
-
border-radius: 0.25rem;
|
|
41784
41649
|
`;
|
|
41785
41650
|
var Card$1 = dist_default.div`
|
|
41786
41651
|
cursor: pointer;
|
|
@@ -41794,12 +41659,12 @@
|
|
|
41794
41659
|
|
|
41795
41660
|
margin: 1rem;
|
|
41796
41661
|
padding: 1rem;
|
|
41662
|
+
border: ${(props) => `2px solid ${props.selected ? props.theme.colors.primary : "transparent"}`};
|
|
41663
|
+
border-radius: 0.25rem;
|
|
41797
41664
|
|
|
41798
41665
|
text-align: center;
|
|
41799
41666
|
|
|
41800
41667
|
background-color: ${(props) => props.theme.colors.blue1};
|
|
41801
|
-
border: ${(props) => `2px solid ${props.selected ? props.theme.colors.primary : "transparent"}`};
|
|
41802
|
-
border-radius: 0.25rem;
|
|
41803
41668
|
|
|
41804
41669
|
:hover {
|
|
41805
41670
|
border: ${(props) => `2px solid ${props.selected ? props.theme.colors.primary : props.theme.colors.grey3}`};
|
|
@@ -42224,19 +42089,23 @@
|
|
|
42224
42089
|
|
|
42225
42090
|
width: 100%;
|
|
42226
42091
|
height: ${(props) => props.small ? "0.5rem" : "1rem"};
|
|
42092
|
+
border-radius: ${(props) => props.small ? "0.25rem" : "0.5rem"};
|
|
42227
42093
|
|
|
42228
42094
|
background-color: ${(props) => props.theme.colors.grey2};
|
|
42229
|
-
border-radius: ${(props) => props.small ? "0.25rem" : "0.5rem"};
|
|
42230
42095
|
`;
|
|
42096
|
+
function getBarColor(color, fallback) {
|
|
42097
|
+
if (color) return color;
|
|
42098
|
+
return fallback;
|
|
42099
|
+
}
|
|
42231
42100
|
var Bar = dist_default.div`
|
|
42232
42101
|
position: absolute;
|
|
42233
42102
|
|
|
42234
42103
|
overflow: ${(props) => props.multi ? "hidden" : "visible"};
|
|
42235
42104
|
|
|
42236
42105
|
height: 100%;
|
|
42237
|
-
|
|
42238
|
-
background-color: ${(props) => props.color ? props.color : props.theme.colors.primary};
|
|
42239
42106
|
border-radius: ${(props) => props.small ? "0.25rem" : "0.5rem"};
|
|
42107
|
+
|
|
42108
|
+
background-color: ${(props) => getBarColor(props.color, props.theme.colors.primary)};
|
|
42240
42109
|
`;
|
|
42241
42110
|
var Text = dist_default.span`
|
|
42242
42111
|
position: absolute;
|
|
@@ -42281,10 +42150,10 @@
|
|
|
42281
42150
|
const progresses = typeof props.progress === "number" ? [{
|
|
42282
42151
|
index: 0,
|
|
42283
42152
|
value: props.progress
|
|
42284
|
-
}] : (0, import_sortBy.default)(
|
|
42153
|
+
}] : (0, import_sortBy.default)(props.progress.map((x, i) => ({
|
|
42285
42154
|
index: i,
|
|
42286
42155
|
value: x
|
|
42287
|
-
}))
|
|
42156
|
+
})), "value").reverse();
|
|
42288
42157
|
const colors = arrayify(props.color, defaultColors.slice(0, progresses.length));
|
|
42289
42158
|
const labels = arrayify(props.label, progresses.map((x) => `${x.value}%`));
|
|
42290
42159
|
return (0, import_jsx_runtime.jsx)(Track$1, {
|
|
@@ -42338,12 +42207,11 @@
|
|
|
42338
42207
|
width: ${(props) => props.isListStyle ? "auto" : "fit-content"};
|
|
42339
42208
|
height: 2.5rem;
|
|
42340
42209
|
padding: 0 0.5rem;
|
|
42341
|
-
|
|
42342
|
-
color: ${(props) => props["aria-disabled"] ? props.theme.colors.grey3 : props.theme.colors.text};
|
|
42343
|
-
|
|
42344
42210
|
border: none;
|
|
42345
42211
|
border-radius: 0.25rem;
|
|
42346
42212
|
|
|
42213
|
+
color: ${(props) => props["aria-disabled"] ? props.theme.colors.grey3 : props.theme.colors.text};
|
|
42214
|
+
|
|
42347
42215
|
/* sets checkmark indicator */
|
|
42348
42216
|
span::after {
|
|
42349
42217
|
top: calc(0.25rem - 1px);
|
|
@@ -42351,9 +42219,9 @@
|
|
|
42351
42219
|
|
|
42352
42220
|
width: 0.5rem;
|
|
42353
42221
|
height: 0.5rem;
|
|
42222
|
+
border-radius: 50%;
|
|
42354
42223
|
|
|
42355
42224
|
background-color: ${(props) => props["aria-disabled"] ? props.theme.colors.grey3 : props.theme.colors.grey5};
|
|
42356
|
-
border-radius: 50%;
|
|
42357
42225
|
}
|
|
42358
42226
|
|
|
42359
42227
|
/* Show the checkmark when checked */
|
|
@@ -42410,11 +42278,11 @@
|
|
|
42410
42278
|
|
|
42411
42279
|
width: 1rem;
|
|
42412
42280
|
height: 1rem;
|
|
42413
|
-
|
|
42414
|
-
background-color: ${(props) => props.disabled ? props.theme.colors.grey1 : props.theme.colors.blue1};
|
|
42415
42281
|
border: 1px solid ${(props) => props.disabled ? props.theme.colors.grey2 : props.theme.colors.grey3};
|
|
42416
42282
|
border-radius: 50%;
|
|
42417
42283
|
|
|
42284
|
+
background-color: ${(props) => props.disabled ? props.theme.colors.grey1 : props.theme.colors.blue1};
|
|
42285
|
+
|
|
42418
42286
|
::after {
|
|
42419
42287
|
content: '';
|
|
42420
42288
|
position: relative;
|
|
@@ -42464,9 +42332,9 @@
|
|
|
42464
42332
|
padding: ${(props) => (props === null || props === void 0 ? void 0 : props.heading) || !props.section ? "0 0.7rem" : "0 1.5rem"};
|
|
42465
42333
|
padding-right: 0.7rem;
|
|
42466
42334
|
|
|
42335
|
+
font-size: ${(props) => props.size ? `${props.size}rem` : "1rem"};
|
|
42467
42336
|
font-weight: ${(props) => (props === null || props === void 0 ? void 0 : props.heading) ? "bold" : "normal"};
|
|
42468
42337
|
color: ${(props) => getTextColor(props === null || props === void 0 ? void 0 : props.heading, props.isSelected, props.theme)};
|
|
42469
|
-
font-size: ${(props) => props.size ? `${props.size}rem` : "1rem"};
|
|
42470
42338
|
|
|
42471
42339
|
${(props) => {
|
|
42472
42340
|
if (props.heading) return `
|
|
@@ -42499,12 +42367,14 @@
|
|
|
42499
42367
|
}, []);
|
|
42500
42368
|
}
|
|
42501
42369
|
var SectionedListItem = ({ item, index, getItemProps, isSelected, isHighlighted, size }) => {
|
|
42370
|
+
var _a;
|
|
42502
42371
|
const theme = useClTheme();
|
|
42503
|
-
const
|
|
42372
|
+
const _b = getItemProps({
|
|
42504
42373
|
index,
|
|
42505
42374
|
item
|
|
42506
|
-
}), { itemClassName } =
|
|
42375
|
+
}), { itemClassName } = _b, itemProps = __rest$3(_b, ["itemClassName"]);
|
|
42507
42376
|
if (item.heading) delete itemProps.onClick;
|
|
42377
|
+
const badgeColor = ((_a = item.badge) === null || _a === void 0 ? void 0 : _a.color) || theme.colors.primary;
|
|
42508
42378
|
return (0, import_jsx_runtime.jsxs)(ListItemSpan, Object.assign({}, itemProps, {
|
|
42509
42379
|
heading: item.heading,
|
|
42510
42380
|
section: item.section,
|
|
@@ -42515,7 +42385,7 @@
|
|
|
42515
42385
|
size,
|
|
42516
42386
|
isHighlighted,
|
|
42517
42387
|
children: [item.label || item.section, item.badge && (0, import_jsx_runtime.jsx)(Badge, {
|
|
42518
|
-
color:
|
|
42388
|
+
color: badgeColor,
|
|
42519
42389
|
children: item.badge.label
|
|
42520
42390
|
})]
|
|
42521
42391
|
}));
|
|
@@ -42574,6 +42444,7 @@
|
|
|
42574
42444
|
}
|
|
42575
42445
|
}, syncKbdHighlightIdx(setKbdHighlightIdx)), { stateReducer: (state, { changes, type }) => {
|
|
42576
42446
|
var _a, _b, _c;
|
|
42447
|
+
var _d;
|
|
42577
42448
|
if (type === stateChangeTypes.ControlledPropUpdatedSelectedItem) return Object.assign(Object.assign({}, changes), { inputValue: "" });
|
|
42578
42449
|
if (type === stateChangeTypes.InputFocus || type === stateChangeTypes.ToggleButtonClick && changes.isOpen) {
|
|
42579
42450
|
setPendingHighlight(changes.selectedItem ? props.items.findIndex((i) => i.value === changes.selectedItem.value) : 0);
|
|
@@ -42585,7 +42456,7 @@
|
|
|
42585
42456
|
stateChangeTypes.InputBlur,
|
|
42586
42457
|
stateChangeTypes.InputKeyDownEscape,
|
|
42587
42458
|
stateChangeTypes.ToggleButtonClick
|
|
42588
|
-
].includes(type)) return Object.assign(Object.assign({}, changes), { inputValue: ((_a = changes.selectedItem) === null || _a === void 0 ? void 0 : _a.label)
|
|
42459
|
+
].includes(type)) return Object.assign(Object.assign({}, changes), { inputValue: (_d = (_a = changes.selectedItem) === null || _a === void 0 ? void 0 : _a.label) !== null && _d !== void 0 ? _d : "" });
|
|
42589
42460
|
if (type === stateChangeTypes.InputKeyDownArrowUp && ((_b = items[changes.highlightedIndex]) === null || _b === void 0 ? void 0 : _b.heading)) return Object.assign(Object.assign({}, changes), { highlightedIndex: changes.highlightedIndex - 1 < 0 ? items.length - 1 : changes.highlightedIndex - 1 });
|
|
42590
42461
|
if (type === stateChangeTypes.InputKeyDownArrowDown && ((_c = items[changes.highlightedIndex]) === null || _c === void 0 ? void 0 : _c.heading)) return Object.assign(Object.assign({}, changes), { highlightedIndex: changes.highlightedIndex + 1 === items.length ? 0 : changes.highlightedIndex + 1 });
|
|
42591
42462
|
return changes;
|
|
@@ -45024,9 +44895,9 @@
|
|
|
45024
44895
|
|
|
45025
44896
|
width: 100%;
|
|
45026
44897
|
height: 0.25rem;
|
|
44898
|
+
border-radius: 0.125rem;
|
|
45027
44899
|
|
|
45028
44900
|
background-color: ${(props) => props.theme.colors.grey2};
|
|
45029
|
-
border-radius: 0.125rem;
|
|
45030
44901
|
`;
|
|
45031
44902
|
var StyledSliderThumb = dist_default($6f909507e6374d18$export$2c1b491743890dec)`
|
|
45032
44903
|
cursor: pointer;
|
|
@@ -45037,9 +44908,9 @@
|
|
|
45037
44908
|
|
|
45038
44909
|
width: 1rem;
|
|
45039
44910
|
height: 1rem;
|
|
44911
|
+
border-radius: 50%;
|
|
45040
44912
|
|
|
45041
44913
|
background-color: ${(props) => props.theme.colors.primary};
|
|
45042
|
-
border-radius: 50%;
|
|
45043
44914
|
|
|
45044
44915
|
&[data-focus-visible] {
|
|
45045
44916
|
outline: 2px solid ${(props) => props.theme.colors.primary};
|
|
@@ -45061,9 +44932,9 @@
|
|
|
45061
44932
|
transform: translateY(-50%);
|
|
45062
44933
|
|
|
45063
44934
|
height: 0.25rem;
|
|
44935
|
+
border-radius: 0.125rem;
|
|
45064
44936
|
|
|
45065
44937
|
background-color: ${(props) => props.theme.colors.primary};
|
|
45066
|
-
border-radius: 0.125rem;
|
|
45067
44938
|
`;
|
|
45068
44939
|
var TrackLabel = dist_default.span`
|
|
45069
44940
|
position: absolute;
|
|
@@ -45093,9 +44964,9 @@
|
|
|
45093
44964
|
width: 0.125rem;
|
|
45094
44965
|
height: 0.125rem;
|
|
45095
44966
|
margin-top: -0.685rem;
|
|
44967
|
+
border-radius: 50%;
|
|
45096
44968
|
|
|
45097
44969
|
background-color: ${(props) => props.theme.colors.grey3};
|
|
45098
|
-
border-radius: 50%;
|
|
45099
44970
|
}
|
|
45100
44971
|
`;
|
|
45101
44972
|
var SwapButton = dist_default(button_default).attrs({ styling: "plain" })`
|
|
@@ -45213,12 +45084,12 @@
|
|
|
45213
45084
|
padding: 0;
|
|
45214
45085
|
padding-right: ${(props) => props.enabled ? "1.75rem" : "0.5rem"};
|
|
45215
45086
|
padding-left: ${(props) => props.enabled ? "0.5rem" : "1.75rem"};
|
|
45087
|
+
border-radius: 0.75rem;
|
|
45216
45088
|
|
|
45217
45089
|
font-size: ${(props) => props.theme.font.size};
|
|
45218
45090
|
color: ${(props) => props.theme.colors.blue1};
|
|
45219
45091
|
|
|
45220
45092
|
background-color: ${(props) => props.enabled ? props.theme.colors.primary : props.theme.colors.secondary};
|
|
45221
|
-
border-radius: 0.75rem;
|
|
45222
45093
|
|
|
45223
45094
|
svg {
|
|
45224
45095
|
color: ${(props) => props.theme.colors.blue1};
|
|
@@ -45233,9 +45104,9 @@
|
|
|
45233
45104
|
|
|
45234
45105
|
width: 1.25rem;
|
|
45235
45106
|
height: 1.25rem;
|
|
45107
|
+
border-radius: 0.625rem;
|
|
45236
45108
|
|
|
45237
45109
|
background-color: ${(props) => props.theme.colors.blue1};
|
|
45238
|
-
border-radius: 0.625rem;
|
|
45239
45110
|
|
|
45240
45111
|
transition: left 100ms linear;
|
|
45241
45112
|
`;
|
|
@@ -45248,7 +45119,7 @@
|
|
|
45248
45119
|
off: "OFF",
|
|
45249
45120
|
on: "ON"
|
|
45250
45121
|
}, lightDark = false, onChange, style, value, id }, ref) {
|
|
45251
|
-
const [enabled, setEnabled] = (0, react.useState)(value
|
|
45122
|
+
const [enabled, setEnabled] = (0, react.useState)(value !== null && value !== void 0 ? value : initialValue);
|
|
45252
45123
|
const labelIconToShow = (0, react.useMemo)(() => {
|
|
45253
45124
|
if (lightDark) return enabled ? (0, import_jsx_runtime.jsx)(Sun, {}) : (0, import_jsx_runtime.jsx)(Moon, {});
|
|
45254
45125
|
return enabled ? labels.on : labels.off;
|
|
@@ -46308,16 +46179,16 @@
|
|
|
46308
46179
|
input {
|
|
46309
46180
|
width: 6.7rem;
|
|
46310
46181
|
padding: 0;
|
|
46311
|
-
background-color: ${(props) => props.theme.colors.background};
|
|
46312
46182
|
border: 1px solid ${(props) => props.theme.colors.background};
|
|
46183
|
+
background-color: ${(props) => props.theme.colors.background};
|
|
46313
46184
|
|
|
46314
46185
|
::after {
|
|
46315
46186
|
width: 5rem;
|
|
46316
46187
|
}
|
|
46317
46188
|
|
|
46318
46189
|
:hover:not(:disabled) {
|
|
46319
|
-
background-color: ${(props) => props.theme.colors.background};
|
|
46320
46190
|
border: 1px solid ${(props) => props.theme.colors.grey4};
|
|
46191
|
+
background-color: ${(props) => props.theme.colors.background};
|
|
46321
46192
|
}
|
|
46322
46193
|
}
|
|
46323
46194
|
|
|
@@ -46344,9 +46215,9 @@
|
|
|
46344
46215
|
.react-datepicker {
|
|
46345
46216
|
margin-bottom: -1rem;
|
|
46346
46217
|
margin-left: -0.5rem;
|
|
46218
|
+
border: none;
|
|
46347
46219
|
|
|
46348
46220
|
background-color: ${(props) => props.theme.colors.grey1};
|
|
46349
|
-
border: none;
|
|
46350
46221
|
box-shadow: none;
|
|
46351
46222
|
|
|
46352
46223
|
/* stylelint-disable -- external classnames */
|
|
@@ -46777,7 +46648,6 @@
|
|
|
46777
46648
|
|
|
46778
46649
|
width: 1.5rem;
|
|
46779
46650
|
height: 1.5rem;
|
|
46780
|
-
|
|
46781
46651
|
border-radius: 0.25rem;
|
|
46782
46652
|
|
|
46783
46653
|
:hover {
|
|
@@ -47288,10 +47158,10 @@
|
|
|
47288
47158
|
min-width: 80px;
|
|
47289
47159
|
height: 0.7rem;
|
|
47290
47160
|
margin: 0.5rem;
|
|
47161
|
+
border-radius: 0.5rem;
|
|
47291
47162
|
|
|
47292
47163
|
background: ${(props) => `linear-gradient(to right, ${props.theme.colors.grey2}, ${curriedTransparentize(.2, props.theme.colors.grey3)}, ${props.theme.colors.grey2});`};
|
|
47293
47164
|
background-size: 50%;
|
|
47294
|
-
border-radius: 0.5rem;
|
|
47295
47165
|
|
|
47296
47166
|
animation-name: ani-horizontal;
|
|
47297
47167
|
animation-duration: 3.5s;
|
|
@@ -47314,11 +47184,11 @@
|
|
|
47314
47184
|
|
|
47315
47185
|
min-width: 80px;
|
|
47316
47186
|
height: ${({ rowHeight }) => `${rowHeight}px`};
|
|
47187
|
+
border-bottom: 1px solid ${(props) => props.theme.colors.grey3};
|
|
47317
47188
|
|
|
47318
47189
|
color: ${(props) => props.theme.colors.grey6};
|
|
47319
47190
|
|
|
47320
47191
|
background-color: ${(props) => props.theme.colors.blue1};
|
|
47321
|
-
border-bottom: 1px solid ${(props) => props.theme.colors.grey3};
|
|
47322
47192
|
|
|
47323
47193
|
:last-child {
|
|
47324
47194
|
border-right: 0;
|
|
@@ -47383,36 +47253,36 @@
|
|
|
47383
47253
|
var _a;
|
|
47384
47254
|
return String((_a = row.original[col]) !== null && _a !== void 0 ? _a : "");
|
|
47385
47255
|
}).join("_") : void 0;
|
|
47386
|
-
return (0,
|
|
47387
|
-
key: `row-${index}`,
|
|
47256
|
+
return (0, import_jsx_runtime.jsx)(Row, Object.assign({}, restRow, {
|
|
47388
47257
|
"data-row-id": rowDataId,
|
|
47389
47258
|
onClick,
|
|
47390
47259
|
onClickRow,
|
|
47391
47260
|
style: Object.assign(Object.assign({}, rowStyle), {
|
|
47392
47261
|
top: index === 0 ? DEFAULT_ROW_HEIGHT : index * rowHeight + DEFAULT_ROW_HEIGHT,
|
|
47393
47262
|
width: totalColumnsWidth > width ? totalColumnsWidth : "100%"
|
|
47263
|
+
}),
|
|
47264
|
+
children: row.cells.map((cell, colIdx) => {
|
|
47265
|
+
var _a, _b, _c, _d, _e;
|
|
47266
|
+
const cellProps = cell.getCellProps();
|
|
47267
|
+
return (0, import_jsx_runtime.jsx)(Cell, Object.assign({}, cellProps, {
|
|
47268
|
+
rowHeight,
|
|
47269
|
+
style: Object.assign(Object.assign(Object.assign(Object.assign({}, cellProps.style), {
|
|
47270
|
+
backgroundColor,
|
|
47271
|
+
justifyContent: mappedColumns[colIdx].align,
|
|
47272
|
+
maxWidth: (_a = cell.column) === null || _a === void 0 ? void 0 : _a.maxWidth,
|
|
47273
|
+
width: cellProps.style.width === "NaNpx" ? mappedColumns[colIdx].width : cellProps.style.width
|
|
47274
|
+
}), ((_b = mappedColumns[colIdx]) === null || _b === void 0 ? void 0 : _b.sticky) === "left" && typeof ((_c = mappedColumns[colIdx]) === null || _c === void 0 ? void 0 : _c.stickyOffset) === "number" ? { left: `${mappedColumns[colIdx].stickyOffset}px` } : {}), ((_d = mappedColumns[colIdx]) === null || _d === void 0 ? void 0 : _d.sticky) === "right" && typeof ((_e = mappedColumns[colIdx]) === null || _e === void 0 ? void 0 : _e.stickyOffset) === "number" ? { right: `${mappedColumns[colIdx].stickyOffset}px` } : {}),
|
|
47275
|
+
children: (0, import_jsx_runtime.jsx)(CellContent, {
|
|
47276
|
+
hasRowHeight: rowHeight !== DEFAULT_ROW_HEIGHT,
|
|
47277
|
+
children: cell.render("Cell", {
|
|
47278
|
+
colIdx,
|
|
47279
|
+
currentEditCell,
|
|
47280
|
+
rowIdx: index
|
|
47281
|
+
})
|
|
47282
|
+
})
|
|
47283
|
+
}), `cell-${index}-${colIdx}`);
|
|
47394
47284
|
})
|
|
47395
|
-
}), row
|
|
47396
|
-
var _a, _b, _c, _d, _e;
|
|
47397
|
-
const cellProps = cell.getCellProps();
|
|
47398
|
-
return (0, react.createElement)(Cell, Object.assign({}, cellProps, {
|
|
47399
|
-
rowHeight,
|
|
47400
|
-
key: `cell-${index}-${colIdx}`,
|
|
47401
|
-
style: Object.assign(Object.assign(Object.assign(Object.assign({}, cellProps.style), {
|
|
47402
|
-
backgroundColor,
|
|
47403
|
-
justifyContent: mappedColumns[colIdx].align,
|
|
47404
|
-
maxWidth: (_a = cell.column) === null || _a === void 0 ? void 0 : _a.maxWidth,
|
|
47405
|
-
width: cellProps.style.width === "NaNpx" ? mappedColumns[colIdx].width : cellProps.style.width
|
|
47406
|
-
}), ((_b = mappedColumns[colIdx]) === null || _b === void 0 ? void 0 : _b.sticky) === "left" && typeof ((_c = mappedColumns[colIdx]) === null || _c === void 0 ? void 0 : _c.stickyOffset) === "number" ? { left: `${mappedColumns[colIdx].stickyOffset}px` } : {}), ((_d = mappedColumns[colIdx]) === null || _d === void 0 ? void 0 : _d.sticky) === "right" && typeof ((_e = mappedColumns[colIdx]) === null || _e === void 0 ? void 0 : _e.stickyOffset) === "number" ? { right: `${mappedColumns[colIdx].stickyOffset}px` } : {})
|
|
47407
|
-
}), (0, import_jsx_runtime.jsx)(CellContent, {
|
|
47408
|
-
hasRowHeight: rowHeight !== DEFAULT_ROW_HEIGHT,
|
|
47409
|
-
children: cell.render("Cell", {
|
|
47410
|
-
colIdx,
|
|
47411
|
-
currentEditCell,
|
|
47412
|
-
rowIdx: index
|
|
47413
|
-
})
|
|
47414
|
-
}));
|
|
47415
|
-
}));
|
|
47285
|
+
}), `row-${index}`);
|
|
47416
47286
|
}, arePropsEqual);
|
|
47417
47287
|
//#endregion
|
|
47418
47288
|
//#region ../ui-components/dist/table/table.js
|
|
@@ -47468,7 +47338,7 @@
|
|
|
47468
47338
|
|
|
47469
47339
|
position: sticky;
|
|
47470
47340
|
z-index: 5;
|
|
47471
|
-
inset: calc(2.5rem - 2px) 0 0
|
|
47341
|
+
inset: calc(2.5rem - 2px) 0 0;
|
|
47472
47342
|
|
|
47473
47343
|
display: block;
|
|
47474
47344
|
|
|
@@ -47601,8 +47471,8 @@
|
|
|
47601
47471
|
for (let i = 0; i < len; i++) {
|
|
47602
47472
|
const aa = a[i];
|
|
47603
47473
|
const bb = b[i];
|
|
47604
|
-
const an = parseInt(aa);
|
|
47605
|
-
const bn = parseInt(bb);
|
|
47474
|
+
const an = parseInt(aa, 10);
|
|
47475
|
+
const bn = parseInt(bb, 10);
|
|
47606
47476
|
const aIsNaN = Number.isNaN(an);
|
|
47607
47477
|
const bIsNaN = Number.isNaN(bn);
|
|
47608
47478
|
if (aIsNaN && bIsNaN) {
|
|
@@ -47650,11 +47520,11 @@
|
|
|
47650
47520
|
var appendStickyOffsets = (columns) => {
|
|
47651
47521
|
let leftOffset = 0;
|
|
47652
47522
|
let rightOffset = 0;
|
|
47653
|
-
const rightStickyColumnWidths = columns.filter((col) => col.sticky === "right").slice(1).map((col) => parseInt(col.width) || 150);
|
|
47523
|
+
const rightStickyColumnWidths = columns.filter((col) => col.sticky === "right").slice(1).map((col) => parseInt(col.width, 10) || 150);
|
|
47654
47524
|
return columns.map((col) => {
|
|
47655
47525
|
if (col.sticky === "left") {
|
|
47656
47526
|
const nextCol = Object.assign(Object.assign({}, col), { stickyOffset: leftOffset });
|
|
47657
|
-
const width = parseInt(col.width) || 150;
|
|
47527
|
+
const width = parseInt(col.width, 10) || 150;
|
|
47658
47528
|
leftOffset += width;
|
|
47659
47529
|
return nextCol;
|
|
47660
47530
|
}
|
|
@@ -47778,7 +47648,7 @@
|
|
|
47778
47648
|
return appendStickyOffsets(appendFilterComponents(orderStickyCols(processedColumns)));
|
|
47779
47649
|
}, [columns, actions]);
|
|
47780
47650
|
const hasFixedColumns = (0, react.useMemo)(() => mappedColumns.some((column) => "sticky" in column), [mappedColumns]);
|
|
47781
|
-
const totalColumnsWidth = (0, react.useMemo)(() => mappedColumns.reduce((acc, column) => acc + (parseInt(column.width) || 150), 0), [mappedColumns]);
|
|
47651
|
+
const totalColumnsWidth = (0, react.useMemo)(() => mappedColumns.reduce((acc, column) => acc + (parseInt(column.width, 10) || 150), 0), [mappedColumns]);
|
|
47782
47652
|
const filterTypes = (0, react.useMemo)(() => ({
|
|
47783
47653
|
categorical,
|
|
47784
47654
|
datetime: datetime$2,
|
|
@@ -47786,7 +47656,7 @@
|
|
|
47786
47656
|
}), []);
|
|
47787
47657
|
const { getTableProps, getTableBodyProps, headerGroups, rows, prepareRow, state: { sortBy, filters }, setAllFilters, resetResizing, allColumns } = (0, import_react_table.useTable)({
|
|
47788
47658
|
columns: mappedColumns,
|
|
47789
|
-
data: data
|
|
47659
|
+
data: data !== null && data !== void 0 ? data : infiniteData,
|
|
47790
47660
|
filterTypes,
|
|
47791
47661
|
sortTypes: { alphanumeric: caseInsensitiveAlphanumeric },
|
|
47792
47662
|
initialState: { sortBy: currentSortBy.map((sort) => Object.assign(Object.assign({}, sort), { id: mappedColumns.find((col) => [col.sortKey, col.accessor].includes(sort.id)).accessor })) },
|
|
@@ -47812,53 +47682,56 @@
|
|
|
47812
47682
|
var { children, style: tableStyle } = _a, rest = __rest$1(_a, ["children", "style"]);
|
|
47813
47683
|
return (0, import_jsx_runtime.jsxs)("div", { children: [(0, import_jsx_runtime.jsx)(Header, {
|
|
47814
47684
|
style: { width: `max(${totalColumnsWidth}px, 100%)` },
|
|
47815
|
-
children: headerGroups.map((headerGroup
|
|
47816
|
-
const
|
|
47817
|
-
|
|
47818
|
-
|
|
47819
|
-
|
|
47820
|
-
|
|
47821
|
-
|
|
47822
|
-
|
|
47823
|
-
|
|
47824
|
-
|
|
47825
|
-
|
|
47826
|
-
|
|
47827
|
-
|
|
47828
|
-
|
|
47829
|
-
|
|
47830
|
-
|
|
47831
|
-
|
|
47832
|
-
|
|
47833
|
-
|
|
47834
|
-
|
|
47835
|
-
|
|
47836
|
-
|
|
47837
|
-
|
|
47838
|
-
|
|
47839
|
-
|
|
47840
|
-
|
|
47841
|
-
|
|
47842
|
-
|
|
47843
|
-
|
|
47844
|
-
|
|
47845
|
-
|
|
47846
|
-
|
|
47847
|
-
|
|
47848
|
-
|
|
47849
|
-
|
|
47850
|
-
|
|
47851
|
-
|
|
47852
|
-
|
|
47853
|
-
|
|
47854
|
-
|
|
47855
|
-
|
|
47856
|
-
|
|
47857
|
-
|
|
47858
|
-
|
|
47859
|
-
|
|
47860
|
-
|
|
47861
|
-
}),
|
|
47685
|
+
children: headerGroups.map((headerGroup) => {
|
|
47686
|
+
const _a = headerGroup.getHeaderGroupProps(), { key: headerGroupKey } = _a, headerGroupProps = __rest$1(_a, ["key"]);
|
|
47687
|
+
return (0, import_jsx_runtime.jsx)(HeaderRow, Object.assign({}, headerGroupProps, { children: headerGroup.headers.map((col, cidx) => {
|
|
47688
|
+
const _a = col.getHeaderProps(), { key: headerCellKey } = _a, headerProps = __rest$1(_a, ["key"]);
|
|
47689
|
+
const sortProps = col.getSortByToggleProps();
|
|
47690
|
+
const headerContent = col.render("Header");
|
|
47691
|
+
const resizerProps = col.getResizerProps();
|
|
47692
|
+
const numVisibleColumns = allColumns.filter((column) => column.isVisible).length;
|
|
47693
|
+
const showSort = !col.disableSortBy;
|
|
47694
|
+
const showFilter = col.canFilter && col.filter;
|
|
47695
|
+
const showOptions = cidx === numVisibleColumns - 1 && showTableOptions;
|
|
47696
|
+
const showHeaderCellButtonContainer = Boolean(showSort) || Boolean(showFilter) || Boolean(showOptions);
|
|
47697
|
+
return (0, import_jsx_runtime.jsxs)(HeaderCell, Object.assign({}, headerProps, {
|
|
47698
|
+
style: Object.assign(Object.assign(Object.assign(Object.assign({}, headerProps.style), {
|
|
47699
|
+
maxWidth: col.maxWidth,
|
|
47700
|
+
width: headerProps.style.width === "NaNpx" ? mappedColumns[cidx].width : headerProps.style.width
|
|
47701
|
+
}), col.sticky === "left" && typeof col.stickyOffset === "number" ? { left: `${col.stickyOffset}px` } : {}), col.sticky === "right" && typeof col.stickyOffset === "number" ? { right: `${col.stickyOffset}px` } : {}),
|
|
47702
|
+
children: [(0, import_jsx_runtime.jsxs)(HeaderTooltipContainer, {
|
|
47703
|
+
isPrimitiveHeader: typeof headerContent === "string",
|
|
47704
|
+
children: [(0, import_jsx_runtime.jsx)(HeaderContentWrapper, Object.assign({}, sortProps, {
|
|
47705
|
+
isPrimitiveHeader: typeof headerContent === "string",
|
|
47706
|
+
title: typeof headerContent === "string" ? headerContent : "",
|
|
47707
|
+
children: headerContent
|
|
47708
|
+
})), col.tooltip && (0, import_jsx_runtime.jsx)(Tooltip, {
|
|
47709
|
+
content: col.tooltip,
|
|
47710
|
+
children: (0, import_jsx_runtime.jsx)(TooltipIcon, { icon: faCircleQuestion })
|
|
47711
|
+
})]
|
|
47712
|
+
}), showHeaderCellButtonContainer && (0, import_jsx_runtime.jsxs)(HeaderCellButtonContainer, { children: [(0, import_jsx_runtime.jsxs)(HeaderIconsWrapper, { children: [
|
|
47713
|
+
showSort && (0, import_jsx_runtime.jsx)(HeaderIconWrapper, { children: (0, import_jsx_runtime.jsx)(SortIcon, Object.assign({}, sortProps, {
|
|
47714
|
+
className: "tableSortArrow",
|
|
47715
|
+
icon: getSortIcon(col.isSorted, col.isSortedDesc),
|
|
47716
|
+
isSorted: col.isSorted
|
|
47717
|
+
})) }),
|
|
47718
|
+
showFilter ? (0, import_jsx_runtime.jsx)(FilterContainer, { col }) : null,
|
|
47719
|
+
showOptions && (0, import_jsx_runtime.jsx)(OptionsMenu, {
|
|
47720
|
+
allColumns,
|
|
47721
|
+
allowColumnHiding: allowHiding,
|
|
47722
|
+
numVisibleColumns,
|
|
47723
|
+
resetResizing,
|
|
47724
|
+
setAllFilters,
|
|
47725
|
+
style: tableOptionsStyle
|
|
47726
|
+
})
|
|
47727
|
+
] }), (0, import_jsx_runtime.jsx)(ResizeBorder, Object.assign({}, resizerProps))] })]
|
|
47728
|
+
}), headerCellKey);
|
|
47729
|
+
}) }), headerGroupKey);
|
|
47730
|
+
})
|
|
47731
|
+
}), (0, import_jsx_runtime.jsx)("div", Object.assign({}, tableProps, rest, {
|
|
47732
|
+
style: tableStyle,
|
|
47733
|
+
children
|
|
47734
|
+
}), "table-body-inner")] }, "table-inner");
|
|
47862
47735
|
}, useDeepCompare([
|
|
47863
47736
|
tableProps,
|
|
47864
47737
|
totalColumnsWidth,
|
|
@@ -47872,7 +47745,7 @@
|
|
|
47872
47745
|
return (0, import_jsx_runtime.jsx)(StyledFixedSizeList, {
|
|
47873
47746
|
height,
|
|
47874
47747
|
innerElementType: renderTable,
|
|
47875
|
-
itemCount: itemCount
|
|
47748
|
+
itemCount: itemCount !== null && itemCount !== void 0 ? itemCount : rows.length,
|
|
47876
47749
|
itemData: createItemData$1(width, currentEditCell, headerGroups, rows, prepareRow, getItem, totalColumnsWidth, onClickRow, throttledClickRow, backgroundColor, mappedColumns, tableRowHeight, rowDataIdColumn),
|
|
47877
47750
|
itemSize: tableRowHeight,
|
|
47878
47751
|
onItemsRendered,
|
|
@@ -47925,7 +47798,6 @@
|
|
|
47925
47798
|
flex-shrink: 0;
|
|
47926
47799
|
|
|
47927
47800
|
width: 100%;
|
|
47928
|
-
|
|
47929
47801
|
border-radius: 1rem 1rem 0 0;
|
|
47930
47802
|
`;
|
|
47931
47803
|
var TabComponent = dist_default.span`
|
|
@@ -47940,11 +47812,11 @@
|
|
|
47940
47812
|
|
|
47941
47813
|
box-sizing: border-box;
|
|
47942
47814
|
height: 2.5rem;
|
|
47815
|
+
border-bottom: ${(props) => props.selected ? `2px solid ${props.theme.colors.primary}` : `1px solid ${props.theme.colors.grey3}`};
|
|
47943
47816
|
|
|
47944
47817
|
color: ${(props) => props.selected ? props.theme.colors.primary : props.theme.colors.grey3};
|
|
47945
47818
|
|
|
47946
47819
|
background-color: ${(props) => props.theme.colors.blue1};
|
|
47947
|
-
border-bottom: ${(props) => props.selected ? `2px solid ${props.theme.colors.primary}` : `1px solid ${props.theme.colors.grey3}`};
|
|
47948
47820
|
|
|
47949
47821
|
:hover {
|
|
47950
47822
|
color: ${(props) => props.selected ? props.theme.colors.primary : props.theme.colors.text};
|
|
@@ -48046,6 +47918,12 @@
|
|
|
48046
47918
|
const end = source.endsWith("$") ? source.length - 1 : source.length;
|
|
48047
47919
|
return source.slice(start, end);
|
|
48048
47920
|
}
|
|
47921
|
+
function floatSafeRemainder(val, step) {
|
|
47922
|
+
const valDecCount = (val.toString().split(".")[1] || "").length;
|
|
47923
|
+
const stepDecCount = (step.toString().split(".")[1] || "").length;
|
|
47924
|
+
const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
|
|
47925
|
+
return Number.parseInt(val.toFixed(decCount).replace(".", "")) % Number.parseInt(step.toFixed(decCount).replace(".", "")) / 10 ** decCount;
|
|
47926
|
+
}
|
|
48049
47927
|
function defineLazy(object, key, getter) {
|
|
48050
47928
|
Object.defineProperty(object, key, {
|
|
48051
47929
|
get() {
|
|
@@ -48460,7 +48338,10 @@
|
|
|
48460
48338
|
const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
|
|
48461
48339
|
return new RegExp(`^${regex}$`);
|
|
48462
48340
|
};
|
|
48341
|
+
var integer = /^\d+$/;
|
|
48342
|
+
var number$3 = /^-?\d+(?:\.\d+)?/i;
|
|
48463
48343
|
var boolean$1 = /true|false/i;
|
|
48344
|
+
var _null$2 = /null/i;
|
|
48464
48345
|
var lowercase = /^[^A-Z]*$/;
|
|
48465
48346
|
var uppercase = /^[^a-z]*$/;
|
|
48466
48347
|
//#endregion
|
|
@@ -48471,6 +48352,140 @@
|
|
|
48471
48352
|
inst._zod.def = def;
|
|
48472
48353
|
(_a = inst._zod).onattach ?? (_a.onattach = []);
|
|
48473
48354
|
});
|
|
48355
|
+
var numericOriginMap = {
|
|
48356
|
+
number: "number",
|
|
48357
|
+
bigint: "bigint",
|
|
48358
|
+
object: "date"
|
|
48359
|
+
};
|
|
48360
|
+
var $ZodCheckLessThan = /*@__PURE__*/ $constructor("$ZodCheckLessThan", (inst, def) => {
|
|
48361
|
+
$ZodCheck.init(inst, def);
|
|
48362
|
+
const origin = numericOriginMap[typeof def.value];
|
|
48363
|
+
inst._zod.onattach.push((inst) => {
|
|
48364
|
+
const bag = inst._zod.bag;
|
|
48365
|
+
const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
|
|
48366
|
+
if (def.value < curr) if (def.inclusive) bag.maximum = def.value;
|
|
48367
|
+
else bag.exclusiveMaximum = def.value;
|
|
48368
|
+
});
|
|
48369
|
+
inst._zod.check = (payload) => {
|
|
48370
|
+
if (def.inclusive ? payload.value <= def.value : payload.value < def.value) return;
|
|
48371
|
+
payload.issues.push({
|
|
48372
|
+
origin,
|
|
48373
|
+
code: "too_big",
|
|
48374
|
+
maximum: def.value,
|
|
48375
|
+
input: payload.value,
|
|
48376
|
+
inclusive: def.inclusive,
|
|
48377
|
+
inst,
|
|
48378
|
+
continue: !def.abort
|
|
48379
|
+
});
|
|
48380
|
+
};
|
|
48381
|
+
});
|
|
48382
|
+
var $ZodCheckGreaterThan = /*@__PURE__*/ $constructor("$ZodCheckGreaterThan", (inst, def) => {
|
|
48383
|
+
$ZodCheck.init(inst, def);
|
|
48384
|
+
const origin = numericOriginMap[typeof def.value];
|
|
48385
|
+
inst._zod.onattach.push((inst) => {
|
|
48386
|
+
const bag = inst._zod.bag;
|
|
48387
|
+
const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
|
|
48388
|
+
if (def.value > curr) if (def.inclusive) bag.minimum = def.value;
|
|
48389
|
+
else bag.exclusiveMinimum = def.value;
|
|
48390
|
+
});
|
|
48391
|
+
inst._zod.check = (payload) => {
|
|
48392
|
+
if (def.inclusive ? payload.value >= def.value : payload.value > def.value) return;
|
|
48393
|
+
payload.issues.push({
|
|
48394
|
+
origin,
|
|
48395
|
+
code: "too_small",
|
|
48396
|
+
minimum: def.value,
|
|
48397
|
+
input: payload.value,
|
|
48398
|
+
inclusive: def.inclusive,
|
|
48399
|
+
inst,
|
|
48400
|
+
continue: !def.abort
|
|
48401
|
+
});
|
|
48402
|
+
};
|
|
48403
|
+
});
|
|
48404
|
+
var $ZodCheckMultipleOf = /*@__PURE__*/ $constructor("$ZodCheckMultipleOf", (inst, def) => {
|
|
48405
|
+
$ZodCheck.init(inst, def);
|
|
48406
|
+
inst._zod.onattach.push((inst) => {
|
|
48407
|
+
var _a;
|
|
48408
|
+
(_a = inst._zod.bag).multipleOf ?? (_a.multipleOf = def.value);
|
|
48409
|
+
});
|
|
48410
|
+
inst._zod.check = (payload) => {
|
|
48411
|
+
if (typeof payload.value !== typeof def.value) throw new Error("Cannot mix number and bigint in multiple_of check.");
|
|
48412
|
+
if (typeof payload.value === "bigint" ? payload.value % def.value === BigInt(0) : floatSafeRemainder(payload.value, def.value) === 0) return;
|
|
48413
|
+
payload.issues.push({
|
|
48414
|
+
origin: typeof payload.value,
|
|
48415
|
+
code: "not_multiple_of",
|
|
48416
|
+
divisor: def.value,
|
|
48417
|
+
input: payload.value,
|
|
48418
|
+
inst,
|
|
48419
|
+
continue: !def.abort
|
|
48420
|
+
});
|
|
48421
|
+
};
|
|
48422
|
+
});
|
|
48423
|
+
var $ZodCheckNumberFormat = /*@__PURE__*/ $constructor("$ZodCheckNumberFormat", (inst, def) => {
|
|
48424
|
+
$ZodCheck.init(inst, def);
|
|
48425
|
+
def.format = def.format || "float64";
|
|
48426
|
+
const isInt = def.format?.includes("int");
|
|
48427
|
+
const origin = isInt ? "int" : "number";
|
|
48428
|
+
const [minimum, maximum] = NUMBER_FORMAT_RANGES[def.format];
|
|
48429
|
+
inst._zod.onattach.push((inst) => {
|
|
48430
|
+
const bag = inst._zod.bag;
|
|
48431
|
+
bag.format = def.format;
|
|
48432
|
+
bag.minimum = minimum;
|
|
48433
|
+
bag.maximum = maximum;
|
|
48434
|
+
if (isInt) bag.pattern = integer;
|
|
48435
|
+
});
|
|
48436
|
+
inst._zod.check = (payload) => {
|
|
48437
|
+
const input = payload.value;
|
|
48438
|
+
if (isInt) {
|
|
48439
|
+
if (!Number.isInteger(input)) {
|
|
48440
|
+
payload.issues.push({
|
|
48441
|
+
expected: origin,
|
|
48442
|
+
format: def.format,
|
|
48443
|
+
code: "invalid_type",
|
|
48444
|
+
input,
|
|
48445
|
+
inst
|
|
48446
|
+
});
|
|
48447
|
+
return;
|
|
48448
|
+
}
|
|
48449
|
+
if (!Number.isSafeInteger(input)) {
|
|
48450
|
+
if (input > 0) payload.issues.push({
|
|
48451
|
+
input,
|
|
48452
|
+
code: "too_big",
|
|
48453
|
+
maximum: Number.MAX_SAFE_INTEGER,
|
|
48454
|
+
note: "Integers must be within the safe integer range.",
|
|
48455
|
+
inst,
|
|
48456
|
+
origin,
|
|
48457
|
+
continue: !def.abort
|
|
48458
|
+
});
|
|
48459
|
+
else payload.issues.push({
|
|
48460
|
+
input,
|
|
48461
|
+
code: "too_small",
|
|
48462
|
+
minimum: Number.MIN_SAFE_INTEGER,
|
|
48463
|
+
note: "Integers must be within the safe integer range.",
|
|
48464
|
+
inst,
|
|
48465
|
+
origin,
|
|
48466
|
+
continue: !def.abort
|
|
48467
|
+
});
|
|
48468
|
+
return;
|
|
48469
|
+
}
|
|
48470
|
+
}
|
|
48471
|
+
if (input < minimum) payload.issues.push({
|
|
48472
|
+
origin: "number",
|
|
48473
|
+
input,
|
|
48474
|
+
code: "too_small",
|
|
48475
|
+
minimum,
|
|
48476
|
+
inclusive: true,
|
|
48477
|
+
inst,
|
|
48478
|
+
continue: !def.abort
|
|
48479
|
+
});
|
|
48480
|
+
if (input > maximum) payload.issues.push({
|
|
48481
|
+
origin: "number",
|
|
48482
|
+
input,
|
|
48483
|
+
code: "too_big",
|
|
48484
|
+
maximum,
|
|
48485
|
+
inst
|
|
48486
|
+
});
|
|
48487
|
+
};
|
|
48488
|
+
});
|
|
48474
48489
|
var $ZodCheckMaxLength = /*@__PURE__*/ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
48475
48490
|
var _a;
|
|
48476
48491
|
$ZodCheck.init(inst, def);
|
|
@@ -49055,6 +49070,30 @@
|
|
|
49055
49070
|
});
|
|
49056
49071
|
};
|
|
49057
49072
|
});
|
|
49073
|
+
var $ZodNumber = /*@__PURE__*/ $constructor("$ZodNumber", (inst, def) => {
|
|
49074
|
+
$ZodType.init(inst, def);
|
|
49075
|
+
inst._zod.pattern = inst._zod.bag.pattern ?? number$3;
|
|
49076
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
49077
|
+
if (def.coerce) try {
|
|
49078
|
+
payload.value = Number(payload.value);
|
|
49079
|
+
} catch (_) {}
|
|
49080
|
+
const input = payload.value;
|
|
49081
|
+
if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) return payload;
|
|
49082
|
+
const received = typeof input === "number" ? Number.isNaN(input) ? "NaN" : !Number.isFinite(input) ? "Infinity" : void 0 : void 0;
|
|
49083
|
+
payload.issues.push({
|
|
49084
|
+
expected: "number",
|
|
49085
|
+
code: "invalid_type",
|
|
49086
|
+
input,
|
|
49087
|
+
inst,
|
|
49088
|
+
...received ? { received } : {}
|
|
49089
|
+
});
|
|
49090
|
+
return payload;
|
|
49091
|
+
};
|
|
49092
|
+
});
|
|
49093
|
+
var $ZodNumberFormat = /*@__PURE__*/ $constructor("$ZodNumber", (inst, def) => {
|
|
49094
|
+
$ZodCheckNumberFormat.init(inst, def);
|
|
49095
|
+
$ZodNumber.init(inst, def);
|
|
49096
|
+
});
|
|
49058
49097
|
var $ZodBoolean = /*@__PURE__*/ $constructor("$ZodBoolean", (inst, def) => {
|
|
49059
49098
|
$ZodType.init(inst, def);
|
|
49060
49099
|
inst._zod.pattern = boolean$1;
|
|
@@ -49073,6 +49112,22 @@
|
|
|
49073
49112
|
return payload;
|
|
49074
49113
|
};
|
|
49075
49114
|
});
|
|
49115
|
+
var $ZodNull = /*@__PURE__*/ $constructor("$ZodNull", (inst, def) => {
|
|
49116
|
+
$ZodType.init(inst, def);
|
|
49117
|
+
inst._zod.pattern = _null$2;
|
|
49118
|
+
inst._zod.values = /* @__PURE__ */ new Set([null]);
|
|
49119
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
49120
|
+
const input = payload.value;
|
|
49121
|
+
if (input === null) return payload;
|
|
49122
|
+
payload.issues.push({
|
|
49123
|
+
expected: "null",
|
|
49124
|
+
code: "invalid_type",
|
|
49125
|
+
input,
|
|
49126
|
+
inst
|
|
49127
|
+
});
|
|
49128
|
+
return payload;
|
|
49129
|
+
};
|
|
49130
|
+
});
|
|
49076
49131
|
var $ZodAny = /*@__PURE__*/ $constructor("$ZodAny", (inst, def) => {
|
|
49077
49132
|
$ZodType.init(inst, def);
|
|
49078
49133
|
inst._zod.parse = (payload) => payload;
|
|
@@ -50062,12 +50117,34 @@
|
|
|
50062
50117
|
...normalizeParams(params)
|
|
50063
50118
|
});
|
|
50064
50119
|
}
|
|
50120
|
+
function _number(Class, params) {
|
|
50121
|
+
return new Class({
|
|
50122
|
+
type: "number",
|
|
50123
|
+
checks: [],
|
|
50124
|
+
...normalizeParams(params)
|
|
50125
|
+
});
|
|
50126
|
+
}
|
|
50127
|
+
function _int(Class, params) {
|
|
50128
|
+
return new Class({
|
|
50129
|
+
type: "number",
|
|
50130
|
+
check: "number_format",
|
|
50131
|
+
abort: false,
|
|
50132
|
+
format: "safeint",
|
|
50133
|
+
...normalizeParams(params)
|
|
50134
|
+
});
|
|
50135
|
+
}
|
|
50065
50136
|
function _boolean(Class, params) {
|
|
50066
50137
|
return new Class({
|
|
50067
50138
|
type: "boolean",
|
|
50068
50139
|
...normalizeParams(params)
|
|
50069
50140
|
});
|
|
50070
50141
|
}
|
|
50142
|
+
function _null$1(Class, params) {
|
|
50143
|
+
return new Class({
|
|
50144
|
+
type: "null",
|
|
50145
|
+
...normalizeParams(params)
|
|
50146
|
+
});
|
|
50147
|
+
}
|
|
50071
50148
|
function _any(Class) {
|
|
50072
50149
|
return new Class({ type: "any" });
|
|
50073
50150
|
}
|
|
@@ -50080,6 +50157,45 @@
|
|
|
50080
50157
|
...normalizeParams(params)
|
|
50081
50158
|
});
|
|
50082
50159
|
}
|
|
50160
|
+
function _lt(value, params) {
|
|
50161
|
+
return new $ZodCheckLessThan({
|
|
50162
|
+
check: "less_than",
|
|
50163
|
+
...normalizeParams(params),
|
|
50164
|
+
value,
|
|
50165
|
+
inclusive: false
|
|
50166
|
+
});
|
|
50167
|
+
}
|
|
50168
|
+
function _lte(value, params) {
|
|
50169
|
+
return new $ZodCheckLessThan({
|
|
50170
|
+
check: "less_than",
|
|
50171
|
+
...normalizeParams(params),
|
|
50172
|
+
value,
|
|
50173
|
+
inclusive: true
|
|
50174
|
+
});
|
|
50175
|
+
}
|
|
50176
|
+
function _gt(value, params) {
|
|
50177
|
+
return new $ZodCheckGreaterThan({
|
|
50178
|
+
check: "greater_than",
|
|
50179
|
+
...normalizeParams(params),
|
|
50180
|
+
value,
|
|
50181
|
+
inclusive: false
|
|
50182
|
+
});
|
|
50183
|
+
}
|
|
50184
|
+
function _gte(value, params) {
|
|
50185
|
+
return new $ZodCheckGreaterThan({
|
|
50186
|
+
check: "greater_than",
|
|
50187
|
+
...normalizeParams(params),
|
|
50188
|
+
value,
|
|
50189
|
+
inclusive: true
|
|
50190
|
+
});
|
|
50191
|
+
}
|
|
50192
|
+
function _multipleOf(value, params) {
|
|
50193
|
+
return new $ZodCheckMultipleOf({
|
|
50194
|
+
check: "multiple_of",
|
|
50195
|
+
...normalizeParams(params),
|
|
50196
|
+
value
|
|
50197
|
+
});
|
|
50198
|
+
}
|
|
50083
50199
|
function _maxLength(maximum, params) {
|
|
50084
50200
|
return new $ZodCheckMaxLength({
|
|
50085
50201
|
check: "max_length",
|
|
@@ -50172,6 +50288,16 @@
|
|
|
50172
50288
|
...normalizeParams(params)
|
|
50173
50289
|
});
|
|
50174
50290
|
}
|
|
50291
|
+
function _custom(Class, fn, _params) {
|
|
50292
|
+
const norm = normalizeParams(_params);
|
|
50293
|
+
norm.abort ?? (norm.abort = true);
|
|
50294
|
+
return new Class({
|
|
50295
|
+
type: "custom",
|
|
50296
|
+
check: "custom",
|
|
50297
|
+
fn,
|
|
50298
|
+
...norm
|
|
50299
|
+
});
|
|
50300
|
+
}
|
|
50175
50301
|
function _refine(Class, fn, _params) {
|
|
50176
50302
|
return new Class({
|
|
50177
50303
|
type: "custom",
|
|
@@ -50434,6 +50560,41 @@
|
|
|
50434
50560
|
$ZodJWT.init(inst, def);
|
|
50435
50561
|
ZodStringFormat.init(inst, def);
|
|
50436
50562
|
});
|
|
50563
|
+
var ZodNumber = /*@__PURE__*/ $constructor("ZodNumber", (inst, def) => {
|
|
50564
|
+
$ZodNumber.init(inst, def);
|
|
50565
|
+
ZodType.init(inst, def);
|
|
50566
|
+
inst.gt = (value, params) => inst.check(_gt(value, params));
|
|
50567
|
+
inst.gte = (value, params) => inst.check(_gte(value, params));
|
|
50568
|
+
inst.min = (value, params) => inst.check(_gte(value, params));
|
|
50569
|
+
inst.lt = (value, params) => inst.check(_lt(value, params));
|
|
50570
|
+
inst.lte = (value, params) => inst.check(_lte(value, params));
|
|
50571
|
+
inst.max = (value, params) => inst.check(_lte(value, params));
|
|
50572
|
+
inst.int = (params) => inst.check(int(params));
|
|
50573
|
+
inst.safe = (params) => inst.check(int(params));
|
|
50574
|
+
inst.positive = (params) => inst.check(_gt(0, params));
|
|
50575
|
+
inst.nonnegative = (params) => inst.check(_gte(0, params));
|
|
50576
|
+
inst.negative = (params) => inst.check(_lt(0, params));
|
|
50577
|
+
inst.nonpositive = (params) => inst.check(_lte(0, params));
|
|
50578
|
+
inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params));
|
|
50579
|
+
inst.step = (value, params) => inst.check(_multipleOf(value, params));
|
|
50580
|
+
inst.finite = () => inst;
|
|
50581
|
+
const bag = inst._zod.bag;
|
|
50582
|
+
inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
|
|
50583
|
+
inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
|
|
50584
|
+
inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? .5);
|
|
50585
|
+
inst.isFinite = true;
|
|
50586
|
+
inst.format = bag.format ?? null;
|
|
50587
|
+
});
|
|
50588
|
+
function number$4(params) {
|
|
50589
|
+
return _number(ZodNumber, params);
|
|
50590
|
+
}
|
|
50591
|
+
var ZodNumberFormat = /*@__PURE__*/ $constructor("ZodNumberFormat", (inst, def) => {
|
|
50592
|
+
$ZodNumberFormat.init(inst, def);
|
|
50593
|
+
ZodNumber.init(inst, def);
|
|
50594
|
+
});
|
|
50595
|
+
function int(params) {
|
|
50596
|
+
return _int(ZodNumberFormat, params);
|
|
50597
|
+
}
|
|
50437
50598
|
var ZodBoolean = /*@__PURE__*/ $constructor("ZodBoolean", (inst, def) => {
|
|
50438
50599
|
$ZodBoolean.init(inst, def);
|
|
50439
50600
|
ZodType.init(inst, def);
|
|
@@ -50441,6 +50602,13 @@
|
|
|
50441
50602
|
function boolean(params) {
|
|
50442
50603
|
return _boolean(ZodBoolean, params);
|
|
50443
50604
|
}
|
|
50605
|
+
var ZodNull = /*@__PURE__*/ $constructor("ZodNull", (inst, def) => {
|
|
50606
|
+
$ZodNull.init(inst, def);
|
|
50607
|
+
ZodType.init(inst, def);
|
|
50608
|
+
});
|
|
50609
|
+
function _null(params) {
|
|
50610
|
+
return _null$1(ZodNull, params);
|
|
50611
|
+
}
|
|
50444
50612
|
var ZodAny = /*@__PURE__*/ $constructor("ZodAny", (inst, def) => {
|
|
50445
50613
|
$ZodAny.init(inst, def);
|
|
50446
50614
|
ZodType.init(inst, def);
|
|
@@ -50770,6 +50938,9 @@
|
|
|
50770
50938
|
ch._zod.check = fn;
|
|
50771
50939
|
return ch;
|
|
50772
50940
|
}
|
|
50941
|
+
function custom$4(fn, _params) {
|
|
50942
|
+
return _custom(ZodCustom, fn ?? (() => true), _params);
|
|
50943
|
+
}
|
|
50773
50944
|
function refine(fn, _params = {}) {
|
|
50774
50945
|
return _refine(ZodCustom, fn, _params);
|
|
50775
50946
|
}
|
|
@@ -51522,6 +51693,17 @@
|
|
|
51522
51693
|
//#endregion
|
|
51523
51694
|
//#region js/api/http.tsx
|
|
51524
51695
|
var import_cloneDeep = /* @__PURE__ */ __toESM(require_cloneDeep(), 1);
|
|
51696
|
+
var signalIds = /* @__PURE__ */ new WeakMap();
|
|
51697
|
+
var nextSignalId = 1;
|
|
51698
|
+
function getSignalId(signal) {
|
|
51699
|
+
let id = signalIds.get(signal);
|
|
51700
|
+
if (id === void 0) {
|
|
51701
|
+
id = nextSignalId;
|
|
51702
|
+
nextSignalId += 1;
|
|
51703
|
+
signalIds.set(signal, id);
|
|
51704
|
+
}
|
|
51705
|
+
return id;
|
|
51706
|
+
}
|
|
51525
51707
|
/**
|
|
51526
51708
|
* Serializable form of RequestExtras.
|
|
51527
51709
|
* Required to use for e.g. recoil params as they need to be serializable.
|
|
@@ -51550,6 +51732,10 @@
|
|
|
51550
51732
|
toJSON() {
|
|
51551
51733
|
const serializable = this.toSerializable();
|
|
51552
51734
|
if (!serializable) return null;
|
|
51735
|
+
if (this.extras.signal) return JSON.stringify({
|
|
51736
|
+
...serializable,
|
|
51737
|
+
signal: getSignalId(this.extras.signal)
|
|
51738
|
+
});
|
|
51553
51739
|
return JSON.stringify(serializable);
|
|
51554
51740
|
}
|
|
51555
51741
|
};
|
|
@@ -52678,12 +52864,12 @@
|
|
|
52678
52864
|
width: 22rem;
|
|
52679
52865
|
height: ${(props) => props.hasTitle ? "5.625rem" : "4.375rem"};
|
|
52680
52866
|
padding: 1rem;
|
|
52867
|
+
border: 1px solid ${(props) => getStatusColor(props.status, props.theme.colors)};
|
|
52868
|
+
border-radius: 0.25rem;
|
|
52681
52869
|
|
|
52682
52870
|
color: ${(props) => getStatusColor(props.status, props.theme.colors)};
|
|
52683
52871
|
|
|
52684
52872
|
background-color: ${(props) => mix$1(.1, getStatusColor(props.status, props.theme.colors), props.theme.colors.background)};
|
|
52685
|
-
border: 1px solid ${(props) => getStatusColor(props.status, props.theme.colors)};
|
|
52686
|
-
border-radius: 0.25rem;
|
|
52687
52873
|
box-shadow: 0 2px 4px rgb(0 0 0 / 10%);
|
|
52688
52874
|
`;
|
|
52689
52875
|
var Message = dist_default.div`
|
|
@@ -52699,23 +52885,21 @@
|
|
|
52699
52885
|
overflow: hidden;
|
|
52700
52886
|
display: -webkit-box; /* stylelint-disable-line value-no-vendor-prefix */
|
|
52701
52887
|
-webkit-box-orient: vertical;
|
|
52888
|
+
-webkit-line-clamp: 1;
|
|
52702
52889
|
|
|
52703
52890
|
font-size: 1rem;
|
|
52704
52891
|
font-weight: 700;
|
|
52705
52892
|
text-overflow: ellipsis;
|
|
52706
|
-
|
|
52707
|
-
-webkit-line-clamp: 1;
|
|
52708
52893
|
`;
|
|
52709
52894
|
var Body = dist_default.span`
|
|
52710
52895
|
overflow: hidden;
|
|
52711
52896
|
display: -webkit-box; /* stylelint-disable-line value-no-vendor-prefix */
|
|
52712
52897
|
-webkit-box-orient: vertical;
|
|
52898
|
+
-webkit-line-clamp: ${(props) => props.moreDetailsShown ? 1 : 2};
|
|
52713
52899
|
|
|
52714
52900
|
font-weight: 400;
|
|
52715
52901
|
line-height: 1.25rem;
|
|
52716
52902
|
text-overflow: ellipsis;
|
|
52717
|
-
|
|
52718
|
-
-webkit-line-clamp: ${(props) => props.moreDetailsShown ? 1 : 2};
|
|
52719
52903
|
`;
|
|
52720
52904
|
var Icon$1 = dist_default.div`
|
|
52721
52905
|
display: flex;
|
|
@@ -52732,11 +52916,11 @@
|
|
|
52732
52916
|
display: flex;
|
|
52733
52917
|
|
|
52734
52918
|
padding-left: 0;
|
|
52919
|
+
border: none;
|
|
52735
52920
|
|
|
52736
52921
|
color: ${() => theme.colors.grey4};
|
|
52737
52922
|
|
|
52738
52923
|
background: transparent;
|
|
52739
|
-
border: none;
|
|
52740
52924
|
|
|
52741
52925
|
:hover {
|
|
52742
52926
|
text-decoration: underline;
|
|
@@ -68607,29 +68791,159 @@
|
|
|
68607
68791
|
this.task_id = task_id;
|
|
68608
68792
|
}
|
|
68609
68793
|
};
|
|
68794
|
+
var initMessageSchema = object$4({
|
|
68795
|
+
message: object$4({ channel: string$4() }),
|
|
68796
|
+
type: literal$4("init")
|
|
68797
|
+
});
|
|
68798
|
+
var pingPongMessageSchema = object$4({
|
|
68799
|
+
message: _null(),
|
|
68800
|
+
type: union$4([literal$4("ping"), literal$4("pong")])
|
|
68801
|
+
});
|
|
68802
|
+
var taskNotificationContentSchema = discriminatedUnion("status", [
|
|
68803
|
+
object$4({
|
|
68804
|
+
status: literal$4("COMPLETE"),
|
|
68805
|
+
task_id: string$4()
|
|
68806
|
+
}).passthrough(),
|
|
68807
|
+
object$4({
|
|
68808
|
+
status: literal$4("ERROR"),
|
|
68809
|
+
task_id: string$4(),
|
|
68810
|
+
error: string$4()
|
|
68811
|
+
}).passthrough(),
|
|
68812
|
+
object$4({
|
|
68813
|
+
status: literal$4("PROGRESS"),
|
|
68814
|
+
task_id: string$4(),
|
|
68815
|
+
progress: number$4(),
|
|
68816
|
+
message: string$4()
|
|
68817
|
+
}).passthrough(),
|
|
68818
|
+
object$4({
|
|
68819
|
+
status: literal$4("CANCELED"),
|
|
68820
|
+
task_id: string$4()
|
|
68821
|
+
}).passthrough()
|
|
68822
|
+
]);
|
|
68823
|
+
var taskNotificationMessageSchema = object$4({
|
|
68824
|
+
__typename: literal$4("TaskNotificationMessage"),
|
|
68825
|
+
message: taskNotificationContentSchema,
|
|
68826
|
+
type: literal$4("message")
|
|
68827
|
+
});
|
|
68828
|
+
var serverErrorMessageSchema = object$4({
|
|
68829
|
+
__typename: literal$4("ServerErrorMessage"),
|
|
68830
|
+
message: object$4({
|
|
68831
|
+
error: string$4(),
|
|
68832
|
+
time: string$4()
|
|
68833
|
+
}),
|
|
68834
|
+
type: literal$4("message")
|
|
68835
|
+
});
|
|
68836
|
+
var variableRequestMessageSchema = object$4({
|
|
68837
|
+
__typename: literal$4("VariableRequestMessage"),
|
|
68838
|
+
message: object$4({
|
|
68839
|
+
/** Channel to send in the response */
|
|
68840
|
+
__rchan: string$4(),
|
|
68841
|
+
variable: custom$4()
|
|
68842
|
+
}),
|
|
68843
|
+
type: literal$4("message")
|
|
68844
|
+
});
|
|
68845
|
+
var actionMessageSchema = object$4({
|
|
68846
|
+
__typename: literal$4("ActionMessage"),
|
|
68847
|
+
message: object$4({
|
|
68848
|
+
/**
|
|
68849
|
+
* Action implementation instance
|
|
68850
|
+
*/
|
|
68851
|
+
action: custom$4().nullable(),
|
|
68852
|
+
/**
|
|
68853
|
+
* Execution uid
|
|
68854
|
+
*/
|
|
68855
|
+
uid: string$4()
|
|
68856
|
+
}),
|
|
68857
|
+
type: literal$4("message")
|
|
68858
|
+
});
|
|
68859
|
+
var backendStoreMessageSchema = object$4({
|
|
68860
|
+
__typename: literal$4("BackendStoreMessage"),
|
|
68861
|
+
message: object$4({
|
|
68862
|
+
store_uid: string$4(),
|
|
68863
|
+
value: any(),
|
|
68864
|
+
sequence_number: number$4()
|
|
68865
|
+
}),
|
|
68866
|
+
type: literal$4("message")
|
|
68867
|
+
});
|
|
68868
|
+
var backendStorePatchMessageSchema = object$4({
|
|
68869
|
+
__typename: literal$4("BackendStorePatchMessage"),
|
|
68870
|
+
message: object$4({
|
|
68871
|
+
store_uid: string$4(),
|
|
68872
|
+
patches: array$4(object$4({
|
|
68873
|
+
op: union$4([
|
|
68874
|
+
literal$4("add"),
|
|
68875
|
+
literal$4("remove"),
|
|
68876
|
+
literal$4("replace"),
|
|
68877
|
+
literal$4("move"),
|
|
68878
|
+
literal$4("copy"),
|
|
68879
|
+
literal$4("test")
|
|
68880
|
+
]),
|
|
68881
|
+
path: string$4(),
|
|
68882
|
+
value: any().optional(),
|
|
68883
|
+
from: string$4().optional()
|
|
68884
|
+
})),
|
|
68885
|
+
sequence_number: number$4()
|
|
68886
|
+
}),
|
|
68887
|
+
type: literal$4("message")
|
|
68888
|
+
});
|
|
68889
|
+
var serverVariableMessageSchema = object$4({
|
|
68890
|
+
__typename: literal$4("ServerVariableMessage"),
|
|
68891
|
+
message: object$4({
|
|
68892
|
+
__type: literal$4("ServerVariable"),
|
|
68893
|
+
uid: string$4(),
|
|
68894
|
+
sequence_number: number$4()
|
|
68895
|
+
}),
|
|
68896
|
+
type: literal$4("message")
|
|
68897
|
+
});
|
|
68898
|
+
var customMessageSchema = object$4({
|
|
68899
|
+
message: object$4({
|
|
68900
|
+
data: any(),
|
|
68901
|
+
kind: string$4(),
|
|
68902
|
+
/** Optional ID, returned from server custom messages coming as a response for a custom client message */
|
|
68903
|
+
__response_for: string$4().optional(),
|
|
68904
|
+
/** Optional ID, should be included as `__response_for` when the server responds to this message */
|
|
68905
|
+
__rchan: string$4().optional()
|
|
68906
|
+
}),
|
|
68907
|
+
type: literal$4("custom")
|
|
68908
|
+
});
|
|
68909
|
+
var firstPartyServerMessageSchema = discriminatedUnion("__typename", [
|
|
68910
|
+
taskNotificationMessageSchema,
|
|
68911
|
+
serverErrorMessageSchema,
|
|
68912
|
+
variableRequestMessageSchema,
|
|
68913
|
+
actionMessageSchema,
|
|
68914
|
+
backendStoreMessageSchema,
|
|
68915
|
+
backendStorePatchMessageSchema,
|
|
68916
|
+
serverVariableMessageSchema
|
|
68917
|
+
]);
|
|
68918
|
+
var webSocketMessageSchema = union$4([
|
|
68919
|
+
initMessageSchema,
|
|
68920
|
+
pingPongMessageSchema,
|
|
68921
|
+
firstPartyServerMessageSchema,
|
|
68922
|
+
customMessageSchema
|
|
68923
|
+
]);
|
|
68610
68924
|
function isInitMessage(message) {
|
|
68611
68925
|
return message.type === "init";
|
|
68612
68926
|
}
|
|
68613
68927
|
function isTaskNotification(message) {
|
|
68614
|
-
return message.type === "message" &&
|
|
68928
|
+
return message.type === "message" && message.__typename === "TaskNotificationMessage";
|
|
68615
68929
|
}
|
|
68616
68930
|
function isServerVariableMessage(message) {
|
|
68617
|
-
return message.type === "message" &&
|
|
68931
|
+
return message.type === "message" && message.__typename === "ServerVariableMessage";
|
|
68618
68932
|
}
|
|
68619
68933
|
function isServerErrorMessage(message) {
|
|
68620
|
-
return message.type === "message" && "
|
|
68934
|
+
return message.type === "message" && message.__typename === "ServerErrorMessage";
|
|
68621
68935
|
}
|
|
68622
68936
|
function isVariableRequestMessage(message) {
|
|
68623
|
-
return message.type === "message" && "
|
|
68937
|
+
return message.type === "message" && message.__typename === "VariableRequestMessage";
|
|
68624
68938
|
}
|
|
68625
68939
|
function isActionMessage(message) {
|
|
68626
|
-
return message.type === "message" && "
|
|
68940
|
+
return message.type === "message" && message.__typename === "ActionMessage";
|
|
68627
68941
|
}
|
|
68628
68942
|
function isBackendStoreMessage(message) {
|
|
68629
|
-
return message.type === "message" &&
|
|
68943
|
+
return message.type === "message" && message.__typename === "BackendStoreMessage";
|
|
68630
68944
|
}
|
|
68631
68945
|
function isBackendStorePatchMessage(message) {
|
|
68632
|
-
return message.type === "message" &&
|
|
68946
|
+
return message.type === "message" && message.__typename === "BackendStorePatchMessage";
|
|
68633
68947
|
}
|
|
68634
68948
|
function isCustomMessage(message) {
|
|
68635
68949
|
return message.type === "custom";
|
|
@@ -69415,11 +69729,611 @@
|
|
|
69415
69729
|
return identifier;
|
|
69416
69730
|
}
|
|
69417
69731
|
//#endregion
|
|
69732
|
+
//#region js/shared/interactivity/polling.tsx
|
|
69733
|
+
var DEFAULT_JITTER_RATIO = .1;
|
|
69734
|
+
var MAX_BACKOFF_MS = 6e4;
|
|
69735
|
+
var POLL_FORCE_KEY_PREFIX = "__dara_poll__:";
|
|
69736
|
+
var retryAfterByError = /* @__PURE__ */ new WeakMap();
|
|
69737
|
+
/** Throw an AbortError when an old run attempts to publish a result. */
|
|
69738
|
+
function assertCurrentRun(handle) {
|
|
69739
|
+
if (!handle.isCurrent() || handle.signal.aborted) throw new DOMException("The request was superseded", "AbortError");
|
|
69740
|
+
}
|
|
69741
|
+
/** Check whether an error represents intentional request cancellation. */
|
|
69742
|
+
function isAbortError(error) {
|
|
69743
|
+
return error instanceof DOMException && error.name === "AbortError" || typeof error === "object" && error !== null && "name" in error && error.name === "AbortError";
|
|
69744
|
+
}
|
|
69745
|
+
/** Read Retry-After saved at the HTTP response seam. */
|
|
69746
|
+
function getRetryAfterMs(error) {
|
|
69747
|
+
return typeof error === "object" && error !== null ? retryAfterByError.get(error) : void 0;
|
|
69748
|
+
}
|
|
69749
|
+
/**
|
|
69750
|
+
* Coordinates non-overlapping, fixed-delay polling for request identities.
|
|
69751
|
+
*
|
|
69752
|
+
* A request identity includes the rendered variable/component identity and its
|
|
69753
|
+
* serialized request extras. Multiple React consumers of the same identity
|
|
69754
|
+
* share one timer and one active request generation.
|
|
69755
|
+
*/
|
|
69756
|
+
var Poller = class {
|
|
69757
|
+
#clearTimeout;
|
|
69758
|
+
#entries = /* @__PURE__ */ new Map();
|
|
69759
|
+
#getVisibilityState;
|
|
69760
|
+
#jitterRatio;
|
|
69761
|
+
#now;
|
|
69762
|
+
#random;
|
|
69763
|
+
#setTimeout;
|
|
69764
|
+
#visibilityTarget;
|
|
69765
|
+
#owners = /* @__PURE__ */ new Map();
|
|
69766
|
+
#listeningForVisibility = false;
|
|
69767
|
+
constructor(options = {}) {
|
|
69768
|
+
this.#clearTimeout = options.clearTimeout ?? ((timer) => clearTimeout(timer));
|
|
69769
|
+
this.#getVisibilityState = options.getVisibilityState ?? (() => typeof document === "undefined" ? "visible" : document.visibilityState);
|
|
69770
|
+
this.#jitterRatio = options.jitterRatio ?? DEFAULT_JITTER_RATIO;
|
|
69771
|
+
this.#now = options.now ?? (() => Date.now());
|
|
69772
|
+
this.#random = options.random ?? (() => Math.random());
|
|
69773
|
+
this.#setTimeout = options.setTimeout ?? ((callback, delay) => setTimeout(callback, delay));
|
|
69774
|
+
this.#visibilityTarget = options.visibilityTarget ?? (typeof document === "undefined" ? void 0 : document);
|
|
69775
|
+
}
|
|
69776
|
+
/**
|
|
69777
|
+
* Register one rendered polling consumer.
|
|
69778
|
+
*
|
|
69779
|
+
* The returned cleanup releases the consumer. The final cleanup aborts the
|
|
69780
|
+
* owned request on the next macrotask so React StrictMode can immediately
|
|
69781
|
+
* reacquire the same identity without cancelling useful work.
|
|
69782
|
+
*/
|
|
69783
|
+
subscribe(key, intervalSeconds, refresh) {
|
|
69784
|
+
const intervalMs = (intervalSeconds ?? 0) * 1e3;
|
|
69785
|
+
if (!Number.isFinite(intervalMs) || !(intervalMs > 0)) return () => {};
|
|
69786
|
+
const entry = this.#getOrCreateEntry(key);
|
|
69787
|
+
const oldIntervalMs = entry.subscribers.size > 0 ? this.#getIntervalMs(entry) : void 0;
|
|
69788
|
+
if (entry.disposeTimer !== void 0) {
|
|
69789
|
+
this.#clearTimeout(entry.disposeTimer);
|
|
69790
|
+
entry.disposeTimer = void 0;
|
|
69791
|
+
}
|
|
69792
|
+
const subscriberId = Symbol(key);
|
|
69793
|
+
entry.subscribers.set(subscriberId, {
|
|
69794
|
+
intervalMs,
|
|
69795
|
+
refresh
|
|
69796
|
+
});
|
|
69797
|
+
this.#startVisibilityListener();
|
|
69798
|
+
if (entry.subscribers.size === 1 && entry.state.kind === "idle" && entry.timer === void 0) this.#schedulePoll(key, entry);
|
|
69799
|
+
else if (entry.timer !== void 0 && entry.failureCount === 0 && oldIntervalMs !== void 0 && intervalMs < oldIntervalMs) {
|
|
69800
|
+
const remaining = Math.max(0, (entry.nextRunAt ?? this.#now()) - this.#now());
|
|
69801
|
+
this.#schedule(key, entry, Math.min(remaining, this.#withJitter(intervalMs)));
|
|
69802
|
+
}
|
|
69803
|
+
return () => {
|
|
69804
|
+
const removedIntervalMs = this.#getIntervalMs(entry);
|
|
69805
|
+
entry.subscribers.delete(subscriberId);
|
|
69806
|
+
if (entry.subscribers.size > 0) {
|
|
69807
|
+
if (entry.timer !== void 0 && entry.failureCount === 0 && this.#getIntervalMs(entry) > removedIntervalMs) this.#schedulePoll(key, entry);
|
|
69808
|
+
return;
|
|
69809
|
+
}
|
|
69810
|
+
this.#clearTimer(entry);
|
|
69811
|
+
entry.disposeTimer = this.#setTimeout(() => {
|
|
69812
|
+
entry.disposeTimer = void 0;
|
|
69813
|
+
if (entry.subscribers.size > 0) return;
|
|
69814
|
+
if (entry.owners.size > 0) return;
|
|
69815
|
+
if (this.#entries.get(key) !== entry) return;
|
|
69816
|
+
if (entry.state.kind === "running") {
|
|
69817
|
+
entry.state.run.controller.abort();
|
|
69818
|
+
entry.state.run.detachExternalSignal?.();
|
|
69819
|
+
entry.state.run.end();
|
|
69820
|
+
}
|
|
69821
|
+
this.#entries.delete(key);
|
|
69822
|
+
this.#stopVisibilityListenerIfIdle();
|
|
69823
|
+
}, 0);
|
|
69824
|
+
};
|
|
69825
|
+
}
|
|
69826
|
+
/**
|
|
69827
|
+
* Claim a key during render so Suspense cannot skip its ownership effect.
|
|
69828
|
+
*
|
|
69829
|
+
* A later owner commit prunes claims left by an abandoned render.
|
|
69830
|
+
*/
|
|
69831
|
+
claimKey(ownerId, hookId, key) {
|
|
69832
|
+
const owner = this.#getOrCreateOwner(ownerId);
|
|
69833
|
+
if (owner.hooks.get(hookId) === key) return;
|
|
69834
|
+
const oldKey = owner.claims.get(hookId);
|
|
69835
|
+
owner.claims.set(hookId, key);
|
|
69836
|
+
this.#getOrCreateEntry(key).owners.add(ownerId);
|
|
69837
|
+
if (oldKey !== void 0 && oldKey !== key && !this.#ownerHasKey(owner, oldKey)) this.#dropOwnedKey(ownerId, oldKey);
|
|
69838
|
+
}
|
|
69839
|
+
/** Apply the hook claims collected by one committed owner render. */
|
|
69840
|
+
commitOwner(ownerId, claims) {
|
|
69841
|
+
const owner = this.#getOrCreateOwner(ownerId);
|
|
69842
|
+
if (owner.disposeTimer !== void 0) {
|
|
69843
|
+
this.#clearTimeout(owner.disposeTimer);
|
|
69844
|
+
owner.disposeTimer = void 0;
|
|
69845
|
+
}
|
|
69846
|
+
const droppedClaims = /* @__PURE__ */ new Set();
|
|
69847
|
+
for (const [hookId, key] of owner.claims) if (claims.get(hookId) !== key) {
|
|
69848
|
+
owner.claims.delete(hookId);
|
|
69849
|
+
droppedClaims.add(key);
|
|
69850
|
+
}
|
|
69851
|
+
const nextRenderKeys = /* @__PURE__ */ new Set();
|
|
69852
|
+
for (const key of new Set(claims.values())) {
|
|
69853
|
+
this.#getOrCreateEntry(key).owners.add(ownerId);
|
|
69854
|
+
if (!this.#hasHookForKey(owner, key) && !this.#hasClaimForKey(owner, key)) nextRenderKeys.add(key);
|
|
69855
|
+
}
|
|
69856
|
+
const oldRenderKeys = owner.renderKeys;
|
|
69857
|
+
owner.renderKeys = nextRenderKeys;
|
|
69858
|
+
for (const key of oldRenderKeys) if (!nextRenderKeys.has(key) && !this.#hasHookForKey(owner, key)) this.#dropOwnedKey(ownerId, key);
|
|
69859
|
+
for (const key of droppedClaims) if (!this.#ownerHasKey(owner, key)) this.#dropOwnedKey(ownerId, key);
|
|
69860
|
+
}
|
|
69861
|
+
/** Keep one key after its hook commits. */
|
|
69862
|
+
mountKey(ownerId, hookId, key) {
|
|
69863
|
+
const owner = this.#getOrCreateOwner(ownerId);
|
|
69864
|
+
if (owner.disposeTimer !== void 0) {
|
|
69865
|
+
this.#clearTimeout(owner.disposeTimer);
|
|
69866
|
+
owner.disposeTimer = void 0;
|
|
69867
|
+
}
|
|
69868
|
+
const timer = owner.timers.get(hookId);
|
|
69869
|
+
if (timer !== void 0) {
|
|
69870
|
+
this.#clearTimeout(timer);
|
|
69871
|
+
owner.timers.delete(hookId);
|
|
69872
|
+
}
|
|
69873
|
+
const oldKey = owner.hooks.get(hookId);
|
|
69874
|
+
owner.hooks.set(hookId, key);
|
|
69875
|
+
owner.claims.delete(hookId);
|
|
69876
|
+
owner.renderKeys.delete(key);
|
|
69877
|
+
this.#getOrCreateEntry(key).owners.add(ownerId);
|
|
69878
|
+
if (oldKey !== void 0 && oldKey !== key && !this.#ownerHasKey(owner, oldKey)) this.#dropOwnedKey(ownerId, oldKey);
|
|
69879
|
+
}
|
|
69880
|
+
/** Drop a committed hook key after the StrictMode remount window. */
|
|
69881
|
+
unmountKey(ownerId, hookId, key) {
|
|
69882
|
+
const owner = this.#owners.get(ownerId);
|
|
69883
|
+
if (!owner || owner.timers.has(hookId)) return;
|
|
69884
|
+
const timer = this.#setTimeout(() => {
|
|
69885
|
+
owner.timers.delete(hookId);
|
|
69886
|
+
if (owner.hooks.get(hookId) !== key) return;
|
|
69887
|
+
owner.hooks.delete(hookId);
|
|
69888
|
+
if (!this.#ownerHasKey(owner, key)) this.#dropOwnedKey(ownerId, key);
|
|
69889
|
+
this.#stopVisibilityListenerIfIdle();
|
|
69890
|
+
}, 0);
|
|
69891
|
+
owner.timers.set(hookId, timer);
|
|
69892
|
+
}
|
|
69893
|
+
/** Release a rendered owner after the StrictMode remount window. */
|
|
69894
|
+
releaseOwner(ownerId) {
|
|
69895
|
+
const owner = this.#owners.get(ownerId);
|
|
69896
|
+
if (!owner || owner.disposeTimer !== void 0) return;
|
|
69897
|
+
owner.disposeTimer = this.#setTimeout(() => this.#dropOwner(ownerId, owner), 0);
|
|
69898
|
+
}
|
|
69899
|
+
/**
|
|
69900
|
+
* Run one request for a polling identity.
|
|
69901
|
+
*
|
|
69902
|
+
* Matching callers share one promise. Dependency runs replace older work,
|
|
69903
|
+
* while a poll that arrives during a run leaves one follow-up refresh.
|
|
69904
|
+
*/
|
|
69905
|
+
run({ cause, inputKey, key, read, signal, work, write }) {
|
|
69906
|
+
const entry = this.#entries.get(key);
|
|
69907
|
+
const running = entry?.state.kind === "running" ? entry.state.run : void 0;
|
|
69908
|
+
if (running?.cause === cause && running.inputKey === inputKey && running.result) return running.result;
|
|
69909
|
+
const handle = this.#start(key, cause, signal, inputKey);
|
|
69910
|
+
const result = this.#runWork({
|
|
69911
|
+
cause,
|
|
69912
|
+
handle,
|
|
69913
|
+
read,
|
|
69914
|
+
work,
|
|
69915
|
+
write
|
|
69916
|
+
});
|
|
69917
|
+
const state = this.#entries.get(key)?.state;
|
|
69918
|
+
if (state?.kind === "running" && handle.isCurrent()) state.run.result = result;
|
|
69919
|
+
return result;
|
|
69920
|
+
}
|
|
69921
|
+
#start(key, cause, externalSignal, inputKey) {
|
|
69922
|
+
const entry = this.#getOrCreateEntry(key);
|
|
69923
|
+
if (entry.state.kind === "running") {
|
|
69924
|
+
const running = entry.state.run;
|
|
69925
|
+
if (cause === "poll") {
|
|
69926
|
+
entry.runAgain = true;
|
|
69927
|
+
const abortedController = new AbortController();
|
|
69928
|
+
abortedController.abort();
|
|
69929
|
+
return {
|
|
69930
|
+
signal: abortedController.signal,
|
|
69931
|
+
finish: () => {},
|
|
69932
|
+
isCurrent: () => false,
|
|
69933
|
+
waitForNewer: () => this.#waitForNewer(key, entry.generation)
|
|
69934
|
+
};
|
|
69935
|
+
}
|
|
69936
|
+
running.controller.abort();
|
|
69937
|
+
running.detachExternalSignal?.();
|
|
69938
|
+
running.end();
|
|
69939
|
+
}
|
|
69940
|
+
this.#clearTimer(entry);
|
|
69941
|
+
const generation = ++entry.generation;
|
|
69942
|
+
const controller = new AbortController();
|
|
69943
|
+
let end = () => {};
|
|
69944
|
+
const activeRun = {
|
|
69945
|
+
cause,
|
|
69946
|
+
controller,
|
|
69947
|
+
done: new Promise((resolve) => {
|
|
69948
|
+
end = resolve;
|
|
69949
|
+
}),
|
|
69950
|
+
end,
|
|
69951
|
+
generation,
|
|
69952
|
+
inputKey
|
|
69953
|
+
};
|
|
69954
|
+
entry.state = {
|
|
69955
|
+
kind: "running",
|
|
69956
|
+
run: activeRun
|
|
69957
|
+
};
|
|
69958
|
+
if (externalSignal && typeof externalSignal.addEventListener === "function") if (externalSignal.aborted) controller.abort(externalSignal.reason);
|
|
69959
|
+
else {
|
|
69960
|
+
const abortFromExternalSignal = () => controller.abort(externalSignal.reason);
|
|
69961
|
+
externalSignal.addEventListener("abort", abortFromExternalSignal, { once: true });
|
|
69962
|
+
activeRun.detachExternalSignal = () => externalSignal.removeEventListener("abort", abortFromExternalSignal);
|
|
69963
|
+
}
|
|
69964
|
+
return this.#createRunHandle(key, activeRun);
|
|
69965
|
+
}
|
|
69966
|
+
#createRunHandle(key, activeRun) {
|
|
69967
|
+
let finished = false;
|
|
69968
|
+
return {
|
|
69969
|
+
signal: activeRun.controller.signal,
|
|
69970
|
+
finish: (outcome) => {
|
|
69971
|
+
if (finished) return;
|
|
69972
|
+
finished = true;
|
|
69973
|
+
this.#finishRun(key, activeRun.generation, outcome);
|
|
69974
|
+
},
|
|
69975
|
+
isCurrent: () => {
|
|
69976
|
+
const state = this.#entries.get(key)?.state;
|
|
69977
|
+
return state?.kind === "running" && state.run.generation === activeRun.generation;
|
|
69978
|
+
},
|
|
69979
|
+
waitForNewer: () => this.#waitForNewer(key, activeRun.generation)
|
|
69980
|
+
};
|
|
69981
|
+
}
|
|
69982
|
+
async #runWork({ cause, handle, read, work, write }) {
|
|
69983
|
+
let outcome = { status: "success" };
|
|
69984
|
+
try {
|
|
69985
|
+
assertCurrentRun(handle);
|
|
69986
|
+
const value = await work(handle.signal);
|
|
69987
|
+
assertCurrentRun(handle);
|
|
69988
|
+
write(value);
|
|
69989
|
+
return value;
|
|
69990
|
+
} catch (error) {
|
|
69991
|
+
outcome = isAbortError(error) ? { status: "aborted" } : {
|
|
69992
|
+
status: "error",
|
|
69993
|
+
retryAfterMs: getRetryAfterMs(error)
|
|
69994
|
+
};
|
|
69995
|
+
const previous = read?.();
|
|
69996
|
+
if (isAbortError(error) && previous?.found) {
|
|
69997
|
+
await handle.waitForNewer();
|
|
69998
|
+
const latest = read?.();
|
|
69999
|
+
return latest?.found ? latest.value : previous.value;
|
|
70000
|
+
}
|
|
70001
|
+
if (cause === "poll" && previous?.found) return previous.value;
|
|
70002
|
+
throw error;
|
|
70003
|
+
} finally {
|
|
70004
|
+
handle.finish(outcome);
|
|
70005
|
+
}
|
|
70006
|
+
}
|
|
70007
|
+
/** Refresh now, or keep one refresh while busy. */
|
|
70008
|
+
runNow(key) {
|
|
70009
|
+
const entry = this.#entries.get(key);
|
|
70010
|
+
if (!entry || entry.subscribers.size === 0) return;
|
|
70011
|
+
if (this.#getVisibilityState() === "hidden") {
|
|
70012
|
+
entry.runOnShow = true;
|
|
70013
|
+
return;
|
|
70014
|
+
}
|
|
70015
|
+
if (entry.state.kind !== "idle") {
|
|
70016
|
+
entry.runAgain = true;
|
|
70017
|
+
return;
|
|
70018
|
+
}
|
|
70019
|
+
this.#clearTimer(entry);
|
|
70020
|
+
entry.state = { kind: "starting" };
|
|
70021
|
+
this.#getSubscriber(entry)?.refresh();
|
|
70022
|
+
}
|
|
70023
|
+
/** Abort and remove every polling identity. Intended for test isolation. */
|
|
70024
|
+
clear() {
|
|
70025
|
+
for (const entry of this.#entries.values()) {
|
|
70026
|
+
this.#clearTimer(entry);
|
|
70027
|
+
if (entry.disposeTimer !== void 0) this.#clearTimeout(entry.disposeTimer);
|
|
70028
|
+
if (entry.state.kind === "running") {
|
|
70029
|
+
entry.state.run.controller.abort();
|
|
70030
|
+
entry.state.run.detachExternalSignal?.();
|
|
70031
|
+
entry.state.run.end();
|
|
70032
|
+
}
|
|
70033
|
+
}
|
|
70034
|
+
for (const owner of this.#owners.values()) {
|
|
70035
|
+
if (owner.disposeTimer !== void 0) this.#clearTimeout(owner.disposeTimer);
|
|
70036
|
+
for (const timer of owner.timers.values()) this.#clearTimeout(timer);
|
|
70037
|
+
}
|
|
70038
|
+
this.#owners.clear();
|
|
70039
|
+
this.#entries.clear();
|
|
70040
|
+
this.#stopVisibilityListenerIfIdle();
|
|
70041
|
+
}
|
|
70042
|
+
/** Current time according to the injected clock. */
|
|
70043
|
+
now() {
|
|
70044
|
+
return this.#now();
|
|
70045
|
+
}
|
|
70046
|
+
#finishRun(key, generation, outcome) {
|
|
70047
|
+
const entry = this.#entries.get(key);
|
|
70048
|
+
if (!entry || entry.state.kind !== "running" || entry.state.run.generation !== generation) return;
|
|
70049
|
+
entry.state.run.detachExternalSignal?.();
|
|
70050
|
+
entry.state.run.end();
|
|
70051
|
+
entry.state = { kind: "idle" };
|
|
70052
|
+
if (entry.subscribers.size === 0) {
|
|
70053
|
+
if (entry.owners.size === 0) {
|
|
70054
|
+
this.#entries.delete(key);
|
|
70055
|
+
this.#stopVisibilityListenerIfIdle();
|
|
70056
|
+
}
|
|
70057
|
+
return;
|
|
70058
|
+
}
|
|
70059
|
+
if (outcome.status === "success") {
|
|
70060
|
+
entry.failureCount = 0;
|
|
70061
|
+
entry.nextRunAt = void 0;
|
|
70062
|
+
} else if (outcome.status === "error") {
|
|
70063
|
+
entry.failureCount += 1;
|
|
70064
|
+
entry.runAgain = false;
|
|
70065
|
+
const baseDelay = this.#getIntervalMs(entry);
|
|
70066
|
+
const exponentialDelay = Math.min(baseDelay * 2 ** (entry.failureCount - 1), MAX_BACKOFF_MS);
|
|
70067
|
+
const jitteredDelay = Math.min(this.#withJitter(exponentialDelay), MAX_BACKOFF_MS);
|
|
70068
|
+
const backoffDelay = Math.max(jitteredDelay, outcome.retryAfterMs ?? 0);
|
|
70069
|
+
this.#schedule(key, entry, backoffDelay);
|
|
70070
|
+
}
|
|
70071
|
+
if (this.#getVisibilityState() === "hidden") {
|
|
70072
|
+
entry.runOnShow = true;
|
|
70073
|
+
return;
|
|
70074
|
+
}
|
|
70075
|
+
if (outcome.status === "success") {
|
|
70076
|
+
if (entry.runAgain || entry.runOnShow) {
|
|
70077
|
+
entry.runAgain = false;
|
|
70078
|
+
entry.runOnShow = false;
|
|
70079
|
+
this.runNow(key);
|
|
70080
|
+
return;
|
|
70081
|
+
}
|
|
70082
|
+
this.#schedulePoll(key, entry);
|
|
70083
|
+
return;
|
|
70084
|
+
}
|
|
70085
|
+
if (outcome.status === "aborted") if (entry.runAgain) {
|
|
70086
|
+
entry.runAgain = false;
|
|
70087
|
+
this.runNow(key);
|
|
70088
|
+
} else this.#schedulePoll(key, entry);
|
|
70089
|
+
}
|
|
70090
|
+
async #waitForNewer(key, generation) {
|
|
70091
|
+
let seenGeneration = generation;
|
|
70092
|
+
while (true) {
|
|
70093
|
+
const state = this.#entries.get(key)?.state;
|
|
70094
|
+
const activeRun = state?.kind === "running" ? state.run : void 0;
|
|
70095
|
+
if (!activeRun || activeRun.generation <= seenGeneration) return;
|
|
70096
|
+
seenGeneration = activeRun.generation;
|
|
70097
|
+
await activeRun.done;
|
|
70098
|
+
}
|
|
70099
|
+
}
|
|
70100
|
+
#getIntervalMs(entry) {
|
|
70101
|
+
return Math.min(...Array.from(entry.subscribers.values(), (subscriber) => subscriber.intervalMs));
|
|
70102
|
+
}
|
|
70103
|
+
#getOrCreateEntry(key) {
|
|
70104
|
+
let entry = this.#entries.get(key);
|
|
70105
|
+
if (!entry) {
|
|
70106
|
+
entry = {
|
|
70107
|
+
failureCount: 0,
|
|
70108
|
+
generation: 0,
|
|
70109
|
+
owners: /* @__PURE__ */ new Set(),
|
|
70110
|
+
runAgain: false,
|
|
70111
|
+
runOnShow: false,
|
|
70112
|
+
state: { kind: "idle" },
|
|
70113
|
+
subscribers: /* @__PURE__ */ new Map()
|
|
70114
|
+
};
|
|
70115
|
+
this.#entries.set(key, entry);
|
|
70116
|
+
}
|
|
70117
|
+
return entry;
|
|
70118
|
+
}
|
|
70119
|
+
#getSubscriber(entry) {
|
|
70120
|
+
return Array.from(entry.subscribers.values()).sort((a, b) => a.intervalMs - b.intervalMs)[0];
|
|
70121
|
+
}
|
|
70122
|
+
#getOrCreateOwner(ownerId) {
|
|
70123
|
+
let owner = this.#owners.get(ownerId);
|
|
70124
|
+
if (!owner) {
|
|
70125
|
+
const newOwner = {
|
|
70126
|
+
claims: /* @__PURE__ */ new Map(),
|
|
70127
|
+
hooks: /* @__PURE__ */ new Map(),
|
|
70128
|
+
renderKeys: /* @__PURE__ */ new Set(),
|
|
70129
|
+
timers: /* @__PURE__ */ new Map()
|
|
70130
|
+
};
|
|
70131
|
+
owner = newOwner;
|
|
70132
|
+
this.#owners.set(ownerId, newOwner);
|
|
70133
|
+
}
|
|
70134
|
+
return owner;
|
|
70135
|
+
}
|
|
70136
|
+
#dropOwnedKey(ownerId, key) {
|
|
70137
|
+
const entry = this.#entries.get(key);
|
|
70138
|
+
if (!entry) return;
|
|
70139
|
+
entry.owners.delete(ownerId);
|
|
70140
|
+
if (entry.owners.size > 0 || entry.subscribers.size > 0) return;
|
|
70141
|
+
this.#clearTimer(entry);
|
|
70142
|
+
if (entry.state.kind === "running") {
|
|
70143
|
+
entry.state.run.controller.abort();
|
|
70144
|
+
entry.state.run.detachExternalSignal?.();
|
|
70145
|
+
entry.state.run.end();
|
|
70146
|
+
}
|
|
70147
|
+
this.#entries.delete(key);
|
|
70148
|
+
}
|
|
70149
|
+
#dropOwner(ownerId, owner) {
|
|
70150
|
+
if (this.#owners.get(ownerId) !== owner) return;
|
|
70151
|
+
this.#owners.delete(ownerId);
|
|
70152
|
+
for (const timer of owner.timers.values()) this.#clearTimeout(timer);
|
|
70153
|
+
const keys = /* @__PURE__ */ new Set([
|
|
70154
|
+
...owner.claims.values(),
|
|
70155
|
+
...owner.renderKeys,
|
|
70156
|
+
...owner.hooks.values()
|
|
70157
|
+
]);
|
|
70158
|
+
for (const key of keys) this.#dropOwnedKey(ownerId, key);
|
|
70159
|
+
this.#stopVisibilityListenerIfIdle();
|
|
70160
|
+
}
|
|
70161
|
+
#hasClaimForKey(owner, key) {
|
|
70162
|
+
return Array.from(owner.claims.values()).some((claimKey) => claimKey === key);
|
|
70163
|
+
}
|
|
70164
|
+
#hasHookForKey(owner, key) {
|
|
70165
|
+
return Array.from(owner.hooks.values()).some((hookKey) => hookKey === key);
|
|
70166
|
+
}
|
|
70167
|
+
#ownerHasKey(owner, key) {
|
|
70168
|
+
return owner.renderKeys.has(key) || this.#hasHookForKey(owner, key) || this.#hasClaimForKey(owner, key);
|
|
70169
|
+
}
|
|
70170
|
+
#schedulePoll(key, entry) {
|
|
70171
|
+
this.#schedule(key, entry, this.#withJitter(this.#getIntervalMs(entry)));
|
|
70172
|
+
}
|
|
70173
|
+
#schedule(key, entry, delay) {
|
|
70174
|
+
this.#clearTimer(entry);
|
|
70175
|
+
entry.nextRunAt = this.#now() + delay;
|
|
70176
|
+
if (this.#getVisibilityState() === "hidden") {
|
|
70177
|
+
entry.runOnShow = true;
|
|
70178
|
+
return;
|
|
70179
|
+
}
|
|
70180
|
+
entry.timer = this.#setTimeout(() => {
|
|
70181
|
+
entry.timer = void 0;
|
|
70182
|
+
entry.nextRunAt = void 0;
|
|
70183
|
+
this.runNow(key);
|
|
70184
|
+
}, delay);
|
|
70185
|
+
}
|
|
70186
|
+
#clearTimer(entry, clearNextRun = true) {
|
|
70187
|
+
if (entry.timer !== void 0) {
|
|
70188
|
+
this.#clearTimeout(entry.timer);
|
|
70189
|
+
entry.timer = void 0;
|
|
70190
|
+
}
|
|
70191
|
+
if (clearNextRun) entry.nextRunAt = void 0;
|
|
70192
|
+
}
|
|
70193
|
+
#withJitter(delay) {
|
|
70194
|
+
const multiplier = 1 - this.#jitterRatio + this.#random() * this.#jitterRatio * 2;
|
|
70195
|
+
return Math.max(0, delay * multiplier);
|
|
70196
|
+
}
|
|
70197
|
+
#handleVisibilityChange = () => {
|
|
70198
|
+
const hidden = this.#getVisibilityState() === "hidden";
|
|
70199
|
+
for (const [key, entry] of this.#entries) {
|
|
70200
|
+
if (hidden) {
|
|
70201
|
+
entry.runOnShow = entry.subscribers.size > 0;
|
|
70202
|
+
if (entry.timer !== void 0) this.#clearTimer(entry, entry.failureCount === 0);
|
|
70203
|
+
continue;
|
|
70204
|
+
}
|
|
70205
|
+
if (!entry.runOnShow || entry.subscribers.size === 0) continue;
|
|
70206
|
+
entry.runOnShow = false;
|
|
70207
|
+
const delay = Math.max(0, (entry.nextRunAt ?? this.#now()) - this.#now());
|
|
70208
|
+
if (delay > 0) this.#schedule(key, entry, delay);
|
|
70209
|
+
else this.runNow(key);
|
|
70210
|
+
}
|
|
70211
|
+
};
|
|
70212
|
+
#startVisibilityListener() {
|
|
70213
|
+
if (this.#listeningForVisibility || !this.#visibilityTarget) return;
|
|
70214
|
+
this.#visibilityTarget.addEventListener("visibilitychange", this.#handleVisibilityChange);
|
|
70215
|
+
this.#listeningForVisibility = true;
|
|
70216
|
+
}
|
|
70217
|
+
#stopVisibilityListenerIfIdle() {
|
|
70218
|
+
if (!this.#listeningForVisibility || this.#entries.size > 0 || !this.#visibilityTarget) return;
|
|
70219
|
+
this.#visibilityTarget.removeEventListener("visibilitychange", this.#handleVisibilityChange);
|
|
70220
|
+
this.#listeningForVisibility = false;
|
|
70221
|
+
}
|
|
70222
|
+
};
|
|
70223
|
+
var poller = new Poller();
|
|
70224
|
+
/**
|
|
70225
|
+
* Register fixed-delay polling for a request identity.
|
|
70226
|
+
*
|
|
70227
|
+
* `refresh` only invalidates the corresponding selector. Request lifecycle,
|
|
70228
|
+
* backpressure, retries, and cancellation remain owned by the poller.
|
|
70229
|
+
*/
|
|
70230
|
+
function usePolling(key, intervalSeconds, refresh) {
|
|
70231
|
+
const refreshRef = useLatestRef$3(refresh);
|
|
70232
|
+
(0, react$3.useEffect)(() => poller.subscribe(key, intervalSeconds, () => refreshRef.current()), [
|
|
70233
|
+
intervalSeconds,
|
|
70234
|
+
key,
|
|
70235
|
+
refreshRef
|
|
70236
|
+
]);
|
|
70237
|
+
}
|
|
70238
|
+
/**
|
|
70239
|
+
* Create a render-local map of hooks to polling keys.
|
|
70240
|
+
*
|
|
70241
|
+
* The commit drops claims left by hooks that did not render.
|
|
70242
|
+
*/
|
|
70243
|
+
function usePollScope() {
|
|
70244
|
+
const id = (0, react$3.useId)();
|
|
70245
|
+
const claims = /* @__PURE__ */ new Map();
|
|
70246
|
+
(0, react$3.useLayoutEffect)(() => {
|
|
70247
|
+
poller.commitOwner(id, claims);
|
|
70248
|
+
});
|
|
70249
|
+
(0, react$3.useLayoutEffect)(() => () => poller.releaseOwner(id), [id]);
|
|
70250
|
+
return {
|
|
70251
|
+
claims,
|
|
70252
|
+
id
|
|
70253
|
+
};
|
|
70254
|
+
}
|
|
70255
|
+
/**
|
|
70256
|
+
* Keep one request key for a rendered hook.
|
|
70257
|
+
*
|
|
70258
|
+
* The hook must claim the key during render because an initial suspended render
|
|
70259
|
+
* runs no effect. The claim only marks ownership; it starts no work. The passive
|
|
70260
|
+
* effect keeps the claim after commit and stays mounted when Suspense hides an
|
|
70261
|
+
* existing tree.
|
|
70262
|
+
*/
|
|
70263
|
+
function usePollKey(scope, key) {
|
|
70264
|
+
const hookId = (0, react$3.useId)();
|
|
70265
|
+
scope?.claims.set(hookId, key);
|
|
70266
|
+
const ownerId = scope?.id;
|
|
70267
|
+
if (ownerId) poller.claimKey(ownerId, hookId, key);
|
|
70268
|
+
(0, react$3.useEffect)(() => {
|
|
70269
|
+
if (!ownerId) return;
|
|
70270
|
+
poller.mountKey(ownerId, hookId, key);
|
|
70271
|
+
return () => poller.unmountKey(ownerId, hookId, key);
|
|
70272
|
+
}, [
|
|
70273
|
+
hookId,
|
|
70274
|
+
key,
|
|
70275
|
+
ownerId
|
|
70276
|
+
]);
|
|
70277
|
+
}
|
|
70278
|
+
/** Run one request using the production poller. */
|
|
70279
|
+
function runPoll(run) {
|
|
70280
|
+
return poller.run(run);
|
|
70281
|
+
}
|
|
70282
|
+
/** Create a force key that identifies a poller-owned refresh. */
|
|
70283
|
+
function createPollForceKey() {
|
|
70284
|
+
return `${POLL_FORCE_KEY_PREFIX}${globalThis.crypto?.randomUUID?.() ?? String(Math.random())}`;
|
|
70285
|
+
}
|
|
70286
|
+
/** Check whether a selector force key originated from the poller. */
|
|
70287
|
+
function isPollForceKey(forceKey) {
|
|
70288
|
+
return forceKey?.startsWith(POLL_FORCE_KEY_PREFIX) ?? false;
|
|
70289
|
+
}
|
|
70290
|
+
/** Extract Retry-After as a non-negative delay in milliseconds. */
|
|
70291
|
+
function parseRetryAfter(response, now = poller.now()) {
|
|
70292
|
+
const value = response.headers.get("Retry-After");
|
|
70293
|
+
if (!value) return;
|
|
70294
|
+
const seconds = Number(value);
|
|
70295
|
+
if (Number.isFinite(seconds) && seconds >= 0) return seconds * 1e3;
|
|
70296
|
+
const retryAt = Date.parse(value);
|
|
70297
|
+
if (Number.isNaN(retryAt)) return;
|
|
70298
|
+
return Math.max(0, retryAt - now);
|
|
70299
|
+
}
|
|
70300
|
+
/** Keep Retry-After beside an error without changing the error object. */
|
|
70301
|
+
function markRetryAfter(error, response) {
|
|
70302
|
+
const delay = parseRetryAfter(response);
|
|
70303
|
+
if (delay !== void 0 && typeof error === "object" && error !== null) retryAfterByError.set(error, delay);
|
|
70304
|
+
return error;
|
|
70305
|
+
}
|
|
70306
|
+
/** Await a promise while preserving ownership of request cancellation. */
|
|
70307
|
+
async function waitOrAbort(promise, signal) {
|
|
70308
|
+
if (!signal) return promise;
|
|
70309
|
+
if (signal.aborted) throw new DOMException("The request was aborted", "AbortError");
|
|
70310
|
+
return new Promise((resolve, reject) => {
|
|
70311
|
+
const abort = () => {
|
|
70312
|
+
signal.removeEventListener("abort", abort);
|
|
70313
|
+
reject(new DOMException("The request was aborted", "AbortError"));
|
|
70314
|
+
};
|
|
70315
|
+
signal.addEventListener("abort", abort, { once: true });
|
|
70316
|
+
promise.then((value) => {
|
|
70317
|
+
signal.removeEventListener("abort", abort);
|
|
70318
|
+
resolve(value);
|
|
70319
|
+
}, (error) => {
|
|
70320
|
+
signal.removeEventListener("abort", abort);
|
|
70321
|
+
reject(error);
|
|
70322
|
+
});
|
|
70323
|
+
});
|
|
70324
|
+
}
|
|
70325
|
+
/** Clear production polling state. Intended for test isolation. */
|
|
70326
|
+
function clearPolling_TEST() {
|
|
70327
|
+
poller.clear();
|
|
70328
|
+
}
|
|
70329
|
+
//#endregion
|
|
69418
70330
|
//#region js/shared/interactivity/store.tsx
|
|
69419
70331
|
/**
|
|
69420
70332
|
* Key -> atom
|
|
69421
70333
|
*/
|
|
69422
70334
|
var atomRegistry = /* @__PURE__ */ new Map();
|
|
70335
|
+
/** Request identity -> polling-only trigger atom. */
|
|
70336
|
+
var pollingTriggerRegistry = /* @__PURE__ */ new Map();
|
|
69423
70337
|
/**
|
|
69424
70338
|
* Key -> atom family
|
|
69425
70339
|
*/
|
|
@@ -69455,6 +70369,19 @@
|
|
|
69455
70369
|
*/
|
|
69456
70370
|
var depsRegistry = /* @__PURE__ */ new Map();
|
|
69457
70371
|
/**
|
|
70372
|
+
* Get the trigger used to refresh exactly one selector/request-extras identity.
|
|
70373
|
+
*/
|
|
70374
|
+
function getOrRegisterPollingTrigger(requestKey) {
|
|
70375
|
+
if (!pollingTriggerRegistry.has(requestKey)) pollingTriggerRegistry.set(requestKey, Recoil_index_8({
|
|
70376
|
+
default: {
|
|
70377
|
+
force_key: null,
|
|
70378
|
+
inc: 0
|
|
70379
|
+
},
|
|
70380
|
+
key: `_POLLING_TRIGGER_${requestKey}`
|
|
70381
|
+
}));
|
|
70382
|
+
return pollingTriggerRegistry.get(requestKey);
|
|
70383
|
+
}
|
|
70384
|
+
/**
|
|
69458
70385
|
* Registry key types that do not use 'nested' in their key
|
|
69459
70386
|
*/
|
|
69460
70387
|
var SHARED_KEY_TYPES = ["result-selector", "derived-selector"];
|
|
@@ -69473,8 +70400,10 @@
|
|
|
69473
70400
|
* Clear registries - to be used in tests only.
|
|
69474
70401
|
*/
|
|
69475
70402
|
function clearRegistries_TEST() {
|
|
70403
|
+
clearPolling_TEST();
|
|
69476
70404
|
for (const registry of [
|
|
69477
70405
|
atomRegistry,
|
|
70406
|
+
pollingTriggerRegistry,
|
|
69478
70407
|
atomFamilyRegistry,
|
|
69479
70408
|
atomFamilyMembersRegistry,
|
|
69480
70409
|
selectorRegistry,
|
|
@@ -85782,24 +86711,8 @@ ${String(error)}`;
|
|
|
85782
86711
|
module.exports = set;
|
|
85783
86712
|
}));
|
|
85784
86713
|
//#endregion
|
|
85785
|
-
//#region js/shared/utils/use-interval.tsx
|
|
85786
|
-
var import_set = /* @__PURE__ */ __toESM(require_set(), 1);
|
|
85787
|
-
/**
|
|
85788
|
-
* Helper hook that runs a function after given intervals
|
|
85789
|
-
*
|
|
85790
|
-
* @param callback the function to run after each interval
|
|
85791
|
-
* @param delay the delay in seconds between each interval
|
|
85792
|
-
*/
|
|
85793
|
-
function useInterval(callback, delay) {
|
|
85794
|
-
(0, react$3.useEffect)(() => {
|
|
85795
|
-
if (delay) {
|
|
85796
|
-
const id = setInterval(callback, delay * 1e3);
|
|
85797
|
-
return () => clearInterval(id);
|
|
85798
|
-
}
|
|
85799
|
-
}, useDeepCompare([delay, callback]));
|
|
85800
|
-
}
|
|
85801
|
-
//#endregion
|
|
85802
86714
|
//#region js/shared/utils/deferred.tsx
|
|
86715
|
+
var import_set = /* @__PURE__ */ __toESM(require_set(), 1);
|
|
85803
86716
|
var DeferredImpl = class {
|
|
85804
86717
|
#resolve;
|
|
85805
86718
|
#reject;
|
|
@@ -85941,7 +86854,7 @@ ${String(error)}`;
|
|
|
85941
86854
|
* - `values`, values to pass in the request
|
|
85942
86855
|
* - `wsClient`, websocket client
|
|
85943
86856
|
*/
|
|
85944
|
-
async function fetchDerivedVariable({ cache, extras, force_key, variableUid, values, wsClient }) {
|
|
86857
|
+
async function fetchDerivedVariable({ cache, extras, force_key, signal, variableUid, values, wsClient }) {
|
|
85945
86858
|
const cacheControl = cache === null ? { "cache-control": "none" } : void 0;
|
|
85946
86859
|
const ws_channel = await wsClient.getChannel();
|
|
85947
86860
|
const res = await request(`/api/core/derived-variable/${variableUid}`, {
|
|
@@ -85952,34 +86865,50 @@ ${String(error)}`;
|
|
|
85952
86865
|
}),
|
|
85953
86866
|
headers: { ...cacheControl },
|
|
85954
86867
|
method: HTTP_METHOD.POST
|
|
85955
|
-
}, extras);
|
|
86868
|
+
}, extras, { signal });
|
|
85956
86869
|
await handleAuthErrors(res, { authenticationFailureRedirect: "login" });
|
|
85957
|
-
|
|
86870
|
+
try {
|
|
86871
|
+
await validateResponse(res, `Failed to fetch the derived variable with uid: ${variableUid}`);
|
|
86872
|
+
} catch (error) {
|
|
86873
|
+
throw markRetryAfter(error, res);
|
|
86874
|
+
}
|
|
85958
86875
|
return res.json();
|
|
85959
86876
|
}
|
|
86877
|
+
var pendingFetches = /* @__PURE__ */ new Map();
|
|
85960
86878
|
/**
|
|
85961
|
-
*
|
|
85962
|
-
* so that we only debounce calls to the same DerivedVariable. Debouncing is done with rxjs as everything here is
|
|
85963
|
-
* promise based and async
|
|
86879
|
+
* Wait 10 ms so matching selector reads share one fetch. A running fetch stays separate.
|
|
85964
86880
|
*/
|
|
85965
|
-
|
|
85966
|
-
|
|
85967
|
-
|
|
85968
|
-
|
|
85969
|
-
|
|
85970
|
-
|
|
85971
|
-
|
|
85972
|
-
debouncedFetchSubjects[selectorKey].next({
|
|
85973
|
-
cache,
|
|
85974
|
-
extras,
|
|
85975
|
-
force_key,
|
|
85976
|
-
selectorKey,
|
|
85977
|
-
values,
|
|
85978
|
-
variableUid,
|
|
85979
|
-
wsClient
|
|
86881
|
+
function startPendingFetch(selectorKey, pending) {
|
|
86882
|
+
if (pendingFetches.get(selectorKey) !== pending) return;
|
|
86883
|
+
pendingFetches.delete(selectorKey);
|
|
86884
|
+
fetchDerivedVariable(pending.args).then((response) => {
|
|
86885
|
+
for (const waiter of pending.waiters) waiter.resolve(response);
|
|
86886
|
+
}, (error) => {
|
|
86887
|
+
for (const waiter of pending.waiters) waiter.reject(error);
|
|
85980
86888
|
});
|
|
86889
|
+
}
|
|
86890
|
+
async function debouncedFetchDerivedVariable(args) {
|
|
85981
86891
|
return new Promise((resolve, reject) => {
|
|
85982
|
-
|
|
86892
|
+
const pending = pendingFetches.get(args.selectorKey);
|
|
86893
|
+
if (pending) {
|
|
86894
|
+
if (pending.timer !== void 0) clearTimeout(pending.timer);
|
|
86895
|
+
pending.args = args;
|
|
86896
|
+
pending.waiters.push({
|
|
86897
|
+
reject,
|
|
86898
|
+
resolve
|
|
86899
|
+
});
|
|
86900
|
+
pending.timer = setTimeout(() => startPendingFetch(args.selectorKey, pending), 10);
|
|
86901
|
+
return;
|
|
86902
|
+
}
|
|
86903
|
+
const next = {
|
|
86904
|
+
args,
|
|
86905
|
+
waiters: [{
|
|
86906
|
+
reject,
|
|
86907
|
+
resolve
|
|
86908
|
+
}]
|
|
86909
|
+
};
|
|
86910
|
+
next.timer = setTimeout(() => startPendingFetch(args.selectorKey, next), 10);
|
|
86911
|
+
pendingFetches.set(args.selectorKey, next);
|
|
85983
86912
|
});
|
|
85984
86913
|
}
|
|
85985
86914
|
/**
|
|
@@ -86061,9 +86990,11 @@ ${String(error)}`;
|
|
|
86061
86990
|
* @param resolvedVariables resolved values of dependant variables - turned into primitives and Resolved forms
|
|
86062
86991
|
* @param get getter function to resolve atoms to values
|
|
86063
86992
|
* @param triggerList list of trigger info objects
|
|
86064
|
-
* @param
|
|
86993
|
+
* @param selfTriggers triggers owned by this request identity
|
|
86994
|
+
* @param childTriggers triggers owned by nested variables
|
|
86065
86995
|
*/
|
|
86066
|
-
function resolveDerivedValue({ key, variables, deps, resolvedVariables, resolutionStrategy, triggerList,
|
|
86996
|
+
function resolveDerivedValue({ key, variables, deps, resolvedVariables, resolutionStrategy, triggerList, selfTriggers, childTriggers }) {
|
|
86997
|
+
const triggers = [...selfTriggers, ...childTriggers];
|
|
86067
86998
|
/**
|
|
86068
86999
|
* Array of values:
|
|
86069
87000
|
* - primitive values are resolved to themselves
|
|
@@ -86124,16 +87055,17 @@ ${String(error)}`;
|
|
|
86124
87055
|
};
|
|
86125
87056
|
}
|
|
86126
87057
|
const previousTriggerCounters = previousEntry.args.slice(previousEntry.args.length - triggers.length);
|
|
87058
|
+
const dependenciesChanged = !(0, import_isEqual.default)(previousEntry.args.slice(0, -triggers.length), relevantValues.slice(0, -triggers.length));
|
|
86127
87059
|
let selfTriggerForceKey = null;
|
|
86128
|
-
for (const [idx, triggerValue] of triggers.entries())
|
|
87060
|
+
for (const [idx, triggerValue] of dependenciesChanged ? [] : triggers.entries())
|
|
86129
87061
|
/**
|
|
86130
87062
|
* If any of the nested trigger value has changed (this execution was caused by a trigger)
|
|
86131
87063
|
* handle the force_key appropriately
|
|
86132
87064
|
*/
|
|
86133
87065
|
if (triggerValue.inc !== previousTriggerCounters[idx]) {
|
|
86134
|
-
if (idx
|
|
87066
|
+
if (idx < selfTriggers.length) selfTriggerForceKey = triggerValue.force_key;
|
|
86135
87067
|
else if (triggerValue.force_key) {
|
|
86136
|
-
const triggerInfo = triggerList[idx -
|
|
87068
|
+
const triggerInfo = triggerList[idx - selfTriggers.length];
|
|
86137
87069
|
if (triggerInfo.path.length === 0) selfTriggerForceKey = triggerValue.force_key;
|
|
86138
87070
|
else (0, import_set.default)(values, [...triggerInfo.path, "force_key"], triggerValue.force_key);
|
|
86139
87071
|
}
|
|
@@ -86181,9 +87113,9 @@ ${String(error)}`;
|
|
|
86181
87113
|
}));
|
|
86182
87114
|
const selfTrigger = get(getOrRegisterTrigger(variable));
|
|
86183
87115
|
const selectorKey = key + extrasSerializable.toJSON();
|
|
87116
|
+
const pollingTrigger = get(getOrRegisterPollingTrigger(getRegistryKey(variable, "derived-selector") + extrasSerializable.toJSON()));
|
|
86184
87117
|
const triggerList = buildTriggerList(variable.variables);
|
|
86185
|
-
const
|
|
86186
|
-
triggers.unshift(selfTrigger);
|
|
87118
|
+
const childTriggers = registerChildTriggers(triggerList, get);
|
|
86187
87119
|
return resolveDerivedValue({
|
|
86188
87120
|
key: selectorKey,
|
|
86189
87121
|
variables: variable.variables,
|
|
@@ -86194,7 +87126,8 @@ ${String(error)}`;
|
|
|
86194
87126
|
get
|
|
86195
87127
|
},
|
|
86196
87128
|
triggerList,
|
|
86197
|
-
|
|
87129
|
+
selfTriggers: [selfTrigger, pollingTrigger],
|
|
87130
|
+
childTriggers
|
|
86198
87131
|
});
|
|
86199
87132
|
},
|
|
86200
87133
|
key: nanoid$1()
|
|
@@ -86228,68 +87161,104 @@ ${String(error)}`;
|
|
|
86228
87161
|
error.selectorExtras = extrasSerializable.toJSON();
|
|
86229
87162
|
throw error;
|
|
86230
87163
|
};
|
|
86231
|
-
const handleError = (func) => {
|
|
86232
|
-
try {
|
|
86233
|
-
return func();
|
|
86234
|
-
} catch (e) {
|
|
86235
|
-
throwError(e);
|
|
86236
|
-
}
|
|
86237
|
-
};
|
|
86238
87164
|
let derivedResult = get(getOrRegisterDerivedVariableResult(variable, wsClient, taskContext, extrasSerializable.extras));
|
|
86239
87165
|
if (derivedResult.type === "previous") return derivedResult.entry.result;
|
|
86240
87166
|
const { extras } = extrasSerializable;
|
|
86241
|
-
|
|
86242
|
-
|
|
86243
|
-
|
|
86244
|
-
|
|
86245
|
-
|
|
86246
|
-
|
|
86247
|
-
|
|
86248
|
-
|
|
86249
|
-
|
|
86250
|
-
|
|
86251
|
-
|
|
86252
|
-
|
|
86253
|
-
|
|
86254
|
-
|
|
86255
|
-
|
|
86256
|
-
|
|
86257
|
-
|
|
86258
|
-
|
|
86259
|
-
|
|
86260
|
-
|
|
86261
|
-
|
|
86262
|
-
|
|
86263
|
-
|
|
86264
|
-
|
|
86265
|
-
|
|
86266
|
-
|
|
86267
|
-
|
|
86268
|
-
} catch (e) {
|
|
86269
|
-
throwError(e);
|
|
87167
|
+
const currentResult = derivedResult.type === "current" ? derivedResult : void 0;
|
|
87168
|
+
const pollRequest = isPollForceKey(currentResult?.selfTriggerForceKey);
|
|
87169
|
+
const inputKey = currentResult ? JSON.stringify({
|
|
87170
|
+
forceKey: currentResult.selfTriggerForceKey,
|
|
87171
|
+
values: currentResult.values
|
|
87172
|
+
}) : void 0;
|
|
87173
|
+
const fetchValue = async (signal) => {
|
|
87174
|
+
let variableResponse = null;
|
|
87175
|
+
let shouldFetchTask = false;
|
|
87176
|
+
if (derivedResult.type === "cached") {
|
|
87177
|
+
const response = await derivedResult.response.getValue();
|
|
87178
|
+
shouldFetchTask = true;
|
|
87179
|
+
if (!response.ok) throwError(new Error(response.value));
|
|
87180
|
+
variableResponse = response.value;
|
|
87181
|
+
derivedResult = derivedResult.currentResult;
|
|
87182
|
+
} else {
|
|
87183
|
+
signal.addEventListener("abort", () => taskContext.cleanupRunningTasks(variable.uid), { once: true });
|
|
87184
|
+
variableResponse = await debouncedFetchDerivedVariable({
|
|
87185
|
+
cache: variable.cache,
|
|
87186
|
+
extras,
|
|
87187
|
+
force_key: currentResult.selfTriggerForceKey,
|
|
87188
|
+
selectorKey,
|
|
87189
|
+
signal,
|
|
87190
|
+
values: normalizeRequest(cleanArgs(currentResult.values), variable.variables),
|
|
87191
|
+
variableUid: variable.uid,
|
|
87192
|
+
wsClient
|
|
87193
|
+
});
|
|
86270
87194
|
}
|
|
86271
|
-
|
|
86272
|
-
|
|
86273
|
-
|
|
86274
|
-
|
|
86275
|
-
|
|
86276
|
-
|
|
86277
|
-
|
|
86278
|
-
|
|
86279
|
-
|
|
87195
|
+
signal?.throwIfAborted();
|
|
87196
|
+
let variableValue = NOT_SET$1;
|
|
87197
|
+
taskContext.cleanupRunningTasks(variable.uid);
|
|
87198
|
+
if (isTaskResponse(variableResponse)) {
|
|
87199
|
+
const taskId = variableResponse.task_id;
|
|
87200
|
+
if (shouldFetchTask) {
|
|
87201
|
+
const taskResult = await fetchTaskResult(taskId, {
|
|
87202
|
+
...extras,
|
|
87203
|
+
signal
|
|
87204
|
+
});
|
|
87205
|
+
if (taskResult.status === "ok") variableValue = taskResult.result;
|
|
86280
87206
|
}
|
|
86281
|
-
variableValue
|
|
86282
|
-
|
|
87207
|
+
if (variableValue === NOT_SET$1) {
|
|
87208
|
+
taskContext.startTask(taskId, variable.uid, getRegistryKey(variable, "trigger"));
|
|
87209
|
+
try {
|
|
87210
|
+
await waitOrAbort(wsClient.waitForTask(taskId), signal);
|
|
87211
|
+
} catch (e) {
|
|
87212
|
+
if (e instanceof TaskError || isAbortError(e)) throw e;
|
|
87213
|
+
return null;
|
|
87214
|
+
} finally {
|
|
87215
|
+
taskContext.endTask(taskId);
|
|
87216
|
+
}
|
|
87217
|
+
const result = await fetchTaskResult(taskId, {
|
|
87218
|
+
...extras,
|
|
87219
|
+
signal
|
|
87220
|
+
});
|
|
86283
87221
|
if (result.status === "not_found") throw new Error("Task result not found");
|
|
86284
|
-
|
|
86285
|
-
}
|
|
86286
|
-
}
|
|
86287
|
-
|
|
86288
|
-
|
|
86289
|
-
|
|
86290
|
-
|
|
86291
|
-
|
|
86292
|
-
|
|
87222
|
+
variableValue = result.result;
|
|
87223
|
+
}
|
|
87224
|
+
} else variableValue = variableResponse.value;
|
|
87225
|
+
return variableValue;
|
|
87226
|
+
};
|
|
87227
|
+
if (!currentResult) try {
|
|
87228
|
+
const variableValue = await fetchValue();
|
|
87229
|
+
depsRegistry.set(derivedResult.depsKey, {
|
|
87230
|
+
args: derivedResult.relevantValues,
|
|
87231
|
+
result: variableValue
|
|
87232
|
+
});
|
|
87233
|
+
return variableValue;
|
|
87234
|
+
} catch (error) {
|
|
87235
|
+
return throwError(error);
|
|
87236
|
+
}
|
|
87237
|
+
const runResult = currentResult;
|
|
87238
|
+
try {
|
|
87239
|
+
return await runPoll({
|
|
87240
|
+
cause: pollRequest ? "poll" : "dependency",
|
|
87241
|
+
inputKey,
|
|
87242
|
+
key: selectorKey,
|
|
87243
|
+
read: () => {
|
|
87244
|
+
const saved = depsRegistry.get(runResult.depsKey);
|
|
87245
|
+
return saved ? {
|
|
87246
|
+
found: true,
|
|
87247
|
+
value: saved.result
|
|
87248
|
+
} : { found: false };
|
|
87249
|
+
},
|
|
87250
|
+
signal: extras.signal ?? void 0,
|
|
87251
|
+
work: fetchValue,
|
|
87252
|
+
write: (variableValue) => {
|
|
87253
|
+
depsRegistry.set(runResult.depsKey, {
|
|
87254
|
+
args: runResult.relevantValues,
|
|
87255
|
+
result: variableValue
|
|
87256
|
+
});
|
|
87257
|
+
}
|
|
87258
|
+
});
|
|
87259
|
+
} catch (error) {
|
|
87260
|
+
return throwError(error);
|
|
87261
|
+
}
|
|
86293
87262
|
},
|
|
86294
87263
|
key: nanoid$1()
|
|
86295
87264
|
}));
|
|
@@ -86341,7 +87310,7 @@ ${String(error)}`;
|
|
|
86341
87310
|
* Otherwise, returns an object with values so be sent to the backend
|
|
86342
87311
|
* and handles to resolve the cached promise to the result.
|
|
86343
87312
|
*/
|
|
86344
|
-
function preloadDerivedValue({ key, variables, deps, triggerList,
|
|
87313
|
+
function preloadDerivedValue({ key, variables, deps, triggerList, selfTriggers, childTriggers, snapshot, params }) {
|
|
86345
87314
|
const derivedResult = resolveDerivedValue({
|
|
86346
87315
|
key,
|
|
86347
87316
|
variables,
|
|
@@ -86353,7 +87322,8 @@ ${String(error)}`;
|
|
|
86353
87322
|
params
|
|
86354
87323
|
},
|
|
86355
87324
|
triggerList,
|
|
86356
|
-
|
|
87325
|
+
selfTriggers,
|
|
87326
|
+
childTriggers
|
|
86357
87327
|
});
|
|
86358
87328
|
if (derivedResult.type === "previous") return null;
|
|
86359
87329
|
return {
|
|
@@ -86366,16 +87336,16 @@ ${String(error)}`;
|
|
|
86366
87336
|
*/
|
|
86367
87337
|
function preloadDerivedVariable(variable, snapshot, params) {
|
|
86368
87338
|
const key = getRegistryKey(variable, "result-selector") + new RequestExtrasSerializable({}).toJSON();
|
|
86369
|
-
const
|
|
86370
|
-
|
|
86371
|
-
|
|
86372
|
-
|
|
86373
|
-
const triggers = triggerList.map((ti) => resolveTriggerStatic(getOrRegisterTrigger(ti.variable), snapshot));
|
|
87339
|
+
const requestKey = getRegistryKey(variable, "derived-selector") + new RequestExtrasSerializable({}).toJSON();
|
|
87340
|
+
const triggerList = buildTriggerList(variable.variables);
|
|
87341
|
+
const selfTriggers = [resolveTriggerStatic(getOrRegisterTrigger(variable), snapshot), resolveTriggerStatic(getOrRegisterPollingTrigger(requestKey), snapshot)];
|
|
87342
|
+
const childTriggers = triggerList.map((ti) => resolveTriggerStatic(getOrRegisterTrigger(ti.variable), snapshot));
|
|
86374
87343
|
return preloadDerivedValue({
|
|
86375
87344
|
key,
|
|
86376
87345
|
variables: variable.variables,
|
|
86377
87346
|
deps: variable.deps,
|
|
86378
|
-
|
|
87347
|
+
selfTriggers,
|
|
87348
|
+
childTriggers,
|
|
86379
87349
|
triggerList,
|
|
86380
87350
|
snapshot,
|
|
86381
87351
|
params
|
|
@@ -86389,14 +87359,17 @@ ${String(error)}`;
|
|
|
86389
87359
|
* @param taskContext global task context
|
|
86390
87360
|
* @param search search query
|
|
86391
87361
|
* @param extras request extras to be merged into the options
|
|
87362
|
+
* @param pollScope render-local scope for requests started before commit
|
|
86392
87363
|
*/
|
|
86393
|
-
function useDerivedVariable(variable, WsClient, taskContext, extras, pollingInterval) {
|
|
87364
|
+
function useDerivedVariable(variable, WsClient, taskContext, extras, pollingInterval, pollScope) {
|
|
86394
87365
|
const dvSelector = getOrRegisterDerivedVariable(variable, WsClient, taskContext, extras);
|
|
86395
|
-
const
|
|
86396
|
-
|
|
86397
|
-
|
|
87366
|
+
const pollingKey = getRegistryKey(variable, "derived-selector") + new RequestExtrasSerializable(extras).toJSON();
|
|
87367
|
+
usePollKey(pollScope, pollingKey);
|
|
87368
|
+
const triggerUpdates = Recoil_index_24((0, react$3.useMemo)(() => getOrRegisterPollingTrigger(pollingKey), [pollingKey]));
|
|
87369
|
+
usePolling(pollingKey, pollingInterval, (0, react$3.useCallback)(() => triggerUpdates((val) => ({
|
|
87370
|
+
force_key: createPollForceKey(),
|
|
86398
87371
|
inc: val.inc + 1
|
|
86399
|
-
})), [triggerUpdates])
|
|
87372
|
+
})), [triggerUpdates]));
|
|
86400
87373
|
return dvSelector;
|
|
86401
87374
|
}
|
|
86402
87375
|
//#endregion
|
|
@@ -87415,6 +88388,37 @@ ${String(error)}`;
|
|
|
87415
88388
|
* This allows Recoil to properly release instances when components unmount.
|
|
87416
88389
|
*/
|
|
87417
88390
|
var streamSelectorFamilyRegistry = /* @__PURE__ */ new Map();
|
|
88391
|
+
var STREAM_EVENT_TYPES = /* @__PURE__ */ new Set([
|
|
88392
|
+
"add",
|
|
88393
|
+
"remove",
|
|
88394
|
+
"clear",
|
|
88395
|
+
"replace",
|
|
88396
|
+
"json_snapshot",
|
|
88397
|
+
"json_patch",
|
|
88398
|
+
"reconnect",
|
|
88399
|
+
"error"
|
|
88400
|
+
]);
|
|
88401
|
+
/**
|
|
88402
|
+
* Parse an SSE message into a supported StreamEvent.
|
|
88403
|
+
*
|
|
88404
|
+
* Comment-only SSE frames are delivered by fetch-event-source as messages with
|
|
88405
|
+
* empty data. They are transport heartbeats rather than application events.
|
|
88406
|
+
*/
|
|
88407
|
+
function parseStreamEventMessage(message) {
|
|
88408
|
+
if (message.data.trim() === "") return null;
|
|
88409
|
+
let parsed;
|
|
88410
|
+
try {
|
|
88411
|
+
parsed = JSON.parse(message.data);
|
|
88412
|
+
} catch (parseError) {
|
|
88413
|
+
console.error("Failed to parse SSE event:", parseError, message.data);
|
|
88414
|
+
return null;
|
|
88415
|
+
}
|
|
88416
|
+
if (parsed === null || typeof parsed !== "object" || !("type" in parsed) || typeof parsed.type !== "string" || !STREAM_EVENT_TYPES.has(parsed.type)) {
|
|
88417
|
+
console.error("Unsupported SSE event:", parsed);
|
|
88418
|
+
return null;
|
|
88419
|
+
}
|
|
88420
|
+
return parsed;
|
|
88421
|
+
}
|
|
87418
88422
|
/**
|
|
87419
88423
|
* Extract a key from an item using the key_accessor path.
|
|
87420
88424
|
*
|
|
@@ -87556,12 +88560,17 @@ ${String(error)}`;
|
|
|
87556
88560
|
* @returns The value to expose to components
|
|
87557
88561
|
*/
|
|
87558
88562
|
function getStreamValue(state, keyAccessor) {
|
|
88563
|
+
if (state.status === "error") throw new UserError(state.error ?? "Stream failed");
|
|
87559
88564
|
if (keyAccessor !== null && state.data !== null && typeof state.data === "object" && !Array.isArray(state.data)) return Object.values(state.data);
|
|
87560
88565
|
return state.data;
|
|
87561
88566
|
}
|
|
87562
88567
|
var MAX_RETRIES = 5;
|
|
87563
88568
|
var BASE_DELAY_MS = 1e3;
|
|
87564
88569
|
var MAX_DELAY_MS = 3e4;
|
|
88570
|
+
/** Error that should stop the SSE connection rather than be retried. */
|
|
88571
|
+
var FatalStreamError = class extends Error {};
|
|
88572
|
+
/** Error that should be handled by the SSE retry policy. */
|
|
88573
|
+
var RetriableStreamError = class extends Error {};
|
|
87565
88574
|
/**
|
|
87566
88575
|
* Calculate exponential backoff delay.
|
|
87567
88576
|
*/
|
|
@@ -87591,52 +88600,62 @@ ${String(error)}`;
|
|
|
87591
88600
|
let retryCount = 0;
|
|
87592
88601
|
let isFirstMessage = true;
|
|
87593
88602
|
let currentState = INITIAL_CONNECTED_STATE;
|
|
88603
|
+
let terminalErrorReported = false;
|
|
87594
88604
|
const normalizedValues = normalizeRequest(params.resolvedValues, params.variables);
|
|
88605
|
+
const reportTerminalError = (error) => {
|
|
88606
|
+
if (terminalErrorReported) return;
|
|
88607
|
+
terminalErrorReported = true;
|
|
88608
|
+
callbacks.onError(error instanceof Error ? error.message : String(error));
|
|
88609
|
+
};
|
|
87595
88610
|
fetchEventSource(`/api/core/stream/${params.uid}`, {
|
|
88611
|
+
...params.extras,
|
|
87596
88612
|
method: HTTP_METHOD.POST,
|
|
87597
88613
|
body: JSON.stringify({ values: normalizedValues }),
|
|
87598
88614
|
signal: controller.signal,
|
|
87599
88615
|
onopen: async (response) => {
|
|
87600
|
-
if (response.ok)
|
|
87601
|
-
retryCount = 0;
|
|
87602
|
-
return;
|
|
87603
|
-
}
|
|
88616
|
+
if (response.ok) return;
|
|
87604
88617
|
if (await handleAuthErrors(response, { authenticationFailureRedirect: "login" })) controller.abort();
|
|
87605
88618
|
throw /* @__PURE__ */ new Error(`Stream request failed: ${response.status} ${response.statusText}`);
|
|
87606
88619
|
},
|
|
87607
88620
|
onmessage: (msg) => {
|
|
87608
|
-
|
|
87609
|
-
|
|
87610
|
-
event = JSON.parse(msg.data);
|
|
87611
|
-
} catch (parseError) {
|
|
87612
|
-
console.error("Failed to parse SSE event:", parseError, msg.data);
|
|
87613
|
-
return;
|
|
87614
|
-
}
|
|
88621
|
+
const event = parseStreamEventMessage(msg);
|
|
88622
|
+
if (event === null) return;
|
|
87615
88623
|
if (event.type === "reconnect") {
|
|
87616
88624
|
console.info("StreamVariable: Server requested reconnect, reconnecting...");
|
|
87617
|
-
throw new
|
|
88625
|
+
throw new RetriableStreamError("Server requested reconnect");
|
|
87618
88626
|
}
|
|
87619
|
-
|
|
88627
|
+
if (event.type === "error") throw new FatalStreamError(typeof event.data === "string" ? event.data : "Unknown error");
|
|
88628
|
+
const nextState = applyStreamEvent(currentState, event, params.keyAccessor);
|
|
88629
|
+
if (nextState === currentState || nextState.status === "error") throw new FatalStreamError(nextState.error ?? `Stream event "${event.type}" could not be applied`);
|
|
88630
|
+
retryCount = 0;
|
|
88631
|
+
currentState = nextState;
|
|
87620
88632
|
if (isFirstMessage) {
|
|
87621
88633
|
isFirstMessage = false;
|
|
87622
88634
|
callbacks.onFirstData(currentState);
|
|
87623
88635
|
} else callbacks.onUpdate(currentState);
|
|
87624
88636
|
},
|
|
87625
88637
|
onerror: (err) => {
|
|
87626
|
-
if (controller.signal.aborted)
|
|
88638
|
+
if (controller.signal.aborted) throw err;
|
|
88639
|
+
if (err instanceof FatalStreamError) {
|
|
88640
|
+
reportTerminalError(err);
|
|
88641
|
+
throw err;
|
|
88642
|
+
}
|
|
87627
88643
|
retryCount++;
|
|
87628
88644
|
if (retryCount > MAX_RETRIES) {
|
|
87629
|
-
|
|
87630
|
-
|
|
88645
|
+
reportTerminalError(err);
|
|
88646
|
+
throw err;
|
|
87631
88647
|
}
|
|
87632
88648
|
const delay = getBackoffDelay(retryCount - 1);
|
|
87633
88649
|
console.warn(`Stream connection failed, retrying in ${delay}ms (attempt ${retryCount}/${MAX_RETRIES})...`);
|
|
87634
88650
|
return delay;
|
|
87635
88651
|
},
|
|
87636
|
-
onclose: () => {
|
|
88652
|
+
onclose: () => {
|
|
88653
|
+
throw new RetriableStreamError("Stream closed unexpectedly");
|
|
88654
|
+
},
|
|
87637
88655
|
fetch: request,
|
|
87638
|
-
...params.extras,
|
|
87639
88656
|
headers: params.extras.headers
|
|
88657
|
+
}).catch((error) => {
|
|
88658
|
+
if (!controller.signal.aborted) reportTerminalError(error);
|
|
87640
88659
|
});
|
|
87641
88660
|
return {
|
|
87642
88661
|
cleanup: () => {
|
|
@@ -87657,10 +88676,8 @@ ${String(error)}`;
|
|
|
87657
88676
|
return ({ setSelf }) => {
|
|
87658
88677
|
const params = deserializeAtomParams(atomKey);
|
|
87659
88678
|
let resolveInitialData = null;
|
|
87660
|
-
|
|
87661
|
-
setSelf(new Promise((resolve, reject) => {
|
|
88679
|
+
setSelf(new Promise((resolve) => {
|
|
87662
88680
|
resolveInitialData = resolve;
|
|
87663
|
-
rejectInitialData = reject;
|
|
87664
88681
|
}));
|
|
87665
88682
|
const startConnection = () => {
|
|
87666
88683
|
return startStreamConnection(params, {
|
|
@@ -87668,7 +88685,6 @@ ${String(error)}`;
|
|
|
87668
88685
|
if (resolveInitialData) {
|
|
87669
88686
|
resolveInitialData(state);
|
|
87670
88687
|
resolveInitialData = null;
|
|
87671
|
-
rejectInitialData = null;
|
|
87672
88688
|
}
|
|
87673
88689
|
setSelf(state);
|
|
87674
88690
|
},
|
|
@@ -87676,15 +88692,16 @@ ${String(error)}`;
|
|
|
87676
88692
|
setSelf(state);
|
|
87677
88693
|
},
|
|
87678
88694
|
onError: (error) => {
|
|
87679
|
-
|
|
87680
|
-
rejectInitialData(new Error(error));
|
|
87681
|
-
resolveInitialData = null;
|
|
87682
|
-
rejectInitialData = null;
|
|
87683
|
-
} else setSelf({
|
|
88695
|
+
const errorState = {
|
|
87684
88696
|
data: void 0,
|
|
87685
88697
|
status: "error",
|
|
87686
88698
|
error
|
|
87687
|
-
}
|
|
88699
|
+
};
|
|
88700
|
+
if (resolveInitialData) {
|
|
88701
|
+
resolveInitialData(errorState);
|
|
88702
|
+
resolveInitialData = null;
|
|
88703
|
+
}
|
|
88704
|
+
setSelf(errorState);
|
|
87688
88705
|
}
|
|
87689
88706
|
});
|
|
87690
88707
|
};
|
|
@@ -87898,7 +88915,7 @@ ${String(error)}`;
|
|
|
87898
88915
|
variable: await resolveVariable(resolvedValue.variable, client, taskContext, extras, resolver)
|
|
87899
88916
|
};
|
|
87900
88917
|
const resolvedValueMap = isVariable(variable.value_map) ? await resolveVariable(variable.value_map, client, taskContext, extras, resolver) : variable.value_map;
|
|
87901
|
-
const resolvedDefault = isVariable(variable.default) ? await resolveVariable(variable.default, client, taskContext, extras, resolver) : variable.default;
|
|
88918
|
+
const resolvedDefault = variable.default !== void 0 && isVariable(variable.default) ? await resolveVariable(variable.default, client, taskContext, extras, resolver) : variable.default;
|
|
87902
88919
|
return {
|
|
87903
88920
|
type: "switch",
|
|
87904
88921
|
uid: variable.uid,
|
|
@@ -89158,6 +90175,22 @@ ${String(error)}`;
|
|
|
89158
90175
|
return theme;
|
|
89159
90176
|
}
|
|
89160
90177
|
//#endregion
|
|
90178
|
+
//#region js/shared/utils/use-interval.tsx
|
|
90179
|
+
/**
|
|
90180
|
+
* Helper hook that runs a function after given intervals
|
|
90181
|
+
*
|
|
90182
|
+
* @param callback the function to run after each interval
|
|
90183
|
+
* @param delay the delay in seconds between each interval
|
|
90184
|
+
*/
|
|
90185
|
+
function useInterval(callback, delay) {
|
|
90186
|
+
(0, react$3.useEffect)(() => {
|
|
90187
|
+
if (delay) {
|
|
90188
|
+
const id = setInterval(callback, delay * 1e3);
|
|
90189
|
+
return () => clearInterval(id);
|
|
90190
|
+
}
|
|
90191
|
+
}, useDeepCompare([delay, callback]));
|
|
90192
|
+
}
|
|
90193
|
+
//#endregion
|
|
89161
90194
|
//#region js/shared/utils/use-previous.tsx
|
|
89162
90195
|
/**
|
|
89163
90196
|
* A helper hook to keep track of the previous value of a variable.
|
|
@@ -89465,7 +90498,7 @@ ${String(error)}`;
|
|
|
89465
90498
|
return desc ? -comparison : comparison;
|
|
89466
90499
|
});
|
|
89467
90500
|
}
|
|
89468
|
-
const startIndex = pagination.offset
|
|
90501
|
+
const startIndex = pagination.offset ?? 0;
|
|
89469
90502
|
const endIndex = pagination.limit ? startIndex + pagination.limit : filteredData.length;
|
|
89470
90503
|
filteredData = filteredData.slice(startIndex, endIndex);
|
|
89471
90504
|
}
|
|
@@ -89966,7 +90999,7 @@ ${String(error)}`;
|
|
|
89966
90999
|
if (result instanceof Promise) promiseChain = result;
|
|
89967
91000
|
}
|
|
89968
91001
|
}
|
|
89969
|
-
return promiseChain
|
|
91002
|
+
return promiseChain ?? void 0;
|
|
89970
91003
|
}, []);
|
|
89971
91004
|
}
|
|
89972
91005
|
/**
|
|
@@ -90130,6 +91163,12 @@ ${String(error)}`;
|
|
|
90130
91163
|
return key;
|
|
90131
91164
|
}
|
|
90132
91165
|
/**
|
|
91166
|
+
* Generate the request identity used for polling and cancellation.
|
|
91167
|
+
*/
|
|
91168
|
+
function getServerComponentRequestKey(uid, loopInstanceUid, extras) {
|
|
91169
|
+
return getComponentRegistryKey(uid, false, loopInstanceUid) + new RequestExtrasSerializable(extras).toJSON();
|
|
91170
|
+
}
|
|
91171
|
+
/**
|
|
90133
91172
|
* Fetch a component from the backend, expects a component instance to be returned.
|
|
90134
91173
|
*
|
|
90135
91174
|
* @param component the component to fetch
|
|
@@ -90138,7 +91177,7 @@ ${String(error)}`;
|
|
|
90138
91177
|
* @param extras request extras to be merged into the options
|
|
90139
91178
|
* @param wsClient websocket client
|
|
90140
91179
|
*/
|
|
90141
|
-
async function fetchFunctionComponent(component, values, uid, extras, wsClient) {
|
|
91180
|
+
async function fetchFunctionComponent(component, values, uid, extras, wsClient, signal) {
|
|
90142
91181
|
const ws_channel = await wsClient.getChannel();
|
|
90143
91182
|
const res = await request(`/api/core/components/${component}`, {
|
|
90144
91183
|
body: JSON.stringify({
|
|
@@ -90147,9 +91186,13 @@ ${String(error)}`;
|
|
|
90147
91186
|
ws_channel
|
|
90148
91187
|
}),
|
|
90149
91188
|
method: HTTP_METHOD.POST
|
|
90150
|
-
}, extras);
|
|
91189
|
+
}, extras, { signal });
|
|
90151
91190
|
await handleAuthErrors(res, { authenticationFailureRedirect: "login" });
|
|
90152
|
-
|
|
91191
|
+
try {
|
|
91192
|
+
await validateResponse(res, `Failed to fetch the component: ${component}`);
|
|
91193
|
+
} catch (error) {
|
|
91194
|
+
throw markRetryAfter(error, res);
|
|
91195
|
+
}
|
|
90153
91196
|
return await res.json();
|
|
90154
91197
|
}
|
|
90155
91198
|
function getOrRegisterComponentTrigger(uid, loop_instance_uid) {
|
|
@@ -90185,25 +91228,19 @@ ${String(error)}`;
|
|
|
90185
91228
|
error.selectorExtras = extrasSerializable.toJSON();
|
|
90186
91229
|
throw error;
|
|
90187
91230
|
};
|
|
90188
|
-
const
|
|
90189
|
-
try {
|
|
90190
|
-
return func();
|
|
90191
|
-
} catch (e) {
|
|
90192
|
-
throwError(e);
|
|
90193
|
-
}
|
|
90194
|
-
};
|
|
91231
|
+
const selectorKey = key + extrasSerializable.toJSON();
|
|
90195
91232
|
const resolvedKwargs = await Promise.all(Object.entries(dynamicKwargs).map(async ([k, value]) => {
|
|
90196
91233
|
return [k, isVariable(value) ? await resolveVariable(value, wsClient, taskContext, currentExtras) : value];
|
|
90197
91234
|
})).then((entries) => Object.fromEntries(entries));
|
|
90198
91235
|
const resolvedKwargsList = Object.values(resolvedKwargs);
|
|
90199
91236
|
const kwargsList = Object.values(dynamicKwargs);
|
|
90200
91237
|
const selfTrigger = get(getOrRegisterComponentTrigger(uid, loop_instance_uid));
|
|
91238
|
+
const pollingTrigger = get(getOrRegisterPollingTrigger(selectorKey));
|
|
90201
91239
|
const triggerList = buildTriggerList(kwargsList);
|
|
90202
|
-
const
|
|
90203
|
-
triggers.unshift(selfTrigger);
|
|
91240
|
+
const childTriggers = registerChildTriggers(triggerList, get);
|
|
90204
91241
|
const { extras } = extrasSerializable;
|
|
90205
91242
|
let derivedResult = resolveDerivedValue({
|
|
90206
|
-
key,
|
|
91243
|
+
key: selectorKey,
|
|
90207
91244
|
variables: kwargsList,
|
|
90208
91245
|
deps: kwargsList,
|
|
90209
91246
|
resolvedVariables: resolvedKwargsList,
|
|
@@ -90212,59 +91249,97 @@ ${String(error)}`;
|
|
|
90212
91249
|
get
|
|
90213
91250
|
},
|
|
90214
91251
|
triggerList,
|
|
90215
|
-
|
|
91252
|
+
selfTriggers: [selfTrigger, pollingTrigger],
|
|
91253
|
+
childTriggers
|
|
90216
91254
|
});
|
|
90217
91255
|
if (derivedResult.type === "previous") return derivedResult.entry.result;
|
|
90218
|
-
|
|
90219
|
-
|
|
90220
|
-
|
|
90221
|
-
|
|
90222
|
-
|
|
90223
|
-
|
|
90224
|
-
|
|
90225
|
-
|
|
90226
|
-
|
|
90227
|
-
|
|
90228
|
-
|
|
90229
|
-
|
|
90230
|
-
|
|
90231
|
-
|
|
90232
|
-
|
|
90233
|
-
}
|
|
90234
|
-
|
|
90235
|
-
|
|
90236
|
-
|
|
90237
|
-
|
|
90238
|
-
|
|
90239
|
-
|
|
90240
|
-
|
|
90241
|
-
|
|
90242
|
-
|
|
90243
|
-
|
|
90244
|
-
|
|
90245
|
-
|
|
90246
|
-
|
|
90247
|
-
|
|
90248
|
-
|
|
90249
|
-
|
|
90250
|
-
|
|
90251
|
-
|
|
90252
|
-
|
|
90253
|
-
taskContext.
|
|
91256
|
+
const currentResult = derivedResult.type === "current" ? derivedResult : void 0;
|
|
91257
|
+
const pollRequest = isPollForceKey(currentResult?.selfTriggerForceKey);
|
|
91258
|
+
const inputKey = currentResult ? JSON.stringify({
|
|
91259
|
+
forceKey: currentResult.selfTriggerForceKey,
|
|
91260
|
+
values: currentResult.values
|
|
91261
|
+
}) : void 0;
|
|
91262
|
+
const fetchComponent = async (signal) => {
|
|
91263
|
+
let result = NOT_SET;
|
|
91264
|
+
let shouldFetchTask = false;
|
|
91265
|
+
if (derivedResult.type === "cached") {
|
|
91266
|
+
const response = await derivedResult.response.getValue();
|
|
91267
|
+
shouldFetchTask = true;
|
|
91268
|
+
if (!response.ok) throwError(new Error(response.value));
|
|
91269
|
+
result = response.value;
|
|
91270
|
+
derivedResult = derivedResult.currentResult;
|
|
91271
|
+
} else {
|
|
91272
|
+
signal.addEventListener("abort", () => taskContext.cleanupRunningTasks(key), { once: true });
|
|
91273
|
+
result = await fetchFunctionComponent(name, normalizeRequest(cleanKwargs(Object.keys(dynamicKwargs).reduce((acc, k, idx) => {
|
|
91274
|
+
acc[k] = currentResult.values[idx];
|
|
91275
|
+
return acc;
|
|
91276
|
+
}, {})), dynamicKwargs), uid, extras, wsClient, signal);
|
|
91277
|
+
}
|
|
91278
|
+
signal?.throwIfAborted();
|
|
91279
|
+
taskContext.cleanupRunningTasks(key);
|
|
91280
|
+
if (isTaskResponse$1(result)) {
|
|
91281
|
+
const taskId = result.task_id;
|
|
91282
|
+
result = NOT_SET;
|
|
91283
|
+
if (shouldFetchTask) {
|
|
91284
|
+
const taskResult = await fetchTaskResult(taskId, {
|
|
91285
|
+
...extras,
|
|
91286
|
+
signal
|
|
91287
|
+
});
|
|
91288
|
+
if (taskResult.status === "ok") result = taskResult.result;
|
|
91289
|
+
}
|
|
91290
|
+
if (result === NOT_SET) {
|
|
91291
|
+
taskContext.startTask(taskId, key, getComponentRegistryKey(uid, true));
|
|
91292
|
+
try {
|
|
91293
|
+
await waitOrAbort(wsClient.waitForTask(taskId), signal);
|
|
91294
|
+
} finally {
|
|
91295
|
+
taskContext.endTask(taskId);
|
|
91296
|
+
}
|
|
91297
|
+
const response = await fetchTaskResult(taskId, {
|
|
91298
|
+
...extras,
|
|
91299
|
+
signal
|
|
91300
|
+
});
|
|
91301
|
+
if (response.status === "not_found") throw new Error("Task result not found");
|
|
91302
|
+
result = response.result;
|
|
90254
91303
|
}
|
|
90255
|
-
result = await handleError(async () => {
|
|
90256
|
-
const res = await fetchTaskResult(taskId, extras);
|
|
90257
|
-
if (res.status === "not_found") throw new Error("Task result not found");
|
|
90258
|
-
return res.result;
|
|
90259
|
-
});
|
|
90260
91304
|
}
|
|
91305
|
+
if (result !== NOT_SET && result !== null) result = denormalize(result.data, result.lookup);
|
|
91306
|
+
return result;
|
|
91307
|
+
};
|
|
91308
|
+
if (!currentResult) try {
|
|
91309
|
+
const result = await fetchComponent();
|
|
91310
|
+
depsRegistry.set(derivedResult.depsKey, {
|
|
91311
|
+
args: derivedResult.relevantValues,
|
|
91312
|
+
result
|
|
91313
|
+
});
|
|
91314
|
+
return result;
|
|
91315
|
+
} catch (error) {
|
|
91316
|
+
return throwError(error);
|
|
91317
|
+
}
|
|
91318
|
+
const runResult = currentResult;
|
|
91319
|
+
try {
|
|
91320
|
+
return await runPoll({
|
|
91321
|
+
cause: pollRequest ? "poll" : "dependency",
|
|
91322
|
+
inputKey,
|
|
91323
|
+
key: selectorKey,
|
|
91324
|
+
read: () => {
|
|
91325
|
+
const saved = depsRegistry.get(runResult.depsKey);
|
|
91326
|
+
return saved ? {
|
|
91327
|
+
found: true,
|
|
91328
|
+
value: saved.result
|
|
91329
|
+
} : { found: false };
|
|
91330
|
+
},
|
|
91331
|
+
signal: extras.signal ?? void 0,
|
|
91332
|
+
work: fetchComponent,
|
|
91333
|
+
write: (result) => {
|
|
91334
|
+
depsRegistry.set(runResult.depsKey, {
|
|
91335
|
+
args: runResult.relevantValues,
|
|
91336
|
+
result
|
|
91337
|
+
});
|
|
91338
|
+
}
|
|
91339
|
+
});
|
|
91340
|
+
} catch (error) {
|
|
91341
|
+
return throwError(error);
|
|
90261
91342
|
}
|
|
90262
|
-
if (result !== NOT_SET && result !== null) result = denormalize(result.data, result.lookup);
|
|
90263
|
-
depsRegistry.set(key, {
|
|
90264
|
-
args: derivedResult.relevantValues,
|
|
90265
|
-
result
|
|
90266
|
-
});
|
|
90267
|
-
return result;
|
|
90268
91343
|
},
|
|
90269
91344
|
key
|
|
90270
91345
|
}));
|
|
@@ -90276,7 +91351,7 @@ ${String(error)}`;
|
|
|
90276
91351
|
return selectorInstance;
|
|
90277
91352
|
}
|
|
90278
91353
|
function preloadServerComponent(component, snapshot, params) {
|
|
90279
|
-
const key =
|
|
91354
|
+
const key = getServerComponentRequestKey(component.uid, component.loop_instance_uid, {});
|
|
90280
91355
|
const kwargsList = Object.values(component.props.dynamic_kwargs);
|
|
90281
91356
|
const triggerList = buildTriggerList(kwargsList);
|
|
90282
91357
|
return preloadDerivedValue({
|
|
@@ -90284,7 +91359,8 @@ ${String(error)}`;
|
|
|
90284
91359
|
variables: kwargsList,
|
|
90285
91360
|
deps: kwargsList,
|
|
90286
91361
|
triggerList,
|
|
90287
|
-
|
|
91362
|
+
selfTriggers: [resolveTriggerStatic(getOrRegisterComponentTrigger(component.uid, component.loop_instance_uid), snapshot), resolveTriggerStatic(getOrRegisterPollingTrigger(key), snapshot)],
|
|
91363
|
+
childTriggers: triggerList.map((ti) => resolveTriggerStatic(getOrRegisterTrigger(ti.variable), snapshot)),
|
|
90288
91364
|
snapshot,
|
|
90289
91365
|
params
|
|
90290
91366
|
});
|
|
@@ -90302,6 +91378,8 @@ ${String(error)}`;
|
|
|
90302
91378
|
const { client: wsClient } = (0, react$3.useContext)(websocketCtx);
|
|
90303
91379
|
const taskContext = useTaskContext();
|
|
90304
91380
|
const variablesContext = (0, react$3.useContext)(variablesCtx);
|
|
91381
|
+
const requestKey = getServerComponentRequestKey(uid, loop_instance_uid, extras);
|
|
91382
|
+
usePollKey(variablesContext?.pollScope, requestKey);
|
|
90305
91383
|
const bus = useEventBus();
|
|
90306
91384
|
variablesContext?.variables.current.add(getComponentRegistryKey(uid));
|
|
90307
91385
|
(0, react$3.useEffect)(() => {
|
|
@@ -90341,6 +91419,18 @@ ${String(error)}`;
|
|
|
90341
91419
|
}));
|
|
90342
91420
|
}, [uid]);
|
|
90343
91421
|
}
|
|
91422
|
+
/**
|
|
91423
|
+
* Refresh one server-component/request-extras identity for polling.
|
|
91424
|
+
*/
|
|
91425
|
+
function usePollServerComponent(uid, loopInstanceUid, extras) {
|
|
91426
|
+
const requestKey = getServerComponentRequestKey(uid, loopInstanceUid, extras);
|
|
91427
|
+
return Recoil_index_31(({ set }) => () => {
|
|
91428
|
+
set(getOrRegisterPollingTrigger(requestKey), (triggerIndexValue) => ({
|
|
91429
|
+
force_key: createPollForceKey(),
|
|
91430
|
+
inc: triggerIndexValue.inc + 1
|
|
91431
|
+
}));
|
|
91432
|
+
}, [requestKey]);
|
|
91433
|
+
}
|
|
90344
91434
|
//#endregion
|
|
90345
91435
|
//#region js/shared/center/center.tsx
|
|
90346
91436
|
var Center = dist_default.div`
|
|
@@ -90797,9 +91887,9 @@ ${String(error)}`;
|
|
|
90797
91887
|
|
|
90798
91888
|
height: min-content;
|
|
90799
91889
|
padding: 1rem;
|
|
91890
|
+
border-radius: 0.25rem;
|
|
90800
91891
|
|
|
90801
91892
|
background-color: ${(props) => curriedTransparentize$1(.9, props.theme.colors.error)};
|
|
90802
|
-
border-radius: 0.25rem;
|
|
90803
91893
|
`);
|
|
90804
91894
|
var IconWrapper = dist_default.div`
|
|
90805
91895
|
display: flex;
|
|
@@ -90844,15 +91934,15 @@ ${String(error)}`;
|
|
|
90844
91934
|
|
|
90845
91935
|
width: 40px;
|
|
90846
91936
|
height: 40px;
|
|
90847
|
-
|
|
90848
|
-
color: ${(props) => props.theme.colors.error};
|
|
90849
|
-
|
|
90850
|
-
background-color: inherit;
|
|
90851
91937
|
border: none;
|
|
90852
91938
|
border: 1px solid;
|
|
90853
91939
|
border-color: ${(props) => props.theme.colors.error};
|
|
90854
91940
|
border-radius: 5px;
|
|
90855
91941
|
|
|
91942
|
+
color: ${(props) => props.theme.colors.error};
|
|
91943
|
+
|
|
91944
|
+
background-color: inherit;
|
|
91945
|
+
|
|
90856
91946
|
transition-timing-function: ease;
|
|
90857
91947
|
transition-duration: 100ms;
|
|
90858
91948
|
transition-property: color, border-color;
|
|
@@ -90863,8 +91953,8 @@ ${String(error)}`;
|
|
|
90863
91953
|
}
|
|
90864
91954
|
|
|
90865
91955
|
&:hover {
|
|
90866
|
-
color: ${(props) => props.theme.colors.errorHover};
|
|
90867
91956
|
border-color: ${(props) => props.theme.colors.errorHover};
|
|
91957
|
+
color: ${(props) => props.theme.colors.errorHover};
|
|
90868
91958
|
|
|
90869
91959
|
i {
|
|
90870
91960
|
transform: rotate(180deg);
|
|
@@ -91036,6 +92126,10 @@ ${String(error)}`;
|
|
|
91036
92126
|
}
|
|
91037
92127
|
const { hasRunningTasks, cleanupRunningTasks } = useTaskContext();
|
|
91038
92128
|
const variables = (0, react$3.useRef)(/* @__PURE__ */ new Set());
|
|
92129
|
+
const variableContext = {
|
|
92130
|
+
pollScope: usePollScope(),
|
|
92131
|
+
variables
|
|
92132
|
+
};
|
|
91039
92133
|
(0, react$3.useEffect)(() => {
|
|
91040
92134
|
return () => {
|
|
91041
92135
|
if (variables.current.size > 0 && hasRunningTasks()) cleanupRunningTasks(...variables.current.values());
|
|
@@ -91050,7 +92144,7 @@ ${String(error)}`;
|
|
|
91050
92144
|
...fallbackProps
|
|
91051
92145
|
}),
|
|
91052
92146
|
onReset: onResetErrorBoundary
|
|
91053
|
-
}, /* @__PURE__ */ React.createElement(fallbackCtx.Provider, { value: { suspend } }, /* @__PURE__ */ React.createElement(variablesCtx.Provider, { value:
|
|
92147
|
+
}, /* @__PURE__ */ React.createElement(fallbackCtx.Provider, { value: { suspend } }, /* @__PURE__ */ React.createElement(variablesCtx.Provider, { value: variableContext }, /* @__PURE__ */ React.createElement(react$3.Suspense, { fallback }, component))));
|
|
91054
92148
|
}
|
|
91055
92149
|
function useResolveDynamicKwargPollingIntervals(dynamicKwargs) {
|
|
91056
92150
|
return (0, react$3.useMemo)(() => {
|
|
@@ -91075,9 +92169,12 @@ ${String(error)}`;
|
|
|
91075
92169
|
function PythonWrapper(props) {
|
|
91076
92170
|
const component = useServerComponent(props.name, props.uid, props.dynamic_kwargs, props.component.loop_instance_uid);
|
|
91077
92171
|
const refresh = useRefreshServerComponent(props.uid, props.component.loop_instance_uid);
|
|
92172
|
+
const extras = useRequestExtras();
|
|
92173
|
+
const poll = usePollServerComponent(props.uid, props.component.loop_instance_uid, extras);
|
|
91078
92174
|
const [componentPollingInterval] = useVariable(props.polling_interval ?? null);
|
|
91079
92175
|
const resolvedKwargPollingIntervals = useResolveDynamicKwargPollingIntervals(props.dynamic_kwargs);
|
|
91080
|
-
|
|
92176
|
+
const pollingInterval = (0, react$3.useMemo)(() => computePollingInterval(resolvedKwargPollingIntervals, componentPollingInterval), [resolvedKwargPollingIntervals, componentPollingInterval]);
|
|
92177
|
+
usePolling(getServerComponentRequestKey(props.uid, props.component.loop_instance_uid, extras), pollingInterval, poll);
|
|
91081
92178
|
if (component === null) return null;
|
|
91082
92179
|
if (isRawString(component)) return /* @__PURE__ */ React.createElement(React.Fragment, null, component.props.content);
|
|
91083
92180
|
if (isInvalidComponent(component)) return /* @__PURE__ */ React.createElement(ErrorDisplay$1, {
|
|
@@ -91270,7 +92367,6 @@ ${String(error)}`;
|
|
|
91270
92367
|
padding-top: 0.25rem;
|
|
91271
92368
|
padding-bottom: 0.25rem;
|
|
91272
92369
|
padding-left: 0.5rem;
|
|
91273
|
-
|
|
91274
92370
|
border-bottom: 1px solid;
|
|
91275
92371
|
border-bottom-color: ${(props) => props.theme.colors.grey5};
|
|
91276
92372
|
`;
|
|
@@ -91306,11 +92402,11 @@ ${String(error)}`;
|
|
|
91306
92402
|
flex-direction: column;
|
|
91307
92403
|
|
|
91308
92404
|
width: 100%;
|
|
92405
|
+
border-left: 1px solid ${(props) => props.theme.colors.grey5};
|
|
91309
92406
|
|
|
91310
92407
|
color: ${(props) => props.theme.colors.text};
|
|
91311
92408
|
|
|
91312
92409
|
background-color: ${(props) => props.theme.colors.blue1};
|
|
91313
|
-
border-left: 1px solid ${(props) => props.theme.colors.grey5};
|
|
91314
92410
|
`;
|
|
91315
92411
|
var HeaderWrapper = dist_default.div`
|
|
91316
92412
|
display: flex;
|
|
@@ -91319,7 +92415,6 @@ ${String(error)}`;
|
|
|
91319
92415
|
|
|
91320
92416
|
width: 100%;
|
|
91321
92417
|
margin: 0 auto;
|
|
91322
|
-
|
|
91323
92418
|
border-bottom: 1px solid;
|
|
91324
92419
|
border-bottom-color: ${(props) => props.theme.colors.grey5};
|
|
91325
92420
|
`;
|
|
@@ -91345,9 +92440,9 @@ ${String(error)}`;
|
|
|
91345
92440
|
}
|
|
91346
92441
|
`;
|
|
91347
92442
|
var SelectionButton = dist_default(button_default)`
|
|
91348
|
-
color: ${(props) => props.theme.colors.text};
|
|
91349
92443
|
border-bottom: 2px solid ${(props) => props.theme.colors.primary};
|
|
91350
92444
|
border-radius: 0;
|
|
92445
|
+
color: ${(props) => props.theme.colors.text};
|
|
91351
92446
|
|
|
91352
92447
|
:hover:not(:disabled) {
|
|
91353
92448
|
color: ${(props) => props.theme.colors.text};
|
|
@@ -91430,13 +92525,13 @@ ${String(error)}`;
|
|
|
91430
92525
|
|
|
91431
92526
|
width: ${50}px;
|
|
91432
92527
|
height: ${50}px;
|
|
92528
|
+
border: 1px solid;
|
|
92529
|
+
border-color: ${(props) => props.theme.colors.secondary};
|
|
92530
|
+
border-radius: 30%;
|
|
91433
92531
|
|
|
91434
92532
|
color: ${(props) => props.theme.colors.blue1};
|
|
91435
92533
|
|
|
91436
92534
|
background-color: ${(props) => props.theme.colors.secondary};
|
|
91437
|
-
border: 1px solid;
|
|
91438
|
-
border-color: ${(props) => props.theme.colors.secondary};
|
|
91439
|
-
border-radius: 30%;
|
|
91440
92535
|
|
|
91441
92536
|
transition: ${(props) => !props.$isDragging ? "left top" : "none"} 150ms ease 0s;
|
|
91442
92537
|
`;
|
|
@@ -91538,9 +92633,9 @@ ${String(error)}`;
|
|
|
91538
92633
|
width: 24px;
|
|
91539
92634
|
height: 100%;
|
|
91540
92635
|
padding: 0;
|
|
92636
|
+
border: 0;
|
|
91541
92637
|
|
|
91542
92638
|
background-color: transparent;
|
|
91543
|
-
border: 0;
|
|
91544
92639
|
`;
|
|
91545
92640
|
/**
|
|
91546
92641
|
* Sidebar resizer.
|
|
@@ -91690,8 +92785,8 @@ ${String(error)}`;
|
|
|
91690
92785
|
}
|
|
91691
92786
|
|
|
91692
92787
|
*::-webkit-scrollbar-track {
|
|
91693
|
-
background: ${(props) => props.theme.colors.grey2};
|
|
91694
92788
|
border-radius: 100px;
|
|
92789
|
+
background: ${(props) => props.theme.colors.grey2};
|
|
91695
92790
|
}
|
|
91696
92791
|
|
|
91697
92792
|
*::-webkit-scrollbar-corner {
|
|
@@ -91699,8 +92794,8 @@ ${String(error)}`;
|
|
|
91699
92794
|
}
|
|
91700
92795
|
|
|
91701
92796
|
*::-webkit-scrollbar-thumb {
|
|
91702
|
-
background-color: ${(props) => props.theme.colors.grey5};
|
|
91703
92797
|
border-radius: 100px;
|
|
92798
|
+
background-color: ${(props) => props.theme.colors.grey5};
|
|
91704
92799
|
}
|
|
91705
92800
|
`;
|
|
91706
92801
|
/**
|
|
@@ -91850,24 +92945,49 @@ ${String(error)}`;
|
|
|
91850
92945
|
* @param signal AbortSignal to abort the generator
|
|
91851
92946
|
*/
|
|
91852
92947
|
async function* ndjson(response, signal) {
|
|
92948
|
+
if (!response.body) throw new Error("Route response body is missing");
|
|
91853
92949
|
const reader = response.body.getReader();
|
|
91854
92950
|
const newline = /\r?\n/;
|
|
91855
92951
|
const decoder = new TextDecoder();
|
|
91856
92952
|
let buffer = "";
|
|
91857
|
-
|
|
91858
|
-
|
|
91859
|
-
|
|
91860
|
-
|
|
91861
|
-
|
|
91862
|
-
|
|
92953
|
+
let cancelPromise;
|
|
92954
|
+
const abortError = () => new DOMException("The operation was aborted", "AbortError");
|
|
92955
|
+
const cancel = (reason) => {
|
|
92956
|
+
cancelPromise ??= reader.cancel(reason).catch(() => void 0);
|
|
92957
|
+
return cancelPromise;
|
|
92958
|
+
};
|
|
92959
|
+
const abort = () => {
|
|
92960
|
+
cancel(signal?.reason ?? abortError());
|
|
92961
|
+
};
|
|
92962
|
+
signal?.addEventListener("abort", abort, { once: true });
|
|
92963
|
+
try {
|
|
92964
|
+
while (true) {
|
|
92965
|
+
if (signal?.aborted) throw abortError();
|
|
92966
|
+
const { done, value } = await reader.read();
|
|
92967
|
+
if (signal?.aborted) throw abortError();
|
|
92968
|
+
if (done) {
|
|
92969
|
+
if (buffer.length > 0) yield JSON.parse(buffer);
|
|
92970
|
+
return;
|
|
92971
|
+
}
|
|
92972
|
+
const chunk = decoder.decode(value, { stream: true });
|
|
92973
|
+
buffer += chunk;
|
|
92974
|
+
const parts = buffer.split(newline);
|
|
92975
|
+
buffer = parts.pop();
|
|
92976
|
+
for (const part of parts) yield JSON.parse(part);
|
|
91863
92977
|
}
|
|
91864
|
-
|
|
91865
|
-
|
|
91866
|
-
|
|
91867
|
-
|
|
91868
|
-
|
|
92978
|
+
} catch (error) {
|
|
92979
|
+
await cancel(error);
|
|
92980
|
+
throw error;
|
|
92981
|
+
} finally {
|
|
92982
|
+
signal?.removeEventListener("abort", abort);
|
|
92983
|
+
reader.releaseLock();
|
|
91869
92984
|
}
|
|
91870
92985
|
}
|
|
92986
|
+
function rejectPending(handle, error) {
|
|
92987
|
+
if (handle.status !== "pending") return;
|
|
92988
|
+
handle.getValue().catch(() => void 0);
|
|
92989
|
+
handle.reject(error);
|
|
92990
|
+
}
|
|
91871
92991
|
/**
|
|
91872
92992
|
* Fetch route data from the server.
|
|
91873
92993
|
*
|
|
@@ -91955,8 +93075,6 @@ ${String(error)}`;
|
|
|
91955
93075
|
if (!response.ok) throw new LoaderError((await response.json()).detail);
|
|
91956
93076
|
const template = deferred();
|
|
91957
93077
|
const onLoadActions = deferred();
|
|
91958
|
-
const resolvedDvs = /* @__PURE__ */ new Set();
|
|
91959
|
-
const resolvedPyComponents = /* @__PURE__ */ new Set();
|
|
91960
93078
|
queueMicrotask(async () => {
|
|
91961
93079
|
try {
|
|
91962
93080
|
for await (const data of ndjson(response, signal)) {
|
|
@@ -91966,20 +93084,14 @@ ${String(error)}`;
|
|
|
91966
93084
|
template.resolve(component);
|
|
91967
93085
|
}
|
|
91968
93086
|
if (chunk.type === "actions") onLoadActions.resolve(actions.flatMap((a) => isAnnotatedAction(a) ? chunk.actions[a.uid] : a));
|
|
91969
|
-
if (chunk.type === "derived_variable")
|
|
91970
|
-
|
|
91971
|
-
resolvedDvs.add(chunk.uid);
|
|
91972
|
-
}
|
|
91973
|
-
if (chunk.type === "py_component") {
|
|
91974
|
-
pyHandlesByUid[chunk.uid]?.handle.resolve(chunk.result);
|
|
91975
|
-
resolvedPyComponents.add(chunk.uid);
|
|
91976
|
-
}
|
|
93087
|
+
if (chunk.type === "derived_variable") dvHandlesByUid[chunk.uid]?.handle.resolve(chunk.result);
|
|
93088
|
+
if (chunk.type === "py_component") pyHandlesByUid[chunk.uid]?.handle.resolve(chunk.result);
|
|
91977
93089
|
}
|
|
91978
93090
|
} catch (e) {
|
|
91979
|
-
template
|
|
91980
|
-
onLoadActions
|
|
91981
|
-
for (const
|
|
91982
|
-
for (const
|
|
93091
|
+
rejectPending(template, e);
|
|
93092
|
+
rejectPending(onLoadActions, e);
|
|
93093
|
+
for (const handle of Object.values(dvHandlesByUid)) rejectPending(handle.handle, e);
|
|
93094
|
+
for (const handle of Object.values(pyHandlesByUid)) rejectPending(handle.handle, e);
|
|
91983
93095
|
}
|
|
91984
93096
|
});
|
|
91985
93097
|
const [templateValue, onLoadActionsValue] = await Promise.all([template.getValue(), onLoadActions.getValue()]);
|
|
@@ -92117,7 +93229,7 @@ ${String(error)}`;
|
|
|
92117
93229
|
await Promise.allSettled(Array.from(extrasMap.entries()).map(([serializableExtras, storeDiff]) => sendRequest(serializableExtras, storeDiff)));
|
|
92118
93230
|
}, [client]);
|
|
92119
93231
|
const applyPatchesToAtoms = Recoil_index_31(({ snapshot, set }) => async (storeUid, patches, sequenceNumber) => {
|
|
92120
|
-
const expectedSequence = STORE_SEQUENCE_MAP.get(storeUid)
|
|
93232
|
+
const expectedSequence = STORE_SEQUENCE_MAP.get(storeUid) ?? 0;
|
|
92121
93233
|
if (sequenceNumber !== expectedSequence + 1) {
|
|
92122
93234
|
if (sequenceNumber <= expectedSequence) return;
|
|
92123
93235
|
console.warn(`Sequence number mismatch for store ${storeUid}. Expected: ${expectedSequence + 1}, Got: ${sequenceNumber}.`);
|
|
@@ -92512,7 +93624,7 @@ ${String(error)}`;
|
|
|
92512
93624
|
useStreamSubscription((0, react$3.useMemo)(() => findStreamVariables(variable).map((s) => s.uid), [variable.uid]), extras);
|
|
92513
93625
|
if (isDerivedVariable(variable)) {
|
|
92514
93626
|
const [pollingInterval] = useVariable(variable.polling_interval ?? null, { suspend: false });
|
|
92515
|
-
const selectorLoadable = Recoil_index_28(useDerivedVariable(variable, wsClient, taskContext, extras, pollingInterval ?? void 0));
|
|
93627
|
+
const selectorLoadable = Recoil_index_28(useDerivedVariable(variable, wsClient, taskContext, extras, pollingInterval ?? void 0, variablesContext?.pollScope));
|
|
92516
93628
|
(0, react$3.useEffect)(() => {
|
|
92517
93629
|
if (selectorLoadable.state !== "loading") bus.publish("DERIVED_VARIABLE_LOADED", {
|
|
92518
93630
|
variable,
|
|
@@ -92523,7 +93635,7 @@ ${String(error)}`;
|
|
|
92523
93635
|
}
|
|
92524
93636
|
if (isSwitchVariable(variable)) return [useSwitchVariable(variable), warnUpdateOnDerivedState];
|
|
92525
93637
|
if (isStateVariable(variable)) {
|
|
92526
|
-
const parentLoadable = Recoil_index_28(useDerivedVariable(variable.parent_variable, wsClient, taskContext, extras));
|
|
93638
|
+
const parentLoadable = Recoil_index_28(useDerivedVariable(variable.parent_variable, wsClient, taskContext, extras, void 0, variablesContext?.pollScope));
|
|
92527
93639
|
let stateValue;
|
|
92528
93640
|
switch (variable.property_name) {
|
|
92529
93641
|
case "loading":
|
|
@@ -92660,7 +93772,7 @@ ${String(error)}`;
|
|
|
92660
93772
|
width: props.width,
|
|
92661
93773
|
...flexProps,
|
|
92662
93774
|
...rawStyles,
|
|
92663
|
-
...props.style
|
|
93775
|
+
...props.style
|
|
92664
93776
|
};
|
|
92665
93777
|
return Object.fromEntries(Object.entries(stylesObj).filter(([, v]) => v !== null && v !== void 0));
|
|
92666
93778
|
}, [
|
|
@@ -92699,11 +93811,11 @@ ${String(error)}`;
|
|
|
92699
93811
|
`;
|
|
92700
93812
|
var Card = dist_default.div`
|
|
92701
93813
|
padding: 1.5rem;
|
|
93814
|
+
border-radius: 1rem;
|
|
92702
93815
|
|
|
92703
93816
|
color: ${(props) => props.theme.colors.text};
|
|
92704
93817
|
|
|
92705
93818
|
background-color: ${(props) => props.theme.colors.blue1};
|
|
92706
|
-
border-radius: 1rem;
|
|
92707
93819
|
box-shadow: ${(props) => props.theme.shadow.medium};
|
|
92708
93820
|
|
|
92709
93821
|
@media (width >= 640px) {
|
|
@@ -92745,14 +93857,14 @@ ${String(error)}`;
|
|
|
92745
93857
|
height: 2.5rem;
|
|
92746
93858
|
margin-top: 0.5rem;
|
|
92747
93859
|
padding: 0 1rem;
|
|
93860
|
+
border: none;
|
|
93861
|
+
border-radius: 0.25rem;
|
|
92748
93862
|
|
|
92749
93863
|
font-size: 1rem;
|
|
92750
93864
|
line-height: 1.5rem;
|
|
92751
93865
|
color: ${(props) => props.theme.colors.text};
|
|
92752
93866
|
|
|
92753
93867
|
background-color: ${(props) => props.theme.colors.blue1};
|
|
92754
|
-
border: none;
|
|
92755
|
-
border-radius: 0.25rem;
|
|
92756
93868
|
outline: none;
|
|
92757
93869
|
box-shadow:
|
|
92758
93870
|
inset 0 0 0 0 ${(props) => props.theme.colors.blue1},
|
|
@@ -93011,7 +94123,7 @@ ${String(error)}`;
|
|
|
93011
94123
|
const { search } = useLocation();
|
|
93012
94124
|
const query = (0, react$3.useMemo)(() => new URLSearchParams(search), [search]);
|
|
93013
94125
|
const code = props.code ?? query.get("code");
|
|
93014
|
-
const errorConfig = code
|
|
94126
|
+
const errorConfig = code ? errorMessages[code] ?? errorMessages.default : errorMessages.default;
|
|
93015
94127
|
return /* @__PURE__ */ React.createElement(CenteredDivWithGap$1, null, /* @__PURE__ */ React.createElement("h1", null, errorConfig.title), /* @__PURE__ */ React.createElement("p", null, errorConfig.description), /* @__PURE__ */ React.createElement(button_default, {
|
|
93016
94128
|
href: "/login",
|
|
93017
94129
|
styling: errorConfig.styling
|
|
@@ -93033,8 +94145,8 @@ ${String(error)}`;
|
|
|
93033
94145
|
|
|
93034
94146
|
code {
|
|
93035
94147
|
padding: 0.2rem;
|
|
93036
|
-
background-color: ${(props) => props.theme.colors.grey2};
|
|
93037
94148
|
border-radius: 0.5rem;
|
|
94149
|
+
background-color: ${(props) => props.theme.colors.grey2};
|
|
93038
94150
|
}
|
|
93039
94151
|
`;
|
|
93040
94152
|
var Title = dist_default.h1`
|
|
@@ -93146,8 +94258,9 @@ body,
|
|
|
93146
94258
|
return !securityContext.isSecureContext;
|
|
93147
94259
|
}
|
|
93148
94260
|
function getAuthOriginRecommendation(location) {
|
|
93149
|
-
|
|
93150
|
-
|
|
94261
|
+
let host = location.host;
|
|
94262
|
+
if (!host) host = location.hostname;
|
|
94263
|
+
const pathname = location.pathname ?? "";
|
|
93151
94264
|
if (location.hostname.toLowerCase() === "0.0.0.0") return `http://${host.replace(/^0\.0\.0\.0/i, "localhost")}${pathname}`;
|
|
93152
94265
|
return `https://${host}${pathname}`;
|
|
93153
94266
|
}
|
|
@@ -93163,6 +94276,7 @@ body,
|
|
|
93163
94276
|
box-sizing: border-box;
|
|
93164
94277
|
width: 100%;
|
|
93165
94278
|
padding: 0.75rem 1rem;
|
|
94279
|
+
border-bottom: 1px solid ${(props) => curriedTransparentize$1(.7, props.theme.colors.error)};
|
|
93166
94280
|
|
|
93167
94281
|
font-size: 0.875rem;
|
|
93168
94282
|
line-height: 1.4;
|
|
@@ -93171,12 +94285,11 @@ body,
|
|
|
93171
94285
|
letter-spacing: 0.01em;
|
|
93172
94286
|
|
|
93173
94287
|
background-color: ${(props) => curriedTransparentize$1(.9, props.theme.colors.error)};
|
|
93174
|
-
border-bottom: 1px solid ${(props) => curriedTransparentize$1(.7, props.theme.colors.error)};
|
|
93175
94288
|
`;
|
|
93176
94289
|
var InlineCode = dist_default.code`
|
|
93177
94290
|
font-family: monospace;
|
|
93178
94291
|
font-size: inherit;
|
|
93179
|
-
word-break:
|
|
94292
|
+
word-break: normal;
|
|
93180
94293
|
overflow-wrap: anywhere;
|
|
93181
94294
|
`;
|
|
93182
94295
|
var RecommendationLink = dist_default.a`
|
|
@@ -126700,6 +127813,9 @@ while (n === a[++i] && n === a[++i] && n === a[++i] && n === a[++i] && n === a[+
|
|
|
126700
127813
|
return processedRow;
|
|
126701
127814
|
});
|
|
126702
127815
|
};
|
|
127816
|
+
/**
|
|
127817
|
+
* Convert records to a matrix while leaving missing fields as empty cells.
|
|
127818
|
+
*/
|
|
126703
127819
|
var createMatrixFromArrayOfObjects = (content) => {
|
|
126704
127820
|
const processedContent = processDataForDownload(content);
|
|
126705
127821
|
const headings = [];
|
|
@@ -126715,7 +127831,8 @@ while (n === a[++i] && n === a[++i] && n === a[++i] && n === a[++i] && n === a[+
|
|
|
126715
127831
|
const headingsLength = headings.length;
|
|
126716
127832
|
const matrix = [];
|
|
126717
127833
|
processedContent.forEach((c) => {
|
|
126718
|
-
const row =
|
|
127834
|
+
const row = [];
|
|
127835
|
+
row.length = headingsLength;
|
|
126719
127836
|
Object.entries(c).forEach(([k, v]) => {
|
|
126720
127837
|
row[indexes[k]] = v;
|
|
126721
127838
|
});
|
|
@@ -126732,6 +127849,9 @@ while (n === a[++i] && n === a[++i] && n === a[++i] && n === a[++i] && n === a[+
|
|
|
126732
127849
|
if (cellValue.search(/("|,|\n)/g) > 0) cellValue = `"${cellValue}"`;
|
|
126733
127850
|
return cellValue;
|
|
126734
127851
|
};
|
|
127852
|
+
/**
|
|
127853
|
+
* Serialize a matrix as a CSV blob.
|
|
127854
|
+
*/
|
|
126735
127855
|
var createCsvFromMatrix = (matrix) => {
|
|
126736
127856
|
const csv = matrix.map((col) => col.map((cell) => processCell(cell)).join(",")).join("\n");
|
|
126737
127857
|
return new Blob([csv], { type: "text/csv" });
|
|
@@ -126852,14 +127972,13 @@ while (n === a[++i] && n === a[++i] && n === a[++i] && n === a[++i] && n === a[+
|
|
|
126852
127972
|
width: ${(props) => props.direction === "row" ? "10rem" : "100%"};
|
|
126853
127973
|
height: 3rem;
|
|
126854
127974
|
padding: 0 1rem;
|
|
127975
|
+
border-radius: 1rem;
|
|
126855
127976
|
|
|
126856
127977
|
font-size: 0.875rem;
|
|
126857
127978
|
font-weight: 700;
|
|
126858
127979
|
color: ${(props) => props.theme.colors.secondary};
|
|
126859
127980
|
text-decoration: none;
|
|
126860
127981
|
|
|
126861
|
-
border-radius: 1rem;
|
|
126862
|
-
|
|
126863
127982
|
:hover {
|
|
126864
127983
|
background: ${(props) => curriedTransparentize$1(.9, props.theme.colors.secondary)};
|
|
126865
127984
|
}
|
|
@@ -127011,9 +128130,9 @@ while (n === a[++i] && n === a[++i] && n === a[++i] && n === a[++i] && n === a[+
|
|
|
127011
128130
|
const [to] = useVariable(props.to);
|
|
127012
128131
|
const linkKey = getResolvedToHookKey(to);
|
|
127013
128132
|
return /* @__PURE__ */ react$3.createElement(LinkResolveImpl, {
|
|
128133
|
+
key: linkKey,
|
|
127014
128134
|
...props,
|
|
127015
|
-
to
|
|
127016
|
-
key: linkKey
|
|
128135
|
+
to
|
|
127017
128136
|
});
|
|
127018
128137
|
}
|
|
127019
128138
|
//#endregion
|
|
@@ -127028,14 +128147,13 @@ while (n === a[++i] && n === a[++i] && n === a[++i] && n === a[++i] && n === a[+
|
|
|
127028
128147
|
width: auto;
|
|
127029
128148
|
height: 3rem;
|
|
127030
128149
|
padding: 0 1rem;
|
|
128150
|
+
border-radius: 1rem;
|
|
127031
128151
|
|
|
127032
128152
|
font-size: 0.875rem;
|
|
127033
128153
|
font-weight: 700;
|
|
127034
128154
|
color: ${(props) => props.theme.colors.secondary};
|
|
127035
128155
|
text-decoration: none;
|
|
127036
128156
|
|
|
127037
|
-
border-radius: 1rem;
|
|
127038
|
-
|
|
127039
128157
|
:hover {
|
|
127040
128158
|
background: ${(props) => curriedTransparentize$1(.9, props.theme.colors.secondary)};
|
|
127041
128159
|
}
|
|
@@ -127119,12 +128237,16 @@ while (n === a[++i] && n === a[++i] && n === a[++i] && n === a[++i] && n === a[+
|
|
|
127119
128237
|
//#endregion
|
|
127120
128238
|
//#region js/components/side-bar-frame.tsx
|
|
127121
128239
|
var shouldForwardProp$1 = (prop) => !["width"].includes(prop);
|
|
128240
|
+
function getWidth(width) {
|
|
128241
|
+
if (width) return width;
|
|
128242
|
+
return "240px";
|
|
128243
|
+
}
|
|
127122
128244
|
var SideBar = dist_default.div.withConfig({ shouldForwardProp: shouldForwardProp$1 })`
|
|
127123
128245
|
display: flex;
|
|
127124
128246
|
flex-direction: column;
|
|
127125
128247
|
align-items: center;
|
|
127126
128248
|
|
|
127127
|
-
width: ${(props) => props.width
|
|
128249
|
+
width: ${(props) => getWidth(props.width)};
|
|
127128
128250
|
min-width: 150px;
|
|
127129
128251
|
max-width: 350px;
|
|
127130
128252
|
height: 100%;
|
|
@@ -127210,6 +128332,10 @@ while (n === a[++i] && n === a[++i] && n === a[++i] && n === a[++i] && n === a[+
|
|
|
127210
128332
|
//#endregion
|
|
127211
128333
|
//#region js/components/top-bar-frame.tsx
|
|
127212
128334
|
var shouldForwardProp = (prop) => !["width"].includes(prop);
|
|
128335
|
+
function getHeight(height) {
|
|
128336
|
+
if (height) return height;
|
|
128337
|
+
return "124px";
|
|
128338
|
+
}
|
|
127213
128339
|
var TopBar = dist_default.div.withConfig({ shouldForwardProp })`
|
|
127214
128340
|
display: flex;
|
|
127215
128341
|
flex-direction: column;
|
|
@@ -127217,7 +128343,7 @@ while (n === a[++i] && n === a[++i] && n === a[++i] && n === a[++i] && n === a[+
|
|
|
127217
128343
|
align-items: flex-end;
|
|
127218
128344
|
|
|
127219
128345
|
width: 100%;
|
|
127220
|
-
height: ${(props) => props.height
|
|
128346
|
+
height: ${(props) => getHeight(props.height)};
|
|
127221
128347
|
min-height: 100px;
|
|
127222
128348
|
max-height: 350px;
|
|
127223
128349
|
padding: 2rem 3rem;
|
|
@@ -127245,7 +128371,6 @@ while (n === a[++i] && n === a[++i] && n === a[++i] && n === a[++i] && n === a[+
|
|
|
127245
128371
|
height: 3rem;
|
|
127246
128372
|
margin-left: 0.5rem;
|
|
127247
128373
|
padding: 1rem;
|
|
127248
|
-
|
|
127249
128374
|
border-radius: 1rem;
|
|
127250
128375
|
|
|
127251
128376
|
a {
|
|
@@ -127563,8 +128688,10 @@ while (n === a[++i] && n === a[++i] && n === a[++i] && n === a[++i] && n === a[+
|
|
|
127563
128688
|
exports.getOrRegisterDerivedVariable = getOrRegisterDerivedVariable;
|
|
127564
128689
|
exports.getOrRegisterDerivedVariableResult = getOrRegisterDerivedVariableResult;
|
|
127565
128690
|
exports.getOrRegisterDerivedVariableValue = getOrRegisterDerivedVariableValue;
|
|
128691
|
+
exports.getOrRegisterPollingTrigger = getOrRegisterPollingTrigger;
|
|
127566
128692
|
exports.getOrRegisterServerVariable = getOrRegisterServerVariable;
|
|
127567
128693
|
exports.getRegistryKey = getRegistryKey;
|
|
128694
|
+
exports.getServerComponentRequestKey = getServerComponentRequestKey;
|
|
127568
128695
|
exports.getSessionIdentifier = getSessionIdentifier;
|
|
127569
128696
|
exports.getTabularVariableValue = getTabularVariableValue;
|
|
127570
128697
|
exports.getVariableHookSignature = getVariableHookSignature;
|
|
@@ -127601,6 +128728,7 @@ while (n === a[++i] && n === a[++i] && n === a[++i] && n === a[++i] && n === a[+
|
|
|
127601
128728
|
exports.onSessionIdChange = onSessionIdChange;
|
|
127602
128729
|
exports.parseLoginReferrer = parseLoginReferrer;
|
|
127603
128730
|
exports.parseRawCss = parseRawCss;
|
|
128731
|
+
exports.pollingTriggerRegistry = pollingTriggerRegistry;
|
|
127604
128732
|
exports.preloadDerivedValue = preloadDerivedValue;
|
|
127605
128733
|
exports.preloadDerivedVariable = preloadDerivedVariable;
|
|
127606
128734
|
exports.preloadServerComponent = preloadServerComponent;
|
|
@@ -127634,6 +128762,7 @@ while (n === a[++i] && n === a[++i] && n === a[++i] && n === a[++i] && n === a[+
|
|
|
127634
128762
|
exports.useFetchTabularDerivedVariable = useFetchTabularDerivedVariable;
|
|
127635
128763
|
exports.useFetchTabularServerVariable = useFetchTabularServerVariable;
|
|
127636
128764
|
exports.useInterval = useInterval;
|
|
128765
|
+
exports.usePollServerComponent = usePollServerComponent;
|
|
127637
128766
|
exports.usePreloadRoute = usePreloadRoute;
|
|
127638
128767
|
exports.usePrevious = usePrevious;
|
|
127639
128768
|
exports.useRefreshSelector = useRefreshSelector;
|