@builder.io/sdk-qwik 0.0.11 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.yarn/cache/@builder.io-qwik-npm-0.0.103-bdc7786a46-98363e9103.zip +0 -0
- package/.yarn/cache/@gar-promisify-npm-1.1.3-ac1a325862-4059f790e2.zip +0 -0
- package/.yarn/cache/@npmcli-fs-npm-2.1.2-08d434e77b-405074965e.zip +0 -0
- package/.yarn/cache/@npmcli-move-file-npm-2.0.1-b593d8f741-52dc02259d.zip +0 -0
- package/.yarn/cache/@tootallnate-once-npm-2.0.0-e36cf4f140-ad87447820.zip +0 -0
- package/.yarn/cache/@types-node-npm-18.7.6-c1eafa3d9a-5122988c32.zip +0 -0
- package/.yarn/cache/abbrev-npm-1.1.1-3659247eab-a4a97ec07d.zip +0 -0
- package/.yarn/cache/agent-base-npm-6.0.2-428f325a93-f52b6872cc.zip +0 -0
- package/.yarn/cache/agentkeepalive-npm-4.2.1-b86a9fb343-39cb49ed8c.zip +0 -0
- package/.yarn/cache/aggregate-error-npm-3.1.0-415a406f4e-1101a33f21.zip +0 -0
- package/.yarn/cache/ansi-regex-npm-5.0.1-c963a48615-2aa4bb54ca.zip +0 -0
- package/.yarn/cache/aproba-npm-2.0.0-8716bcfde6-5615cadcfb.zip +0 -0
- package/.yarn/cache/are-we-there-yet-npm-3.0.1-3395b1512f-52590c2486.zip +0 -0
- package/.yarn/cache/balanced-match-npm-1.0.2-a53c126459-9706c088a2.zip +0 -0
- package/.yarn/cache/brace-expansion-npm-1.1.11-fb95eb05ad-faf34a7bb0.zip +0 -0
- package/.yarn/cache/brace-expansion-npm-2.0.1-17aa2616f9-a61e7cd2e8.zip +0 -0
- package/.yarn/cache/cacache-npm-16.1.2-0d36d1aaf1-defe1d6f55.zip +0 -0
- package/.yarn/cache/chownr-npm-2.0.0-638f1c9c61-c57cf9dd07.zip +0 -0
- package/.yarn/cache/clean-stack-npm-2.2.0-a8ce435a5c-2ac8cd2b2f.zip +0 -0
- package/.yarn/cache/color-support-npm-1.1.3-3be5c53455-9b73568176.zip +0 -0
- package/.yarn/cache/concat-map-npm-0.0.1-85a921b7ee-902a9f5d89.zip +0 -0
- package/.yarn/cache/console-control-strings-npm-1.1.0-e3160e5275-8755d76787.zip +0 -0
- package/.yarn/cache/debug-npm-4.3.4-4513954577-3dbad3f94e.zip +0 -0
- package/.yarn/cache/delegates-npm-1.0.0-9b1942d75f-a51744d9b5.zip +0 -0
- package/.yarn/cache/depd-npm-1.1.2-b0c8414da7-6b406620d2.zip +0 -0
- package/.yarn/cache/emoji-regex-npm-8.0.0-213764015c-d4c5c39d5a.zip +0 -0
- package/.yarn/cache/encoding-npm-0.1.13-82a1837d30-bb98632f8f.zip +0 -0
- package/.yarn/cache/env-paths-npm-2.2.1-7c7577428c-65b5df55a8.zip +0 -0
- package/.yarn/cache/err-code-npm-2.0.3-082e0ff9a7-8b7b1be20d.zip +0 -0
- package/.yarn/cache/esbuild-darwin-arm64-npm-0.14.54-ec53803fa6-8.zip +0 -0
- package/.yarn/cache/esbuild-npm-0.14.54-b3dcd8a41e-49e360b118.zip +0 -0
- package/.yarn/cache/fs-minipass-npm-2.1.0-501ef87306-1b8d128dae.zip +0 -0
- package/.yarn/cache/fs.realpath-npm-1.0.0-c8f05d8126-99ddea01a7.zip +0 -0
- package/.yarn/cache/fsevents-npm-2.3.2-a881d6ac9f-97ade64e75.zip +0 -0
- package/.yarn/cache/fsevents-patch-3340e2eb10-8.zip +0 -0
- package/.yarn/cache/function-bind-npm-1.1.1-b56b322ae9-b32fbaebb3.zip +0 -0
- package/.yarn/cache/gauge-npm-4.0.4-8f878385e9-788b6bfe52.zip +0 -0
- package/.yarn/cache/glob-npm-7.2.3-2d866d17a5-29452e97b3.zip +0 -0
- package/.yarn/cache/glob-npm-8.0.3-750f909025-50bcdea19d.zip +0 -0
- package/.yarn/cache/graceful-fs-npm-4.2.10-79c70989ca-3f109d70ae.zip +0 -0
- package/.yarn/cache/has-npm-1.0.3-b7f00631c1-b9ad53d53b.zip +0 -0
- package/.yarn/cache/has-unicode-npm-2.0.1-893adb4747-1eab07a743.zip +0 -0
- package/.yarn/cache/http-cache-semantics-npm-4.1.0-860520a31f-974de94a81.zip +0 -0
- package/.yarn/cache/http-proxy-agent-npm-5.0.0-7f1f121b83-e2ee1ff165.zip +0 -0
- package/.yarn/cache/https-proxy-agent-npm-5.0.1-42d65f358e-571fccdf38.zip +0 -0
- package/.yarn/cache/humanize-ms-npm-1.2.1-e942bd7329-9c7a74a282.zip +0 -0
- package/.yarn/cache/iconv-lite-npm-0.6.3-24b8aae27e-3f60d47a5c.zip +0 -0
- package/.yarn/cache/imurmurhash-npm-0.1.4-610c5068a0-7cae75c8cd.zip +0 -0
- package/.yarn/cache/indent-string-npm-4.0.0-7b717435b2-824cfb9929.zip +0 -0
- package/.yarn/cache/infer-owner-npm-1.0.4-685ac3d2af-181e732764.zip +0 -0
- package/.yarn/cache/inflight-npm-1.0.6-ccedb4b908-f4f76aa072.zip +0 -0
- package/.yarn/cache/inherits-npm-2.0.4-c66b3957a0-4a48a73384.zip +0 -0
- package/.yarn/cache/ip-npm-2.0.0-204facb3cc-cfcfac6b87.zip +0 -0
- package/.yarn/cache/is-core-module-npm-2.10.0-6dff9310aa-0f3f77811f.zip +0 -0
- package/.yarn/cache/is-fullwidth-code-point-npm-3.0.0-1ecf4ebee5-44a30c2945.zip +0 -0
- package/.yarn/cache/is-lambda-npm-1.0.1-7ab55bc8a8-93a32f0194.zip +0 -0
- package/.yarn/cache/isexe-npm-2.0.0-b58870bd2e-26bf6c5480.zip +0 -0
- package/.yarn/cache/lru-cache-npm-6.0.0-b4c8668fe1-f97f499f89.zip +0 -0
- package/.yarn/cache/lru-cache-npm-7.14.0-354cf654ec-efdd329f2c.zip +0 -0
- package/.yarn/cache/make-fetch-happen-npm-10.2.1-f1cc7cd2df-2332eb9a8e.zip +0 -0
- package/.yarn/cache/minimatch-npm-3.1.2-9405269906-c154e56640.zip +0 -0
- package/.yarn/cache/minimatch-npm-5.1.0-34f6240621-15ce53d31a.zip +0 -0
- package/.yarn/cache/minipass-collect-npm-1.0.2-3b4676eab5-14df761028.zip +0 -0
- package/.yarn/cache/minipass-fetch-npm-2.1.1-c4a8efdb09-1aae0c2240.zip +0 -0
- package/.yarn/cache/minipass-flush-npm-1.0.5-efe79d9826-56269a0b22.zip +0 -0
- package/.yarn/cache/minipass-npm-3.3.5-a555b091e7-f89f02bcaa.zip +0 -0
- package/.yarn/cache/minipass-pipeline-npm-1.2.4-5924cb077f-b14240dac0.zip +0 -0
- package/.yarn/cache/minipass-sized-npm-1.0.3-306d86f432-79076749fc.zip +0 -0
- package/.yarn/cache/minizlib-npm-2.1.2-ea89cd0cfb-f1fdeac0b0.zip +0 -0
- package/.yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-a96865108c.zip +0 -0
- package/.yarn/cache/ms-npm-2.1.2-ec0c1512ff-673cdb2c31.zip +0 -0
- package/.yarn/cache/ms-npm-2.1.3-81ff3cfac1-aa92de6080.zip +0 -0
- package/.yarn/cache/nanoid-npm-3.3.4-3d250377d6-2fddd6dee9.zip +0 -0
- package/.yarn/cache/negotiator-npm-0.6.3-9d50e36171-b8ffeb1e26.zip +0 -0
- package/.yarn/cache/node-gyp-npm-9.1.0-2091059b31-1437fa4a87.zip +0 -0
- package/.yarn/cache/nopt-npm-5.0.0-304b40fbfe-d35fdec187.zip +0 -0
- package/.yarn/cache/npmlog-npm-6.0.2-e0e69455c7-ae238cd264.zip +0 -0
- package/.yarn/cache/once-npm-1.4.0-ccf03ef07a-cd0a885013.zip +0 -0
- package/.yarn/cache/p-map-npm-4.0.0-4677ae07c7-cb0ab21ec0.zip +0 -0
- package/.yarn/cache/path-is-absolute-npm-1.0.1-31bc695ffd-060840f92c.zip +0 -0
- package/.yarn/cache/path-parse-npm-1.0.7-09564527b7-49abf3d811.zip +0 -0
- package/.yarn/cache/picocolors-npm-1.0.0-d81e0b1927-a2e8092dd8.zip +0 -0
- package/.yarn/cache/postcss-npm-8.4.16-7367383579-10eee25efd.zip +0 -0
- package/.yarn/cache/promise-inflight-npm-1.0.1-5bb925afac-2274948309.zip +0 -0
- package/.yarn/cache/promise-retry-npm-2.0.1-871f0b01b7-f96a3f6d90.zip +0 -0
- package/.yarn/cache/readable-stream-npm-3.6.0-23a4a5eb56-d4ea81502d.zip +0 -0
- package/.yarn/cache/resolve-npm-1.22.1-3980488690-07af5fc1e8.zip +0 -0
- package/.yarn/cache/resolve-patch-46f9469d0d-5656f4d0be.zip +0 -0
- package/.yarn/cache/retry-npm-0.12.0-72ac7fb4cc-623bd7d2e5.zip +0 -0
- package/.yarn/cache/rimraf-npm-3.0.2-2cb7dac69a-87f4164e39.zip +0 -0
- package/.yarn/cache/rollup-npm-2.78.0-09284f4c78-01b5a7ae08.zip +0 -0
- package/.yarn/cache/safe-buffer-npm-5.2.1-3481c8aa9b-b99c4b41fd.zip +0 -0
- package/.yarn/cache/safer-buffer-npm-2.1.2-8d5c0b705e-cab8f25ae6.zip +0 -0
- package/.yarn/cache/semver-npm-7.3.7-3bfe704194-2fa3e87756.zip +0 -0
- package/.yarn/cache/set-blocking-npm-2.0.0-49e2cffa24-6e65a05f7c.zip +0 -0
- package/.yarn/cache/signal-exit-npm-3.0.7-bd270458a3-a2f098f247.zip +0 -0
- package/.yarn/cache/smart-buffer-npm-4.2.0-5ac3f668bb-b5167a7142.zip +0 -0
- package/.yarn/cache/socks-npm-2.7.0-cc1cb019db-0b5d94e2b3.zip +0 -0
- package/.yarn/cache/socks-proxy-agent-npm-7.0.0-7aacf32ea0-7205543701.zip +0 -0
- package/.yarn/cache/source-map-js-npm-1.0.2-ee4f9f9b30-c049a7fc4d.zip +0 -0
- package/.yarn/cache/ssri-npm-9.0.1-33ce27f4f8-fb58f5e46b.zip +0 -0
- package/.yarn/cache/string-width-npm-4.2.3-2c27177bae-e52c10dc3f.zip +0 -0
- package/.yarn/cache/string_decoder-npm-1.3.0-2422117fd0-8417646695.zip +0 -0
- package/.yarn/cache/strip-ansi-npm-6.0.1-caddc7cb40-f3cd25890a.zip +0 -0
- package/.yarn/cache/supports-preserve-symlinks-flag-npm-1.0.0-f17c4d0028-53b1e247e6.zip +0 -0
- package/.yarn/cache/tar-npm-6.1.11-e6ac3cba9c-a04c07bb9e.zip +0 -0
- package/.yarn/cache/typescript-npm-4.7.4-65aa6ffb42-5750181b1c.zip +0 -0
- package/.yarn/cache/typescript-patch-ae154b3216-96d3030cb0.zip +0 -0
- package/.yarn/cache/unique-filename-npm-1.1.1-c885c5095b-cf4998c922.zip +0 -0
- package/.yarn/cache/unique-slug-npm-2.0.2-f6ba1ddeb7-5b6876a645.zip +0 -0
- package/.yarn/cache/util-deprecate-npm-1.0.2-e3fe1a219c-474acf1146.zip +0 -0
- package/.yarn/cache/vite-npm-3.0.2-a17ab24a12-10aebec0df.zip +0 -0
- package/.yarn/cache/which-npm-2.0.2-320ddf72f7-1a5c563d3c.zip +0 -0
- package/.yarn/cache/wide-align-npm-1.1.5-889d77e592-d5fc37cd56.zip +0 -0
- package/.yarn/cache/wrappy-npm-1.0.2-916de4d4b3-159da4805f.zip +0 -0
- package/.yarn/cache/yallist-npm-4.0.0-b493d9e907-343617202a.zip +0 -0
- package/.yarn/install-state.gz +0 -0
- package/README.md +15 -16
- package/lib/index.qwik.cjs +505 -224
- package/lib/index.qwik.mjs +506 -225
- package/package.json +4 -3
- package/src/blocks/button/button.jsx +7 -2
- package/src/blocks/columns/columns.jsx +9 -4
- package/src/blocks/embed/embed.jsx +1 -1
- package/src/blocks/form/builder-blocks.jsx +1 -1
- package/src/blocks/form/form.jsx +2 -2
- package/src/blocks/img/img.jsx +2 -2
- package/src/blocks/select/select.jsx +1 -1
- package/src/blocks/symbol/symbol.jsx +8 -7
- package/src/components/render-block/block-styles.jsx +1 -1
- package/src/components/render-block/render-block.jsx +28 -26
- package/src/components/render-block/render-component.jsx +4 -3
- package/src/components/render-block/render-repeated-block.jsx +4 -1
- package/src/components/render-blocks.jsx +2 -2
- package/src/components/render-content/render-content.jsx +19 -7
- package/src/components/render-inlined-styles.jsx +4 -3
- package/src/constants/builder-registered-components.js +3 -0
- package/src/functions/evaluate.js +1 -1
- package/src/functions/get-processed-block.js +10 -6
- package/src/functions/get-processed-block.test.js +1 -1
- package/src/functions/mark-mutable.js +14 -0
- package/src/functions/track.js +71 -2
- package/src/helpers/cookie.js +59 -0
- package/src/helpers/localStorage.js +34 -0
- package/src/helpers/nullable.js +4 -0
- package/src/helpers/sessionId.js +26 -0
- package/src/helpers/time.js +5 -0
- package/src/helpers/url.js +10 -0
- package/src/helpers/url.test.js +15 -0
- package/src/helpers/uuid.js +13 -0
- package/src/helpers/visitorId.js +33 -0
- package/src/types/can-track.js +0 -0
package/lib/index.qwik.cjs
CHANGED
|
@@ -162,7 +162,7 @@ function evaluate({ code, context, state, event }) {
|
|
|
162
162
|
try {
|
|
163
163
|
return new Function("builder", "Builder", "state", "context", "event", useCode)(builder, builder, state, context, event);
|
|
164
164
|
} catch (e) {
|
|
165
|
-
console.warn("Builder custom code error: ", e);
|
|
165
|
+
console.warn("Builder custom code error: \n While Evaluating: \n ", useCode, "\n", e.message || e);
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
const set = (obj, _path, value) => {
|
|
@@ -175,36 +175,36 @@ const set = (obj, _path, value) => {
|
|
|
175
175
|
function transformBlock(block) {
|
|
176
176
|
return block;
|
|
177
177
|
}
|
|
178
|
-
var __defProp$
|
|
179
|
-
var __defProps$
|
|
180
|
-
var __getOwnPropDescs$
|
|
181
|
-
var __getOwnPropSymbols$
|
|
182
|
-
var __hasOwnProp$
|
|
183
|
-
var __propIsEnum$
|
|
184
|
-
var __defNormalProp$
|
|
178
|
+
var __defProp$8 = Object.defineProperty;
|
|
179
|
+
var __defProps$6 = Object.defineProperties;
|
|
180
|
+
var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
|
|
181
|
+
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
|
182
|
+
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
183
|
+
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
184
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, {
|
|
185
185
|
enumerable: true,
|
|
186
186
|
configurable: true,
|
|
187
187
|
writable: true,
|
|
188
188
|
value
|
|
189
189
|
}) : obj[key] = value;
|
|
190
|
-
var __spreadValues$
|
|
190
|
+
var __spreadValues$8 = (a, b) => {
|
|
191
191
|
for (var prop in b || (b = {}))
|
|
192
|
-
if (__hasOwnProp$
|
|
193
|
-
__defNormalProp$
|
|
194
|
-
if (__getOwnPropSymbols$
|
|
195
|
-
for (var prop of __getOwnPropSymbols$
|
|
196
|
-
if (__propIsEnum$
|
|
197
|
-
__defNormalProp$
|
|
192
|
+
if (__hasOwnProp$8.call(b, prop))
|
|
193
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
194
|
+
if (__getOwnPropSymbols$8) {
|
|
195
|
+
for (var prop of __getOwnPropSymbols$8(b))
|
|
196
|
+
if (__propIsEnum$8.call(b, prop))
|
|
197
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
198
198
|
}
|
|
199
199
|
return a;
|
|
200
200
|
};
|
|
201
|
-
var __spreadProps$
|
|
201
|
+
var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
|
|
202
202
|
const evaluateBindings = ({ block, context, state }) => {
|
|
203
203
|
if (!block.bindings)
|
|
204
204
|
return block;
|
|
205
|
-
const copied = __spreadProps$
|
|
206
|
-
properties: __spreadValues$
|
|
207
|
-
actions: __spreadValues$
|
|
205
|
+
const copied = __spreadProps$6(__spreadValues$8({}, block), {
|
|
206
|
+
properties: __spreadValues$8({}, block.properties),
|
|
207
|
+
actions: __spreadValues$8({}, block.actions)
|
|
208
208
|
});
|
|
209
209
|
for (const binding in block.bindings) {
|
|
210
210
|
const expression = block.bindings[binding];
|
|
@@ -217,17 +217,16 @@ const evaluateBindings = ({ block, context, state }) => {
|
|
|
217
217
|
}
|
|
218
218
|
return copied;
|
|
219
219
|
};
|
|
220
|
-
function getProcessedBlock(
|
|
221
|
-
const
|
|
222
|
-
|
|
223
|
-
if (evaluateBindings)
|
|
220
|
+
function getProcessedBlock({ block, context, shouldEvaluateBindings, state }) {
|
|
221
|
+
const transformedBlock = transformBlock(block);
|
|
222
|
+
if (shouldEvaluateBindings)
|
|
224
223
|
return evaluateBindings({
|
|
225
|
-
block,
|
|
224
|
+
block: transformedBlock,
|
|
226
225
|
state,
|
|
227
226
|
context
|
|
228
227
|
});
|
|
229
228
|
else
|
|
230
|
-
return
|
|
229
|
+
return transformedBlock;
|
|
231
230
|
}
|
|
232
231
|
const camelToKebabCase = (string) => string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
|
|
233
232
|
const convertStyleMaptoCSS = (style) => {
|
|
@@ -237,21 +236,25 @@ const convertStyleMaptoCSS = (style) => {
|
|
|
237
236
|
});
|
|
238
237
|
return cssProps.join("\n");
|
|
239
238
|
};
|
|
240
|
-
const
|
|
239
|
+
const tagName$1 = function tagName(props, state) {
|
|
240
|
+
return "style";
|
|
241
|
+
};
|
|
242
|
+
const RenderInlinedStyles = (props) => {
|
|
241
243
|
const state = {};
|
|
244
|
+
state.tagName = tagName$1();
|
|
242
245
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
243
246
|
children: /* @__PURE__ */ jsxRuntime.jsx(state.tagName, {
|
|
244
247
|
children: props.styles
|
|
245
248
|
})
|
|
246
249
|
});
|
|
247
|
-
}
|
|
250
|
+
};
|
|
248
251
|
const RenderInlinedStyles$1 = RenderInlinedStyles;
|
|
249
252
|
const useBlock$1 = function useBlock(props, state) {
|
|
250
253
|
return getProcessedBlock({
|
|
251
254
|
block: props.block,
|
|
252
255
|
state: props.context.state,
|
|
253
256
|
context: props.context.context,
|
|
254
|
-
|
|
257
|
+
shouldEvaluateBindings: true
|
|
255
258
|
});
|
|
256
259
|
};
|
|
257
260
|
const css = function css2(props, state) {
|
|
@@ -298,6 +301,36 @@ function getBlockActions(options) {
|
|
|
298
301
|
}
|
|
299
302
|
return obj;
|
|
300
303
|
}
|
|
304
|
+
var __defProp$7 = Object.defineProperty;
|
|
305
|
+
var __defProps$5 = Object.defineProperties;
|
|
306
|
+
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
|
|
307
|
+
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
|
|
308
|
+
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
|
|
309
|
+
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
|
|
310
|
+
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, {
|
|
311
|
+
enumerable: true,
|
|
312
|
+
configurable: true,
|
|
313
|
+
writable: true,
|
|
314
|
+
value
|
|
315
|
+
}) : obj[key] = value;
|
|
316
|
+
var __spreadValues$7 = (a, b) => {
|
|
317
|
+
for (var prop in b || (b = {}))
|
|
318
|
+
if (__hasOwnProp$7.call(b, prop))
|
|
319
|
+
__defNormalProp$7(a, prop, b[prop]);
|
|
320
|
+
if (__getOwnPropSymbols$7) {
|
|
321
|
+
for (var prop of __getOwnPropSymbols$7(b))
|
|
322
|
+
if (__propIsEnum$7.call(b, prop))
|
|
323
|
+
__defNormalProp$7(a, prop, b[prop]);
|
|
324
|
+
}
|
|
325
|
+
return a;
|
|
326
|
+
};
|
|
327
|
+
var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
|
|
328
|
+
function getBlockComponentOptions(block) {
|
|
329
|
+
var _a;
|
|
330
|
+
return __spreadProps$5(__spreadValues$7(__spreadValues$7({}, (_a = block.component) == null ? void 0 : _a.options), block.options), {
|
|
331
|
+
builderBlock: block
|
|
332
|
+
});
|
|
333
|
+
}
|
|
301
334
|
var __defProp$6 = Object.defineProperty;
|
|
302
335
|
var __defProps$4 = Object.defineProperties;
|
|
303
336
|
var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
|
|
@@ -322,39 +355,9 @@ var __spreadValues$6 = (a, b) => {
|
|
|
322
355
|
return a;
|
|
323
356
|
};
|
|
324
357
|
var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
|
|
325
|
-
function getBlockComponentOptions(block) {
|
|
326
|
-
var _a;
|
|
327
|
-
return __spreadProps$4(__spreadValues$6(__spreadValues$6({}, (_a = block.component) == null ? void 0 : _a.options), block.options), {
|
|
328
|
-
builderBlock: block
|
|
329
|
-
});
|
|
330
|
-
}
|
|
331
|
-
var __defProp$5 = Object.defineProperty;
|
|
332
|
-
var __defProps$3 = Object.defineProperties;
|
|
333
|
-
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
334
|
-
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
335
|
-
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
336
|
-
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
337
|
-
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, {
|
|
338
|
-
enumerable: true,
|
|
339
|
-
configurable: true,
|
|
340
|
-
writable: true,
|
|
341
|
-
value
|
|
342
|
-
}) : obj[key] = value;
|
|
343
|
-
var __spreadValues$5 = (a, b) => {
|
|
344
|
-
for (var prop in b || (b = {}))
|
|
345
|
-
if (__hasOwnProp$5.call(b, prop))
|
|
346
|
-
__defNormalProp$5(a, prop, b[prop]);
|
|
347
|
-
if (__getOwnPropSymbols$5) {
|
|
348
|
-
for (var prop of __getOwnPropSymbols$5(b))
|
|
349
|
-
if (__propIsEnum$5.call(b, prop))
|
|
350
|
-
__defNormalProp$5(a, prop, b[prop]);
|
|
351
|
-
}
|
|
352
|
-
return a;
|
|
353
|
-
};
|
|
354
|
-
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
355
358
|
function getBlockProperties(block) {
|
|
356
359
|
var _a;
|
|
357
|
-
return __spreadProps$
|
|
360
|
+
return __spreadProps$4(__spreadValues$6({}, block.properties), {
|
|
358
361
|
"builder-id": block.id,
|
|
359
362
|
class: [
|
|
360
363
|
block.id,
|
|
@@ -369,30 +372,30 @@ const convertStyleObject = (obj) => {
|
|
|
369
372
|
};
|
|
370
373
|
const sanitizeBlockStyles = (_styles) => {
|
|
371
374
|
};
|
|
372
|
-
var __defProp$
|
|
373
|
-
var __getOwnPropSymbols$
|
|
374
|
-
var __hasOwnProp$
|
|
375
|
-
var __propIsEnum$
|
|
376
|
-
var __defNormalProp$
|
|
375
|
+
var __defProp$5 = Object.defineProperty;
|
|
376
|
+
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
377
|
+
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
378
|
+
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
379
|
+
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, {
|
|
377
380
|
enumerable: true,
|
|
378
381
|
configurable: true,
|
|
379
382
|
writable: true,
|
|
380
383
|
value
|
|
381
384
|
}) : obj[key] = value;
|
|
382
|
-
var __spreadValues$
|
|
385
|
+
var __spreadValues$5 = (a, b) => {
|
|
383
386
|
for (var prop in b || (b = {}))
|
|
384
|
-
if (__hasOwnProp$
|
|
385
|
-
__defNormalProp$
|
|
386
|
-
if (__getOwnPropSymbols$
|
|
387
|
-
for (var prop of __getOwnPropSymbols$
|
|
388
|
-
if (__propIsEnum$
|
|
389
|
-
__defNormalProp$
|
|
387
|
+
if (__hasOwnProp$5.call(b, prop))
|
|
388
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
389
|
+
if (__getOwnPropSymbols$5) {
|
|
390
|
+
for (var prop of __getOwnPropSymbols$5(b))
|
|
391
|
+
if (__propIsEnum$5.call(b, prop))
|
|
392
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
390
393
|
}
|
|
391
394
|
return a;
|
|
392
395
|
};
|
|
393
396
|
function getBlockStyles(block) {
|
|
394
397
|
var _a, _b, _c, _d, _e;
|
|
395
|
-
const styles = __spreadValues$
|
|
398
|
+
const styles = __spreadValues$5(__spreadValues$5({}, convertStyleObject((_a = block.responsiveStyles) == null ? void 0 : _a.large)), block.styles);
|
|
396
399
|
if ((_b = block.responsiveStyles) == null ? void 0 : _b.medium)
|
|
397
400
|
styles[getMaxWidthQueryForSize("medium")] = convertStyleObject((_c = block.responsiveStyles) == null ? void 0 : _c.medium);
|
|
398
401
|
if ((_d = block.responsiveStyles) == null ? void 0 : _d.small)
|
|
@@ -420,21 +423,30 @@ const EMPTY_HTML_ELEMENTS = [
|
|
|
420
423
|
"track",
|
|
421
424
|
"wbr"
|
|
422
425
|
];
|
|
423
|
-
const isEmptyHtmlElement = (
|
|
424
|
-
return typeof
|
|
426
|
+
const isEmptyHtmlElement = (tagName4) => {
|
|
427
|
+
return typeof tagName4 === "string" && EMPTY_HTML_ELEMENTS.includes(tagName4.toLowerCase());
|
|
425
428
|
};
|
|
429
|
+
function markMutable(value) {
|
|
430
|
+
return qwik.mutable(value);
|
|
431
|
+
}
|
|
432
|
+
function markPropsMutable(props) {
|
|
433
|
+
Object.keys(props).forEach((key) => {
|
|
434
|
+
props[key] = qwik.mutable(props[key]);
|
|
435
|
+
});
|
|
436
|
+
return props;
|
|
437
|
+
}
|
|
426
438
|
const RenderComponent = (props) => {
|
|
427
439
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
428
440
|
children: props.componentRef ? /* @__PURE__ */ jsxRuntime.jsxs(props.componentRef, {
|
|
429
|
-
...props.componentOptions,
|
|
441
|
+
...markPropsMutable(props.componentOptions),
|
|
430
442
|
children: [
|
|
431
|
-
(props.blockChildren || []).map((child)
|
|
443
|
+
(props.blockChildren || []).map(function(child) {
|
|
432
444
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderBlock$1, {
|
|
433
445
|
block: child,
|
|
434
446
|
context: props.context
|
|
435
447
|
}, "render-block-" + child.id);
|
|
436
448
|
}),
|
|
437
|
-
(props.blockChildren || []).map((child)
|
|
449
|
+
(props.blockChildren || []).map(function(child) {
|
|
438
450
|
return /* @__PURE__ */ jsxRuntime.jsx(BlockStyles$1, {
|
|
439
451
|
block: child,
|
|
440
452
|
context: props.context
|
|
@@ -465,7 +477,7 @@ const RenderRepeatedBlock = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((p
|
|
|
465
477
|
}));
|
|
466
478
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderBlock$1, {
|
|
467
479
|
block: props.block,
|
|
468
|
-
context: props.
|
|
480
|
+
context: props.repeatContext
|
|
469
481
|
});
|
|
470
482
|
}, "RenderRepeatedBlock_component_fV0PdmPN990"));
|
|
471
483
|
const RenderRepeatedBlock$1 = RenderRepeatedBlock;
|
|
@@ -474,7 +486,7 @@ const component = function component2(props, state) {
|
|
|
474
486
|
block: props.block,
|
|
475
487
|
state: props.context.state,
|
|
476
488
|
context: props.context.context,
|
|
477
|
-
|
|
489
|
+
shouldEvaluateBindings: false
|
|
478
490
|
}).component?.name;
|
|
479
491
|
if (!componentName)
|
|
480
492
|
return null;
|
|
@@ -487,7 +499,7 @@ const component = function component2(props, state) {
|
|
|
487
499
|
} else
|
|
488
500
|
return ref;
|
|
489
501
|
};
|
|
490
|
-
const componentInfo$
|
|
502
|
+
const componentInfo$a = function componentInfo(props, state) {
|
|
491
503
|
if (component(props)) {
|
|
492
504
|
const { component: _, ...info } = component(props);
|
|
493
505
|
return info;
|
|
@@ -497,7 +509,7 @@ const componentInfo$9 = function componentInfo(props, state) {
|
|
|
497
509
|
const componentRef = function componentRef2(props, state) {
|
|
498
510
|
return component(props)?.component;
|
|
499
511
|
};
|
|
500
|
-
const
|
|
512
|
+
const tagName2 = function tagName3(props, state) {
|
|
501
513
|
return getBlockTag(useBlock2(props));
|
|
502
514
|
};
|
|
503
515
|
const useBlock2 = function useBlock3(props, state) {
|
|
@@ -505,7 +517,7 @@ const useBlock2 = function useBlock3(props, state) {
|
|
|
505
517
|
block: props.block,
|
|
506
518
|
state: props.context.state,
|
|
507
519
|
context: props.context.context,
|
|
508
|
-
|
|
520
|
+
shouldEvaluateBindings: true
|
|
509
521
|
});
|
|
510
522
|
};
|
|
511
523
|
const attributes = function attributes2(props, state) {
|
|
@@ -520,7 +532,7 @@ const attributes = function attributes2(props, state) {
|
|
|
520
532
|
};
|
|
521
533
|
};
|
|
522
534
|
const shouldWrap = function shouldWrap2(props, state) {
|
|
523
|
-
return !componentInfo$
|
|
535
|
+
return !componentInfo$a(props)?.noWrap;
|
|
524
536
|
};
|
|
525
537
|
const componentOptions = function componentOptions2(props, state) {
|
|
526
538
|
return {
|
|
@@ -575,28 +587,27 @@ const repeatItemData = function repeatItemData2(props, state) {
|
|
|
575
587
|
};
|
|
576
588
|
const RenderBlock = (props) => {
|
|
577
589
|
const state = {};
|
|
578
|
-
state.tagName =
|
|
590
|
+
state.tagName = tagName2(props);
|
|
579
591
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
580
|
-
children: shouldWrap(props) ? !isEmptyHtmlElement(
|
|
592
|
+
children: shouldWrap(props) ? !isEmptyHtmlElement(tagName2(props)) ? /* @__PURE__ */ jsxRuntime.jsxs(state.tagName, {
|
|
581
593
|
...attributes(props),
|
|
582
594
|
children: [
|
|
583
|
-
repeatItemData(props) ? (repeatItemData(props) || []).map((data, index)
|
|
595
|
+
repeatItemData(props) ? (repeatItemData(props) || []).map(function(data, index) {
|
|
584
596
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderRepeatedBlock$1, {
|
|
585
597
|
repeatContext: data.context,
|
|
586
|
-
block: data.block
|
|
587
|
-
context: props.context
|
|
598
|
+
block: data.block
|
|
588
599
|
}, index);
|
|
589
600
|
}) : null,
|
|
590
601
|
!repeatItemData(props) ? /* @__PURE__ */ jsxRuntime.jsx(RenderComponent$1, {
|
|
591
602
|
...renderComponentProps(props)
|
|
592
603
|
}) : null,
|
|
593
|
-
(childrenWithoutParentComponent(props) || []).map((child)
|
|
604
|
+
(childrenWithoutParentComponent(props) || []).map(function(child) {
|
|
594
605
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderBlock, {
|
|
595
606
|
block: child,
|
|
596
607
|
context: props.context
|
|
597
608
|
}, "render-block-" + child.id);
|
|
598
609
|
}),
|
|
599
|
-
(childrenWithoutParentComponent(props) || []).map((child)
|
|
610
|
+
(childrenWithoutParentComponent(props) || []).map(function(child) {
|
|
600
611
|
return /* @__PURE__ */ jsxRuntime.jsx(BlockStyles$1, {
|
|
601
612
|
block: child,
|
|
602
613
|
context: props.context
|
|
@@ -636,7 +647,7 @@ const onMouseEnter = function onMouseEnter2(props, state, builderContext) {
|
|
|
636
647
|
}, "*");
|
|
637
648
|
};
|
|
638
649
|
const RenderBlocks = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
639
|
-
qwik.useStylesScopedQrl(qwik.inlinedQrl(STYLES$
|
|
650
|
+
qwik.useStylesScopedQrl(qwik.inlinedQrl(STYLES$3, "RenderBlocks_component_useStylesScoped_QNti2s7juQc"));
|
|
640
651
|
const builderContext = qwik.useContext(stdin_default);
|
|
641
652
|
const state = {};
|
|
642
653
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
@@ -663,13 +674,13 @@ const RenderBlocks = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) =
|
|
|
663
674
|
state
|
|
664
675
|
]),
|
|
665
676
|
children: [
|
|
666
|
-
props.blocks ? (props.blocks || []).map((block)
|
|
677
|
+
props.blocks ? (props.blocks || []).map(function(block) {
|
|
667
678
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderBlock$1, {
|
|
668
679
|
block,
|
|
669
680
|
context: builderContext
|
|
670
681
|
}, "render-block-" + block.id);
|
|
671
682
|
}) : null,
|
|
672
|
-
props.blocks ? (props.blocks || []).map((block)
|
|
683
|
+
props.blocks ? (props.blocks || []).map(function(block) {
|
|
673
684
|
return /* @__PURE__ */ jsxRuntime.jsx(BlockStyles$1, {
|
|
674
685
|
block,
|
|
675
686
|
context: builderContext
|
|
@@ -679,7 +690,7 @@ const RenderBlocks = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) =
|
|
|
679
690
|
});
|
|
680
691
|
}, "RenderBlocks_component_SXGwmVyEM0s"));
|
|
681
692
|
const RenderBlocks$1 = RenderBlocks;
|
|
682
|
-
const STYLES$
|
|
693
|
+
const STYLES$3 = `.div-RenderBlocks {
|
|
683
694
|
display: flex;
|
|
684
695
|
flex-direction: column;
|
|
685
696
|
align-items: stretch; }`;
|
|
@@ -721,12 +732,12 @@ const columnCssVars = function columnCssVars2(props, state) {
|
|
|
721
732
|
};
|
|
722
733
|
};
|
|
723
734
|
const Columns = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
724
|
-
qwik.useStylesScopedQrl(qwik.inlinedQrl(STYLES$
|
|
735
|
+
qwik.useStylesScopedQrl(qwik.inlinedQrl(STYLES$2, "Columns_component_useStylesScoped_704fWXyHORo"));
|
|
725
736
|
const state = {};
|
|
726
737
|
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
727
738
|
class: "builder-columns div-Columns",
|
|
728
739
|
style: columnsCssVars(props, state),
|
|
729
|
-
children: (props.columns || []).map((column, index)
|
|
740
|
+
children: (props.columns || []).map(function(column, index) {
|
|
730
741
|
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
731
742
|
class: "builder-column div-Columns-2",
|
|
732
743
|
style: {
|
|
@@ -735,20 +746,22 @@ const Columns = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
|
735
746
|
...columnCssVars(props, state)
|
|
736
747
|
},
|
|
737
748
|
children: /* @__PURE__ */ jsxRuntime.jsx(RenderBlocks$1, {
|
|
738
|
-
blocks: column.blocks
|
|
749
|
+
blocks: markMutable(column.blocks),
|
|
750
|
+
path: `component.options.columns.${index}.blocks`,
|
|
751
|
+
parent: props.builderBlock.id
|
|
739
752
|
})
|
|
740
753
|
}, index);
|
|
741
754
|
})
|
|
742
755
|
});
|
|
743
756
|
}, "Columns_component_0PeVQGTMczc"));
|
|
744
757
|
const Columns$1 = Columns;
|
|
745
|
-
const STYLES$
|
|
758
|
+
const STYLES$2 = `.div-Columns {
|
|
746
759
|
display: flex;
|
|
747
760
|
align-items: stretch;
|
|
748
|
-
line-height: normal; }@media (max-width:
|
|
761
|
+
line-height: normal; }@media (max-width: 991px) { .div-Columns {
|
|
749
762
|
flex-direction: var(--flex-dir-tablet); } }@media (max-width: 639px) { .div-Columns {
|
|
750
763
|
flex-direction: var(--flex-dir); } }.div-Columns-2 {
|
|
751
|
-
flex-grow: 1; }@media (max-width:
|
|
764
|
+
flex-grow: 1; }@media (max-width: 991px) { .div-Columns-2 {
|
|
752
765
|
width: var(--column-width-tablet) !important;
|
|
753
766
|
margin-left: var(--column-margin-left-tablet) !important; } }@media (max-width: 639px) { .div-Columns-2 {
|
|
754
767
|
width: var(--column-width) !important;
|
|
@@ -828,7 +841,7 @@ const webpSrcSet = function webpSrcSet2(props, state) {
|
|
|
828
841
|
return "";
|
|
829
842
|
};
|
|
830
843
|
const Image = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
831
|
-
qwik.useStylesScopedQrl(qwik.inlinedQrl(STYLES, "Image_component_useStylesScoped_gRbO7w7SeZA"));
|
|
844
|
+
qwik.useStylesScopedQrl(qwik.inlinedQrl(STYLES$1, "Image_component_useStylesScoped_gRbO7w7SeZA"));
|
|
832
845
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
833
846
|
class: "div-Image",
|
|
834
847
|
children: [
|
|
@@ -871,7 +884,7 @@ const Image = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
|
871
884
|
});
|
|
872
885
|
}, "Image_component_y3S3Zox9wEo"));
|
|
873
886
|
const Image$1 = Image;
|
|
874
|
-
const STYLES = `.div-Image {
|
|
887
|
+
const STYLES$1 = `.div-Image {
|
|
875
888
|
position: relative; }.img-Image {
|
|
876
889
|
opacity: 1;
|
|
877
890
|
transition: opacity 0.2s ease-in-out;
|
|
@@ -934,6 +947,7 @@ const Video = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
|
934
947
|
}, "Video_component_O5sPuWlrTvk"));
|
|
935
948
|
const Video$1 = Video;
|
|
936
949
|
const Button = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
950
|
+
qwik.useStylesScopedQrl(qwik.inlinedQrl(STYLES, "Button_component_useStylesScoped_vN61mfeURXY"));
|
|
937
951
|
return /* @__PURE__ */ jsxRuntime.jsx(qwik.Fragment, {
|
|
938
952
|
children: props.link ? /* @__PURE__ */ jsxRuntime.jsx("a", {
|
|
939
953
|
role: "button",
|
|
@@ -941,14 +955,17 @@ const Button = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
|
941
955
|
href: props.link,
|
|
942
956
|
target: props.openLinkInNewTab ? "_blank" : void 0,
|
|
943
957
|
children: props.text
|
|
944
|
-
}) : /* @__PURE__ */ jsxRuntime.jsx("
|
|
958
|
+
}) : /* @__PURE__ */ jsxRuntime.jsx("button", {
|
|
959
|
+
class: "button-Button",
|
|
945
960
|
...props.attributes,
|
|
946
961
|
children: props.text
|
|
947
962
|
})
|
|
948
963
|
});
|
|
949
964
|
}, "Button_component_FtjCELjtKF4"));
|
|
950
965
|
const Button$1 = Button;
|
|
951
|
-
const
|
|
966
|
+
const STYLES = `.button-Button {
|
|
967
|
+
all: unset; }`;
|
|
968
|
+
const componentInfo$9 = {
|
|
952
969
|
name: "Core:Button",
|
|
953
970
|
builtIn: true,
|
|
954
971
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
@@ -990,7 +1007,7 @@ function markSerializable(fn) {
|
|
|
990
1007
|
fn.__qwik_serializable__ = true;
|
|
991
1008
|
return fn;
|
|
992
1009
|
}
|
|
993
|
-
const componentInfo$
|
|
1010
|
+
const componentInfo$8 = {
|
|
994
1011
|
name: "Columns",
|
|
995
1012
|
builtIn: true,
|
|
996
1013
|
inputs: [
|
|
@@ -1231,7 +1248,7 @@ const componentInfo$7 = {
|
|
|
1231
1248
|
}
|
|
1232
1249
|
]
|
|
1233
1250
|
};
|
|
1234
|
-
const componentInfo$
|
|
1251
|
+
const componentInfo$7 = {
|
|
1235
1252
|
name: "Fragment",
|
|
1236
1253
|
static: true,
|
|
1237
1254
|
hidden: true,
|
|
@@ -1245,7 +1262,7 @@ const FragmentComponent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((pro
|
|
|
1245
1262
|
});
|
|
1246
1263
|
}, "FragmentComponent_component_FJmqlA66Rjg"));
|
|
1247
1264
|
const Fragment = FragmentComponent;
|
|
1248
|
-
const componentInfo$
|
|
1265
|
+
const componentInfo$6 = {
|
|
1249
1266
|
name: "Image",
|
|
1250
1267
|
static: true,
|
|
1251
1268
|
builtIn: true,
|
|
@@ -1394,7 +1411,7 @@ const componentInfo$5 = {
|
|
|
1394
1411
|
}
|
|
1395
1412
|
]
|
|
1396
1413
|
};
|
|
1397
|
-
const componentInfo$
|
|
1414
|
+
const componentInfo$5 = {
|
|
1398
1415
|
name: "Core:Section",
|
|
1399
1416
|
static: true,
|
|
1400
1417
|
builtIn: true,
|
|
@@ -1450,7 +1467,7 @@ const SectionComponent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((prop
|
|
|
1450
1467
|
});
|
|
1451
1468
|
}, "SectionComponent_component_m1CcjCwgHug"));
|
|
1452
1469
|
const Section = SectionComponent;
|
|
1453
|
-
const componentInfo$
|
|
1470
|
+
const componentInfo$4 = {
|
|
1454
1471
|
name: "Symbol",
|
|
1455
1472
|
noWrap: true,
|
|
1456
1473
|
static: true,
|
|
@@ -1490,7 +1507,7 @@ const componentInfo$3 = {
|
|
|
1490
1507
|
}
|
|
1491
1508
|
]
|
|
1492
1509
|
};
|
|
1493
|
-
const componentInfo$
|
|
1510
|
+
const componentInfo$3 = {
|
|
1494
1511
|
name: "Text",
|
|
1495
1512
|
static: true,
|
|
1496
1513
|
builtIn: true,
|
|
@@ -1511,7 +1528,7 @@ const componentInfo$2 = {
|
|
|
1511
1528
|
textAlign: "center"
|
|
1512
1529
|
}
|
|
1513
1530
|
};
|
|
1514
|
-
const componentInfo$
|
|
1531
|
+
const componentInfo$2 = {
|
|
1515
1532
|
name: "Video",
|
|
1516
1533
|
canHaveChildren: true,
|
|
1517
1534
|
builtIn: true,
|
|
@@ -1624,7 +1641,7 @@ const componentInfo$1 = {
|
|
|
1624
1641
|
}
|
|
1625
1642
|
]
|
|
1626
1643
|
};
|
|
1627
|
-
const
|
|
1644
|
+
const componentInfo$1 = {
|
|
1628
1645
|
name: "Embed",
|
|
1629
1646
|
static: true,
|
|
1630
1647
|
builtIn: true,
|
|
@@ -1690,9 +1707,9 @@ const findAndRunScripts = function findAndRunScripts2(props, state, elem) {
|
|
|
1690
1707
|
const Embed = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
1691
1708
|
const elem = qwik.useRef();
|
|
1692
1709
|
const state = qwik.useStore({
|
|
1710
|
+
ranInitFn: false,
|
|
1693
1711
|
scriptsInserted: [],
|
|
1694
|
-
scriptsRun: []
|
|
1695
|
-
ranInitFn: false
|
|
1712
|
+
scriptsRun: []
|
|
1696
1713
|
});
|
|
1697
1714
|
qwik.useWatchQrl(qwik.inlinedQrl(({ track: track2 }) => {
|
|
1698
1715
|
const [elem2, props2, state2] = qwik.useLexicalScope();
|
|
@@ -1713,80 +1730,117 @@ const Embed = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
|
1713
1730
|
});
|
|
1714
1731
|
}, "Embed_component_CP6B8Y76ylw"));
|
|
1715
1732
|
const embed = Embed;
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1733
|
+
const ImgComponent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
1734
|
+
return /* @__PURE__ */ jsxRuntime.jsx("img", {
|
|
1735
|
+
style: {
|
|
1736
|
+
objectFit: props.backgroundSize || "cover",
|
|
1737
|
+
objectPosition: props.backgroundPosition || "center"
|
|
1738
|
+
},
|
|
1739
|
+
alt: props.altText,
|
|
1740
|
+
src: props.imgSrc || props.image,
|
|
1741
|
+
...props.attributes
|
|
1742
|
+
}, isEditing() && props.imgSrc || "default-key");
|
|
1743
|
+
}, "ImgComponent_component_b8FkE9OcVN8"));
|
|
1744
|
+
const Img = ImgComponent;
|
|
1745
|
+
const componentInfo2 = {
|
|
1746
|
+
name: "Raw:Img",
|
|
1747
|
+
hideFromInsertMenu: true,
|
|
1748
|
+
builtIn: true,
|
|
1749
|
+
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",
|
|
1750
|
+
inputs: [
|
|
1751
|
+
{
|
|
1752
|
+
name: "image",
|
|
1753
|
+
bubble: true,
|
|
1754
|
+
type: "file",
|
|
1755
|
+
allowedFileTypes: [
|
|
1756
|
+
"jpeg",
|
|
1757
|
+
"jpg",
|
|
1758
|
+
"png",
|
|
1759
|
+
"svg"
|
|
1760
|
+
],
|
|
1761
|
+
required: true
|
|
1762
|
+
}
|
|
1763
|
+
],
|
|
1764
|
+
noWrap: true,
|
|
1765
|
+
static: true
|
|
1766
|
+
};
|
|
1767
|
+
var __defProp$4 = Object.defineProperty;
|
|
1768
|
+
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
1769
|
+
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
1770
|
+
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
1771
|
+
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, {
|
|
1721
1772
|
enumerable: true,
|
|
1722
1773
|
configurable: true,
|
|
1723
1774
|
writable: true,
|
|
1724
1775
|
value
|
|
1725
1776
|
}) : obj[key] = value;
|
|
1726
|
-
var __spreadValues$
|
|
1777
|
+
var __spreadValues$4 = (a, b) => {
|
|
1727
1778
|
for (var prop in b || (b = {}))
|
|
1728
|
-
if (__hasOwnProp$
|
|
1729
|
-
__defNormalProp$
|
|
1730
|
-
if (__getOwnPropSymbols$
|
|
1731
|
-
for (var prop of __getOwnPropSymbols$
|
|
1732
|
-
if (__propIsEnum$
|
|
1733
|
-
__defNormalProp$
|
|
1779
|
+
if (__hasOwnProp$4.call(b, prop))
|
|
1780
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
1781
|
+
if (__getOwnPropSymbols$4) {
|
|
1782
|
+
for (var prop of __getOwnPropSymbols$4(b))
|
|
1783
|
+
if (__propIsEnum$4.call(b, prop))
|
|
1784
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
1734
1785
|
}
|
|
1735
1786
|
return a;
|
|
1736
1787
|
};
|
|
1737
1788
|
const getDefaultRegisteredComponents = () => [
|
|
1738
|
-
__spreadValues$
|
|
1789
|
+
__spreadValues$4({
|
|
1739
1790
|
component: Columns$1
|
|
1740
|
-
}, componentInfo$
|
|
1741
|
-
__spreadValues$
|
|
1791
|
+
}, componentInfo$8),
|
|
1792
|
+
__spreadValues$4({
|
|
1742
1793
|
component: Image$1
|
|
1743
|
-
}, componentInfo$
|
|
1744
|
-
__spreadValues$
|
|
1794
|
+
}, componentInfo$6),
|
|
1795
|
+
__spreadValues$4({
|
|
1796
|
+
component: Img
|
|
1797
|
+
}, componentInfo2),
|
|
1798
|
+
__spreadValues$4({
|
|
1745
1799
|
component: Text$1
|
|
1746
|
-
}, componentInfo$
|
|
1747
|
-
__spreadValues$
|
|
1800
|
+
}, componentInfo$3),
|
|
1801
|
+
__spreadValues$4({
|
|
1748
1802
|
component: Video$1
|
|
1749
|
-
}, componentInfo$
|
|
1750
|
-
__spreadValues$
|
|
1803
|
+
}, componentInfo$2),
|
|
1804
|
+
__spreadValues$4({
|
|
1751
1805
|
component: Symbol$2
|
|
1752
|
-
}, componentInfo$
|
|
1753
|
-
__spreadValues$
|
|
1806
|
+
}, componentInfo$4),
|
|
1807
|
+
__spreadValues$4({
|
|
1754
1808
|
component: Button$1
|
|
1755
|
-
}, componentInfo$
|
|
1756
|
-
__spreadValues$
|
|
1809
|
+
}, componentInfo$9),
|
|
1810
|
+
__spreadValues$4({
|
|
1757
1811
|
component: Section
|
|
1758
|
-
}, componentInfo$
|
|
1759
|
-
__spreadValues$
|
|
1812
|
+
}, componentInfo$5),
|
|
1813
|
+
__spreadValues$4({
|
|
1760
1814
|
component: Fragment
|
|
1761
|
-
}, componentInfo$
|
|
1762
|
-
__spreadValues$
|
|
1815
|
+
}, componentInfo$7),
|
|
1816
|
+
__spreadValues$4({
|
|
1763
1817
|
component: embed
|
|
1764
|
-
},
|
|
1818
|
+
}, componentInfo$1)
|
|
1765
1819
|
];
|
|
1766
|
-
var __defProp$
|
|
1767
|
-
var __defProps$
|
|
1768
|
-
var __getOwnPropDescs$
|
|
1769
|
-
var __getOwnPropSymbols$
|
|
1770
|
-
var __hasOwnProp$
|
|
1771
|
-
var __propIsEnum$
|
|
1772
|
-
var __defNormalProp$
|
|
1820
|
+
var __defProp$3 = Object.defineProperty;
|
|
1821
|
+
var __defProps$3 = Object.defineProperties;
|
|
1822
|
+
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
1823
|
+
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
1824
|
+
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
|
|
1825
|
+
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
|
|
1826
|
+
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, {
|
|
1773
1827
|
enumerable: true,
|
|
1774
1828
|
configurable: true,
|
|
1775
1829
|
writable: true,
|
|
1776
1830
|
value
|
|
1777
1831
|
}) : obj[key] = value;
|
|
1778
|
-
var __spreadValues$
|
|
1832
|
+
var __spreadValues$3 = (a, b) => {
|
|
1779
1833
|
for (var prop in b || (b = {}))
|
|
1780
|
-
if (__hasOwnProp$
|
|
1781
|
-
__defNormalProp$
|
|
1782
|
-
if (__getOwnPropSymbols$
|
|
1783
|
-
for (var prop of __getOwnPropSymbols$
|
|
1784
|
-
if (__propIsEnum$
|
|
1785
|
-
__defNormalProp$
|
|
1834
|
+
if (__hasOwnProp$3.call(b, prop))
|
|
1835
|
+
__defNormalProp$3(a, prop, b[prop]);
|
|
1836
|
+
if (__getOwnPropSymbols$3) {
|
|
1837
|
+
for (var prop of __getOwnPropSymbols$3(b))
|
|
1838
|
+
if (__propIsEnum$3.call(b, prop))
|
|
1839
|
+
__defNormalProp$3(a, prop, b[prop]);
|
|
1786
1840
|
}
|
|
1787
1841
|
return a;
|
|
1788
1842
|
};
|
|
1789
|
-
var __spreadProps$
|
|
1843
|
+
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
1790
1844
|
function flatten(object, path = null, separator = ".") {
|
|
1791
1845
|
return Object.keys(object).reduce((acc, key) => {
|
|
1792
1846
|
const value = object[key];
|
|
@@ -1799,7 +1853,7 @@ function flatten(object, path = null, separator = ".") {
|
|
|
1799
1853
|
value !== null,
|
|
1800
1854
|
!(Array.isArray(value) && value.length === 0)
|
|
1801
1855
|
].every(Boolean);
|
|
1802
|
-
return isObject ? __spreadValues$
|
|
1856
|
+
return isObject ? __spreadValues$3(__spreadValues$3({}, acc), flatten(value, newPath, separator)) : __spreadProps$3(__spreadValues$3({}, acc), {
|
|
1803
1857
|
[newPath]: value
|
|
1804
1858
|
});
|
|
1805
1859
|
}, {});
|
|
@@ -1904,30 +1958,30 @@ const handleABTesting = (item, testGroups) => {
|
|
|
1904
1958
|
}
|
|
1905
1959
|
}
|
|
1906
1960
|
};
|
|
1907
|
-
var __defProp$
|
|
1908
|
-
var __defProps$
|
|
1909
|
-
var __getOwnPropDescs$
|
|
1910
|
-
var __getOwnPropSymbols$
|
|
1911
|
-
var __hasOwnProp$
|
|
1912
|
-
var __propIsEnum$
|
|
1913
|
-
var __defNormalProp$
|
|
1961
|
+
var __defProp$2 = Object.defineProperty;
|
|
1962
|
+
var __defProps$2 = Object.defineProperties;
|
|
1963
|
+
var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
|
|
1964
|
+
var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
|
|
1965
|
+
var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
|
|
1966
|
+
var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
|
|
1967
|
+
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, {
|
|
1914
1968
|
enumerable: true,
|
|
1915
1969
|
configurable: true,
|
|
1916
1970
|
writable: true,
|
|
1917
1971
|
value
|
|
1918
1972
|
}) : obj[key] = value;
|
|
1919
|
-
var __spreadValues$
|
|
1973
|
+
var __spreadValues$2 = (a, b) => {
|
|
1920
1974
|
for (var prop in b || (b = {}))
|
|
1921
|
-
if (__hasOwnProp$
|
|
1922
|
-
__defNormalProp$
|
|
1923
|
-
if (__getOwnPropSymbols$
|
|
1924
|
-
for (var prop of __getOwnPropSymbols$
|
|
1925
|
-
if (__propIsEnum$
|
|
1926
|
-
__defNormalProp$
|
|
1975
|
+
if (__hasOwnProp$2.call(b, prop))
|
|
1976
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
1977
|
+
if (__getOwnPropSymbols$2) {
|
|
1978
|
+
for (var prop of __getOwnPropSymbols$2(b))
|
|
1979
|
+
if (__propIsEnum$2.call(b, prop))
|
|
1980
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
1927
1981
|
}
|
|
1928
1982
|
return a;
|
|
1929
1983
|
};
|
|
1930
|
-
var __spreadProps$
|
|
1984
|
+
var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
|
|
1931
1985
|
var __async = (__this, __arguments, generator) => {
|
|
1932
1986
|
return new Promise((resolve, reject) => {
|
|
1933
1987
|
var fulfilled = (value) => {
|
|
@@ -1951,7 +2005,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
1951
2005
|
const fetch$ = getFetch();
|
|
1952
2006
|
function getContent(options) {
|
|
1953
2007
|
return __async(this, null, function* () {
|
|
1954
|
-
return (yield getAllContent(__spreadProps$
|
|
2008
|
+
return (yield getAllContent(__spreadProps$2(__spreadValues$2({}, options), {
|
|
1955
2009
|
limit: 1
|
|
1956
2010
|
}))).results[0] || null;
|
|
1957
2011
|
});
|
|
@@ -1959,7 +2013,7 @@ function getContent(options) {
|
|
|
1959
2013
|
const generateContentUrl = (options) => {
|
|
1960
2014
|
const { limit = 1, userAttributes, query, noTraverse = false, model, apiKey } = options;
|
|
1961
2015
|
const url = new URL(`https://cdn.builder.io/api/v2/content/${model}?apiKey=${apiKey}&limit=${limit}&noTraverse=${noTraverse}`);
|
|
1962
|
-
const queryOptions = __spreadValues$
|
|
2016
|
+
const queryOptions = __spreadValues$2(__spreadValues$2({}, getBuilderSearchParamsFromWindow()), normalizeSearchParams(options.options || {}));
|
|
1963
2017
|
const flattened = flatten(queryOptions);
|
|
1964
2018
|
for (const key in flattened)
|
|
1965
2019
|
url.searchParams.set(key, String(flattened[key]));
|
|
@@ -1992,52 +2046,52 @@ function isPreviewing() {
|
|
|
1992
2046
|
return false;
|
|
1993
2047
|
return Boolean(location.search.indexOf("builder.preview=") !== -1);
|
|
1994
2048
|
}
|
|
1995
|
-
var __defProp = Object.defineProperty;
|
|
1996
|
-
var __defProps = Object.defineProperties;
|
|
1997
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
1998
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
1999
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
2000
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
2001
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
|
|
2049
|
+
var __defProp$1 = Object.defineProperty;
|
|
2050
|
+
var __defProps$1 = Object.defineProperties;
|
|
2051
|
+
var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
|
|
2052
|
+
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
|
|
2053
|
+
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
|
2054
|
+
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
|
|
2055
|
+
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, {
|
|
2002
2056
|
enumerable: true,
|
|
2003
2057
|
configurable: true,
|
|
2004
2058
|
writable: true,
|
|
2005
2059
|
value
|
|
2006
2060
|
}) : obj[key] = value;
|
|
2007
|
-
var __spreadValues = (a, b) => {
|
|
2061
|
+
var __spreadValues$1 = (a, b) => {
|
|
2008
2062
|
for (var prop in b || (b = {}))
|
|
2009
|
-
if (__hasOwnProp.call(b, prop))
|
|
2010
|
-
__defNormalProp(a, prop, b[prop]);
|
|
2011
|
-
if (__getOwnPropSymbols) {
|
|
2012
|
-
for (var prop of __getOwnPropSymbols(b))
|
|
2013
|
-
if (__propIsEnum.call(b, prop))
|
|
2014
|
-
__defNormalProp(a, prop, b[prop]);
|
|
2063
|
+
if (__hasOwnProp$1.call(b, prop))
|
|
2064
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
2065
|
+
if (__getOwnPropSymbols$1) {
|
|
2066
|
+
for (var prop of __getOwnPropSymbols$1(b))
|
|
2067
|
+
if (__propIsEnum$1.call(b, prop))
|
|
2068
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
2015
2069
|
}
|
|
2016
2070
|
return a;
|
|
2017
2071
|
};
|
|
2018
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
2019
|
-
var __objRest = (source, exclude) => {
|
|
2072
|
+
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
|
|
2073
|
+
var __objRest$1 = (source, exclude) => {
|
|
2020
2074
|
var target = {};
|
|
2021
2075
|
for (var prop in source)
|
|
2022
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2076
|
+
if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2023
2077
|
target[prop] = source[prop];
|
|
2024
|
-
if (source != null && __getOwnPropSymbols) {
|
|
2025
|
-
for (var prop of __getOwnPropSymbols(source))
|
|
2026
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
2078
|
+
if (source != null && __getOwnPropSymbols$1) {
|
|
2079
|
+
for (var prop of __getOwnPropSymbols$1(source))
|
|
2080
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))
|
|
2027
2081
|
target[prop] = source[prop];
|
|
2028
2082
|
}
|
|
2029
2083
|
return target;
|
|
2030
2084
|
};
|
|
2031
2085
|
const components = [];
|
|
2032
2086
|
function registerComponent(component3, info) {
|
|
2033
|
-
components.push(__spreadValues({
|
|
2087
|
+
components.push(__spreadValues$1({
|
|
2034
2088
|
component: component3
|
|
2035
2089
|
}, info));
|
|
2036
2090
|
console.warn("registerComponent is deprecated. Use the `customComponents` prop in RenderContent instead to provide your custom components to the builder SDK.");
|
|
2037
2091
|
return component3;
|
|
2038
2092
|
}
|
|
2039
2093
|
const createRegisterComponentMessage = (_a) => {
|
|
2040
|
-
var info = __objRest(_a, [
|
|
2094
|
+
var info = __objRest$1(_a, [
|
|
2041
2095
|
"component"
|
|
2042
2096
|
]);
|
|
2043
2097
|
return {
|
|
@@ -2053,16 +2107,239 @@ const serializeFn = (fnValue) => {
|
|
|
2053
2107
|
return `return (${appendFunction ? "function " : ""}${fnStr}).apply(this, arguments)`;
|
|
2054
2108
|
};
|
|
2055
2109
|
const prepareComponentInfoToSend = (_c) => {
|
|
2056
|
-
var { inputs } = _c, info = __objRest(_c, [
|
|
2110
|
+
var { inputs } = _c, info = __objRest$1(_c, [
|
|
2057
2111
|
"inputs"
|
|
2058
2112
|
]);
|
|
2059
|
-
return __spreadProps(__spreadValues({}, fastClone(info)), {
|
|
2060
|
-
inputs: inputs == null ? void 0 : inputs.map((input) => Object.entries(input).reduce((acc, [key, value]) => __spreadProps(__spreadValues({}, acc), {
|
|
2113
|
+
return __spreadProps$1(__spreadValues$1({}, fastClone(info)), {
|
|
2114
|
+
inputs: inputs == null ? void 0 : inputs.map((input) => Object.entries(input).reduce((acc, [key, value]) => __spreadProps$1(__spreadValues$1({}, acc), {
|
|
2061
2115
|
[key]: serializeValue(value)
|
|
2062
2116
|
}), {}))
|
|
2063
2117
|
});
|
|
2064
2118
|
};
|
|
2065
|
-
|
|
2119
|
+
const getTopLevelDomain = (host) => {
|
|
2120
|
+
const parts = host.split(".");
|
|
2121
|
+
if (parts.length > 2)
|
|
2122
|
+
return parts.slice(1).join(".");
|
|
2123
|
+
return host;
|
|
2124
|
+
};
|
|
2125
|
+
const getCookie = ({ name, canTrack }) => {
|
|
2126
|
+
var _a;
|
|
2127
|
+
try {
|
|
2128
|
+
if (!canTrack)
|
|
2129
|
+
return void 0;
|
|
2130
|
+
return (_a = document.cookie.split("; ").find((row) => row.startsWith(`${name}=`))) == null ? void 0 : _a.split("=")[1];
|
|
2131
|
+
} catch (err) {
|
|
2132
|
+
console.debug("[COOKIE] GET error: ", err);
|
|
2133
|
+
}
|
|
2134
|
+
};
|
|
2135
|
+
const stringifyCookie = (cookie) => cookie.map(([key, value]) => value ? `${key}=${value}` : key).join("; ");
|
|
2136
|
+
const SECURE_CONFIG = [
|
|
2137
|
+
[
|
|
2138
|
+
"secure",
|
|
2139
|
+
""
|
|
2140
|
+
],
|
|
2141
|
+
[
|
|
2142
|
+
"SameSite",
|
|
2143
|
+
"None"
|
|
2144
|
+
]
|
|
2145
|
+
];
|
|
2146
|
+
const createCookieString = ({ name, value, expires }) => {
|
|
2147
|
+
const secure = isBrowser() ? location.protocol === "https:" : true;
|
|
2148
|
+
const secureObj = secure ? SECURE_CONFIG : [
|
|
2149
|
+
[]
|
|
2150
|
+
];
|
|
2151
|
+
const expiresObj = expires ? [
|
|
2152
|
+
[
|
|
2153
|
+
"expires",
|
|
2154
|
+
expires.toUTCString()
|
|
2155
|
+
]
|
|
2156
|
+
] : [
|
|
2157
|
+
[]
|
|
2158
|
+
];
|
|
2159
|
+
const cookieValue = [
|
|
2160
|
+
[
|
|
2161
|
+
name,
|
|
2162
|
+
value
|
|
2163
|
+
],
|
|
2164
|
+
...expiresObj,
|
|
2165
|
+
[
|
|
2166
|
+
"path",
|
|
2167
|
+
"/"
|
|
2168
|
+
],
|
|
2169
|
+
[
|
|
2170
|
+
"domain",
|
|
2171
|
+
getTopLevelDomain(window.location.hostname)
|
|
2172
|
+
],
|
|
2173
|
+
...secureObj
|
|
2174
|
+
];
|
|
2175
|
+
const cookie = stringifyCookie(cookieValue);
|
|
2176
|
+
return cookie;
|
|
2177
|
+
};
|
|
2178
|
+
const setCookie = ({ name, value, expires, canTrack }) => {
|
|
2179
|
+
try {
|
|
2180
|
+
if (!canTrack)
|
|
2181
|
+
return void 0;
|
|
2182
|
+
const cookie = createCookieString({
|
|
2183
|
+
name,
|
|
2184
|
+
value,
|
|
2185
|
+
expires
|
|
2186
|
+
});
|
|
2187
|
+
document.cookie = cookie;
|
|
2188
|
+
} catch (err) {
|
|
2189
|
+
console.warn("[COOKIE] SET error: ", err);
|
|
2190
|
+
}
|
|
2191
|
+
};
|
|
2192
|
+
const checkIsDefined = (maybeT) => maybeT !== null && maybeT !== void 0;
|
|
2193
|
+
function uuidv4() {
|
|
2194
|
+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
|
|
2195
|
+
const r = Math.random() * 16 | 0, v = c == "x" ? r : r & 3 | 8;
|
|
2196
|
+
return v.toString(16);
|
|
2197
|
+
});
|
|
2198
|
+
}
|
|
2199
|
+
function uuid() {
|
|
2200
|
+
return uuidv4().replace(/-/g, "");
|
|
2201
|
+
}
|
|
2202
|
+
const SESSION_LOCAL_STORAGE_KEY = "builderSessionId";
|
|
2203
|
+
const getSessionId = ({ canTrack }) => {
|
|
2204
|
+
if (!canTrack)
|
|
2205
|
+
return void 0;
|
|
2206
|
+
const sessionId = getCookie({
|
|
2207
|
+
name: SESSION_LOCAL_STORAGE_KEY,
|
|
2208
|
+
canTrack
|
|
2209
|
+
});
|
|
2210
|
+
if (checkIsDefined(sessionId))
|
|
2211
|
+
return sessionId;
|
|
2212
|
+
else {
|
|
2213
|
+
const newSessionId = createSessionId();
|
|
2214
|
+
setSessionId({
|
|
2215
|
+
id: newSessionId,
|
|
2216
|
+
canTrack
|
|
2217
|
+
});
|
|
2218
|
+
}
|
|
2219
|
+
};
|
|
2220
|
+
const createSessionId = () => uuid();
|
|
2221
|
+
const setSessionId = ({ id, canTrack }) => setCookie({
|
|
2222
|
+
name: SESSION_LOCAL_STORAGE_KEY,
|
|
2223
|
+
value: id,
|
|
2224
|
+
canTrack
|
|
2225
|
+
});
|
|
2226
|
+
const getLocalStorage = () => isBrowser() && typeof localStorage !== "undefined" ? localStorage : void 0;
|
|
2227
|
+
const getLocalStorageItem = ({ key, canTrack }) => {
|
|
2228
|
+
var _a;
|
|
2229
|
+
try {
|
|
2230
|
+
if (canTrack)
|
|
2231
|
+
return (_a = getLocalStorage()) == null ? void 0 : _a.getItem(key);
|
|
2232
|
+
return void 0;
|
|
2233
|
+
} catch (err) {
|
|
2234
|
+
console.debug("[LocalStorage] GET error: ", err);
|
|
2235
|
+
}
|
|
2236
|
+
};
|
|
2237
|
+
const setLocalStorageItem = ({ key, canTrack, value }) => {
|
|
2238
|
+
var _a;
|
|
2239
|
+
try {
|
|
2240
|
+
if (canTrack)
|
|
2241
|
+
(_a = getLocalStorage()) == null || _a.setItem(key, value);
|
|
2242
|
+
} catch (err) {
|
|
2243
|
+
console.debug("[LocalStorage] SET error: ", err);
|
|
2244
|
+
}
|
|
2245
|
+
};
|
|
2246
|
+
const VISITOR_LOCAL_STORAGE_KEY = "builderVisitorId";
|
|
2247
|
+
const getVisitorId = ({ canTrack }) => {
|
|
2248
|
+
if (!canTrack)
|
|
2249
|
+
return void 0;
|
|
2250
|
+
const visitorId = getLocalStorageItem({
|
|
2251
|
+
key: VISITOR_LOCAL_STORAGE_KEY,
|
|
2252
|
+
canTrack
|
|
2253
|
+
});
|
|
2254
|
+
if (checkIsDefined(visitorId))
|
|
2255
|
+
return visitorId;
|
|
2256
|
+
else {
|
|
2257
|
+
const newVisitorId = createVisitorId();
|
|
2258
|
+
setVisitorId({
|
|
2259
|
+
id: newVisitorId,
|
|
2260
|
+
canTrack
|
|
2261
|
+
});
|
|
2262
|
+
}
|
|
2263
|
+
};
|
|
2264
|
+
const createVisitorId = () => uuid();
|
|
2265
|
+
const setVisitorId = ({ id, canTrack }) => setLocalStorageItem({
|
|
2266
|
+
key: VISITOR_LOCAL_STORAGE_KEY,
|
|
2267
|
+
value: id,
|
|
2268
|
+
canTrack
|
|
2269
|
+
});
|
|
2270
|
+
var __defProp = Object.defineProperty;
|
|
2271
|
+
var __defProps = Object.defineProperties;
|
|
2272
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
2273
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
2274
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
2275
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
2276
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
|
|
2277
|
+
enumerable: true,
|
|
2278
|
+
configurable: true,
|
|
2279
|
+
writable: true,
|
|
2280
|
+
value
|
|
2281
|
+
}) : obj[key] = value;
|
|
2282
|
+
var __spreadValues = (a, b) => {
|
|
2283
|
+
for (var prop in b || (b = {}))
|
|
2284
|
+
if (__hasOwnProp.call(b, prop))
|
|
2285
|
+
__defNormalProp(a, prop, b[prop]);
|
|
2286
|
+
if (__getOwnPropSymbols) {
|
|
2287
|
+
for (var prop of __getOwnPropSymbols(b))
|
|
2288
|
+
if (__propIsEnum.call(b, prop))
|
|
2289
|
+
__defNormalProp(a, prop, b[prop]);
|
|
2290
|
+
}
|
|
2291
|
+
return a;
|
|
2292
|
+
};
|
|
2293
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
2294
|
+
var __objRest = (source, exclude) => {
|
|
2295
|
+
var target = {};
|
|
2296
|
+
for (var prop in source)
|
|
2297
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2298
|
+
target[prop] = source[prop];
|
|
2299
|
+
if (source != null && __getOwnPropSymbols) {
|
|
2300
|
+
for (var prop of __getOwnPropSymbols(source))
|
|
2301
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
2302
|
+
target[prop] = source[prop];
|
|
2303
|
+
}
|
|
2304
|
+
return target;
|
|
2305
|
+
};
|
|
2306
|
+
const getTrackingEventData = ({ canTrack }) => {
|
|
2307
|
+
if (!canTrack)
|
|
2308
|
+
return {
|
|
2309
|
+
visitorId: void 0,
|
|
2310
|
+
sessionId: void 0
|
|
2311
|
+
};
|
|
2312
|
+
const sessionId = getSessionId({
|
|
2313
|
+
canTrack
|
|
2314
|
+
});
|
|
2315
|
+
const visitorId = getVisitorId({
|
|
2316
|
+
canTrack
|
|
2317
|
+
});
|
|
2318
|
+
return {
|
|
2319
|
+
sessionId,
|
|
2320
|
+
visitorId
|
|
2321
|
+
};
|
|
2322
|
+
};
|
|
2323
|
+
const createEvent = (_a) => {
|
|
2324
|
+
var { type: eventType, canTrack, orgId, contentId } = _a, properties = __objRest(_a, [
|
|
2325
|
+
"type",
|
|
2326
|
+
"canTrack",
|
|
2327
|
+
"orgId",
|
|
2328
|
+
"contentId"
|
|
2329
|
+
]);
|
|
2330
|
+
return {
|
|
2331
|
+
type: eventType,
|
|
2332
|
+
data: __spreadProps(__spreadValues(__spreadValues({}, properties), getTrackingEventData({
|
|
2333
|
+
canTrack
|
|
2334
|
+
})), {
|
|
2335
|
+
ownerId: orgId,
|
|
2336
|
+
contentId
|
|
2337
|
+
})
|
|
2338
|
+
};
|
|
2339
|
+
};
|
|
2340
|
+
function track(eventProps) {
|
|
2341
|
+
if (!eventProps.canTrack)
|
|
2342
|
+
return;
|
|
2066
2343
|
if (isEditing())
|
|
2067
2344
|
return;
|
|
2068
2345
|
if (!(isBrowser() || TARGET === "reactNative"))
|
|
@@ -2071,10 +2348,7 @@ function track(event, properties) {
|
|
|
2071
2348
|
method: "POST",
|
|
2072
2349
|
body: JSON.stringify({
|
|
2073
2350
|
events: [
|
|
2074
|
-
|
|
2075
|
-
type: event,
|
|
2076
|
-
data: properties
|
|
2077
|
-
}
|
|
2351
|
+
createEvent(eventProps)
|
|
2078
2352
|
]
|
|
2079
2353
|
}),
|
|
2080
2354
|
headers: {
|
|
@@ -2144,6 +2418,9 @@ const useContent = function useContent2(props, state, elementRef) {
|
|
|
2144
2418
|
};
|
|
2145
2419
|
return mergedContent;
|
|
2146
2420
|
};
|
|
2421
|
+
const canTrackToUse = function canTrackToUse2(props, state, elementRef) {
|
|
2422
|
+
return props.canTrack || true;
|
|
2423
|
+
};
|
|
2147
2424
|
const contentState = function contentState2(props, state, elementRef) {
|
|
2148
2425
|
return {
|
|
2149
2426
|
...props.content?.data?.state,
|
|
@@ -2193,9 +2470,12 @@ const httpReqsData = function httpReqsData2(props, state, elementRef) {
|
|
|
2193
2470
|
return {};
|
|
2194
2471
|
};
|
|
2195
2472
|
const onClick2 = function onClick3(props, state, elementRef, _event) {
|
|
2196
|
-
if (useContent(props, state)
|
|
2197
|
-
track(
|
|
2198
|
-
|
|
2473
|
+
if (useContent(props, state))
|
|
2474
|
+
track({
|
|
2475
|
+
type: "click",
|
|
2476
|
+
canTrack: canTrackToUse(props),
|
|
2477
|
+
contentId: useContent(props, state).id,
|
|
2478
|
+
orgId: props.apiKey
|
|
2199
2479
|
});
|
|
2200
2480
|
};
|
|
2201
2481
|
const evalExpression = function evalExpression2(props, state, elementRef, expression) {
|
|
@@ -2249,8 +2529,8 @@ const RenderContent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props)
|
|
|
2249
2529
|
const state = qwik.useStore({
|
|
2250
2530
|
forceReRenderCount: 0,
|
|
2251
2531
|
overrideContent: null,
|
|
2252
|
-
|
|
2253
|
-
|
|
2532
|
+
overrideState: {},
|
|
2533
|
+
update: 0
|
|
2254
2534
|
});
|
|
2255
2535
|
qwik.useContextProvider(stdin_default, qwik.useStore({
|
|
2256
2536
|
content: (() => {
|
|
@@ -2273,7 +2553,7 @@ const RenderContent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props)
|
|
|
2273
2553
|
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
|
2274
2554
|
if (isBrowser()) {
|
|
2275
2555
|
if (isEditing()) {
|
|
2276
|
-
state2.forceReRenderCount
|
|
2556
|
+
state2.forceReRenderCount = state2.forceReRenderCount + 1;
|
|
2277
2557
|
qwik._useMutableProps(elementRef2.current, true);
|
|
2278
2558
|
registerInsertMenu();
|
|
2279
2559
|
setupBrowserForEditing();
|
|
@@ -2284,9 +2564,12 @@ const RenderContent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props)
|
|
|
2284
2564
|
window.addEventListener("message", processMessage.bind(null, props2, state2, elementRef2));
|
|
2285
2565
|
window.addEventListener("builder:component:stateChangeListenerActivated", emitStateUpdate.bind(null, props2, state2, elementRef2));
|
|
2286
2566
|
}
|
|
2287
|
-
if (useContent(props2, state2)
|
|
2288
|
-
track(
|
|
2289
|
-
|
|
2567
|
+
if (useContent(props2, state2))
|
|
2568
|
+
track({
|
|
2569
|
+
type: "impression",
|
|
2570
|
+
canTrack: canTrackToUse(props2),
|
|
2571
|
+
contentId: useContent(props2, state2).id,
|
|
2572
|
+
orgId: props2.apiKey
|
|
2290
2573
|
});
|
|
2291
2574
|
if (isPreviewing()) {
|
|
2292
2575
|
const searchParams = new URL(location.href).searchParams;
|
|
@@ -2367,7 +2650,7 @@ const RenderContent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props)
|
|
|
2367
2650
|
customFonts: useContent(props, state)?.data?.customFonts
|
|
2368
2651
|
}) : null,
|
|
2369
2652
|
/* @__PURE__ */ jsxRuntime.jsx(RenderBlocks$1, {
|
|
2370
|
-
blocks: useContent(props, state)?.data?.blocks
|
|
2653
|
+
blocks: markMutable(useContent(props, state)?.data?.blocks)
|
|
2371
2654
|
}, state.forceReRenderCount)
|
|
2372
2655
|
]
|
|
2373
2656
|
}) : null
|
|
@@ -2389,9 +2672,7 @@ const Symbol$1 = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
|
2389
2672
|
]));
|
|
2390
2673
|
qwik.useWatchQrl(qwik.inlinedQrl(({ track: track2 }) => {
|
|
2391
2674
|
const [builderContext2, props2, state2] = qwik.useLexicalScope();
|
|
2392
|
-
props2
|
|
2393
|
-
props2.symbol && track2(props2.symbol, "model");
|
|
2394
|
-
props2.symbol && track2(props2.symbol, "entry");
|
|
2675
|
+
props2 && track2(props2, "symbol");
|
|
2395
2676
|
state2 && track2(state2, "content");
|
|
2396
2677
|
const symbolToUse = props2.symbol;
|
|
2397
2678
|
if (symbolToUse && !symbolToUse.content && !state2.content && symbolToUse.model)
|
|
@@ -2418,14 +2699,14 @@ const Symbol$1 = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
|
2418
2699
|
children: /* @__PURE__ */ jsxRuntime.jsx(RenderContent$1, {
|
|
2419
2700
|
apiKey: builderContext.apiKey,
|
|
2420
2701
|
context: builderContext.context,
|
|
2421
|
-
customComponents: Object.values(builderContext.registeredComponents),
|
|
2422
|
-
data: {
|
|
2702
|
+
customComponents: markMutable(Object.values(builderContext.registeredComponents)),
|
|
2703
|
+
data: markMutable({
|
|
2423
2704
|
...props.symbol?.data,
|
|
2424
2705
|
...builderContext.state,
|
|
2425
2706
|
...props.symbol?.content?.data?.state
|
|
2426
|
-
},
|
|
2707
|
+
}),
|
|
2427
2708
|
model: props.symbol?.model,
|
|
2428
|
-
content: state.content
|
|
2709
|
+
content: markMutable(state.content)
|
|
2429
2710
|
})
|
|
2430
2711
|
});
|
|
2431
2712
|
}, "Symbol_component_Dn8mGpai87I"));
|