Skip to content

Instantly share code, notes, and snippets.

@cogniflow-admin
Last active November 2, 2022 16:05
Show Gist options
  • Save cogniflow-admin/c4915b496f28369a9541005e865cea3f to your computer and use it in GitHub Desktop.
Save cogniflow-admin/c4915b496f28369a9541005e865cea3f to your computer and use it in GitHub Desktop.
name: walmart-excel-addin
description: Walmart AI addin for Excel
host: EXCEL
api_set: {}
script:
content: >
var e, t, n, s, i, o = {}, r = [], l =
/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;
function a(e, t) { for (var n in t) e[n] = t[n]; return e } function c(e) {
var t = e.parentNode; t && t.removeChild(e) } function d(t, n, s) { var i,
o, r, l = {}; for (r in n) "key" == r ? i = n[r] : "ref" == r ? o = n[r] :
l[r] = n[r]; if (arguments.length > 2 && (l.children = arguments.length > 3
? e.call(arguments, 2) : s), "function" == typeof t && null !=
t.defaultProps) for (r in t.defaultProps) void 0 === l[r] && (l[r] =
t.defaultProps[r]); return u(t, l, i, o, null) } function u(e, s, i, o, r) {
var l = { type: e, props: s, key: i, ref: o, __k: null, __: null, __b: 0,
__e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: null
== r ? ++n : r }; return null == r && null != t.vnode && t.vnode(l), l }
function p(e) { return e.children } function _(e, t) { this.props = e,
this.context = t } function h(e, t) { if (null == t) return e.__ ? h(e.__,
e.__.__k.indexOf(e) + 1) : null; for (var n; t < e.__k.length; t++)if (null
!= (n = e.__k[t]) && null != n.__e) return n.__e; return "function" ==
typeof e.type ? h(e) : null } function g(e) { var t, n; if (null != (e =
e.__) && null != e.__c) { for (e.__e = e.__c.base = null, t = 0; t <
e.__k.length; t++)if (null != (n = e.__k[t]) && null != n.__e) { e.__e =
e.__c.base = n.__e; break } return g(e) } } function v(e) { (!e.__d &&
(e.__d = !0) && s.push(e) && !m.__r++ || i !== t.debounceRendering) && ((i =
t.debounceRendering) || setTimeout)(m) } function m() { for (var e; m.__r =
s.length;)e = s.sort((function (e, t) { return e.__v.__b - t.__v.__b })), s
= [], e.some((function (e) { var t, n, s, i, o, r; e.__d && (o = (i = (t =
e).__v).__e, (r = t.__P) && (n = [], (s = a({}, i)).__v = i.__v + 1, $(r, i,
s, t.__n, void 0 !== r.ownerSVGElement, null != i.__h ? [o] : null, n, null
== o ? h(i) : o, i.__h), C(n, i), i.__e != o && g(i))) })) } function f(e,
t, n, s, i, l, a, c, d, _) { var g, v, m, f, b, w, k, T = s && s.__k || r, C
= T.length; for (n.__k = [], g = 0; g < t.length; g++)if (null != (f =
n.__k[g] = null == (f = t[g]) || "boolean" == typeof f ? null : "string" ==
typeof f || "number" == typeof f || "bigint" == typeof f ? u(null, f, null,
null, f) : Array.isArray(f) ? u(p, { children: f }, null, null, null) :
f.__b > 0 ? u(f.type, f.props, f.key, f.ref ? f.ref : null, f.__v) : f)) {
if (f.__ = n, f.__b = n.__b + 1, null === (m = T[g]) || m && f.key == m.key
&& f.type === m.type) T[g] = void 0; else for (v = 0; v < C; v++) { if ((m =
T[v]) && f.key == m.key && f.type === m.type) { T[v] = void 0; break } m =
null } $(e, f, m = m || o, i, l, a, c, d, _), b = f.__e, (v = f.ref) &&
m.ref != v && (k || (k = []), m.ref && k.push(m.ref, null, f), k.push(v,
f.__c || b, f)), null != b ? (null == w && (w = b), "function" == typeof
f.type && f.__k === m.__k ? f.__d = d = y(f, d, e) : d = x(e, f, m, T, b,
d), "function" == typeof n.type && (n.__d = d)) : d && m.__e == d &&
d.parentNode != e && (d = h(m)) } for (n.__e = w, g = C; g--;)null != T[g]
&& ("function" == typeof n.type && null != T[g].__e && T[g].__e == n.__d &&
(n.__d = h(s, g + 1)), P(T[g], T[g])); if (k) for (g = 0; g < k.length;
g++)E(k[g], k[++g], k[++g]) } function y(e, t, n) { for (var s, i = e.__k, o
= 0; i && o < i.length; o++)(s = i[o]) && (s.__ = e, t = "function" ==
typeof s.type ? y(s, t, n) : x(n, s, s, i, s.__e, t)); return t } function
x(e, t, n, s, i, o) { var r, l, a; if (void 0 !== t.__d) r = t.__d, t.__d =
void 0; else if (null == n || i != o || null == i.parentNode) e: if (null ==
o || o.parentNode !== e) e.appendChild(i), r = null; else { for (l = o, a =
0; (l = l.nextSibling) && a < s.length; a += 2)if (l == i) break e;
e.insertBefore(i, o), r = o } return void 0 !== r ? r : i.nextSibling }
function b(e, t, n) { "-" === t[0] ? e.setProperty(t, n) : e[t] = null == n
? "" : "number" != typeof n || l.test(t) ? n : n + "px" } function w(e, t,
n, s, i) { var o; e: if ("style" === t) if ("string" == typeof n)
e.style.cssText = n; else { if ("string" == typeof s && (e.style.cssText = s
= ""), s) for (t in s) n && t in n || b(e.style, t, ""); if (n) for (t in n)
s && n[t] === s[t] || b(e.style, t, n[t]) } else if ("o" === t[0] && "n" ===
t[1]) o = t !== (t = t.replace(/Capture$/, "")), t = t.toLowerCase() in e ?
t.toLowerCase().slice(2) : t.slice(2), e.l || (e.l = {}), e.l[t + o] = n, n
? s || e.addEventListener(t, o ? T : k, o) : e.removeEventListener(t, o ? T
: k, o); else if ("dangerouslySetInnerHTML" !== t) { if (i) t =
t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s"); else if ("href" !== t
&& "list" !== t && "form" !== t && "tabIndex" !== t && "download" !== t && t
in e) try { e[t] = null == n ? "" : n; break e } catch (e) { } "function" ==
typeof n || (null != n && (!1 !== n || "a" === t[0] && "r" === t[1]) ?
e.setAttribute(t, n) : e.removeAttribute(t)) } } function k(e) {
this.l[e.type + !1](t.event ? t.event(e) : e) } function T(e) {
this.l[e.type + !0](t.event ? t.event(e) : e) } function $(n, s, i, r, l, d,
u, g, v) { var m, y, x, b, k, T, $, C, E, P, M, S, B, A = s.type; if (void 0
!== s.constructor) return null; null != i.__h && (v = i.__h, g = s.__e =
i.__e, s.__h = null, d = [g]), (m = t.__b) && m(s); try { e: if ("function"
== typeof A) { if (C = s.props, E = (m = A.contextType) && r[m.__c], P = m ?
E ? E.props.value : m.__ : r, i.__c ? $ = (y = s.__c = i.__c).__ = y.__E :
("prototype" in A && A.prototype.render ? s.__c = y = new A(C, P) : (s.__c =
y = new _(C, P), y.constructor = A, y.render = I), E && E.sub(y), y.props =
C, y.state || (y.state = {}), y.context = P, y.__n = r, x = y.__d = !0,
y.__h = []), null == y.__s && (y.__s = y.state), null !=
A.getDerivedStateFromProps && (y.__s == y.state && (y.__s = a({}, y.__s)),
a(y.__s, A.getDerivedStateFromProps(C, y.__s))), b = y.props, k = y.state,
x) null == A.getDerivedStateFromProps && null != y.componentWillMount &&
y.componentWillMount(), null != y.componentDidMount &&
y.__h.push(y.componentDidMount); else { if (null ==
A.getDerivedStateFromProps && C !== b && null != y.componentWillReceiveProps
&& y.componentWillReceiveProps(C, P), !y.__e && null !=
y.shouldComponentUpdate && !1 === y.shouldComponentUpdate(C, y.__s, P) ||
s.__v === i.__v) { y.props = C, y.state = y.__s, s.__v !== i.__v && (y.__d =
!1), y.__v = s, s.__e = i.__e, s.__k = i.__k, s.__k.forEach((function (e) {
e && (e.__ = s) })), y.__h.length && u.push(y); break e } null !=
y.componentWillUpdate && y.componentWillUpdate(C, y.__s, P), null !=
y.componentDidUpdate && y.__h.push((function () { y.componentDidUpdate(b, k,
T) })) } if (y.context = P, y.props = C, y.__v = s, y.__P = n, M = t.__r, S
= 0, "prototype" in A && A.prototype.render) y.state = y.__s, y.__d = !1, M
&& M(s), m = y.render(y.props, y.state, y.context); else do { y.__d = !1, M
&& M(s), m = y.render(y.props, y.state, y.context), y.state = y.__s } while
(y.__d && ++S < 25); y.state = y.__s, null != y.getChildContext && (r =
a(a({}, r), y.getChildContext())), x || null == y.getSnapshotBeforeUpdate ||
(T = y.getSnapshotBeforeUpdate(b, k)), B = null != m && m.type === p && null
== m.key ? m.props.children : m, f(n, Array.isArray(B) ? B : [B], s, i, r,
l, d, u, g, v), y.base = s.__e, s.__h = null, y.__h.length && u.push(y), $
&& (y.__E = y.__ = null), y.__e = !1 } else null == d && s.__v === i.__v ?
(s.__k = i.__k, s.__e = i.__e) : s.__e = function (t, n, s, i, r, l, a, d) {
var u, p, _, g = s.props, v = n.props, m = n.type, y = 0; if ("svg" === m &&
(r = !0), null != l) for (; y < l.length; y++)if ((u = l[y]) &&
"setAttribute" in u == !!m && (m ? u.localName === m : 3 === u.nodeType)) {
t = u, l[y] = null; break } if (null == t) { if (null === m) return
document.createTextNode(v); t = r ?
document.createElementNS("http://www.w3.org/2000/svg", m) :
document.createElement(m, v.is && v), l = null, d = !1 } if (null === m) g
=== v || d && t.data === v || (t.data = v); else { if (l = l &&
e.call(t.childNodes), p = (g = s.props || o).dangerouslySetInnerHTML, _ =
v.dangerouslySetInnerHTML, !d) { if (null != l) for (g = {}, y = 0; y <
t.attributes.length; y++)g[t.attributes[y].name] = t.attributes[y].value; (_
|| p) && (_ && (p && _.__html == p.__html || _.__html === t.innerHTML) ||
(t.innerHTML = _ && _.__html || "")) } if (function (e, t, n, s, i) { var o;
for (o in n) "children" === o || "key" === o || o in t || w(e, o, null,
n[o], s); for (o in t) i && "function" != typeof t[o] || "children" === o ||
"key" === o || "value" === o || "checked" === o || n[o] === t[o] || w(e, o,
t[o], n[o], s) }(t, v, g, r, d), _) n.__k = []; else if (y =
n.props.children, f(t, Array.isArray(y) ? y : [y], n, s, i, r &&
"foreignObject" !== m, l, a, l ? l[0] : s.__k && h(s, 0), d), null != l) for
(y = l.length; y--;)null != l[y] && c(l[y]); d || ("value" in v && void 0
!== (y = v.value) && (y !== t.value || "progress" === m && !y || "option"
=== m && y !== g.value) && w(t, "value", y, g.value, !1), "checked" in v &&
void 0 !== (y = v.checked) && y !== t.checked && w(t, "checked", y,
g.checked, !1)) } return t }(i.__e, s, i, r, l, d, u, v); (m = t.diffed) &&
m(s) } catch (e) { s.__v = null, (v || null != d) && (s.__e = g, s.__h =
!!v, d[d.indexOf(g)] = null), t.__e(e, s, i) } } function C(e, n) { t.__c &&
t.__c(n, e), e.some((function (n) { try { e = n.__h, n.__h = [],
e.some((function (e) { e.call(n) })) } catch (e) { t.__e(e, n.__v) } })) }
function E(e, n, s) { try { "function" == typeof e ? e(n) : e.current = n }
catch (e) { t.__e(e, s) } } function P(e, n, s) { var i, o; if (t.unmount &&
t.unmount(e), (i = e.ref) && (i.current && i.current !== e.__e || E(i, null,
n)), null != (i = e.__c)) { if (i.componentWillUnmount) try {
i.componentWillUnmount() } catch (e) { t.__e(e, n) } i.base = i.__P = null,
e.__c = void 0 } if (i = e.__k) for (o = 0; o < i.length; o++)i[o] &&
P(i[o], n, "function" != typeof e.type); s || null == e.__e || c(e.__e),
e.__ = e.__e = e.__d = void 0 } function I(e, t, n) { return
this.constructor(e, n) } function M(n, s, i) { var r, l, a; t.__ && t.__(n,
s), l = (r = "function" == typeof i) ? null : i && i.__k || s.__k, a = [],
$(s, n = (!r && i || s).__k = d(p, null, [n]), l || o, o, void 0 !==
s.ownerSVGElement, !r && i ? [i] : l ? null : s.firstChild ?
e.call(s.childNodes) : null, a, !r && i ? i : l ? l.__e : s.firstChild, r),
C(a, n) } e = r.slice, t = { __e: function (e, t, n, s) { for (var i, o, r;
t = t.__;)if ((i = t.__c) && !i.__) try { if ((o = i.constructor) && null !=
o.getDerivedStateFromError && (i.setState(o.getDerivedStateFromError(e)), r
= i.__d), null != i.componentDidCatch && (i.componentDidCatch(e, s || {}), r
= i.__d), r) return i.__E = i } catch (t) { e = t } throw e } }, n = 0,
_.prototype.setState = function (e, t) { var n; n = null != this.__s &&
this.__s !== this.state ? this.__s : this.__s = a({}, this.state),
"function" == typeof e && (e = e(a({}, n), this.props)), e && a(n, e), null
!= e && this.__v && (t && this.__h.push(t), v(this)) },
_.prototype.forceUpdate = function (e) { this.__v && (this.__e = !0, e &&
this.__h.push(e), v(this)) }, _.prototype.render = p, s = [], m.__r = 0; var
S = function (e, t, n, s) { var i; t[0] = 0; for (var o = 1; o < t.length;
o++) { var r = t[o++], l = t[o] ? (t[0] |= r ? 1 : 2, n[t[o++]]) : t[++o]; 3
=== r ? s[0] = l : 4 === r ? s[1] = Object.assign(s[1] || {}, l) : 5 === r ?
(s[1] = s[1] || {})[t[++o]] = l : 6 === r ? s[1][t[++o]] += l + "" : r ? (i
= e.apply(l, S(e, l, n, ["", null])), s.push(i), l[0] ? t[0] |= 2 : (t[o -
2] = 0, t[o] = i)) : s.push(l) } return s }, B = new Map; function A(e) {
var t = B.get(this); return t || (t = new Map, B.set(this, t)), (t = S(this,
t.get(e) || (t.set(e, t = function (e) { for (var t, n, s = 1, i = "", o =
"", r = [0], l = function (e) { 1 === s && (e || (i =
i.replace(/^\s*\n\s*|\s*\n\s*$/g, ""))) ? r.push(0, e, i) : 3 === s && (e ||
i) ? (r.push(3, e, i), s = 2) : 2 === s && "..." === i && e ? r.push(4, e,
0) : 2 === s && i && !e ? r.push(5, 0, !0, i) : s >= 5 && ((i || !e && 5 ===
s) && (r.push(s, 0, i, n), s = 6), e && (r.push(s, e, 0, n), s = 6)), i = ""
}, a = 0; a < e.length; a++) { a && (1 === s && l(), l(a)); for (var c = 0;
c < e[a].length; c++)t = e[a][c], 1 === s ? "<" === t ? (l(), r = [r], s =
3) : i += t : 4 === s ? "--" === i && ">" === t ? (s = 1, i = "") : i = t +
i[0] : o ? t === o ? o = "" : i += t : '"' === t || "'" === t ? o = t : ">"
=== t ? (l(), s = 1) : s && ("=" === t ? (s = 5, n = i, i = "") : "/" === t
&& (s < 5 || ">" === e[a][c + 1]) ? (l(), 3 === s && (r = r[0]), s = r, (r =
r[0]).push(2, 0, s), s = 0) : " " === t || "\t" === t || "\n" === t || "\r"
=== t ? (l(), s = 2) : i += t), 3 === s && "!--" === i && (s = 4, r = r[0])
} return l(), r }(e)), t), arguments, [])).length > 1 ? t : t[0] } const R =
{ 0: "Text", 1: "Image", 2: "Audio" }, L = [0, 1, 100, 200, 201], H = { 0:
"Text classification", 1: "Text Translation", 2: "Entities recognition", 3:
"Question and answer", 100: "Image classification", 200: "Audio
classification", 201: "Audio speech to text" }, D = { 0: "text", 1: "image",
2: "audio" }, N = { 0: "classification/predict", 1: "translation/translate",
2: "information-extraction/extract-entities", 3: "question-answering/ask",
100: "classification/predict-from-web", 200:
"classification/predict-from-web", 201: "classification/predict-from-web" };
var V = { select: null }; const z = { login: { pageId: "page-login",
goToSecretTokenAuth: "login-go-to-secret", gotToNormalAuth:
"login-go-to-normal-auth", subPages: { defaultSubpage: "login-default-form",
secretToken: "login-use-secret-token" }, emailInput: "login-email-field",
passwordInput: "login-password-field", loginButton: "default-login-button",
invalidCredentials: "login-invalid-creds" }, experiments: { pageId:
"page-experiments", experimentCardsClassName: "experiment-card",
cardsContainer: "experiment-cards-container", visibilityDropdown:
"experiments-visibility-dropdown", typeDropdown:
"experiments-type-dropdown", logoutBtn: "logout" }, run: { pageId:
"pages-run-model", goBack: "pages-run-model-go-back", confidenceDd:
"run-show-confidence-checkbox", includeHeadersContainer:
"run-include-headers-container", hasHeadersCb: "run-show-has-headers",
insertDd: "run-insert-dropdown", modelDd: "run-model-dropdown", cellsRange:
"run-cells-range", expValue: "experiment-value", confidenceValue:
"confidence-value", hasHeadersValue: "has-headers-value", modelValue:
"model-value", resultPlaceValue: "result-place-value", runProgressContainer:
"run-progress-container", runProcessed: "run-processed", runTotalCells:
"run-total-cells", runPercentage: "run-percentage", runStop: "run-stop",
runExperiment: "run-experiment", runEditWarning: "run-edit-warning" } }, U =
{ text: '<svg width="32" height="32" viewBox="0 0 32 32"
style="display:flex;align-items:center;background-color:#eceffa;border-radius:8px;"><g
fill="none" fill-rule="evenodd"><path fill="#a4a9c8" d="M24 21h-6c-.265
0-.52.107-.707.294l-.293.293V11.415L18.414 10H24v11zm-10 0H8V10h5.586L15
11.416v10.172l-.293-.293C14.52 21.106 14.265 21 14 21zM25 8h-7c-.265
0-.52.107-.707.293L16
9.586l-1.293-1.293c-.187-.186-.442-.292-.707-.292H7c-.552 0-1 .447-1 1v13c0
.551.448 1 1 1h6.586l1.707 1.706c.195.195.451.293.707.293.256 0
.512-.098.707-.293L18.414 23H25c.552 0 1-.448
1-1V9c0-.552-.448-1-1-1z"></path></g></svg>', image: '<svg width="32"
height="33" viewBox="0 0 32 33"
style="display:flex;align-items:center;background-color:#eceffa;border-radius:8px;"><g
fill="#A4A9C8" fill-rule="evenodd"><path d="M2 18v-1.52l3.93-3.14 2.36
2.37c.366.367.953.394 1.35.06l5.3-4.42L18 14.41V18H2zM18
2v9.59l-2.29-2.3c-.366-.367-.952-.393-1.35-.06l-5.3
4.42-2.35-2.36c-.361-.358-.933-.388-1.33-.07L2 13.92V2h16zm1-2H1C.448 0 0
.448 0 1v18c0 .553.448 1 1 1h18c.553 0 1-.447 1-1V1c0-.552-.447-1-1-1z"
transform="translate(6 7)"></path><path d="M9 6c.552 0 1 .448 1 1s-.448 1-1
1-1-.448-1-1 .448-1 1-1m0 4c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3
1.343 3 3 3" transform="translate(6 7)"></path></g></svg>', audio: '<svg
xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24
24"
style="display:flex;align-items:center;border-radius:8px;background-color:#eceffa;fill:
#A4A9C8;transform: ;msFilter:;"><path d="M8 12c2.28 0 4-1.72
4-4s-1.72-4-4-4-4 1.72-4 4 1.72 4 4 4zm0-6c1.178 0 2 .822 2 2s-.822 2-2
2-2-.822-2-2 .822-2 2-2zm1 7H7c-2.757 0-5 2.243-5 5v1h2v-1c0-1.654 1.346-3
3-3h2c1.654 0 3 1.346 3 3v1h2v-1c0-2.757-2.243-5-5-5zm9.364-10.364L16.95
4.05C18.271 5.373 19 7.131 19 9s-.729 3.627-2.05 4.95l1.414 1.414C20.064
13.663 21 11.403 21 9s-.936-4.663-2.636-6.364z"></path><path d="M15.535
5.464 14.121 6.88C14.688 7.445 15 8.198 15 9s-.312 1.555-.879 2.12l1.414
1.416C16.479 11.592 17 10.337 17 9s-.521-2.592-1.465-3.536z"></path></svg>'
}, F = ({ id: e, title: t, type: n, task: s, created_at: i, logo: o, ...r })
=> `\n <div class="experiment-card" id="${e}">\n\n <div
class="exp-card-header">\n <div class="exp-card-bg-img"></div>\n
<div class="exp-card-header-logos">\n <div
class="exp-card-logo-wrapper">\n <img src="${o ?
`https://s3.us-east-2.amazonaws.com/static-cogniflow-prod/${o}` :
"https://app.cogniflow.ai/static/media/img-placeholder.3c18e621361480e8272e676738157c04.svg"}"
class="exp-card-logo" alt="card logo">\n </div>\n <div
class="exp-card-logo-type-wrapper">\n ${U[D[n]]}\n
</div>\n\n </div>\n </div>\n \n <div
class="exp-card-content">\n\n <div class="exp-card-title">\n <p
title="${t}">${t}</p>\n </div>\n <div
class="exp-card-body">\n <p>${R[n]}/${H[s]}</p>\n </div>\n
<div class="exp-card-time">\n <p>\n Created: <span
class="exp-card-time-label">${(e => { const t = new Date(e), n =
t.getDate(), s = t.getMonth() + 1, i = t.getFullYear(); return s < 10 ?
`${n}/0${s}/${i}` : `${n}/${s}/${i}` })(i)}</span>\n </p>\n
</div>\n\n </div>\n </div>\n `, W = ({ id: e, name: t, recommended: n
}) => `\n <option value="${t}" id={${e}}>${t} ${n ? "✓" : ""}</option>\n
`, q = (e, t, n, s) => { const i = s.getById(n); let o = ""; for (const n of
e) o += t(n); i.innerHTML = o }, j = (e, t, n) => { const s = n.getById(t);
let i = ""; for (const t of e) i += W(t); s.innerHTML = i }, O = {
insertRight: e => e.getColumnsAfter(1), replaceRight: e =>
e.getColumnsAfter(1) }, Q = e => { const [t, n] = e.split(":"); return t ===
n || 1 === t.length }, G = e => e.split("")[0], Y = e => { const [t] =
e.split(":"), [n, ...s] = t.split(""), i = s.join(""); return parseInt(i) };
function J(e, t, n, s = {}) { return fetch(e, s).catch((function (i) { if
(triesLeft = n - 1, !triesLeft) throw i; return wait(t).then((() => J(e, t,
triesLeft, s))) })) } class K { constructor(e) { this.headers = {
"Content-Type": "application/json" }, this.baseUrl = e }
setTokenInHeaders(e) { this.headers = { Authorization: `Bearer ${e}`,
...this.headers } } req(e) { return (t, n, s, i = "normal") => "normal" ===
i ? fetch(`${this.baseUrl}/${t}`, { method: e, headers: { ...this.headers,
...s ?? {}}, body: n }).then((e => { if (!e.ok) { const t = new Error("HTTP
status code: " + e.status); throw t.response = e, t.status = e.status, t }
return e.json() })).then((e => e)) : J(`${this.baseUrl}/${t}`, 12e4, 200, {
method: e, headers: { ...this.headers, ...s ?? {}}, body: n }).then((e => {
if (!e.ok) { const t = new Error("HTTP status code: " + e.status); throw
t.response = e, t.status = e.status, t } return e.json() })).then((e => e))
} get = this.req("GET"); post = this.req("POST") } A.bind(d); const X =
A.bind(d), Z = () => X`<svg
xmlns="http://www.w3.org/2000/svg"
width="250"
height="100"
viewBox="-384.501 305.5 901.319 214.234"
>
<path
d="M407.22 377.62c5.02 0 9.152-2.61 9.71-5.982l4.956-56.05c0-5.54-6.49-10.088-14.65-10.088-8.152 0-14.636 4.548-14.636 10.089l4.953 56.049c.545 3.371 4.677 5.982 9.684 5.982h-.017M376.927 395.127c2.518-4.342 2.328-9.222-.326-11.39l-46.07-32.317c-4.79-2.774-11.972.565-16.048 7.634-4.09 7.06-3.365 14.945 1.412 17.72l51.013 23.752c3.189 1.182 7.537-1.093 10.035-5.432l-.016.033M437.54 395.097c2.514 4.339 6.84 6.615 10.032 5.432l51.013-23.752c4.807-2.774 5.49-10.66 1.438-17.72-4.096-7.062-11.291-10.408-16.068-7.634l-46.073 32.317c-2.634 2.165-2.83 7.049-.326 11.39l-.016-.033M407.22 447.635c5.02 0 9.152 2.588 9.71 5.963l4.956 56.042c0 5.557-6.49 10.095-14.65 10.095-8.152 0-14.636-4.538-14.636-10.095l4.953-56.042c.545-3.375 4.677-5.963 9.684-5.963h-.017M437.54 430.124c2.514-4.351 6.84-6.607 10.032-5.411l51.013 23.736c4.807 2.777 5.49 10.67 1.438 17.736-4.096 7.039-11.291 10.394-16.068 7.624l-46.073-32.287c-2.634-2.182-2.83-7.069-.326-11.407h-.02M376.927 430.118c2.518 4.335 2.328 9.222-.326 11.408l-46.07 32.286c-4.79 2.77-11.972-.585-16.048-7.624-4.09-7.066-3.365-14.959 1.412-17.736l51.013-23.736c3.189-1.196 7.537 1.06 10.035 5.412h-.016"
fill="#fdbb30"
/>
<path
d="M116.622 441.42c0 1.72-.153 3.494-.624 5.052-1.954 6.471-8.654 11.943-17.036 11.943-6.989 0-12.54-3.97-12.54-12.355 0-12.833 14.125-16.377 30.204-16.288l-.004 11.647zm25.22-22.364c0-21.161-9.042-39.781-39.594-39.781-15.683 0-28.13 4.405-34.924 8.331l4.976 17.012c6.209-3.92 16.105-7.165 25.47-7.165 15.497-.043 18.035 8.776 18.035 14.42v1.336c-33.781-.05-55.135 11.647-55.135 35.475 0 14.56 10.876 28.197 29.782 28.197 11.617 0 21.347-4.637 27.17-12.072h.575s3.853 16.142 25.124 9.966c-1.11-6.713-1.475-13.879-1.475-22.496l-.003-33.223M-384.5 350.457s22.075 90.454 25.6 105.134c4.112 17.135 11.523 23.443 32.88 19.184l13.783-56.078c3.495-13.936 5.834-23.872 8.086-38.034h.392c1.581 14.312 3.824 24.141 6.7 38.08 0 0 5.608 25.46 8.485 38.828 2.88 13.364 10.896 21.792 31.818 17.204l32.844-124.322h-26.51l-11.218 53.753c-3.016 15.64-5.75 27.875-7.86 42.18h-.375c-1.917-14.179-4.358-25.915-7.421-41.157l-11.67-54.776h-27.626l-12.49 53.395c-3.535 16.23-6.85 29.33-8.95 43.159h-.382c-2.156-13.022-5.026-29.493-8.132-45.196 0 0-7.415-38.193-10.023-51.358l-27.931.004M-173.766 441.42c0 1.72-.153 3.494-.631 5.052-1.95 6.471-8.654 11.943-17.036 11.943-6.99 0-12.533-3.97-12.533-12.355 0-12.833 14.121-16.377 30.203-16.288l-.003 11.647zm25.217-22.364c0-21.161-9.042-39.781-39.588-39.781-15.687 0-28.144 4.405-34.934 8.331l4.97 17.012c6.208-3.92 16.104-7.165 25.472-7.165 15.508-.043 18.046 8.776 18.046 14.42v1.336c-33.795-.05-55.139 11.647-55.139 35.475 0 14.56 10.87 28.197 29.762 28.197 11.633 0 21.357-4.637 27.187-12.072h.568s3.864 16.142 25.13 9.966c-1.112-6.713-1.474-13.879-1.474-22.496v-33.223M-106.463 448.385v-97.928h-25.25v124.322h25.25v-26.394M223.853 350.457v91.71c0 12.65 2.385 21.503 7.47 26.921 4.456 4.737 11.777 7.803 20.557 7.803 7.468 0 14.81-1.425 18.275-2.71l-.326-19.726c-2.578.63-5.538 1.14-9.59 1.14-8.604 0-11.481-5.512-11.481-16.863v-35.09h21.988v-23.79h-21.988v-29.395h-24.905M158.679 381.384v93.395h26.047v-47.82c0-2.585.156-4.837.565-6.897 1.927-10.022 9.587-16.42 20.59-16.42 3.016 0 5.175.328 7.514.66v-24.45c-1.963-.391-3.295-.574-5.737-.574-9.72 0-20.779 6.272-25.42 19.726h-.704v-17.62h-22.855M-88.783 381.384v93.395h25.377v-54.767c0-2.57.302-5.288 1.192-7.644 2.103-5.514 7.235-11.972 15.424-11.972 10.245 0 15.029 8.657 15.029 21.151v53.225h25.357v-55.434c0-2.452.335-5.408 1.06-7.57 2.082-6.276 7.61-11.379 15.224-11.379 10.381 0 15.364 8.505 15.364 23.211v51.169h25.374v-55.01c0-29.007-14.73-40.49-31.36-40.49-7.358 0-13.172 1.843-18.43 5.065-4.415 2.72-8.375 6.574-11.83 11.64h-.375c-4.01-10.065-13.445-16.7-25.74-16.7-15.795 0-22.894 8.007-27.2 14.797h-.378v-12.69h-24.088"
fill="#1a75cf"
/>
<path
d="M511.38 470.238h.383c.508 0 .834-.21.834-.522 0-.355-.306-.548-.778-.548-.162 0-.328.033-.438.033v1.046-.01zm-.059 2.518h-1.349v-4.395c.306-.06 1.02-.167 1.934-.167.993 0 1.438.14 1.764.36.275.192.475.52.475.963 0 .451-.415.833-1.027 1v.056c.499.133.771.495.914 1.13.136.634.22.893.305 1.056h-1.528c-.133-.163-.212-.552-.302-.94-.086-.445-.296-.668-.747-.668h-.442l.003 1.605zm.558-5.827c-1.937 0-3.398 1.578-3.398 3.59 0 1.96 1.465 3.559 3.451 3.559 1.994.033 3.459-1.598 3.459-3.591 0-1.984-1.465-3.558-3.482-3.558h-.03zm.087-1.193c2.7 0 4.853 2.126 4.853 4.75 0 2.655-2.153 4.784-4.89 4.784s-4.917-2.132-4.917-4.783c0-2.625 2.183-4.75 4.917-4.75h.03"
fill="#fdbb30"
/>
</svg>`, ee = A.bind(d), te = () => ee`
<div id="page-login" class="app-page">
<div class="login__logo-wrapper">
<${Z} />
</div>
<section class="login__form-section">
<div class="login__form-wrapper">
<p class="cogni__title mb-md">Log in to continue</p>
<div class="px-sm" id="login-default-form">
<div class="login__form-field mb-sm">
<p class="cogni__md-text wg-md">Email</p>
<input
id="login-email-field"
class="cogni__form-input w-100"
placeholder="Your email"
type="email"
required
/>
</div>
<div class="login__form-field mb-sm">
<p class="cogni__md-text wg-md">Password</p>
<input
id="login-password-field"
class="cogni__form-input w-100"
placeholder="Password"
type="password"
required
/>
</div>
<div class="login__form-field">
<p
class="cogni__link cogni__text-xs login__secret-token-link"
id="login-go-to-secret"
>
<!-- Use a secret token instead -->
</p>
</div>
<div class="login__form-field mt-sm">
<button
id="default-login-button"
class="w-100 cogni__type__main py-sm login__form-button"
type="button"
>
Login
</button>
<p class="mt-sm login-error" id="login-invalid-creds">
Invalid credentials, please try again
</p>
</div>
</div>
<div class="px-sm d-none" id="login-use-secret-token">
<div class="login__form-field mb-sm">
<p class="cogni__md-text wg-md">Authentication token</p>
<input
class="cogni__form-input w-100"
placeholder="Ask for your access token"
required
/>
</div>
<div class="login__form-field">
<p
class="cogni__link cogni__text-xs login__secret-token-link"
id="login-go-to-normal-auth"
>
Use normal authentication instead
</p>
</div>
<div class="login__form-field mt-sm">
<button
id="default-login-button"
class="w-100 cogni__type__main py-sm login__form-button"
type="button"
>
Login using token
</button>
</div>
</div>
</div>
</section>
</div>
`, ne = A.bind(d), se = () => ne` <div id="page-experiments" class="app-page">
<div class="cogni__navbar mb-xs main-navbar">
<div class="navbar__logo-text">
<div class="navbar__logo"></div>
</div>
<div>
<select
id="experiments-visibility-dropdown"
class="cogni__default-select experiments-select"
disabled
>
<option value="list">Private experiments</option>
<option value="publicExperiments">Public experiments</option>
</select>
</div>
<div>
<select
id="experiments-type-dropdown"
class="cogni__default-select experiments-select"
>
<option value="">All types</option>
<option value="0">Text</option>
<option value="1">Image</option>
<option value="2">Audio</option>
</select>
</div>
<div class="cogni__nav-link" id="logout">
<p>Logout</p>
</div>
</div>
<section id="experiments-list" class="p-md">
<div class="experiments-options">
<!-- <div class="experiments-searchbar-wrapper mb-sm">
<input
type="text"
placeholder="Search"
class="cogni__form-input experiments-search-input"
/>
<button>O</button>
</div> -->
</div>
<div class="experiment-cards" id="experiment-cards-container">
<!-- DYNAMIC HERE -->
</div>
</section>
</div>`, ie = A.bind(d), oe = () => ie`
<div id="pages-run-model" class="app-page">
<div class="cogni__navbar mb-sm">
<button
id="pages-run-model-go-back"
class="cogni__goback-button experiment-go-back"
>
<span class="cogni__arrow-icon"> </span>
</button>
<p id="experiment-value" class="experiment-name">Experiment name</p>
<div class="experiment-nav-item-void"></div>
</div>
<div class="p-md">
<div class="run-options-bar">
<div class="run-dropdowns-wrapper">
<div class="run-select-field">
<p>Model to use</p>
<select
name=""
id="run-model-dropdown"
class="cogni__default-select"
>
<!-- Dynamic data -->
</select>
</div>
<div class="run-select-field">
<p>Place result</p>
<select
name=""
id="run-insert-dropdown"
class="cogni__default-select"
>
<option value="insertRight">Insert results at the right</option>
<option value="replaceRight">
Replace values at the right
</option>
</select>
</div>
</div>
</div>
<div class="p-md run-cells-range">
<div class="run-cells-range-items run-range-input-wrapper">
<p>Cells range or column</p>
<input
type="text"
placeholder="Example: A2:A10"
id="run-cells-range"
class="cogni__form-input"
value="A2:A5"
/>
</div>
<div class="run-cells-range-items">
<p class="run-checkbox-label">Show confidence</p>
<input type="checkbox" id="run-show-confidence-checkbox" />
</div>
<!-- <div class="run-cells-range-items" id="run-include-headers-container" style="display: none">
<p class="run-checkbox-label">My sheet includes headers</p>
<input type="checkbox" id="run-show-has-headers" checked />
</div> -->
<div class="run-cells-range-items" id="run-include-headers-container">
<p class="run-checkbox-label">My sheet includes headers</p>
<input type="checkbox" id="run-show-has-headers" checked />
</div>
<!-- <input type="checkbox" id="run-show-has-headers" /> -->
</div>
<div class="mt-md mb-md"></div>
<div class="run-progress-wrapper mb-sm" id="run-progress-container">
<p>
Progress:<span style="margin-right: 8px"></span>
<span id="run-processed">0</span> /
<span id="run-total-cells">0</span
><span style="margin-right: 8px"></span>(<span id="run-percentage"
>0</span
>%)
</p>
<button id="run-stop">Stop</button>
</div>
<div class="run-experiment-wrapper">
<button class="run-experiment-button" id="run-experiment">
Run model
</button>
</div>
<div>
<p class="edit-warning" id="run-edit-warning" style="display: none;">
IMPORTANT: do not edit anything in the spreadsheet until the process
completes 100%
</p>
</div>
</div>
</div>
`, re = A.bind(d); M(re`<${function () {
return re`
<main>
<div class="app-wrapper">
<${te} />
<${se} />
<${oe} />
</div>
</main>
`}} />`, document.getElementById("app")), (() => { const e = { current: {}, models: [{ name: "FFN Vectorization algorithm" }, { name: "Linear Regression" }], currentModel: {}, query: "sort=recent", list: [], showConfidence: !1, insertPlace: "insertRight", colRange: "A2:A5", hasHeaders: !0, publicExperiments: [], visibilityQuery: "" }, t = { 0: "text", 1: "text", 3: "question" }; let n = {}; const s = { progress: 0, processed: 0, total: 0, stop: !1, updateProgress() { this.progress = parseInt(this.processed / this.total * 100) }, clearRunState(e) { this.progress = 0, this.processed = 0, this.total = 0, this.stop = !1, e.changeText(z.run.runStop, "Stop"), e.changeText(z.run.runTotalCells, this.total), e.changeText(z.run.runProcessed, this.processed), e.changeText(z.run.runPercentage, this.progress) } }, i = async (t, n, s, i = !1) => { const o = t.getEntireColumn().getColumnsAfter(1).insert("Right"); o.load("address"), o.load("values"), await s.sync(); const r = o.address.split("!")[1][0], [l, a] = t.address.split("!")[1].split(":"), [c, d] = l, u = a ? a[1] : "", p = u ? `${r}${d}:${r}${u}` : `${r}${d}`, _ = n.getRange(p); if (e.hasHeaders) if (i) { n.getRange(`${r}1`).values = [["Confidence"]] } else { n.getRange(`${r}1`).values = [[e.current.title]] } return _.load("values"), _.load("address"), console.log(p), await s.sync(), _ }; class o { constructor(e, t) { this.current = e, this.history = [this.current], this.dom = t, this.dom.showPage(e) } updateForwardPageState(e) { this.history.push(e), this.current = this.history[this.history.length - 1] } switchPagesVisibility(e, t) { this.dom.hidePage(e), this.dom.showPage(t) } navigateTo(e) { this.switchPagesVisibility(this.current, e), this.updateForwardPageState(e) } navigateToSubPage(e, t) { this.switchPagesVisibility(e, t) } } async function r(o) { if (1 === e.colRange.length) { const t = G(e.colRange); e.colRange = `${t}:${t}` } const { showConfidence: r, currentModel: l, insertPlace: a } = e; let { colRange: c } = e; const d = new K("https://predict.cogniflow.ai"); Excel.run((async u => { const p = u.workbook.worksheets.getActiveWorksheet(); if (Q(c)) c = await (async (t, n, s = !1) => { const i = t.getUsedRange(), o = G(e.colRange), r = o.charCodeAt() - 65, l = e.hasHeaders ? 1 : 0; let a = l; for (i.load("values"), await n.sync(); a < i.values.length && i.values[a][r]; a++); return `${o}${l + 1}:${o}${a}` })(p, u); else { const e = p.getRange(c); e.load("values"), await u.sync(); const t = Y(c), n = G(c); let s = t; for (const [t] of e.values) { if (!t) break; s++ } s !== t && (c = `${n}${t}:${n}${s - 1}`) } const _ = p.getRange(c); _.load("values"), _.load("text"), _.load("address"), await u.sync(); const h = { text: { time: 1e3, limit: 5 }, image: { time: 1e3, limit: 2 }, audio: { time: 1e3, limit: 1 }, index: 0 }, g = _.text; let v = [], m = 0, f = 0; s.total = g.length; const y = D[e.current.type], x = N[e.current.task], b = l.id; async function w(t, n, i) { if (s.stop) return; const l = await Promise.allSettled(i); let d = []; d = 3 === e.current.task ? l.map((({ value: e }) => [e.result[0].answer])) : l.map((({ value: e }) => [e.result])); const _ = G(c), g = Y(c), v = `${_}${f + g}:${_}${n + g}`; let m = p.getRange(v); if (m.load("values"), m.load("address"), await u.sync(), m = O[a](m), m.load("values"), f = n + 1, m.values = d, r) { let t = 0; t = 3 === e.current.task ? l.map((({ value: e }) => [e.result[0].confidence])) : l.map((({ value: e }) => [e.confidence_score])); O[a](m).values = t } h.index = -1, s.stop || (s.processed = s.processed + l.length, s.updateProgress(), o.changeText(z.run.runTotalCells, s.total), o.changeText(z.run.runProcessed, s.processed), o.changeText(z.run.runPercentage, s.progress)), await u.sync() } const k = e.current.type, T = { image: "jpg", audio: "mp3" }[D[k]], $ = h[D[k]]; if ("insertRight" === e.insertPlace) if (e.showConfidence) { const e = await i(_, p, u, !1); await i(e, p, u, !0) } else await i(_, p, u, !1); for (const i of g) { if (s.stop) break; const [o] = i, r = o.replace(/\n/g, "\\n"), l = t[e.current.task] || "url"; v.push(d.post(`${y}/${x}/${b}`, JSON.stringify({ [l]: r, ...T ? { format: T } : {} }), { accept: "application/json", "Content-Type": "application/json", "x-api-key": n.api_keys ? n.api_keys[0].key : {} }, "retry")), h.index !== $.limit && m !== g.length - 1 || (await w(0, m, v), v = []), h.index += 1, m += 1 } await u.sync(), o.getById(z.run.runEditWarning).style.display = "none", o.changeText(z.run.runExperiment, "Run model") })) } const l = new K("https://api.cogniflow.ai"), a = new class { getById(e) { return document.getElementById(e) } getElementsByClass(e) { return document.getElementsByClassName(e) } hidePage(e) { this.getById(e).style.display = "none" } showPage(e) { this.getById(e).style.display = "block" } addEvent(e, t, n) { this.getById(e).addEventListener(t, n) } addEventToElements(e, t, n) { const s = this.getElementsByClass(e); for (const e of s) e.addEventListener(t, n) } changeText(e, t) { this.getById(e).innerText = t } removeListenersFromNode(e) { const t = document.getElementById(e), n = t.cloneNode(!0); t.parentNode.replaceChild(n, t) } }; let c = new o(z.login.pageId, a); (function (t, i, o, l) { const { login: { pageId: a, emailInput: c, passwordInput: d, loginButton: u, goToSecretTokenAuth: p, gotToNormalAuth: _, subPages: { defaultSubpage: h, secretToken: g }, invalidCredentials: v }, experiments: { pageId: m, experimentCardsClassName: f, cardsContainer: y, visibilityDropdown: x, typeDropdown: b, logoutBtn: w }, run: { pageId: k, goBack: T, confidenceDd: $, includeHeadersContainer: C, hasHeadersCb: E, insertDd: P, modelDd: I, expValue: M, confidenceValue: S, hasHeadersValue: B, modelValue: A, resultPlaceValue: R, cellsRange: H, runProgressContainer: D, runProcessed: N, runTotalCells: z, runPercentage: U, runStop: W, runExperiment: O, runEditWarning: Q } } = o, G = s => { l.get("user/").then((e => { n = e })).catch((e => { console.log(e) })); const o = n => { t.getById(y).innerHTML = "", q(n, F, y, t), t.addEventToElements(f, "click", (t => { const n = t.currentTarget.id; l.get(`experiment/${n}`).then((({ models: t, ...n }) => { e.current = n, e.models = t, i.navigateTo(k), s() })) })) }; l.get(`experiment/?${e.query}`).then((t => { e.list = t.filter((e => 3 === e.status && L.includes(e.task))), o(e.list) })), l.get(`experiment/public?${e.query}`).then((n => { e.publicExperiments = n, t.getById(x).disabled = !1, t.addEvent(x, "change", (t => { const { value: n } = t.target, s = e[n]; e.visibilityQuery = "publicExperiments" === n ? "public" : "", o(s) })) })), t.addEvent(b, "change", (t => { const n = e.visibilityQuery, s = t.target.value, i = s ? `type=${s}&&` : ""; l.get(`experiment/${n}?${i}${e.query}`).then((e => { o(e) })) })), t.addEvent(w, "click", (() => { i.navigateTo(a), t.removeListenersFromNode(m) })) }, Y = () => { (() => { if (!e.current.id_recommended_model) return void (e.currentModel = { recommended: !0, ...e.models[0] }); const t = e.models.findIndex((t => e.current.id_recommended_model === t.id)); e.currentModel = { recommended: !0, ...e.models[t] }, e.models[t] = e.models[0], e.models[0] = e.currentModel })(), j(e.models, I, t), Excel.run((n => { const s = n.workbook.worksheets.getActiveWorksheet(); return V.select = s.onSelectionChanged.add((n => { t.getById(H).value = n.address, e.colRange = n.address })), n.sync() })), t.changeText(M, e.current.title), t.addEvent(T, "click", (() => { t.changeText(o.run.runStop, "Run model"), s.clearRunState(t), e.insertPlace = "insertRight", t.removeListenersFromNode(k), i.navigateTo(m), V.select.remove(), Excel.run(V.select.context, (function (e) { return e.sync().then((function () { V.select = null })) })) })), t.addEvent(H, "keyup", (t => { e.colRange = t.target.value })), t.addEvent($, "change", (({ target: { checked: t } }) => { e.showConfidence = t })), t.addEvent(E, "change", (({ target: { checked: t } }) => { e.hasHeaders = t })), t.addEvent(P, "change", (({ target: { value: t } }) => { e.insertPlace = t })), t.addEvent(I, "change", (({ target: { value: t } }) => { var n; n = t, e.currentModel = e.models.find((({ name: e }) => e === n)) })), t.addEvent(O, "click", (() => { if ("Stop" === t.getById(O).innerText) return t.changeText(z, 0), t.changeText(N, 0), t.changeText(U, 0), s.stop = !0, t.changeText(O, "Run model"), void (t.getById(Q).style.display = "none"); try { s.clearRunState(t), r(t), t.getById(Q).style.display = "block", t.changeText(O, "Stop") } catch (e) { console.error(e), alert('Sorry, something went wrong, please verify you typed a correct range value.\n For example: "A2:A10" of "B:B"') } })) }; var J; J = () => G(Y), t.addEvent(u, "click", (() => { const e = { username: t.getById(c).value, password: t.getById(d).value }; l.post("login", new URLSearchParams({ ...e }), { "Content-Type": "application/x-www-form-urlencoded" }).then((e => { l.setTokenInHeaders(e.access_token), i.navigateTo(m), t.getById(v).style.display = "none", J() })).catch((e => { t.getById(v).style.display = "block", t.getById(v).innerText = { 422: "Sorry, something went wrong, please try later", 400: "Invalid credencials, please try again" }[e.status], t.getById(u).blur() })) })), t.addEvent(p, "click", (() => { i.switchPagesVisibility(h, g) })), t.addEvent(_, "click", (() => { i.switchPagesVisibility(g, h) })) })(a, c, z, l) })();
//# sourceMappingURL=index.de1a32f4.js.map
language: typescript
template:
content: <div id="app"></div>
language: html
style:
content: >
@import
"https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,200;0,400;0,500;0,600;0,700;1,500&display=swap";:root{--main-font-family:Poppins,sans-serif;--blue-100:#d6d9ea;--blue-200:#a4a9c8;--blue-800:#272c4d;--orange-400:#fd9690;--orange-500:#0071ce;--red-500:#f44336;--gray-200:#f8f8ff;--gray-300:#cdcdcd;--gray-400:#949494;--gray-500:#727272;--tex-size-xs:10px;--tex-size-sm:12px;--text-size-md:16px;--tex-size-lg:28px}.cogni__type__main{background-color:var(--orange-500);color:#fff;border:none}.cogni__title{font-family:var(--main-font-family);font-weight:700;font-size:var(--tex-size-lg)}.cogni__sm-text{font-size:12px}.cogni__md-text{font-size:16px}.cogni__form-input{border-width:0
0
1px;border-color:var(--gray-400);height:35px;box-sizing:border-box;font-family:var(--main-font-family);outline:0;transition:all
.2s ease-in}.cogni__form-input:focus{border-width:0 0
2px;border-color:var(--gray-400)}.cogni__form-input:hover{border-width:0 0
2px;border-color:#202020}.cogni__form-input::placeholder{font-family:var(--main-font-family);font-size:var(--tex-size-sm)}.cogni__link{color:var(--orange-500);cursor:pointer;text-decoration:underline}.cogni__navbar{border-bottom:1px
solid
var(--blue-100);flex-wrap:wrap;align-items:center;gap:12px;padding:12px;display:flex}.cogni__nav-link{cursor:pointer;background-color:var(--orange-500);border-radius:3px;padding:3px
12px}.cogni__nav-link
p{color:#fff}.cogni__goback-button{border:none;padding:2px
8px}.cogni__default-select{border:1px solid
var(--blue-200);cursor:pointer;border-radius:5px;outline:none;padding:8px
12px}.navbar__logo{cursor:pointer;align-items:center;display:flex}.navbar__logo-text{justify-content:space-between;align-items:center;display:flex}.cogni__text-xs{font-family:var(--main-font-family);font-size:var(--tex-size-sm)}.mr-sm{margin-right:12px}.mr-xs{margin-right:8px}.mr-md{margin-right:16px}.mb-sm{margin-bottom:12px}.mb-md{margin-bottom:24px}.mt-sm{margin-top:12px}.mt-md{margin-top:24px}.mt-lg{margin-top:42px}.w-100{width:100%}.p-md{padding:16px}.px-sm{padding-left:12px;padding-right:12px}.py-sm{padding-top:12px;padding-bottom:12px}.py-md{padding-top:16px;padding-bottom:16px}.wg-md{font-weight:600}.d-none{display:none}main,p,li,ul{margin:0;padding:0}main{background-color:var(--gray-200)}p{color:var(--blue-800);font-family:Nunito,sans-serif}button{border:1px
var(--gray-400)solid;font-family:var(--main-font-family);color:var(--blue-800);cursor:pointer;font-weight:700;font-size:var(--tex-size-md);background-color:#fff;border-radius:5px;padding:8px
16px}input[type=checkbox]{cursor:pointer}.app-wrapper{max-width:600px;margin:auto;padding:32px}.app-page{background-color:#fff;border-radius:10px;display:none;box-shadow:1px
3px 16px -3px
#a4a9c8}.login__logo-wrapper{height:100px;opacity:.8;background:linear-gradient(135deg,#dedfeb55
25%,#0000 25%) -33px 0/66px 66px,linear-gradient(225deg,#dedfeb 25%,#0000
25%) -33px 0/66px 66px,linear-gradient(315deg,#dedfeb55 25%,#0000 25%) 0
0/66px 66px,linear-gradient(45deg,#dedfeb 25%,#f8f8ff 25%) 0 0/66px
66px;border-radius:10px;justify-content:center;align-items:center;padding:16px
0;display:flex}.login__form-section{flex-direction:column;justify-content:center;align-items:center;padding:32px
32px 64px;display:flex}.login__form-wrapper{width:420px}@media
(max-width:640px){.login__form-wrapper{width:350px}}@media
(max-width:500px){.login__form-wrapper{width:100%}}.login__secret-token-link{justify-content:flex-end;display:flex}.login__form-button:hover{opacity:.9}.login__form-button:focus{opacity:.6}.login-error{text-align:center;color:var(--red-500);display:none}.main-navbar{justify-content:space-between}.experiments-options{justify-content:flex-end;display:flex}.experiments-select{background-color:var(--orange-500);color:#fff;border:none}.experiments-searchbar-wrapper{border:1px
solid
var(--blue-100);border-radius:5px;justify-content:center;align-items:center;display:flex}.experiments-searchbar-wrapper
button{padding:0
initial;background-color:var(--blue-100);color:#fff;border:none;border-radius:0}.experiments-search-input{color:var(--blue-200);border:none;margin:0;padding-left:12px}.experiments-search-input::placeholder{color:var(--blue-100)}.experiment-cards{flex-wrap:wrap;justify-content:space-evenly;gap:12px;padding-bottom:12px;display:flex}.experiment-card{cursor:pointer;width:150px;height:150px;background-color:var(--gray-200);border-radius:10px;flex-direction:column;justify-content:space-between;transition:all
.2s
ease-in;display:flex;position:relative;overflow:hidden}.experiment-card:hover{box-shadow:1px
3px 16px -3px
#a4a9c8}.exp-card-header{height:40px;position:relative}.exp-card-bg-img{height:40px;width:110%;background-image:url(https://app.cogniflow.ai/img/imgTextPattern.png);position:absolute;top:-10px;transform:rotate(7deg)}.exp-card-header-logos{justify-content:space-between;align-items:center;padding:6px;display:flex;position:relative}.exp-card-logo-wrapper{width:20px;height:20px;background-color:#fff;border-radius:8px;justify-content:center;align-items:center;display:flex;position:relative}.exp-card-logo{width:100%;height:100%}.exp-card-content{padding:0
6px
6px}.exp-card-title{background-color:#f8f8ff;border-radius:10px;justify-content:center;padding:10px
12px;display:flex}.exp-card-title
p{color:var(--blue-800);font-size:var(--tex-size-md);text-align:center;text-overflow:ellipsis;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;font-weight:700;line-height:16px;display:-webkit-box;overflow:hidden}.exp-card-body{flex-direction:column;justify-content:center;align-items:center;padding:0
16px;display:flex}.exp-card-body
p{text-align:center;font-size:14px;line-height:16px}.exp-card-time{padding:6px
12px}.exp-card-time .exp-card-time-label{font-weight:700}.exp-card-time
p{font-size:var(--tex-size-sm)}.experiment-go-back,.experiment-name,.experiment-nav-item-void{flex:1}.experiment-go-back{display:flex}.cogni__arrow-icon:after{content:"←"}.experiment-name{color:var(--blue-800);text-align:center;font-size:18px;font-weight:700}.run-select-field
div{justify-content:center;display:flex}.run-select-field
p{color:var(--orange-500);font-weight:700;font-size:var(--tex-size-sm);text-align:center;margin-bottom:5px}.run-select-field
select{background-color:var(--orange-500);color:#fff;font-family:var(--main-font-family);text-align:center;border:none;outline:none;font-weight:700}.run-select-field
option{border:none;outline:none;padding:16px
0;font-weight:700}.run-options-bar{flex-wrap:wrap-reverse;justify-content:flex-end;gap:12px;display:flex}.run-checkboxes-wrapper{align-items:end;gap:12px;display:flex}.run-dropdowns-wrapper{width:100%;flex-wrap:wrap;justify-content:center;gap:12px;display:flex}.run-experiment-wrapper{justify-content:center;display:flex}.run-cells-range{padding-bottom:0}@media
(max-width:595px){.run-cells-range{justify-content:center}}.run-cells-range-items{align-items:end;gap:40px;display:flex}@media
(max-width:440px){.run-range-input-wrapper{flex-direction:column;align-items:center;margin-bottom:8px}.run-cells-range-items{justify-content:center;align-items:center;gap:0;display:flex}.run-cells-range-items
.run-checkbox-label{text-align:center}}.run-cells-range-items
p{font-size:var(--tex-size-md);color:var(--blue-800);width:180px;text-align:end;font-weight:700}.run-cells-range-items
.cogni__form-input{color:var(--orange-500);width:80px;font-weight:700}.run-labels-wrapper{border:1px
solid
var(--gray-300);border-radius:5px}.run-values{color:var(--blue-800);font-weight:700}.run-labels{border-bottom:1px
solid var(--gray-300);justify-content:space-between;padding:8px
0;display:flex}.run-labels:last-child{border-bottom:none}.run-progress-wrapper{justify-content:center;align-items:center;gap:12px;display:flex}.run-progress-wrapper
p{align-items:center;display:flex}.run-progress-wrapper
button{background-color:var(--orange-500);color:#fff;border:none;padding:0
12px;display:none}.run-experiment-button{background-color:var(--orange-500);color:#fff;border:none}.edit-warning{text-align:center;background-color:#ffffce;margin-top:12px}.active{display:block}
/*# sourceMappingURL=index.a7b514ae.css.map */
language: css
libraries: |
https://appsforoffice.microsoft.com/lib/1/hosted/office.js
@types/office-js
office-ui-fabric-js@1.4.0/dist/css/fabric.min.css
office-ui-fabric-js@1.4.0/dist/css/fabric.components.min.css
core-js@2.4.1/client/core.min.js
@types/core-js
jquery@3.1.1
@types/jquery@3.3.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment