@stakekit/widget 0.0.283 → 0.0.284
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/dist/bundle/index.bundle.css +1 -1
- package/dist/bundle/index.bundle.js +63 -63
- package/dist/package/index.package.css +61 -61
- package/dist/package/index.package.js +279 -305
- package/dist/website/assets/{index-CdVZR9mf.css → index-CYwddl65.css} +1 -1
- package/dist/website/assets/index-ZW_QdTpW.js +563 -0
- package/dist/website/index.html +2 -2
- package/package.json +1 -1
- package/dist/website/assets/index-CaWDsm13.js +0 -563
|
@@ -30618,7 +30618,7 @@ var layer = /*#__PURE__*/ layerMergedContext(/*#__PURE__*/ succeed$4(/* @__PURE_
|
|
|
30618
30618
|
})));
|
|
30619
30619
|
//#endregion
|
|
30620
30620
|
//#region package.json
|
|
30621
|
-
var version$1 = "0.0.
|
|
30621
|
+
var version$1 = "0.0.284";
|
|
30622
30622
|
//#endregion
|
|
30623
30623
|
//#region src/generated/api/borrow-client.ts
|
|
30624
30624
|
var make$2 = (httpClient, options = {}) => {
|
|
@@ -68221,72 +68221,6 @@ var SKAtomRegistryProvider = (t0) => {
|
|
|
68221
68221
|
return t4;
|
|
68222
68222
|
};
|
|
68223
68223
|
//#endregion
|
|
68224
|
-
//#region src/app/embedding/widget-instance-claim.ts
|
|
68225
|
-
var widgetInstanceClaimKey = Symbol.for("@stakekit/widget/widget-instance-claim");
|
|
68226
|
-
var alreadyMountedMessage = "Only one StakeKit Widget may be mounted in a browser document at a time.";
|
|
68227
|
-
var StakeKitWidgetInstanceAlreadyMountedError = class extends Error {
|
|
68228
|
-
name = "StakeKitWidgetInstanceAlreadyMountedError";
|
|
68229
|
-
constructor() {
|
|
68230
|
-
super(alreadyMountedMessage);
|
|
68231
|
-
}
|
|
68232
|
-
};
|
|
68233
|
-
var acquireWidgetInstanceClaim = (browserDocument) => {
|
|
68234
|
-
if (Reflect.has(browserDocument, widgetInstanceClaimKey)) throw new StakeKitWidgetInstanceAlreadyMountedError();
|
|
68235
|
-
const claimOwnerToken = {};
|
|
68236
|
-
Reflect.set(browserDocument, widgetInstanceClaimKey, claimOwnerToken);
|
|
68237
|
-
return () => {
|
|
68238
|
-
if (Reflect.get(browserDocument, widgetInstanceClaimKey) === claimOwnerToken) Reflect.deleteProperty(browserDocument, widgetInstanceClaimKey);
|
|
68239
|
-
};
|
|
68240
|
-
};
|
|
68241
|
-
//#endregion
|
|
68242
|
-
//#region src/app/embedding/widget-instance-react-boundary.tsx
|
|
68243
|
-
/**
|
|
68244
|
-
* The non-rendering template discovers the actual mounting document before
|
|
68245
|
-
* application providers render.
|
|
68246
|
-
*/
|
|
68247
|
-
var WidgetInstanceReactBoundary = (t0) => {
|
|
68248
|
-
const $ = (0, import_compiler_runtime.c)(7);
|
|
68249
|
-
const { children } = t0;
|
|
68250
|
-
const [claimAcquired, setClaimAcquired] = useState(false);
|
|
68251
|
-
const releaseClaimRef = useRef(null);
|
|
68252
|
-
let t1;
|
|
68253
|
-
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
68254
|
-
t1 = (element) => {
|
|
68255
|
-
if (element) {
|
|
68256
|
-
releaseClaimRef.current = acquireWidgetInstanceClaim(element.ownerDocument);
|
|
68257
|
-
setClaimAcquired(true);
|
|
68258
|
-
return;
|
|
68259
|
-
}
|
|
68260
|
-
releaseClaimRef.current?.();
|
|
68261
|
-
releaseClaimRef.current = null;
|
|
68262
|
-
};
|
|
68263
|
-
$[0] = t1;
|
|
68264
|
-
} else t1 = $[0];
|
|
68265
|
-
const claimBoundaryRef = t1;
|
|
68266
|
-
let t2;
|
|
68267
|
-
if ($[1] !== children || $[2] !== claimAcquired) {
|
|
68268
|
-
t2 = claimAcquired ? /* @__PURE__ */ jsx(Fragment, { children }, "widget-instance-content") : null;
|
|
68269
|
-
$[1] = children;
|
|
68270
|
-
$[2] = claimAcquired;
|
|
68271
|
-
$[3] = t2;
|
|
68272
|
-
} else t2 = $[3];
|
|
68273
|
-
let t3;
|
|
68274
|
-
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
68275
|
-
t3 = /* @__PURE__ */ jsx("template", {
|
|
68276
|
-
"data-sk-widget-instance-boundary": "",
|
|
68277
|
-
ref: claimBoundaryRef
|
|
68278
|
-
}, "widget-instance-claim");
|
|
68279
|
-
$[4] = t3;
|
|
68280
|
-
} else t3 = $[4];
|
|
68281
|
-
let t4;
|
|
68282
|
-
if ($[5] !== t2) {
|
|
68283
|
-
t4 = /* @__PURE__ */ jsxs(Fragment$1, { children: [t2, t3] });
|
|
68284
|
-
$[5] = t2;
|
|
68285
|
-
$[6] = t4;
|
|
68286
|
-
} else t4 = $[6];
|
|
68287
|
-
return t4;
|
|
68288
|
-
};
|
|
68289
|
-
//#endregion
|
|
68290
68224
|
//#region src/app/routes/application-routes.ts
|
|
68291
68225
|
var applicationRoutes = [{
|
|
68292
68226
|
path: "*",
|
|
@@ -69083,8 +69017,9 @@ var borrowPositionsResourceAtom = makePresentableResourceFamily(family((key) =>
|
|
|
69083
69017
|
//#endregion
|
|
69084
69018
|
//#region src/features/borrow-transaction-flow/state/atoms/borrow-flow.ts
|
|
69085
69019
|
var borrowTransactionFlowServiceAtom = walletRuntime.atom(service(BorrowTransactionFlowService)).pipe(keepAlive, withLabel("borrowTransactionFlowServiceAtom"));
|
|
69086
|
-
var
|
|
69087
|
-
var
|
|
69020
|
+
var makeBorrowFlowRouteSessionAtom = () => walletRuntime.atom((context) => unwrap$1(context.result(borrowTransactionFlowServiceAtom).pipe(map$6((service) => service.currentSession)))).pipe(withLabel("borrowFlowRouteSession"));
|
|
69021
|
+
var currentBorrowFlowSessionResultAtom = makeBorrowFlowRouteSessionAtom().pipe(keepAlive, withLabel("currentBorrowFlowSessionResultAtom"));
|
|
69022
|
+
make$11((get) => getOrElse(get(currentBorrowFlowSessionResultAtom), () => null)).pipe(withLabel("currentBorrowFlowSessionAtom"));
|
|
69088
69023
|
var startBorrowTransactionFlowAtom = walletRuntime.fn((intake, context) => context.result(borrowTransactionFlowServiceAtom).pipe(flatMap$4((service) => service.start(intake)))).pipe(withLabel("startBorrowTransactionFlowAtom"));
|
|
69089
69024
|
//#endregion
|
|
69090
69025
|
//#region src/domain/portfolio/positions.ts
|
|
@@ -72719,9 +72654,153 @@ var projectYieldEntry = ({ input, submitted }) => {
|
|
|
72719
72654
|
};
|
|
72720
72655
|
};
|
|
72721
72656
|
//#endregion
|
|
72657
|
+
//#region ../../node_modules/.pnpm/react-loading-skeleton@3.5.0_react@19.2.8/node_modules/react-loading-skeleton/dist/index.js
|
|
72658
|
+
/**
|
|
72659
|
+
* @internal
|
|
72660
|
+
*/
|
|
72661
|
+
var SkeletonThemeContext = React3.createContext({});
|
|
72662
|
+
var defaultEnableAnimation = true;
|
|
72663
|
+
function styleOptionsToCssProperties({ baseColor, highlightColor, width, height, borderRadius, circle, direction, duration, enableAnimation = defaultEnableAnimation, customHighlightBackground }) {
|
|
72664
|
+
const style = {};
|
|
72665
|
+
if (direction === "rtl") style["--animation-direction"] = "reverse";
|
|
72666
|
+
if (typeof duration === "number") style["--animation-duration"] = `${duration}s`;
|
|
72667
|
+
if (!enableAnimation) style["--pseudo-element-display"] = "none";
|
|
72668
|
+
if (typeof width === "string" || typeof width === "number") style.width = width;
|
|
72669
|
+
if (typeof height === "string" || typeof height === "number") style.height = height;
|
|
72670
|
+
if (typeof borderRadius === "string" || typeof borderRadius === "number") style.borderRadius = borderRadius;
|
|
72671
|
+
if (circle) style.borderRadius = "50%";
|
|
72672
|
+
if (typeof baseColor !== "undefined") style["--base-color"] = baseColor;
|
|
72673
|
+
if (typeof highlightColor !== "undefined") style["--highlight-color"] = highlightColor;
|
|
72674
|
+
if (typeof customHighlightBackground === "string") style["--custom-highlight-background"] = customHighlightBackground;
|
|
72675
|
+
return style;
|
|
72676
|
+
}
|
|
72677
|
+
function Skeleton({ count = 1, wrapper: Wrapper, className: customClassName, containerClassName, containerTestId, circle = false, style: styleProp, ...originalPropsStyleOptions }) {
|
|
72678
|
+
var _a, _b, _c;
|
|
72679
|
+
const contextStyleOptions = React3.useContext(SkeletonThemeContext);
|
|
72680
|
+
const propsStyleOptions = { ...originalPropsStyleOptions };
|
|
72681
|
+
for (const [key, value] of Object.entries(originalPropsStyleOptions)) if (typeof value === "undefined") delete propsStyleOptions[key];
|
|
72682
|
+
const styleOptions = {
|
|
72683
|
+
...contextStyleOptions,
|
|
72684
|
+
...propsStyleOptions,
|
|
72685
|
+
circle
|
|
72686
|
+
};
|
|
72687
|
+
const style = {
|
|
72688
|
+
...styleProp,
|
|
72689
|
+
...styleOptionsToCssProperties(styleOptions)
|
|
72690
|
+
};
|
|
72691
|
+
let className = "react-loading-skeleton";
|
|
72692
|
+
if (customClassName) className += ` ${customClassName}`;
|
|
72693
|
+
const inline = (_a = styleOptions.inline) !== null && _a !== void 0 ? _a : false;
|
|
72694
|
+
const elements = [];
|
|
72695
|
+
const countCeil = Math.ceil(count);
|
|
72696
|
+
for (let i = 0; i < countCeil; i++) {
|
|
72697
|
+
let thisStyle = style;
|
|
72698
|
+
if (countCeil > count && i === countCeil - 1) {
|
|
72699
|
+
const width = (_b = thisStyle.width) !== null && _b !== void 0 ? _b : "100%";
|
|
72700
|
+
const fractionalPart = count % 1;
|
|
72701
|
+
const fractionalWidth = typeof width === "number" ? width * fractionalPart : `calc(${width} * ${fractionalPart})`;
|
|
72702
|
+
thisStyle = {
|
|
72703
|
+
...thisStyle,
|
|
72704
|
+
width: fractionalWidth
|
|
72705
|
+
};
|
|
72706
|
+
}
|
|
72707
|
+
const skeletonSpan = React3.createElement("span", {
|
|
72708
|
+
className,
|
|
72709
|
+
style: thisStyle,
|
|
72710
|
+
key: i
|
|
72711
|
+
}, "");
|
|
72712
|
+
if (inline) elements.push(skeletonSpan);
|
|
72713
|
+
else elements.push(React3.createElement(React3.Fragment, { key: i }, skeletonSpan, React3.createElement("br", null)));
|
|
72714
|
+
}
|
|
72715
|
+
return React3.createElement("span", {
|
|
72716
|
+
className: containerClassName,
|
|
72717
|
+
"data-testid": containerTestId,
|
|
72718
|
+
"aria-live": "polite",
|
|
72719
|
+
"aria-busy": (_c = styleOptions.enableAnimation) !== null && _c !== void 0 ? _c : defaultEnableAnimation
|
|
72720
|
+
}, Wrapper ? elements.map((el, i) => React3.createElement(Wrapper, { key: i }, el)) : elements);
|
|
72721
|
+
}
|
|
72722
|
+
//#endregion
|
|
72723
|
+
//#region src/shared/ui/primitives/content-loader/index.tsx
|
|
72724
|
+
var ContentLoaderSquare = (t0) => {
|
|
72725
|
+
const $ = (0, import_compiler_runtime.c)(4);
|
|
72726
|
+
const { heightPx, variant, containerClassName } = t0;
|
|
72727
|
+
const t1 = variant?.size === "medium" ? vars.borderRadius.baseContract.md : vars.borderRadius.baseContract.xl;
|
|
72728
|
+
let t2;
|
|
72729
|
+
if ($[0] !== containerClassName || $[1] !== heightPx || $[2] !== t1) {
|
|
72730
|
+
t2 = /* @__PURE__ */ jsx(Skeleton, {
|
|
72731
|
+
height: heightPx,
|
|
72732
|
+
containerClassName,
|
|
72733
|
+
baseColor: vars.color.skeletonLoaderBase,
|
|
72734
|
+
highlightColor: vars.color.skeletonLoaderHighlight,
|
|
72735
|
+
enableAnimation: true,
|
|
72736
|
+
borderRadius: t1
|
|
72737
|
+
});
|
|
72738
|
+
$[0] = containerClassName;
|
|
72739
|
+
$[1] = heightPx;
|
|
72740
|
+
$[2] = t1;
|
|
72741
|
+
$[3] = t2;
|
|
72742
|
+
} else t2 = $[3];
|
|
72743
|
+
return t2;
|
|
72744
|
+
};
|
|
72745
|
+
var ContentLoaderLine = (t0) => {
|
|
72746
|
+
const $ = (0, import_compiler_runtime.c)(4);
|
|
72747
|
+
const { heightPx: t1, widthPx, containerClassName } = t0;
|
|
72748
|
+
const heightPx = t1 === void 0 ? 12 : t1;
|
|
72749
|
+
let t2;
|
|
72750
|
+
if ($[0] !== containerClassName || $[1] !== heightPx || $[2] !== widthPx) {
|
|
72751
|
+
t2 = /* @__PURE__ */ jsx(Skeleton, {
|
|
72752
|
+
height: heightPx,
|
|
72753
|
+
width: widthPx,
|
|
72754
|
+
containerClassName,
|
|
72755
|
+
baseColor: vars.color.skeletonLoaderBase,
|
|
72756
|
+
highlightColor: vars.color.skeletonLoaderHighlight,
|
|
72757
|
+
enableAnimation: true,
|
|
72758
|
+
borderRadius: vars.borderRadius.baseContract.md
|
|
72759
|
+
});
|
|
72760
|
+
$[0] = containerClassName;
|
|
72761
|
+
$[1] = heightPx;
|
|
72762
|
+
$[2] = widthPx;
|
|
72763
|
+
$[3] = t2;
|
|
72764
|
+
} else t2 = $[3];
|
|
72765
|
+
return t2;
|
|
72766
|
+
};
|
|
72767
|
+
var ContentLoaderCircle = (t0) => {
|
|
72768
|
+
const $ = (0, import_compiler_runtime.c)(2);
|
|
72769
|
+
const { sizePx } = t0;
|
|
72770
|
+
let t1;
|
|
72771
|
+
if ($[0] !== sizePx) {
|
|
72772
|
+
t1 = /* @__PURE__ */ jsx(Skeleton, {
|
|
72773
|
+
circle: true,
|
|
72774
|
+
height: sizePx,
|
|
72775
|
+
width: sizePx,
|
|
72776
|
+
baseColor: vars.color.skeletonLoaderBase,
|
|
72777
|
+
highlightColor: vars.color.skeletonLoaderHighlight,
|
|
72778
|
+
enableAnimation: true
|
|
72779
|
+
});
|
|
72780
|
+
$[0] = sizePx;
|
|
72781
|
+
$[1] = t1;
|
|
72782
|
+
} else t1 = $[1];
|
|
72783
|
+
return t1;
|
|
72784
|
+
};
|
|
72785
|
+
//#endregion
|
|
72786
|
+
//#region src/shared/ui/components/loading-skeleton/index.tsx
|
|
72787
|
+
var LoadingSkeleton = () => {
|
|
72788
|
+
const $ = (0, import_compiler_runtime.c)(1);
|
|
72789
|
+
let t0;
|
|
72790
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
72791
|
+
t0 = /* @__PURE__ */ jsx("div", {
|
|
72792
|
+
"aria-busy": "true",
|
|
72793
|
+
children: /* @__PURE__ */ jsx(ContentLoaderSquare, { heightPx: 320 })
|
|
72794
|
+
});
|
|
72795
|
+
$[0] = t0;
|
|
72796
|
+
} else t0 = $[0];
|
|
72797
|
+
return t0;
|
|
72798
|
+
};
|
|
72799
|
+
//#endregion
|
|
72722
72800
|
//#region src/features/classic-transaction-flow/state/atoms/classic-flow.ts
|
|
72723
72801
|
var classicTransactionFlowServiceAtom = walletRuntime.atom(service(ClassicTransactionFlowService)).pipe(keepAlive, withLabel("classicTransactionFlowServiceAtom"));
|
|
72724
|
-
var
|
|
72802
|
+
var makeClassicFlowRouteSessionAtom = () => walletRuntime.atom((context) => unwrap$1(context.result(classicTransactionFlowServiceAtom).pipe(map$6((service) => service.currentSession)))).pipe(withLabel("classicFlowRouteSession"));
|
|
72803
|
+
var currentClassicFlowSessionResultAtom = makeClassicFlowRouteSessionAtom().pipe(keepAlive, withLabel("currentClassicFlowSessionResultAtom"));
|
|
72725
72804
|
var currentClassicFlowSessionAtom = make$11((get) => getOrElse(get(currentClassicFlowSessionResultAtom), () => null)).pipe(withLabel("currentClassicFlowSessionAtom"));
|
|
72726
72805
|
var currentYieldActionContinuationIdAtom = make$11((get) => {
|
|
72727
72806
|
const session = get(currentClassicFlowSessionAtom);
|
|
@@ -73207,10 +73286,6 @@ var makeClassicFlowSessionModule = (session) => makeScopedEffectAtom({
|
|
|
73207
73286
|
var makeClassicFlowReviewScope = (session) => session.ports.makeReviewScopeAtom();
|
|
73208
73287
|
var makeClassicFlowExecutionScope = (session) => session.ports.makeExecutionScopeAtom();
|
|
73209
73288
|
var classicFlowSessionRootAtomFamily = family(makeClassicFlowSessionModule);
|
|
73210
|
-
var currentClassicFlowSessionRootAtom = make$11((get) => {
|
|
73211
|
-
const session = get(currentClassicFlowSessionAtom);
|
|
73212
|
-
return session ? classicFlowSessionRootAtomFamily(session) : null;
|
|
73213
|
-
}).pipe(withLabel("currentClassicFlowSessionRootAtom"));
|
|
73214
73289
|
//#endregion
|
|
73215
73290
|
//#region src/features/classic-transaction-flow/react/classic-flow-route.tsx
|
|
73216
73291
|
var useClassicFlowSessionModule = () => {
|
|
@@ -73243,51 +73318,58 @@ var useClassicFlowIntake = (variant) => {
|
|
|
73243
73318
|
return t0;
|
|
73244
73319
|
};
|
|
73245
73320
|
var ClassicFlowRoute = (t0) => {
|
|
73246
|
-
const $ = (0, import_compiler_runtime.c)(
|
|
73321
|
+
const $ = (0, import_compiler_runtime.c)(8);
|
|
73247
73322
|
const { expected } = t0;
|
|
73248
|
-
const
|
|
73249
|
-
const
|
|
73250
|
-
if (
|
|
73323
|
+
const [sessionAtom] = useState(makeClassicFlowRouteSessionAtom);
|
|
73324
|
+
const result = useAtomValue(sessionAtom);
|
|
73325
|
+
if (result._tag === "Initial") {
|
|
73326
|
+
let t1;
|
|
73327
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
73328
|
+
t1 = /* @__PURE__ */ jsx(LoadingSkeleton, {});
|
|
73329
|
+
$[0] = t1;
|
|
73330
|
+
} else t1 = $[0];
|
|
73331
|
+
return t1;
|
|
73332
|
+
}
|
|
73333
|
+
if (result._tag === "Failure") {
|
|
73251
73334
|
let t1;
|
|
73252
|
-
if ($[
|
|
73253
|
-
t1 = /* @__PURE__ */ jsx(
|
|
73254
|
-
|
|
73335
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
73336
|
+
t1 = /* @__PURE__ */ jsx(Navigate, {
|
|
73337
|
+
to: "/",
|
|
73338
|
+
replace: true
|
|
73339
|
+
});
|
|
73255
73340
|
$[1] = t1;
|
|
73256
73341
|
} else t1 = $[1];
|
|
73257
73342
|
return t1;
|
|
73258
73343
|
}
|
|
73344
|
+
const session = result.value;
|
|
73345
|
+
const intake = session ? getClassicTransactionFlowIntakeVariant(session.intake, expected) : null;
|
|
73346
|
+
if (session && intake) {
|
|
73347
|
+
const t1 = session.epoch;
|
|
73348
|
+
let t2;
|
|
73349
|
+
if ($[2] !== session) {
|
|
73350
|
+
t2 = classicFlowSessionRootAtomFamily(session);
|
|
73351
|
+
$[2] = session;
|
|
73352
|
+
$[3] = t2;
|
|
73353
|
+
} else t2 = $[3];
|
|
73354
|
+
let t3;
|
|
73355
|
+
if ($[4] !== session.epoch || $[5] !== t2) {
|
|
73356
|
+
t3 = /* @__PURE__ */ jsx(MountedSessionBinding$1, { rootAtom: t2 }, t1);
|
|
73357
|
+
$[4] = session.epoch;
|
|
73358
|
+
$[5] = t2;
|
|
73359
|
+
$[6] = t3;
|
|
73360
|
+
} else t3 = $[6];
|
|
73361
|
+
return t3;
|
|
73362
|
+
}
|
|
73259
73363
|
let t1;
|
|
73260
|
-
if ($[
|
|
73364
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
73261
73365
|
t1 = /* @__PURE__ */ jsx(Navigate, {
|
|
73262
73366
|
to: "/",
|
|
73263
73367
|
replace: true
|
|
73264
73368
|
});
|
|
73265
|
-
$[
|
|
73266
|
-
} else t1 = $[
|
|
73369
|
+
$[7] = t1;
|
|
73370
|
+
} else t1 = $[7];
|
|
73267
73371
|
return t1;
|
|
73268
73372
|
};
|
|
73269
|
-
var SessionBinding$1 = () => {
|
|
73270
|
-
const $ = (0, import_compiler_runtime.c)(3);
|
|
73271
|
-
const rootAtom = useAtomValue(currentClassicFlowSessionRootAtom);
|
|
73272
|
-
if (!rootAtom) {
|
|
73273
|
-
let t0;
|
|
73274
|
-
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
73275
|
-
t0 = /* @__PURE__ */ jsx(Navigate, {
|
|
73276
|
-
to: "/",
|
|
73277
|
-
replace: true
|
|
73278
|
-
});
|
|
73279
|
-
$[0] = t0;
|
|
73280
|
-
} else t0 = $[0];
|
|
73281
|
-
return t0;
|
|
73282
|
-
}
|
|
73283
|
-
let t0;
|
|
73284
|
-
if ($[1] !== rootAtom) {
|
|
73285
|
-
t0 = /* @__PURE__ */ jsx(MountedSessionBinding$1, { rootAtom });
|
|
73286
|
-
$[1] = rootAtom;
|
|
73287
|
-
$[2] = t0;
|
|
73288
|
-
} else t0 = $[2];
|
|
73289
|
-
return t0;
|
|
73290
|
-
};
|
|
73291
73373
|
var MountedSessionBinding$1 = (t0) => {
|
|
73292
73374
|
const $ = (0, import_compiler_runtime.c)(3);
|
|
73293
73375
|
const { rootAtom } = t0;
|
|
@@ -89487,135 +89569,6 @@ var YieldActionContinuationStepsPage = () => {
|
|
|
89487
89569
|
};
|
|
89488
89570
|
var YieldActionContinuationCompletePage = ActivityCompletePage;
|
|
89489
89571
|
//#endregion
|
|
89490
|
-
//#region ../../node_modules/.pnpm/react-loading-skeleton@3.5.0_react@19.2.8/node_modules/react-loading-skeleton/dist/index.js
|
|
89491
|
-
/**
|
|
89492
|
-
* @internal
|
|
89493
|
-
*/
|
|
89494
|
-
var SkeletonThemeContext = React3.createContext({});
|
|
89495
|
-
var defaultEnableAnimation = true;
|
|
89496
|
-
function styleOptionsToCssProperties({ baseColor, highlightColor, width, height, borderRadius, circle, direction, duration, enableAnimation = defaultEnableAnimation, customHighlightBackground }) {
|
|
89497
|
-
const style = {};
|
|
89498
|
-
if (direction === "rtl") style["--animation-direction"] = "reverse";
|
|
89499
|
-
if (typeof duration === "number") style["--animation-duration"] = `${duration}s`;
|
|
89500
|
-
if (!enableAnimation) style["--pseudo-element-display"] = "none";
|
|
89501
|
-
if (typeof width === "string" || typeof width === "number") style.width = width;
|
|
89502
|
-
if (typeof height === "string" || typeof height === "number") style.height = height;
|
|
89503
|
-
if (typeof borderRadius === "string" || typeof borderRadius === "number") style.borderRadius = borderRadius;
|
|
89504
|
-
if (circle) style.borderRadius = "50%";
|
|
89505
|
-
if (typeof baseColor !== "undefined") style["--base-color"] = baseColor;
|
|
89506
|
-
if (typeof highlightColor !== "undefined") style["--highlight-color"] = highlightColor;
|
|
89507
|
-
if (typeof customHighlightBackground === "string") style["--custom-highlight-background"] = customHighlightBackground;
|
|
89508
|
-
return style;
|
|
89509
|
-
}
|
|
89510
|
-
function Skeleton({ count = 1, wrapper: Wrapper, className: customClassName, containerClassName, containerTestId, circle = false, style: styleProp, ...originalPropsStyleOptions }) {
|
|
89511
|
-
var _a, _b, _c;
|
|
89512
|
-
const contextStyleOptions = React3.useContext(SkeletonThemeContext);
|
|
89513
|
-
const propsStyleOptions = { ...originalPropsStyleOptions };
|
|
89514
|
-
for (const [key, value] of Object.entries(originalPropsStyleOptions)) if (typeof value === "undefined") delete propsStyleOptions[key];
|
|
89515
|
-
const styleOptions = {
|
|
89516
|
-
...contextStyleOptions,
|
|
89517
|
-
...propsStyleOptions,
|
|
89518
|
-
circle
|
|
89519
|
-
};
|
|
89520
|
-
const style = {
|
|
89521
|
-
...styleProp,
|
|
89522
|
-
...styleOptionsToCssProperties(styleOptions)
|
|
89523
|
-
};
|
|
89524
|
-
let className = "react-loading-skeleton";
|
|
89525
|
-
if (customClassName) className += ` ${customClassName}`;
|
|
89526
|
-
const inline = (_a = styleOptions.inline) !== null && _a !== void 0 ? _a : false;
|
|
89527
|
-
const elements = [];
|
|
89528
|
-
const countCeil = Math.ceil(count);
|
|
89529
|
-
for (let i = 0; i < countCeil; i++) {
|
|
89530
|
-
let thisStyle = style;
|
|
89531
|
-
if (countCeil > count && i === countCeil - 1) {
|
|
89532
|
-
const width = (_b = thisStyle.width) !== null && _b !== void 0 ? _b : "100%";
|
|
89533
|
-
const fractionalPart = count % 1;
|
|
89534
|
-
const fractionalWidth = typeof width === "number" ? width * fractionalPart : `calc(${width} * ${fractionalPart})`;
|
|
89535
|
-
thisStyle = {
|
|
89536
|
-
...thisStyle,
|
|
89537
|
-
width: fractionalWidth
|
|
89538
|
-
};
|
|
89539
|
-
}
|
|
89540
|
-
const skeletonSpan = React3.createElement("span", {
|
|
89541
|
-
className,
|
|
89542
|
-
style: thisStyle,
|
|
89543
|
-
key: i
|
|
89544
|
-
}, "");
|
|
89545
|
-
if (inline) elements.push(skeletonSpan);
|
|
89546
|
-
else elements.push(React3.createElement(React3.Fragment, { key: i }, skeletonSpan, React3.createElement("br", null)));
|
|
89547
|
-
}
|
|
89548
|
-
return React3.createElement("span", {
|
|
89549
|
-
className: containerClassName,
|
|
89550
|
-
"data-testid": containerTestId,
|
|
89551
|
-
"aria-live": "polite",
|
|
89552
|
-
"aria-busy": (_c = styleOptions.enableAnimation) !== null && _c !== void 0 ? _c : defaultEnableAnimation
|
|
89553
|
-
}, Wrapper ? elements.map((el, i) => React3.createElement(Wrapper, { key: i }, el)) : elements);
|
|
89554
|
-
}
|
|
89555
|
-
//#endregion
|
|
89556
|
-
//#region src/shared/ui/primitives/content-loader/index.tsx
|
|
89557
|
-
var ContentLoaderSquare = (t0) => {
|
|
89558
|
-
const $ = (0, import_compiler_runtime.c)(4);
|
|
89559
|
-
const { heightPx, variant, containerClassName } = t0;
|
|
89560
|
-
const t1 = variant?.size === "medium" ? vars.borderRadius.baseContract.md : vars.borderRadius.baseContract.xl;
|
|
89561
|
-
let t2;
|
|
89562
|
-
if ($[0] !== containerClassName || $[1] !== heightPx || $[2] !== t1) {
|
|
89563
|
-
t2 = /* @__PURE__ */ jsx(Skeleton, {
|
|
89564
|
-
height: heightPx,
|
|
89565
|
-
containerClassName,
|
|
89566
|
-
baseColor: vars.color.skeletonLoaderBase,
|
|
89567
|
-
highlightColor: vars.color.skeletonLoaderHighlight,
|
|
89568
|
-
enableAnimation: true,
|
|
89569
|
-
borderRadius: t1
|
|
89570
|
-
});
|
|
89571
|
-
$[0] = containerClassName;
|
|
89572
|
-
$[1] = heightPx;
|
|
89573
|
-
$[2] = t1;
|
|
89574
|
-
$[3] = t2;
|
|
89575
|
-
} else t2 = $[3];
|
|
89576
|
-
return t2;
|
|
89577
|
-
};
|
|
89578
|
-
var ContentLoaderLine = (t0) => {
|
|
89579
|
-
const $ = (0, import_compiler_runtime.c)(4);
|
|
89580
|
-
const { heightPx: t1, widthPx, containerClassName } = t0;
|
|
89581
|
-
const heightPx = t1 === void 0 ? 12 : t1;
|
|
89582
|
-
let t2;
|
|
89583
|
-
if ($[0] !== containerClassName || $[1] !== heightPx || $[2] !== widthPx) {
|
|
89584
|
-
t2 = /* @__PURE__ */ jsx(Skeleton, {
|
|
89585
|
-
height: heightPx,
|
|
89586
|
-
width: widthPx,
|
|
89587
|
-
containerClassName,
|
|
89588
|
-
baseColor: vars.color.skeletonLoaderBase,
|
|
89589
|
-
highlightColor: vars.color.skeletonLoaderHighlight,
|
|
89590
|
-
enableAnimation: true,
|
|
89591
|
-
borderRadius: vars.borderRadius.baseContract.md
|
|
89592
|
-
});
|
|
89593
|
-
$[0] = containerClassName;
|
|
89594
|
-
$[1] = heightPx;
|
|
89595
|
-
$[2] = widthPx;
|
|
89596
|
-
$[3] = t2;
|
|
89597
|
-
} else t2 = $[3];
|
|
89598
|
-
return t2;
|
|
89599
|
-
};
|
|
89600
|
-
var ContentLoaderCircle = (t0) => {
|
|
89601
|
-
const $ = (0, import_compiler_runtime.c)(2);
|
|
89602
|
-
const { sizePx } = t0;
|
|
89603
|
-
let t1;
|
|
89604
|
-
if ($[0] !== sizePx) {
|
|
89605
|
-
t1 = /* @__PURE__ */ jsx(Skeleton, {
|
|
89606
|
-
circle: true,
|
|
89607
|
-
height: sizePx,
|
|
89608
|
-
width: sizePx,
|
|
89609
|
-
baseColor: vars.color.skeletonLoaderBase,
|
|
89610
|
-
highlightColor: vars.color.skeletonLoaderHighlight,
|
|
89611
|
-
enableAnimation: true
|
|
89612
|
-
});
|
|
89613
|
-
$[0] = sizePx;
|
|
89614
|
-
$[1] = t1;
|
|
89615
|
-
} else t1 = $[1];
|
|
89616
|
-
return t1;
|
|
89617
|
-
};
|
|
89618
|
-
//#endregion
|
|
89619
89572
|
//#region src/features/activity/state/page.ts
|
|
89620
89573
|
var shouldShowActivityDashboardSplit = (view) => view.status === "ready" && view.actions.length > 0;
|
|
89621
89574
|
var resolveActivityPageWalletStatus = ({ configResult, connectionStatus }) => {
|
|
@@ -145872,6 +145825,7 @@ var makeBorrowFlowExecutionScopeAtom = (sessionOutcomeAtom) => makeScopedEffectS
|
|
|
145872
145825
|
getStates: (outcome) => outcome._tag === "Acquired" ? outcome.execution.states : never$1,
|
|
145873
145826
|
label: "borrowFlowExecutionScope",
|
|
145874
145827
|
makeValue: ({ handleAtom, stateAtom }) => {
|
|
145828
|
+
const makeCompletionStateAtom = () => walletRuntime.atom((context) => unwrap$1(context.result(handleAtom).pipe(map$6((outcome) => outcome._tag === "Acquired" ? outcome.execution.states.pipe(map$8((state) => state._tag === "Completed")) : succeed$6(false))))).pipe(withLabel("borrowFlowCompletionState"));
|
|
145875
145829
|
const viewAtom = make$11((get) => {
|
|
145876
145830
|
const result = get(stateAtom);
|
|
145877
145831
|
const state = getOrNull(value$2(result));
|
|
@@ -145890,6 +145844,7 @@ var makeBorrowFlowExecutionScopeAtom = (sessionOutcomeAtom) => makeScopedEffectS
|
|
|
145890
145844
|
facade: {
|
|
145891
145845
|
backAtom: walletRuntime.fn((_input, context) => context.result(handleAtom).pipe(flatMap$4((outcome) => outcome._tag === "Acquired" ? outcome.execution.back() : succeed$4({ _tag: "RejectedStale" }))), { initialValue: void 0 }).pipe(withLabel("backBorrowFlowExecution")),
|
|
145892
145846
|
finishAtom: walletRuntime.fn((_input, context) => context.result(handleAtom).pipe(flatMap$4((outcome) => outcome._tag === "Acquired" ? outcome.execution.finish() : succeed$4({ _tag: "RejectedStale" }))), { initialValue: void 0 }).pipe(withLabel("finishBorrowFlowExecution")),
|
|
145847
|
+
makeCompletionStateAtom,
|
|
145893
145848
|
viewAtom,
|
|
145894
145849
|
workflowCommandAtom
|
|
145895
145850
|
},
|
|
@@ -145945,10 +145900,6 @@ var makeBorrowFlowSessionModule = (session) => makeScopedEffectAtom({
|
|
|
145945
145900
|
var makeBorrowFlowReviewScope = (session) => session.ports.makeReviewScopeAtom();
|
|
145946
145901
|
var makeBorrowFlowExecutionScope = (session) => session.ports.makeExecutionScopeAtom();
|
|
145947
145902
|
var borrowFlowSessionRootAtomFamily = family(makeBorrowFlowSessionModule);
|
|
145948
|
-
var currentBorrowFlowSessionRootAtom = make$11((get) => {
|
|
145949
|
-
const session = get(currentBorrowFlowSessionAtom);
|
|
145950
|
-
return session ? borrowFlowSessionRootAtomFamily(session) : null;
|
|
145951
|
-
}).pipe(withLabel("currentBorrowFlowSessionRootAtom"));
|
|
145952
145903
|
//#endregion
|
|
145953
145904
|
//#region src/features/borrow-transaction-flow/react/borrow-flow-route.tsx
|
|
145954
145905
|
var BorrowFlowSessionContext = createContext(null);
|
|
@@ -145975,61 +145926,52 @@ var getEntryFallbackPath = (expected, marketId) => {
|
|
|
145975
145926
|
return "/positions";
|
|
145976
145927
|
};
|
|
145977
145928
|
var BorrowTransactionFlowRoute = (t0) => {
|
|
145978
|
-
const $ = (0, import_compiler_runtime.c)(
|
|
145929
|
+
const $ = (0, import_compiler_runtime.c)(8);
|
|
145979
145930
|
const { expected } = t0;
|
|
145980
145931
|
const routeParams = useParams();
|
|
145981
145932
|
const marketId = routeParams.marketId ? decodeSync(MarketId)(routeParams.marketId) : void 0;
|
|
145982
|
-
const
|
|
145983
|
-
|
|
145933
|
+
const [sessionAtom] = useState(makeBorrowFlowRouteSessionAtom);
|
|
145934
|
+
const result = useAtomValue(sessionAtom);
|
|
145935
|
+
const fallbackPath = getEntryFallbackPath(expected, marketId);
|
|
145936
|
+
if (result._tag === "Initial") {
|
|
145984
145937
|
let t1;
|
|
145985
|
-
if ($[0]
|
|
145986
|
-
t1 = /* @__PURE__ */ jsx(
|
|
145987
|
-
$[0] =
|
|
145988
|
-
|
|
145989
|
-
$[2] = t1;
|
|
145990
|
-
} else t1 = $[2];
|
|
145938
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
145939
|
+
t1 = /* @__PURE__ */ jsx(LoadingSkeleton, {});
|
|
145940
|
+
$[0] = t1;
|
|
145941
|
+
} else t1 = $[0];
|
|
145991
145942
|
return t1;
|
|
145992
145943
|
}
|
|
145993
|
-
|
|
145944
|
+
if (result._tag === "Failure") return /* @__PURE__ */ jsx(Navigate, {
|
|
145945
|
+
replace: true,
|
|
145946
|
+
to: fallbackPath
|
|
145947
|
+
});
|
|
145948
|
+
const session = result.value;
|
|
145949
|
+
if (session && matchesEntry(session.intake.entry, expected, marketId)) {
|
|
145950
|
+
const t1 = session.epoch;
|
|
145951
|
+
let t2;
|
|
145952
|
+
if ($[1] !== session) {
|
|
145953
|
+
t2 = borrowFlowSessionRootAtomFamily(session);
|
|
145954
|
+
$[1] = session;
|
|
145955
|
+
$[2] = t2;
|
|
145956
|
+
} else t2 = $[2];
|
|
145957
|
+
let t3;
|
|
145958
|
+
if ($[3] !== session.epoch || $[4] !== t2) {
|
|
145959
|
+
t3 = /* @__PURE__ */ jsx(MountedSessionBinding, { rootAtom: t2 }, t1);
|
|
145960
|
+
$[3] = session.epoch;
|
|
145961
|
+
$[4] = t2;
|
|
145962
|
+
$[5] = t3;
|
|
145963
|
+
} else t3 = $[5];
|
|
145964
|
+
return t3;
|
|
145965
|
+
}
|
|
145994
145966
|
let t1;
|
|
145995
|
-
if ($[
|
|
145967
|
+
if ($[6] !== fallbackPath) {
|
|
145996
145968
|
t1 = /* @__PURE__ */ jsx(Navigate, {
|
|
145997
145969
|
replace: true,
|
|
145998
145970
|
to: fallbackPath
|
|
145999
145971
|
});
|
|
146000
|
-
$[
|
|
146001
|
-
$[
|
|
146002
|
-
} else t1 = $[
|
|
146003
|
-
return t1;
|
|
146004
|
-
};
|
|
146005
|
-
var SessionBinding = (t0) => {
|
|
146006
|
-
const $ = (0, import_compiler_runtime.c)(6);
|
|
146007
|
-
const { entry } = t0;
|
|
146008
|
-
const rootAtom = useAtomValue(currentBorrowFlowSessionRootAtom);
|
|
146009
|
-
if (!rootAtom) {
|
|
146010
|
-
let t1;
|
|
146011
|
-
if ($[0] !== entry) {
|
|
146012
|
-
t1 = getBorrowTransactionFlowRoutes(entry);
|
|
146013
|
-
$[0] = entry;
|
|
146014
|
-
$[1] = t1;
|
|
146015
|
-
} else t1 = $[1];
|
|
146016
|
-
let t2;
|
|
146017
|
-
if ($[2] !== t1.basePath) {
|
|
146018
|
-
t2 = /* @__PURE__ */ jsx(Navigate, {
|
|
146019
|
-
replace: true,
|
|
146020
|
-
to: t1.basePath
|
|
146021
|
-
});
|
|
146022
|
-
$[2] = t1.basePath;
|
|
146023
|
-
$[3] = t2;
|
|
146024
|
-
} else t2 = $[3];
|
|
146025
|
-
return t2;
|
|
146026
|
-
}
|
|
146027
|
-
let t1;
|
|
146028
|
-
if ($[4] !== rootAtom) {
|
|
146029
|
-
t1 = /* @__PURE__ */ jsx(MountedSessionBinding, { rootAtom });
|
|
146030
|
-
$[4] = rootAtom;
|
|
146031
|
-
$[5] = t1;
|
|
146032
|
-
} else t1 = $[5];
|
|
145972
|
+
$[6] = fallbackPath;
|
|
145973
|
+
$[7] = t1;
|
|
145974
|
+
} else t1 = $[7];
|
|
146033
145975
|
return t1;
|
|
146034
145976
|
};
|
|
146035
145977
|
var MountedSessionBinding = (t0) => {
|
|
@@ -146178,27 +146120,59 @@ var ExecutionBinding = (t0) => {
|
|
|
146178
146120
|
return t3;
|
|
146179
146121
|
};
|
|
146180
146122
|
var BorrowTransactionFlowCompletionGuard = () => {
|
|
146181
|
-
const $ = (0, import_compiler_runtime.c)(
|
|
146182
|
-
const
|
|
146183
|
-
|
|
146184
|
-
|
|
146185
|
-
|
|
146186
|
-
|
|
146187
|
-
$[
|
|
146188
|
-
|
|
146189
|
-
|
|
146190
|
-
const
|
|
146123
|
+
const $ = (0, import_compiler_runtime.c)(9);
|
|
146124
|
+
const execution = useBorrowTransactionFlowExecution();
|
|
146125
|
+
let t0;
|
|
146126
|
+
if ($[0] !== execution) {
|
|
146127
|
+
t0 = () => execution.makeCompletionStateAtom();
|
|
146128
|
+
$[0] = execution;
|
|
146129
|
+
$[1] = t0;
|
|
146130
|
+
} else t0 = $[1];
|
|
146131
|
+
const [completionAtom] = useState(t0);
|
|
146132
|
+
const result = useAtomValue(completionAtom);
|
|
146133
|
+
const view = useAtomValue(execution.viewAtom);
|
|
146134
|
+
const t1 = useBorrowTransactionFlow();
|
|
146191
146135
|
let t2;
|
|
146192
|
-
if ($[2] !==
|
|
146193
|
-
t2 =
|
|
146194
|
-
|
|
146195
|
-
|
|
146196
|
-
|
|
146197
|
-
|
|
146198
|
-
|
|
146199
|
-
|
|
146200
|
-
|
|
146201
|
-
|
|
146136
|
+
if ($[2] !== t1.intake.entry) {
|
|
146137
|
+
t2 = getBorrowTransactionFlowRoutes(t1.intake.entry);
|
|
146138
|
+
$[2] = t1.intake.entry;
|
|
146139
|
+
$[3] = t2;
|
|
146140
|
+
} else t2 = $[3];
|
|
146141
|
+
const { stepsPath } = t2;
|
|
146142
|
+
if (result._tag === "Initial") {
|
|
146143
|
+
let t3;
|
|
146144
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
146145
|
+
t3 = /* @__PURE__ */ jsx(LoadingSkeleton, {});
|
|
146146
|
+
$[4] = t3;
|
|
146147
|
+
} else t3 = $[4];
|
|
146148
|
+
return t3;
|
|
146149
|
+
}
|
|
146150
|
+
if (result._tag === "Failure" || !result.value) {
|
|
146151
|
+
let t3;
|
|
146152
|
+
if ($[5] !== stepsPath) {
|
|
146153
|
+
t3 = /* @__PURE__ */ jsx(Navigate, {
|
|
146154
|
+
replace: true,
|
|
146155
|
+
to: stepsPath
|
|
146156
|
+
});
|
|
146157
|
+
$[5] = stepsPath;
|
|
146158
|
+
$[6] = t3;
|
|
146159
|
+
} else t3 = $[6];
|
|
146160
|
+
return t3;
|
|
146161
|
+
}
|
|
146162
|
+
if (!view.isDone) {
|
|
146163
|
+
let t3;
|
|
146164
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
146165
|
+
t3 = /* @__PURE__ */ jsx(LoadingSkeleton, {});
|
|
146166
|
+
$[7] = t3;
|
|
146167
|
+
} else t3 = $[7];
|
|
146168
|
+
return t3;
|
|
146169
|
+
}
|
|
146170
|
+
let t3;
|
|
146171
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
146172
|
+
t3 = /* @__PURE__ */ jsx(Outlet, {});
|
|
146173
|
+
$[8] = t3;
|
|
146174
|
+
} else t3 = $[8];
|
|
146175
|
+
return t3;
|
|
146202
146176
|
};
|
|
146203
146177
|
//#endregion
|
|
146204
146178
|
//#region src/features/borrow-transaction-flow/ui/use-borrow-execution.ts
|
|
@@ -148509,10 +148483,10 @@ var SKApp = (t0) => {
|
|
|
148509
148483
|
}
|
|
148510
148484
|
let t1;
|
|
148511
148485
|
if ($[3] !== children || $[4] !== hostConfiguration) {
|
|
148512
|
-
t1 = /* @__PURE__ */ jsx(
|
|
148486
|
+
t1 = /* @__PURE__ */ jsx(SKAppProductionContent, {
|
|
148513
148487
|
...hostConfiguration,
|
|
148514
148488
|
children
|
|
148515
|
-
})
|
|
148489
|
+
});
|
|
148516
148490
|
$[3] = children;
|
|
148517
148491
|
$[4] = hostConfiguration;
|
|
148518
148492
|
$[5] = t1;
|