@depict-ai/utilishared 2.0.10 → 2.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/ES10/index.cjs +66 -53
- package/ES10/index.d.ts +6 -1
- package/ES10/index.js +66 -54
- package/latest/index.cjs +66 -53
- package/latest/index.d.ts +6 -1
- package/latest/index.js +66 -54
- package/package.json +3 -3
- package/server/ES10/index.cjs +31 -18
- package/server/ES10/index.d.ts +6 -1
- package/server/ES10/index.js +31 -19
- package/server/latest/index.cjs +31 -18
- package/server/latest/index.d.ts +6 -1
- package/server/latest/index.js +31 -19
package/ES10/index.cjs
CHANGED
|
@@ -29,6 +29,7 @@ function $parcel$export(e, n, v, s) {
|
|
|
29
29
|
function $parcel$interopDefault(a) {
|
|
30
30
|
return a && a.__esModule ? a.default : a;
|
|
31
31
|
}
|
|
32
|
+
$parcel$export(module.exports, "findMostFrequentItem", () => $9fc783499535a983$export$2d9dc2897d88588);
|
|
32
33
|
$parcel$export(module.exports, "base64_decode_unicode", () => $6a427682b105a299$export$a7e53ec3b3fdd030);
|
|
33
34
|
$parcel$export(module.exports, "base64_encode_unicode", () => $6a427682b105a299$export$a1893782a2a6be0d);
|
|
34
35
|
$parcel$export(module.exports, "make_plp_recommendations_inserted_handler", () => $504f4aeb15759a69$export$6f051469dd676a8b);
|
|
@@ -274,7 +275,7 @@ $parcel$export(module.exports, "version", () => $ce0ab19b284b64fa$export$83d89fb
|
|
|
274
275
|
$parcel$export(module.exports, "add_to_version_info", () => $045fb30107c9eecc$export$2cefb7e61fcbae00);
|
|
275
276
|
$parcel$export(module.exports, "sync_el_content_with_accessor", () => $84d13ab567309a50$export$c3f56a35e076f139);
|
|
276
277
|
$parcel$export(module.exports, "use_href_accessor", () => $59b7011b96010a8e$export$e35115e6d0715f77);
|
|
277
|
-
const $ce0ab19b284b64fa$export$83d89fbfd8236492 = "2.0.
|
|
278
|
+
const $ce0ab19b284b64fa$export$83d89fbfd8236492 = "2.0.14";
|
|
278
279
|
const $9e9538f4aff6f83c$export$55fe61489d2c7417 = /*@__PURE__*/((_globalThis$document, _globalThis$document$, _globalThis$document$2, _globalThis$localStor, _globalThis$localStor2) => process.env.STRIP_DEBUG === "true" ? false : process.env.DEBUG === "true" || process.env.NODE_ENV === "development" || process.env.BUILD_TARGET !== "node" && ((globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : (_globalThis$document$ = _globalThis$document.currentScript) === null || _globalThis$document$ === void 0 ? void 0 : (_globalThis$document$2 = _globalThis$document$.dataset) === null || _globalThis$document$2 === void 0 ? void 0 : _globalThis$document$2.debug) === "true" || (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$localStor = globalThis.localStorage) === null || _globalThis$localStor === void 0 ? void 0 : (_globalThis$localStor2 = _globalThis$localStor.getItem) === null || _globalThis$localStor2 === void 0 ? void 0 : _globalThis$localStor2.call(_globalThis$localStor, "debug")) === "true"))();
|
|
279
280
|
const $7f95f77417d06249$var$browser_prefix_styling = "color: #fff;";
|
|
280
281
|
let $7f95f77417d06249$var$browser_prefix = "[Depict]";
|
|
@@ -314,6 +315,18 @@ function $045fb30107c9eecc$export$fe609f0216e4ebef(url) {
|
|
|
314
315
|
return got_url_object ? url_object.href : url_object;
|
|
315
316
|
}
|
|
316
317
|
|
|
318
|
+
/**
|
|
319
|
+
* Finds most frequent item in an array, written by chatGPT with some nudging. Returns `undefined` if the array is empty.
|
|
320
|
+
* @param arr array to find the most frequent item in
|
|
321
|
+
*/
|
|
322
|
+
function $9fc783499535a983$export$2d9dc2897d88588(arr) {
|
|
323
|
+
const freqMap = arr.reduce((map, item) => map.set(item, (map.get(item) || 0) + 1), new Map());
|
|
324
|
+
const maxFreq = Math.max(...freqMap.values());
|
|
325
|
+
for (let [key, value] of freqMap) {
|
|
326
|
+
if (value === maxFreq) return key;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
|
|
317
330
|
// Source: https://stackoverflow.com/a/30106551
|
|
318
331
|
/**
|
|
319
332
|
* Encoding UTF8 ⇢ base64
|
|
@@ -4403,7 +4416,7 @@ function $bc463df3122a418b$export$e4741190ccada479(element, selector) {
|
|
|
4403
4416
|
}
|
|
4404
4417
|
return result;
|
|
4405
4418
|
}
|
|
4406
|
-
|
|
4419
|
+
var $08a94efe56c2b35f$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div class="depict-slider depict">`),
|
|
4407
4420
|
$08a94efe56c2b35f$var$_tmpl$2 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div class=sliding>`),
|
|
4408
4421
|
$08a94efe56c2b35f$var$_tmpl$3 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<button aria-label="Scroll left"class="left d-navbutton"type=button>`),
|
|
4409
4422
|
$08a94efe56c2b35f$var$_tmpl$4 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<button aria-label="Scroll right"class="right d-navbutton"type=button>`);
|
|
@@ -5468,7 +5481,7 @@ async function $bbf8331c74194de9$export$cd12721587f4f16d(t, rendering_options, o
|
|
|
5468
5481
|
elements: container ? container : [slider.container]
|
|
5469
5482
|
};
|
|
5470
5483
|
}
|
|
5471
|
-
|
|
5484
|
+
var $14c1124272475590$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<button class=load_more>`);
|
|
5472
5485
|
async function $14c1124272475590$export$30933c637c977eef(_ref) {
|
|
5473
5486
|
var _template_tool$data;
|
|
5474
5487
|
let {
|
|
@@ -5613,7 +5626,7 @@ function $14c1124272475590$var$setup_load_more(t, root, chunk_size) {
|
|
|
5613
5626
|
} = t,
|
|
5614
5627
|
load_more_cont = $8b27923e1d1e6b99$export$d3e2a0560cbf4787('<div class="load-more-container"></div>'),
|
|
5615
5628
|
load_button = load_more_cont.appendChild((() => {
|
|
5616
|
-
|
|
5629
|
+
var _el$ = $bBfCy$solidjsweb.getNextElement($14c1124272475590$var$_tmpl$);
|
|
5617
5630
|
$bBfCy$solidjsweb.insert(_el$, view_more_text);
|
|
5618
5631
|
return _el$;
|
|
5619
5632
|
})());
|
|
@@ -5767,7 +5780,7 @@ const $f0d9ae7bf9bd697d$export$ffb0004e005737fa = (_ref2, _unknown) => {
|
|
|
5767
5780
|
$f0d9ae7bf9bd697d$var$appendChild(df, children);
|
|
5768
5781
|
return df;
|
|
5769
5782
|
};
|
|
5770
|
-
|
|
5783
|
+
var $5638de1dd37b2d4d$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 320 512"><desc>Right arrow</desc><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z">`),
|
|
5771
5784
|
$5638de1dd37b2d4d$var$_tmpl$2 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 320 512"><desc>Left arrow</desc><path d="M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z">`);
|
|
5772
5785
|
const $5638de1dd37b2d4d$export$dc84183312f0c201 = /*@__PURE__*/(() => $bBfCy$solidjsweb.getNextElement($5638de1dd37b2d4d$var$_tmpl$))();
|
|
5773
5786
|
const $5638de1dd37b2d4d$export$6038895ac52bd044 = /*@__PURE__*/(() => $bBfCy$solidjsweb.getNextElement($5638de1dd37b2d4d$var$_tmpl$2))();
|
|
@@ -5808,7 +5821,7 @@ function $12a8c4258d1dd80f$export$f8913c8a18f7ca21(iterables) {
|
|
|
5808
5821
|
return ourselves;
|
|
5809
5822
|
}
|
|
5810
5823
|
let $0c2e69f971c62390$var$_Symbol$iterator, $0c2e69f971c62390$var$_Symbol$toPrimitive;
|
|
5811
|
-
|
|
5824
|
+
var $0c2e69f971c62390$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<style type=text/css>`),
|
|
5812
5825
|
$0c2e69f971c62390$var$_tmpl$2 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div>`);
|
|
5813
5826
|
const $0c2e69f971c62390$export$717f13d9ba00ca19 = (min, max) => "@media ".concat(min ? "(min-width:".concat(min, ")") : "").concat(min && max ? " and " : "").concat(max ? "(max-width:".concat(max, ")") : "");
|
|
5814
5827
|
async function $0c2e69f971c62390$export$c84671f46d6a1ca(_ref) {
|
|
@@ -5871,7 +5884,7 @@ async function $0c2e69f971c62390$export$c84671f46d6a1ca(_ref) {
|
|
|
5871
5884
|
if (button) {
|
|
5872
5885
|
button_class = $a13f25507f352177$export$a6db784f019668ba();
|
|
5873
5886
|
const button_container = (() => {
|
|
5874
|
-
|
|
5887
|
+
var _el$2 = $bBfCy$solidjsweb.getNextElement($0c2e69f971c62390$var$_tmpl$2);
|
|
5875
5888
|
$bBfCy$solidjsweb.className(_el$2, "load-more-container " + button_class);
|
|
5876
5889
|
$bBfCy$solidjsweb.insert(_el$2, () => $51b78ec2cb40f07e$export$f63fcc839cb0f734("click", () => {
|
|
5877
5890
|
var _rows_or_empty_object;
|
|
@@ -6179,7 +6192,7 @@ function $554d31c9eaabf6ae$export$80039a49055269fb() {
|
|
|
6179
6192
|
};
|
|
6180
6193
|
return Object.fromEntries(["left", "right"].map(side => [side, [new_arrowimage()]]));
|
|
6181
6194
|
}
|
|
6182
|
-
|
|
6195
|
+
var $e193cbc89f3a1c6f$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<img src=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJkaXNwbGF5OiBpbmxpbmUtYmxvY2s7IHZlcnRpY2FsLWFsaWduOiBtaWRkbGU7IiB3aWR0aD0iMTZweCIgaGVpZ2h0PSIxNnB4IiB2aWV3Qm94PSIwIDAgOCAxNSI+PHBhdGggc3R5bGU9ImZpbGw6IHJnYigwLCAwLCAwKTsiIGQ9Ik0uNjI5LjAwMWMuMTUuMDA4LjI5My4wNzIuMzk4LjE4bDYuNzkyIDYuODlhLjYwMS42MDEgMCAwIDEgMCAuODZsLTYuNzkyIDYuODg4YS41ODYuNTg2IDAgMCAxLS44NDYgMCAuNjAxLjYwMSAwIDAgMSAwLS44Nkw2LjU1NCA3LjUuMjExIDEuMDAxYS42MDEuNjAxIDAgMCAxIDAtLjg2Yy4xMTUtLjEuMjY2LS4xNS40MTgtLjE0Ij48L3BhdGg+PC9zdmc+>`);
|
|
6183
6196
|
function $e193cbc89f3a1c6f$export$af88b4929c2dc86() {
|
|
6184
6197
|
const img = $bBfCy$solidjsweb.getNextElement($e193cbc89f3a1c6f$var$_tmpl$);
|
|
6185
6198
|
return {
|
|
@@ -6187,7 +6200,7 @@ function $e193cbc89f3a1c6f$export$af88b4929c2dc86() {
|
|
|
6187
6200
|
right: [img.cloneNode()]
|
|
6188
6201
|
};
|
|
6189
6202
|
}
|
|
6190
|
-
|
|
6203
|
+
var $6f926ca76dc3b69a$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<label class=checkbox_container><input type=radio><span class=checkmark>`);
|
|
6191
6204
|
function $6f926ca76dc3b69a$export$1d17a045bcc711b1(_ref) {
|
|
6192
6205
|
let {
|
|
6193
6206
|
t: t,
|
|
@@ -6281,7 +6294,7 @@ function $6f926ca76dc3b69a$export$1d17a045bcc711b1(_ref) {
|
|
|
6281
6294
|
}
|
|
6282
6295
|
function $6f926ca76dc3b69a$export$a09282b33e69b43f(unique_name) {
|
|
6283
6296
|
return (() => {
|
|
6284
|
-
|
|
6297
|
+
var _el$ = $bBfCy$solidjsweb.getNextElement($6f926ca76dc3b69a$var$_tmpl$),
|
|
6285
6298
|
_el$2 = _el$.firstChild;
|
|
6286
6299
|
$bBfCy$solidjsweb.setAttribute(_el$2, "name", "radio-".concat(unique_name));
|
|
6287
6300
|
return _el$;
|
|
@@ -6479,7 +6492,7 @@ function $e243e127ad19fbf8$export$5723caf9a8335aa6(_t) {
|
|
|
6479
6492
|
mutation_plugin: mutation_plugin
|
|
6480
6493
|
};
|
|
6481
6494
|
}
|
|
6482
|
-
|
|
6495
|
+
var $c051348670fb93e1$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div class=depict_slider_scroll_bar>`),
|
|
6483
6496
|
$c051348670fb93e1$var$_tmpl$2 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div class=depict_slider_scroll_container>`);
|
|
6484
6497
|
function $c051348670fb93e1$export$93223e488e7ee078(options) {
|
|
6485
6498
|
function constructor_plugin(_slider_options) {
|
|
@@ -6512,7 +6525,7 @@ function $c051348670fb93e1$export$93223e488e7ee078(options) {
|
|
|
6512
6525
|
mutation_plugin: mutation_plugin
|
|
6513
6526
|
};
|
|
6514
6527
|
}
|
|
6515
|
-
|
|
6528
|
+
var $d46a5140a5630463$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div style="position:absolute;width:1em;overflow:scroll;scroll-snap-type:x mandatory;"><div style=scroll-snap-align:start;color:transparent;>test`);
|
|
6516
6529
|
function $d46a5140a5630463$export$b36d2489a5a16728(_t) {
|
|
6517
6530
|
let {
|
|
6518
6531
|
snapEvery: snapEvery,
|
|
@@ -8110,14 +8123,14 @@ const $eedabd28f7a8a073$var$get_voyado_id = () => {
|
|
|
8110
8123
|
const $eedabd28f7a8a073$export$a739d9a07da7f9ce = /*@__PURE__*/$3b52ccc10510b32a$export$b3bbfd758f11cfa9(() => {
|
|
8111
8124
|
$335c248bb07a3509$export$93ae15b1ae509334($eedabd28f7a8a073$var$get_voyado_id);
|
|
8112
8125
|
});
|
|
8113
|
-
|
|
8126
|
+
var $102c3c26150518b7$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<button>`);
|
|
8114
8127
|
function $102c3c26150518b7$export$4a3043e508dd72f0(_ref) {
|
|
8115
8128
|
let {
|
|
8116
8129
|
children: children,
|
|
8117
8130
|
...attributes
|
|
8118
8131
|
} = _ref;
|
|
8119
8132
|
const button = (() => {
|
|
8120
|
-
|
|
8133
|
+
var _el$ = $bBfCy$solidjsweb.getNextElement($102c3c26150518b7$var$_tmpl$);
|
|
8121
8134
|
$bBfCy$solidjsweb.spread(_el$, $bBfCy$solidjsweb.mergeProps(attributes, {
|
|
8122
8135
|
"type": "button"
|
|
8123
8136
|
}), false, true);
|
|
@@ -8128,7 +8141,7 @@ function $102c3c26150518b7$export$4a3043e508dd72f0(_ref) {
|
|
|
8128
8141
|
button.classList.add("show-more");
|
|
8129
8142
|
return button;
|
|
8130
8143
|
}
|
|
8131
|
-
|
|
8144
|
+
var $b99c603a5341f0ae$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div class=slidein-backdrop>`),
|
|
8132
8145
|
$b99c603a5341f0ae$var$_tmpl$2 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div class=slidein><div class=header><span class=title></span><button class=close></button></div><div class=body>`),
|
|
8133
8146
|
$b99c603a5341f0ae$var$_tmpl$3 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div class=depict><!$><!/><!$><!/>`);
|
|
8134
8147
|
async function $b99c603a5341f0ae$export$8a0e4d6f6abf7e90(_ref) {
|
|
@@ -8142,7 +8155,7 @@ async function $b99c603a5341f0ae$export$8a0e4d6f6abf7e90(_ref) {
|
|
|
8142
8155
|
const open_promise = new Promise(r => close_ = r);
|
|
8143
8156
|
const body = await (0, $03c157d68c9fcbac$export$b6ae1bc530f4c149).wait_for_element("body");
|
|
8144
8157
|
const backdrop = (() => {
|
|
8145
|
-
|
|
8158
|
+
var _el$ = $bBfCy$solidjsweb.getNextElement($b99c603a5341f0ae$var$_tmpl$);
|
|
8146
8159
|
$bBfCy$solidjsweb.addEventListener(_el$, "click", close_, true);
|
|
8147
8160
|
$bBfCy$solidjsweb.runHydrationEvents();
|
|
8148
8161
|
return _el$;
|
|
@@ -8150,7 +8163,7 @@ async function $b99c603a5341f0ae$export$8a0e4d6f6abf7e90(_ref) {
|
|
|
8150
8163
|
const [exit_title_iterator, exitable_title_iterator] = $c0c977a0f691adf3$export$927664b47117acb0(title_);
|
|
8151
8164
|
const closing_handlers = [exit_title_iterator];
|
|
8152
8165
|
const slidein = (() => {
|
|
8153
|
-
|
|
8166
|
+
var _el$2 = $bBfCy$solidjsweb.getNextElement($b99c603a5341f0ae$var$_tmpl$2),
|
|
8154
8167
|
_el$3 = _el$2.firstChild,
|
|
8155
8168
|
_el$4 = _el$3.firstChild,
|
|
8156
8169
|
_el$5 = _el$4.nextSibling,
|
|
@@ -8163,7 +8176,7 @@ async function $b99c603a5341f0ae$export$8a0e4d6f6abf7e90(_ref) {
|
|
|
8163
8176
|
return _el$2;
|
|
8164
8177
|
})();
|
|
8165
8178
|
const elements_in_container = (() => {
|
|
8166
|
-
|
|
8179
|
+
var _el$7 = $bBfCy$solidjsweb.getNextElement($b99c603a5341f0ae$var$_tmpl$3),
|
|
8167
8180
|
_el$8 = _el$7.firstChild,
|
|
8168
8181
|
[_el$9, _co$] = $bBfCy$solidjsweb.getNextMarker(_el$8.nextSibling),
|
|
8169
8182
|
_el$10 = _el$9.nextSibling,
|
|
@@ -8221,7 +8234,7 @@ async function $b99c603a5341f0ae$export$8a0e4d6f6abf7e90(_ref) {
|
|
|
8221
8234
|
};
|
|
8222
8235
|
}
|
|
8223
8236
|
$bBfCy$solidjsweb.delegateEvents(["click"]);
|
|
8224
|
-
|
|
8237
|
+
var $468dbae10b24d59f$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div class=option-list>`),
|
|
8225
8238
|
$468dbae10b24d59f$var$_tmpl$2 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<button type=button><span class=size></span><!$><!/>`),
|
|
8226
8239
|
$468dbae10b24d59f$var$_tmpl$3 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<span class=sold-out>`);
|
|
8227
8240
|
async function $468dbae10b24d59f$export$c068ad5361be7646(_ref) {
|
|
@@ -8241,7 +8254,7 @@ async function $468dbae10b24d59f$export$c068ad5361be7646(_ref) {
|
|
|
8241
8254
|
CloseIcon: CloseIcon,
|
|
8242
8255
|
title_: title_,
|
|
8243
8256
|
children: [(() => {
|
|
8244
|
-
|
|
8257
|
+
var _el$ = $bBfCy$solidjsweb.getNextElement($468dbae10b24d59f$var$_tmpl$);
|
|
8245
8258
|
$bBfCy$solidjsweb.insert(_el$, () => items_.map(_ref2 => {
|
|
8246
8259
|
let {
|
|
8247
8260
|
size_name_: size_name_,
|
|
@@ -8249,7 +8262,7 @@ async function $468dbae10b24d59f$export$c068ad5361be7646(_ref) {
|
|
|
8249
8262
|
id_: id_
|
|
8250
8263
|
} = _ref2;
|
|
8251
8264
|
const button = (() => {
|
|
8252
|
-
|
|
8265
|
+
var _el$2 = $bBfCy$solidjsweb.getNextElement($468dbae10b24d59f$var$_tmpl$2),
|
|
8253
8266
|
_el$3 = _el$2.firstChild,
|
|
8254
8267
|
_el$4 = _el$3.nextSibling,
|
|
8255
8268
|
[_el$5, _co$] = $bBfCy$solidjsweb.getNextMarker(_el$4.nextSibling);
|
|
@@ -8260,7 +8273,7 @@ async function $468dbae10b24d59f$export$c068ad5361be7646(_ref) {
|
|
|
8260
8273
|
$bBfCy$solidjsweb.className(_el$2, "option" + (is_available_ ? " available" : ""));
|
|
8261
8274
|
$bBfCy$solidjsweb.insert(_el$3, size_name_);
|
|
8262
8275
|
$bBfCy$solidjsweb.insert(_el$2, !is_available_ && (() => {
|
|
8263
|
-
|
|
8276
|
+
var _el$6 = $bBfCy$solidjsweb.getNextElement($468dbae10b24d59f$var$_tmpl$3);
|
|
8264
8277
|
$bBfCy$solidjsweb.insert(_el$6, () => $fbf41b4abc726dbe$export$7c081fdbc65b6a2a(exitable_oos_iterator));
|
|
8265
8278
|
return _el$6;
|
|
8266
8279
|
})(), _el$5, _co$);
|
|
@@ -8280,7 +8293,7 @@ async function $468dbae10b24d59f$export$c068ad5361be7646(_ref) {
|
|
|
8280
8293
|
$bBfCy$solidjsweb.delegateEvents(["click"]);
|
|
8281
8294
|
var $6c1103c313edcc81$exports = {};
|
|
8282
8295
|
$6c1103c313edcc81$exports = ".depict-placeholder {\n will-change: mask, -webkit-mask;\n mask-position-x: 125%;\n mask-position-y: center;\n background: #ddd;\n animation: 1.5s linear infinite depict-placeholder;\n display: inline-block;\n position: relative;\n overflow: hidden;\n -webkit-mask: linear-gradient(-60deg, #000 30%, #0005, #000 70%) 125% / 300% 100%;\n -webkit-mask-image: ;\n mask-image: ;\n -webkit-mask-size: ;\n mask-size: ;\n}\n\n@keyframes depict-placeholder {\n 0% {\n mask-position-x: 125%;\n -webkit-mask-position-x: 125%;\n }\n\n 10% {\n mask-position-x: 125%;\n -webkit-mask-position-x: 125%;\n }\n\n 90% {\n mask-position-x: -25%;\n -webkit-mask-position-x: -25%;\n }\n\n 100% {\n mask-position-x: -25%;\n -webkit-mask-position-x: -25%;\n }\n}\n\n";
|
|
8283
|
-
|
|
8296
|
+
var $ba9b4cd7e24de87e$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div>`);
|
|
8284
8297
|
let $ba9b4cd7e24de87e$var$inserted = false;
|
|
8285
8298
|
const $ba9b4cd7e24de87e$export$84712d0562a614b8 = _ref => {
|
|
8286
8299
|
let {
|
|
@@ -8296,7 +8309,7 @@ const $ba9b4cd7e24de87e$export$84712d0562a614b8 = _ref => {
|
|
|
8296
8309
|
$ba9b4cd7e24de87e$var$inserted = true;
|
|
8297
8310
|
}
|
|
8298
8311
|
return (() => {
|
|
8299
|
-
|
|
8312
|
+
var _el$ = $bBfCy$solidjsweb.getNextElement($ba9b4cd7e24de87e$var$_tmpl$);
|
|
8300
8313
|
$bBfCy$solidjsweb.className(_el$, "depict-placeholder".concat(extra_classes ? " " + extra_classes : ""));
|
|
8301
8314
|
$bBfCy$solidjsweb.spread(_el$, attributes, false, false);
|
|
8302
8315
|
$bBfCy$solidjsweb.effect(_$p => $bBfCy$solidjsweb.style(_el$, style ? style : "width:".concat(width, ";height:").concat(height, ";"), _$p));
|
|
@@ -8313,28 +8326,28 @@ const $ba9b4cd7e24de87e$export$d613f5b6d0a331a8 = _ref2 => {
|
|
|
8313
8326
|
style: "position:relative;width:100%;padding-bottom:".concat(1 / aspect_ratio * 100, "%")
|
|
8314
8327
|
}, attributes));
|
|
8315
8328
|
};
|
|
8316
|
-
|
|
8329
|
+
var $d500491aef2925c7$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div class="depict recommendation_container"><!$><!/><div class=grid>`),
|
|
8317
8330
|
$d500491aef2925c7$var$_tmpl$2 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<h4 class=recs_header>`);
|
|
8318
8331
|
const $d500491aef2925c7$export$97f31f44c68c1d5 = function (title) {
|
|
8319
8332
|
let surface_classes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
8320
8333
|
return $51b78ec2cb40f07e$export$eb0b9ed911409b57(e => e.classList.add(...surface_classes), (() => {
|
|
8321
|
-
|
|
8334
|
+
var _el$ = $bBfCy$solidjsweb.getNextElement($d500491aef2925c7$var$_tmpl$),
|
|
8322
8335
|
_el$3 = _el$.firstChild,
|
|
8323
8336
|
[_el$4, _co$] = $bBfCy$solidjsweb.getNextMarker(_el$3.nextSibling),
|
|
8324
8337
|
_el$2 = _el$4.nextSibling;
|
|
8325
8338
|
$bBfCy$solidjsweb.insert(_el$, title && typeof title === "string" ? (() => {
|
|
8326
|
-
|
|
8339
|
+
var _el$5 = $bBfCy$solidjsweb.getNextElement($d500491aef2925c7$var$_tmpl$2);
|
|
8327
8340
|
$bBfCy$solidjsweb.insert(_el$5, title);
|
|
8328
8341
|
return _el$5;
|
|
8329
8342
|
})() : title, _el$4, _co$);
|
|
8330
8343
|
return _el$;
|
|
8331
8344
|
})());
|
|
8332
8345
|
};
|
|
8333
|
-
|
|
8346
|
+
var $98ca99ff2fa5a542$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<svg viewBox="0 0 320 512"><desc>Right arrow</desc><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z">`),
|
|
8334
8347
|
$98ca99ff2fa5a542$var$_tmpl$2 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<svg viewBox="0 0 320 512"><desc>Left arrow</desc><path d="M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z">`);
|
|
8335
8348
|
const $98ca99ff2fa5a542$export$32a55d57d151bc5a = () => $bBfCy$solidjsweb.getNextElement($98ca99ff2fa5a542$var$_tmpl$);
|
|
8336
8349
|
const $98ca99ff2fa5a542$export$ddd70fdae1b350e6 = () => $bBfCy$solidjsweb.getNextElement($98ca99ff2fa5a542$var$_tmpl$2);
|
|
8337
|
-
|
|
8350
|
+
var $57a111eb846a8d6a$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<button class=color-circle-container><div class=outer-circle><div class=inner-circle>`),
|
|
8338
8351
|
$57a111eb846a8d6a$var$_tmpl$2 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div class=color-picker role=form aria-label="Color picker">`);
|
|
8339
8352
|
/**
|
|
8340
8353
|
* Internal color circle used in ColorPicker
|
|
@@ -8347,22 +8360,22 @@ function $57a111eb846a8d6a$var$ColorCircle(_ref) {
|
|
|
8347
8360
|
onHoverUpdate: onHoverUpdate
|
|
8348
8361
|
} = _ref;
|
|
8349
8362
|
const button = (() => {
|
|
8350
|
-
|
|
8363
|
+
var _el$ = $bBfCy$solidjsweb.getNextElement($57a111eb846a8d6a$var$_tmpl$),
|
|
8351
8364
|
_el$2 = _el$.firstChild,
|
|
8352
8365
|
_el$3 = _el$2.firstChild;
|
|
8353
8366
|
_el$.$$click = e => onClick(e.currentTarget, color);
|
|
8354
8367
|
$bBfCy$solidjsweb.effect(_p$ => {
|
|
8355
|
-
|
|
8368
|
+
var _v$ = color.label || "",
|
|
8356
8369
|
_v$2 = "border-color: ".concat(color.value, ";"),
|
|
8357
8370
|
_v$3 = "background-color: ".concat(color.value, ";");
|
|
8358
|
-
_v$ !== _p$.
|
|
8359
|
-
_p$.
|
|
8360
|
-
_p$.
|
|
8371
|
+
_v$ !== _p$.e && $bBfCy$solidjsweb.setAttribute(_el$, "title", _p$.e = _v$);
|
|
8372
|
+
_p$.t = $bBfCy$solidjsweb.style(_el$2, _v$2, _p$.t);
|
|
8373
|
+
_p$.a = $bBfCy$solidjsweb.style(_el$3, _v$3, _p$.a);
|
|
8361
8374
|
return _p$;
|
|
8362
8375
|
}, {
|
|
8363
|
-
|
|
8364
|
-
|
|
8365
|
-
|
|
8376
|
+
e: undefined,
|
|
8377
|
+
t: undefined,
|
|
8378
|
+
a: undefined
|
|
8366
8379
|
});
|
|
8367
8380
|
$bBfCy$solidjsweb.runHydrationEvents();
|
|
8368
8381
|
return _el$;
|
|
@@ -8437,7 +8450,7 @@ function $57a111eb846a8d6a$export$590326cc34f49e2d(_ref2) {
|
|
|
8437
8450
|
if (initial_index > -1) setActiveIndex(initial_index);
|
|
8438
8451
|
if (onlyCircles) return circles;
|
|
8439
8452
|
return (() => {
|
|
8440
|
-
|
|
8453
|
+
var _el$4 = $bBfCy$solidjsweb.getNextElement($57a111eb846a8d6a$var$_tmpl$2);
|
|
8441
8454
|
$bBfCy$solidjsweb.insert(_el$4, circles);
|
|
8442
8455
|
return _el$4;
|
|
8443
8456
|
})();
|
|
@@ -8445,7 +8458,7 @@ function $57a111eb846a8d6a$export$590326cc34f49e2d(_ref2) {
|
|
|
8445
8458
|
};
|
|
8446
8459
|
}
|
|
8447
8460
|
$bBfCy$solidjsweb.delegateEvents(["click"]);
|
|
8448
|
-
|
|
8461
|
+
var $151f8676c5d42e80$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div>`),
|
|
8449
8462
|
$151f8676c5d42e80$var$_tmpl$2 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div style=overflow:hidden;height:0px;visibility:hidden aria-hidden=true>`);
|
|
8450
8463
|
const $151f8676c5d42e80$export$237455ad7e59d4e5 = function () {
|
|
8451
8464
|
let {
|
|
@@ -8473,12 +8486,12 @@ const $151f8676c5d42e80$export$237455ad7e59d4e5 = function () {
|
|
|
8473
8486
|
} = _ref;
|
|
8474
8487
|
if (Array.isArray(children) && children.length === 1) children = children[0];
|
|
8475
8488
|
innerRef = (() => {
|
|
8476
|
-
|
|
8489
|
+
var _el$ = $bBfCy$solidjsweb.getNextElement($151f8676c5d42e80$var$_tmpl$);
|
|
8477
8490
|
$bBfCy$solidjsweb.insert(_el$, children);
|
|
8478
8491
|
return _el$;
|
|
8479
8492
|
})();
|
|
8480
8493
|
outerRef = (() => {
|
|
8481
|
-
|
|
8494
|
+
var _el$2 = $bBfCy$solidjsweb.getNextElement($151f8676c5d42e80$var$_tmpl$2);
|
|
8482
8495
|
$bBfCy$solidjsweb.insert(_el$2, innerRef);
|
|
8483
8496
|
return _el$2;
|
|
8484
8497
|
})();
|
|
@@ -8538,7 +8551,7 @@ const $151f8676c5d42e80$export$237455ad7e59d4e5 = function () {
|
|
|
8538
8551
|
};
|
|
8539
8552
|
var $4f104a7ebe4cdc54$exports = {};
|
|
8540
8553
|
$4f104a7ebe4cdc54$exports = ".depict-img-cont {\n width: 100%;\n height: 100%;\n position: absolute;\n}\n\n.depict-img-filler {\n width: 100%;\n height: auto;\n display: inline-block;\n}\n\n.depict-img-comp {\n width: auto;\n height: auto;\n max-width: 100%;\n max-height: 100%;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n\n.depict-img-mod {\n width: 100%;\n height: 100%;\n object-fit: contain;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n\n";
|
|
8541
|
-
|
|
8554
|
+
var $b42b9f62e8b6cb2d$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<img>`),
|
|
8542
8555
|
$b42b9f62e8b6cb2d$var$_tmpl$2 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<source sizes=0px>`),
|
|
8543
8556
|
$b42b9f62e8b6cb2d$var$_tmpl$3 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<picture>`);
|
|
8544
8557
|
const $b42b9f62e8b6cb2d$export$3d13beba9b52c947 = "https://img.depict.ai/ResizeImage" + (process.env.TENANT ? "/" + process.env.TENANT : "");
|
|
@@ -8624,7 +8637,7 @@ function $b42b9f62e8b6cb2d$export$a62825542f1bfcf5() {
|
|
|
8624
8637
|
$7f95f77417d06249$export$de56f1198d121036(image_options, () => {}); // noop function is to allow to get here quickly by "jump to function definition"
|
|
8625
8638
|
$46b94b232dc792af$export$8048b892d651b310(new Error("no image src provided: " + src));
|
|
8626
8639
|
return (() => {
|
|
8627
|
-
|
|
8640
|
+
var _el$ = $bBfCy$solidjsweb.getNextElement($b42b9f62e8b6cb2d$var$_tmpl$);
|
|
8628
8641
|
$bBfCy$solidjsweb.spread(_el$, image_options, false, false);
|
|
8629
8642
|
$bBfCy$solidjsweb.runHydrationEvents();
|
|
8630
8643
|
return _el$;
|
|
@@ -8638,7 +8651,7 @@ function $b42b9f62e8b6cb2d$export$a62825542f1bfcf5() {
|
|
|
8638
8651
|
const format = formats[i];
|
|
8639
8652
|
const srcset = $b42b9f62e8b6cb2d$var$make_srcset(src, format, resolutions);
|
|
8640
8653
|
sources.push((() => {
|
|
8641
|
-
|
|
8654
|
+
var _el$2 = $bBfCy$solidjsweb.getNextElement($b42b9f62e8b6cb2d$var$_tmpl$2);
|
|
8642
8655
|
$bBfCy$solidjsweb.setAttribute(_el$2, "type", "image/".concat(format));
|
|
8643
8656
|
$bBfCy$solidjsweb.spread(_el$2, set_dataset ? {
|
|
8644
8657
|
"data-srcset": srcset
|
|
@@ -8655,7 +8668,7 @@ function $b42b9f62e8b6cb2d$export$a62825542f1bfcf5() {
|
|
|
8655
8668
|
delete opts_without_src["src"];
|
|
8656
8669
|
delete opts_without_src["srcset"];
|
|
8657
8670
|
const the_image = (() => {
|
|
8658
|
-
|
|
8671
|
+
var _el$3 = $bBfCy$solidjsweb.getNextElement($b42b9f62e8b6cb2d$var$_tmpl$);
|
|
8659
8672
|
$bBfCy$solidjsweb.spread(_el$3, opts_without_src, false, false);
|
|
8660
8673
|
$bBfCy$solidjsweb.runHydrationEvents();
|
|
8661
8674
|
return _el$3;
|
|
@@ -8667,7 +8680,7 @@ function $b42b9f62e8b6cb2d$export$a62825542f1bfcf5() {
|
|
|
8667
8680
|
for (let i = 0; i < sources.length; i++) sizes_setter_(sources[i]).catch((0, $46b94b232dc792af$export$8048b892d651b310));
|
|
8668
8681
|
// embed all sources into a <picture> so that the browser understands they're "together"
|
|
8669
8682
|
const picture = (() => {
|
|
8670
|
-
|
|
8683
|
+
var _el$4 = $bBfCy$solidjsweb.getNextElement($b42b9f62e8b6cb2d$var$_tmpl$3);
|
|
8671
8684
|
$bBfCy$solidjsweb.insert(_el$4, sources);
|
|
8672
8685
|
return _el$4;
|
|
8673
8686
|
})();
|
|
@@ -8700,7 +8713,7 @@ function $b42b9f62e8b6cb2d$var$optimized_img_url_generator(format, url, width) {
|
|
|
8700
8713
|
// using make_url_with_query_params takes ~100ms on CDON with 2 surfaces and hover images, we can't afford that when it could be essentially free
|
|
8701
8714
|
return "".concat($b42b9f62e8b6cb2d$export$3d13beba9b52c947, "?format=").concat(format, "&url=").concat(encodeURIComponent(url), "&width=").concat(width);
|
|
8702
8715
|
}
|
|
8703
|
-
|
|
8716
|
+
var $dfce76a4aeb41067$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div>`),
|
|
8704
8717
|
$dfce76a4aeb41067$var$_tmpl$2 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<canvas class=depict-img-filler height=3000>`),
|
|
8705
8718
|
$dfce76a4aeb41067$var$_tmpl$3 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div style=position:relative><div class=depict-img-cont></div><!$><!/>`);
|
|
8706
8719
|
const $dfce76a4aeb41067$var$rendering_options_to_sourceset_component = /*@__PURE__*/new WeakMap();
|
|
@@ -8735,7 +8748,7 @@ function $dfce76a4aeb41067$var$Image(_ref2) {
|
|
|
8735
8748
|
...image_options
|
|
8736
8749
|
} = _ref2;
|
|
8737
8750
|
const div = (() => {
|
|
8738
|
-
|
|
8751
|
+
var _el$ = $bBfCy$solidjsweb.getNextElement($dfce76a4aeb41067$var$_tmpl$);
|
|
8739
8752
|
$bBfCy$solidjsweb.effect(_$p => $bBfCy$solidjsweb.style(_el$, "position:relative;width:100%;padding-bottom:".concat(1 / aspect_ratio * 100, "%"), _$p));
|
|
8740
8753
|
return _el$;
|
|
8741
8754
|
})();
|
|
@@ -8763,14 +8776,14 @@ function $dfce76a4aeb41067$var$CompatibleImage(_ref3) {
|
|
|
8763
8776
|
...image_options
|
|
8764
8777
|
} = _ref3;
|
|
8765
8778
|
const canvas = (() => {
|
|
8766
|
-
|
|
8779
|
+
var _el$2 = $bBfCy$solidjsweb.getNextElement($dfce76a4aeb41067$var$_tmpl$2);
|
|
8767
8780
|
$bBfCy$solidjsweb.setAttribute(_el$2, "width", 3000 * aspect_ratio);
|
|
8768
8781
|
return _el$2;
|
|
8769
8782
|
})();
|
|
8770
8783
|
const sourceset_component = $dfce76a4aeb41067$var$srcset_comp_from_map_or_new(rendering_options, srcset_opts, canvas);
|
|
8771
8784
|
const IMG_tag = (_image_options$src2 = image_options.src) !== null && _image_options$src2 !== void 0 && _image_options$src2.startsWith("data:") || !sourceset_component ? "img" : sourceset_component;
|
|
8772
8785
|
return (() => {
|
|
8773
|
-
|
|
8786
|
+
var _el$3 = $bBfCy$solidjsweb.getNextElement($dfce76a4aeb41067$var$_tmpl$3),
|
|
8774
8787
|
_el$4 = _el$3.firstChild,
|
|
8775
8788
|
_el$5 = _el$4.nextSibling,
|
|
8776
8789
|
[_el$6, _co$] = $bBfCy$solidjsweb.getNextMarker(_el$5.nextSibling);
|
|
@@ -8807,7 +8820,7 @@ function $dfce76a4aeb41067$var$srcset_comp_from_map_or_new(rendering_options) {
|
|
|
8807
8820
|
}
|
|
8808
8821
|
var $be5deeed4683b89f$exports = {};
|
|
8809
8822
|
$be5deeed4683b89f$exports = ".depict .images-container {\n position: relative;\n}\n\n.depict .second-image-container {\n width: 100%;\n opacity: 0;\n position: absolute;\n top: 0;\n}\n\n.depict .hovering .main-image-container {\n opacity: 0;\n}\n\n.depict .hovering .second-image-container {\n opacity: 1;\n}\n\n";
|
|
8810
|
-
|
|
8823
|
+
var $8928a1027461fba4$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div class=images-container><!$><!/><div class=main-image-container>`),
|
|
8811
8824
|
$8928a1027461fba4$var$_tmpl$2 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div class=second-image-container>`);
|
|
8812
8825
|
// Saving bytez
|
|
8813
8826
|
// Maybe? @Daniel
|
|
@@ -8955,12 +8968,12 @@ const $8928a1027461fba4$export$2369f6fc1c911576 = _ref => {
|
|
|
8955
8968
|
});
|
|
8956
8969
|
const no_second_img = !second_src && !second_srcset && !second_srcset_opts;
|
|
8957
8970
|
const images_container = (() => {
|
|
8958
|
-
|
|
8971
|
+
var _el$ = $bBfCy$solidjsweb.getNextElement($8928a1027461fba4$var$_tmpl$),
|
|
8959
8972
|
_el$3 = _el$.firstChild,
|
|
8960
8973
|
[_el$4, _co$] = $bBfCy$solidjsweb.getNextMarker(_el$3.nextSibling),
|
|
8961
8974
|
_el$2 = _el$4.nextSibling;
|
|
8962
8975
|
$bBfCy$solidjsweb.insert(_el$, !no_second_img && (() => {
|
|
8963
|
-
|
|
8976
|
+
var _el$5 = $bBfCy$solidjsweb.getNextElement($8928a1027461fba4$var$_tmpl$2);
|
|
8964
8977
|
$bBfCy$solidjsweb.insert(_el$5, second_image);
|
|
8965
8978
|
return _el$5;
|
|
8966
8979
|
})(), _el$4, _co$);
|
package/ES10/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSX, Accessor } from "solid-js";
|
|
2
|
-
export const version = "2.0.
|
|
2
|
+
export const version = "2.0.14";
|
|
3
3
|
export const is_debug: boolean;
|
|
4
4
|
/**
|
|
5
5
|
* Sets the prefix of dlog, dwarn, and derror messages in the browser console. Defaults to `[Depict]`.
|
|
@@ -21,6 +21,11 @@ export function add_to_version_info(package_name: string, version: string): void
|
|
|
21
21
|
* @returns the same type as the input but with added query params
|
|
22
22
|
*/
|
|
23
23
|
export function add_version_query_params<T extends string | URL>(url: T): T;
|
|
24
|
+
/**
|
|
25
|
+
* Finds most frequent item in an array, written by chatGPT with some nudging. Returns `undefined` if the array is empty.
|
|
26
|
+
* @param arr array to find the most frequent item in
|
|
27
|
+
*/
|
|
28
|
+
export function findMostFrequentItem<T>(arr: T[]): T | undefined;
|
|
24
29
|
/**
|
|
25
30
|
* Encoding UTF8 ⇢ base64
|
|
26
31
|
*/
|