@steedos/webapp 3.0.0-beta.26 → 3.0.0-beta.28
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.
|
@@ -48040,7 +48040,7 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
48040
48040
|
});
|
|
48041
48041
|
});
|
|
48042
48042
|
var define_process_env_default = {};
|
|
48043
|
-
var SDK_VERSION = "8.0.
|
|
48043
|
+
var SDK_VERSION = "8.0.37", _a;
|
|
48044
48044
|
"undefined" != typeof window && (null === (_a = window.parent) || void 0 === _a || _a.postMessage({ type: "builder.isReactSdk", data: { value: true, supportsPatchUpdates: "v4", supportsCustomBreakpoints: true, supportsGlobalSymbols: true, blockLevelPersonalization: true, version: SDK_VERSION } }, "*"));
|
|
48045
48045
|
var extendStatics = function(e, t2) {
|
|
48046
48046
|
return (extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e2, t22) {
|
|
@@ -48058,57 +48058,57 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
48058
48058
|
}
|
|
48059
48059
|
var __assign = function() {
|
|
48060
48060
|
return (__assign = Object.assign || function(e) {
|
|
48061
|
-
for (var t2, n = 1,
|
|
48061
|
+
for (var t2, n = 1, r2 = arguments.length; n < r2; n++) for (var i in t2 = arguments[n]) Object.prototype.hasOwnProperty.call(t2, i) && (e[i] = t2[i]);
|
|
48062
48062
|
return e;
|
|
48063
48063
|
}).apply(this, arguments);
|
|
48064
48064
|
};
|
|
48065
48065
|
function __rest(e, t2) {
|
|
48066
48066
|
var n = {};
|
|
48067
|
-
for (var
|
|
48067
|
+
for (var r2 in e) Object.prototype.hasOwnProperty.call(e, r2) && t2.indexOf(r2) < 0 && (n[r2] = e[r2]);
|
|
48068
48068
|
if (null != e && "function" == typeof Object.getOwnPropertySymbols) {
|
|
48069
|
-
var
|
|
48070
|
-
for (
|
|
48069
|
+
var i = 0;
|
|
48070
|
+
for (r2 = Object.getOwnPropertySymbols(e); i < r2.length; i++) t2.indexOf(r2[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r2[i]) && (n[r2[i]] = e[r2[i]]);
|
|
48071
48071
|
}
|
|
48072
48072
|
return n;
|
|
48073
48073
|
}
|
|
48074
|
-
function __decorate(e, t2, n,
|
|
48075
|
-
var
|
|
48076
|
-
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t2, n,
|
|
48077
|
-
else for (var s = e.length - 1; s >= 0; s--) (
|
|
48074
|
+
function __decorate(e, t2, n, r2) {
|
|
48075
|
+
var i, o = arguments.length, a = o < 3 ? t2 : null === r2 ? r2 = Object.getOwnPropertyDescriptor(t2, n) : r2;
|
|
48076
|
+
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t2, n, r2);
|
|
48077
|
+
else for (var s = e.length - 1; s >= 0; s--) (i = e[s]) && (a = (o < 3 ? i(a) : o > 3 ? i(t2, n, a) : i(t2, n)) || a);
|
|
48078
48078
|
return o > 3 && a && Object.defineProperty(t2, n, a), a;
|
|
48079
48079
|
}
|
|
48080
48080
|
function __metadata(e, t2) {
|
|
48081
48081
|
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(e, t2);
|
|
48082
48082
|
}
|
|
48083
|
-
function __awaiter(e, t2, n,
|
|
48084
|
-
return new (n || (n = Promise))(function(
|
|
48083
|
+
function __awaiter(e, t2, n, r2) {
|
|
48084
|
+
return new (n || (n = Promise))(function(i, o) {
|
|
48085
48085
|
function a(e2) {
|
|
48086
48086
|
try {
|
|
48087
|
-
l(
|
|
48087
|
+
l(r2.next(e2));
|
|
48088
48088
|
} catch (e3) {
|
|
48089
48089
|
o(e3);
|
|
48090
48090
|
}
|
|
48091
48091
|
}
|
|
48092
48092
|
function s(e2) {
|
|
48093
48093
|
try {
|
|
48094
|
-
l(
|
|
48094
|
+
l(r2.throw(e2));
|
|
48095
48095
|
} catch (e3) {
|
|
48096
48096
|
o(e3);
|
|
48097
48097
|
}
|
|
48098
48098
|
}
|
|
48099
48099
|
function l(e2) {
|
|
48100
48100
|
var t22;
|
|
48101
|
-
e2.done ?
|
|
48101
|
+
e2.done ? i(e2.value) : (t22 = e2.value, t22 instanceof n ? t22 : new n(function(e3) {
|
|
48102
48102
|
e3(t22);
|
|
48103
48103
|
})).then(a, s);
|
|
48104
48104
|
}
|
|
48105
|
-
l((
|
|
48105
|
+
l((r2 = r2.apply(e, [])).next());
|
|
48106
48106
|
});
|
|
48107
48107
|
}
|
|
48108
48108
|
function __generator(e, t2) {
|
|
48109
|
-
var n,
|
|
48110
|
-
if (1 &
|
|
48111
|
-
return
|
|
48109
|
+
var n, r2, i, o = { label: 0, sent: function() {
|
|
48110
|
+
if (1 & i[0]) throw i[1];
|
|
48111
|
+
return i[1];
|
|
48112
48112
|
}, trys: [], ops: [] }, a = Object.create(("function" == typeof Iterator ? Iterator : Object).prototype);
|
|
48113
48113
|
return a.next = s(0), a.throw = s(1), a.return = s(2), "function" == typeof Symbol && (a[Symbol.iterator] = function() {
|
|
48114
48114
|
return this;
|
|
@@ -48118,45 +48118,45 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
48118
48118
|
return function(s3) {
|
|
48119
48119
|
if (n) throw new TypeError("Generator is already executing.");
|
|
48120
48120
|
for (; a && (a = 0, s3[0] && (o = 0)), o; ) try {
|
|
48121
|
-
if (n = 1,
|
|
48122
|
-
switch (
|
|
48121
|
+
if (n = 1, r2 && (i = 2 & s3[0] ? r2.return : s3[0] ? r2.throw || ((i = r2.return) && i.call(r2), 0) : r2.next) && !(i = i.call(r2, s3[1])).done) return i;
|
|
48122
|
+
switch (r2 = 0, i && (s3 = [2 & s3[0], i.value]), s3[0]) {
|
|
48123
48123
|
case 0:
|
|
48124
48124
|
case 1:
|
|
48125
|
-
|
|
48125
|
+
i = s3;
|
|
48126
48126
|
break;
|
|
48127
48127
|
case 4:
|
|
48128
48128
|
return o.label++, { value: s3[1], done: false };
|
|
48129
48129
|
case 5:
|
|
48130
|
-
o.label++,
|
|
48130
|
+
o.label++, r2 = s3[1], s3 = [0];
|
|
48131
48131
|
continue;
|
|
48132
48132
|
case 7:
|
|
48133
48133
|
s3 = o.ops.pop(), o.trys.pop();
|
|
48134
48134
|
continue;
|
|
48135
48135
|
default:
|
|
48136
|
-
if (!(
|
|
48136
|
+
if (!(i = o.trys, (i = i.length > 0 && i[i.length - 1]) || 6 !== s3[0] && 2 !== s3[0])) {
|
|
48137
48137
|
o = 0;
|
|
48138
48138
|
continue;
|
|
48139
48139
|
}
|
|
48140
|
-
if (3 === s3[0] && (!
|
|
48140
|
+
if (3 === s3[0] && (!i || s3[1] > i[0] && s3[1] < i[3])) {
|
|
48141
48141
|
o.label = s3[1];
|
|
48142
48142
|
break;
|
|
48143
48143
|
}
|
|
48144
|
-
if (6 === s3[0] && o.label <
|
|
48145
|
-
o.label =
|
|
48144
|
+
if (6 === s3[0] && o.label < i[1]) {
|
|
48145
|
+
o.label = i[1], i = s3;
|
|
48146
48146
|
break;
|
|
48147
48147
|
}
|
|
48148
|
-
if (
|
|
48149
|
-
o.label =
|
|
48148
|
+
if (i && o.label < i[2]) {
|
|
48149
|
+
o.label = i[2], o.ops.push(s3);
|
|
48150
48150
|
break;
|
|
48151
48151
|
}
|
|
48152
|
-
|
|
48152
|
+
i[2] && o.ops.pop(), o.trys.pop();
|
|
48153
48153
|
continue;
|
|
48154
48154
|
}
|
|
48155
48155
|
s3 = t2.call(e, o);
|
|
48156
48156
|
} catch (e2) {
|
|
48157
|
-
s3 = [6, e2],
|
|
48157
|
+
s3 = [6, e2], r2 = 0;
|
|
48158
48158
|
} finally {
|
|
48159
|
-
n =
|
|
48159
|
+
n = i = 0;
|
|
48160
48160
|
}
|
|
48161
48161
|
if (5 & s3[0]) throw s3[1];
|
|
48162
48162
|
return { value: s3[0] ? s3[1] : void 0, done: true };
|
|
@@ -48165,31 +48165,31 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
48165
48165
|
}
|
|
48166
48166
|
}
|
|
48167
48167
|
function __values(e) {
|
|
48168
|
-
var t2 = "function" == typeof Symbol && Symbol.iterator, n = t2 && e[t2],
|
|
48168
|
+
var t2 = "function" == typeof Symbol && Symbol.iterator, n = t2 && e[t2], r2 = 0;
|
|
48169
48169
|
if (n) return n.call(e);
|
|
48170
48170
|
if (e && "number" == typeof e.length) return { next: function() {
|
|
48171
|
-
return e &&
|
|
48171
|
+
return e && r2 >= e.length && (e = void 0), { value: e && e[r2++], done: !e };
|
|
48172
48172
|
} };
|
|
48173
48173
|
throw new TypeError(t2 ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
48174
48174
|
}
|
|
48175
48175
|
function __spreadArray(e, t2, n) {
|
|
48176
|
-
if (n || 2 === arguments.length) for (var
|
|
48177
|
-
return e.concat(
|
|
48176
|
+
if (n || 2 === arguments.length) for (var r2, i = 0, o = t2.length; i < o; i++) !r2 && i in t2 || (r2 || (r2 = Array.prototype.slice.call(t2, 0, i)), r2[i] = t2[i]);
|
|
48177
|
+
return e.concat(r2 || Array.prototype.slice.call(t2));
|
|
48178
48178
|
}
|
|
48179
48179
|
function __asyncValues(e) {
|
|
48180
48180
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
48181
48181
|
var t2, n = e[Symbol.asyncIterator];
|
|
48182
|
-
return n ? n.call(e) : (e = "function" == typeof __values ? __values(e) : e[Symbol.iterator](), t2 = {},
|
|
48182
|
+
return n ? n.call(e) : (e = "function" == typeof __values ? __values(e) : e[Symbol.iterator](), t2 = {}, r2("next"), r2("throw"), r2("return"), t2[Symbol.asyncIterator] = function() {
|
|
48183
48183
|
return this;
|
|
48184
48184
|
}, t2);
|
|
48185
|
-
function
|
|
48185
|
+
function r2(n2) {
|
|
48186
48186
|
t2[n2] = e[n2] && function(t22) {
|
|
48187
|
-
return new Promise(function(
|
|
48188
|
-
(function(e2, t3, n3,
|
|
48189
|
-
Promise.resolve(
|
|
48187
|
+
return new Promise(function(r22, i) {
|
|
48188
|
+
(function(e2, t3, n3, r3) {
|
|
48189
|
+
Promise.resolve(r3).then(function(t4) {
|
|
48190
48190
|
e2({ value: t4, done: n3 });
|
|
48191
48191
|
}, t3);
|
|
48192
|
-
})(
|
|
48192
|
+
})(r22, i, (t22 = e[n2](t22)).done, t22.value);
|
|
48193
48193
|
});
|
|
48194
48194
|
};
|
|
48195
48195
|
}
|
|
@@ -48199,34 +48199,34 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
48199
48199
|
return JSON.parse(JSON.stringify(e));
|
|
48200
48200
|
}, omit$2 = function(e) {
|
|
48201
48201
|
for (var t2 = [], n = 1; n < arguments.length; n++) t2[n - 1] = arguments[n];
|
|
48202
|
-
for (var
|
|
48203
|
-
var a = o[
|
|
48204
|
-
delete
|
|
48202
|
+
for (var r2 = Object.assign({}, e), i = 0, o = t2; i < o.length; i++) {
|
|
48203
|
+
var a = o[i];
|
|
48204
|
+
delete r2[a];
|
|
48205
48205
|
}
|
|
48206
|
-
return
|
|
48206
|
+
return r2;
|
|
48207
48207
|
}, sizeNames = ["xsmall", "small", "medium", "large"], sizes = { xsmall: { min: 0, default: 0, max: 0 }, small: { min: 320, default: 321, max: 640 }, medium: { min: 641, default: 642, max: 991 }, large: { min: 990, default: 991, max: 1200 }, getWidthForSize: function(e) {
|
|
48208
48208
|
return this[e].default;
|
|
48209
48209
|
}, getSizeForWidth: function(e) {
|
|
48210
48210
|
for (var t2 = 0, n = sizeNames; t2 < n.length; t2++) {
|
|
48211
|
-
var
|
|
48212
|
-
if (e <= this[
|
|
48211
|
+
var r2 = n[t2];
|
|
48212
|
+
if (e <= this[r2].max) return r2;
|
|
48213
48213
|
}
|
|
48214
48214
|
return "large";
|
|
48215
48215
|
} }, getSizesForBreakpoints = function(e) {
|
|
48216
|
-
var t2 = e.small, n = e.medium,
|
|
48217
|
-
if (!t2 || !n) return
|
|
48218
|
-
var
|
|
48219
|
-
|
|
48220
|
-
var o =
|
|
48221
|
-
|
|
48222
|
-
var a =
|
|
48223
|
-
return
|
|
48216
|
+
var t2 = e.small, n = e.medium, r2 = __assign(__assign({}, sizes), fastClone(sizes));
|
|
48217
|
+
if (!t2 || !n) return r2;
|
|
48218
|
+
var i = Math.floor(t2 / 2);
|
|
48219
|
+
r2.small = { max: t2, min: i, default: i + 1 };
|
|
48220
|
+
var o = r2.small.max + 1;
|
|
48221
|
+
r2.medium = { max: n, min: o, default: o + 1 };
|
|
48222
|
+
var a = r2.medium.max + 1;
|
|
48223
|
+
return r2.large = { max: 2e3, min: a, default: a + 1 }, r2;
|
|
48224
48224
|
}, set = function(e, t2, n) {
|
|
48225
48225
|
if (Object(e) !== e) return e;
|
|
48226
|
-
var
|
|
48227
|
-
return
|
|
48228
|
-
return Object(e2[t22]) === e2[t22] ? e2[t22] : e2[t22] = Math.abs(Number(
|
|
48229
|
-
}, e)[
|
|
48226
|
+
var r2 = Array.isArray(t2) ? t2 : t2.toString().match(/[^.[\]]+/g);
|
|
48227
|
+
return r2.slice(0, -1).reduce(function(e2, t22, n2) {
|
|
48228
|
+
return Object(e2[t22]) === e2[t22] ? e2[t22] : e2[t22] = Math.abs(Number(r2[n2 + 1])) >> 0 == +r2[n2 + 1] ? [] : {};
|
|
48229
|
+
}, e)[r2[r2.length - 1]] = n, e;
|
|
48230
48230
|
}, noop$1 = function() {
|
|
48231
48231
|
return null;
|
|
48232
48232
|
}, safeDynamicRequire;
|
|
@@ -48246,16 +48246,16 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
48246
48246
|
var shouldForceBrowserRuntimeInNode = function() {
|
|
48247
48247
|
var e;
|
|
48248
48248
|
if (!isNodeRuntime()) return false;
|
|
48249
|
-
var t2 = "arm64" === process.arch, n = process.version.startsWith("v20"),
|
|
48250
|
-
return !(!t2 || !n ||
|
|
48249
|
+
var t2 = "arm64" === process.arch, n = process.version.startsWith("v20"), r2 = null === (e = define_process_env_default.NODE_OPTIONS) || void 0 === e ? void 0 : e.includes("--no-node-snapshot");
|
|
48250
|
+
return !(!t2 || !n || r2) && (console.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/react/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "), true);
|
|
48251
48251
|
}, fnCache = {}, api = function(e) {
|
|
48252
48252
|
return builder;
|
|
48253
48253
|
};
|
|
48254
|
-
function stringToFunction(e, t2, n,
|
|
48254
|
+
function stringToFunction(e, t2, n, r2) {
|
|
48255
48255
|
if (void 0 === t2 && (t2 = true), !e || !e.trim()) return function() {
|
|
48256
48256
|
};
|
|
48257
|
-
var
|
|
48258
|
-
if (fnCache[
|
|
48257
|
+
var i = e + ":" + t2;
|
|
48258
|
+
if (fnCache[i]) return fnCache[i];
|
|
48259
48259
|
var o = t2 && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) || e.trim().startsWith("builder.run"), a = function() {
|
|
48260
48260
|
};
|
|
48261
48261
|
try {
|
|
@@ -48263,13 +48263,13 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
48263
48263
|
} catch (t22) {
|
|
48264
48264
|
n && n.push(t22);
|
|
48265
48265
|
var s = t22 && t22.message;
|
|
48266
|
-
s && "string" == typeof s &&
|
|
48266
|
+
s && "string" == typeof s && r2 && -1 === r2.indexOf(s) && r2.push(s), Builder$1.isBrowser && console.warn("Function compile error in ".concat(e), t22);
|
|
48267
48267
|
}
|
|
48268
48268
|
var l = function() {
|
|
48269
|
-
for (var t22 = [],
|
|
48269
|
+
for (var t22 = [], r22 = 0; r22 < arguments.length; r22++) t22[r22] = arguments[r22];
|
|
48270
48270
|
try {
|
|
48271
48271
|
if (Builder$1.isBrowser || shouldForceBrowserRuntimeInNode()) return a.apply(void 0, t22);
|
|
48272
|
-
var
|
|
48272
|
+
var i2 = getIsolateContext(), s2 = safeDynamicRequire("isolated-vm"), l2 = i2.evalClosureSync(makeFn(e, o), t22.map(function(e2, t3) {
|
|
48273
48273
|
return "object" == typeof e2 ? new s2.Reference(t3 === indexOfBuilderInstance ? __assign(__assign({}, e2), { getUserAttributes: function() {
|
|
48274
48274
|
return e2.getUserAttributes("");
|
|
48275
48275
|
} }) : e2) : null;
|
|
@@ -48284,13 +48284,13 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
48284
48284
|
return Builder$1.isBrowser ? console.warn("Builder custom code error:", t3.message || t3, "in", e, t3.stack || t3) : isDebug() && console.debug("Builder custom code error:", t3.message || t3, "in", e, t3.stack || t3), n && n.push(t3), null;
|
|
48285
48285
|
}
|
|
48286
48286
|
};
|
|
48287
|
-
return Builder$1.isBrowser && (fnCache[
|
|
48287
|
+
return Builder$1.isBrowser && (fnCache[i] = l), l;
|
|
48288
48288
|
}
|
|
48289
48289
|
var indexOfBuilderInstance = 3, makeFn = function(e, t2, n) {
|
|
48290
|
-
var
|
|
48291
|
-
return "\n".concat("\n var refToProxy = (obj) => {\n if (typeof obj !== 'object' || obj === null) {\n return obj;\n }\n return new Proxy({}, {\n get(target, key) {\n if (key === 'copySync') {\n return () => obj.copySync();\n }\n const val = obj.getSync(key);\n if (typeof val?.copySync === 'function') {\n return JSON.parse(stringify(val));\n }\n return val;\n },\n set(target, key, value) {\n obj.setSync(key, value);\n },\n deleteProperty(target, key) {\n obj.deleteSync(key);\n }\n })\n }\n", "\n").concat("\n var stringify = (val) => {\n if (typeof val === 'object' && val !== null) {\n return JSON.stringify(val.copySync ? val.copySync() : val);\n }\n return val;\n }\n ", "\n").concat(
|
|
48290
|
+
var r2 = n || ["state", "event", "block", "builder", "Device", "update", "Builder", "context"];
|
|
48291
|
+
return "\n".concat("\n var refToProxy = (obj) => {\n if (typeof obj !== 'object' || obj === null) {\n return obj;\n }\n return new Proxy({}, {\n get(target, key) {\n if (key === 'copySync') {\n return () => obj.copySync();\n }\n const val = obj.getSync(key);\n if (typeof val?.copySync === 'function') {\n return JSON.parse(stringify(val));\n }\n return val;\n },\n set(target, key, value) {\n obj.setSync(key, value);\n },\n deleteProperty(target, key) {\n obj.deleteSync(key);\n }\n })\n }\n", "\n").concat("\n var stringify = (val) => {\n if (typeof val === 'object' && val !== null) {\n return JSON.stringify(val.copySync ? val.copySync() : val);\n }\n return val;\n }\n ", "\n").concat(r2.map(function(e2, t22) {
|
|
48292
48292
|
return "var ".concat(e2, " = refToProxy($").concat(t22, ");");
|
|
48293
|
-
}).join("\n")).concat("\n".concat(
|
|
48293
|
+
}).join("\n")).concat("\n".concat(r2.includes("context") ? "var ctx = context;" : "", "\nvar endResult = function() {\n ").concat(t2 ? "return (".concat(e, ");") : e, ";\n};\n\nreturn stringify(endResult());\n"));
|
|
48294
48294
|
}, getIsolateContext = function() {
|
|
48295
48295
|
var e = Builder$1.serverContext;
|
|
48296
48296
|
e || (e = new (safeDynamicRequire("isolated-vm")).Isolate({ memoryLimit: 128 }).createContextSync(), Builder$1.setServerContext(e));
|
|
@@ -48307,16 +48307,16 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
48307
48307
|
return null;
|
|
48308
48308
|
} }), applyPatchWithMinimalMutationChain = function(e, t2, n) {
|
|
48309
48309
|
if (void 0 === n && (n = false), Object(e) !== e) return e;
|
|
48310
|
-
var
|
|
48310
|
+
var r2 = t2.path, i = t2.op, o = t2.value, a = r2.split(/\//);
|
|
48311
48311
|
"" === a[0] && a.shift();
|
|
48312
48312
|
for (var s = n ? e : __assign({}, e), l = s, u = 0; u < a.length; u++) {
|
|
48313
48313
|
var c = u === a.length - 1, d = a[u];
|
|
48314
48314
|
if (c) {
|
|
48315
|
-
if ("replace" ===
|
|
48316
|
-
else if ("add" ===
|
|
48315
|
+
if ("replace" === i) l[d] = o;
|
|
48316
|
+
else if ("add" === i) {
|
|
48317
48317
|
var p = Number(d);
|
|
48318
48318
|
Array.isArray(l) ? "-" === d ? l.push(o) : l.splice(p, 0, o) : l[d] = o;
|
|
48319
|
-
} else if ("remove" ===
|
|
48319
|
+
} else if ("remove" === i) {
|
|
48320
48320
|
p = Number(d);
|
|
48321
48321
|
Array.isArray(l) ? l.splice(p, 1) : delete l[d];
|
|
48322
48322
|
}
|
|
@@ -48340,18 +48340,18 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
48340
48340
|
return t2.renderLink ? t2.renderLink(e) : React$1.createElement("a", __assign({}, e));
|
|
48341
48341
|
});
|
|
48342
48342
|
};
|
|
48343
|
-
function traverse(e, t2, n,
|
|
48344
|
-
void 0 === n && (n = null), void 0 ===
|
|
48343
|
+
function traverse(e, t2, n, r2, i) {
|
|
48344
|
+
void 0 === n && (n = null), void 0 === r2 && (r2 = null), void 0 === i && (i = /* @__PURE__ */ new WeakSet()), null != e && "object" == typeof e ? i.has(e) || (i.add(e), Array.isArray(e) ? e.forEach(function(n2, r22) {
|
|
48345
48345
|
t2(n2, function(t22) {
|
|
48346
|
-
e[
|
|
48347
|
-
}), traverse(n2, t2, e,
|
|
48346
|
+
e[r22] = t22;
|
|
48347
|
+
}), traverse(n2, t2, e, r22, i);
|
|
48348
48348
|
}) : Object.entries(e).forEach(function(n2) {
|
|
48349
|
-
var
|
|
48349
|
+
var r22 = n2[0], o = n2[1];
|
|
48350
48350
|
t2(o, function(t22) {
|
|
48351
|
-
e[
|
|
48352
|
-
}), traverse(o, t2, e,
|
|
48351
|
+
e[r22] = t22;
|
|
48352
|
+
}), traverse(o, t2, e, r22, i);
|
|
48353
48353
|
})) : t2(e, function(e2) {
|
|
48354
|
-
null !== n && null !==
|
|
48354
|
+
null !== n && null !== r2 && (n[r2] = e2);
|
|
48355
48355
|
});
|
|
48356
48356
|
}
|
|
48357
48357
|
var isLocalizedField = function(e) {
|
|
@@ -48364,8 +48364,8 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
48364
48364
|
}), t2;
|
|
48365
48365
|
}, extractLocalizedValues = function(e, t2) {
|
|
48366
48366
|
return e && Object.getOwnPropertyNames(e).length ? (traverse(e, function(e2, n) {
|
|
48367
|
-
var
|
|
48368
|
-
isLocalizedField(e2) && n(null !== (
|
|
48367
|
+
var r2;
|
|
48368
|
+
isLocalizedField(e2) && n(null !== (r2 = e2[t2]) && void 0 !== r2 ? r2 : void 0);
|
|
48369
48369
|
}), e) : {};
|
|
48370
48370
|
}, camelCaseToKebabCase = function(e) {
|
|
48371
48371
|
return e ? e.replace(/([A-Z])/g, function(e2) {
|
|
@@ -48390,8 +48390,8 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
48390
48390
|
return e[e.length - 1];
|
|
48391
48391
|
};
|
|
48392
48392
|
function omit$1(e, t2) {
|
|
48393
|
-
for (var n = Object.assign({}, e),
|
|
48394
|
-
delete n[r2
|
|
48393
|
+
for (var n = Object.assign({}, e), r2 = 0, i = t2; r2 < i.length; r2++) {
|
|
48394
|
+
delete n[i[r2]];
|
|
48395
48395
|
}
|
|
48396
48396
|
return n;
|
|
48397
48397
|
}
|
|
@@ -48443,7 +48443,7 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
48443
48443
|
}, Object.defineProperty(BuilderBlock.prototype, "block", { get: function() {
|
|
48444
48444
|
return this.props.block;
|
|
48445
48445
|
}, enumerable: false, configurable: true }), BuilderBlock.prototype.emotionCss = function(e) {
|
|
48446
|
-
var t2, n,
|
|
48446
|
+
var t2, n, r2, i, o, a = this.block, s = a.animations && a.animations[0];
|
|
48447
48447
|
if (s && "hover" !== s.trigger) {
|
|
48448
48448
|
var l = s && s.steps && s.steps[0], u = l && l.styles;
|
|
48449
48449
|
u && (o = u);
|
|
@@ -48460,7 +48460,7 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
48460
48460
|
var v = a.animations && a.animations.find(function(e2) {
|
|
48461
48461
|
return "hover" === e2.trigger;
|
|
48462
48462
|
});
|
|
48463
|
-
return v && (d[":hover"] = (null === (
|
|
48463
|
+
return v && (d[":hover"] = (null === (i = null === (r2 = v.steps) || void 0 === r2 ? void 0 : r2[1]) || void 0 === i ? void 0 : i.styles) || {}, d.transition = "all ".concat(v.duration, "s ").concat(camelCaseToKebabCase(v.easing)), v.delay && (d.transitionDelay = v.delay + "s")), d;
|
|
48464
48464
|
}, BuilderBlock.prototype.eval = function(e) {
|
|
48465
48465
|
return this.stringToFunction(e)(this.privateState.state, void 0, this.block, builder, Device, this.privateState.update, Builder$1, this.privateState.context);
|
|
48466
48466
|
}, BuilderBlock.prototype.componentWillUnmount = function() {
|
|
@@ -48468,23 +48468,23 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
48468
48468
|
}, BuilderBlock.prototype.componentDidMount = function() {
|
|
48469
48469
|
var e, t2 = this;
|
|
48470
48470
|
this.hydrated = true;
|
|
48471
|
-
var n = this.block,
|
|
48472
|
-
if (Builder$1.isEditing && addEventListener("message", this.onWindowMessage),
|
|
48473
|
-
var
|
|
48471
|
+
var n = this.block, r2 = n && n.animations;
|
|
48472
|
+
if (Builder$1.isEditing && addEventListener("message", this.onWindowMessage), r2) {
|
|
48473
|
+
var i = { animations: fastClone(r2) };
|
|
48474
48474
|
if (n.bindings) {
|
|
48475
48475
|
for (var o in n.bindings) if ((null === (e = o.trim) || void 0 === e ? void 0 : e.call(o)) && o.startsWith("animations.")) {
|
|
48476
48476
|
var a = this.stringToFunction(n.bindings[o]);
|
|
48477
|
-
void 0 !== a && set(
|
|
48477
|
+
void 0 !== a && set(i, o, a(this.privateState.state, null, n, builder, null, null, Builder$1, this.privateState.context));
|
|
48478
48478
|
}
|
|
48479
48479
|
}
|
|
48480
|
-
Builder$1.animator.bindAnimations(
|
|
48480
|
+
Builder$1.animator.bindAnimations(i.animations.filter(function(e2) {
|
|
48481
48481
|
return "hover" !== e2.trigger;
|
|
48482
48482
|
}).map(function(e2) {
|
|
48483
48483
|
return __assign(__assign({}, e2), { elementId: t2.block.id });
|
|
48484
48484
|
}));
|
|
48485
48485
|
}
|
|
48486
48486
|
}, BuilderBlock.prototype.getElement = function(e, t2) {
|
|
48487
|
-
var n,
|
|
48487
|
+
var n, r2, i, o, a, s, l = this;
|
|
48488
48488
|
void 0 === e && (e = 0), void 0 === t2 && (t2 = this.privateState.state);
|
|
48489
48489
|
var u = this.props;
|
|
48490
48490
|
u.child, u.fieldName;
|
|
@@ -48501,7 +48501,7 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
48501
48501
|
}) || null) && h.class ? c = h.class : h && h.tag ? c = h.tag : (null == m ? void 0 : m.startsWith("Builder:")) ? console.warn("Missing @builder.io/widgets installation, please install and import @builder.io/widgets to use ".concat(m.split(":")[1], " in your content, more info here: https://github.com/BuilderIO/builder/tree/main/packages/widgets")) : m && console.warn("Missing registration for ".concat(m, ", have you included the registration in your bundle?")));
|
|
48502
48502
|
var v = __assign(__assign({}, d.properties), { style: {}, responsiveStyles: fastClone(d.responsiveStyles || {}) });
|
|
48503
48503
|
if (v = __assign(__assign({}, v.properties), v), d.component && (v.component = deepCloneWithConditions(d.component)), d.bindings) {
|
|
48504
|
-
for (var g2 in d.bindings) if (null === (
|
|
48504
|
+
for (var g2 in d.bindings) if (null === (r2 = g2.trim) || void 0 === r2 ? void 0 : r2.call(g2)) {
|
|
48505
48505
|
var b = this.stringToFunction(d.bindings[g2]);
|
|
48506
48506
|
set(v, g2, b(t2, null, d, api(), Device, null, Builder$1, this.privateState.context));
|
|
48507
48507
|
}
|
|
@@ -48510,23 +48510,23 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
48510
48510
|
if (delete v.hide, ("show" in v || d.bindings && d.bindings.show) && !v.show) return null;
|
|
48511
48511
|
if (delete v.show, d.actions) {
|
|
48512
48512
|
var y = function(e2) {
|
|
48513
|
-
if (!(null === (
|
|
48513
|
+
if (!(null === (i = e2.trim) || void 0 === i ? void 0 : i.call(e2))) return "continue";
|
|
48514
48514
|
var n2 = d.actions[e2];
|
|
48515
48515
|
v["on" + capitalize(e2)] = function(e3) {
|
|
48516
|
-
var
|
|
48517
|
-
return "undefined" != typeof Proxy && (
|
|
48516
|
+
var r22 = t2;
|
|
48517
|
+
return "undefined" != typeof Proxy && (r22 = new Proxy(t2, { set: function(e4, t22, n3) {
|
|
48518
48518
|
return e4[t22] = n3, l.privateState.rootState[t22] = n3, true;
|
|
48519
|
-
} })), l.stringToFunction(n2, false)(
|
|
48519
|
+
} })), l.stringToFunction(n2, false)(r22, e3, l.block, builder, Device, l.privateState.update, Builder$1, l.privateState.context);
|
|
48520
48520
|
};
|
|
48521
48521
|
};
|
|
48522
48522
|
for (var g2 in d.actions) y(g2);
|
|
48523
48523
|
}
|
|
48524
48524
|
var _2 = (v.component || v.options) && __assign(__assign({}, v.options), v.component.options || v.component.data);
|
|
48525
48525
|
containsLocalizedValues(_2) && (this.privateState.state.locale || console.warn("[Builder.io] In order to use localized fields in Builder, you must pass a locale prop to the BuilderComponent or to options object while fetching the content to resolve localized fields. Learn more: https://www.builder.io/c/docs/localization-inline#targeting-and-inline-localization"), _2 = extractLocalizedValues(_2, null !== (o = this.privateState.state.locale) && void 0 !== o ? o : "Default"));
|
|
48526
|
-
var S = voidElements.has(p),
|
|
48527
|
-
if ("string" == typeof
|
|
48526
|
+
var S = voidElements.has(p), w = h && (h.fragment || h.noWrap), x = (null === (a = v.attr) || void 0 === a ? void 0 : a.style) || ("string" == typeof v.style ? v.style : "") || "";
|
|
48527
|
+
if ("string" == typeof x) {
|
|
48528
48528
|
"object" != typeof v.style && (v.style = {});
|
|
48529
|
-
for (var k = 0, B =
|
|
48529
|
+
for (var k = 0, B = x.split(";"); k < B.length; k++) {
|
|
48530
48530
|
var C = B[k].split(":");
|
|
48531
48531
|
if (!C.length) return;
|
|
48532
48532
|
g2 = C[0], b = C[1];
|
|
@@ -48545,7 +48545,7 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
48545
48545
|
E.class && (E.class += n2), E.className && (E.className += n2);
|
|
48546
48546
|
}
|
|
48547
48547
|
return jsx(BuilderAsyncRequestsContext.Consumer, null, function(e3) {
|
|
48548
|
-
return l._asyncRequests = e3 && e3.requests, l._errors = e3 && e3.errors, l._logs = e3 && e3.logs, S ? jsx(p, __assign({}, E)) : c && (
|
|
48548
|
+
return l._asyncRequests = e3 && e3.requests, l._errors = e3 && e3.errors, l._logs = e3 && e3.logs, S ? jsx(p, __assign({}, E)) : c && (w || l.props.emailMode) ? jsx(c, __assign({}, _2, { attributes: E, builderBlock: d, builderState: l.privateState })) : jsx(p, __assign({}, E), c && jsx(c, __assign({ builderState: l.privateState, builderBlock: d }, _2)), d.text || v.text ? v.text : !c && R && Array.isArray(R) && R.length ? R.map(function(e4, t3) {
|
|
48549
48549
|
return jsx(BuilderBlock, { key: (l.id || "") + t3, block: e4, index: t3, size: l.props.size, fieldName: l.props.fieldName, child: l.props.child, emailMode: l.props.emailMode });
|
|
48550
48550
|
}) : null);
|
|
48551
48551
|
});
|
|
@@ -48556,10 +48556,10 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
48556
48556
|
}, enumerable: false, configurable: true }), BuilderBlock.prototype.contents = function(e) {
|
|
48557
48557
|
var t2 = this, n = this.block;
|
|
48558
48558
|
if (this.privateState = e, n.repeat && n.repeat.collection) {
|
|
48559
|
-
var
|
|
48560
|
-
return Array.isArray(a) ? a.map(function(n2,
|
|
48561
|
-
var
|
|
48562
|
-
return jsx(BuilderStoreContext.Provider, { key:
|
|
48559
|
+
var r2 = n.repeat.collection, i = last((r2 || "").trim().split("(")[0].trim().split(".")), o = n.repeat.itemName || (i ? i + "Item" : "item"), a = this.stringToFunction(r2)(e.state, null, n, api(), Device, null, Builder$1, this.privateState.context);
|
|
48560
|
+
return Array.isArray(a) ? a.map(function(n2, r22) {
|
|
48561
|
+
var i2, a2 = __assign(__assign({}, e.state), ((i2 = { $index: r22, $item: n2 })[o] = n2, i2["$".concat(o, "Index")] = r22, i2));
|
|
48562
|
+
return jsx(BuilderStoreContext.Provider, { key: r22, value: __assign(__assign({}, e), { state: a2 }) }, t2.getElement(r22, a2));
|
|
48563
48563
|
}) : null;
|
|
48564
48564
|
}
|
|
48565
48565
|
return this.getElement();
|
|
@@ -48601,10 +48601,10 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
48601
48601
|
} }), t22 && Array.isArray(t22) && t22.map(function(t3, n2) {
|
|
48602
48602
|
return t3 && "@builder.io/sdk:Element" === t3["@type"] ? jsx(BuilderBlock$1, { key: t3.id, block: t3, index: n2, fieldName: e2.props.fieldName, child: e2.props.child, emailMode: e2.props.emailMode }) : t3;
|
|
48603
48603
|
}) || t22);
|
|
48604
|
-
}, t2.renderInto = function(e2, n,
|
|
48604
|
+
}, t2.renderInto = function(e2, n, r2) {
|
|
48605
48605
|
if (void 0 === n && (n = {}), e2) {
|
|
48606
|
-
var
|
|
48607
|
-
return "string" == typeof e2 ?
|
|
48606
|
+
var i = null;
|
|
48607
|
+
return "string" == typeof e2 ? i = document.querySelector(e2) : e2 instanceof Element && (i = e2), ReactDOM$1.render(jsx(BuilderStoreContext.Provider, { value: r2 }, jsx(t2, __assign({}, n))), i);
|
|
48608
48608
|
}
|
|
48609
48609
|
}, t2;
|
|
48610
48610
|
}(React$1.Component), NoWrap = function(e) {
|
|
@@ -48612,7 +48612,7 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
48612
48612
|
};
|
|
48613
48613
|
function getData(e) {
|
|
48614
48614
|
if (void 0 !== (null == e ? void 0 : e.data)) {
|
|
48615
|
-
var t2 = e.data, n = t2.blocks,
|
|
48615
|
+
var t2 = e.data, n = t2.blocks, r2 = t2.blocksString, i = Array.isArray(n) || "string" == typeof r2, o = __assign(__assign({}, e.data), i && { blocks: n || JSON.parse(r2) });
|
|
48616
48616
|
return delete o.blocksString, o;
|
|
48617
48617
|
}
|
|
48618
48618
|
}
|
|
@@ -48685,26 +48685,26 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
48685
48685
|
var t2 = e.initialContent, n = e.children;
|
|
48686
48686
|
if (Builder$1.isBrowser && !builder.canTrack) return n([t2]);
|
|
48687
48687
|
if (!Boolean(Object.keys((null == t2 ? void 0 : t2.variations) || {}).length)) return n([t2]);
|
|
48688
|
-
var
|
|
48688
|
+
var r2 = Object.keys(t2.variations).map(function(e2) {
|
|
48689
48689
|
return __assign(__assign({ id: e2 }, t2.variations[e2]), { data: getData(t2.variations[e2]) });
|
|
48690
|
-
}),
|
|
48690
|
+
}), i = __spreadArray(__spreadArray([], r2, true), [t2], false);
|
|
48691
48691
|
if (Builder$1.isServer) {
|
|
48692
48692
|
var o = JSON.stringify(Object.keys(t2.variations || {}).map(function(e2) {
|
|
48693
48693
|
return { id: e2, testRatio: t2.variations[e2].testRatio };
|
|
48694
48694
|
}));
|
|
48695
|
-
return reactExports.createElement(reactExports.Fragment, null, n(
|
|
48695
|
+
return reactExports.createElement(reactExports.Fragment, null, n(i, function() {
|
|
48696
48696
|
return reactExports.createElement("script", { id: "variants-script-".concat(t2.id), dangerouslySetInnerHTML: { __html: variantsScript(o, t2.id) } });
|
|
48697
48697
|
}));
|
|
48698
48698
|
}
|
|
48699
48699
|
var a = "builder.tests.".concat(t2.id), s = builder.getCookie(a);
|
|
48700
|
-
if (!s && Builder$1.isBrowser) for (var l = 0, u = Math.random(), c = 0; c <
|
|
48701
|
-
var d =
|
|
48700
|
+
if (!s && Builder$1.isBrowser) for (var l = 0, u = Math.random(), c = 0; c < r2.length; c++) {
|
|
48701
|
+
var d = r2[c];
|
|
48702
48702
|
if (u < (l += d.testRatio)) {
|
|
48703
48703
|
builder.setCookie(a, d.id), s = d.id;
|
|
48704
48704
|
break;
|
|
48705
48705
|
}
|
|
48706
48706
|
}
|
|
48707
|
-
return s || (s = t2.id, builder.setCookie(a, s)), n([
|
|
48707
|
+
return s || (s = t2.id, builder.setCookie(a, s)), n([i.find(function(e2) {
|
|
48708
48708
|
return e2.id === s;
|
|
48709
48709
|
})]);
|
|
48710
48710
|
}, BuilderContent = function(_super) {
|
|
@@ -48761,19 +48761,19 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
48761
48761
|
"_inline" !== this.name && this.subscriptions.add(this.builder.queueGetContent(this.name, this.options).subscribe(function(t2) {
|
|
48762
48762
|
var n = t2 && t2[0];
|
|
48763
48763
|
e.setState({ data: n, loading: false });
|
|
48764
|
-
var
|
|
48765
|
-
if (!e.props.inline && e.props.content && e.firstLoad &&
|
|
48766
|
-
var
|
|
48764
|
+
var r2 = (e.builder.editingModel || e.builder.previewingModel) === e.name;
|
|
48765
|
+
if (!e.props.inline && e.props.content && e.firstLoad && r2 && (e.firstLoad = false, e.subscriptions.unsubscribe(), e.subscribeToContent()), n && e.firstLoad && (e.firstLoad = false, builder.autoTrack && !Builder$1.isEditing)) {
|
|
48766
|
+
var i = false;
|
|
48767
48767
|
if ("function" == typeof IntersectionObserver && e.ref) try {
|
|
48768
|
-
(e.intersectionObserver = new IntersectionObserver(function(t22,
|
|
48768
|
+
(e.intersectionObserver = new IntersectionObserver(function(t22, r22) {
|
|
48769
48769
|
t22.forEach(function(t3) {
|
|
48770
|
-
t3.intersectionRatio > 0 && !e.trackedImpression && (e.builder.trackImpression(n.id, e.renderedVariantId, void 0, { content: e.data }), e.data, e.trackedImpression = true, e.ref &&
|
|
48770
|
+
t3.intersectionRatio > 0 && !e.trackedImpression && (e.builder.trackImpression(n.id, e.renderedVariantId, void 0, { content: e.data }), e.data, e.trackedImpression = true, e.ref && r22.unobserve(e.ref));
|
|
48771
48771
|
});
|
|
48772
|
-
})).observe(e.ref),
|
|
48772
|
+
})).observe(e.ref), i = true;
|
|
48773
48773
|
} catch (e2) {
|
|
48774
48774
|
console.warn("Could not bind intersection observer");
|
|
48775
48775
|
}
|
|
48776
|
-
|
|
48776
|
+
i || (e.trackedImpression = true, e.builder.trackImpression(n.id, e.renderedVariantId, void 0, { content: n }));
|
|
48777
48777
|
}
|
|
48778
48778
|
e.props.contentLoaded && e.props.contentLoaded(n && n.data, n);
|
|
48779
48779
|
}, function(t2) {
|
|
@@ -48784,11 +48784,11 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
48784
48784
|
}, BuilderContent.prototype.render = function() {
|
|
48785
48785
|
var e = this;
|
|
48786
48786
|
if (this.props.dataOnly) return null;
|
|
48787
|
-
var t2 = this.state.loading, n = this.data,
|
|
48788
|
-
return React$1.createElement(VariantsProvider, { initialContent: n }, function(
|
|
48789
|
-
return React$1.createElement(React$1.Fragment, null,
|
|
48790
|
-
var l = s ===
|
|
48791
|
-
return React$1.createElement(React$1.Fragment, { key: String((null == a ? void 0 : a.id) + s) }, "template" !== l && (null == o ? void 0 : o()), React$1.createElement(l, __assign({ key: String((null == a ? void 0 : a.id) + s) }, "template" === l && { "data-template-variant-id": null == a ? void 0 : a.id }), React$1.createElement(
|
|
48787
|
+
var t2 = this.state.loading, n = this.data, r2 = this.props.dataOnly ? NoWrap : "div";
|
|
48788
|
+
return React$1.createElement(VariantsProvider, { initialContent: n }, function(i, o) {
|
|
48789
|
+
return React$1.createElement(React$1.Fragment, null, i.map(function(a, s) {
|
|
48790
|
+
var l = s === i.length - 1 ? React$1.Fragment : "template";
|
|
48791
|
+
return React$1.createElement(React$1.Fragment, { key: String((null == a ? void 0 : a.id) + s) }, "template" !== l && (null == o ? void 0 : o()), React$1.createElement(l, __assign({ key: String((null == a ? void 0 : a.id) + s) }, "template" === l && { "data-template-variant-id": null == a ? void 0 : a.id }), React$1.createElement(r2, __assign({}, 0 === s && !e.props.dataOnly && { ref: function(t22) {
|
|
48792
48792
|
return e.ref = t22;
|
|
48793
48793
|
} }, { className: "builder-content", onClick: e.onClick, "builder-content-id": null == a ? void 0 : a.id, "builder-model": e.name }), e.props.children(null == a ? void 0 : a.data, !e.props.inline && t2, n))));
|
|
48794
48794
|
}));
|
|
@@ -48797,8 +48797,8 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
48797
48797
|
}(React$1.Component), getContentWithInfo = function(e) {
|
|
48798
48798
|
var t2;
|
|
48799
48799
|
if (e) {
|
|
48800
|
-
var n = builder.getCookie("builder.tests.".concat(e.id)),
|
|
48801
|
-
return __assign(__assign({}, e), { variationId: n, testVariationId: n, testVariationName:
|
|
48800
|
+
var n = builder.getCookie("builder.tests.".concat(e.id)), r2 = n === e.id ? e : null === (t2 = e.variations) || void 0 === t2 ? void 0 : t2[n], i = (null == r2 ? void 0 : r2.name) || ((null == r2 ? void 0 : r2.id) === e.id ? "Default variation" : "");
|
|
48801
|
+
return __assign(__assign({}, e), { variationId: n, testVariationId: n, testVariationName: i });
|
|
48802
48802
|
}
|
|
48803
48803
|
return null;
|
|
48804
48804
|
};
|
|
@@ -48810,25 +48810,25 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
48810
48810
|
}
|
|
48811
48811
|
var onChange_1 = createCommonjsModule(function(e, t2) {
|
|
48812
48812
|
Object.defineProperty(t2, "__esModule", { value: true });
|
|
48813
|
-
var n = Symbol("target"),
|
|
48813
|
+
var n = Symbol("target"), r2 = Symbol("unsubscribe"), i = function(e2, t22) {
|
|
48814
48814
|
return t22 && t22.toString && (e2 && (e2 += "."), e2 += t22.toString()), e2;
|
|
48815
48815
|
}, o = function(e2) {
|
|
48816
48816
|
return Array.isArray(e2) ? e2.slice() : Object.assign({}, e2);
|
|
48817
48817
|
}, a = function(e2, t22, a2) {
|
|
48818
48818
|
if ("undefined" == typeof Proxy) return e2;
|
|
48819
48819
|
void 0 === a2 && (a2 = {});
|
|
48820
|
-
var s, l, u = Symbol("ProxyTarget"), c = false, d = false, p = false, f = a2.equals || Object.is, m = /* @__PURE__ */ new WeakMap(), h = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), g2 = function(e3, n2,
|
|
48820
|
+
var s, l, u = Symbol("ProxyTarget"), c = false, d = false, p = false, f = a2.equals || Object.is, m = /* @__PURE__ */ new WeakMap(), h = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), g2 = function(e3, n2, r22, a3) {
|
|
48821
48821
|
if (!p) if (c) {
|
|
48822
|
-
if (c && l && void 0 !==
|
|
48822
|
+
if (c && l && void 0 !== r22 && void 0 !== a3 && "length" !== n2) {
|
|
48823
48823
|
var u2 = l;
|
|
48824
48824
|
e3 !== s && function(e4, t3) {
|
|
48825
48825
|
for (var n3; e4; ) -1 === (n3 = e4.indexOf(".")) && (n3 = e4.length), t3(e4.slice(0, n3)), e4 = e4.slice(n3 + 1);
|
|
48826
48826
|
}(e3 = e3.replace(s, "").slice(1), function(e4) {
|
|
48827
48827
|
u2[e4] = o(u2[e4]), u2 = u2[e4];
|
|
48828
|
-
}), u2[n2] =
|
|
48828
|
+
}), u2[n2] = r22;
|
|
48829
48829
|
}
|
|
48830
48830
|
d = true;
|
|
48831
|
-
} else t22(
|
|
48831
|
+
} else t22(i(e3, n2), a3, r22);
|
|
48832
48832
|
}, b = function(e3, t3) {
|
|
48833
48833
|
var n2 = m ? m.get(e3) : void 0;
|
|
48834
48834
|
n2 && n2.delete(t3);
|
|
@@ -48841,7 +48841,7 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
48841
48841
|
return p || true === a2.ignoreSymbols && "symbol" == typeof e3;
|
|
48842
48842
|
}, S = { get: function(e3, t3, o2) {
|
|
48843
48843
|
if (t3 === u || t3 === n) return e3;
|
|
48844
|
-
if (t3 ===
|
|
48844
|
+
if (t3 === r2 && "" === h.get(e3)) return function(e4) {
|
|
48845
48845
|
return p = true, m = null, h = null, v = null, e4;
|
|
48846
48846
|
}(e3);
|
|
48847
48847
|
var s2 = Reflect.get(e3, t3, o2);
|
|
@@ -48854,40 +48854,40 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
48854
48854
|
var n2 = m ? m.get(e4) : void 0;
|
|
48855
48855
|
if (n2) return n2;
|
|
48856
48856
|
n2 = /* @__PURE__ */ new Map(), m.set(e4, n2);
|
|
48857
|
-
var
|
|
48858
|
-
return
|
|
48857
|
+
var r22 = n2.get(t4);
|
|
48858
|
+
return r22 || (r22 = Reflect.getOwnPropertyDescriptor(e4, t4), n2.set(t4, r22)), r22;
|
|
48859
48859
|
}(e3, t3);
|
|
48860
48860
|
if (l2 && !l2.configurable) {
|
|
48861
48861
|
if (l2.set && !l2.get) return;
|
|
48862
48862
|
if (false === l2.writable) return s2;
|
|
48863
48863
|
}
|
|
48864
|
-
return y(s2,
|
|
48865
|
-
}, set: function(e3, t3, n2,
|
|
48864
|
+
return y(s2, i(h.get(e3), t3));
|
|
48865
|
+
}, set: function(e3, t3, n2, r22) {
|
|
48866
48866
|
n2 && void 0 !== n2[u] && (n2 = n2[u]);
|
|
48867
|
-
var
|
|
48868
|
-
return
|
|
48867
|
+
var i2 = _2(t3), o2 = i2 ? null : Reflect.get(e3, t3, r22), a3 = Reflect.set(e3[u] || e3, t3, n2);
|
|
48868
|
+
return i2 || f(o2, n2) || g2(h.get(e3), t3, o2, n2), a3;
|
|
48869
48869
|
}, defineProperty: function(e3, t3, n2) {
|
|
48870
|
-
var
|
|
48871
|
-
return _2(t3) || (b(e3, t3), g2(h.get(e3), t3, void 0, n2.value)),
|
|
48870
|
+
var r22 = Reflect.defineProperty(e3, t3, n2);
|
|
48871
|
+
return _2(t3) || (b(e3, t3), g2(h.get(e3), t3, void 0, n2.value)), r22;
|
|
48872
48872
|
}, deleteProperty: function(e3, t3) {
|
|
48873
48873
|
if (!Reflect.has(e3, t3)) return true;
|
|
48874
|
-
var n2 = _2(t3),
|
|
48875
|
-
return n2 || (b(e3, t3), g2(h.get(e3), t3,
|
|
48874
|
+
var n2 = _2(t3), r22 = n2 ? null : Reflect.get(e3, t3), i2 = Reflect.deleteProperty(e3, t3);
|
|
48875
|
+
return n2 || (b(e3, t3), g2(h.get(e3), t3, r22)), i2;
|
|
48876
48876
|
}, apply: function(e3, t3, n2) {
|
|
48877
|
-
var
|
|
48878
|
-
if (
|
|
48879
|
-
c = true,
|
|
48880
|
-
var
|
|
48881
|
-
return c = false, (d ||
|
|
48877
|
+
var r22 = t3 instanceof Date;
|
|
48878
|
+
if (r22 && (t3 = t3[u]), !c) {
|
|
48879
|
+
c = true, r22 && (l = t3.valueOf()), (Array.isArray(t3) || "[object Object]" === toString.call(t3)) && (l = o(t3[u])), s = (s = h.get(e3)).slice(0, Math.max(s.lastIndexOf("."), 0));
|
|
48880
|
+
var i2 = Reflect.apply(e3, t3, n2);
|
|
48881
|
+
return c = false, (d || r22 && !f(l, t3.valueOf())) && (g2(s, "", l, t3[u] || t3), l = null, d = false), i2;
|
|
48882
48882
|
}
|
|
48883
48883
|
return Reflect.apply(e3, t3, n2);
|
|
48884
|
-
} },
|
|
48885
|
-
return t22 = t22.bind(
|
|
48884
|
+
} }, w = y(e2, "");
|
|
48885
|
+
return t22 = t22.bind(w), w;
|
|
48886
48886
|
};
|
|
48887
48887
|
a.target = function(e2) {
|
|
48888
48888
|
return e2[n] || e2;
|
|
48889
48889
|
}, a.unsubscribe = function(e2) {
|
|
48890
|
-
return e2[
|
|
48890
|
+
return e2[r2] || e2;
|
|
48891
48891
|
}, e.exports = a, t2.default = a;
|
|
48892
48892
|
}), onChange = unwrapExports(onChange_1), nextTick = Builder$1.nextTick;
|
|
48893
48893
|
function debounceNextTick(e, t2, n) {
|
|
@@ -48900,39 +48900,39 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
48900
48900
|
return function() {
|
|
48901
48901
|
var e2 = t2;
|
|
48902
48902
|
if (t2 = [].slice.call(arguments), n = this, null !== e2) return;
|
|
48903
|
-
nextTick(
|
|
48903
|
+
nextTick(r2);
|
|
48904
48904
|
};
|
|
48905
|
-
function
|
|
48905
|
+
function r2() {
|
|
48906
48906
|
e.apply(n, t2), t2 = null, n = null;
|
|
48907
48907
|
}
|
|
48908
48908
|
}
|
|
48909
48909
|
function throttle(e, t2, n) {
|
|
48910
|
-
var
|
|
48910
|
+
var r2, i, o;
|
|
48911
48911
|
void 0 === n && (n = {});
|
|
48912
48912
|
var a = null, s = 0, l = function() {
|
|
48913
|
-
s = false === n.leading ? 0 : Date.now(), a = null, o = e.apply(
|
|
48913
|
+
s = false === n.leading ? 0 : Date.now(), a = null, o = e.apply(r2, i), a || (r2 = i = null);
|
|
48914
48914
|
};
|
|
48915
48915
|
return function() {
|
|
48916
48916
|
var u = Date.now();
|
|
48917
48917
|
s || false !== n.leading || (s = u);
|
|
48918
48918
|
var c = t2 - (u - s);
|
|
48919
|
-
return
|
|
48919
|
+
return r2 = this, i = arguments, c <= 0 || c > t2 ? (a && (clearTimeout(a), a = null), s = u, o = e.apply(r2, i), a || (r2 = i = null)) : a || false === n.trailing || (a = setTimeout(l, c)), o;
|
|
48920
48920
|
};
|
|
48921
48921
|
}
|
|
48922
48922
|
var BuilderMetaContext = React$1.createContext({ emailMode: false, ampMode: false, isServer: false }), tryEval = function(e, t2, n) {
|
|
48923
48923
|
void 0 === t2 && (t2 = {});
|
|
48924
|
-
var
|
|
48925
|
-
if ("string" == typeof
|
|
48926
|
-
var
|
|
48924
|
+
var r2 = e;
|
|
48925
|
+
if ("string" == typeof r2 && r2.trim()) {
|
|
48926
|
+
var i = !(r2.includes(";") || r2.includes(" return ")), o = function() {
|
|
48927
48927
|
};
|
|
48928
48928
|
try {
|
|
48929
|
-
Builder$1.isBrowser && (o = new Function("state", "var rootState = state;\n if (typeof Proxy !== 'undefined') {\n rootState = new Proxy(rootState, {\n set: function () {\n return false;\n },\n get: function (target, key) {\n if (key === 'state') {\n return state;\n }\n return target[key]\n }\n });\n }\n with (rootState) {\n ".concat(
|
|
48929
|
+
Builder$1.isBrowser && (o = new Function("state", "var rootState = state;\n if (typeof Proxy !== 'undefined') {\n rootState = new Proxy(rootState, {\n set: function () {\n return false;\n },\n get: function (target, key) {\n if (key === 'state') {\n return state;\n }\n return target[key]\n }\n });\n }\n with (rootState) {\n ".concat(i ? "return (".concat(e, ");") : e, ";\n }")));
|
|
48930
48930
|
} catch (e2) {
|
|
48931
48931
|
Builder$1.isBrowser && console.warn("Could not compile javascript", e2);
|
|
48932
48932
|
}
|
|
48933
48933
|
try {
|
|
48934
48934
|
if (Builder$1.isBrowser || shouldForceBrowserRuntimeInNode()) return o(t2 || {});
|
|
48935
|
-
var a = safeDynamicRequire("isolated-vm"), s = getIsolateContext(), l = makeFn(e,
|
|
48935
|
+
var a = safeDynamicRequire("isolated-vm"), s = getIsolateContext(), l = makeFn(e, i, ["state"]), u = s.evalClosureSync(l, [new a.Reference(t2 || {})]);
|
|
48936
48936
|
try {
|
|
48937
48937
|
return JSON.parse(u);
|
|
48938
48938
|
} catch (e2) {
|
|
@@ -48946,40 +48946,37 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
48946
48946
|
function toError(e) {
|
|
48947
48947
|
return e instanceof Error ? e : new Error(String(e));
|
|
48948
48948
|
}
|
|
48949
|
-
function getBuilderPixel(e) {
|
|
48950
|
-
return { id: "builder-pixel-" + Math.random().toString(36).split(".")[1], "@type": "@builder.io/sdk:Element", tagName: "img", properties: { role: "presentation", "aria-hidden": "true", src: "https://cdn.builder6.com/api/v1/pixel?apiKey=".concat(e) }, responsiveStyles: { large: { height: "0", width: "0", display: "inline-block", opacity: "0", overflow: "hidden", pointerEvents: "none" } } };
|
|
48951
|
-
}
|
|
48952
48949
|
function pick(e) {
|
|
48953
48950
|
for (var t2 = [], n = 1; n < arguments.length; n++) t2[n - 1] = arguments[n];
|
|
48954
|
-
var
|
|
48951
|
+
var r2 = {};
|
|
48955
48952
|
return t2.forEach(function(t22) {
|
|
48956
|
-
|
|
48957
|
-
}),
|
|
48953
|
+
r2[t22] = e[t22];
|
|
48954
|
+
}), r2;
|
|
48958
48955
|
}
|
|
48959
48956
|
function omit(e) {
|
|
48960
48957
|
for (var t2 = [], n = 1; n < arguments.length; n++) t2[n - 1] = arguments[n];
|
|
48961
|
-
var
|
|
48958
|
+
var r2 = __assign({}, e);
|
|
48962
48959
|
return t2.forEach(function(e2) {
|
|
48963
|
-
delete
|
|
48964
|
-
}),
|
|
48960
|
+
delete r2[e2];
|
|
48961
|
+
}), r2;
|
|
48965
48962
|
}
|
|
48966
48963
|
var instancesMap = /* @__PURE__ */ new Map(), wrapComponent = function(e) {
|
|
48967
48964
|
return function(t2) {
|
|
48968
|
-
var n,
|
|
48965
|
+
var n, r2 = t2.builderTag || "div", i = ["children"].concat((null === (n = e.inputs) || void 0 === n ? void 0 : n.map(function(e2) {
|
|
48969
48966
|
return e2.name;
|
|
48970
|
-
})) || []), o = omit.apply(void 0, __spreadArray(__spreadArray([t2],
|
|
48971
|
-
return e.noWrap ? React$1.createElement(e.class, __assign({ attributes: o }, a)) : React$1.createElement(
|
|
48967
|
+
})) || []), o = omit.apply(void 0, __spreadArray(__spreadArray([t2], i, false), ["attributes"], false)), a = t2;
|
|
48968
|
+
return e.noWrap ? React$1.createElement(e.class, __assign({ attributes: o }, a)) : React$1.createElement(r2, __assign({}, o), React$1.createElement(e.class, __assign({}, a)));
|
|
48972
48969
|
};
|
|
48973
48970
|
}, size$1 = function(e) {
|
|
48974
48971
|
return Object.keys(e).length;
|
|
48975
48972
|
};
|
|
48976
48973
|
function debounce(e, t2, n) {
|
|
48977
|
-
var
|
|
48974
|
+
var r2;
|
|
48978
48975
|
return void 0 === n && (n = false), function() {
|
|
48979
|
-
var
|
|
48980
|
-
clearTimeout(
|
|
48981
|
-
|
|
48982
|
-
}, t2), n && !
|
|
48976
|
+
var i = this, o = arguments;
|
|
48977
|
+
clearTimeout(r2), r2 = setTimeout(function() {
|
|
48978
|
+
r2 = null, n || e.apply(i, o);
|
|
48979
|
+
}, t2), n && !r2 && e.apply(i, o);
|
|
48983
48980
|
};
|
|
48984
48981
|
}
|
|
48985
48982
|
var fontsLoaded = /* @__PURE__ */ new Set(), fetch$1;
|
|
@@ -48987,115 +48984,115 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
48987
48984
|
var sizeMap = { desktop: "large", tablet: "medium", mobile: "small" }, fetchCache = {};
|
|
48988
48985
|
function searchToObject$1(e) {
|
|
48989
48986
|
var t2 = (e.search || "").substring(1).split("&"), n = {};
|
|
48990
|
-
for (var
|
|
48991
|
-
var
|
|
48992
|
-
n[decodeURIComponent(
|
|
48987
|
+
for (var r2 in t2) if (t2[r2] && "string" == typeof t2[r2]) {
|
|
48988
|
+
var i = t2[r2].split("=");
|
|
48989
|
+
n[decodeURIComponent(i[0])] = decodeURIComponent(i[1]);
|
|
48993
48990
|
}
|
|
48994
48991
|
return n;
|
|
48995
48992
|
}
|
|
48996
48993
|
var BuilderComponent = function(e) {
|
|
48997
48994
|
function t2(t22) {
|
|
48998
|
-
var n,
|
|
48999
|
-
(
|
|
49000
|
-
return
|
|
49001
|
-
}),
|
|
48995
|
+
var n, r2, i = this;
|
|
48996
|
+
(i = e.call(this, t22) || this).subscriptions = new Subscription(), i.onStateChange = new BehaviorSubject(null), i.asServer = Builder$1.isServer, i.contentRef = null, i.styleRef = null, i.rootState = Builder$1.isServer ? {} : onChange({}, function() {
|
|
48997
|
+
return i.updateState();
|
|
48998
|
+
}), i.lastJsCode = "", i.lastHttpRequests = {}, i.httpSubscriptionPerKey = {}, i.firstLoad = true, i.ref = null, i.messageListener = function(e2) {
|
|
49002
48999
|
var t3;
|
|
49003
49000
|
if (Builder$1.isTrustedHostForEvent(e2)) {
|
|
49004
49001
|
var n2 = e2.data;
|
|
49005
49002
|
switch (n2.type) {
|
|
49006
49003
|
case "builder.configureSdk":
|
|
49007
|
-
var
|
|
49008
|
-
if (!
|
|
49009
|
-
|
|
49004
|
+
var r22 = n2.data;
|
|
49005
|
+
if (!r22.contentId || r22.contentId !== (null === (t3 = i.useContent) || void 0 === t3 ? void 0 : t3.id)) return;
|
|
49006
|
+
i.sizes = getSizesForBreakpoints(r22.breakpoints || {}), i.setState({ state: Object.assign(i.rootState, { deviceSize: i.deviceSizeState, device: i.device }), updates: (i.state && i.state.updates || 0) + 1, breakpoints: r22.breakpoints });
|
|
49010
49007
|
break;
|
|
49011
49008
|
case "builder.updateSpacer":
|
|
49012
49009
|
var o2 = n2.data;
|
|
49013
|
-
|
|
49010
|
+
i.rootState._spacer, i.updateState(function(e3) {
|
|
49014
49011
|
e3._spacer = o2;
|
|
49015
49012
|
});
|
|
49016
49013
|
break;
|
|
49017
49014
|
case "builder.resetState":
|
|
49018
49015
|
var a2 = n2.data, s2 = a2.state;
|
|
49019
|
-
if (a2.model ===
|
|
49020
|
-
for (var l2 in
|
|
49021
|
-
Object.assign(
|
|
49016
|
+
if (a2.model === i.name) {
|
|
49017
|
+
for (var l2 in i.rootState) "function" != typeof i.rootState[l2] && delete i.rootState[l2];
|
|
49018
|
+
Object.assign(i.rootState, s2), i.setState(__assign(__assign({}, i.state), { state: i.rootState, updates: (i.state && i.state.updates || 0) + 1 }));
|
|
49022
49019
|
}
|
|
49023
49020
|
break;
|
|
49024
49021
|
case "builder.resetSymbolState":
|
|
49025
49022
|
var u2 = n2.data.state, c = (s2 = u2.state, u2.model, u2.id);
|
|
49026
|
-
if (
|
|
49027
|
-
for (var l2 in
|
|
49028
|
-
Object.assign(
|
|
49029
|
-
}
|
|
49030
|
-
}
|
|
49031
|
-
}
|
|
49032
|
-
},
|
|
49033
|
-
var e2 =
|
|
49034
|
-
e2 !==
|
|
49035
|
-
},
|
|
49036
|
-
var t3 =
|
|
49037
|
-
e2 && e2(t3),
|
|
49038
|
-
},
|
|
49039
|
-
if ("page" ===
|
|
49040
|
-
var n2 = e2.title,
|
|
49041
|
-
if ((n2 ||
|
|
49023
|
+
if (i.props.builderBlock && i.props.builderBlock === c) {
|
|
49024
|
+
for (var l2 in i.rootState) delete i.rootState[l2];
|
|
49025
|
+
Object.assign(i.rootState, s2), i.setState(__assign(__assign({}, i.state), { state: i.rootState, updates: (i.state && i.state.updates || 0) + 1 }));
|
|
49026
|
+
}
|
|
49027
|
+
}
|
|
49028
|
+
}
|
|
49029
|
+
}, i.resizeFn = function() {
|
|
49030
|
+
var e2 = i.deviceSizeState;
|
|
49031
|
+
e2 !== i.state.state.deviceSize && i.setState(__assign(__assign({}, i.state), { updates: (i.state && i.state.updates || 0) + 1, state: Object.assign(i.rootState, __assign(__assign({}, i.state.state), { deviceSize: e2 })) }));
|
|
49032
|
+
}, i.resizeListener = Builder$1.isEditing ? throttle(i.resizeFn, 200) : debounce(i.resizeFn, 400), i.mounted = false, i.updateState = function(e2) {
|
|
49033
|
+
var t3 = i.rootState;
|
|
49034
|
+
e2 && e2(t3), i.mounted ? i.setState({ update: i.updateState, state: t3, updates: (i.state && i.state.updates || 0) + 1 }) : i.state = __assign(__assign({}, i.state), { update: i.updateState, state: t3, updates: (i.state && i.state.updates || 0) + 1 }), i.notifyStateChange();
|
|
49035
|
+
}, i.onContentLoaded = function(e2, t3) {
|
|
49036
|
+
if ("page" === i.name && Builder$1.isBrowser && e2) {
|
|
49037
|
+
var n2 = e2.title, r22 = e2.pageTitle, o2 = e2.description, a2 = e2.pageDescription;
|
|
49038
|
+
if ((n2 || r22) && (document.title = n2 || r22), o2 || a2) {
|
|
49042
49039
|
var s2 = document.querySelector('meta[name="description"]');
|
|
49043
49040
|
s2 || ((s2 = document.createElement("meta")).setAttribute("name", "description"), document.head.appendChild(s2)), s2.setAttribute("content", o2 || a2);
|
|
49044
49041
|
}
|
|
49045
49042
|
}
|
|
49046
|
-
if (Builder$1.isEditing &&
|
|
49043
|
+
if (Builder$1.isEditing && i.notifyStateChange(), i.props.contentLoaded && i.props.contentLoaded(e2, t3), e2 && e2.inputs && Array.isArray(e2.inputs) && e2.inputs.length && (e2.state || (e2.state = {}), e2.inputs.forEach(function(t4) {
|
|
49047
49044
|
t4 && t4.name && void 0 !== t4.defaultValue && void 0 === e2.state[t4.name] && (e2.state[t4.name] = t4.defaultValue);
|
|
49048
49045
|
})), e2 && e2.state) {
|
|
49049
|
-
var l2 = __assign(__assign({},
|
|
49050
|
-
|
|
49046
|
+
var l2 = __assign(__assign({}, i.state), { updates: (i.state && i.state.updates || 0) + 1, state: Object.assign(i.rootState, __assign(__assign(__assign(__assign(__assign({}, i.state.state), { location: i.locationState, device: i.device }), e2.state), i.externalState), { deviceSize: i.deviceSizeState })) });
|
|
49047
|
+
i.mounted ? i.setState(l2) : i.state = l2;
|
|
49051
49048
|
}
|
|
49052
|
-
if (e2 && e2.jsCode && !
|
|
49049
|
+
if (e2 && e2.jsCode && !i.options.codegen) {
|
|
49053
49050
|
var u2 = false;
|
|
49054
|
-
if (Builder$1.isEditing && (
|
|
49055
|
-
var c =
|
|
49051
|
+
if (Builder$1.isEditing && (i.lastJsCode === e2.jsCode ? u2 = true : i.lastJsCode = e2.jsCode), !u2) {
|
|
49052
|
+
var c = i.state.state;
|
|
49056
49053
|
try {
|
|
49057
|
-
new Function("data", "ref", "state", "update", "element", "Builder", "builder", "context", e2.jsCode)(e2,
|
|
49054
|
+
new Function("data", "ref", "state", "update", "element", "Builder", "builder", "context", e2.jsCode)(e2, i, c, i.state.update, i.ref, Builder$1, builder, i.state.context);
|
|
49058
49055
|
} catch (t4) {
|
|
49059
49056
|
var d = toError(t4);
|
|
49060
49057
|
Builder$1.isBrowser ? console.warn("Builder custom code error:", d.message, "in", e2.jsCode, d.stack) : isDebug() && console.debug("Builder custom code error:", d.message, "in", e2.jsCode, d.stack);
|
|
49061
49058
|
}
|
|
49062
49059
|
}
|
|
49063
49060
|
}
|
|
49064
|
-
if (e2 && e2.httpRequests && !
|
|
49061
|
+
if (e2 && e2.httpRequests && !i.props.noAsync && !(u2 = false)) {
|
|
49065
49062
|
var p = function(t4) {
|
|
49066
49063
|
var n3 = e2.httpRequests[t4];
|
|
49067
|
-
if (n3 && (!
|
|
49068
|
-
var
|
|
49069
|
-
if (Builder$1.isEditing &&
|
|
49070
|
-
|
|
49071
|
-
var o3 =
|
|
49064
|
+
if (n3 && (!i.data[t4] || Builder$1.isEditing)) if (Builder$1.isBrowser) {
|
|
49065
|
+
var r3 = i.evalExpression(n3);
|
|
49066
|
+
if (Builder$1.isEditing && i.lastHttpRequests[t4] === r3) return "continue";
|
|
49067
|
+
i.lastHttpRequests[t4] = r3, i.handleRequest(t4, r3);
|
|
49068
|
+
var o3 = i.httpSubscriptionPerKey[t4];
|
|
49072
49069
|
o3 && o3.unsubscribe();
|
|
49073
|
-
var a3 =
|
|
49074
|
-
var e3 =
|
|
49075
|
-
e3 !==
|
|
49070
|
+
var a3 = i.httpSubscriptionPerKey[t4] = i.onStateChange.subscribe(function() {
|
|
49071
|
+
var e3 = i.evalExpression(n3);
|
|
49072
|
+
e3 !== r3 && (i.handleRequest(t4, e3), i.lastHttpRequests[t4] = e3);
|
|
49076
49073
|
});
|
|
49077
|
-
|
|
49078
|
-
} else
|
|
49074
|
+
i.subscriptions.add(a3);
|
|
49075
|
+
} else i.handleRequest(t4, i.evalExpression(n3));
|
|
49079
49076
|
};
|
|
49080
49077
|
for (var f in e2.httpRequests) p(f);
|
|
49081
49078
|
}
|
|
49082
49079
|
};
|
|
49083
|
-
var o =
|
|
49084
|
-
o && o.content && (o = o.content),
|
|
49085
|
-
var a = null === (
|
|
49080
|
+
var o = i.inlinedContent;
|
|
49081
|
+
o && o.content && (o = o.content), i.sizes = getSizesForBreakpoints((null === (n = null == o ? void 0 : o.meta) || void 0 === n ? void 0 : n.breakpoints) || {});
|
|
49082
|
+
var a = null === (r2 = i.inlinedContent) || void 0 === r2 ? void 0 : r2.data;
|
|
49086
49083
|
a && Array.isArray(a.inputs) && a.inputs.length > 0 && (a.state || (a.state = {}), a.inputs.forEach(function(e2) {
|
|
49087
49084
|
e2 && e2.name && void 0 !== e2.defaultValue && void 0 === a.state[e2.name] && (a.state[e2.name] = e2.defaultValue);
|
|
49088
|
-
})),
|
|
49089
|
-
var s =
|
|
49090
|
-
if (s && s !==
|
|
49085
|
+
})), i.state = { context: __assign(__assign({}, t22.context), { apiKey: i.props.apiKey || builder.apiKey }), state: Object.assign(i.rootState, __assign(__assign(__assign(__assign({}, i.inlinedContent && i.inlinedContent.data && i.inlinedContent.data.state), { isBrowser: Builder$1.isBrowser, isServer: !Builder$1.isBrowser, _hydrate: t22.hydrate, location: i.locationState, deviceSize: i.deviceSizeState, device: i.device }), i.getHtmlData()), t22.data)), updates: 0, key: 0, update: i.updateState };
|
|
49086
|
+
var s = i.props.apiKey;
|
|
49087
|
+
if (s && s !== i.builder.apiKey && !instancesMap.has(s)) {
|
|
49091
49088
|
var l = new Builder$1(s, void 0, void 0, true);
|
|
49092
49089
|
instancesMap.set(s, l);
|
|
49093
49090
|
}
|
|
49094
|
-
if (
|
|
49095
|
-
var u =
|
|
49096
|
-
|
|
49091
|
+
if (i.inlinedContent) {
|
|
49092
|
+
var u = i.inlinedContent.content || i.inlinedContent;
|
|
49093
|
+
i.onContentLoaded(null == u ? void 0 : u.data, getContentWithInfo(u));
|
|
49097
49094
|
}
|
|
49098
|
-
return
|
|
49095
|
+
return i.registerCustomComponents(), i;
|
|
49099
49096
|
}
|
|
49100
49097
|
return __extends(t2, e), Object.defineProperty(t2.prototype, "options", { get: function() {
|
|
49101
49098
|
return __assign(__assign({}, t2.defaults), this.props);
|
|
@@ -49121,24 +49118,24 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
49121
49118
|
return __assign(__assign({}, pick(this.location, "pathname", "hostname", "search", "host")), { path: this.location.pathname && this.location.pathname.split("/").slice(1) || "", query: searchToObject$1(this.location) });
|
|
49122
49119
|
}, enumerable: false, configurable: true }), Object.defineProperty(t2.prototype, "deviceSizeState", { get: function() {
|
|
49123
49120
|
return Builder$1.isBrowser ? this.sizes.getSizeForWidth(window.innerWidth) : sizeMap[this.device] || "large";
|
|
49124
|
-
}, enumerable: false, configurable: true }), t2.renderInto = function(e2, n,
|
|
49125
|
-
if (void 0 === n && (n = {}), void 0 ===
|
|
49121
|
+
}, enumerable: false, configurable: true }), t2.renderInto = function(e2, n, r2, i) {
|
|
49122
|
+
if (void 0 === n && (n = {}), void 0 === r2 && (r2 = true), void 0 === i && (i = false), console.debug("BuilderPage.renderInto", e2, n, r2, this), e2) {
|
|
49126
49123
|
var o = null;
|
|
49127
49124
|
if ("string" == typeof e2 ? o = document.querySelector(e2) : e2 instanceof Element && (o = e2), o) {
|
|
49128
49125
|
var a = o.classList.contains("builder-hydrated");
|
|
49129
|
-
if (!a ||
|
|
49126
|
+
if (!a || i) {
|
|
49130
49127
|
o.classList.add("builder-hydrated");
|
|
49131
|
-
var s =
|
|
49128
|
+
var s = r2 && o.innerHTML.includes("builder-block");
|
|
49132
49129
|
if (!o.classList.contains("builder-component")) {
|
|
49133
49130
|
var l = o.querySelector(".builder-api-styles") || (o.previousElementSibling && o.previousElementSibling.matches(".builder-api-styles") ? o.previousElementSibling : null), u = "";
|
|
49134
49131
|
if (l) l.innerHTML.replace(/\/\*start:([^\*]+?)\*\/([\s\S]*?)\/\*end:([^\*]+?)\*\//g, function(e3, t22, n2) {
|
|
49135
|
-
var
|
|
49132
|
+
var r22 = null;
|
|
49136
49133
|
try {
|
|
49137
|
-
|
|
49134
|
+
r22 = document.querySelector('[data-emotion-css="'.concat(t22, '"]'));
|
|
49138
49135
|
} catch (e4) {
|
|
49139
49136
|
console.warn(e4);
|
|
49140
49137
|
}
|
|
49141
|
-
return
|
|
49138
|
+
return r22 ? r22.innerHTML = n2 : Builder$1.isEditing || (u += e3), e3;
|
|
49142
49139
|
}), Builder$1.nextTick(function() {
|
|
49143
49140
|
l.innerHTML = u;
|
|
49144
49141
|
});
|
|
@@ -49167,8 +49164,8 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
49167
49164
|
if (this.props.customComponents) for (var e2 = 0, t22 = this.props.customComponents; e2 < t22.length; e2++) {
|
|
49168
49165
|
var n = t22[e2];
|
|
49169
49166
|
if (n) {
|
|
49170
|
-
var
|
|
49171
|
-
Builder$1.registerComponent(
|
|
49167
|
+
var r2 = n.component, i = __rest(n, ["component"]);
|
|
49168
|
+
Builder$1.registerComponent(r2, i);
|
|
49172
49169
|
}
|
|
49173
49170
|
}
|
|
49174
49171
|
}, t2.prototype.componentDidMount = function() {
|
|
@@ -49192,11 +49189,11 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
49192
49189
|
}, Object.defineProperty(t2.prototype, "location", { get: function() {
|
|
49193
49190
|
return this.props.location || (Builder$1.isBrowser ? location : {});
|
|
49194
49191
|
}, enumerable: false, configurable: true }), t2.prototype.getCssFromFont = function(e2, t22) {
|
|
49195
|
-
var n = e2.family + (e2.kind && !e2.kind.includes("#") ? ", " + e2.kind : ""),
|
|
49196
|
-
if (
|
|
49192
|
+
var n = e2.family + (e2.kind && !e2.kind.includes("#") ? ", " + e2.kind : ""), r2 = n.split(",")[0], i = e2.fileUrl ? e2.fileUrl : e2.files && e2.files.regular, o = "";
|
|
49193
|
+
if (i && n && r2 && (o += '\n@font-face {\n font-family: "'.concat(n, '";\n src: local("').concat(r2, `"), url('`).concat(i, "') format('woff2');\n font-display: fallback;\n font-weight: 400;\n}\n ").trim()), e2.files) for (var a in e2.files) {
|
|
49197
49194
|
if (String(Number(a)) === a) {
|
|
49198
49195
|
var s = e2.files[a];
|
|
49199
|
-
s && s !==
|
|
49196
|
+
s && s !== i && (o += '\n@font-face {\n font-family: "'.concat(n, `";
|
|
49200
49197
|
src: url('`).concat(s, "') format('woff2');\n font-display: fallback;\n font-weight: ").concat(a, ";\n}\n ").trim());
|
|
49201
49198
|
}
|
|
49202
49199
|
}
|
|
@@ -49210,17 +49207,17 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
49210
49207
|
}).join(" ") || "";
|
|
49211
49208
|
}, t2.prototype.ensureFontsLoaded = function(e2) {
|
|
49212
49209
|
if (this.builder.allowCustomFonts && (null == e2 ? void 0 : e2.customFonts) && Array.isArray(e2.customFonts)) for (var t22 = 0, n = e2.customFonts; t22 < n.length; t22++) {
|
|
49213
|
-
var
|
|
49214
|
-
if (!fontsLoaded.has(
|
|
49215
|
-
var o = this.getCssFromFont(
|
|
49216
|
-
if (fontsLoaded.add(
|
|
49210
|
+
var r2 = n[t22], i = r2.fileUrl ? r2.fileUrl : r2.files && r2.files.regular;
|
|
49211
|
+
if (!fontsLoaded.has(i)) {
|
|
49212
|
+
var o = this.getCssFromFont(r2, e2);
|
|
49213
|
+
if (fontsLoaded.add(i), !o) continue;
|
|
49217
49214
|
var a = document.createElement("style");
|
|
49218
|
-
a.className = "builder-custom-font", a.setAttribute("data-builder-custom-font",
|
|
49215
|
+
a.className = "builder-custom-font", a.setAttribute("data-builder-custom-font", i), a.innerHTML = o, document.head.appendChild(a);
|
|
49219
49216
|
}
|
|
49220
49217
|
}
|
|
49221
49218
|
}, t2.prototype.getCss = function(e2) {
|
|
49222
|
-
var t22, n = null === (t22 = this.useContent) || void 0 === t22 ? void 0 : t22.id,
|
|
49223
|
-
return n && (
|
|
49219
|
+
var t22, n = null === (t22 = this.useContent) || void 0 === t22 ? void 0 : t22.id, r2 = (null == e2 ? void 0 : e2.cssCode) || "";
|
|
49220
|
+
return n && (r2 = r2.replace(/&/g, ".builder-component-".concat(n))), r2 + this.getFontCss(e2);
|
|
49224
49221
|
}, Object.defineProperty(t2.prototype, "data", { get: function() {
|
|
49225
49222
|
var e2, t22 = __assign(__assign(__assign({}, this.inlinedContent && (null === (e2 = this.inlinedContent.data) || void 0 === e2 ? void 0 : e2.state)), this.externalState), this.state.state);
|
|
49226
49223
|
return Object.assign(this.rootState, t22), t22;
|
|
@@ -49244,8 +49241,8 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
49244
49241
|
}, enumerable: false, configurable: true }), Object.defineProperty(t2.prototype, "useContent", { get: function() {
|
|
49245
49242
|
return this.content || this.state.context.builderContent;
|
|
49246
49243
|
}, enumerable: false, configurable: true }), t2.prototype.render = function() {
|
|
49247
|
-
var e2, t22 = this, n = this.content,
|
|
49248
|
-
|
|
49244
|
+
var e2, t22 = this, n = this.content, r2 = Builder$1.isBrowser && this.externalState && size$1(this.externalState) && hash(this.externalState), i = this.name;
|
|
49245
|
+
i && !Builder$1.isEditing && r2 && r2.length < 300 && (i += ":" + r2);
|
|
49249
49246
|
var o = this.props.dataOnly ? React$1.Fragment : "div", a = (null === (e2 = this.useContent) || void 0 === e2 ? void 0 : e2.id) || this.props.entry;
|
|
49250
49247
|
return React$1.createElement(o, { onClick: function(e3) {
|
|
49251
49248
|
!Builder$1.isEditing || t22.props.isChild || t22.props.stopClickPropagationWhenEditing || e3.stopPropagation();
|
|
@@ -49253,15 +49250,15 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
49253
49250
|
return t22.ref = e3;
|
|
49254
49251
|
} }, React$1.createElement(BuilderMetaContext.Consumer, null, function(e3) {
|
|
49255
49252
|
return React$1.createElement(BuilderMetaContext.Provider, { value: "boolean" == typeof t22.props.ampMode ? __assign(__assign({}, e3), { ampMode: t22.props.ampMode }) : e3 }, React$1.createElement(BuilderAsyncRequestsContext.Consumer, null, function(e4) {
|
|
49256
|
-
var
|
|
49257
|
-
return t22._asyncRequests = e4 && e4.requests, t22._errors = e4 && e4.errors, t22._logs = e4 && e4.logs, React$1.createElement(BuilderContent, { isStatic: t22.props.isStatic || Builder$1.isStatic, key: (null === (
|
|
49253
|
+
var r22;
|
|
49254
|
+
return t22._asyncRequests = e4 && e4.requests, t22._errors = e4 && e4.errors, t22._logs = e4 && e4.logs, React$1.createElement(BuilderContent, { isStatic: t22.props.isStatic || Builder$1.isStatic, key: (null === (r22 = t22.inlinedContent) || void 0 === r22 ? void 0 : r22.id) || ("content" in t22.props && !t22.isPreviewing ? "null-content-prop" : "no-content-prop"), builder: t22.builder, ref: function(e5) {
|
|
49258
49255
|
return t22.contentRef = e5;
|
|
49259
49256
|
}, contentLoaded: function(e5, n2) {
|
|
49260
49257
|
return t22.onContentLoaded(e5, n2);
|
|
49261
|
-
}, options: __assign(__assign(__assign(__assign(__assign(__assign({ key:
|
|
49262
|
-
var
|
|
49258
|
+
}, options: __assign(__assign(__assign(__assign(__assign(__assign({ key: i, entry: t22.props.entry }, n && { initialContent: [n] }), !n && "content" in t22.props && !t22.isPreviewing && { initialContent: [] }), t22.props.url && { url: t22.props.url }), t22.props.options), t22.props.locale ? { locale: t22.props.locale } : {}), t22.options.codegen && { format: "react" }), inline: t22.props.inlineContent || !t22.isPreviewing && "content" in t22.props, contentError: t22.props.contentError, modelName: t22.name || "page" }, function(e5, n2, r3) {
|
|
49259
|
+
var i2;
|
|
49263
49260
|
if (t22.props.dataOnly) return null;
|
|
49264
|
-
|
|
49261
|
+
r3 && r3.id && (t22.state.breakpoints && (r3.meta = r3.meta || {}, r3.meta.breakpoints = t22.state.breakpoints), t22.state.context.builderContent = r3), Builder$1.isBrowser && Builder$1.nextTick(function() {
|
|
49265
49262
|
t22.checkStyles(e5);
|
|
49266
49263
|
});
|
|
49267
49264
|
var o2 = t22.options.codegen;
|
|
@@ -49288,30 +49285,27 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
49288
49285
|
})[0];
|
|
49289
49286
|
}], c, false));
|
|
49290
49287
|
}
|
|
49291
|
-
var d = (null == e5 ? void 0 : e5.blocks) || []
|
|
49292
|
-
|
|
49293
|
-
return null === (t3 = e6.id) || void 0 === t3 ? void 0 : t3.startsWith("builder-pixel");
|
|
49294
|
-
});
|
|
49295
|
-
return e5 && !p && d.length > 0 && d.push(getBuilderPixel(builder.apiKey)), e5 ? React$1.createElement("div", __assign({ "data-builder-component": t22.name, "data-builder-content-id": i3.id }, t22.isPreviewing ? { "data-builder-variation-id": i3.testVariationId || i3.variationId || i3.id } : {}), !o2 && t22.getCss(e5) && React$1.createElement("style", { ref: function(e6) {
|
|
49288
|
+
var d = (null == e5 ? void 0 : e5.blocks) || [];
|
|
49289
|
+
return e5 ? React$1.createElement("div", __assign({ "data-builder-component": t22.name, "data-builder-content-id": r3.id }, t22.isPreviewing ? { "data-builder-variation-id": r3.testVariationId || r3.variationId || r3.id } : {}), !o2 && t22.getCss(e5) && React$1.createElement("style", { ref: function(e6) {
|
|
49296
49290
|
return t22.styleRef = e6;
|
|
49297
|
-
}, className: "builder-custom-styles", dangerouslySetInnerHTML: { __html: t22.getCss(e5) } }), React$1.createElement(BuilderStoreContext.Provider, { value: __assign(__assign({}, t22.state), { rootState: t22.rootState, state: t22.data, content:
|
|
49291
|
+
}, className: "builder-custom-styles", dangerouslySetInnerHTML: { __html: t22.getCss(e5) } }), React$1.createElement(BuilderStoreContext.Provider, { value: __assign(__assign({}, t22.state), { rootState: t22.rootState, state: t22.data, content: r3, renderLink: t22.props.renderLink }) }, o2 && t22.Component ? React$1.createElement(t22.Component, { data: t22.data, context: t22.state.context }) : React$1.createElement(BuilderBlocks, { key: String(!!(null === (i2 = null == e5 ? void 0 : e5.blocks) || void 0 === i2 ? void 0 : i2.length)), emailMode: t22.props.emailMode, fieldName: "blocks", blocks: d }))) : n2 ? React$1.createElement("div", { "data-builder-component": t22.name, className: "builder-loading" }, t22.props.children) : React$1.createElement("div", { "data-builder-component": t22.name, className: "builder-no-content" });
|
|
49298
49292
|
});
|
|
49299
49293
|
}));
|
|
49300
49294
|
}));
|
|
49301
49295
|
}, t2.prototype.evalExpression = function(e2) {
|
|
49302
49296
|
var t22 = this, n = this.data;
|
|
49303
|
-
return String(e2).replace(/{{([^}]+)}}/g, function(e3,
|
|
49304
|
-
return tryEval(
|
|
49297
|
+
return String(e2).replace(/{{([^}]+)}}/g, function(e3, r2) {
|
|
49298
|
+
return tryEval(r2, n, t22._errors);
|
|
49305
49299
|
});
|
|
49306
49300
|
}, t2.prototype.handleRequest = function(e2, t22) {
|
|
49307
49301
|
return __awaiter(this, void 0, void 0, function() {
|
|
49308
|
-
var n,
|
|
49302
|
+
var n, r2, i, o, a = this;
|
|
49309
49303
|
return __generator(this, function(s) {
|
|
49310
49304
|
return Builder$1.isIframe && fetchCache[t22] ? (this.updateState(function(n2) {
|
|
49311
49305
|
n2[e2] = fetchCache[t22];
|
|
49312
49306
|
}), [2, fetchCache[t22]]) : (n = function() {
|
|
49313
49307
|
return __awaiter(a, void 0, void 0, function() {
|
|
49314
|
-
var n2,
|
|
49308
|
+
var n2, r22, i2, o2;
|
|
49315
49309
|
return __generator(this, function(a2) {
|
|
49316
49310
|
switch (a2.label) {
|
|
49317
49311
|
case 0:
|
|
@@ -49321,25 +49315,25 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
49321
49315
|
case 2:
|
|
49322
49316
|
return [4, a2.sent().json()];
|
|
49323
49317
|
case 3:
|
|
49324
|
-
return
|
|
49318
|
+
return r22 = a2.sent(), [3, 6];
|
|
49325
49319
|
case 4:
|
|
49326
|
-
return
|
|
49320
|
+
return i2 = a2.sent(), o2 = toError(i2), this._errors && this._errors.push(o2), this._logs && this._logs.push("Fetch to ".concat(t22, " errored in ").concat(Date.now() - n2, "ms")), [2];
|
|
49327
49321
|
case 5:
|
|
49328
49322
|
return Builder$1.isBrowser || (console.timeEnd("Fetch " + t22), this._logs && this._logs.push("Fetched ".concat(t22, " in ").concat(Date.now() - n2, "ms"))), [7];
|
|
49329
49323
|
case 6:
|
|
49330
|
-
return
|
|
49331
|
-
t3[e2] =
|
|
49332
|
-
})), [2,
|
|
49324
|
+
return r22 && (Builder$1.isIframe && (fetchCache[t22] = r22), this.updateState(function(t3) {
|
|
49325
|
+
t3[e2] = r22;
|
|
49326
|
+
})), [2, r22];
|
|
49333
49327
|
}
|
|
49334
49328
|
});
|
|
49335
49329
|
});
|
|
49336
|
-
}, (
|
|
49330
|
+
}, (r2 = this._asyncRequests && this._asyncRequests.find(function(e3) {
|
|
49337
49331
|
return isRequestInfo(e3) && e3.url === t22;
|
|
49338
|
-
})) ? ((
|
|
49332
|
+
})) ? ((i = r2.promise).then(function(t3) {
|
|
49339
49333
|
t3 && a.updateState(function(n2) {
|
|
49340
49334
|
n2[e2] = t3;
|
|
49341
49335
|
});
|
|
49342
|
-
}), [2,
|
|
49336
|
+
}), [2, i]) : (o = n(), Builder$1.nextTick(function() {
|
|
49343
49337
|
a._asyncRequests && a._asyncRequests.push(o);
|
|
49344
49338
|
}), [2, o]));
|
|
49345
49339
|
});
|
|
@@ -49347,8 +49341,8 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
49347
49341
|
}, t2.prototype.unsubscribe = function() {
|
|
49348
49342
|
this.subscriptions && (this.subscriptions.unsubscribe(), this.subscriptions = new Subscription());
|
|
49349
49343
|
}, t2.prototype.handleBuilderRequest = function(e2, t22) {
|
|
49350
|
-
var n = this,
|
|
49351
|
-
this.subscriptions && this.unsubscribe(),
|
|
49344
|
+
var n = this, r2 = tryEval(t22, this.data, this._errors);
|
|
49345
|
+
this.subscriptions && this.unsubscribe(), r2 && this.subscriptions.add(this.builder.queueGetContent(r2.model, r2).subscribe(function(t3) {
|
|
49352
49346
|
t3 && n.updateState(function(n2) {
|
|
49353
49347
|
n2[e2] = t3;
|
|
49354
49348
|
});
|
|
@@ -49365,9 +49359,9 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
49365
49359
|
return Boolean("object" == typeof e && e && "@builder.io/sdk:Element" === (null == e ? void 0 : e["@type"]));
|
|
49366
49360
|
}, withChildren = function(e) {
|
|
49367
49361
|
var t2 = React$1.forwardRef(function(t22, n) {
|
|
49368
|
-
var
|
|
49362
|
+
var r2, i, o = __assign({}, t22), a = t22.children || t22.builderBlock && t22.builderBlock.children && t22.builderBlock.children.map(function(e2) {
|
|
49369
49363
|
return React$1.createElement(BuilderBlock$1, { key: e2.id, block: e2 });
|
|
49370
|
-
}), s = null === (
|
|
49364
|
+
}), s = null === (i = null === (r2 = t22.builderBlock) || void 0 === r2 ? void 0 : r2.component) || void 0 === i ? void 0 : i.options;
|
|
49371
49365
|
return s && Object.keys(s).forEach(function(e2) {
|
|
49372
49366
|
var t3 = s[e2];
|
|
49373
49367
|
Array.isArray(t3) && t3.every(isBuilderElement) ? o[e2] = t3.map(function(e3) {
|
|
@@ -49383,12 +49377,12 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
49383
49377
|
return e.registerRemoteAssets = function(e2, t22) {
|
|
49384
49378
|
return __awaiter(this, void 0, void 0, function() {
|
|
49385
49379
|
var n = this;
|
|
49386
|
-
return __generator(this, function(
|
|
49387
|
-
switch (
|
|
49380
|
+
return __generator(this, function(r2) {
|
|
49381
|
+
switch (r2.label) {
|
|
49388
49382
|
case 0:
|
|
49389
49383
|
if (this.loadPromise) return [2, this.loadPromise];
|
|
49390
49384
|
this.unpkgUrl = t22, this.loadPromise = __awaiter(n, void 0, void 0, function() {
|
|
49391
|
-
var t3, n2,
|
|
49385
|
+
var t3, n2, r22, i, o, a, s, l, u, c, d, p;
|
|
49392
49386
|
return __generator(this, function(f) {
|
|
49393
49387
|
switch (f.label) {
|
|
49394
49388
|
case 0:
|
|
@@ -49396,24 +49390,24 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
49396
49390
|
case 1:
|
|
49397
49391
|
return [4, n2.next()];
|
|
49398
49392
|
case 2:
|
|
49399
|
-
if (
|
|
49400
|
-
p =
|
|
49393
|
+
if (r22 = f.sent(), u = r22.done) return [3, 13];
|
|
49394
|
+
p = r22.value, t3 = false, f.label = 3;
|
|
49401
49395
|
case 3:
|
|
49402
|
-
if (f.trys.push([3, , 11, 12]),
|
|
49403
|
-
this.remoteAssets[
|
|
49396
|
+
if (f.trys.push([3, , 11, 12]), i = (i = p).replace("https://unpkg.com", this.unpkgUrl), this.remoteAssets[i]) return console.log("已经在加载: ".concat(i)), [3, 12];
|
|
49397
|
+
this.remoteAssets[i] = "loading", f.label = 4;
|
|
49404
49398
|
case 4:
|
|
49405
|
-
return f.trys.push([4, 8, 9, 10]), [4, fetch(
|
|
49399
|
+
return f.trys.push([4, 8, 9, 10]), [4, fetch(i, { mode: "cors" })];
|
|
49406
49400
|
case 5:
|
|
49407
49401
|
if (!(o = f.sent()).ok) throw new Error("无法获取资产: ".concat(o.statusText));
|
|
49408
49402
|
return [4, o.json()];
|
|
49409
49403
|
case 6:
|
|
49410
49404
|
return a = f.sent(), [4, this.registerAssets(a)];
|
|
49411
49405
|
case 7:
|
|
49412
|
-
return f.sent(), console.log("资产已加载: ".concat(
|
|
49406
|
+
return f.sent(), console.log("资产已加载: ".concat(i)), [3, 10];
|
|
49413
49407
|
case 8:
|
|
49414
|
-
return s = f.sent(), console.error("从 ".concat(
|
|
49408
|
+
return s = f.sent(), console.error("从 ".concat(i, " 加载资产时出错:"), s), [3, 10];
|
|
49415
49409
|
case 9:
|
|
49416
|
-
return this.remoteAssets[
|
|
49410
|
+
return this.remoteAssets[i] = "loaded", [7];
|
|
49417
49411
|
case 10:
|
|
49418
49412
|
return [3, 12];
|
|
49419
49413
|
case 11:
|
|
@@ -49439,11 +49433,11 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
49439
49433
|
return [2];
|
|
49440
49434
|
}
|
|
49441
49435
|
});
|
|
49442
|
-
}),
|
|
49436
|
+
}), r2.label = 1;
|
|
49443
49437
|
case 1:
|
|
49444
|
-
return
|
|
49438
|
+
return r2.trys.push([1, , 3, 4]), [4, this.loadPromise];
|
|
49445
49439
|
case 2:
|
|
49446
|
-
return
|
|
49440
|
+
return r2.sent(), [3, 4];
|
|
49447
49441
|
case 3:
|
|
49448
49442
|
return this.loadPromise = null, [7];
|
|
49449
49443
|
case 4:
|
|
@@ -49453,14 +49447,14 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
49453
49447
|
});
|
|
49454
49448
|
}, e.registerAssets = function(e2) {
|
|
49455
49449
|
return __awaiter(this, void 0, void 0, function() {
|
|
49456
|
-
var t22, n,
|
|
49450
|
+
var t22, n, r2, i, o, a, s, l, u, c, d;
|
|
49457
49451
|
return __generator(this, function(p) {
|
|
49458
49452
|
switch (p.label) {
|
|
49459
49453
|
case 0:
|
|
49460
|
-
t22 = e2.packages, n = e2.components,
|
|
49454
|
+
t22 = e2.packages, n = e2.components, r2 = 0, i = t22 || [], p.label = 1;
|
|
49461
49455
|
case 1:
|
|
49462
|
-
if (!(
|
|
49463
|
-
if (!(o = r2
|
|
49456
|
+
if (!(r2 < i.length)) return [3, 8];
|
|
49457
|
+
if (!(o = i[r2]).urls || !o.library) return [3, 7];
|
|
49464
49458
|
a = 0, s = o.urls, p.label = 2;
|
|
49465
49459
|
case 2:
|
|
49466
49460
|
return a < s.length ? (l = s[a]).endsWith(".js") ? [4, this.injectScript(l)] : [3, 4] : [3, 6];
|
|
@@ -49473,7 +49467,7 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
49473
49467
|
case 6:
|
|
49474
49468
|
this.packages[o.package] = o, p.label = 7;
|
|
49475
49469
|
case 7:
|
|
49476
|
-
return
|
|
49470
|
+
return r2++, [3, 1];
|
|
49477
49471
|
case 8:
|
|
49478
49472
|
u = 0, c = n || [], p.label = 9;
|
|
49479
49473
|
case 9:
|
|
@@ -49489,13 +49483,13 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
49489
49483
|
});
|
|
49490
49484
|
}, e.injectScript = function(e2) {
|
|
49491
49485
|
var t22 = this;
|
|
49492
|
-
return new Promise(function(n,
|
|
49493
|
-
var
|
|
49494
|
-
|
|
49486
|
+
return new Promise(function(n, r2) {
|
|
49487
|
+
var i = document.createElement("script");
|
|
49488
|
+
i.src = e2.replace("https://unpkg.com", t22.unpkgUrl), i.async = true, i.onload = function() {
|
|
49495
49489
|
return n();
|
|
49496
|
-
},
|
|
49497
|
-
return
|
|
49498
|
-
}, document.head.appendChild(
|
|
49490
|
+
}, i.onerror = function() {
|
|
49491
|
+
return r2(new Error("Failed to load script: ".concat(e2)));
|
|
49492
|
+
}, document.head.appendChild(i);
|
|
49499
49493
|
});
|
|
49500
49494
|
}, e.injectCSS = function(e2) {
|
|
49501
49495
|
var t22 = document.createElement("link");
|
|
@@ -49503,11 +49497,11 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
49503
49497
|
}, t2 = e, e.remoteAssets = {}, e.packages = {}, e.loadPromise = null, e.registerMeta = function(e2) {
|
|
49504
49498
|
e2.components && e2.components.forEach(function(e3, n) {
|
|
49505
49499
|
return __awaiter(void 0, void 0, void 0, function() {
|
|
49506
|
-
var n2,
|
|
49500
|
+
var n2, r2, i, o, a, s;
|
|
49507
49501
|
return __generator(t2, function(t22) {
|
|
49508
|
-
return (null === (o = e3.npm) || void 0 === o ? void 0 : o.package) && (null === (a = e3.npm) || void 0 === a ? void 0 : a.exportName) && (n2 = null === (s = this.packages[e3.npm.package]) || void 0 === s ? void 0 : s.library) && ((
|
|
49502
|
+
return (null === (o = e3.npm) || void 0 === o ? void 0 : o.package) && (null === (a = e3.npm) || void 0 === a ? void 0 : a.exportName) && (n2 = null === (s = this.packages[e3.npm.package]) || void 0 === s ? void 0 : s.library) && ((r2 = window[n2]) && r2[e3.npm.exportName] ? (i = r2[e3.npm.exportName], Builder$1.components.find(function(t3) {
|
|
49509
49503
|
return t3.name === e3.componentName;
|
|
49510
|
-
}) || Builder$1.registerComponent(
|
|
49504
|
+
}) || Builder$1.registerComponent(i, { name: e3.componentName, meta: e3 })) : console.error("Component ".concat(e3.npm.exportName, " not found in package ").concat(e3.npm.package))), [2];
|
|
49511
49505
|
});
|
|
49512
49506
|
});
|
|
49513
49507
|
});
|
|
@@ -49543,11 +49537,11 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
49543
49537
|
});
|
|
49544
49538
|
}, t2.prototype.loadAssets = function() {
|
|
49545
49539
|
return __awaiter(this, void 0, void 0, function() {
|
|
49546
|
-
var e2, t22, n,
|
|
49540
|
+
var e2, t22, n, r2, i;
|
|
49547
49541
|
return __generator(this, function(o) {
|
|
49548
49542
|
switch (o.label) {
|
|
49549
49543
|
case 0:
|
|
49550
|
-
return e2 = this.props, t22 = e2.urls, n = void 0 === t22 ? Builder$1.settings.assetUrls || [] : t22,
|
|
49544
|
+
return e2 = this.props, t22 = e2.urls, n = void 0 === t22 ? Builder$1.settings.assetUrls || [] : t22, r2 = e2.unpkgUrl, i = void 0 === r2 ? Builder$1.settings.unpkgUrl || "https://unpkg.com" : r2, [4, AssetsLoaderClass.registerRemoteAssets(n, i)];
|
|
49551
49545
|
case 1:
|
|
49552
49546
|
return o.sent(), this.setState({ assetsLoaded: true }), [2];
|
|
49553
49547
|
}
|
|
@@ -49565,14 +49559,14 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
49565
49559
|
return n.loadSchema = function() {
|
|
49566
49560
|
return __awaiter(n, void 0, void 0, function() {
|
|
49567
49561
|
var e2, t3, n2;
|
|
49568
|
-
return __generator(this, function(
|
|
49569
|
-
switch (
|
|
49562
|
+
return __generator(this, function(r2) {
|
|
49563
|
+
switch (r2.label) {
|
|
49570
49564
|
case 0:
|
|
49571
49565
|
return e2 = this.props.schema, (t3 = this.props).defaultData && (t3.data = Object.assign({}, t3.data, this.props.defaultData)), "function" != typeof e2 ? [3, 2] : [4, e2(t3)];
|
|
49572
49566
|
case 1:
|
|
49573
|
-
return n2 =
|
|
49567
|
+
return n2 = r2.sent(), this.setState({ schema: n2 }), [3, 3];
|
|
49574
49568
|
case 2:
|
|
49575
|
-
this.setState({ schema: e2 }),
|
|
49569
|
+
this.setState({ schema: e2 }), r2.label = 3;
|
|
49576
49570
|
case 3:
|
|
49577
49571
|
return [2];
|
|
49578
49572
|
}
|
|
@@ -49619,23 +49613,23 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
49619
49613
|
}, t2.prototype.registerComponents = function() {
|
|
49620
49614
|
var e2 = this;
|
|
49621
49615
|
Builder$1.components.forEach(function(t22) {
|
|
49622
|
-
var n = t22.class,
|
|
49623
|
-
n &&
|
|
49616
|
+
var n = t22.class, r2 = t22.meta;
|
|
49617
|
+
n && r2 && r2.amis && r2.amis.render && !r2.amis.isRegisterd && ("amisSchema" === r2.componentType && (n = function(e3) {
|
|
49624
49618
|
return React$1.createElement(AmisRenderer, __assign({}, e3, { schema: t22.class }));
|
|
49625
|
-
}), e2.amisLib.Renderer(__assign({ autoVar: true },
|
|
49619
|
+
}), e2.amisLib.Renderer(__assign({ autoVar: true }, r2.amis.render))(n), r2.amis.isRegisterd = true);
|
|
49626
49620
|
});
|
|
49627
49621
|
}, t2.prototype.componentDidMount = function() {
|
|
49628
49622
|
return __awaiter(this, void 0, void 0, function() {
|
|
49629
|
-
var e2, t22, n,
|
|
49623
|
+
var e2, t22, n, r2, i = this;
|
|
49630
49624
|
return __generator(this, function(o) {
|
|
49631
49625
|
switch (o.label) {
|
|
49632
49626
|
case 0:
|
|
49633
49627
|
return Builder$1.isServer ? [2] : (this.amis = Builder$1.isBrowser && window.amisRequire && window.amisRequire("amis/embed"), this.amisLib = window.amisRequire && window.amisRequire("amis"), this.amis ? [4, this.registerComponents()] : (console.error("Amis is not loaded"), [2]));
|
|
49634
49628
|
case 1:
|
|
49635
|
-
return o.sent(), e2 = this.props.builderState, t22 = e2.context, n = __assign(__assign(__assign({}, e2.state), this.props.data), { _scoped: this._scoped }),
|
|
49629
|
+
return o.sent(), e2 = this.props.builderState, t22 = e2.context, n = __assign(__assign(__assign({}, e2.state), this.props.data), { _scoped: this._scoped }), r2 = __assign(__assign(__assign({ theme: "antd", requestAdaptor: function(e3) {
|
|
49636
49630
|
return 1 != e3.allowCredentials && (e3.withCredentials = false, delete e3.allowCredentials), e3;
|
|
49637
|
-
} }, Builder$1.settings.env), t22.env), this.props.env), this.amisScoped = this.amis.embed(this.ref.current, this.props.schema, { data: n },
|
|
49638
|
-
Object.assign(
|
|
49631
|
+
} }, Builder$1.settings.env), t22.env), this.props.env), this.amisScoped = this.amis.embed(this.ref.current, this.props.schema, { data: n }, r2, function() {
|
|
49632
|
+
Object.assign(i._scoped, i.amisScoped);
|
|
49639
49633
|
}), [2];
|
|
49640
49634
|
}
|
|
49641
49635
|
});
|
|
@@ -49668,8 +49662,8 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
49668
49662
|
}, enumerable: false, configurable: true }), t2.prototype.render = function() {
|
|
49669
49663
|
var e2 = this, t22 = { outline: "none", "& p:first-of-type, & .builder-paragraph:first-of-type": { margin: 0 }, "& > p, & .builder-paragraph": { color: "inherit", lineHeight: "inherit", letterSpacing: "inherit", fontWeight: "inherit", fontSize: "inherit", textAlign: "inherit", fontFamily: "inherit" } };
|
|
49670
49664
|
return jsx(BuilderStoreContext.Consumer, null, function(n) {
|
|
49671
|
-
var
|
|
49672
|
-
return (null === (
|
|
49665
|
+
var r2;
|
|
49666
|
+
return (null === (r2 = n.content.meta) || void 0 === r2 ? void 0 : r2.rtlMode) && (t22.direction = "rtl"), jsx(React$1.Fragment, null, jsx("span", __assign({ ref: function(t3) {
|
|
49673
49667
|
e2.textRef = t3;
|
|
49674
49668
|
}, css: t22, className: "builder-text" }, { dangerouslySetInnerHTML: { __html: e2.evalExpression(e2.props.text || e2.props.content || "", n.state) } })));
|
|
49675
49669
|
});
|
|
@@ -49677,8 +49671,8 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
49677
49671
|
}(React$1.Component);
|
|
49678
49672
|
withBuilder(TextComponent, { name: "Text", static: true, image: iconUrl, inputs: [{ name: "text", type: "html", required: true, autoFocus: true, bubble: true, defaultValue: "Enter some text..." }], defaultStyles: { lineHeight: "normal", height: "auto", textAlign: "center" } });
|
|
49679
49673
|
function Slot(e) {
|
|
49680
|
-
var t2 = e.name, n = reactExports.useContext(BuilderStoreContext),
|
|
49681
|
-
return jsx("div", __assign({ css: { pointerEvents: "auto" } },
|
|
49674
|
+
var t2 = e.name, n = reactExports.useContext(BuilderStoreContext), r2 = !n.context.symbolId;
|
|
49675
|
+
return jsx("div", __assign({ css: { pointerEvents: "auto" } }, r2 && { "builder-slot": t2 }), jsx(BuilderBlocks, { child: true, parentElementId: n.context.symbolId, dataPath: "symbol.data.".concat(t2), blocks: n.state[t2] || [] }));
|
|
49682
49676
|
}
|
|
49683
49677
|
Builder$1.registerComponent(Slot, { name: "Slot", description: "Allow child blocks to be inserted into this content when used as a Symbol", docsLink: "https://www.builder.io/c/docs/symbols-with-blocks", image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56", inputs: [{ name: "name", type: "string", required: true, defaultValue: "children" }] });
|
|
49684
49678
|
var FragmentComponent = function(e) {
|
|
@@ -49703,13 +49697,13 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
49703
49697
|
}, enumerable: false, configurable: true }), t2.prototype.getWidth = function(e2) {
|
|
49704
49698
|
return this.columns[e2] && this.columns[e2].width || 100 / this.columns.length;
|
|
49705
49699
|
}, t2.prototype.getColumnWidth = function(e2) {
|
|
49706
|
-
var t22 = this.columns, n = this.gutterSize,
|
|
49707
|
-
return "calc(".concat(
|
|
49700
|
+
var t22 = this.columns, n = this.gutterSize, r2 = this.getWidth(e2), i = n * (t22.length - 1) * (r2 / 100);
|
|
49701
|
+
return "calc(".concat(r2, "% - ").concat(i, "px)");
|
|
49708
49702
|
}, t2.prototype.render = function() {
|
|
49709
|
-
var e2, t22, n,
|
|
49703
|
+
var e2, t22, n, r2, i = this, o = this.columns, a = this.gutterSize, s = (null === (r2 = null === (n = null === (t22 = this.props.builderState) || void 0 === t22 ? void 0 : t22.context.builderContent) || void 0 === n ? void 0 : n.meta) || void 0 === r2 ? void 0 : r2.breakpoints) || {}, l = getSizesForBreakpoints(s);
|
|
49710
49704
|
return jsx(React$1.Fragment, null, jsx("div", { className: "builder-columns", css: __assign({ display: "flex" }, "never" !== this.props.stackColumnsAt && (e2 = {}, e2["@media (max-width: ".concat("tablet" !== this.props.stackColumnsAt ? l.small.max : l.medium.max, "px)")] = { flexDirection: this.props.reverseColumnsWhenStacked ? "column-reverse" : "column", alignItems: "stretch" }, e2)) }, o.map(function(e3, t3) {
|
|
49711
|
-
var n2,
|
|
49712
|
-
return jsx(React$1.Fragment, { key: t3 }, jsx(o2, __assign({ className: "builder-column" }, e3.link ? { href: e3.link } : null, { css: __assign((n2 = { display: "flex", flexDirection: "column", alignItems: "stretch", lineHeight: "normal" }, n2["& > .builder-blocks"] = { flexGrow: 1 }, n2.width =
|
|
49705
|
+
var n2, r22, o2 = e3.link ? Link : "div";
|
|
49706
|
+
return jsx(React$1.Fragment, { key: t3 }, jsx(o2, __assign({ className: "builder-column" }, e3.link ? { href: e3.link } : null, { css: __assign((n2 = { display: "flex", flexDirection: "column", alignItems: "stretch", lineHeight: "normal" }, n2["& > .builder-blocks"] = { flexGrow: 1 }, n2.width = i.getColumnWidth(t3), n2.marginLeft = 0 === t3 ? 0 : a, n2), "never" !== i.props.stackColumnsAt && (r22 = {}, r22["@media (max-width: ".concat("tablet" !== i.props.stackColumnsAt ? l.small.max : l.medium.max, "px)")] = { width: "100%", marginLeft: 0 }, r22)) }), jsx(BuilderBlocks, { key: t3, child: true, parentElementId: i.props.builderBlock && i.props.builderBlock.id, blocks: e3.blocks, dataPath: "component.options.columns.".concat(t3, ".blocks") })));
|
|
49713
49707
|
})));
|
|
49714
49708
|
}, t2;
|
|
49715
49709
|
}(React$1.Component);
|
|
@@ -49745,8 +49739,8 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
49745
49739
|
if (n.src) {
|
|
49746
49740
|
if (this.scriptsInserted.has(n.src)) continue;
|
|
49747
49741
|
this.scriptsInserted.add(n.src);
|
|
49748
|
-
var
|
|
49749
|
-
|
|
49742
|
+
var r2 = document.createElement("script");
|
|
49743
|
+
r2.async = true, r2.src = n.src, document.head.appendChild(r2);
|
|
49750
49744
|
} else {
|
|
49751
49745
|
if (this.scriptsRun.has(n.innerText)) continue;
|
|
49752
49746
|
this.scriptsRun.add(n.innerText);
|
|
@@ -49785,23 +49779,23 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
49785
49779
|
}
|
|
49786
49780
|
var CustomCodeComponent = function(e) {
|
|
49787
49781
|
function t2(t22) {
|
|
49788
|
-
var n,
|
|
49789
|
-
if ((
|
|
49790
|
-
var
|
|
49791
|
-
if (
|
|
49792
|
-
if (
|
|
49793
|
-
var o = globalReplaceNodes[
|
|
49794
|
-
|
|
49795
|
-
} else if (
|
|
49796
|
-
var a = document.querySelectorAll(".".concat(
|
|
49782
|
+
var n, r2 = this;
|
|
49783
|
+
if ((r2 = e.call(this, t22) || this).elementRef = null, r2.originalRef = null, r2.scriptsInserted = /* @__PURE__ */ new Set(), r2.scriptsRun = /* @__PURE__ */ new Set(), r2.firstLoad = true, r2.replaceNodes = false, r2.state = { hydrated: false }, Builder$1.isBrowser) {
|
|
49784
|
+
var i = null === (n = r2.props.builderBlock) || void 0 === n ? void 0 : n.id;
|
|
49785
|
+
if (r2.replaceNodes = Boolean(Builder$1.isBrowser && (t22.replaceNodes || isShopify$1) && i && (null == globalReplaceNodes ? void 0 : globalReplaceNodes[i])), r2.firstLoad && r2.props.builderBlock) {
|
|
49786
|
+
if (i && (null == globalReplaceNodes ? void 0 : globalReplaceNodes[i])) {
|
|
49787
|
+
var o = globalReplaceNodes[i].shift() || null;
|
|
49788
|
+
r2.originalRef = o, 0 === globalReplaceNodes[i].length && delete globalReplaceNodes[i];
|
|
49789
|
+
} else if (r2.replaceNodes) {
|
|
49790
|
+
var a = document.querySelectorAll(".".concat(r2.props.builderBlock.id, " .builder-custom-code"));
|
|
49797
49791
|
if (1 === a.length) {
|
|
49798
49792
|
var s = a[0];
|
|
49799
|
-
|
|
49793
|
+
r2.originalRef = s, r2.originalRef.remove();
|
|
49800
49794
|
}
|
|
49801
49795
|
}
|
|
49802
49796
|
}
|
|
49803
49797
|
}
|
|
49804
|
-
return
|
|
49798
|
+
return r2;
|
|
49805
49799
|
}
|
|
49806
49800
|
return __extends(t2, e), t2.prototype.shouldComponentUpdate = function(e2) {
|
|
49807
49801
|
return e2.code !== this.props.code;
|
|
@@ -49823,8 +49817,8 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
49823
49817
|
if (n.src) {
|
|
49824
49818
|
if (this.scriptsInserted.has(n.src)) continue;
|
|
49825
49819
|
this.scriptsInserted.add(n.src);
|
|
49826
|
-
var
|
|
49827
|
-
|
|
49820
|
+
var r2 = document.createElement("script");
|
|
49821
|
+
r2.async = true, r2.src = n.src, document.head.appendChild(r2);
|
|
49828
49822
|
} else if (!n.type || ["text/javascript", "application/javascript", "application/ecmascript"].includes(n.type)) {
|
|
49829
49823
|
if (this.scriptsRun.has(n.innerText)) continue;
|
|
49830
49824
|
try {
|
|
@@ -49857,24 +49851,24 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
49857
49851
|
if ("master" === t2) return removeProtocol(e);
|
|
49858
49852
|
var n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
|
|
49859
49853
|
if (n) {
|
|
49860
|
-
var
|
|
49861
|
-
return removeProtocol("".concat(
|
|
49854
|
+
var r2 = e.split(n[0]), i = n[3], o = t2.match("x") ? t2 : "".concat(t2, "x");
|
|
49855
|
+
return removeProtocol("".concat(r2[0], "_").concat(o).concat(i));
|
|
49862
49856
|
}
|
|
49863
49857
|
return null;
|
|
49864
49858
|
}
|
|
49865
49859
|
var DEFAULT_ASPECT_RATIO$1 = 0.7041;
|
|
49866
49860
|
function updateQueryParam(e, t2, n) {
|
|
49867
49861
|
void 0 === e && (e = "");
|
|
49868
|
-
var
|
|
49869
|
-
return e.match(
|
|
49862
|
+
var r2 = new RegExp("([?&])" + t2 + "=.*?(&|$)", "i"), i = -1 !== e.indexOf("?") ? "&" : "?";
|
|
49863
|
+
return e.match(r2) ? e.replace(r2, "$1" + t2 + "=" + encodeURIComponent(n) + "$2") : e + i + t2 + "=" + encodeURIComponent(n);
|
|
49870
49864
|
}
|
|
49871
49865
|
function getSrcSet(e) {
|
|
49872
49866
|
if (!e) return e;
|
|
49873
49867
|
var t2 = [100, 200, 400, 800, 1200, 1600, 2e3];
|
|
49874
49868
|
if (e.match(/builder\.io/)) {
|
|
49875
|
-
var n = e,
|
|
49876
|
-
return isNaN(
|
|
49877
|
-
return e2 !==
|
|
49869
|
+
var n = e, r2 = Number(e.split("?width=")[1]);
|
|
49870
|
+
return isNaN(r2) || (n = "".concat(n, " ").concat(r2, "w")), t2.filter(function(e2) {
|
|
49871
|
+
return e2 !== r2;
|
|
49878
49872
|
}).map(function(t22) {
|
|
49879
49873
|
return "".concat(updateQueryParam(e, "width", t22), " ").concat(t22, "w");
|
|
49880
49874
|
}).concat([n]).join(", ");
|
|
@@ -49889,7 +49883,7 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
49889
49883
|
}).concat([e]).join(", ") : e;
|
|
49890
49884
|
}
|
|
49891
49885
|
var getSizes = function(e, t2, n) {
|
|
49892
|
-
var
|
|
49886
|
+
var r2, i, o, a, s, l, u, c;
|
|
49893
49887
|
void 0 === n && (n = {});
|
|
49894
49888
|
var d = "";
|
|
49895
49889
|
if (e) {
|
|
@@ -49899,7 +49893,7 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
49899
49893
|
}).join(", ");
|
|
49900
49894
|
} else if (t2 && t2.responsiveStyles) {
|
|
49901
49895
|
var m = [], h = false, v = /^\d+/, g2 = getSizesForBreakpoints(n);
|
|
49902
|
-
if (null === (o = null === (
|
|
49896
|
+
if (null === (o = null === (i = null === (r2 = t2.responsiveStyles) || void 0 === r2 ? void 0 : r2.small) || void 0 === i ? void 0 : i.width) || void 0 === o ? void 0 : o.match(v)) {
|
|
49903
49897
|
h = true;
|
|
49904
49898
|
var b = "(max-width: ".concat(g2.small.max, "px)"), y = "".concat(b, " ").concat(t2.responsiveStyles.small.width.replace("%", "vw"));
|
|
49905
49899
|
m.push(y);
|
|
@@ -49937,8 +49931,8 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
49937
49931
|
} else {
|
|
49938
49932
|
var t22 = throttle(function(n) {
|
|
49939
49933
|
if (e2.pictureRef) {
|
|
49940
|
-
var
|
|
49941
|
-
|
|
49934
|
+
var r2 = e2.pictureRef.getBoundingClientRect(), i = window.innerHeight / 2;
|
|
49935
|
+
r2.top < window.innerHeight + i && (e2.setState(__assign(__assign({}, e2.state), { load: true })), window.removeEventListener("scroll", t22), e2.scrollListener = null);
|
|
49942
49936
|
}
|
|
49943
49937
|
}, 400, { leading: false, trailing: true });
|
|
49944
49938
|
this.scrollListener = t22, window.addEventListener("scroll", t22, { capture: true, passive: true }), t22();
|
|
@@ -49949,16 +49943,16 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
49949
49943
|
var e2 = this.image;
|
|
49950
49944
|
if (e2 && "string" == typeof e2 && !this.props.noWebp && (e2.match(/builder\.io/) || e2.match(/cdn\.shopify\.com/))) return getSrcSet(e2);
|
|
49951
49945
|
}, t2.prototype.render = function() {
|
|
49952
|
-
var e2, t22, n = this,
|
|
49946
|
+
var e2, t22, n = this, r2 = this.props, i = r2.aspectRatio, o = r2.lazy, a = r2.builderBlock, s = r2.builderState, l = this.props.builderBlock && this.props.builderBlock.children, u = this.props.srcset, c = getSizes(this.props.sizes, a, (null === (t22 = null === (e2 = null == s ? void 0 : s.context.builderContent) || void 0 === e2 ? void 0 : e2.meta) || void 0 === t22 ? void 0 : t22.breakpoints) || {}), d = this.image;
|
|
49953
49947
|
u && d && d.includes("builder.io/api/v1/image") ? u.includes(d.split("?")[0]) || (console.debug("Removed given srcset"), u = this.getSrcSet()) : d && !u && (u = this.getSrcSet());
|
|
49954
49948
|
var p = (null == a ? void 0 : a.id.startsWith("builder-pixel-")) || this.props.highPriority, f = this.props.fitContent;
|
|
49955
49949
|
return jsx(BuilderMetaContext.Consumer, null, function(e3) {
|
|
49956
|
-
var t3,
|
|
49950
|
+
var t3, r22 = e3.ampMode, a2 = r22 ? "amp-img" : "img", s2 = (!o || n.state.load || r22) && jsx(a2, __assign({}, r22 ? { layout: "responsive", height: n.props.height || (i ? Math.round(1e3 * i) : void 0), width: n.props.width || (i ? Math.round(1e3 / i) : void 0) } : null, { alt: n.props.altText, key: Builder$1.isEditing && "string" == typeof n.image && n.image.split("?")[0] || void 0, role: n.props.altText ? void 0 : "presentation", css: __assign(__assign({ opacity: r22 ? 1 : n.useLazyLoading && !n.state.imageLoaded ? 0 : 1, transition: "opacity 0.2s ease-in-out", objectFit: n.props.backgroundSize || "cover", objectPosition: n.props.backgroundPosition || "center" }, i && !r22 && { position: "absolute", height: "100%", width: "100%", left: 0, top: 0 }), r22 && (t3 = {}, t3["& img"] = { objectFit: n.props.backgroundSize, objectPosition: n.props.backgroundPosition }, t3)), loading: p ? "eager" : "lazy", fetchPriority: p ? "high" : "auto", className: "builder-image" + (n.props.className ? " " + n.props.className : ""), src: n.image }, !r22 && { onLoad: function() {
|
|
49957
49951
|
return n.setState({ imageLoaded: true });
|
|
49958
|
-
} }, { srcSet: u, sizes: !
|
|
49959
|
-
return jsx(React$1.Fragment, null,
|
|
49952
|
+
} }, { srcSet: u, sizes: !r22 && c ? c : void 0 }));
|
|
49953
|
+
return jsx(React$1.Fragment, null, r22 ? s2 : jsx("picture", { ref: function(e4) {
|
|
49960
49954
|
return n.pictureRef = e4;
|
|
49961
|
-
} }, u && u.match(/builder\.io/) && !n.props.noWebp && jsx("source", { srcSet: u.replace(/\?/g, "?format=webp&"), type: "image/webp" }), s2), !
|
|
49955
|
+
} }, u && u.match(/builder\.io/) && !n.props.noWebp && jsx("source", { srcSet: u.replace(/\?/g, "?format=webp&"), type: "image/webp" }), s2), !i || r22 || f && l && l.length ? null : jsx("div", { className: "builder-image-sizer", css: { width: "100%", paddingTop: 100 * i + "%", pointerEvents: "none", fontSize: 0 } }, " "), l && l.length ? f ? l.map(function(e4, t4) {
|
|
49962
49956
|
return jsx(BuilderBlock$1, { key: e4.id, block: e4 });
|
|
49963
49957
|
}) : jsx("div", { css: { display: "flex", flexDirection: "column", alignItems: "stretch", position: "absolute", top: 0, left: 0, width: "100%", height: "100%" } }, l.map(function(e4, t4) {
|
|
49964
49958
|
return jsx(BuilderBlock$1, { key: e4.id, block: e4 });
|
|
@@ -49968,23 +49962,23 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
49968
49962
|
}(React$1.Component);
|
|
49969
49963
|
withBuilder(ImageComponent, { name: "Image", static: true, image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4", defaultStyles: { position: "relative", minHeight: "20px", minWidth: "20px", overflow: "hidden" }, canHaveChildren: true, inputs: [{ name: "image", type: "file", bubble: true, allowedFileTypes: IMAGE_FILE_TYPES, required: true, defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a", onChange: function(e) {
|
|
49970
49964
|
e.delete("srcset"), e.delete("noWebp");
|
|
49971
|
-
var t2, n,
|
|
49972
|
-
if (fetch(
|
|
49965
|
+
var t2, n, r2 = e.get("image"), i = e.get("aspectRatio");
|
|
49966
|
+
if (fetch(r2).then(function(e2) {
|
|
49973
49967
|
return e2.blob();
|
|
49974
49968
|
}).then(function(t22) {
|
|
49975
49969
|
t22.type.includes("svg") && e.set("noWebp", true);
|
|
49976
|
-
}),
|
|
49977
|
-
var
|
|
49978
|
-
|
|
49979
|
-
o = true, e2(
|
|
49980
|
-
},
|
|
49981
|
-
console.warn("Image load failed", e3.error),
|
|
49982
|
-
}),
|
|
49983
|
-
o ||
|
|
49970
|
+
}), r2 && (!i || 0.7041 === i)) return (t2 = r2, void 0 === n && (n = 6e4), new Promise(function(e2, r22) {
|
|
49971
|
+
var i2 = document.createElement("img"), o = false;
|
|
49972
|
+
i2.onload = function() {
|
|
49973
|
+
o = true, e2(i2);
|
|
49974
|
+
}, i2.addEventListener("error", function(e3) {
|
|
49975
|
+
console.warn("Image load failed", e3.error), r22(e3.error);
|
|
49976
|
+
}), i2.src = t2, setTimeout(function() {
|
|
49977
|
+
o || r22(new Error("Image load timed out"));
|
|
49984
49978
|
}, n);
|
|
49985
49979
|
})).then(function(t22) {
|
|
49986
|
-
var n2,
|
|
49987
|
-
e.get("image") !==
|
|
49980
|
+
var n2, i2 = e.get("aspectRatio");
|
|
49981
|
+
e.get("image") !== r2 || i2 && 0.7041 !== i2 || t22.width && t22.height && (e.set("aspectRatio", (n2 = t22.height / t22.width, Math.round(1e3 * n2) / 1e3)), e.set("height", t22.height), e.set("width", t22.width));
|
|
49988
49982
|
});
|
|
49989
49983
|
} }, { name: "backgroundSize", type: "text", defaultValue: "cover", enum: [{ label: "contain", value: "contain", helperText: "The image should never get cropped" }, { label: "cover", value: "cover", helperText: "The image should fill its box, cropping when needed" }] }, { name: "backgroundPosition", type: "text", defaultValue: "center", enum: ["center", "top", "left", "right", "bottom", "top left", "top right", "bottom left", "bottom right"] }, { name: "altText", type: "string", helperText: "Text to display when the user has images off" }, { name: "highPriority", type: "boolean", advanced: true, helperText: "Mark this image as high priority compared to other images on the page. This prevents lazy loading of the image and tells the browser to load this image before others on the page." }, { name: "height", type: "number", hideFromUI: true }, { name: "width", type: "number", hideFromUI: true }, { name: "sizes", type: "string", hideFromUI: true }, { name: "srcset", type: "string", hideFromUI: true }, { name: "lazy", type: "boolean", defaultValue: true, hideFromUI: true }, { name: "fitContent", type: "boolean", helperText: "When child blocks are provided, fit to them instead of using the image's aspect ratio", defaultValue: true }, { name: "aspectRatio", type: "number", helperText: "This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio", advanced: true, defaultValue: DEFAULT_ASPECT_RATIO$1 }] });
|
|
49990
49984
|
var DEFAULT_ASPECT_RATIO = 0.7004048582995948, VideoComponent = function(e) {
|
|
@@ -49998,8 +49992,8 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
49998
49992
|
var e2 = this, t22 = this.video;
|
|
49999
49993
|
if (t22) {
|
|
50000
49994
|
["muted", "playsInline", "autoPlay"].forEach(function(n) {
|
|
50001
|
-
var
|
|
50002
|
-
e2.props[n] ? t22.setAttribute(
|
|
49995
|
+
var r2 = n.toLowerCase();
|
|
49996
|
+
e2.props[n] ? t22.setAttribute(r2, r2) : t22.removeAttribute(r2);
|
|
50003
49997
|
});
|
|
50004
49998
|
}
|
|
50005
49999
|
}, t2.prototype.componentDidUpdate = function() {
|
|
@@ -50009,8 +50003,8 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
50009
50003
|
if (this.updateVideo(), this.lazyLoad && Builder$1.isBrowser) {
|
|
50010
50004
|
var t22 = throttle(function(n) {
|
|
50011
50005
|
if (e2.containerRef) {
|
|
50012
|
-
var
|
|
50013
|
-
|
|
50006
|
+
var r2 = e2.containerRef.getBoundingClientRect(), i = window.innerHeight / 2;
|
|
50007
|
+
r2.top < window.innerHeight + i && (e2.setState(function(e3) {
|
|
50014
50008
|
return __assign(__assign({}, e3), { load: true });
|
|
50015
50009
|
}), window.removeEventListener("scroll", t22), e2.scrollListener = null);
|
|
50016
50010
|
}
|
|
@@ -50020,12 +50014,12 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
50020
50014
|
}, t2.prototype.componentWillUnmount = function() {
|
|
50021
50015
|
Builder$1.isBrowser && this.scrollListener && (window.removeEventListener("scroll", this.scrollListener), this.scrollListener = null);
|
|
50022
50016
|
}, t2.prototype.render = function() {
|
|
50023
|
-
var e2 = this, t22 = this.props, n = t22.aspectRatio,
|
|
50017
|
+
var e2 = this, t22 = this.props, n = t22.aspectRatio, r2 = t22.children;
|
|
50024
50018
|
return jsx("div", { ref: function(t3) {
|
|
50025
50019
|
return e2.containerRef = t3;
|
|
50026
50020
|
}, css: { position: "relative" } }, jsx("video", { key: this.props.video || "no-src", poster: this.props.posterImage, ref: function(t3) {
|
|
50027
50021
|
return e2.video = t3;
|
|
50028
|
-
}, autoPlay: this.props.autoPlay, muted: this.props.muted, controls: this.props.controls, loop: this.props.loop, preload: this.props.preload || "metadata", className: "builder-video", css: __assign({ width: "100%", height: "100%", objectFit: this.props.fit, objectPosition: this.props.position, zIndex: 2, borderRadius: 1 }, n ? { position: "absolute" } : null) }, (!this.lazyLoad || this.state.load) && jsx("source", { type: "video/mp4", src: this.props.video })), !n || this.props.fitContent &&
|
|
50022
|
+
}, autoPlay: this.props.autoPlay, muted: this.props.muted, controls: this.props.controls, loop: this.props.loop, preload: this.props.preload || "metadata", className: "builder-video", css: __assign({ width: "100%", height: "100%", objectFit: this.props.fit, objectPosition: this.props.position, zIndex: 2, borderRadius: 1 }, n ? { position: "absolute" } : null) }, (!this.lazyLoad || this.state.load) && jsx("source", { type: "video/mp4", src: this.props.video })), !n || this.props.fitContent && r2 ? null : jsx("div", { css: { width: "100%", paddingTop: 100 * n + "%", pointerEvents: "none", fontSize: 0 } }), r2 && this.props.fitContent ? jsx("div", { css: { display: "flex", flexDirection: "column", alignItems: "stretch" } }, r2) : r2 ? jsx("div", { css: { pointerEvents: "none", display: "flex", flexDirection: "column", alignItems: "stretch", position: "absolute", top: 0, left: 0, width: "100%", height: "100%" } }, r2) : null);
|
|
50029
50023
|
}, t2;
|
|
50030
50024
|
}(React$1.Component);
|
|
50031
50025
|
Builder$1.registerComponent(withChildren(VideoComponent), { name: "Video", canHaveChildren: true, defaultStyles: { minHeight: "20px", minWidth: "20px" }, image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb", inputs: [{ name: "video", type: "file", allowedFileTypes: VIDEO_FILE_TYPES, bubble: true, defaultValue: "https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true", required: true }, { name: "posterImage", type: "file", allowedFileTypes: IMAGE_FILE_TYPES, helperText: "Image to show before the video plays" }, { name: "autoPlay", type: "boolean", defaultValue: true }, { name: "controls", type: "boolean", defaultValue: false }, { name: "muted", type: "boolean", defaultValue: true }, { name: "loop", type: "boolean", defaultValue: true }, { name: "playsInline", type: "boolean", defaultValue: true }, { name: "fit", type: "text", defaultValue: "cover", enum: ["contain", "cover", "fill", "auto"] }, { name: "preload", type: "text", defaultValue: "metadata", enum: ["auto", "metadata", "none"] }, { name: "fitContent", type: "boolean", helperText: "When child blocks are provided, fit to them instead of using the aspect ratio", defaultValue: true, advanced: true }, { name: "position", type: "text", defaultValue: "center", enum: ["center", "top", "left", "right", "bottom", "top left", "top right", "bottom left", "bottom right"] }, { name: "height", type: "number", advanced: true }, { name: "width", type: "number", advanced: true }, { name: "aspectRatio", type: "number", advanced: true, defaultValue: DEFAULT_ASPECT_RATIO }, { name: "lazyLoad", type: "boolean", helperText: 'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption', defaultValue: true, advanced: true }] });
|
|
@@ -50048,10 +50042,10 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
50048
50042
|
return __extends(t2, e), Object.defineProperty(t2.prototype, "placeholder", { get: function() {
|
|
50049
50043
|
return jsx("div", { css: { padding: 10 } }, "Symbols let you reuse dynamic elements across your content. Please choose a model and entry for this symbol.");
|
|
50050
50044
|
}, enumerable: false, configurable: true }), t2.prototype.componentDidMount = function() {
|
|
50051
|
-
var e2, t22, n,
|
|
50045
|
+
var e2, t22, n, r2 = this;
|
|
50052
50046
|
this.useStatic && this.staticRef && refs[null === (e2 = this.props.builderBlock) || void 0 === e2 ? void 0 : e2.id] && (null === (t22 = this.staticRef.parentNode) || void 0 === t22 || t22.replaceChild(refs[null === (n = this.props.builderBlock) || void 0 === n ? void 0 : n.id], this.staticRef)), Builder$1.nextTick(function() {
|
|
50053
|
-
var e3 =
|
|
50054
|
-
|
|
50047
|
+
var e3 = r2.props.symbol || {}, t3 = e3.model, n2 = e3.entry;
|
|
50048
|
+
r2.isEditingThisSymbol = Boolean(Builder$1.isEditing && t3 === builder.editingModel && n2 && location.search.includes("overrides.".concat(n2)));
|
|
50055
50049
|
});
|
|
50056
50050
|
}, Object.defineProperty(t2.prototype, "useStatic", { get: function() {
|
|
50057
50051
|
var e2;
|
|
@@ -50061,18 +50055,18 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
50061
50055
|
if (this.useStatic) return jsx("div", { ref: function(e3) {
|
|
50062
50056
|
return n.staticRef = e3;
|
|
50063
50057
|
} });
|
|
50064
|
-
var
|
|
50065
|
-
|
|
50066
|
-
var o = this.props.dataOnly ? NoWrap : this.props.builderBlock && this.props.builderBlock.tagName || "div", a =
|
|
50067
|
-
s && (l || f) || (null === (e2 = null == c ? void 0 : c.data) || void 0 === e2 ? void 0 : e2.blocksJs) || d || (
|
|
50058
|
+
var r2 = this.props.symbol, i = false;
|
|
50059
|
+
r2 || (i = true);
|
|
50060
|
+
var o = this.props.dataOnly ? NoWrap : this.props.builderBlock && this.props.builderBlock.tagName || "div", a = r2 || {}, s = a.model, l = a.entry, u = a.data, c = a.content, d = a.inline, p = a.ownerId, f = (null == r2 ? void 0 : r2.dynamic) || this.props.dynamic;
|
|
50061
|
+
s && (l || f) || (null === (e2 = null == c ? void 0 : c.data) || void 0 === e2 ? void 0 : e2.blocksJs) || d || (i = true), this.isEditingThisSymbol && (i = false);
|
|
50068
50062
|
var m = f ? null === (t22 = this.props.builderBlock) || void 0 === t22 ? void 0 : t22.id : [s, l].join(":"), h = u && size(u) && hash(u);
|
|
50069
50063
|
m && h && h.length < 300 && (m += ":" + h);
|
|
50070
50064
|
var v = this.props.attributes || {};
|
|
50071
50065
|
return jsx(BuilderStoreContext.Consumer, { key: (s || "no model") + ":" + (l || "no entry" + this.isEditingThisSymbol) }, function(e3) {
|
|
50072
|
-
var t3, a2, d2, f2, h2, g2, b, y, _2, S,
|
|
50073
|
-
return jsx(o, __assign({ "data-model": s }, v, { className: (v.class || v.className || "") + " builder-symbol" + ((null ==
|
|
50066
|
+
var t3, a2, d2, f2, h2, g2, b, y, _2, S, w, x = "".concat(m, "_").concat((null === (t3 = null == e3 ? void 0 : e3.state) || void 0 === t3 ? void 0 : t3.locale) || "Default");
|
|
50067
|
+
return jsx(o, __assign({ "data-model": s }, v, { className: (v.class || v.className || "") + " builder-symbol" + ((null == r2 ? void 0 : r2.inline) ? " builder-inline-symbol" : "") + ((null == r2 ? void 0 : r2.dynamic) || n.props.dynamic ? " builder-dynamic-symbol" : "") }), i ? n.placeholder : jsx(BuilderComponent, __assign({}, p && { apiKey: p }, (null === (a2 = e3.state) || void 0 === a2 ? void 0 : a2.locale) && { locale: e3.state.locale }, { isChild: true, ref: function(e4) {
|
|
50074
50068
|
return n.ref = e4;
|
|
50075
|
-
}, context: __assign(__assign({}, e3.context), { symbolId: null === (d2 = n.props.builderBlock) || void 0 === d2 ? void 0 : d2.id }), model: s, entry: l, data: __assign(__assign(__assign({}, u), !!n.props.inheritState && omit$2(e3.state, "children")), null === (_2 = null === (y = null === (b = null === (g2 = null === (h2 = null === (f2 = n.props.builderBlock) || void 0 === f2 ? void 0 : f2.component) || void 0 === h2 ? void 0 : h2.options) || void 0 === g2 ? void 0 : g2.symbol) || void 0 === b ? void 0 : b.content) || void 0 === y ? void 0 : y.data) || void 0 === _2 ? void 0 : _2.state), renderLink: e3.renderLink, inlineContent: null ==
|
|
50069
|
+
}, context: __assign(__assign({}, e3.context), { symbolId: null === (d2 = n.props.builderBlock) || void 0 === d2 ? void 0 : d2.id }), model: s, entry: l, data: __assign(__assign(__assign({}, u), !!n.props.inheritState && omit$2(e3.state, "children")), null === (_2 = null === (y = null === (b = null === (g2 = null === (h2 = null === (f2 = n.props.builderBlock) || void 0 === f2 ? void 0 : f2.component) || void 0 === h2 ? void 0 : h2.options) || void 0 === g2 ? void 0 : g2.symbol) || void 0 === b ? void 0 : b.content) || void 0 === y ? void 0 : y.data) || void 0 === _2 ? void 0 : _2.state), renderLink: e3.renderLink, inlineContent: null == r2 ? void 0 : r2.inline }, c && { content: c }, { key: x, options: __assign(__assign({}, !n.isEditingThisSymbol && { key: x, noEditorUpdates: true }), "content" === Builder$1.singletonInstance.apiEndpoint && l && { query: { id: l } }), codegen: !!(null === (S = null == c ? void 0 : c.data) || void 0 === S ? void 0 : S.blocksJs), hydrate: null === (w = e3.state) || void 0 === w ? void 0 : w._hydrate, builderBlock: n.props.builderBlock, dataOnly: n.props.dataOnly }), n.props.children));
|
|
50076
50070
|
});
|
|
50077
50071
|
}, t2;
|
|
50078
50072
|
}(React$1.Component);
|
|
@@ -50137,9 +50131,9 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
50137
50131
|
var prefetched = /* @__PURE__ */ new Set();
|
|
50138
50132
|
function searchToObject(e) {
|
|
50139
50133
|
var t2 = (e.search || "").substring(1).split("&"), n = {};
|
|
50140
|
-
for (var
|
|
50141
|
-
var
|
|
50142
|
-
n[decodeURIComponent(
|
|
50134
|
+
for (var r2 in t2) if (t2[r2] && "string" == typeof t2[r2]) {
|
|
50135
|
+
var i = t2[r2].split("=");
|
|
50136
|
+
n[decodeURIComponent(i[0])] = decodeURIComponent(i[1]);
|
|
50143
50137
|
}
|
|
50144
50138
|
return n;
|
|
50145
50139
|
}
|
|
@@ -50152,16 +50146,16 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
50152
50146
|
if (!(t22.preloadQueue > 4) && false !== t22.props.preloadOnHover) {
|
|
50153
50147
|
var n = t22.findHrefTarget(e2);
|
|
50154
50148
|
if (n) {
|
|
50155
|
-
var
|
|
50156
|
-
if (
|
|
50157
|
-
if (!t22.isRelative(
|
|
50158
|
-
var
|
|
50159
|
-
if (!
|
|
50160
|
-
|
|
50161
|
-
}
|
|
50162
|
-
if (!
|
|
50163
|
-
prefetched.add(
|
|
50164
|
-
var o = t22.parseUrl(
|
|
50149
|
+
var r2 = n.getAttribute("href");
|
|
50150
|
+
if (r2) {
|
|
50151
|
+
if (!t22.isRelative(r2)) {
|
|
50152
|
+
var i = t22.convertToRelative(r2);
|
|
50153
|
+
if (!i) return;
|
|
50154
|
+
r2 = i;
|
|
50155
|
+
}
|
|
50156
|
+
if (!r2.startsWith("#") && !prefetched.has(r2)) {
|
|
50157
|
+
prefetched.add(r2);
|
|
50158
|
+
var o = t22.parseUrl(r2);
|
|
50165
50159
|
t22.preloadQueue++;
|
|
50166
50160
|
var a = builder.getUserAttributes();
|
|
50167
50161
|
a.urlPath = o.pathname, a.queryString = o.search;
|
|
@@ -50174,19 +50168,19 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
50174
50168
|
}
|
|
50175
50169
|
}, t22.onClick = function(e2) {
|
|
50176
50170
|
return __awaiter(t22, void 0, void 0, function() {
|
|
50177
|
-
var t3, n,
|
|
50171
|
+
var t3, n, r2, i;
|
|
50178
50172
|
return __generator(this, function(o) {
|
|
50179
50173
|
if (false === this.props.handleRouting) return [2];
|
|
50180
50174
|
if (0 !== e2.button || e2.ctrlKey || e2.defaultPrevented || e2.metaKey) return [2];
|
|
50181
50175
|
if (!(t3 = this.findHrefTarget(e2))) return [2];
|
|
50182
50176
|
if (t3.target && "_client" !== t3.target) return [2];
|
|
50183
50177
|
if (!(n = t3.getAttribute("href"))) return [2];
|
|
50184
|
-
if (this.props.onRoute && (
|
|
50178
|
+
if (this.props.onRoute && (r2 = { url: n, anchorNode: t3, preventDefault: function() {
|
|
50185
50179
|
this.defaultPrevented = true;
|
|
50186
|
-
}, defaultPrevented: false }, this.props.onRoute(
|
|
50180
|
+
}, defaultPrevented: false }, this.props.onRoute(r2), r2.defaultPrevented)) return [2];
|
|
50187
50181
|
if (!this.isRelative(n)) {
|
|
50188
|
-
if (!(
|
|
50189
|
-
n =
|
|
50182
|
+
if (!(i = this.convertToRelative(n))) return [2];
|
|
50183
|
+
n = i;
|
|
50190
50184
|
}
|
|
50191
50185
|
return n.startsWith("#") || (e2.preventDefault(), this.route(n)), [2];
|
|
50192
50186
|
});
|
|
@@ -50210,8 +50204,8 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
50210
50204
|
var e2 = this, t22 = this.model;
|
|
50211
50205
|
return jsx(BuilderStoreContext.Consumer, null, function(n) {
|
|
50212
50206
|
e2.privateState = n;
|
|
50213
|
-
var
|
|
50214
|
-
return jsx("div", { className: "builder-router", "data-model": t22 }, jsx("style", null, "\n @keyframes builderLoadingSpinner {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n /* TODO: overridable tag */\n .builder-page-loading {\n -webkit-animation: builderLoadingSpinner 1s infinite linear;\n animation: builderLoadingSpinner 1s infinite linear;\n -webkit-transform: translateZ(0);\n transform: translateZ(0);\n border-radius: 50%;\n width: 36px;\n height: 36px;\n margin: 6px auto;\n position: relative;\n border: 1px solid transparent;\n border-left: 1px solid #808284;\n }\n "), jsx(BuilderComponent, { key:
|
|
50207
|
+
var r2 = n.state && n.state.location && n.state.location.pathname + n.state.location.search;
|
|
50208
|
+
return jsx("div", { className: "builder-router", "data-model": t22 }, jsx("style", null, "\n @keyframes builderLoadingSpinner {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n /* TODO: overridable tag */\n .builder-page-loading {\n -webkit-animation: builderLoadingSpinner 1s infinite linear;\n animation: builderLoadingSpinner 1s infinite linear;\n -webkit-transform: translateZ(0);\n transform: translateZ(0);\n border-radius: 50%;\n width: 36px;\n height: 36px;\n margin: 6px auto;\n position: relative;\n border: 1px solid transparent;\n border-left: 1px solid #808284;\n }\n "), jsx(BuilderComponent, { key: r2, data: e2.props.data, content: e2.routed ? void 0 : e2.props.content, modelName: t22, options: { key: Builder$1.isEditing ? void 0 : e2.model + ":" + r2 } }, e2.props.children || jsx("div", { css: { display: "flex" } }, jsx("div", { css: { margin: "40vh auto" }, className: "builder-page-loading" }))));
|
|
50215
50209
|
});
|
|
50216
50210
|
}, t2.prototype.findHrefTarget = function(e2) {
|
|
50217
50211
|
for (var t22 = e2.target; t22; ) {
|
|
@@ -50228,20 +50222,20 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
50228
50222
|
}, t2.prototype.convertToRelative = function(e2) {
|
|
50229
50223
|
var t22 = this.parseUrl(location.href), n = this.parseUrl(e2);
|
|
50230
50224
|
if (t22.host === n.host) {
|
|
50231
|
-
var
|
|
50232
|
-
return
|
|
50225
|
+
var r2 = n.pathname + (n.search ? n.search : "");
|
|
50226
|
+
return r2.startsWith("#") ? null : r2 || "/";
|
|
50233
50227
|
}
|
|
50234
50228
|
return null;
|
|
50235
50229
|
}, t2;
|
|
50236
50230
|
}(React$1.Component);
|
|
50237
50231
|
withBuilder(RouterComponent, { name: "Core:Router", hideFromInsertMenu: true, inputs: [{ name: "model", type: "string", defaultValue: "page", advanced: true }, { name: "handleRouting", type: "boolean", defaultValue: true, advanced: true }, { name: "preloadOnHover", type: "boolean", defaultValue: true, advanced: true }, { name: "onRoute", type: "function", advanced: true }] });
|
|
50238
50232
|
function Mutation(e) {
|
|
50239
|
-
var t2, n,
|
|
50233
|
+
var t2, n, r2 = React$1.useRef(null);
|
|
50240
50234
|
useWaitForSelector(e.selector, function(t22) {
|
|
50241
|
-
"afterEnd" !== e.type && (t22.innerHTML = ""), t22.appendChild(
|
|
50235
|
+
"afterEnd" !== e.type && (t22.innerHTML = ""), t22.appendChild(r2.current.firstElementChild);
|
|
50242
50236
|
});
|
|
50243
|
-
var
|
|
50244
|
-
return jsx("span", { style: { display: "none" }, ref:
|
|
50237
|
+
var i = null === (t2 = e.builderBlock) || void 0 === t2 ? void 0 : t2.children;
|
|
50238
|
+
return jsx("span", { style: { display: "none" }, ref: r2 }, jsx(BuilderBlocks, { style: { display: "inline" }, child: true, parentElementId: null === (n = e.builderBlock) || void 0 === n ? void 0 : n.id, dataPath: "this.children", blocks: i }));
|
|
50245
50239
|
}
|
|
50246
50240
|
function useWaitForSelector(e, t2) {
|
|
50247
50241
|
React$1.useLayoutEffect(function() {
|
|
@@ -50251,25 +50245,25 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
50251
50245
|
} catch (e2) {
|
|
50252
50246
|
console.warn(e2);
|
|
50253
50247
|
}
|
|
50254
|
-
var
|
|
50248
|
+
var r2 = new MutationObserver(function() {
|
|
50255
50249
|
try {
|
|
50256
50250
|
var n2 = document.querySelector(e);
|
|
50257
|
-
n2 && (
|
|
50251
|
+
n2 && (r2.disconnect(), t2(n2));
|
|
50258
50252
|
} catch (e2) {
|
|
50259
50253
|
console.warn(e2);
|
|
50260
50254
|
}
|
|
50261
50255
|
});
|
|
50262
|
-
return
|
|
50263
|
-
|
|
50256
|
+
return r2.observe(document.body, { attributes: true, subtree: true, characterData: true }), function() {
|
|
50257
|
+
r2.disconnect();
|
|
50264
50258
|
};
|
|
50265
50259
|
}, [e]);
|
|
50266
50260
|
}
|
|
50267
50261
|
Builder$1.registerComponent(Mutation, { name: "Builder:Mutation", canHaveChildren: true, noWrap: true, hideFromInsertMenu: true, inputs: [{ name: "type", type: "string", defaultValue: "replace", enum: [{ label: "Replace", value: "replace", helperText: "Replace the contents of this site region with content from Builder" }, { label: "Append", value: "afterEnd", helperText: "Append Builder content after the chosen site region" }] }, { name: "selector", type: "builder:domSelector" }] });
|
|
50268
50262
|
var get$1 = function(e, t2, n) {
|
|
50269
|
-
var
|
|
50263
|
+
var r2 = String.prototype.split.call(t2, /[,[\].]+?/).filter(Boolean).reduce(function(e2, t22) {
|
|
50270
50264
|
return null != e2 ? e2[t22] : e2;
|
|
50271
50265
|
}, e);
|
|
50272
|
-
return void 0 ===
|
|
50266
|
+
return void 0 === r2 || r2 === e ? n : r2;
|
|
50273
50267
|
}, MULTIPART_CONTENT_TYPE = "multipart/form-data", JSON_CONTENT_TYPE = "application/json", ENCODED_CONTENT_TYPE = "application/x-www-form-urlencoded", FormComponent = function(e) {
|
|
50274
50268
|
function t2() {
|
|
50275
50269
|
var t22 = null !== e && e.apply(this, arguments) || this;
|
|
@@ -50283,12 +50277,12 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
50283
50277
|
return jsx(BuilderStoreContext.Provider, { value: __assign(__assign({}, t22), { state: __assign(__assign({}, t22.state), { formErrorMessage: e2.state.formErrorMessage }) }) }, jsx("form", __assign({}, e2.props.validate ? {} : { noValidate: true }, { ref: function(t3) {
|
|
50284
50278
|
return e2.ref = t3;
|
|
50285
50279
|
}, action: !e2.props.sendWithJs && e2.props.action ? e2.props.action : void 0, method: e2.props.method, name: e2.props.name, onSubmit: function(t3) {
|
|
50286
|
-
var n,
|
|
50280
|
+
var n, r2 = e2.props.sendWithJs || "email" === e2.props.sendSubmissionsTo;
|
|
50287
50281
|
if ("zapier" === e2.props.sendSubmissionsTo) t3.preventDefault();
|
|
50288
|
-
else if (
|
|
50282
|
+
else if (r2) {
|
|
50289
50283
|
if (!e2.props.action && "email" !== e2.props.sendSubmissionsTo) return void t3.preventDefault();
|
|
50290
50284
|
t3.preventDefault();
|
|
50291
|
-
var
|
|
50285
|
+
var i = t3.currentTarget, o = e2.props.customHeaders || {}, a = void 0, s = new FormData(i), l = Array.from(t3.currentTarget.querySelectorAll("input,select,textarea")).filter(function(e3) {
|
|
50292
50286
|
return !!e3.name;
|
|
50293
50287
|
}).map(function(e3) {
|
|
50294
50288
|
var t4, n2 = e3.name;
|
|
@@ -50296,8 +50290,8 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
50296
50290
|
if (e3.checked) return { key: n2, value: t4 = e3.name };
|
|
50297
50291
|
} else if ("checkbox" === e3.type) t4 = e3.checked;
|
|
50298
50292
|
else if ("number" === e3.type || "range" === e3.type) {
|
|
50299
|
-
var
|
|
50300
|
-
isNaN(
|
|
50293
|
+
var r22 = e3.valueAsNumber;
|
|
50294
|
+
isNaN(r22) || (t4 = r22);
|
|
50301
50295
|
} else t4 = "file" === e3.type ? e3.files : e3.value;
|
|
50302
50296
|
else t4 = e3.value;
|
|
50303
50297
|
return { key: n2, value: t4 };
|
|
@@ -50319,14 +50313,14 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
50319
50313
|
return encodeURIComponent(n2) + "=" + encodeURIComponent(t4);
|
|
50320
50314
|
}).join("&");
|
|
50321
50315
|
}
|
|
50322
|
-
u && u !== MULTIPART_CONTENT_TYPE && (
|
|
50316
|
+
u && u !== MULTIPART_CONTENT_TYPE && (r2 && (null === (n = e2.props.action) || void 0 === n ? void 0 : n.includes("zapier.com")) || (o["content-type"] = u));
|
|
50323
50317
|
var d = new CustomEvent("presubmit", { detail: { body: a } });
|
|
50324
50318
|
if (e2.ref && (e2.ref.dispatchEvent(d), d.defaultPrevented)) return;
|
|
50325
50319
|
e2.setState(__assign(__assign({}, e2.state), { state: "sending" }));
|
|
50326
50320
|
var p = "".concat("dev" === builder.env ? "http://localhost:5000" : "https://builder.io", "/api/v1/form-submit?apiKey=").concat(builder.apiKey, "&to=").concat(btoa(e2.props.sendSubmissionsToEmail || ""), "&name=").concat(encodeURIComponent(e2.props.name || ""));
|
|
50327
50321
|
fetch("email" === e2.props.sendSubmissionsTo ? p : e2.props.action, { body: a, headers: o, method: e2.props.method || "post" }).then(function(t4) {
|
|
50328
50322
|
return __awaiter(e2, void 0, void 0, function() {
|
|
50329
|
-
var e3, n2,
|
|
50323
|
+
var e3, n2, r22, i2, o2;
|
|
50330
50324
|
return __generator(this, function(a2) {
|
|
50331
50325
|
switch (a2.label) {
|
|
50332
50326
|
case 0:
|
|
@@ -50338,9 +50332,9 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
50338
50332
|
case 3:
|
|
50339
50333
|
e3 = a2.sent(), a2.label = 4;
|
|
50340
50334
|
case 4:
|
|
50341
|
-
if (!t4.ok && this.props.errorMessagePath && (
|
|
50342
|
-
if (
|
|
50343
|
-
if (this.ref.dispatchEvent(
|
|
50335
|
+
if (!t4.ok && this.props.errorMessagePath && (r22 = get$1(e3, this.props.errorMessagePath)) && ("string" != typeof r22 && (r22 = JSON.stringify(r22)), this.setState(__assign(__assign({}, this.state), { formErrorMessage: r22 }))), this.setState(__assign(__assign({}, this.state), { responseData: e3, state: t4.ok ? "success" : "error" })), t4.ok) {
|
|
50336
|
+
if (i2 = new CustomEvent("submit:success", { detail: { res: t4, body: e3 } }), this.ref) {
|
|
50337
|
+
if (this.ref.dispatchEvent(i2), i2.defaultPrevented) return [2];
|
|
50344
50338
|
false !== this.props.resetFormOnSubmit && this.ref.reset();
|
|
50345
50339
|
}
|
|
50346
50340
|
this.props.successUrl && (this.ref ? (o2 = new CustomEvent("route", { detail: { url: this.props.successUrl } }), this.ref.dispatchEvent(o2), o2.defaultPrevented || (location.href = this.props.successUrl)) : location.href = this.props.successUrl);
|
|
@@ -50429,9 +50423,9 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
50429
50423
|
};
|
|
50430
50424
|
Builder$1.registerComponent(RawText, { name: "Builder:RawText", hideFromInsertMenu: true, inputs: [{ name: "text", bubble: true, type: "longText", required: true }] });
|
|
50431
50425
|
var filterWithCustomTargetingScript = 'function filterWithCustomTargeting(e,t,n,r){var i={query:t,startDate:n,endDate:r},o=e.date&&new Date(e.date)||new Date;return!(i.startDate&&new Date(i.startDate)>o)&&(!(i.endDate&&new Date(i.endDate)<o)&&(!i.query||!i.query.length||i.query.every((function(t){return objectMatchesQuery(e,t)}))))}function isString(e){return"string"==typeof e}function isNumber(e){return"number"==typeof e}function objectMatchesQuery(e,t){return function(){var n=t.property,r=t.operator,i=t.value;if(t&&"urlPath"===t.property&&t.value&&"string"==typeof t.value&&"/"!==t.value&&t.value.endsWith("/")&&(i=t.value.slice(0,-1)),!n||!r)return!0;if(Array.isArray(i))return"isNot"===r?i.every((function(t){return objectMatchesQuery(e,{property:n,operator:r,value:t})})):!!i.find((function(t){return objectMatchesQuery(e,{property:n,operator:r,value:t})}));var o=e[n];if(Array.isArray(o))return o.includes(i);switch(r){case"is":return o===i;case"isNot":return o!==i;case"contains":return(isString(o)||Array.isArray(o))&&o.includes(String(i));case"startsWith":return isString(o)&&o.startsWith(String(i));case"endsWith":return isString(o)&&o.endsWith(String(i));case"greaterThan":return isNumber(o)&&isNumber(i)&&o>i;case"lessThan":return isNumber(o)&&isNumber(i)&&o<i;case"greaterThanOrEqualTo":return isNumber(o)&&isNumber(i)&&o>=i;case"lessThanOrEqualTo":return isNumber(o)&&isNumber(i)&&o<=i}return!1}()}';
|
|
50432
|
-
function filterWithCustomTargeting(e, t2, n,
|
|
50433
|
-
var
|
|
50434
|
-
return !(
|
|
50426
|
+
function filterWithCustomTargeting(e, t2, n, r2) {
|
|
50427
|
+
var i = { query: t2, startDate: n, endDate: r2 }, o = e.date && new Date(e.date) || /* @__PURE__ */ new Date();
|
|
50428
|
+
return !(i.startDate && new Date(i.startDate) > o) && (!(i.endDate && new Date(i.endDate) < o) && (!i.query || !i.query.length || i.query.every(function(t22) {
|
|
50435
50429
|
return objectMatchesQuery(e, t22);
|
|
50436
50430
|
})));
|
|
50437
50431
|
}
|
|
@@ -50443,40 +50437,40 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
50443
50437
|
}
|
|
50444
50438
|
function objectMatchesQuery(e, t2) {
|
|
50445
50439
|
return function() {
|
|
50446
|
-
var n = t2.property,
|
|
50447
|
-
if (t2 && "urlPath" === t2.property && t2.value && "string" == typeof t2.value && "/" !== t2.value && t2.value.endsWith("/") && (
|
|
50448
|
-
if (Array.isArray(
|
|
50449
|
-
return objectMatchesQuery(e, { property: n, operator:
|
|
50450
|
-
}) : !!
|
|
50451
|
-
return objectMatchesQuery(e, { property: n, operator:
|
|
50440
|
+
var n = t2.property, r2 = t2.operator, i = t2.value;
|
|
50441
|
+
if (t2 && "urlPath" === t2.property && t2.value && "string" == typeof t2.value && "/" !== t2.value && t2.value.endsWith("/") && (i = t2.value.slice(0, -1)), !n || !r2) return true;
|
|
50442
|
+
if (Array.isArray(i)) return "isNot" === r2 ? i.every(function(t22) {
|
|
50443
|
+
return objectMatchesQuery(e, { property: n, operator: r2, value: t22 });
|
|
50444
|
+
}) : !!i.find(function(t22) {
|
|
50445
|
+
return objectMatchesQuery(e, { property: n, operator: r2, value: t22 });
|
|
50452
50446
|
});
|
|
50453
50447
|
var o = e[n];
|
|
50454
|
-
if (Array.isArray(o)) return o.includes(
|
|
50455
|
-
switch (
|
|
50448
|
+
if (Array.isArray(o)) return o.includes(i);
|
|
50449
|
+
switch (r2) {
|
|
50456
50450
|
case "is":
|
|
50457
|
-
return o ===
|
|
50451
|
+
return o === i;
|
|
50458
50452
|
case "isNot":
|
|
50459
|
-
return o !==
|
|
50453
|
+
return o !== i;
|
|
50460
50454
|
case "contains":
|
|
50461
|
-
return (isString$1(o) || Array.isArray(o)) && o.includes(String(
|
|
50455
|
+
return (isString$1(o) || Array.isArray(o)) && o.includes(String(i));
|
|
50462
50456
|
case "startsWith":
|
|
50463
|
-
return isString$1(o) && o.startsWith(String(
|
|
50457
|
+
return isString$1(o) && o.startsWith(String(i));
|
|
50464
50458
|
case "endsWith":
|
|
50465
|
-
return isString$1(o) && o.endsWith(String(
|
|
50459
|
+
return isString$1(o) && o.endsWith(String(i));
|
|
50466
50460
|
case "greaterThan":
|
|
50467
|
-
return isNumber(o) && isNumber(
|
|
50461
|
+
return isNumber(o) && isNumber(i) && o > i;
|
|
50468
50462
|
case "lessThan":
|
|
50469
|
-
return isNumber(o) && isNumber(
|
|
50463
|
+
return isNumber(o) && isNumber(i) && o < i;
|
|
50470
50464
|
case "greaterThanOrEqualTo":
|
|
50471
|
-
return isNumber(o) && isNumber(
|
|
50465
|
+
return isNumber(o) && isNumber(i) && o >= i;
|
|
50472
50466
|
case "lessThanOrEqualTo":
|
|
50473
|
-
return isNumber(o) && isNumber(
|
|
50467
|
+
return isNumber(o) && isNumber(i) && o <= i;
|
|
50474
50468
|
}
|
|
50475
50469
|
return false;
|
|
50476
50470
|
}();
|
|
50477
50471
|
}
|
|
50478
50472
|
function PersonalizationContainer(e) {
|
|
50479
|
-
var t2, n,
|
|
50473
|
+
var t2, n, r2, i, o, a, s, l, u, c, d, p, f, m, h, v, g2, b, y, _2, S, w = Boolean(Builder$1.isBrowser && (null === (t2 = window.__hydrated) || void 0 === t2 ? void 0 : t2[null === (n = e.builderBlock) || void 0 === n ? void 0 : n.id])), x = reactExports.useRef(null), k = reactExports.useState(w), B = k[0], C = k[1], E = reactExports.useState(0), R = E[0], T = E[1], I = reactExports.useContext(BuilderStoreContext);
|
|
50480
50474
|
if (reactExports.useEffect(function() {
|
|
50481
50475
|
var e2;
|
|
50482
50476
|
C(true);
|
|
@@ -50486,16 +50480,16 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
50486
50480
|
return t22.unsubscribe();
|
|
50487
50481
|
}];
|
|
50488
50482
|
if (!Builder$1.isEditing && !Builder$1.isPreviewing) {
|
|
50489
|
-
var
|
|
50490
|
-
null === (e2 =
|
|
50491
|
-
var
|
|
50483
|
+
var r22 = j[0];
|
|
50484
|
+
null === (e2 = x.current) || void 0 === e2 || e2.dispatchEvent(new CustomEvent("builder.variantLoaded", { detail: { variant: r22 || "default", content: I.content }, bubbles: true }));
|
|
50485
|
+
var i2 = new IntersectionObserver(function(e3) {
|
|
50492
50486
|
e3.forEach(function(e4) {
|
|
50493
50487
|
var t3;
|
|
50494
|
-
e4.isIntersecting && (null === (t3 =
|
|
50488
|
+
e4.isIntersecting && (null === (t3 = x.current) || void 0 === t3 || t3.dispatchEvent(new CustomEvent("builder.variantDisplayed", { detail: { variant: r22 || "default", content: I.content }, bubbles: true })));
|
|
50495
50489
|
});
|
|
50496
50490
|
});
|
|
50497
|
-
|
|
50498
|
-
return
|
|
50491
|
+
i2.observe(x.current), n2.push(function() {
|
|
50492
|
+
return i2.disconnect();
|
|
50499
50493
|
});
|
|
50500
50494
|
}
|
|
50501
50495
|
return function() {
|
|
@@ -50503,15 +50497,15 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
50503
50497
|
return e3();
|
|
50504
50498
|
});
|
|
50505
50499
|
};
|
|
50506
|
-
}, []), Builder$1.isServer) return React$1.createElement(React$1.Fragment, null, React$1.createElement("div", __assign({}, e.attributes, { style: __assign({ opacity: 1, transition: "opacity 0.2s ease-in-out" }, null === (
|
|
50507
|
-
var
|
|
50508
|
-
return React$1.createElement("template", { key: n2, "data-variant-id": (null === (
|
|
50500
|
+
}, []), Builder$1.isServer) return React$1.createElement(React$1.Fragment, null, React$1.createElement("div", __assign({}, e.attributes, { style: __assign({ opacity: 1, transition: "opacity 0.2s ease-in-out" }, null === (r2 = e.attributes) || void 0 === r2 ? void 0 : r2.style), className: "builder-personalization-container ".concat(e.attributes.className) }), null === (i = e.variants) || void 0 === i ? void 0 : i.map(function(t22, n2) {
|
|
50501
|
+
var r22, i2;
|
|
50502
|
+
return React$1.createElement("template", { key: n2, "data-variant-id": (null === (r22 = e.builderBlock) || void 0 === r22 ? void 0 : r22.id) + n2 }, React$1.createElement(BuilderBlocks, { blocks: t22.blocks, parentElementId: null === (i2 = e.builderBlock) || void 0 === i2 ? void 0 : i2.id, dataPath: "component.options.variants.".concat(n2, ".blocks"), child: true }));
|
|
50509
50503
|
}), React$1.createElement("script", { id: "variants-script-".concat(null === (o = e.builderBlock) || void 0 === o ? void 0 : o.id), dangerouslySetInnerHTML: { __html: getPersonalizationScript(e.variants, (null === (a = e.builderBlock) || void 0 === a ? void 0 : a.id) || "none", null === (s = e.builderState.state) || void 0 === s ? void 0 : s.locale) } }), React$1.createElement(BuilderBlocks, { blocks: null === (l = e.builderBlock) || void 0 === l ? void 0 : l.children, parentElementId: null === (u = e.builderBlock) || void 0 === u ? void 0 : u.id, dataPath: "this.children", child: true })), React$1.createElement("script", { dangerouslySetInnerHTML: { __html: "\n window.__hydrated = window.__hydrated || {};\n window.__hydrated['".concat(null === (c = e.builderBlock) || void 0 === c ? void 0 : c.id, "'] = true;\n ").replace(/\s+/g, " ") } }));
|
|
50510
50504
|
var j = (e.variants || []).filter(function(t22) {
|
|
50511
50505
|
var n2;
|
|
50512
50506
|
return filterWithCustomTargeting(__assign(__assign({}, (null === (n2 = e.builderState.state) || void 0 === n2 ? void 0 : n2.locale) ? { locale: e.builderState.state.locale } : {}), builder.getUserAttributes()), t22.query, t22.startDate, t22.endDate);
|
|
50513
50507
|
});
|
|
50514
|
-
return React$1.createElement(React$1.Fragment, null, React$1.createElement("div", __assign({ ref:
|
|
50508
|
+
return React$1.createElement(React$1.Fragment, null, React$1.createElement("div", __assign({ ref: x }, e.attributes, { style: __assign({ opacity: B ? 1 : 0, transition: "opacity 0.2s ease-in-out" }, null === (d = e.attributes) || void 0 === d ? void 0 : d.style), className: "builder-personalization-container ".concat(e.attributes.className, " ").concat(B ? "" : "builder-personalization-container-loading") }), Builder$1.isEditing && "number" == typeof e.previewingIndex && e.previewingIndex < ((null === (p = e.variants) || void 0 === p ? void 0 : p.length) || 0) ? React$1.createElement(BuilderBlocks, { blocks: null === (m = null === (f = e.variants) || void 0 === f ? void 0 : f[e.previewingIndex]) || void 0 === m ? void 0 : m.blocks, parentElementId: null === (h = e.builderBlock) || void 0 === h ? void 0 : h.id, dataPath: "component.options.variants.".concat(e.previewingIndex, ".blocks"), child: true }) : Builder$1.isEditing && "number" != typeof e.previewingIndex || !B || !j.length ? React$1.createElement(BuilderBlocks, { blocks: null === (v = e.builderBlock) || void 0 === v ? void 0 : v.children, parentElementId: null === (g2 = e.builderBlock) || void 0 === g2 ? void 0 : g2.id, dataPath: "this.children", child: true }) : React$1.createElement(BuilderBlocks, { blocks: null === (b = j[0]) || void 0 === b ? void 0 : b.blocks, parentElementId: null === (y = e.builderBlock) || void 0 === y ? void 0 : y.id, dataPath: "component.options.variants.".concat(null === (_2 = e.variants) || void 0 === _2 ? void 0 : _2.indexOf(j[0]), ".blocks"), child: true })), React$1.createElement("script", { dangerouslySetInnerHTML: { __html: "\n window.__hydrated = window.__hydrated || {};\n window.__hydrated['".concat(null === (S = e.builderBlock) || void 0 === S ? void 0 : S.id, "'] = true;\n ").replace(/\s+/g, " ") } }));
|
|
50515
50509
|
}
|
|
50516
50510
|
function getPersonalizationScript(e, t2, n) {
|
|
50517
50511
|
return `
|