unframer 2.5.1 → 2.5.3
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 +6 -0
- package/dist/esbuild.d.ts +2 -1
- package/dist/esbuild.d.ts.map +1 -1
- package/dist/esbuild.js +7 -1
- package/dist/esbuild.js.map +1 -1
- package/dist/framer.d.ts.map +1 -1
- package/dist/framer.js +927 -450
- package/dist/framer.js.map +1 -1
- package/esm/esbuild.d.ts +2 -1
- package/esm/esbuild.d.ts.map +1 -1
- package/esm/esbuild.js +7 -1
- package/esm/esbuild.js.map +1 -1
- package/esm/framer.d.ts.map +1 -1
- package/esm/framer.js +919 -444
- package/esm/framer.js.map +1 -1
- package/package.json +1 -1
- package/src/esbuild.ts +7 -0
- package/src/framer.js +1003 -469
package/src/framer.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// https :https://app.framerstatic.com/chunk-
|
|
1
|
+
// https :https://app.framerstatic.com/chunk-DUHOOT7P.js
|
|
2
2
|
import { createContext, } from 'react';
|
|
3
3
|
import { useEffect, useLayoutEffect, } from 'react';
|
|
4
4
|
import { jsx, jsxs, } from 'react/jsx-runtime';
|
|
@@ -1305,6 +1305,9 @@ function hslaToRgba({
|
|
|
1305
1305
|
alpha: alpha2,
|
|
1306
1306
|
};
|
|
1307
1307
|
}
|
|
1308
|
+
function mixImmediate(a, b,) {
|
|
1309
|
+
return (p) => p > 0 ? b : a;
|
|
1310
|
+
}
|
|
1308
1311
|
var mixLinearColor = (from, to, v,) => {
|
|
1309
1312
|
const fromExpo = from * from;
|
|
1310
1313
|
const expo = v * (to * to - fromExpo) + fromExpo;
|
|
@@ -1314,7 +1317,8 @@ var colorTypes = [hex, rgba, hsla,];
|
|
|
1314
1317
|
var getColorType = (v) => colorTypes.find((type) => type.test(v,));
|
|
1315
1318
|
function asRGBA(color2,) {
|
|
1316
1319
|
const type = getColorType(color2,);
|
|
1317
|
-
|
|
1320
|
+
warning(Boolean(type,), `'${color2}' is not an animatable color. Use the equivalent color code instead.`,);
|
|
1321
|
+
if (!Boolean(type,)) return false;
|
|
1318
1322
|
let model = type.parse(color2,);
|
|
1319
1323
|
if (type === hsla) {
|
|
1320
1324
|
model = hslaToRgba(model,);
|
|
@@ -1324,6 +1328,9 @@ function asRGBA(color2,) {
|
|
|
1324
1328
|
var mixColor = (from, to,) => {
|
|
1325
1329
|
const fromRGBA = asRGBA(from,);
|
|
1326
1330
|
const toRGBA = asRGBA(to,);
|
|
1331
|
+
if (!fromRGBA || !toRGBA) {
|
|
1332
|
+
return mixImmediate(from, to,);
|
|
1333
|
+
}
|
|
1327
1334
|
const blended = {
|
|
1328
1335
|
...fromRGBA,
|
|
1329
1336
|
};
|
|
@@ -1352,9 +1359,6 @@ function mixVisibility(origin, target,) {
|
|
|
1352
1359
|
return (p) => p >= 1 ? target : origin;
|
|
1353
1360
|
}
|
|
1354
1361
|
}
|
|
1355
|
-
function mixImmediate(a, b,) {
|
|
1356
|
-
return (p) => p > 0 ? b : a;
|
|
1357
|
-
}
|
|
1358
1362
|
function mixNumber2(a, b,) {
|
|
1359
1363
|
return (p) => mixNumber(a, b, p,);
|
|
1360
1364
|
}
|
|
@@ -2507,14 +2511,17 @@ var DOMKeyframesResolver = class extends KeyframeResolver {
|
|
|
2507
2511
|
if (!element.current) return;
|
|
2508
2512
|
super.readKeyframes();
|
|
2509
2513
|
for (let i = 0; i < unresolvedKeyframes.length; i++) {
|
|
2510
|
-
|
|
2511
|
-
if (typeof keyframe === 'string'
|
|
2512
|
-
|
|
2513
|
-
if (
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2514
|
+
let keyframe = unresolvedKeyframes[i];
|
|
2515
|
+
if (typeof keyframe === 'string') {
|
|
2516
|
+
keyframe = keyframe.trim();
|
|
2517
|
+
if (isCSSVariableToken(keyframe,)) {
|
|
2518
|
+
const resolved = getVariableValue(keyframe, element.current,);
|
|
2519
|
+
if (resolved !== void 0) {
|
|
2520
|
+
unresolvedKeyframes[i] = resolved;
|
|
2521
|
+
}
|
|
2522
|
+
if (i === unresolvedKeyframes.length - 1) {
|
|
2523
|
+
this.finalKeyframe = keyframe;
|
|
2524
|
+
}
|
|
2518
2525
|
}
|
|
2519
2526
|
}
|
|
2520
2527
|
}
|
|
@@ -3011,7 +3018,7 @@ var MotionValue = class {
|
|
|
3011
3018
|
* @internal
|
|
3012
3019
|
*/
|
|
3013
3020
|
constructor(init, options = {},) {
|
|
3014
|
-
this.version = '11.2.
|
|
3021
|
+
this.version = '11.2.10';
|
|
3015
3022
|
this.canTrackVelocity = null;
|
|
3016
3023
|
this.events = {};
|
|
3017
3024
|
this.updateAndNotify = (v, render = true,) => {
|
|
@@ -3318,6 +3325,95 @@ function isTransitionDefined({
|
|
|
3318
3325
|
function getValueTransition(transition, key7,) {
|
|
3319
3326
|
return transition[key7] || transition['default'] || transition;
|
|
3320
3327
|
}
|
|
3328
|
+
function observeTimeline(update, timeline,) {
|
|
3329
|
+
let prevProgress;
|
|
3330
|
+
const onFrame = () => {
|
|
3331
|
+
const {
|
|
3332
|
+
currentTime,
|
|
3333
|
+
} = timeline;
|
|
3334
|
+
const percentage = currentTime === null ? 0 : currentTime.value;
|
|
3335
|
+
const progress2 = percentage / 100;
|
|
3336
|
+
if (prevProgress !== progress2) {
|
|
3337
|
+
update(progress2,);
|
|
3338
|
+
}
|
|
3339
|
+
prevProgress = progress2;
|
|
3340
|
+
};
|
|
3341
|
+
frame.update(onFrame, true,);
|
|
3342
|
+
return () => cancelFrame(onFrame,);
|
|
3343
|
+
}
|
|
3344
|
+
var supportsScrollTimeline = memo(() => window.ScrollTimeline !== void 0);
|
|
3345
|
+
var GroupPlaybackControls = class {
|
|
3346
|
+
constructor(animations2,) {
|
|
3347
|
+
this.stop = () => this.runAll('stop',);
|
|
3348
|
+
this.animations = animations2.filter(Boolean,);
|
|
3349
|
+
}
|
|
3350
|
+
then(onResolve, onReject,) {
|
|
3351
|
+
return Promise.all(this.animations,).then(onResolve,).catch(onReject,);
|
|
3352
|
+
}
|
|
3353
|
+
/**
|
|
3354
|
+
* TODO: Filter out cancelled or stopped animations before returning
|
|
3355
|
+
*/
|
|
3356
|
+
getAll(propName,) {
|
|
3357
|
+
return this.animations[0][propName];
|
|
3358
|
+
}
|
|
3359
|
+
setAll(propName, newValue,) {
|
|
3360
|
+
for (let i = 0; i < this.animations.length; i++) {
|
|
3361
|
+
this.animations[i][propName] = newValue;
|
|
3362
|
+
}
|
|
3363
|
+
}
|
|
3364
|
+
attachTimeline(timeline,) {
|
|
3365
|
+
const cancelAll = this.animations.map((animation) => {
|
|
3366
|
+
if (supportsScrollTimeline() && animation.attachTimeline) {
|
|
3367
|
+
animation.attachTimeline(timeline,);
|
|
3368
|
+
} else {
|
|
3369
|
+
animation.pause();
|
|
3370
|
+
return observeTimeline((progress2) => {
|
|
3371
|
+
animation.time = animation.duration * progress2;
|
|
3372
|
+
}, timeline,);
|
|
3373
|
+
}
|
|
3374
|
+
},);
|
|
3375
|
+
return () => {
|
|
3376
|
+
cancelAll.forEach((cancelTimeline, i,) => {
|
|
3377
|
+
if (cancelTimeline) cancelTimeline();
|
|
3378
|
+
this.animations[i].stop();
|
|
3379
|
+
},);
|
|
3380
|
+
};
|
|
3381
|
+
}
|
|
3382
|
+
get time() {
|
|
3383
|
+
return this.getAll('time',);
|
|
3384
|
+
}
|
|
3385
|
+
set time(time2,) {
|
|
3386
|
+
this.setAll('time', time2,);
|
|
3387
|
+
}
|
|
3388
|
+
get speed() {
|
|
3389
|
+
return this.getAll('speed',);
|
|
3390
|
+
}
|
|
3391
|
+
set speed(speed,) {
|
|
3392
|
+
this.setAll('speed', speed,);
|
|
3393
|
+
}
|
|
3394
|
+
get duration() {
|
|
3395
|
+
let max = 0;
|
|
3396
|
+
for (let i = 0; i < this.animations.length; i++) {
|
|
3397
|
+
max = Math.max(max, this.animations[i].duration,);
|
|
3398
|
+
}
|
|
3399
|
+
return max;
|
|
3400
|
+
}
|
|
3401
|
+
runAll(methodName,) {
|
|
3402
|
+
this.animations.forEach((controls) => controls[methodName]());
|
|
3403
|
+
}
|
|
3404
|
+
play() {
|
|
3405
|
+
this.runAll('play',);
|
|
3406
|
+
}
|
|
3407
|
+
pause() {
|
|
3408
|
+
this.runAll('pause',);
|
|
3409
|
+
}
|
|
3410
|
+
cancel() {
|
|
3411
|
+
this.runAll('cancel',);
|
|
3412
|
+
}
|
|
3413
|
+
complete() {
|
|
3414
|
+
this.runAll('complete',);
|
|
3415
|
+
}
|
|
3416
|
+
};
|
|
3321
3417
|
var animateMotionValue = (name, value, target, transition = {}, element, isHandoff,) => (onComplete) => {
|
|
3322
3418
|
const valueTransition = getValueTransition(transition, name,) || {};
|
|
3323
3419
|
const delay2 = valueTransition.delay || transition.delay || 0;
|
|
@@ -3377,7 +3473,7 @@ var animateMotionValue = (name, value, target, transition = {}, element, isHando
|
|
|
3377
3473
|
options.onUpdate(finalKeyframe,);
|
|
3378
3474
|
options.onComplete();
|
|
3379
3475
|
},);
|
|
3380
|
-
return;
|
|
3476
|
+
return new GroupPlaybackControls([],);
|
|
3381
3477
|
}
|
|
3382
3478
|
}
|
|
3383
3479
|
if (!isHandoff && AcceleratedAnimation.supports(options,)) {
|
|
@@ -3412,6 +3508,9 @@ function setTarget(visualElement, definition,) {
|
|
|
3412
3508
|
setMotionValue(visualElement, key7, value,);
|
|
3413
3509
|
}
|
|
3414
3510
|
}
|
|
3511
|
+
function getOptimisedAppearId(visualElement,) {
|
|
3512
|
+
return visualElement.getProps()[optimizedAppearDataAttribute];
|
|
3513
|
+
}
|
|
3415
3514
|
function shouldBlockAnimation({
|
|
3416
3515
|
protectedKeys,
|
|
3417
3516
|
needsAnimating,
|
|
@@ -3448,8 +3547,7 @@ function animateTarget(visualElement, targetAndTransition, {
|
|
|
3448
3547
|
};
|
|
3449
3548
|
let isHandoff = false;
|
|
3450
3549
|
if (window.HandoffAppearAnimations) {
|
|
3451
|
-
const
|
|
3452
|
-
const appearId = props[optimizedAppearDataAttribute];
|
|
3550
|
+
const appearId = getOptimisedAppearId(visualElement,);
|
|
3453
3551
|
if (appearId) {
|
|
3454
3552
|
const elapsed = window.HandoffAppearAnimations(appearId, key7, value, frame,);
|
|
3455
3553
|
if (elapsed !== null) {
|
|
@@ -4003,8 +4101,8 @@ function updateMotionValuesFromProps(element, next, prev,) {
|
|
|
4003
4101
|
}
|
|
4004
4102
|
if (false) {
|
|
4005
4103
|
warnOnce(
|
|
4006
|
-
nextValue.version === '11.2.
|
|
4007
|
-
`Attempting to mix Framer Motion versions ${nextValue.version} with 11.2.
|
|
4104
|
+
nextValue.version === '11.2.10',
|
|
4105
|
+
`Attempting to mix Framer Motion versions ${nextValue.version} with 11.2.10 may not work as expected.`,
|
|
4008
4106
|
);
|
|
4009
4107
|
}
|
|
4010
4108
|
} else if (isMotionValue(prevValue,)) {
|
|
@@ -6603,6 +6701,22 @@ function resetDistortingTransform(key7, visualElement, values, sharedAnimationVa
|
|
|
6603
6701
|
}
|
|
6604
6702
|
}
|
|
6605
6703
|
}
|
|
6704
|
+
function isOptimisedAppearTree(projectionNode,) {
|
|
6705
|
+
projectionNode.hasCheckedOptimisedAppear = true;
|
|
6706
|
+
if (projectionNode.root === projectionNode) return false;
|
|
6707
|
+
const {
|
|
6708
|
+
visualElement,
|
|
6709
|
+
} = projectionNode.options;
|
|
6710
|
+
if (!visualElement) {
|
|
6711
|
+
return false;
|
|
6712
|
+
} else if (getOptimisedAppearId(visualElement,)) {
|
|
6713
|
+
return true;
|
|
6714
|
+
} else if (projectionNode.parent && !projectionNode.parent.hasCheckedOptimisedAppear) {
|
|
6715
|
+
return isOptimisedAppearTree(projectionNode.parent,);
|
|
6716
|
+
} else {
|
|
6717
|
+
return false;
|
|
6718
|
+
}
|
|
6719
|
+
}
|
|
6606
6720
|
function createProjectionNode({
|
|
6607
6721
|
attachResizeListener,
|
|
6608
6722
|
defaultParent,
|
|
@@ -6628,6 +6742,7 @@ function createProjectionNode({
|
|
|
6628
6742
|
this.isSVG = false;
|
|
6629
6743
|
this.needsReset = false;
|
|
6630
6744
|
this.shouldResetTransform = false;
|
|
6745
|
+
this.hasCheckedOptimisedAppear = false;
|
|
6631
6746
|
this.treeScale = {
|
|
6632
6747
|
x: 1,
|
|
6633
6748
|
y: 1,
|
|
@@ -6790,9 +6905,6 @@ function createProjectionNode({
|
|
|
6790
6905
|
startUpdate() {
|
|
6791
6906
|
if (this.isUpdateBlocked()) return;
|
|
6792
6907
|
this.isUpdating = true;
|
|
6793
|
-
if (window.HandoffCancelAllAnimations) {
|
|
6794
|
-
window.HandoffCancelAllAnimations();
|
|
6795
|
-
}
|
|
6796
6908
|
this.nodes && this.nodes.forEach(resetSkewAndRotation,);
|
|
6797
6909
|
this.animationId++;
|
|
6798
6910
|
}
|
|
@@ -6808,6 +6920,9 @@ function createProjectionNode({
|
|
|
6808
6920
|
this.options.onExitComplete && this.options.onExitComplete();
|
|
6809
6921
|
return;
|
|
6810
6922
|
}
|
|
6923
|
+
if (window.HandoffCancelAllAnimations && isOptimisedAppearTree(this,)) {
|
|
6924
|
+
window.HandoffCancelAllAnimations();
|
|
6925
|
+
}
|
|
6811
6926
|
!this.root.isUpdating && this.root.startUpdate();
|
|
6812
6927
|
if (this.isLayoutDirty) return;
|
|
6813
6928
|
this.isLayoutDirty = true;
|
|
@@ -7429,16 +7544,16 @@ function createProjectionNode({
|
|
|
7429
7544
|
if (!this.isVisible) {
|
|
7430
7545
|
return hiddenVisibility;
|
|
7431
7546
|
}
|
|
7432
|
-
const
|
|
7547
|
+
const styles2 = {
|
|
7433
7548
|
visibility: '',
|
|
7434
7549
|
};
|
|
7435
7550
|
const transformTemplate2 = this.getTransformTemplate();
|
|
7436
7551
|
if (this.needsReset) {
|
|
7437
7552
|
this.needsReset = false;
|
|
7438
|
-
|
|
7439
|
-
|
|
7440
|
-
|
|
7441
|
-
return
|
|
7553
|
+
styles2.opacity = '';
|
|
7554
|
+
styles2.pointerEvents = resolveMotionValue(styleProp === null || styleProp === void 0 ? void 0 : styleProp.pointerEvents,) || '';
|
|
7555
|
+
styles2.transform = transformTemplate2 ? transformTemplate2(this.latestValues, '',) : 'none';
|
|
7556
|
+
return styles2;
|
|
7442
7557
|
}
|
|
7443
7558
|
const lead = this.getLead();
|
|
7444
7559
|
if (!this.projectionDelta || !this.layout || !lead.target) {
|
|
@@ -7456,17 +7571,17 @@ function createProjectionNode({
|
|
|
7456
7571
|
}
|
|
7457
7572
|
const valuesToRender = lead.animationValues || lead.latestValues;
|
|
7458
7573
|
this.applyTransformsToTarget();
|
|
7459
|
-
|
|
7574
|
+
styles2.transform = buildProjectionTransform(this.projectionDeltaWithTransform, this.treeScale, valuesToRender,);
|
|
7460
7575
|
if (transformTemplate2) {
|
|
7461
|
-
|
|
7576
|
+
styles2.transform = transformTemplate2(valuesToRender, styles2.transform,);
|
|
7462
7577
|
}
|
|
7463
7578
|
const {
|
|
7464
7579
|
x,
|
|
7465
7580
|
y,
|
|
7466
7581
|
} = this.projectionDelta;
|
|
7467
|
-
|
|
7582
|
+
styles2.transformOrigin = `${x.origin * 100}% ${y.origin * 100}% 0`;
|
|
7468
7583
|
if (lead.animationValues) {
|
|
7469
|
-
|
|
7584
|
+
styles2.opacity = lead === this
|
|
7470
7585
|
? (_b = (_a = valuesToRender.opacity) !== null && _a !== void 0 ? _a : this.latestValues.opacity) !== null && _b !== void 0
|
|
7471
7586
|
? _b
|
|
7472
7587
|
: 1
|
|
@@ -7474,7 +7589,7 @@ function createProjectionNode({
|
|
|
7474
7589
|
? this.latestValues.opacity
|
|
7475
7590
|
: valuesToRender.opacityExit;
|
|
7476
7591
|
} else {
|
|
7477
|
-
|
|
7592
|
+
styles2.opacity = lead === this
|
|
7478
7593
|
? valuesToRender.opacity !== void 0 ? valuesToRender.opacity : ''
|
|
7479
7594
|
: valuesToRender.opacityExit !== void 0
|
|
7480
7595
|
? valuesToRender.opacityExit
|
|
@@ -7486,22 +7601,22 @@ function createProjectionNode({
|
|
|
7486
7601
|
correct,
|
|
7487
7602
|
applyTo,
|
|
7488
7603
|
} = scaleCorrectors[key7];
|
|
7489
|
-
const corrected =
|
|
7604
|
+
const corrected = styles2.transform === 'none' ? valuesToRender[key7] : correct(valuesToRender[key7], lead,);
|
|
7490
7605
|
if (applyTo) {
|
|
7491
7606
|
const num = applyTo.length;
|
|
7492
7607
|
for (let i = 0; i < num; i++) {
|
|
7493
|
-
|
|
7608
|
+
styles2[applyTo[i]] = corrected;
|
|
7494
7609
|
}
|
|
7495
7610
|
} else {
|
|
7496
|
-
|
|
7611
|
+
styles2[key7] = corrected;
|
|
7497
7612
|
}
|
|
7498
7613
|
}
|
|
7499
7614
|
if (this.options.layoutId) {
|
|
7500
|
-
|
|
7615
|
+
styles2.pointerEvents = lead === this
|
|
7501
7616
|
? resolveMotionValue(styleProp === null || styleProp === void 0 ? void 0 : styleProp.pointerEvents,) || ''
|
|
7502
7617
|
: 'none';
|
|
7503
7618
|
}
|
|
7504
|
-
return
|
|
7619
|
+
return styles2;
|
|
7505
7620
|
}
|
|
7506
7621
|
clearSnapshot() {
|
|
7507
7622
|
this.resumeFrom = this.snapshot = void 0;
|
|
@@ -9131,97 +9246,6 @@ var wrap = (min, max, v,) => {
|
|
|
9131
9246
|
const rangeSize = max - min;
|
|
9132
9247
|
return ((v - min) % rangeSize + rangeSize) % rangeSize + min;
|
|
9133
9248
|
};
|
|
9134
|
-
function observeTimeline(update, timeline,) {
|
|
9135
|
-
let prevProgress;
|
|
9136
|
-
const onFrame = () => {
|
|
9137
|
-
const {
|
|
9138
|
-
currentTime,
|
|
9139
|
-
} = timeline;
|
|
9140
|
-
const percentage = currentTime === null ? 0 : currentTime.value;
|
|
9141
|
-
const progress2 = percentage / 100;
|
|
9142
|
-
if (prevProgress !== progress2) {
|
|
9143
|
-
update(progress2,);
|
|
9144
|
-
}
|
|
9145
|
-
prevProgress = progress2;
|
|
9146
|
-
};
|
|
9147
|
-
frame.update(onFrame, true,);
|
|
9148
|
-
return () => cancelFrame(onFrame,);
|
|
9149
|
-
}
|
|
9150
|
-
var supportsScrollTimeline = memo(() => window.ScrollTimeline !== void 0);
|
|
9151
|
-
var GroupPlaybackControls = class {
|
|
9152
|
-
constructor(animations2,) {
|
|
9153
|
-
this.animations = animations2.filter(Boolean,);
|
|
9154
|
-
}
|
|
9155
|
-
then(onResolve, onReject,) {
|
|
9156
|
-
return Promise.all(this.animations,).then(onResolve,).catch(onReject,);
|
|
9157
|
-
}
|
|
9158
|
-
/**
|
|
9159
|
-
* TODO: Filter out cancelled or stopped animations before returning
|
|
9160
|
-
*/
|
|
9161
|
-
getAll(propName,) {
|
|
9162
|
-
return this.animations[0][propName];
|
|
9163
|
-
}
|
|
9164
|
-
setAll(propName, newValue,) {
|
|
9165
|
-
for (let i = 0; i < this.animations.length; i++) {
|
|
9166
|
-
this.animations[i][propName] = newValue;
|
|
9167
|
-
}
|
|
9168
|
-
}
|
|
9169
|
-
attachTimeline(timeline,) {
|
|
9170
|
-
const cancelAll = this.animations.map((animation) => {
|
|
9171
|
-
if (supportsScrollTimeline() && animation.attachTimeline) {
|
|
9172
|
-
animation.attachTimeline(timeline,);
|
|
9173
|
-
} else {
|
|
9174
|
-
animation.pause();
|
|
9175
|
-
return observeTimeline((progress2) => {
|
|
9176
|
-
animation.time = animation.duration * progress2;
|
|
9177
|
-
}, timeline,);
|
|
9178
|
-
}
|
|
9179
|
-
},);
|
|
9180
|
-
return () => {
|
|
9181
|
-
cancelAll.forEach((cancelTimeline, i,) => {
|
|
9182
|
-
if (cancelTimeline) cancelTimeline();
|
|
9183
|
-
this.animations[i].stop();
|
|
9184
|
-
},);
|
|
9185
|
-
};
|
|
9186
|
-
}
|
|
9187
|
-
get time() {
|
|
9188
|
-
return this.getAll('time',);
|
|
9189
|
-
}
|
|
9190
|
-
set time(time2,) {
|
|
9191
|
-
this.setAll('time', time2,);
|
|
9192
|
-
}
|
|
9193
|
-
get speed() {
|
|
9194
|
-
return this.getAll('speed',);
|
|
9195
|
-
}
|
|
9196
|
-
set speed(speed,) {
|
|
9197
|
-
this.setAll('speed', speed,);
|
|
9198
|
-
}
|
|
9199
|
-
get duration() {
|
|
9200
|
-
let max = 0;
|
|
9201
|
-
for (let i = 0; i < this.animations.length; i++) {
|
|
9202
|
-
max = Math.max(max, this.animations[i].duration,);
|
|
9203
|
-
}
|
|
9204
|
-
return max;
|
|
9205
|
-
}
|
|
9206
|
-
runAll(methodName,) {
|
|
9207
|
-
this.animations.forEach((controls) => controls[methodName]());
|
|
9208
|
-
}
|
|
9209
|
-
play() {
|
|
9210
|
-
this.runAll('play',);
|
|
9211
|
-
}
|
|
9212
|
-
pause() {
|
|
9213
|
-
this.runAll('pause',);
|
|
9214
|
-
}
|
|
9215
|
-
stop() {
|
|
9216
|
-
this.runAll('stop',);
|
|
9217
|
-
}
|
|
9218
|
-
cancel() {
|
|
9219
|
-
this.runAll('cancel',);
|
|
9220
|
-
}
|
|
9221
|
-
complete() {
|
|
9222
|
-
this.runAll('complete',);
|
|
9223
|
-
}
|
|
9224
|
-
};
|
|
9225
9249
|
function isDOMKeyframes(keyframes2,) {
|
|
9226
9250
|
return typeof keyframes2 === 'object' && !Array.isArray(keyframes2,);
|
|
9227
9251
|
}
|
|
@@ -9972,7 +9996,7 @@ var cancelSync = stepsOrder.reduce((acc, key7,) => {
|
|
|
9972
9996
|
return acc;
|
|
9973
9997
|
}, {},);
|
|
9974
9998
|
|
|
9975
|
-
// https :https://app.framerstatic.com/framer.
|
|
9999
|
+
// https :https://app.framerstatic.com/framer.IBCXHSKM.js
|
|
9976
10000
|
|
|
9977
10001
|
import React4 from 'react';
|
|
9978
10002
|
import { startTransition as startTransition2, } from 'react';
|
|
@@ -11083,11 +11107,11 @@ var require_resize_observer_umd = __commonJS({
|
|
|
11083
11107
|
};
|
|
11084
11108
|
return Scheduler2;
|
|
11085
11109
|
}();
|
|
11086
|
-
var
|
|
11110
|
+
var scheduler2 = new Scheduler();
|
|
11087
11111
|
var updateCount = function (n,) {
|
|
11088
|
-
!watching && n > 0 &&
|
|
11112
|
+
!watching && n > 0 && scheduler2.start();
|
|
11089
11113
|
watching += n;
|
|
11090
|
-
!watching &&
|
|
11114
|
+
!watching && scheduler2.stop();
|
|
11091
11115
|
};
|
|
11092
11116
|
var skipNotifyOnElement = function (target,) {
|
|
11093
11117
|
return !isSVG(target,) && !isReplacedElement(target,) && getComputedStyle(target,).display === 'inline';
|
|
@@ -11145,7 +11169,7 @@ var require_resize_observer_umd = __commonJS({
|
|
|
11145
11169
|
firstObservation && resizeObservers.push(detail,);
|
|
11146
11170
|
detail.observationTargets.push(new ResizeObservation(target, options && options.box,),);
|
|
11147
11171
|
updateCount(1,);
|
|
11148
|
-
|
|
11172
|
+
scheduler2.schedule();
|
|
11149
11173
|
}
|
|
11150
11174
|
};
|
|
11151
11175
|
ResizeObserverController2.unobserve = function (resizeObserver, target,) {
|
|
@@ -11884,14 +11908,12 @@ function lazy(factory,) {
|
|
|
11884
11908
|
const Component15 = React4.forwardRef(function LazyWithPreload(props, ref,) {
|
|
11885
11909
|
return React4.createElement(
|
|
11886
11910
|
LoadedComponent !== null && LoadedComponent !== void 0 ? LoadedComponent : LazyComponent,
|
|
11887
|
-
|
|
11888
|
-
|
|
11889
|
-
|
|
11890
|
-
|
|
11891
|
-
|
|
11892
|
-
|
|
11893
|
-
props,
|
|
11894
|
-
),
|
|
11911
|
+
ref
|
|
11912
|
+
? {
|
|
11913
|
+
ref,
|
|
11914
|
+
...props,
|
|
11915
|
+
}
|
|
11916
|
+
: props,
|
|
11895
11917
|
);
|
|
11896
11918
|
},);
|
|
11897
11919
|
Component15.preload = () => {
|
|
@@ -11916,7 +11938,22 @@ function getRouteElementId(route, hash2,) {
|
|
|
11916
11938
|
return void 0;
|
|
11917
11939
|
}
|
|
11918
11940
|
function isBot(userAgent,) {
|
|
11919
|
-
return /bot|Mediapartners-Google|Google-PageRenderer|yandex|ia_archiver/
|
|
11941
|
+
return /bot|Mediapartners-Google|Google-PageRenderer|yandex|ia_archiver/iu.test(userAgent,);
|
|
11942
|
+
}
|
|
11943
|
+
function yieldToMain(isHighPriority,) {
|
|
11944
|
+
if ('scheduler' in window) {
|
|
11945
|
+
const options = {
|
|
11946
|
+
priority: isHighPriority ? 'user-blocking' : 'user-visible',
|
|
11947
|
+
};
|
|
11948
|
+
if ('yield' in scheduler) return scheduler.yield(options,);
|
|
11949
|
+
if ('postTask' in scheduler) return scheduler.postTask(() => {}, options,);
|
|
11950
|
+
}
|
|
11951
|
+
if (isHighPriority) {
|
|
11952
|
+
return Promise.resolve();
|
|
11953
|
+
}
|
|
11954
|
+
return new Promise((resolve) => {
|
|
11955
|
+
setTimeout(resolve, 0,);
|
|
11956
|
+
},);
|
|
11920
11957
|
}
|
|
11921
11958
|
async function replacePathVariables(path, currentLocale, nextLocale, defaultLocale, collectionId, pathVariables, collectionUtils,) {
|
|
11922
11959
|
var _a, _b, _c;
|
|
@@ -12600,18 +12637,22 @@ async function switchLocale(options,) {
|
|
|
12600
12637
|
routeId: options.routeId,
|
|
12601
12638
|
pathVariables: result.pathVariables,
|
|
12602
12639
|
localeId: options.nextLocale.id,
|
|
12603
|
-
paginationInfo:
|
|
12640
|
+
paginationInfo: window.history.state.paginationInfo,
|
|
12604
12641
|
}, result.path,);
|
|
12605
12642
|
} catch {}
|
|
12606
12643
|
return result;
|
|
12607
12644
|
}
|
|
12608
|
-
function pushLoadMoreHistory(paginationInfo,) {
|
|
12645
|
+
function pushLoadMoreHistory(hash2, paginationInfo,) {
|
|
12609
12646
|
try {
|
|
12610
12647
|
const currentHistoryState = window.history.state;
|
|
12611
12648
|
if (!isHistoryState(currentHistoryState,)) return;
|
|
12649
|
+
const newPaginationInfo = {
|
|
12650
|
+
...currentHistoryState.paginationInfo,
|
|
12651
|
+
[hash2]: paginationInfo,
|
|
12652
|
+
};
|
|
12612
12653
|
replaceHistoryState({
|
|
12613
12654
|
...currentHistoryState,
|
|
12614
|
-
paginationInfo,
|
|
12655
|
+
paginationInfo: newPaginationInfo,
|
|
12615
12656
|
},);
|
|
12616
12657
|
} catch {}
|
|
12617
12658
|
}
|
|
@@ -12679,18 +12720,87 @@ function turnOnReactEventHandling() {
|
|
|
12679
12720
|
eventsToStop.forEach((event) => document.body.removeEventListener(event, stopFn, options,));
|
|
12680
12721
|
eventsToStop = void 0;
|
|
12681
12722
|
}
|
|
12682
|
-
|
|
12723
|
+
function measureSafe(name, start, end,) {
|
|
12724
|
+
try {
|
|
12725
|
+
performance.measure(name, start, end,);
|
|
12726
|
+
} catch (e) {
|
|
12727
|
+
console.warn(`Could not measure ${name}`, e,);
|
|
12728
|
+
}
|
|
12729
|
+
}
|
|
12730
|
+
var hydrationEffectHasRun = false;
|
|
12731
|
+
var hydrationInsertionEffectHasRun = false;
|
|
12732
|
+
var hydrationLayoutEffectHasRun = false;
|
|
12683
12733
|
function OnHydrationEnd({
|
|
12684
|
-
|
|
12734
|
+
addHydrationMarkers,
|
|
12685
12735
|
turnOffEventHandlerHack,
|
|
12686
12736
|
},) {
|
|
12737
|
+
const hydrationMarkPrefix = 'framer-hydration-';
|
|
12738
|
+
const hydrationStart = `${hydrationMarkPrefix}start`;
|
|
12739
|
+
const hydrationRenderEnd = `${hydrationMarkPrefix}render-end`;
|
|
12740
|
+
const hydrationLayoutEffectsEnd = `${hydrationMarkPrefix}layout-effects-end`;
|
|
12741
|
+
const hydrationEffectsEnd = `${hydrationMarkPrefix}effects-end`;
|
|
12742
|
+
const hydrationFP = `${hydrationMarkPrefix}first-paint`;
|
|
12743
|
+
useInsertionEffect(() => {
|
|
12744
|
+
if (hydrationInsertionEffectHasRun) return;
|
|
12745
|
+
hydrationInsertionEffectHasRun = true;
|
|
12746
|
+
if (addHydrationMarkers) {
|
|
12747
|
+
performance.mark(hydrationRenderEnd,);
|
|
12748
|
+
measureSafe(`${hydrationMarkPrefix}render`, hydrationStart, hydrationRenderEnd,);
|
|
12749
|
+
}
|
|
12750
|
+
}, [],);
|
|
12687
12751
|
useLayoutEffect(() => {
|
|
12688
|
-
if (
|
|
12689
|
-
|
|
12690
|
-
if (
|
|
12691
|
-
|
|
12692
|
-
|
|
12693
|
-
|
|
12752
|
+
if (hydrationLayoutEffectHasRun) return;
|
|
12753
|
+
hydrationLayoutEffectHasRun = true;
|
|
12754
|
+
if (addHydrationMarkers) {
|
|
12755
|
+
performance.mark(hydrationLayoutEffectsEnd,);
|
|
12756
|
+
measureSafe(`${hydrationMarkPrefix}layout-effects`, hydrationRenderEnd, hydrationLayoutEffectsEnd,);
|
|
12757
|
+
}
|
|
12758
|
+
requestAnimationFrame(() => {
|
|
12759
|
+
var _a, _b, _c;
|
|
12760
|
+
const browserRenderStart = `${hydrationMarkPrefix}browser-render-start`;
|
|
12761
|
+
if (addHydrationMarkers) {
|
|
12762
|
+
performance.mark(browserRenderStart,);
|
|
12763
|
+
measureSafe(
|
|
12764
|
+
`${hydrationMarkPrefix}uho`,
|
|
12765
|
+
(_b = (_a = performance.getEntriesByName(hydrationEffectsEnd,)[0]) === null || _a === void 0 ? void 0 : _a.name) !== null &&
|
|
12766
|
+
_b !== void 0
|
|
12767
|
+
? _b
|
|
12768
|
+
: (_c = performance.getEntriesByName(hydrationLayoutEffectsEnd,)[0]) === null || _c === void 0
|
|
12769
|
+
? void 0
|
|
12770
|
+
: _c.name,
|
|
12771
|
+
browserRenderStart,
|
|
12772
|
+
);
|
|
12773
|
+
}
|
|
12774
|
+
setTimeout(() => {
|
|
12775
|
+
if (turnOffEventHandlerHack) {
|
|
12776
|
+
turnOnReactEventHandling();
|
|
12777
|
+
}
|
|
12778
|
+
if (addHydrationMarkers) {
|
|
12779
|
+
performance.mark(hydrationFP,);
|
|
12780
|
+
measureSafe(`${hydrationMarkPrefix}time-to-first-paint`, hydrationStart, hydrationFP,);
|
|
12781
|
+
measureSafe(`${hydrationMarkPrefix}browser-render`, browserRenderStart, hydrationFP,);
|
|
12782
|
+
}
|
|
12783
|
+
}, 0,);
|
|
12784
|
+
},);
|
|
12785
|
+
}, [],);
|
|
12786
|
+
useEffect(() => {
|
|
12787
|
+
var _a, _b, _c;
|
|
12788
|
+
if (hydrationEffectHasRun) return;
|
|
12789
|
+
hydrationEffectHasRun = true;
|
|
12790
|
+
if (turnOffEventHandlerHack) {
|
|
12791
|
+
turnOnReactEventHandling();
|
|
12792
|
+
}
|
|
12793
|
+
if (addHydrationMarkers) {
|
|
12794
|
+
performance.mark(hydrationEffectsEnd,);
|
|
12795
|
+
measureSafe(
|
|
12796
|
+
`${hydrationMarkPrefix}effects`,
|
|
12797
|
+
(_b = (_a = performance.getEntriesByName(hydrationFP,)[0]) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0
|
|
12798
|
+
? _b
|
|
12799
|
+
: (_c = performance.getEntriesByName(hydrationLayoutEffectsEnd,)[0]) === null || _c === void 0
|
|
12800
|
+
? void 0
|
|
12801
|
+
: _c.name,
|
|
12802
|
+
hydrationEffectsEnd,
|
|
12803
|
+
);
|
|
12694
12804
|
}
|
|
12695
12805
|
}, [],);
|
|
12696
12806
|
return null;
|
|
@@ -12771,25 +12881,15 @@ function SuspenseThatPreservesDom({
|
|
|
12771
12881
|
},);
|
|
12772
12882
|
}
|
|
12773
12883
|
var defaultLocaleId = 'default';
|
|
12774
|
-
var noopAsync = async () => {};
|
|
12775
|
-
var defaultCollectionListPaginationInfo = {
|
|
12776
|
-
paginationInfo: void 0,
|
|
12777
|
-
setPaginationInfo: noopAsync,
|
|
12778
|
-
loadMore: noopAsync,
|
|
12779
|
-
};
|
|
12780
|
-
var CollectionListPaginationInfoContext = /* @__PURE__ */ React4.createContext(defaultCollectionListPaginationInfo,);
|
|
12781
|
-
function useCollectionListPaginationInfo() {
|
|
12782
|
-
return React4.useContext(CollectionListPaginationInfoContext,);
|
|
12783
|
-
}
|
|
12784
12884
|
function useForceUpdate2() {
|
|
12785
12885
|
const [_, setForcedRenderCount,] = React4.useState(0,);
|
|
12786
12886
|
return [_, React4.useCallback(() => setForcedRenderCount((v) => v + 1), [],),];
|
|
12787
12887
|
}
|
|
12788
|
-
var
|
|
12888
|
+
var noopAsync = async () => {};
|
|
12789
12889
|
var defaultLocaleInfo = {
|
|
12790
12890
|
activeLocale: null,
|
|
12791
12891
|
locales: [],
|
|
12792
|
-
setLocale:
|
|
12892
|
+
setLocale: noopAsync,
|
|
12793
12893
|
};
|
|
12794
12894
|
var LocaleInfoContext = /* @__PURE__ */ React4.createContext(defaultLocaleInfo,);
|
|
12795
12895
|
function useLocaleInfo() {
|
|
@@ -12868,9 +12968,8 @@ function Router({
|
|
|
12868
12968
|
locales = [],
|
|
12869
12969
|
preserveQueryParams = false,
|
|
12870
12970
|
enableImproveInpDuringHydration = false,
|
|
12871
|
-
|
|
12971
|
+
addHydrationMarkers = false,
|
|
12872
12972
|
},) {
|
|
12873
|
-
var _a, _b;
|
|
12874
12973
|
useReplaceInitialState({
|
|
12875
12974
|
disabled: disableHistory,
|
|
12876
12975
|
routeId: initialRoute,
|
|
@@ -12884,46 +12983,17 @@ function Router({
|
|
|
12884
12983
|
const currentLocaleIdRef = React4.useRef(initialLocaleId,);
|
|
12885
12984
|
const currentLocaleId = currentLocaleIdRef.current;
|
|
12886
12985
|
const activeLocale = React4.useMemo(() => {
|
|
12887
|
-
var
|
|
12888
|
-
return (
|
|
12986
|
+
var _a;
|
|
12987
|
+
return (_a = locales.find(({
|
|
12889
12988
|
id: id3,
|
|
12890
12989
|
},) => {
|
|
12891
12990
|
if (!currentLocaleId) return id3 === defaultLocaleId;
|
|
12892
12991
|
return id3 === currentLocaleId;
|
|
12893
|
-
},)) !== null &&
|
|
12894
|
-
?
|
|
12992
|
+
},)) !== null && _a !== void 0
|
|
12993
|
+
? _a
|
|
12895
12994
|
: null;
|
|
12896
12995
|
}, [currentLocaleId, locales,],);
|
|
12897
12996
|
const [dep, forceUpdate,] = useForceUpdate2();
|
|
12898
|
-
const [paginationInfo, setPaginationInfo,] = React4.useState(
|
|
12899
|
-
typeof window !== 'undefined'
|
|
12900
|
-
? (_b = (_a = window === null || window === void 0 ? void 0 : window.history) === null || _a === void 0 ? void 0 : _a.state) ===
|
|
12901
|
-
null || _b === void 0
|
|
12902
|
-
? void 0
|
|
12903
|
-
: _b.pagination
|
|
12904
|
-
: void 0,
|
|
12905
|
-
);
|
|
12906
|
-
const collectionListPaginationInfo = React4.useMemo(() => {
|
|
12907
|
-
return {
|
|
12908
|
-
paginationInfo,
|
|
12909
|
-
setPaginationInfo: async (newPaginationInfo) => {
|
|
12910
|
-
startTransition2(() => {
|
|
12911
|
-
setPaginationInfo(newPaginationInfo,);
|
|
12912
|
-
},);
|
|
12913
|
-
},
|
|
12914
|
-
loadMore: async () => {
|
|
12915
|
-
if ((paginationInfo === null || paginationInfo === void 0 ? void 0 : paginationInfo.type) !== 'loadMore') return;
|
|
12916
|
-
const newPaginationInfo = {
|
|
12917
|
-
...paginationInfo,
|
|
12918
|
-
currentPage: paginationInfo.currentPage + 1,
|
|
12919
|
-
};
|
|
12920
|
-
pushLoadMoreHistory(newPaginationInfo,);
|
|
12921
|
-
startTransition2(() => {
|
|
12922
|
-
setPaginationInfo(newPaginationInfo,);
|
|
12923
|
-
},);
|
|
12924
|
-
},
|
|
12925
|
-
};
|
|
12926
|
-
}, [paginationInfo,],);
|
|
12927
12997
|
const localeInfo = React4.useMemo(() => {
|
|
12928
12998
|
return {
|
|
12929
12999
|
activeLocale,
|
|
@@ -12955,7 +13025,6 @@ function Router({
|
|
|
12955
13025
|
pathVariables: currentPathVariablesRef.current,
|
|
12956
13026
|
collectionUtils,
|
|
12957
13027
|
preserveQueryParams,
|
|
12958
|
-
paginationInfo,
|
|
12959
13028
|
},);
|
|
12960
13029
|
if (!localeResult) return;
|
|
12961
13030
|
currentPathVariablesRef.current = localeResult.pathVariables;
|
|
@@ -12965,17 +13034,7 @@ function Router({
|
|
|
12965
13034
|
} catch {}
|
|
12966
13035
|
},
|
|
12967
13036
|
};
|
|
12968
|
-
}, [
|
|
12969
|
-
activeLocale,
|
|
12970
|
-
collectionUtils,
|
|
12971
|
-
forceUpdate,
|
|
12972
|
-
locales,
|
|
12973
|
-
monitorNextRender,
|
|
12974
|
-
paginationInfo,
|
|
12975
|
-
preserveQueryParams,
|
|
12976
|
-
routes,
|
|
12977
|
-
startViewTransition2,
|
|
12978
|
-
],);
|
|
13037
|
+
}, [activeLocale, collectionUtils, forceUpdate, locales, monitorNextRender, preserveQueryParams, routes, startViewTransition2,],);
|
|
12979
13038
|
const scheduleSideEffect = useScheduleRenderSideEffects(dep,);
|
|
12980
13039
|
const setCurrentRouteId = React4.useCallback(
|
|
12981
13040
|
(routeId, localeId, hash2, pathVariables, smoothScroll = false, isHistoryTransition = false,) => {
|
|
@@ -12992,11 +13051,11 @@ function Router({
|
|
|
12992
13051
|
);
|
|
12993
13052
|
usePopStateHandler(currentRouteRef, setCurrentRouteId,);
|
|
12994
13053
|
const navigate = React4.useCallback((routeId, hash2, pathVariables, smoothScroll,) => {
|
|
12995
|
-
var
|
|
13054
|
+
var _a, _b;
|
|
12996
13055
|
const newRoute = routes[routeId];
|
|
12997
13056
|
if (pathVariables) {
|
|
12998
13057
|
const inUse = /* @__PURE__ */ new Set();
|
|
12999
|
-
const path = (
|
|
13058
|
+
const path = (_a = newRoute === null || newRoute === void 0 ? void 0 : newRoute.path) !== null && _a !== void 0 ? _a : '/';
|
|
13000
13059
|
for (const match of path.matchAll(pathVariablesRegExp,)) {
|
|
13001
13060
|
const usedVariable = match[1];
|
|
13002
13061
|
if (usedVariable === void 0) {
|
|
@@ -13016,7 +13075,7 @@ function Router({
|
|
|
13016
13075
|
pathVariables,
|
|
13017
13076
|
},)
|
|
13018
13077
|
) {
|
|
13019
|
-
if (((
|
|
13078
|
+
if (((_b = window.history.state) === null || _b === void 0 ? void 0 : _b.hash) !== hash2) {
|
|
13020
13079
|
if (!disableHistory) {
|
|
13021
13080
|
const route = routes[routeId];
|
|
13022
13081
|
if (route) {
|
|
@@ -13074,26 +13133,23 @@ function Router({
|
|
|
13074
13133
|
api,
|
|
13075
13134
|
children: jsx(LocaleInfoContext.Provider, {
|
|
13076
13135
|
value: localeInfo,
|
|
13077
|
-
children:
|
|
13078
|
-
|
|
13079
|
-
|
|
13080
|
-
|
|
13081
|
-
|
|
13082
|
-
|
|
13083
|
-
|
|
13084
|
-
|
|
13085
|
-
|
|
13086
|
-
|
|
13087
|
-
|
|
13088
|
-
|
|
13089
|
-
|
|
13090
|
-
|
|
13091
|
-
|
|
13092
|
-
|
|
13093
|
-
|
|
13094
|
-
},),
|
|
13095
|
-
],
|
|
13096
|
-
},),
|
|
13136
|
+
children: jsxs(SuspenseThatPreservesDom, {
|
|
13137
|
+
children: [
|
|
13138
|
+
jsx(ErrorBoundary, {
|
|
13139
|
+
notFoundPage,
|
|
13140
|
+
defaultPageStyle,
|
|
13141
|
+
forceUpdateKey: dep,
|
|
13142
|
+
children: jsx(React4.Fragment, {
|
|
13143
|
+
children: pageExistsInCurrentLocale
|
|
13144
|
+
? renderPage(current.page, defaultPageStyle,)
|
|
13145
|
+
: notFoundPage && renderPage(notFoundPage, defaultPageStyle,),
|
|
13146
|
+
}, remountKey,),
|
|
13147
|
+
},),
|
|
13148
|
+
jsx(OnHydrationEnd, {
|
|
13149
|
+
addHydrationMarkers,
|
|
13150
|
+
turnOffEventHandlerHack: enableImproveInpDuringHydration,
|
|
13151
|
+
},),
|
|
13152
|
+
],
|
|
13097
13153
|
},),
|
|
13098
13154
|
},),
|
|
13099
13155
|
},);
|
|
@@ -13294,18 +13350,22 @@ function useRoutePreloader(routeIds, enabled = true,) {
|
|
|
13294
13350
|
const {
|
|
13295
13351
|
getRoute,
|
|
13296
13352
|
} = useRouter();
|
|
13297
|
-
|
|
13353
|
+
useEffect(() => {
|
|
13298
13354
|
if (!getRoute || !enabled || !shouldPreloadBasedOnUA) return;
|
|
13299
13355
|
for (const routeId of routeIds) {
|
|
13300
|
-
|
|
13301
|
-
if (route === null || route === void 0 ? void 0 : route.page) preloadComponent(route.page,);
|
|
13356
|
+
void preloadRoute(getRoute(routeId,),);
|
|
13302
13357
|
}
|
|
13303
13358
|
}, [routeIds, getRoute, enabled,],);
|
|
13304
13359
|
}
|
|
13305
|
-
function
|
|
13306
|
-
if (!shouldPreloadBasedOnUA) return;
|
|
13307
|
-
|
|
13308
|
-
|
|
13360
|
+
async function preloadRoute(route,) {
|
|
13361
|
+
if (!shouldPreloadBasedOnUA || !route) return;
|
|
13362
|
+
const component = route.page;
|
|
13363
|
+
if (!component || !isLazyComponentType(component,)) return;
|
|
13364
|
+
await yieldToMain();
|
|
13365
|
+
try {
|
|
13366
|
+
await component.preload();
|
|
13367
|
+
} catch (e) {
|
|
13368
|
+
if (false) console.warn('Preload failed', route, e,);
|
|
13309
13369
|
}
|
|
13310
13370
|
}
|
|
13311
13371
|
function useRouteAnchor(routeId, {
|
|
@@ -19015,8 +19075,8 @@ var didInject = false;
|
|
|
19015
19075
|
function injectComponentCSSRules() {
|
|
19016
19076
|
if (didInject) return;
|
|
19017
19077
|
didInject = true;
|
|
19018
|
-
const
|
|
19019
|
-
for (const rule of
|
|
19078
|
+
const styles2 = RenderTarget.current() === RenderTarget.preview ? combinedCSSRulesForPreview : combinedCSSRules;
|
|
19079
|
+
for (const rule of styles2) {
|
|
19020
19080
|
injectCSSRule(rule, void 0, void 0,);
|
|
19021
19081
|
}
|
|
19022
19082
|
}
|
|
@@ -21192,28 +21252,28 @@ function backgroundImageFromProps(props,) {
|
|
|
21192
21252
|
}
|
|
21193
21253
|
function collectBorderStyleForProps(props, style, collapseEqualBorders = true,) {
|
|
21194
21254
|
const {
|
|
21195
|
-
borderWidth,
|
|
21255
|
+
borderWidth: borderWidth2,
|
|
21196
21256
|
borderStyle,
|
|
21197
21257
|
borderColor,
|
|
21198
21258
|
} = props;
|
|
21199
|
-
if (!
|
|
21259
|
+
if (!borderWidth2) {
|
|
21200
21260
|
return;
|
|
21201
21261
|
}
|
|
21202
21262
|
let borderTop;
|
|
21203
21263
|
let borderBottom;
|
|
21204
21264
|
let borderLeft;
|
|
21205
21265
|
let borderRight;
|
|
21206
|
-
if (typeof
|
|
21266
|
+
if (typeof borderWidth2 === 'number') {
|
|
21207
21267
|
borderTop =
|
|
21208
21268
|
borderBottom =
|
|
21209
21269
|
borderLeft =
|
|
21210
21270
|
borderRight =
|
|
21211
|
-
|
|
21271
|
+
borderWidth2;
|
|
21212
21272
|
} else {
|
|
21213
|
-
borderTop =
|
|
21214
|
-
borderBottom =
|
|
21215
|
-
borderLeft =
|
|
21216
|
-
borderRight =
|
|
21273
|
+
borderTop = borderWidth2.top || 0;
|
|
21274
|
+
borderBottom = borderWidth2.bottom || 0;
|
|
21275
|
+
borderLeft = borderWidth2.left || 0;
|
|
21276
|
+
borderRight = borderWidth2.right || 0;
|
|
21217
21277
|
}
|
|
21218
21278
|
if (borderTop === 0 && borderBottom === 0 && borderLeft === 0 && borderRight === 0) {
|
|
21219
21279
|
return;
|
|
@@ -21257,7 +21317,7 @@ function Border(props,) {
|
|
|
21257
21317
|
},);
|
|
21258
21318
|
}
|
|
21259
21319
|
function htmlElementAsMotionComponent(asElem,) {
|
|
21260
|
-
return asElem && asElem !== 'search' && asElem !== 'slot' && asElem !== 'template' ? motion
|
|
21320
|
+
return asElem && asElem !== 'search' && asElem !== 'slot' && asElem !== 'template' ? motion[asElem] : motion['div'];
|
|
21261
21321
|
}
|
|
21262
21322
|
var isChrome2 = /* @__PURE__ */ isChrome();
|
|
21263
21323
|
function layoutHintDataPropsForCenter(center,) {
|
|
@@ -21292,25 +21352,7 @@ function processOverrideForwarding(props, children,) {
|
|
|
21292
21352
|
};
|
|
21293
21353
|
}
|
|
21294
21354
|
}
|
|
21295
|
-
|
|
21296
|
-
const extractions = props._overrideForwardingDescription;
|
|
21297
|
-
if (extractions) {
|
|
21298
|
-
_forwardedOverrides = void 0;
|
|
21299
|
-
for (const key7 in extractions) {
|
|
21300
|
-
const propName = extractions[key7];
|
|
21301
|
-
const value = props[propName];
|
|
21302
|
-
if (value !== void 0) {
|
|
21303
|
-
if (!_forwardedOverrides) {
|
|
21304
|
-
_forwardedOverrides = {};
|
|
21305
|
-
props = {
|
|
21306
|
-
...props,
|
|
21307
|
-
};
|
|
21308
|
-
}
|
|
21309
|
-
_forwardedOverrides[key7] = props[propName];
|
|
21310
|
-
delete props[propName];
|
|
21311
|
-
}
|
|
21312
|
-
}
|
|
21313
|
-
}
|
|
21355
|
+
const _forwardedOverrides = props._forwardedOverrides;
|
|
21314
21356
|
if (!_forwardedOverrides) {
|
|
21315
21357
|
return {
|
|
21316
21358
|
props,
|
|
@@ -24596,7 +24638,7 @@ var DeprecatedFrame = /* @__PURE__ */ (() => {
|
|
|
24596
24638
|
const {
|
|
24597
24639
|
visible,
|
|
24598
24640
|
id: id3,
|
|
24599
|
-
className,
|
|
24641
|
+
className: className2,
|
|
24600
24642
|
} = this.props;
|
|
24601
24643
|
if (!visible) {
|
|
24602
24644
|
return null;
|
|
@@ -24611,7 +24653,7 @@ var DeprecatedFrame = /* @__PURE__ */ (() => {
|
|
|
24611
24653
|
id: id3,
|
|
24612
24654
|
style,
|
|
24613
24655
|
ref: this.setElement,
|
|
24614
|
-
className,
|
|
24656
|
+
className: className2,
|
|
24615
24657
|
children: [
|
|
24616
24658
|
/* @__PURE__ */ jsx(ProvideParentSize, {
|
|
24617
24659
|
parentSize,
|
|
@@ -24624,19 +24666,7 @@ var DeprecatedFrame = /* @__PURE__ */ (() => {
|
|
|
24624
24666
|
},);
|
|
24625
24667
|
}
|
|
24626
24668
|
layoutChildren() {
|
|
24627
|
-
|
|
24628
|
-
const extractions = this.props._overrideForwardingDescription;
|
|
24629
|
-
if (extractions) {
|
|
24630
|
-
let added = false;
|
|
24631
|
-
_forwardedOverrides = {};
|
|
24632
|
-
for (const [key7, value,] of Object.entries(extractions,)) {
|
|
24633
|
-
added = true;
|
|
24634
|
-
_forwardedOverrides[key7] = asRecord(this.props,)[value];
|
|
24635
|
-
}
|
|
24636
|
-
if (!added) {
|
|
24637
|
-
_forwardedOverrides = void 0;
|
|
24638
|
-
}
|
|
24639
|
-
}
|
|
24669
|
+
const _forwardedOverrides = this.props._forwardedOverrides;
|
|
24640
24670
|
let children = React4.Children.map(this.props.children, (child) => {
|
|
24641
24671
|
if (isConstraintSupportingChild(child,)) {
|
|
24642
24672
|
return React4.cloneElement(child, {
|
|
@@ -26233,20 +26263,17 @@ function containerContent(item,) {
|
|
|
26233
26263
|
function backdropTapAction(transition, goBackAction,) {
|
|
26234
26264
|
if (transition.goBackOnTapOutside !== false) return goBackAction;
|
|
26235
26265
|
}
|
|
26236
|
-
function NavigationStyleSheet() {
|
|
26237
|
-
React4.useInsertionEffect(() => {
|
|
26238
|
-
injectComponentCSSRules();
|
|
26239
|
-
}, [],);
|
|
26240
|
-
return null;
|
|
26241
|
-
}
|
|
26242
26266
|
function NavigationWrapper(props,) {
|
|
26243
26267
|
const resetProjection = useResetProjection();
|
|
26244
26268
|
const skipLayoutAnimation = useInstantLayoutTransition();
|
|
26245
|
-
|
|
26269
|
+
React4.useInsertionEffect(() => {
|
|
26270
|
+
injectComponentCSSRules();
|
|
26271
|
+
}, [],);
|
|
26272
|
+
return /* @__PURE__ */ jsx(Navigation, {
|
|
26246
26273
|
...props,
|
|
26247
26274
|
resetProjection,
|
|
26248
26275
|
skipLayoutAnimation,
|
|
26249
|
-
children:
|
|
26276
|
+
children: props.children,
|
|
26250
26277
|
},);
|
|
26251
26278
|
}
|
|
26252
26279
|
var import_hoist_non_react_statics3 = __toESM(require_hoist_non_react_statics_cjs(), 1,);
|
|
@@ -26344,6 +26371,50 @@ function transitionDirectionToSide(direction,) {
|
|
|
26344
26371
|
}
|
|
26345
26372
|
var AnimateSharedLayout = (props) => props.children;
|
|
26346
26373
|
var Draggable = /* @__PURE__ */ WithDragging(DeprecatedFrameWithEvents,);
|
|
26374
|
+
function useInfiniteScroll({
|
|
26375
|
+
ref: elementRef,
|
|
26376
|
+
loadMore,
|
|
26377
|
+
rootMargin = '0px',
|
|
26378
|
+
threshold,
|
|
26379
|
+
paginationInfo,
|
|
26380
|
+
},) {
|
|
26381
|
+
const callback = React4.useCallback((entries) => {
|
|
26382
|
+
const entry = entries[0];
|
|
26383
|
+
const isIntersecting = entry == null ? void 0 : entry.isIntersecting;
|
|
26384
|
+
if (isIntersecting) loadMore();
|
|
26385
|
+
}, [loadMore,],);
|
|
26386
|
+
React4.useEffect(() => {
|
|
26387
|
+
if (!elementRef.current) return;
|
|
26388
|
+
const observer2 = new IntersectionObserver(callback, {
|
|
26389
|
+
rootMargin,
|
|
26390
|
+
threshold,
|
|
26391
|
+
},);
|
|
26392
|
+
observer2.observe(elementRef.current,);
|
|
26393
|
+
return () => {
|
|
26394
|
+
observer2.disconnect();
|
|
26395
|
+
};
|
|
26396
|
+
}, [elementRef, callback, rootMargin, threshold, paginationInfo.currentPage,],);
|
|
26397
|
+
}
|
|
26398
|
+
function withInfiniteScroll(Component15,) {
|
|
26399
|
+
return React4.forwardRef(({
|
|
26400
|
+
__paginationInfo,
|
|
26401
|
+
__loadMore,
|
|
26402
|
+
...props
|
|
26403
|
+
}, ref,) => {
|
|
26404
|
+
const backupRef = React4.useRef(null,);
|
|
26405
|
+
const infiniteScrollRef = ref ?? backupRef;
|
|
26406
|
+
useInfiniteScroll({
|
|
26407
|
+
rootMargin: '500px',
|
|
26408
|
+
loadMore: __loadMore,
|
|
26409
|
+
ref: infiniteScrollRef,
|
|
26410
|
+
paginationInfo: __paginationInfo,
|
|
26411
|
+
},);
|
|
26412
|
+
return /* @__PURE__ */ jsx(Component15, {
|
|
26413
|
+
...props,
|
|
26414
|
+
ref: infiniteScrollRef,
|
|
26415
|
+
},);
|
|
26416
|
+
},);
|
|
26417
|
+
}
|
|
26347
26418
|
var import_process2 = __toESM(require_browser(), 1,);
|
|
26348
26419
|
function debounce(fn, time2,) {
|
|
26349
26420
|
let timeout;
|
|
@@ -26535,7 +26606,7 @@ var Stack = /* @__PURE__ */ (() => {
|
|
|
26535
26606
|
useFlexboxGap: externalUseFlexboxGap = true,
|
|
26536
26607
|
children,
|
|
26537
26608
|
style: styleProp,
|
|
26538
|
-
className,
|
|
26609
|
+
className: className2,
|
|
26539
26610
|
willChangeTransform,
|
|
26540
26611
|
__fromCodeComponentNode,
|
|
26541
26612
|
parentSize,
|
|
@@ -26623,7 +26694,7 @@ var Stack = /* @__PURE__ */ (() => {
|
|
|
26623
26694
|
ref: useForwardedRef(forwardedRef, stackRef,),
|
|
26624
26695
|
...attributes,
|
|
26625
26696
|
style,
|
|
26626
|
-
className,
|
|
26697
|
+
className: className2,
|
|
26627
26698
|
layoutScroll: true,
|
|
26628
26699
|
children: /* @__PURE__ */ jsx(motion.div, {
|
|
26629
26700
|
'data-framer-stack-content-wrapper': true,
|
|
@@ -28916,7 +28987,7 @@ var NativeScroll = /* @__PURE__ */ React4.forwardRef(function NativeScroll2(prop
|
|
|
28916
28987
|
children,
|
|
28917
28988
|
resetOffset,
|
|
28918
28989
|
onScroll,
|
|
28919
|
-
className,
|
|
28990
|
+
className: className2,
|
|
28920
28991
|
// Not (yet) supported
|
|
28921
28992
|
directionLock: _directionLock = false,
|
|
28922
28993
|
wheelEnabled: _wheelEnabled = true,
|
|
@@ -28987,7 +29058,7 @@ var NativeScroll = /* @__PURE__ */ React4.forwardRef(function NativeScroll2(prop
|
|
|
28987
29058
|
layoutId,
|
|
28988
29059
|
onBeforeLayoutMeasure: updateScrollOffsetHandler,
|
|
28989
29060
|
layoutScroll: true,
|
|
28990
|
-
className: cx(
|
|
29061
|
+
className: cx(className2, `direction-${direction}`, !scrollBarVisible && 'scrollbar-hidden',),
|
|
28991
29062
|
children: [
|
|
28992
29063
|
/* @__PURE__ */ jsx(EmptyState, {
|
|
28993
29064
|
children,
|
|
@@ -30221,6 +30292,30 @@ function ComponentPresetsConsumer({
|
|
|
30221
30292
|
const presetProps = componentPresets[componentIdentifier] ?? {};
|
|
30222
30293
|
return children(presetProps,);
|
|
30223
30294
|
}
|
|
30295
|
+
function setRef(ref, value,) {
|
|
30296
|
+
if (isFunction(ref,)) {
|
|
30297
|
+
ref(value,);
|
|
30298
|
+
} else if (isMutableRef(ref,)) {
|
|
30299
|
+
ref.current = value;
|
|
30300
|
+
}
|
|
30301
|
+
}
|
|
30302
|
+
function isMutableRef(ref,) {
|
|
30303
|
+
return isObject2(ref,) && 'current' in ref;
|
|
30304
|
+
}
|
|
30305
|
+
function createRefWithCallback(ref, callback,) {
|
|
30306
|
+
return {
|
|
30307
|
+
get current() {
|
|
30308
|
+
return ref.current;
|
|
30309
|
+
},
|
|
30310
|
+
set current(value,) {
|
|
30311
|
+
ref.current = value;
|
|
30312
|
+
callback(value,);
|
|
30313
|
+
},
|
|
30314
|
+
};
|
|
30315
|
+
}
|
|
30316
|
+
function mergeRefs(...refs) {
|
|
30317
|
+
return (value) => refs.forEach((ref) => setRef(ref, value,));
|
|
30318
|
+
}
|
|
30224
30319
|
function useCloneChildrenWithPropsAndRef(forwardedRef,) {
|
|
30225
30320
|
const hook = useConstant2(() => createHook(forwardedRef,));
|
|
30226
30321
|
hook.useSetup(forwardedRef,);
|
|
@@ -30310,16 +30405,6 @@ function createRefFunction(state,) {
|
|
|
30310
30405
|
setRef(prevForwardedRef, value,);
|
|
30311
30406
|
};
|
|
30312
30407
|
}
|
|
30313
|
-
function setRef(ref, value,) {
|
|
30314
|
-
if (isFunction(ref,)) {
|
|
30315
|
-
ref(value,);
|
|
30316
|
-
} else if (isMutableRef(ref,)) {
|
|
30317
|
-
ref.current = value;
|
|
30318
|
-
}
|
|
30319
|
-
}
|
|
30320
|
-
function isMutableRef(ref,) {
|
|
30321
|
-
return isObject2(ref,) && 'current' in ref;
|
|
30322
|
-
}
|
|
30323
30408
|
var ComponentViewportContext = /* @__PURE__ */ React4.createContext({},);
|
|
30324
30409
|
function useComponentViewport() {
|
|
30325
30410
|
return React4.useContext(ComponentViewportContext,);
|
|
@@ -30445,8 +30530,8 @@ var withCSS = (Component15, escapedCSS, componentSerializationId,) =>
|
|
|
30445
30530
|
}
|
|
30446
30531
|
React4.useInsertionEffect(() => {
|
|
30447
30532
|
if (componentSerializationId && componentsWithServerRenderedStyles.has(componentSerializationId,)) return;
|
|
30448
|
-
const
|
|
30449
|
-
|
|
30533
|
+
const css2 = Array.isArray(escapedCSS,) ? escapedCSS : escapedCSS.split('\n',);
|
|
30534
|
+
css2.forEach((rule) => rule && injectCSSRule(rule, sheet, cache2,));
|
|
30450
30535
|
}, [],);
|
|
30451
30536
|
return /* @__PURE__ */ jsx(Component15, {
|
|
30452
30537
|
...props,
|
|
@@ -31204,7 +31289,7 @@ function Floating({
|
|
|
31204
31289
|
offsetX,
|
|
31205
31290
|
offsetY,
|
|
31206
31291
|
anchorRef,
|
|
31207
|
-
className,
|
|
31292
|
+
className: className2,
|
|
31208
31293
|
children,
|
|
31209
31294
|
portalSelector,
|
|
31210
31295
|
zIndex,
|
|
@@ -31282,7 +31367,7 @@ function Floating({
|
|
|
31282
31367
|
return ReactDOM.createPortal(
|
|
31283
31368
|
/* @__PURE__ */ jsxs('div', {
|
|
31284
31369
|
ref: floatingPositionRef,
|
|
31285
|
-
className,
|
|
31370
|
+
className: className2,
|
|
31286
31371
|
style: {
|
|
31287
31372
|
// Initially rendered as hidden, but the layout effect will set
|
|
31288
31373
|
// to visible when the position is calculated.
|
|
@@ -31469,6 +31554,92 @@ function navigateFromAttributes(navigate, element, implicitPathVariables,) {
|
|
|
31469
31554
|
navigate(routeId, elementId, Object.assign({}, implicitPathVariables, pathVariables,), smoothScroll,);
|
|
31470
31555
|
return true;
|
|
31471
31556
|
}
|
|
31557
|
+
var PRELOAD_AFTER_MS = 500;
|
|
31558
|
+
var OBSERVER_THRESHOLD = 0.9;
|
|
31559
|
+
var LOW_MEMORY_THRESHOLD = 1.7;
|
|
31560
|
+
var MAX_CONCURRENT_PRELOADS_SLOW_NETWORK = 4;
|
|
31561
|
+
var MAX_CONCURRENT_PRELOADS_FAST_NETWORK = Infinity;
|
|
31562
|
+
var nodeToRoute = /* @__PURE__ */ new WeakMap();
|
|
31563
|
+
var preloadedRoutes = /* @__PURE__ */ new Set();
|
|
31564
|
+
var routeToNodesInViewport = /* @__PURE__ */ new Map();
|
|
31565
|
+
function getObserveRouteForPreloadingFn() {
|
|
31566
|
+
var _a;
|
|
31567
|
+
const connection = navigator.connection || navigator.mozConnection || navigator.webkitConnection || {};
|
|
31568
|
+
const lowDeviceMemory = navigator.deviceMemory && navigator.deviceMemory > LOW_MEMORY_THRESHOLD;
|
|
31569
|
+
let effectiveType, preloadDisabled, maxPreloadAmount;
|
|
31570
|
+
function updateConnection() {
|
|
31571
|
+
effectiveType = connection.effectiveType || '';
|
|
31572
|
+
preloadDisabled = connection.saveData || effectiveType.includes('2g',);
|
|
31573
|
+
maxPreloadAmount = effectiveType === '3g' || lowDeviceMemory
|
|
31574
|
+
? MAX_CONCURRENT_PRELOADS_SLOW_NETWORK
|
|
31575
|
+
: MAX_CONCURRENT_PRELOADS_FAST_NETWORK;
|
|
31576
|
+
}
|
|
31577
|
+
(_a = connection.addEventListener) == null ? void 0 : _a.call(connection, 'change', updateConnection,);
|
|
31578
|
+
updateConnection();
|
|
31579
|
+
const observer2 = new IntersectionObserver(onPreloadIntersectionChange, {
|
|
31580
|
+
threshold: OBSERVER_THRESHOLD,
|
|
31581
|
+
},);
|
|
31582
|
+
let activePreloadsAmount = 0;
|
|
31583
|
+
async function preloadTimeout(route, target,) {
|
|
31584
|
+
if (preloadDisabled) return;
|
|
31585
|
+
const nodesInViewport = routeToNodesInViewport.get(route,);
|
|
31586
|
+
if (!(nodesInViewport == null ? void 0 : nodesInViewport.size) || preloadedRoutes.has(route,)) return;
|
|
31587
|
+
++activePreloadsAmount;
|
|
31588
|
+
preloadedRoutes.add(route,);
|
|
31589
|
+
const preloadDone = preloadRoute(route,).catch(() => {
|
|
31590
|
+
if (false) {
|
|
31591
|
+
throw new Error(
|
|
31592
|
+
'Error in preloadRoute during preloadTimeout. This should never happen as it introduces bugs. Please make sure preloadRoute does not throw.',
|
|
31593
|
+
);
|
|
31594
|
+
}
|
|
31595
|
+
},);
|
|
31596
|
+
observer2.unobserve(target,);
|
|
31597
|
+
nodeToRoute.delete(target,);
|
|
31598
|
+
for (const node of nodesInViewport) {
|
|
31599
|
+
observer2.unobserve(node,);
|
|
31600
|
+
nodeToRoute.delete(node,);
|
|
31601
|
+
}
|
|
31602
|
+
nodesInViewport.clear();
|
|
31603
|
+
routeToNodesInViewport.delete(route,);
|
|
31604
|
+
await preloadDone;
|
|
31605
|
+
--activePreloadsAmount;
|
|
31606
|
+
}
|
|
31607
|
+
function onPreloadIntersectionChange(entries,) {
|
|
31608
|
+
var _a2;
|
|
31609
|
+
for (const entry of entries) {
|
|
31610
|
+
const target = entry.target;
|
|
31611
|
+
const route = nodeToRoute.get(target,);
|
|
31612
|
+
if (!route || preloadedRoutes.has(route,)) {
|
|
31613
|
+
observer2.unobserve(target,);
|
|
31614
|
+
nodeToRoute.delete(target,);
|
|
31615
|
+
continue;
|
|
31616
|
+
}
|
|
31617
|
+
const nodes = routeToNodesInViewport.get(route,);
|
|
31618
|
+
const amountOfNodesInViewport = ((_a2 = routeToNodesInViewport.get(route,)) == null ? void 0 : _a2.size) ?? 0;
|
|
31619
|
+
if (entry.isIntersecting) {
|
|
31620
|
+
if (activePreloadsAmount >= maxPreloadAmount) continue;
|
|
31621
|
+
if (nodes) nodes.add(target,);
|
|
31622
|
+
else routeToNodesInViewport.set(route, /* @__PURE__ */ new Set([target,],),);
|
|
31623
|
+
setTimeout(preloadTimeout.bind(void 0, route, target,), PRELOAD_AFTER_MS,);
|
|
31624
|
+
} else {
|
|
31625
|
+
if (nodes) nodes.delete(target,);
|
|
31626
|
+
if (amountOfNodesInViewport <= 1) routeToNodesInViewport.delete(route,);
|
|
31627
|
+
}
|
|
31628
|
+
}
|
|
31629
|
+
}
|
|
31630
|
+
return (route, node,) => {
|
|
31631
|
+
if (preloadedRoutes.has(route,)) return;
|
|
31632
|
+
nodeToRoute.set(node, route,);
|
|
31633
|
+
observer2.observe(node,);
|
|
31634
|
+
return () => {
|
|
31635
|
+
nodeToRoute.delete(node,);
|
|
31636
|
+
observer2.unobserve(node,);
|
|
31637
|
+
};
|
|
31638
|
+
};
|
|
31639
|
+
}
|
|
31640
|
+
var observeRouteForPreloading =
|
|
31641
|
+
// this also guards `window`
|
|
31642
|
+
!shouldPreloadBasedOnUA || typeof IntersectionObserver === 'undefined' ? null : /* @__PURE__ */ getObserveRouteForPreloadingFn();
|
|
31472
31643
|
var noLocale = {};
|
|
31473
31644
|
var resolveSlugCache = /* @__PURE__ */ new WeakMap();
|
|
31474
31645
|
function resolveSlug(unresolvedSlug, utilsByCollectionId, activeLocale,) {
|
|
@@ -31530,10 +31701,10 @@ function linkFromFramerPageLink(link,) {
|
|
|
31530
31701
|
};
|
|
31531
31702
|
}
|
|
31532
31703
|
var pathVariablesRegExp2 = /:([a-z]\w*)/gi;
|
|
31533
|
-
var PathVariablesContext = /* @__PURE__ */
|
|
31704
|
+
var PathVariablesContext = /* @__PURE__ */ createContext(void 0,);
|
|
31534
31705
|
function useImplicitPathVariables() {
|
|
31535
31706
|
var _a;
|
|
31536
|
-
const contextPathVariables =
|
|
31707
|
+
const contextPathVariables = useContext3(PathVariablesContext,);
|
|
31537
31708
|
const currentPathVariables = (_a = useCurrentRoute()) == null ? void 0 : _a.pathVariables;
|
|
31538
31709
|
const pathVariables = contextPathVariables || currentPathVariables;
|
|
31539
31710
|
return pathVariables;
|
|
@@ -31558,7 +31729,7 @@ function linkMatchesRoute(route, {
|
|
|
31558
31729
|
}
|
|
31559
31730
|
function useLinkMatchesRoute(link,) {
|
|
31560
31731
|
const route = useCurrentRoute();
|
|
31561
|
-
const contextPathVariables =
|
|
31732
|
+
const contextPathVariables = useContext3(PathVariablesContext,);
|
|
31562
31733
|
if (!route) return false;
|
|
31563
31734
|
const pageLink = isString22(link,) ? linkFromFramerPageLink(link,) : link;
|
|
31564
31735
|
return isLinkToWebPage(pageLink,) ? linkMatchesRoute(route, pageLink, contextPathVariables,) : false;
|
|
@@ -31609,43 +31780,6 @@ function createOnClickLinkHandler(router, routeId, elementId, combinedPathVariab
|
|
|
31609
31780
|
(_b = router.navigate) == null ? void 0 : _b.call(router, routeId, elementId, combinedPathVariables, smoothScroll,);
|
|
31610
31781
|
};
|
|
31611
31782
|
}
|
|
31612
|
-
function propsForRoutePath(href, openInNewTab, router, currentRoute, implicitPathVariables, smoothScroll,) {
|
|
31613
|
-
const isInternal = isInternalURL(href,);
|
|
31614
|
-
if (!router.routes || !router.getRoute || !currentRoute || !isInternal) {
|
|
31615
|
-
return propsForLink(href, openInNewTab,);
|
|
31616
|
-
}
|
|
31617
|
-
try {
|
|
31618
|
-
const [pathnameWithQueryParams, hash2,] = href.split('#', 2,);
|
|
31619
|
-
assert(pathnameWithQueryParams !== void 0, 'A href must have a defined pathname.',);
|
|
31620
|
-
const [pathname,] = pathnameWithQueryParams.split('?', 2,);
|
|
31621
|
-
assert(pathname !== void 0, 'A href must have a defined pathname.',);
|
|
31622
|
-
const {
|
|
31623
|
-
routeId,
|
|
31624
|
-
pathVariables,
|
|
31625
|
-
} = inferInitialRouteFromPath(router.routes, pathname,);
|
|
31626
|
-
const route = router.getRoute(routeId,);
|
|
31627
|
-
if (route) {
|
|
31628
|
-
preloadComponent(route.page,);
|
|
31629
|
-
const combinedPathVariables = Object.assign({}, implicitPathVariables, pathVariables,);
|
|
31630
|
-
const path = getPathForRoute(route, {
|
|
31631
|
-
currentRoutePath: currentRoute.path,
|
|
31632
|
-
currentPathVariables: currentRoute.pathVariables,
|
|
31633
|
-
// The hash value is already fully resolved so we don't need to
|
|
31634
|
-
// provide any hashVariables.
|
|
31635
|
-
hash: hash2 || void 0,
|
|
31636
|
-
pathVariables: combinedPathVariables,
|
|
31637
|
-
preserveQueryParams: router.preserveQueryParams,
|
|
31638
|
-
},);
|
|
31639
|
-
const anchorTarget = getTargetAttrValue(openInNewTab, true,);
|
|
31640
|
-
return {
|
|
31641
|
-
href: path,
|
|
31642
|
-
target: anchorTarget,
|
|
31643
|
-
onClick: createOnClickLinkHandler(router, routeId, hash2 || void 0, combinedPathVariables, smoothScroll,),
|
|
31644
|
-
};
|
|
31645
|
-
}
|
|
31646
|
-
} catch {}
|
|
31647
|
-
return propsForLink(href, openInNewTab,);
|
|
31648
|
-
}
|
|
31649
31783
|
async function resolveSlugs(unresolvedPathSlugs, unresolvedHashSlugs, collectionUtils, activeLocale,) {
|
|
31650
31784
|
async function handleSlugs(unresolvedSlugs,) {
|
|
31651
31785
|
if (!unresolvedSlugs || !collectionUtils) return {};
|
|
@@ -31698,7 +31832,64 @@ function resolveSlugsWithSuspense(unresolvedPathSlugs, unresolvedHashSlugs, coll
|
|
|
31698
31832
|
}
|
|
31699
31833
|
return result;
|
|
31700
31834
|
}
|
|
31701
|
-
|
|
31835
|
+
function propsForRoutePath(href, openInNewTab, router, currentRoute, implicitPathVariables, smoothScroll,) {
|
|
31836
|
+
const isInternal = isInternalURL(href,);
|
|
31837
|
+
if (!router.routes || !router.getRoute || !currentRoute || !isInternal) {
|
|
31838
|
+
return propsForLink(href, openInNewTab,);
|
|
31839
|
+
}
|
|
31840
|
+
try {
|
|
31841
|
+
const [pathnameWithQueryParams, hash2,] = href.split('#', 2,);
|
|
31842
|
+
assert(pathnameWithQueryParams !== void 0, 'A href must have a defined pathname.',);
|
|
31843
|
+
const [pathname,] = pathnameWithQueryParams.split('?', 2,);
|
|
31844
|
+
assert(pathname !== void 0, 'A href must have a defined pathname.',);
|
|
31845
|
+
const {
|
|
31846
|
+
routeId,
|
|
31847
|
+
pathVariables,
|
|
31848
|
+
} = inferInitialRouteFromPath(router.routes, pathname,);
|
|
31849
|
+
const route = router.getRoute(routeId,);
|
|
31850
|
+
if (route) {
|
|
31851
|
+
const combinedPathVariables = Object.assign({}, implicitPathVariables, pathVariables,);
|
|
31852
|
+
const path = getPathForRoute(route, {
|
|
31853
|
+
currentRoutePath: currentRoute.path,
|
|
31854
|
+
currentPathVariables: currentRoute.pathVariables,
|
|
31855
|
+
// The hash value is already fully resolved so we don't need to
|
|
31856
|
+
// provide any hashVariables.
|
|
31857
|
+
hash: hash2 || void 0,
|
|
31858
|
+
pathVariables: combinedPathVariables,
|
|
31859
|
+
preserveQueryParams: router.preserveQueryParams,
|
|
31860
|
+
},);
|
|
31861
|
+
const anchorTarget = getTargetAttrValue(openInNewTab, true,);
|
|
31862
|
+
return {
|
|
31863
|
+
href: path,
|
|
31864
|
+
target: anchorTarget,
|
|
31865
|
+
onClick: createOnClickLinkHandler(router, routeId, hash2 || void 0, combinedPathVariables, smoothScroll,),
|
|
31866
|
+
};
|
|
31867
|
+
}
|
|
31868
|
+
} catch {}
|
|
31869
|
+
return propsForLink(href, openInNewTab,);
|
|
31870
|
+
}
|
|
31871
|
+
function getRouteFromPageLink(pageLink, router, currentRoute,) {
|
|
31872
|
+
var _a;
|
|
31873
|
+
if (isString22(pageLink,)) {
|
|
31874
|
+
const isInternal = isInternalURL(pageLink,);
|
|
31875
|
+
if (!router.routes || !router.getRoute || !currentRoute || !isInternal) {
|
|
31876
|
+
return;
|
|
31877
|
+
}
|
|
31878
|
+
const [pathnameWithQueryParams,] = pageLink.split('#', 2,);
|
|
31879
|
+
if (pathnameWithQueryParams === void 0) return;
|
|
31880
|
+
const [pathname,] = pathnameWithQueryParams.split('?', 2,);
|
|
31881
|
+
if (pathname === void 0) return;
|
|
31882
|
+
const {
|
|
31883
|
+
routeId,
|
|
31884
|
+
} = inferInitialRouteFromPath(router.routes, pathname,);
|
|
31885
|
+
return router.getRoute(routeId,);
|
|
31886
|
+
}
|
|
31887
|
+
const {
|
|
31888
|
+
webPageId,
|
|
31889
|
+
} = pageLink;
|
|
31890
|
+
return (_a = router.getRoute) == null ? void 0 : _a.call(router, webPageId,);
|
|
31891
|
+
}
|
|
31892
|
+
var Link = /* @__PURE__ */ forwardRef(({
|
|
31702
31893
|
children,
|
|
31703
31894
|
href,
|
|
31704
31895
|
openInNewTab,
|
|
@@ -31711,8 +31902,29 @@ var Link = /* @__PURE__ */ React4.forwardRef(({
|
|
|
31711
31902
|
const {
|
|
31712
31903
|
activeLocale,
|
|
31713
31904
|
} = useLocaleInfo();
|
|
31905
|
+
const fallbackRef = useRef(null,);
|
|
31906
|
+
const stableObserverChildRef = useMemo(() => {
|
|
31907
|
+
let cleanupFn;
|
|
31908
|
+
const observerCallback = (node) => {
|
|
31909
|
+
var _a;
|
|
31910
|
+
if (node === null) {
|
|
31911
|
+
cleanupFn == null ? void 0 : cleanupFn();
|
|
31912
|
+
cleanupFn = void 0;
|
|
31913
|
+
return;
|
|
31914
|
+
}
|
|
31915
|
+
const pageLink = isLinkToWebPage(href,) ? href : linkFromFramerPageLink(href,);
|
|
31916
|
+
if (!pageLink) return;
|
|
31917
|
+
const route = getRouteFromPageLink(pageLink, router, currentRoute,);
|
|
31918
|
+
if (!route) return;
|
|
31919
|
+
cleanupFn = (_a = observeRouteForPreloading) == null ? void 0 : _a(route, node,);
|
|
31920
|
+
};
|
|
31921
|
+
const hasRef = isValidElement(children,) && 'ref' in children;
|
|
31922
|
+
if (hasRef && isMutableRef(children.ref,)) return createRefWithCallback(children.ref, observerCallback,);
|
|
31923
|
+
if (hasRef && isFunction(children.ref,)) return mergeRefs(children.ref, observerCallback,);
|
|
31924
|
+
return createRefWithCallback(fallbackRef, observerCallback,);
|
|
31925
|
+
}, [href, router, currentRoute, children,],);
|
|
31714
31926
|
const clone = useCloneChildrenWithPropsAndRef(forwardedRef,);
|
|
31715
|
-
const props =
|
|
31927
|
+
const props = useMemo(() => {
|
|
31716
31928
|
var _a;
|
|
31717
31929
|
if (!href) return {};
|
|
31718
31930
|
const pageLink = isLinkToWebPage(href,) ? href : linkFromFramerPageLink(href,);
|
|
@@ -31728,22 +31940,19 @@ var Link = /* @__PURE__ */ React4.forwardRef(({
|
|
|
31728
31940
|
unresolvedHashSlugs,
|
|
31729
31941
|
unresolvedPathSlugs,
|
|
31730
31942
|
} = pageLink;
|
|
31731
|
-
const route = (_a = router.getRoute) == null ? void 0 : _a.call(router, webPageId,);
|
|
31732
31943
|
const resolvedSlugs = resolveSlugsWithSuspense(unresolvedPathSlugs, unresolvedHashSlugs, router.collectionUtils, activeLocale,);
|
|
31733
|
-
|
|
31734
|
-
|
|
31735
|
-
|
|
31736
|
-
|
|
31737
|
-
|
|
31738
|
-
|
|
31739
|
-
|
|
31740
|
-
|
|
31741
|
-
|
|
31742
|
-
|
|
31743
|
-
hashVariables,
|
|
31744
|
-
resolvedSlugs == null ? void 0 : resolvedSlugs.hash,
|
|
31745
|
-
);
|
|
31944
|
+
const combinedPathVariable = {
|
|
31945
|
+
...implicitPathVariables,
|
|
31946
|
+
...pathVariables,
|
|
31947
|
+
...(resolvedSlugs == null ? void 0 : resolvedSlugs.path),
|
|
31948
|
+
};
|
|
31949
|
+
const combinedHashVariable = {
|
|
31950
|
+
...implicitPathVariables,
|
|
31951
|
+
...hashVariables,
|
|
31952
|
+
...(resolvedSlugs == null ? void 0 : resolvedSlugs.hash),
|
|
31953
|
+
};
|
|
31746
31954
|
const anchorTarget = getTargetAttrValue(openInNewTab, true,);
|
|
31955
|
+
const route = (_a = router.getRoute) == null ? void 0 : _a.call(router, webPageId,);
|
|
31747
31956
|
const resolvedHref = getPathForRoute(route, {
|
|
31748
31957
|
currentRoutePath: currentRoute == null ? void 0 : currentRoute.path,
|
|
31749
31958
|
currentPathVariables: currentRoute == null ? void 0 : currentRoute.pathVariables,
|
|
@@ -31763,6 +31972,7 @@ var Link = /* @__PURE__ */ React4.forwardRef(({
|
|
|
31763
31972
|
return clone(children, {
|
|
31764
31973
|
...restProps,
|
|
31765
31974
|
...props,
|
|
31975
|
+
ref: stableObserverChildRef,
|
|
31766
31976
|
},);
|
|
31767
31977
|
},);
|
|
31768
31978
|
function resolveLink(href, router, implicitPathVariables,) {
|
|
@@ -31837,7 +32047,7 @@ function PageRoot({
|
|
|
31837
32047
|
locales,
|
|
31838
32048
|
preserveQueryParams,
|
|
31839
32049
|
enableImproveInpDuringHydration,
|
|
31840
|
-
|
|
32050
|
+
addHydrationMarkers = false,
|
|
31841
32051
|
},) {
|
|
31842
32052
|
React4.useEffect(() => {
|
|
31843
32053
|
if (isWebsite) return;
|
|
@@ -31861,7 +32071,7 @@ function PageRoot({
|
|
|
31861
32071
|
},
|
|
31862
32072
|
preserveQueryParams,
|
|
31863
32073
|
enableImproveInpDuringHydration,
|
|
31864
|
-
|
|
32074
|
+
addHydrationMarkers,
|
|
31865
32075
|
},),
|
|
31866
32076
|
},),
|
|
31867
32077
|
},);
|
|
@@ -34910,7 +35120,11 @@ function useQueryData(query,) {
|
|
|
34910
35120
|
return cached.read();
|
|
34911
35121
|
}
|
|
34912
35122
|
function useQueryCount(query,) {
|
|
34913
|
-
const
|
|
35123
|
+
const countQuery = {
|
|
35124
|
+
...query,
|
|
35125
|
+
select: [],
|
|
35126
|
+
};
|
|
35127
|
+
const collection = useQueryData(countQuery,);
|
|
34914
35128
|
return collection.length;
|
|
34915
35129
|
}
|
|
34916
35130
|
function getWhereExpressionFromPathVariables(pathVariables,) {
|
|
@@ -34949,28 +35163,29 @@ function getWhereExpressionFromPathVariables(pathVariables,) {
|
|
|
34949
35163
|
right: expression,
|
|
34950
35164
|
}));
|
|
34951
35165
|
}
|
|
34952
|
-
function useLoadMorePaginatedQuery(query, pageSize,) {
|
|
34953
|
-
const {
|
|
34954
|
-
paginationInfo,
|
|
34955
|
-
setPaginationInfo,
|
|
34956
|
-
} = useCollectionListPaginationInfo();
|
|
35166
|
+
function useLoadMorePaginatedQuery(query, pageSize, hash2,) {
|
|
34957
35167
|
const count = useQueryCount(query,);
|
|
34958
|
-
const
|
|
35168
|
+
const [paginationInfo, setPaginationInfo,] = useState(() => {
|
|
35169
|
+
var _a, _b, _c, _d;
|
|
34959
35170
|
const totalPages = Math.ceil(count / pageSize,);
|
|
35171
|
+
const currentPage = ((_d = (_c = (_b = (_a = globalThis == null ? void 0 : globalThis.history) == null ? void 0 : _a.state) == null
|
|
35172
|
+
? void 0
|
|
35173
|
+
: _b.paginationInfo) == null
|
|
35174
|
+
? void 0
|
|
35175
|
+
: _c[hash2]) == null
|
|
35176
|
+
? void 0
|
|
35177
|
+
: _d.currentPage) ?? 1;
|
|
34960
35178
|
return {
|
|
34961
|
-
currentPage
|
|
35179
|
+
currentPage,
|
|
34962
35180
|
totalPages,
|
|
34963
|
-
|
|
35181
|
+
isLoading: false,
|
|
34964
35182
|
};
|
|
34965
|
-
},
|
|
35183
|
+
},);
|
|
34966
35184
|
useEffect(() => {
|
|
34967
|
-
|
|
34968
|
-
|
|
34969
|
-
}
|
|
34970
|
-
}, [count, initialPaginationInfo, paginationInfo, setPaginationInfo,],);
|
|
35185
|
+
pushLoadMoreHistory(hash2, paginationInfo,);
|
|
35186
|
+
}, [hash2, paginationInfo,],);
|
|
34971
35187
|
const paginatedQuery = useMemo(() => {
|
|
34972
|
-
|
|
34973
|
-
let limit = pageSize * currentPaginationInfo.currentPage;
|
|
35188
|
+
let limit = pageSize * paginationInfo.currentPage;
|
|
34974
35189
|
if (query.limit) {
|
|
34975
35190
|
if (query.limit.type !== 'LiteralValue' || typeof query.limit.value !== 'number') {
|
|
34976
35191
|
throw new Error('Unexpected type for query limit',);
|
|
@@ -34984,8 +35199,28 @@ function useLoadMorePaginatedQuery(query, pageSize,) {
|
|
|
34984
35199
|
value: limit,
|
|
34985
35200
|
},
|
|
34986
35201
|
};
|
|
34987
|
-
}, [
|
|
34988
|
-
|
|
35202
|
+
}, [query, pageSize, paginationInfo,],);
|
|
35203
|
+
const onCanvas = useIsOnFramerCanvas();
|
|
35204
|
+
const loadMore = useCallback(() => {
|
|
35205
|
+
if (onCanvas) return;
|
|
35206
|
+
if (paginationInfo.currentPage >= paginationInfo.totalPages) return;
|
|
35207
|
+
setPaginationInfo((info) => ({
|
|
35208
|
+
...info,
|
|
35209
|
+
isLoading: true,
|
|
35210
|
+
}));
|
|
35211
|
+
requestAnimationFrame(() => {
|
|
35212
|
+
setPaginationInfo((info) => ({
|
|
35213
|
+
...info,
|
|
35214
|
+
currentPage: Math.min(info.currentPage + 1, info.totalPages,),
|
|
35215
|
+
isLoading: false,
|
|
35216
|
+
}));
|
|
35217
|
+
},);
|
|
35218
|
+
}, [onCanvas, paginationInfo.currentPage, paginationInfo.totalPages,],);
|
|
35219
|
+
return {
|
|
35220
|
+
paginatedQuery,
|
|
35221
|
+
paginationInfo,
|
|
35222
|
+
loadMore,
|
|
35223
|
+
};
|
|
34989
35224
|
}
|
|
34990
35225
|
function createGestureVariant(variant, type,) {
|
|
34991
35226
|
return `${variant}-${type}`;
|
|
@@ -35042,9 +35277,10 @@ function useVariantState({
|
|
|
35042
35277
|
},) {
|
|
35043
35278
|
const forceUpdate = useForceUpdate3();
|
|
35044
35279
|
const validBaseVariants = useConstant2(() => new Set(externalCycleOrder,));
|
|
35045
|
-
const internalState = useRef({
|
|
35280
|
+
const internalState = React4.useRef({
|
|
35046
35281
|
isHovered: false,
|
|
35047
35282
|
isPressed: false,
|
|
35283
|
+
hasPressedVariants: true,
|
|
35048
35284
|
baseVariant: safeBaseVariant(variant, externalDefaultVariant, validBaseVariants,),
|
|
35049
35285
|
lastVariant: variant,
|
|
35050
35286
|
gestureVariant: void 0,
|
|
@@ -35056,7 +35292,7 @@ function useVariantState({
|
|
|
35056
35292
|
cycleOrder: externalCycleOrder,
|
|
35057
35293
|
transitions: externalTransitions,
|
|
35058
35294
|
},);
|
|
35059
|
-
const resolveNextVariant = useCallback((targetBaseVariant) => {
|
|
35295
|
+
const resolveNextVariant = React4.useCallback((targetBaseVariant) => {
|
|
35060
35296
|
const {
|
|
35061
35297
|
isHovered: isHovered2,
|
|
35062
35298
|
isPressed: isPressed2,
|
|
@@ -35068,7 +35304,7 @@ function useVariantState({
|
|
|
35068
35304
|
const nextGestureVariant = gesture ? createGestureVariant(nextBaseVariant, gesture,) : void 0;
|
|
35069
35305
|
return [nextBaseVariant, nextGestureVariant,];
|
|
35070
35306
|
}, [validBaseVariants,],);
|
|
35071
|
-
const setGestureState = useCallback(({
|
|
35307
|
+
const setGestureState = React4.useCallback(({
|
|
35072
35308
|
isHovered: isHovered2,
|
|
35073
35309
|
isPressed: isPressed2,
|
|
35074
35310
|
},) => {
|
|
@@ -35083,10 +35319,10 @@ function useVariantState({
|
|
|
35083
35319
|
if (nextBase !== baseVariant2 || nextGesture !== gestureVariant2) {
|
|
35084
35320
|
internalState.current.baseVariant = nextBase || defaultVariant2;
|
|
35085
35321
|
internalState.current.gestureVariant = nextGesture;
|
|
35086
|
-
|
|
35322
|
+
forceUpdate();
|
|
35087
35323
|
}
|
|
35088
35324
|
}, [resolveNextVariant, forceUpdate,],);
|
|
35089
|
-
const setVariant = useCallback((proposedVariant) => {
|
|
35325
|
+
const setVariant = React4.useCallback((proposedVariant) => {
|
|
35090
35326
|
const {
|
|
35091
35327
|
defaultVariant: defaultVariant2,
|
|
35092
35328
|
cycleOrder,
|
|
@@ -35100,7 +35336,7 @@ function useVariantState({
|
|
|
35100
35336
|
if (nextBase !== baseVariant2 || nextGesture !== gestureVariant2) {
|
|
35101
35337
|
internalState.current.baseVariant = nextBase || defaultVariant2;
|
|
35102
35338
|
internalState.current.gestureVariant = nextGesture;
|
|
35103
|
-
|
|
35339
|
+
forceUpdate();
|
|
35104
35340
|
}
|
|
35105
35341
|
}, [resolveNextVariant, forceUpdate,],);
|
|
35106
35342
|
if (variant !== internalState.current.lastVariant) {
|
|
@@ -35120,10 +35356,40 @@ function useVariantState({
|
|
|
35120
35356
|
isPressed,
|
|
35121
35357
|
} = internalState.current;
|
|
35122
35358
|
const addVariantProps = useAddVariantProps(internalState.current.baseVariant, internalState.current.gestureVariant, variantProps2,);
|
|
35123
|
-
return useMemo(() => {
|
|
35359
|
+
return React4.useMemo(() => {
|
|
35124
35360
|
const variants = [];
|
|
35125
35361
|
if (baseVariant !== defaultVariant) variants.push(baseVariant,);
|
|
35126
35362
|
if (gestureVariant) variants.push(gestureVariant,);
|
|
35363
|
+
const gestures = enabledGestures == null ? void 0 : enabledGestures[baseVariant];
|
|
35364
|
+
const gestureHandlers = {};
|
|
35365
|
+
if (gestures == null ? void 0 : gestures.hover) {
|
|
35366
|
+
Object.assign(gestureHandlers, {
|
|
35367
|
+
onMouseEnter: () =>
|
|
35368
|
+
setGestureState({
|
|
35369
|
+
isHovered: true,
|
|
35370
|
+
},),
|
|
35371
|
+
onMouseLeave: () =>
|
|
35372
|
+
setGestureState({
|
|
35373
|
+
isHovered: false,
|
|
35374
|
+
},),
|
|
35375
|
+
},);
|
|
35376
|
+
}
|
|
35377
|
+
if (gestures == null ? void 0 : gestures.pressed) {
|
|
35378
|
+
Object.assign(gestureHandlers, {
|
|
35379
|
+
onTapStart: () =>
|
|
35380
|
+
setGestureState({
|
|
35381
|
+
isPressed: true,
|
|
35382
|
+
},),
|
|
35383
|
+
onTapCancel: () =>
|
|
35384
|
+
setGestureState({
|
|
35385
|
+
isPressed: false,
|
|
35386
|
+
},),
|
|
35387
|
+
onTap: () =>
|
|
35388
|
+
setGestureState({
|
|
35389
|
+
isPressed: false,
|
|
35390
|
+
},),
|
|
35391
|
+
},);
|
|
35392
|
+
}
|
|
35127
35393
|
return {
|
|
35128
35394
|
variants,
|
|
35129
35395
|
baseVariant,
|
|
@@ -35132,10 +35398,8 @@ function useVariantState({
|
|
|
35132
35398
|
setVariant,
|
|
35133
35399
|
setGestureState,
|
|
35134
35400
|
addVariantProps,
|
|
35135
|
-
|
|
35136
|
-
|
|
35137
|
-
getGesture(enabledGestures == null ? void 0 : enabledGestures[baseVariant], isHovered, isPressed,),
|
|
35138
|
-
),
|
|
35401
|
+
gestureHandlers,
|
|
35402
|
+
classNames: cx(createVariantClassName(baseVariant, variantClassNames,), getGesture(gestures, isHovered, isPressed,),),
|
|
35139
35403
|
};
|
|
35140
35404
|
}, [
|
|
35141
35405
|
baseVariant,
|
|
@@ -36006,8 +36270,8 @@ var LocalFontSource = class {
|
|
|
36006
36270
|
};
|
|
36007
36271
|
const aliases = /* @__PURE__ */ new Map();
|
|
36008
36272
|
const weights = [400, 100, 200, 300, 500, 600, 700, 800, 900,];
|
|
36009
|
-
const
|
|
36010
|
-
for (const style of
|
|
36273
|
+
const styles2 = ['normal', 'italic',];
|
|
36274
|
+
for (const style of styles2) {
|
|
36011
36275
|
for (const weight of weights) {
|
|
36012
36276
|
const variant = createVariantName(weight, style,);
|
|
36013
36277
|
const alias = `__SystemDefault-${weight}-${style}__`;
|
|
@@ -36904,7 +37168,7 @@ var DeprecatedComponentContainer = /* @__PURE__ */ (() => {
|
|
|
36904
37168
|
},
|
|
36905
37169
|
},);
|
|
36906
37170
|
}
|
|
36907
|
-
renderErrorPlaceholder(
|
|
37171
|
+
renderErrorPlaceholder(error,) {
|
|
36908
37172
|
const {
|
|
36909
37173
|
RenderPlaceholder,
|
|
36910
37174
|
} = runtime;
|
|
@@ -36912,10 +37176,7 @@ var DeprecatedComponentContainer = /* @__PURE__ */ (() => {
|
|
|
36912
37176
|
...this.props,
|
|
36913
37177
|
background: null,
|
|
36914
37178
|
children: /* @__PURE__ */ jsx(RenderPlaceholder, {
|
|
36915
|
-
error
|
|
36916
|
-
error,
|
|
36917
|
-
file,
|
|
36918
|
-
},
|
|
37179
|
+
error,
|
|
36919
37180
|
},),
|
|
36920
37181
|
},);
|
|
36921
37182
|
}
|
|
@@ -36935,13 +37196,23 @@ var DeprecatedComponentContainer = /* @__PURE__ */ (() => {
|
|
|
36935
37196
|
if (noChildren) {
|
|
36936
37197
|
const errorComponent = runtime.componentLoader.errorForIdentifier(componentIdentifier,);
|
|
36937
37198
|
if (errorComponent) {
|
|
36938
|
-
|
|
37199
|
+
const title = `Error in ${errorComponent.file}`;
|
|
37200
|
+
const message = errorComponent.error;
|
|
37201
|
+
return this.renderErrorPlaceholder({
|
|
37202
|
+
title,
|
|
37203
|
+
message,
|
|
37204
|
+
},);
|
|
36939
37205
|
}
|
|
36940
37206
|
}
|
|
36941
37207
|
if (error && error.children === children) {
|
|
36942
37208
|
const component = runtime.componentLoader.componentForIdentifier(componentIdentifier,);
|
|
36943
37209
|
const file = component ? component.file : '???';
|
|
36944
|
-
|
|
37210
|
+
const title = `Error in ${file}`;
|
|
37211
|
+
const message = error.message;
|
|
37212
|
+
return this.renderErrorPlaceholder({
|
|
37213
|
+
title,
|
|
37214
|
+
message,
|
|
37215
|
+
},);
|
|
36945
37216
|
}
|
|
36946
37217
|
|
|
36947
37218
|
(_b = (_a2 = asRecord(safeWindow,))['__checkComponentBudget__']) == null ? void 0 : _b.call(_a2,);
|
|
@@ -37128,14 +37399,16 @@ function formReducer(_state, {
|
|
|
37128
37399
|
function preventDefault(e,) {
|
|
37129
37400
|
e.preventDefault();
|
|
37130
37401
|
}
|
|
37131
|
-
var FormContainer = ({
|
|
37402
|
+
var FormContainer = /* @__PURE__ */ React4.forwardRef(({
|
|
37132
37403
|
action,
|
|
37133
37404
|
formId,
|
|
37134
37405
|
disabled,
|
|
37135
37406
|
children,
|
|
37136
37407
|
redirectUrl,
|
|
37408
|
+
onSuccess,
|
|
37409
|
+
onError,
|
|
37137
37410
|
...props
|
|
37138
|
-
},) => {
|
|
37411
|
+
}, ref,) => {
|
|
37139
37412
|
const [state, dispatch,] = React4.useReducer(formReducer, {
|
|
37140
37413
|
state: disabled ? 'disabled' : void 0,
|
|
37141
37414
|
},);
|
|
@@ -37190,6 +37463,7 @@ var FormContainer = ({
|
|
|
37190
37463
|
dispatch({
|
|
37191
37464
|
type: 'success',
|
|
37192
37465
|
},);
|
|
37466
|
+
onSuccess == null ? void 0 : onSuccess();
|
|
37193
37467
|
if (redirectUrl) {
|
|
37194
37468
|
await redirectTo(redirectUrl,);
|
|
37195
37469
|
}
|
|
@@ -37197,6 +37471,7 @@ var FormContainer = ({
|
|
|
37197
37471
|
dispatch({
|
|
37198
37472
|
type: 'error',
|
|
37199
37473
|
},);
|
|
37474
|
+
onError == null ? void 0 : onError();
|
|
37200
37475
|
}
|
|
37201
37476
|
};
|
|
37202
37477
|
const handleKeyDown = (event) => {
|
|
@@ -37217,9 +37492,10 @@ var FormContainer = ({
|
|
|
37217
37492
|
'data-formid': formId,
|
|
37218
37493
|
onSubmit: isSubmitEnabled ? handleSubmit : preventDefault,
|
|
37219
37494
|
onKeyDown: handleKeyDown,
|
|
37495
|
+
ref,
|
|
37220
37496
|
children: children(state,),
|
|
37221
37497
|
},);
|
|
37222
|
-
};
|
|
37498
|
+
},);
|
|
37223
37499
|
async function submitForm(action, data2,) {
|
|
37224
37500
|
const proofOfWork = await calculateProofOfWork();
|
|
37225
37501
|
if (!proofOfWork) {
|
|
@@ -37270,21 +37546,53 @@ var FormInputStyleVariableNames = /* @__PURE__ */ ((FormInputStyleVariableNames2
|
|
|
37270
37546
|
FormInputStyleVariableNames2['FontLineHeight'] = '--framer-input-font-line-height';
|
|
37271
37547
|
FormInputStyleVariableNames2['PlaceholderColor'] = '--framer-input-placeholder-color';
|
|
37272
37548
|
FormInputStyleVariableNames2['BoxShadow'] = '--framer-input-box-shadow';
|
|
37273
|
-
FormInputStyleVariableNames2['ZIndex'] = '--framer-input-z-index';
|
|
37274
37549
|
FormInputStyleVariableNames2['FocusedBorderColor'] = '--framer-input-focused-border-color';
|
|
37275
37550
|
FormInputStyleVariableNames2['FocusedBorderWidth'] = '--framer-input-focused-border-width';
|
|
37276
37551
|
FormInputStyleVariableNames2['FocusedBorderStyle'] = '--framer-input-focused-border-style';
|
|
37277
37552
|
FormInputStyleVariableNames2['FocusedBackground'] = '--framer-input-focused-background';
|
|
37278
37553
|
FormInputStyleVariableNames2['FocusedBoxShadow'] = '--framer-input-focused-box-shadow';
|
|
37279
37554
|
FormInputStyleVariableNames2['FocusedTransition'] = '--framer-input-focused-transition';
|
|
37555
|
+
FormInputStyleVariableNames2['BooleanCheckedIconURL'] = '--framer-input-boolean-icon';
|
|
37556
|
+
FormInputStyleVariableNames2['BooleanCheckedBackground'] = '--framer-input-boolean-checked-background';
|
|
37557
|
+
FormInputStyleVariableNames2['BooleanCheckedBorderColor'] = '--framer-input-boolean-checked-border-color';
|
|
37558
|
+
FormInputStyleVariableNames2['BooleanCheckedBorderWidth'] = '--framer-input-boolean-checked-border-width';
|
|
37559
|
+
FormInputStyleVariableNames2['BooleanCheckedBorderStyle'] = '--framer-input-boolean-checked-border-style';
|
|
37560
|
+
FormInputStyleVariableNames2['BooleanCheckedBoxShadow'] = '--framer-input-boolean-checked-box-shadow';
|
|
37561
|
+
FormInputStyleVariableNames2['BooleanCheckedTransition'] = '--framer-input-boolean-checked-transition';
|
|
37562
|
+
FormInputStyleVariableNames2['InvalidTextColor'] = '--framer-input-invalid-text-color';
|
|
37280
37563
|
return FormInputStyleVariableNames2;
|
|
37281
37564
|
})(FormInputStyleVariableNames || {},);
|
|
37282
37565
|
var Var = FormInputStyleVariableNames;
|
|
37283
|
-
var inputClassName = 'framer-form-input';
|
|
37284
|
-
var inputWrapperClassName = 'framer-form-input-wrapper';
|
|
37285
|
-
|
|
37286
|
-
|
|
37566
|
+
var inputClassName = /* @__PURE__ */ (() => 'framer-form-input')();
|
|
37567
|
+
var inputWrapperClassName = /* @__PURE__ */ (() => 'framer-form-input-wrapper')();
|
|
37568
|
+
var emptyValueClassName = /* @__PURE__ */ (() => 'framer-form-input-empty')();
|
|
37569
|
+
var forcedFocusClassName = /* @__PURE__ */ (() => 'framer-form-input-forced-focus')();
|
|
37570
|
+
var forcedCheckedClassName = /* @__PURE__ */ (() => 'framer-form-input-forced-checked')();
|
|
37571
|
+
function cssValue(value,) {
|
|
37572
|
+
if (typeof value === 'number') return value;
|
|
37573
|
+
if (value.startsWith('--',)) return css.variable(value,);
|
|
37574
|
+
if (value === '') return '""';
|
|
37575
|
+
return value;
|
|
37287
37576
|
}
|
|
37577
|
+
function css(selector, declaration,) {
|
|
37578
|
+
let output = ' ';
|
|
37579
|
+
for (const key7 in declaration) {
|
|
37580
|
+
output += `${key7.replace(/([A-Z])/gu, '-$1',).toLowerCase()}: ${cssValue(declaration[key7],)}; `;
|
|
37581
|
+
}
|
|
37582
|
+
return selector + ' {' + output + '}';
|
|
37583
|
+
}
|
|
37584
|
+
((css2) => {
|
|
37585
|
+
function variable(...variables) {
|
|
37586
|
+
const lastItem = variables[variables.length - 1];
|
|
37587
|
+
let value = lastItem.startsWith('--',) ? `var(${lastItem})` : lastItem;
|
|
37588
|
+
for (let index = variables.length - 2; index >= 0; index--) {
|
|
37589
|
+
const element = variables[index];
|
|
37590
|
+
value = `var(${element}, ${value})`;
|
|
37591
|
+
}
|
|
37592
|
+
return value;
|
|
37593
|
+
}
|
|
37594
|
+
css2.variable = variable;
|
|
37595
|
+
})(css || (css = {}),);
|
|
37288
37596
|
var sharedInputCSS = [`.${inputClassName} {
|
|
37289
37597
|
padding: var(${Var.Padding});
|
|
37290
37598
|
background: var(${Var.Background});
|
|
@@ -37303,28 +37611,28 @@ var sharedInputCSS = [`.${inputClassName} {
|
|
|
37303
37611
|
border-top-right-radius: var(${Var.BorderRadiusTopRight});
|
|
37304
37612
|
border-bottom-right-radius: var(${Var.BorderRadiusBottomRight});
|
|
37305
37613
|
border-bottom-left-radius: var(${Var.BorderRadiusBottomLeft});
|
|
37306
|
-
z-index: var(${Var.ZIndex});
|
|
37307
37614
|
letter-spacing: var(${Var.FontLetterSpacing});
|
|
37308
37615
|
text-align: var(${Var.FontTextAlignment});
|
|
37309
37616
|
line-height: var(${Var.FontLineHeight});
|
|
37310
37617
|
transition: var(${Var.FocusedTransition});
|
|
37311
37618
|
transition-property: background, box-shadow;
|
|
37312
37619
|
}`,];
|
|
37313
|
-
var focusInputCSS =
|
|
37314
|
-
|
|
37315
|
-
|
|
37316
|
-
|
|
37317
|
-
|
|
37620
|
+
var focusInputCSS =
|
|
37621
|
+
/* @__PURE__ */ (() => [
|
|
37622
|
+
`.${inputClassName}:focus-visible { outline: none; }`,
|
|
37623
|
+
`.${inputClassName}:focus, .${inputClassName}.${forcedFocusClassName} {
|
|
37624
|
+
background: ${css.variable(Var.FocusedBackground, Var.Background,)};
|
|
37625
|
+
box-shadow: ${css.variable(Var.FocusedBoxShadow, Var.BoxShadow,)};
|
|
37318
37626
|
}`,
|
|
37319
|
-
|
|
37320
|
-
border-color: ${
|
|
37321
|
-
border-style: ${
|
|
37322
|
-
border-top-width: ${
|
|
37323
|
-
border-right-width: ${
|
|
37324
|
-
border-bottom-width: ${
|
|
37325
|
-
border-left-width: ${
|
|
37627
|
+
`.${inputWrapperClassName}:focus-within::after, .${inputWrapperClassName}.${forcedFocusClassName}::after {
|
|
37628
|
+
border-color: ${css.variable(Var.FocusedBorderColor, Var.BorderColor,)};
|
|
37629
|
+
border-style: ${css.variable(Var.FocusedBorderStyle, Var.BorderStyle,)};
|
|
37630
|
+
border-top-width: ${css.variable(Var.FocusedBorderWidth, Var.BorderTopWidth,)};
|
|
37631
|
+
border-right-width: ${css.variable(Var.FocusedBorderWidth, Var.BorderRightWidth,)};
|
|
37632
|
+
border-bottom-width: ${css.variable(Var.FocusedBorderWidth, Var.BorderBottomWidth,)};
|
|
37633
|
+
border-left-width: ${css.variable(Var.FocusedBorderWidth, Var.BorderLeftWidth,)};
|
|
37326
37634
|
}`,
|
|
37327
|
-
];
|
|
37635
|
+
])();
|
|
37328
37636
|
var inputBorderCSS = [
|
|
37329
37637
|
`.${inputWrapperClassName} {
|
|
37330
37638
|
position: relative;
|
|
@@ -37357,28 +37665,44 @@ var passwordManagerIgnoreDataProps = {
|
|
|
37357
37665
|
'data-1p-ignore': true,
|
|
37358
37666
|
// LastPass
|
|
37359
37667
|
'data-lpignore': true,
|
|
37360
|
-
|
|
37361
|
-
|
|
37668
|
+
// Dashlane
|
|
37669
|
+
// https://support.dashlane.com/hc/en-us/articles/4420122792594-Optimize-your-web-forms-for-Dashlane-Autofill
|
|
37670
|
+
'data-form-type': 'other',
|
|
37671
|
+
// autocomplete="off" is a generic property that disables autofilling. It
|
|
37672
|
+
// is not always respected by some browsers or password managers.
|
|
37362
37673
|
autocomplete: 'off',
|
|
37363
37674
|
};
|
|
37364
37675
|
var PlainTextInput = /* @__PURE__ */ React4.forwardRef(function FormPlainTextInput(props, ref,) {
|
|
37365
37676
|
const {
|
|
37366
|
-
style,
|
|
37367
|
-
inputName,
|
|
37368
|
-
type,
|
|
37369
|
-
required,
|
|
37370
37677
|
autoFocus,
|
|
37371
|
-
|
|
37372
|
-
|
|
37373
|
-
min,
|
|
37678
|
+
className: className2,
|
|
37679
|
+
inputName,
|
|
37374
37680
|
max,
|
|
37681
|
+
min,
|
|
37682
|
+
onBlur,
|
|
37683
|
+
onFocus,
|
|
37684
|
+
onInvalid,
|
|
37685
|
+
placeholder,
|
|
37686
|
+
required,
|
|
37375
37687
|
step: step2,
|
|
37688
|
+
style,
|
|
37689
|
+
type,
|
|
37690
|
+
value,
|
|
37691
|
+
autofillEnabled,
|
|
37692
|
+
canvasPreviewClassName,
|
|
37376
37693
|
...rest
|
|
37377
37694
|
} = props;
|
|
37378
|
-
const
|
|
37379
|
-
|
|
37380
|
-
|
|
37381
|
-
|
|
37695
|
+
const [hasValue, setHasValue,] = React4.useState(!!value,);
|
|
37696
|
+
const dataProps = autofillEnabled === false ? passwordManagerIgnoreDataProps : void 0;
|
|
37697
|
+
const eventProps = {
|
|
37698
|
+
onBlur,
|
|
37699
|
+
onFocus,
|
|
37700
|
+
onInvalid,
|
|
37701
|
+
};
|
|
37702
|
+
const onChange = React4.useCallback((e) => {
|
|
37703
|
+
const newValue = e.target.value;
|
|
37704
|
+
setHasValue(!!newValue,);
|
|
37705
|
+
}, [],);
|
|
37382
37706
|
switch (type) {
|
|
37383
37707
|
case 'hidden':
|
|
37384
37708
|
return /* @__PURE__ */ jsx(motion.input, {
|
|
@@ -37390,16 +37714,17 @@ var PlainTextInput = /* @__PURE__ */ React4.forwardRef(function FormPlainTextInp
|
|
|
37390
37714
|
return /* @__PURE__ */ jsx(motion.div, {
|
|
37391
37715
|
ref,
|
|
37392
37716
|
style,
|
|
37717
|
+
className: cx(inputWrapperClassName, canvasPreviewClassName, className2,),
|
|
37393
37718
|
...rest,
|
|
37394
|
-
className: cx(inputWrapperClassName, props.className,),
|
|
37395
37719
|
children: /* @__PURE__ */ jsx(motion.textarea, {
|
|
37396
37720
|
id: inputName,
|
|
37397
37721
|
...dataProps,
|
|
37722
|
+
...eventProps,
|
|
37398
37723
|
required,
|
|
37399
37724
|
autoFocus,
|
|
37400
37725
|
name: inputName,
|
|
37401
37726
|
placeholder,
|
|
37402
|
-
className: inputClassName,
|
|
37727
|
+
className: cx(inputClassName, canvasPreviewClassName,),
|
|
37403
37728
|
value,
|
|
37404
37729
|
},),
|
|
37405
37730
|
},);
|
|
@@ -37407,17 +37732,19 @@ var PlainTextInput = /* @__PURE__ */ React4.forwardRef(function FormPlainTextInp
|
|
|
37407
37732
|
return /* @__PURE__ */ jsx(motion.div, {
|
|
37408
37733
|
ref,
|
|
37409
37734
|
style,
|
|
37735
|
+
className: cx(inputWrapperClassName, canvasPreviewClassName, className2,),
|
|
37410
37736
|
...rest,
|
|
37411
|
-
className: cx(inputWrapperClassName, props.className,),
|
|
37412
37737
|
children: /* @__PURE__ */ jsx(motion.input, {
|
|
37413
37738
|
id: inputName,
|
|
37414
37739
|
...dataProps,
|
|
37740
|
+
...eventProps,
|
|
37415
37741
|
type,
|
|
37416
37742
|
required,
|
|
37417
37743
|
autoFocus,
|
|
37418
37744
|
name: inputName,
|
|
37419
37745
|
placeholder,
|
|
37420
|
-
className: inputClassName,
|
|
37746
|
+
className: cx(inputClassName, canvasPreviewClassName, !hasValue && emptyValueClassName,),
|
|
37747
|
+
onChange,
|
|
37421
37748
|
value,
|
|
37422
37749
|
min,
|
|
37423
37750
|
max,
|
|
@@ -37426,6 +37753,14 @@ var PlainTextInput = /* @__PURE__ */ React4.forwardRef(function FormPlainTextInp
|
|
|
37426
37753
|
},);
|
|
37427
37754
|
}
|
|
37428
37755
|
},);
|
|
37756
|
+
var iconSpacing = /* @__PURE__ */ (() => 10)();
|
|
37757
|
+
var iconSize = /* @__PURE__ */ (() => 14)();
|
|
37758
|
+
var defaultDateIcon =
|
|
37759
|
+
/* @__PURE__ */ (() =>
|
|
37760
|
+
`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${iconSize}' height='${iconSize}'%3E%3Cpath d='M2 4a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2H2Z' fill='currentColor' opacity='.3'/%3E%3Cpath d='M2.25 4.25a2 2 0 0 1 2-2h5.5a2 2 0 0 1 2 2v5.5a2 2 0 0 1-2 2h-5.5a2 2 0 0 1-2-2ZM2 5.75h9.5' fill='transparent' stroke-width='1.5' stroke='currentColor'/%3E%3C/svg%3E`)();
|
|
37761
|
+
var defaultTimeIcon =
|
|
37762
|
+
/* @__PURE__ */ (() =>
|
|
37763
|
+
`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${iconSize}' height='${iconSize}'%3E%3Cpath d='M1.5 7a5.5 5.5 0 1 1 11 0 5.5 5.5 0 1 1-11 0Z' fill='transparent' stroke-width='1.5' stroke='currentColor'/%3E%3Cpath d='M6.75 7.25v-3m0 3h2' fill='transparent' stroke-width='1.5' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E`)();
|
|
37429
37764
|
var FormPlainTextInput2 =
|
|
37430
37765
|
/* @__PURE__ */ (() =>
|
|
37431
37766
|
withCSS(PlainTextInput, [
|
|
@@ -37439,27 +37774,221 @@ var FormPlainTextInput2 =
|
|
|
37439
37774
|
resize: var(${'--framer-textarea-resize'});
|
|
37440
37775
|
min-height: var(${'--framer-textarea-min-height'});
|
|
37441
37776
|
}`,
|
|
37777
|
+
`.${inputClassName}.${emptyValueClassName}::-webkit-datetime-edit {
|
|
37778
|
+
color:var(${'--framer-input-placeholder-color'});
|
|
37779
|
+
-webkit-text-fill-color: var(${'--framer-input-placeholder-color'});
|
|
37780
|
+
}`,
|
|
37781
|
+
`.${inputClassName}[type="date"]::before, .${inputClassName}[type="time"]::before {
|
|
37782
|
+
content: "";
|
|
37783
|
+
display: block;
|
|
37784
|
+
position: absolute;
|
|
37785
|
+
padding: var(${'--framer-input-padding'});
|
|
37786
|
+
padding-left: ${iconSpacing}px;
|
|
37787
|
+
right: 0;
|
|
37788
|
+
top: 0;
|
|
37789
|
+
bottom: 0;
|
|
37790
|
+
width: ${iconSize}px;
|
|
37791
|
+
box-sizing: content-box;
|
|
37792
|
+
|
|
37793
|
+
pointer-events: none;
|
|
37794
|
+
mask-repeat: no-repeat;
|
|
37795
|
+
mask-position: ${iconSpacing}px center;
|
|
37796
|
+
border: none;
|
|
37797
|
+
background-color: #999;
|
|
37798
|
+
}`,
|
|
37799
|
+
`.${inputClassName}[type="date"]::before {
|
|
37800
|
+
mask-image: url("${defaultDateIcon}");
|
|
37801
|
+
}`,
|
|
37802
|
+
`.${inputClassName}[type="time"]::before {
|
|
37803
|
+
mask-image: url("${defaultTimeIcon}");
|
|
37804
|
+
}`,
|
|
37805
|
+
// Hide the native date picker icon, but still allow the user to click it.
|
|
37806
|
+
`.${inputClassName}::-webkit-calendar-picker-indicator {
|
|
37807
|
+
opacity: 0;
|
|
37808
|
+
padding: var(${'--framer-input-padding'});
|
|
37809
|
+
padding-right: 0;
|
|
37810
|
+
padding-left: ${iconSpacing}px;
|
|
37811
|
+
width: ${iconSize}px;
|
|
37812
|
+
height: ${iconSize}px;
|
|
37813
|
+
}`,
|
|
37442
37814
|
],))();
|
|
37815
|
+
var className = 'framer-form-boolean-input';
|
|
37816
|
+
var BooleanInput = /* @__PURE__ */ React4.forwardRef(function FormPlainTextInput3(props, ref,) {
|
|
37817
|
+
const {
|
|
37818
|
+
inputName,
|
|
37819
|
+
type = 'checkbox',
|
|
37820
|
+
defaultChecked,
|
|
37821
|
+
canvasPreviewClassName,
|
|
37822
|
+
...rest
|
|
37823
|
+
} = props;
|
|
37824
|
+
const isCanvas = useIsOnFramerCanvas();
|
|
37825
|
+
const attributes = isCanvas
|
|
37826
|
+
? {
|
|
37827
|
+
checked: defaultChecked,
|
|
37828
|
+
}
|
|
37829
|
+
: {
|
|
37830
|
+
defaultChecked,
|
|
37831
|
+
};
|
|
37832
|
+
return /* @__PURE__ */ jsx(motion.input, {
|
|
37833
|
+
...rest,
|
|
37834
|
+
...attributes,
|
|
37835
|
+
readOnly: isCanvas,
|
|
37836
|
+
ref,
|
|
37837
|
+
id: inputName,
|
|
37838
|
+
type,
|
|
37839
|
+
name: inputName,
|
|
37840
|
+
className: cx(className, props.className, canvasPreviewClassName,),
|
|
37841
|
+
},);
|
|
37842
|
+
},);
|
|
37843
|
+
var defaultCheckedIcon =
|
|
37844
|
+
`data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M 4 8 L 6.5 10.5 L 11.5 5.5" fill="transparent" stroke-width="2" stroke="rgb(255, 255, 255)" stroke-linecap="round" stroke-linejoin="round"></path></svg>`;
|
|
37845
|
+
var borderWidth =
|
|
37846
|
+
`var(${'--framer-input-border-top-width'}) var(${'--framer-input-border-right-width'}) var(${'--framer-input-border-bottom-width'}) var(${'--framer-input-border-left-width'})`;
|
|
37847
|
+
var borderRadius =
|
|
37848
|
+
`var(${'--framer-input-border-radius-top-left'}) var(${'--framer-input-border-radius-top-right'}) var(${'--framer-input-border-radius-bottom-right'}) var(${'--framer-input-border-radius-bottom-left'})`;
|
|
37849
|
+
var styles = /* @__PURE__ */ (() => [
|
|
37850
|
+
css(`.${className}`, {
|
|
37851
|
+
'-webkit-appearance': 'none',
|
|
37852
|
+
// background-color: #fff; fixes a bug on iOS where the checkbox shows
|
|
37853
|
+
// through the appearance: none;
|
|
37854
|
+
alignItems: 'center',
|
|
37855
|
+
appearance: 'none',
|
|
37856
|
+
backgroundColor: '#fff',
|
|
37857
|
+
background: '--framer-input-background',
|
|
37858
|
+
borderRadius,
|
|
37859
|
+
boxShadow: '--framer-input-box-shadow',
|
|
37860
|
+
display: 'flex',
|
|
37861
|
+
justifyContent: 'center',
|
|
37862
|
+
margin: 0,
|
|
37863
|
+
overflow: 'hidden',
|
|
37864
|
+
position: 'relative',
|
|
37865
|
+
transition: '--framer-input-boolean-checked-transition',
|
|
37866
|
+
transitionProperty: 'box-shadow, background',
|
|
37867
|
+
},),
|
|
37868
|
+
// The after element styles the border of the checkbox to conform to
|
|
37869
|
+
// framer's inset border model.
|
|
37870
|
+
css(`.${className}::after`, {
|
|
37871
|
+
background: 'transparent',
|
|
37872
|
+
borderColor: css.variable('--framer-input-border-color', 'transparent',),
|
|
37873
|
+
borderRadius,
|
|
37874
|
+
borderStyle: '--framer-input-border-style',
|
|
37875
|
+
borderWidth,
|
|
37876
|
+
boxSizing: 'border-box',
|
|
37877
|
+
content: '',
|
|
37878
|
+
display: 'block',
|
|
37879
|
+
inset: 0,
|
|
37880
|
+
position: 'absolute',
|
|
37881
|
+
transition: '--framer-input-boolean-checked-transition',
|
|
37882
|
+
transitionProperty: 'border-color, border-width, border-style',
|
|
37883
|
+
},),
|
|
37884
|
+
// The before element is used to display the check mark icon. It is
|
|
37885
|
+
// faded in when the input is checked.
|
|
37886
|
+
css(`.${className}::before`, {
|
|
37887
|
+
// Use the icon url if it's provided, falling back to a default check
|
|
37888
|
+
// mark. Radio inputs will be code-generated with a "none" value for the
|
|
37889
|
+
// variable if an image isn't provided which will prevent this fallback
|
|
37890
|
+
// in those cases.
|
|
37891
|
+
backgroundImage: css.variable('--framer-input-boolean-icon', `url('${defaultCheckedIcon}')`,),
|
|
37892
|
+
backgroundPosition: 'center',
|
|
37893
|
+
backgroundRepeat: 'no-repeat',
|
|
37894
|
+
backgroundSize: 'contain',
|
|
37895
|
+
content: '',
|
|
37896
|
+
display: 'block',
|
|
37897
|
+
height: '100%',
|
|
37898
|
+
opacity: 0,
|
|
37899
|
+
transition: '--framer-input-boolean-checked-transition',
|
|
37900
|
+
transitionProperty: 'opacity',
|
|
37901
|
+
width: '100%',
|
|
37902
|
+
},),
|
|
37903
|
+
css(`.${className}:checked, .${className}.${forcedCheckedClassName}`, {
|
|
37904
|
+
// When not set, the styles when checked shouldn't clear the default
|
|
37905
|
+
// styles.
|
|
37906
|
+
backgroundColor: css.variable('--framer-input-boolean-checked-background', '--framer-input-background',/* Background */
|
|
37907
|
+
),
|
|
37908
|
+
boxShadow: css.variable('--framer-input-boolean-checked-box-shadow', '--framer-input-box-shadow',/* BoxShadow */
|
|
37909
|
+
),
|
|
37910
|
+
},),
|
|
37911
|
+
css(`.${className}:checked::before, .${className}.${forcedCheckedClassName}::before`, {
|
|
37912
|
+
opacity: 1,
|
|
37913
|
+
},),
|
|
37914
|
+
css(`.${className}:checked::after, .${className}.${forcedCheckedClassName}::after`, {
|
|
37915
|
+
// When not set, the styles when checked shouldn't clear the default
|
|
37916
|
+
// styles.
|
|
37917
|
+
borderColor: css.variable('--framer-input-boolean-checked-border-color', '--framer-input-border-color', 'transparent',),
|
|
37918
|
+
borderStyle: css.variable('--framer-input-boolean-checked-border-style', '--framer-input-border-style', 'solid',),
|
|
37919
|
+
borderWidth: css.variable('--framer-input-boolean-checked-border-width', borderWidth,),
|
|
37920
|
+
},),
|
|
37921
|
+
css(`.${className}:focus, .${className}.${forcedFocusClassName}`, {
|
|
37922
|
+
backgroundColor: css.variable('--framer-input-focused-background', '--framer-input-background',/* Background */
|
|
37923
|
+
),
|
|
37924
|
+
boxShadow: css.variable('--framer-input-focused-box-shadow', '--framer-input-box-shadow',/* BoxShadow */
|
|
37925
|
+
),
|
|
37926
|
+
},),
|
|
37927
|
+
css(`.${className}:focus-visible`, {
|
|
37928
|
+
outline: 'none',
|
|
37929
|
+
},),
|
|
37930
|
+
css(`.${className}:focus::after, .${className}.${forcedFocusClassName}::after`, {
|
|
37931
|
+
// When not set, the styles when focused shouldn't clear the checked
|
|
37932
|
+
// styles.
|
|
37933
|
+
borderColor: css.variable('--framer-input-focused-border-color', '--framer-input-border-color', 'transparent',),
|
|
37934
|
+
borderStyle: css.variable('--framer-input-focused-border-style', '--framer-input-border-style', 'solid',),
|
|
37935
|
+
borderWidth: css.variable('--framer-input-focused-border-width', borderWidth,),
|
|
37936
|
+
},),
|
|
37937
|
+
css(`.${className}:focus:checked`, {
|
|
37938
|
+
backgroundColor: css.variable(
|
|
37939
|
+
'--framer-input-focused-background',
|
|
37940
|
+
'--framer-input-boolean-checked-background',
|
|
37941
|
+
'--framer-input-background',
|
|
37942
|
+
/* Background */
|
|
37943
|
+
),
|
|
37944
|
+
boxShadow: css.variable(
|
|
37945
|
+
'--framer-input-focused-box-shadow',
|
|
37946
|
+
'--framer-input-boolean-checked-box-shadow',
|
|
37947
|
+
'--framer-input-box-shadow',
|
|
37948
|
+
/* BoxShadow */
|
|
37949
|
+
),
|
|
37950
|
+
},),
|
|
37951
|
+
css(`.${className}:focus:checked::after`, {
|
|
37952
|
+
borderStyle: css.variable(
|
|
37953
|
+
'--framer-input-focused-border-style',
|
|
37954
|
+
'--framer-input-boolean-checked-border-style',
|
|
37955
|
+
'--framer-input-border-style',
|
|
37956
|
+
'solid',
|
|
37957
|
+
),
|
|
37958
|
+
borderWidth: css.variable('--framer-input-focused-border-width', '--framer-input-boolean-checked-border-width', borderWidth,),
|
|
37959
|
+
},),
|
|
37960
|
+
])();
|
|
37961
|
+
var FormBooleanInput = /* @__PURE__ */ withCSS(BooleanInput, styles,);
|
|
37443
37962
|
var Select = /* @__PURE__ */ React4.forwardRef(function Select2(props, measureRef,) {
|
|
37444
37963
|
const {
|
|
37445
|
-
|
|
37964
|
+
autoFocus,
|
|
37965
|
+
className: className2,
|
|
37446
37966
|
inputName,
|
|
37967
|
+
onBlur,
|
|
37968
|
+
onFocus,
|
|
37969
|
+
onInvalid,
|
|
37447
37970
|
required,
|
|
37448
|
-
autoFocus,
|
|
37449
|
-
selectOptions,
|
|
37450
37971
|
selectDefaultValue,
|
|
37972
|
+
selectOptions,
|
|
37973
|
+
style,
|
|
37974
|
+
canvasPreviewClassName,
|
|
37975
|
+
...rest
|
|
37451
37976
|
} = props;
|
|
37452
37977
|
return /* @__PURE__ */ jsx(motion.div, {
|
|
37453
37978
|
ref: measureRef,
|
|
37454
37979
|
style,
|
|
37455
|
-
className: cx(inputWrapperClassName, selectWrapperClassName,
|
|
37980
|
+
className: cx(inputWrapperClassName, selectWrapperClassName, canvasPreviewClassName, className2,),
|
|
37981
|
+
...rest,
|
|
37456
37982
|
children: /* @__PURE__ */ jsx(motion.select, {
|
|
37457
37983
|
id: inputName,
|
|
37458
37984
|
name: inputName,
|
|
37459
37985
|
autoFocus,
|
|
37460
37986
|
required,
|
|
37461
|
-
className: inputClassName,
|
|
37987
|
+
className: cx(inputClassName, canvasPreviewClassName,),
|
|
37462
37988
|
defaultValue: selectDefaultValue,
|
|
37989
|
+
onBlur,
|
|
37990
|
+
onFocus,
|
|
37991
|
+
onInvalid,
|
|
37463
37992
|
children: selectOptions == null ? void 0 : selectOptions.map((option, index,) => {
|
|
37464
37993
|
switch (option.type) {
|
|
37465
37994
|
case 'divider':
|
|
@@ -37503,6 +38032,9 @@ var FormSelect = /* @__PURE__ */ (() =>
|
|
|
37503
38032
|
background-position: center center;
|
|
37504
38033
|
border: none;
|
|
37505
38034
|
}`,
|
|
38035
|
+
`select.${inputClassName}:required:invalid {
|
|
38036
|
+
color: var(${'--framer-input-invalid-text-color'});
|
|
38037
|
+
}`,
|
|
37506
38038
|
],))();
|
|
37507
38039
|
var Image2 = /* @__PURE__ */ React4.forwardRef(function Image3(props, ref,) {
|
|
37508
38040
|
const {
|
|
@@ -37713,7 +38245,7 @@ var DeprecatedRichText = /* @__PURE__ */ React2.forwardRef(function Text(props,
|
|
|
37713
38245
|
top,
|
|
37714
38246
|
bottom,
|
|
37715
38247
|
center,
|
|
37716
|
-
className,
|
|
38248
|
+
className: className2,
|
|
37717
38249
|
stylesPresetsClassName,
|
|
37718
38250
|
visible = true,
|
|
37719
38251
|
opacity,
|
|
@@ -37854,7 +38386,7 @@ var DeprecatedRichText = /* @__PURE__ */ React2.forwardRef(function Text(props,
|
|
|
37854
38386
|
'data-framer-name': name,
|
|
37855
38387
|
'data-framer-component-type': 'DeprecatedRichText',
|
|
37856
38388
|
'data-center': center,
|
|
37857
|
-
className: cx(
|
|
38389
|
+
className: cx(className2, stylesPresetsClassName, richTextWrapperClassName,),
|
|
37858
38390
|
transformTemplate: template,
|
|
37859
38391
|
dangerouslySetInnerHTML: {
|
|
37860
38392
|
__html: innerHTMLWithReplacedFramerPageLinks,
|
|
@@ -38730,7 +39262,7 @@ var SVGComponent = /* @__PURE__ */ (() => {
|
|
|
38730
39262
|
title,
|
|
38731
39263
|
description,
|
|
38732
39264
|
layoutId,
|
|
38733
|
-
className,
|
|
39265
|
+
className: className2,
|
|
38734
39266
|
variants,
|
|
38735
39267
|
withExternalLayout,
|
|
38736
39268
|
innerRef,
|
|
@@ -38896,7 +39428,7 @@ var SVGComponent = /* @__PURE__ */ (() => {
|
|
|
38896
39428
|
id: id3,
|
|
38897
39429
|
ref: innerRef,
|
|
38898
39430
|
style: outerStyle,
|
|
38899
|
-
className,
|
|
39431
|
+
className: className2,
|
|
38900
39432
|
variants,
|
|
38901
39433
|
tabIndex: this.props.tabIndex,
|
|
38902
39434
|
role: title || description ? 'img' : void 0,
|
|
@@ -39040,7 +39572,7 @@ var TextComponent = /* @__PURE__ */ (() => {
|
|
|
39040
39572
|
opacity,
|
|
39041
39573
|
id: id3,
|
|
39042
39574
|
layoutId,
|
|
39043
|
-
className,
|
|
39575
|
+
className: className2,
|
|
39044
39576
|
transition,
|
|
39045
39577
|
variants,
|
|
39046
39578
|
name,
|
|
@@ -39131,7 +39663,7 @@ var TextComponent = /* @__PURE__ */ (() => {
|
|
|
39131
39663
|
__html: rawHTML,
|
|
39132
39664
|
},
|
|
39133
39665
|
'data-center': this.props.center,
|
|
39134
|
-
className: cx(
|
|
39666
|
+
className: cx(className2, matchesCurrentRoute && 'isCurrent',),
|
|
39135
39667
|
transition,
|
|
39136
39668
|
variants,
|
|
39137
39669
|
ref: this.setElement,
|
|
@@ -40359,7 +40891,7 @@ function loadJSON(url,) {
|
|
|
40359
40891
|
},).then((res) => res.json());
|
|
40360
40892
|
}
|
|
40361
40893
|
function inspectObjectType(item,) {
|
|
40362
|
-
let
|
|
40894
|
+
let className2;
|
|
40363
40895
|
if (
|
|
40364
40896
|
(item.constructor !== null ? item.constructor.name : void 0) !== null &&
|
|
40365
40897
|
(item.constructor !== null ? item.constructor.name : void 0) !== 'Object'
|
|
@@ -40378,15 +40910,15 @@ function inspectObjectType(item,) {
|
|
|
40378
40910
|
return null;
|
|
40379
40911
|
};
|
|
40380
40912
|
if (item.toString) {
|
|
40381
|
-
|
|
40382
|
-
if (
|
|
40383
|
-
return
|
|
40913
|
+
className2 = extract(item.toString(),);
|
|
40914
|
+
if (className2) {
|
|
40915
|
+
return className2;
|
|
40384
40916
|
}
|
|
40385
40917
|
}
|
|
40386
40918
|
if (item.constructor !== null ? item.constructor.toString : void 0) {
|
|
40387
|
-
|
|
40388
|
-
if (
|
|
40389
|
-
return
|
|
40919
|
+
className2 = extract(item.constructor !== null ? item.constructor.toString() : void 0,);
|
|
40920
|
+
if (className2) {
|
|
40921
|
+
return className2.replace('Constructor', '',);
|
|
40390
40922
|
}
|
|
40391
40923
|
}
|
|
40392
40924
|
return 'Object';
|
|
@@ -40526,7 +41058,7 @@ var package_default = {
|
|
|
40526
41058
|
yargs: '^17.6.2',
|
|
40527
41059
|
},
|
|
40528
41060
|
peerDependencies: {
|
|
40529
|
-
'framer-motion': '11.2.
|
|
41061
|
+
'framer-motion': '11.2.10',
|
|
40530
41062
|
react: '^18.2.0',
|
|
40531
41063
|
'react-dom': '^18.2.0',
|
|
40532
41064
|
},
|
|
@@ -40668,6 +41200,7 @@ export {
|
|
|
40668
41200
|
FontSourceNames,
|
|
40669
41201
|
fontStore,
|
|
40670
41202
|
forceLayerBackingWithCSSProperties,
|
|
41203
|
+
FormBooleanInput,
|
|
40671
41204
|
FormContainer,
|
|
40672
41205
|
FormPlainTextInput2 as FormPlainTextInput,
|
|
40673
41206
|
FormSelect,
|
|
@@ -40786,6 +41319,7 @@ export {
|
|
|
40786
41319
|
PropertyOverrides,
|
|
40787
41320
|
PropertyStore,
|
|
40788
41321
|
propsForLink,
|
|
41322
|
+
pushLoadMoreHistory,
|
|
40789
41323
|
px,
|
|
40790
41324
|
QueryEngine,
|
|
40791
41325
|
RadialGradient,
|
|
@@ -40843,7 +41377,6 @@ export {
|
|
|
40843
41377
|
useAnimationControls,
|
|
40844
41378
|
useAnimationFrame,
|
|
40845
41379
|
useBreakpointVariants,
|
|
40846
|
-
useCollectionListPaginationInfo,
|
|
40847
41380
|
useComponentViewport,
|
|
40848
41381
|
useConstant2 as useConstant,
|
|
40849
41382
|
useCurrentPathVariables,
|
|
@@ -40921,6 +41454,7 @@ export {
|
|
|
40921
41454
|
withCSS,
|
|
40922
41455
|
withFX,
|
|
40923
41456
|
withGeneratedLayoutId,
|
|
41457
|
+
withInfiniteScroll,
|
|
40924
41458
|
withMappedReactProps,
|
|
40925
41459
|
withMeasuredSize,
|
|
40926
41460
|
WithNavigator,
|
|
@@ -40972,7 +41506,7 @@ react-is/cjs/react-is.production.min.js:
|
|
|
40972
41506
|
*/
|
|
40973
41507
|
if (typeof document !== 'undefined') {
|
|
40974
41508
|
for (const node of document.querySelectorAll(
|
|
40975
|
-
'style[data-framer-css-ssr]',
|
|
41509
|
+
'body style[data-framer-css-ssr]',
|
|
40976
41510
|
)) {
|
|
40977
41511
|
document.head.appendChild(node)
|
|
40978
41512
|
}
|