@syntrologie/runtime-sdk 2.0.1-canary.4 → 2.1.0-canary.1
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/CAPABILITIES.md +13 -21
- package/dist/actions/executors/index.d.ts +2 -3
- package/dist/actions/executors/index.js +4 -9
- package/dist/actions/executors/index.js.map +1 -1
- package/dist/apps/AppLoader.d.ts +1 -0
- package/dist/apps/AppLoader.js +19 -7
- package/dist/apps/AppLoader.js.map +1 -1
- package/dist/apps/index.d.ts +2 -3
- package/dist/apps/index.js +2 -3
- package/dist/apps/index.js.map +1 -1
- package/dist/apps/nav/index.js +6 -6
- package/dist/apps/nav/index.js.map +3 -3
- package/dist/bootstrap.d.ts +1 -1
- package/dist/bootstrap.js +1 -1
- package/dist/bootstrap.js.map +1 -1
- package/dist/config-validator.d.ts +49 -0
- package/dist/config-validator.js +173 -0
- package/dist/config-validator.js.map +1 -0
- package/dist/configFetcher.js +9 -1
- package/dist/configFetcher.js.map +1 -1
- package/dist/events/schema.d.ts +4 -4
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/smart-canvas.esm.js +23 -23
- package/dist/smart-canvas.esm.js.map +4 -4
- package/dist/smart-canvas.js +384 -893
- package/dist/smart-canvas.js.map +4 -4
- package/dist/smart-canvas.min.js +23 -23
- package/dist/smart-canvas.min.js.map +4 -4
- package/dist/types.d.ts +21 -0
- package/dist/types.js +15 -2
- package/dist/types.js.map +1 -1
- package/dist/version.d.ts +13 -0
- package/dist/version.js +14 -0
- package/dist/version.js.map +1 -0
- package/package.json +8 -5
package/dist/smart-canvas.js
CHANGED
|
@@ -9351,17 +9351,17 @@ var SyntrologieSDK = (() => {
|
|
|
9351
9351
|
node = node.parentNode;
|
|
9352
9352
|
}
|
|
9353
9353
|
}
|
|
9354
|
-
function getNodeForCharacterOffset(root2,
|
|
9354
|
+
function getNodeForCharacterOffset(root2, offset3) {
|
|
9355
9355
|
var node = getLeafNode(root2);
|
|
9356
9356
|
var nodeStart = 0;
|
|
9357
9357
|
var nodeEnd = 0;
|
|
9358
9358
|
while (node) {
|
|
9359
9359
|
if (node.nodeType === TEXT_NODE) {
|
|
9360
9360
|
nodeEnd = nodeStart + node.textContent.length;
|
|
9361
|
-
if (nodeStart <=
|
|
9361
|
+
if (nodeStart <= offset3 && nodeEnd >= offset3) {
|
|
9362
9362
|
return {
|
|
9363
9363
|
node,
|
|
9364
|
-
offset:
|
|
9364
|
+
offset: offset3 - nodeStart
|
|
9365
9365
|
};
|
|
9366
9366
|
}
|
|
9367
9367
|
nodeStart = nodeEnd;
|
|
@@ -24539,6 +24539,8 @@ var SyntrologieSDK = (() => {
|
|
|
24539
24539
|
RuleZ: () => RuleZ,
|
|
24540
24540
|
RuntimeContextZ: () => RuntimeContextZ,
|
|
24541
24541
|
RuntimeProvider: () => RuntimeProvider,
|
|
24542
|
+
SDK_SCHEMA_VERSION: () => SDK_SCHEMA_VERSION,
|
|
24543
|
+
SDK_VERSION: () => SDK_VERSION,
|
|
24542
24544
|
STATIC_SLOT_STYLES: () => STATIC_SLOT_STYLES,
|
|
24543
24545
|
ScoreStrategyZ: () => ScoreStrategyZ,
|
|
24544
24546
|
SelectorZ: () => SelectorZ,
|
|
@@ -24602,9 +24604,10 @@ var SyntrologieSDK = (() => {
|
|
|
24602
24604
|
getSlotZIndex: () => getSlotZIndex,
|
|
24603
24605
|
hasExecutor: () => hasExecutor,
|
|
24604
24606
|
isCoreActionKind: () => isCoreActionKind,
|
|
24605
|
-
|
|
24607
|
+
needsMigration: () => needsMigration,
|
|
24606
24608
|
normalizePostHogEvent: () => normalizePostHogEvent,
|
|
24607
24609
|
overlaysRuntime: () => runtime2,
|
|
24610
|
+
parseVersion: () => parseVersion,
|
|
24608
24611
|
playEnterAnimation: () => playEnterAnimation,
|
|
24609
24612
|
playExitAnimation: () => playExitAnimation,
|
|
24610
24613
|
registerSmartCanvasElement: () => registerSmartCanvasElement,
|
|
@@ -24625,6 +24628,7 @@ var SyntrologieSDK = (() => {
|
|
|
24625
24628
|
validateActions: () => validateActions,
|
|
24626
24629
|
validateActivationConfig: () => validateActivationConfig,
|
|
24627
24630
|
validateCondition: () => validateCondition,
|
|
24631
|
+
validateConfig: () => validateConfig,
|
|
24628
24632
|
validateEventFilter: () => validateEventFilter,
|
|
24629
24633
|
validateFrequencyEntry: () => validateFrequencyEntry,
|
|
24630
24634
|
validateNormalizedEvent: () => validateNormalizedEvent,
|
|
@@ -24635,6 +24639,122 @@ var SyntrologieSDK = (() => {
|
|
|
24635
24639
|
widgetRegistry: () => widgetRegistry
|
|
24636
24640
|
});
|
|
24637
24641
|
|
|
24642
|
+
// src/version.ts
|
|
24643
|
+
var SDK_VERSION = "2.1.0-canary.1";
|
|
24644
|
+
|
|
24645
|
+
// src/types.ts
|
|
24646
|
+
var SDK_SCHEMA_VERSION = "2.0";
|
|
24647
|
+
|
|
24648
|
+
// src/config-validator.ts
|
|
24649
|
+
function parseVersion(version) {
|
|
24650
|
+
const parts = version.split(".");
|
|
24651
|
+
return {
|
|
24652
|
+
major: parseInt(parts[0] || "0", 10),
|
|
24653
|
+
minor: parseInt(parts[1] || "0", 10)
|
|
24654
|
+
};
|
|
24655
|
+
}
|
|
24656
|
+
function validateConfig(config) {
|
|
24657
|
+
const warnings = [];
|
|
24658
|
+
const errors = [];
|
|
24659
|
+
if (!config || typeof config !== "object") {
|
|
24660
|
+
return {
|
|
24661
|
+
valid: false,
|
|
24662
|
+
errors: ["Config must be an object"],
|
|
24663
|
+
warnings
|
|
24664
|
+
};
|
|
24665
|
+
}
|
|
24666
|
+
const typedConfig = config;
|
|
24667
|
+
if (!typedConfig.tiles) {
|
|
24668
|
+
errors.push("Config missing required field: tiles");
|
|
24669
|
+
}
|
|
24670
|
+
if (!typedConfig.actions) {
|
|
24671
|
+
errors.push("Config missing required field: actions");
|
|
24672
|
+
}
|
|
24673
|
+
if (!typedConfig.fetchedAt) {
|
|
24674
|
+
errors.push("Config missing required field: fetchedAt");
|
|
24675
|
+
}
|
|
24676
|
+
if (errors.length > 0) {
|
|
24677
|
+
return { valid: false, errors, warnings };
|
|
24678
|
+
}
|
|
24679
|
+
const configVersion = typedConfig.schemaVersion || "1.0";
|
|
24680
|
+
const configVer = parseVersion(configVersion);
|
|
24681
|
+
const sdkVer = parseVersion(SDK_SCHEMA_VERSION);
|
|
24682
|
+
if (configVer.major > sdkVer.major) {
|
|
24683
|
+
warnings.push(
|
|
24684
|
+
`Config schema v${configVersion} is newer than SDK v${SDK_SCHEMA_VERSION}. Some features may not work. Update SDK to latest version.`
|
|
24685
|
+
);
|
|
24686
|
+
}
|
|
24687
|
+
if (configVer.major < sdkVer.major || !typedConfig.schemaVersion) {
|
|
24688
|
+
warnings.push(
|
|
24689
|
+
`Config schema v${configVersion} is older than SDK v${SDK_SCHEMA_VERSION}. Migrating config to current version.`
|
|
24690
|
+
);
|
|
24691
|
+
return {
|
|
24692
|
+
valid: true,
|
|
24693
|
+
warnings,
|
|
24694
|
+
errors,
|
|
24695
|
+
migratedConfig: migrateConfig(typedConfig, configVersion)
|
|
24696
|
+
};
|
|
24697
|
+
}
|
|
24698
|
+
return {
|
|
24699
|
+
valid: true,
|
|
24700
|
+
warnings,
|
|
24701
|
+
errors
|
|
24702
|
+
};
|
|
24703
|
+
}
|
|
24704
|
+
function migrateConfig(config, fromVersion) {
|
|
24705
|
+
let migrated = { ...config };
|
|
24706
|
+
const fromVer = parseVersion(fromVersion);
|
|
24707
|
+
if (fromVer.major === 1) {
|
|
24708
|
+
migrated = migrateV1ToV2(migrated);
|
|
24709
|
+
}
|
|
24710
|
+
migrated.schemaVersion = SDK_SCHEMA_VERSION;
|
|
24711
|
+
return migrated;
|
|
24712
|
+
}
|
|
24713
|
+
function migrateV1ToV2(config) {
|
|
24714
|
+
const migrated = {
|
|
24715
|
+
schemaVersion: "2.0",
|
|
24716
|
+
tiles: [],
|
|
24717
|
+
actions: config.actions || [],
|
|
24718
|
+
fetchedAt: config.fetchedAt || (/* @__PURE__ */ new Date()).toISOString()
|
|
24719
|
+
};
|
|
24720
|
+
if (config.tiles && Array.isArray(config.tiles)) {
|
|
24721
|
+
migrated.tiles = config.tiles.map((tile) => {
|
|
24722
|
+
const migratedTile = { ...tile };
|
|
24723
|
+
if (tile.experiment && !tile.activation) {
|
|
24724
|
+
const exp = tile.experiment;
|
|
24725
|
+
if (exp.featureKey) {
|
|
24726
|
+
migratedTile.activation = {
|
|
24727
|
+
strategy: {
|
|
24728
|
+
type: "external",
|
|
24729
|
+
provider: "growthbook",
|
|
24730
|
+
featureKey: exp.featureKey,
|
|
24731
|
+
fallback: false
|
|
24732
|
+
}
|
|
24733
|
+
};
|
|
24734
|
+
}
|
|
24735
|
+
delete migratedTile.experiment;
|
|
24736
|
+
}
|
|
24737
|
+
return migratedTile;
|
|
24738
|
+
});
|
|
24739
|
+
}
|
|
24740
|
+
if (config.configVersion) migrated.configVersion = config.configVersion;
|
|
24741
|
+
if (config.canvasTitle) migrated.canvasTitle = config.canvasTitle;
|
|
24742
|
+
if (config.theme) migrated.theme = config.theme;
|
|
24743
|
+
if (config.launcher) migrated.launcher = config.launcher;
|
|
24744
|
+
if (config.routes) migrated.routes = config.routes;
|
|
24745
|
+
return migrated;
|
|
24746
|
+
}
|
|
24747
|
+
function needsMigration(config) {
|
|
24748
|
+
if (!config || typeof config !== "object") {
|
|
24749
|
+
return false;
|
|
24750
|
+
}
|
|
24751
|
+
const typedConfig = config;
|
|
24752
|
+
const configVersion = typedConfig.schemaVersion || "1.0";
|
|
24753
|
+
const configVer = parseVersion(configVersion);
|
|
24754
|
+
const sdkVer = parseVersion(SDK_SCHEMA_VERSION);
|
|
24755
|
+
return configVer.major < sdkVer.major || !typedConfig.schemaVersion;
|
|
24756
|
+
}
|
|
24757
|
+
|
|
24638
24758
|
// ../../node_modules/posthog-js/dist/module.js
|
|
24639
24759
|
var t = "undefined" != typeof window ? window : void 0;
|
|
24640
24760
|
var i = "undefined" != typeof globalThis ? globalThis : t;
|
|
@@ -29568,7 +29688,7 @@ var SyntrologieSDK = (() => {
|
|
|
29568
29688
|
function loadSDKVersion() {
|
|
29569
29689
|
let version;
|
|
29570
29690
|
try {
|
|
29571
|
-
version = "1.6.
|
|
29691
|
+
version = "1.6.4";
|
|
29572
29692
|
} catch (e2) {
|
|
29573
29693
|
version = "";
|
|
29574
29694
|
}
|
|
@@ -30500,8 +30620,11 @@ var SyntrologieSDK = (() => {
|
|
|
30500
30620
|
}
|
|
30501
30621
|
return _regexCache[cacheKey];
|
|
30502
30622
|
}
|
|
30503
|
-
function evalConditionValue(condition, value, savedGroups) {
|
|
30623
|
+
function evalConditionValue(condition, value, savedGroups, insensitive = false) {
|
|
30504
30624
|
if (typeof condition === "string") {
|
|
30625
|
+
if (insensitive) {
|
|
30626
|
+
return String(value).toLowerCase() === condition.toLowerCase();
|
|
30627
|
+
}
|
|
30505
30628
|
return value + "" === condition;
|
|
30506
30629
|
}
|
|
30507
30630
|
if (typeof condition === "number") {
|
|
@@ -30546,12 +30669,33 @@ var SyntrologieSDK = (() => {
|
|
|
30546
30669
|
}
|
|
30547
30670
|
return false;
|
|
30548
30671
|
}
|
|
30549
|
-
function isIn(actual, expected) {
|
|
30672
|
+
function isIn(actual, expected, insensitive = false) {
|
|
30673
|
+
if (insensitive) {
|
|
30674
|
+
const caseFold = (val) => typeof val === "string" ? val.toLowerCase() : val;
|
|
30675
|
+
if (Array.isArray(actual)) {
|
|
30676
|
+
return actual.some((el) => expected.some((exp) => caseFold(el) === caseFold(exp)));
|
|
30677
|
+
}
|
|
30678
|
+
return expected.some((exp) => caseFold(actual) === caseFold(exp));
|
|
30679
|
+
}
|
|
30550
30680
|
if (Array.isArray(actual)) {
|
|
30551
30681
|
return actual.some((el) => expected.includes(el));
|
|
30552
30682
|
}
|
|
30553
30683
|
return expected.includes(actual);
|
|
30554
30684
|
}
|
|
30685
|
+
function isInAll(actual, expected, savedGroups, insensitive = false) {
|
|
30686
|
+
if (!Array.isArray(actual)) return false;
|
|
30687
|
+
for (let i2 = 0; i2 < expected.length; i2++) {
|
|
30688
|
+
let passed = false;
|
|
30689
|
+
for (let j2 = 0; j2 < actual.length; j2++) {
|
|
30690
|
+
if (evalConditionValue(expected[i2], actual[j2], savedGroups, insensitive)) {
|
|
30691
|
+
passed = true;
|
|
30692
|
+
break;
|
|
30693
|
+
}
|
|
30694
|
+
}
|
|
30695
|
+
if (!passed) return false;
|
|
30696
|
+
}
|
|
30697
|
+
return true;
|
|
30698
|
+
}
|
|
30555
30699
|
function evalOperatorCondition(operator, actual, expected, savedGroups) {
|
|
30556
30700
|
switch (operator) {
|
|
30557
30701
|
case "$veq":
|
|
@@ -30583,6 +30727,9 @@ var SyntrologieSDK = (() => {
|
|
|
30583
30727
|
case "$in":
|
|
30584
30728
|
if (!Array.isArray(expected)) return false;
|
|
30585
30729
|
return isIn(actual, expected);
|
|
30730
|
+
case "$ini":
|
|
30731
|
+
if (!Array.isArray(expected)) return false;
|
|
30732
|
+
return isIn(actual, expected, true);
|
|
30586
30733
|
case "$inGroup":
|
|
30587
30734
|
return isIn(actual, savedGroups[expected] || []);
|
|
30588
30735
|
case "$notInGroup":
|
|
@@ -30590,6 +30737,9 @@ var SyntrologieSDK = (() => {
|
|
|
30590
30737
|
case "$nin":
|
|
30591
30738
|
if (!Array.isArray(expected)) return false;
|
|
30592
30739
|
return !isIn(actual, expected);
|
|
30740
|
+
case "$nini":
|
|
30741
|
+
if (!Array.isArray(expected)) return false;
|
|
30742
|
+
return !isIn(actual, expected, true);
|
|
30593
30743
|
case "$not":
|
|
30594
30744
|
return !evalConditionValue(expected, actual, savedGroups);
|
|
30595
30745
|
case "$size":
|
|
@@ -30598,18 +30748,11 @@ var SyntrologieSDK = (() => {
|
|
|
30598
30748
|
case "$elemMatch":
|
|
30599
30749
|
return elemMatch(actual, expected, savedGroups);
|
|
30600
30750
|
case "$all":
|
|
30601
|
-
if (!Array.isArray(
|
|
30602
|
-
|
|
30603
|
-
|
|
30604
|
-
|
|
30605
|
-
|
|
30606
|
-
passed = true;
|
|
30607
|
-
break;
|
|
30608
|
-
}
|
|
30609
|
-
}
|
|
30610
|
-
if (!passed) return false;
|
|
30611
|
-
}
|
|
30612
|
-
return true;
|
|
30751
|
+
if (!Array.isArray(expected)) return false;
|
|
30752
|
+
return isInAll(actual, expected, savedGroups);
|
|
30753
|
+
case "$alli":
|
|
30754
|
+
if (!Array.isArray(expected)) return false;
|
|
30755
|
+
return isInAll(actual, expected, savedGroups, true);
|
|
30613
30756
|
case "$regex":
|
|
30614
30757
|
try {
|
|
30615
30758
|
return getRegex(expected).test(actual);
|
|
@@ -31431,13 +31574,13 @@ var SyntrologieSDK = (() => {
|
|
|
31431
31574
|
|
|
31432
31575
|
// ../../node_modules/@growthbook/growthbook/dist/esm/GrowthBook.mjs
|
|
31433
31576
|
var isBrowser = typeof window !== "undefined" && typeof document !== "undefined";
|
|
31434
|
-
var
|
|
31577
|
+
var SDK_VERSION2 = loadSDKVersion();
|
|
31435
31578
|
var GrowthBook = class {
|
|
31436
31579
|
// context is technically private, but some tools depend on it so we can't mangle the name
|
|
31437
31580
|
// Properties and methods that start with "_" are mangled by Terser (saves ~150 bytes)
|
|
31438
31581
|
constructor(options) {
|
|
31439
31582
|
options = options || {};
|
|
31440
|
-
this.version =
|
|
31583
|
+
this.version = SDK_VERSION2;
|
|
31441
31584
|
this._options = this.context = options;
|
|
31442
31585
|
this._renderer = options.renderer || null;
|
|
31443
31586
|
this._trackedExperiments = /* @__PURE__ */ new Set();
|
|
@@ -32325,7 +32468,7 @@ var SyntrologieSDK = (() => {
|
|
|
32325
32468
|
fetcher,
|
|
32326
32469
|
pollIntervalMs = 3e4,
|
|
32327
32470
|
experiments,
|
|
32328
|
-
runtime:
|
|
32471
|
+
runtime: runtime3
|
|
32329
32472
|
}) {
|
|
32330
32473
|
const [state, setState] = (0, import_react.useState)({
|
|
32331
32474
|
tiles: [],
|
|
@@ -32338,11 +32481,11 @@ var SyntrologieSDK = (() => {
|
|
|
32338
32481
|
const response = await fetcher();
|
|
32339
32482
|
debug("SmartCanvas Config", "Raw config response", response);
|
|
32340
32483
|
let tiles = response.tiles || [];
|
|
32341
|
-
if (
|
|
32342
|
-
|
|
32484
|
+
if (runtime3 && response.routes) {
|
|
32485
|
+
runtime3.setRoutes(response.routes);
|
|
32343
32486
|
}
|
|
32344
|
-
if (
|
|
32345
|
-
tiles = await
|
|
32487
|
+
if (runtime3) {
|
|
32488
|
+
tiles = await runtime3.filterTiles(tiles);
|
|
32346
32489
|
if (experiments) {
|
|
32347
32490
|
tiles = tiles.filter((tile) => experiments.shouldRenderRectangle(tile));
|
|
32348
32491
|
}
|
|
@@ -32368,7 +32511,7 @@ var SyntrologieSDK = (() => {
|
|
|
32368
32511
|
error: err instanceof Error ? err.message : "Unknown error"
|
|
32369
32512
|
}));
|
|
32370
32513
|
}
|
|
32371
|
-
}, [experiments, fetcher,
|
|
32514
|
+
}, [experiments, fetcher, runtime3]);
|
|
32372
32515
|
(0, import_react.useEffect)(() => {
|
|
32373
32516
|
load();
|
|
32374
32517
|
if (!pollIntervalMs) return;
|
|
@@ -33371,24 +33514,24 @@ var SyntrologieSDK = (() => {
|
|
|
33371
33514
|
runtime: null,
|
|
33372
33515
|
context: null
|
|
33373
33516
|
});
|
|
33374
|
-
function RuntimeProvider({ runtime:
|
|
33517
|
+
function RuntimeProvider({ runtime: runtime3, children }) {
|
|
33375
33518
|
const [context, setContext] = (0, import_react5.useState)(
|
|
33376
|
-
|
|
33519
|
+
runtime3 ? runtime3.context.get() : null
|
|
33377
33520
|
);
|
|
33378
33521
|
(0, import_react5.useEffect)(() => {
|
|
33379
|
-
if (!
|
|
33380
|
-
setContext(
|
|
33381
|
-
const unsubscribe2 =
|
|
33522
|
+
if (!runtime3) return;
|
|
33523
|
+
setContext(runtime3.context.get());
|
|
33524
|
+
const unsubscribe2 = runtime3.context.subscribe((ctx) => {
|
|
33382
33525
|
setContext(ctx);
|
|
33383
33526
|
});
|
|
33384
33527
|
return unsubscribe2;
|
|
33385
|
-
}, [
|
|
33386
|
-
const value = (0, import_react5.useMemo)(() => ({ runtime:
|
|
33528
|
+
}, [runtime3]);
|
|
33529
|
+
const value = (0, import_react5.useMemo)(() => ({ runtime: runtime3, context }), [runtime3, context]);
|
|
33387
33530
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(RuntimeReactContext.Provider, { value, children });
|
|
33388
33531
|
}
|
|
33389
33532
|
function useRuntime() {
|
|
33390
|
-
const { runtime:
|
|
33391
|
-
return
|
|
33533
|
+
const { runtime: runtime3 } = (0, import_react5.useContext)(RuntimeReactContext);
|
|
33534
|
+
return runtime3;
|
|
33392
33535
|
}
|
|
33393
33536
|
function useRuntimeContext() {
|
|
33394
33537
|
const { context } = (0, import_react5.useContext)(RuntimeReactContext);
|
|
@@ -33407,31 +33550,31 @@ var SyntrologieSDK = (() => {
|
|
|
33407
33550
|
return context?.viewport ?? null;
|
|
33408
33551
|
}
|
|
33409
33552
|
function useRuntimeEvents(filter, callback, deps = []) {
|
|
33410
|
-
const
|
|
33553
|
+
const runtime3 = useRuntime();
|
|
33411
33554
|
(0, import_react5.useEffect)(() => {
|
|
33412
|
-
if (!
|
|
33413
|
-
const unsubscribe2 = filter ?
|
|
33555
|
+
if (!runtime3) return;
|
|
33556
|
+
const unsubscribe2 = filter ? runtime3.events.subscribe(filter, callback) : runtime3.events.subscribe(callback);
|
|
33414
33557
|
return unsubscribe2;
|
|
33415
|
-
}, [
|
|
33558
|
+
}, [runtime3, ...deps]);
|
|
33416
33559
|
}
|
|
33417
33560
|
function useRuntimeState() {
|
|
33418
|
-
const
|
|
33419
|
-
return
|
|
33561
|
+
const runtime3 = useRuntime();
|
|
33562
|
+
return runtime3?.state ?? null;
|
|
33420
33563
|
}
|
|
33421
33564
|
function useDecision(strategy, defaultValue) {
|
|
33422
|
-
const
|
|
33565
|
+
const runtime3 = useRuntime();
|
|
33423
33566
|
const [result, setResult] = (0, import_react5.useState)({
|
|
33424
33567
|
value: defaultValue,
|
|
33425
33568
|
isFallback: true,
|
|
33426
33569
|
isLoading: true
|
|
33427
33570
|
});
|
|
33428
33571
|
(0, import_react5.useEffect)(() => {
|
|
33429
|
-
if (!
|
|
33572
|
+
if (!runtime3 || !strategy) {
|
|
33430
33573
|
setResult({ value: defaultValue, isFallback: true, isLoading: false });
|
|
33431
33574
|
return;
|
|
33432
33575
|
}
|
|
33433
33576
|
let cancelled = false;
|
|
33434
|
-
|
|
33577
|
+
runtime3.evaluate(strategy).then((res) => {
|
|
33435
33578
|
if (!cancelled) {
|
|
33436
33579
|
setResult({ value: res.value, isFallback: res.isFallback, isLoading: false });
|
|
33437
33580
|
}
|
|
@@ -33439,7 +33582,7 @@ var SyntrologieSDK = (() => {
|
|
|
33439
33582
|
return () => {
|
|
33440
33583
|
cancelled = true;
|
|
33441
33584
|
};
|
|
33442
|
-
}, [
|
|
33585
|
+
}, [runtime3, strategy, defaultValue]);
|
|
33443
33586
|
return result;
|
|
33444
33587
|
}
|
|
33445
33588
|
|
|
@@ -33564,7 +33707,7 @@ var SyntrologieSDK = (() => {
|
|
|
33564
33707
|
{ author: "Lumi", text: "Hi! Need clarity on a deduction?" }
|
|
33565
33708
|
]);
|
|
33566
33709
|
const [input, setInput] = (0, import_react6.useState)("");
|
|
33567
|
-
const
|
|
33710
|
+
const runtime3 = useRuntime();
|
|
33568
33711
|
const handleSubmit = (event) => {
|
|
33569
33712
|
event.preventDefault();
|
|
33570
33713
|
if (!input.trim()) return;
|
|
@@ -33579,9 +33722,9 @@ var SyntrologieSDK = (() => {
|
|
|
33579
33722
|
]);
|
|
33580
33723
|
}, 600);
|
|
33581
33724
|
telemetry?.trackAction("chatbot_message", config.id, surface);
|
|
33582
|
-
if (
|
|
33725
|
+
if (runtime3) {
|
|
33583
33726
|
const event2 = CanvasEvents.tileAction(config.id, "chatbot_message", surface);
|
|
33584
|
-
|
|
33727
|
+
runtime3.events.publish(event2.name, event2.props, event2.source);
|
|
33585
33728
|
}
|
|
33586
33729
|
setInput("");
|
|
33587
33730
|
};
|
|
@@ -33652,7 +33795,7 @@ var SyntrologieSDK = (() => {
|
|
|
33652
33795
|
surface,
|
|
33653
33796
|
telemetry,
|
|
33654
33797
|
isExpanded,
|
|
33655
|
-
runtime:
|
|
33798
|
+
runtime: runtime3
|
|
33656
33799
|
}) {
|
|
33657
33800
|
const containerRef = (0, import_react6.useRef)(null);
|
|
33658
33801
|
(0, import_react6.useEffect)(() => {
|
|
@@ -33662,12 +33805,12 @@ var SyntrologieSDK = (() => {
|
|
|
33662
33805
|
surface,
|
|
33663
33806
|
telemetry,
|
|
33664
33807
|
isExpanded,
|
|
33665
|
-
runtime:
|
|
33808
|
+
runtime: runtime3
|
|
33666
33809
|
});
|
|
33667
33810
|
return () => {
|
|
33668
33811
|
if (cleanup) cleanup();
|
|
33669
33812
|
};
|
|
33670
|
-
}, [renderer, config, surface, telemetry, isExpanded,
|
|
33813
|
+
}, [renderer, config, surface, telemetry, isExpanded, runtime3]);
|
|
33671
33814
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { ref: containerRef, style: { width: "100%", height: "100%" } });
|
|
33672
33815
|
}
|
|
33673
33816
|
function TileCard({
|
|
@@ -33680,16 +33823,16 @@ var SyntrologieSDK = (() => {
|
|
|
33680
33823
|
onToggleExpand
|
|
33681
33824
|
}) {
|
|
33682
33825
|
const { title, subtitle, content, style: configStyle } = config;
|
|
33683
|
-
const
|
|
33826
|
+
const runtime3 = useRuntime();
|
|
33684
33827
|
const trackAction = (0, import_react6.useCallback)(
|
|
33685
33828
|
(actionId) => {
|
|
33686
33829
|
telemetry?.trackAction(actionId, config.id, surface);
|
|
33687
|
-
if (
|
|
33830
|
+
if (runtime3) {
|
|
33688
33831
|
const event = CanvasEvents.tileAction(config.id, actionId, surface);
|
|
33689
|
-
|
|
33832
|
+
runtime3.events.publish(event.name, event.props, event.source);
|
|
33690
33833
|
}
|
|
33691
33834
|
},
|
|
33692
|
-
[telemetry,
|
|
33835
|
+
[telemetry, runtime3, config.id, surface]
|
|
33693
33836
|
);
|
|
33694
33837
|
const accentColor = configStyle?.accentColor ?? "#6366f1";
|
|
33695
33838
|
const collapsedHeight = "72px";
|
|
@@ -33845,7 +33988,7 @@ var SyntrologieSDK = (() => {
|
|
|
33845
33988
|
surface,
|
|
33846
33989
|
telemetry,
|
|
33847
33990
|
isExpanded,
|
|
33848
|
-
runtime:
|
|
33991
|
+
runtime: runtime3
|
|
33849
33992
|
}
|
|
33850
33993
|
);
|
|
33851
33994
|
}
|
|
@@ -34089,29 +34232,29 @@ var SyntrologieSDK = (() => {
|
|
|
34089
34232
|
}) {
|
|
34090
34233
|
const [mounted, setMounted] = (0, import_react7.useState)(false);
|
|
34091
34234
|
const [expandedId, setExpandedId] = (0, import_react7.useState)(null);
|
|
34092
|
-
const
|
|
34235
|
+
const runtime3 = useRuntime();
|
|
34093
34236
|
const theme = { ...DEFAULT_THEME, ...themeOverride };
|
|
34094
34237
|
const handleTileClick = (0, import_react7.useCallback)(
|
|
34095
34238
|
(id) => {
|
|
34096
34239
|
const wasExpanded = expandedId === id;
|
|
34097
34240
|
setExpandedId(wasExpanded ? null : id);
|
|
34098
|
-
if (
|
|
34241
|
+
if (runtime3) {
|
|
34099
34242
|
const event = wasExpanded ? CanvasEvents.tileCollapsed(id, "overlay") : CanvasEvents.tileExpanded(id, "overlay");
|
|
34100
|
-
|
|
34243
|
+
runtime3.events.publish(event.name, event.props, event.source);
|
|
34101
34244
|
}
|
|
34102
34245
|
},
|
|
34103
|
-
[expandedId,
|
|
34246
|
+
[expandedId, runtime3]
|
|
34104
34247
|
);
|
|
34105
34248
|
(0, import_react7.useEffect)(() => {
|
|
34106
34249
|
if (!isOpen) return;
|
|
34107
34250
|
tiles.forEach((tile) => {
|
|
34108
34251
|
telemetry?.trackRectangleViewed(tile.id, "overlay");
|
|
34109
|
-
if (
|
|
34252
|
+
if (runtime3) {
|
|
34110
34253
|
const event = CanvasEvents.tileViewed(tile.id, "overlay");
|
|
34111
|
-
|
|
34254
|
+
runtime3.events.publish(event.name, event.props, event.source);
|
|
34112
34255
|
}
|
|
34113
34256
|
});
|
|
34114
|
-
}, [telemetry,
|
|
34257
|
+
}, [telemetry, runtime3, isOpen, tiles]);
|
|
34115
34258
|
(0, import_react7.useEffect)(() => {
|
|
34116
34259
|
setMounted(true);
|
|
34117
34260
|
ensureLauncherStyles();
|
|
@@ -34123,12 +34266,12 @@ var SyntrologieSDK = (() => {
|
|
|
34123
34266
|
} else {
|
|
34124
34267
|
telemetry?.trackCanvasClosed("overlay");
|
|
34125
34268
|
}
|
|
34126
|
-
if (
|
|
34269
|
+
if (runtime3) {
|
|
34127
34270
|
const event = next ? CanvasEvents.canvasOpened("overlay") : CanvasEvents.canvasClosed("overlay");
|
|
34128
|
-
|
|
34271
|
+
runtime3.events.publish(event.name, event.props, event.source);
|
|
34129
34272
|
}
|
|
34130
34273
|
onToggle();
|
|
34131
|
-
}, [isOpen, telemetry,
|
|
34274
|
+
}, [isOpen, telemetry, runtime3, onToggle]);
|
|
34132
34275
|
const isFocused = displayMode === "focused";
|
|
34133
34276
|
const isRight = theme.position === "right";
|
|
34134
34277
|
const bgColor = theme.colorBackground || "#1c1c1e";
|
|
@@ -34535,7 +34678,13 @@ var SyntrologieSDK = (() => {
|
|
|
34535
34678
|
throw new Error(`SmartCanvas: config URI not allowed: ${uri}`);
|
|
34536
34679
|
}
|
|
34537
34680
|
const effectiveCredentials = credentials ?? (isSameOrigin(uri) ? "include" : "omit");
|
|
34538
|
-
const response = await fetch(uri, {
|
|
34681
|
+
const response = await fetch(uri, {
|
|
34682
|
+
credentials: effectiveCredentials,
|
|
34683
|
+
headers: {
|
|
34684
|
+
"X-SDK-Version": SDK_VERSION,
|
|
34685
|
+
"X-SDK-Schema-Version": SDK_SCHEMA_VERSION
|
|
34686
|
+
}
|
|
34687
|
+
});
|
|
34539
34688
|
if (!response.ok) {
|
|
34540
34689
|
throw new Error(`SmartCanvas: failed to fetch config (${response.status})`);
|
|
34541
34690
|
}
|
|
@@ -34574,7 +34723,7 @@ var SyntrologieSDK = (() => {
|
|
|
34574
34723
|
pollIntervalMs,
|
|
34575
34724
|
experiments,
|
|
34576
34725
|
telemetry,
|
|
34577
|
-
runtime:
|
|
34726
|
+
runtime: runtime3,
|
|
34578
34727
|
overlayFetcher,
|
|
34579
34728
|
overlayConfigUri,
|
|
34580
34729
|
overlayConfigFeatureKey = "smart-canvas-overlay-uri",
|
|
@@ -34585,8 +34734,8 @@ var SyntrologieSDK = (() => {
|
|
|
34585
34734
|
customRenderers,
|
|
34586
34735
|
theme
|
|
34587
34736
|
}) {
|
|
34588
|
-
if (
|
|
34589
|
-
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(RuntimeProvider, { runtime:
|
|
34737
|
+
if (runtime3) {
|
|
34738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(RuntimeProvider, { runtime: runtime3, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
34590
34739
|
SmartCanvasAppInner,
|
|
34591
34740
|
{
|
|
34592
34741
|
controller,
|
|
@@ -34598,7 +34747,7 @@ var SyntrologieSDK = (() => {
|
|
|
34598
34747
|
pollIntervalMs,
|
|
34599
34748
|
experiments,
|
|
34600
34749
|
telemetry,
|
|
34601
|
-
runtime:
|
|
34750
|
+
runtime: runtime3,
|
|
34602
34751
|
overlayFetcher,
|
|
34603
34752
|
overlayConfigUri,
|
|
34604
34753
|
overlayConfigFeatureKey,
|
|
@@ -34645,7 +34794,7 @@ var SyntrologieSDK = (() => {
|
|
|
34645
34794
|
pollIntervalMs,
|
|
34646
34795
|
experiments,
|
|
34647
34796
|
telemetry,
|
|
34648
|
-
runtime:
|
|
34797
|
+
runtime: runtime3,
|
|
34649
34798
|
overlayFetcher: _overlayFetcher,
|
|
34650
34799
|
overlayConfigUri: _overlayConfigUri,
|
|
34651
34800
|
overlayConfigFeatureKey: _overlayConfigFeatureKey = "smart-canvas-overlay-uri",
|
|
@@ -34663,7 +34812,7 @@ var SyntrologieSDK = (() => {
|
|
|
34663
34812
|
);
|
|
34664
34813
|
const pathname = pageContext?.url ? new URL(pageContext.url).pathname : localPathname;
|
|
34665
34814
|
(0, import_react9.useEffect)(() => {
|
|
34666
|
-
if (
|
|
34815
|
+
if (runtime3) return;
|
|
34667
34816
|
if (typeof window === "undefined") return;
|
|
34668
34817
|
const updatePathname = () => setLocalPathname(window.location.pathname);
|
|
34669
34818
|
window.addEventListener("popstate", updatePathname);
|
|
@@ -34682,7 +34831,7 @@ var SyntrologieSDK = (() => {
|
|
|
34682
34831
|
history.pushState = originalPushState;
|
|
34683
34832
|
history.replaceState = originalReplaceState;
|
|
34684
34833
|
};
|
|
34685
|
-
}, [
|
|
34834
|
+
}, [runtime3]);
|
|
34686
34835
|
const derivedFetcher = (0, import_react9.useMemo)(() => {
|
|
34687
34836
|
if (fetcher) return fetcher;
|
|
34688
34837
|
return createCanvasConfigFetcher({
|
|
@@ -34697,7 +34846,7 @@ var SyntrologieSDK = (() => {
|
|
|
34697
34846
|
fetcher: derivedFetcher,
|
|
34698
34847
|
pollIntervalMs,
|
|
34699
34848
|
experiments,
|
|
34700
|
-
runtime:
|
|
34849
|
+
runtime: runtime3
|
|
34701
34850
|
});
|
|
34702
34851
|
const hasContent = configState.tiles.length > 0 && !configState.error;
|
|
34703
34852
|
(0, import_react9.useEffect)(() => controller.subscribe((state) => setOpen(state.open)), [controller]);
|
|
@@ -34707,12 +34856,12 @@ var SyntrologieSDK = (() => {
|
|
|
34707
34856
|
}
|
|
34708
34857
|
}, [controller, hasContent]);
|
|
34709
34858
|
(0, import_react9.useEffect)(() => {
|
|
34710
|
-
if (
|
|
34711
|
-
|
|
34859
|
+
if (runtime3?.actions && configState.actions.length > 0) {
|
|
34860
|
+
runtime3.actions.applyBatch(configState.actions).catch((err) => {
|
|
34712
34861
|
console.error("[SmartCanvas] Failed to apply actions:", err);
|
|
34713
34862
|
});
|
|
34714
34863
|
}
|
|
34715
|
-
}, [
|
|
34864
|
+
}, [runtime3, configState.actions]);
|
|
34716
34865
|
const mergedTheme = (0, import_react9.useMemo)(() => {
|
|
34717
34866
|
const configTheme = configState.theme;
|
|
34718
34867
|
if (!configTheme) return theme;
|
|
@@ -35141,15 +35290,15 @@ var SyntrologieSDK = (() => {
|
|
|
35141
35290
|
let currentFetcher = null;
|
|
35142
35291
|
let currentBatchHandle = null;
|
|
35143
35292
|
let isEnabled = true;
|
|
35144
|
-
const
|
|
35293
|
+
const runtime3 = config.runtime;
|
|
35145
35294
|
async function applyActions(actions) {
|
|
35146
|
-
if (!
|
|
35295
|
+
if (!runtime3?.actions || actions.length === 0) {
|
|
35147
35296
|
return;
|
|
35148
35297
|
}
|
|
35149
35298
|
if (currentBatchHandle?.isApplied()) {
|
|
35150
35299
|
await currentBatchHandle.revertAll();
|
|
35151
35300
|
}
|
|
35152
|
-
currentBatchHandle = await
|
|
35301
|
+
currentBatchHandle = await runtime3.actions.applyBatch(actions);
|
|
35153
35302
|
}
|
|
35154
35303
|
async function revertActions() {
|
|
35155
35304
|
if (currentBatchHandle?.isApplied()) {
|
|
@@ -35162,7 +35311,7 @@ var SyntrologieSDK = (() => {
|
|
|
35162
35311
|
currentFetcher = config.fetcher;
|
|
35163
35312
|
const canvasConfig = await config.fetcher();
|
|
35164
35313
|
currentConfig = canvasConfig;
|
|
35165
|
-
if (canvasConfig.actions && canvasConfig.actions.length > 0 &&
|
|
35314
|
+
if (canvasConfig.actions && canvasConfig.actions.length > 0 && runtime3?.actions) {
|
|
35166
35315
|
await applyActions(canvasConfig.actions);
|
|
35167
35316
|
}
|
|
35168
35317
|
} catch (error2) {
|
|
@@ -35211,7 +35360,7 @@ var SyntrologieSDK = (() => {
|
|
|
35211
35360
|
pollIntervalMs: config.pollIntervalMs,
|
|
35212
35361
|
experiments,
|
|
35213
35362
|
telemetry,
|
|
35214
|
-
runtime:
|
|
35363
|
+
runtime: runtime3,
|
|
35215
35364
|
overlayFetcher: config.overlayFetcher,
|
|
35216
35365
|
overlayConfigUri: config.overlayConfigUri,
|
|
35217
35366
|
overlayConfigFeatureKey: config.overlayConfigFeatureKey,
|
|
@@ -35280,7 +35429,7 @@ var SyntrologieSDK = (() => {
|
|
|
35280
35429
|
startSessionRecording: () => {
|
|
35281
35430
|
telemetry?.startSessionRecording?.();
|
|
35282
35431
|
},
|
|
35283
|
-
runtime:
|
|
35432
|
+
runtime: runtime3
|
|
35284
35433
|
};
|
|
35285
35434
|
if (typeof window !== "undefined") {
|
|
35286
35435
|
const isDev = true;
|
|
@@ -41309,16 +41458,72 @@ var SyntrologieSDK = (() => {
|
|
|
41309
41458
|
}
|
|
41310
41459
|
return coords;
|
|
41311
41460
|
}
|
|
41461
|
+
async function detectOverflow(state, options) {
|
|
41462
|
+
var _await$platform$isEle;
|
|
41463
|
+
if (options === void 0) {
|
|
41464
|
+
options = {};
|
|
41465
|
+
}
|
|
41466
|
+
const {
|
|
41467
|
+
x: x2,
|
|
41468
|
+
y: y2,
|
|
41469
|
+
platform: platform2,
|
|
41470
|
+
rects,
|
|
41471
|
+
elements: elements2,
|
|
41472
|
+
strategy
|
|
41473
|
+
} = state;
|
|
41474
|
+
const {
|
|
41475
|
+
boundary = "clippingAncestors",
|
|
41476
|
+
rootBoundary = "viewport",
|
|
41477
|
+
elementContext = "floating",
|
|
41478
|
+
altBoundary = false,
|
|
41479
|
+
padding = 0
|
|
41480
|
+
} = evaluate2(options, state);
|
|
41481
|
+
const paddingObject = getPaddingObject(padding);
|
|
41482
|
+
const altContext = elementContext === "floating" ? "reference" : "floating";
|
|
41483
|
+
const element = elements2[altBoundary ? altContext : elementContext];
|
|
41484
|
+
const clippingClientRect = rectToClientRect(await platform2.getClippingRect({
|
|
41485
|
+
element: ((_await$platform$isEle = await (platform2.isElement == null ? void 0 : platform2.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform2.getDocumentElement == null ? void 0 : platform2.getDocumentElement(elements2.floating)),
|
|
41486
|
+
boundary,
|
|
41487
|
+
rootBoundary,
|
|
41488
|
+
strategy
|
|
41489
|
+
}));
|
|
41490
|
+
const rect = elementContext === "floating" ? {
|
|
41491
|
+
x: x2,
|
|
41492
|
+
y: y2,
|
|
41493
|
+
width: rects.floating.width,
|
|
41494
|
+
height: rects.floating.height
|
|
41495
|
+
} : rects.reference;
|
|
41496
|
+
const offsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(elements2.floating));
|
|
41497
|
+
const offsetScale = await (platform2.isElement == null ? void 0 : platform2.isElement(offsetParent)) ? await (platform2.getScale == null ? void 0 : platform2.getScale(offsetParent)) || {
|
|
41498
|
+
x: 1,
|
|
41499
|
+
y: 1
|
|
41500
|
+
} : {
|
|
41501
|
+
x: 1,
|
|
41502
|
+
y: 1
|
|
41503
|
+
};
|
|
41504
|
+
const elementClientRect = rectToClientRect(platform2.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform2.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
41505
|
+
elements: elements2,
|
|
41506
|
+
rect,
|
|
41507
|
+
offsetParent,
|
|
41508
|
+
strategy
|
|
41509
|
+
}) : rect);
|
|
41510
|
+
return {
|
|
41511
|
+
top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
|
|
41512
|
+
bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
|
|
41513
|
+
left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
|
|
41514
|
+
right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
|
|
41515
|
+
};
|
|
41516
|
+
}
|
|
41312
41517
|
var computePosition = async (reference, floating, config) => {
|
|
41313
41518
|
const {
|
|
41314
41519
|
placement = "bottom",
|
|
41315
41520
|
strategy = "absolute",
|
|
41316
41521
|
middleware = [],
|
|
41317
|
-
platform:
|
|
41522
|
+
platform: platform2
|
|
41318
41523
|
} = config;
|
|
41319
41524
|
const validMiddleware = middleware.filter(Boolean);
|
|
41320
|
-
const rtl = await (
|
|
41321
|
-
let rects = await
|
|
41525
|
+
const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(floating));
|
|
41526
|
+
let rects = await platform2.getElementRects({
|
|
41322
41527
|
reference,
|
|
41323
41528
|
floating,
|
|
41324
41529
|
strategy
|
|
@@ -41331,6 +41536,7 @@ var SyntrologieSDK = (() => {
|
|
|
41331
41536
|
let middlewareData = {};
|
|
41332
41537
|
let resetCount = 0;
|
|
41333
41538
|
for (let i2 = 0; i2 < validMiddleware.length; i2++) {
|
|
41539
|
+
var _platform$detectOverf;
|
|
41334
41540
|
const {
|
|
41335
41541
|
name,
|
|
41336
41542
|
fn: fn2
|
|
@@ -41348,7 +41554,10 @@ var SyntrologieSDK = (() => {
|
|
|
41348
41554
|
strategy,
|
|
41349
41555
|
middlewareData,
|
|
41350
41556
|
rects,
|
|
41351
|
-
platform:
|
|
41557
|
+
platform: {
|
|
41558
|
+
...platform2,
|
|
41559
|
+
detectOverflow: (_platform$detectOverf = platform2.detectOverflow) != null ? _platform$detectOverf : detectOverflow
|
|
41560
|
+
},
|
|
41352
41561
|
elements: {
|
|
41353
41562
|
reference,
|
|
41354
41563
|
floating
|
|
@@ -41370,7 +41579,7 @@ var SyntrologieSDK = (() => {
|
|
|
41370
41579
|
statefulPlacement = reset.placement;
|
|
41371
41580
|
}
|
|
41372
41581
|
if (reset.rects) {
|
|
41373
|
-
rects = reset.rects === true ? await
|
|
41582
|
+
rects = reset.rects === true ? await platform2.getElementRects({
|
|
41374
41583
|
reference,
|
|
41375
41584
|
floating,
|
|
41376
41585
|
strategy
|
|
@@ -41392,62 +41601,6 @@ var SyntrologieSDK = (() => {
|
|
|
41392
41601
|
middlewareData
|
|
41393
41602
|
};
|
|
41394
41603
|
};
|
|
41395
|
-
async function detectOverflow(state, options) {
|
|
41396
|
-
var _await$platform$isEle;
|
|
41397
|
-
if (options === void 0) {
|
|
41398
|
-
options = {};
|
|
41399
|
-
}
|
|
41400
|
-
const {
|
|
41401
|
-
x: x2,
|
|
41402
|
-
y: y2,
|
|
41403
|
-
platform: platform3,
|
|
41404
|
-
rects,
|
|
41405
|
-
elements: elements2,
|
|
41406
|
-
strategy
|
|
41407
|
-
} = state;
|
|
41408
|
-
const {
|
|
41409
|
-
boundary = "clippingAncestors",
|
|
41410
|
-
rootBoundary = "viewport",
|
|
41411
|
-
elementContext = "floating",
|
|
41412
|
-
altBoundary = false,
|
|
41413
|
-
padding = 0
|
|
41414
|
-
} = evaluate2(options, state);
|
|
41415
|
-
const paddingObject = getPaddingObject(padding);
|
|
41416
|
-
const altContext = elementContext === "floating" ? "reference" : "floating";
|
|
41417
|
-
const element = elements2[altBoundary ? altContext : elementContext];
|
|
41418
|
-
const clippingClientRect = rectToClientRect(await platform3.getClippingRect({
|
|
41419
|
-
element: ((_await$platform$isEle = await (platform3.isElement == null ? void 0 : platform3.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform3.getDocumentElement == null ? void 0 : platform3.getDocumentElement(elements2.floating)),
|
|
41420
|
-
boundary,
|
|
41421
|
-
rootBoundary,
|
|
41422
|
-
strategy
|
|
41423
|
-
}));
|
|
41424
|
-
const rect = elementContext === "floating" ? {
|
|
41425
|
-
x: x2,
|
|
41426
|
-
y: y2,
|
|
41427
|
-
width: rects.floating.width,
|
|
41428
|
-
height: rects.floating.height
|
|
41429
|
-
} : rects.reference;
|
|
41430
|
-
const offsetParent = await (platform3.getOffsetParent == null ? void 0 : platform3.getOffsetParent(elements2.floating));
|
|
41431
|
-
const offsetScale = await (platform3.isElement == null ? void 0 : platform3.isElement(offsetParent)) ? await (platform3.getScale == null ? void 0 : platform3.getScale(offsetParent)) || {
|
|
41432
|
-
x: 1,
|
|
41433
|
-
y: 1
|
|
41434
|
-
} : {
|
|
41435
|
-
x: 1,
|
|
41436
|
-
y: 1
|
|
41437
|
-
};
|
|
41438
|
-
const elementClientRect = rectToClientRect(platform3.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform3.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
41439
|
-
elements: elements2,
|
|
41440
|
-
rect,
|
|
41441
|
-
offsetParent,
|
|
41442
|
-
strategy
|
|
41443
|
-
}) : rect);
|
|
41444
|
-
return {
|
|
41445
|
-
top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
|
|
41446
|
-
bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
|
|
41447
|
-
left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
|
|
41448
|
-
right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
|
|
41449
|
-
};
|
|
41450
|
-
}
|
|
41451
41604
|
var arrow = (options) => ({
|
|
41452
41605
|
name: "arrow",
|
|
41453
41606
|
options,
|
|
@@ -41457,7 +41610,7 @@ var SyntrologieSDK = (() => {
|
|
|
41457
41610
|
y: y2,
|
|
41458
41611
|
placement,
|
|
41459
41612
|
rects,
|
|
41460
|
-
platform:
|
|
41613
|
+
platform: platform2,
|
|
41461
41614
|
elements: elements2,
|
|
41462
41615
|
middlewareData
|
|
41463
41616
|
} = state;
|
|
@@ -41475,16 +41628,16 @@ var SyntrologieSDK = (() => {
|
|
|
41475
41628
|
};
|
|
41476
41629
|
const axis = getAlignmentAxis(placement);
|
|
41477
41630
|
const length = getAxisLength(axis);
|
|
41478
|
-
const arrowDimensions = await
|
|
41631
|
+
const arrowDimensions = await platform2.getDimensions(element);
|
|
41479
41632
|
const isYAxis = axis === "y";
|
|
41480
41633
|
const minProp = isYAxis ? "top" : "left";
|
|
41481
41634
|
const maxProp = isYAxis ? "bottom" : "right";
|
|
41482
41635
|
const clientProp = isYAxis ? "clientHeight" : "clientWidth";
|
|
41483
41636
|
const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
|
|
41484
41637
|
const startDiff = coords[axis] - rects.reference[axis];
|
|
41485
|
-
const arrowOffsetParent = await (
|
|
41638
|
+
const arrowOffsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(element));
|
|
41486
41639
|
let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
|
|
41487
|
-
if (!clientSize || !await (
|
|
41640
|
+
if (!clientSize || !await (platform2.isElement == null ? void 0 : platform2.isElement(arrowOffsetParent))) {
|
|
41488
41641
|
clientSize = elements2.floating[clientProp] || rects.floating[length];
|
|
41489
41642
|
}
|
|
41490
41643
|
const centerToReference = endDiff / 2 - startDiff / 2;
|
|
@@ -41494,14 +41647,14 @@ var SyntrologieSDK = (() => {
|
|
|
41494
41647
|
const min$1 = minPadding;
|
|
41495
41648
|
const max2 = clientSize - arrowDimensions[length] - maxPadding;
|
|
41496
41649
|
const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
|
|
41497
|
-
const
|
|
41498
|
-
const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !==
|
|
41650
|
+
const offset3 = clamp(min$1, center, max2);
|
|
41651
|
+
const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset3 && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
|
|
41499
41652
|
const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max2 : 0;
|
|
41500
41653
|
return {
|
|
41501
41654
|
[axis]: coords[axis] + alignmentOffset,
|
|
41502
41655
|
data: {
|
|
41503
|
-
[axis]:
|
|
41504
|
-
centerOffset: center -
|
|
41656
|
+
[axis]: offset3,
|
|
41657
|
+
centerOffset: center - offset3 - alignmentOffset,
|
|
41505
41658
|
...shouldAddOffset && {
|
|
41506
41659
|
alignmentOffset
|
|
41507
41660
|
}
|
|
@@ -41524,7 +41677,7 @@ var SyntrologieSDK = (() => {
|
|
|
41524
41677
|
middlewareData,
|
|
41525
41678
|
rects,
|
|
41526
41679
|
initialPlacement,
|
|
41527
|
-
platform:
|
|
41680
|
+
platform: platform2,
|
|
41528
41681
|
elements: elements2
|
|
41529
41682
|
} = state;
|
|
41530
41683
|
const {
|
|
@@ -41542,14 +41695,14 @@ var SyntrologieSDK = (() => {
|
|
|
41542
41695
|
const side = getSide(placement);
|
|
41543
41696
|
const initialSideAxis = getSideAxis(initialPlacement);
|
|
41544
41697
|
const isBasePlacement = getSide(initialPlacement) === initialPlacement;
|
|
41545
|
-
const rtl = await (
|
|
41698
|
+
const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements2.floating));
|
|
41546
41699
|
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
|
|
41547
41700
|
const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
|
|
41548
41701
|
if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
|
|
41549
41702
|
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
41550
41703
|
}
|
|
41551
41704
|
const placements2 = [initialPlacement, ...fallbackPlacements];
|
|
41552
|
-
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
41705
|
+
const overflow = await platform2.detectOverflow(state, detectOverflowOptions);
|
|
41553
41706
|
const overflows = [];
|
|
41554
41707
|
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
|
41555
41708
|
if (checkMainAxis) {
|
|
@@ -41639,7 +41792,8 @@ var SyntrologieSDK = (() => {
|
|
|
41639
41792
|
options,
|
|
41640
41793
|
async fn(state) {
|
|
41641
41794
|
const {
|
|
41642
|
-
rects
|
|
41795
|
+
rects,
|
|
41796
|
+
platform: platform2
|
|
41643
41797
|
} = state;
|
|
41644
41798
|
const {
|
|
41645
41799
|
strategy = "referenceHidden",
|
|
@@ -41647,7 +41801,7 @@ var SyntrologieSDK = (() => {
|
|
|
41647
41801
|
} = evaluate2(options, state);
|
|
41648
41802
|
switch (strategy) {
|
|
41649
41803
|
case "referenceHidden": {
|
|
41650
|
-
const overflow = await detectOverflow(state, {
|
|
41804
|
+
const overflow = await platform2.detectOverflow(state, {
|
|
41651
41805
|
...detectOverflowOptions,
|
|
41652
41806
|
elementContext: "reference"
|
|
41653
41807
|
});
|
|
@@ -41660,7 +41814,7 @@ var SyntrologieSDK = (() => {
|
|
|
41660
41814
|
};
|
|
41661
41815
|
}
|
|
41662
41816
|
case "escaped": {
|
|
41663
|
-
const overflow = await detectOverflow(state, {
|
|
41817
|
+
const overflow = await platform2.detectOverflow(state, {
|
|
41664
41818
|
...detectOverflowOptions,
|
|
41665
41819
|
altBoundary: true
|
|
41666
41820
|
});
|
|
@@ -41683,10 +41837,10 @@ var SyntrologieSDK = (() => {
|
|
|
41683
41837
|
async function convertValueToCoords(state, options) {
|
|
41684
41838
|
const {
|
|
41685
41839
|
placement,
|
|
41686
|
-
platform:
|
|
41840
|
+
platform: platform2,
|
|
41687
41841
|
elements: elements2
|
|
41688
41842
|
} = state;
|
|
41689
|
-
const rtl = await (
|
|
41843
|
+
const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements2.floating));
|
|
41690
41844
|
const side = getSide(placement);
|
|
41691
41845
|
const alignment = getAlignment(placement);
|
|
41692
41846
|
const isVertical = getSideAxis(placement) === "y";
|
|
@@ -41758,7 +41912,8 @@ var SyntrologieSDK = (() => {
|
|
|
41758
41912
|
const {
|
|
41759
41913
|
x: x2,
|
|
41760
41914
|
y: y2,
|
|
41761
|
-
placement
|
|
41915
|
+
placement,
|
|
41916
|
+
platform: platform2
|
|
41762
41917
|
} = state;
|
|
41763
41918
|
const {
|
|
41764
41919
|
mainAxis: checkMainAxis = true,
|
|
@@ -41781,7 +41936,7 @@ var SyntrologieSDK = (() => {
|
|
|
41781
41936
|
x: x2,
|
|
41782
41937
|
y: y2
|
|
41783
41938
|
};
|
|
41784
|
-
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
41939
|
+
const overflow = await platform2.detectOverflow(state, detectOverflowOptions);
|
|
41785
41940
|
const crossAxis = getSideAxis(getSide(placement));
|
|
41786
41941
|
const mainAxis = getOppositeAxis(crossAxis);
|
|
41787
41942
|
let mainAxisCoord = coords[mainAxis];
|
|
@@ -42098,9 +42253,15 @@ var SyntrologieSDK = (() => {
|
|
|
42098
42253
|
}
|
|
42099
42254
|
return rect.left + leftScroll;
|
|
42100
42255
|
}
|
|
42101
|
-
function getHTMLOffset(documentElement, scroll) {
|
|
42256
|
+
function getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {
|
|
42257
|
+
if (ignoreScrollbarX === void 0) {
|
|
42258
|
+
ignoreScrollbarX = false;
|
|
42259
|
+
}
|
|
42102
42260
|
const htmlRect = documentElement.getBoundingClientRect();
|
|
42103
|
-
const x2 = htmlRect.left + scroll.scrollLeft -
|
|
42261
|
+
const x2 = htmlRect.left + scroll.scrollLeft - (ignoreScrollbarX ? 0 : (
|
|
42262
|
+
// RTL <body> scrollbar.
|
|
42263
|
+
getWindowScrollBarX(documentElement, htmlRect)
|
|
42264
|
+
));
|
|
42104
42265
|
const y2 = htmlRect.top + scroll.scrollTop;
|
|
42105
42266
|
return {
|
|
42106
42267
|
x: x2,
|
|
@@ -42138,7 +42299,7 @@ var SyntrologieSDK = (() => {
|
|
|
42138
42299
|
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
42139
42300
|
}
|
|
42140
42301
|
}
|
|
42141
|
-
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
42302
|
+
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll, true) : createCoords(0);
|
|
42142
42303
|
return {
|
|
42143
42304
|
width: rect.width * scale.x,
|
|
42144
42305
|
height: rect.height * scale.y,
|
|
@@ -42167,7 +42328,6 @@ var SyntrologieSDK = (() => {
|
|
|
42167
42328
|
y: y2
|
|
42168
42329
|
};
|
|
42169
42330
|
}
|
|
42170
|
-
var SCROLLBAR_MAX = 25;
|
|
42171
42331
|
function getViewportRect(element, strategy) {
|
|
42172
42332
|
const win = getWindow(element);
|
|
42173
42333
|
const html2 = getDocumentElement(element);
|
|
@@ -42185,19 +42345,6 @@ var SyntrologieSDK = (() => {
|
|
|
42185
42345
|
y2 = visualViewport.offsetTop;
|
|
42186
42346
|
}
|
|
42187
42347
|
}
|
|
42188
|
-
const windowScrollbarX = getWindowScrollBarX(html2);
|
|
42189
|
-
if (windowScrollbarX <= 0) {
|
|
42190
|
-
const doc = html2.ownerDocument;
|
|
42191
|
-
const body = doc.body;
|
|
42192
|
-
const bodyStyles = getComputedStyle(body);
|
|
42193
|
-
const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
|
|
42194
|
-
const clippingStableScrollbarWidth = Math.abs(html2.clientWidth - body.clientWidth - bodyMarginInline);
|
|
42195
|
-
if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {
|
|
42196
|
-
width -= clippingStableScrollbarWidth;
|
|
42197
|
-
}
|
|
42198
|
-
} else if (windowScrollbarX <= SCROLLBAR_MAX) {
|
|
42199
|
-
width += windowScrollbarX;
|
|
42200
|
-
}
|
|
42201
42348
|
return {
|
|
42202
42349
|
width,
|
|
42203
42350
|
height,
|
|
@@ -42205,7 +42352,6 @@ var SyntrologieSDK = (() => {
|
|
|
42205
42352
|
y: y2
|
|
42206
42353
|
};
|
|
42207
42354
|
}
|
|
42208
|
-
var absoluteOrFixed = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
42209
42355
|
function getInnerBoundingClientRect(element, strategy) {
|
|
42210
42356
|
const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
|
|
42211
42357
|
const top = clientRect.top + element.clientTop;
|
|
@@ -42263,7 +42409,7 @@ var SyntrologieSDK = (() => {
|
|
|
42263
42409
|
if (!currentNodeIsContaining && computedStyle.position === "fixed") {
|
|
42264
42410
|
currentContainingBlockComputedStyle = null;
|
|
42265
42411
|
}
|
|
42266
|
-
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle &&
|
|
42412
|
+
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && ["absolute", "fixed"].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
|
|
42267
42413
|
if (shouldDropCurrentNode) {
|
|
42268
42414
|
result = result.filter((ancestor) => ancestor !== currentNode);
|
|
42269
42415
|
} else {
|
|
@@ -42319,9 +42465,6 @@ var SyntrologieSDK = (() => {
|
|
|
42319
42465
|
scrollTop: 0
|
|
42320
42466
|
};
|
|
42321
42467
|
const offsets = createCoords(0);
|
|
42322
|
-
function setLeftRTLScrollbarOffset() {
|
|
42323
|
-
offsets.x = getWindowScrollBarX(documentElement);
|
|
42324
|
-
}
|
|
42325
42468
|
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
42326
42469
|
if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
|
|
42327
42470
|
scroll = getNodeScroll(offsetParent);
|
|
@@ -42331,12 +42474,9 @@ var SyntrologieSDK = (() => {
|
|
|
42331
42474
|
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
42332
42475
|
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
42333
42476
|
} else if (documentElement) {
|
|
42334
|
-
|
|
42477
|
+
offsets.x = getWindowScrollBarX(documentElement);
|
|
42335
42478
|
}
|
|
42336
42479
|
}
|
|
42337
|
-
if (isFixed && !isOffsetParentAnElement && documentElement) {
|
|
42338
|
-
setLeftRTLScrollbarOffset();
|
|
42339
|
-
}
|
|
42340
42480
|
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
42341
42481
|
const x2 = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
|
|
42342
42482
|
const y2 = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
|
|
@@ -42485,7 +42625,7 @@ var SyntrologieSDK = (() => {
|
|
|
42485
42625
|
// Handle <iframe>s
|
|
42486
42626
|
root: root.ownerDocument
|
|
42487
42627
|
});
|
|
42488
|
-
} catch (
|
|
42628
|
+
} catch (e2) {
|
|
42489
42629
|
io2 = new IntersectionObserver(handleObserve, options);
|
|
42490
42630
|
}
|
|
42491
42631
|
io2.observe(element);
|
|
@@ -43239,64 +43379,6 @@ var SyntrologieSDK = (() => {
|
|
|
43239
43379
|
executors: executors2
|
|
43240
43380
|
};
|
|
43241
43381
|
|
|
43242
|
-
// ../adaptives/adaptive-navigation/dist/runtime.js
|
|
43243
|
-
var executeScrollTo = async (action, context) => {
|
|
43244
|
-
const anchorEl = context.resolveAnchor(action.anchorId);
|
|
43245
|
-
if (!anchorEl) {
|
|
43246
|
-
throw new Error(`Anchor not found: ${action.anchorId}`);
|
|
43247
|
-
}
|
|
43248
|
-
const _scrollXBefore = window.scrollX;
|
|
43249
|
-
const _scrollYBefore = window.scrollY;
|
|
43250
|
-
anchorEl.scrollIntoView({
|
|
43251
|
-
behavior: action.behavior ?? "smooth",
|
|
43252
|
-
block: action.block ?? "center",
|
|
43253
|
-
inline: action.inline ?? "nearest"
|
|
43254
|
-
});
|
|
43255
|
-
context.publishEvent("action.applied", {
|
|
43256
|
-
id: context.generateId(),
|
|
43257
|
-
kind: "navigation:scrollTo",
|
|
43258
|
-
anchorId: action.anchorId,
|
|
43259
|
-
behavior: action.behavior ?? "smooth"
|
|
43260
|
-
});
|
|
43261
|
-
return {
|
|
43262
|
-
cleanup: () => {
|
|
43263
|
-
}
|
|
43264
|
-
};
|
|
43265
|
-
};
|
|
43266
|
-
var executeNavigate = async (action, context) => {
|
|
43267
|
-
const url = action.url.trim();
|
|
43268
|
-
if (url.toLowerCase().startsWith("javascript:")) {
|
|
43269
|
-
throw new Error("javascript: URLs are not allowed");
|
|
43270
|
-
}
|
|
43271
|
-
const target = action.target ?? "_self";
|
|
43272
|
-
context.publishEvent("action.applied", {
|
|
43273
|
-
id: context.generateId(),
|
|
43274
|
-
kind: "navigation:navigate",
|
|
43275
|
-
url: action.url,
|
|
43276
|
-
target
|
|
43277
|
-
});
|
|
43278
|
-
if (target === "_blank") {
|
|
43279
|
-
window.open(url, "_blank", "noopener,noreferrer");
|
|
43280
|
-
} else {
|
|
43281
|
-
window.location.href = url;
|
|
43282
|
-
}
|
|
43283
|
-
return {
|
|
43284
|
-
cleanup: () => {
|
|
43285
|
-
}
|
|
43286
|
-
};
|
|
43287
|
-
};
|
|
43288
|
-
var executors3 = [
|
|
43289
|
-
{ kind: "navigation:scrollTo", executor: executeScrollTo },
|
|
43290
|
-
{ kind: "navigation:navigate", executor: executeNavigate }
|
|
43291
|
-
];
|
|
43292
|
-
var runtime3 = {
|
|
43293
|
-
id: "adaptive-navigation",
|
|
43294
|
-
version: "1.0.0",
|
|
43295
|
-
name: "Navigation",
|
|
43296
|
-
description: "Scroll and page navigation actions",
|
|
43297
|
-
executors: executors3
|
|
43298
|
-
};
|
|
43299
|
-
|
|
43300
43382
|
// src/actions/executors/tour.ts
|
|
43301
43383
|
var ACTIVE_TOUR_KEY = "syntro_active_tour";
|
|
43302
43384
|
var activeTours = /* @__PURE__ */ new Map();
|
|
@@ -43557,9 +43639,6 @@ var SyntrologieSDK = (() => {
|
|
|
43557
43639
|
for (const { kind, executor } of executors2) {
|
|
43558
43640
|
this.registerCore(kind, executor);
|
|
43559
43641
|
}
|
|
43560
|
-
for (const { kind, executor } of executors3) {
|
|
43561
|
-
this.registerCore(kind, executor);
|
|
43562
|
-
}
|
|
43563
43642
|
this.registerCore("core:mountWidget", async () => {
|
|
43564
43643
|
throw new Error("core:mountWidget must be handled by ActionEngine");
|
|
43565
43644
|
});
|
|
@@ -44594,598 +44673,6 @@ var SyntrologieSDK = (() => {
|
|
|
44594
44673
|
return tpl.innerHTML = root.firstChild ? tpl.innerHTML : tpl.innerHTML;
|
|
44595
44674
|
}
|
|
44596
44675
|
|
|
44597
|
-
// node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
|
|
44598
|
-
function getCssDimensions2(element) {
|
|
44599
|
-
const css = getComputedStyle2(element);
|
|
44600
|
-
let width = parseFloat(css.width) || 0;
|
|
44601
|
-
let height = parseFloat(css.height) || 0;
|
|
44602
|
-
const hasOffset = isHTMLElement(element);
|
|
44603
|
-
const offsetWidth = hasOffset ? element.offsetWidth : width;
|
|
44604
|
-
const offsetHeight = hasOffset ? element.offsetHeight : height;
|
|
44605
|
-
const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
|
|
44606
|
-
if (shouldFallback) {
|
|
44607
|
-
width = offsetWidth;
|
|
44608
|
-
height = offsetHeight;
|
|
44609
|
-
}
|
|
44610
|
-
return {
|
|
44611
|
-
width,
|
|
44612
|
-
height,
|
|
44613
|
-
$: shouldFallback
|
|
44614
|
-
};
|
|
44615
|
-
}
|
|
44616
|
-
function unwrapElement2(element) {
|
|
44617
|
-
return !isElement(element) ? element.contextElement : element;
|
|
44618
|
-
}
|
|
44619
|
-
function getScale2(element) {
|
|
44620
|
-
const domElement = unwrapElement2(element);
|
|
44621
|
-
if (!isHTMLElement(domElement)) {
|
|
44622
|
-
return createCoords(1);
|
|
44623
|
-
}
|
|
44624
|
-
const rect = domElement.getBoundingClientRect();
|
|
44625
|
-
const {
|
|
44626
|
-
width,
|
|
44627
|
-
height,
|
|
44628
|
-
$
|
|
44629
|
-
} = getCssDimensions2(domElement);
|
|
44630
|
-
let x2 = ($ ? round(rect.width) : rect.width) / width;
|
|
44631
|
-
let y2 = ($ ? round(rect.height) : rect.height) / height;
|
|
44632
|
-
if (!x2 || !Number.isFinite(x2)) {
|
|
44633
|
-
x2 = 1;
|
|
44634
|
-
}
|
|
44635
|
-
if (!y2 || !Number.isFinite(y2)) {
|
|
44636
|
-
y2 = 1;
|
|
44637
|
-
}
|
|
44638
|
-
return {
|
|
44639
|
-
x: x2,
|
|
44640
|
-
y: y2
|
|
44641
|
-
};
|
|
44642
|
-
}
|
|
44643
|
-
var noOffsets2 = /* @__PURE__ */ createCoords(0);
|
|
44644
|
-
function getVisualOffsets2(element) {
|
|
44645
|
-
const win = getWindow(element);
|
|
44646
|
-
if (!isWebKit() || !win.visualViewport) {
|
|
44647
|
-
return noOffsets2;
|
|
44648
|
-
}
|
|
44649
|
-
return {
|
|
44650
|
-
x: win.visualViewport.offsetLeft,
|
|
44651
|
-
y: win.visualViewport.offsetTop
|
|
44652
|
-
};
|
|
44653
|
-
}
|
|
44654
|
-
function shouldAddVisualOffsets2(element, isFixed, floatingOffsetParent) {
|
|
44655
|
-
if (isFixed === void 0) {
|
|
44656
|
-
isFixed = false;
|
|
44657
|
-
}
|
|
44658
|
-
if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
|
|
44659
|
-
return false;
|
|
44660
|
-
}
|
|
44661
|
-
return isFixed;
|
|
44662
|
-
}
|
|
44663
|
-
function getBoundingClientRect2(element, includeScale, isFixedStrategy, offsetParent) {
|
|
44664
|
-
if (includeScale === void 0) {
|
|
44665
|
-
includeScale = false;
|
|
44666
|
-
}
|
|
44667
|
-
if (isFixedStrategy === void 0) {
|
|
44668
|
-
isFixedStrategy = false;
|
|
44669
|
-
}
|
|
44670
|
-
const clientRect = element.getBoundingClientRect();
|
|
44671
|
-
const domElement = unwrapElement2(element);
|
|
44672
|
-
let scale = createCoords(1);
|
|
44673
|
-
if (includeScale) {
|
|
44674
|
-
if (offsetParent) {
|
|
44675
|
-
if (isElement(offsetParent)) {
|
|
44676
|
-
scale = getScale2(offsetParent);
|
|
44677
|
-
}
|
|
44678
|
-
} else {
|
|
44679
|
-
scale = getScale2(element);
|
|
44680
|
-
}
|
|
44681
|
-
}
|
|
44682
|
-
const visualOffsets = shouldAddVisualOffsets2(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets2(domElement) : createCoords(0);
|
|
44683
|
-
let x2 = (clientRect.left + visualOffsets.x) / scale.x;
|
|
44684
|
-
let y2 = (clientRect.top + visualOffsets.y) / scale.y;
|
|
44685
|
-
let width = clientRect.width / scale.x;
|
|
44686
|
-
let height = clientRect.height / scale.y;
|
|
44687
|
-
if (domElement) {
|
|
44688
|
-
const win = getWindow(domElement);
|
|
44689
|
-
const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
|
|
44690
|
-
let currentWin = win;
|
|
44691
|
-
let currentIFrame = getFrameElement(currentWin);
|
|
44692
|
-
while (currentIFrame && offsetParent && offsetWin !== currentWin) {
|
|
44693
|
-
const iframeScale = getScale2(currentIFrame);
|
|
44694
|
-
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
44695
|
-
const css = getComputedStyle2(currentIFrame);
|
|
44696
|
-
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
|
|
44697
|
-
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
|
|
44698
|
-
x2 *= iframeScale.x;
|
|
44699
|
-
y2 *= iframeScale.y;
|
|
44700
|
-
width *= iframeScale.x;
|
|
44701
|
-
height *= iframeScale.y;
|
|
44702
|
-
x2 += left;
|
|
44703
|
-
y2 += top;
|
|
44704
|
-
currentWin = getWindow(currentIFrame);
|
|
44705
|
-
currentIFrame = getFrameElement(currentWin);
|
|
44706
|
-
}
|
|
44707
|
-
}
|
|
44708
|
-
return rectToClientRect({
|
|
44709
|
-
width,
|
|
44710
|
-
height,
|
|
44711
|
-
x: x2,
|
|
44712
|
-
y: y2
|
|
44713
|
-
});
|
|
44714
|
-
}
|
|
44715
|
-
function getWindowScrollBarX2(element, rect) {
|
|
44716
|
-
const leftScroll = getNodeScroll(element).scrollLeft;
|
|
44717
|
-
if (!rect) {
|
|
44718
|
-
return getBoundingClientRect2(getDocumentElement(element)).left + leftScroll;
|
|
44719
|
-
}
|
|
44720
|
-
return rect.left + leftScroll;
|
|
44721
|
-
}
|
|
44722
|
-
function getHTMLOffset2(documentElement, scroll, ignoreScrollbarX) {
|
|
44723
|
-
if (ignoreScrollbarX === void 0) {
|
|
44724
|
-
ignoreScrollbarX = false;
|
|
44725
|
-
}
|
|
44726
|
-
const htmlRect = documentElement.getBoundingClientRect();
|
|
44727
|
-
const x2 = htmlRect.left + scroll.scrollLeft - (ignoreScrollbarX ? 0 : (
|
|
44728
|
-
// RTL <body> scrollbar.
|
|
44729
|
-
getWindowScrollBarX2(documentElement, htmlRect)
|
|
44730
|
-
));
|
|
44731
|
-
const y2 = htmlRect.top + scroll.scrollTop;
|
|
44732
|
-
return {
|
|
44733
|
-
x: x2,
|
|
44734
|
-
y: y2
|
|
44735
|
-
};
|
|
44736
|
-
}
|
|
44737
|
-
function convertOffsetParentRelativeRectToViewportRelativeRect2(_ref) {
|
|
44738
|
-
let {
|
|
44739
|
-
elements: elements2,
|
|
44740
|
-
rect,
|
|
44741
|
-
offsetParent,
|
|
44742
|
-
strategy
|
|
44743
|
-
} = _ref;
|
|
44744
|
-
const isFixed = strategy === "fixed";
|
|
44745
|
-
const documentElement = getDocumentElement(offsetParent);
|
|
44746
|
-
const topLayer = elements2 ? isTopLayer(elements2.floating) : false;
|
|
44747
|
-
if (offsetParent === documentElement || topLayer && isFixed) {
|
|
44748
|
-
return rect;
|
|
44749
|
-
}
|
|
44750
|
-
let scroll = {
|
|
44751
|
-
scrollLeft: 0,
|
|
44752
|
-
scrollTop: 0
|
|
44753
|
-
};
|
|
44754
|
-
let scale = createCoords(1);
|
|
44755
|
-
const offsets = createCoords(0);
|
|
44756
|
-
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
44757
|
-
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
44758
|
-
if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
|
|
44759
|
-
scroll = getNodeScroll(offsetParent);
|
|
44760
|
-
}
|
|
44761
|
-
if (isHTMLElement(offsetParent)) {
|
|
44762
|
-
const offsetRect = getBoundingClientRect2(offsetParent);
|
|
44763
|
-
scale = getScale2(offsetParent);
|
|
44764
|
-
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
44765
|
-
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
44766
|
-
}
|
|
44767
|
-
}
|
|
44768
|
-
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset2(documentElement, scroll, true) : createCoords(0);
|
|
44769
|
-
return {
|
|
44770
|
-
width: rect.width * scale.x,
|
|
44771
|
-
height: rect.height * scale.y,
|
|
44772
|
-
x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
|
|
44773
|
-
y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
|
|
44774
|
-
};
|
|
44775
|
-
}
|
|
44776
|
-
function getClientRects2(element) {
|
|
44777
|
-
return Array.from(element.getClientRects());
|
|
44778
|
-
}
|
|
44779
|
-
function getDocumentRect2(element) {
|
|
44780
|
-
const html2 = getDocumentElement(element);
|
|
44781
|
-
const scroll = getNodeScroll(element);
|
|
44782
|
-
const body = element.ownerDocument.body;
|
|
44783
|
-
const width = max(html2.scrollWidth, html2.clientWidth, body.scrollWidth, body.clientWidth);
|
|
44784
|
-
const height = max(html2.scrollHeight, html2.clientHeight, body.scrollHeight, body.clientHeight);
|
|
44785
|
-
let x2 = -scroll.scrollLeft + getWindowScrollBarX2(element);
|
|
44786
|
-
const y2 = -scroll.scrollTop;
|
|
44787
|
-
if (getComputedStyle2(body).direction === "rtl") {
|
|
44788
|
-
x2 += max(html2.clientWidth, body.clientWidth) - width;
|
|
44789
|
-
}
|
|
44790
|
-
return {
|
|
44791
|
-
width,
|
|
44792
|
-
height,
|
|
44793
|
-
x: x2,
|
|
44794
|
-
y: y2
|
|
44795
|
-
};
|
|
44796
|
-
}
|
|
44797
|
-
function getViewportRect2(element, strategy) {
|
|
44798
|
-
const win = getWindow(element);
|
|
44799
|
-
const html2 = getDocumentElement(element);
|
|
44800
|
-
const visualViewport = win.visualViewport;
|
|
44801
|
-
let width = html2.clientWidth;
|
|
44802
|
-
let height = html2.clientHeight;
|
|
44803
|
-
let x2 = 0;
|
|
44804
|
-
let y2 = 0;
|
|
44805
|
-
if (visualViewport) {
|
|
44806
|
-
width = visualViewport.width;
|
|
44807
|
-
height = visualViewport.height;
|
|
44808
|
-
const visualViewportBased = isWebKit();
|
|
44809
|
-
if (!visualViewportBased || visualViewportBased && strategy === "fixed") {
|
|
44810
|
-
x2 = visualViewport.offsetLeft;
|
|
44811
|
-
y2 = visualViewport.offsetTop;
|
|
44812
|
-
}
|
|
44813
|
-
}
|
|
44814
|
-
return {
|
|
44815
|
-
width,
|
|
44816
|
-
height,
|
|
44817
|
-
x: x2,
|
|
44818
|
-
y: y2
|
|
44819
|
-
};
|
|
44820
|
-
}
|
|
44821
|
-
function getInnerBoundingClientRect2(element, strategy) {
|
|
44822
|
-
const clientRect = getBoundingClientRect2(element, true, strategy === "fixed");
|
|
44823
|
-
const top = clientRect.top + element.clientTop;
|
|
44824
|
-
const left = clientRect.left + element.clientLeft;
|
|
44825
|
-
const scale = isHTMLElement(element) ? getScale2(element) : createCoords(1);
|
|
44826
|
-
const width = element.clientWidth * scale.x;
|
|
44827
|
-
const height = element.clientHeight * scale.y;
|
|
44828
|
-
const x2 = left * scale.x;
|
|
44829
|
-
const y2 = top * scale.y;
|
|
44830
|
-
return {
|
|
44831
|
-
width,
|
|
44832
|
-
height,
|
|
44833
|
-
x: x2,
|
|
44834
|
-
y: y2
|
|
44835
|
-
};
|
|
44836
|
-
}
|
|
44837
|
-
function getClientRectFromClippingAncestor2(element, clippingAncestor, strategy) {
|
|
44838
|
-
let rect;
|
|
44839
|
-
if (clippingAncestor === "viewport") {
|
|
44840
|
-
rect = getViewportRect2(element, strategy);
|
|
44841
|
-
} else if (clippingAncestor === "document") {
|
|
44842
|
-
rect = getDocumentRect2(getDocumentElement(element));
|
|
44843
|
-
} else if (isElement(clippingAncestor)) {
|
|
44844
|
-
rect = getInnerBoundingClientRect2(clippingAncestor, strategy);
|
|
44845
|
-
} else {
|
|
44846
|
-
const visualOffsets = getVisualOffsets2(element);
|
|
44847
|
-
rect = {
|
|
44848
|
-
x: clippingAncestor.x - visualOffsets.x,
|
|
44849
|
-
y: clippingAncestor.y - visualOffsets.y,
|
|
44850
|
-
width: clippingAncestor.width,
|
|
44851
|
-
height: clippingAncestor.height
|
|
44852
|
-
};
|
|
44853
|
-
}
|
|
44854
|
-
return rectToClientRect(rect);
|
|
44855
|
-
}
|
|
44856
|
-
function hasFixedPositionAncestor2(element, stopNode) {
|
|
44857
|
-
const parentNode = getParentNode(element);
|
|
44858
|
-
if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
|
|
44859
|
-
return false;
|
|
44860
|
-
}
|
|
44861
|
-
return getComputedStyle2(parentNode).position === "fixed" || hasFixedPositionAncestor2(parentNode, stopNode);
|
|
44862
|
-
}
|
|
44863
|
-
function getClippingElementAncestors2(element, cache2) {
|
|
44864
|
-
const cachedResult = cache2.get(element);
|
|
44865
|
-
if (cachedResult) {
|
|
44866
|
-
return cachedResult;
|
|
44867
|
-
}
|
|
44868
|
-
let result = getOverflowAncestors(element, [], false).filter((el) => isElement(el) && getNodeName(el) !== "body");
|
|
44869
|
-
let currentContainingBlockComputedStyle = null;
|
|
44870
|
-
const elementIsFixed = getComputedStyle2(element).position === "fixed";
|
|
44871
|
-
let currentNode = elementIsFixed ? getParentNode(element) : element;
|
|
44872
|
-
while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
44873
|
-
const computedStyle = getComputedStyle2(currentNode);
|
|
44874
|
-
const currentNodeIsContaining = isContainingBlock(currentNode);
|
|
44875
|
-
if (!currentNodeIsContaining && computedStyle.position === "fixed") {
|
|
44876
|
-
currentContainingBlockComputedStyle = null;
|
|
44877
|
-
}
|
|
44878
|
-
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && ["absolute", "fixed"].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor2(element, currentNode);
|
|
44879
|
-
if (shouldDropCurrentNode) {
|
|
44880
|
-
result = result.filter((ancestor) => ancestor !== currentNode);
|
|
44881
|
-
} else {
|
|
44882
|
-
currentContainingBlockComputedStyle = computedStyle;
|
|
44883
|
-
}
|
|
44884
|
-
currentNode = getParentNode(currentNode);
|
|
44885
|
-
}
|
|
44886
|
-
cache2.set(element, result);
|
|
44887
|
-
return result;
|
|
44888
|
-
}
|
|
44889
|
-
function getClippingRect2(_ref) {
|
|
44890
|
-
let {
|
|
44891
|
-
element,
|
|
44892
|
-
boundary,
|
|
44893
|
-
rootBoundary,
|
|
44894
|
-
strategy
|
|
44895
|
-
} = _ref;
|
|
44896
|
-
const elementClippingAncestors = boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors2(element, this._c) : [].concat(boundary);
|
|
44897
|
-
const clippingAncestors = [...elementClippingAncestors, rootBoundary];
|
|
44898
|
-
const firstClippingAncestor = clippingAncestors[0];
|
|
44899
|
-
const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
|
|
44900
|
-
const rect = getClientRectFromClippingAncestor2(element, clippingAncestor, strategy);
|
|
44901
|
-
accRect.top = max(rect.top, accRect.top);
|
|
44902
|
-
accRect.right = min(rect.right, accRect.right);
|
|
44903
|
-
accRect.bottom = min(rect.bottom, accRect.bottom);
|
|
44904
|
-
accRect.left = max(rect.left, accRect.left);
|
|
44905
|
-
return accRect;
|
|
44906
|
-
}, getClientRectFromClippingAncestor2(element, firstClippingAncestor, strategy));
|
|
44907
|
-
return {
|
|
44908
|
-
width: clippingRect.right - clippingRect.left,
|
|
44909
|
-
height: clippingRect.bottom - clippingRect.top,
|
|
44910
|
-
x: clippingRect.left,
|
|
44911
|
-
y: clippingRect.top
|
|
44912
|
-
};
|
|
44913
|
-
}
|
|
44914
|
-
function getDimensions2(element) {
|
|
44915
|
-
const {
|
|
44916
|
-
width,
|
|
44917
|
-
height
|
|
44918
|
-
} = getCssDimensions2(element);
|
|
44919
|
-
return {
|
|
44920
|
-
width,
|
|
44921
|
-
height
|
|
44922
|
-
};
|
|
44923
|
-
}
|
|
44924
|
-
function getRectRelativeToOffsetParent2(element, offsetParent, strategy) {
|
|
44925
|
-
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
44926
|
-
const documentElement = getDocumentElement(offsetParent);
|
|
44927
|
-
const isFixed = strategy === "fixed";
|
|
44928
|
-
const rect = getBoundingClientRect2(element, true, isFixed, offsetParent);
|
|
44929
|
-
let scroll = {
|
|
44930
|
-
scrollLeft: 0,
|
|
44931
|
-
scrollTop: 0
|
|
44932
|
-
};
|
|
44933
|
-
const offsets = createCoords(0);
|
|
44934
|
-
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
44935
|
-
if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
|
|
44936
|
-
scroll = getNodeScroll(offsetParent);
|
|
44937
|
-
}
|
|
44938
|
-
if (isOffsetParentAnElement) {
|
|
44939
|
-
const offsetRect = getBoundingClientRect2(offsetParent, true, isFixed, offsetParent);
|
|
44940
|
-
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
44941
|
-
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
44942
|
-
} else if (documentElement) {
|
|
44943
|
-
offsets.x = getWindowScrollBarX2(documentElement);
|
|
44944
|
-
}
|
|
44945
|
-
}
|
|
44946
|
-
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset2(documentElement, scroll) : createCoords(0);
|
|
44947
|
-
const x2 = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
|
|
44948
|
-
const y2 = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
|
|
44949
|
-
return {
|
|
44950
|
-
x: x2,
|
|
44951
|
-
y: y2,
|
|
44952
|
-
width: rect.width,
|
|
44953
|
-
height: rect.height
|
|
44954
|
-
};
|
|
44955
|
-
}
|
|
44956
|
-
function isStaticPositioned2(element) {
|
|
44957
|
-
return getComputedStyle2(element).position === "static";
|
|
44958
|
-
}
|
|
44959
|
-
function getTrueOffsetParent2(element, polyfill) {
|
|
44960
|
-
if (!isHTMLElement(element) || getComputedStyle2(element).position === "fixed") {
|
|
44961
|
-
return null;
|
|
44962
|
-
}
|
|
44963
|
-
if (polyfill) {
|
|
44964
|
-
return polyfill(element);
|
|
44965
|
-
}
|
|
44966
|
-
let rawOffsetParent = element.offsetParent;
|
|
44967
|
-
if (getDocumentElement(element) === rawOffsetParent) {
|
|
44968
|
-
rawOffsetParent = rawOffsetParent.ownerDocument.body;
|
|
44969
|
-
}
|
|
44970
|
-
return rawOffsetParent;
|
|
44971
|
-
}
|
|
44972
|
-
function getOffsetParent2(element, polyfill) {
|
|
44973
|
-
const win = getWindow(element);
|
|
44974
|
-
if (isTopLayer(element)) {
|
|
44975
|
-
return win;
|
|
44976
|
-
}
|
|
44977
|
-
if (!isHTMLElement(element)) {
|
|
44978
|
-
let svgOffsetParent = getParentNode(element);
|
|
44979
|
-
while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
|
|
44980
|
-
if (isElement(svgOffsetParent) && !isStaticPositioned2(svgOffsetParent)) {
|
|
44981
|
-
return svgOffsetParent;
|
|
44982
|
-
}
|
|
44983
|
-
svgOffsetParent = getParentNode(svgOffsetParent);
|
|
44984
|
-
}
|
|
44985
|
-
return win;
|
|
44986
|
-
}
|
|
44987
|
-
let offsetParent = getTrueOffsetParent2(element, polyfill);
|
|
44988
|
-
while (offsetParent && isTableElement(offsetParent) && isStaticPositioned2(offsetParent)) {
|
|
44989
|
-
offsetParent = getTrueOffsetParent2(offsetParent, polyfill);
|
|
44990
|
-
}
|
|
44991
|
-
if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned2(offsetParent) && !isContainingBlock(offsetParent)) {
|
|
44992
|
-
return win;
|
|
44993
|
-
}
|
|
44994
|
-
return offsetParent || getContainingBlock(element) || win;
|
|
44995
|
-
}
|
|
44996
|
-
var getElementRects2 = async function(data) {
|
|
44997
|
-
const getOffsetParentFn = this.getOffsetParent || getOffsetParent2;
|
|
44998
|
-
const getDimensionsFn = this.getDimensions;
|
|
44999
|
-
const floatingDimensions = await getDimensionsFn(data.floating);
|
|
45000
|
-
return {
|
|
45001
|
-
reference: getRectRelativeToOffsetParent2(data.reference, await getOffsetParentFn(data.floating), data.strategy),
|
|
45002
|
-
floating: {
|
|
45003
|
-
x: 0,
|
|
45004
|
-
y: 0,
|
|
45005
|
-
width: floatingDimensions.width,
|
|
45006
|
-
height: floatingDimensions.height
|
|
45007
|
-
}
|
|
45008
|
-
};
|
|
45009
|
-
};
|
|
45010
|
-
function isRTL2(element) {
|
|
45011
|
-
return getComputedStyle2(element).direction === "rtl";
|
|
45012
|
-
}
|
|
45013
|
-
var platform2 = {
|
|
45014
|
-
convertOffsetParentRelativeRectToViewportRelativeRect: convertOffsetParentRelativeRectToViewportRelativeRect2,
|
|
45015
|
-
getDocumentElement,
|
|
45016
|
-
getClippingRect: getClippingRect2,
|
|
45017
|
-
getOffsetParent: getOffsetParent2,
|
|
45018
|
-
getElementRects: getElementRects2,
|
|
45019
|
-
getClientRects: getClientRects2,
|
|
45020
|
-
getDimensions: getDimensions2,
|
|
45021
|
-
getScale: getScale2,
|
|
45022
|
-
isElement,
|
|
45023
|
-
isRTL: isRTL2
|
|
45024
|
-
};
|
|
45025
|
-
function rectsAreEqual2(a2, b2) {
|
|
45026
|
-
return a2.x === b2.x && a2.y === b2.y && a2.width === b2.width && a2.height === b2.height;
|
|
45027
|
-
}
|
|
45028
|
-
function observeMove2(element, onMove) {
|
|
45029
|
-
let io2 = null;
|
|
45030
|
-
let timeoutId;
|
|
45031
|
-
const root = getDocumentElement(element);
|
|
45032
|
-
function cleanup() {
|
|
45033
|
-
var _io;
|
|
45034
|
-
clearTimeout(timeoutId);
|
|
45035
|
-
(_io = io2) == null || _io.disconnect();
|
|
45036
|
-
io2 = null;
|
|
45037
|
-
}
|
|
45038
|
-
function refresh(skip, threshold) {
|
|
45039
|
-
if (skip === void 0) {
|
|
45040
|
-
skip = false;
|
|
45041
|
-
}
|
|
45042
|
-
if (threshold === void 0) {
|
|
45043
|
-
threshold = 1;
|
|
45044
|
-
}
|
|
45045
|
-
cleanup();
|
|
45046
|
-
const elementRectForRootMargin = element.getBoundingClientRect();
|
|
45047
|
-
const {
|
|
45048
|
-
left,
|
|
45049
|
-
top,
|
|
45050
|
-
width,
|
|
45051
|
-
height
|
|
45052
|
-
} = elementRectForRootMargin;
|
|
45053
|
-
if (!skip) {
|
|
45054
|
-
onMove();
|
|
45055
|
-
}
|
|
45056
|
-
if (!width || !height) {
|
|
45057
|
-
return;
|
|
45058
|
-
}
|
|
45059
|
-
const insetTop = floor(top);
|
|
45060
|
-
const insetRight = floor(root.clientWidth - (left + width));
|
|
45061
|
-
const insetBottom = floor(root.clientHeight - (top + height));
|
|
45062
|
-
const insetLeft = floor(left);
|
|
45063
|
-
const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
|
|
45064
|
-
const options = {
|
|
45065
|
-
rootMargin,
|
|
45066
|
-
threshold: max(0, min(1, threshold)) || 1
|
|
45067
|
-
};
|
|
45068
|
-
let isFirstUpdate = true;
|
|
45069
|
-
function handleObserve(entries) {
|
|
45070
|
-
const ratio = entries[0].intersectionRatio;
|
|
45071
|
-
if (ratio !== threshold) {
|
|
45072
|
-
if (!isFirstUpdate) {
|
|
45073
|
-
return refresh();
|
|
45074
|
-
}
|
|
45075
|
-
if (!ratio) {
|
|
45076
|
-
timeoutId = setTimeout(() => {
|
|
45077
|
-
refresh(false, 1e-7);
|
|
45078
|
-
}, 1e3);
|
|
45079
|
-
} else {
|
|
45080
|
-
refresh(false, ratio);
|
|
45081
|
-
}
|
|
45082
|
-
}
|
|
45083
|
-
if (ratio === 1 && !rectsAreEqual2(elementRectForRootMargin, element.getBoundingClientRect())) {
|
|
45084
|
-
refresh();
|
|
45085
|
-
}
|
|
45086
|
-
isFirstUpdate = false;
|
|
45087
|
-
}
|
|
45088
|
-
try {
|
|
45089
|
-
io2 = new IntersectionObserver(handleObserve, {
|
|
45090
|
-
...options,
|
|
45091
|
-
// Handle <iframe>s
|
|
45092
|
-
root: root.ownerDocument
|
|
45093
|
-
});
|
|
45094
|
-
} catch (e2) {
|
|
45095
|
-
io2 = new IntersectionObserver(handleObserve, options);
|
|
45096
|
-
}
|
|
45097
|
-
io2.observe(element);
|
|
45098
|
-
}
|
|
45099
|
-
refresh(true);
|
|
45100
|
-
return cleanup;
|
|
45101
|
-
}
|
|
45102
|
-
function autoUpdate2(reference, floating, update, options) {
|
|
45103
|
-
if (options === void 0) {
|
|
45104
|
-
options = {};
|
|
45105
|
-
}
|
|
45106
|
-
const {
|
|
45107
|
-
ancestorScroll = true,
|
|
45108
|
-
ancestorResize = true,
|
|
45109
|
-
elementResize = typeof ResizeObserver === "function",
|
|
45110
|
-
layoutShift = typeof IntersectionObserver === "function",
|
|
45111
|
-
animationFrame = false
|
|
45112
|
-
} = options;
|
|
45113
|
-
const referenceEl = unwrapElement2(reference);
|
|
45114
|
-
const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...getOverflowAncestors(floating)] : [];
|
|
45115
|
-
ancestors.forEach((ancestor) => {
|
|
45116
|
-
ancestorScroll && ancestor.addEventListener("scroll", update, {
|
|
45117
|
-
passive: true
|
|
45118
|
-
});
|
|
45119
|
-
ancestorResize && ancestor.addEventListener("resize", update);
|
|
45120
|
-
});
|
|
45121
|
-
const cleanupIo = referenceEl && layoutShift ? observeMove2(referenceEl, update) : null;
|
|
45122
|
-
let reobserveFrame = -1;
|
|
45123
|
-
let resizeObserver = null;
|
|
45124
|
-
if (elementResize) {
|
|
45125
|
-
resizeObserver = new ResizeObserver((_ref) => {
|
|
45126
|
-
let [firstEntry] = _ref;
|
|
45127
|
-
if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
|
|
45128
|
-
resizeObserver.unobserve(floating);
|
|
45129
|
-
cancelAnimationFrame(reobserveFrame);
|
|
45130
|
-
reobserveFrame = requestAnimationFrame(() => {
|
|
45131
|
-
var _resizeObserver;
|
|
45132
|
-
(_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
|
|
45133
|
-
});
|
|
45134
|
-
}
|
|
45135
|
-
update();
|
|
45136
|
-
});
|
|
45137
|
-
if (referenceEl && !animationFrame) {
|
|
45138
|
-
resizeObserver.observe(referenceEl);
|
|
45139
|
-
}
|
|
45140
|
-
resizeObserver.observe(floating);
|
|
45141
|
-
}
|
|
45142
|
-
let frameId;
|
|
45143
|
-
let prevRefRect = animationFrame ? getBoundingClientRect2(reference) : null;
|
|
45144
|
-
if (animationFrame) {
|
|
45145
|
-
frameLoop();
|
|
45146
|
-
}
|
|
45147
|
-
function frameLoop() {
|
|
45148
|
-
const nextRefRect = getBoundingClientRect2(reference);
|
|
45149
|
-
if (prevRefRect && !rectsAreEqual2(prevRefRect, nextRefRect)) {
|
|
45150
|
-
update();
|
|
45151
|
-
}
|
|
45152
|
-
prevRefRect = nextRefRect;
|
|
45153
|
-
frameId = requestAnimationFrame(frameLoop);
|
|
45154
|
-
}
|
|
45155
|
-
update();
|
|
45156
|
-
return () => {
|
|
45157
|
-
var _resizeObserver2;
|
|
45158
|
-
ancestors.forEach((ancestor) => {
|
|
45159
|
-
ancestorScroll && ancestor.removeEventListener("scroll", update);
|
|
45160
|
-
ancestorResize && ancestor.removeEventListener("resize", update);
|
|
45161
|
-
});
|
|
45162
|
-
cleanupIo == null || cleanupIo();
|
|
45163
|
-
(_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
|
|
45164
|
-
resizeObserver = null;
|
|
45165
|
-
if (animationFrame) {
|
|
45166
|
-
cancelAnimationFrame(frameId);
|
|
45167
|
-
}
|
|
45168
|
-
};
|
|
45169
|
-
}
|
|
45170
|
-
var offset3 = offset;
|
|
45171
|
-
var shift3 = shift;
|
|
45172
|
-
var flip3 = flip;
|
|
45173
|
-
var computePosition3 = (reference, floating, options) => {
|
|
45174
|
-
const cache2 = /* @__PURE__ */ new Map();
|
|
45175
|
-
const mergedOptions = {
|
|
45176
|
-
platform: platform2,
|
|
45177
|
-
...options
|
|
45178
|
-
};
|
|
45179
|
-
const platformWithCache = {
|
|
45180
|
-
...mergedOptions.platform,
|
|
45181
|
-
_c: cache2
|
|
45182
|
-
};
|
|
45183
|
-
return computePosition(reference, floating, {
|
|
45184
|
-
...mergedOptions,
|
|
45185
|
-
platform: platformWithCache
|
|
45186
|
-
});
|
|
45187
|
-
};
|
|
45188
|
-
|
|
45189
44676
|
// src/surfaces/positioning.ts
|
|
45190
44677
|
var STATIC_SLOT_STYLES = {
|
|
45191
44678
|
drawer_right: {
|
|
@@ -45278,18 +44765,18 @@ var SyntrologieSDK = (() => {
|
|
|
45278
44765
|
function setupAdjacentPositioning(container, anchorEl, config) {
|
|
45279
44766
|
const placement = config.placement === "auto" ? "bottom" : config.placement;
|
|
45280
44767
|
const middleware = [
|
|
45281
|
-
|
|
44768
|
+
offset2(config.offset ? { mainAxis: config.offset.y, crossAxis: config.offset.x } : 8)
|
|
45282
44769
|
];
|
|
45283
44770
|
if (config.flip !== false) {
|
|
45284
|
-
middleware.push(
|
|
44771
|
+
middleware.push(flip2());
|
|
45285
44772
|
}
|
|
45286
44773
|
if (config.shift !== false) {
|
|
45287
|
-
middleware.push(
|
|
44774
|
+
middleware.push(shift2({ padding: 8 }));
|
|
45288
44775
|
}
|
|
45289
44776
|
container.style.position = "absolute";
|
|
45290
44777
|
container.style.zIndex = "2147483646";
|
|
45291
|
-
const cleanup =
|
|
45292
|
-
const { x: x2, y: y2, strategy } = await
|
|
44778
|
+
const cleanup = autoUpdate(anchorEl, container, async () => {
|
|
44779
|
+
const { x: x2, y: y2, strategy } = await computePosition2(anchorEl, container, {
|
|
45293
44780
|
placement,
|
|
45294
44781
|
middleware
|
|
45295
44782
|
});
|
|
@@ -45806,11 +45293,11 @@ var SyntrologieSDK = (() => {
|
|
|
45806
45293
|
|
|
45807
45294
|
// src/apps/AppContext.ts
|
|
45808
45295
|
function createAppContext(options) {
|
|
45809
|
-
const { appId, runtime:
|
|
45296
|
+
const { appId, runtime: runtime3, isBuiltIn = false } = options;
|
|
45810
45297
|
const _statePrefix = `app:${appId}:`;
|
|
45811
45298
|
const registeredActions = [];
|
|
45812
45299
|
const registeredWidgets = [];
|
|
45813
|
-
const appStorage =
|
|
45300
|
+
const appStorage = runtime3.state.ns(`app:${appId}`);
|
|
45814
45301
|
const context = {
|
|
45815
45302
|
appId,
|
|
45816
45303
|
// Namespaced state access (using session storage scoped to this app)
|
|
@@ -45820,19 +45307,19 @@ var SyntrologieSDK = (() => {
|
|
|
45820
45307
|
remove: (key) => appStorage.remove(key)
|
|
45821
45308
|
},
|
|
45822
45309
|
// Telemetry access (if available) - using EventBus for custom events
|
|
45823
|
-
telemetry:
|
|
45310
|
+
telemetry: runtime3.telemetry ? {
|
|
45824
45311
|
emit: (eventName, props) => {
|
|
45825
|
-
|
|
45312
|
+
runtime3.events.publish(eventName, {
|
|
45826
45313
|
...props,
|
|
45827
45314
|
_appId: appId
|
|
45828
45315
|
});
|
|
45829
45316
|
},
|
|
45830
|
-
getSessionId: () =>
|
|
45317
|
+
getSessionId: () => runtime3.telemetry?.getSessionId?.()
|
|
45831
45318
|
} : void 0,
|
|
45832
45319
|
// Surfaces access
|
|
45833
45320
|
surfaces: {
|
|
45834
45321
|
mount: (slot, content, opts) => {
|
|
45835
|
-
const handle =
|
|
45322
|
+
const handle = runtime3.surfaces.mount(slot, content, {
|
|
45836
45323
|
...opts,
|
|
45837
45324
|
adaptiveId: appId
|
|
45838
45325
|
});
|
|
@@ -45841,17 +45328,17 @@ var SyntrologieSDK = (() => {
|
|
|
45841
45328
|
update: (newContent) => handle.update(newContent)
|
|
45842
45329
|
};
|
|
45843
45330
|
},
|
|
45844
|
-
canMount: (slot, priority) =>
|
|
45331
|
+
canMount: (slot, priority) => runtime3.surfaces.canMount(slot, priority)
|
|
45845
45332
|
},
|
|
45846
45333
|
// Events access
|
|
45847
45334
|
events: {
|
|
45848
45335
|
subscribe: (callback) => {
|
|
45849
|
-
return
|
|
45336
|
+
return runtime3.events.subscribe((event) => {
|
|
45850
45337
|
callback(event);
|
|
45851
45338
|
});
|
|
45852
45339
|
},
|
|
45853
45340
|
publish: (name, props) => {
|
|
45854
|
-
|
|
45341
|
+
runtime3.events.publish(name, {
|
|
45855
45342
|
...props,
|
|
45856
45343
|
_appId: appId
|
|
45857
45344
|
});
|
|
@@ -45859,7 +45346,7 @@ var SyntrologieSDK = (() => {
|
|
|
45859
45346
|
},
|
|
45860
45347
|
// Action registration
|
|
45861
45348
|
registerAction: (definition) => {
|
|
45862
|
-
|
|
45349
|
+
runtime3.executors.register(
|
|
45863
45350
|
definition.kind,
|
|
45864
45351
|
definition.executor,
|
|
45865
45352
|
definition.schema,
|
|
@@ -45870,15 +45357,15 @@ var SyntrologieSDK = (() => {
|
|
|
45870
45357
|
},
|
|
45871
45358
|
// Widget registration
|
|
45872
45359
|
registerWidget: (definition) => {
|
|
45873
|
-
|
|
45360
|
+
runtime3.widgets.register(definition.id, definition.component, appId, definition.metadata);
|
|
45874
45361
|
registeredWidgets.push(definition.id);
|
|
45875
45362
|
}
|
|
45876
45363
|
};
|
|
45877
45364
|
return context;
|
|
45878
45365
|
}
|
|
45879
|
-
function cleanupAppContext(appId,
|
|
45880
|
-
|
|
45881
|
-
|
|
45366
|
+
function cleanupAppContext(appId, runtime3) {
|
|
45367
|
+
runtime3.executors.unregisterBySource(appId);
|
|
45368
|
+
runtime3.widgets.unregisterBySource(appId);
|
|
45882
45369
|
}
|
|
45883
45370
|
|
|
45884
45371
|
// src/apps/AppRegistry.ts
|
|
@@ -45892,8 +45379,8 @@ var SyntrologieSDK = (() => {
|
|
|
45892
45379
|
* Bind the registry to a runtime instance.
|
|
45893
45380
|
* Must be called before apps can be activated.
|
|
45894
45381
|
*/
|
|
45895
|
-
bind(
|
|
45896
|
-
this.runtime =
|
|
45382
|
+
bind(runtime3) {
|
|
45383
|
+
this.runtime = runtime3;
|
|
45897
45384
|
}
|
|
45898
45385
|
/**
|
|
45899
45386
|
* Unbind from the current runtime.
|
|
@@ -46158,22 +45645,19 @@ var SyntrologieSDK = (() => {
|
|
|
46158
45645
|
|
|
46159
45646
|
// src/apps/AppLoader.ts
|
|
46160
45647
|
var CORE_ACTION_KINDS = /* @__PURE__ */ new Set([
|
|
46161
|
-
// Overlay actions (bundled via @syntrologie/
|
|
45648
|
+
// Overlay actions (bundled via @syntrologie/adapt-overlays)
|
|
46162
45649
|
"overlays:highlight",
|
|
46163
45650
|
"overlays:pulse",
|
|
46164
45651
|
"overlays:badge",
|
|
46165
45652
|
"overlays:tooltip",
|
|
46166
45653
|
"overlays:modal",
|
|
46167
|
-
// Content actions (bundled via @syntrologie/
|
|
45654
|
+
// Content actions (bundled via @syntrologie/adapt-content)
|
|
46168
45655
|
"content:insertHtml",
|
|
46169
45656
|
"content:setText",
|
|
46170
45657
|
"content:setAttr",
|
|
46171
45658
|
"content:addClass",
|
|
46172
45659
|
"content:removeClass",
|
|
46173
45660
|
"content:setStyle",
|
|
46174
|
-
// Navigation actions (bundled via @syntrologie/app-navigation)
|
|
46175
|
-
"navigation:scrollTo",
|
|
46176
|
-
"navigation:navigate",
|
|
46177
45661
|
// Core actions (bundled with runtime)
|
|
46178
45662
|
"core:mountWidget",
|
|
46179
45663
|
"core:wait",
|
|
@@ -46181,6 +45665,13 @@ var SyntrologieSDK = (() => {
|
|
|
46181
45665
|
"core:parallel",
|
|
46182
45666
|
"core:tour"
|
|
46183
45667
|
]);
|
|
45668
|
+
var NAMESPACE_TO_APP_ID = {
|
|
45669
|
+
navigation: "nav"
|
|
45670
|
+
// navigation:scrollTo, navigation:navigate → apps/nav/
|
|
45671
|
+
};
|
|
45672
|
+
function resolveAppId(namespace) {
|
|
45673
|
+
return NAMESPACE_TO_APP_ID[namespace] ?? namespace;
|
|
45674
|
+
}
|
|
46184
45675
|
function isCoreActionKind(kind) {
|
|
46185
45676
|
return CORE_ACTION_KINDS.has(kind);
|
|
46186
45677
|
}
|
|
@@ -46188,12 +45679,12 @@ var SyntrologieSDK = (() => {
|
|
|
46188
45679
|
if (isCoreActionKind(kind)) return null;
|
|
46189
45680
|
const colonIndex = kind.indexOf(":");
|
|
46190
45681
|
if (colonIndex === -1) return null;
|
|
46191
|
-
return kind.slice(0, colonIndex);
|
|
45682
|
+
return resolveAppId(kind.slice(0, colonIndex));
|
|
46192
45683
|
}
|
|
46193
45684
|
function getAppIdFromWidgetId(widgetId) {
|
|
46194
45685
|
const colonIndex = widgetId.indexOf(":");
|
|
46195
45686
|
if (colonIndex === -1) return null;
|
|
46196
|
-
return widgetId.slice(0, colonIndex);
|
|
45687
|
+
return resolveAppId(widgetId.slice(0, colonIndex));
|
|
46197
45688
|
}
|
|
46198
45689
|
function createAppLoader(options) {
|
|
46199
45690
|
const { cdnBase, registry, timeout = 1e4, onLoadStart, onLoadEnd } = options;
|
|
@@ -46671,7 +46162,7 @@ var SyntrologieSDK = (() => {
|
|
|
46671
46162
|
function createSmartCanvasRuntime(options = {}) {
|
|
46672
46163
|
const { telemetry, sessionMetrics, routes, mode = "production", namespace } = options;
|
|
46673
46164
|
const widgets = options.widgets ?? widgetRegistry;
|
|
46674
|
-
const
|
|
46165
|
+
const executors3 = options.executors ?? executorRegistry;
|
|
46675
46166
|
const apps = options.apps ?? appRegistry;
|
|
46676
46167
|
const context = createContextManager({
|
|
46677
46168
|
telemetry,
|
|
@@ -46699,9 +46190,9 @@ var SyntrologieSDK = (() => {
|
|
|
46699
46190
|
eventBus: events,
|
|
46700
46191
|
surfaces,
|
|
46701
46192
|
anchorResolver,
|
|
46702
|
-
executorRegistry:
|
|
46193
|
+
executorRegistry: executors3
|
|
46703
46194
|
});
|
|
46704
|
-
const
|
|
46195
|
+
const runtime3 = {
|
|
46705
46196
|
telemetry,
|
|
46706
46197
|
context,
|
|
46707
46198
|
events,
|
|
@@ -46710,7 +46201,7 @@ var SyntrologieSDK = (() => {
|
|
|
46710
46201
|
actions,
|
|
46711
46202
|
surfaces,
|
|
46712
46203
|
widgets,
|
|
46713
|
-
executors:
|
|
46204
|
+
executors: executors3,
|
|
46714
46205
|
apps,
|
|
46715
46206
|
version: RUNTIME_VERSION,
|
|
46716
46207
|
mode,
|
|
@@ -46755,8 +46246,8 @@ var SyntrologieSDK = (() => {
|
|
|
46755
46246
|
surfaces.destroy();
|
|
46756
46247
|
}
|
|
46757
46248
|
};
|
|
46758
|
-
apps.bind(
|
|
46759
|
-
return
|
|
46249
|
+
apps.bind(runtime3);
|
|
46250
|
+
return runtime3;
|
|
46760
46251
|
}
|
|
46761
46252
|
|
|
46762
46253
|
// src/token.ts
|
|
@@ -47153,7 +46644,7 @@ var SyntrologieSDK = (() => {
|
|
|
47153
46644
|
if (editorMode) runtimeMode = "editor";
|
|
47154
46645
|
else if (auditMode) runtimeMode = "audit";
|
|
47155
46646
|
else if (getEnvVar("NODE_ENV") === "development") runtimeMode = "development";
|
|
47156
|
-
const
|
|
46647
|
+
const runtime3 = createSmartCanvasRuntime({
|
|
47157
46648
|
telemetry,
|
|
47158
46649
|
sessionMetrics,
|
|
47159
46650
|
mode: runtimeMode,
|
|
@@ -47161,17 +46652,17 @@ var SyntrologieSDK = (() => {
|
|
|
47161
46652
|
// Use the EventBus we created earlier (already wired to PostHog)
|
|
47162
46653
|
});
|
|
47163
46654
|
debug("Syntro Bootstrap", "Runtime created:", {
|
|
47164
|
-
version:
|
|
47165
|
-
mode:
|
|
47166
|
-
hasContext: !!
|
|
47167
|
-
hasEvents: !!
|
|
47168
|
-
hasState: !!
|
|
46655
|
+
version: runtime3.version,
|
|
46656
|
+
mode: runtime3.mode,
|
|
46657
|
+
hasContext: !!runtime3.context,
|
|
46658
|
+
hasEvents: !!runtime3.events,
|
|
46659
|
+
hasState: !!runtime3.state
|
|
47169
46660
|
});
|
|
47170
46661
|
debug("Syntro Bootstrap", "Core app executors already registered");
|
|
47171
|
-
const cdnBase = options.cdnBase || getEnvVar("NEXT_PUBLIC_SYNTRO_CDN_BASE") || getEnvVar("VITE_SYNTRO_CDN_BASE") || "https://cdn.
|
|
46662
|
+
const cdnBase = options.cdnBase || getEnvVar("NEXT_PUBLIC_SYNTRO_CDN_BASE") || getEnvVar("VITE_SYNTRO_CDN_BASE") || "https://cdn.syntrologie.com";
|
|
47172
46663
|
const appLoader = createAppLoader({
|
|
47173
46664
|
cdnBase,
|
|
47174
|
-
registry:
|
|
46665
|
+
registry: runtime3.apps,
|
|
47175
46666
|
onLoadStart: (appId) => {
|
|
47176
46667
|
debug("Syntro Bootstrap", `Loading app from CDN: ${appId}`);
|
|
47177
46668
|
},
|
|
@@ -47185,9 +46676,9 @@ var SyntrologieSDK = (() => {
|
|
|
47185
46676
|
});
|
|
47186
46677
|
if (typeof window !== "undefined") {
|
|
47187
46678
|
window.SynOS = {
|
|
47188
|
-
appRegistry:
|
|
47189
|
-
runtime:
|
|
47190
|
-
version:
|
|
46679
|
+
appRegistry: runtime3.apps,
|
|
46680
|
+
runtime: runtime3,
|
|
46681
|
+
version: runtime3.version
|
|
47191
46682
|
};
|
|
47192
46683
|
debug("Syntro Bootstrap", "Global SynOS object exposed");
|
|
47193
46684
|
}
|
|
@@ -47226,9 +46717,9 @@ var SyntrologieSDK = (() => {
|
|
|
47226
46717
|
warn("Syntro Bootstrap", "Some apps failed to load:", failedApps);
|
|
47227
46718
|
}
|
|
47228
46719
|
for (const appId of requiredApps) {
|
|
47229
|
-
if (
|
|
46720
|
+
if (runtime3.apps.has(appId)) {
|
|
47230
46721
|
try {
|
|
47231
|
-
await
|
|
46722
|
+
await runtime3.apps.activate(appId);
|
|
47232
46723
|
} catch (err) {
|
|
47233
46724
|
warn("Syntro Bootstrap", `Failed to activate app: ${appId}`, err);
|
|
47234
46725
|
}
|
|
@@ -47244,10 +46735,10 @@ var SyntrologieSDK = (() => {
|
|
|
47244
46735
|
fetcher: appLoadingFetcher,
|
|
47245
46736
|
integrations: { experiments, telemetry },
|
|
47246
46737
|
editorUrl,
|
|
47247
|
-
runtime:
|
|
46738
|
+
runtime: runtime3
|
|
47248
46739
|
// Pass runtime so actions can be applied
|
|
47249
46740
|
});
|
|
47250
|
-
return { canvas, runtime:
|
|
46741
|
+
return { canvas, runtime: runtime3, experiments, telemetry, sessionMetrics, appLoader };
|
|
47251
46742
|
}
|
|
47252
46743
|
var Syntro = {
|
|
47253
46744
|
init,
|