@inploi/plugin-job-search 8.4.1 → 8.5.0
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/cdn/index.js +27 -27
- package/dist/components/job-search.d.ts +4 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +173 -173
- package/dist/{map-4108c113.cjs → map-0dbe8861.cjs} +1 -1
- package/dist/{map-e0e84eac.js → map-3adbafb8.js} +1 -1
- package/dist/{utils-c371d06a.js → utils-2660f1a0.js} +6 -6
- package/dist/{utils-1d47427d.cjs → utils-463d4552.cjs} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { l as
|
|
2
|
-
import { f as rr } from "./utils-
|
|
1
|
+
import { l as f, _ as x, k as M, J as ao, g as xo, c as yo, K as ko, a as _o, i as zo, T as So, b as Yo, I as Do, d as Eo, U as Fo, E as Ao, e as $o } from "./utils-2660f1a0.js";
|
|
2
|
+
import { f as rr } from "./utils-2660f1a0.js";
|
|
3
3
|
import { createPlugin as Co } from "@inploi/sdk";
|
|
4
|
-
var Lo = "diffed", no = "__c", G = "__s",
|
|
4
|
+
var Lo = "diffed", no = "__c", G = "__s", I = "__c", vo = "__k", V = "__d", P = "__s", so = /[\s\n\\/='"\0<>]/, lo = /^(xlink|xmlns|xml)([A-Z])/, Uo = /^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/, Po = /^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/, To = /* @__PURE__ */ new Set(["draggable", "spellcheck"]);
|
|
5
5
|
function fo(o) {
|
|
6
6
|
o.__g !== void 0 ? o.__g |= 8 : o[V] = !0;
|
|
7
7
|
}
|
|
@@ -15,144 +15,144 @@ var Io = /["&<]/;
|
|
|
15
15
|
function H(o) {
|
|
16
16
|
if (o.length === 0 || Io.test(o) === !1)
|
|
17
17
|
return o;
|
|
18
|
-
for (var
|
|
18
|
+
for (var i = 0, e = 0, a = "", s = ""; e < o.length; e++) {
|
|
19
19
|
switch (o.charCodeAt(e)) {
|
|
20
20
|
case 34:
|
|
21
|
-
|
|
21
|
+
s = """;
|
|
22
22
|
break;
|
|
23
23
|
case 38:
|
|
24
|
-
|
|
24
|
+
s = "&";
|
|
25
25
|
break;
|
|
26
26
|
case 60:
|
|
27
|
-
|
|
27
|
+
s = "<";
|
|
28
28
|
break;
|
|
29
29
|
default:
|
|
30
30
|
continue;
|
|
31
31
|
}
|
|
32
|
-
e !==
|
|
32
|
+
e !== i && (a += o.slice(i, e)), a += s, i = e + 1;
|
|
33
33
|
}
|
|
34
|
-
return e !==
|
|
34
|
+
return e !== i && (a += o.slice(i, e)), a;
|
|
35
35
|
}
|
|
36
36
|
var po = {}, Xo = /* @__PURE__ */ new Set(["animation-iteration-count", "border-image-outset", "border-image-slice", "border-image-width", "box-flex", "box-flex-group", "box-ordinal-group", "column-count", "fill-opacity", "flex", "flex-grow", "flex-negative", "flex-order", "flex-positive", "flex-shrink", "flood-opacity", "font-weight", "grid-column", "grid-row", "line-clamp", "line-height", "opacity", "order", "orphans", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-miterlimit", "stroke-opacity", "stroke-width", "tab-size", "widows", "z-index", "zoom"]), Zo = /[A-Z]/g;
|
|
37
37
|
function Ro(o) {
|
|
38
|
-
var
|
|
38
|
+
var i = "";
|
|
39
39
|
for (var e in o) {
|
|
40
|
-
var
|
|
41
|
-
if (
|
|
42
|
-
var
|
|
43
|
-
typeof
|
|
40
|
+
var a = o[e];
|
|
41
|
+
if (a != null && a !== "") {
|
|
42
|
+
var s = e[0] == "-" ? e : po[e] || (po[e] = e.replace(Zo, "-$&").toLowerCase()), c = ";";
|
|
43
|
+
typeof a != "number" || s.startsWith("--") || Xo.has(s) || (c = "px;"), i = i + s + ":" + a + c;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
return
|
|
46
|
+
return i || void 0;
|
|
47
47
|
}
|
|
48
48
|
function ho() {
|
|
49
49
|
this.__d = !0;
|
|
50
50
|
}
|
|
51
|
-
function Wo(o,
|
|
52
|
-
return { __v: o, context:
|
|
51
|
+
function Wo(o, i) {
|
|
52
|
+
return { __v: o, context: i, props: o.props, setState: ho, forceUpdate: ho, __d: !0, __h: new Array(0) };
|
|
53
53
|
}
|
|
54
|
-
var Q,
|
|
55
|
-
function Ho(o,
|
|
56
|
-
var
|
|
57
|
-
|
|
58
|
-
var
|
|
59
|
-
|
|
54
|
+
var Q, $, R, Z, oo = {}, wo = [], T = Array.isArray, K = Object.assign, g = "", q = "<!--$s-->", B = "<!--/$s-->";
|
|
55
|
+
function Ho(o, i, e) {
|
|
56
|
+
var a = f[G];
|
|
57
|
+
f[G] = !0, Q = f.__b, $ = f[Lo], R = f.__r, Z = f.unmount;
|
|
58
|
+
var s = x(M, null);
|
|
59
|
+
s[vo] = [o];
|
|
60
60
|
try {
|
|
61
|
-
var
|
|
62
|
-
return
|
|
61
|
+
var c = k(o, i || oo, !1, void 0, s, !1, e);
|
|
62
|
+
return T(c) ? c.join(g) : c;
|
|
63
63
|
} catch (r) {
|
|
64
64
|
throw r.then ? new Error('Use "renderToStringAsync" for suspenseful rendering.') : r;
|
|
65
65
|
} finally {
|
|
66
|
-
|
|
66
|
+
f[no] && f[no](o, wo), f[G] = a, wo.length = 0;
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
function bo(o,
|
|
70
|
-
var e,
|
|
71
|
-
return o[
|
|
69
|
+
function bo(o, i) {
|
|
70
|
+
var e, a = o.type, s = !0;
|
|
71
|
+
return o[I] ? (s = !1, (e = o[I]).state = e[P]) : e = new a(o.props, i), o[I] = e, e.__v = o, e.props = o.props, e.context = i, fo(e), e.state == null && (e.state = oo), e[P] == null && (e[P] = e.state), a.getDerivedStateFromProps ? e.state = K({}, e.state, a.getDerivedStateFromProps(e.props, e.state)) : s && e.componentWillMount ? (e.componentWillMount(), e.state = e[P] !== e.state ? e[P] : e.state) : !s && e.componentWillUpdate && e.componentWillUpdate(), R && R(o), e.render(e.props, e.state, i);
|
|
72
72
|
}
|
|
73
|
-
function k(o,
|
|
73
|
+
function k(o, i, e, a, s, c, r) {
|
|
74
74
|
if (o == null || o === !0 || o === !1 || o === g)
|
|
75
75
|
return g;
|
|
76
76
|
var m = typeof o;
|
|
77
77
|
if (m != "object")
|
|
78
78
|
return m == "function" ? g : m == "string" ? H(o) : o + g;
|
|
79
|
-
if (
|
|
80
|
-
var
|
|
81
|
-
|
|
82
|
-
for (var
|
|
83
|
-
var
|
|
84
|
-
if (
|
|
85
|
-
var
|
|
86
|
-
typeof
|
|
79
|
+
if (T(o)) {
|
|
80
|
+
var h, u = g;
|
|
81
|
+
s[vo] = o;
|
|
82
|
+
for (var y = o.length, _ = 0; _ < y; _++) {
|
|
83
|
+
var z = o[_];
|
|
84
|
+
if (z != null && typeof z != "boolean") {
|
|
85
|
+
var v, S = k(z, i, e, a, s, c, r);
|
|
86
|
+
typeof S == "string" ? u += S : (h || (h = new Array(y)), u && h.push(u), u = g, T(S) ? (v = h).push.apply(v, S) : h.push(S));
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
return
|
|
89
|
+
return h ? (u && h.push(u), h) : u;
|
|
90
90
|
}
|
|
91
91
|
if (o.constructor !== void 0)
|
|
92
92
|
return g;
|
|
93
|
-
o.__ =
|
|
94
|
-
var
|
|
95
|
-
if (typeof
|
|
96
|
-
var
|
|
97
|
-
if (
|
|
98
|
-
if ("tpl" in
|
|
99
|
-
for (var
|
|
100
|
-
if (
|
|
101
|
-
var
|
|
102
|
-
if (
|
|
93
|
+
o.__ = s, Q && Q(o);
|
|
94
|
+
var p = o.type, d = o.props;
|
|
95
|
+
if (typeof p == "function") {
|
|
96
|
+
var C, t, w, E = i;
|
|
97
|
+
if (p === M) {
|
|
98
|
+
if ("tpl" in d) {
|
|
99
|
+
for (var F = g, X = 0; X < d.tpl.length; X++)
|
|
100
|
+
if (F += d.tpl[X], d.exprs && X < d.exprs.length) {
|
|
101
|
+
var L = d.exprs[X];
|
|
102
|
+
if (L == null)
|
|
103
103
|
continue;
|
|
104
|
-
typeof
|
|
104
|
+
typeof L != "object" || L.constructor !== void 0 && !T(L) ? F += L : F += k(L, i, e, a, o, c, r);
|
|
105
105
|
}
|
|
106
|
-
return
|
|
106
|
+
return F;
|
|
107
107
|
}
|
|
108
|
-
if ("UNSTABLE_comment" in
|
|
109
|
-
return "<!--" + H(
|
|
110
|
-
|
|
108
|
+
if ("UNSTABLE_comment" in d)
|
|
109
|
+
return "<!--" + H(d.UNSTABLE_comment) + "-->";
|
|
110
|
+
t = d.children;
|
|
111
111
|
} else {
|
|
112
|
-
if ((
|
|
113
|
-
var ro =
|
|
114
|
-
|
|
112
|
+
if ((C = p.contextType) != null) {
|
|
113
|
+
var ro = i[C.__c];
|
|
114
|
+
E = ro ? ro.props.value : C.__;
|
|
115
115
|
}
|
|
116
|
-
var eo =
|
|
116
|
+
var eo = p.prototype && typeof p.prototype.render == "function";
|
|
117
117
|
if (eo)
|
|
118
|
-
|
|
119
|
-
bo(o,
|
|
118
|
+
t = /**#__NOINLINE__**/
|
|
119
|
+
bo(o, E), w = o[I];
|
|
120
120
|
else {
|
|
121
|
-
o[
|
|
122
|
-
Wo(o,
|
|
121
|
+
o[I] = w = /**#__NOINLINE__**/
|
|
122
|
+
Wo(o, E);
|
|
123
123
|
for (var uo = 0; co(w) && uo++ < 25; ) {
|
|
124
|
-
Mo(w),
|
|
124
|
+
Mo(w), R && R(o);
|
|
125
125
|
try {
|
|
126
|
-
|
|
126
|
+
t = p.call(w, d, E);
|
|
127
127
|
} catch (b) {
|
|
128
|
-
throw
|
|
128
|
+
throw c && b && typeof b.then == "function" && (o._suspended = !0), b;
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
fo(w);
|
|
132
132
|
}
|
|
133
|
-
if (w.getChildContext != null && (
|
|
134
|
-
|
|
133
|
+
if (w.getChildContext != null && (i = K({}, i, w.getChildContext())), eo && f.errorBoundaries && (p.getDerivedStateFromError || w.componentDidCatch)) {
|
|
134
|
+
t = t != null && t.type === M && t.key == null && t.props.tpl == null ? t.props.children : t;
|
|
135
135
|
try {
|
|
136
|
-
return k(
|
|
136
|
+
return k(t, i, e, a, o, c, !1);
|
|
137
137
|
} catch (b) {
|
|
138
|
-
return
|
|
138
|
+
return p.getDerivedStateFromError && (w[P] = p.getDerivedStateFromError(b)), w.componentDidCatch && w.componentDidCatch(b, oo), co(w) ? (t = bo(o, i), (w = o[I]).getChildContext != null && (i = K({}, i, w.getChildContext())), k(t = t != null && t.type === M && t.key == null && t.props.tpl == null ? t.props.children : t, i, e, a, o, c, r)) : g;
|
|
139
139
|
} finally {
|
|
140
|
-
|
|
140
|
+
$ && $(o), Z && Z(o);
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
|
|
144
|
+
t = t != null && t.type === M && t.key == null && t.props.tpl == null ? t.props.children : t;
|
|
145
145
|
try {
|
|
146
|
-
var
|
|
147
|
-
return
|
|
146
|
+
var Y = k(t, i, e, a, o, c, r);
|
|
147
|
+
return $ && $(o), f.unmount && f.unmount(o), o._suspended ? typeof Y == "string" ? q + Y + B : T(Y) ? (Y.unshift(q), Y.push(B), Y) : Y.then(function(b) {
|
|
148
148
|
return q + b + B;
|
|
149
|
-
}) :
|
|
149
|
+
}) : Y;
|
|
150
150
|
} catch (b) {
|
|
151
|
-
if (!
|
|
151
|
+
if (!c && r && r.onError) {
|
|
152
152
|
var to = function O(W) {
|
|
153
|
-
return r.onError(W, o, function(
|
|
153
|
+
return r.onError(W, o, function(U, mo) {
|
|
154
154
|
try {
|
|
155
|
-
return k(
|
|
155
|
+
return k(U, i, e, a, mo, c, r);
|
|
156
156
|
} catch (jo) {
|
|
157
157
|
return O(jo);
|
|
158
158
|
}
|
|
@@ -160,30 +160,30 @@ function k(o, t, e, i, l, p, r) {
|
|
|
160
160
|
}(b);
|
|
161
161
|
if (to !== void 0)
|
|
162
162
|
return to;
|
|
163
|
-
var io =
|
|
163
|
+
var io = f.__e;
|
|
164
164
|
return io && io(b, o), g;
|
|
165
165
|
}
|
|
166
|
-
if (!
|
|
166
|
+
if (!c || !b || typeof b.then != "function")
|
|
167
167
|
throw b;
|
|
168
168
|
return b.then(function O() {
|
|
169
169
|
try {
|
|
170
|
-
var W = k(
|
|
170
|
+
var W = k(t, i, e, a, o, c, r);
|
|
171
171
|
return o._suspended ? q + W + B : W;
|
|
172
|
-
} catch (
|
|
173
|
-
if (
|
|
174
|
-
throw
|
|
175
|
-
return
|
|
172
|
+
} catch (U) {
|
|
173
|
+
if (!U || typeof U.then != "function")
|
|
174
|
+
throw U;
|
|
175
|
+
return U.then(O);
|
|
176
176
|
}
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
|
-
var
|
|
181
|
-
for (var
|
|
182
|
-
var
|
|
183
|
-
if (typeof (
|
|
184
|
-
switch (
|
|
180
|
+
var D, A = "<" + p, j = g;
|
|
181
|
+
for (var n in d) {
|
|
182
|
+
var l = d[n];
|
|
183
|
+
if (typeof (l = Bo(l) ? l.value : l) != "function" || n === "class" || n === "className") {
|
|
184
|
+
switch (n) {
|
|
185
185
|
case "children":
|
|
186
|
-
|
|
186
|
+
D = l;
|
|
187
187
|
continue;
|
|
188
188
|
case "key":
|
|
189
189
|
case "ref":
|
|
@@ -191,64 +191,64 @@ function k(o, t, e, i, l, p, r) {
|
|
|
191
191
|
case "__source":
|
|
192
192
|
continue;
|
|
193
193
|
case "htmlFor":
|
|
194
|
-
if ("for" in
|
|
194
|
+
if ("for" in d)
|
|
195
195
|
continue;
|
|
196
|
-
|
|
196
|
+
n = "for";
|
|
197
197
|
break;
|
|
198
198
|
case "className":
|
|
199
|
-
if ("class" in
|
|
199
|
+
if ("class" in d)
|
|
200
200
|
continue;
|
|
201
|
-
|
|
201
|
+
n = "class";
|
|
202
202
|
break;
|
|
203
203
|
case "defaultChecked":
|
|
204
|
-
|
|
204
|
+
n = "checked";
|
|
205
205
|
break;
|
|
206
206
|
case "defaultSelected":
|
|
207
|
-
|
|
207
|
+
n = "selected";
|
|
208
208
|
break;
|
|
209
209
|
case "defaultValue":
|
|
210
210
|
case "value":
|
|
211
|
-
switch (
|
|
211
|
+
switch (n = "value", p) {
|
|
212
212
|
case "textarea":
|
|
213
|
-
|
|
213
|
+
D = l;
|
|
214
214
|
continue;
|
|
215
215
|
case "select":
|
|
216
|
-
|
|
216
|
+
a = l;
|
|
217
217
|
continue;
|
|
218
218
|
case "option":
|
|
219
|
-
|
|
219
|
+
a != l || "selected" in d || (A += " selected");
|
|
220
220
|
}
|
|
221
221
|
break;
|
|
222
222
|
case "dangerouslySetInnerHTML":
|
|
223
|
-
|
|
223
|
+
j = l && l.__html;
|
|
224
224
|
continue;
|
|
225
225
|
case "style":
|
|
226
|
-
typeof
|
|
226
|
+
typeof l == "object" && (l = Ro(l));
|
|
227
227
|
break;
|
|
228
228
|
case "acceptCharset":
|
|
229
|
-
|
|
229
|
+
n = "accept-charset";
|
|
230
230
|
break;
|
|
231
231
|
case "httpEquiv":
|
|
232
|
-
|
|
232
|
+
n = "http-equiv";
|
|
233
233
|
break;
|
|
234
234
|
default:
|
|
235
|
-
if (lo.test(
|
|
236
|
-
|
|
235
|
+
if (lo.test(n))
|
|
236
|
+
n = n.replace(lo, "$1:$2").toLowerCase();
|
|
237
237
|
else {
|
|
238
|
-
if (so.test(
|
|
238
|
+
if (so.test(n))
|
|
239
239
|
continue;
|
|
240
|
-
|
|
240
|
+
n[4] !== "-" && !To.has(n) || l == null ? e ? Po.test(n) && (n = n === "panose1" ? "panose-1" : n.replace(/([A-Z])/g, "-$1").toLowerCase()) : Uo.test(n) && (n = n.toLowerCase()) : l += g;
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
|
-
|
|
243
|
+
l != null && l !== !1 && (A = l === !0 || l === g ? A + " " + n : A + " " + n + '="' + (typeof l == "string" ? H(l) : l + g) + '"');
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
|
-
if (so.test(
|
|
247
|
-
throw new Error(
|
|
248
|
-
if (
|
|
249
|
-
return
|
|
250
|
-
var J = "</" +
|
|
251
|
-
return
|
|
246
|
+
if (so.test(p))
|
|
247
|
+
throw new Error(p + " is not a valid HTML tag name in " + A + ">");
|
|
248
|
+
if (j || (typeof D == "string" ? j = H(D) : D != null && D !== !1 && D !== !0 && (j = k(D, i, p === "svg" || p !== "foreignObject" && e, a, o, c, r))), $ && $(o), Z && Z(o), !j && qo.has(p))
|
|
249
|
+
return A + "/>";
|
|
250
|
+
var J = "</" + p + ">", N = A + ">";
|
|
251
|
+
return T(j) ? [N].concat(j, [J]) : typeof j != "string" ? [N, j, J] : N + j + J;
|
|
252
252
|
}
|
|
253
253
|
var qo = /* @__PURE__ */ new Set(["area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]);
|
|
254
254
|
function Bo(o) {
|
|
@@ -276,36 +276,36 @@ const Jo = `.inploi-job-search{font-size:16px}.inploi-job-search *,.inploi-job-s
|
|
|
276
276
|
"contract_type",
|
|
277
277
|
"pay_display"
|
|
278
278
|
], No = (o) => ({
|
|
279
|
-
getRenderTargetElement: (
|
|
280
|
-
const e =
|
|
281
|
-
if (
|
|
279
|
+
getRenderTargetElement: (i) => {
|
|
280
|
+
const e = i ? `[data-widget-id="${i}"]` : "", a = document.body.querySelectorAll(`*[data-widget=${ao}]${e}`);
|
|
281
|
+
if (a.length > 1)
|
|
282
282
|
throw o.error(
|
|
283
283
|
"Please ensure there is only one instance of the widget or provide a data-widget-id attribute to the widget."
|
|
284
284
|
), new Error("More than one job search widget found on the page.");
|
|
285
|
-
const
|
|
286
|
-
if (!
|
|
285
|
+
const s = a[0];
|
|
286
|
+
if (!s)
|
|
287
287
|
throw o.error(
|
|
288
288
|
`Please ensure there is an element with the properties data-widget="${ao}" ${e}`
|
|
289
289
|
), new Error("Job search widget didn’t find element");
|
|
290
|
-
return
|
|
290
|
+
return s;
|
|
291
291
|
}
|
|
292
|
-
}), Ko = () => Co(({ apiClient: o, rpcClient:
|
|
293
|
-
const
|
|
292
|
+
}), Ko = () => Co(({ apiClient: o, rpcClient: i, logger: e, analytics: a }) => {
|
|
293
|
+
const s = No(e), c = ({
|
|
294
294
|
params: r
|
|
295
295
|
}) => {
|
|
296
|
-
var m,
|
|
297
|
-
return
|
|
298
|
-
|
|
296
|
+
var m, h;
|
|
297
|
+
return x(Ao, { Fallback: Fo }, [
|
|
298
|
+
x(So, {
|
|
299
299
|
terms: r.terms,
|
|
300
|
-
locale: ((m = r.i18n) == null ? void 0 : m.locale) ?? ((
|
|
300
|
+
locale: ((m = r.i18n) == null ? void 0 : m.locale) ?? ((h = r.i18n) == null ? void 0 : h.fallbackLocale),
|
|
301
301
|
children: [
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
302
|
+
x("style", { id: "inploi-job-search-styles" }, Jo),
|
|
303
|
+
x("style", { id: "inploi-job-search-theme" }, Yo(r)),
|
|
304
|
+
x(Do, { theme: r.theme }),
|
|
305
|
+
x(Eo, {
|
|
306
306
|
properties: r.properties,
|
|
307
|
-
rpcClient:
|
|
308
|
-
analytics:
|
|
307
|
+
rpcClient: i,
|
|
308
|
+
analytics: a,
|
|
309
309
|
initialData: r.initialData,
|
|
310
310
|
onStateChange: r.onStateChange,
|
|
311
311
|
params: r
|
|
@@ -319,92 +319,92 @@ const Jo = `.inploi-job-search{font-size:16px}.inploi-job-search *,.inploi-job-s
|
|
|
319
319
|
* Useful when server-side rendering to avoid CLS.
|
|
320
320
|
*/
|
|
321
321
|
prerender: async (r) => {
|
|
322
|
-
var
|
|
323
|
-
const m = typeof r.initialState == "function" ? r.initialState(r) : r.initialState,
|
|
322
|
+
var u, y, _, z, v;
|
|
323
|
+
const m = typeof r.initialState == "function" ? r.initialState(r) : r.initialState, h = r.withData ? await xo({
|
|
324
324
|
state: m,
|
|
325
|
-
rpcClient:
|
|
325
|
+
rpcClient: i,
|
|
326
326
|
t: yo({
|
|
327
327
|
overrides: r.terms ?? {},
|
|
328
|
-
locale: ((
|
|
328
|
+
locale: ((u = r.i18n) == null ? void 0 : u.locale) ?? ((y = r.i18n) == null ? void 0 : y.fallbackLocale)
|
|
329
329
|
}),
|
|
330
330
|
prioritySegment: (_ = r.results) == null ? void 0 : _.prioritySegment,
|
|
331
|
-
locale: (
|
|
332
|
-
fallbackLocale: (
|
|
333
|
-
}).then((
|
|
331
|
+
locale: (z = r.i18n) == null ? void 0 : z.locale,
|
|
332
|
+
fallbackLocale: (v = r.i18n) == null ? void 0 : v.fallbackLocale
|
|
333
|
+
}).then((S) => ({ jobs: S })).catch(() => {
|
|
334
334
|
}) : void 0;
|
|
335
335
|
return {
|
|
336
336
|
html: Ho(
|
|
337
|
-
|
|
338
|
-
|
|
337
|
+
x(
|
|
338
|
+
M,
|
|
339
339
|
{},
|
|
340
|
-
|
|
340
|
+
x(c, {
|
|
341
341
|
params: {
|
|
342
342
|
...r,
|
|
343
|
-
initialData:
|
|
343
|
+
initialData: h
|
|
344
344
|
}
|
|
345
345
|
})
|
|
346
346
|
)
|
|
347
347
|
),
|
|
348
|
-
data:
|
|
348
|
+
data: h
|
|
349
349
|
};
|
|
350
350
|
},
|
|
351
351
|
/** Renders the Job Search Plugin inside the container element. */
|
|
352
352
|
render: async (r) => {
|
|
353
|
-
var
|
|
353
|
+
var p, d, C;
|
|
354
354
|
const m = typeof r.initialState == "function" ? r.initialState(r) : r.initialState;
|
|
355
|
-
let
|
|
356
|
-
const
|
|
357
|
-
var
|
|
358
|
-
return $o(
|
|
359
|
-
},
|
|
355
|
+
let h = { filters: m.filters, geo: m.geo };
|
|
356
|
+
const u = document.documentElement.lang.trim() || ((p = r.i18n) == null ? void 0 : p.locale), y = () => {
|
|
357
|
+
var t;
|
|
358
|
+
return $o(h, ((t = r.geolocation) == null ? void 0 : t.distanceUnit) ?? "miles", u);
|
|
359
|
+
}, _ = r.initialData ? ko : _o, z = s.getRenderTargetElement(r.widgetId);
|
|
360
360
|
zo(
|
|
361
361
|
typeof window < "u",
|
|
362
362
|
"the `render` method of JobSearch cannot be called in non-browser environments. Use `prerender` instead."
|
|
363
363
|
);
|
|
364
|
-
let
|
|
365
|
-
if (
|
|
366
|
-
r.onStateChange(
|
|
367
|
-
filters:
|
|
368
|
-
geo: "geo" in
|
|
369
|
-
},
|
|
370
|
-
} } }),
|
|
364
|
+
let v;
|
|
365
|
+
if (_(x(c, { params: { ...r, onStateChange: (t) => {
|
|
366
|
+
r.onStateChange(t), !(!t.filters && !("geo" in t)) && (h = {
|
|
367
|
+
filters: t.filters ?? h.filters,
|
|
368
|
+
geo: "geo" in t ? t.geo : h.geo
|
|
369
|
+
}, v == null || v.setFilters(y()));
|
|
370
|
+
} } }), z), r.feedback)
|
|
371
371
|
if (r.feedback.plugin instanceof Promise)
|
|
372
|
-
r.feedback.plugin.then(({ feedbackPlugin:
|
|
373
|
-
var
|
|
372
|
+
r.feedback.plugin.then(({ feedbackPlugin: t }) => {
|
|
373
|
+
var E, F;
|
|
374
374
|
if (!r.feedback)
|
|
375
375
|
return;
|
|
376
|
-
const
|
|
376
|
+
const w = t()({ apiClient: o, rpcClient: i, logger: e, analytics: a });
|
|
377
377
|
go({
|
|
378
|
-
instance:
|
|
378
|
+
instance: w,
|
|
379
379
|
theme: {
|
|
380
380
|
...r.theme,
|
|
381
|
-
...(
|
|
381
|
+
...(E = r.feedback.params) == null ? void 0 : E.theme
|
|
382
382
|
},
|
|
383
|
-
terms: ((
|
|
383
|
+
terms: ((F = r.feedback.params) == null ? void 0 : F.terms) ?? {}
|
|
384
384
|
});
|
|
385
385
|
});
|
|
386
386
|
else {
|
|
387
|
-
const
|
|
387
|
+
const t = r.feedback.plugin({ apiClient: o, rpcClient: i, logger: e, analytics: a });
|
|
388
388
|
go({
|
|
389
|
-
instance:
|
|
389
|
+
instance: t,
|
|
390
390
|
theme: {
|
|
391
391
|
...r.theme,
|
|
392
|
-
...(
|
|
392
|
+
...(d = r.feedback.params) == null ? void 0 : d.theme
|
|
393
393
|
},
|
|
394
|
-
terms: ((
|
|
394
|
+
terms: ((C = r.feedback.params) == null ? void 0 : C.terms) ?? {}
|
|
395
395
|
});
|
|
396
396
|
}
|
|
397
|
-
r.alerts && (r.alerts.plugin instanceof Promise ? r.alerts.plugin.then(({ jobAlertsPlugin:
|
|
398
|
-
r.alerts && (
|
|
397
|
+
r.alerts && (r.alerts.plugin instanceof Promise ? r.alerts.plugin.then(({ jobAlertsPlugin: t }) => {
|
|
398
|
+
r.alerts && (v = t()({ apiClient: o, rpcClient: i, logger: e, analytics: a }), v.render({
|
|
399
399
|
config: r.alerts.params.config,
|
|
400
400
|
terms: r.alerts.params.terms,
|
|
401
|
-
initialFilters:
|
|
401
|
+
initialFilters: y(),
|
|
402
402
|
theme: r.theme
|
|
403
403
|
}));
|
|
404
|
-
}) : (
|
|
404
|
+
}) : (v = r.alerts.plugin({ apiClient: o, rpcClient: i, logger: e, analytics: a }), v.render({
|
|
405
405
|
config: r.alerts.params.config,
|
|
406
406
|
terms: r.alerts.params.terms,
|
|
407
|
-
initialFilters:
|
|
407
|
+
initialFilters: y(),
|
|
408
408
|
theme: r.theme
|
|
409
409
|
})));
|
|
410
410
|
}
|