Skip to content

Instantly share code, notes, and snippets.

@leoloso
Created July 6, 2020 12:42
Show Gist options
  • Save leoloso/98c1673018dbdacfefd835ebbde70bc9 to your computer and use it in GitHub Desktop.
Save leoloso/98c1673018dbdacfefd835ebbde70bc9 to your computer and use it in GitHub Desktop.
// Related to https://github.com/WordPress/gutenberg/issues/23607
// This is the prettyprinted code for a block's `build/index.js` after running `npm run build`
// This code doesn't work! It compiles, but the block is not added under `wp.blocks.getBlockTypes()`
// When loading the editor in the browser, the block is not loaded, and it throws this error in the console:
// Uncaught TypeError: e[t] is undefined
! function(e) {
function t(t) {
for (var r, s, a = t[0], u = t[1], c = t[2], p = 0, d = []; p < a.length; p++) s = a[p], Object.prototype.hasOwnProperty.call(o, s) && o[s] && d.push(o[s][0]), o[s] = 0;
for (r in u) Object.prototype.hasOwnProperty.call(u, r) && (e[r] = u[r]);
for (l && l(t); d.length;) d.shift()();
return i.push.apply(i, c || []), n()
}
function n() {
for (var e, t = 0; t < i.length; t++) {
for (var n = i[t], r = !0, a = 1; a < n.length; a++) {
var u = n[a];
0 !== o[u] && (r = !1)
}
r && (i.splice(t--, 1), e = s(s.s = n[0]))
}
return e
}
var r = {},
o = {
0: 0
},
i = [];
function s(t) {
if (r[t]) return r[t].exports;
var n = r[t] = {
i: t,
l: !1,
exports: {}
};
return e[t].call(n.exports, n, n.exports, s), n.l = !0, n.exports
}
s.m = e, s.c = r, s.d = function(e, t, n) {
s.o(e, t) || Object.defineProperty(e, t, {
enumerable: !0,
get: n
})
}, s.r = function(e) {
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {
value: "Module"
}), Object.defineProperty(e, "__esModule", {
value: !0
})
}, s.t = function(e, t) {
if (1 & t && (e = s(e)), 8 & t) return e;
if (4 & t && "object" == typeof e && e && e.__esModule) return e;
var n = Object.create(null);
if (s.r(n), Object.defineProperty(n, "default", {
enumerable: !0,
value: e
}), 2 & t && "string" != typeof e)
for (var r in e) s.d(n, r, function(t) {
return e[t]
}.bind(null, r));
return n
}, s.n = function(e) {
var t = e && e.__esModule ? function() {
return e.default
} : function() {
return e
};
return s.d(t, "a", t), t
}, s.o = function(e, t) {
return Object.prototype.hasOwnProperty.call(e, t)
}, s.p = "";
var a = window.webpackJsonp = window.webpackJsonp || [],
u = a.push.bind(a);
a.push = t, a = a.slice();
for (var c = 0; c < a.length; c++) t(a[c]);
var l = u;
i.push([38, 1]), n()
}([function(e, t) {
! function() {
e.exports = this.wp.element
}()
}, function(e, t) {
! function() {
e.exports = this.wp.i18n
}()
}, function(e, t) {
! function() {
e.exports = this.React
}()
}, function(e, t) {
! function() {
e.exports = this.wp.compose
}()
}, function(e, t) {
! function() {
e.exports = this.wp.components
}()
}, function(e, t) {
function n() {
return e.exports = n = Object.assign || function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
}
return e
}, n.apply(this, arguments)
}
e.exports = n
}, function(e, t) {
! function() {
e.exports = this.wp.data
}()
}, function(e, t) {
e.exports = function(e, t, n) {
return t in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e
}
}, function(e, t) {
! function() {
e.exports = this.lodash
}()
}, function(e, t) {
! function() {
e.exports = this.regeneratorRuntime
}()
}, function(e, t, n) {
var r = n(35),
o = n(36),
i = n(19),
s = n(37);
e.exports = function(e, t) {
return r(e) || o(e, t) || i(e, t) || s()
}
}, function(e, t) {
! function() {
e.exports = this.ReactDOM
}()
}, function(e, t, n) {
e.exports = n(33)()
}, function(e, t, n) {
var r = n(27),
o = n(28),
i = n(19),
s = n(29);
e.exports = function(e) {
return r(e) || o(e) || i(e) || s()
}
}, function(e, t, n) {}, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = Object.assign || function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
}
return e
},
o = function() {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r)
}
}
return function(t, n, r) {
return n && e(t.prototype, n), r && e(t, r), t
}
}(),
i = n(2),
s = u(i),
a = u(n(12));
function u(e) {
return e && e.__esModule ? e : {
default: e
}
}
var c = {
position: "absolute",
top: 0,
left: 0,
visibility: "hidden",
height: 0,
overflow: "scroll",
whiteSpace: "pre"
},
l = ["extraWidth", "injectStyles", "inputClassName", "inputRef", "inputStyle", "minWidth", "onAutosize", "placeholderIsMinWidth"],
p = function(e, t) {
t.style.fontSize = e.fontSize, t.style.fontFamily = e.fontFamily, t.style.fontWeight = e.fontWeight, t.style.fontStyle = e.fontStyle, t.style.letterSpacing = e.letterSpacing, t.style.textTransform = e.textTransform
},
d = !("undefined" == typeof window || !window.navigator) && /MSIE |Trident\/|Edge\//.test(window.navigator.userAgent),
f = function() {
return d ? "_" + Math.random().toString(36).substr(2, 12) : void 0
},
h = function(e) {
function t(e) {
! function(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}(this, t);
var n = function(e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !t || "object" != typeof t && "function" != typeof t ? e : t
}(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e));
return n.inputRef = function(e) {
n.input = e, "function" == typeof n.props.inputRef && n.props.inputRef(e)
}, n.placeHolderSizerRef = function(e) {
n.placeHolderSizer = e
}, n.sizerRef = function(e) {
n.sizer = e
}, n.state = {
inputWidth: e.minWidth,
inputId: e.id || f()
}, n
}
return function(e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
enumerable: !1,
writable: !0,
configurable: !0
}
}), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t)
}(t, e), o(t, [{
key: "componentDidMount",
value: function() {
this.mounted = !0, this.copyInputStyles(), this.updateInputWidth()
}
}, {
key: "UNSAFE_componentWillReceiveProps",
value: function(e) {
var t = e.id;
t !== this.props.id && this.setState({
inputId: t || f()
})
}
}, {
key: "componentDidUpdate",
value: function(e, t) {
t.inputWidth !== this.state.inputWidth && "function" == typeof this.props.onAutosize && this.props.onAutosize(this.state.inputWidth), this.updateInputWidth()
}
}, {
key: "componentWillUnmount",
value: function() {
this.mounted = !1
}
}, {
key: "copyInputStyles",
value: function() {
if (this.mounted && window.getComputedStyle) {
var e = this.input && window.getComputedStyle(this.input);
e && (p(e, this.sizer), this.placeHolderSizer && p(e, this.placeHolderSizer))
}
}
}, {
key: "updateInputWidth",
value: function() {
if (this.mounted && this.sizer && void 0 !== this.sizer.scrollWidth) {
var e = void 0;
e = this.props.placeholder && (!this.props.value || this.props.value && this.props.placeholderIsMinWidth) ? Math.max(this.sizer.scrollWidth, this.placeHolderSizer.scrollWidth) + 2 : this.sizer.scrollWidth + 2, (e += "number" === this.props.type && void 0 === this.props.extraWidth ? 16 : parseInt(this.props.extraWidth) || 0) < this.props.minWidth && (e = this.props.minWidth), e !== this.state.inputWidth && this.setState({
inputWidth: e
})
}
}
}, {
key: "getInput",
value: function() {
return this.input
}
}, {
key: "focus",
value: function() {
this.input.focus()
}
}, {
key: "blur",
value: function() {
this.input.blur()
}
}, {
key: "select",
value: function() {
this.input.select()
}
}, {
key: "renderStyles",
value: function() {
var e = this.props.injectStyles;
return d && e ? s.default.createElement("style", {
dangerouslySetInnerHTML: {
__html: "input#" + this.state.inputId + "::-ms-clear {display: none;}"
}
}) : null
}
}, {
key: "render",
value: function() {
var e = [this.props.defaultValue, this.props.value, ""].reduce((function(e, t) {
return null != e ? e : t
})),
t = r({}, this.props.style);
t.display || (t.display = "inline-block");
var n = r({
boxSizing: "content-box",
width: this.state.inputWidth + "px"
}, this.props.inputStyle),
o = function(e, t) {
var n = {};
for (var r in e) t.indexOf(r) >= 0 || Object.prototype.hasOwnProperty.call(e, r) && (n[r] = e[r]);
return n
}(this.props, []);
return function(e) {
l.forEach((function(t) {
return delete e[t]
}))
}(o), o.className = this.props.inputClassName, o.id = this.state.inputId, o.style = n, s.default.createElement("div", {
className: this.props.className,
style: t
}, this.renderStyles(), s.default.createElement("input", r({}, o, {
ref: this.inputRef
})), s.default.createElement("div", {
ref: this.sizerRef,
style: c
}, e), this.props.placeholder ? s.default.createElement("div", {
ref: this.placeHolderSizerRef,
style: c
}, this.props.placeholder) : null)
}
}]), t
}(i.Component);
h.propTypes = {
className: a.default.string,
defaultValue: a.default.any,
extraWidth: a.default.oneOfType([a.default.number, a.default.string]),
id: a.default.string,
injectStyles: a.default.bool,
inputClassName: a.default.string,
inputRef: a.default.func,
inputStyle: a.default.object,
minWidth: a.default.oneOfType([a.default.number, a.default.string]),
onAutosize: a.default.func,
onChange: a.default.func,
placeholder: a.default.string,
placeholderIsMinWidth: a.default.bool,
style: a.default.object,
value: a.default.any
}, h.defaultProps = {
minWidth: 1,
injectStyles: !0
}, t.default = h
}, function(e, t) {
! function() {
e.exports = this.wp.primitives
}()
}, function(e, t, n) {
"use strict";
var r, o = this && this.__extends || (r = Object.setPrototypeOf || {
__proto__: []
}
instanceof Array && function(e, t) {
e.__proto__ = t
} || function(e, t) {
for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n])
},
function(e, t) {
function n() {
this.constructor = e
}
r(e, t), e.prototype = null === t ? Object.create(t) : (n.prototype = t.prototype, new n)
});
Object.defineProperty(t, "__esModule", {
value: !0
});
var i = function(e) {
function t(n, r) {
var o = this,
i = t.extractMessage(n) + ": " + JSON.stringify({
response: n,
request: r
});
return (o = e.call(this, i) || this).response = n, o.request = r, "function" == typeof Error.captureStackTrace && Error.captureStackTrace(o, t), o
}
return o(t, e), t.extractMessage = function(e) {
try {
return e.errors[0].message
} catch (t) {
return "GraphQL Error (Code: " + e.status + ")"
}
}, t
}(Error);
t.ClientError = i
}, function(e, t) {
e.exports = function(e, t) {
(null == t || t > e.length) && (t = e.length);
for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n];
return r
}
}, function(e, t, n) {
var r = n(18);
e.exports = function(e, t) {
if (e) {
if ("string" == typeof e) return r(e, t);
var n = Object.prototype.toString.call(e).slice(8, -1);
return "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? r(e, t) : void 0
}
}
}, function(e, t, n) {}, function(e, t) {
! function() {
e.exports = this.wp.blocks
}()
}, function(e, t) {
function n() {
return e.exports = n = Object.assign || function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
}
return e
}, n.apply(this, arguments)
}
e.exports = n
}, function(e, t, n) {
"use strict";
var r = this && this.__assign || Object.assign || function(e) {
for (var t, n = 1, r = arguments.length; n < r; n++)
for (var o in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
return e
},
o = this && this.__awaiter || function(e, t, n, r) {
return new(n || (n = Promise))((function(o, i) {
function s(e) {
try {
u(r.next(e))
} catch (e) {
i(e)
}
}
function a(e) {
try {
u(r.throw(e))
} catch (e) {
i(e)
}
}
function u(e) {
e.done ? o(e.value) : new n((function(t) {
t(e.value)
})).then(s, a)
}
u((r = r.apply(e, t || [])).next())
}))
},
i = this && this.__generator || function(e, t) {
var n, r, o, i, s = {
label: 0,
sent: function() {
if (1 & o[0]) throw o[1];
return o[1]
},
trys: [],
ops: []
};
return i = {
next: a(0),
throw: a(1),
return: a(2)
}, "function" == typeof Symbol && (i[Symbol.iterator] = function() {
return this
}), i;
function a(i) {
return function(a) {
return function(i) {
if (n) throw new TypeError("Generator is already executing.");
for (; s;) try {
if (n = 1, r && (o = r[2 & i[0] ? "return" : i[0] ? "throw" : "next"]) && !(o = o.call(r, i[1])).done) return o;
switch (r = 0, o && (i = [0, o.value]), i[0]) {
case 0:
case 1:
o = i;
break;
case 4:
return s.label++, {
value: i[1],
done: !1
};
case 5:
s.label++, r = i[1], i = [0];
continue;
case 7:
i = s.ops.pop(), s.trys.pop();
continue;
default:
if (!(o = s.trys, (o = o.length > 0 && o[o.length - 1]) || 6 !== i[0] && 2 !== i[0])) {
s = 0;
continue
}
if (3 === i[0] && (!o || i[1] > o[0] && i[1] < o[3])) {
s.label = i[1];
break
}
if (6 === i[0] && s.label < o[1]) {
s.label = o[1], o = i;
break
}
if (o && s.label < o[2]) {
s.label = o[2], s.ops.push(i);
break
}
o[2] && s.ops.pop(), s.trys.pop();
continue
}
i = t.call(e, s)
} catch (e) {
i = [6, e], r = 0
} finally {
n = o = 0
}
if (5 & i[0]) throw i[1];
return {
value: i[0] ? i[1] : void 0,
done: !0
}
}([i, a])
}
}
},
s = this && this.__rest || function(e, t) {
var n = {};
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
if (null != e && "function" == typeof Object.getOwnPropertySymbols) {
var o = 0;
for (r = Object.getOwnPropertySymbols(e); o < r.length; o++) t.indexOf(r[o]) < 0 && (n[r[o]] = e[r[o]])
}
return n
};
Object.defineProperty(t, "__esModule", {
value: !0
});
var a = n(17),
u = n(17);
t.ClientError = u.ClientError, n(25);
var c = function() {
function e(e, t) {
this.url = e, this.options = t || {}
}
return e.prototype.rawRequest = function(e, t) {
return o(this, void 0, void 0, (function() {
var n, o, u, c, l, d, f, h, m;
return i(this, (function(i) {
switch (i.label) {
case 0:
return n = this.options, o = n.headers, u = s(n, ["headers"]), c = JSON.stringify({
query: e,
variables: t || void 0
}), [4, fetch(this.url, r({
method: "POST",
headers: Object.assign({
"Content-Type": "application/json"
}, o),
body: c
}, u))];
case 1:
return [4, p(l = i.sent())];
case 2:
if (d = i.sent(), l.ok && !d.errors && d.data) return f = l.headers, h = l.status, [2, r({}, d, {
headers: f,
status: h
})];
throw m = "string" == typeof d ? {
error: d
} : d, new a.ClientError(r({}, m, {
status: l.status,
headers: l.headers
}), {
query: e,
variables: t
})
}
}))
}))
}, e.prototype.request = function(e, t) {
return o(this, void 0, void 0, (function() {
var n, o, u, c, l, d, f;
return i(this, (function(i) {
switch (i.label) {
case 0:
return n = this.options, o = n.headers, u = s(n, ["headers"]), c = JSON.stringify({
query: e,
variables: t || void 0
}), [4, fetch(this.url, r({
method: "POST",
headers: Object.assign({
"Content-Type": "application/json"
}, o),
body: c
}, u))];
case 1:
return [4, p(l = i.sent())];
case 2:
if (d = i.sent(), l.ok && !d.errors && d.data) return [2, d.data];
throw f = "string" == typeof d ? {
error: d
} : d, new a.ClientError(r({}, f, {
status: l.status
}), {
query: e,
variables: t
})
}
}))
}))
}, e.prototype.setHeaders = function(e) {
return this.options.headers = e, this
}, e.prototype.setHeader = function(e, t) {
var n, r = this.options.headers;
return r ? r[e] = t : this.options.headers = ((n = {})[e] = t, n), this
}, e
}();
function l(e, t, n) {
return o(this, void 0, void 0, (function() {
return i(this, (function(r) {
return [2, new c(e).request(t, n)]
}))
}))
}
function p(e) {
return o(this, void 0, void 0, (function() {
var t;
return i(this, (function(n) {
return (t = e.headers.get("Content-Type")) && t.startsWith("application/json") ? [2, e.json()] : [2, e.text()]
}))
}))
}
t.GraphQLClient = c, t.rawRequest = function(e, t, n) {
return o(this, void 0, void 0, (function() {
return i(this, (function(r) {
return [2, new c(e).rawRequest(t, n)]
}))
}))
}, t.request = l, t.default = l
}, function(e, t) {
e.exports = function(e, t) {
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, e.__proto__ = t
}
}, function(e, t) {
! function(e) {
if (!e.fetch) {
var t = "URLSearchParams" in e,
n = "Symbol" in e && "iterator" in Symbol,
r = "FileReader" in e && "Blob" in e && function() {
try {
return new Blob, !0
} catch (e) {
return !1
}
}(),
o = "FormData" in e,
i = "ArrayBuffer" in e;
if (i) var s = ["[object Int8Array]", "[object Uint8Array]", "[object Uint8ClampedArray]", "[object Int16Array]", "[object Uint16Array]", "[object Int32Array]", "[object Uint32Array]", "[object Float32Array]", "[object Float64Array]"],
a = function(e) {
return e && DataView.prototype.isPrototypeOf(e)
},
u = ArrayBuffer.isView || function(e) {
return e && s.indexOf(Object.prototype.toString.call(e)) > -1
};
h.prototype.append = function(e, t) {
e = p(e), t = d(t);
var n = this.map[e];
this.map[e] = n ? n + "," + t : t
}, h.prototype.delete = function(e) {
delete this.map[p(e)]
}, h.prototype.get = function(e) {
return e = p(e), this.has(e) ? this.map[e] : null
}, h.prototype.has = function(e) {
return this.map.hasOwnProperty(p(e))
}, h.prototype.set = function(e, t) {
this.map[p(e)] = d(t)
}, h.prototype.forEach = function(e, t) {
for (var n in this.map) this.map.hasOwnProperty(n) && e.call(t, this.map[n], n, this)
}, h.prototype.keys = function() {
var e = [];
return this.forEach((function(t, n) {
e.push(n)
})), f(e)
}, h.prototype.values = function() {
var e = [];
return this.forEach((function(t) {
e.push(t)
})), f(e)
}, h.prototype.entries = function() {
var e = [];
return this.forEach((function(t, n) {
e.push([n, t])
})), f(e)
}, n && (h.prototype[Symbol.iterator] = h.prototype.entries);
var c = ["DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"];
E.prototype.clone = function() {
return new E(this, {
body: this._bodyInit
})
}, y.call(E.prototype), y.call(C.prototype), C.prototype.clone = function() {
return new C(this._bodyInit, {
status: this.status,
statusText: this.statusText,
headers: new h(this.headers),
url: this.url
})
}, C.error = function() {
var e = new C(null, {
status: 0,
statusText: ""
});
return e.type = "error", e
};
var l = [301, 302, 303, 307, 308];
C.redirect = function(e, t) {
if (-1 === l.indexOf(t)) throw new RangeError("Invalid status code");
return new C(null, {
status: t,
headers: {
location: e
}
})
}, e.Headers = h, e.Request = E, e.Response = C, e.fetch = function(e, t) {
return new Promise((function(n, o) {
var i = new E(e, t),
s = new XMLHttpRequest;
s.onload = function() {
var e, t, r = {
status: s.status,
statusText: s.statusText,
headers: (e = s.getAllResponseHeaders() || "", t = new h, e.replace(/\r?\n[\t ]+/g, " ").split(/\r?\n/).forEach((function(e) {
var n = e.split(":"),
r = n.shift().trim();
if (r) {
var o = n.join(":").trim();
t.append(r, o)
}
})), t)
};
r.url = "responseURL" in s ? s.responseURL : r.headers.get("X-Request-URL");
var o = "response" in s ? s.response : s.responseText;
n(new C(o, r))
}, s.onerror = function() {
o(new TypeError("Network request failed"))
}, s.ontimeout = function() {
o(new TypeError("Network request failed"))
}, s.open(i.method, i.url, !0), "include" === i.credentials ? s.withCredentials = !0 : "omit" === i.credentials && (s.withCredentials = !1), "responseType" in s && r && (s.responseType = "blob"), i.headers.forEach((function(e, t) {
s.setRequestHeader(t, e)
})), s.send(void 0 === i._bodyInit ? null : i._bodyInit)
}))
}, e.fetch.polyfill = !0
}
function p(e) {
if ("string" != typeof e && (e = String(e)), /[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e)) throw new TypeError("Invalid character in header field name");
return e.toLowerCase()
}
function d(e) {
return "string" != typeof e && (e = String(e)), e
}
function f(e) {
var t = {
next: function() {
var t = e.shift();
return {
done: void 0 === t,
value: t
}
}
};
return n && (t[Symbol.iterator] = function() {
return t
}), t
}
function h(e) {
this.map = {}, e instanceof h ? e.forEach((function(e, t) {
this.append(t, e)
}), this) : Array.isArray(e) ? e.forEach((function(e) {
this.append(e[0], e[1])
}), this) : e && Object.getOwnPropertyNames(e).forEach((function(t) {
this.append(t, e[t])
}), this)
}
function m(e) {
if (e.bodyUsed) return Promise.reject(new TypeError("Already read"));
e.bodyUsed = !0
}
function g(e) {
return new Promise((function(t, n) {
e.onload = function() {
t(e.result)
}, e.onerror = function() {
n(e.error)
}
}))
}
function v(e) {
var t = new FileReader,
n = g(t);
return t.readAsArrayBuffer(e), n
}
function b(e) {
if (e.slice) return e.slice(0);
var t = new Uint8Array(e.byteLength);
return t.set(new Uint8Array(e)), t.buffer
}
function y() {
return this.bodyUsed = !1, this._initBody = function(e) {
if (this._bodyInit = e, e)
if ("string" == typeof e) this._bodyText = e;
else if (r && Blob.prototype.isPrototypeOf(e)) this._bodyBlob = e;
else if (o && FormData.prototype.isPrototypeOf(e)) this._bodyFormData = e;
else if (t && URLSearchParams.prototype.isPrototypeOf(e)) this._bodyText = e.toString();
else if (i && r && a(e)) this._bodyArrayBuffer = b(e.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer]);
else {
if (!i || !ArrayBuffer.prototype.isPrototypeOf(e) && !u(e)) throw new Error("unsupported BodyInit type");
this._bodyArrayBuffer = b(e)
} else this._bodyText = "";
this.headers.get("content-type") || ("string" == typeof e ? this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob && this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : t && URLSearchParams.prototype.isPrototypeOf(e) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"))
}, r && (this.blob = function() {
var e = m(this);
if (e) return e;
if (this._bodyBlob) return Promise.resolve(this._bodyBlob);
if (this._bodyArrayBuffer) return Promise.resolve(new Blob([this._bodyArrayBuffer]));
if (this._bodyFormData) throw new Error("could not read FormData body as blob");
return Promise.resolve(new Blob([this._bodyText]))
}, this.arrayBuffer = function() {
return this._bodyArrayBuffer ? m(this) || Promise.resolve(this._bodyArrayBuffer) : this.blob().then(v)
}), this.text = function() {
var e, t, n, r = m(this);
if (r) return r;
if (this._bodyBlob) return e = this._bodyBlob, t = new FileReader, n = g(t), t.readAsText(e), n;
if (this._bodyArrayBuffer) return Promise.resolve(function(e) {
for (var t = new Uint8Array(e), n = new Array(t.length), r = 0; r < t.length; r++) n[r] = String.fromCharCode(t[r]);
return n.join("")
}(this._bodyArrayBuffer));
if (this._bodyFormData) throw new Error("could not read FormData body as text");
return Promise.resolve(this._bodyText)
}, o && (this.formData = function() {
return this.text().then(O)
}), this.json = function() {
return this.text().then(JSON.parse)
}, this
}
function E(e, t) {
var n, r, o = (t = t || {}).body;
if (e instanceof E) {
if (e.bodyUsed) throw new TypeError("Already read");
this.url = e.url, this.credentials = e.credentials, t.headers || (this.headers = new h(e.headers)), this.method = e.method, this.mode = e.mode, o || null == e._bodyInit || (o = e._bodyInit, e.bodyUsed = !0)
} else this.url = String(e);
if (this.credentials = t.credentials || this.credentials || "omit", !t.headers && this.headers || (this.headers = new h(t.headers)), this.method = (n = t.method || this.method || "GET", r = n.toUpperCase(), c.indexOf(r) > -1 ? r : n), this.mode = t.mode || this.mode || null, this.referrer = null, ("GET" === this.method || "HEAD" === this.method) && o) throw new TypeError("Body not allowed for GET or HEAD requests");
this._initBody(o)
}
function O(e) {
var t = new FormData;
return e.trim().split("&").forEach((function(e) {
if (e) {
var n = e.split("="),
r = n.shift().replace(/\+/g, " "),
o = n.join("=").replace(/\+/g, " ");
t.append(decodeURIComponent(r), decodeURIComponent(o))
}
})), t
}
function C(e, t) {
t || (t = {}), this.type = "default", this.status = void 0 === t.status ? 200 : t.status, this.ok = this.status >= 200 && this.status < 300, this.statusText = "statusText" in t ? t.statusText : "OK", this.headers = new h(t.headers), this.url = t.url || "", this._initBody(e)
}
}("undefined" != typeof self ? self : this)
}, , function(e, t, n) {
var r = n(18);
e.exports = function(e) {
if (Array.isArray(e)) return r(e)
}
}, function(e, t) {
e.exports = function(e) {
if ("undefined" != typeof Symbol && Symbol.iterator in Object(e)) return Array.from(e)
}
}, function(e, t) {
e.exports = function() {
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
}
}, , , , function(e, t, n) {
"use strict";
var r = n(34);
function o() {}
function i() {}
i.resetWarningCache = o, e.exports = function() {
function e(e, t, n, o, i, s) {
if (s !== r) {
var a = new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");
throw a.name = "Invariant Violation", a
}
}
function t() {
return e
}
e.isRequired = e;
var n = {
array: e,
bool: e,
func: e,
number: e,
object: e,
string: e,
symbol: e,
any: e,
arrayOf: t,
element: e,
elementType: e,
instanceOf: t,
node: e,
objectOf: t,
oneOf: t,
oneOfType: t,
shape: t,
exact: t,
checkPropTypes: i,
resetWarningCache: o
};
return n.PropTypes = n, n
}
}, function(e, t, n) {
"use strict";
e.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"
}, function(e, t) {
e.exports = function(e) {
if (Array.isArray(e)) return e
}
}, function(e, t) {
e.exports = function(e, t) {
if ("undefined" != typeof Symbol && Symbol.iterator in Object(e)) {
var n = [],
r = !0,
o = !1,
i = void 0;
try {
for (var s, a = e[Symbol.iterator](); !(r = (s = a.next()).done) && (n.push(s.value), !t || n.length !== t); r = !0);
} catch (e) {
o = !0, i = e
} finally {
try {
r || null == a.return || a.return()
} finally {
if (o) throw i
}
}
return n
}
}
}, function(e, t) {
e.exports = function() {
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
}
}, function(e, t, n) {
"use strict";
n.r(t);
var r = {};
n.r(r), n.d(r, "getTypeFields", (function() {
return y
})), n.d(r, "hasRetrievedTypeFields", (function() {
return E
})), n.d(r, "getRetrievingTypeFieldsErrorMessage", (function() {
return O
})), n.d(r, "getDirectives", (function() {
return C
})), n.d(r, "hasRetrievedDirectives", (function() {
return w
})), n.d(r, "getRetrievingDirectivesErrorMessage", (function() {
return A
})), n.d(r, "getAccessControlLists", (function() {
return S
})), n.d(r, "hasRetrievedAccessControlLists", (function() {
return F
})), n.d(r, "getRetrievingAccessControlListsErrorMessage", (function() {
return x
})), n.d(r, "getCacheControlLists", (function() {
return D
})), n.d(r, "hasRetrievedCacheControlLists", (function() {
return j
})), n.d(r, "getRetrievingCacheControlListsErrorMessage", (function() {
return _
})), n.d(r, "getFieldDeprecationLists", (function() {
return L
})), n.d(r, "hasRetrievedFieldDeprecationLists", (function() {
return I
})), n.d(r, "getRetrievingFieldDeprecationListsErrorMessage", (function() {
return M
}));
var o = {};
n.r(o), n.d(o, "setTypeFields", (function() {
return T
})), n.d(o, "receiveTypeFields", (function() {
return k
})), n.d(o, "setDirectives", (function() {
return P
})), n.d(o, "receiveDirectives", (function() {
return R
})), n.d(o, "setAccessControlLists", (function() {
return N
})), n.d(o, "receiveAccessControlLists", (function() {
return V
})), n.d(o, "setCacheControlLists", (function() {
return B
})), n.d(o, "receiveCacheControlLists", (function() {
return H
})), n.d(o, "setFieldDeprecationLists", (function() {
return U
})), n.d(o, "receiveFieldDeprecationLists", (function() {
return q
}));
var i = n(21),
s = n(1),
a = n(3),
u = n(22),
c = n.n(u),
l = n(0),
p = n(4),
d = n(6),
f = n(7),
h = n.n(f);
function m(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var r = Object.getOwnPropertySymbols(e);
t && (r = r.filter((function(t) {
return Object.getOwnPropertyDescriptor(e, t).enumerable
}))), n.push.apply(n, r)
}
return n
}
function g(e) {
for (var t = 1; t < arguments.length; t++) {
var n = null != arguments[t] ? arguments[t] : {};
t % 2 ? m(Object(n), !0).forEach((function(t) {
h()(e, t, n[t])
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : m(Object(n)).forEach((function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t))
}))
}
return e
}
var v = {
typeFields: [],
hasRetrievedTypeFields: !1,
retrievingTypeFieldsErrorMessage: null,
directives: [],
hasRetrievedDirectives: !1,
retrievingDirectivesErrorMessage: null,
accessControlLists: [],
hasRetrievedAccessControlLists: !1,
retrievingAccessControlListsErrorMessage: null,
cacheControlLists: [],
hasRetrievedCacheControlLists: !1,
retrievingCacheControlListsErrorMessage: null,
fieldDeprecationLists: [],
hasRetrievedFieldDeprecationLists: !1,
retrievingFieldDeprecationListsErrorMessage: null
},
b = function() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : v,
t = arguments.length > 1 ? arguments[1] : void 0;
switch (t.type) {
case "SET_TYPE_FIELDS":
return g(g({}, e), {}, {
typeFields: t.typeFields,
hasRetrievedTypeFields: !0,
retrievingTypeFieldsErrorMessage: t.errorMessage
});
case "SET_DIRECTIVES":
return g(g({}, e), {}, {
directives: t.directives,
hasRetrievedDirectives: !0,
retrievingDirectivesErrorMessage: t.errorMessage
});
case "SET_ACCESS_CONTROL_LISTS":
return g(g({}, e), {}, {
accessControlLists: t.accessControlLists,
hasRetrievedAccessControlLists: !0,
retrievingAccessControlListsErrorMessage: t.errorMessage
});
case "SET_CACHE_CONTROL_LISTS":
return g(g({}, e), {}, {
cacheControlLists: t.cacheControlLists,
hasRetrievedCacheControlLists: !0,
retrievingCacheControlListsErrorMessage: t.errorMessage
});
case "SET_FIELD_DEPRECATION_LISTS":
return g(g({}, e), {}, {
fieldDeprecationLists: t.fieldDeprecationLists,
hasRetrievedFieldDeprecationLists: !0,
retrievingFieldDeprecationListsErrorMessage: t.errorMessage
})
}
return e
};
function y(e) {
var t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1],
n = arguments.length > 2 && void 0 !== arguments[2] && arguments[2],
r = e.typeFields;
return t || (r = r.filter((function(e) {
return null != e.fields
}))), n || (r = r.filter((function(e) {
return !e.typeName.startsWith("__")
}))), r
}
function E(e) {
return e.hasRetrievedTypeFields
}
function O(e) {
return e.retrievingTypeFieldsErrorMessage
}
function C(e) {
return e.directives
}
function w(e) {
return e.hasRetrievedDirectives
}
function A(e) {
return e.retrievingDirectivesErrorMessage
}
function S(e) {
return e.accessControlLists
}
function F(e) {
return e.hasRetrievedAccessControlLists
}
function x(e) {
return e.retrievingAccessControlListsErrorMessage
}
function D(e) {
return e.cacheControlLists
}
function j(e) {
return e.hasRetrievedCacheControlLists
}
function _(e) {
return e.retrievingCacheControlListsErrorMessage
}
function L(e) {
return e.fieldDeprecationLists
}
function I(e) {
return e.hasRetrievedFieldDeprecationLists
}
function M(e) {
return e.retrievingFieldDeprecationListsErrorMessage
}
function T(e, t) {
return {
type: "SET_TYPE_FIELDS",
typeFields: e,
errorMessage: t
}
}
function k(e) {
return {
type: "RECEIVE_TYPE_FIELDS",
query: e
}
}
function P(e, t) {
return {
type: "SET_DIRECTIVES",
directives: e,
errorMessage: t
}
}
function R(e) {
return {
type: "RECEIVE_DIRECTIVES",
query: e
}
}
function N(e, t) {
return {
type: "SET_ACCESS_CONTROL_LISTS",
accessControlLists: e,
errorMessage: t
}
}
function V(e) {
return {
type: "RECEIVE_ACCESS_CONTROL_LISTS",
query: e
}
}
function B(e, t) {
return {
type: "SET_CACHE_CONTROL_LISTS",
cacheControlLists: e,
errorMessage: t
}
}
function H(e) {
return {
type: "RECEIVE_CACHE_CONTROL_LISTS",
query: e
}
}
function U(e, t) {
return {
type: "SET_FIELD_DEPRECATION_LISTS",
fieldDeprecationLists: e,
errorMessage: t
}
}
function q(e) {
return {
type: "RECEIVE_FIELD_DEPRECATION_LISTS",
query: e
}
}
var z = n(9),
W = n.n(z),
G = "\n\tquery GetTypeFields {\n\t\t__schema {\n\t\t\ttypes {\n\t\t\t\tname\n\t\t\t\tnamespacedName:name(namespaced: true)\n\t\t\t\tfields(includeDeprecated: true) {\n\t\t\t\t\tname\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n",
Y = '\n\tquery GetDirectives {\n\t\t__schema {\n\t\t\tdirectives(ofTypes: [ "'.concat("query", '" ]) {\n\t\t\t\tname\n\t\t\t}\n\t\t}\n\t}\n'),
$ = Object(s.__)("(No title)", "graphql-api"),
X = '\n\tquery GetAccessControlLists {\n\t\taccessControlLists {\n\t\t\tid\n\t\t\ttitle @default(value: "'.concat($, '", condition: IS_EMPTY)\n\t\t\texcerpt\n\t\t}\n\t}\n'),
J = '\n\tquery GetCacheControlLists {\n\t\tcacheControlLists {\n\t\t\tid\n\t\t\ttitle @default(value: "'.concat($, '", condition: IS_EMPTY)\n\t\t\texcerpt\n\t\t}\n\t}\n'),
K = '\n\tquery GetFieldDeprecationLists {\n\t\tfieldDeprecationLists {\n\t\t\tid\n\t\t\ttitle @default(value: "'.concat($, '", condition: IS_EMPTY)\n\t\t\texcerpt\n\t\t}\n\t}\n'),
Q = function(e) {
return e.errors && e.errors.length ? Object(s.sprintf)(Object(s.__)("There were errors connecting to the API: %s", "graphql-api"), e.errors.map((function(e) {
return e.message
})).join(Object(s.__)("; ", "graphql-api"))) : null
},
Z = {
getTypeFields: W.a.mark((function e() {
var t, n, r, o, i, s, a = arguments;
return W.a.wrap((function(e) {
for (;;) switch (e.prev = e.next) {
case 0:
return a.length > 0 && void 0 !== a[0] && a[0], a.length > 1 && void 0 !== a[1] && a[1], e.next = 4, k(G);
case 4:
if (o = e.sent, !(i = Q(o))) {
e.next = 8;
break
}
return e.abrupt("return", T([], i));
case 8:
return s = (null === (t = o.data) || void 0 === t || null === (n = t.__schema) || void 0 === n || null === (r = n.types) || void 0 === r ? void 0 : r.map((function(e) {
return {
typeName: e.name,
typeNamespacedName: e.namespacedName,
fields: null == e.fields ? null : e.fields.map((function(e) {
return e.name
}))
}
}))) || [], e.abrupt("return", T(s));
case 10:
case "end":
return e.stop()
}
}), e)
})),
getDirectives: W.a.mark((function e() {
var t, n, r, o, i, s;
return W.a.wrap((function(e) {
for (;;) switch (e.prev = e.next) {
case 0:
return e.next = 2, R(Y);
case 2:
if (o = e.sent, !(i = Q(o))) {
e.next = 6;
break
}
return e.abrupt("return", P([], i));
case 6:
return s = (null === (t = o.data) || void 0 === t || null === (n = t.__schema) || void 0 === n || null === (r = n.directives) || void 0 === r ? void 0 : r.map((function(e) {
return e.name
}))) || [], e.abrupt("return", P(s));
case 8:
case "end":
return e.stop()
}
}), e)
})),
getAccessControlLists: W.a.mark((function e() {
var t, n, r;
return W.a.wrap((function(e) {
for (;;) switch (e.prev = e.next) {
case 0:
return e.next = 2, V(X);
case 2:
if (n = e.sent, !(r = Q(n))) {
e.next = 6;
break
}
return e.abrupt("return", N([], r));
case 6:
return e.abrupt("return", N(null === (t = n.data) || void 0 === t ? void 0 : t.accessControlLists));
case 7:
case "end":
return e.stop()
}
}), e)
})),
getCacheControlLists: W.a.mark((function e() {
var t, n, r;
return W.a.wrap((function(e) {
for (;;) switch (e.prev = e.next) {
case 0:
return e.next = 2, H(J);
case 2:
if (n = e.sent, !(r = Q(n))) {
e.next = 6;
break
}
return e.abrupt("return", B([], r));
case 6:
return e.abrupt("return", B(null === (t = n.data) || void 0 === t ? void 0 : t.cacheControlLists));
case 7:
case "end":
return e.stop()
}
}), e)
})),
getFieldDeprecationLists: W.a.mark((function e() {
var t, n, r;
return W.a.wrap((function(e) {
for (;;) switch (e.prev = e.next) {
case 0:
return e.next = 2, q(K);
case 2:
if (n = e.sent, !(r = Q(n))) {
e.next = 6;
break
}
return e.abrupt("return", U([], r));
case 6:
return e.abrupt("return", U(null === (t = n.data) || void 0 === t ? void 0 : t.fieldDeprecationLists));
case 7:
case "end":
return e.stop()
}
}), e)
}))
},
ee = n(23),
te = function(e, t, n) {
var r = n || GRAPHQL_API_ADMIN_ENDPOINT;
return r ? Object(ee.request)(r, e, t).then((function(e) {
return {
data: e
}
})).catch((function(e) {
return 500 == e.response.status ? {
errors: [{
message: "".concat(Object(s.__)("[Internal Server Error (500)]:", "graphql-api"), " ").concat(e.response.message)
}]
} : e.response
})) : {
errors: [{
message: Object(s.__)("No endpoint provided to execute the GraphQL query", "graphql-api")
}]
}
},
ne = {
reducer: b,
selectors: r,
actions: o,
controls: {
RECEIVE_TYPE_FIELDS: function(e) {
return te(e.query)
},
RECEIVE_DIRECTIVES: function(e) {
return te(e.query)
},
RECEIVE_ACCESS_CONTROL_LISTS: function(e) {
return te(e.query)
},
RECEIVE_CACHE_CONTROL_LISTS: function(e) {
return te(e.query)
},
RECEIVE_FIELD_DEPRECATION_LISTS: function(e) {
return te(e.query)
}
},
resolvers: Z
},
re = (Object(d.registerStore)("graphql-api/components", ne), n(5)),
oe = n.n(re),
ie = n(8),
se = n(16),
ae = Object(l.createElement)(se.SVG, {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24"
}, Object(l.createElement)(se.Path, {
d: "M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"
})),
ue = (n(26), n(13)),
ce = n.n(ue);
var le = function(e) {
var t = e.items,
n = e.value,
r = e.onItemChange;
return Object(l.createElement)("ul", {
className: "multi-select-control__checklist"
}, t.map((function(e) {
return Object(l.createElement)("li", {
key: e.value,
className: "multi-select-control__checklist-item"
}, Object(l.createElement)(p.CheckboxControl, {
label: e.title,
checked: n.includes(e.value),
onChange: Object(ie.partial)(r, e.value),
help: e.help
}))
})))
};
var pe = Object(a.compose)([a.withInstanceId])((function(e) {
var t, n = e.instanceId,
r = e.group,
o = e.items,
i = e.selectedItems,
s = e.setAttributes,
a = e.attributeName,
u = Object(ie.intersection)(Object(ie.map)(o, "value"), i),
c = "multi-select-control__category-title-" + n,
d = u.length === o.length;
return t = d ? "true" : u.length > 0 ? "mixed" : "false", Object(l.createElement)("div", {
role: "group",
"aria-labelledby": c,
className: "multi-select-control__category"
}, Object(l.createElement)(p.CheckboxControl, {
checked: d,
onChange: function(e) {
var t = Object(ie.map)(o, "value");
s(h()({}, a, e ? [].concat(ce()(i), ce()(t)) : ie.without.apply(void 0, [i].concat(ce()(t)))))
},
className: "multi-select-control__category-title",
"aria-checked": t,
label: Object(l.createElement)("span", {
id: c
}, r)
}), Object(l.createElement)(le, {
items: o,
value: u,
onItemChange: function(e, t) {
s(h()({}, a, t ? [].concat(ce()(i), [e]) : Object(ie.without)(i, e)))
}
}))
})),
de = function() {
return Object(a.createHigherOrderComponent)((function(e) {
return function(t) {
var n = t.hasRetrievedItems,
r = t.errorMessage;
return n && r ? Object(l.createElement)("div", {
className: "multi-select-control__error_message"
}, Object(l.createElement)(p.Notice, {
status: "error",
isDismissible: !1
}, r)) : Object(l.createElement)(e, t)
}
}), "withErrorMessage")
},
fe = function() {
return Object(a.createHigherOrderComponent)((function(e) {
return function(t) {
return t.hasRetrievedItems ? Object(l.createElement)(e, t) : Object(l.createElement)(p.Spinner, null)
}
}), "withSpinner")
};
var he = Object(a.compose)([Object(a.withState)({
search: "",
showSearch: !1
}), fe(), de()])((function(e) {
var t = e.setState,
n = e.showSearch,
r = e.showSearchBtn,
o = void 0 !== r && r,
i = e.search,
a = e.items.filter((function(e) {
return !i || e.group.toLowerCase().includes(i.toLowerCase()) || e.title.toLowerCase().includes(i.toLowerCase())
})),
u = Object(ie.uniq)(a.map((function(e) {
return e.group
})));
return Object(l.createElement)("div", {
className: "multi-select-control__content"
}, Object(l.createElement)("div", {
className: "multi-select-control__content_search"
}, o && Object(l.createElement)(p.Button, {
isSmall: !0,
icon: ae,
onClick: function() {
return t({
showSearch: !n
})
}
}, n ? Object(s.__)("Hide search") : Object(s.__)("Show search"))), (!o || n) && Object(l.createElement)(p.TextControl, {
type: "search",
label: Object(s.__)("Search"),
value: i,
onChange: function(e) {
return t({
search: e
})
},
className: "multi-select-control__search"
}), Object(l.createElement)("div", {
tabIndex: "0",
role: "region",
"aria-label": Object(s.__)("Available items"),
className: "multi-select-control__results"
}, 0 === a.length && Object(l.createElement)("p", {
className: "multi-select-control__no-results"
}, Object(s.__)("No items found.")), u.map((function(t) {
return Object(l.createElement)(pe, oe()({}, e, {
key: t,
group: t,
items: Object(ie.filter)(a, {
group: t
})
}))
}))))
})),
me = (Object(a.compose)([Object(a.withState)({
attributeName: "typeFields"
}), Object(d.withSelect)((function(e) {
var t = e("graphql-api/components"),
n = t.getTypeFields,
r = t.hasRetrievedTypeFields,
o = t.getRetrievingTypeFieldsErrorMessage;
return {
items: n().flatMap((function(e) {
return e.fields.flatMap((function(t) {
return [{
group: e.typeName,
title: t,
value: "".concat(e.typeNamespacedName).concat(".").concat(t)
}]
}))
})),
hasRetrievedItems: r(),
errorMessage: o()
}
}))])(he), Object(a.compose)([Object(a.withState)({
attributeName: "directives"
}), Object(d.withSelect)((function(e) {
var t = e("graphql-api/components"),
n = t.getDirectives,
r = t.hasRetrievedDirectives,
o = t.getRetrievingDirectivesErrorMessage;
return {
items: n().map((function(e) {
return {
group: Object(s.__)("Directives", "graphql-api"),
title: e,
value: e
}
})),
hasRetrievedItems: r(),
errorMessage: o()
}
}))])(he), Object(s.__)("---", "graphql-api")),
ge = (Object(s.__)("Default", "graphql-api"), n(20), function(e) {
var t = e.typeFields,
n = e.typeFieldNames,
r = e.groupFieldsUnderTypeForPrint,
o = e.emptyLabelString,
i = null == r || r,
s = {};
return t.forEach((function(e) {
var t = n[e];
s[t.typeName] = s[t.typeName] || [], s[t.typeName].push(t.field)
})), Object(l.createElement)(l.Fragment, null, !!t.length && (!i && Object(l.createElement)("ul", {
class: "checkbox-list"
}, t.map((function(e) {
return Object(l.createElement)("li", null, Object(l.createElement)(p.CheckboxControl, {
label: "".concat(n[e].typeName).concat("/").concat(n[e].field),
checked: !0,
disabled: !0
}))
}))) || i && Object.keys(s).map((function(e) {
return Object(l.createElement)(l.Fragment, null, Object(l.createElement)("strong", null, e), Object(l.createElement)("ul", {
class: "checkbox-list"
}, s[e].map((function(e) {
return Object(l.createElement)("li", null, Object(l.createElement)(p.CheckboxControl, {
label: "".concat(e),
checked: !0,
disabled: !0
}))
}))))
}))), !t.length && o)
}),
ve = Object(a.compose)([fe(), de()])(ge),
be = function(e) {
return e.typeFields.length ? Object(l.createElement)(ve, e) : Object(l.createElement)(ge, e)
},
ye = function(e) {
var t = e.directives,
n = e.emptyLabelString;
return Object(l.createElement)(l.Fragment, null, !!t.length && Object(l.createElement)("ul", {
class: "checkbox-list"
}, t.map((function(e) {
return Object(l.createElement)("li", {
key: e
}, Object(l.createElement)(p.CheckboxControl, {
label: "".concat(e),
checked: !0,
disabled: !0
}))
}))), !t.length && n)
},
Ee = (Object(a.compose)([Object(d.withSelect)((function(e, t) {
if (t.disableFields) return {};
var n = e("graphql-api/components"),
r = n.getTypeFields,
o = n.hasRetrievedTypeFields,
i = n.getRetrievingTypeFieldsErrorMessage;
return {
typeFieldNames: r().flatMap((function(e) {
return e.fields.flatMap((function(t) {
return h()({}, "".concat(e.typeNamespacedName).concat(".").concat(t), {
typeName: e.typeName,
field: t
})
}))
})).reduce((function(e, t) {
return Object.assign(e, t)
}), {}),
hasRetrievedItems: o(),
errorMessage: i()
}
}))])((function(e) {
var t = e.emptyLabel,
n = e.disableFields,
r = e.disableDirectives,
o = e.removeHeaderIfItemDisabled,
i = e.fieldHeader,
a = void 0 === i ? Object(s.__)("Fields", "graphql-api") : i,
u = e.directiveHeader,
c = void 0 === u ? Object(s.__)("Directives", "graphql-api") : u,
d = null != t ? t : me;
return Object(l.createElement)(p.Card, e, !n && Object(l.createElement)(l.Fragment, null, (!o || !r) && Object(l.createElement)(p.CardHeader, {
isShady: !0
}, a), Object(l.createElement)(p.CardBody, null, Object(l.createElement)(be, oe()({}, e, {
emptyLabelString: d
})))), !r && Object(l.createElement)(l.Fragment, null, (!o || !n) && Object(l.createElement)(p.CardHeader, {
isShady: !0
}, c), Object(l.createElement)(p.CardBody, null, Object(l.createElement)(ye, oe()({}, e, {
emptyLabelString: d
})))))
})), n(30), function(e) {
return "nested-component editable-on-focus is-selected-".concat(e)
}),
Oe = (n(31), n(2)),
Ce = n.n(Oe);
function we(e, t) {
if (e.length !== t.length) return !1;
for (var n = 0; n < e.length; n++)
if (e[n] !== t[n]) return !1;
return !0
}
var Ae = function(e, t) {
var n;
void 0 === t && (t = we);
var r, o = [],
i = !1;
return function() {
for (var s = [], a = 0; a < arguments.length; a++) s[a] = arguments[a];
return i && n === this && t(s, o) || (r = e.apply(this, s), i = !0, n = this, o = s), r
}
},
Se = n(24),
Fe = n.n(Se);
var xe = function() {
function e(e) {
this.isSpeedy = void 0 === e.speedy || e.speedy, this.tags = [], this.ctr = 0, this.nonce = e.nonce, this.key = e.key, this.container = e.container, this.before = null
}
var t = e.prototype;
return t.insert = function(e) {
if (this.ctr % (this.isSpeedy ? 65e3 : 1) == 0) {
var t, n = function(e) {
var t = document.createElement("style");
return t.setAttribute("data-emotion", e.key), void 0 !== e.nonce && t.setAttribute("nonce", e.nonce), t.appendChild(document.createTextNode("")), t
}(this);
t = 0 === this.tags.length ? this.before : this.tags[this.tags.length - 1].nextSibling, this.container.insertBefore(n, t), this.tags.push(n)
}
var r = this.tags[this.tags.length - 1];
if (this.isSpeedy) {
var o = function(e) {
if (e.sheet) return e.sheet;
for (var t = 0; t < document.styleSheets.length; t++)
if (document.styleSheets[t].ownerNode === e) return document.styleSheets[t]
}(r);
try {
var i = 105 === e.charCodeAt(1) && 64 === e.charCodeAt(0);
o.insertRule(e, i ? 0 : o.cssRules.length)
} catch (e) {
0
}
} else r.appendChild(document.createTextNode(e));
this.ctr++
}, t.flush = function() {
this.tags.forEach((function(e) {
return e.parentNode.removeChild(e)
})), this.tags = [], this.ctr = 0
}, e
}();
var De = function(e) {
function t(e, t, r) {
var o = t.trim().split(h);
t = o;
var i = o.length,
s = e.length;
switch (s) {
case 0:
case 1:
var a = 0;
for (e = 0 === s ? "" : e[0] + " "; a < i; ++a) t[a] = n(e, t[a], r).trim();
break;
default:
var u = a = 0;
for (t = []; a < i; ++a)
for (var c = 0; c < s; ++c) t[u++] = n(e[c] + " ", o[a], r).trim()
}
return t
}
function n(e, t, n) {
var r = t.charCodeAt(0);
switch (33 > r && (r = (t = t.trim()).charCodeAt(0)), r) {
case 38:
return t.replace(m, "$1" + e.trim());
case 58:
return e.trim() + t.replace(m, "$1" + e.trim());
default:
if (0 < 1 * n && 0 < t.indexOf("\f")) return t.replace(m, (58 === e.charCodeAt(0) ? "" : "$1") + e.trim())
}
return e + t
}
function r(e, t, n, i) {
var s = e + ";",
a = 2 * t + 3 * n + 4 * i;
if (944 === a) {
e = s.indexOf(":", 9) + 1;
var u = s.substring(e, s.length - 1).trim();
return u = s.substring(0, e).trim() + u + ";", 1 === j || 2 === j && o(u, 1) ? "-webkit-" + u + u : u
}
if (0 === j || 2 === j && !o(s, 1)) return s;
switch (a) {
case 1015:
return 97 === s.charCodeAt(10) ? "-webkit-" + s + s : s;
case 951:
return 116 === s.charCodeAt(3) ? "-webkit-" + s + s : s;
case 963:
return 110 === s.charCodeAt(5) ? "-webkit-" + s + s : s;
case 1009:
if (100 !== s.charCodeAt(4)) break;
case 969:
case 942:
return "-webkit-" + s + s;
case 978:
return "-webkit-" + s + "-moz-" + s + s;
case 1019:
case 983:
return "-webkit-" + s + "-moz-" + s + "-ms-" + s + s;
case 883:
if (45 === s.charCodeAt(8)) return "-webkit-" + s + s;
if (0 < s.indexOf("image-set(", 11)) return s.replace(S, "$1-webkit-$2") + s;
break;
case 932:
if (45 === s.charCodeAt(4)) switch (s.charCodeAt(5)) {
case 103:
return "-webkit-box-" + s.replace("-grow", "") + "-webkit-" + s + "-ms-" + s.replace("grow", "positive") + s;
case 115:
return "-webkit-" + s + "-ms-" + s.replace("shrink", "negative") + s;
case 98:
return "-webkit-" + s + "-ms-" + s.replace("basis", "preferred-size") + s
}
return "-webkit-" + s + "-ms-" + s + s;
case 964:
return "-webkit-" + s + "-ms-flex-" + s + s;
case 1023:
if (99 !== s.charCodeAt(8)) break;
return "-webkit-box-pack" + (u = s.substring(s.indexOf(":", 15)).replace("flex-", "").replace("space-between", "justify")) + "-webkit-" + s + "-ms-flex-pack" + u + s;
case 1005:
return d.test(s) ? s.replace(p, ":-webkit-") + s.replace(p, ":-moz-") + s : s;
case 1e3:
switch (t = (u = s.substring(13).trim()).indexOf("-") + 1, u.charCodeAt(0) + u.charCodeAt(t)) {
case 226:
u = s.replace(y, "tb");
break;
case 232:
u = s.replace(y, "tb-rl");
break;
case 220:
u = s.replace(y, "lr");
break;
default:
return s
}
return "-webkit-" + s + "-ms-" + u + s;
case 1017:
if (-1 === s.indexOf("sticky", 9)) break;
case 975:
switch (t = (s = e).length - 10, a = (u = (33 === s.charCodeAt(t) ? s.substring(0, t) : s).substring(e.indexOf(":", 7) + 1).trim()).charCodeAt(0) + (0 | u.charCodeAt(7))) {
case 203:
if (111 > u.charCodeAt(8)) break;
case 115:
s = s.replace(u, "-webkit-" + u) + ";" + s;
break;
case 207:
case 102:
s = s.replace(u, "-webkit-" + (102 < a ? "inline-" : "") + "box") + ";" + s.replace(u, "-webkit-" + u) + ";" + s.replace(u, "-ms-" + u + "box") + ";" + s
}
return s + ";";
case 938:
if (45 === s.charCodeAt(5)) switch (s.charCodeAt(6)) {
case 105:
return u = s.replace("-items", ""), "-webkit-" + s + "-webkit-box-" + u + "-ms-flex-" + u + s;
case 115:
return "-webkit-" + s + "-ms-flex-item-" + s.replace(C, "") + s;
default:
return "-webkit-" + s + "-ms-flex-line-pack" + s.replace("align-content", "").replace(C, "") + s
}
break;
case 973:
case 989:
if (45 !== s.charCodeAt(3) || 122 === s.charCodeAt(4)) break;
case 931:
case 953:
if (!0 === A.test(e)) return 115 === (u = e.substring(e.indexOf(":") + 1)).charCodeAt(0) ? r(e.replace("stretch", "fill-available"), t, n, i).replace(":fill-available", ":stretch") : s.replace(u, "-webkit-" + u) + s.replace(u, "-moz-" + u.replace("fill-", "")) + s;
break;
case 962:
if (s = "-webkit-" + s + (102 === s.charCodeAt(5) ? "-ms-" + s : "") + s, 211 === n + i && 105 === s.charCodeAt(13) && 0 < s.indexOf("transform", 10)) return s.substring(0, s.indexOf(";", 27) + 1).replace(f, "$1-webkit-$2") + s
}
return s
}
function o(e, t) {
var n = e.indexOf(1 === t ? ":" : "{"),
r = e.substring(0, 3 !== t ? n : 10);
return n = e.substring(n + 1, e.length - 1), M(2 !== t ? r : r.replace(w, "$1"), n, t)
}
function i(e, t) {
var n = r(t, t.charCodeAt(0), t.charCodeAt(1), t.charCodeAt(2));
return n !== t + ";" ? n.replace(O, " or ($1)").substring(4) : "(" + t + ")"
}
function s(e, t, n, r, o, i, s, a, c, l) {
for (var p, d = 0, f = t; d < I; ++d) switch (p = L[d].call(u, e, f, n, r, o, i, s, a, c, l)) {
case void 0:
case !1:
case !0:
case null:
break;
default:
f = p
}
if (f !== t) return f
}
function a(e) {
return void 0 !== (e = e.prefix) && (M = null, e ? "function" != typeof e ? j = 1 : (j = 2, M = e) : j = 0), a
}
function u(e, n) {
var a = e;
if (33 > a.charCodeAt(0) && (a = a.trim()), a = [a], 0 < I) {
var u = s(-1, n, a, a, x, F, 0, 0, 0, 0);
void 0 !== u && "string" == typeof u && (n = u)
}
var p = function e(n, a, u, p, d) {
for (var f, h, m, y, O, C = 0, w = 0, A = 0, S = 0, L = 0, M = 0, k = m = f = 0, P = 0, R = 0, N = 0, V = 0, B = u.length, H = B - 1, U = "", q = "", z = "", W = ""; P < B;) {
if (h = u.charCodeAt(P), P === H && 0 !== w + S + A + C && (0 !== w && (h = 47 === w ? 10 : 47), S = A = C = 0, B++, H++), 0 === w + S + A + C) {
if (P === H && (0 < R && (U = U.replace(l, "")), 0 < U.trim().length)) {
switch (h) {
case 32:
case 9:
case 59:
case 13:
case 10:
break;
default:
U += u.charAt(P)
}
h = 59
}
switch (h) {
case 123:
for (f = (U = U.trim()).charCodeAt(0), m = 1, V = ++P; P < B;) {
switch (h = u.charCodeAt(P)) {
case 123:
m++;
break;
case 125:
m--;
break;
case 47:
switch (h = u.charCodeAt(P + 1)) {
case 42:
case 47:
e: {
for (k = P + 1; k < H; ++k) switch (u.charCodeAt(k)) {
case 47:
if (42 === h && 42 === u.charCodeAt(k - 1) && P + 2 !== k) {
P = k + 1;
break e
}
break;
case 10:
if (47 === h) {
P = k + 1;
break e
}
}
P = k
}
}
break;
case 91:
h++;
case 40:
h++;
case 34:
case 39:
for (; P++ < H && u.charCodeAt(P) !== h;);
}
if (0 === m) break;
P++
}
switch (m = u.substring(V, P), 0 === f && (f = (U = U.replace(c, "").trim()).charCodeAt(0)), f) {
case 64:
switch (0 < R && (U = U.replace(l, "")), h = U.charCodeAt(1)) {
case 100:
case 109:
case 115:
case 45:
R = a;
break;
default:
R = _
}
if (V = (m = e(a, R, m, h, d + 1)).length, 0 < I && (O = s(3, m, R = t(_, U, N), a, x, F, V, h, d, p), U = R.join(""), void 0 !== O && 0 === (V = (m = O.trim()).length) && (h = 0, m = "")), 0 < V) switch (h) {
case 115:
U = U.replace(E, i);
case 100:
case 109:
case 45:
m = U + "{" + m + "}";
break;
case 107:
m = (U = U.replace(g, "$1 $2")) + "{" + m + "}", m = 1 === j || 2 === j && o("@" + m, 3) ? "@-webkit-" + m + "@" + m : "@" + m;
break;
default:
m = U + m, 112 === p && (q += m, m = "")
} else m = "";
break;
default:
m = e(a, t(a, U, N), m, p, d + 1)
}
z += m, m = N = R = k = f = 0, U = "", h = u.charCodeAt(++P);
break;
case 125:
case 59:
if (1 < (V = (U = (0 < R ? U.replace(l, "") : U).trim()).length)) switch (0 === k && (f = U.charCodeAt(0), 45 === f || 96 < f && 123 > f) && (V = (U = U.replace(" ", ":")).length), 0 < I && void 0 !== (O = s(1, U, a, n, x, F, q.length, p, d, p)) && 0 === (V = (U = O.trim()).length) && (U = "\0\0"), f = U.charCodeAt(0), h = U.charCodeAt(1), f) {
case 0:
break;
case 64:
if (105 === h || 99 === h) {
W += U + u.charAt(P);
break
}
default:
58 !== U.charCodeAt(V - 1) && (q += r(U, f, h, U.charCodeAt(2)))
}
N = R = k = f = 0, U = "", h = u.charCodeAt(++P)
}
}
switch (h) {
case 13:
case 10:
47 === w ? w = 0 : 0 === 1 + f && 107 !== p && 0 < U.length && (R = 1, U += "\0"), 0 < I * T && s(0, U, a, n, x, F, q.length, p, d, p), F = 1, x++;
break;
case 59:
case 125:
if (0 === w + S + A + C) {
F++;
break
}
default:
switch (F++, y = u.charAt(P), h) {
case 9:
case 32:
if (0 === S + C + w) switch (L) {
case 44:
case 58:
case 9:
case 32:
y = "";
break;
default:
32 !== h && (y = " ")
}
break;
case 0:
y = "\\0";
break;
case 12:
y = "\\f";
break;
case 11:
y = "\\v";
break;
case 38:
0 === S + w + C && (R = N = 1, y = "\f" + y);
break;
case 108:
if (0 === S + w + C + D && 0 < k) switch (P - k) {
case 2:
112 === L && 58 === u.charCodeAt(P - 3) && (D = L);
case 8:
111 === M && (D = M)
}
break;
case 58:
0 === S + w + C && (k = P);
break;
case 44:
0 === w + A + S + C && (R = 1, y += "\r");
break;
case 34:
case 39:
0 === w && (S = S === h ? 0 : 0 === S ? h : S);
break;
case 91:
0 === S + w + A && C++;
break;
case 93:
0 === S + w + A && C--;
break;
case 41:
0 === S + w + C && A--;
break;
case 40:
if (0 === S + w + C) {
if (0 === f) switch (2 * L + 3 * M) {
case 533:
break;
default:
f = 1
}
A++
}
break;
case 64:
0 === w + A + S + C + k + m && (m = 1);
break;
case 42:
case 47:
if (!(0 < S + C + A)) switch (w) {
case 0:
switch (2 * h + 3 * u.charCodeAt(P + 1)) {
case 235:
w = 47;
break;
case 220:
V = P, w = 42
}
break;
case 42:
47 === h && 42 === L && V + 2 !== P && (33 === u.charCodeAt(V + 2) && (q += u.substring(V, P + 1)), y = "", w = 0)
}
}
0 === w && (U += y)
}
M = L, L = h, P++
}
if (0 < (V = q.length)) {
if (R = a, 0 < I && (void 0 !== (O = s(2, q, R, n, x, F, V, p, d, p)) && 0 === (q = O).length)) return W + q + z;
if (q = R.join(",") + "{" + q + "}", 0 != j * D) {
switch (2 !== j || o(q, 2) || (D = 0), D) {
case 111:
q = q.replace(b, ":-moz-$1") + q;
break;
case 112:
q = q.replace(v, "::-webkit-input-$1") + q.replace(v, "::-moz-$1") + q.replace(v, ":-ms-input-$1") + q
}
D = 0
}
}
return W + q + z
}(_, a, n, 0, 0);
return 0 < I && (void 0 !== (u = s(-2, p, a, a, x, F, p.length, 0, 0, 0)) && (p = u)), "", D = 0, F = x = 1, p
}
var c = /^\0+/g,
l = /[\0\r\f]/g,
p = /: */g,
d = /zoo|gra/,
f = /([,: ])(transform)/g,
h = /,\r+?/g,
m = /([\t\r\n ])*\f?&/g,
g = /@(k\w+)\s*(\S*)\s*/,
v = /::(place)/g,
b = /:(read-only)/g,
y = /[svh]\w+-[tblr]{2}/,
E = /\(\s*(.*)\s*\)/g,
O = /([\s\S]*?);/g,
C = /-self|flex-/g,
w = /[^]*?(:[rp][el]a[\w-]+)[^]*/,
A = /stretch|:\s*\w+\-(?:conte|avail)/,
S = /([^-])(image-set\()/,
F = 1,
x = 1,
D = 0,
j = 1,
_ = [],
L = [],
I = 0,
M = null,
T = 0;
return u.use = function e(t) {
switch (t) {
case void 0:
case null:
I = L.length = 0;
break;
default:
if ("function" == typeof t) L[I++] = t;
else if ("object" == typeof t)
for (var n = 0, r = t.length; n < r; ++n) e(t[n]);
else T = 0 | !!t
}
return e
}, u.set = a, void 0 !== e && a(e), u
};
function je(e) {
e && _e.current.insert(e + "}")
}
var _e = {
current: null
},
Le = function(e, t, n, r, o, i, s, a, u, c) {
switch (e) {
case 1:
switch (t.charCodeAt(0)) {
case 64:
return _e.current.insert(t + ";"), "";
case 108:
if (98 === t.charCodeAt(2)) return ""
}
break;
case 2:
if (0 === a) return t + "/*|*/";
break;
case 3:
switch (a) {
case 102:
case 112:
return _e.current.insert(n[0] + t), "";
default:
return t + (0 === c ? "/*|*/" : "")
}
case -2:
t.split("/*|*/}").forEach(je)
}
},
Ie = function(e) {
void 0 === e && (e = {});
var t, n = e.key || "css";
void 0 !== e.prefix && (t = {
prefix: e.prefix
});
var r = new De(t);
var o, i = {};
o = e.container || document.head;
var s, a = document.querySelectorAll("style[data-emotion-" + n + "]");
Array.prototype.forEach.call(a, (function(e) {
e.getAttribute("data-emotion-" + n).split(" ").forEach((function(e) {
i[e] = !0
})), e.parentNode !== o && o.appendChild(e)
})), r.use(e.stylisPlugins)(Le), s = function(e, t, n, o) {
var i = t.name;
_e.current = n, r(e, t.styles), o && (u.inserted[i] = !0)
};
var u = {
key: n,
sheet: new xe({
key: n,
container: o,
nonce: e.nonce,
speedy: e.speedy
}),
nonce: e.nonce,
inserted: i,
registered: {},
insert: s
};
return u
};
function Me(e, t, n) {
var r = "";
return n.split(" ").forEach((function(n) {
void 0 !== e[n] ? t.push(e[n]) : r += n + " "
})), r
}
var Te = function(e, t, n) {
var r = e.key + "-" + t.name;
if (!1 === n && void 0 === e.registered[r] && (e.registered[r] = t.styles), void 0 === e.inserted[t.name]) {
var o = t;
do {
e.insert("." + r, o, e.sheet, !0);
o = o.next
} while (void 0 !== o)
}
};
var ke = function(e) {
for (var t, n = 0, r = 0, o = e.length; o >= 4; ++r, o -= 4) t = 1540483477 * (65535 & (t = 255 & e.charCodeAt(r) | (255 & e.charCodeAt(++r)) << 8 | (255 & e.charCodeAt(++r)) << 16 | (255 & e.charCodeAt(++r)) << 24)) + (59797 * (t >>> 16) << 16), n = 1540483477 * (65535 & (t ^= t >>> 24)) + (59797 * (t >>> 16) << 16) ^ 1540483477 * (65535 & n) + (59797 * (n >>> 16) << 16);
switch (o) {
case 3:
n ^= (255 & e.charCodeAt(r + 2)) << 16;
case 2:
n ^= (255 & e.charCodeAt(r + 1)) << 8;
case 1:
n = 1540483477 * (65535 & (n ^= 255 & e.charCodeAt(r))) + (59797 * (n >>> 16) << 16)
}
return (((n = 1540483477 * (65535 & (n ^= n >>> 13)) + (59797 * (n >>> 16) << 16)) ^ n >>> 15) >>> 0).toString(36)
},
Pe = {
animationIterationCount: 1,
borderImageOutset: 1,
borderImageSlice: 1,
borderImageWidth: 1,
boxFlex: 1,
boxFlexGroup: 1,
boxOrdinalGroup: 1,
columnCount: 1,
columns: 1,
flex: 1,
flexGrow: 1,
flexPositive: 1,
flexShrink: 1,
flexNegative: 1,
flexOrder: 1,
gridRow: 1,
gridRowEnd: 1,
gridRowSpan: 1,
gridRowStart: 1,
gridColumn: 1,
gridColumnEnd: 1,
gridColumnSpan: 1,
gridColumnStart: 1,
msGridRow: 1,
msGridRowSpan: 1,
msGridColumn: 1,
msGridColumnSpan: 1,
fontWeight: 1,
lineHeight: 1,
opacity: 1,
order: 1,
orphans: 1,
tabSize: 1,
widows: 1,
zIndex: 1,
zoom: 1,
WebkitLineClamp: 1,
fillOpacity: 1,
floodOpacity: 1,
stopOpacity: 1,
strokeDasharray: 1,
strokeDashoffset: 1,
strokeMiterlimit: 1,
strokeOpacity: 1,
strokeWidth: 1
};
var Re = /[A-Z]|^ms/g,
Ne = /_EMO_([^_]+?)_([^]*?)_EMO_/g,
Ve = function(e) {
return 45 === e.charCodeAt(1)
},
Be = function(e) {
return null != e && "boolean" != typeof e
},
He = function(e) {
var t = {};
return function(n) {
return void 0 === t[n] && (t[n] = e(n)), t[n]
}
}((function(e) {
return Ve(e) ? e : e.replace(Re, "-$&").toLowerCase()
})),
Ue = function(e, t) {
switch (e) {
case "animation":
case "animationName":
if ("string" == typeof t) return t.replace(Ne, (function(e, t, n) {
return ze = {
name: t,
styles: n,
next: ze
}, t
}))
}
return 1 === Pe[e] || Ve(e) || "number" != typeof t || 0 === t ? t : t + "px"
};
function qe(e, t, n, r) {
if (null == n) return "";
if (void 0 !== n.__emotion_styles) return n;
switch (typeof n) {
case "boolean":
return "";
case "object":
if (1 === n.anim) return ze = {
name: n.name,
styles: n.styles,
next: ze
}, n.name;
if (void 0 !== n.styles) {
var o = n.next;
if (void 0 !== o)
for (; void 0 !== o;) ze = {
name: o.name,
styles: o.styles,
next: ze
}, o = o.next;
return n.styles + ";"
}
return function(e, t, n) {
var r = "";
if (Array.isArray(n))
for (var o = 0; o < n.length; o++) r += qe(e, t, n[o], !1);
else
for (var i in n) {
var s = n[i];
if ("object" != typeof s) null != t && void 0 !== t[s] ? r += i + "{" + t[s] + "}" : Be(s) && (r += He(i) + ":" + Ue(i, s) + ";");
else if (!Array.isArray(s) || "string" != typeof s[0] || null != t && void 0 !== t[s[0]]) {
var a = qe(e, t, s, !1);
switch (i) {
case "animation":
case "animationName":
r += He(i) + ":" + a + ";";
break;
default:
r += i + "{" + a + "}"
}
} else
for (var u = 0; u < s.length; u++) Be(s[u]) && (r += He(i) + ":" + Ue(i, s[u]) + ";")
}
return r
}(e, t, n);
case "function":
if (void 0 !== e) {
var i = ze,
s = n(e);
return ze = i, qe(e, t, s, r)
}
break;
case "string":
}
if (null == t) return n;
var a = t[n];
return void 0 === a || r ? n : a
}
var ze, We = /label:\s*([^\s;\n{]+)\s*;/g;
var Ge = function(e, t, n) {
if (1 === e.length && "object" == typeof e[0] && null !== e[0] && void 0 !== e[0].styles) return e[0];
var r = !0,
o = "";
ze = void 0;
var i = e[0];
null == i || void 0 === i.raw ? (r = !1, o += qe(n, t, i, !1)) : o += i[0];
for (var s = 1; s < e.length; s++) o += qe(n, t, e[s], 46 === o.charCodeAt(o.length - 1)), r && (o += i[s]);
We.lastIndex = 0;
for (var a, u = ""; null !== (a = We.exec(o));) u += "-" + a[1];
return {
name: ke(o) + u,
styles: o,
next: ze
}
};
var Ye = function() {
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n];
return Ge(t)
},
$e = Object(Oe.createContext)("undefined" != typeof HTMLElement ? Ie() : null),
Xe = Object(Oe.createContext)({}),
Je = $e.Provider,
Ke = function(e) {
return Object(Oe.forwardRef)((function(t, n) {
return Object(Oe.createElement)($e.Consumer, null, (function(r) {
return e(t, r, n)
}))
}))
},
Qe = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__",
Ze = Object.prototype.hasOwnProperty,
et = function(e, t, n, r) {
var o = null === n ? t.css : t.css(n);
"string" == typeof o && void 0 !== e.registered[o] && (o = e.registered[o]);
var i = t[Qe],
s = [o],
a = "";
"string" == typeof t.className ? a = Me(e.registered, s, t.className) : null != t.className && (a = t.className + " ");
var u = Ge(s);
Te(e, u, "string" == typeof i);
a += e.key + "-" + u.name;
var c = {};
for (var l in t) Ze.call(t, l) && "css" !== l && l !== Qe && (c[l] = t[l]);
return c.ref = r, c.className = a, Object(Oe.createElement)(i, c)
},
tt = Ke((function(e, t, n) {
return "function" == typeof e.css ? Object(Oe.createElement)(Xe.Consumer, null, (function(r) {
return et(t, e, r, n)
})) : et(t, e, null, n)
}));
var nt = function(e, t) {
var n = arguments;
if (null == t || !Ze.call(t, "css")) return Oe.createElement.apply(void 0, n);
var r = n.length,
o = new Array(r);
o[0] = tt;
var i = {};
for (var s in t) Ze.call(t, s) && (i[s] = t[s]);
i[Qe] = e, o[1] = i;
for (var a = 2; a < r; a++) o[a] = n[a];
return Oe.createElement.apply(null, o)
},
rt = (Oe.Component, function e(t) {
for (var n = t.length, r = 0, o = ""; r < n; r++) {
var i = t[r];
if (null != i) {
var s = void 0;
switch (typeof i) {
case "boolean":
break;
case "object":
if (Array.isArray(i)) s = e(i);
else
for (var a in s = "", i) i[a] && a && (s && (s += " "), s += a);
break;
default:
s = i
}
s && (o && (o += " "), o += s)
}
}
return o
});
function ot(e, t, n) {
var r = [],
o = Me(e, r, n);
return r.length < 2 ? n : o + t(r)
}
var it = Ke((function(e, t) {
return Object(Oe.createElement)(Xe.Consumer, null, (function(n) {
var r = function() {
for (var e = arguments.length, n = new Array(e), r = 0; r < e; r++) n[r] = arguments[r];
var o = Ge(n, t.registered);
return Te(t, o, !1), t.key + "-" + o.name
},
o = {
css: r,
cx: function() {
for (var e = arguments.length, n = new Array(e), o = 0; o < e; o++) n[o] = arguments[o];
return ot(t.registered, r, rt(n))
},
theme: n
},
i = e.children(o);
return !0, i
}))
})),
st = n(11),
at = n(12),
ut = n.n(at),
ct = function() {};
function lt(e, t) {
return t ? "-" === t[0] ? e + t : e + "__" + t : e
}
function pt(e, t, n) {
var r = [n];
if (t && e)
for (var o in t) t.hasOwnProperty(o) && t[o] && r.push("" + lt(e, o));
return r.filter((function(e) {
return e
})).map((function(e) {
return String(e).trim()
})).join(" ")
}
var dt = function(e) {
return Array.isArray(e) ? e.filter(Boolean) : "object" == typeof e && null !== e ? [e] : []
};
function ft(e) {
return [document.documentElement, document.body, window].indexOf(e) > -1
}
function ht(e) {
return ft(e) ? window.pageYOffset : e.scrollTop
}
function mt(e, t) {
ft(e) ? window.scrollTo(0, t) : e.scrollTop = t
}
function gt(e, t, n, r) {
void 0 === n && (n = 200), void 0 === r && (r = ct);
var o = ht(e),
i = t - o,
s = 0;
! function t() {
var a, u = i * ((a = (a = s += 10) / n - 1) * a * a + 1) + o;
mt(e, u), s < n ? window.requestAnimationFrame(t) : r(e)
}()
}
function vt() {
try {
return document.createEvent("TouchEvent"), !0
} catch (e) {
return !1
}
}
var bt = n(15),
yt = n.n(bt);
function Et() {
return (Et = Object.assign || function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
}
return e
}).apply(this, arguments)
}
function Ot(e, t) {
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, e.__proto__ = t
}
function Ct(e) {
var t = e.maxHeight,
n = e.menuEl,
r = e.minHeight,
o = e.placement,
i = e.shouldScroll,
s = e.isFixedPosition,
a = e.theme.spacing,
u = function(e) {
var t = getComputedStyle(e),
n = "absolute" === t.position,
r = /(auto|scroll)/,
o = document.documentElement;
if ("fixed" === t.position) return o;
for (var i = e; i = i.parentElement;)
if (t = getComputedStyle(i), (!n || "static" !== t.position) && r.test(t.overflow + t.overflowY + t.overflowX)) return i;
return o
}(n),
c = {
placement: "bottom",
maxHeight: t
};
if (!n || !n.offsetParent) return c;
var l = u.getBoundingClientRect().height,
p = n.getBoundingClientRect(),
d = p.bottom,
f = p.height,
h = p.top,
m = n.offsetParent.getBoundingClientRect().top,
g = window.innerHeight,
v = ht(u),
b = parseInt(getComputedStyle(n).marginBottom, 10),
y = parseInt(getComputedStyle(n).marginTop, 10),
E = m - y,
O = g - h,
C = E + v,
w = l - v - h,
A = d - g + v + b,
S = v + h - y;
switch (o) {
case "auto":
case "bottom":
if (O >= f) return {
placement: "bottom",
maxHeight: t
};
if (w >= f && !s) return i && gt(u, A, 160), {
placement: "bottom",
maxHeight: t
};
if (!s && w >= r || s && O >= r) return i && gt(u, A, 160), {
placement: "bottom",
maxHeight: s ? O - b : w - b
};
if ("auto" === o || s) {
var F = t,
x = s ? E : C;
return x >= r && (F = Math.min(x - b - a.controlHeight, t)), {
placement: "top",
maxHeight: F
}
}
if ("bottom" === o) return mt(u, A), {
placement: "bottom",
maxHeight: t
};
break;
case "top":
if (E >= f) return {
placement: "top",
maxHeight: t
};
if (C >= f && !s) return i && gt(u, S, 160), {
placement: "top",
maxHeight: t
};
if (!s && C >= r || s && E >= r) {
var D = t;
return (!s && C >= r || s && E >= r) && (D = s ? E - y : C - y), i && gt(u, S, 160), {
placement: "top",
maxHeight: D
}
}
return {
placement: "bottom",
maxHeight: t
};
default:
throw new Error('Invalid placement provided "' + o + '".')
}
return c
}
var wt = function(e) {
return "auto" === e ? "bottom" : e
},
At = function(e) {
function t() {
for (var t, n = arguments.length, r = new Array(n), o = 0; o < n; o++) r[o] = arguments[o];
return (t = e.call.apply(e, [this].concat(r)) || this).state = {
maxHeight: t.props.maxMenuHeight,
placement: null
}, t.getPlacement = function(e) {
var n = t.props,
r = n.minMenuHeight,
o = n.maxMenuHeight,
i = n.menuPlacement,
s = n.menuPosition,
a = n.menuShouldScrollIntoView,
u = n.theme,
c = t.context.getPortalPlacement;
if (e) {
var l = "fixed" === s,
p = Ct({
maxHeight: o,
menuEl: e,
minHeight: r,
placement: i,
shouldScroll: a && !l,
isFixedPosition: l,
theme: u
});
c && c(p), t.setState(p)
}
}, t.getUpdatedProps = function() {
var e = t.props.menuPlacement,
n = t.state.placement || wt(e);
return Et({}, t.props, {
placement: n,
maxHeight: t.state.maxHeight
})
}, t
}
return Ot(t, e), t.prototype.render = function() {
return (0, this.props.children)({
ref: this.getPlacement,
placerProps: this.getUpdatedProps()
})
}, t
}(Oe.Component);
At.contextTypes = {
getPortalPlacement: ut.a.func
};
var St = function(e) {
var t = e.theme,
n = t.spacing.baseUnit;
return {
color: t.colors.neutral40,
padding: 2 * n + "px " + 3 * n + "px",
textAlign: "center"
}
},
Ft = St,
xt = St,
Dt = function(e) {
var t = e.children,
n = e.className,
r = e.cx,
o = e.getStyles,
i = e.innerProps;
return nt("div", Et({
css: o("noOptionsMessage", e),
className: r({
"menu-notice": !0,
"menu-notice--no-options": !0
}, n)
}, i), t)
};
Dt.defaultProps = {
children: "No options"
};
var jt = function(e) {
var t = e.children,
n = e.className,
r = e.cx,
o = e.getStyles,
i = e.innerProps;
return nt("div", Et({
css: o("loadingMessage", e),
className: r({
"menu-notice": !0,
"menu-notice--loading": !0
}, n)
}, i), t)
};
jt.defaultProps = {
children: "Loading..."
};
var _t = function(e) {
function t() {
for (var t, n = arguments.length, r = new Array(n), o = 0; o < n; o++) r[o] = arguments[o];
return (t = e.call.apply(e, [this].concat(r)) || this).state = {
placement: null
}, t.getPortalPlacement = function(e) {
var n = e.placement;
n !== wt(t.props.menuPlacement) && t.setState({
placement: n
})
}, t
}
Ot(t, e);
var n = t.prototype;
return n.getChildContext = function() {
return {
getPortalPlacement: this.getPortalPlacement
}
}, n.render = function() {
var e = this.props,
t = e.appendTo,
n = e.children,
r = e.controlElement,
o = e.menuPlacement,
i = e.menuPosition,
s = e.getStyles,
a = "fixed" === i;
if (!t && !a || !r) return null;
var u = this.state.placement || wt(o),
c = function(e) {
var t = e.getBoundingClientRect();
return {
bottom: t.bottom,
height: t.height,
left: t.left,
right: t.right,
top: t.top,
width: t.width
}
}(r),
l = a ? 0 : window.pageYOffset,
p = c[u] + l,
d = nt("div", {
css: s("menuPortal", {
offset: p,
position: i,
rect: c
})
}, n);
return t ? Object(st.createPortal)(d, t) : d
}, t
}(Oe.Component);
_t.childContextTypes = {
getPortalPlacement: ut.a.func
};
var Lt = Array.isArray,
It = Object.keys,
Mt = Object.prototype.hasOwnProperty;
function Tt(e, t) {
try {
return function e(t, n) {
if (t === n) return !0;
if (t && n && "object" == typeof t && "object" == typeof n) {
var r, o, i, s = Lt(t),
a = Lt(n);
if (s && a) {
if ((o = t.length) != n.length) return !1;
for (r = o; 0 != r--;)
if (!e(t[r], n[r])) return !1;
return !0
}
if (s != a) return !1;
var u = t instanceof Date,
c = n instanceof Date;
if (u != c) return !1;
if (u && c) return t.getTime() == n.getTime();
var l = t instanceof RegExp,
p = n instanceof RegExp;
if (l != p) return !1;
if (l && p) return t.toString() == n.toString();
var d = It(t);
if ((o = d.length) !== It(n).length) return !1;
for (r = o; 0 != r--;)
if (!Mt.call(n, d[r])) return !1;
for (r = o; 0 != r--;)
if (!("_owner" === (i = d[r]) && t.$$typeof || e(t[i], n[i]))) return !1;
return !0
}
return t != t && n != n
}(e, t)
} catch (e) {
if (e.message && e.message.match(/stack|recursion/i)) return console.warn("Warning: react-fast-compare does not handle circular references.", e.name, e.message), !1;
throw e
}
}
function kt() {
return (kt = Object.assign || function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
}
return e
}).apply(this, arguments)
}
function Pt() {
var e = function(e, t) {
t || (t = e.slice(0));
return e.raw = t, e
}(["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"]);
return Pt = function() {
return e
}, e
}
function Rt() {
return (Rt = Object.assign || function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
}
return e
}).apply(this, arguments)
}
var Nt = {
name: "19bqh2r",
styles: "display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;"
},
Vt = function(e) {
var t = e.size,
n = function(e, t) {
if (null == e) return {};
var n, r, o = {},
i = Object.keys(e);
for (r = 0; r < i.length; r++) n = i[r], t.indexOf(n) >= 0 || (o[n] = e[n]);
return o
}(e, ["size"]);
return nt("svg", Rt({
height: t,
width: t,
viewBox: "0 0 20 20",
"aria-hidden": "true",
focusable: "false",
css: Nt
}, n))
},
Bt = function(e) {
return nt(Vt, Rt({
size: 20
}, e), nt("path", {
d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"
}))
},
Ht = function(e) {
return nt(Vt, Rt({
size: 20
}, e), nt("path", {
d: "M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"
}))
},
Ut = function(e) {
var t = e.isFocused,
n = e.theme,
r = n.spacing.baseUnit,
o = n.colors;
return {
label: "indicatorContainer",
color: t ? o.neutral60 : o.neutral20,
display: "flex",
padding: 2 * r,
transition: "color 150ms",
":hover": {
color: t ? o.neutral80 : o.neutral40
}
}
},
qt = Ut,
zt = Ut,
Wt = function() {
var e = Ye.apply(void 0, arguments),
t = "animation-" + e.name;
return {
name: t,
styles: "@keyframes " + t + "{" + e.styles + "}",
anim: 1,
toString: function() {
return "_EMO_" + this.name + "_" + this.styles + "_EMO_"
}
}
}(Pt()),
Gt = function(e) {
var t = e.delay,
n = e.offset;
return nt("span", {
css: Ye({
animation: Wt + " 1s ease-in-out " + t + "ms infinite;",
backgroundColor: "currentColor",
borderRadius: "1em",
display: "inline-block",
marginLeft: n ? "1em" : null,
height: "1em",
verticalAlign: "top",
width: "1em"
}, "")
})
},
Yt = function(e) {
var t = e.className,
n = e.cx,
r = e.getStyles,
o = e.innerProps,
i = e.isRtl;
return nt("div", Rt({}, o, {
css: r("loadingIndicator", e),
className: n({
indicator: !0,
"loading-indicator": !0
}, t)
}), nt(Gt, {
delay: 0,
offset: i
}), nt(Gt, {
delay: 160,
offset: !0
}), nt(Gt, {
delay: 320,
offset: !i
}))
};
function $t() {
return ($t = Object.assign || function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
}
return e
}).apply(this, arguments)
}
Yt.defaultProps = {
size: 4
};
function Xt() {
return (Xt = Object.assign || function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
}
return e
}).apply(this, arguments)
}
function Jt() {
return (Jt = Object.assign || function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
}
return e
}).apply(this, arguments)
}
var Kt = function(e) {
return {
label: "input",
background: 0,
border: 0,
fontSize: "inherit",
opacity: e ? 0 : 1,
outline: 0,
padding: 0,
color: "inherit"
}
};
function Qt() {
return (Qt = Object.assign || function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
}
return e
}).apply(this, arguments)
}
var Zt = function(e) {
var t = e.children,
n = e.innerProps;
return nt("div", n, t)
},
en = Zt,
tn = Zt;
var nn = function(e) {
var t = e.children,
n = e.className,
r = e.components,
o = e.cx,
i = e.data,
s = e.getStyles,
a = e.innerProps,
u = e.isDisabled,
c = e.removeProps,
l = e.selectProps,
p = r.Container,
d = r.Label,
f = r.Remove;
return nt(it, null, (function(r) {
var h = r.css,
m = r.cx;
return nt(p, {
data: i,
innerProps: Qt({}, a, {
className: m(h(s("multiValue", e)), o({
"multi-value": !0,
"multi-value--is-disabled": u
}, n))
}),
selectProps: l
}, nt(d, {
data: i,
innerProps: {
className: m(h(s("multiValueLabel", e)), o({
"multi-value__label": !0
}, n))
},
selectProps: l
}, t), nt(f, {
data: i,
innerProps: Qt({
className: m(h(s("multiValueRemove", e)), o({
"multi-value__remove": !0
}, n))
}, c),
selectProps: l
}))
}))
};
function rn() {
return (rn = Object.assign || function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
}
return e
}).apply(this, arguments)
}
nn.defaultProps = {
cropWithEllipsis: !0
};
function on() {
return (on = Object.assign || function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
}
return e
}).apply(this, arguments)
}
function sn() {
return (sn = Object.assign || function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
}
return e
}).apply(this, arguments)
}
function an() {
return (an = Object.assign || function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
}
return e
}).apply(this, arguments)
}
var un = {
ClearIndicator: function(e) {
var t = e.children,
n = e.className,
r = e.cx,
o = e.getStyles,
i = e.innerProps;
return nt("div", Rt({}, i, {
css: o("clearIndicator", e),
className: r({
indicator: !0,
"clear-indicator": !0
}, n)
}), t || nt(Bt, null))
},
Control: function(e) {
var t = e.children,
n = e.cx,
r = e.getStyles,
o = e.className,
i = e.isDisabled,
s = e.isFocused,
a = e.innerRef,
u = e.innerProps,
c = e.menuIsOpen;
return nt("div", $t({
ref: a,
css: r("control", e),
className: n({
control: !0,
"control--is-disabled": i,
"control--is-focused": s,
"control--menu-is-open": c
}, o)
}, u), t)
},
DropdownIndicator: function(e) {
var t = e.children,
n = e.className,
r = e.cx,
o = e.getStyles,
i = e.innerProps;
return nt("div", Rt({}, i, {
css: o("dropdownIndicator", e),
className: r({
indicator: !0,
"dropdown-indicator": !0
}, n)
}), t || nt(Ht, null))
},
DownChevron: Ht,
CrossIcon: Bt,
Group: function(e) {
var t = e.children,
n = e.className,
r = e.cx,
o = e.getStyles,
i = e.Heading,
s = e.headingProps,
a = e.label,
u = e.theme,
c = e.selectProps;
return nt("div", {
css: o("group", e),
className: r({
group: !0
}, n)
}, nt(i, Xt({}, s, {
selectProps: c,
theme: u,
getStyles: o,
cx: r
}), a), nt("div", null, t))
},
GroupHeading: function(e) {
var t = e.className,
n = e.cx,
r = e.getStyles,
o = e.theme,
i = (e.selectProps, function(e, t) {
if (null == e) return {};
var n, r, o = {},
i = Object.keys(e);
for (r = 0; r < i.length; r++) n = i[r], t.indexOf(n) >= 0 || (o[n] = e[n]);
return o
}(e, ["className", "cx", "getStyles", "theme", "selectProps"]));
return nt("div", Xt({
css: r("groupHeading", Xt({
theme: o
}, i)),
className: n({
"group-heading": !0
}, t)
}, i))
},
IndicatorsContainer: function(e) {
var t = e.children,
n = e.className,
r = e.cx,
o = e.getStyles;
return nt("div", {
css: o("indicatorsContainer", e),
className: r({
indicators: !0
}, n)
}, t)
},
IndicatorSeparator: function(e) {
var t = e.className,
n = e.cx,
r = e.getStyles,
o = e.innerProps;
return nt("span", Rt({}, o, {
css: r("indicatorSeparator", e),
className: n({
"indicator-separator": !0
}, t)
}))
},
Input: function(e) {
var t = e.className,
n = e.cx,
r = e.getStyles,
o = e.innerRef,
i = e.isHidden,
s = e.isDisabled,
a = e.theme,
u = (e.selectProps, function(e, t) {
if (null == e) return {};
var n, r, o = {},
i = Object.keys(e);
for (r = 0; r < i.length; r++) n = i[r], t.indexOf(n) >= 0 || (o[n] = e[n]);
return o
}(e, ["className", "cx", "getStyles", "innerRef", "isHidden", "isDisabled", "theme", "selectProps"]));
return nt("div", {
css: r("input", Jt({
theme: a
}, u))
}, nt(yt.a, Jt({
className: n({
input: !0
}, t),
inputRef: o,
inputStyle: Kt(i),
disabled: s
}, u)))
},
LoadingIndicator: Yt,
Menu: function(e) {
var t = e.children,
n = e.className,
r = e.cx,
o = e.getStyles,
i = e.innerRef,
s = e.innerProps;
return nt("div", Et({
css: o("menu", e),
className: r({
menu: !0
}, n)
}, s, {
ref: i
}), t)
},
MenuList: function(e) {
var t = e.children,
n = e.className,
r = e.cx,
o = e.getStyles,
i = e.isMulti,
s = e.innerRef;
return nt("div", {
css: o("menuList", e),
className: r({
"menu-list": !0,
"menu-list--is-multi": i
}, n),
ref: s
}, t)
},
MenuPortal: _t,
LoadingMessage: jt,
NoOptionsMessage: Dt,
MultiValue: nn,
MultiValueContainer: en,
MultiValueLabel: tn,
MultiValueRemove: function(e) {
var t = e.children,
n = e.innerProps;
return nt("div", n, t || nt(Bt, {
size: 14
}))
},
Option: function(e) {
var t = e.children,
n = e.className,
r = e.cx,
o = e.getStyles,
i = e.isDisabled,
s = e.isFocused,
a = e.isSelected,
u = e.innerRef,
c = e.innerProps;
return nt("div", rn({
css: o("option", e),
className: r({
option: !0,
"option--is-disabled": i,
"option--is-focused": s,
"option--is-selected": a
}, n),
ref: u
}, c), t)
},
Placeholder: function(e) {
var t = e.children,
n = e.className,
r = e.cx,
o = e.getStyles,
i = e.innerProps;
return nt("div", on({
css: o("placeholder", e),
className: r({
placeholder: !0
}, n)
}, i), t)
},
SelectContainer: function(e) {
var t = e.children,
n = e.className,
r = e.cx,
o = e.getStyles,
i = e.innerProps,
s = e.isDisabled,
a = e.isRtl;
return nt("div", kt({
css: o("container", e),
className: r({
"--is-disabled": s,
"--is-rtl": a
}, n)
}, i), t)
},
SingleValue: function(e) {
var t = e.children,
n = e.className,
r = e.cx,
o = e.getStyles,
i = e.isDisabled,
s = e.innerProps;
return nt("div", sn({
css: o("singleValue", e),
className: r({
"single-value": !0,
"single-value--is-disabled": i
}, n)
}, s), t)
},
ValueContainer: function(e) {
var t = e.children,
n = e.className,
r = e.cx,
o = e.isMulti,
i = e.getStyles,
s = e.hasValue;
return nt("div", {
css: i("valueContainer", e),
className: r({
"value-container": !0,
"value-container--is-multi": o,
"value-container--has-value": s
}, n)
}, t)
}
},
cn = [{
base: "A",
letters: /[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g
}, {
base: "AA",
letters: /[\uA732]/g
}, {
base: "AE",
letters: /[\u00C6\u01FC\u01E2]/g
}, {
base: "AO",
letters: /[\uA734]/g
}, {
base: "AU",
letters: /[\uA736]/g
}, {
base: "AV",
letters: /[\uA738\uA73A]/g
}, {
base: "AY",
letters: /[\uA73C]/g
}, {
base: "B",
letters: /[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g
}, {
base: "C",
letters: /[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g
}, {
base: "D",
letters: /[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g
}, {
base: "DZ",
letters: /[\u01F1\u01C4]/g
}, {
base: "Dz",
letters: /[\u01F2\u01C5]/g
}, {
base: "E",
letters: /[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g
}, {
base: "F",
letters: /[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g
}, {
base: "G",
letters: /[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g
}, {
base: "H",
letters: /[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g
}, {
base: "I",
letters: /[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g
}, {
base: "J",
letters: /[\u004A\u24BF\uFF2A\u0134\u0248]/g
}, {
base: "K",
letters: /[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g
}, {
base: "L",
letters: /[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g
}, {
base: "LJ",
letters: /[\u01C7]/g
}, {
base: "Lj",
letters: /[\u01C8]/g
}, {
base: "M",
letters: /[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g
}, {
base: "N",
letters: /[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g
}, {
base: "NJ",
letters: /[\u01CA]/g
}, {
base: "Nj",
letters: /[\u01CB]/g
}, {
base: "O",
letters: /[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g
}, {
base: "OI",
letters: /[\u01A2]/g
}, {
base: "OO",
letters: /[\uA74E]/g
}, {
base: "OU",
letters: /[\u0222]/g
}, {
base: "P",
letters: /[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g
}, {
base: "Q",
letters: /[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g
}, {
base: "R",
letters: /[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g
}, {
base: "S",
letters: /[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g
}, {
base: "T",
letters: /[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g
}, {
base: "TZ",
letters: /[\uA728]/g
}, {
base: "U",
letters: /[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g
}, {
base: "V",
letters: /[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g
}, {
base: "VY",
letters: /[\uA760]/g
}, {
base: "W",
letters: /[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g
}, {
base: "X",
letters: /[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g
}, {
base: "Y",
letters: /[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g
}, {
base: "Z",
letters: /[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g
}, {
base: "a",
letters: /[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g
}, {
base: "aa",
letters: /[\uA733]/g
}, {
base: "ae",
letters: /[\u00E6\u01FD\u01E3]/g
}, {
base: "ao",
letters: /[\uA735]/g
}, {
base: "au",
letters: /[\uA737]/g
}, {
base: "av",
letters: /[\uA739\uA73B]/g
}, {
base: "ay",
letters: /[\uA73D]/g
}, {
base: "b",
letters: /[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g
}, {
base: "c",
letters: /[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g
}, {
base: "d",
letters: /[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g
}, {
base: "dz",
letters: /[\u01F3\u01C6]/g
}, {
base: "e",
letters: /[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g
}, {
base: "f",
letters: /[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g
}, {
base: "g",
letters: /[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g
}, {
base: "h",
letters: /[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g
}, {
base: "hv",
letters: /[\u0195]/g
}, {
base: "i",
letters: /[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g
}, {
base: "j",
letters: /[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g
}, {
base: "k",
letters: /[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g
}, {
base: "l",
letters: /[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g
}, {
base: "lj",
letters: /[\u01C9]/g
}, {
base: "m",
letters: /[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g
}, {
base: "n",
letters: /[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g
}, {
base: "nj",
letters: /[\u01CC]/g
}, {
base: "o",
letters: /[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g
}, {
base: "oi",
letters: /[\u01A3]/g
}, {
base: "ou",
letters: /[\u0223]/g
}, {
base: "oo",
letters: /[\uA74F]/g
}, {
base: "p",
letters: /[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g
}, {
base: "q",
letters: /[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g
}, {
base: "r",
letters: /[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g
}, {
base: "s",
letters: /[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g
}, {
base: "t",
letters: /[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g
}, {
base: "tz",
letters: /[\uA729]/g
}, {
base: "u",
letters: /[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g
}, {
base: "v",
letters: /[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g
}, {
base: "vy",
letters: /[\uA761]/g
}, {
base: "w",
letters: /[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g
}, {
base: "x",
letters: /[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g
}, {
base: "y",
letters: /[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g
}, {
base: "z",
letters: /[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g
}],
ln = function(e) {
for (var t = 0; t < cn.length; t++) e = e.replace(cn[t].letters, cn[t].base);
return e
};
function pn() {
return (pn = Object.assign || function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
}
return e
}).apply(this, arguments)
}
var dn = function(e) {
return e.replace(/^\s+|\s+$/g, "")
},
fn = function(e) {
return e.label + " " + e.value
};
function hn() {
return (hn = Object.assign || function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
}
return e
}).apply(this, arguments)
}
var mn = {
name: "1laao21-a11yText",
styles: "label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;"
},
gn = function(e) {
return nt("span", hn({
css: mn
}, e))
};
function vn() {
return (vn = Object.assign || function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
}
return e
}).apply(this, arguments)
}
function bn(e) {
e.in, e.out, e.onExited, e.appear, e.enter, e.exit;
var t = e.innerRef,
n = (e.emotion, function(e, t) {
if (null == e) return {};
var n, r, o = {},
i = Object.keys(e);
for (r = 0; r < i.length; r++) n = i[r], t.indexOf(n) >= 0 || (o[n] = e[n]);
return o
}(e, ["in", "out", "onExited", "appear", "enter", "exit", "innerRef", "emotion"]));
return nt("input", vn({
ref: t
}, n, {
css: Ye({
label: "dummyInput",
background: 0,
border: 0,
fontSize: "inherit",
outline: 0,
padding: 0,
width: 1,
color: "transparent",
left: -100,
opacity: 0,
position: "relative",
transform: "scale(0)"
}, "")
}))
}
var yn = function(e) {
var t, n;
function r() {
return e.apply(this, arguments) || this
}
n = e, (t = r).prototype = Object.create(n.prototype), t.prototype.constructor = t, t.__proto__ = n;
var o = r.prototype;
return o.componentDidMount = function() {
this.props.innerRef(Object(st.findDOMNode)(this))
}, o.componentWillUnmount = function() {
this.props.innerRef(null)
}, o.render = function() {
return this.props.children
}, r
}(Oe.Component),
En = ["boxSizing", "height", "overflow", "paddingRight", "position"],
On = {
boxSizing: "border-box",
overflow: "hidden",
position: "relative",
height: "100%"
};
function Cn(e) {
e.preventDefault()
}
function wn(e) {
e.stopPropagation()
}
function An() {
var e = this.scrollTop,
t = this.scrollHeight,
n = e + this.offsetHeight;
0 === e ? this.scrollTop = 1 : n === t && (this.scrollTop = e - 1)
}
function Sn() {
return "ontouchstart" in window || navigator.maxTouchPoints
}
var Fn = !(!window.document || !window.document.createElement),
xn = 0,
Dn = function(e) {
var t, n;
function r() {
for (var t, n = arguments.length, r = new Array(n), o = 0; o < n; o++) r[o] = arguments[o];
return (t = e.call.apply(e, [this].concat(r)) || this).originalStyles = {}, t.listenerOptions = {
capture: !1,
passive: !1
}, t
}
n = e, (t = r).prototype = Object.create(n.prototype), t.prototype.constructor = t, t.__proto__ = n;
var o = r.prototype;
return o.componentDidMount = function() {
var e = this;
if (Fn) {
var t = this.props,
n = t.accountForScrollbars,
r = t.touchScrollTarget,
o = document.body,
i = o && o.style;
if (n && En.forEach((function(t) {
var n = i && i[t];
e.originalStyles[t] = n
})), n && xn < 1) {
var s = parseInt(this.originalStyles.paddingRight, 10) || 0,
a = document.body ? document.body.clientWidth : 0,
u = window.innerWidth - a + s || 0;
Object.keys(On).forEach((function(e) {
var t = On[e];
i && (i[e] = t)
})), i && (i.paddingRight = u + "px")
}
o && Sn() && (o.addEventListener("touchmove", Cn, this.listenerOptions), r && (r.addEventListener("touchstart", An, this.listenerOptions), r.addEventListener("touchmove", wn, this.listenerOptions))), xn += 1
}
}, o.componentWillUnmount = function() {
var e = this;
if (Fn) {
var t = this.props,
n = t.accountForScrollbars,
r = t.touchScrollTarget,
o = document.body,
i = o && o.style;
xn = Math.max(xn - 1, 0), n && xn < 1 && En.forEach((function(t) {
var n = e.originalStyles[t];
i && (i[t] = n)
})), o && Sn() && (o.removeEventListener("touchmove", Cn, this.listenerOptions), r && (r.removeEventListener("touchstart", An, this.listenerOptions), r.removeEventListener("touchmove", wn, this.listenerOptions)))
}
}, o.render = function() {
return null
}, r
}(Oe.Component);
Dn.defaultProps = {
accountForScrollbars: !0
};
var jn = {
name: "1dsbpcp",
styles: "position:fixed;left:0;bottom:0;right:0;top:0;"
},
_n = function(e) {
var t, n;
function r() {
for (var t, n = arguments.length, r = new Array(n), o = 0; o < n; o++) r[o] = arguments[o];
return (t = e.call.apply(e, [this].concat(r)) || this).state = {
touchScrollTarget: null
}, t.getScrollTarget = function(e) {
e !== t.state.touchScrollTarget && t.setState({
touchScrollTarget: e
})
}, t.blurSelectInput = function() {
document.activeElement && document.activeElement.blur()
}, t
}
return n = e, (t = r).prototype = Object.create(n.prototype), t.prototype.constructor = t, t.__proto__ = n, r.prototype.render = function() {
var e = this.props,
t = e.children,
n = e.isEnabled,
r = this.state.touchScrollTarget;
return n ? nt("div", null, nt("div", {
onClick: this.blurSelectInput,
css: jn
}), nt(yn, {
innerRef: this.getScrollTarget
}, t), r ? nt(Dn, {
touchScrollTarget: r
}) : null) : t
}, r
}(Oe.PureComponent);
var Ln = function(e) {
var t, n;
function r() {
for (var t, n = arguments.length, r = new Array(n), o = 0; o < n; o++) r[o] = arguments[o];
return (t = e.call.apply(e, [this].concat(r)) || this).isBottom = !1, t.isTop = !1, t.scrollTarget = void 0, t.touchStart = void 0, t.cancelScroll = function(e) {
e.preventDefault(), e.stopPropagation()
}, t.handleEventDelta = function(e, n) {
var r = t.props,
o = r.onBottomArrive,
i = r.onBottomLeave,
s = r.onTopArrive,
a = r.onTopLeave,
u = t.scrollTarget,
c = u.scrollTop,
l = u.scrollHeight,
p = u.clientHeight,
d = t.scrollTarget,
f = n > 0,
h = l - p - c,
m = !1;
h > n && t.isBottom && (i && i(e), t.isBottom = !1), f && t.isTop && (a && a(e), t.isTop = !1), f && n > h ? (o && !t.isBottom && o(e), d.scrollTop = l, m = !0, t.isBottom = !0) : !f && -n > c && (s && !t.isTop && s(e), d.scrollTop = 0, m = !0, t.isTop = !0), m && t.cancelScroll(e)
}, t.onWheel = function(e) {
t.handleEventDelta(e, e.deltaY)
}, t.onTouchStart = function(e) {
t.touchStart = e.changedTouches[0].clientY
}, t.onTouchMove = function(e) {
var n = t.touchStart - e.changedTouches[0].clientY;
t.handleEventDelta(e, n)
}, t.getScrollTarget = function(e) {
t.scrollTarget = e
}, t
}
n = e, (t = r).prototype = Object.create(n.prototype), t.prototype.constructor = t, t.__proto__ = n;
var o = r.prototype;
return o.componentDidMount = function() {
this.startListening(this.scrollTarget)
}, o.componentWillUnmount = function() {
this.stopListening(this.scrollTarget)
}, o.startListening = function(e) {
e && ("function" == typeof e.addEventListener && e.addEventListener("wheel", this.onWheel, !1), "function" == typeof e.addEventListener && e.addEventListener("touchstart", this.onTouchStart, !1), "function" == typeof e.addEventListener && e.addEventListener("touchmove", this.onTouchMove, !1))
}, o.stopListening = function(e) {
"function" == typeof e.removeEventListener && e.removeEventListener("wheel", this.onWheel, !1), "function" == typeof e.removeEventListener && e.removeEventListener("touchstart", this.onTouchStart, !1), "function" == typeof e.removeEventListener && e.removeEventListener("touchmove", this.onTouchMove, !1)
}, o.render = function() {
return Ce.a.createElement(yn, {
innerRef: this.getScrollTarget
}, this.props.children)
}, r
}(Oe.Component);
function In(e) {
var t = e.isEnabled,
n = void 0 === t || t,
r = function(e, t) {
if (null == e) return {};
var n, r, o = {},
i = Object.keys(e);
for (r = 0; r < i.length; r++) n = i[r], t.indexOf(n) >= 0 || (o[n] = e[n]);
return o
}(e, ["isEnabled"]);
return n ? Ce.a.createElement(Ln, r) : r.children
}
var Mn = function(e, t) {
void 0 === t && (t = {});
var n = t,
r = n.isSearchable,
o = n.isMulti,
i = n.label,
s = n.isDisabled;
switch (e) {
case "menu":
return "Use Up and Down to choose options" + (s ? "" : ", press Enter to select the currently focused option") + ", press Escape to exit the menu, press Tab to select the option and exit the menu.";
case "input":
return (i || "Select") + " is focused " + (r ? ",type to refine list" : "") + ", press Down to open the menu, " + (o ? " press left to focus selected values" : "");
case "value":
return "Use left and right to toggle between focused values, press Backspace to remove the currently focused value"
}
},
Tn = function(e, t) {
var n = t.value,
r = t.isDisabled;
if (n) switch (e) {
case "deselect-option":
case "pop-value":
case "remove-value":
return "option " + n + ", deselected.";
case "select-option":
return r ? "option " + n + " is disabled. Select another option." : "option " + n + ", selected."
}
},
kn = function(e) {
return !!e.isDisabled
};
var Pn = {
clearIndicator: zt,
container: function(e) {
var t = e.isDisabled;
return {
label: "container",
direction: e.isRtl ? "rtl" : null,
pointerEvents: t ? "none" : null,
position: "relative"
}
},
control: function(e) {
var t = e.isDisabled,
n = e.isFocused,
r = e.theme,
o = r.colors,
i = r.borderRadius,
s = r.spacing;
return {
label: "control",
alignItems: "center",
backgroundColor: t ? o.neutral5 : o.neutral0,
borderColor: t ? o.neutral10 : n ? o.primary : o.neutral20,
borderRadius: i,
borderStyle: "solid",
borderWidth: 1,
boxShadow: n ? "0 0 0 1px " + o.primary : null,
cursor: "default",
display: "flex",
flexWrap: "wrap",
justifyContent: "space-between",
minHeight: s.controlHeight,
outline: "0 !important",
position: "relative",
transition: "all 100ms",
"&:hover": {
borderColor: n ? o.primary : o.neutral30
}
}
},
dropdownIndicator: qt,
group: function(e) {
var t = e.theme.spacing;
return {
paddingBottom: 2 * t.baseUnit,
paddingTop: 2 * t.baseUnit
}
},
groupHeading: function(e) {
var t = e.theme.spacing;
return {
label: "group",
color: "#999",
cursor: "default",
display: "block",
fontSize: "75%",
fontWeight: "500",
marginBottom: "0.25em",
paddingLeft: 3 * t.baseUnit,
paddingRight: 3 * t.baseUnit,
textTransform: "uppercase"
}
},
indicatorsContainer: function() {
return {
alignItems: "center",
alignSelf: "stretch",
display: "flex",
flexShrink: 0
}
},
indicatorSeparator: function(e) {
var t = e.isDisabled,
n = e.theme,
r = n.spacing.baseUnit,
o = n.colors;
return {
label: "indicatorSeparator",
alignSelf: "stretch",
backgroundColor: t ? o.neutral10 : o.neutral20,
marginBottom: 2 * r,
marginTop: 2 * r,
width: 1
}
},
input: function(e) {
var t = e.isDisabled,
n = e.theme,
r = n.spacing,
o = n.colors;
return {
margin: r.baseUnit / 2,
paddingBottom: r.baseUnit / 2,
paddingTop: r.baseUnit / 2,
visibility: t ? "hidden" : "visible",
color: o.neutral80
}
},
loadingIndicator: function(e) {
var t = e.isFocused,
n = e.size,
r = e.theme,
o = r.colors,
i = r.spacing.baseUnit;
return {
label: "loadingIndicator",
color: t ? o.neutral60 : o.neutral20,
display: "flex",
padding: 2 * i,
transition: "color 150ms",
alignSelf: "center",
fontSize: n,
lineHeight: 1,
marginRight: n,
textAlign: "center",
verticalAlign: "middle"
}
},
loadingMessage: xt,
menu: function(e) {
var t, n = e.placement,
r = e.theme,
o = r.borderRadius,
i = r.spacing,
s = r.colors;
return (t = {
label: "menu"
})[function(e) {
return e ? {
bottom: "top",
top: "bottom"
}[e] : "bottom"
}(n)] = "100%", t.backgroundColor = s.neutral0, t.borderRadius = o, t.boxShadow = "0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)", t.marginBottom = i.menuGutter, t.marginTop = i.menuGutter, t.position = "absolute", t.width = "100%", t.zIndex = 1, t
},
menuList: function(e) {
var t = e.maxHeight,
n = e.theme.spacing.baseUnit;
return {
maxHeight: t,
overflowY: "auto",
paddingBottom: n,
paddingTop: n,
position: "relative",
WebkitOverflowScrolling: "touch"
}
},
menuPortal: function(e) {
var t = e.rect,
n = e.offset,
r = e.position;
return {
left: t.left,
position: r,
top: n,
width: t.width,
zIndex: 1
}
},
multiValue: function(e) {
var t = e.theme,
n = t.spacing,
r = t.borderRadius;
return {
label: "multiValue",
backgroundColor: t.colors.neutral10,
borderRadius: r / 2,
display: "flex",
margin: n.baseUnit / 2,
minWidth: 0
}
},
multiValueLabel: function(e) {
var t = e.theme,
n = t.borderRadius,
r = t.colors,
o = e.cropWithEllipsis;
return {
borderRadius: n / 2,
color: r.neutral80,
fontSize: "85%",
overflow: "hidden",
padding: 3,
paddingLeft: 6,
textOverflow: o ? "ellipsis" : null,
whiteSpace: "nowrap"
}
},
multiValueRemove: function(e) {
var t = e.theme,
n = t.spacing,
r = t.borderRadius,
o = t.colors;
return {
alignItems: "center",
borderRadius: r / 2,
backgroundColor: e.isFocused && o.dangerLight,
display: "flex",
paddingLeft: n.baseUnit,
paddingRight: n.baseUnit,
":hover": {
backgroundColor: o.dangerLight,
color: o.danger
}
}
},
noOptionsMessage: Ft,
option: function(e) {
var t = e.isDisabled,
n = e.isFocused,
r = e.isSelected,
o = e.theme,
i = o.spacing,
s = o.colors;
return {
label: "option",
backgroundColor: r ? s.primary : n ? s.primary25 : "transparent",
color: t ? s.neutral20 : r ? s.neutral0 : "inherit",
cursor: "default",
display: "block",
fontSize: "inherit",
padding: 2 * i.baseUnit + "px " + 3 * i.baseUnit + "px",
width: "100%",
userSelect: "none",
WebkitTapHighlightColor: "rgba(0, 0, 0, 0)",
":active": {
backgroundColor: !t && (r ? s.primary : s.primary50)
}
}
},
placeholder: function(e) {
var t = e.theme,
n = t.spacing;
return {
label: "placeholder",
color: t.colors.neutral50,
marginLeft: n.baseUnit / 2,
marginRight: n.baseUnit / 2,
position: "absolute",
top: "50%",
transform: "translateY(-50%)"
}
},
singleValue: function(e) {
var t = e.isDisabled,
n = e.theme,
r = n.spacing,
o = n.colors;
return {
label: "singleValue",
color: t ? o.neutral40 : o.neutral80,
marginLeft: r.baseUnit / 2,
marginRight: r.baseUnit / 2,
maxWidth: "calc(100% - " + 2 * r.baseUnit + "px)",
overflow: "hidden",
position: "absolute",
textOverflow: "ellipsis",
whiteSpace: "nowrap",
top: "50%",
transform: "translateY(-50%)"
}
},
valueContainer: function(e) {
var t = e.theme.spacing;
return {
alignItems: "center",
display: "flex",
flex: 1,
flexWrap: "wrap",
padding: t.baseUnit / 2 + "px " + 2 * t.baseUnit + "px",
WebkitOverflowScrolling: "touch",
position: "relative",
overflow: "hidden"
}
}
};
var Rn = {
borderRadius: 4,
colors: {
primary: "#2684FF",
primary75: "#4C9AFF",
primary50: "#B2D4FF",
primary25: "#DEEBFF",
danger: "#DE350B",
dangerLight: "#FFBDAD",
neutral0: "hsl(0, 0%, 100%)",
neutral5: "hsl(0, 0%, 95%)",
neutral10: "hsl(0, 0%, 90%)",
neutral20: "hsl(0, 0%, 80%)",
neutral30: "hsl(0, 0%, 70%)",
neutral40: "hsl(0, 0%, 60%)",
neutral50: "hsl(0, 0%, 50%)",
neutral60: "hsl(0, 0%, 40%)",
neutral70: "hsl(0, 0%, 30%)",
neutral80: "hsl(0, 0%, 20%)",
neutral90: "hsl(0, 0%, 10%)"
},
spacing: {
baseUnit: 4,
controlHeight: 38,
menuGutter: 8
}
};
function Nn() {
return (Nn = Object.assign || function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
}
return e
}).apply(this, arguments)
}
function Vn(e) {
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return e
}
var Bn, Hn = {
backspaceRemovesValue: !0,
blurInputOnSelect: vt(),
captureMenuScroll: !vt(),
closeMenuOnSelect: !0,
closeMenuOnScroll: !1,
components: {},
controlShouldRenderValue: !0,
escapeClearsValue: !1,
filterOption: function(e, t) {
var n = pn({
ignoreCase: !0,
ignoreAccents: !0,
stringify: fn,
trim: !0,
matchFrom: "any"
}, Bn),
r = n.ignoreCase,
o = n.ignoreAccents,
i = n.stringify,
s = n.trim,
a = n.matchFrom,
u = s ? dn(t) : t,
c = s ? dn(i(e)) : i(e);
return r && (u = u.toLowerCase(), c = c.toLowerCase()), o && (u = ln(u), c = ln(c)), "start" === a ? c.substr(0, u.length) === u : c.indexOf(u) > -1
},
formatGroupLabel: function(e) {
return e.label
},
getOptionLabel: function(e) {
return e.label
},
getOptionValue: function(e) {
return e.value
},
isDisabled: !1,
isLoading: !1,
isMulti: !1,
isRtl: !1,
isSearchable: !0,
isOptionDisabled: kn,
loadingMessage: function() {
return "Loading..."
},
maxMenuHeight: 300,
minMenuHeight: 140,
menuIsOpen: !1,
menuPlacement: "bottom",
menuPosition: "absolute",
menuShouldBlockScroll: !1,
menuShouldScrollIntoView: ! function() {
try {
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)
} catch (e) {
return !1
}
}(),
noOptionsMessage: function() {
return "No options"
},
openMenuOnFocus: !1,
openMenuOnClick: !0,
options: [],
pageSize: 5,
placeholder: "Select...",
screenReaderStatus: function(e) {
var t = e.count;
return t + " result" + (1 !== t ? "s" : "") + " available"
},
styles: {},
tabIndex: "0",
tabSelectsValue: !0
},
Un = 1,
qn = function(e) {
var t, n;
function r(t) {
var n;
(n = e.call(this, t) || this).state = {
ariaLiveSelection: "",
ariaLiveContext: "",
focusedOption: null,
focusedValue: null,
inputIsHidden: !1,
isFocused: !1,
menuOptions: {
render: [],
focusable: []
},
selectValue: []
}, n.blockOptionHover = !1, n.isComposing = !1, n.clearFocusValueOnUpdate = !1, n.commonProps = void 0, n.components = void 0, n.hasGroups = !1, n.initialTouchX = 0, n.initialTouchY = 0, n.inputIsHiddenAfterUpdate = void 0, n.instancePrefix = "", n.openAfterFocus = !1, n.scrollToFocusedOptionOnUpdate = !1, n.userIsDragging = void 0, n.controlRef = null, n.getControlRef = function(e) {
n.controlRef = e
}, n.focusedOptionRef = null, n.getFocusedOptionRef = function(e) {
n.focusedOptionRef = e
}, n.menuListRef = null, n.getMenuListRef = function(e) {
n.menuListRef = e
}, n.inputRef = null, n.getInputRef = function(e) {
n.inputRef = e
}, n.cacheComponents = function(e) {
n.components = an({}, un, {
components: e
}.components)
}, n.focus = n.focusInput, n.blur = n.blurInput, n.onChange = function(e, t) {
var r = n.props;
(0, r.onChange)(e, Nn({}, t, {
name: r.name
}))
}, n.setValue = function(e, t, r) {
void 0 === t && (t = "set-value");
var o = n.props,
i = o.closeMenuOnSelect,
s = o.isMulti;
n.onInputChange("", {
action: "set-value"
}), i && (n.inputIsHiddenAfterUpdate = !s, n.onMenuClose()), n.clearFocusValueOnUpdate = !0, n.onChange(e, {
action: t,
option: r
})
}, n.selectOption = function(e) {
var t = n.props,
r = t.blurInputOnSelect,
o = t.isMulti,
i = n.state.selectValue;
if (o)
if (n.isOptionSelected(e, i)) {
var s = n.getOptionValue(e);
n.setValue(i.filter((function(e) {
return n.getOptionValue(e) !== s
})), "deselect-option", e), n.announceAriaLiveSelection({
event: "deselect-option",
context: {
value: n.getOptionLabel(e)
}
})
} else n.isOptionDisabled(e, i) ? n.announceAriaLiveSelection({
event: "select-option",
context: {
value: n.getOptionLabel(e),
isDisabled: !0
}
}) : (n.setValue([].concat(i, [e]), "select-option", e), n.announceAriaLiveSelection({
event: "select-option",
context: {
value: n.getOptionLabel(e)
}
}));
else n.isOptionDisabled(e, i) ? n.announceAriaLiveSelection({
event: "select-option",
context: {
value: n.getOptionLabel(e),
isDisabled: !0
}
}) : (n.setValue(e, "select-option"), n.announceAriaLiveSelection({
event: "select-option",
context: {
value: n.getOptionLabel(e)
}
}));
r && n.blurInput()
}, n.removeValue = function(e) {
var t = n.state.selectValue,
r = n.getOptionValue(e),
o = t.filter((function(e) {
return n.getOptionValue(e) !== r
}));
n.onChange(o.length ? o : null, {
action: "remove-value",
removedValue: e
}), n.announceAriaLiveSelection({
event: "remove-value",
context: {
value: e ? n.getOptionLabel(e) : ""
}
}), n.focusInput()
}, n.clearValue = function() {
var e = n.props.isMulti;
n.onChange(e ? [] : null, {
action: "clear"
})
}, n.popValue = function() {
var e = n.state.selectValue,
t = e[e.length - 1],
r = e.slice(0, e.length - 1);
n.announceAriaLiveSelection({
event: "pop-value",
context: {
value: t ? n.getOptionLabel(t) : ""
}
}), n.onChange(r.length ? r : null, {
action: "pop-value",
removedValue: t
})
}, n.getOptionLabel = function(e) {
return n.props.getOptionLabel(e)
}, n.getOptionValue = function(e) {
return n.props.getOptionValue(e)
}, n.getStyles = function(e, t) {
var r = Pn[e](t);
r.boxSizing = "border-box";
var o = n.props.styles[e];
return o ? o(r, t) : r
}, n.getElementId = function(e) {
return n.instancePrefix + "-" + e
}, n.getActiveDescendentId = function() {
var e = n.props.menuIsOpen,
t = n.state,
r = t.menuOptions,
o = t.focusedOption;
if (o && e) {
var i = r.focusable.indexOf(o),
s = r.render[i];
return s && s.key
}
}, n.announceAriaLiveSelection = function(e) {
var t = e.event,
r = e.context;
n.setState({
ariaLiveSelection: Tn(t, r)
})
}, n.announceAriaLiveContext = function(e) {
var t = e.event,
r = e.context;
n.setState({
ariaLiveContext: Mn(t, Nn({}, r, {
label: n.props["aria-label"]
}))
})
}, n.onMenuMouseDown = function(e) {
0 === e.button && (e.stopPropagation(), e.preventDefault(), n.focusInput())
}, n.onMenuMouseMove = function(e) {
n.blockOptionHover = !1
}, n.onControlMouseDown = function(e) {
var t = n.props.openMenuOnClick;
n.state.isFocused ? n.props.menuIsOpen ? "INPUT" !== e.target.tagName && "TEXTAREA" !== e.target.tagName && n.onMenuClose() : t && n.openMenu("first") : (t && (n.openAfterFocus = !0), n.focusInput()), "INPUT" !== e.target.tagName && "TEXTAREA" !== e.target.tagName && e.preventDefault()
}, n.onDropdownIndicatorMouseDown = function(e) {
if (!(e && "mousedown" === e.type && 0 !== e.button || n.props.isDisabled)) {
var t = n.props,
r = t.isMulti,
o = t.menuIsOpen;
n.focusInput(), o ? (n.inputIsHiddenAfterUpdate = !r, n.onMenuClose()) : n.openMenu("first"), e.preventDefault(), e.stopPropagation()
}
}, n.onClearIndicatorMouseDown = function(e) {
e && "mousedown" === e.type && 0 !== e.button || (n.clearValue(), e.stopPropagation(), n.openAfterFocus = !1, "touchend" === e.type ? n.focusInput() : setTimeout((function() {
return n.focusInput()
})))
}, n.onScroll = function(e) {
"boolean" == typeof n.props.closeMenuOnScroll ? e.target instanceof HTMLElement && ft(e.target) && n.props.onMenuClose() : "function" == typeof n.props.closeMenuOnScroll && n.props.closeMenuOnScroll(e) && n.props.onMenuClose()
}, n.onCompositionStart = function() {
n.isComposing = !0
}, n.onCompositionEnd = function() {
n.isComposing = !1
}, n.onTouchStart = function(e) {
var t = e.touches.item(0);
t && (n.initialTouchX = t.clientX, n.initialTouchY = t.clientY, n.userIsDragging = !1)
}, n.onTouchMove = function(e) {
var t = e.touches.item(0);
if (t) {
var r = Math.abs(t.clientX - n.initialTouchX),
o = Math.abs(t.clientY - n.initialTouchY);
n.userIsDragging = r > 5 || o > 5
}
}, n.onTouchEnd = function(e) {
n.userIsDragging || (n.controlRef && !n.controlRef.contains(e.target) && n.menuListRef && !n.menuListRef.contains(e.target) && n.blurInput(), n.initialTouchX = 0, n.initialTouchY = 0)
}, n.onControlTouchEnd = function(e) {
n.userIsDragging || n.onControlMouseDown(e)
}, n.onClearIndicatorTouchEnd = function(e) {
n.userIsDragging || n.onClearIndicatorMouseDown(e)
}, n.onDropdownIndicatorTouchEnd = function(e) {
n.userIsDragging || n.onDropdownIndicatorMouseDown(e)
}, n.handleInputChange = function(e) {
var t = e.currentTarget.value;
n.inputIsHiddenAfterUpdate = !1, n.onInputChange(t, {
action: "input-change"
}), n.onMenuOpen()
}, n.onInputFocus = function(e) {
var t = n.props,
r = t.isSearchable,
o = t.isMulti;
n.props.onFocus && n.props.onFocus(e), n.inputIsHiddenAfterUpdate = !1, n.announceAriaLiveContext({
event: "input",
context: {
isSearchable: r,
isMulti: o
}
}), n.setState({
isFocused: !0
}), (n.openAfterFocus || n.props.openMenuOnFocus) && n.openMenu("first"), n.openAfterFocus = !1
}, n.onInputBlur = function(e) {
n.menuListRef && n.menuListRef.contains(document.activeElement) ? n.inputRef.focus() : (n.props.onBlur && n.props.onBlur(e), n.onInputChange("", {
action: "input-blur"
}), n.onMenuClose(), n.setState({
focusedValue: null,
isFocused: !1
}))
}, n.onOptionHover = function(e) {
n.blockOptionHover || n.state.focusedOption === e || n.setState({
focusedOption: e
})
}, n.shouldHideSelectedOptions = function() {
var e = n.props,
t = e.hideSelectedOptions,
r = e.isMulti;
return void 0 === t ? r : t
}, n.onKeyDown = function(e) {
var t = n.props,
r = t.isMulti,
o = t.backspaceRemovesValue,
i = t.escapeClearsValue,
s = t.inputValue,
a = t.isClearable,
u = t.isDisabled,
c = t.menuIsOpen,
l = t.onKeyDown,
p = t.tabSelectsValue,
d = t.openMenuOnFocus,
f = n.state,
h = f.focusedOption,
m = f.focusedValue,
g = f.selectValue;
if (!(u || "function" == typeof l && (l(e), e.defaultPrevented))) {
switch (n.blockOptionHover = !0, e.key) {
case "ArrowLeft":
if (!r || s) return;
n.focusValue("previous");
break;
case "ArrowRight":
if (!r || s) return;
n.focusValue("next");
break;
case "Delete":
case "Backspace":
if (s) return;
if (m) n.removeValue(m);
else {
if (!o) return;
r ? n.popValue() : a && n.clearValue()
}
break;
case "Tab":
if (n.isComposing) return;
if (e.shiftKey || !c || !p || !h || d && n.isOptionSelected(h, g)) return;
n.selectOption(h);
break;
case "Enter":
if (229 === e.keyCode) break;
if (c) {
if (!h) return;
if (n.isComposing) return;
n.selectOption(h);
break
}
return;
case "Escape":
c ? (n.inputIsHiddenAfterUpdate = !1, n.onInputChange("", {
action: "menu-close"
}), n.onMenuClose()) : a && i && n.clearValue();
break;
case " ":
if (s) return;
if (!c) {
n.openMenu("first");
break
}
if (!h) return;
n.selectOption(h);
break;
case "ArrowUp":
c ? n.focusOption("up") : n.openMenu("last");
break;
case "ArrowDown":
c ? n.focusOption("down") : n.openMenu("first");
break;
case "PageUp":
if (!c) return;
n.focusOption("pageup");
break;
case "PageDown":
if (!c) return;
n.focusOption("pagedown");
break;
case "Home":
if (!c) return;
n.focusOption("first");
break;
case "End":
if (!c) return;
n.focusOption("last");
break;
default:
return
}
e.preventDefault()
}
}, n.buildMenuOptions = function(e, t) {
var r = e.inputValue,
o = void 0 === r ? "" : r,
i = e.options,
s = function(e, r) {
var i = n.isOptionDisabled(e, t),
s = n.isOptionSelected(e, t),
a = n.getOptionLabel(e),
u = n.getOptionValue(e);
if (!(n.shouldHideSelectedOptions() && s || !n.filterOption({
label: a,
value: u,
data: e
}, o))) {
var c = i ? void 0 : function() {
return n.onOptionHover(e)
},
l = i ? void 0 : function() {
return n.selectOption(e)
},
p = n.getElementId("option") + "-" + r;
return {
innerProps: {
id: p,
onClick: l,
onMouseMove: c,
onMouseOver: c,
tabIndex: -1
},
data: e,
isDisabled: i,
isSelected: s,
key: p,
label: a,
type: "option",
value: u
}
}
};
return i.reduce((function(e, t, r) {
if (t.options) {
n.hasGroups || (n.hasGroups = !0);
var o = t.options.map((function(t, n) {
var o = s(t, r + "-" + n);
return o && e.focusable.push(t), o
})).filter(Boolean);
if (o.length) {
var i = n.getElementId("group") + "-" + r;
e.render.push({
type: "group",
key: i,
data: t,
options: o
})
}
} else {
var a = s(t, "" + r);
a && (e.render.push(a), e.focusable.push(t))
}
return e
}), {
render: [],
focusable: []
})
};
var r = t.value;
n.cacheComponents = Ae(n.cacheComponents, Tt).bind(Vn(Vn(n))), n.cacheComponents(t.components), n.instancePrefix = "react-select-" + (n.props.instanceId || ++Un);
var o = dt(r);
n.buildMenuOptions = Ae(n.buildMenuOptions, (function(e, t) {
var n = e,
r = n[0],
o = n[1],
i = t,
s = i[0];
return Tt(o, i[1]) && Tt(r.inputValue, s.inputValue) && Tt(r.options, s.options)
})).bind(Vn(Vn(n)));
var i = t.menuIsOpen ? n.buildMenuOptions(t, o) : {
render: [],
focusable: []
};
return n.state.menuOptions = i, n.state.selectValue = o, n
}
n = e, (t = r).prototype = Object.create(n.prototype), t.prototype.constructor = t, t.__proto__ = n;
var o = r.prototype;
return o.componentDidMount = function() {
this.startListeningComposition(), this.startListeningToTouch(), this.props.closeMenuOnScroll && document && document.addEventListener && document.addEventListener("scroll", this.onScroll, !0), this.props.autoFocus && this.focusInput()
}, o.UNSAFE_componentWillReceiveProps = function(e) {
var t = this.props,
n = t.options,
r = t.value,
o = t.menuIsOpen,
i = t.inputValue;
if (this.cacheComponents(e.components), e.value !== r || e.options !== n || e.menuIsOpen !== o || e.inputValue !== i) {
var s = dt(e.value),
a = e.menuIsOpen ? this.buildMenuOptions(e, s) : {
render: [],
focusable: []
},
u = this.getNextFocusedValue(s),
c = this.getNextFocusedOption(a.focusable);
this.setState({
menuOptions: a,
selectValue: s,
focusedOption: c,
focusedValue: u
})
}
null != this.inputIsHiddenAfterUpdate && (this.setState({
inputIsHidden: this.inputIsHiddenAfterUpdate
}), delete this.inputIsHiddenAfterUpdate)
}, o.componentDidUpdate = function(e) {
var t, n, r, o, i, s = this.props,
a = s.isDisabled,
u = s.menuIsOpen,
c = this.state.isFocused;
(c && !a && e.isDisabled || c && u && !e.menuIsOpen) && this.focusInput(), this.menuListRef && this.focusedOptionRef && this.scrollToFocusedOptionOnUpdate && (t = this.menuListRef, n = this.focusedOptionRef, r = t.getBoundingClientRect(), o = n.getBoundingClientRect(), i = n.offsetHeight / 3, o.bottom + i > r.bottom ? mt(t, Math.min(n.offsetTop + n.clientHeight - t.offsetHeight + i, t.scrollHeight)) : o.top - i < r.top && mt(t, Math.max(n.offsetTop - i, 0)), this.scrollToFocusedOptionOnUpdate = !1)
}, o.componentWillUnmount = function() {
this.stopListeningComposition(), this.stopListeningToTouch(), document.removeEventListener("scroll", this.onScroll, !0)
}, o.onMenuOpen = function() {
this.props.onMenuOpen()
}, o.onMenuClose = function() {
var e = this.props,
t = e.isSearchable,
n = e.isMulti;
this.announceAriaLiveContext({
event: "input",
context: {
isSearchable: t,
isMulti: n
}
}), this.onInputChange("", {
action: "menu-close"
}), this.props.onMenuClose()
}, o.onInputChange = function(e, t) {
this.props.onInputChange(e, t)
}, o.focusInput = function() {
this.inputRef && this.inputRef.focus()
}, o.blurInput = function() {
this.inputRef && this.inputRef.blur()
}, o.openMenu = function(e) {
var t = this,
n = this.state,
r = n.selectValue,
o = n.isFocused,
i = this.buildMenuOptions(this.props, r),
s = this.props.isMulti,
a = "first" === e ? 0 : i.focusable.length - 1;
if (!s) {
var u = i.focusable.indexOf(r[0]);
u > -1 && (a = u)
}
this.scrollToFocusedOptionOnUpdate = !(o && this.menuListRef), this.inputIsHiddenAfterUpdate = !1, this.setState({
menuOptions: i,
focusedValue: null,
focusedOption: i.focusable[a]
}, (function() {
t.onMenuOpen(), t.announceAriaLiveContext({
event: "menu"
})
}))
}, o.focusValue = function(e) {
var t = this.props,
n = t.isMulti,
r = t.isSearchable,
o = this.state,
i = o.selectValue,
s = o.focusedValue;
if (n) {
this.setState({
focusedOption: null
});
var a = i.indexOf(s);
s || (a = -1, this.announceAriaLiveContext({
event: "value"
}));
var u = i.length - 1,
c = -1;
if (i.length) {
switch (e) {
case "previous":
c = 0 === a ? 0 : -1 === a ? u : a - 1;
break;
case "next":
a > -1 && a < u && (c = a + 1)
} - 1 === c && this.announceAriaLiveContext({
event: "input",
context: {
isSearchable: r,
isMulti: n
}
}), this.setState({
inputIsHidden: -1 !== c,
focusedValue: i[c]
})
}
}
}, o.focusOption = function(e) {
void 0 === e && (e = "first");
var t = this.props.pageSize,
n = this.state,
r = n.focusedOption,
o = n.menuOptions.focusable;
if (o.length) {
var i = 0,
s = o.indexOf(r);
r || (s = -1, this.announceAriaLiveContext({
event: "menu"
})), "up" === e ? i = s > 0 ? s - 1 : o.length - 1 : "down" === e ? i = (s + 1) % o.length : "pageup" === e ? (i = s - t) < 0 && (i = 0) : "pagedown" === e ? (i = s + t) > o.length - 1 && (i = o.length - 1) : "last" === e && (i = o.length - 1), this.scrollToFocusedOptionOnUpdate = !0, this.setState({
focusedOption: o[i],
focusedValue: null
}), this.announceAriaLiveContext({
event: "menu",
context: {
isDisabled: kn(o[i])
}
})
}
}, o.getTheme = function() {
return this.props.theme ? "function" == typeof this.props.theme ? this.props.theme(Rn) : Nn({}, Rn, this.props.theme) : Rn
}, o.getCommonProps = function() {
var e = this.clearValue,
t = this.getStyles,
n = this.setValue,
r = this.selectOption,
o = this.props,
i = o.classNamePrefix,
s = o.isMulti,
a = o.isRtl,
u = o.options,
c = this.state.selectValue,
l = this.hasValue();
return {
cx: pt.bind(null, i),
clearValue: e,
getStyles: t,
getValue: function() {
return c
},
hasValue: l,
isMulti: s,
isRtl: a,
options: u,
selectOption: r,
setValue: n,
selectProps: o,
theme: this.getTheme()
}
}, o.getNextFocusedValue = function(e) {
if (this.clearFocusValueOnUpdate) return this.clearFocusValueOnUpdate = !1, null;
var t = this.state,
n = t.focusedValue,
r = t.selectValue.indexOf(n);
if (r > -1) {
if (e.indexOf(n) > -1) return n;
if (r < e.length) return e[r]
}
return null
}, o.getNextFocusedOption = function(e) {
var t = this.state.focusedOption;
return t && e.indexOf(t) > -1 ? t : e[0]
}, o.hasValue = function() {
return this.state.selectValue.length > 0
}, o.hasOptions = function() {
return !!this.state.menuOptions.render.length
}, o.countOptions = function() {
return this.state.menuOptions.focusable.length
}, o.isClearable = function() {
var e = this.props,
t = e.isClearable,
n = e.isMulti;
return void 0 === t ? n : t
}, o.isOptionDisabled = function(e, t) {
return "function" == typeof this.props.isOptionDisabled && this.props.isOptionDisabled(e, t)
}, o.isOptionSelected = function(e, t) {
var n = this;
if (t.indexOf(e) > -1) return !0;
if ("function" == typeof this.props.isOptionSelected) return this.props.isOptionSelected(e, t);
var r = this.getOptionValue(e);
return t.some((function(e) {
return n.getOptionValue(e) === r
}))
}, o.filterOption = function(e, t) {
return !this.props.filterOption || this.props.filterOption(e, t)
}, o.formatOptionLabel = function(e, t) {
if ("function" == typeof this.props.formatOptionLabel) {
var n = this.props.inputValue,
r = this.state.selectValue;
return this.props.formatOptionLabel(e, {
context: t,
inputValue: n,
selectValue: r
})
}
return this.getOptionLabel(e)
}, o.formatGroupLabel = function(e) {
return this.props.formatGroupLabel(e)
}, o.startListeningComposition = function() {
document && document.addEventListener && (document.addEventListener("compositionstart", this.onCompositionStart, !1), document.addEventListener("compositionend", this.onCompositionEnd, !1))
}, o.stopListeningComposition = function() {
document && document.removeEventListener && (document.removeEventListener("compositionstart", this.onCompositionStart), document.removeEventListener("compositionend", this.onCompositionEnd))
}, o.startListeningToTouch = function() {
document && document.addEventListener && (document.addEventListener("touchstart", this.onTouchStart, !1), document.addEventListener("touchmove", this.onTouchMove, !1), document.addEventListener("touchend", this.onTouchEnd, !1))
}, o.stopListeningToTouch = function() {
document && document.removeEventListener && (document.removeEventListener("touchstart", this.onTouchStart), document.removeEventListener("touchmove", this.onTouchMove), document.removeEventListener("touchend", this.onTouchEnd))
}, o.constructAriaLiveMessage = function() {
var e = this.state,
t = e.ariaLiveContext,
n = e.selectValue,
r = e.focusedValue,
o = e.focusedOption,
i = this.props,
s = i.options,
a = i.menuIsOpen,
u = i.inputValue,
c = i.screenReaderStatus;
return (r ? function(e) {
var t = e.focusedValue,
n = e.getOptionLabel,
r = e.selectValue;
return "value " + n(t) + " focused, " + (r.indexOf(t) + 1) + " of " + r.length + "."
}({
focusedValue: r,
getOptionLabel: this.getOptionLabel,
selectValue: n
}) : "") + " " + (o && a ? function(e) {
var t = e.focusedOption,
n = e.getOptionLabel,
r = e.options;
return "option " + n(t) + " focused" + (t.isDisabled ? " disabled" : "") + ", " + (r.indexOf(t) + 1) + " of " + r.length + "."
}({
focusedOption: o,
getOptionLabel: this.getOptionLabel,
options: s
}) : "") + " " + function(e) {
var t = e.inputValue;
return e.screenReaderMessage + (t ? " for search term " + t : "") + "."
}({
inputValue: u,
screenReaderMessage: c({
count: this.countOptions()
})
}) + " " + t
}, o.renderInput = function() {
var e = this.props,
t = e.isDisabled,
n = e.isSearchable,
r = e.inputId,
o = e.inputValue,
i = e.tabIndex,
s = this.components.Input,
a = this.state.inputIsHidden,
u = r || this.getElementId("input"),
c = {
"aria-autocomplete": "list",
"aria-label": this.props["aria-label"],
"aria-labelledby": this.props["aria-labelledby"]
};
if (!n) return Ce.a.createElement(bn, Nn({
id: u,
innerRef: this.getInputRef,
onBlur: this.onInputBlur,
onChange: ct,
onFocus: this.onInputFocus,
readOnly: !0,
disabled: t,
tabIndex: i,
value: ""
}, c));
var l = this.commonProps,
p = l.cx,
d = l.theme,
f = l.selectProps;
return Ce.a.createElement(s, Nn({
autoCapitalize: "none",
autoComplete: "off",
autoCorrect: "off",
cx: p,
getStyles: this.getStyles,
id: u,
innerRef: this.getInputRef,
isDisabled: t,
isHidden: a,
onBlur: this.onInputBlur,
onChange: this.handleInputChange,
onFocus: this.onInputFocus,
selectProps: f,
spellCheck: "false",
tabIndex: i,
theme: d,
type: "text",
value: o
}, c))
}, o.renderPlaceholderOrValue = function() {
var e = this,
t = this.components,
n = t.MultiValue,
r = t.MultiValueContainer,
o = t.MultiValueLabel,
i = t.MultiValueRemove,
s = t.SingleValue,
a = t.Placeholder,
u = this.commonProps,
c = this.props,
l = c.controlShouldRenderValue,
p = c.isDisabled,
d = c.isMulti,
f = c.inputValue,
h = c.placeholder,
m = this.state,
g = m.selectValue,
v = m.focusedValue,
b = m.isFocused;
if (!this.hasValue() || !l) return f ? null : Ce.a.createElement(a, Nn({}, u, {
key: "placeholder",
isDisabled: p,
isFocused: b
}), h);
if (d) return g.map((function(t, s) {
var a = t === v;
return Ce.a.createElement(n, Nn({}, u, {
components: {
Container: r,
Label: o,
Remove: i
},
isFocused: a,
isDisabled: p,
key: e.getOptionValue(t),
index: s,
removeProps: {
onClick: function() {
return e.removeValue(t)
},
onTouchEnd: function() {
return e.removeValue(t)
},
onMouseDown: function(e) {
e.preventDefault(), e.stopPropagation()
}
},
data: t
}), e.formatOptionLabel(t, "value"))
}));
if (f) return null;
var y = g[0];
return Ce.a.createElement(s, Nn({}, u, {
data: y,
isDisabled: p
}), this.formatOptionLabel(y, "value"))
}, o.renderClearIndicator = function() {
var e = this.components.ClearIndicator,
t = this.commonProps,
n = this.props,
r = n.isDisabled,
o = n.isLoading,
i = this.state.isFocused;
if (!this.isClearable() || !e || r || !this.hasValue() || o) return null;
var s = {
onMouseDown: this.onClearIndicatorMouseDown,
onTouchEnd: this.onClearIndicatorTouchEnd,
"aria-hidden": "true"
};
return Ce.a.createElement(e, Nn({}, t, {
innerProps: s,
isFocused: i
}))
}, o.renderLoadingIndicator = function() {
var e = this.components.LoadingIndicator,
t = this.commonProps,
n = this.props,
r = n.isDisabled,
o = n.isLoading,
i = this.state.isFocused;
if (!e || !o) return null;
return Ce.a.createElement(e, Nn({}, t, {
innerProps: {
"aria-hidden": "true"
},
isDisabled: r,
isFocused: i
}))
}, o.renderIndicatorSeparator = function() {
var e = this.components,
t = e.DropdownIndicator,
n = e.IndicatorSeparator;
if (!t || !n) return null;
var r = this.commonProps,
o = this.props.isDisabled,
i = this.state.isFocused;
return Ce.a.createElement(n, Nn({}, r, {
isDisabled: o,
isFocused: i
}))
}, o.renderDropdownIndicator = function() {
var e = this.components.DropdownIndicator;
if (!e) return null;
var t = this.commonProps,
n = this.props.isDisabled,
r = this.state.isFocused,
o = {
onMouseDown: this.onDropdownIndicatorMouseDown,
onTouchEnd: this.onDropdownIndicatorTouchEnd,
"aria-hidden": "true"
};
return Ce.a.createElement(e, Nn({}, t, {
innerProps: o,
isDisabled: n,
isFocused: r
}))
}, o.renderMenu = function() {
var e = this,
t = this.components,
n = t.Group,
r = t.GroupHeading,
o = t.Menu,
i = t.MenuList,
s = t.MenuPortal,
a = t.LoadingMessage,
u = t.NoOptionsMessage,
c = t.Option,
l = this.commonProps,
p = this.state,
d = p.focusedOption,
f = p.menuOptions,
h = this.props,
m = h.captureMenuScroll,
g = h.inputValue,
v = h.isLoading,
b = h.loadingMessage,
y = h.minMenuHeight,
E = h.maxMenuHeight,
O = h.menuIsOpen,
C = h.menuPlacement,
w = h.menuPosition,
A = h.menuPortalTarget,
S = h.menuShouldBlockScroll,
F = h.menuShouldScrollIntoView,
x = h.noOptionsMessage,
D = h.onMenuScrollToTop,
j = h.onMenuScrollToBottom;
if (!O) return null;
var _, L = function(t) {
var n = d === t.data;
return t.innerRef = n ? e.getFocusedOptionRef : void 0, Ce.a.createElement(c, Nn({}, l, t, {
isFocused: n
}), e.formatOptionLabel(t.data, "menu"))
};
if (this.hasOptions()) _ = f.render.map((function(t) {
if ("group" === t.type) {
t.type;
var o = function(e, t) {
if (null == e) return {};
var n, r, o = {},
i = Object.keys(e);
for (r = 0; r < i.length; r++) n = i[r], t.indexOf(n) >= 0 || (o[n] = e[n]);
return o
}(t, ["type"]),
i = t.key + "-heading";
return Ce.a.createElement(n, Nn({}, l, o, {
Heading: r,
headingProps: {
id: i
},
label: e.formatGroupLabel(t.data)
}), t.options.map((function(e) {
return L(e)
})))
}
if ("option" === t.type) return L(t)
}));
else if (v) {
var I = b({
inputValue: g
});
if (null === I) return null;
_ = Ce.a.createElement(a, l, I)
} else {
var M = x({
inputValue: g
});
if (null === M) return null;
_ = Ce.a.createElement(u, l, M)
}
var T = {
minMenuHeight: y,
maxMenuHeight: E,
menuPlacement: C,
menuPosition: w,
menuShouldScrollIntoView: F
},
k = Ce.a.createElement(At, Nn({}, l, T), (function(t) {
var n = t.ref,
r = t.placerProps,
s = r.placement,
a = r.maxHeight;
return Ce.a.createElement(o, Nn({}, l, T, {
innerRef: n,
innerProps: {
onMouseDown: e.onMenuMouseDown,
onMouseMove: e.onMenuMouseMove
},
isLoading: v,
placement: s
}), Ce.a.createElement(In, {
isEnabled: m,
onTopArrive: D,
onBottomArrive: j
}, Ce.a.createElement(_n, {
isEnabled: S
}, Ce.a.createElement(i, Nn({}, l, {
innerRef: e.getMenuListRef,
isLoading: v,
maxHeight: a
}), _))))
}));
return A || "fixed" === w ? Ce.a.createElement(s, Nn({}, l, {
appendTo: A,
controlElement: this.controlRef,
menuPlacement: C,
menuPosition: w
}), k) : k
}, o.renderFormField = function() {
var e = this,
t = this.props,
n = t.delimiter,
r = t.isDisabled,
o = t.isMulti,
i = t.name,
s = this.state.selectValue;
if (i && !r) {
if (o) {
if (n) {
var a = s.map((function(t) {
return e.getOptionValue(t)
})).join(n);
return Ce.a.createElement("input", {
name: i,
type: "hidden",
value: a
})
}
var u = s.length > 0 ? s.map((function(t, n) {
return Ce.a.createElement("input", {
key: "i-" + n,
name: i,
type: "hidden",
value: e.getOptionValue(t)
})
})) : Ce.a.createElement("input", {
name: i,
type: "hidden"
});
return Ce.a.createElement("div", null, u)
}
var c = s[0] ? this.getOptionValue(s[0]) : "";
return Ce.a.createElement("input", {
name: i,
type: "hidden",
value: c
})
}
}, o.renderLiveRegion = function() {
return this.state.isFocused ? Ce.a.createElement(gn, {
"aria-live": "polite"
}, Ce.a.createElement("p", {
id: "aria-selection-event"
}, " ", this.state.ariaLiveSelection), Ce.a.createElement("p", {
id: "aria-context"
}, " ", this.constructAriaLiveMessage())) : null
}, o.render = function() {
var e = this.components,
t = e.Control,
n = e.IndicatorsContainer,
r = e.SelectContainer,
o = e.ValueContainer,
i = this.props,
s = i.className,
a = i.id,
u = i.isDisabled,
c = i.menuIsOpen,
l = this.state.isFocused,
p = this.commonProps = this.getCommonProps();
return Ce.a.createElement(r, Nn({}, p, {
className: s,
innerProps: {
id: a,
onKeyDown: this.onKeyDown
},
isDisabled: u,
isFocused: l
}), this.renderLiveRegion(), Ce.a.createElement(t, Nn({}, p, {
innerRef: this.getControlRef,
innerProps: {
onMouseDown: this.onControlMouseDown,
onTouchEnd: this.onControlTouchEnd
},
isDisabled: u,
isFocused: l,
menuIsOpen: c
}), Ce.a.createElement(o, Nn({}, p, {
isDisabled: u
}), this.renderPlaceholderOrValue(), this.renderInput()), Ce.a.createElement(n, Nn({}, p, {
isDisabled: u
}), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField())
}, r
}(Oe.Component);
function zn() {
return (zn = Object.assign || function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
}
return e
}).apply(this, arguments)
}
qn.defaultProps = Hn;
var Wn = {
defaultInputValue: "",
defaultMenuIsOpen: !1,
defaultValue: null
};
Oe.Component;
var Gn, Yn, $n, Xn = (Gn = qn, $n = Yn = function(e) {
var t, n;
function r() {
for (var t, n = arguments.length, r = new Array(n), o = 0; o < n; o++) r[o] = arguments[o];
return (t = e.call.apply(e, [this].concat(r)) || this).select = void 0, t.state = {
inputValue: void 0 !== t.props.inputValue ? t.props.inputValue : t.props.defaultInputValue,
menuIsOpen: void 0 !== t.props.menuIsOpen ? t.props.menuIsOpen : t.props.defaultMenuIsOpen,
value: void 0 !== t.props.value ? t.props.value : t.props.defaultValue
}, t.onChange = function(e, n) {
t.callProp("onChange", e, n), t.setState({
value: e
})
}, t.onInputChange = function(e, n) {
var r = t.callProp("onInputChange", e, n);
t.setState({
inputValue: void 0 !== r ? r : e
})
}, t.onMenuOpen = function() {
t.callProp("onMenuOpen"), t.setState({
menuIsOpen: !0
})
}, t.onMenuClose = function() {
t.callProp("onMenuClose"), t.setState({
menuIsOpen: !1
})
}, t
}
n = e, (t = r).prototype = Object.create(n.prototype), t.prototype.constructor = t, t.__proto__ = n;
var o = r.prototype;
return o.focus = function() {
this.select.focus()
}, o.blur = function() {
this.select.blur()
}, o.getProp = function(e) {
return void 0 !== this.props[e] ? this.props[e] : this.state[e]
}, o.callProp = function(e) {
if ("function" == typeof this.props[e]) {
for (var t, n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++) r[o - 1] = arguments[o];
return (t = this.props)[e].apply(t, r)
}
}, o.render = function() {
var e = this,
t = this.props,
n = (t.defaultInputValue, t.defaultMenuIsOpen, t.defaultValue, function(e, t) {
if (null == e) return {};
var n, r, o = {},
i = Object.keys(e);
for (r = 0; r < i.length; r++) n = i[r], t.indexOf(n) >= 0 || (o[n] = e[n]);
return o
}(t, ["defaultInputValue", "defaultMenuIsOpen", "defaultValue"]));
return Ce.a.createElement(Gn, zn({}, n, {
ref: function(t) {
e.select = t
},
inputValue: this.getProp("inputValue"),
menuIsOpen: this.getProp("menuIsOpen"),
onChange: this.onChange,
onInputChange: this.onInputChange,
onMenuClose: this.onMenuClose,
onMenuOpen: this.onMenuOpen,
value: this.getProp("value")
}))
}, r
}(Oe.Component), Yn.defaultProps = Wn, $n),
Jn = (n(32), function(e) {
return e
}),
Kn = function(e) {
var t = e.options,
n = e.defaultValue,
r = e.className,
o = e.setAttributes,
i = e.isSelected,
a = e.attributes,
u = e.attributeName,
c = null == e.isMulti || e.isMulti,
p = null != e.closeMenuOnSelect ? e.closeMenuOnSelect : !c,
d = c ? a[u] : null != a[u] ? [a[u]] : [],
f = e.getLabelForNotFoundValueCallback || Jn,
m = (t || []).length ? null != t[0].options ? t.map((function(e) {
return e.options
})).flat() : t : [],
g = {};
d.forEach((function(e) {
var t = m.filter((function(t) {
return t.value == e
})).shift();
g[e] = t ? t.label : f(e)
}));
var v = c ? "multi" : "single";
return Object(l.createElement)(l.Fragment, null, i && Object(l.createElement)(Xn, {
defaultValue: n,
options: t,
isMulti: c,
closeMenuOnSelect: p,
onChange: function(e) {
return o(h()({}, u, c ? (e || []).map((function(e) {
return e.value
})) : e.value))
}
}), !i && !!d.length && Object(l.createElement)("div", {
className: "".concat(r, "__label-group ").concat("graphql-api-select-card", "__label-group ").concat(v)
}, d.map((function(e) {
return Object(l.createElement)("div", {
className: "".concat(r, "__label-item ").concat("graphql-api-select-card", "__label-item ").concat(v, " ")
}, g[e])
}))), !i && !d.length && Object(l.createElement)("em", null, Object(s.__)("(not set)", "graphql-api")))
},
Qn = (Object(a.compose)([fe(), de()])(Kn), n(14), function(e) {
return Object(s.sprintf)(Object(s.__)("(Undefined or unpublished item with ID %s)", "graphql-api"), e)
}),
Zn = Object(d.withSelect)((function(e, t) {
var n = t.items,
r = t.selectedItems,
o = n.map((function(e) {
return e.value
})),
i = r.filter((function(e) {
return !o.includes(e)
}));
return {
items: n.concat(i.map((function(e) {
return {
group: Object(s.__)("Undefined elements", "graphql-api"),
title: Qn(e),
value: e
}
})))
}
})),
er = Object(a.compose)([Object(a.withState)({
attributeName: "accessControlLists"
}), Object(d.withSelect)((function(e) {
var t = e("graphql-api/components"),
n = t.getAccessControlLists,
r = t.hasRetrievedAccessControlLists,
o = t.getRetrievingAccessControlListsErrorMessage;
return {
items: n().map((function(e) {
return {
group: Object(s.__)("Access Control Lists", "graphql-api"),
title: e.title,
value: e.id,
help: e.excerpt
}
})),
hasRetrievedItems: r(),
errorMessage: o()
}
})), Zn])(he),
tr = function(e) {
var t = e.items,
n = e.selectedItems,
r = e.emptyLabel,
o = null != r ? r : me,
i = {};
return t.forEach((function(e) {
i[e.id] = e.title
})), Object(l.createElement)(l.Fragment, null, !!n.length && Object(l.createElement)("ul", {
class: "checkbox-list"
}, n.map((function(e) {
return Object(l.createElement)("li", {
key: e
}, Object(l.createElement)(p.CheckboxControl, {
label: i[e] || Qn(e),
checked: !0,
disabled: !0
}))
}))), !n.length && o)
},
nr = Object(a.compose)([fe(), de()])(tr),
rr = function(e) {
return e.selectedItems.length ? Object(l.createElement)(nr, e) : Object(l.createElement)(tr, e)
},
or = Object(a.compose)([Object(d.withSelect)((function(e) {
var t = e("graphql-api/components"),
n = t.getAccessControlLists,
r = t.hasRetrievedAccessControlLists,
o = t.getRetrievingAccessControlListsErrorMessage;
return {
items: n(),
hasRetrievedItems: r(),
errorMessage: o()
}
}))])(rr),
ir = function() {
return Object(a.createHigherOrderComponent)((function(e) {
return function(t) {
var n = t.header;
return Object(l.createElement)(p.Card, t, Object(l.createElement)(p.CardHeader, {
isShady: !0
}, n), Object(l.createElement)(p.CardBody, null, Object(l.createElement)(e, t)))
}
}), "withCard")
},
sr = function() {
return Object(a.createHigherOrderComponent)((function(e) {
return function(t) {
var n = t.className,
r = t.isSelected,
o = "".concat(n, " ").concat(Ee(r));
return Object(l.createElement)("div", {
className: o
}, Object(l.createElement)(e, t))
}
}), "withEditableOnFocus")
},
ar = (Object(a.compose)([Object(a.withState)({
header: Object(s.__)("Access Control Lists", "graphql-api"),
className: "graphql-api-access-control-list-select"
}), sr(), ir()])((function(e) {
var t = e.isSelected,
n = e.className,
r = e.attributes.accessControlLists;
return Object(l.createElement)(l.Fragment, null, t && Object(l.createElement)(er, oe()({}, e, {
selectedItems: r,
className: n
})), !t && Object(l.createElement)(or, oe()({}, e, {
selectedItems: r,
className: n
})))
})), Object(a.compose)([Object(a.withState)({
attributeName: "cacheControlLists"
}), Object(d.withSelect)((function(e) {
var t = e("graphql-api/components"),
n = t.getCacheControlLists,
r = t.hasRetrievedCacheControlLists,
o = t.getRetrievingCacheControlListsErrorMessage;
return {
items: n().map((function(e) {
return {
group: Object(s.__)("Cache Control Lists", "graphql-api"),
title: e.title,
value: e.id,
help: e.excerpt
}
})),
hasRetrievedItems: r(),
errorMessage: o()
}
})), Zn])(he)),
ur = Object(a.compose)([Object(d.withSelect)((function(e) {
var t = e("graphql-api/components"),
n = t.getCacheControlLists,
r = t.hasRetrievedCacheControlLists,
o = t.getRetrievingCacheControlListsErrorMessage;
return {
items: n(),
hasRetrievedItems: r(),
errorMessage: o()
}
}))])(rr),
cr = (Object(a.compose)([Object(a.withState)({
header: Object(s.__)("Cache Control Lists", "graphql-api"),
className: "graphql-api-cache-control-list-select"
}), sr(), ir()])((function(e) {
var t = e.className,
n = e.isSelected,
r = e.attributes.cacheControlLists;
return Object(l.createElement)(l.Fragment, null, n && Object(l.createElement)(ar, oe()({}, e, {
selectedItems: r,
className: t
})), !n && Object(l.createElement)(ur, oe()({}, e, {
selectedItems: r,
className: t
})))
})), Object(a.compose)([Object(a.withState)({
attributeName: "fieldDeprecationLists"
}), Object(d.withSelect)((function(e) {
var t = e("graphql-api/components"),
n = t.getFieldDeprecationLists,
r = t.hasRetrievedFieldDeprecationLists,
o = t.getRetrievingFieldDeprecationListsErrorMessage;
return {
items: n().map((function(e) {
return {
group: Object(s.__)("Field Deprecation Lists", "graphql-api"),
title: e.title,
value: e.id,
help: e.excerpt
}
})),
hasRetrievedItems: r(),
errorMessage: o()
}
})), Zn])(he)),
lr = Object(a.compose)([Object(d.withSelect)((function(e) {
var t = e("graphql-api/components"),
n = t.getFieldDeprecationLists,
r = t.hasRetrievedFieldDeprecationLists,
o = t.getRetrievingFieldDeprecationListsErrorMessage;
return {
items: n(),
hasRetrievedItems: r(),
errorMessage: o()
}
}))])(rr),
pr = (Object(a.compose)([Object(a.withState)({
header: Object(s.__)("Field Deprecation Lists", "graphql-api"),
className: "graphql-api-field-deprecation-list-select"
}), sr(), ir()])((function(e) {
var t = e.className,
n = e.isSelected,
r = e.attributes.fieldDeprecationLists;
return Object(l.createElement)(l.Fragment, null, n && Object(l.createElement)(cr, oe()({}, e, {
selectedItems: r,
className: t
})), !n && Object(l.createElement)(lr, oe()({}, e, {
selectedItems: r,
className: t
})))
})), n(10), function(e) {
var t = e.className,
n = e.isSelected,
r = e.setAttributes,
o = e.attributes.value;
null == o && r({
value: "in"
});
var i = [{
label: Object(s.__)("Logged-in users", "graphql-api"),
value: "in"
}, {
label: Object(s.__)("Not logged-in users", "graphql-api"),
value: "out"
}],
a = Ee(n);
return Object(l.createElement)("div", {
className: a
}, Object(l.createElement)(p.Card, e, Object(l.createElement)(p.CardBody, null, n && Object(l.createElement)(p.RadioControl, c()({}, e, {
options: i,
selected: o,
onChange: function(e) {
return r({
value: e
})
}
})), !n && Object(l.createElement)("div", {
className: t + "__read"
}, "in" == o && Object(l.createElement)("span", null, "✅ ", Object(s.__)("Logged-in users", "graphql-api")), "out" == o && Object(l.createElement)("span", null, "❎ ", Object(s.__)("Not logged-in users", "graphql-api"))))))
}),
dr = function() {
return Object(a.createHigherOrderComponent)((function(e) {
return function(t) {
return (0, t.setAttributes)({
accessControlGroup: t.accessControlGroup
}), Object(l.createElement)(e, t)
}
}), "withAccessControlGroup")
},
fr = Object(a.compose)([Object(a.withState)({
accessControlGroup: "state"
}), dr()])(pr);
Object(i.registerBlockType)("graphql-api/access-control-user-state", {
title: Object(s.__)("User state", "graphql-api"),
description: Object(s.__)("Grant access to the selected fields and directives based on the user being logged-in or not", "graphql-api"),
category: "graphql-api-access-control",
icon: "admin-users",
parent: ["graphql-api/access-control"],
attributes: {
accessControlGroup: {
type: "string"
},
value: {
type: "string"
}
},
supports: {
customClassName: !1,
html: !1
},
edit: fr,
save: function() {
return null
}
})
}]), (window.webpackJsonp = window.webpackJsonp || []).push([
[1], {
26: function(e, t, n) {},
30: function(e, t, n) {},
31: function(e, t, n) {},
32: function(e, t, n) {}
}
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment