@getlupa/client 1.10.3 → 1.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lupaSearch.iife.js +965 -239
- package/dist/lupaSearch.js +965 -239
- package/dist/lupaSearch.mjs +965 -239
- package/dist/lupaSearch.umd.js +965 -239
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/dist/lupaSearch.iife.js
CHANGED
|
@@ -104,6 +104,10 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
104
104
|
const n = parseFloat(val);
|
|
105
105
|
return isNaN(n) ? val : n;
|
|
106
106
|
};
|
|
107
|
+
const toNumber = (val) => {
|
|
108
|
+
const n = isString(val) ? Number(val) : NaN;
|
|
109
|
+
return isNaN(n) ? val : n;
|
|
110
|
+
};
|
|
107
111
|
let _globalThis;
|
|
108
112
|
const getGlobalThis = () => {
|
|
109
113
|
return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
|
|
@@ -2002,6 +2006,319 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
2002
2006
|
}
|
|
2003
2007
|
}
|
|
2004
2008
|
}
|
|
2009
|
+
function useTransitionState() {
|
|
2010
|
+
const state = {
|
|
2011
|
+
isMounted: false,
|
|
2012
|
+
isLeaving: false,
|
|
2013
|
+
isUnmounting: false,
|
|
2014
|
+
leavingVNodes: /* @__PURE__ */ new Map()
|
|
2015
|
+
};
|
|
2016
|
+
onMounted(() => {
|
|
2017
|
+
state.isMounted = true;
|
|
2018
|
+
});
|
|
2019
|
+
onBeforeUnmount(() => {
|
|
2020
|
+
state.isUnmounting = true;
|
|
2021
|
+
});
|
|
2022
|
+
return state;
|
|
2023
|
+
}
|
|
2024
|
+
const TransitionHookValidator = [Function, Array];
|
|
2025
|
+
const BaseTransitionPropsValidators = {
|
|
2026
|
+
mode: String,
|
|
2027
|
+
appear: Boolean,
|
|
2028
|
+
persisted: Boolean,
|
|
2029
|
+
// enter
|
|
2030
|
+
onBeforeEnter: TransitionHookValidator,
|
|
2031
|
+
onEnter: TransitionHookValidator,
|
|
2032
|
+
onAfterEnter: TransitionHookValidator,
|
|
2033
|
+
onEnterCancelled: TransitionHookValidator,
|
|
2034
|
+
// leave
|
|
2035
|
+
onBeforeLeave: TransitionHookValidator,
|
|
2036
|
+
onLeave: TransitionHookValidator,
|
|
2037
|
+
onAfterLeave: TransitionHookValidator,
|
|
2038
|
+
onLeaveCancelled: TransitionHookValidator,
|
|
2039
|
+
// appear
|
|
2040
|
+
onBeforeAppear: TransitionHookValidator,
|
|
2041
|
+
onAppear: TransitionHookValidator,
|
|
2042
|
+
onAfterAppear: TransitionHookValidator,
|
|
2043
|
+
onAppearCancelled: TransitionHookValidator
|
|
2044
|
+
};
|
|
2045
|
+
const BaseTransitionImpl = {
|
|
2046
|
+
name: `BaseTransition`,
|
|
2047
|
+
props: BaseTransitionPropsValidators,
|
|
2048
|
+
setup(props, { slots }) {
|
|
2049
|
+
const instance = getCurrentInstance();
|
|
2050
|
+
const state = useTransitionState();
|
|
2051
|
+
let prevTransitionKey;
|
|
2052
|
+
return () => {
|
|
2053
|
+
const children = slots.default && getTransitionRawChildren(slots.default(), true);
|
|
2054
|
+
if (!children || !children.length) {
|
|
2055
|
+
return;
|
|
2056
|
+
}
|
|
2057
|
+
let child = children[0];
|
|
2058
|
+
if (children.length > 1) {
|
|
2059
|
+
for (const c2 of children) {
|
|
2060
|
+
if (c2.type !== Comment) {
|
|
2061
|
+
child = c2;
|
|
2062
|
+
break;
|
|
2063
|
+
}
|
|
2064
|
+
}
|
|
2065
|
+
}
|
|
2066
|
+
const rawProps = toRaw(props);
|
|
2067
|
+
const { mode } = rawProps;
|
|
2068
|
+
if (state.isLeaving) {
|
|
2069
|
+
return emptyPlaceholder(child);
|
|
2070
|
+
}
|
|
2071
|
+
const innerChild = getKeepAliveChild(child);
|
|
2072
|
+
if (!innerChild) {
|
|
2073
|
+
return emptyPlaceholder(child);
|
|
2074
|
+
}
|
|
2075
|
+
const enterHooks = resolveTransitionHooks(
|
|
2076
|
+
innerChild,
|
|
2077
|
+
rawProps,
|
|
2078
|
+
state,
|
|
2079
|
+
instance
|
|
2080
|
+
);
|
|
2081
|
+
setTransitionHooks(innerChild, enterHooks);
|
|
2082
|
+
const oldChild = instance.subTree;
|
|
2083
|
+
const oldInnerChild = oldChild && getKeepAliveChild(oldChild);
|
|
2084
|
+
let transitionKeyChanged = false;
|
|
2085
|
+
const { getTransitionKey } = innerChild.type;
|
|
2086
|
+
if (getTransitionKey) {
|
|
2087
|
+
const key = getTransitionKey();
|
|
2088
|
+
if (prevTransitionKey === void 0) {
|
|
2089
|
+
prevTransitionKey = key;
|
|
2090
|
+
} else if (key !== prevTransitionKey) {
|
|
2091
|
+
prevTransitionKey = key;
|
|
2092
|
+
transitionKeyChanged = true;
|
|
2093
|
+
}
|
|
2094
|
+
}
|
|
2095
|
+
if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) {
|
|
2096
|
+
const leavingHooks = resolveTransitionHooks(
|
|
2097
|
+
oldInnerChild,
|
|
2098
|
+
rawProps,
|
|
2099
|
+
state,
|
|
2100
|
+
instance
|
|
2101
|
+
);
|
|
2102
|
+
setTransitionHooks(oldInnerChild, leavingHooks);
|
|
2103
|
+
if (mode === "out-in") {
|
|
2104
|
+
state.isLeaving = true;
|
|
2105
|
+
leavingHooks.afterLeave = () => {
|
|
2106
|
+
state.isLeaving = false;
|
|
2107
|
+
if (instance.update.active !== false) {
|
|
2108
|
+
instance.update();
|
|
2109
|
+
}
|
|
2110
|
+
};
|
|
2111
|
+
return emptyPlaceholder(child);
|
|
2112
|
+
} else if (mode === "in-out" && innerChild.type !== Comment) {
|
|
2113
|
+
leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {
|
|
2114
|
+
const leavingVNodesCache = getLeavingNodesForType(
|
|
2115
|
+
state,
|
|
2116
|
+
oldInnerChild
|
|
2117
|
+
);
|
|
2118
|
+
leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
|
|
2119
|
+
el._leaveCb = () => {
|
|
2120
|
+
earlyRemove();
|
|
2121
|
+
el._leaveCb = void 0;
|
|
2122
|
+
delete enterHooks.delayedLeave;
|
|
2123
|
+
};
|
|
2124
|
+
enterHooks.delayedLeave = delayedLeave;
|
|
2125
|
+
};
|
|
2126
|
+
}
|
|
2127
|
+
}
|
|
2128
|
+
return child;
|
|
2129
|
+
};
|
|
2130
|
+
}
|
|
2131
|
+
};
|
|
2132
|
+
const BaseTransition = BaseTransitionImpl;
|
|
2133
|
+
function getLeavingNodesForType(state, vnode) {
|
|
2134
|
+
const { leavingVNodes } = state;
|
|
2135
|
+
let leavingVNodesCache = leavingVNodes.get(vnode.type);
|
|
2136
|
+
if (!leavingVNodesCache) {
|
|
2137
|
+
leavingVNodesCache = /* @__PURE__ */ Object.create(null);
|
|
2138
|
+
leavingVNodes.set(vnode.type, leavingVNodesCache);
|
|
2139
|
+
}
|
|
2140
|
+
return leavingVNodesCache;
|
|
2141
|
+
}
|
|
2142
|
+
function resolveTransitionHooks(vnode, props, state, instance) {
|
|
2143
|
+
const {
|
|
2144
|
+
appear,
|
|
2145
|
+
mode,
|
|
2146
|
+
persisted = false,
|
|
2147
|
+
onBeforeEnter,
|
|
2148
|
+
onEnter,
|
|
2149
|
+
onAfterEnter,
|
|
2150
|
+
onEnterCancelled,
|
|
2151
|
+
onBeforeLeave,
|
|
2152
|
+
onLeave,
|
|
2153
|
+
onAfterLeave,
|
|
2154
|
+
onLeaveCancelled,
|
|
2155
|
+
onBeforeAppear,
|
|
2156
|
+
onAppear,
|
|
2157
|
+
onAfterAppear,
|
|
2158
|
+
onAppearCancelled
|
|
2159
|
+
} = props;
|
|
2160
|
+
const key = String(vnode.key);
|
|
2161
|
+
const leavingVNodesCache = getLeavingNodesForType(state, vnode);
|
|
2162
|
+
const callHook2 = (hook, args) => {
|
|
2163
|
+
hook && callWithAsyncErrorHandling(
|
|
2164
|
+
hook,
|
|
2165
|
+
instance,
|
|
2166
|
+
9,
|
|
2167
|
+
args
|
|
2168
|
+
);
|
|
2169
|
+
};
|
|
2170
|
+
const callAsyncHook = (hook, args) => {
|
|
2171
|
+
const done = args[1];
|
|
2172
|
+
callHook2(hook, args);
|
|
2173
|
+
if (isArray(hook)) {
|
|
2174
|
+
if (hook.every((hook2) => hook2.length <= 1))
|
|
2175
|
+
done();
|
|
2176
|
+
} else if (hook.length <= 1) {
|
|
2177
|
+
done();
|
|
2178
|
+
}
|
|
2179
|
+
};
|
|
2180
|
+
const hooks = {
|
|
2181
|
+
mode,
|
|
2182
|
+
persisted,
|
|
2183
|
+
beforeEnter(el) {
|
|
2184
|
+
let hook = onBeforeEnter;
|
|
2185
|
+
if (!state.isMounted) {
|
|
2186
|
+
if (appear) {
|
|
2187
|
+
hook = onBeforeAppear || onBeforeEnter;
|
|
2188
|
+
} else {
|
|
2189
|
+
return;
|
|
2190
|
+
}
|
|
2191
|
+
}
|
|
2192
|
+
if (el._leaveCb) {
|
|
2193
|
+
el._leaveCb(
|
|
2194
|
+
true
|
|
2195
|
+
/* cancelled */
|
|
2196
|
+
);
|
|
2197
|
+
}
|
|
2198
|
+
const leavingVNode = leavingVNodesCache[key];
|
|
2199
|
+
if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el._leaveCb) {
|
|
2200
|
+
leavingVNode.el._leaveCb();
|
|
2201
|
+
}
|
|
2202
|
+
callHook2(hook, [el]);
|
|
2203
|
+
},
|
|
2204
|
+
enter(el) {
|
|
2205
|
+
let hook = onEnter;
|
|
2206
|
+
let afterHook = onAfterEnter;
|
|
2207
|
+
let cancelHook = onEnterCancelled;
|
|
2208
|
+
if (!state.isMounted) {
|
|
2209
|
+
if (appear) {
|
|
2210
|
+
hook = onAppear || onEnter;
|
|
2211
|
+
afterHook = onAfterAppear || onAfterEnter;
|
|
2212
|
+
cancelHook = onAppearCancelled || onEnterCancelled;
|
|
2213
|
+
} else {
|
|
2214
|
+
return;
|
|
2215
|
+
}
|
|
2216
|
+
}
|
|
2217
|
+
let called = false;
|
|
2218
|
+
const done = el._enterCb = (cancelled) => {
|
|
2219
|
+
if (called)
|
|
2220
|
+
return;
|
|
2221
|
+
called = true;
|
|
2222
|
+
if (cancelled) {
|
|
2223
|
+
callHook2(cancelHook, [el]);
|
|
2224
|
+
} else {
|
|
2225
|
+
callHook2(afterHook, [el]);
|
|
2226
|
+
}
|
|
2227
|
+
if (hooks.delayedLeave) {
|
|
2228
|
+
hooks.delayedLeave();
|
|
2229
|
+
}
|
|
2230
|
+
el._enterCb = void 0;
|
|
2231
|
+
};
|
|
2232
|
+
if (hook) {
|
|
2233
|
+
callAsyncHook(hook, [el, done]);
|
|
2234
|
+
} else {
|
|
2235
|
+
done();
|
|
2236
|
+
}
|
|
2237
|
+
},
|
|
2238
|
+
leave(el, remove2) {
|
|
2239
|
+
const key2 = String(vnode.key);
|
|
2240
|
+
if (el._enterCb) {
|
|
2241
|
+
el._enterCb(
|
|
2242
|
+
true
|
|
2243
|
+
/* cancelled */
|
|
2244
|
+
);
|
|
2245
|
+
}
|
|
2246
|
+
if (state.isUnmounting) {
|
|
2247
|
+
return remove2();
|
|
2248
|
+
}
|
|
2249
|
+
callHook2(onBeforeLeave, [el]);
|
|
2250
|
+
let called = false;
|
|
2251
|
+
const done = el._leaveCb = (cancelled) => {
|
|
2252
|
+
if (called)
|
|
2253
|
+
return;
|
|
2254
|
+
called = true;
|
|
2255
|
+
remove2();
|
|
2256
|
+
if (cancelled) {
|
|
2257
|
+
callHook2(onLeaveCancelled, [el]);
|
|
2258
|
+
} else {
|
|
2259
|
+
callHook2(onAfterLeave, [el]);
|
|
2260
|
+
}
|
|
2261
|
+
el._leaveCb = void 0;
|
|
2262
|
+
if (leavingVNodesCache[key2] === vnode) {
|
|
2263
|
+
delete leavingVNodesCache[key2];
|
|
2264
|
+
}
|
|
2265
|
+
};
|
|
2266
|
+
leavingVNodesCache[key2] = vnode;
|
|
2267
|
+
if (onLeave) {
|
|
2268
|
+
callAsyncHook(onLeave, [el, done]);
|
|
2269
|
+
} else {
|
|
2270
|
+
done();
|
|
2271
|
+
}
|
|
2272
|
+
},
|
|
2273
|
+
clone(vnode2) {
|
|
2274
|
+
return resolveTransitionHooks(vnode2, props, state, instance);
|
|
2275
|
+
}
|
|
2276
|
+
};
|
|
2277
|
+
return hooks;
|
|
2278
|
+
}
|
|
2279
|
+
function emptyPlaceholder(vnode) {
|
|
2280
|
+
if (isKeepAlive(vnode)) {
|
|
2281
|
+
vnode = cloneVNode(vnode);
|
|
2282
|
+
vnode.children = null;
|
|
2283
|
+
return vnode;
|
|
2284
|
+
}
|
|
2285
|
+
}
|
|
2286
|
+
function getKeepAliveChild(vnode) {
|
|
2287
|
+
return isKeepAlive(vnode) ? vnode.children ? vnode.children[0] : void 0 : vnode;
|
|
2288
|
+
}
|
|
2289
|
+
function setTransitionHooks(vnode, hooks) {
|
|
2290
|
+
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
2291
|
+
setTransitionHooks(vnode.component.subTree, hooks);
|
|
2292
|
+
} else if (vnode.shapeFlag & 128) {
|
|
2293
|
+
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
2294
|
+
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
2295
|
+
} else {
|
|
2296
|
+
vnode.transition = hooks;
|
|
2297
|
+
}
|
|
2298
|
+
}
|
|
2299
|
+
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
2300
|
+
let ret = [];
|
|
2301
|
+
let keyedFragmentCount = 0;
|
|
2302
|
+
for (let i = 0; i < children.length; i++) {
|
|
2303
|
+
let child = children[i];
|
|
2304
|
+
const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i);
|
|
2305
|
+
if (child.type === Fragment) {
|
|
2306
|
+
if (child.patchFlag & 128)
|
|
2307
|
+
keyedFragmentCount++;
|
|
2308
|
+
ret = ret.concat(
|
|
2309
|
+
getTransitionRawChildren(child.children, keepComment, key)
|
|
2310
|
+
);
|
|
2311
|
+
} else if (keepComment || child.type !== Comment) {
|
|
2312
|
+
ret.push(key != null ? cloneVNode(child, { key }) : child);
|
|
2313
|
+
}
|
|
2314
|
+
}
|
|
2315
|
+
if (keyedFragmentCount > 1) {
|
|
2316
|
+
for (let i = 0; i < ret.length; i++) {
|
|
2317
|
+
ret[i].patchFlag = -2;
|
|
2318
|
+
}
|
|
2319
|
+
}
|
|
2320
|
+
return ret;
|
|
2321
|
+
}
|
|
2005
2322
|
function defineComponent(options, extraOptions) {
|
|
2006
2323
|
return isFunction(options) ? (
|
|
2007
2324
|
// #8326: extend call and options.name access are considered side-effects
|
|
@@ -2373,7 +2690,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
2373
2690
|
const ctx = instance.ctx;
|
|
2374
2691
|
shouldCacheAccess = false;
|
|
2375
2692
|
if (options.beforeCreate) {
|
|
2376
|
-
callHook(options.beforeCreate, instance, "bc");
|
|
2693
|
+
callHook$1(options.beforeCreate, instance, "bc");
|
|
2377
2694
|
}
|
|
2378
2695
|
const {
|
|
2379
2696
|
// state
|
|
@@ -2460,7 +2777,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
2460
2777
|
});
|
|
2461
2778
|
}
|
|
2462
2779
|
if (created) {
|
|
2463
|
-
callHook(created, instance, "c");
|
|
2780
|
+
callHook$1(created, instance, "c");
|
|
2464
2781
|
}
|
|
2465
2782
|
function registerLifecycleHook(register, hook) {
|
|
2466
2783
|
if (isArray(hook)) {
|
|
@@ -2538,7 +2855,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
2538
2855
|
}
|
|
2539
2856
|
}
|
|
2540
2857
|
}
|
|
2541
|
-
function callHook(hook, instance, type) {
|
|
2858
|
+
function callHook$1(hook, instance, type) {
|
|
2542
2859
|
callWithAsyncErrorHandling(
|
|
2543
2860
|
isArray(hook) ? hook.map((h2) => h2.bind(instance.proxy)) : hook.bind(instance.proxy),
|
|
2544
2861
|
instance,
|
|
@@ -5040,6 +5357,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
5040
5357
|
return instance;
|
|
5041
5358
|
}
|
|
5042
5359
|
let currentInstance = null;
|
|
5360
|
+
const getCurrentInstance = () => currentInstance || currentRenderingInstance;
|
|
5043
5361
|
let internalSetCurrentInstance;
|
|
5044
5362
|
let globalCurrentInstanceSetters;
|
|
5045
5363
|
let settersKey = "__VUE_INSTANCE_SETTERS__";
|
|
@@ -5570,6 +5888,268 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
5570
5888
|
}
|
|
5571
5889
|
return key in el;
|
|
5572
5890
|
}
|
|
5891
|
+
const TRANSITION = "transition";
|
|
5892
|
+
const ANIMATION = "animation";
|
|
5893
|
+
const Transition = (props, { slots }) => h$1(BaseTransition, resolveTransitionProps(props), slots);
|
|
5894
|
+
Transition.displayName = "Transition";
|
|
5895
|
+
const DOMTransitionPropsValidators = {
|
|
5896
|
+
name: String,
|
|
5897
|
+
type: String,
|
|
5898
|
+
css: {
|
|
5899
|
+
type: Boolean,
|
|
5900
|
+
default: true
|
|
5901
|
+
},
|
|
5902
|
+
duration: [String, Number, Object],
|
|
5903
|
+
enterFromClass: String,
|
|
5904
|
+
enterActiveClass: String,
|
|
5905
|
+
enterToClass: String,
|
|
5906
|
+
appearFromClass: String,
|
|
5907
|
+
appearActiveClass: String,
|
|
5908
|
+
appearToClass: String,
|
|
5909
|
+
leaveFromClass: String,
|
|
5910
|
+
leaveActiveClass: String,
|
|
5911
|
+
leaveToClass: String
|
|
5912
|
+
};
|
|
5913
|
+
Transition.props = /* @__PURE__ */ extend(
|
|
5914
|
+
{},
|
|
5915
|
+
BaseTransitionPropsValidators,
|
|
5916
|
+
DOMTransitionPropsValidators
|
|
5917
|
+
);
|
|
5918
|
+
const callHook = (hook, args = []) => {
|
|
5919
|
+
if (isArray(hook)) {
|
|
5920
|
+
hook.forEach((h2) => h2(...args));
|
|
5921
|
+
} else if (hook) {
|
|
5922
|
+
hook(...args);
|
|
5923
|
+
}
|
|
5924
|
+
};
|
|
5925
|
+
const hasExplicitCallback = (hook) => {
|
|
5926
|
+
return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false;
|
|
5927
|
+
};
|
|
5928
|
+
function resolveTransitionProps(rawProps) {
|
|
5929
|
+
const baseProps = {};
|
|
5930
|
+
for (const key in rawProps) {
|
|
5931
|
+
if (!(key in DOMTransitionPropsValidators)) {
|
|
5932
|
+
baseProps[key] = rawProps[key];
|
|
5933
|
+
}
|
|
5934
|
+
}
|
|
5935
|
+
if (rawProps.css === false) {
|
|
5936
|
+
return baseProps;
|
|
5937
|
+
}
|
|
5938
|
+
const {
|
|
5939
|
+
name = "v",
|
|
5940
|
+
type,
|
|
5941
|
+
duration,
|
|
5942
|
+
enterFromClass = `${name}-enter-from`,
|
|
5943
|
+
enterActiveClass = `${name}-enter-active`,
|
|
5944
|
+
enterToClass = `${name}-enter-to`,
|
|
5945
|
+
appearFromClass = enterFromClass,
|
|
5946
|
+
appearActiveClass = enterActiveClass,
|
|
5947
|
+
appearToClass = enterToClass,
|
|
5948
|
+
leaveFromClass = `${name}-leave-from`,
|
|
5949
|
+
leaveActiveClass = `${name}-leave-active`,
|
|
5950
|
+
leaveToClass = `${name}-leave-to`
|
|
5951
|
+
} = rawProps;
|
|
5952
|
+
const durations = normalizeDuration(duration);
|
|
5953
|
+
const enterDuration = durations && durations[0];
|
|
5954
|
+
const leaveDuration = durations && durations[1];
|
|
5955
|
+
const {
|
|
5956
|
+
onBeforeEnter,
|
|
5957
|
+
onEnter,
|
|
5958
|
+
onEnterCancelled,
|
|
5959
|
+
onLeave,
|
|
5960
|
+
onLeaveCancelled,
|
|
5961
|
+
onBeforeAppear = onBeforeEnter,
|
|
5962
|
+
onAppear = onEnter,
|
|
5963
|
+
onAppearCancelled = onEnterCancelled
|
|
5964
|
+
} = baseProps;
|
|
5965
|
+
const finishEnter = (el, isAppear, done) => {
|
|
5966
|
+
removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
5967
|
+
removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
|
|
5968
|
+
done && done();
|
|
5969
|
+
};
|
|
5970
|
+
const finishLeave = (el, done) => {
|
|
5971
|
+
el._isLeaving = false;
|
|
5972
|
+
removeTransitionClass(el, leaveFromClass);
|
|
5973
|
+
removeTransitionClass(el, leaveToClass);
|
|
5974
|
+
removeTransitionClass(el, leaveActiveClass);
|
|
5975
|
+
done && done();
|
|
5976
|
+
};
|
|
5977
|
+
const makeEnterHook = (isAppear) => {
|
|
5978
|
+
return (el, done) => {
|
|
5979
|
+
const hook = isAppear ? onAppear : onEnter;
|
|
5980
|
+
const resolve2 = () => finishEnter(el, isAppear, done);
|
|
5981
|
+
callHook(hook, [el, resolve2]);
|
|
5982
|
+
nextFrame(() => {
|
|
5983
|
+
removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
|
|
5984
|
+
addTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
5985
|
+
if (!hasExplicitCallback(hook)) {
|
|
5986
|
+
whenTransitionEnds(el, type, enterDuration, resolve2);
|
|
5987
|
+
}
|
|
5988
|
+
});
|
|
5989
|
+
};
|
|
5990
|
+
};
|
|
5991
|
+
return extend(baseProps, {
|
|
5992
|
+
onBeforeEnter(el) {
|
|
5993
|
+
callHook(onBeforeEnter, [el]);
|
|
5994
|
+
addTransitionClass(el, enterFromClass);
|
|
5995
|
+
addTransitionClass(el, enterActiveClass);
|
|
5996
|
+
},
|
|
5997
|
+
onBeforeAppear(el) {
|
|
5998
|
+
callHook(onBeforeAppear, [el]);
|
|
5999
|
+
addTransitionClass(el, appearFromClass);
|
|
6000
|
+
addTransitionClass(el, appearActiveClass);
|
|
6001
|
+
},
|
|
6002
|
+
onEnter: makeEnterHook(false),
|
|
6003
|
+
onAppear: makeEnterHook(true),
|
|
6004
|
+
onLeave(el, done) {
|
|
6005
|
+
el._isLeaving = true;
|
|
6006
|
+
const resolve2 = () => finishLeave(el, done);
|
|
6007
|
+
addTransitionClass(el, leaveFromClass);
|
|
6008
|
+
forceReflow();
|
|
6009
|
+
addTransitionClass(el, leaveActiveClass);
|
|
6010
|
+
nextFrame(() => {
|
|
6011
|
+
if (!el._isLeaving) {
|
|
6012
|
+
return;
|
|
6013
|
+
}
|
|
6014
|
+
removeTransitionClass(el, leaveFromClass);
|
|
6015
|
+
addTransitionClass(el, leaveToClass);
|
|
6016
|
+
if (!hasExplicitCallback(onLeave)) {
|
|
6017
|
+
whenTransitionEnds(el, type, leaveDuration, resolve2);
|
|
6018
|
+
}
|
|
6019
|
+
});
|
|
6020
|
+
callHook(onLeave, [el, resolve2]);
|
|
6021
|
+
},
|
|
6022
|
+
onEnterCancelled(el) {
|
|
6023
|
+
finishEnter(el, false);
|
|
6024
|
+
callHook(onEnterCancelled, [el]);
|
|
6025
|
+
},
|
|
6026
|
+
onAppearCancelled(el) {
|
|
6027
|
+
finishEnter(el, true);
|
|
6028
|
+
callHook(onAppearCancelled, [el]);
|
|
6029
|
+
},
|
|
6030
|
+
onLeaveCancelled(el) {
|
|
6031
|
+
finishLeave(el);
|
|
6032
|
+
callHook(onLeaveCancelled, [el]);
|
|
6033
|
+
}
|
|
6034
|
+
});
|
|
6035
|
+
}
|
|
6036
|
+
function normalizeDuration(duration) {
|
|
6037
|
+
if (duration == null) {
|
|
6038
|
+
return null;
|
|
6039
|
+
} else if (isObject(duration)) {
|
|
6040
|
+
return [NumberOf(duration.enter), NumberOf(duration.leave)];
|
|
6041
|
+
} else {
|
|
6042
|
+
const n = NumberOf(duration);
|
|
6043
|
+
return [n, n];
|
|
6044
|
+
}
|
|
6045
|
+
}
|
|
6046
|
+
function NumberOf(val) {
|
|
6047
|
+
const res = toNumber(val);
|
|
6048
|
+
return res;
|
|
6049
|
+
}
|
|
6050
|
+
function addTransitionClass(el, cls) {
|
|
6051
|
+
cls.split(/\s+/).forEach((c2) => c2 && el.classList.add(c2));
|
|
6052
|
+
(el._vtc || (el._vtc = /* @__PURE__ */ new Set())).add(cls);
|
|
6053
|
+
}
|
|
6054
|
+
function removeTransitionClass(el, cls) {
|
|
6055
|
+
cls.split(/\s+/).forEach((c2) => c2 && el.classList.remove(c2));
|
|
6056
|
+
const { _vtc } = el;
|
|
6057
|
+
if (_vtc) {
|
|
6058
|
+
_vtc.delete(cls);
|
|
6059
|
+
if (!_vtc.size) {
|
|
6060
|
+
el._vtc = void 0;
|
|
6061
|
+
}
|
|
6062
|
+
}
|
|
6063
|
+
}
|
|
6064
|
+
function nextFrame(cb) {
|
|
6065
|
+
requestAnimationFrame(() => {
|
|
6066
|
+
requestAnimationFrame(cb);
|
|
6067
|
+
});
|
|
6068
|
+
}
|
|
6069
|
+
let endId = 0;
|
|
6070
|
+
function whenTransitionEnds(el, expectedType, explicitTimeout, resolve2) {
|
|
6071
|
+
const id = el._endId = ++endId;
|
|
6072
|
+
const resolveIfNotStale = () => {
|
|
6073
|
+
if (id === el._endId) {
|
|
6074
|
+
resolve2();
|
|
6075
|
+
}
|
|
6076
|
+
};
|
|
6077
|
+
if (explicitTimeout) {
|
|
6078
|
+
return setTimeout(resolveIfNotStale, explicitTimeout);
|
|
6079
|
+
}
|
|
6080
|
+
const { type, timeout, propCount } = getTransitionInfo(el, expectedType);
|
|
6081
|
+
if (!type) {
|
|
6082
|
+
return resolve2();
|
|
6083
|
+
}
|
|
6084
|
+
const endEvent = type + "end";
|
|
6085
|
+
let ended = 0;
|
|
6086
|
+
const end = () => {
|
|
6087
|
+
el.removeEventListener(endEvent, onEnd);
|
|
6088
|
+
resolveIfNotStale();
|
|
6089
|
+
};
|
|
6090
|
+
const onEnd = (e) => {
|
|
6091
|
+
if (e.target === el && ++ended >= propCount) {
|
|
6092
|
+
end();
|
|
6093
|
+
}
|
|
6094
|
+
};
|
|
6095
|
+
setTimeout(() => {
|
|
6096
|
+
if (ended < propCount) {
|
|
6097
|
+
end();
|
|
6098
|
+
}
|
|
6099
|
+
}, timeout + 1);
|
|
6100
|
+
el.addEventListener(endEvent, onEnd);
|
|
6101
|
+
}
|
|
6102
|
+
function getTransitionInfo(el, expectedType) {
|
|
6103
|
+
const styles = window.getComputedStyle(el);
|
|
6104
|
+
const getStyleProperties = (key) => (styles[key] || "").split(", ");
|
|
6105
|
+
const transitionDelays = getStyleProperties(`${TRANSITION}Delay`);
|
|
6106
|
+
const transitionDurations = getStyleProperties(`${TRANSITION}Duration`);
|
|
6107
|
+
const transitionTimeout = getTimeout(transitionDelays, transitionDurations);
|
|
6108
|
+
const animationDelays = getStyleProperties(`${ANIMATION}Delay`);
|
|
6109
|
+
const animationDurations = getStyleProperties(`${ANIMATION}Duration`);
|
|
6110
|
+
const animationTimeout = getTimeout(animationDelays, animationDurations);
|
|
6111
|
+
let type = null;
|
|
6112
|
+
let timeout = 0;
|
|
6113
|
+
let propCount = 0;
|
|
6114
|
+
if (expectedType === TRANSITION) {
|
|
6115
|
+
if (transitionTimeout > 0) {
|
|
6116
|
+
type = TRANSITION;
|
|
6117
|
+
timeout = transitionTimeout;
|
|
6118
|
+
propCount = transitionDurations.length;
|
|
6119
|
+
}
|
|
6120
|
+
} else if (expectedType === ANIMATION) {
|
|
6121
|
+
if (animationTimeout > 0) {
|
|
6122
|
+
type = ANIMATION;
|
|
6123
|
+
timeout = animationTimeout;
|
|
6124
|
+
propCount = animationDurations.length;
|
|
6125
|
+
}
|
|
6126
|
+
} else {
|
|
6127
|
+
timeout = Math.max(transitionTimeout, animationTimeout);
|
|
6128
|
+
type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null;
|
|
6129
|
+
propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0;
|
|
6130
|
+
}
|
|
6131
|
+
const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test(
|
|
6132
|
+
getStyleProperties(`${TRANSITION}Property`).toString()
|
|
6133
|
+
);
|
|
6134
|
+
return {
|
|
6135
|
+
type,
|
|
6136
|
+
timeout,
|
|
6137
|
+
propCount,
|
|
6138
|
+
hasTransform
|
|
6139
|
+
};
|
|
6140
|
+
}
|
|
6141
|
+
function getTimeout(delays, durations) {
|
|
6142
|
+
while (delays.length < durations.length) {
|
|
6143
|
+
delays = delays.concat(delays);
|
|
6144
|
+
}
|
|
6145
|
+
return Math.max(...durations.map((d2, i) => toMs(d2) + toMs(delays[i])));
|
|
6146
|
+
}
|
|
6147
|
+
function toMs(s) {
|
|
6148
|
+
return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
|
|
6149
|
+
}
|
|
6150
|
+
function forceReflow() {
|
|
6151
|
+
return document.body.offsetHeight;
|
|
6152
|
+
}
|
|
5573
6153
|
const getModelAssigner = (vnode) => {
|
|
5574
6154
|
const fn = vnode.props["onUpdate:modelValue"] || false;
|
|
5575
6155
|
return isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn;
|
|
@@ -7865,7 +8445,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
7865
8445
|
resetHighlightIndex
|
|
7866
8446
|
};
|
|
7867
8447
|
});
|
|
7868
|
-
const _hoisted_1$
|
|
8448
|
+
const _hoisted_1$1e = { id: "lupa-search-box-input-container" };
|
|
7869
8449
|
const _hoisted_2$P = { class: "lupa-input-clear" };
|
|
7870
8450
|
const _hoisted_3$A = { id: "lupa-search-box-input" };
|
|
7871
8451
|
const _hoisted_4$s = ["value"];
|
|
@@ -7874,7 +8454,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
7874
8454
|
key: 0,
|
|
7875
8455
|
class: "lupa-close-label"
|
|
7876
8456
|
};
|
|
7877
|
-
const _sfc_main$
|
|
8457
|
+
const _sfc_main$1m = /* @__PURE__ */ defineComponent({
|
|
7878
8458
|
__name: "SearchBoxInput",
|
|
7879
8459
|
props: {
|
|
7880
8460
|
options: {},
|
|
@@ -7955,7 +8535,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
7955
8535
|
};
|
|
7956
8536
|
__expose({ focus });
|
|
7957
8537
|
return (_ctx, _cache) => {
|
|
7958
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
8538
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1e, [
|
|
7959
8539
|
createBaseVNode("div", _hoisted_2$P, [
|
|
7960
8540
|
createBaseVNode("div", {
|
|
7961
8541
|
class: normalizeClass(["lupa-input-clear-content", { "lupa-input-clear-filled": inputValue.value }]),
|
|
@@ -7997,7 +8577,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
7997
8577
|
};
|
|
7998
8578
|
}
|
|
7999
8579
|
});
|
|
8000
|
-
const _sfc_main$
|
|
8580
|
+
const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
8001
8581
|
__name: "SearchBoxMoreResults",
|
|
8002
8582
|
props: {
|
|
8003
8583
|
labels: {},
|
|
@@ -8029,9 +8609,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8029
8609
|
};
|
|
8030
8610
|
}
|
|
8031
8611
|
});
|
|
8032
|
-
const _hoisted_1$
|
|
8612
|
+
const _hoisted_1$1d = { class: "lupa-search-box-history-item" };
|
|
8033
8613
|
const _hoisted_2$O = { class: "lupa-search-box-history-item-content" };
|
|
8034
|
-
const _sfc_main$
|
|
8614
|
+
const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
8035
8615
|
__name: "SearchBoxHistoryItem",
|
|
8036
8616
|
props: {
|
|
8037
8617
|
item: {},
|
|
@@ -8047,7 +8627,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8047
8627
|
emit2("click", { query: props.item });
|
|
8048
8628
|
};
|
|
8049
8629
|
return (_ctx, _cache) => {
|
|
8050
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
8630
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1d, [
|
|
8051
8631
|
createBaseVNode("div", _hoisted_2$O, [
|
|
8052
8632
|
createBaseVNode("div", {
|
|
8053
8633
|
class: normalizeClass(["lupa-search-box-history-item-text", { "lupa-search-box-history-item-highlighted": _ctx.highlighted }]),
|
|
@@ -8062,11 +8642,11 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8062
8642
|
};
|
|
8063
8643
|
}
|
|
8064
8644
|
});
|
|
8065
|
-
const _hoisted_1$
|
|
8645
|
+
const _hoisted_1$1c = {
|
|
8066
8646
|
key: 0,
|
|
8067
8647
|
class: "lupa-search-box-history-panel"
|
|
8068
8648
|
};
|
|
8069
|
-
const _sfc_main$
|
|
8649
|
+
const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
8070
8650
|
__name: "SearchBoxHistoryPanel",
|
|
8071
8651
|
props: {
|
|
8072
8652
|
options: {}
|
|
@@ -8107,9 +8687,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8107
8687
|
}
|
|
8108
8688
|
};
|
|
8109
8689
|
return (_ctx, _cache) => {
|
|
8110
|
-
return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
8690
|
+
return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$1c, [
|
|
8111
8691
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(history), (item, index) => {
|
|
8112
|
-
return openBlock(), createBlock(_sfc_main$
|
|
8692
|
+
return openBlock(), createBlock(_sfc_main$1k, {
|
|
8113
8693
|
key: item,
|
|
8114
8694
|
item,
|
|
8115
8695
|
highlighted: index === highlightIndex.value,
|
|
@@ -8125,19 +8705,19 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8125
8705
|
};
|
|
8126
8706
|
}
|
|
8127
8707
|
});
|
|
8128
|
-
const _hoisted_1$
|
|
8129
|
-
const _sfc_main$
|
|
8708
|
+
const _hoisted_1$1b = { class: "lupa-search-box-no-results" };
|
|
8709
|
+
const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
8130
8710
|
__name: "SearchBoxNoResults",
|
|
8131
8711
|
props: {
|
|
8132
8712
|
labels: {}
|
|
8133
8713
|
},
|
|
8134
8714
|
setup(__props) {
|
|
8135
8715
|
return (_ctx, _cache) => {
|
|
8136
|
-
return openBlock(), createElementBlock("p", _hoisted_1$
|
|
8716
|
+
return openBlock(), createElementBlock("p", _hoisted_1$1b, toDisplayString(_ctx.labels.noResults), 1);
|
|
8137
8717
|
};
|
|
8138
8718
|
}
|
|
8139
8719
|
});
|
|
8140
|
-
const _hoisted_1$
|
|
8720
|
+
const _hoisted_1$1a = ["innerHTML"];
|
|
8141
8721
|
const _hoisted_2$N = {
|
|
8142
8722
|
key: 1,
|
|
8143
8723
|
"data-cy": "lupa-suggestion-value",
|
|
@@ -8156,7 +8736,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8156
8736
|
class: "lupa-suggestion-facet-value",
|
|
8157
8737
|
"data-cy": "lupa-suggestion-facet-value"
|
|
8158
8738
|
};
|
|
8159
|
-
const _sfc_main$
|
|
8739
|
+
const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
8160
8740
|
__name: "SearchBoxSuggestion",
|
|
8161
8741
|
props: {
|
|
8162
8742
|
suggestion: {},
|
|
@@ -8192,7 +8772,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8192
8772
|
class: "lupa-suggestion-value",
|
|
8193
8773
|
"data-cy": "lupa-suggestion-value",
|
|
8194
8774
|
innerHTML: _ctx.suggestion.displayHighlight
|
|
8195
|
-
}, null, 8, _hoisted_1$
|
|
8775
|
+
}, null, 8, _hoisted_1$1a)) : (openBlock(), createElementBlock("div", _hoisted_2$N, toDisplayString(_ctx.suggestion.display), 1)),
|
|
8196
8776
|
_ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$z, [
|
|
8197
8777
|
createBaseVNode("span", _hoisted_4$r, toDisplayString(facetLabel.value), 1),
|
|
8198
8778
|
createBaseVNode("span", _hoisted_5$g, toDisplayString(_ctx.suggestion.facet.title), 1)
|
|
@@ -8201,11 +8781,11 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8201
8781
|
};
|
|
8202
8782
|
}
|
|
8203
8783
|
});
|
|
8204
|
-
const _hoisted_1$
|
|
8784
|
+
const _hoisted_1$19 = {
|
|
8205
8785
|
id: "lupa-search-box-suggestions",
|
|
8206
8786
|
"data-cy": "lupa-search-box-suggestions"
|
|
8207
8787
|
};
|
|
8208
|
-
const _sfc_main$
|
|
8788
|
+
const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
8209
8789
|
__name: "SearchBoxSuggestions",
|
|
8210
8790
|
props: {
|
|
8211
8791
|
items: {},
|
|
@@ -8265,9 +8845,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8265
8845
|
});
|
|
8266
8846
|
});
|
|
8267
8847
|
return (_ctx, _cache) => {
|
|
8268
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
8848
|
+
return openBlock(), createElementBlock("div", _hoisted_1$19, [
|
|
8269
8849
|
(openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item, index) => {
|
|
8270
|
-
return openBlock(), createBlock(_sfc_main$
|
|
8850
|
+
return openBlock(), createBlock(_sfc_main$1h, {
|
|
8271
8851
|
key: getSuggestionKey(item),
|
|
8272
8852
|
class: normalizeClass(["lupa-suggestion", index === highlightedIndex.value ? "lupa-suggestion-highlighted" : ""]),
|
|
8273
8853
|
suggestion: item,
|
|
@@ -8295,7 +8875,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8295
8875
|
}, timeout);
|
|
8296
8876
|
};
|
|
8297
8877
|
};
|
|
8298
|
-
const _sfc_main$
|
|
8878
|
+
const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
8299
8879
|
__name: "SearchBoxSuggestionsWrapper",
|
|
8300
8880
|
props: {
|
|
8301
8881
|
panel: {},
|
|
@@ -8336,7 +8916,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8336
8916
|
};
|
|
8337
8917
|
const getSuggestionsDebounced = debounce$1(getSuggestions, props.debounce);
|
|
8338
8918
|
return (_ctx, _cache) => {
|
|
8339
|
-
return openBlock(), createBlock(_sfc_main$
|
|
8919
|
+
return openBlock(), createBlock(_sfc_main$1g, {
|
|
8340
8920
|
items: searchResult.value,
|
|
8341
8921
|
highlight: _ctx.panel.highlight,
|
|
8342
8922
|
queryKey: _ctx.panel.queryKey,
|
|
@@ -8424,8 +9004,23 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8424
9004
|
}
|
|
8425
9005
|
return (_c = (_b = (_a = parts == null ? void 0 : parts.map((part) => part.replace(/(^\/+|\/+$)/g, ""))) == null ? void 0 : _a.filter((part) => part !== "")) == null ? void 0 : _b.join("/")) != null ? _c : "";
|
|
8426
9006
|
};
|
|
8427
|
-
const
|
|
8428
|
-
const
|
|
9007
|
+
const checkHasFullImageUrl = (imageUrl) => typeof imageUrl === "string" && (imageUrl.indexOf("http://") === 0 || imageUrl.indexOf("https://") === 0);
|
|
9008
|
+
const computeImageUrl = (imageUrl, rootImageUrl) => {
|
|
9009
|
+
const mainUrl = Array.isArray(imageUrl) ? imageUrl[0] : imageUrl;
|
|
9010
|
+
if (checkHasFullImageUrl(mainUrl)) {
|
|
9011
|
+
return mainUrl;
|
|
9012
|
+
}
|
|
9013
|
+
return rootImageUrl ? joinUrlParts(rootImageUrl, mainUrl) : `/${mainUrl}`;
|
|
9014
|
+
};
|
|
9015
|
+
const replaceImageWithPlaceholder = (e, placeholder) => {
|
|
9016
|
+
var _a;
|
|
9017
|
+
const targetImage = e == null ? void 0 : e.target;
|
|
9018
|
+
if (targetImage && !((_a = targetImage == null ? void 0 : targetImage.src) == null ? void 0 : _a.includes(placeholder))) {
|
|
9019
|
+
targetImage.src = placeholder;
|
|
9020
|
+
}
|
|
9021
|
+
};
|
|
9022
|
+
const _hoisted_1$18 = ["src"];
|
|
9023
|
+
const _sfc_main$1e = /* @__PURE__ */ defineComponent({
|
|
8429
9024
|
__name: "ProductImage",
|
|
8430
9025
|
props: {
|
|
8431
9026
|
item: {},
|
|
@@ -8435,33 +9030,73 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8435
9030
|
},
|
|
8436
9031
|
setup(__props) {
|
|
8437
9032
|
const props = __props;
|
|
9033
|
+
const isHover = ref(false);
|
|
9034
|
+
const hoverImageIndex = ref(0);
|
|
9035
|
+
const hoverInterval = ref(0);
|
|
8438
9036
|
const rootImageUrl = computed(() => props.options.baseUrl);
|
|
8439
9037
|
const image = computed(() => props.item[props.options.key]);
|
|
8440
9038
|
const hasFullImageUrl = computed(() => {
|
|
8441
|
-
|
|
8442
|
-
return typeof imageUrl2 === "string" && (imageUrl2.indexOf("http://") === 0 || imageUrl2.indexOf("https://") === 0);
|
|
9039
|
+
return checkHasFullImageUrl(image.value);
|
|
8443
9040
|
});
|
|
8444
9041
|
const imageUrl = computed(() => {
|
|
8445
|
-
|
|
8446
|
-
if (hasFullImageUrl.value) {
|
|
8447
|
-
return imageUrl2;
|
|
8448
|
-
}
|
|
8449
|
-
return rootImageUrl.value ? joinUrlParts(rootImageUrl.value, imageUrl2) : `/${imageUrl2}`;
|
|
9042
|
+
return computeImageUrl(image.value, rootImageUrl.value);
|
|
8450
9043
|
});
|
|
8451
9044
|
const hasImage = computed(() => Boolean(hasFullImageUrl.value || image.value));
|
|
8452
9045
|
const placeholder = computed(() => props.options.placeholder);
|
|
8453
|
-
const
|
|
9046
|
+
const finalMainImageUrl = computed(() => {
|
|
8454
9047
|
if (props.options.customUrl) {
|
|
8455
9048
|
return props.options.customUrl(props.item);
|
|
8456
9049
|
}
|
|
8457
9050
|
return hasImage.value ? imageUrl.value : placeholder.value;
|
|
8458
9051
|
});
|
|
8459
|
-
const
|
|
9052
|
+
const hoverImages = computed(() => {
|
|
9053
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
9054
|
+
if ((_a = props.options.hoverImages) == null ? void 0 : _a.key) {
|
|
9055
|
+
return (_g = (_f = (_e = props.item[(_b = props.options.hoverImages) == null ? void 0 : _b.key]) == null ? void 0 : _e.slice(0, (_d = (_c = props.options.hoverImages) == null ? void 0 : _c.maxImages) != null ? _d : 5)) == null ? void 0 : _f.map((i) => computeImageUrl(i, rootImageUrl.value))) != null ? _g : [];
|
|
9056
|
+
}
|
|
9057
|
+
if (props.options.hoverImages) {
|
|
9058
|
+
return (_l = (_k = (_h = props.options.hoverImages) == null ? void 0 : _h.display(props.item)) == null ? void 0 : _k.slice(0, (_j = (_i = props.options.hoverImages) == null ? void 0 : _i.maxImages) != null ? _j : 5)) != null ? _l : [];
|
|
9059
|
+
}
|
|
9060
|
+
return [];
|
|
9061
|
+
});
|
|
9062
|
+
const hasHoverImages = computed(() => {
|
|
8460
9063
|
var _a;
|
|
8461
|
-
|
|
8462
|
-
|
|
8463
|
-
|
|
9064
|
+
return Boolean((_a = hoverImages.value) == null ? void 0 : _a.length);
|
|
9065
|
+
});
|
|
9066
|
+
const replaceWithPlaceholder = (e) => {
|
|
9067
|
+
replaceImageWithPlaceholder(e, placeholder.value);
|
|
9068
|
+
};
|
|
9069
|
+
const setNextHoverImage = () => {
|
|
9070
|
+
hoverImageIndex.value = (hoverImageIndex.value + 1) % hoverImages.value.length;
|
|
9071
|
+
};
|
|
9072
|
+
const currentHoverImage = computed(() => {
|
|
9073
|
+
return hoverImages.value[hoverImageIndex.value];
|
|
9074
|
+
});
|
|
9075
|
+
const finalUrl = computed(() => {
|
|
9076
|
+
return isHover.value ? currentHoverImage.value : finalMainImageUrl.value;
|
|
9077
|
+
});
|
|
9078
|
+
const handleMouseEnter = () => {
|
|
9079
|
+
var _a, _b;
|
|
9080
|
+
if (!hasHoverImages.value) {
|
|
9081
|
+
return;
|
|
9082
|
+
}
|
|
9083
|
+
isHover.value = true;
|
|
9084
|
+
hoverImageIndex.value = 0;
|
|
9085
|
+
if (hoverInterval.value) {
|
|
9086
|
+
return;
|
|
8464
9087
|
}
|
|
9088
|
+
hoverInterval.value = setInterval(
|
|
9089
|
+
setNextHoverImage,
|
|
9090
|
+
(_b = (_a = props.options.hoverImages) == null ? void 0 : _a.cycleInterval) != null ? _b : 2e3
|
|
9091
|
+
);
|
|
9092
|
+
};
|
|
9093
|
+
const handleMouseLeave = () => {
|
|
9094
|
+
if (!hasHoverImages.value) {
|
|
9095
|
+
return;
|
|
9096
|
+
}
|
|
9097
|
+
isHover.value = false;
|
|
9098
|
+
clearInterval(hoverInterval.value);
|
|
9099
|
+
hoverInterval.value = 0;
|
|
8465
9100
|
};
|
|
8466
9101
|
const imageAlt = computed(() => {
|
|
8467
9102
|
const alt = props.options.alt;
|
|
@@ -8470,20 +9105,48 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8470
9105
|
}
|
|
8471
9106
|
return "";
|
|
8472
9107
|
});
|
|
9108
|
+
const preloadImages = (images) => {
|
|
9109
|
+
images.forEach((src) => {
|
|
9110
|
+
const img = new Image();
|
|
9111
|
+
img.src = src;
|
|
9112
|
+
});
|
|
9113
|
+
};
|
|
9114
|
+
onMounted(() => {
|
|
9115
|
+
if (hasHoverImages.value) {
|
|
9116
|
+
preloadImages(hoverImages.value);
|
|
9117
|
+
}
|
|
9118
|
+
});
|
|
9119
|
+
watch(hoverImages, (newImages) => {
|
|
9120
|
+
if (newImages.length) {
|
|
9121
|
+
preloadImages(newImages);
|
|
9122
|
+
}
|
|
9123
|
+
});
|
|
9124
|
+
onBeforeUnmount(() => {
|
|
9125
|
+
clearInterval(hoverInterval.value);
|
|
9126
|
+
});
|
|
8473
9127
|
return (_ctx, _cache) => {
|
|
8474
|
-
var _a, _b;
|
|
8475
9128
|
return openBlock(), createElementBlock("div", {
|
|
8476
|
-
class: normalizeClass(
|
|
9129
|
+
class: normalizeClass({ [_ctx.wrapperClass]: Boolean(_ctx.wrapperClass), "lupa-images-hover": isHover.value }),
|
|
9130
|
+
onMouseenter: handleMouseEnter,
|
|
9131
|
+
onMouseleave: handleMouseLeave
|
|
8477
9132
|
}, [
|
|
8478
|
-
|
|
8479
|
-
|
|
8480
|
-
|
|
8481
|
-
|
|
8482
|
-
|
|
9133
|
+
createVNode(Transition, { name: "lupa-fade" }, {
|
|
9134
|
+
default: withCtx(() => [
|
|
9135
|
+
(openBlock(), createElementBlock("img", mergeProps({
|
|
9136
|
+
class: ["lupa-images-hover-image", { [_ctx.imageClass]: true, "lupa-images-hover-image": isHover.value }],
|
|
9137
|
+
src: finalUrl.value
|
|
9138
|
+
}, { alt: imageAlt.value ? imageAlt.value : void 0 }, {
|
|
9139
|
+
onError: replaceWithPlaceholder,
|
|
9140
|
+
key: finalUrl.value
|
|
9141
|
+
}), null, 16, _hoisted_1$18))
|
|
9142
|
+
]),
|
|
9143
|
+
_: 1
|
|
9144
|
+
})
|
|
9145
|
+
], 34);
|
|
8483
9146
|
};
|
|
8484
9147
|
}
|
|
8485
9148
|
});
|
|
8486
|
-
const _sfc_main$
|
|
9149
|
+
const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
8487
9150
|
__name: "SearchBoxProductImage",
|
|
8488
9151
|
props: {
|
|
8489
9152
|
item: {},
|
|
@@ -8491,7 +9154,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8491
9154
|
},
|
|
8492
9155
|
setup(__props) {
|
|
8493
9156
|
return (_ctx, _cache) => {
|
|
8494
|
-
return openBlock(), createBlock(_sfc_main$
|
|
9157
|
+
return openBlock(), createBlock(_sfc_main$1e, {
|
|
8495
9158
|
item: _ctx.item,
|
|
8496
9159
|
options: _ctx.options,
|
|
8497
9160
|
"wrapper-class": "lupa-search-box-image-wrapper",
|
|
@@ -8500,12 +9163,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8500
9163
|
};
|
|
8501
9164
|
}
|
|
8502
9165
|
});
|
|
8503
|
-
const _hoisted_1$
|
|
9166
|
+
const _hoisted_1$17 = ["innerHTML"];
|
|
8504
9167
|
const _hoisted_2$M = {
|
|
8505
9168
|
key: 1,
|
|
8506
9169
|
class: "lupa-search-box-product-title"
|
|
8507
9170
|
};
|
|
8508
|
-
const _sfc_main$
|
|
9171
|
+
const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
8509
9172
|
__name: "SearchBoxProductTitle",
|
|
8510
9173
|
props: {
|
|
8511
9174
|
item: {},
|
|
@@ -8525,18 +9188,18 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8525
9188
|
key: 0,
|
|
8526
9189
|
class: "lupa-search-box-product-title",
|
|
8527
9190
|
innerHTML: title.value
|
|
8528
|
-
}, null, 8, _hoisted_1$
|
|
9191
|
+
}, null, 8, _hoisted_1$17)) : (openBlock(), createElementBlock("div", _hoisted_2$M, [
|
|
8529
9192
|
createBaseVNode("strong", null, toDisplayString(title.value), 1)
|
|
8530
9193
|
]));
|
|
8531
9194
|
};
|
|
8532
9195
|
}
|
|
8533
9196
|
});
|
|
8534
|
-
const _hoisted_1$
|
|
9197
|
+
const _hoisted_1$16 = ["innerHTML"];
|
|
8535
9198
|
const _hoisted_2$L = {
|
|
8536
9199
|
key: 1,
|
|
8537
9200
|
class: "lupa-search-box-product-description"
|
|
8538
9201
|
};
|
|
8539
|
-
const _sfc_main$
|
|
9202
|
+
const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
8540
9203
|
__name: "SearchBoxProductDescription",
|
|
8541
9204
|
props: {
|
|
8542
9205
|
item: {},
|
|
@@ -8556,12 +9219,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8556
9219
|
key: 0,
|
|
8557
9220
|
class: "lupa-search-box-product-description",
|
|
8558
9221
|
innerHTML: description.value
|
|
8559
|
-
}, null, 8, _hoisted_1$
|
|
9222
|
+
}, null, 8, _hoisted_1$16)) : (openBlock(), createElementBlock("div", _hoisted_2$L, toDisplayString(description.value), 1));
|
|
8560
9223
|
};
|
|
8561
9224
|
}
|
|
8562
9225
|
});
|
|
8563
|
-
const _hoisted_1$
|
|
8564
|
-
const _sfc_main$
|
|
9226
|
+
const _hoisted_1$15 = { class: "lupa-search-box-product-price" };
|
|
9227
|
+
const _sfc_main$1a = /* @__PURE__ */ defineComponent({
|
|
8565
9228
|
__name: "SearchBoxProductPrice",
|
|
8566
9229
|
props: {
|
|
8567
9230
|
item: {},
|
|
@@ -8579,14 +9242,14 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8579
9242
|
);
|
|
8580
9243
|
});
|
|
8581
9244
|
return (_ctx, _cache) => {
|
|
8582
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9245
|
+
return openBlock(), createElementBlock("div", _hoisted_1$15, [
|
|
8583
9246
|
createBaseVNode("strong", null, toDisplayString(price.value), 1)
|
|
8584
9247
|
]);
|
|
8585
9248
|
};
|
|
8586
9249
|
}
|
|
8587
9250
|
});
|
|
8588
|
-
const _hoisted_1$
|
|
8589
|
-
const _sfc_main$
|
|
9251
|
+
const _hoisted_1$14 = { class: "lupa-search-box-product-regular-price" };
|
|
9252
|
+
const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
8590
9253
|
__name: "SearchBoxProductRegularPrice",
|
|
8591
9254
|
props: {
|
|
8592
9255
|
item: {},
|
|
@@ -8604,16 +9267,16 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8604
9267
|
);
|
|
8605
9268
|
});
|
|
8606
9269
|
return (_ctx, _cache) => {
|
|
8607
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9270
|
+
return openBlock(), createElementBlock("div", _hoisted_1$14, toDisplayString(price.value), 1);
|
|
8608
9271
|
};
|
|
8609
9272
|
}
|
|
8610
9273
|
});
|
|
8611
|
-
const _hoisted_1$
|
|
9274
|
+
const _hoisted_1$13 = ["innerHTML"];
|
|
8612
9275
|
const _hoisted_2$K = { key: 0 };
|
|
8613
9276
|
const _hoisted_3$y = { key: 1 };
|
|
8614
9277
|
const _hoisted_4$q = { class: "lupa-search-box-custom-label" };
|
|
8615
9278
|
const _hoisted_5$f = { class: "lupa-search-box-custom-text" };
|
|
8616
|
-
const _sfc_main$
|
|
9279
|
+
const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
8617
9280
|
__name: "SearchBoxProductCustom",
|
|
8618
9281
|
props: {
|
|
8619
9282
|
item: {},
|
|
@@ -8639,7 +9302,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8639
9302
|
key: 0,
|
|
8640
9303
|
class: [className.value, "lupa-search-box-product-custom"],
|
|
8641
9304
|
innerHTML: text.value
|
|
8642
|
-
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$
|
|
9305
|
+
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$13)) : (openBlock(), createElementBlock("div", mergeProps({
|
|
8643
9306
|
key: 1,
|
|
8644
9307
|
class: [className.value, "lupa-search-box-product-custom"]
|
|
8645
9308
|
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
|
|
@@ -8651,8 +9314,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8651
9314
|
};
|
|
8652
9315
|
}
|
|
8653
9316
|
});
|
|
8654
|
-
const _hoisted_1$
|
|
8655
|
-
const _sfc_main$
|
|
9317
|
+
const _hoisted_1$12 = ["innerHTML"];
|
|
9318
|
+
const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
8656
9319
|
__name: "SearchBoxProductCustomHtml",
|
|
8657
9320
|
props: {
|
|
8658
9321
|
item: {},
|
|
@@ -8672,7 +9335,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8672
9335
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
8673
9336
|
class: className.value,
|
|
8674
9337
|
innerHTML: text.value
|
|
8675
|
-
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$
|
|
9338
|
+
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$12);
|
|
8676
9339
|
};
|
|
8677
9340
|
}
|
|
8678
9341
|
});
|
|
@@ -8870,10 +9533,10 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8870
9533
|
clearSearchResult
|
|
8871
9534
|
};
|
|
8872
9535
|
});
|
|
8873
|
-
const _hoisted_1$
|
|
9536
|
+
const _hoisted_1$11 = { class: "lupa-search-box-add-to-cart-wrapper" };
|
|
8874
9537
|
const _hoisted_2$J = { class: "lupa-search-box-product-addtocart" };
|
|
8875
9538
|
const _hoisted_3$x = ["onClick", "disabled"];
|
|
8876
|
-
const _sfc_main$
|
|
9539
|
+
const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
8877
9540
|
__name: "SearchBoxProductAddToCart",
|
|
8878
9541
|
props: {
|
|
8879
9542
|
item: {},
|
|
@@ -8900,7 +9563,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8900
9563
|
loading.value = false;
|
|
8901
9564
|
});
|
|
8902
9565
|
return (_ctx, _cache) => {
|
|
8903
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9566
|
+
return openBlock(), createElementBlock("div", _hoisted_1$11, [
|
|
8904
9567
|
createBaseVNode("div", _hoisted_2$J, [
|
|
8905
9568
|
createBaseVNode("button", {
|
|
8906
9569
|
onClick: withModifiers(handleClick, ["stop", "prevent"]),
|
|
@@ -8914,23 +9577,23 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8914
9577
|
};
|
|
8915
9578
|
}
|
|
8916
9579
|
});
|
|
8917
|
-
const _hoisted_1
|
|
9580
|
+
const _hoisted_1$10 = {
|
|
8918
9581
|
key: 1,
|
|
8919
9582
|
class: "lupa-search-box-element-badge-wrapper"
|
|
8920
9583
|
};
|
|
8921
9584
|
const __default__$4 = {
|
|
8922
9585
|
components: {
|
|
8923
|
-
SearchBoxProductImage: _sfc_main$
|
|
8924
|
-
SearchBoxProductTitle: _sfc_main$
|
|
8925
|
-
SearchBoxProductDescription: _sfc_main$
|
|
8926
|
-
SearchBoxProductPrice: _sfc_main$
|
|
8927
|
-
SearchBoxProductRegularPrice: _sfc_main$
|
|
8928
|
-
SearchBoxProductCustom: _sfc_main$
|
|
8929
|
-
SearchBoxProductCustomHtml: _sfc_main$
|
|
8930
|
-
SearchBoxProductAddToCart: _sfc_main$
|
|
9586
|
+
SearchBoxProductImage: _sfc_main$1d,
|
|
9587
|
+
SearchBoxProductTitle: _sfc_main$1c,
|
|
9588
|
+
SearchBoxProductDescription: _sfc_main$1b,
|
|
9589
|
+
SearchBoxProductPrice: _sfc_main$1a,
|
|
9590
|
+
SearchBoxProductRegularPrice: _sfc_main$19,
|
|
9591
|
+
SearchBoxProductCustom: _sfc_main$18,
|
|
9592
|
+
SearchBoxProductCustomHtml: _sfc_main$17,
|
|
9593
|
+
SearchBoxProductAddToCart: _sfc_main$16
|
|
8931
9594
|
}
|
|
8932
9595
|
};
|
|
8933
|
-
const _sfc_main$
|
|
9596
|
+
const _sfc_main$15 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$4), {
|
|
8934
9597
|
__name: "SearchBoxProductElement",
|
|
8935
9598
|
props: {
|
|
8936
9599
|
item: {},
|
|
@@ -8988,7 +9651,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8988
9651
|
class: normalizeClass({ "lupa-loading-dynamic-data": isLoadingDynamicData((_a = _ctx.item) == null ? void 0 : _a.id) }),
|
|
8989
9652
|
inStock: _ctx.isInStock
|
|
8990
9653
|
}, null, 8, ["item", "options", "labels", "class", "inStock"])) : createCommentVNode("", true)
|
|
8991
|
-
], 64)) : (openBlock(), createElementBlock("div", _hoisted_1
|
|
9654
|
+
], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$10, [
|
|
8992
9655
|
displayElement.value ? (openBlock(), createBlock(resolveDynamicComponent(elementComponent.value), {
|
|
8993
9656
|
key: 0,
|
|
8994
9657
|
item: enhancedItem.value,
|
|
@@ -9002,14 +9665,14 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9002
9665
|
};
|
|
9003
9666
|
}
|
|
9004
9667
|
}));
|
|
9005
|
-
const _hoisted_1
|
|
9668
|
+
const _hoisted_1$$ = { class: "lupa-badge-title" };
|
|
9006
9669
|
const _hoisted_2$I = ["src"];
|
|
9007
9670
|
const _hoisted_3$w = { key: 1 };
|
|
9008
9671
|
const _hoisted_4$p = {
|
|
9009
9672
|
key: 0,
|
|
9010
9673
|
class: "lupa-badge-full-text"
|
|
9011
9674
|
};
|
|
9012
|
-
const _sfc_main$
|
|
9675
|
+
const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
9013
9676
|
__name: "SearchResultGeneratedBadge",
|
|
9014
9677
|
props: {
|
|
9015
9678
|
options: {},
|
|
@@ -9042,7 +9705,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9042
9705
|
class: normalizeClass(["lupa-dynamic-badge", customClassName.value]),
|
|
9043
9706
|
style: normalizeStyle({ background: _ctx.badge.backgroundColor, color: _ctx.badge.color })
|
|
9044
9707
|
}, [
|
|
9045
|
-
createBaseVNode("span", _hoisted_1
|
|
9708
|
+
createBaseVNode("span", _hoisted_1$$, [
|
|
9046
9709
|
image.value ? (openBlock(), createElementBlock("img", {
|
|
9047
9710
|
key: 0,
|
|
9048
9711
|
src: image.value
|
|
@@ -9054,8 +9717,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9054
9717
|
};
|
|
9055
9718
|
}
|
|
9056
9719
|
});
|
|
9057
|
-
const _hoisted_1$
|
|
9058
|
-
const _sfc_main$
|
|
9720
|
+
const _hoisted_1$_ = { class: "lupa-generated-badges" };
|
|
9721
|
+
const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
9059
9722
|
__name: "SearchResultGeneratedBadges",
|
|
9060
9723
|
props: {
|
|
9061
9724
|
options: {}
|
|
@@ -9081,9 +9744,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9081
9744
|
})).filter((b) => Boolean(b.id));
|
|
9082
9745
|
});
|
|
9083
9746
|
return (_ctx, _cache) => {
|
|
9084
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9747
|
+
return openBlock(), createElementBlock("div", _hoisted_1$_, [
|
|
9085
9748
|
(openBlock(true), createElementBlock(Fragment, null, renderList(badges.value, (badge) => {
|
|
9086
|
-
return openBlock(), createBlock(_sfc_main$
|
|
9749
|
+
return openBlock(), createBlock(_sfc_main$14, {
|
|
9087
9750
|
key: badge.id,
|
|
9088
9751
|
badge,
|
|
9089
9752
|
options: _ctx.options
|
|
@@ -9093,8 +9756,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9093
9756
|
};
|
|
9094
9757
|
}
|
|
9095
9758
|
});
|
|
9096
|
-
const _hoisted_1$
|
|
9097
|
-
const _sfc_main$
|
|
9759
|
+
const _hoisted_1$Z = ["innerHTML"];
|
|
9760
|
+
const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
9098
9761
|
__name: "CustomBadge",
|
|
9099
9762
|
props: {
|
|
9100
9763
|
badge: {}
|
|
@@ -9113,12 +9776,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9113
9776
|
return openBlock(), createElementBlock("div", {
|
|
9114
9777
|
class: normalizeClass(className.value),
|
|
9115
9778
|
innerHTML: text.value
|
|
9116
|
-
}, null, 10, _hoisted_1$
|
|
9779
|
+
}, null, 10, _hoisted_1$Z);
|
|
9117
9780
|
};
|
|
9118
9781
|
}
|
|
9119
9782
|
});
|
|
9120
|
-
const _hoisted_1$
|
|
9121
|
-
const _sfc_main$
|
|
9783
|
+
const _hoisted_1$Y = { class: "lupa-text-badges" };
|
|
9784
|
+
const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
9122
9785
|
__name: "TextBadge",
|
|
9123
9786
|
props: {
|
|
9124
9787
|
badge: {}
|
|
@@ -9133,7 +9796,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9133
9796
|
return badges.value.slice(0, props.badge.maxItems);
|
|
9134
9797
|
});
|
|
9135
9798
|
return (_ctx, _cache) => {
|
|
9136
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9799
|
+
return openBlock(), createElementBlock("div", _hoisted_1$Y, [
|
|
9137
9800
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
|
|
9138
9801
|
return openBlock(), createElementBlock("div", {
|
|
9139
9802
|
class: "lupa-badge lupa-text-badge",
|
|
@@ -9144,9 +9807,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9144
9807
|
};
|
|
9145
9808
|
}
|
|
9146
9809
|
});
|
|
9147
|
-
const _hoisted_1$
|
|
9810
|
+
const _hoisted_1$X = { class: "lupa-image-badges" };
|
|
9148
9811
|
const _hoisted_2$H = ["src"];
|
|
9149
|
-
const _sfc_main
|
|
9812
|
+
const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
9150
9813
|
__name: "ImageBadge",
|
|
9151
9814
|
props: {
|
|
9152
9815
|
badge: {}
|
|
@@ -9166,7 +9829,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9166
9829
|
return `${props.badge.rootImageUrl}${src}`;
|
|
9167
9830
|
};
|
|
9168
9831
|
return (_ctx, _cache) => {
|
|
9169
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9832
|
+
return openBlock(), createElementBlock("div", _hoisted_1$X, [
|
|
9170
9833
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
|
|
9171
9834
|
return openBlock(), createElementBlock("div", {
|
|
9172
9835
|
class: "lupa-badge lupa-image-badge",
|
|
@@ -9181,15 +9844,15 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9181
9844
|
};
|
|
9182
9845
|
}
|
|
9183
9846
|
});
|
|
9184
|
-
const _hoisted_1$
|
|
9847
|
+
const _hoisted_1$W = { id: "lupa-search-results-badges" };
|
|
9185
9848
|
const __default__$3 = {
|
|
9186
9849
|
components: {
|
|
9187
|
-
CustomBadge: _sfc_main$
|
|
9188
|
-
TextBadge: _sfc_main$
|
|
9189
|
-
ImageBadge: _sfc_main
|
|
9850
|
+
CustomBadge: _sfc_main$12,
|
|
9851
|
+
TextBadge: _sfc_main$11,
|
|
9852
|
+
ImageBadge: _sfc_main$10
|
|
9190
9853
|
}
|
|
9191
9854
|
};
|
|
9192
|
-
const _sfc_main
|
|
9855
|
+
const _sfc_main$$ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$3), {
|
|
9193
9856
|
__name: "SearchResultsBadgeWrapper",
|
|
9194
9857
|
props: {
|
|
9195
9858
|
position: {},
|
|
@@ -9245,7 +9908,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9245
9908
|
}
|
|
9246
9909
|
};
|
|
9247
9910
|
return (_ctx, _cache) => {
|
|
9248
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9911
|
+
return openBlock(), createElementBlock("div", _hoisted_1$W, [
|
|
9249
9912
|
createBaseVNode("div", {
|
|
9250
9913
|
id: "lupa-badges",
|
|
9251
9914
|
class: normalizeClass(anchorPosition.value)
|
|
@@ -9256,7 +9919,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9256
9919
|
badge
|
|
9257
9920
|
}, null, 8, ["badge"]);
|
|
9258
9921
|
}), 128)),
|
|
9259
|
-
positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$
|
|
9922
|
+
positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$13, {
|
|
9260
9923
|
key: 0,
|
|
9261
9924
|
options: _ctx.options
|
|
9262
9925
|
}, null, 8, ["options"])) : createCommentVNode("", true)
|
|
@@ -9265,14 +9928,14 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9265
9928
|
};
|
|
9266
9929
|
}
|
|
9267
9930
|
}));
|
|
9268
|
-
const _hoisted_1$
|
|
9931
|
+
const _hoisted_1$V = ["href"];
|
|
9269
9932
|
const _hoisted_2$G = { class: "lupa-search-box-product-image-section" };
|
|
9270
9933
|
const _hoisted_3$v = { class: "lupa-search-box-product-details-section" };
|
|
9271
9934
|
const _hoisted_4$o = {
|
|
9272
9935
|
key: 0,
|
|
9273
9936
|
class: "lupa-search-box-product-add-to-cart-section"
|
|
9274
9937
|
};
|
|
9275
|
-
const _sfc_main$
|
|
9938
|
+
const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
9276
9939
|
__name: "SearchBoxProduct",
|
|
9277
9940
|
props: {
|
|
9278
9941
|
item: {},
|
|
@@ -9333,7 +9996,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9333
9996
|
}), [
|
|
9334
9997
|
createBaseVNode("div", _hoisted_2$G, [
|
|
9335
9998
|
(openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
|
|
9336
|
-
return openBlock(), createBlock(_sfc_main$
|
|
9999
|
+
return openBlock(), createBlock(_sfc_main$15, {
|
|
9337
10000
|
class: "lupa-search-box-product-element",
|
|
9338
10001
|
item: _ctx.item,
|
|
9339
10002
|
element,
|
|
@@ -9346,7 +10009,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9346
10009
|
createBaseVNode("div", _hoisted_3$v, [
|
|
9347
10010
|
(openBlock(true), createElementBlock(Fragment, null, renderList(detailElements.value, (element) => {
|
|
9348
10011
|
var _a;
|
|
9349
|
-
return openBlock(), createBlock(_sfc_main$
|
|
10012
|
+
return openBlock(), createBlock(_sfc_main$15, {
|
|
9350
10013
|
key: element.key,
|
|
9351
10014
|
class: "lupa-search-box-product-element",
|
|
9352
10015
|
item: _ctx.item,
|
|
@@ -9357,7 +10020,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9357
10020
|
badgeOptions.value && ((_a = badgeOptions.value) == null ? void 0 : _a.anchorElementKey) === element.key ? {
|
|
9358
10021
|
name: "badges",
|
|
9359
10022
|
fn: withCtx(() => [
|
|
9360
|
-
createVNode(_sfc_main
|
|
10023
|
+
createVNode(_sfc_main$$, {
|
|
9361
10024
|
options: badgeOptions.value,
|
|
9362
10025
|
position: "card"
|
|
9363
10026
|
}, null, 8, ["options"])
|
|
@@ -9368,7 +10031,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9368
10031
|
}), 128))
|
|
9369
10032
|
]),
|
|
9370
10033
|
addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_4$o, [
|
|
9371
|
-
createVNode(_sfc_main$
|
|
10034
|
+
createVNode(_sfc_main$15, {
|
|
9372
10035
|
class: "lupa-search-box-product-element",
|
|
9373
10036
|
item: _ctx.item,
|
|
9374
10037
|
element: addToCartElement.value,
|
|
@@ -9377,7 +10040,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9377
10040
|
isInStock: isInStock.value
|
|
9378
10041
|
}, null, 8, ["item", "element", "labels", "link", "isInStock"])
|
|
9379
10042
|
])) : createCommentVNode("", true)
|
|
9380
|
-
], 16, _hoisted_1$
|
|
10043
|
+
], 16, _hoisted_1$V);
|
|
9381
10044
|
};
|
|
9382
10045
|
}
|
|
9383
10046
|
});
|
|
@@ -9438,8 +10101,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9438
10101
|
};
|
|
9439
10102
|
return { trackSearch, trackResults, trackEvent };
|
|
9440
10103
|
});
|
|
9441
|
-
const _hoisted_1$
|
|
9442
|
-
const _sfc_main$
|
|
10104
|
+
const _hoisted_1$U = { id: "lupa-search-box-products" };
|
|
10105
|
+
const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
9443
10106
|
__name: "SearchBoxProducts",
|
|
9444
10107
|
props: {
|
|
9445
10108
|
items: {},
|
|
@@ -9500,7 +10163,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9500
10163
|
handleRoutingEvent(link, event, boxRoutingBehavior.value === "event");
|
|
9501
10164
|
};
|
|
9502
10165
|
return (_ctx, _cache) => {
|
|
9503
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
10166
|
+
return openBlock(), createElementBlock("div", _hoisted_1$U, [
|
|
9504
10167
|
_ctx.$slots.productCard ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.items, (item, index) => {
|
|
9505
10168
|
return renderSlot(_ctx.$slots, "productCard", {
|
|
9506
10169
|
key: index,
|
|
@@ -9512,7 +10175,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9512
10175
|
itemClicked: handleProductClick
|
|
9513
10176
|
});
|
|
9514
10177
|
}), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.items, (item, index) => {
|
|
9515
|
-
return openBlock(), createBlock(_sfc_main$
|
|
10178
|
+
return openBlock(), createBlock(_sfc_main$_, {
|
|
9516
10179
|
key: index,
|
|
9517
10180
|
item,
|
|
9518
10181
|
panelOptions: _ctx.panelOptions,
|
|
@@ -9526,7 +10189,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9526
10189
|
};
|
|
9527
10190
|
}
|
|
9528
10191
|
});
|
|
9529
|
-
const _sfc_main$
|
|
10192
|
+
const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
9530
10193
|
__name: "SearchBoxProductsWrapper",
|
|
9531
10194
|
props: {
|
|
9532
10195
|
panel: {},
|
|
@@ -9578,7 +10241,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9578
10241
|
const getItemsDebounced = debounce$1(getItems, props.debounce);
|
|
9579
10242
|
return (_ctx, _cache) => {
|
|
9580
10243
|
var _a, _b;
|
|
9581
|
-
return openBlock(), createBlock(_sfc_main$
|
|
10244
|
+
return openBlock(), createBlock(_sfc_main$Z, {
|
|
9582
10245
|
items: (_b = (_a = searchResult.value) == null ? void 0 : _a.items) != null ? _b : [],
|
|
9583
10246
|
panelOptions: _ctx.panel,
|
|
9584
10247
|
labels: _ctx.labels,
|
|
@@ -9596,7 +10259,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9596
10259
|
};
|
|
9597
10260
|
}
|
|
9598
10261
|
});
|
|
9599
|
-
const _sfc_main$
|
|
10262
|
+
const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
9600
10263
|
__name: "SearchBoxRelatedSourceWrapper",
|
|
9601
10264
|
props: {
|
|
9602
10265
|
panel: {},
|
|
@@ -9668,7 +10331,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9668
10331
|
});
|
|
9669
10332
|
return (_ctx, _cache) => {
|
|
9670
10333
|
var _a, _b;
|
|
9671
|
-
return openBlock(), createBlock(_sfc_main$
|
|
10334
|
+
return openBlock(), createBlock(_sfc_main$Z, {
|
|
9672
10335
|
items: (_b = (_a = searchResult.value) == null ? void 0 : _a.items) != null ? _b : [],
|
|
9673
10336
|
panelOptions: documentPanelOptions.value,
|
|
9674
10337
|
labels: _ctx.labels,
|
|
@@ -9686,7 +10349,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9686
10349
|
};
|
|
9687
10350
|
}
|
|
9688
10351
|
});
|
|
9689
|
-
const _hoisted_1$
|
|
10352
|
+
const _hoisted_1$T = {
|
|
9690
10353
|
key: 0,
|
|
9691
10354
|
id: "lupa-search-box-panel"
|
|
9692
10355
|
};
|
|
@@ -9705,12 +10368,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9705
10368
|
};
|
|
9706
10369
|
const __default__$2 = {
|
|
9707
10370
|
components: {
|
|
9708
|
-
SearchBoxSuggestionsWrapper: _sfc_main$
|
|
9709
|
-
SearchBoxProductsWrapper: _sfc_main$
|
|
9710
|
-
SearchBoxRelatedSourceWrapper: _sfc_main$
|
|
10371
|
+
SearchBoxSuggestionsWrapper: _sfc_main$1f,
|
|
10372
|
+
SearchBoxProductsWrapper: _sfc_main$Y,
|
|
10373
|
+
SearchBoxRelatedSourceWrapper: _sfc_main$X
|
|
9711
10374
|
}
|
|
9712
10375
|
};
|
|
9713
|
-
const _sfc_main$
|
|
10376
|
+
const _sfc_main$W = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$2), {
|
|
9714
10377
|
__name: "SearchBoxMainPanel",
|
|
9715
10378
|
props: {
|
|
9716
10379
|
options: {},
|
|
@@ -9856,7 +10519,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9856
10519
|
ref_key: "panelContainer",
|
|
9857
10520
|
ref: panelContainer
|
|
9858
10521
|
}, [
|
|
9859
|
-
displayResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
10522
|
+
displayResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$T, [
|
|
9860
10523
|
labels.value.closePanel ? (openBlock(), createElementBlock("a", {
|
|
9861
10524
|
key: 0,
|
|
9862
10525
|
class: "lupa-search-box-close-panel",
|
|
@@ -9901,18 +10564,18 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9901
10564
|
], 10, _hoisted_2$F);
|
|
9902
10565
|
}), 128))
|
|
9903
10566
|
], 4),
|
|
9904
|
-
!unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$
|
|
10567
|
+
!unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$1i, {
|
|
9905
10568
|
key: 1,
|
|
9906
10569
|
labels: labels.value
|
|
9907
10570
|
}, null, 8, ["labels"])) : createCommentVNode("", true),
|
|
9908
|
-
unref(hasAnyResults) || !_ctx.options.hideMoreResultsButtonOnNoResults ? (openBlock(), createBlock(_sfc_main$
|
|
10571
|
+
unref(hasAnyResults) || !_ctx.options.hideMoreResultsButtonOnNoResults ? (openBlock(), createBlock(_sfc_main$1l, {
|
|
9909
10572
|
key: 2,
|
|
9910
10573
|
labels: labels.value,
|
|
9911
10574
|
showTotalCount: (_a = _ctx.options.showTotalCount) != null ? _a : false,
|
|
9912
10575
|
onGoToResults: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("go-to-results"))
|
|
9913
10576
|
}, null, 8, ["labels", "showTotalCount"])) : createCommentVNode("", true)
|
|
9914
10577
|
])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$e, [
|
|
9915
|
-
createVNode(_sfc_main$
|
|
10578
|
+
createVNode(_sfc_main$1j, {
|
|
9916
10579
|
options: _ctx.options.history,
|
|
9917
10580
|
history: history.value,
|
|
9918
10581
|
onGoToResults: handleGoToResults,
|
|
@@ -9937,9 +10600,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9937
10600
|
const elements = getElements(triggers);
|
|
9938
10601
|
elements.forEach((e) => e == null ? void 0 : e.removeEventListener(BIND_EVENT, event));
|
|
9939
10602
|
};
|
|
9940
|
-
const _hoisted_1$
|
|
10603
|
+
const _hoisted_1$S = { id: "lupa-search-box" };
|
|
9941
10604
|
const _hoisted_2$E = { class: "lupa-search-box-wrapper" };
|
|
9942
|
-
const _sfc_main$
|
|
10605
|
+
const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
9943
10606
|
__name: "SearchBox",
|
|
9944
10607
|
props: {
|
|
9945
10608
|
options: {},
|
|
@@ -10184,9 +10847,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10184
10847
|
};
|
|
10185
10848
|
return (_ctx, _cache) => {
|
|
10186
10849
|
var _a2;
|
|
10187
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
10850
|
+
return openBlock(), createElementBlock("div", _hoisted_1$S, [
|
|
10188
10851
|
createBaseVNode("div", _hoisted_2$E, [
|
|
10189
|
-
createVNode(_sfc_main$
|
|
10852
|
+
createVNode(_sfc_main$1m, {
|
|
10190
10853
|
options: inputOptions.value,
|
|
10191
10854
|
suggestedValue: suggestedValue.value,
|
|
10192
10855
|
"can-close": (_a2 = _ctx.isSearchContainer) != null ? _a2 : false,
|
|
@@ -10197,7 +10860,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10197
10860
|
onFocus: _cache[0] || (_cache[0] = ($event) => opened.value = true),
|
|
10198
10861
|
onClose: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("close"))
|
|
10199
10862
|
}, null, 8, ["options", "suggestedValue", "can-close", "emit-input-on-focus"]),
|
|
10200
|
-
opened.value || _ctx.isSearchContainer ? (openBlock(), createBlock(_sfc_main$
|
|
10863
|
+
opened.value || _ctx.isSearchContainer ? (openBlock(), createBlock(_sfc_main$W, {
|
|
10201
10864
|
key: 0,
|
|
10202
10865
|
options: panelOptions.value,
|
|
10203
10866
|
inputValue: inputValue.value,
|
|
@@ -10285,7 +10948,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10285
10948
|
}
|
|
10286
10949
|
return searchParams;
|
|
10287
10950
|
};
|
|
10288
|
-
const _hoisted_1$
|
|
10951
|
+
const _hoisted_1$R = {
|
|
10289
10952
|
key: 0,
|
|
10290
10953
|
id: "lupa-search-results-did-you-mean"
|
|
10291
10954
|
};
|
|
@@ -10298,7 +10961,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10298
10961
|
"data-cy": "did-you-mean-label"
|
|
10299
10962
|
};
|
|
10300
10963
|
const _hoisted_4$m = { key: 1 };
|
|
10301
|
-
const _sfc_main$
|
|
10964
|
+
const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
10302
10965
|
__name: "SearchResultsDidYouMean",
|
|
10303
10966
|
props: {
|
|
10304
10967
|
labels: {}
|
|
@@ -10330,7 +10993,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10330
10993
|
paramStore.goToResults({ searchText, facet });
|
|
10331
10994
|
};
|
|
10332
10995
|
return (_ctx, _cache) => {
|
|
10333
|
-
return unref(searchResult).suggestedSearchText || didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
10996
|
+
return unref(searchResult).suggestedSearchText || didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_1$R, [
|
|
10334
10997
|
unref(searchResult).suggestedSearchText ? (openBlock(), createElementBlock("div", _hoisted_2$D, [
|
|
10335
10998
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.labels.noResultsSuggestion.split(" "), (label, index) => {
|
|
10336
10999
|
return openBlock(), createElementBlock("span", { key: index }, [
|
|
@@ -10356,12 +11019,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10356
11019
|
};
|
|
10357
11020
|
}
|
|
10358
11021
|
});
|
|
10359
|
-
const _hoisted_1$
|
|
11022
|
+
const _hoisted_1$Q = {
|
|
10360
11023
|
key: 0,
|
|
10361
11024
|
class: "lupa-search-results-summary"
|
|
10362
11025
|
};
|
|
10363
11026
|
const _hoisted_2$C = ["innerHTML"];
|
|
10364
|
-
const _sfc_main$
|
|
11027
|
+
const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
10365
11028
|
__name: "SearchResultsSummary",
|
|
10366
11029
|
props: {
|
|
10367
11030
|
label: {},
|
|
@@ -10376,7 +11039,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10376
11039
|
return addParamsToLabel(props.label, range, `<span>${totalItems.value}</span>`);
|
|
10377
11040
|
});
|
|
10378
11041
|
return (_ctx, _cache) => {
|
|
10379
|
-
return unref(totalItems) > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
11042
|
+
return unref(totalItems) > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$Q, [
|
|
10380
11043
|
createBaseVNode("div", { innerHTML: summaryLabel.value }, null, 8, _hoisted_2$C),
|
|
10381
11044
|
_ctx.clearable ? (openBlock(), createElementBlock("span", {
|
|
10382
11045
|
key: 0,
|
|
@@ -10388,7 +11051,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10388
11051
|
};
|
|
10389
11052
|
}
|
|
10390
11053
|
});
|
|
10391
|
-
const _hoisted_1$
|
|
11054
|
+
const _hoisted_1$P = {
|
|
10392
11055
|
key: 0,
|
|
10393
11056
|
class: "lupa-result-page-title",
|
|
10394
11057
|
"data-cy": "lupa-result-page-title"
|
|
@@ -10399,7 +11062,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10399
11062
|
class: "lupa-results-total-count"
|
|
10400
11063
|
};
|
|
10401
11064
|
const _hoisted_4$l = ["innerHTML"];
|
|
10402
|
-
const _sfc_main$
|
|
11065
|
+
const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
10403
11066
|
__name: "SearchResultsTitle",
|
|
10404
11067
|
props: {
|
|
10405
11068
|
options: {},
|
|
@@ -10434,12 +11097,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10434
11097
|
});
|
|
10435
11098
|
return (_ctx, _cache) => {
|
|
10436
11099
|
return openBlock(), createElementBlock("div", null, [
|
|
10437
|
-
showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$
|
|
11100
|
+
showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$P, [
|
|
10438
11101
|
createTextVNode(toDisplayString(_ctx.options.labels.searchResults), 1),
|
|
10439
11102
|
queryText.value ? (openBlock(), createElementBlock("span", _hoisted_2$B, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
|
|
10440
11103
|
showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$s, "(" + toDisplayString(unref(totalItems)) + ")", 1)) : createCommentVNode("", true)
|
|
10441
11104
|
])) : createCommentVNode("", true),
|
|
10442
|
-
_ctx.showSummary ? (openBlock(), createBlock(_sfc_main$
|
|
11105
|
+
_ctx.showSummary ? (openBlock(), createBlock(_sfc_main$T, {
|
|
10443
11106
|
key: 1,
|
|
10444
11107
|
label: summaryLabel.value
|
|
10445
11108
|
}, null, 8, ["label"])) : createCommentVNode("", true),
|
|
@@ -10452,7 +11115,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10452
11115
|
};
|
|
10453
11116
|
}
|
|
10454
11117
|
});
|
|
10455
|
-
const _hoisted_1$
|
|
11118
|
+
const _hoisted_1$O = { class: "lupa-search-result-filter-value" };
|
|
10456
11119
|
const _hoisted_2$A = {
|
|
10457
11120
|
class: "lupa-current-filter-label",
|
|
10458
11121
|
"data-cy": "lupa-current-filter-label"
|
|
@@ -10461,7 +11124,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10461
11124
|
class: "lupa-current-filter-value",
|
|
10462
11125
|
"data-cy": "lupa-current-filter-value"
|
|
10463
11126
|
};
|
|
10464
|
-
const _sfc_main$
|
|
11127
|
+
const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
10465
11128
|
__name: "CurrentFilterDisplay",
|
|
10466
11129
|
props: {
|
|
10467
11130
|
filter: {}
|
|
@@ -10473,7 +11136,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10473
11136
|
emit2("remove", { filter: props.filter });
|
|
10474
11137
|
};
|
|
10475
11138
|
return (_ctx, _cache) => {
|
|
10476
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
11139
|
+
return openBlock(), createElementBlock("div", _hoisted_1$O, [
|
|
10477
11140
|
createBaseVNode("div", {
|
|
10478
11141
|
class: "lupa-current-filter-action",
|
|
10479
11142
|
onClick: handleClick
|
|
@@ -10484,7 +11147,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10484
11147
|
};
|
|
10485
11148
|
}
|
|
10486
11149
|
});
|
|
10487
|
-
const _hoisted_1$
|
|
11150
|
+
const _hoisted_1$N = { class: "lupa-filter-title-text" };
|
|
10488
11151
|
const _hoisted_2$z = {
|
|
10489
11152
|
key: 0,
|
|
10490
11153
|
class: "lupa-filter-count"
|
|
@@ -10494,7 +11157,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10494
11157
|
class: "filter-values"
|
|
10495
11158
|
};
|
|
10496
11159
|
const _hoisted_4$k = { class: "lupa-current-filter-list" };
|
|
10497
|
-
const _sfc_main$
|
|
11160
|
+
const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
10498
11161
|
__name: "CurrentFilters",
|
|
10499
11162
|
props: {
|
|
10500
11163
|
options: {},
|
|
@@ -10555,7 +11218,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10555
11218
|
class: "lupa-current-filter-title",
|
|
10556
11219
|
onClick: _cache[0] || (_cache[0] = ($event) => isOpen.value = !isOpen.value)
|
|
10557
11220
|
}, [
|
|
10558
|
-
createBaseVNode("div", _hoisted_1$
|
|
11221
|
+
createBaseVNode("div", _hoisted_1$N, [
|
|
10559
11222
|
createTextVNode(toDisplayString((_c = (_b = (_a = _ctx.options) == null ? void 0 : _a.labels) == null ? void 0 : _b.title) != null ? _c : "") + " ", 1),
|
|
10560
11223
|
_ctx.expandable ? (openBlock(), createElementBlock("span", _hoisted_2$z, " (" + toDisplayString(unref(currentFilterCount)) + ") ", 1)) : createCommentVNode("", true)
|
|
10561
11224
|
]),
|
|
@@ -10567,7 +11230,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10567
11230
|
!_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$q, [
|
|
10568
11231
|
createBaseVNode("div", _hoisted_4$k, [
|
|
10569
11232
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(displayFilters), (filter) => {
|
|
10570
|
-
return openBlock(), createBlock(_sfc_main$
|
|
11233
|
+
return openBlock(), createBlock(_sfc_main$R, {
|
|
10571
11234
|
key: filter.key + "_" + filter.value,
|
|
10572
11235
|
filter,
|
|
10573
11236
|
onRemove: handleRemove
|
|
@@ -10584,8 +11247,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10584
11247
|
};
|
|
10585
11248
|
}
|
|
10586
11249
|
});
|
|
10587
|
-
const _hoisted_1$
|
|
10588
|
-
const _sfc_main$
|
|
11250
|
+
const _hoisted_1$M = ["href"];
|
|
11251
|
+
const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
10589
11252
|
__name: "CategoryFilterItem",
|
|
10590
11253
|
props: {
|
|
10591
11254
|
options: {},
|
|
@@ -10622,12 +11285,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10622
11285
|
"data-cy": "lupa-child-category-item",
|
|
10623
11286
|
href: urlLink.value,
|
|
10624
11287
|
onClick: handleNavigation
|
|
10625
|
-
}, toDisplayString(title.value), 9, _hoisted_1$
|
|
11288
|
+
}, toDisplayString(title.value), 9, _hoisted_1$M)
|
|
10626
11289
|
], 2);
|
|
10627
11290
|
};
|
|
10628
11291
|
}
|
|
10629
11292
|
});
|
|
10630
|
-
const _hoisted_1$
|
|
11293
|
+
const _hoisted_1$L = {
|
|
10631
11294
|
class: "lupa-category-filter",
|
|
10632
11295
|
"data-cy": "lupa-category-filter"
|
|
10633
11296
|
};
|
|
@@ -10635,7 +11298,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10635
11298
|
const _hoisted_3$p = ["href"];
|
|
10636
11299
|
const _hoisted_4$j = ["href"];
|
|
10637
11300
|
const _hoisted_5$d = { class: "lupa-child-category-list" };
|
|
10638
|
-
const _sfc_main$
|
|
11301
|
+
const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
10639
11302
|
__name: "CategoryFilter",
|
|
10640
11303
|
props: {
|
|
10641
11304
|
options: {}
|
|
@@ -10721,7 +11384,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10721
11384
|
};
|
|
10722
11385
|
__expose({ fetch: fetch2 });
|
|
10723
11386
|
return (_ctx, _cache) => {
|
|
10724
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
11387
|
+
return openBlock(), createElementBlock("div", _hoisted_1$L, [
|
|
10725
11388
|
createBaseVNode("div", _hoisted_2$y, [
|
|
10726
11389
|
hasBackButton.value ? (openBlock(), createElementBlock("a", {
|
|
10727
11390
|
key: 0,
|
|
@@ -10742,7 +11405,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10742
11405
|
], 2),
|
|
10743
11406
|
createBaseVNode("div", _hoisted_5$d, [
|
|
10744
11407
|
(openBlock(true), createElementBlock(Fragment, null, renderList(categoryChildren.value, (child) => {
|
|
10745
|
-
return openBlock(), createBlock(_sfc_main$
|
|
11408
|
+
return openBlock(), createBlock(_sfc_main$P, {
|
|
10746
11409
|
key: getCategoryKey(child),
|
|
10747
11410
|
item: child,
|
|
10748
11411
|
options: _ctx.options
|
|
@@ -10753,7 +11416,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10753
11416
|
};
|
|
10754
11417
|
}
|
|
10755
11418
|
});
|
|
10756
|
-
const _hoisted_1$
|
|
11419
|
+
const _hoisted_1$K = {
|
|
10757
11420
|
class: "lupa-search-result-facet-term-values",
|
|
10758
11421
|
"data-cy": "lupa-search-result-facet-term-values"
|
|
10759
11422
|
};
|
|
@@ -10769,7 +11432,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10769
11432
|
};
|
|
10770
11433
|
const _hoisted_9$1 = { key: 0 };
|
|
10771
11434
|
const _hoisted_10$1 = { key: 1 };
|
|
10772
|
-
const _sfc_main$
|
|
11435
|
+
const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
10773
11436
|
__name: "TermFacet",
|
|
10774
11437
|
props: {
|
|
10775
11438
|
options: {},
|
|
@@ -10838,7 +11501,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10838
11501
|
return selectedItems == null ? void 0 : selectedItems.includes((_b = item.title) == null ? void 0 : _b.toString());
|
|
10839
11502
|
};
|
|
10840
11503
|
return (_ctx, _cache) => {
|
|
10841
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
11504
|
+
return openBlock(), createElementBlock("div", _hoisted_1$K, [
|
|
10842
11505
|
isFilterable.value ? withDirectives((openBlock(), createElementBlock("input", {
|
|
10843
11506
|
key: 0,
|
|
10844
11507
|
class: "lupa-term-filter",
|
|
@@ -11856,7 +12519,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
11856
12519
|
m.render = function(e, t, r, i, n, o) {
|
|
11857
12520
|
return openBlock(), createElementBlock("div", mergeProps(e.sliderProps, { ref: "slider" }), null, 16);
|
|
11858
12521
|
}, m.__file = "src/Slider.vue";
|
|
11859
|
-
const _hoisted_1$
|
|
12522
|
+
const _hoisted_1$J = { class: "lupa-search-result-facet-stats-values" };
|
|
11860
12523
|
const _hoisted_2$w = {
|
|
11861
12524
|
key: 0,
|
|
11862
12525
|
class: "lupa-stats-facet-summary"
|
|
@@ -11884,7 +12547,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
11884
12547
|
key: 2,
|
|
11885
12548
|
class: "lupa-stats-slider-wrapper"
|
|
11886
12549
|
};
|
|
11887
|
-
const _sfc_main$
|
|
12550
|
+
const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
11888
12551
|
__name: "StatsFacet",
|
|
11889
12552
|
props: {
|
|
11890
12553
|
options: {},
|
|
@@ -12053,7 +12716,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12053
12716
|
innerSliderRange.value = value;
|
|
12054
12717
|
};
|
|
12055
12718
|
return (_ctx, _cache) => {
|
|
12056
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
12719
|
+
return openBlock(), createElementBlock("div", _hoisted_1$J, [
|
|
12057
12720
|
!isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$w, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$n, [
|
|
12058
12721
|
createBaseVNode("div", null, [
|
|
12059
12722
|
rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$h, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
|
|
@@ -12120,7 +12783,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12120
12783
|
};
|
|
12121
12784
|
}
|
|
12122
12785
|
});
|
|
12123
|
-
const _hoisted_1$
|
|
12786
|
+
const _hoisted_1$I = { class: "lupa-term-checkbox-wrapper" };
|
|
12124
12787
|
const _hoisted_2$v = { class: "lupa-term-checkbox-label" };
|
|
12125
12788
|
const _hoisted_3$m = { class: "lupa-term-label" };
|
|
12126
12789
|
const _hoisted_4$g = {
|
|
@@ -12131,7 +12794,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12131
12794
|
key: 0,
|
|
12132
12795
|
class: "lupa-facet-level"
|
|
12133
12796
|
};
|
|
12134
|
-
const _sfc_main$
|
|
12797
|
+
const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
12135
12798
|
__name: "HierarchyFacetLevel",
|
|
12136
12799
|
props: {
|
|
12137
12800
|
options: {},
|
|
@@ -12177,7 +12840,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12177
12840
|
"data-cy": "lupa-facet-term",
|
|
12178
12841
|
onClick: _cache[0] || (_cache[0] = ($event) => handleFacetClick(_ctx.item))
|
|
12179
12842
|
}, [
|
|
12180
|
-
createBaseVNode("div", _hoisted_1$
|
|
12843
|
+
createBaseVNode("div", _hoisted_1$I, [
|
|
12181
12844
|
createBaseVNode("span", {
|
|
12182
12845
|
class: normalizeClass(["lupa-term-checkbox", { checked: isChecked.value }])
|
|
12183
12846
|
}, null, 2)
|
|
@@ -12203,13 +12866,13 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12203
12866
|
};
|
|
12204
12867
|
}
|
|
12205
12868
|
});
|
|
12206
|
-
const _hoisted_1$
|
|
12869
|
+
const _hoisted_1$H = {
|
|
12207
12870
|
class: "lupa-search-result-facet-term-values lupa-search-result-facet-hierarchy-values",
|
|
12208
12871
|
"data-cy": "lupa-search-result-facet-term-values"
|
|
12209
12872
|
};
|
|
12210
12873
|
const _hoisted_2$u = { key: 0 };
|
|
12211
12874
|
const _hoisted_3$l = ["placeholder"];
|
|
12212
|
-
const _sfc_main$
|
|
12875
|
+
const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
12213
12876
|
__name: "HierarchyFacet",
|
|
12214
12877
|
props: {
|
|
12215
12878
|
options: {},
|
|
@@ -12259,7 +12922,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12259
12922
|
showAll.value = true;
|
|
12260
12923
|
};
|
|
12261
12924
|
return (_ctx, _cache) => {
|
|
12262
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
12925
|
+
return openBlock(), createElementBlock("div", _hoisted_1$H, [
|
|
12263
12926
|
isFilterable.value ? (openBlock(), createElementBlock("div", _hoisted_2$u, [
|
|
12264
12927
|
withDirectives(createBaseVNode("input", {
|
|
12265
12928
|
class: "lupa-term-filter",
|
|
@@ -12271,7 +12934,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12271
12934
|
])
|
|
12272
12935
|
])) : createCommentVNode("", true),
|
|
12273
12936
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayValues.value, (item) => {
|
|
12274
|
-
return openBlock(), createBlock(_sfc_main$
|
|
12937
|
+
return openBlock(), createBlock(_sfc_main$L, {
|
|
12275
12938
|
key: item.title,
|
|
12276
12939
|
options: _ctx.options,
|
|
12277
12940
|
item,
|
|
@@ -12291,7 +12954,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12291
12954
|
};
|
|
12292
12955
|
}
|
|
12293
12956
|
});
|
|
12294
|
-
const _hoisted_1$
|
|
12957
|
+
const _hoisted_1$G = { class: "lupa-facet-label-text" };
|
|
12295
12958
|
const _hoisted_2$t = {
|
|
12296
12959
|
key: 0,
|
|
12297
12960
|
class: "lupa-facet-content",
|
|
@@ -12299,12 +12962,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12299
12962
|
};
|
|
12300
12963
|
const __default__$1 = {
|
|
12301
12964
|
components: {
|
|
12302
|
-
TermFacet: _sfc_main$
|
|
12303
|
-
StatsFacet: _sfc_main$
|
|
12304
|
-
HierarchyFacet: _sfc_main$
|
|
12965
|
+
TermFacet: _sfc_main$N,
|
|
12966
|
+
StatsFacet: _sfc_main$M,
|
|
12967
|
+
HierarchyFacet: _sfc_main$K
|
|
12305
12968
|
}
|
|
12306
12969
|
};
|
|
12307
|
-
const _sfc_main$
|
|
12970
|
+
const _sfc_main$J = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$1), {
|
|
12308
12971
|
__name: "FacetDisplay",
|
|
12309
12972
|
props: {
|
|
12310
12973
|
options: {},
|
|
@@ -12416,7 +13079,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12416
13079
|
"data-cy": "lupa-search-result-facet-label",
|
|
12417
13080
|
onClick: toggleFacet
|
|
12418
13081
|
}, [
|
|
12419
|
-
createBaseVNode("div", _hoisted_1$
|
|
13082
|
+
createBaseVNode("div", _hoisted_1$G, toDisplayString(facet.value.label), 1),
|
|
12420
13083
|
createBaseVNode("div", {
|
|
12421
13084
|
class: normalizeClass(["lupa-facet-label-caret", isOpen.value && "open"])
|
|
12422
13085
|
}, null, 2)
|
|
@@ -12439,12 +13102,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12439
13102
|
};
|
|
12440
13103
|
}
|
|
12441
13104
|
}));
|
|
12442
|
-
const _hoisted_1$
|
|
13105
|
+
const _hoisted_1$F = { class: "lupa-search-result-facet-section" };
|
|
12443
13106
|
const _hoisted_2$s = {
|
|
12444
13107
|
key: 0,
|
|
12445
13108
|
class: "lupa-facets-title"
|
|
12446
13109
|
};
|
|
12447
|
-
const _sfc_main$
|
|
13110
|
+
const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
12448
13111
|
__name: "FacetList",
|
|
12449
13112
|
props: {
|
|
12450
13113
|
options: {},
|
|
@@ -12478,14 +13141,14 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12478
13141
|
};
|
|
12479
13142
|
return (_ctx, _cache) => {
|
|
12480
13143
|
var _a;
|
|
12481
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
13144
|
+
return openBlock(), createElementBlock("div", _hoisted_1$F, [
|
|
12482
13145
|
_ctx.options.labels.title ? (openBlock(), createElementBlock("div", _hoisted_2$s, toDisplayString(_ctx.options.labels.title), 1)) : createCommentVNode("", true),
|
|
12483
13146
|
createBaseVNode("div", {
|
|
12484
13147
|
class: normalizeClass(["lupa-search-result-facet-list", "lupa-" + ((_a = _ctx.facetStyle) != null ? _a : "")])
|
|
12485
13148
|
}, [
|
|
12486
13149
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayFacets.value, (facet) => {
|
|
12487
13150
|
var _a2;
|
|
12488
|
-
return openBlock(), createBlock(_sfc_main$
|
|
13151
|
+
return openBlock(), createBlock(_sfc_main$J, {
|
|
12489
13152
|
key: facet.key,
|
|
12490
13153
|
facet,
|
|
12491
13154
|
currentFilters: currentFiltersValue.value,
|
|
@@ -12500,6 +13163,31 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12500
13163
|
};
|
|
12501
13164
|
}
|
|
12502
13165
|
});
|
|
13166
|
+
const _hoisted_1$E = ["onClick"];
|
|
13167
|
+
const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
13168
|
+
__name: "FacetsButton",
|
|
13169
|
+
props: {
|
|
13170
|
+
options: {}
|
|
13171
|
+
},
|
|
13172
|
+
emits: ["filter"],
|
|
13173
|
+
setup(__props, { emit: emit2 }) {
|
|
13174
|
+
const props = __props;
|
|
13175
|
+
const label = computed(() => {
|
|
13176
|
+
var _a, _b;
|
|
13177
|
+
return (_b = (_a = props.options.labels) == null ? void 0 : _a.facetFilterButton) != null ? _b : "";
|
|
13178
|
+
});
|
|
13179
|
+
const handleClick = () => {
|
|
13180
|
+
emit2("filter");
|
|
13181
|
+
};
|
|
13182
|
+
return (_ctx, _cache) => {
|
|
13183
|
+
return label.value ? (openBlock(), createElementBlock("button", {
|
|
13184
|
+
key: 0,
|
|
13185
|
+
class: "lupa-facets-button-filter",
|
|
13186
|
+
onClick: withModifiers(handleClick, ["stop"])
|
|
13187
|
+
}, toDisplayString(label.value), 9, _hoisted_1$E)) : createCommentVNode("", true);
|
|
13188
|
+
};
|
|
13189
|
+
}
|
|
13190
|
+
});
|
|
12503
13191
|
const _hoisted_1$D = { class: "lupa-search-result-facets" };
|
|
12504
13192
|
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
12505
13193
|
__name: "Facets",
|
|
@@ -12508,7 +13196,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12508
13196
|
facetStyle: {},
|
|
12509
13197
|
clearable: { type: Boolean }
|
|
12510
13198
|
},
|
|
12511
|
-
|
|
13199
|
+
emits: ["filter"],
|
|
13200
|
+
setup(__props, { emit: emit2 }) {
|
|
12512
13201
|
const props = __props;
|
|
12513
13202
|
const paramStore = useParamsStore();
|
|
12514
13203
|
const searchResultStore = useSearchResultStore();
|
|
@@ -12538,6 +13227,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12538
13227
|
timeout: (_f = (_e = searchResultOptions.value.scrollToResults) == null ? void 0 : _e.timeout) != null ? _f : 500
|
|
12539
13228
|
};
|
|
12540
13229
|
});
|
|
13230
|
+
const showFilterButton = computed(() => {
|
|
13231
|
+
return props.options.filterBehavior === "withFilterButton";
|
|
13232
|
+
});
|
|
12541
13233
|
const handleFacetSelect = (facetAction) => {
|
|
12542
13234
|
switch (facetAction.type) {
|
|
12543
13235
|
case "terms":
|
|
@@ -12576,9 +13268,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12576
13268
|
const param = getFacetKey(facet.key, facet.type);
|
|
12577
13269
|
paramStore.removeParameters({ paramsToRemove: [param] });
|
|
12578
13270
|
};
|
|
13271
|
+
const filter = () => {
|
|
13272
|
+
emit2("filter");
|
|
13273
|
+
};
|
|
12579
13274
|
return (_ctx, _cache) => {
|
|
12580
13275
|
return openBlock(), createElementBlock("div", _hoisted_1$D, [
|
|
12581
|
-
regularFacets.value ? (openBlock(), createBlock(_sfc_main$
|
|
13276
|
+
regularFacets.value ? (openBlock(), createBlock(_sfc_main$I, {
|
|
12582
13277
|
key: 0,
|
|
12583
13278
|
options: _ctx.options,
|
|
12584
13279
|
facets: regularFacets.value,
|
|
@@ -12587,7 +13282,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12587
13282
|
clearable: _ctx.clearable,
|
|
12588
13283
|
onSelect: handleFacetSelect,
|
|
12589
13284
|
onClear: clear2
|
|
12590
|
-
}, null, 8, ["options", "facets", "currentFilters", "facetStyle", "clearable"])) : createCommentVNode("", true)
|
|
13285
|
+
}, null, 8, ["options", "facets", "currentFilters", "facetStyle", "clearable"])) : createCommentVNode("", true),
|
|
13286
|
+
showFilterButton.value ? (openBlock(), createBlock(_sfc_main$H, {
|
|
13287
|
+
key: 1,
|
|
13288
|
+
options: _ctx.options,
|
|
13289
|
+
onFilter: filter
|
|
13290
|
+
}, null, 8, ["options"])) : createCommentVNode("", true)
|
|
12591
13291
|
]);
|
|
12592
13292
|
};
|
|
12593
13293
|
}
|
|
@@ -12602,7 +13302,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12602
13302
|
options: {},
|
|
12603
13303
|
expandable: { type: Boolean }
|
|
12604
13304
|
},
|
|
12605
|
-
|
|
13305
|
+
emits: ["filter"],
|
|
13306
|
+
setup(__props, { expose: __expose, emit: emit2 }) {
|
|
12606
13307
|
const props = __props;
|
|
12607
13308
|
const categoryFilters = ref(null);
|
|
12608
13309
|
const desktopFiltersVisible = computed(() => {
|
|
@@ -12616,6 +13317,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12616
13317
|
const showCurrentFilters = computed(() => {
|
|
12617
13318
|
return currentFiltersVisible.value ? Boolean(props.options.facets) : false;
|
|
12618
13319
|
});
|
|
13320
|
+
const filter = () => {
|
|
13321
|
+
emit2("filter");
|
|
13322
|
+
};
|
|
12619
13323
|
const fetch2 = () => {
|
|
12620
13324
|
var _a;
|
|
12621
13325
|
if (categoryFilters.value) {
|
|
@@ -12626,12 +13330,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12626
13330
|
return (_ctx, _cache) => {
|
|
12627
13331
|
var _a;
|
|
12628
13332
|
return openBlock(), createElementBlock("div", _hoisted_1$C, [
|
|
12629
|
-
showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$
|
|
13333
|
+
showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$Q, {
|
|
12630
13334
|
key: 0,
|
|
12631
13335
|
options: _ctx.options.currentFilters,
|
|
12632
13336
|
expandable: (_a = _ctx.expandable) != null ? _a : false
|
|
12633
13337
|
}, null, 8, ["options", "expandable"])) : createCommentVNode("", true),
|
|
12634
|
-
_ctx.options.categories ? (openBlock(), createBlock(_sfc_main$
|
|
13338
|
+
_ctx.options.categories ? (openBlock(), createBlock(_sfc_main$O, {
|
|
12635
13339
|
key: 1,
|
|
12636
13340
|
options: _ctx.options.categories,
|
|
12637
13341
|
ref_key: "categoryFilters",
|
|
@@ -12639,7 +13343,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12639
13343
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
12640
13344
|
_ctx.options.facets ? (openBlock(), createBlock(_sfc_main$G, {
|
|
12641
13345
|
key: 2,
|
|
12642
|
-
options: _ctx.options.facets
|
|
13346
|
+
options: _ctx.options.facets,
|
|
13347
|
+
onFilter: filter
|
|
12643
13348
|
}, null, 8, ["options"])) : createCommentVNode("", true)
|
|
12644
13349
|
]);
|
|
12645
13350
|
};
|
|
@@ -12663,7 +13368,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12663
13368
|
props: {
|
|
12664
13369
|
options: {}
|
|
12665
13370
|
},
|
|
12666
|
-
|
|
13371
|
+
emits: ["filter"],
|
|
13372
|
+
setup(__props, { emit: emit2 }) {
|
|
12667
13373
|
const props = __props;
|
|
12668
13374
|
const searchResultStore = useSearchResultStore();
|
|
12669
13375
|
const { currentFilterCount } = storeToRefs(searchResultStore);
|
|
@@ -12683,6 +13389,10 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12683
13389
|
const handleMobileToggle = () => {
|
|
12684
13390
|
searchResultStore.setSidebarState({ visible: false });
|
|
12685
13391
|
};
|
|
13392
|
+
const filter = () => {
|
|
13393
|
+
emit2("filter");
|
|
13394
|
+
handleMobileToggle();
|
|
13395
|
+
};
|
|
12686
13396
|
return (_ctx, _cache) => {
|
|
12687
13397
|
return isMobileSidebarVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$B, [
|
|
12688
13398
|
createBaseVNode("div", {
|
|
@@ -12703,7 +13413,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12703
13413
|
createBaseVNode("div", _hoisted_7$4, [
|
|
12704
13414
|
createVNode(_sfc_main$F, {
|
|
12705
13415
|
options: _ctx.options,
|
|
12706
|
-
expandable: isActiveFiltersExpanded.value
|
|
13416
|
+
expandable: isActiveFiltersExpanded.value,
|
|
13417
|
+
onFilter: filter
|
|
12707
13418
|
}, null, 8, ["options", "expandable"])
|
|
12708
13419
|
])
|
|
12709
13420
|
])
|
|
@@ -12774,7 +13485,11 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12774
13485
|
props: {
|
|
12775
13486
|
options: {}
|
|
12776
13487
|
},
|
|
12777
|
-
|
|
13488
|
+
emits: ["filter"],
|
|
13489
|
+
setup(__props, { emit: emit2 }) {
|
|
13490
|
+
const filter = () => {
|
|
13491
|
+
emit2("filter");
|
|
13492
|
+
};
|
|
12778
13493
|
return (_ctx, _cache) => {
|
|
12779
13494
|
var _a;
|
|
12780
13495
|
return openBlock(), createElementBlock("div", _hoisted_1$z, [
|
|
@@ -12782,7 +13497,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12782
13497
|
key: 0,
|
|
12783
13498
|
options: _ctx.options.facets,
|
|
12784
13499
|
"facet-style": (_a = _ctx.options.facets.style) == null ? void 0 : _a.type,
|
|
12785
|
-
clearable: true
|
|
13500
|
+
clearable: true,
|
|
13501
|
+
onFilter: filter
|
|
12786
13502
|
}, null, 8, ["options", "facet-style"])) : createCommentVNode("", true)
|
|
12787
13503
|
]);
|
|
12788
13504
|
};
|
|
@@ -13219,7 +13935,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
13219
13935
|
}, [
|
|
13220
13936
|
createBaseVNode("div", _hoisted_1$t, [
|
|
13221
13937
|
showLayoutSelection.value ? (openBlock(), createBlock(_sfc_main$B, { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_2$m)),
|
|
13222
|
-
showItemSummary.value ? (openBlock(), createBlock(_sfc_main$
|
|
13938
|
+
showItemSummary.value ? (openBlock(), createBlock(_sfc_main$T, {
|
|
13223
13939
|
key: 2,
|
|
13224
13940
|
label: searchSummaryLabel.value,
|
|
13225
13941
|
clearable: unref(hasAnyFilter) && showFilterClear.value,
|
|
@@ -13260,7 +13976,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
13260
13976
|
},
|
|
13261
13977
|
setup(__props) {
|
|
13262
13978
|
return (_ctx, _cache) => {
|
|
13263
|
-
return openBlock(), createBlock(_sfc_main$
|
|
13979
|
+
return openBlock(), createBlock(_sfc_main$1e, {
|
|
13264
13980
|
item: _ctx.item,
|
|
13265
13981
|
options: _ctx.options,
|
|
13266
13982
|
"wrapper-class": "lupa-search-results-image-wrapper",
|
|
@@ -13898,7 +14614,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
13898
14614
|
"data-cy": "lupa-search-result-product-card",
|
|
13899
14615
|
class: ["lupa-search-result-product-card", !isInStock.value ? "lupa-out-of-stock" : ""]
|
|
13900
14616
|
}, customDocumentHtmlAttributes.value, { onClick: handleClick }), [
|
|
13901
|
-
createVNode(_sfc_main
|
|
14617
|
+
createVNode(_sfc_main$$, { options: badgesOptions.value }, null, 8, ["options"]),
|
|
13902
14618
|
createBaseVNode("div", {
|
|
13903
14619
|
class: normalizeClass(["lupa-search-result-product-contents", listLayoutClass.value])
|
|
13904
14620
|
}, [
|
|
@@ -13918,7 +14634,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
13918
14634
|
link: link.value
|
|
13919
14635
|
}, null, 8, ["item", "element", "labels", "inStock", "link"]);
|
|
13920
14636
|
}), 128)),
|
|
13921
|
-
createVNode(_sfc_main
|
|
14637
|
+
createVNode(_sfc_main$$, {
|
|
13922
14638
|
options: badgesOptions.value,
|
|
13923
14639
|
position: "image",
|
|
13924
14640
|
class: "lupa-image-badges"
|
|
@@ -14261,7 +14977,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
14261
14977
|
options: {},
|
|
14262
14978
|
ssr: { type: Boolean }
|
|
14263
14979
|
},
|
|
14264
|
-
|
|
14980
|
+
emits: ["filter"],
|
|
14981
|
+
setup(__props, { emit: emit2 }) {
|
|
14265
14982
|
const props = __props;
|
|
14266
14983
|
const searchResultStore = useSearchResultStore();
|
|
14267
14984
|
const paramStore = useParamsStore();
|
|
@@ -14352,6 +15069,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
14352
15069
|
params: [{ name: optionStore.getQueryParamName(QUERY_PARAMS$1.PAGE), value: "1" }]
|
|
14353
15070
|
});
|
|
14354
15071
|
};
|
|
15072
|
+
const filter = () => {
|
|
15073
|
+
emit2("filter");
|
|
15074
|
+
};
|
|
14355
15075
|
return (_ctx, _cache) => {
|
|
14356
15076
|
var _a;
|
|
14357
15077
|
return openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
@@ -14368,9 +15088,10 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
14368
15088
|
key: 1,
|
|
14369
15089
|
class: "lupa-toolbar-mobile",
|
|
14370
15090
|
options: _ctx.options,
|
|
14371
|
-
"pagination-location": "top"
|
|
15091
|
+
"pagination-location": "top",
|
|
15092
|
+
onFilter: filter
|
|
14372
15093
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
14373
|
-
currentFilterOptions.value ? (openBlock(), createBlock(_sfc_main$
|
|
15094
|
+
currentFilterOptions.value ? (openBlock(), createBlock(_sfc_main$Q, {
|
|
14374
15095
|
key: 2,
|
|
14375
15096
|
class: normalizeClass(currentFiltersClass.value),
|
|
14376
15097
|
"data-cy": "lupa-search-result-filters-mobile-toolbar",
|
|
@@ -14725,8 +15446,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
14725
15446
|
class: normalizeClass(["lupa-search-result-wrapper", { "lupa-search-wrapper-no-results": !unref(hasResults) }])
|
|
14726
15447
|
}, [
|
|
14727
15448
|
_ctx.isContainer ? (openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
14728
|
-
createVNode(_sfc_main$
|
|
14729
|
-
createVNode(_sfc_main$
|
|
15449
|
+
createVNode(_sfc_main$U, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
|
|
15450
|
+
createVNode(_sfc_main$S, {
|
|
14730
15451
|
"show-summary": true,
|
|
14731
15452
|
options: _ctx.options,
|
|
14732
15453
|
"is-product-list": (_a = _ctx.isProductList) != null ? _a : false
|
|
@@ -14738,7 +15459,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
14738
15459
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
14739
15460
|
_ctx.options.filters ? (openBlock(), createBlock(_sfc_main$E, {
|
|
14740
15461
|
key: 2,
|
|
14741
|
-
options: _ctx.options.filters
|
|
15462
|
+
options: _ctx.options.filters,
|
|
15463
|
+
onFilter: handleParamsChange
|
|
14742
15464
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
14743
15465
|
unref(currentQueryText) || _ctx.isProductList ? (openBlock(), createBlock(_sfc_main$D, {
|
|
14744
15466
|
key: 3,
|
|
@@ -14749,17 +15471,19 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
14749
15471
|
key: 0,
|
|
14750
15472
|
options: (_b = _ctx.options.filters) != null ? _b : {},
|
|
14751
15473
|
ref_key: "searchResultsFilters",
|
|
14752
|
-
ref: searchResultsFilters
|
|
15474
|
+
ref: searchResultsFilters,
|
|
15475
|
+
onFilter: handleParamsChange
|
|
14753
15476
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
14754
15477
|
createBaseVNode("div", _hoisted_3$4, [
|
|
14755
|
-
createVNode(_sfc_main$
|
|
14756
|
-
createVNode(_sfc_main$
|
|
15478
|
+
createVNode(_sfc_main$U, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
|
|
15479
|
+
createVNode(_sfc_main$S, {
|
|
14757
15480
|
options: _ctx.options,
|
|
14758
15481
|
"is-product-list": (_c = _ctx.isProductList) != null ? _c : false
|
|
14759
15482
|
}, null, 8, ["options", "is-product-list"]),
|
|
14760
15483
|
createVNode(_sfc_main$e, {
|
|
14761
15484
|
options: _ctx.options,
|
|
14762
|
-
ssr: ssrEnabled.value
|
|
15485
|
+
ssr: ssrEnabled.value,
|
|
15486
|
+
onFilter: handleParamsChange
|
|
14763
15487
|
}, {
|
|
14764
15488
|
append: withCtx(() => [
|
|
14765
15489
|
renderSlot(_ctx.$slots, "default")
|
|
@@ -14768,8 +15492,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
14768
15492
|
}, 8, ["options", "ssr"])
|
|
14769
15493
|
])
|
|
14770
15494
|
])) : (openBlock(), createElementBlock(Fragment, { key: 5 }, [
|
|
14771
|
-
createVNode(_sfc_main$
|
|
14772
|
-
createVNode(_sfc_main$
|
|
15495
|
+
createVNode(_sfc_main$U, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
|
|
15496
|
+
createVNode(_sfc_main$S, {
|
|
14773
15497
|
options: _ctx.options,
|
|
14774
15498
|
"is-product-list": (_d = _ctx.isProductList) != null ? _d : false
|
|
14775
15499
|
}, null, 8, ["options", "is-product-list"]),
|
|
@@ -14778,11 +15502,13 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
14778
15502
|
key: 0,
|
|
14779
15503
|
options: (_e = _ctx.options.filters) != null ? _e : {},
|
|
14780
15504
|
ref_key: "searchResultsFilters",
|
|
14781
|
-
ref: searchResultsFilters
|
|
15505
|
+
ref: searchResultsFilters,
|
|
15506
|
+
onFilter: handleParamsChange
|
|
14782
15507
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
14783
15508
|
createVNode(_sfc_main$e, {
|
|
14784
15509
|
options: _ctx.options,
|
|
14785
|
-
ssr: ssrEnabled.value
|
|
15510
|
+
ssr: ssrEnabled.value,
|
|
15511
|
+
onFilter: handleParamsChange
|
|
14786
15512
|
}, createSlots({
|
|
14787
15513
|
append: withCtx(() => [
|
|
14788
15514
|
renderSlot(_ctx.$slots, "default")
|
|
@@ -17312,8 +18038,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
17312
18038
|
function createRelationalOperation(operator) {
|
|
17313
18039
|
return function(value, other) {
|
|
17314
18040
|
if (!(typeof value == "string" && typeof other == "string")) {
|
|
17315
|
-
value =
|
|
17316
|
-
other =
|
|
18041
|
+
value = toNumber2(value);
|
|
18042
|
+
other = toNumber2(other);
|
|
17317
18043
|
}
|
|
17318
18044
|
return operator(value, other);
|
|
17319
18045
|
};
|
|
@@ -17347,7 +18073,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
17347
18073
|
function createRound(methodName) {
|
|
17348
18074
|
var func = Math2[methodName];
|
|
17349
18075
|
return function(number, precision) {
|
|
17350
|
-
number =
|
|
18076
|
+
number = toNumber2(number);
|
|
17351
18077
|
precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
|
|
17352
18078
|
if (precision && nativeIsFinite(number)) {
|
|
17353
18079
|
var pair = (toString(number) + "e").split("e"), value = func(pair[0] + "e" + (+pair[1] + precision));
|
|
@@ -18705,11 +19431,11 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
18705
19431
|
if (typeof func != "function") {
|
|
18706
19432
|
throw new TypeError2(FUNC_ERROR_TEXT);
|
|
18707
19433
|
}
|
|
18708
|
-
wait =
|
|
19434
|
+
wait = toNumber2(wait) || 0;
|
|
18709
19435
|
if (isObject2(options)) {
|
|
18710
19436
|
leading = !!options.leading;
|
|
18711
19437
|
maxing = "maxWait" in options;
|
|
18712
|
-
maxWait = maxing ? nativeMax(
|
|
19438
|
+
maxWait = maxing ? nativeMax(toNumber2(options.maxWait) || 0, wait) : maxWait;
|
|
18713
19439
|
trailing = "trailing" in options ? !!options.trailing : trailing;
|
|
18714
19440
|
}
|
|
18715
19441
|
function invokeFunc(time) {
|
|
@@ -18785,7 +19511,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
18785
19511
|
return baseDelay(func, 1, args);
|
|
18786
19512
|
});
|
|
18787
19513
|
var delay = baseRest(function(func, wait, args) {
|
|
18788
|
-
return baseDelay(func,
|
|
19514
|
+
return baseDelay(func, toNumber2(wait) || 0, args);
|
|
18789
19515
|
});
|
|
18790
19516
|
function flip(func) {
|
|
18791
19517
|
return createWrap(func, WRAP_FLIP_FLAG);
|
|
@@ -19082,7 +19808,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
19082
19808
|
if (!value) {
|
|
19083
19809
|
return value === 0 ? value : 0;
|
|
19084
19810
|
}
|
|
19085
|
-
value =
|
|
19811
|
+
value = toNumber2(value);
|
|
19086
19812
|
if (value === INFINITY || value === -INFINITY) {
|
|
19087
19813
|
var sign = value < 0 ? -1 : 1;
|
|
19088
19814
|
return sign * MAX_INTEGER;
|
|
@@ -19096,7 +19822,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
19096
19822
|
function toLength(value) {
|
|
19097
19823
|
return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
|
|
19098
19824
|
}
|
|
19099
|
-
function
|
|
19825
|
+
function toNumber2(value) {
|
|
19100
19826
|
if (typeof value == "number") {
|
|
19101
19827
|
return value;
|
|
19102
19828
|
}
|
|
@@ -19359,14 +20085,14 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
19359
20085
|
lower = undefined$1;
|
|
19360
20086
|
}
|
|
19361
20087
|
if (upper !== undefined$1) {
|
|
19362
|
-
upper =
|
|
20088
|
+
upper = toNumber2(upper);
|
|
19363
20089
|
upper = upper === upper ? upper : 0;
|
|
19364
20090
|
}
|
|
19365
20091
|
if (lower !== undefined$1) {
|
|
19366
|
-
lower =
|
|
20092
|
+
lower = toNumber2(lower);
|
|
19367
20093
|
lower = lower === lower ? lower : 0;
|
|
19368
20094
|
}
|
|
19369
|
-
return baseClamp(
|
|
20095
|
+
return baseClamp(toNumber2(number), lower, upper);
|
|
19370
20096
|
}
|
|
19371
20097
|
function inRange(number, start, end) {
|
|
19372
20098
|
start = toFinite(start);
|
|
@@ -19376,7 +20102,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
19376
20102
|
} else {
|
|
19377
20103
|
end = toFinite(end);
|
|
19378
20104
|
}
|
|
19379
|
-
number =
|
|
20105
|
+
number = toNumber2(number);
|
|
19380
20106
|
return baseInRange(number, start, end);
|
|
19381
20107
|
}
|
|
19382
20108
|
function random(lower, upper, floating) {
|
|
@@ -20162,7 +20888,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
20162
20888
|
lodash2.toInteger = toInteger;
|
|
20163
20889
|
lodash2.toLength = toLength;
|
|
20164
20890
|
lodash2.toLower = toLower;
|
|
20165
|
-
lodash2.toNumber =
|
|
20891
|
+
lodash2.toNumber = toNumber2;
|
|
20166
20892
|
lodash2.toSafeInteger = toSafeInteger;
|
|
20167
20893
|
lodash2.toString = toString;
|
|
20168
20894
|
lodash2.toUpper = toUpper;
|
|
@@ -20404,7 +21130,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
20404
21130
|
onClick: withModifiers(innerClick, ["stop"])
|
|
20405
21131
|
}, [
|
|
20406
21132
|
createBaseVNode("div", _hoisted_2$7, [
|
|
20407
|
-
createVNode(_sfc_main$
|
|
21133
|
+
createVNode(_sfc_main$V, {
|
|
20408
21134
|
options: fullSearchBoxOptions.value,
|
|
20409
21135
|
"is-search-container": true,
|
|
20410
21136
|
ref_key: "searchBox",
|
|
@@ -21775,7 +22501,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
21775
22501
|
class: "lupa-chat-spinner-main"
|
|
21776
22502
|
};
|
|
21777
22503
|
const _hoisted_5 = { class: "lupasearch-chat-input" };
|
|
21778
|
-
const _sfc_main$
|
|
22504
|
+
const _sfc_main$1n = /* @__PURE__ */ defineComponent({
|
|
21779
22505
|
__name: "ChatContainer",
|
|
21780
22506
|
props: {
|
|
21781
22507
|
options: {}
|
|
@@ -24308,8 +25034,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
24308
25034
|
function createRelationalOperation(operator) {
|
|
24309
25035
|
return function(value, other) {
|
|
24310
25036
|
if (!(typeof value == "string" && typeof other == "string")) {
|
|
24311
|
-
value =
|
|
24312
|
-
other =
|
|
25037
|
+
value = toNumber2(value);
|
|
25038
|
+
other = toNumber2(other);
|
|
24313
25039
|
}
|
|
24314
25040
|
return operator(value, other);
|
|
24315
25041
|
};
|
|
@@ -24343,7 +25069,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
24343
25069
|
function createRound(methodName) {
|
|
24344
25070
|
var func = Math2[methodName];
|
|
24345
25071
|
return function(number, precision) {
|
|
24346
|
-
number =
|
|
25072
|
+
number = toNumber2(number);
|
|
24347
25073
|
precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
|
|
24348
25074
|
if (precision && nativeIsFinite(number)) {
|
|
24349
25075
|
var pair = (toString(number) + "e").split("e"), value = func(pair[0] + "e" + (+pair[1] + precision));
|
|
@@ -25701,11 +26427,11 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
25701
26427
|
if (typeof func != "function") {
|
|
25702
26428
|
throw new TypeError2(FUNC_ERROR_TEXT);
|
|
25703
26429
|
}
|
|
25704
|
-
wait =
|
|
26430
|
+
wait = toNumber2(wait) || 0;
|
|
25705
26431
|
if (isObject2(options)) {
|
|
25706
26432
|
leading = !!options.leading;
|
|
25707
26433
|
maxing = "maxWait" in options;
|
|
25708
|
-
maxWait = maxing ? nativeMax(
|
|
26434
|
+
maxWait = maxing ? nativeMax(toNumber2(options.maxWait) || 0, wait) : maxWait;
|
|
25709
26435
|
trailing = "trailing" in options ? !!options.trailing : trailing;
|
|
25710
26436
|
}
|
|
25711
26437
|
function invokeFunc(time) {
|
|
@@ -25781,7 +26507,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
25781
26507
|
return baseDelay(func, 1, args);
|
|
25782
26508
|
});
|
|
25783
26509
|
var delay = baseRest(function(func, wait, args) {
|
|
25784
|
-
return baseDelay(func,
|
|
26510
|
+
return baseDelay(func, toNumber2(wait) || 0, args);
|
|
25785
26511
|
});
|
|
25786
26512
|
function flip(func) {
|
|
25787
26513
|
return createWrap(func, WRAP_FLIP_FLAG);
|
|
@@ -26078,7 +26804,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
26078
26804
|
if (!value) {
|
|
26079
26805
|
return value === 0 ? value : 0;
|
|
26080
26806
|
}
|
|
26081
|
-
value =
|
|
26807
|
+
value = toNumber2(value);
|
|
26082
26808
|
if (value === INFINITY || value === -INFINITY) {
|
|
26083
26809
|
var sign = value < 0 ? -1 : 1;
|
|
26084
26810
|
return sign * MAX_INTEGER;
|
|
@@ -26092,7 +26818,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
26092
26818
|
function toLength(value) {
|
|
26093
26819
|
return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
|
|
26094
26820
|
}
|
|
26095
|
-
function
|
|
26821
|
+
function toNumber2(value) {
|
|
26096
26822
|
if (typeof value == "number") {
|
|
26097
26823
|
return value;
|
|
26098
26824
|
}
|
|
@@ -26355,14 +27081,14 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
26355
27081
|
lower = undefined$1;
|
|
26356
27082
|
}
|
|
26357
27083
|
if (upper !== undefined$1) {
|
|
26358
|
-
upper =
|
|
27084
|
+
upper = toNumber2(upper);
|
|
26359
27085
|
upper = upper === upper ? upper : 0;
|
|
26360
27086
|
}
|
|
26361
27087
|
if (lower !== undefined$1) {
|
|
26362
|
-
lower =
|
|
27088
|
+
lower = toNumber2(lower);
|
|
26363
27089
|
lower = lower === lower ? lower : 0;
|
|
26364
27090
|
}
|
|
26365
|
-
return baseClamp(
|
|
27091
|
+
return baseClamp(toNumber2(number), lower, upper);
|
|
26366
27092
|
}
|
|
26367
27093
|
function inRange(number, start, end) {
|
|
26368
27094
|
start = toFinite(start);
|
|
@@ -26372,7 +27098,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
26372
27098
|
} else {
|
|
26373
27099
|
end = toFinite(end);
|
|
26374
27100
|
}
|
|
26375
|
-
number =
|
|
27101
|
+
number = toNumber2(number);
|
|
26376
27102
|
return baseInRange(number, start, end);
|
|
26377
27103
|
}
|
|
26378
27104
|
function random(lower, upper, floating) {
|
|
@@ -27158,7 +27884,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
27158
27884
|
lodash2.toInteger = toInteger;
|
|
27159
27885
|
lodash2.toLength = toLength;
|
|
27160
27886
|
lodash2.toLower = toLower;
|
|
27161
|
-
lodash2.toNumber =
|
|
27887
|
+
lodash2.toNumber = toNumber2;
|
|
27162
27888
|
lodash2.toSafeInteger = toSafeInteger;
|
|
27163
27889
|
lodash2.toString = toString;
|
|
27164
27890
|
lodash2.toUpper = toUpper;
|
|
@@ -27416,7 +28142,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
27416
28142
|
};
|
|
27417
28143
|
__expose({ fetch: fetch2 });
|
|
27418
28144
|
return (_ctx, _cache) => {
|
|
27419
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
28145
|
+
return openBlock(), createBlock(unref(_sfc_main$V), {
|
|
27420
28146
|
options: fullSearchBoxOptions.value,
|
|
27421
28147
|
ref_key: "searchBox",
|
|
27422
28148
|
ref: searchBox2
|
|
@@ -28253,7 +28979,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
28253
28979
|
}
|
|
28254
28980
|
return;
|
|
28255
28981
|
}
|
|
28256
|
-
const instance = createVue(options.displayOptions.containerSelector, _sfc_main$
|
|
28982
|
+
const instance = createVue(options.displayOptions.containerSelector, _sfc_main$1n, {
|
|
28257
28983
|
options
|
|
28258
28984
|
});
|
|
28259
28985
|
if (!instance) {
|