@spiffcommerce/theme-bridge 1.6.0 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +63 -47
- package/dist/index.js +143 -143
- package/dist/index.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SpiffCommerceClient } from '@spiffcommerce/core';
|
|
2
2
|
|
|
3
|
-
interface
|
|
3
|
+
interface ThemeContextBase {
|
|
4
4
|
applicationKey: string;
|
|
5
|
-
configuration:
|
|
5
|
+
configuration: ThemeInstallConfigurationResource;
|
|
6
6
|
/**
|
|
7
7
|
* The HTML element to render your Spiff theme into.
|
|
8
8
|
*/
|
|
@@ -16,55 +16,71 @@ interface SpiffThemeContextBase {
|
|
|
16
16
|
*/
|
|
17
17
|
embedMode?: boolean;
|
|
18
18
|
}
|
|
19
|
-
interface
|
|
19
|
+
interface ThemeContextBundleOptionsNew {
|
|
20
20
|
productCollectionId?: string;
|
|
21
21
|
type: "new";
|
|
22
22
|
}
|
|
23
|
-
interface
|
|
23
|
+
interface ThemeContextBundleOptionsExisting {
|
|
24
24
|
bundleId: string;
|
|
25
25
|
type: "existing";
|
|
26
26
|
}
|
|
27
|
-
type
|
|
28
|
-
interface
|
|
29
|
-
bundleOptions:
|
|
27
|
+
type ThemeContextBundleOptions = ThemeContextBundleOptionsNew | ThemeContextBundleOptionsExisting;
|
|
28
|
+
interface ThemeContextBundle extends ThemeContextBase {
|
|
29
|
+
bundleOptions: ThemeContextBundleOptions;
|
|
30
30
|
type: "bundle";
|
|
31
31
|
}
|
|
32
|
-
interface
|
|
33
|
-
|
|
32
|
+
interface ThemeContextWorkflowOptionsTransaction {
|
|
33
|
+
transactionId: string;
|
|
34
34
|
type: "transaction";
|
|
35
35
|
}
|
|
36
|
-
|
|
36
|
+
interface ThemeContextWorkflowOptionsIntegrationProduct {
|
|
37
|
+
integrationProductId: string;
|
|
38
|
+
workflowId?: string;
|
|
39
|
+
type: "integration";
|
|
40
|
+
}
|
|
41
|
+
interface ThemeContextWorkflowOptionsExternalProduct {
|
|
42
|
+
externalProductId: string;
|
|
43
|
+
externalIntegrationId: string;
|
|
44
|
+
workflowId?: string;
|
|
45
|
+
type: "external";
|
|
46
|
+
}
|
|
47
|
+
type ThemeContextWorkflowOptions = ThemeContextWorkflowOptionsTransaction | ThemeContextWorkflowOptionsIntegrationProduct | ThemeContextWorkflowOptionsExternalProduct;
|
|
48
|
+
interface ThemeContextTransaction extends ThemeContextBase {
|
|
49
|
+
workflowOptions: ThemeContextWorkflowOptions;
|
|
50
|
+
type: "transaction";
|
|
51
|
+
}
|
|
52
|
+
type ThemeContext = ThemeContextTransaction | ThemeContextBundle;
|
|
37
53
|
type SpiffThemeLoader = {
|
|
38
|
-
getContext(): Promise<
|
|
39
|
-
setContext(context:
|
|
54
|
+
getContext(): Promise<ThemeContext>;
|
|
55
|
+
setContext(context: ThemeContext): void;
|
|
40
56
|
configureClient(client: SpiffCommerceClient): void;
|
|
41
57
|
};
|
|
42
|
-
interface
|
|
43
|
-
launchData:
|
|
44
|
-
configurationSchema:
|
|
58
|
+
interface ThemeConfigurationFile {
|
|
59
|
+
launchData: ThemeConfigurationLaunchData;
|
|
60
|
+
configurationSchema: ThemeConfigurationSchema;
|
|
45
61
|
}
|
|
46
|
-
declare enum
|
|
62
|
+
declare enum ThemeFileType {
|
|
47
63
|
Javascript = "Javascript",
|
|
48
64
|
CSS = "CSS"
|
|
49
65
|
}
|
|
50
|
-
interface
|
|
51
|
-
targetFiles:
|
|
66
|
+
interface ThemeConfigurationLaunchData {
|
|
67
|
+
targetFiles: ThemeConfigurationLaunchDataTargetFile[];
|
|
52
68
|
}
|
|
53
|
-
interface
|
|
69
|
+
interface ThemeConfigurationLaunchDataTargetFile {
|
|
54
70
|
filename: string;
|
|
55
|
-
type:
|
|
71
|
+
type: ThemeFileType;
|
|
56
72
|
mimeType: string;
|
|
57
73
|
}
|
|
58
|
-
interface
|
|
59
|
-
targetFiles:
|
|
74
|
+
interface ThemeLaunchData {
|
|
75
|
+
targetFiles: ThemeLaunchDataTargetFile[];
|
|
60
76
|
}
|
|
61
|
-
interface
|
|
77
|
+
interface ThemeLaunchDataTargetFile {
|
|
62
78
|
filename: string;
|
|
63
|
-
type:
|
|
79
|
+
type: ThemeFileType;
|
|
64
80
|
mimeType: string;
|
|
65
81
|
fileLink: string;
|
|
66
82
|
}
|
|
67
|
-
declare enum
|
|
83
|
+
declare enum ThemeConfigurationFieldType {
|
|
68
84
|
SingleLineText = "SingleLineText",
|
|
69
85
|
MultiLineText = "MultiLineText",
|
|
70
86
|
Heading = "Heading",
|
|
@@ -74,12 +90,12 @@ declare enum SpiffThemeConfigurationFieldType {
|
|
|
74
90
|
Asset = "Asset",
|
|
75
91
|
Color = "Color"
|
|
76
92
|
}
|
|
77
|
-
interface
|
|
78
|
-
fields:
|
|
93
|
+
interface ThemeConfigurationSchema {
|
|
94
|
+
fields: ThemeConfigurationSchemaField[];
|
|
79
95
|
}
|
|
80
|
-
interface
|
|
96
|
+
interface ThemeConfigurationSchemaField {
|
|
81
97
|
key?: string;
|
|
82
|
-
type:
|
|
98
|
+
type: ThemeConfigurationFieldType;
|
|
83
99
|
title?: string;
|
|
84
100
|
description?: string;
|
|
85
101
|
required?: boolean;
|
|
@@ -90,38 +106,38 @@ interface SpiffThemeConfigurationSchemaField {
|
|
|
90
106
|
}[];
|
|
91
107
|
assetType?: string;
|
|
92
108
|
}
|
|
93
|
-
interface
|
|
109
|
+
interface ThemeResource {
|
|
94
110
|
id: string;
|
|
95
111
|
name: string;
|
|
96
112
|
createdAt: string;
|
|
97
113
|
updatedAt: string;
|
|
98
114
|
}
|
|
99
|
-
interface
|
|
115
|
+
interface ThemeVersionResource {
|
|
100
116
|
id: string;
|
|
101
|
-
theme:
|
|
117
|
+
theme: ThemeResource;
|
|
102
118
|
version: string;
|
|
103
119
|
createdAt: string;
|
|
104
120
|
updatedAt: string;
|
|
105
|
-
configurationSchema:
|
|
106
|
-
launchData:
|
|
121
|
+
configurationSchema: ThemeConfigurationSchema;
|
|
122
|
+
launchData: ThemeLaunchData;
|
|
107
123
|
}
|
|
108
|
-
interface
|
|
124
|
+
interface ThemeInstallConfigurationResource {
|
|
109
125
|
id: string;
|
|
110
126
|
themeInstallId: string;
|
|
111
127
|
name: string;
|
|
112
|
-
themeVersion:
|
|
128
|
+
themeVersion: ThemeVersionResource;
|
|
113
129
|
createdAt: string;
|
|
114
130
|
updatedAt: string;
|
|
115
|
-
fields:
|
|
131
|
+
fields: ThemeInstallConfigurationField[];
|
|
116
132
|
}
|
|
117
|
-
interface
|
|
133
|
+
interface ThemeInstallConfigurationField {
|
|
118
134
|
key?: string;
|
|
119
135
|
fallbackToDefaultConfiguration?: boolean;
|
|
120
136
|
value?: string;
|
|
121
|
-
type:
|
|
122
|
-
asset?:
|
|
137
|
+
type: ThemeConfigurationFieldType;
|
|
138
|
+
asset?: AssetResource;
|
|
123
139
|
}
|
|
124
|
-
declare enum
|
|
140
|
+
declare enum AssetType {
|
|
125
141
|
Data = "Data",
|
|
126
142
|
Font = "Font",
|
|
127
143
|
Frame = "Frame",
|
|
@@ -134,15 +150,15 @@ declare enum SpiffAssetType {
|
|
|
134
150
|
ColorProfile = "ColorProfile",
|
|
135
151
|
Environment = "Environment"
|
|
136
152
|
}
|
|
137
|
-
interface
|
|
153
|
+
interface AssetResource {
|
|
138
154
|
key: string;
|
|
139
155
|
name: string;
|
|
140
156
|
fileLink: string;
|
|
141
|
-
type:
|
|
157
|
+
type: AssetType;
|
|
142
158
|
}
|
|
143
159
|
|
|
144
|
-
type SpiffDevOptions = Omit<
|
|
160
|
+
type SpiffDevOptions = Omit<ThemeContextTransaction, "container"> | Omit<ThemeContextBundle, "container">;
|
|
145
161
|
declare function setSpiffDevOptions(container: HTMLElement | string, context: SpiffDevOptions): void;
|
|
146
|
-
declare function exampleThemeInstallConfig(opts?: Partial<
|
|
162
|
+
declare function exampleThemeInstallConfig(opts?: Partial<ThemeInstallConfigurationResource>): ThemeInstallConfigurationResource;
|
|
147
163
|
|
|
148
|
-
export { type
|
|
164
|
+
export { type AssetResource, AssetType, type SpiffDevOptions, type SpiffThemeLoader, ThemeConfigurationFieldType, type ThemeConfigurationFile, type ThemeConfigurationLaunchData, type ThemeConfigurationLaunchDataTargetFile, type ThemeConfigurationSchema, type ThemeConfigurationSchemaField, type ThemeContext, type ThemeContextBundle, type ThemeContextBundleOptions, type ThemeContextBundleOptionsExisting, type ThemeContextBundleOptionsNew, type ThemeContextTransaction, type ThemeContextWorkflowOptions, type ThemeContextWorkflowOptionsExternalProduct, type ThemeContextWorkflowOptionsIntegrationProduct, type ThemeContextWorkflowOptionsTransaction, ThemeFileType, type ThemeInstallConfigurationField, type ThemeInstallConfigurationResource, type ThemeLaunchData, type ThemeLaunchDataTargetFile, type ThemeResource, type ThemeVersionResource, exampleThemeInstallConfig, setSpiffDevOptions };
|
package/dist/index.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
var x_ = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var T = (_, e, t) => (
|
|
4
|
-
var
|
|
5
|
-
function
|
|
2
|
+
var S_ = (_, e, t) => e in _ ? x_(_, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : _[e] = t;
|
|
3
|
+
var T = (_, e, t) => (S_(_, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
|
+
var C_ = /* @__PURE__ */ ((_) => (_.Javascript = "Javascript", _.CSS = "CSS", _))(C_ || {}), w_ = /* @__PURE__ */ ((_) => (_.SingleLineText = "SingleLineText", _.MultiLineText = "MultiLineText", _.Heading = "Heading", _.Number = "Number", _.Boolean = "Boolean", _.Select = "Select", _.Asset = "Asset", _.Color = "Color", _))(w_ || {}), E_ = /* @__PURE__ */ ((_) => (_.Data = "Data", _.Font = "Font", _.Frame = "Frame", _.Illustration = "Illustration", _.Image = "Image", _.Model = "Model", _.Material = "Material", _.Color = "Color", _.Video = "Video", _.ColorProfile = "ColorProfile", _.Environment = "Environment", _))(E_ || {}), F, s, c_, C, X, a_, O, H = {}, s_ = [], H_ = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, G = Array.isArray;
|
|
5
|
+
function S(_, e) {
|
|
6
6
|
for (var t in e)
|
|
7
7
|
_[t] = e[t];
|
|
8
8
|
return _;
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function p_(_) {
|
|
11
11
|
var e = _.parentNode;
|
|
12
12
|
e && e.removeChild(_);
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
var n, r, i,
|
|
14
|
+
function $_(_, e, t) {
|
|
15
|
+
var n, r, i, f = {};
|
|
16
16
|
for (i in e)
|
|
17
|
-
i == "key" ? n = e[i] : i == "ref" ? r = e[i] :
|
|
18
|
-
if (arguments.length > 2 && (
|
|
17
|
+
i == "key" ? n = e[i] : i == "ref" ? r = e[i] : f[i] = e[i];
|
|
18
|
+
if (arguments.length > 2 && (f.children = arguments.length > 3 ? F.call(arguments, 2) : t), typeof _ == "function" && _.defaultProps != null)
|
|
19
19
|
for (i in _.defaultProps)
|
|
20
|
-
|
|
21
|
-
return L(_,
|
|
20
|
+
f[i] === void 0 && (f[i] = _.defaultProps[i]);
|
|
21
|
+
return L(_, f, n, r, null);
|
|
22
22
|
}
|
|
23
23
|
function L(_, e, t, n, r) {
|
|
24
|
-
var i = { type: _, props: e, key: t, ref: n, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: r ?? ++
|
|
25
|
-
return r == null &&
|
|
24
|
+
var i = { type: _, props: e, key: t, ref: n, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: r ?? ++c_, __i: -1, __u: 0 };
|
|
25
|
+
return r == null && s.vnode != null && s.vnode(i), i;
|
|
26
26
|
}
|
|
27
27
|
function B(_) {
|
|
28
28
|
return _.children;
|
|
@@ -30,15 +30,15 @@ function B(_) {
|
|
|
30
30
|
function I(_, e) {
|
|
31
31
|
this.props = _, this.context = e;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function w(_, e) {
|
|
34
34
|
if (e == null)
|
|
35
|
-
return _.__ ?
|
|
35
|
+
return _.__ ? w(_.__, _.__i + 1) : null;
|
|
36
36
|
for (var t; e < _.__k.length; e++)
|
|
37
37
|
if ((t = _.__k[e]) != null && t.__e != null)
|
|
38
38
|
return t.__e;
|
|
39
|
-
return typeof _.type == "function" ?
|
|
39
|
+
return typeof _.type == "function" ? w(_) : null;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function d_(_) {
|
|
42
42
|
var e, t;
|
|
43
43
|
if ((_ = _.__) != null && _.__c != null) {
|
|
44
44
|
for (_.__e = _.__c.base = null, e = 0; e < _.__k.length; e++)
|
|
@@ -46,31 +46,31 @@ function h_(_) {
|
|
|
46
46
|
_.__e = _.__c.base = t.__e;
|
|
47
47
|
break;
|
|
48
48
|
}
|
|
49
|
-
return
|
|
49
|
+
return d_(_);
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
function Y(_) {
|
|
53
|
-
(!_.__d && (_.__d = !0) &&
|
|
53
|
+
(!_.__d && (_.__d = !0) && C.push(_) && !A.__r++ || X !== s.debounceRendering) && ((X = s.debounceRendering) || a_)(A);
|
|
54
54
|
}
|
|
55
55
|
function A() {
|
|
56
|
-
var _, e, t, n, r, i,
|
|
57
|
-
for (
|
|
58
|
-
_.__d && (e =
|
|
56
|
+
var _, e, t, n, r, i, f, l, c;
|
|
57
|
+
for (C.sort(O); _ = C.shift(); )
|
|
58
|
+
_.__d && (e = C.length, n = void 0, i = (r = (t = _).__v).__e, l = [], c = [], (f = t.__P) && ((n = S({}, r)).__v = r.__v + 1, s.vnode && s.vnode(n), J(f, n, r, t.__n, f.ownerSVGElement !== void 0, 32 & r.__u ? [i] : null, l, i ?? w(r), !!(32 & r.__u), c), n.__.__k[n.__i] = n, m_(l, n, c), n.__e != i && d_(n)), C.length > e && C.sort(O));
|
|
59
59
|
A.__r = 0;
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
var o,
|
|
63
|
-
for (t.__d =
|
|
64
|
-
(
|
|
65
|
-
t.__d =
|
|
66
|
-
}
|
|
67
|
-
function
|
|
68
|
-
var n, r, i,
|
|
69
|
-
for (_.__k = [], n = 0; n <
|
|
70
|
-
(r = _.__k[n] = (r = e[n]) == null || typeof r == "boolean" || typeof r == "function" ? null : typeof r == "string" || typeof r == "number" || typeof r == "bigint" || r.constructor == String ? L(null, r, null, null, r) : G(r) ? L(B, { children: r }, null, null, null) : r.constructor === void 0 && r.__b > 0 ? L(r.type, r.props, r.key, r.ref ? r.ref : null, r.__v) : r) != null ? (r.__ = _, r.__b = _.__b + 1, l =
|
|
71
|
-
if (
|
|
61
|
+
function h_(_, e, t, n, r, i, f, l, c, u, p) {
|
|
62
|
+
var o, d, a, m, k, g = n && n.__k || s_, h = e.length;
|
|
63
|
+
for (t.__d = c, P_(t, e, g), c = t.__d, o = 0; o < h; o++)
|
|
64
|
+
(a = t.__k[o]) != null && typeof a != "boolean" && typeof a != "function" && (d = a.__i === -1 ? H : g[a.__i] || H, a.__i = o, J(_, a, d, r, i, f, l, c, u, p), m = a.__e, a.ref && d.ref != a.ref && (d.ref && K(d.ref, null, a), p.push(a.ref, a.__c || m, a)), k == null && m != null && (k = m), 65536 & a.__u || d.__k === a.__k ? c = v_(a, c, _) : typeof a.type == "function" && a.__d !== void 0 ? c = a.__d : m && (c = m.nextSibling), a.__d = void 0, a.__u &= -196609);
|
|
65
|
+
t.__d = c, t.__e = k;
|
|
66
|
+
}
|
|
67
|
+
function P_(_, e, t) {
|
|
68
|
+
var n, r, i, f, l, c = e.length, u = t.length, p = u, o = 0;
|
|
69
|
+
for (_.__k = [], n = 0; n < c; n++)
|
|
70
|
+
(r = _.__k[n] = (r = e[n]) == null || typeof r == "boolean" || typeof r == "function" ? null : typeof r == "string" || typeof r == "number" || typeof r == "bigint" || r.constructor == String ? L(null, r, null, null, r) : G(r) ? L(B, { children: r }, null, null, null) : r.constructor === void 0 && r.__b > 0 ? L(r.type, r.props, r.key, r.ref ? r.ref : null, r.__v) : r) != null ? (r.__ = _, r.__b = _.__b + 1, l = D_(r, t, f = n + o, p), r.__i = l, i = null, l !== -1 && (p--, (i = t[l]) && (i.__u |= 131072)), i == null || i.__v === null ? (l == -1 && o--, typeof r.type != "function" && (r.__u |= 65536)) : l !== f && (l === f + 1 ? o++ : l > f ? p > c - f ? o += l - f : o-- : o = l < f && l == f - 1 ? l - f : 0, l !== n + o && (r.__u |= 65536))) : (i = t[n]) && i.key == null && i.__e && (i.__e == _.__d && (_.__d = w(i)), R(i, i, !1), t[n] = null, p--);
|
|
71
|
+
if (p)
|
|
72
72
|
for (n = 0; n < u; n++)
|
|
73
|
-
(i = t[n]) != null && !(131072 & i.__u) && (i.__e == _.__d && (_.__d =
|
|
73
|
+
(i = t[n]) != null && !(131072 & i.__u) && (i.__e == _.__d && (_.__d = w(i)), R(i, i));
|
|
74
74
|
}
|
|
75
75
|
function v_(_, e, t) {
|
|
76
76
|
var n, r;
|
|
@@ -81,19 +81,19 @@ function v_(_, e, t) {
|
|
|
81
81
|
}
|
|
82
82
|
return _.__e != e && (t.insertBefore(_.__e, e || null), e = _.__e), e && e.nextSibling;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
var r = _.key, i = _.type,
|
|
86
|
-
if (
|
|
84
|
+
function D_(_, e, t, n) {
|
|
85
|
+
var r = _.key, i = _.type, f = t - 1, l = t + 1, c = e[t];
|
|
86
|
+
if (c === null || c && r == c.key && i === c.type)
|
|
87
87
|
return t;
|
|
88
|
-
if (n > (
|
|
89
|
-
for (;
|
|
90
|
-
if (
|
|
91
|
-
if ((
|
|
92
|
-
return
|
|
93
|
-
|
|
88
|
+
if (n > (c != null && !(131072 & c.__u) ? 1 : 0))
|
|
89
|
+
for (; f >= 0 || l < e.length; ) {
|
|
90
|
+
if (f >= 0) {
|
|
91
|
+
if ((c = e[f]) && !(131072 & c.__u) && r == c.key && i === c.type)
|
|
92
|
+
return f;
|
|
93
|
+
f--;
|
|
94
94
|
}
|
|
95
95
|
if (l < e.length) {
|
|
96
|
-
if ((
|
|
96
|
+
if ((c = e[l]) && !(131072 & c.__u) && r == c.key && i === c.type)
|
|
97
97
|
return l;
|
|
98
98
|
l++;
|
|
99
99
|
}
|
|
@@ -101,9 +101,9 @@ function N_(_, e, t, n) {
|
|
|
101
101
|
return -1;
|
|
102
102
|
}
|
|
103
103
|
function __(_, e, t) {
|
|
104
|
-
e[0] === "-" ? _.setProperty(e, t ?? "") : _[e] = t == null ? "" : typeof t != "number" ||
|
|
104
|
+
e[0] === "-" ? _.setProperty(e, t ?? "") : _[e] = t == null ? "" : typeof t != "number" || H_.test(e) ? t : t + "px";
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function N(_, e, t, n, r) {
|
|
107
107
|
var i;
|
|
108
108
|
_:
|
|
109
109
|
if (e === "style")
|
|
@@ -138,94 +138,94 @@ function e_(_) {
|
|
|
138
138
|
return;
|
|
139
139
|
} else
|
|
140
140
|
_.t = Date.now();
|
|
141
|
-
return e(
|
|
141
|
+
return e(s.event ? s.event(_) : _);
|
|
142
142
|
}
|
|
143
143
|
function t_(_) {
|
|
144
|
-
return this.l[_.type + !0](
|
|
144
|
+
return this.l[_.type + !0](s.event ? s.event(_) : _);
|
|
145
145
|
}
|
|
146
|
-
function J(_, e, t, n, r, i,
|
|
147
|
-
var
|
|
146
|
+
function J(_, e, t, n, r, i, f, l, c, u) {
|
|
147
|
+
var p, o, d, a, m, k, g, h, y, x, $, E, Q, P, q, b = e.type;
|
|
148
148
|
if (e.constructor !== void 0)
|
|
149
149
|
return null;
|
|
150
|
-
128 & t.__u && (
|
|
150
|
+
128 & t.__u && (c = !!(32 & t.__u), i = [l = e.__e = t.__e]), (p = s.__b) && p(e);
|
|
151
151
|
_:
|
|
152
152
|
if (typeof b == "function")
|
|
153
153
|
try {
|
|
154
|
-
if (
|
|
154
|
+
if (h = e.props, y = (p = b.contextType) && n[p.__c], x = p ? y ? y.props.value : p.__ : n, t.__c ? g = (o = e.__c = t.__c).__ = o.__E : ("prototype" in b && b.prototype.render ? e.__c = o = new b(h, x) : (e.__c = o = new I(h, x), o.constructor = b, o.render = L_), y && y.sub(o), o.props = h, o.state || (o.state = {}), o.context = x, o.__n = n, d = o.__d = !0, o.__h = [], o._sb = []), o.__s == null && (o.__s = o.state), b.getDerivedStateFromProps != null && (o.__s == o.state && (o.__s = S({}, o.__s)), S(o.__s, b.getDerivedStateFromProps(h, o.__s))), a = o.props, m = o.state, o.__v = e, d)
|
|
155
155
|
b.getDerivedStateFromProps == null && o.componentWillMount != null && o.componentWillMount(), o.componentDidMount != null && o.__h.push(o.componentDidMount);
|
|
156
156
|
else {
|
|
157
|
-
if (b.getDerivedStateFromProps == null &&
|
|
158
|
-
for (e.__v !== t.__v && (o.props =
|
|
159
|
-
|
|
160
|
-
}),
|
|
161
|
-
o.__h.push(o._sb[
|
|
162
|
-
o._sb = [], o.__h.length &&
|
|
157
|
+
if (b.getDerivedStateFromProps == null && h !== a && o.componentWillReceiveProps != null && o.componentWillReceiveProps(h, x), !o.__e && (o.shouldComponentUpdate != null && o.shouldComponentUpdate(h, o.__s, x) === !1 || e.__v === t.__v)) {
|
|
158
|
+
for (e.__v !== t.__v && (o.props = h, o.state = o.__s, o.__d = !1), e.__e = t.__e, e.__k = t.__k, e.__k.forEach(function(D) {
|
|
159
|
+
D && (D.__ = e);
|
|
160
|
+
}), $ = 0; $ < o._sb.length; $++)
|
|
161
|
+
o.__h.push(o._sb[$]);
|
|
162
|
+
o._sb = [], o.__h.length && f.push(o);
|
|
163
163
|
break _;
|
|
164
164
|
}
|
|
165
|
-
o.componentWillUpdate != null && o.componentWillUpdate(
|
|
166
|
-
o.componentDidUpdate(
|
|
165
|
+
o.componentWillUpdate != null && o.componentWillUpdate(h, o.__s, x), o.componentDidUpdate != null && o.__h.push(function() {
|
|
166
|
+
o.componentDidUpdate(a, m, k);
|
|
167
167
|
});
|
|
168
168
|
}
|
|
169
|
-
if (o.context = x, o.props =
|
|
170
|
-
for (o.state = o.__s, o.__d = !1,
|
|
171
|
-
o.__h.push(o._sb[
|
|
169
|
+
if (o.context = x, o.props = h, o.__P = _, o.__e = !1, E = s.__r, Q = 0, "prototype" in b && b.prototype.render) {
|
|
170
|
+
for (o.state = o.__s, o.__d = !1, E && E(e), p = o.render(o.props, o.state, o.context), P = 0; P < o._sb.length; P++)
|
|
171
|
+
o.__h.push(o._sb[P]);
|
|
172
172
|
o._sb = [];
|
|
173
173
|
} else
|
|
174
174
|
do
|
|
175
|
-
o.__d = !1,
|
|
175
|
+
o.__d = !1, E && E(e), p = o.render(o.props, o.state, o.context), o.state = o.__s;
|
|
176
176
|
while (o.__d && ++Q < 25);
|
|
177
|
-
o.state = o.__s, o.getChildContext != null && (n =
|
|
178
|
-
} catch (
|
|
179
|
-
e.__v = null,
|
|
177
|
+
o.state = o.__s, o.getChildContext != null && (n = S(S({}, n), o.getChildContext())), d || o.getSnapshotBeforeUpdate == null || (k = o.getSnapshotBeforeUpdate(a, m)), h_(_, G(q = p != null && p.type === B && p.key == null ? p.props.children : p) ? q : [q], e, t, n, r, i, f, l, c, u), o.base = e.__e, e.__u &= -161, o.__h.length && f.push(o), g && (o.__E = o.__ = null);
|
|
178
|
+
} catch (D) {
|
|
179
|
+
e.__v = null, c || i != null ? (e.__e = l, e.__u |= c ? 160 : 32, i[i.indexOf(l)] = null) : (e.__e = t.__e, e.__k = t.__k), s.__e(D, e, t);
|
|
180
180
|
}
|
|
181
181
|
else
|
|
182
|
-
i == null && e.__v === t.__v ? (e.__k = t.__k, e.__e = t.__e) : e.__e =
|
|
183
|
-
(
|
|
182
|
+
i == null && e.__v === t.__v ? (e.__k = t.__k, e.__e = t.__e) : e.__e = N_(t.__e, e, t, n, r, i, f, c, u);
|
|
183
|
+
(p = s.diffed) && p(e);
|
|
184
184
|
}
|
|
185
185
|
function m_(_, e, t) {
|
|
186
186
|
e.__d = void 0;
|
|
187
187
|
for (var n = 0; n < t.length; n++)
|
|
188
188
|
K(t[n], t[++n], t[++n]);
|
|
189
|
-
|
|
189
|
+
s.__c && s.__c(e, _), _.some(function(r) {
|
|
190
190
|
try {
|
|
191
191
|
_ = r.__h, r.__h = [], _.some(function(i) {
|
|
192
192
|
i.call(r);
|
|
193
193
|
});
|
|
194
194
|
} catch (i) {
|
|
195
|
-
|
|
195
|
+
s.__e(i, r.__v);
|
|
196
196
|
}
|
|
197
197
|
});
|
|
198
198
|
}
|
|
199
|
-
function
|
|
200
|
-
var u,
|
|
199
|
+
function N_(_, e, t, n, r, i, f, l, c) {
|
|
200
|
+
var u, p, o, d, a, m, k, g = t.props, h = e.props, y = e.type;
|
|
201
201
|
if (y === "svg" && (r = !0), i != null) {
|
|
202
202
|
for (u = 0; u < i.length; u++)
|
|
203
|
-
if ((
|
|
204
|
-
_ =
|
|
203
|
+
if ((a = i[u]) && "setAttribute" in a == !!y && (y ? a.localName === y : a.nodeType === 3)) {
|
|
204
|
+
_ = a, i[u] = null;
|
|
205
205
|
break;
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
if (_ == null) {
|
|
209
209
|
if (y === null)
|
|
210
|
-
return document.createTextNode(
|
|
211
|
-
_ = r ? document.createElementNS("http://www.w3.org/2000/svg", y) : document.createElement(y,
|
|
210
|
+
return document.createTextNode(h);
|
|
211
|
+
_ = r ? document.createElementNS("http://www.w3.org/2000/svg", y) : document.createElement(y, h.is && h), i = null, l = !1;
|
|
212
212
|
}
|
|
213
213
|
if (y === null)
|
|
214
|
-
g ===
|
|
214
|
+
g === h || l && _.data === h || (_.data = h);
|
|
215
215
|
else {
|
|
216
|
-
if (i = i && F.call(_.childNodes), g = t.props ||
|
|
216
|
+
if (i = i && F.call(_.childNodes), g = t.props || H, !l && i != null)
|
|
217
217
|
for (g = {}, u = 0; u < _.attributes.length; u++)
|
|
218
|
-
g[(
|
|
218
|
+
g[(a = _.attributes[u]).name] = a.value;
|
|
219
219
|
for (u in g)
|
|
220
|
-
|
|
221
|
-
for (u in
|
|
222
|
-
|
|
223
|
-
if (
|
|
224
|
-
l || o && (
|
|
225
|
-
else if (o && (_.innerHTML = ""),
|
|
220
|
+
a = g[u], u == "children" || (u == "dangerouslySetInnerHTML" ? o = a : u === "key" || u in h || N(_, u, null, a, r));
|
|
221
|
+
for (u in h)
|
|
222
|
+
a = h[u], u == "children" ? d = a : u == "dangerouslySetInnerHTML" ? p = a : u == "value" ? m = a : u == "checked" ? k = a : u === "key" || l && typeof a != "function" || g[u] === a || N(_, u, a, g[u], r);
|
|
223
|
+
if (p)
|
|
224
|
+
l || o && (p.__html === o.__html || p.__html === _.innerHTML) || (_.innerHTML = p.__html), e.__k = [];
|
|
225
|
+
else if (o && (_.innerHTML = ""), h_(_, G(d) ? d : [d], e, t, n, r && y !== "foreignObject", i, f, i ? i[0] : t.__k && w(t, 0), l, c), i != null)
|
|
226
226
|
for (u = i.length; u--; )
|
|
227
|
-
i[u] != null &&
|
|
228
|
-
l || (u = "value", m !== void 0 && (m !== _[u] || y === "progress" && !m || y === "option" && m !== g[u]) &&
|
|
227
|
+
i[u] != null && p_(i[u]);
|
|
228
|
+
l || (u = "value", m !== void 0 && (m !== _[u] || y === "progress" && !m || y === "option" && m !== g[u]) && N(_, u, m, g[u], !1), u = "checked", k !== void 0 && k !== _[u] && N(_, u, k, g[u], !1));
|
|
229
229
|
}
|
|
230
230
|
return _;
|
|
231
231
|
}
|
|
@@ -233,53 +233,53 @@ function K(_, e, t) {
|
|
|
233
233
|
try {
|
|
234
234
|
typeof _ == "function" ? _(e) : _.current = e;
|
|
235
235
|
} catch (n) {
|
|
236
|
-
|
|
236
|
+
s.__e(n, t);
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
239
|
function R(_, e, t) {
|
|
240
240
|
var n, r;
|
|
241
|
-
if (
|
|
241
|
+
if (s.unmount && s.unmount(_), (n = _.ref) && (n.current && n.current !== _.__e || K(n, null, e)), (n = _.__c) != null) {
|
|
242
242
|
if (n.componentWillUnmount)
|
|
243
243
|
try {
|
|
244
244
|
n.componentWillUnmount();
|
|
245
245
|
} catch (i) {
|
|
246
|
-
|
|
246
|
+
s.__e(i, e);
|
|
247
247
|
}
|
|
248
248
|
n.base = n.__P = null, _.__c = void 0;
|
|
249
249
|
}
|
|
250
250
|
if (n = _.__k)
|
|
251
251
|
for (r = 0; r < n.length; r++)
|
|
252
252
|
n[r] && R(n[r], e, t || typeof _.type != "function");
|
|
253
|
-
t || _.__e == null ||
|
|
253
|
+
t || _.__e == null || p_(_.__e), _.__ = _.__e = _.__d = void 0;
|
|
254
254
|
}
|
|
255
255
|
function L_(_, e, t) {
|
|
256
256
|
return this.constructor(_, t);
|
|
257
257
|
}
|
|
258
258
|
function I_(_, e, t) {
|
|
259
|
-
var n, r, i,
|
|
260
|
-
|
|
259
|
+
var n, r, i, f;
|
|
260
|
+
s.__ && s.__(_, e), r = (n = typeof t == "function") ? null : t && t.__k || e.__k, i = [], f = [], J(e, _ = (!n && t || e).__k = $_(B, null, [_]), r || H, H, e.ownerSVGElement !== void 0, !n && t ? [t] : r ? null : e.firstChild ? F.call(e.childNodes) : null, i, !n && t ? t : r ? r.__e : e.firstChild, n, f), m_(i, _, f);
|
|
261
261
|
}
|
|
262
|
-
F =
|
|
263
|
-
for (var r, i,
|
|
262
|
+
F = s_.slice, s = { __e: function(_, e, t, n) {
|
|
263
|
+
for (var r, i, f; e = e.__; )
|
|
264
264
|
if ((r = e.__c) && !r.__)
|
|
265
265
|
try {
|
|
266
|
-
if ((i = r.constructor) && i.getDerivedStateFromError != null && (r.setState(i.getDerivedStateFromError(_)),
|
|
266
|
+
if ((i = r.constructor) && i.getDerivedStateFromError != null && (r.setState(i.getDerivedStateFromError(_)), f = r.__d), r.componentDidCatch != null && (r.componentDidCatch(_, n || {}), f = r.__d), f)
|
|
267
267
|
return r.__E = r;
|
|
268
268
|
} catch (l) {
|
|
269
269
|
_ = l;
|
|
270
270
|
}
|
|
271
271
|
throw _;
|
|
272
|
-
} },
|
|
272
|
+
} }, c_ = 0, I.prototype.setState = function(_, e) {
|
|
273
273
|
var t;
|
|
274
|
-
t = this.__s != null && this.__s !== this.state ? this.__s : this.__s =
|
|
274
|
+
t = this.__s != null && this.__s !== this.state ? this.__s : this.__s = S({}, this.state), typeof _ == "function" && (_ = _(S({}, t), this.props)), _ && S(t, _), _ != null && this.__v && (e && this._sb.push(e), Y(this));
|
|
275
275
|
}, I.prototype.forceUpdate = function(_) {
|
|
276
276
|
this.__v && (this.__e = !0, _ && this.__h.push(_), Y(this));
|
|
277
|
-
}, I.prototype.render = B,
|
|
277
|
+
}, I.prototype.render = B, C = [], a_ = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, O = function(_, e) {
|
|
278
278
|
return _.__v.__b - e.__v.__b;
|
|
279
279
|
}, A.__r = 0;
|
|
280
|
-
var W, v, Z, n_, j = 0, g_ = [], M = [], o_ =
|
|
280
|
+
var W, v, Z, n_, j = 0, g_ = [], M = [], o_ = s.__b, r_ = s.__r, i_ = s.diffed, l_ = s.__c, u_ = s.unmount;
|
|
281
281
|
function y_(_, e) {
|
|
282
|
-
|
|
282
|
+
s.__h && s.__h(v, _, j || e), j = 0;
|
|
283
283
|
var t = v.__H || (v.__H = { __: [], __h: [] });
|
|
284
284
|
return _ >= t.__.length && t.__.push({ __V: M }), t.__[_];
|
|
285
285
|
}
|
|
@@ -289,42 +289,42 @@ function M_(_) {
|
|
|
289
289
|
function U_(_, e, t) {
|
|
290
290
|
var n = y_(W++, 2);
|
|
291
291
|
if (n.t = _, !n.__c && (n.__ = [t ? t(e) : b_(void 0, e), function(l) {
|
|
292
|
-
var
|
|
293
|
-
|
|
292
|
+
var c = n.__N ? n.__N[0] : n.__[0], u = n.t(c, l);
|
|
293
|
+
c !== u && (n.__N = [u, n.__[1]], n.__c.setState({}));
|
|
294
294
|
}], n.__c = v, !v.u)) {
|
|
295
|
-
var r = function(l,
|
|
295
|
+
var r = function(l, c, u) {
|
|
296
296
|
if (!n.__c.__H)
|
|
297
297
|
return !0;
|
|
298
|
-
var
|
|
299
|
-
return
|
|
298
|
+
var p = n.__c.__H.__.filter(function(d) {
|
|
299
|
+
return d.__c;
|
|
300
300
|
});
|
|
301
|
-
if (
|
|
302
|
-
return !
|
|
301
|
+
if (p.every(function(d) {
|
|
302
|
+
return !d.__N;
|
|
303
303
|
}))
|
|
304
|
-
return !i || i.call(this, l,
|
|
304
|
+
return !i || i.call(this, l, c, u);
|
|
305
305
|
var o = !1;
|
|
306
|
-
return
|
|
307
|
-
if (
|
|
308
|
-
var
|
|
309
|
-
|
|
306
|
+
return p.forEach(function(d) {
|
|
307
|
+
if (d.__N) {
|
|
308
|
+
var a = d.__[0];
|
|
309
|
+
d.__ = d.__N, d.__N = void 0, a !== d.__[0] && (o = !0);
|
|
310
310
|
}
|
|
311
|
-
}), !(!o && n.__c.props === l) && (!i || i.call(this, l,
|
|
311
|
+
}), !(!o && n.__c.props === l) && (!i || i.call(this, l, c, u));
|
|
312
312
|
};
|
|
313
313
|
v.u = !0;
|
|
314
|
-
var i = v.shouldComponentUpdate,
|
|
315
|
-
v.componentWillUpdate = function(l,
|
|
314
|
+
var i = v.shouldComponentUpdate, f = v.componentWillUpdate;
|
|
315
|
+
v.componentWillUpdate = function(l, c, u) {
|
|
316
316
|
if (this.__e) {
|
|
317
|
-
var
|
|
318
|
-
i = void 0, r(l,
|
|
317
|
+
var p = i;
|
|
318
|
+
i = void 0, r(l, c, u), i = p;
|
|
319
319
|
}
|
|
320
|
-
|
|
320
|
+
f && f.call(this, l, c, u);
|
|
321
321
|
}, v.shouldComponentUpdate = r;
|
|
322
322
|
}
|
|
323
323
|
return n.__N || n.__;
|
|
324
324
|
}
|
|
325
325
|
function A_(_, e) {
|
|
326
326
|
var t = y_(W++, 3);
|
|
327
|
-
!
|
|
327
|
+
!s.__s && F_(t.__H, e) && (t.__ = _, t.i = e, v.__H.__h.push(t));
|
|
328
328
|
}
|
|
329
329
|
function W_() {
|
|
330
330
|
for (var _; _ = g_.shift(); )
|
|
@@ -332,24 +332,24 @@ function W_() {
|
|
|
332
332
|
try {
|
|
333
333
|
_.__H.__h.forEach(U), _.__H.__h.forEach(z), _.__H.__h = [];
|
|
334
334
|
} catch (e) {
|
|
335
|
-
_.__H.__h = [],
|
|
335
|
+
_.__H.__h = [], s.__e(e, _.__v);
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
|
-
|
|
338
|
+
s.__b = function(_) {
|
|
339
339
|
v = null, o_ && o_(_);
|
|
340
|
-
},
|
|
340
|
+
}, s.__r = function(_) {
|
|
341
341
|
r_ && r_(_), W = 0;
|
|
342
342
|
var e = (v = _.__c).__H;
|
|
343
343
|
e && (Z === v ? (e.__h = [], v.__h = [], e.__.forEach(function(t) {
|
|
344
344
|
t.__N && (t.__ = t.__N), t.__V = M, t.__N = t.i = void 0;
|
|
345
345
|
})) : (e.__h.forEach(U), e.__h.forEach(z), e.__h = [], W = 0)), Z = v;
|
|
346
|
-
},
|
|
346
|
+
}, s.diffed = function(_) {
|
|
347
347
|
i_ && i_(_);
|
|
348
348
|
var e = _.__c;
|
|
349
|
-
e && e.__H && (e.__H.__h.length && (g_.push(e) !== 1 && n_ ===
|
|
349
|
+
e && e.__H && (e.__H.__h.length && (g_.push(e) !== 1 && n_ === s.requestAnimationFrame || ((n_ = s.requestAnimationFrame) || V_)(W_)), e.__H.__.forEach(function(t) {
|
|
350
350
|
t.i && (t.__H = t.i), t.__V !== M && (t.__ = t.__V), t.i = void 0, t.__V = M;
|
|
351
351
|
})), Z = v = null;
|
|
352
|
-
},
|
|
352
|
+
}, s.__c = function(_, e) {
|
|
353
353
|
e.some(function(t) {
|
|
354
354
|
try {
|
|
355
355
|
t.__h.forEach(U), t.__h = t.__h.filter(function(n) {
|
|
@@ -358,10 +358,10 @@ f.__b = function(_) {
|
|
|
358
358
|
} catch (n) {
|
|
359
359
|
e.some(function(r) {
|
|
360
360
|
r.__h && (r.__h = []);
|
|
361
|
-
}), e = [],
|
|
361
|
+
}), e = [], s.__e(n, t.__v);
|
|
362
362
|
}
|
|
363
363
|
}), l_ && l_(_, e);
|
|
364
|
-
},
|
|
364
|
+
}, s.unmount = function(_) {
|
|
365
365
|
u_ && u_(_);
|
|
366
366
|
var e, t = _.__c;
|
|
367
367
|
t && t.__H && (t.__H.__.forEach(function(n) {
|
|
@@ -370,14 +370,14 @@ f.__b = function(_) {
|
|
|
370
370
|
} catch (r) {
|
|
371
371
|
e = r;
|
|
372
372
|
}
|
|
373
|
-
}), t.__H = void 0, e &&
|
|
373
|
+
}), t.__H = void 0, e && s.__e(e, t.__v));
|
|
374
374
|
};
|
|
375
|
-
var
|
|
375
|
+
var f_ = typeof requestAnimationFrame == "function";
|
|
376
376
|
function V_(_) {
|
|
377
377
|
var e, t = function() {
|
|
378
|
-
clearTimeout(n),
|
|
378
|
+
clearTimeout(n), f_ && cancelAnimationFrame(e), setTimeout(_);
|
|
379
379
|
}, n = setTimeout(t, 100);
|
|
380
|
-
|
|
380
|
+
f_ && (e = requestAnimationFrame(t));
|
|
381
381
|
}
|
|
382
382
|
function U(_) {
|
|
383
383
|
var e = v, t = _.__c;
|
|
@@ -397,14 +397,14 @@ function b_(_, e) {
|
|
|
397
397
|
}
|
|
398
398
|
var B_ = 0;
|
|
399
399
|
function k_(_, e, t, n, r, i) {
|
|
400
|
-
var
|
|
400
|
+
var f, l, c = {};
|
|
401
401
|
for (l in e)
|
|
402
|
-
l == "ref" ?
|
|
403
|
-
var u = { type: _, props:
|
|
404
|
-
if (typeof _ == "function" && (
|
|
405
|
-
for (l in
|
|
406
|
-
|
|
407
|
-
return
|
|
402
|
+
l == "ref" ? f = e[l] : c[l] = e[l];
|
|
403
|
+
var u = { type: _, props: c, key: t, ref: f, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: --B_, __i: -1, __u: 0, __source: r, __self: i };
|
|
404
|
+
if (typeof _ == "function" && (f = _.defaultProps))
|
|
405
|
+
for (l in f)
|
|
406
|
+
c[l] === void 0 && (c[l] = f[l]);
|
|
407
|
+
return s.vnode && s.vnode(u), u;
|
|
408
408
|
}
|
|
409
409
|
class q_ {
|
|
410
410
|
constructor() {
|
|
@@ -479,9 +479,9 @@ function R_(_) {
|
|
|
479
479
|
};
|
|
480
480
|
}
|
|
481
481
|
export {
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
482
|
+
E_ as AssetType,
|
|
483
|
+
w_ as ThemeConfigurationFieldType,
|
|
484
|
+
C_ as ThemeFileType,
|
|
485
485
|
R_ as exampleThemeInstallConfig,
|
|
486
486
|
O_ as setSpiffDevOptions
|
|
487
487
|
};
|
package/dist/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(b,k){typeof exports=="object"&&typeof module<"u"?k(exports):typeof define=="function"&&define.amd?define(["exports"],k):(b=typeof globalThis<"u"?globalThis:b||self,k(b.theme={}))})(this,function(b){"use strict";var Z_=Object.defineProperty;var j_=(b,k,w)=>k in b?Z_(b,k,{enumerable:!0,configurable:!0,writable:!0,value:w}):b[k]=w;var Y=(b,k,w)=>(j_(b,typeof k!="symbol"?k+"":k,w),w);var k=(_=>(_.Javascript="Javascript",_.CSS="CSS",_))(k||{}),w=(_=>(_.SingleLineText="SingleLineText",_.MultiLineText="MultiLineText",_.Heading="Heading",_.Number="Number",_.Boolean="Boolean",_.Select="Select",_.Asset="Asset",_.Color="Color",_))(w||{}),__=(_=>(_.Data="Data",_.Font="Font",_.Frame="Frame",_.Illustration="Illustration",_.Image="Image",_.Model="Model",_.Material="Material",_.Color="Color",_.Video="Video",_.ColorProfile="ColorProfile",_.Environment="Environment",_))(__||{}),N,s,e_,$,t_,n_,Z,S={},o_=[],H_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,j=Array.isArray;function E(_,e){for(var t in e)_[t]=e[t];return _}function r_(_){var e=_.parentNode;e&&e.removeChild(_)}function $_(_,e,t){var n,r,i,c={};for(i in e)i=="key"?n=e[i]:i=="ref"?r=e[i]:c[i]=e[i];if(arguments.length>2&&(c.children=arguments.length>3?N.call(arguments,2):t),typeof _=="function"&&_.defaultProps!=null)for(i in _.defaultProps)c[i]===void 0&&(c[i]=_.defaultProps[i]);return I(_,c,n,r,null)}function I(_,e,t,n,r){var i={type:_,props:e,key:t,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:r??++e_,__i:-1,__u:0};return r==null&&s.vnode!=null&&s.vnode(i),i}function L(_){return _.children}function M(_,e){this.props=_,this.context=e}function P(_,e){if(e==null)return _.__?P(_.__,_.__i+1):null;for(var t;e<_.__k.length;e++)if((t=_.__k[e])!=null&&t.__e!=null)return t.__e;return typeof _.type=="function"?P(_):null}function i_(_){var e,t;if((_=_.__)!=null&&_.__c!=null){for(_.__e=_.__c.base=null,e=0;e<_.__k.length;e++)if((t=_.__k[e])!=null&&t.__e!=null){_.__e=_.__c.base=t.__e;break}return i_(_)}}function l_(_){(!_.__d&&(_.__d=!0)&&$.push(_)&&!T.__r++||t_!==s.debounceRendering)&&((t_=s.debounceRendering)||n_)(T)}function T(){var _,e,t,n,r,i,c,l,a;for($.sort(Z);_=$.shift();)_.__d&&(e=$.length,n=void 0,i=(r=(t=_).__v).__e,l=[],a=[],(c=t.__P)&&((n=E({},r)).__v=r.__v+1,s.vnode&&s.vnode(n),R(c,n,r,t.__n,c.ownerSVGElement!==void 0,32&r.__u?[i]:null,l,i??P(r),!!(32&r.__u),a),n.__.__k[n.__i]=n,d_(l,n,a),n.__e!=i&&i_(n)),$.length>e&&$.sort(Z));T.__r=0}function u_(_,e,t,n,r,i,c,l,a,u,d){var o,p,f,m,C,y=n&&n.__k||o_,h=e.length;for(t.__d=a,P_(t,e,y),a=t.__d,o=0;o<h;o++)(f=t.__k[o])!=null&&typeof f!="boolean"&&typeof f!="function"&&(p=f.__i===-1?S:y[f.__i]||S,f.__i=o,R(_,f,p,r,i,c,l,a,u,d),m=f.__e,f.ref&&p.ref!=f.ref&&(p.ref&&z(p.ref,null,f),d.push(f.ref,f.__c||m,f)),C==null&&m!=null&&(C=m),65536&f.__u||p.__k===f.__k?a=c_(f,a,_):typeof f.type=="function"&&f.__d!==void 0?a=f.__d:m&&(a=m.nextSibling),f.__d=void 0,f.__u&=-196609);t.__d=a,t.__e=C}function P_(_,e,t){var n,r,i,c,l,a=e.length,u=t.length,d=u,o=0;for(_.__k=[],n=0;n<a;n++)(r=_.__k[n]=(r=e[n])==null||typeof r=="boolean"||typeof r=="function"?null:typeof r=="string"||typeof r=="number"||typeof r=="bigint"||r.constructor==String?I(null,r,null,null,r):j(r)?I(L,{children:r},null,null,null):r.constructor===void 0&&r.__b>0?I(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)!=null?(r.__=_,r.__b=_.__b+1,l=S_(r,t,c=n+o,d),r.__i=l,i=null,l!==-1&&(d--,(i=t[l])&&(i.__u|=131072)),i==null||i.__v===null?(l==-1&&o--,typeof r.type!="function"&&(r.__u|=65536)):l!==c&&(l===c+1?o++:l>c?d>a-c?o+=l-c:o--:o=l<c&&l==c-1?l-c:0,l!==n+o&&(r.__u|=65536))):(i=t[n])&&i.key==null&&i.__e&&(i.__e==_.__d&&(_.__d=P(i)),G(i,i,!1),t[n]=null,d--);if(d)for(n=0;n<u;n++)(i=t[n])!=null&&!(131072&i.__u)&&(i.__e==_.__d&&(_.__d=P(i)),G(i,i))}function c_(_,e,t){var n,r;if(typeof _.type=="function"){for(n=_.__k,r=0;n&&r<n.length;r++)n[r]&&(n[r].__=_,e=c_(n[r],e,t));return e}return _.__e!=e&&(t.insertBefore(_.__e,e||null),e=_.__e),e&&e.nextSibling}function S_(_,e,t,n){var r=_.key,i=_.type,c=t-1,l=t+1,a=e[t];if(a===null||a&&r==a.key&&i===a.type)return t;if(n>(a!=null&&!(131072&a.__u)?1:0))for(;c>=0||l<e.length;){if(c>=0){if((a=e[c])&&!(131072&a.__u)&&r==a.key&&i===a.type)return c;c--}if(l<e.length){if((a=e[l])&&!(131072&a.__u)&&r==a.key&&i===a.type)return l;l++}}return-1}function a_(_,e,t){e[0]==="-"?_.setProperty(e,t??""):_[e]=t==null?"":typeof t!="number"||H_.test(e)?t:t+"px"}function U(_,e,t,n,r){var i;_:if(e==="style")if(typeof t=="string")_.style.cssText=t;else{if(typeof n=="string"&&(_.style.cssText=n=""),n)for(e in n)t&&e in t||a_(_.style,e,"");if(t)for(e in t)n&&t[e]===n[e]||a_(_.style,e,t[e])}else if(e[0]==="o"&&e[1]==="n")i=e!==(e=e.replace(/(PointerCapture)$|Capture$/,"$1")),e=e.toLowerCase()in _?e.toLowerCase().slice(2):e.slice(2),_.l||(_.l={}),_.l[e+i]=t,t?n?t.u=n.u:(t.u=Date.now(),_.addEventListener(e,i?s_:f_,i)):_.removeEventListener(e,i?s_:f_,i);else{if(r)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!=="width"&&e!=="height"&&e!=="href"&&e!=="list"&&e!=="form"&&e!=="tabIndex"&&e!=="download"&&e!=="rowSpan"&&e!=="colSpan"&&e!=="role"&&e in _)try{_[e]=t??"";break _}catch{}typeof t=="function"||(t==null||t===!1&&e[4]!=="-"?_.removeAttribute(e):_.setAttribute(e,t))}}function f_(_){var e=this.l[_.type+!1];if(_.t){if(_.t<=e.u)return}else _.t=Date.now();return e(s.event?s.event(_):_)}function s_(_){return this.l[_.type+!0](s.event?s.event(_):_)}function R(_,e,t,n,r,i,c,l,a,u){var d,o,p,f,m,C,y,h,g,H,B,D,E_,O,X,x=e.type;if(e.constructor!==void 0)return null;128&t.__u&&(a=!!(32&t.__u),i=[l=e.__e=t.__e]),(d=s.__b)&&d(e);_:if(typeof x=="function")try{if(h=e.props,g=(d=x.contextType)&&n[d.__c],H=d?g?g.props.value:d.__:n,t.__c?y=(o=e.__c=t.__c).__=o.__E:("prototype"in x&&x.prototype.render?e.__c=o=new x(h,H):(e.__c=o=new M(h,H),o.constructor=x,o.render=N_),g&&g.sub(o),o.props=h,o.state||(o.state={}),o.context=H,o.__n=n,p=o.__d=!0,o.__h=[],o._sb=[]),o.__s==null&&(o.__s=o.state),x.getDerivedStateFromProps!=null&&(o.__s==o.state&&(o.__s=E({},o.__s)),E(o.__s,x.getDerivedStateFromProps(h,o.__s))),f=o.props,m=o.state,o.__v=e,p)x.getDerivedStateFromProps==null&&o.componentWillMount!=null&&o.componentWillMount(),o.componentDidMount!=null&&o.__h.push(o.componentDidMount);else{if(x.getDerivedStateFromProps==null&&h!==f&&o.componentWillReceiveProps!=null&&o.componentWillReceiveProps(h,H),!o.__e&&(o.shouldComponentUpdate!=null&&o.shouldComponentUpdate(h,o.__s,H)===!1||e.__v===t.__v)){for(e.__v!==t.__v&&(o.props=h,o.state=o.__s,o.__d=!1),e.__e=t.__e,e.__k=t.__k,e.__k.forEach(function(q){q&&(q.__=e)}),B=0;B<o._sb.length;B++)o.__h.push(o._sb[B]);o._sb=[],o.__h.length&&c.push(o);break _}o.componentWillUpdate!=null&&o.componentWillUpdate(h,o.__s,H),o.componentDidUpdate!=null&&o.__h.push(function(){o.componentDidUpdate(f,m,C)})}if(o.context=H,o.props=h,o.__P=_,o.__e=!1,D=s.__r,E_=0,"prototype"in x&&x.prototype.render){for(o.state=o.__s,o.__d=!1,D&&D(e),d=o.render(o.props,o.state,o.context),O=0;O<o._sb.length;O++)o.__h.push(o._sb[O]);o._sb=[]}else do o.__d=!1,D&&D(e),d=o.render(o.props,o.state,o.context),o.state=o.__s;while(o.__d&&++E_<25);o.state=o.__s,o.getChildContext!=null&&(n=E(E({},n),o.getChildContext())),p||o.getSnapshotBeforeUpdate==null||(C=o.getSnapshotBeforeUpdate(f,m)),u_(_,j(X=d!=null&&d.type===L&&d.key==null?d.props.children:d)?X:[X],e,t,n,r,i,c,l,a,u),o.base=e.__e,e.__u&=-161,o.__h.length&&c.push(o),y&&(o.__E=o.__=null)}catch(q){e.__v=null,a||i!=null?(e.__e=l,e.__u|=a?160:32,i[i.indexOf(l)]=null):(e.__e=t.__e,e.__k=t.__k),s.__e(q,e,t)}else i==null&&e.__v===t.__v?(e.__k=t.__k,e.__e=t.__e):e.__e=D_(t.__e,e,t,n,r,i,c,a,u);(d=s.diffed)&&d(e)}function d_(_,e,t){e.__d=void 0;for(var n=0;n<t.length;n++)z(t[n],t[++n],t[++n]);s.__c&&s.__c(e,_),_.some(function(r){try{_=r.__h,r.__h=[],_.some(function(i){i.call(r)})}catch(i){s.__e(i,r.__v)}})}function D_(_,e,t,n,r,i,c,l,a){var u,d,o,p,f,m,C,y=t.props,h=e.props,g=e.type;if(g==="svg"&&(r=!0),i!=null){for(u=0;u<i.length;u++)if((f=i[u])&&"setAttribute"in f==!!g&&(g?f.localName===g:f.nodeType===3)){_=f,i[u]=null;break}}if(_==null){if(g===null)return document.createTextNode(h);_=r?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,h.is&&h),i=null,l=!1}if(g===null)y===h||l&&_.data===h||(_.data=h);else{if(i=i&&N.call(_.childNodes),y=t.props||S,!l&&i!=null)for(y={},u=0;u<_.attributes.length;u++)y[(f=_.attributes[u]).name]=f.value;for(u in y)f=y[u],u=="children"||(u=="dangerouslySetInnerHTML"?o=f:u==="key"||u in h||U(_,u,null,f,r));for(u in h)f=h[u],u=="children"?p=f:u=="dangerouslySetInnerHTML"?d=f:u=="value"?m=f:u=="checked"?C=f:u==="key"||l&&typeof f!="function"||y[u]===f||U(_,u,f,y[u],r);if(d)l||o&&(d.__html===o.__html||d.__html===_.innerHTML)||(_.innerHTML=d.__html),e.__k=[];else if(o&&(_.innerHTML=""),u_(_,j(p)?p:[p],e,t,n,r&&g!=="foreignObject",i,c,i?i[0]:t.__k&&P(t,0),l,a),i!=null)for(u=i.length;u--;)i[u]!=null&&r_(i[u]);l||(u="value",m!==void 0&&(m!==_[u]||g==="progress"&&!m||g==="option"&&m!==y[u])&&U(_,u,m,y[u],!1),u="checked",C!==void 0&&C!==_[u]&&U(_,u,C,y[u],!1))}return _}function z(_,e,t){try{typeof _=="function"?_(e):_.current=e}catch(n){s.__e(n,t)}}function G(_,e,t){var n,r;if(s.unmount&&s.unmount(_),(n=_.ref)&&(n.current&&n.current!==_.__e||z(n,null,e)),(n=_.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){s.__e(i,e)}n.base=n.__P=null,_.__c=void 0}if(n=_.__k)for(r=0;r<n.length;r++)n[r]&&G(n[r],e,t||typeof _.type!="function");t||_.__e==null||r_(_.__e),_.__=_.__e=_.__d=void 0}function N_(_,e,t){return this.constructor(_,t)}function I_(_,e,t){var n,r,i,c;s.__&&s.__(_,e),r=(n=typeof t=="function")?null:t&&t.__k||e.__k,i=[],c=[],R(e,_=(!n&&t||e).__k=$_(L,null,[_]),r||S,S,e.ownerSVGElement!==void 0,!n&&t?[t]:r?null:e.firstChild?N.call(e.childNodes):null,i,!n&&t?t:r?r.__e:e.firstChild,n,c),d_(i,_,c)}N=o_.slice,s={__e:function(_,e,t,n){for(var r,i,c;e=e.__;)if((r=e.__c)&&!r.__)try{if((i=r.constructor)&&i.getDerivedStateFromError!=null&&(r.setState(i.getDerivedStateFromError(_)),c=r.__d),r.componentDidCatch!=null&&(r.componentDidCatch(_,n||{}),c=r.__d),c)return r.__E=r}catch(l){_=l}throw _}},e_=0,M.prototype.setState=function(_,e){var t;t=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=E({},this.state),typeof _=="function"&&(_=_(E({},t),this.props)),_&&E(t,_),_!=null&&this.__v&&(e&&this._sb.push(e),l_(this))},M.prototype.forceUpdate=function(_){this.__v&&(this.__e=!0,_&&this.__h.push(_),l_(this))},M.prototype.render=L,$=[],n_=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Z=function(_,e){return _.__v.__b-e.__v.__b},T.__r=0;var A,v,J,p_,K=0,h_=[],W=[],v_=s.__b,m_=s.__r,y_=s.diffed,g_=s.__c,b_=s.unmount;function k_(_,e){s.__h&&s.__h(v,_,K||e),K=0;var t=v.__H||(v.__H={__:[],__h:[]});return _>=t.__.length&&t.__.push({__V:W}),t.__[_]}function L_(_){return K=1,M_(C_,_)}function M_(_,e,t){var n=k_(A++,2);if(n.t=_,!n.__c&&(n.__=[t?t(e):C_(void 0,e),function(l){var a=n.__N?n.__N[0]:n.__[0],u=n.t(a,l);a!==u&&(n.__N=[u,n.__[1]],n.__c.setState({}))}],n.__c=v,!v.u)){var r=function(l,a,u){if(!n.__c.__H)return!0;var d=n.__c.__H.__.filter(function(p){return p.__c});if(d.every(function(p){return!p.__N}))return!i||i.call(this,l,a,u);var o=!1;return d.forEach(function(p){if(p.__N){var f=p.__[0];p.__=p.__N,p.__N=void 0,f!==p.__[0]&&(o=!0)}}),!(!o&&n.__c.props===l)&&(!i||i.call(this,l,a,u))};v.u=!0;var i=v.shouldComponentUpdate,c=v.componentWillUpdate;v.componentWillUpdate=function(l,a,u){if(this.__e){var d=i;i=void 0,r(l,a,u),i=d}c&&c.call(this,l,a,u)},v.shouldComponentUpdate=r}return n.__N||n.__}function T_(_,e){var t=k_(A++,3);!s.__s&&W_(t.__H,e)&&(t.__=_,t.i=e,v.__H.__h.push(t))}function U_(){for(var _;_=h_.shift();)if(_.__P&&_.__H)try{_.__H.__h.forEach(F),_.__H.__h.forEach(Q),_.__H.__h=[]}catch(e){_.__H.__h=[],s.__e(e,_.__v)}}s.__b=function(_){v=null,v_&&v_(_)},s.__r=function(_){m_&&m_(_),A=0;var e=(v=_.__c).__H;e&&(J===v?(e.__h=[],v.__h=[],e.__.forEach(function(t){t.__N&&(t.__=t.__N),t.__V=W,t.__N=t.i=void 0})):(e.__h.forEach(F),e.__h.forEach(Q),e.__h=[],A=0)),J=v},s.diffed=function(_){y_&&y_(_);var e=_.__c;e&&e.__H&&(e.__H.__h.length&&(h_.push(e)!==1&&p_===s.requestAnimationFrame||((p_=s.requestAnimationFrame)||A_)(U_)),e.__H.__.forEach(function(t){t.i&&(t.__H=t.i),t.__V!==W&&(t.__=t.__V),t.i=void 0,t.__V=W})),J=v=null},s.__c=function(_,e){e.some(function(t){try{t.__h.forEach(F),t.__h=t.__h.filter(function(n){return!n.__||Q(n)})}catch(n){e.some(function(r){r.__h&&(r.__h=[])}),e=[],s.__e(n,t.__v)}}),g_&&g_(_,e)},s.unmount=function(_){b_&&b_(_);var e,t=_.__c;t&&t.__H&&(t.__H.__.forEach(function(n){try{F(n)}catch(r){e=r}}),t.__H=void 0,e&&s.__e(e,t.__v))};var x_=typeof requestAnimationFrame=="function";function A_(_){var e,t=function(){clearTimeout(n),x_&&cancelAnimationFrame(e),setTimeout(_)},n=setTimeout(t,100);x_&&(e=requestAnimationFrame(t))}function F(_){var e=v,t=_.__c;typeof t=="function"&&(_.__c=void 0,t()),v=e}function Q(_){var e=v;_.__c=_.__(),v=e}function W_(_,e){return!_||_.length!==e.length||e.some(function(t,n){return t!==_[n]})}function C_(_,e){return typeof e=="function"?e(_):e}var F_=0;function w_(_,e,t,n,r,i){var c,l,a={};for(l in e)l=="ref"?c=e[l]:a[l]=e[l];var u={type:_,props:a,key:t,ref:c,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--F_,__i:-1,__u:0,__source:r,__self:i};if(typeof _=="function"&&(c=_.defaultProps))for(l in c)a[l]===void 0&&(a[l]=c[l]);return s.vnode&&s.vnode(u),u}class V_{constructor(){Y(this,"_context");Y(this,"_getContextCallbacks",[])}async getContext(){return this._context?this._context:new Promise(e=>{this._getContextCallbacks.push(e)})}setContext(e){this._context=e,this._getContextCallbacks.forEach(t=>t(e)),this._getContextCallbacks=[]}configureClient(e){console.log("Client configured")}}let V;const B_=({context:_})=>{const[e,t]=L_(null);return T_(()=>{if(e){if(V===void 0)throw new Error("Please call setSpiffDevOptions before requesting the context.");V.setContext({..._,container:e})}},[e,_]),w_("div",{ref:t,id:"spiffThemeWrapper"})};function O_(_,e){V=new V_,window.SpiffThemeLoader=V;let t;typeof _=="string"?t=document.getElementById(_):t=_,I_(w_(B_,{context:e}),t)}function q_(_){return{id:"example",themeInstallId:(_==null?void 0:_.themeInstallId)??"example",name:"Example Configuration",createdAt:"2021-01-01T00:00:00Z",updatedAt:"2021-01-01T00:00:00Z",themeVersion:{id:"example",version:"1.0.0",createdAt:"2021-01-01T00:00:00Z",updatedAt:"2021-01-01T00:00:00Z",configurationSchema:{fields:[]},launchData:{targetFiles:[]},theme:{id:"example",name:"Example Theme",createdAt:"2021-01-01T00:00:00Z",updatedAt:"2021-01-01T00:00:00Z"}},fields:[],..._}}b.SpiffAssetType=__,b.SpiffThemeConfigurationFieldType=w,b.SpiffThemeFileType=k,b.exampleThemeInstallConfig=q_,b.setSpiffDevOptions=O_,Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(b,k){typeof exports=="object"&&typeof module<"u"?k(exports):typeof define=="function"&&define.amd?define(["exports"],k):(b=typeof globalThis<"u"?globalThis:b||self,k(b.theme={}))})(this,function(b){"use strict";var Z_=Object.defineProperty;var j_=(b,k,C)=>k in b?Z_(b,k,{enumerable:!0,configurable:!0,writable:!0,value:C}):b[k]=C;var Y=(b,k,C)=>(j_(b,typeof k!="symbol"?k+"":k,C),C);var k=(_=>(_.Javascript="Javascript",_.CSS="CSS",_))(k||{}),C=(_=>(_.SingleLineText="SingleLineText",_.MultiLineText="MultiLineText",_.Heading="Heading",_.Number="Number",_.Boolean="Boolean",_.Select="Select",_.Asset="Asset",_.Color="Color",_))(C||{}),__=(_=>(_.Data="Data",_.Font="Font",_.Frame="Frame",_.Illustration="Illustration",_.Image="Image",_.Model="Model",_.Material="Material",_.Color="Color",_.Video="Video",_.ColorProfile="ColorProfile",_.Environment="Environment",_))(__||{}),N,s,e_,H,t_,n_,Z,P={},o_=[],E_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,j=Array.isArray;function w(_,e){for(var t in e)_[t]=e[t];return _}function r_(_){var e=_.parentNode;e&&e.removeChild(_)}function H_(_,e,t){var n,r,i,u={};for(i in e)i=="key"?n=e[i]:i=="ref"?r=e[i]:u[i]=e[i];if(arguments.length>2&&(u.children=arguments.length>3?N.call(arguments,2):t),typeof _=="function"&&_.defaultProps!=null)for(i in _.defaultProps)u[i]===void 0&&(u[i]=_.defaultProps[i]);return I(_,u,n,r,null)}function I(_,e,t,n,r){var i={type:_,props:e,key:t,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:r??++e_,__i:-1,__u:0};return r==null&&s.vnode!=null&&s.vnode(i),i}function L(_){return _.children}function M(_,e){this.props=_,this.context=e}function $(_,e){if(e==null)return _.__?$(_.__,_.__i+1):null;for(var t;e<_.__k.length;e++)if((t=_.__k[e])!=null&&t.__e!=null)return t.__e;return typeof _.type=="function"?$(_):null}function i_(_){var e,t;if((_=_.__)!=null&&_.__c!=null){for(_.__e=_.__c.base=null,e=0;e<_.__k.length;e++)if((t=_.__k[e])!=null&&t.__e!=null){_.__e=_.__c.base=t.__e;break}return i_(_)}}function l_(_){(!_.__d&&(_.__d=!0)&&H.push(_)&&!T.__r++||t_!==s.debounceRendering)&&((t_=s.debounceRendering)||n_)(T)}function T(){var _,e,t,n,r,i,u,l,c;for(H.sort(Z);_=H.shift();)_.__d&&(e=H.length,n=void 0,i=(r=(t=_).__v).__e,l=[],c=[],(u=t.__P)&&((n=w({},r)).__v=r.__v+1,s.vnode&&s.vnode(n),R(u,n,r,t.__n,u.ownerSVGElement!==void 0,32&r.__u?[i]:null,l,i??$(r),!!(32&r.__u),c),n.__.__k[n.__i]=n,p_(l,n,c),n.__e!=i&&i_(n)),H.length>e&&H.sort(Z));T.__r=0}function f_(_,e,t,n,r,i,u,l,c,f,p){var o,d,a,m,S,y=n&&n.__k||o_,h=e.length;for(t.__d=c,$_(t,e,y),c=t.__d,o=0;o<h;o++)(a=t.__k[o])!=null&&typeof a!="boolean"&&typeof a!="function"&&(d=a.__i===-1?P:y[a.__i]||P,a.__i=o,R(_,a,d,r,i,u,l,c,f,p),m=a.__e,a.ref&&d.ref!=a.ref&&(d.ref&&z(d.ref,null,a),p.push(a.ref,a.__c||m,a)),S==null&&m!=null&&(S=m),65536&a.__u||d.__k===a.__k?c=u_(a,c,_):typeof a.type=="function"&&a.__d!==void 0?c=a.__d:m&&(c=m.nextSibling),a.__d=void 0,a.__u&=-196609);t.__d=c,t.__e=S}function $_(_,e,t){var n,r,i,u,l,c=e.length,f=t.length,p=f,o=0;for(_.__k=[],n=0;n<c;n++)(r=_.__k[n]=(r=e[n])==null||typeof r=="boolean"||typeof r=="function"?null:typeof r=="string"||typeof r=="number"||typeof r=="bigint"||r.constructor==String?I(null,r,null,null,r):j(r)?I(L,{children:r},null,null,null):r.constructor===void 0&&r.__b>0?I(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)!=null?(r.__=_,r.__b=_.__b+1,l=P_(r,t,u=n+o,p),r.__i=l,i=null,l!==-1&&(p--,(i=t[l])&&(i.__u|=131072)),i==null||i.__v===null?(l==-1&&o--,typeof r.type!="function"&&(r.__u|=65536)):l!==u&&(l===u+1?o++:l>u?p>c-u?o+=l-u:o--:o=l<u&&l==u-1?l-u:0,l!==n+o&&(r.__u|=65536))):(i=t[n])&&i.key==null&&i.__e&&(i.__e==_.__d&&(_.__d=$(i)),G(i,i,!1),t[n]=null,p--);if(p)for(n=0;n<f;n++)(i=t[n])!=null&&!(131072&i.__u)&&(i.__e==_.__d&&(_.__d=$(i)),G(i,i))}function u_(_,e,t){var n,r;if(typeof _.type=="function"){for(n=_.__k,r=0;n&&r<n.length;r++)n[r]&&(n[r].__=_,e=u_(n[r],e,t));return e}return _.__e!=e&&(t.insertBefore(_.__e,e||null),e=_.__e),e&&e.nextSibling}function P_(_,e,t,n){var r=_.key,i=_.type,u=t-1,l=t+1,c=e[t];if(c===null||c&&r==c.key&&i===c.type)return t;if(n>(c!=null&&!(131072&c.__u)?1:0))for(;u>=0||l<e.length;){if(u>=0){if((c=e[u])&&!(131072&c.__u)&&r==c.key&&i===c.type)return u;u--}if(l<e.length){if((c=e[l])&&!(131072&c.__u)&&r==c.key&&i===c.type)return l;l++}}return-1}function c_(_,e,t){e[0]==="-"?_.setProperty(e,t??""):_[e]=t==null?"":typeof t!="number"||E_.test(e)?t:t+"px"}function U(_,e,t,n,r){var i;_:if(e==="style")if(typeof t=="string")_.style.cssText=t;else{if(typeof n=="string"&&(_.style.cssText=n=""),n)for(e in n)t&&e in t||c_(_.style,e,"");if(t)for(e in t)n&&t[e]===n[e]||c_(_.style,e,t[e])}else if(e[0]==="o"&&e[1]==="n")i=e!==(e=e.replace(/(PointerCapture)$|Capture$/,"$1")),e=e.toLowerCase()in _?e.toLowerCase().slice(2):e.slice(2),_.l||(_.l={}),_.l[e+i]=t,t?n?t.u=n.u:(t.u=Date.now(),_.addEventListener(e,i?s_:a_,i)):_.removeEventListener(e,i?s_:a_,i);else{if(r)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!=="width"&&e!=="height"&&e!=="href"&&e!=="list"&&e!=="form"&&e!=="tabIndex"&&e!=="download"&&e!=="rowSpan"&&e!=="colSpan"&&e!=="role"&&e in _)try{_[e]=t??"";break _}catch{}typeof t=="function"||(t==null||t===!1&&e[4]!=="-"?_.removeAttribute(e):_.setAttribute(e,t))}}function a_(_){var e=this.l[_.type+!1];if(_.t){if(_.t<=e.u)return}else _.t=Date.now();return e(s.event?s.event(_):_)}function s_(_){return this.l[_.type+!0](s.event?s.event(_):_)}function R(_,e,t,n,r,i,u,l,c,f){var p,o,d,a,m,S,y,h,g,E,B,D,w_,O,X,x=e.type;if(e.constructor!==void 0)return null;128&t.__u&&(c=!!(32&t.__u),i=[l=e.__e=t.__e]),(p=s.__b)&&p(e);_:if(typeof x=="function")try{if(h=e.props,g=(p=x.contextType)&&n[p.__c],E=p?g?g.props.value:p.__:n,t.__c?y=(o=e.__c=t.__c).__=o.__E:("prototype"in x&&x.prototype.render?e.__c=o=new x(h,E):(e.__c=o=new M(h,E),o.constructor=x,o.render=N_),g&&g.sub(o),o.props=h,o.state||(o.state={}),o.context=E,o.__n=n,d=o.__d=!0,o.__h=[],o._sb=[]),o.__s==null&&(o.__s=o.state),x.getDerivedStateFromProps!=null&&(o.__s==o.state&&(o.__s=w({},o.__s)),w(o.__s,x.getDerivedStateFromProps(h,o.__s))),a=o.props,m=o.state,o.__v=e,d)x.getDerivedStateFromProps==null&&o.componentWillMount!=null&&o.componentWillMount(),o.componentDidMount!=null&&o.__h.push(o.componentDidMount);else{if(x.getDerivedStateFromProps==null&&h!==a&&o.componentWillReceiveProps!=null&&o.componentWillReceiveProps(h,E),!o.__e&&(o.shouldComponentUpdate!=null&&o.shouldComponentUpdate(h,o.__s,E)===!1||e.__v===t.__v)){for(e.__v!==t.__v&&(o.props=h,o.state=o.__s,o.__d=!1),e.__e=t.__e,e.__k=t.__k,e.__k.forEach(function(q){q&&(q.__=e)}),B=0;B<o._sb.length;B++)o.__h.push(o._sb[B]);o._sb=[],o.__h.length&&u.push(o);break _}o.componentWillUpdate!=null&&o.componentWillUpdate(h,o.__s,E),o.componentDidUpdate!=null&&o.__h.push(function(){o.componentDidUpdate(a,m,S)})}if(o.context=E,o.props=h,o.__P=_,o.__e=!1,D=s.__r,w_=0,"prototype"in x&&x.prototype.render){for(o.state=o.__s,o.__d=!1,D&&D(e),p=o.render(o.props,o.state,o.context),O=0;O<o._sb.length;O++)o.__h.push(o._sb[O]);o._sb=[]}else do o.__d=!1,D&&D(e),p=o.render(o.props,o.state,o.context),o.state=o.__s;while(o.__d&&++w_<25);o.state=o.__s,o.getChildContext!=null&&(n=w(w({},n),o.getChildContext())),d||o.getSnapshotBeforeUpdate==null||(S=o.getSnapshotBeforeUpdate(a,m)),f_(_,j(X=p!=null&&p.type===L&&p.key==null?p.props.children:p)?X:[X],e,t,n,r,i,u,l,c,f),o.base=e.__e,e.__u&=-161,o.__h.length&&u.push(o),y&&(o.__E=o.__=null)}catch(q){e.__v=null,c||i!=null?(e.__e=l,e.__u|=c?160:32,i[i.indexOf(l)]=null):(e.__e=t.__e,e.__k=t.__k),s.__e(q,e,t)}else i==null&&e.__v===t.__v?(e.__k=t.__k,e.__e=t.__e):e.__e=D_(t.__e,e,t,n,r,i,u,c,f);(p=s.diffed)&&p(e)}function p_(_,e,t){e.__d=void 0;for(var n=0;n<t.length;n++)z(t[n],t[++n],t[++n]);s.__c&&s.__c(e,_),_.some(function(r){try{_=r.__h,r.__h=[],_.some(function(i){i.call(r)})}catch(i){s.__e(i,r.__v)}})}function D_(_,e,t,n,r,i,u,l,c){var f,p,o,d,a,m,S,y=t.props,h=e.props,g=e.type;if(g==="svg"&&(r=!0),i!=null){for(f=0;f<i.length;f++)if((a=i[f])&&"setAttribute"in a==!!g&&(g?a.localName===g:a.nodeType===3)){_=a,i[f]=null;break}}if(_==null){if(g===null)return document.createTextNode(h);_=r?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,h.is&&h),i=null,l=!1}if(g===null)y===h||l&&_.data===h||(_.data=h);else{if(i=i&&N.call(_.childNodes),y=t.props||P,!l&&i!=null)for(y={},f=0;f<_.attributes.length;f++)y[(a=_.attributes[f]).name]=a.value;for(f in y)a=y[f],f=="children"||(f=="dangerouslySetInnerHTML"?o=a:f==="key"||f in h||U(_,f,null,a,r));for(f in h)a=h[f],f=="children"?d=a:f=="dangerouslySetInnerHTML"?p=a:f=="value"?m=a:f=="checked"?S=a:f==="key"||l&&typeof a!="function"||y[f]===a||U(_,f,a,y[f],r);if(p)l||o&&(p.__html===o.__html||p.__html===_.innerHTML)||(_.innerHTML=p.__html),e.__k=[];else if(o&&(_.innerHTML=""),f_(_,j(d)?d:[d],e,t,n,r&&g!=="foreignObject",i,u,i?i[0]:t.__k&&$(t,0),l,c),i!=null)for(f=i.length;f--;)i[f]!=null&&r_(i[f]);l||(f="value",m!==void 0&&(m!==_[f]||g==="progress"&&!m||g==="option"&&m!==y[f])&&U(_,f,m,y[f],!1),f="checked",S!==void 0&&S!==_[f]&&U(_,f,S,y[f],!1))}return _}function z(_,e,t){try{typeof _=="function"?_(e):_.current=e}catch(n){s.__e(n,t)}}function G(_,e,t){var n,r;if(s.unmount&&s.unmount(_),(n=_.ref)&&(n.current&&n.current!==_.__e||z(n,null,e)),(n=_.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){s.__e(i,e)}n.base=n.__P=null,_.__c=void 0}if(n=_.__k)for(r=0;r<n.length;r++)n[r]&&G(n[r],e,t||typeof _.type!="function");t||_.__e==null||r_(_.__e),_.__=_.__e=_.__d=void 0}function N_(_,e,t){return this.constructor(_,t)}function I_(_,e,t){var n,r,i,u;s.__&&s.__(_,e),r=(n=typeof t=="function")?null:t&&t.__k||e.__k,i=[],u=[],R(e,_=(!n&&t||e).__k=H_(L,null,[_]),r||P,P,e.ownerSVGElement!==void 0,!n&&t?[t]:r?null:e.firstChild?N.call(e.childNodes):null,i,!n&&t?t:r?r.__e:e.firstChild,n,u),p_(i,_,u)}N=o_.slice,s={__e:function(_,e,t,n){for(var r,i,u;e=e.__;)if((r=e.__c)&&!r.__)try{if((i=r.constructor)&&i.getDerivedStateFromError!=null&&(r.setState(i.getDerivedStateFromError(_)),u=r.__d),r.componentDidCatch!=null&&(r.componentDidCatch(_,n||{}),u=r.__d),u)return r.__E=r}catch(l){_=l}throw _}},e_=0,M.prototype.setState=function(_,e){var t;t=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=w({},this.state),typeof _=="function"&&(_=_(w({},t),this.props)),_&&w(t,_),_!=null&&this.__v&&(e&&this._sb.push(e),l_(this))},M.prototype.forceUpdate=function(_){this.__v&&(this.__e=!0,_&&this.__h.push(_),l_(this))},M.prototype.render=L,H=[],n_=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Z=function(_,e){return _.__v.__b-e.__v.__b},T.__r=0;var A,v,J,d_,K=0,h_=[],W=[],v_=s.__b,m_=s.__r,y_=s.diffed,g_=s.__c,b_=s.unmount;function k_(_,e){s.__h&&s.__h(v,_,K||e),K=0;var t=v.__H||(v.__H={__:[],__h:[]});return _>=t.__.length&&t.__.push({__V:W}),t.__[_]}function L_(_){return K=1,M_(S_,_)}function M_(_,e,t){var n=k_(A++,2);if(n.t=_,!n.__c&&(n.__=[t?t(e):S_(void 0,e),function(l){var c=n.__N?n.__N[0]:n.__[0],f=n.t(c,l);c!==f&&(n.__N=[f,n.__[1]],n.__c.setState({}))}],n.__c=v,!v.u)){var r=function(l,c,f){if(!n.__c.__H)return!0;var p=n.__c.__H.__.filter(function(d){return d.__c});if(p.every(function(d){return!d.__N}))return!i||i.call(this,l,c,f);var o=!1;return p.forEach(function(d){if(d.__N){var a=d.__[0];d.__=d.__N,d.__N=void 0,a!==d.__[0]&&(o=!0)}}),!(!o&&n.__c.props===l)&&(!i||i.call(this,l,c,f))};v.u=!0;var i=v.shouldComponentUpdate,u=v.componentWillUpdate;v.componentWillUpdate=function(l,c,f){if(this.__e){var p=i;i=void 0,r(l,c,f),i=p}u&&u.call(this,l,c,f)},v.shouldComponentUpdate=r}return n.__N||n.__}function T_(_,e){var t=k_(A++,3);!s.__s&&W_(t.__H,e)&&(t.__=_,t.i=e,v.__H.__h.push(t))}function U_(){for(var _;_=h_.shift();)if(_.__P&&_.__H)try{_.__H.__h.forEach(F),_.__H.__h.forEach(Q),_.__H.__h=[]}catch(e){_.__H.__h=[],s.__e(e,_.__v)}}s.__b=function(_){v=null,v_&&v_(_)},s.__r=function(_){m_&&m_(_),A=0;var e=(v=_.__c).__H;e&&(J===v?(e.__h=[],v.__h=[],e.__.forEach(function(t){t.__N&&(t.__=t.__N),t.__V=W,t.__N=t.i=void 0})):(e.__h.forEach(F),e.__h.forEach(Q),e.__h=[],A=0)),J=v},s.diffed=function(_){y_&&y_(_);var e=_.__c;e&&e.__H&&(e.__H.__h.length&&(h_.push(e)!==1&&d_===s.requestAnimationFrame||((d_=s.requestAnimationFrame)||A_)(U_)),e.__H.__.forEach(function(t){t.i&&(t.__H=t.i),t.__V!==W&&(t.__=t.__V),t.i=void 0,t.__V=W})),J=v=null},s.__c=function(_,e){e.some(function(t){try{t.__h.forEach(F),t.__h=t.__h.filter(function(n){return!n.__||Q(n)})}catch(n){e.some(function(r){r.__h&&(r.__h=[])}),e=[],s.__e(n,t.__v)}}),g_&&g_(_,e)},s.unmount=function(_){b_&&b_(_);var e,t=_.__c;t&&t.__H&&(t.__H.__.forEach(function(n){try{F(n)}catch(r){e=r}}),t.__H=void 0,e&&s.__e(e,t.__v))};var x_=typeof requestAnimationFrame=="function";function A_(_){var e,t=function(){clearTimeout(n),x_&&cancelAnimationFrame(e),setTimeout(_)},n=setTimeout(t,100);x_&&(e=requestAnimationFrame(t))}function F(_){var e=v,t=_.__c;typeof t=="function"&&(_.__c=void 0,t()),v=e}function Q(_){var e=v;_.__c=_.__(),v=e}function W_(_,e){return!_||_.length!==e.length||e.some(function(t,n){return t!==_[n]})}function S_(_,e){return typeof e=="function"?e(_):e}var F_=0;function C_(_,e,t,n,r,i){var u,l,c={};for(l in e)l=="ref"?u=e[l]:c[l]=e[l];var f={type:_,props:c,key:t,ref:u,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--F_,__i:-1,__u:0,__source:r,__self:i};if(typeof _=="function"&&(u=_.defaultProps))for(l in u)c[l]===void 0&&(c[l]=u[l]);return s.vnode&&s.vnode(f),f}class V_{constructor(){Y(this,"_context");Y(this,"_getContextCallbacks",[])}async getContext(){return this._context?this._context:new Promise(e=>{this._getContextCallbacks.push(e)})}setContext(e){this._context=e,this._getContextCallbacks.forEach(t=>t(e)),this._getContextCallbacks=[]}configureClient(e){console.log("Client configured")}}let V;const B_=({context:_})=>{const[e,t]=L_(null);return T_(()=>{if(e){if(V===void 0)throw new Error("Please call setSpiffDevOptions before requesting the context.");V.setContext({..._,container:e})}},[e,_]),C_("div",{ref:t,id:"spiffThemeWrapper"})};function O_(_,e){V=new V_,window.SpiffThemeLoader=V;let t;typeof _=="string"?t=document.getElementById(_):t=_,I_(C_(B_,{context:e}),t)}function q_(_){return{id:"example",themeInstallId:(_==null?void 0:_.themeInstallId)??"example",name:"Example Configuration",createdAt:"2021-01-01T00:00:00Z",updatedAt:"2021-01-01T00:00:00Z",themeVersion:{id:"example",version:"1.0.0",createdAt:"2021-01-01T00:00:00Z",updatedAt:"2021-01-01T00:00:00Z",configurationSchema:{fields:[]},launchData:{targetFiles:[]},theme:{id:"example",name:"Example Theme",createdAt:"2021-01-01T00:00:00Z",updatedAt:"2021-01-01T00:00:00Z"}},fields:[],..._}}b.AssetType=__,b.ThemeConfigurationFieldType=C,b.ThemeFileType=k,b.exampleThemeInstallConfig=q_,b.setSpiffDevOptions=O_,Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})});
|