@builder.io/sdk-qwik 0.0.10 → 0.0.13
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 +19 -16
- package/lib/index.qwik.cjs +478 -204
- package/lib/index.qwik.mjs +478 -204
- package/package.json +5 -4
- package/src/blocks/button/button.jsx +7 -2
- package/src/blocks/columns/columns.jsx +7 -3
- package/src/blocks/form/builder-blocks.jsx +1 -1
- package/src/blocks/img/img.jsx +2 -2
- package/src/blocks/symbol/symbol.jsx +1 -3
- package/src/components/render-block/block-styles.jsx +1 -1
- package/src/components/render-block/render-block.jsx +3 -2
- package/src/components/render-block/render-repeated-block.jsx +4 -1
- package/src/components/render-content/render-content.jsx +14 -5
- package/src/components/render-inlined-styles.jsx +4 -3
- package/src/constants/builder-registered-components.js +3 -0
- package/src/functions/get-processed-block.js +10 -6
- package/src/functions/get-processed-block.test.js +1 -1
- 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
|
@@ -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,8 +423,8 @@ 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
|
};
|
|
426
429
|
const RenderComponent = (props) => {
|
|
427
430
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
@@ -465,7 +468,7 @@ const RenderRepeatedBlock = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((p
|
|
|
465
468
|
}));
|
|
466
469
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderBlock$1, {
|
|
467
470
|
block: props.block,
|
|
468
|
-
context: props.
|
|
471
|
+
context: props.repeatContext
|
|
469
472
|
});
|
|
470
473
|
}, "RenderRepeatedBlock_component_fV0PdmPN990"));
|
|
471
474
|
const RenderRepeatedBlock$1 = RenderRepeatedBlock;
|
|
@@ -474,7 +477,7 @@ const component = function component2(props, state) {
|
|
|
474
477
|
block: props.block,
|
|
475
478
|
state: props.context.state,
|
|
476
479
|
context: props.context.context,
|
|
477
|
-
|
|
480
|
+
shouldEvaluateBindings: false
|
|
478
481
|
}).component?.name;
|
|
479
482
|
if (!componentName)
|
|
480
483
|
return null;
|
|
@@ -487,7 +490,7 @@ const component = function component2(props, state) {
|
|
|
487
490
|
} else
|
|
488
491
|
return ref;
|
|
489
492
|
};
|
|
490
|
-
const componentInfo$
|
|
493
|
+
const componentInfo$a = function componentInfo(props, state) {
|
|
491
494
|
if (component(props)) {
|
|
492
495
|
const { component: _, ...info } = component(props);
|
|
493
496
|
return info;
|
|
@@ -497,7 +500,7 @@ const componentInfo$9 = function componentInfo(props, state) {
|
|
|
497
500
|
const componentRef = function componentRef2(props, state) {
|
|
498
501
|
return component(props)?.component;
|
|
499
502
|
};
|
|
500
|
-
const
|
|
503
|
+
const tagName2 = function tagName3(props, state) {
|
|
501
504
|
return getBlockTag(useBlock2(props));
|
|
502
505
|
};
|
|
503
506
|
const useBlock2 = function useBlock3(props, state) {
|
|
@@ -505,7 +508,7 @@ const useBlock2 = function useBlock3(props, state) {
|
|
|
505
508
|
block: props.block,
|
|
506
509
|
state: props.context.state,
|
|
507
510
|
context: props.context.context,
|
|
508
|
-
|
|
511
|
+
shouldEvaluateBindings: true
|
|
509
512
|
});
|
|
510
513
|
};
|
|
511
514
|
const attributes = function attributes2(props, state) {
|
|
@@ -520,7 +523,7 @@ const attributes = function attributes2(props, state) {
|
|
|
520
523
|
};
|
|
521
524
|
};
|
|
522
525
|
const shouldWrap = function shouldWrap2(props, state) {
|
|
523
|
-
return !componentInfo$
|
|
526
|
+
return !componentInfo$a(props)?.noWrap;
|
|
524
527
|
};
|
|
525
528
|
const componentOptions = function componentOptions2(props, state) {
|
|
526
529
|
return {
|
|
@@ -534,7 +537,8 @@ const renderComponentProps = function renderComponentProps2(props, state) {
|
|
|
534
537
|
return {
|
|
535
538
|
blockChildren: children(props),
|
|
536
539
|
componentRef: componentRef(props),
|
|
537
|
-
componentOptions: componentOptions(props)
|
|
540
|
+
componentOptions: componentOptions(props),
|
|
541
|
+
context: props.context
|
|
538
542
|
};
|
|
539
543
|
};
|
|
540
544
|
const children = function children2(props, state) {
|
|
@@ -574,9 +578,9 @@ const repeatItemData = function repeatItemData2(props, state) {
|
|
|
574
578
|
};
|
|
575
579
|
const RenderBlock = (props) => {
|
|
576
580
|
const state = {};
|
|
577
|
-
state.tagName =
|
|
581
|
+
state.tagName = tagName2(props);
|
|
578
582
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
579
|
-
children: shouldWrap(props) ? !isEmptyHtmlElement(
|
|
583
|
+
children: shouldWrap(props) ? !isEmptyHtmlElement(tagName2(props)) ? /* @__PURE__ */ jsxRuntime.jsxs(state.tagName, {
|
|
580
584
|
...attributes(props),
|
|
581
585
|
children: [
|
|
582
586
|
repeatItemData(props) ? (repeatItemData(props) || []).map((data, index) => {
|
|
@@ -634,7 +638,7 @@ const onMouseEnter = function onMouseEnter2(props, state, builderContext) {
|
|
|
634
638
|
}, "*");
|
|
635
639
|
};
|
|
636
640
|
const RenderBlocks = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
637
|
-
qwik.useStylesScopedQrl(qwik.inlinedQrl(STYLES$
|
|
641
|
+
qwik.useStylesScopedQrl(qwik.inlinedQrl(STYLES$3, "RenderBlocks_component_useStylesScoped_QNti2s7juQc"));
|
|
638
642
|
const builderContext = qwik.useContext(stdin_default);
|
|
639
643
|
const state = {};
|
|
640
644
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
@@ -677,7 +681,7 @@ const RenderBlocks = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) =
|
|
|
677
681
|
});
|
|
678
682
|
}, "RenderBlocks_component_SXGwmVyEM0s"));
|
|
679
683
|
const RenderBlocks$1 = RenderBlocks;
|
|
680
|
-
const STYLES$
|
|
684
|
+
const STYLES$3 = `.div-RenderBlocks {
|
|
681
685
|
display: flex;
|
|
682
686
|
flex-direction: column;
|
|
683
687
|
align-items: stretch; }`;
|
|
@@ -719,7 +723,7 @@ const columnCssVars = function columnCssVars2(props, state) {
|
|
|
719
723
|
};
|
|
720
724
|
};
|
|
721
725
|
const Columns = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
722
|
-
qwik.useStylesScopedQrl(qwik.inlinedQrl(STYLES$
|
|
726
|
+
qwik.useStylesScopedQrl(qwik.inlinedQrl(STYLES$2, "Columns_component_useStylesScoped_704fWXyHORo"));
|
|
723
727
|
const state = {};
|
|
724
728
|
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
725
729
|
class: "builder-columns div-Columns",
|
|
@@ -733,20 +737,22 @@ const Columns = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
|
733
737
|
...columnCssVars(props, state)
|
|
734
738
|
},
|
|
735
739
|
children: /* @__PURE__ */ jsxRuntime.jsx(RenderBlocks$1, {
|
|
736
|
-
blocks: column.blocks
|
|
740
|
+
blocks: column.blocks,
|
|
741
|
+
path: `component.options.columns.${index}.blocks`,
|
|
742
|
+
parent: props.builderBlock.id
|
|
737
743
|
})
|
|
738
744
|
}, index);
|
|
739
745
|
})
|
|
740
746
|
});
|
|
741
747
|
}, "Columns_component_0PeVQGTMczc"));
|
|
742
748
|
const Columns$1 = Columns;
|
|
743
|
-
const STYLES$
|
|
749
|
+
const STYLES$2 = `.div-Columns {
|
|
744
750
|
display: flex;
|
|
745
751
|
align-items: stretch;
|
|
746
|
-
line-height: normal; }@media (max-width:
|
|
752
|
+
line-height: normal; }@media (max-width: 991px) { .div-Columns {
|
|
747
753
|
flex-direction: var(--flex-dir-tablet); } }@media (max-width: 639px) { .div-Columns {
|
|
748
754
|
flex-direction: var(--flex-dir); } }.div-Columns-2 {
|
|
749
|
-
flex-grow: 1; }@media (max-width:
|
|
755
|
+
flex-grow: 1; }@media (max-width: 991px) { .div-Columns-2 {
|
|
750
756
|
width: var(--column-width-tablet) !important;
|
|
751
757
|
margin-left: var(--column-margin-left-tablet) !important; } }@media (max-width: 639px) { .div-Columns-2 {
|
|
752
758
|
width: var(--column-width) !important;
|
|
@@ -826,7 +832,7 @@ const webpSrcSet = function webpSrcSet2(props, state) {
|
|
|
826
832
|
return "";
|
|
827
833
|
};
|
|
828
834
|
const Image = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
829
|
-
qwik.useStylesScopedQrl(qwik.inlinedQrl(STYLES, "Image_component_useStylesScoped_gRbO7w7SeZA"));
|
|
835
|
+
qwik.useStylesScopedQrl(qwik.inlinedQrl(STYLES$1, "Image_component_useStylesScoped_gRbO7w7SeZA"));
|
|
830
836
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
831
837
|
class: "div-Image",
|
|
832
838
|
children: [
|
|
@@ -869,7 +875,7 @@ const Image = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
|
869
875
|
});
|
|
870
876
|
}, "Image_component_y3S3Zox9wEo"));
|
|
871
877
|
const Image$1 = Image;
|
|
872
|
-
const STYLES = `.div-Image {
|
|
878
|
+
const STYLES$1 = `.div-Image {
|
|
873
879
|
position: relative; }.img-Image {
|
|
874
880
|
opacity: 1;
|
|
875
881
|
transition: opacity 0.2s ease-in-out;
|
|
@@ -932,6 +938,7 @@ const Video = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
|
932
938
|
}, "Video_component_O5sPuWlrTvk"));
|
|
933
939
|
const Video$1 = Video;
|
|
934
940
|
const Button = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
941
|
+
qwik.useStylesScopedQrl(qwik.inlinedQrl(STYLES, "Button_component_useStylesScoped_vN61mfeURXY"));
|
|
935
942
|
return /* @__PURE__ */ jsxRuntime.jsx(qwik.Fragment, {
|
|
936
943
|
children: props.link ? /* @__PURE__ */ jsxRuntime.jsx("a", {
|
|
937
944
|
role: "button",
|
|
@@ -939,14 +946,17 @@ const Button = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
|
939
946
|
href: props.link,
|
|
940
947
|
target: props.openLinkInNewTab ? "_blank" : void 0,
|
|
941
948
|
children: props.text
|
|
942
|
-
}) : /* @__PURE__ */ jsxRuntime.jsx("
|
|
949
|
+
}) : /* @__PURE__ */ jsxRuntime.jsx("button", {
|
|
950
|
+
class: "button-Button",
|
|
943
951
|
...props.attributes,
|
|
944
952
|
children: props.text
|
|
945
953
|
})
|
|
946
954
|
});
|
|
947
955
|
}, "Button_component_FtjCELjtKF4"));
|
|
948
956
|
const Button$1 = Button;
|
|
949
|
-
const
|
|
957
|
+
const STYLES = `.button-Button {
|
|
958
|
+
all: unset; }`;
|
|
959
|
+
const componentInfo$9 = {
|
|
950
960
|
name: "Core:Button",
|
|
951
961
|
builtIn: true,
|
|
952
962
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
@@ -988,7 +998,7 @@ function markSerializable(fn) {
|
|
|
988
998
|
fn.__qwik_serializable__ = true;
|
|
989
999
|
return fn;
|
|
990
1000
|
}
|
|
991
|
-
const componentInfo$
|
|
1001
|
+
const componentInfo$8 = {
|
|
992
1002
|
name: "Columns",
|
|
993
1003
|
builtIn: true,
|
|
994
1004
|
inputs: [
|
|
@@ -1229,7 +1239,7 @@ const componentInfo$7 = {
|
|
|
1229
1239
|
}
|
|
1230
1240
|
]
|
|
1231
1241
|
};
|
|
1232
|
-
const componentInfo$
|
|
1242
|
+
const componentInfo$7 = {
|
|
1233
1243
|
name: "Fragment",
|
|
1234
1244
|
static: true,
|
|
1235
1245
|
hidden: true,
|
|
@@ -1243,7 +1253,7 @@ const FragmentComponent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((pro
|
|
|
1243
1253
|
});
|
|
1244
1254
|
}, "FragmentComponent_component_FJmqlA66Rjg"));
|
|
1245
1255
|
const Fragment = FragmentComponent;
|
|
1246
|
-
const componentInfo$
|
|
1256
|
+
const componentInfo$6 = {
|
|
1247
1257
|
name: "Image",
|
|
1248
1258
|
static: true,
|
|
1249
1259
|
builtIn: true,
|
|
@@ -1392,7 +1402,7 @@ const componentInfo$5 = {
|
|
|
1392
1402
|
}
|
|
1393
1403
|
]
|
|
1394
1404
|
};
|
|
1395
|
-
const componentInfo$
|
|
1405
|
+
const componentInfo$5 = {
|
|
1396
1406
|
name: "Core:Section",
|
|
1397
1407
|
static: true,
|
|
1398
1408
|
builtIn: true,
|
|
@@ -1448,7 +1458,7 @@ const SectionComponent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((prop
|
|
|
1448
1458
|
});
|
|
1449
1459
|
}, "SectionComponent_component_m1CcjCwgHug"));
|
|
1450
1460
|
const Section = SectionComponent;
|
|
1451
|
-
const componentInfo$
|
|
1461
|
+
const componentInfo$4 = {
|
|
1452
1462
|
name: "Symbol",
|
|
1453
1463
|
noWrap: true,
|
|
1454
1464
|
static: true,
|
|
@@ -1488,7 +1498,7 @@ const componentInfo$3 = {
|
|
|
1488
1498
|
}
|
|
1489
1499
|
]
|
|
1490
1500
|
};
|
|
1491
|
-
const componentInfo$
|
|
1501
|
+
const componentInfo$3 = {
|
|
1492
1502
|
name: "Text",
|
|
1493
1503
|
static: true,
|
|
1494
1504
|
builtIn: true,
|
|
@@ -1509,7 +1519,7 @@ const componentInfo$2 = {
|
|
|
1509
1519
|
textAlign: "center"
|
|
1510
1520
|
}
|
|
1511
1521
|
};
|
|
1512
|
-
const componentInfo$
|
|
1522
|
+
const componentInfo$2 = {
|
|
1513
1523
|
name: "Video",
|
|
1514
1524
|
canHaveChildren: true,
|
|
1515
1525
|
builtIn: true,
|
|
@@ -1622,7 +1632,7 @@ const componentInfo$1 = {
|
|
|
1622
1632
|
}
|
|
1623
1633
|
]
|
|
1624
1634
|
};
|
|
1625
|
-
const
|
|
1635
|
+
const componentInfo$1 = {
|
|
1626
1636
|
name: "Embed",
|
|
1627
1637
|
static: true,
|
|
1628
1638
|
builtIn: true,
|
|
@@ -1711,80 +1721,117 @@ const Embed = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
|
1711
1721
|
});
|
|
1712
1722
|
}, "Embed_component_CP6B8Y76ylw"));
|
|
1713
1723
|
const embed = Embed;
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1724
|
+
const ImgComponent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
1725
|
+
return /* @__PURE__ */ jsxRuntime.jsx("img", {
|
|
1726
|
+
style: {
|
|
1727
|
+
objectFit: props.backgroundSize || "cover",
|
|
1728
|
+
objectPosition: props.backgroundPosition || "center"
|
|
1729
|
+
},
|
|
1730
|
+
alt: props.altText,
|
|
1731
|
+
src: props.imgSrc || props.image,
|
|
1732
|
+
...props.attributes
|
|
1733
|
+
}, isEditing() && props.imgSrc || "default-key");
|
|
1734
|
+
}, "ImgComponent_component_b8FkE9OcVN8"));
|
|
1735
|
+
const Img = ImgComponent;
|
|
1736
|
+
const componentInfo2 = {
|
|
1737
|
+
name: "Raw:Img",
|
|
1738
|
+
hideFromInsertMenu: true,
|
|
1739
|
+
builtIn: true,
|
|
1740
|
+
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",
|
|
1741
|
+
inputs: [
|
|
1742
|
+
{
|
|
1743
|
+
name: "image",
|
|
1744
|
+
bubble: true,
|
|
1745
|
+
type: "file",
|
|
1746
|
+
allowedFileTypes: [
|
|
1747
|
+
"jpeg",
|
|
1748
|
+
"jpg",
|
|
1749
|
+
"png",
|
|
1750
|
+
"svg"
|
|
1751
|
+
],
|
|
1752
|
+
required: true
|
|
1753
|
+
}
|
|
1754
|
+
],
|
|
1755
|
+
noWrap: true,
|
|
1756
|
+
static: true
|
|
1757
|
+
};
|
|
1758
|
+
var __defProp$4 = Object.defineProperty;
|
|
1759
|
+
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
1760
|
+
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
1761
|
+
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
1762
|
+
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, {
|
|
1719
1763
|
enumerable: true,
|
|
1720
1764
|
configurable: true,
|
|
1721
1765
|
writable: true,
|
|
1722
1766
|
value
|
|
1723
1767
|
}) : obj[key] = value;
|
|
1724
|
-
var __spreadValues$
|
|
1768
|
+
var __spreadValues$4 = (a, b) => {
|
|
1725
1769
|
for (var prop in b || (b = {}))
|
|
1726
|
-
if (__hasOwnProp$
|
|
1727
|
-
__defNormalProp$
|
|
1728
|
-
if (__getOwnPropSymbols$
|
|
1729
|
-
for (var prop of __getOwnPropSymbols$
|
|
1730
|
-
if (__propIsEnum$
|
|
1731
|
-
__defNormalProp$
|
|
1770
|
+
if (__hasOwnProp$4.call(b, prop))
|
|
1771
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
1772
|
+
if (__getOwnPropSymbols$4) {
|
|
1773
|
+
for (var prop of __getOwnPropSymbols$4(b))
|
|
1774
|
+
if (__propIsEnum$4.call(b, prop))
|
|
1775
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
1732
1776
|
}
|
|
1733
1777
|
return a;
|
|
1734
1778
|
};
|
|
1735
1779
|
const getDefaultRegisteredComponents = () => [
|
|
1736
|
-
__spreadValues$
|
|
1780
|
+
__spreadValues$4({
|
|
1737
1781
|
component: Columns$1
|
|
1738
|
-
}, componentInfo$
|
|
1739
|
-
__spreadValues$
|
|
1782
|
+
}, componentInfo$8),
|
|
1783
|
+
__spreadValues$4({
|
|
1740
1784
|
component: Image$1
|
|
1741
|
-
}, componentInfo$
|
|
1742
|
-
__spreadValues$
|
|
1785
|
+
}, componentInfo$6),
|
|
1786
|
+
__spreadValues$4({
|
|
1787
|
+
component: Img
|
|
1788
|
+
}, componentInfo2),
|
|
1789
|
+
__spreadValues$4({
|
|
1743
1790
|
component: Text$1
|
|
1744
|
-
}, componentInfo$
|
|
1745
|
-
__spreadValues$
|
|
1791
|
+
}, componentInfo$3),
|
|
1792
|
+
__spreadValues$4({
|
|
1746
1793
|
component: Video$1
|
|
1747
|
-
}, componentInfo$
|
|
1748
|
-
__spreadValues$
|
|
1794
|
+
}, componentInfo$2),
|
|
1795
|
+
__spreadValues$4({
|
|
1749
1796
|
component: Symbol$2
|
|
1750
|
-
}, componentInfo$
|
|
1751
|
-
__spreadValues$
|
|
1797
|
+
}, componentInfo$4),
|
|
1798
|
+
__spreadValues$4({
|
|
1752
1799
|
component: Button$1
|
|
1753
|
-
}, componentInfo$
|
|
1754
|
-
__spreadValues$
|
|
1800
|
+
}, componentInfo$9),
|
|
1801
|
+
__spreadValues$4({
|
|
1755
1802
|
component: Section
|
|
1756
|
-
}, componentInfo$
|
|
1757
|
-
__spreadValues$
|
|
1803
|
+
}, componentInfo$5),
|
|
1804
|
+
__spreadValues$4({
|
|
1758
1805
|
component: Fragment
|
|
1759
|
-
}, componentInfo$
|
|
1760
|
-
__spreadValues$
|
|
1806
|
+
}, componentInfo$7),
|
|
1807
|
+
__spreadValues$4({
|
|
1761
1808
|
component: embed
|
|
1762
|
-
},
|
|
1809
|
+
}, componentInfo$1)
|
|
1763
1810
|
];
|
|
1764
|
-
var __defProp$
|
|
1765
|
-
var __defProps$
|
|
1766
|
-
var __getOwnPropDescs$
|
|
1767
|
-
var __getOwnPropSymbols$
|
|
1768
|
-
var __hasOwnProp$
|
|
1769
|
-
var __propIsEnum$
|
|
1770
|
-
var __defNormalProp$
|
|
1811
|
+
var __defProp$3 = Object.defineProperty;
|
|
1812
|
+
var __defProps$3 = Object.defineProperties;
|
|
1813
|
+
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
1814
|
+
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
1815
|
+
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
|
|
1816
|
+
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
|
|
1817
|
+
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, {
|
|
1771
1818
|
enumerable: true,
|
|
1772
1819
|
configurable: true,
|
|
1773
1820
|
writable: true,
|
|
1774
1821
|
value
|
|
1775
1822
|
}) : obj[key] = value;
|
|
1776
|
-
var __spreadValues$
|
|
1823
|
+
var __spreadValues$3 = (a, b) => {
|
|
1777
1824
|
for (var prop in b || (b = {}))
|
|
1778
|
-
if (__hasOwnProp$
|
|
1779
|
-
__defNormalProp$
|
|
1780
|
-
if (__getOwnPropSymbols$
|
|
1781
|
-
for (var prop of __getOwnPropSymbols$
|
|
1782
|
-
if (__propIsEnum$
|
|
1783
|
-
__defNormalProp$
|
|
1825
|
+
if (__hasOwnProp$3.call(b, prop))
|
|
1826
|
+
__defNormalProp$3(a, prop, b[prop]);
|
|
1827
|
+
if (__getOwnPropSymbols$3) {
|
|
1828
|
+
for (var prop of __getOwnPropSymbols$3(b))
|
|
1829
|
+
if (__propIsEnum$3.call(b, prop))
|
|
1830
|
+
__defNormalProp$3(a, prop, b[prop]);
|
|
1784
1831
|
}
|
|
1785
1832
|
return a;
|
|
1786
1833
|
};
|
|
1787
|
-
var __spreadProps$
|
|
1834
|
+
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
1788
1835
|
function flatten(object, path = null, separator = ".") {
|
|
1789
1836
|
return Object.keys(object).reduce((acc, key) => {
|
|
1790
1837
|
const value = object[key];
|
|
@@ -1797,7 +1844,7 @@ function flatten(object, path = null, separator = ".") {
|
|
|
1797
1844
|
value !== null,
|
|
1798
1845
|
!(Array.isArray(value) && value.length === 0)
|
|
1799
1846
|
].every(Boolean);
|
|
1800
|
-
return isObject ? __spreadValues$
|
|
1847
|
+
return isObject ? __spreadValues$3(__spreadValues$3({}, acc), flatten(value, newPath, separator)) : __spreadProps$3(__spreadValues$3({}, acc), {
|
|
1801
1848
|
[newPath]: value
|
|
1802
1849
|
});
|
|
1803
1850
|
}, {});
|
|
@@ -1902,30 +1949,30 @@ const handleABTesting = (item, testGroups) => {
|
|
|
1902
1949
|
}
|
|
1903
1950
|
}
|
|
1904
1951
|
};
|
|
1905
|
-
var __defProp$
|
|
1906
|
-
var __defProps$
|
|
1907
|
-
var __getOwnPropDescs$
|
|
1908
|
-
var __getOwnPropSymbols$
|
|
1909
|
-
var __hasOwnProp$
|
|
1910
|
-
var __propIsEnum$
|
|
1911
|
-
var __defNormalProp$
|
|
1952
|
+
var __defProp$2 = Object.defineProperty;
|
|
1953
|
+
var __defProps$2 = Object.defineProperties;
|
|
1954
|
+
var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
|
|
1955
|
+
var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
|
|
1956
|
+
var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
|
|
1957
|
+
var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
|
|
1958
|
+
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, {
|
|
1912
1959
|
enumerable: true,
|
|
1913
1960
|
configurable: true,
|
|
1914
1961
|
writable: true,
|
|
1915
1962
|
value
|
|
1916
1963
|
}) : obj[key] = value;
|
|
1917
|
-
var __spreadValues$
|
|
1964
|
+
var __spreadValues$2 = (a, b) => {
|
|
1918
1965
|
for (var prop in b || (b = {}))
|
|
1919
|
-
if (__hasOwnProp$
|
|
1920
|
-
__defNormalProp$
|
|
1921
|
-
if (__getOwnPropSymbols$
|
|
1922
|
-
for (var prop of __getOwnPropSymbols$
|
|
1923
|
-
if (__propIsEnum$
|
|
1924
|
-
__defNormalProp$
|
|
1966
|
+
if (__hasOwnProp$2.call(b, prop))
|
|
1967
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
1968
|
+
if (__getOwnPropSymbols$2) {
|
|
1969
|
+
for (var prop of __getOwnPropSymbols$2(b))
|
|
1970
|
+
if (__propIsEnum$2.call(b, prop))
|
|
1971
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
1925
1972
|
}
|
|
1926
1973
|
return a;
|
|
1927
1974
|
};
|
|
1928
|
-
var __spreadProps$
|
|
1975
|
+
var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
|
|
1929
1976
|
var __async = (__this, __arguments, generator) => {
|
|
1930
1977
|
return new Promise((resolve, reject) => {
|
|
1931
1978
|
var fulfilled = (value) => {
|
|
@@ -1949,7 +1996,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
1949
1996
|
const fetch$ = getFetch();
|
|
1950
1997
|
function getContent(options) {
|
|
1951
1998
|
return __async(this, null, function* () {
|
|
1952
|
-
return (yield getAllContent(__spreadProps$
|
|
1999
|
+
return (yield getAllContent(__spreadProps$2(__spreadValues$2({}, options), {
|
|
1953
2000
|
limit: 1
|
|
1954
2001
|
}))).results[0] || null;
|
|
1955
2002
|
});
|
|
@@ -1957,7 +2004,7 @@ function getContent(options) {
|
|
|
1957
2004
|
const generateContentUrl = (options) => {
|
|
1958
2005
|
const { limit = 1, userAttributes, query, noTraverse = false, model, apiKey } = options;
|
|
1959
2006
|
const url = new URL(`https://cdn.builder.io/api/v2/content/${model}?apiKey=${apiKey}&limit=${limit}&noTraverse=${noTraverse}`);
|
|
1960
|
-
const queryOptions = __spreadValues$
|
|
2007
|
+
const queryOptions = __spreadValues$2(__spreadValues$2({}, getBuilderSearchParamsFromWindow()), normalizeSearchParams(options.options || {}));
|
|
1961
2008
|
const flattened = flatten(queryOptions);
|
|
1962
2009
|
for (const key in flattened)
|
|
1963
2010
|
url.searchParams.set(key, String(flattened[key]));
|
|
@@ -1990,52 +2037,52 @@ function isPreviewing() {
|
|
|
1990
2037
|
return false;
|
|
1991
2038
|
return Boolean(location.search.indexOf("builder.preview=") !== -1);
|
|
1992
2039
|
}
|
|
1993
|
-
var __defProp = Object.defineProperty;
|
|
1994
|
-
var __defProps = Object.defineProperties;
|
|
1995
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
1996
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
1997
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
1998
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
1999
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
|
|
2040
|
+
var __defProp$1 = Object.defineProperty;
|
|
2041
|
+
var __defProps$1 = Object.defineProperties;
|
|
2042
|
+
var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
|
|
2043
|
+
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
|
|
2044
|
+
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
|
2045
|
+
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
|
|
2046
|
+
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, {
|
|
2000
2047
|
enumerable: true,
|
|
2001
2048
|
configurable: true,
|
|
2002
2049
|
writable: true,
|
|
2003
2050
|
value
|
|
2004
2051
|
}) : obj[key] = value;
|
|
2005
|
-
var __spreadValues = (a, b) => {
|
|
2052
|
+
var __spreadValues$1 = (a, b) => {
|
|
2006
2053
|
for (var prop in b || (b = {}))
|
|
2007
|
-
if (__hasOwnProp.call(b, prop))
|
|
2008
|
-
__defNormalProp(a, prop, b[prop]);
|
|
2009
|
-
if (__getOwnPropSymbols) {
|
|
2010
|
-
for (var prop of __getOwnPropSymbols(b))
|
|
2011
|
-
if (__propIsEnum.call(b, prop))
|
|
2012
|
-
__defNormalProp(a, prop, b[prop]);
|
|
2054
|
+
if (__hasOwnProp$1.call(b, prop))
|
|
2055
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
2056
|
+
if (__getOwnPropSymbols$1) {
|
|
2057
|
+
for (var prop of __getOwnPropSymbols$1(b))
|
|
2058
|
+
if (__propIsEnum$1.call(b, prop))
|
|
2059
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
2013
2060
|
}
|
|
2014
2061
|
return a;
|
|
2015
2062
|
};
|
|
2016
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
2017
|
-
var __objRest = (source, exclude) => {
|
|
2063
|
+
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
|
|
2064
|
+
var __objRest$1 = (source, exclude) => {
|
|
2018
2065
|
var target = {};
|
|
2019
2066
|
for (var prop in source)
|
|
2020
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2067
|
+
if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2021
2068
|
target[prop] = source[prop];
|
|
2022
|
-
if (source != null && __getOwnPropSymbols) {
|
|
2023
|
-
for (var prop of __getOwnPropSymbols(source))
|
|
2024
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
2069
|
+
if (source != null && __getOwnPropSymbols$1) {
|
|
2070
|
+
for (var prop of __getOwnPropSymbols$1(source))
|
|
2071
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))
|
|
2025
2072
|
target[prop] = source[prop];
|
|
2026
2073
|
}
|
|
2027
2074
|
return target;
|
|
2028
2075
|
};
|
|
2029
2076
|
const components = [];
|
|
2030
2077
|
function registerComponent(component3, info) {
|
|
2031
|
-
components.push(__spreadValues({
|
|
2078
|
+
components.push(__spreadValues$1({
|
|
2032
2079
|
component: component3
|
|
2033
2080
|
}, info));
|
|
2034
2081
|
console.warn("registerComponent is deprecated. Use the `customComponents` prop in RenderContent instead to provide your custom components to the builder SDK.");
|
|
2035
2082
|
return component3;
|
|
2036
2083
|
}
|
|
2037
2084
|
const createRegisterComponentMessage = (_a) => {
|
|
2038
|
-
var info = __objRest(_a, [
|
|
2085
|
+
var info = __objRest$1(_a, [
|
|
2039
2086
|
"component"
|
|
2040
2087
|
]);
|
|
2041
2088
|
return {
|
|
@@ -2051,16 +2098,239 @@ const serializeFn = (fnValue) => {
|
|
|
2051
2098
|
return `return (${appendFunction ? "function " : ""}${fnStr}).apply(this, arguments)`;
|
|
2052
2099
|
};
|
|
2053
2100
|
const prepareComponentInfoToSend = (_c) => {
|
|
2054
|
-
var { inputs } = _c, info = __objRest(_c, [
|
|
2101
|
+
var { inputs } = _c, info = __objRest$1(_c, [
|
|
2055
2102
|
"inputs"
|
|
2056
2103
|
]);
|
|
2057
|
-
return __spreadProps(__spreadValues({}, fastClone(info)), {
|
|
2058
|
-
inputs: inputs == null ? void 0 : inputs.map((input) => Object.entries(input).reduce((acc, [key, value]) => __spreadProps(__spreadValues({}, acc), {
|
|
2104
|
+
return __spreadProps$1(__spreadValues$1({}, fastClone(info)), {
|
|
2105
|
+
inputs: inputs == null ? void 0 : inputs.map((input) => Object.entries(input).reduce((acc, [key, value]) => __spreadProps$1(__spreadValues$1({}, acc), {
|
|
2059
2106
|
[key]: serializeValue(value)
|
|
2060
2107
|
}), {}))
|
|
2061
2108
|
});
|
|
2062
2109
|
};
|
|
2063
|
-
|
|
2110
|
+
const getTopLevelDomain = (host) => {
|
|
2111
|
+
const parts = host.split(".");
|
|
2112
|
+
if (parts.length > 2)
|
|
2113
|
+
return parts.slice(1).join(".");
|
|
2114
|
+
return host;
|
|
2115
|
+
};
|
|
2116
|
+
const getCookie = ({ name, canTrack }) => {
|
|
2117
|
+
var _a;
|
|
2118
|
+
try {
|
|
2119
|
+
if (!canTrack)
|
|
2120
|
+
return void 0;
|
|
2121
|
+
return (_a = document.cookie.split("; ").find((row) => row.startsWith(`${name}=`))) == null ? void 0 : _a.split("=")[1];
|
|
2122
|
+
} catch (err) {
|
|
2123
|
+
console.debug("[COOKIE] GET error: ", err);
|
|
2124
|
+
}
|
|
2125
|
+
};
|
|
2126
|
+
const stringifyCookie = (cookie) => cookie.map(([key, value]) => value ? `${key}=${value}` : key).join("; ");
|
|
2127
|
+
const SECURE_CONFIG = [
|
|
2128
|
+
[
|
|
2129
|
+
"secure",
|
|
2130
|
+
""
|
|
2131
|
+
],
|
|
2132
|
+
[
|
|
2133
|
+
"SameSite",
|
|
2134
|
+
"None"
|
|
2135
|
+
]
|
|
2136
|
+
];
|
|
2137
|
+
const createCookieString = ({ name, value, expires }) => {
|
|
2138
|
+
const secure = isBrowser() ? location.protocol === "https:" : true;
|
|
2139
|
+
const secureObj = secure ? SECURE_CONFIG : [
|
|
2140
|
+
[]
|
|
2141
|
+
];
|
|
2142
|
+
const expiresObj = expires ? [
|
|
2143
|
+
[
|
|
2144
|
+
"expires",
|
|
2145
|
+
expires.toUTCString()
|
|
2146
|
+
]
|
|
2147
|
+
] : [
|
|
2148
|
+
[]
|
|
2149
|
+
];
|
|
2150
|
+
const cookieValue = [
|
|
2151
|
+
[
|
|
2152
|
+
name,
|
|
2153
|
+
value
|
|
2154
|
+
],
|
|
2155
|
+
...expiresObj,
|
|
2156
|
+
[
|
|
2157
|
+
"path",
|
|
2158
|
+
"/"
|
|
2159
|
+
],
|
|
2160
|
+
[
|
|
2161
|
+
"domain",
|
|
2162
|
+
getTopLevelDomain(window.location.hostname)
|
|
2163
|
+
],
|
|
2164
|
+
...secureObj
|
|
2165
|
+
];
|
|
2166
|
+
const cookie = stringifyCookie(cookieValue);
|
|
2167
|
+
return cookie;
|
|
2168
|
+
};
|
|
2169
|
+
const setCookie = ({ name, value, expires, canTrack }) => {
|
|
2170
|
+
try {
|
|
2171
|
+
if (!canTrack)
|
|
2172
|
+
return void 0;
|
|
2173
|
+
const cookie = createCookieString({
|
|
2174
|
+
name,
|
|
2175
|
+
value,
|
|
2176
|
+
expires
|
|
2177
|
+
});
|
|
2178
|
+
document.cookie = cookie;
|
|
2179
|
+
} catch (err) {
|
|
2180
|
+
console.warn("[COOKIE] SET error: ", err);
|
|
2181
|
+
}
|
|
2182
|
+
};
|
|
2183
|
+
const checkIsDefined = (maybeT) => maybeT !== null && maybeT !== void 0;
|
|
2184
|
+
function uuidv4() {
|
|
2185
|
+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
|
|
2186
|
+
const r = Math.random() * 16 | 0, v = c == "x" ? r : r & 3 | 8;
|
|
2187
|
+
return v.toString(16);
|
|
2188
|
+
});
|
|
2189
|
+
}
|
|
2190
|
+
function uuid() {
|
|
2191
|
+
return uuidv4().replace(/-/g, "");
|
|
2192
|
+
}
|
|
2193
|
+
const SESSION_LOCAL_STORAGE_KEY = "builderSessionId";
|
|
2194
|
+
const getSessionId = ({ canTrack }) => {
|
|
2195
|
+
if (!canTrack)
|
|
2196
|
+
return void 0;
|
|
2197
|
+
const sessionId = getCookie({
|
|
2198
|
+
name: SESSION_LOCAL_STORAGE_KEY,
|
|
2199
|
+
canTrack
|
|
2200
|
+
});
|
|
2201
|
+
if (checkIsDefined(sessionId))
|
|
2202
|
+
return sessionId;
|
|
2203
|
+
else {
|
|
2204
|
+
const newSessionId = createSessionId();
|
|
2205
|
+
setSessionId({
|
|
2206
|
+
id: newSessionId,
|
|
2207
|
+
canTrack
|
|
2208
|
+
});
|
|
2209
|
+
}
|
|
2210
|
+
};
|
|
2211
|
+
const createSessionId = () => uuid();
|
|
2212
|
+
const setSessionId = ({ id, canTrack }) => setCookie({
|
|
2213
|
+
name: SESSION_LOCAL_STORAGE_KEY,
|
|
2214
|
+
value: id,
|
|
2215
|
+
canTrack
|
|
2216
|
+
});
|
|
2217
|
+
const getLocalStorage = () => isBrowser() && typeof localStorage !== "undefined" ? localStorage : void 0;
|
|
2218
|
+
const getLocalStorageItem = ({ key, canTrack }) => {
|
|
2219
|
+
var _a;
|
|
2220
|
+
try {
|
|
2221
|
+
if (canTrack)
|
|
2222
|
+
return (_a = getLocalStorage()) == null ? void 0 : _a.getItem(key);
|
|
2223
|
+
return void 0;
|
|
2224
|
+
} catch (err) {
|
|
2225
|
+
console.debug("[LocalStorage] GET error: ", err);
|
|
2226
|
+
}
|
|
2227
|
+
};
|
|
2228
|
+
const setLocalStorageItem = ({ key, canTrack, value }) => {
|
|
2229
|
+
var _a;
|
|
2230
|
+
try {
|
|
2231
|
+
if (canTrack)
|
|
2232
|
+
(_a = getLocalStorage()) == null || _a.setItem(key, value);
|
|
2233
|
+
} catch (err) {
|
|
2234
|
+
console.debug("[LocalStorage] SET error: ", err);
|
|
2235
|
+
}
|
|
2236
|
+
};
|
|
2237
|
+
const VISITOR_LOCAL_STORAGE_KEY = "builderVisitorId";
|
|
2238
|
+
const getVisitorId = ({ canTrack }) => {
|
|
2239
|
+
if (!canTrack)
|
|
2240
|
+
return void 0;
|
|
2241
|
+
const visitorId = getLocalStorageItem({
|
|
2242
|
+
key: VISITOR_LOCAL_STORAGE_KEY,
|
|
2243
|
+
canTrack
|
|
2244
|
+
});
|
|
2245
|
+
if (checkIsDefined(visitorId))
|
|
2246
|
+
return visitorId;
|
|
2247
|
+
else {
|
|
2248
|
+
const newVisitorId = createVisitorId();
|
|
2249
|
+
setVisitorId({
|
|
2250
|
+
id: newVisitorId,
|
|
2251
|
+
canTrack
|
|
2252
|
+
});
|
|
2253
|
+
}
|
|
2254
|
+
};
|
|
2255
|
+
const createVisitorId = () => uuid();
|
|
2256
|
+
const setVisitorId = ({ id, canTrack }) => setLocalStorageItem({
|
|
2257
|
+
key: VISITOR_LOCAL_STORAGE_KEY,
|
|
2258
|
+
value: id,
|
|
2259
|
+
canTrack
|
|
2260
|
+
});
|
|
2261
|
+
var __defProp = Object.defineProperty;
|
|
2262
|
+
var __defProps = Object.defineProperties;
|
|
2263
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
2264
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
2265
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
2266
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
2267
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
|
|
2268
|
+
enumerable: true,
|
|
2269
|
+
configurable: true,
|
|
2270
|
+
writable: true,
|
|
2271
|
+
value
|
|
2272
|
+
}) : obj[key] = value;
|
|
2273
|
+
var __spreadValues = (a, b) => {
|
|
2274
|
+
for (var prop in b || (b = {}))
|
|
2275
|
+
if (__hasOwnProp.call(b, prop))
|
|
2276
|
+
__defNormalProp(a, prop, b[prop]);
|
|
2277
|
+
if (__getOwnPropSymbols) {
|
|
2278
|
+
for (var prop of __getOwnPropSymbols(b))
|
|
2279
|
+
if (__propIsEnum.call(b, prop))
|
|
2280
|
+
__defNormalProp(a, prop, b[prop]);
|
|
2281
|
+
}
|
|
2282
|
+
return a;
|
|
2283
|
+
};
|
|
2284
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
2285
|
+
var __objRest = (source, exclude) => {
|
|
2286
|
+
var target = {};
|
|
2287
|
+
for (var prop in source)
|
|
2288
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2289
|
+
target[prop] = source[prop];
|
|
2290
|
+
if (source != null && __getOwnPropSymbols) {
|
|
2291
|
+
for (var prop of __getOwnPropSymbols(source))
|
|
2292
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
2293
|
+
target[prop] = source[prop];
|
|
2294
|
+
}
|
|
2295
|
+
return target;
|
|
2296
|
+
};
|
|
2297
|
+
const getTrackingEventData = ({ canTrack }) => {
|
|
2298
|
+
if (!canTrack)
|
|
2299
|
+
return {
|
|
2300
|
+
visitorId: void 0,
|
|
2301
|
+
sessionId: void 0
|
|
2302
|
+
};
|
|
2303
|
+
const sessionId = getSessionId({
|
|
2304
|
+
canTrack
|
|
2305
|
+
});
|
|
2306
|
+
const visitorId = getVisitorId({
|
|
2307
|
+
canTrack
|
|
2308
|
+
});
|
|
2309
|
+
return {
|
|
2310
|
+
sessionId,
|
|
2311
|
+
visitorId
|
|
2312
|
+
};
|
|
2313
|
+
};
|
|
2314
|
+
const createEvent = (_a) => {
|
|
2315
|
+
var { type: eventType, canTrack, orgId, contentId } = _a, properties = __objRest(_a, [
|
|
2316
|
+
"type",
|
|
2317
|
+
"canTrack",
|
|
2318
|
+
"orgId",
|
|
2319
|
+
"contentId"
|
|
2320
|
+
]);
|
|
2321
|
+
return {
|
|
2322
|
+
type: eventType,
|
|
2323
|
+
data: __spreadProps(__spreadValues(__spreadValues({}, properties), getTrackingEventData({
|
|
2324
|
+
canTrack
|
|
2325
|
+
})), {
|
|
2326
|
+
ownerId: orgId,
|
|
2327
|
+
contentId
|
|
2328
|
+
})
|
|
2329
|
+
};
|
|
2330
|
+
};
|
|
2331
|
+
function track(eventProps) {
|
|
2332
|
+
if (!eventProps.canTrack)
|
|
2333
|
+
return;
|
|
2064
2334
|
if (isEditing())
|
|
2065
2335
|
return;
|
|
2066
2336
|
if (!(isBrowser() || TARGET === "reactNative"))
|
|
@@ -2069,10 +2339,7 @@ function track(event, properties) {
|
|
|
2069
2339
|
method: "POST",
|
|
2070
2340
|
body: JSON.stringify({
|
|
2071
2341
|
events: [
|
|
2072
|
-
|
|
2073
|
-
type: event,
|
|
2074
|
-
data: properties
|
|
2075
|
-
}
|
|
2342
|
+
createEvent(eventProps)
|
|
2076
2343
|
]
|
|
2077
2344
|
}),
|
|
2078
2345
|
headers: {
|
|
@@ -2142,6 +2409,9 @@ const useContent = function useContent2(props, state, elementRef) {
|
|
|
2142
2409
|
};
|
|
2143
2410
|
return mergedContent;
|
|
2144
2411
|
};
|
|
2412
|
+
const canTrackToUse = function canTrackToUse2(props, state, elementRef) {
|
|
2413
|
+
return props.canTrack || true;
|
|
2414
|
+
};
|
|
2145
2415
|
const contentState = function contentState2(props, state, elementRef) {
|
|
2146
2416
|
return {
|
|
2147
2417
|
...props.content?.data?.state,
|
|
@@ -2191,9 +2461,12 @@ const httpReqsData = function httpReqsData2(props, state, elementRef) {
|
|
|
2191
2461
|
return {};
|
|
2192
2462
|
};
|
|
2193
2463
|
const onClick2 = function onClick3(props, state, elementRef, _event) {
|
|
2194
|
-
if (useContent(props, state)
|
|
2195
|
-
track(
|
|
2196
|
-
|
|
2464
|
+
if (useContent(props, state))
|
|
2465
|
+
track({
|
|
2466
|
+
type: "click",
|
|
2467
|
+
canTrack: canTrackToUse(props),
|
|
2468
|
+
contentId: useContent(props, state).id,
|
|
2469
|
+
orgId: props.apiKey
|
|
2197
2470
|
});
|
|
2198
2471
|
};
|
|
2199
2472
|
const evalExpression = function evalExpression2(props, state, elementRef, expression) {
|
|
@@ -2271,7 +2544,7 @@ const RenderContent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props)
|
|
|
2271
2544
|
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
|
2272
2545
|
if (isBrowser()) {
|
|
2273
2546
|
if (isEditing()) {
|
|
2274
|
-
state2.forceReRenderCount
|
|
2547
|
+
state2.forceReRenderCount = state2.forceReRenderCount + 1;
|
|
2275
2548
|
qwik._useMutableProps(elementRef2.current, true);
|
|
2276
2549
|
registerInsertMenu();
|
|
2277
2550
|
setupBrowserForEditing();
|
|
@@ -2282,9 +2555,12 @@ const RenderContent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props)
|
|
|
2282
2555
|
window.addEventListener("message", processMessage.bind(null, props2, state2, elementRef2));
|
|
2283
2556
|
window.addEventListener("builder:component:stateChangeListenerActivated", emitStateUpdate.bind(null, props2, state2, elementRef2));
|
|
2284
2557
|
}
|
|
2285
|
-
if (useContent(props2, state2)
|
|
2286
|
-
track(
|
|
2287
|
-
|
|
2558
|
+
if (useContent(props2, state2))
|
|
2559
|
+
track({
|
|
2560
|
+
type: "impression",
|
|
2561
|
+
canTrack: canTrackToUse(props2),
|
|
2562
|
+
contentId: useContent(props2, state2).id,
|
|
2563
|
+
orgId: props2.apiKey
|
|
2288
2564
|
});
|
|
2289
2565
|
if (isPreviewing()) {
|
|
2290
2566
|
const searchParams = new URL(location.href).searchParams;
|
|
@@ -2387,9 +2663,7 @@ const Symbol$1 = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
|
2387
2663
|
]));
|
|
2388
2664
|
qwik.useWatchQrl(qwik.inlinedQrl(({ track: track2 }) => {
|
|
2389
2665
|
const [builderContext2, props2, state2] = qwik.useLexicalScope();
|
|
2390
|
-
props2
|
|
2391
|
-
props2.symbol && track2(props2.symbol, "model");
|
|
2392
|
-
props2.symbol && track2(props2.symbol, "entry");
|
|
2666
|
+
props2 && track2(props2, "symbol");
|
|
2393
2667
|
state2 && track2(state2, "content");
|
|
2394
2668
|
const symbolToUse = props2.symbol;
|
|
2395
2669
|
if (symbolToUse && !symbolToUse.content && !state2.content && symbolToUse.model)
|