@cdc/markup-include 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +33 -0
- package/dist/cdcmarkupinclude.js +8 -0
- package/examples/example-config.json +6 -0
- package/package.json +39 -0
- package/src/CdcMarkupInclude.jsx +195 -0
- package/src/ConfigContext.js +5 -0
- package/src/components/EditorPanel.js +207 -0
- package/src/data/initial-state.js +7 -0
- package/src/index.html +11 -0
- package/src/index.js +16 -0
- package/src/scss/_variables.scss +29 -0
- package/src/scss/main.scss +5 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# @cdc/waffle-chart
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@cdc/waffle-chart)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
`<CdcWaffleChart />` is a React component produced by the CDC for highlighting/displaying a single piece of data in a card format. This package is part of the larger [CDC Open Visualization](https://github.com/CDCgov/cdc-open-viz) project.
|
|
7
|
+
|
|
8
|
+
### Installation and Usage
|
|
9
|
+
|
|
10
|
+
1. Install the package in your React project `npm install @cdc/waffle-chart`
|
|
11
|
+
2. Import the component and begin using in your code.
|
|
12
|
+
```JSX
|
|
13
|
+
import CdcWaffleChart from '@cdc/waffle-chart'
|
|
14
|
+
|
|
15
|
+
function App() {
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<div className="App">
|
|
19
|
+
<CdcWaffleChart config={configObj} />
|
|
20
|
+
</div>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export default App;
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Note, you must pass in a configuration object. Configuration objects can be created with the [Editor package](https://github.com/CDCgov/cdc-open-viz/tree/main/packages/editor).
|
|
28
|
+
|
|
29
|
+
### Properties
|
|
30
|
+
|
|
31
|
+
| Property | Type | Description |
|
|
32
|
+
|-------------------|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
33
|
+
| config | String | A JavaScript object with the configuration for the waffle chart. Pass either this or the configUrl property to setup your chart. |
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.CdcMarkupInclude=t(require("react")):e.CdcMarkupInclude=t(e.react)}(self,(function(e){return function(){var t={7162:function(e,t,n){e.exports=n(5047)},4013:function(e,t,n){"use strict";n.r(t);var r=n(2609),o=n.n(r)()(!1);o.push([e.id,"/*!\n * Load Awesome v1.1.0 (http://github.danielcardoso.net/load-awesome/)\n * Copyright 2015 Daniel Cardoso <@DanielCardoso>\n * Licensed under MIT\n */@keyframes ball-beat{50%{opacity:.2;-webkit-transform:scale(0.75);-moz-transform:scale(0.75);-o-transform:scale(0.75);transform:scale(0.75)}100%{opacity:1;-webkit-transform:scale(1);-moz-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}.cdc-open-viz-module .loading{text-align:center;position:absolute;z-index:3;background:rgba(255,255,255,.5);left:0;right:0;bottom:0;top:0;min-height:30%}.cdc-open-viz-module .loading span{display:block;margin-bottom:1em;font-size:1.3em}.cdc-open-viz-module .loading .la-ball-beat{position:relative;box-sizing:border-box;margin:0 auto;transform:scale(1.3);font-size:0;color:#777;display:flex;justify-content:center;align-items:center;width:108px;height:36px}.cdc-open-viz-module .loading .la-ball-beat.sm,.cdc-open-viz-module .loading .la-ball-beat.xs,.cdc-open-viz-module .loading .la-ball-beat.xxs{transform:scale(0.7)}.cdc-open-viz-module .loading .la-ball-beat div+div{margin-left:10px}.cdc-open-viz-module .loading .la-ball-beat>div{position:relative;box-sizing:border-box;width:20px;height:20px;border-radius:100%;animation:ball-beat .7s -0.15s infinite linear;display:inline-block;background-color:currentColor;border:0 solid currentColor}.cdc-open-viz-module .loading .la-ball-beat>div:nth-child(2n-1){animation-delay:-0.5s}",""]),t.default=o},942:function(e,t,n){"use strict";n.r(t);var r=n(2609),o=n.n(r),i=n(8991),a=n.n(i),c=n(5417),l=n(6530),s=n(4613),u=n(9029),d=o()(!1),p=a()(c.Z),f=a()(l.Z),h=a()(s.Z),m=a()(u.Z);d.push([e.id,'@keyframes fadein{0%{opacity:0}100%{opacity:1}}@keyframes ball-beat{50%{opacity:.2;-webkit-transform:scale(0.75);-moz-transform:scale(0.75);-o-transform:scale(0.75);transform:scale(0.75)}100%{opacity:1;-webkit-transform:scale(1);-moz-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}.cove div,.cove span,.cove applet,.cove object,.cove iframe,.cove h1,.cove h2,.cove h3,.cove h4,.cove h5,.cove h6,.cove p,.cove blockquote,.cove pre,.cove a,.cove abbr,.cove acronym,.cove address,.cove big,.cove cite,.cove code,.cove del,.cove dfn,.cove em,.cove img,.cove ins,.cove kbd,.cove q,.cove s,.cove samp,.cove small,.cove strike,.cove strong,.cove sub,.cove sup,.cove tt,.cove var,.cove b,.cove u,.cove i,.cove center,.cove dl,.cove dt,.cove dd,.cove ol,.cove ul,.cove li,.cove fieldset,.cove form,.cove label,.cove legend,.cove table,.cove caption,.cove tbody,.cove tfoot,.cove thead,.cove tr,.cove th,.cove td,.cove article,.cove aside,.cove canvas,.cove details,.cove embed,.cove figure,.cove figcaption,.cove footer,.cove header,.cove hgroup,.cove menu,.cove nav,.cove output,.cove ruby,.cove section,.cove summary,.cove time,.cove mark,.cove audio,.cove video{margin:0;padding:0;border:0;font-family:sans-serif;font-weight:normal;vertical-align:baseline}.cove button{border:0;cursor:pointer}.cove button:focus{outline:0}.cove *{box-sizing:border-box}.cove sub,.cove sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.cove sup{top:-0.5em}.cove sub{bottom:-0.25em}.cove{margin:0;font:1em/1.6 system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Droid Sans,Helvetica Neue,Fira Sans,sans-serif;font-weight:400;font-style:normal;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#111}.cove strong{font-weight:600}.cove .subtext{margin-top:1em}.cove .warning{padding:.75em 1em;margin:1em 0;background-color:#ffd2d2;color:#d8000c;font-size:.8em;border:#d8000c 1px solid;border-radius:.4em}.cove .warning strong{font-weight:600;display:block}.cove .sr-only,.cove .sr-only-focusable:not(:focus){position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important;display:flex}.cove .cove-editor{display:grid;grid-template-columns:auto 1fr;grid-template-areas:"panel content";height:100vh}.cove .cove-editor .cove-editor__panel{grid-area:panel;width:350px;transition:width 500ms ease;background:#fff;border-right:1px solid #c2c2c2;overflow-x:hidden;overflow-y:auto;z-index:7}.cove .cove-editor .cove-editor__heading{font-size:1.2em}.cove .cove-editor .cove-editor__panel-container{width:350px;min-width:350px}.cove .cove-editor .cove-editor__content{grid-area:content}.cove .cove-editor .cove-editor__content .cove-editor__content-wrap{margin:3em auto 0;max-width:35em}.cove .cove-editor .cove-editor--toggle{position:absolute;top:10px;left:307px;width:25px;height:25px;background-color:#f2f2f2;border-radius:60px;color:#000;font-size:1em;border:0;cursor:pointer;transition:left 400ms ease 65ms,background-color 200ms ease;box-shadow:rgba(0,0,0,.5) 0 1px 2px;z-index:8}.cove .cove-editor .cove-editor--toggle:before{top:43%;left:50%;transform:translate(-50%, -50%);position:absolute;content:"«"}.cove .cove-editor .cove-editor--toggle.collapsed{left:1em;margin-left:0}.cove .cove-editor .cove-editor--toggle.collapsed:before{content:"»"}.cove .cove-editor .cove-editor--toggle:hover{background-color:#fff}.cove .cove-editor__panel.hidden{width:0}.cove .cove-editor__panel .two-col-inputs{display:flex;margin-top:1em;justify-content:space-between}.cove .cove-editor__panel .two-col-inputs>label{width:48%;margin-top:0 !important}.cove .cove-editor__panel .divider-heading{display:block;font-size:1em;margin-top:1em}.cove .cove-editor__panel .series-list{list-style:none;border:#c7c7c7 1px solid}.cove .cove-editor__panel .series-list:empty{border:none !important}.cove .cove-editor__panel .series-list li{padding:.3em .5em;display:flex;align-items:center;justify-content:space-between;font-size:.9em}.cove .cove-editor__panel .series-list li:hover{background-color:#f2f2f2}.cove .cove-editor__panel .series-list li span{font-size:.8em;color:red;cursor:pointer}.cove .cove-editor__panel .series-list li+li{border-top:#c7c7c7 1px solid}.cove .cove-editor__panel .form-container{border-right:#c7c7c7 1px solid;flex-grow:1}.cove .cove-editor__panel .guidance-link{margin:2em 1em 0;padding:.75em 1em}.cove .cove-editor__panel .guidance-link svg{width:60px;color:#005eaa;margin-right:1rem;height:60px}.cove .cove-editor__panel .guidance-link svg path{fill:currentColor}.cove .cove-editor__panel h2{background:#565656;color:#fff;font-size:1.1em;padding:.6em 1em;position:relative;border-bottom:#565656 3px solid;z-index:3}.cove .cove-editor__panel fieldset{display:block}.cove .cove-editor__panel .primary-fieldset{padding:0;margin:0;border:0}.cove .cove-editor__panel ul.column-edit{list-style:none}.cove .cove-editor__panel ul.column-edit li{margin-top:1em}.cove .cove-editor__panel ul.column-edit .three-col{display:flex;justify-content:space-between}.cove .cove-editor__panel ul.column-edit .three-col>label{margin-top:0;width:30%;display:inline-block}.cove .cove-editor__panel ul.column-edit .three-col>label input[type=text],.cove .cove-editor__panel ul.column-edit .three-col>label input[type=number]{width:50px}.cove .cove-editor__panel .remove-column{float:right;text-transform:uppercase;color:#c32b2b;font-size:.7em;line-height:1.6em;border-radius:5px;margin:0 auto;transition:.1s all;border:0;text-decoration:underline;outline:0;cursor:pointer;font-weight:bold}.cove .cove-editor__panel .edit-block{padding-left:1em;border-left:rgba(0,0,0,.2) 4px solid;transition:.2s all}.cove .cove-editor__panel .edit-block:not(:first-child){margin-top:2em}.cove .cove-editor__panel .edit-block input[type=text],.cove .cove-editor__panel .edit-block input[type=number]{font-size:1em}.cove .cove-editor__panel .edit-block label{margin-top:0}.cove .cove-editor__panel .edit-block label+label{margin-top:1em}.cove .cove-editor__panel .edit-block:hover{border-left:rgba(0,0,0,.7) 4px solid;transition:.2s all}.cove .cove-editor__panel span.subtext{display:block;color:rgba(0,0,0,.5);text-transform:none;font-weight:normal}.cove .cove-editor__panel .btn{margin-top:1em}.cove .cove-editor__panel .sort-list{list-style:none}.cove .cove-editor__panel .sort-list>li{margin-right:.3em;margin-bottom:.3em}.cove .cove-editor__panel .sort-list li>div{display:block;box-sizing:border-box;border:1px solid #d1d1d1;border-radius:2px;background:#f1f1f1;padding:.4em .6em;font-size:.8em;margin-bottom:.3em;cursor:move}.cove .cove-editor__panel .info{font-size:.8em;line-height:1.4em;font-style:italic;padding-top:10px}.cove .cove-editor__panel .react-tags__search{width:100%}.cove .cove-editor__panel .react-tags{position:relative;cursor:text}.cove .cove-editor__panel .react-tags input.react-tags__search-input{font-size:.8rem}.cove .cove-editor__panel .react-tags span{display:inline}.cove .cove-editor__panel .react-tags.is-focused{border-color:rgba(0,0,0,.7)}.cove .cove-editor__panel .react-tags__selected{display:inline}.cove .cove-editor__panel .react-tags__selected-tag{display:inline-block;box-sizing:border-box;border:1px solid #d1d1d1;border-radius:2px;background:#f1f1f1;padding:.4em .6em;font-size:.8em;margin-right:.3em;margin-bottom:.3em}.cove .cove-editor__panel .react-tags__selected-tag::after{content:"✕";color:#aaa;margin-left:8px}.cove .cove-editor__panel .react-tags__selected-tag:hover,.cove .cove-editor__panel .react-tags__selected-tag:focus{border-color:#b1b1b1}.cove .cove-editor__panel .react-tags__search{display:inline-block;max-width:100%}.cove .cove-editor__panel .react-tags__search input{max-width:100%;margin:0;outline:none;padding:.5em .3em;font-size:inherit;line-height:inherit}.cove .cove-editor__panel .react-tags__search input::-ms-clear{display:none}@media screen and (min-width: 30em){.cove .cove-editor__panel .react-tags__search{position:relative}}.cove .cove-editor__panel .react-tags__suggestions{position:absolute;top:100%;left:0;width:100%}.cove .cove-editor__panel .react-tags__suggestions ul{margin:4px -1px;padding:0;list-style:none;background:#fff;border:1px solid #d1d1d1;border-radius:2px;box-shadow:0 2px 6px rgba(0,0,0,.2)}.cove .cove-editor__panel .react-tags__suggestions li{border-bottom:1px solid #ddd;padding:6px 8px}.cove .cove-editor__panel .react-tags__suggestions li:hover{cursor:pointer;background:#eee}.cove .cove-editor__panel .react-tags__suggestions li.is-active{background:#b7cfe0}.cove .cove-editor__panel .react-tags__suggestions li.is-disabled{opacity:.5;cursor:auto}.cove .cove-editor__panel .react-tags__suggestions li mark{text-decoration:underline;background:none;font-weight:600}@media screen and (min-width: 30em){.cove .cove-editor__panel .react-tags__suggestions{width:240px}}.cove .advanced{padding:0 1em 1em;text-align:left}.cove .advanced p{font-size:.8rem}.cove .advanced .advanced-toggle-link{padding-top:1em;display:block;text-align:left;cursor:pointer;color:rgba(0,0,0,.5);text-decoration:underline}.cove .advanced .advanced-toggle-link span{text-decoration:none;display:inline-block;font-family:monospace;padding-right:5px}.cove .advanced .advanced-toggle-link:hover{color:rgba(0,0,0,.7)}.cove .advanced textarea{height:400px;width:100%;font-size:.9em;padding:.5em;font-family:monospace;box-sizing:border-box}.cove ul.color-palette{display:flex;max-width:100%;padding:0;list-style:none;flex-wrap:wrap}.cove ul.color-palette li{display:flex;width:21px;height:21px;border-radius:40px;margin-right:4px;margin-bottom:10px;overflow:hidden;cursor:pointer;position:relative}.cove ul.color-palette li .click-target{position:absolute;top:0;left:0;right:0;bottom:0}.cove ul.color-palette li.selected{border:rgba(0,0,0,.8) 2px solid}.cove ul.color-palette li span{width:33.3%}.header .cove ul.color-palette li{width:21px;height:21px;border-radius:40px;margin-right:2.8px}.cove .accordion__heading{background:#f2f2f2}.cove .accordion__item select{text-transform:capitalize}.cove .accordion__item .number-narrow{min-width:auto;width:75px}.cove .accordion__button{cursor:pointer;font-size:1em;padding:.3em 1em;width:100%;text-align:left;position:relative;border-bottom:1px solid rgba(0,0,0,.2)}.cove .accordion__button::before{display:inline-block;content:"";height:7px;width:7px;margin-right:1em;border-bottom:2px solid currentColor;border-right:2px solid currentColor;right:0;position:absolute;top:50%;transform:rotate(-45deg) translateY(-50%);transition:.1s all}.cove .accordion__button[aria-expanded=true]::before,.cove .accordion__button[aria-selected=true]::before{transform:rotate(45deg) translateY(-50%);margin-right:1.3em;transition:.1s all}.cove .accordion__panel{border-bottom:1px solid rgba(0,0,0,.2);padding:1em 1.25em 2em;animation:fadein .2s ease-in}.cove .accordion__panel:first-child{margin-top:0}.cove .accordion__panel h5{font-size:.8em}.cove .accordion__panel-section{padding:16px;border:1px solid #c4c4c4;border-radius:8px;margin-top:8px;margin-bottom:24px}.cove .accordion__panel-row{display:flex;justify-content:flex-start;margin-left:-4px;margin-right:-4px}.cove .accordion__panel-col{flex:1 1 0;padding-left:4px;padding-right:4px}.cove .accordion__panel-label,.cove .accordion__panel-label--muted,.cove .accordion__panel-label--inline{font-size:14px;text-transform:unset;font-weight:normal;line-height:16px;user-select:none}.cove .accordion__small-inputs input[type=text]{display:block;width:100%;height:22px;min-width:unset !important;padding-top:0;padding-bottom:0;font-size:1.1em;line-height:1em;box-sizing:border-box}.cove .accordion__panel-label--inline{text-align:right;margin-right:8px}.cove .accordion__panel-label--muted{color:#6f6f6f}.cove .accordion__panel-checkbox{display:block;width:18px;height:18px;border:1px solid #c4c4c4;cursor:pointer}.cove .accordion__panel-checkbox.checked::after{content:"L";display:block;position:relative;top:-7px;left:-3px;transform:scaleX(-1) rotate(-35deg);font-size:16px;font-weight:bold;color:#025eaa;pointer-events:none}.cove .accordion__input-error{color:#d8000c;border:#d8000c 1px solid}.cove .accordion__panel-error{color:#d8000c;background-color:#ffd2d2;border:#d8000c 1px solid;margin-top:12px;padding:4px 8px;line-height:1.2em;font-size:14px;border-radius:4px}.cove .error-box{display:flex;padding:.3rem 1rem;justify-content:space-between;background:#ffc2c2;font-size:.9rem}.cove .error-box strong{font-weight:600}.cove .error-box p{margin:0}.cove .error-box .dismiss-error{flex-shrink:0;font-size:.8rem;cursor:pointer}.cove .warning{color:#d8000c;background-color:#ffd2d2;border:#d8000c 1px solid;padding:.75em 1em;margin:1em 0;font-size:.8em;border-radius:.4em}.cove .warning strong{font-weight:600;display:block}.cove .btn{background:#005eaa;color:#fff;border:0;padding:.4em .8em;font-size:1em;display:block;border-radius:.3em;transition:.1s background-color;cursor:pointer}.cove .btn.full-width{width:100%}.cove .btn:hover{transition:.1s background-color}.cove .btn.secondary{font-size:.8em;padding:.3em 1em;background:rgba(0,0,0,.3);display:inline-block;margin-bottom:1em}.cove .btn.secondary:hover{background:rgba(0,0,0,.5)}.cove .btn.danger{background-color:#d8000c;color:#fff}.cove .btn.danger:hover{background-color:#bf000b}.cove .btn:hover{transition:.1s all;background:#006cc4}.cove .btn svg{width:16px;height:16px;position:relative;top:2px;margin-left:5px}.cove .cove-component .cove-component__header{width:100%;padding:.6em .8em;margin-bottom:1em;border-bottom-width:3px;border-bottom-style:solid;font-size:1.1em;transition:background-color 200ms ease,border-color 200ms ease;color:#fff}.cove .collapsed+.table-container{border-bottom:none}.cove .table-container{overflow-x:auto;border-right:1px solid #c7c7c7;border-left:1px solid #c7c7c7;border-bottom:1px solid #c7c7c7}.cove div.data-table-heading{background:rgba(0,0,0,.05);padding:.5em .7em;border:#c7c7c7 1px solid;border-bottom:0;cursor:pointer;background-image:url('+p+");background-size:15px 15px;background-position:right .7em center;background-repeat:no-repeat}.cove div.data-table-heading:focus{z-index:2;position:relative}.cove div.data-table-heading.collapsed{background-image:url("+f+");background-size:15px 15px;background-position:right .7em center;background-repeat:no-repeat;border-bottom:#c7c7c7 1px solid}.cove table.data-table{width:100%;background:#fff;position:relative;border:none;overflow-x:auto;border-collapse:collapse;overflow:auto;appearance:none}.cove table.data-table *{box-sizing:border-box}.cove table.data-table thead{user-select:none;-moz-user-select:none;user-select:none}.cove table.data-table thead tr{background:none}.cove table.data-table thead{color:#fff;background-color:#565656}.cove table.data-table thead .resizer{cursor:e-resize;width:10px;position:absolute;top:0;bottom:0;right:0;touch-action:none}.cove table.data-table thead tr{text-align:left}.cove table.data-table thead th,.cove table.data-table thead td{padding:.5em 1.3em .5em .7em;line-height:normal;position:relative;text-align:left;cursor:pointer;border-right:1px solid #c7c7c7 !important}.cove table.data-table thead th svg,.cove table.data-table thead td svg{margin-left:1rem}.cove table.data-table thead th.sort{background-color:#3d3d3d;background-repeat:no-repeat;background-position:right .5em center;background-size:10px 5px}.cove table.data-table thead th.sort-asc,.cove table.data-table thead td.sort-asc{background-image:url("+h+")}.cove table.data-table thead th.sort-desc,.cove table.data-table thead td.sort-desc{background-image:url("+m+')}.cove table.data-table thead th:last-child,.cove table.data-table thead td:last-child{border-right:0}.cove table.data-table tbody tr{width:100%}.cove table.data-table tbody tr:hover{background:rgba(0,0,0,.05)}.cove table.data-table tr{border-bottom:solid 1px #e5e5e5;min-width:100%}.cove table.data-table tr:last-child{border-bottom:0}.cove table.data-table td{padding:.3em .7em;border-right:1px solid rgba(0,0,0,.1)}.cove table.data-table th,.cove table.data-table td{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.cove table.data-table th:last-child,.cove table.data-table td:last-child{border-right:0 !important}.cove table.data-table th:first-child,.cove table.data-table td:first-child{flex-grow:1}.cove table.data-table td{position:relative}.cove table.data-table td a{padding:.3em .7em;position:absolute;top:0;bottom:0;right:0;left:0;display:block;color:inherit;text-decoration:none}.cove table.data-table td span.table-link{text-decoration:underline;cursor:pointer;color:#075290}.cove table.data-table td span.table-link svg{max-width:13px;vertical-align:baseline;margin-left:5px}.cove .no-data{position:relative}.cove .no-data .no-data-message{background:rgba(255,255,255,.5);top:0;left:0;right:0;bottom:0;position:absolute;text-align:center;display:flex;align-items:center;justify-content:center;z-index:7}.cove .no-data .no-data-message h3{font-size:1.3rem;font-weight:600;margin-bottom:.3rem}.cove .no-data tr:hover{background:#fff}.cove .no-data th,.cove .no-data td{width:50%}.cove .no-data th::before,.cove .no-data td::before{content:" "}.cove .data-table-pagination{margin:1rem 0;display:flex;align-items:center}.cove .data-table-pagination ul{list-style:none;margin:0 1rem 0 0;display:flex}.cove .data-table-pagination ul li+li{margin-left:.3rem}.cove .data-table-pagination ul button{background:#565656;padding:.6rem .8rem}.cove .data-table-pagination ul button:hover{background:#636363}.cove .data-table-pagination ul button.btn-next::before{content:" ";background-image:url('+h+');background-size:10px 5px;width:10px;height:5px;display:block;transform:rotate(90deg)}.cove .data-table-pagination ul button.btn-prev::before{content:" ";background-image:url('+h+');background-size:10px 5px;width:10px;height:5px;display:block;transform:rotate(-90deg)}.cove .data-table-pagination ul button[disabled]{background:#565656;opacity:.3;cursor:default}.cove .data-table-pagination ul button[disabled]:hover{background:#565656}.cove .btn-download{color:#fff;float:right;text-decoration:none;transition:.3s all;margin:1em 0}.cove .btn-download:hover{transition:.3s all}.cove .header{position:relative;padding:.6em .8em;margin:0;color:#fff;font-size:1.1em;border-bottom-width:3px;border-bottom-style:solid}.cove .header:not(:empty){margin:0 0 1rem 0}.cove .inline-icon{width:1em !important;height:auto !important;font-size:1rem;color:inherit}@media all and (-ms-high-contrast: none){.cove .inline-icon{height:30px !important}}.cove .inline-icon path{fill:currentColor}.cove input,.cove datalist,.cove textarea,.cove select{transition:border-color 200ms cubic-bezier(0.16, 1, 0.3, 1);font-family:sans-serif}.cove input[type=text],.cove input[type=number],.cove input[type=date],.cove input[type=search],.cove datalist,.cove textarea,.cove select{padding:.5em .5em;border-width:1px;border-style:solid;border-color:#cbcbcb;border-radius:3px;width:100%}.cove input[type=text]::placeholder,.cove input[type=number]::placeholder,.cove input[type=date]::placeholder,.cove input[type=search]::placeholder,.cove datalist::placeholder,.cove textarea::placeholder,.cove select::placeholder{transition:opacity 400ms cubic-bezier(0.16, 1, 0.3, 1);color:#b3b3b3;opacity:1}.cove input[type=text]:focus,.cove input[type=number]:focus,.cove input[type=date]:focus,.cove input[type=search]:focus,.cove datalist:focus,.cove textarea:focus,.cove select:focus{border-width:1px;border-style:solid;border-color:#4c4c4c;outline:0}.cove input[type=text]:focus::placeholder,.cove input[type=number]:focus::placeholder,.cove input[type=date]:focus::placeholder,.cove input[type=search]:focus::placeholder,.cove datalist:focus::placeholder,.cove textarea:focus::placeholder,.cove select:focus::placeholder{opacity:0}.cove select.input--small{padding:0}.cove textarea{width:100%;min-height:140px;max-width:100%;line-height:1.5em}.cove label{display:block;font-size:.8em;text-transform:uppercase;user-select:none}.cove label:not(:first-child){margin-top:1em}.cove .input-group:not(:last-child){margin-bottom:1.5em}.cove .input-group>label{margin-bottom:.5rem}.cove .input-group .input-group--checkbox:last-of-type,.cove .input-group .input-group--radio:last-of-type{margin-bottom:0}.cove .input-group--checkbox{margin-bottom:1rem}.cove .input-group--checkbox,.cove .input-group--radio{display:flex;align-items:center}.cove .input-group--checkbox label,.cove .input-group--checkbox input[type=checkbox],.cove .input-group--checkbox input[type=radio],.cove .input-group--radio label,.cove .input-group--radio input[type=checkbox],.cove .input-group--radio input[type=radio]{cursor:pointer;user-select:none}.cove .input-group--checkbox label,.cove .input-group--radio label{padding-right:6px}.cove .input-group--checkbox label+input[type=checkbox],.cove .input-group--checkbox label+input[type=radio],.cove .input-group--radio label+input[type=checkbox],.cove .input-group--radio label+input[type=radio]{margin-left:0}.cove .input-group--checkbox input[type=checkbox],.cove .input-group--checkbox input[type=radio],.cove .input-group--radio input[type=checkbox],.cove .input-group--radio input[type=radio]{display:inline-block;margin-right:0;margin-left:0}.cove .input-group--checkbox input[type=checkbox]+label,.cove .input-group--checkbox input[type=radio]+label,.cove .input-group--radio input[type=checkbox]+label,.cove .input-group--radio input[type=radio]+label{padding-right:0;padding-left:6px}.cove .input-group--checkbox input[type=radio],.cove .input-group--radio input[type=radio]{margin-bottom:5px}.cove .guidance-link{display:flex;position:relative;padding:.75em 1em;margin:2em 0 1em;text-decoration:none;font-size:1em;border:#c7c7c7 1px solid;color:#444;transition:.2s all}.cove .guidance-link:before{content:" ";position:absolute;top:-1px;left:-1px;bottom:-1px;width:5px;background:#005eaa}.cove .guidance-link:hover{background:#f2f2f2;color:#444;transition:.2s all}.cove .guidance-link>div{font-size:.9em}.cove .guidance-link svg{width:60px;color:#005eaa;margin-right:1rem}.cove .guidance-link svg path{fill:currentColor}.cove .guidance-link h3{font-weight:600;font-size:1.2rem}.cove .waiting{background:rgba(255,255,255,.5);top:0;left:0;right:0;bottom:0;position:absolute;text-align:center;display:flex;align-items:center;justify-content:center;z-index:7;padding-top:0}.cove .waiting.collapsed{padding:2em !important}.cove .waiting .waiting-container{max-width:400px}.cove .waiting h3{font-size:1.3rem;font-weight:600;margin-bottom:.3rem}.cove .waiting p{font-size:1em}.cove .waiting p strong{font-weight:bold}.cove .loading{position:absolute;top:0;right:0;bottom:0;left:0;min-height:30%;text-align:center;background:rgba(255,255,255,.5);z-index:3}.cove .loading span{display:block;margin-bottom:1em;font-size:1.3em}.cove .loading .la-ball-beat{display:flex;position:relative;justify-content:center;align-items:center;width:108px;height:36px;margin:0 auto;font-size:0;transform:scale(1.3);color:#777}.cove .loading .la-ball-beat.sm,.cove .loading .la-ball-beat.xs,.cove .loading .la-ball-beat.xxs{transform:scale(0.7)}.cove .loading .la-ball-beat div+div{margin-left:10px}.cove .loading .la-ball-beat>div{display:inline-block;position:relative;width:20px;height:20px;background-color:currentColor;border:0 solid currentColor;border-radius:100%;animation:ball-beat .7s -0.15s infinite linear}.cove .loading .la-ball-beat>div:nth-child(2n-1){animation-delay:-0.5s}.cove .theme-amber{background-color:#fbab18;border-color:#ffd54f}.cove .theme-blue{background-color:#005eaa;border-color:#88c3ea}.cove .theme-brown{background-color:#705043;border-color:#ad907b}.cove .theme-cyan{background-color:#006778;border-color:#65b0bd}.cove .theme-green{background-color:#4b830d;border-color:#84bc49}.cove .theme-indigo{background-color:#26418f;border-color:#92a6dd}.cove .theme-orange{background-color:#bb4d00;border-color:#ffad42}.cove .theme-pink{background-color:#af4448;border-color:#e57373}.cove .theme-purple{background-color:#712177;border-color:#b890bb}.cove .theme-slate{background-color:#29434e;border-color:#7e9ba5}.cove .theme-teal{background-color:#00695c;border-color:#4ebaaa}.cove{color:#333;font-size:14px;line-height:1.4}.cove.md,.cove.lg{font-size:16px}html,body{margin:0}',""]),t.default=d},2609:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var o=(a=r,c=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(c),"/*# ".concat(l," */")),i=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")}));return[n].concat(i).concat([o]).join("\n")}var a,c,l;return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(r)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(o[a]=!0)}for(var c=0;c<e.length;c++){var l=[].concat(e[c]);r&&o[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),t.push(l))}},t}},8991:function(e){"use strict";e.exports=function(e,t){return t||(t={}),"string"!=typeof(e=e&&e.__esModule?e.default:e)?e:(/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e)}},5047:function(e){var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof v?t:v,i=Object.create(o.prototype),a=new C(r||[]);return i._invoke=function(e,t,n){var r=d;return function(o,i){if(r===f)throw new Error("Generator is already running");if(r===h){if("throw"===o)throw i;return j()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=O(a,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=f;var l=u(e,t,n);if("normal"===l.type){if(r=n.done?h:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=h,n.method="throw",n.arg=l.arg)}}}(e,n,a),i}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var d="suspendedStart",p="suspendedYield",f="executing",h="completed",m={};function v(){}function g(){}function b(){}var y={};l(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(T([])));w&&w!==n&&r.call(w,i)&&(y=w);var E=b.prototype=v.prototype=Object.create(y);function k(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function n(o,i,a,c){var l=u(e[o],e,i);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,c)}),(function(e){n("throw",e,a,c)})):t.resolve(d).then((function(e){s.value=e,a(s)}),(function(e){return n("throw",e,a,c)}))}c(l.arg)}var o;this._invoke=function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}}function O(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,O(e,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var o=u(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function T(e){if(e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}return{next:j}}function j(){return{value:t,done:!0}}return g.prototype=b,l(E,"constructor",b),l(b,"constructor",g),g.displayName=l(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,c,"GeneratorFunction")),e.prototype=Object.create(E),e},e.awrap=function(e){return{__await:e}},k(_.prototype),l(_.prototype,a,(function(){return this})),e.AsyncIterator=_,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new _(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(E),l(E,c,"Generator"),l(E,i,(function(){return this})),l(E,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=T,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(l&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:T(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},8291:function(e,t,n){var r=n(6062),o=n(4013);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},4874:function(e,t,n){var r=n(6062),o=n(942);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},6062:function(e,t,n){"use strict";var r,o=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function c(e){for(var t=-1,n=0;n<a.length;n++)if(a[n].identifier===e){t=n;break}return t}function l(e,t){for(var n={},r=[],o=0;o<e.length;o++){var i=e[o],l=t.base?i[0]+t.base:i[0],s=n[l]||0,u="".concat(l," ").concat(s);n[l]=s+1;var d=c(u),p={css:i[1],media:i[2],sourceMap:i[3]};-1!==d?(a[d].references++,a[d].updater(p)):a.push({identifier:u,updater:v(p,t),references:1}),r.push(u)}return r}function s(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var o=n.nc;o&&(r.nonce=o)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var a=i(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var u,d=(u=[],function(e,t){return u[e]=t,u.filter(Boolean).join("\n")});function p(e,t,n,r){var o=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=d(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function f(e,t,n){var r=n.css,o=n.media,i=n.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var h=null,m=0;function v(e,t){var n,r,o;if(t.singleton){var i=m++;n=h||(h=s(t)),r=p.bind(null,n,i,!1),o=p.bind(null,n,i,!0)}else n=s(t),r=f.bind(null,n,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=o());var n=l(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var o=c(n[r]);a[o].references--}for(var i=l(e,t),s=0;s<n.length;s++){var u=c(n[s]);0===a[u].references&&(a[u].updater(),a.splice(u,1))}n=i}}}},4613:function(e,t){"use strict";t.Z="data:image/svg+xml,%3csvg viewBox='0 0 10 5' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M0 5l5-5 5 5z' fill='white' fill-rule='nonzero'/%3e%3c/svg%3e"},9029:function(e,t){"use strict";t.Z="data:image/svg+xml,%3csvg viewBox='0 0 10 5' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M0 0l5 5 5-5z' fill='white' fill-rule='nonzero'/%3e%3c/svg%3e"},5417:function(e,t){"use strict";t.Z="data:image/svg+xml,%3csvg viewBox='0 0 10 2' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M4 0H0v2h10V0H6z' fill-rule='nonzero'/%3e%3c/svg%3e"},6530:function(e,t){"use strict";t.Z="data:image/svg+xml,%3csvg viewBox='0 0 10 10' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M6 0H4v4H0v2h4v4h2V6h4V4H6z' fill-rule='nonzero'/%3e%3c/svg%3e"},9669:function(e,t,n){e.exports=n(1609)},5448:function(e,t,n){"use strict";var r=n(4867),o=n(6026),i=n(4372),a=n(5327),c=n(4097),l=n(4109),s=n(7985),u=n(5061),d=n(7874),p=n(5263);e.exports=function(e){return new Promise((function(t,n){var f,h=e.data,m=e.headers,v=e.responseType;function g(){e.cancelToken&&e.cancelToken.unsubscribe(f),e.signal&&e.signal.removeEventListener("abort",f)}r.isFormData(h)&&delete m["Content-Type"];var b=new XMLHttpRequest;if(e.auth){var y=e.auth.username||"",x=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";m.Authorization="Basic "+btoa(y+":"+x)}var w=c(e.baseURL,e.url);function E(){if(b){var r="getAllResponseHeaders"in b?l(b.getAllResponseHeaders()):null,i={data:v&&"text"!==v&&"json"!==v?b.response:b.responseText,status:b.status,statusText:b.statusText,headers:r,config:e,request:b};o((function(e){t(e),g()}),(function(e){n(e),g()}),i),b=null}}if(b.open(e.method.toUpperCase(),a(w,e.params,e.paramsSerializer),!0),b.timeout=e.timeout,"onloadend"in b?b.onloadend=E:b.onreadystatechange=function(){b&&4===b.readyState&&(0!==b.status||b.responseURL&&0===b.responseURL.indexOf("file:"))&&setTimeout(E)},b.onabort=function(){b&&(n(u("Request aborted",e,"ECONNABORTED",b)),b=null)},b.onerror=function(){n(u("Network Error",e,null,b)),b=null},b.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||d;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(u(t,e,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",b)),b=null},r.isStandardBrowserEnv()){var k=(e.withCredentials||s(w))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;k&&(m[e.xsrfHeaderName]=k)}"setRequestHeader"in b&&r.forEach(m,(function(e,t){void 0===h&&"content-type"===t.toLowerCase()?delete m[t]:b.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(b.withCredentials=!!e.withCredentials),v&&"json"!==v&&(b.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&b.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&b.upload&&b.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(f=function(e){b&&(n(!e||e&&e.type?new p("canceled"):e),b.abort(),b=null)},e.cancelToken&&e.cancelToken.subscribe(f),e.signal&&(e.signal.aborted?f():e.signal.addEventListener("abort",f))),h||(h=null),b.send(h)}))}},1609:function(e,t,n){"use strict";var r=n(4867),o=n(1849),i=n(321),a=n(7185);var c=function e(t){var n=new i(t),c=o(i.prototype.request,n);return r.extend(c,i.prototype,n),r.extend(c,n),c.create=function(n){return e(a(t,n))},c}(n(5546));c.Axios=i,c.Cancel=n(5263),c.CancelToken=n(4972),c.isCancel=n(6502),c.VERSION=n(7288).version,c.all=function(e){return Promise.all(e)},c.spread=n(8713),c.isAxiosError=n(6268),e.exports=c,e.exports.default=c},5263:function(e){"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},4972:function(e,t,n){"use strict";var r=n(5263);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t<r;t++)n._listeners[t](e);n._listeners=null}})),this.promise.then=function(e){var t,r=new Promise((function(e){n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},o.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},6502:function(e){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:function(e,t,n){"use strict";var r=n(4867),o=n(5327),i=n(782),a=n(3572),c=n(7185),l=n(4875),s=l.validators;function u(e){this.defaults=e,this.interceptors={request:new i,response:new i}}u.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=c(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&l.assertOptions(n,{silentJSONParsing:s.transitional(s.boolean),forcedJSONParsing:s.transitional(s.boolean),clarifyTimeoutError:s.transitional(s.boolean)},!1);var r=[],o=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(o=o&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));var i,u=[];if(this.interceptors.response.forEach((function(e){u.push(e.fulfilled,e.rejected)})),!o){var d=[a,void 0];for(Array.prototype.unshift.apply(d,r),d=d.concat(u),i=Promise.resolve(t);d.length;)i=i.then(d.shift(),d.shift());return i}for(var p=t;r.length;){var f=r.shift(),h=r.shift();try{p=f(p)}catch(e){h(e);break}}try{i=a(p)}catch(e){return Promise.reject(e)}for(;u.length;)i=i.then(u.shift(),u.shift());return i},u.prototype.getUri=function(e){return e=c(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,n){return this.request(c(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(t,n,r){return this.request(c(r||{},{method:e,url:t,data:n}))}})),e.exports=u},782:function(e,t,n){"use strict";var r=n(4867);function o(){this.handlers=[]}o.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},4097:function(e,t,n){"use strict";var r=n(1793),o=n(7303);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},5061:function(e,t,n){"use strict";var r=n(481);e.exports=function(e,t,n,o,i){var a=new Error(e);return r(a,t,n,o,i)}},3572:function(e,t,n){"use strict";var r=n(4867),o=n(8527),i=n(6502),a=n(5546),c=n(5263);function l(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new c("canceled")}e.exports=function(e){return l(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return l(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(l(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:function(e){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},7185:function(e,t,n){"use strict";var r=n(4867);e.exports=function(e,t){t=t||{};var n={};function o(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function i(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:o(void 0,e[n]):o(e[n],t[n])}function a(e){if(!r.isUndefined(t[e]))return o(void 0,t[e])}function c(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:o(void 0,e[n]):o(void 0,t[n])}function l(n){return n in t?o(e[n],t[n]):n in e?o(void 0,e[n]):void 0}var s={url:a,method:a,data:a,baseURL:c,transformRequest:c,transformResponse:c,paramsSerializer:c,timeout:c,timeoutMessage:c,withCredentials:c,adapter:c,responseType:c,xsrfCookieName:c,xsrfHeaderName:c,onUploadProgress:c,onDownloadProgress:c,decompress:c,maxContentLength:c,maxBodyLength:c,transport:c,httpAgent:c,httpsAgent:c,cancelToken:c,socketPath:c,responseEncoding:c,validateStatus:l};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=s[e]||i,o=t(e);r.isUndefined(o)&&t!==l||(n[e]=o)})),n}},6026:function(e,t,n){"use strict";var r=n(5061);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},8527:function(e,t,n){"use strict";var r=n(4867),o=n(5546);e.exports=function(e,t,n){var i=this||o;return r.forEach(n,(function(n){e=n.call(i,e,t)})),e}},5546:function(e,t,n){"use strict";var r=n(4867),o=n(6016),i=n(481),a=n(7874),c={"Content-Type":"application/x-www-form-urlencoded"};function l(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s,u={transitional:a,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(s=n(5448)),s),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(l(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(l(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||u.transitional,n=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,a=!n&&"json"===this.responseType;if(a||o&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(a){if("SyntaxError"===e.name)throw i(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){u.headers[e]=r.merge(c)})),e.exports=u},7874:function(e){"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},7288:function(e){e.exports={version:"0.26.1"}},1849:function(e){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},5327:function(e,t,n){"use strict";var r=n(4867);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(r.isURLSearchParams(t))i=t.toString();else{var a=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),a.push(o(t)+"="+o(e))})))})),i=a.join("&")}if(i){var c=e.indexOf("#");-1!==c&&(e=e.slice(0,c)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},7303:function(e){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4372:function(e,t,n){"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,i,a){var c=[];c.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&c.push("expires="+new Date(n).toGMTString()),r.isString(o)&&c.push("path="+o),r.isString(i)&&c.push("domain="+i),!0===a&&c.push("secure"),document.cookie=c.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:function(e){"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},6268:function(e,t,n){"use strict";var r=n(4867);e.exports=function(e){return r.isObject(e)&&!0===e.isAxiosError}},7985:function(e,t,n){"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},6016:function(e,t,n){"use strict";var r=n(4867);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},4109:function(e,t,n){"use strict";var r=n(4867),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,a={};return e?(r.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(a[t]&&o.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},8713:function(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},4875:function(e,t,n){"use strict";var r=n(7288).version,o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var i={};o.transitional=function(e,t,n){function o(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,a){if(!1===e)throw new Error(o(r," has been removed"+(t?" in "+t:"")));return t&&!i[r]&&(i[r]=!0,console.warn(o(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,a)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),o=r.length;o-- >0;){var i=r[o],a=t[i];if(a){var c=e[i],l=void 0===c||a(c,i,e);if(!0!==l)throw new TypeError("option "+i+" must be "+l)}else if(!0!==n)throw Error("Unknown option "+i)}},validators:o}},4867:function(e,t,n){"use strict";var r=n(1849),o=Object.prototype.toString;function i(e){return Array.isArray(e)}function a(e){return void 0===e}function c(e){return"[object ArrayBuffer]"===o.call(e)}function l(e){return null!==e&&"object"==typeof e}function s(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function u(e){return"[object Function]"===o.call(e)}function d(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:i,isArrayBuffer:c,isBuffer:function(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"[object FormData]"===o.call(e)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&c(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:l,isPlainObject:s,isUndefined:a,isDate:function(e){return"[object Date]"===o.call(e)},isFile:function(e){return"[object File]"===o.call(e)},isBlob:function(e){return"[object Blob]"===o.call(e)},isFunction:u,isStream:function(e){return l(e)&&u(e.pipe)},isURLSearchParams:function(e){return"[object URLSearchParams]"===o.call(e)},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:d,merge:function e(){var t={};function n(n,r){s(t[r])&&s(n)?t[r]=e(t[r],n):s(n)?t[r]=e({},n):i(n)?t[r]=n.slice():t[r]=n}for(var r=0,o=arguments.length;r<o;r++)d(arguments[r],n);return t},extend:function(e,t,n){return d(t,(function(t,o){e[o]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},9960:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},7790:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var a=n(9960),c=new Map([[a.ElementType.Tag,1],[a.ElementType.Script,1],[a.ElementType.Style,1],[a.ElementType.Directive,1],[a.ElementType.Text,3],[a.ElementType.CDATA,4],[a.ElementType.Comment,8],[a.ElementType.Root,9]]),l=function(){function e(e){this.type=e,this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"nodeType",{get:function(){var e;return null!==(e=c.get(this.type))&&void 0!==e?e:1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),E(this,e)},e}();t.Node=l;var s=function(e){function t(t,n){var r=e.call(this,t)||this;return r.data=n,r}return o(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(l);t.DataNode=s;var u=function(e){function t(t){return e.call(this,a.ElementType.Text,t)||this}return o(t,e),t}(s);t.Text=u;var d=function(e){function t(t){return e.call(this,a.ElementType.Comment,t)||this}return o(t,e),t}(s);t.Comment=d;var p=function(e){function t(t,n){var r=e.call(this,a.ElementType.Directive,n)||this;return r.name=t,r}return o(t,e),t}(s);t.ProcessingInstruction=p;var f=function(e){function t(t,n){var r=e.call(this,t)||this;return r.children=n,r}return o(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(l);t.NodeWithChildren=f;var h=function(e){function t(t){return e.call(this,a.ElementType.Root,t)||this}return o(t,e),t}(f);t.Document=h;var m=function(e){function t(t,n,r,o){void 0===r&&(r=[]),void 0===o&&(o="script"===t?a.ElementType.Script:"style"===t?a.ElementType.Style:a.ElementType.Tag);var i=e.call(this,o,r)||this;return i.name=t,i.attribs=n,i}return o(t,e),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(f);function v(e){return(0,a.isTag)(e)}function g(e){return e.type===a.ElementType.CDATA}function b(e){return e.type===a.ElementType.Text}function y(e){return e.type===a.ElementType.Comment}function x(e){return e.type===a.ElementType.Directive}function w(e){return e.type===a.ElementType.Root}function E(e,t){var n;if(void 0===t&&(t=!1),b(e))n=new u(e.data);else if(y(e))n=new d(e.data);else if(v(e)){var r=t?k(e.children):[],o=new m(e.name,i({},e.attribs),r);r.forEach((function(e){return e.parent=o})),null!=e.namespace&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=o}else if(g(e)){r=t?k(e.children):[];var c=new f(a.ElementType.CDATA,r);r.forEach((function(e){return e.parent=c})),n=c}else if(w(e)){r=t?k(e.children):[];var l=new h(r);r.forEach((function(e){return e.parent=l})),e["x-mode"]&&(l["x-mode"]=e["x-mode"]),n=l}else{if(!x(e))throw new Error("Not implemented yet: ".concat(e.type));var s=new p(e.name,e.data);null!=e["x-name"]&&(s["x-name"]=e["x-name"],s["x-publicId"]=e["x-publicId"],s["x-systemId"]=e["x-systemId"]),n=s}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function k(e){for(var t=e.map((function(e){return E(e,!0)})),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}t.Element=m,t.isTag=v,t.isCDATA=g,t.isText=b,t.isComment=y,t.isDirective=x,t.isDocument=w,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=E},5573:function(e){"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* escape-html
|
|
4
|
+
* Copyright(c) 2012-2013 TJ Holowaychuk
|
|
5
|
+
* Copyright(c) 2015 Andreas Lubbe
|
|
6
|
+
* Copyright(c) 2015 Tiancheng "Timothy" Gu
|
|
7
|
+
* MIT Licensed
|
|
8
|
+
*/var t=/["'&<>]/;e.exports=function(e){var n,r=""+e,o=t.exec(r);if(!o)return r;var i="",a=0,c=0;for(a=o.index;a<r.length;a++){switch(r.charCodeAt(a)){case 34:n=""";break;case 38:n="&";break;case 39:n="'";break;case 60:n="<";break;case 62:n=">";break;default:continue}c!==a&&(i+=r.substring(c,a)),c=a+1,i+=n}return c!==a?i+r.substring(c,a):i}},885:function(e){e.exports={CASE_SENSITIVE_TAG_NAMES:["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussainBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]}},8276:function(e,t,n){var r="html",o="head",i="body",a=/<([a-zA-Z]+[0-9]?)/,c=/<head.*>/i,l=/<body.*>/i,s=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},u=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"==typeof window.DOMParser){var d=new window.DOMParser;s=u=function(e,t){return t&&(e="<"+t+">"+e+"</"+t+">"),d.parseFromString(e,"text/html")}}if(document.implementation){var p=n(1507).isIE,f=document.implementation.createHTMLDocument(p()?"html-dom-parser":void 0);s=function(e,t){return t?(f.documentElement.getElementsByTagName(t)[0].innerHTML=e,f):(f.documentElement.innerHTML=e,f)}}var h,m=document.createElement("template");m.content&&(h=function(e){return m.innerHTML=e,m.content.childNodes}),e.exports=function(e){var t,n,d,p,f=e.match(a);switch(f&&f[1]&&(t=f[1].toLowerCase()),t){case r:return n=u(e),c.test(e)||(d=n.getElementsByTagName(o)[0])&&d.parentNode.removeChild(d),l.test(e)||(d=n.getElementsByTagName(i)[0])&&d.parentNode.removeChild(d),n.getElementsByTagName(r);case o:case i:return p=s(e).getElementsByTagName(t),l.test(e)&&c.test(e)?p[0].parentNode.childNodes:p;default:return h?h(e):s(e,i).getElementsByTagName(i)[0].childNodes}}},4152:function(e,t,n){var r=n(8276),o=n(1507).formatDOM,i=/<(![a-zA-Z\s]+)>/;e.exports=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(""===e)return[];var t,n=e.match(i);return n&&n[1]&&(t=n[1]),o(r(e),null,t)}},1507:function(e,t,n){for(var r,o=n(885),i=n(7790),a=o.CASE_SENSITIVE_TAG_NAMES,c=i.Comment,l=i.Element,s=i.ProcessingInstruction,u=i.Text,d={},p=0,f=a.length;p<f;p++)r=a[p],d[r.toLowerCase()]=r;function h(e){for(var t,n={},r=0,o=e.length;r<o;r++)n[(t=e[r]).name]=t.value;return n}function m(e){var t=function(e){return d[e]}(e=e.toLowerCase());return t||e}e.exports={formatAttributes:h,formatDOM:function e(t,n,r){n=n||null;for(var o=[],i=0,a=t.length;i<a;i++){var d,p=t[i];switch(p.nodeType){case 1:(d=new l(m(p.nodeName),h(p.attributes))).children=e(p.childNodes,d);break;case 3:d=new u(p.nodeValue);break;case 8:d=new c(p.nodeValue);break;default:continue}var f=o[i-1]||null;f&&(f.next=d),d.parent=n,d.prev=f,d.next=null,o.push(d)}return r&&((d=new s(r.substring(0,r.indexOf(" ")).toLowerCase(),r)).next=o[0]||null,d.parent=n,o.unshift(d),o[1]&&(o[1].prev=o[0])),o},isIE:function(){return/(MSIE |Trident\/|Edge\/)/.test(navigator.userAgent)}}},488:function(e,t,n){var r=n(3670),o=n(484),i=n(4152);i="function"==typeof i.default?i.default:i;var a={lowerCaseAttributeNames:!1};function c(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return""===e?[]:r(i(e,(t=t||{}).htmlparser2||a),t)}c.domToReact=r,c.htmlToDOM=i,c.attributesToProps=o,c.Element=n(7790).Element,e.exports=c,e.exports.default=c},484:function(e,t,n){var r=n(5726),o=n(4606);function i(e){return r.possibleStandardNames[e]}e.exports=function(e){var t,n,a,c,l,s={},u=(e=e||{}).type&&{reset:!0,submit:!0}[e.type];for(t in e)if(a=e[t],r.isCustomAttribute(t))s[t]=a;else if(c=i(n=t.toLowerCase()))switch(l=r.getPropertyInfo(c),"checked"!==c&&"value"!==c||u||(c=i("default"+n)),s[c]=a,l&&l.type){case r.BOOLEAN:s[c]=!0;break;case r.OVERLOADED_BOOLEAN:""===a&&(s[c]=!0)}else o.PRESERVE_CUSTOM_ATTRIBUTES&&(s[t]=a);return o.setStyleProp(e.style,s),s}},3670:function(e,t,n){var r=n(9297),o=n(484),i=n(4606),a=i.setStyleProp,c=i.canTextBeChildOfNode;function l(e){return i.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&i.isCustomComponent(e.name,e.attribs)}e.exports=function e(t,n){for(var i,s,u,d,p,f=(n=n||{}).library||r,h=f.cloneElement,m=f.createElement,v=f.isValidElement,g=[],b="function"==typeof n.replace,y=n.trim,x=0,w=t.length;x<w;x++)if(i=t[x],b&&v(u=n.replace(i)))w>1&&(u=h(u,{key:u.key||x})),g.push(u);else if("text"!==i.type){switch(d=i.attribs,l(i)?a(d.style,d):d&&(d=o(d)),p=null,i.type){case"script":case"style":i.children[0]&&(d.dangerouslySetInnerHTML={__html:i.children[0].data});break;case"tag":"textarea"===i.name&&i.children[0]?d.defaultValue=i.children[0].data:i.children&&i.children.length&&(p=e(i.children,n));break;default:continue}w>1&&(d.key=x),g.push(m(i.name,d,p))}else{if((s=!i.data.trim().length)&&i.parent&&!c(i.parent))continue;if(y&&s)continue;g.push(i.data)}return 1===g.length?g[0]:g}},4606:function(e,t,n){var r=n(9297),o=n(1476).default;var i={reactCompat:!0};var a=r.version.split(".")[0]>=16,c=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);e.exports={PRESERVE_CUSTOM_ATTRIBUTES:a,invertObject:function(e,t){if(!e||"object"!=typeof e)throw new TypeError("First argument must be an object");var n,r,o="function"==typeof t,i={},a={};for(n in e)r=e[n],o&&(i=t(n,r))&&2===i.length?a[i[0]]=i[1]:"string"==typeof r&&(a[r]=n);return a},isCustomComponent:function(e,t){if(-1===e.indexOf("-"))return t&&"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}},setStyleProp:function(e,t){if(null!=e)try{t.style=o(e,i)}catch(e){t.style={}}},canTextBeChildOfNode:function(e){return!c.has(e.name)},elementsWithNoTextChildren:c}},8139:function(e){var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,s="";function u(e){return e?e.replace(l,s):s}e.exports=function(e,l){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var d=1,p=1;function f(e){var t=e.match(n);t&&(d+=t.length);var r=e.lastIndexOf("\n");p=~r?e.length-r:p+e.length}function h(){var e={line:d,column:p};return function(t){return t.position=new m(e),y(),t}}function m(e){this.start=e,this.end={line:d,column:p},this.source=l.source}m.prototype.content=e;var v=[];function g(t){var n=new Error(l.source+":"+d+":"+p+": "+t);if(n.reason=t,n.filename=l.source,n.line=d,n.column=p,n.source=e,!l.silent)throw n;v.push(n)}function b(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function y(){b(r)}function x(e){var t;for(e=e||[];t=w();)!1!==t&&e.push(t);return e}function w(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;s!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,s===e.charAt(n-1))return g("End of comment missing");var r=e.slice(2,n-2);return p+=2,f(r),e=e.slice(n),p+=2,t({type:"comment",comment:r})}}function E(){var e=h(),n=b(o);if(n){if(w(),!b(i))return g("property missing ':'");var r=b(a),l=e({type:"declaration",property:u(n[0].replace(t,s)),value:r?u(r[0].replace(t,s)):s});return b(c),l}}return y(),function(){var e,t=[];for(x(t);e=E();)!1!==e&&(t.push(e),x(t));return t}()}},5726:function(e,t,n){"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}Object.defineProperty(t,"__esModule",{value:!0});function i(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var a={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((function(e){a[e]=new i(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=r(e,2),n=t[0],o=t[1];a[n]=new i(n,1,!1,o,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){a[e]=new i(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){a[e]=new i(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((function(e){a[e]=new i(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){a[e]=new i(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){a[e]=new i(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){a[e]=new i(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){a[e]=new i(e,5,!1,e.toLowerCase(),null,!1,!1)}));var c=/[\-\:]([a-z])/g,l=function(e){return e[1].toUpperCase()};["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((function(e){var t=e.replace(c,l);a[t]=new i(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((function(e){var t=e.replace(c,l);a[t]=new i(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(c,l);a[t]=new i(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){a[e]=new i(e,1,!1,e.toLowerCase(),null,!1,!1)}));a.xlinkHref=new i("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){a[e]=new i(e,1,!1,e.toLowerCase(),null,!0,!0)}));var s=n(8229),u=s.CAMELCASE,d=s.SAME,p=s.possibleStandardNames,f=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),h=Object.keys(p).reduce((function(e,t){var n=p[t];return n===d?e[t]=t:n===u?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return a.hasOwnProperty(e)?a[e]:null},t.isCustomAttribute=f,t.possibleStandardNames=h},8229:function(e,t){t.SAME=0;t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},1476:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var o=r(n(7848)),i=n(6678);t.default=function(e,t){var n={};return e&&"string"==typeof e?(o.default(e,(function(e,r){e&&r&&(n[i.camelCase(e,t)]=r)})),n):n}},6678:function(e,t){"use strict";t.__esModule=!0,t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,r=/-([a-z])/g,o=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=function(e,t){return t.toUpperCase()},c=function(e,t){return t+"-"};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||o.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),t.reactCompat||(e=e.replace(i,c)),e.replace(r,a))}},7848:function(e,t,n){var r=n(8139);e.exports=function(e,t){var n,o=null;if(!e||"string"!=typeof e)return o;for(var i,a,c=r(e),l="function"==typeof t,s=0,u=c.length;s<u;s++)i=(n=c[s]).property,a=n.value,l?t(i,a,n):a&&(o||(o={}),o[i]=a);return o}},9297:function(t){"use strict";t.exports=e}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={id:e,exports:{}};return t[e].call(i.exports,i,i.exports,r),i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){"use strict";r.r(o),r.d(o,{default:function(){return ct}});var e=r(7162),t=r.n(e),n=r(9297),i=r.n(n),a=r(9669),c=r.n(a),l=r(488),s=(l.domToReact,l.htmlToDOM,l.attributesToProps,l.Element,l);const u={a:{content:9,self:!1,type:105},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:9,void:!0},body:{content:127},button:{content:8,type:105},caption:{content:1,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:97},dd:{content:1,parent:["dl"]},dl:{children:["dt","dd"],type:1},dt:{content:1,invalid:["footer","header"],parent:["dl"]},figcaption:{content:1,parent:["figure"]},footer:{invalid:["footer","header"]},header:{invalid:["footer","header"]},hr:{type:1,void:!0},img:{void:!0},li:{content:1,parent:["ul","ol","menu"]},main:{self:!1},ol:{children:["li"],type:1},picture:{children:["source","img"],type:25},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:8,parent:["ruby","rtc"]},rtc:{content:8,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:8,parent:["details"]},table:{children:["caption","colgroup","thead","tbody","tfoot","tr"],type:1},tbody:{parent:["table"],children:["tr"]},td:{content:1,parent:["tr"]},tfoot:{parent:["table"],children:["tr"]},th:{content:1,parent:["tr"]},thead:{parent:["table"],children:["tr"]},tr:{parent:["table","tbody","thead","tfoot"],children:["th","td"]},track:{parent:["audio","video"],void:!0},ul:{children:["li"],type:1},video:{children:["track","source"]},wbr:{type:9,void:!0}};function d(e){return t=>{u[t]={...e,...u[t]}}}["address","main","div","figure","p","pre"].forEach(d({content:1,type:65})),["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach(d({content:8,type:73})),["p","pre"].forEach(d({content:8,type:65})),["s","small","span","del","ins"].forEach(d({content:8,type:9})),["article","aside","footer","header","nav","section","blockquote"].forEach(d({content:1,type:67})),["h1","h2","h3","h4","h5","h6"].forEach(d({content:8,type:69})),["audio","canvas","iframe","img","video"].forEach(d({type:89}));const p=Object.freeze(u),f=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],h=Object.keys(p).filter((e=>"canvas"!==e&&"iframe"!==e)),m=Object.freeze({alt:1,cite:1,class:1,colspan:3,controls:4,datetime:1,default:4,disabled:4,dir:1,height:1,href:1,id:1,kind:1,label:1,lang:1,loading:1,loop:4,media:1,muted:4,poster:1,rel:1,role:1,rowspan:3,scope:1,sizes:1,span:3,start:3,style:5,src:1,srclang:1,srcset:1,target:1,title:1,type:1,width:1}),v=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet"});function g(){return g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g.apply(this,arguments)}function b({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){const a=o;return r?i().createElement(a,g({className:t},e)):i().createElement(a,g({className:t},e),n)}var y=r(5573),x=r.n(y);function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const E=/(url|image|image-set)\(/i;class k extends class{attribute(e,t){return t}node(e,t){return t}}{attribute(e,t){return"style"===e&&Object.keys(t).forEach((e=>{String(t[e]).match(E)&&delete t[e]})),t}}const _=/^<(!doctype|(html|head|body)(\s|>))/i,O=/^(aria-|data-|\w+:)/iu,S=/{{{(\w+)\/?}}}/;function A(){if("undefined"!=typeof window&&"undefined"!=typeof document)return document.implementation.createHTMLDocument("Interweave")}class C{constructor(e,t={},n=[],r=[]){var o;w(this,"allowed",void 0),w(this,"banned",void 0),w(this,"blocked",void 0),w(this,"container",void 0),w(this,"content",[]),w(this,"props",void 0),w(this,"matchers",void 0),w(this,"filters",void 0),w(this,"keyIndex",void 0),this.props=t,this.matchers=n,this.filters=[...r,new k],this.keyIndex=-1,this.container=this.createContainer(e||""),this.allowed=new Set(null!==(o=t.allowList)&&void 0!==o?o:h),this.banned=new Set(f),this.blocked=new Set(t.blockList)}applyAttributeFilters(e,t){return this.filters.reduce(((t,n)=>null!==t&&"function"==typeof n.attribute?n.attribute(e,t):t),t)}applyNodeFilters(e,t){return this.filters.reduce(((t,n)=>null!==t&&"function"==typeof n.node?n.node(e,t):t),t)}applyMatchers(e,t){const n={},{props:r}=this;let o=e,i=0,a=null;return this.matchers.forEach((e=>{const c=e.asTag().toLowerCase(),l=this.getTagConfig(c);if(r[e.inverseName]||!this.isTagAllowed(c))return;if(!this.canRenderChild(t,l))return;let s="";for(;o&&(a=e.match(o));){const{index:t,length:c,match:l,valid:u,void:d,...p}=a,f=e.propName+String(i);t>0&&(s+=o.slice(0,t)),u?(s+=d?`{{{${f}/}}}`:`{{{${f}}}}${l}{{{/${f}}}}`,this.keyIndex+=1,i+=1,n[f]={children:l,matcher:e,props:{...r,...p,key:this.keyIndex}}):s+=l,e.greedy?(o=s+o.slice(t+c),s=""):o=o.slice(t+(c||l.length))}e.greedy||(o=s+o)})),0===i?e:this.replaceTokens(o,n)}canRenderChild(e,t){return!(!e.tagName||!t.tagName)&&(!e.void&&(e.children.length>0?e.children.includes(t.tagName):!(e.invalid.length>0&&e.invalid.includes(t.tagName))&&(t.parent.length>0?t.parent.includes(e.tagName):!(!e.self&&e.tagName===t.tagName)&&Boolean(e&&e.content&t.type))))}convertLineBreaks(e){const{noHtml:t,disableLineBreaks:n}=this.props;if(t||n||e.match(/<((?:\/[ a-z]+)|(?:[ a-z]+\/))>/gi))return e;let r=e.replace(/\r\n/g,"\n");return r=r.replace(/\n{3,}/g,"\n\n\n"),r=r.replace(/\n/g,"<br/>"),r}createContainer(e){var t;const n=(void 0!==r.g&&r.g.INTERWEAVE_SSR_POLYFILL||A)();if(!n)return;const o=null!==(t=this.props.containerTagName)&&void 0!==t?t:"body",i="body"===o||"fragment"===o?n.body:n.createElement(o);return e.match(_)||(i.innerHTML=this.convertLineBreaks(this.props.escapeHtml?x()(e):e)),i}extractAttributes(e){const{allowAttributes:t}=this.props,n={};let r=0;return 1===e.nodeType&&e.attributes?([...e.attributes].forEach((o=>{const{name:i,value:a}=o,c=i.toLowerCase(),l=m[c]||m[i];if(!this.isSafe(e))return;if(!c.match(O)&&(!t&&(!l||2===l)||c.startsWith("on")||a.replace(/(\s|\0|�([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let s="style"===c?this.extractStyleAttribute(e):a;4===l?s=!0:3===l?s=Number.parseFloat(String(s)):5!==l&&(s=String(s)),n[v[c]||c]=this.applyAttributeFilters(c,s),r+=1})),0===r?null:n):null}extractStyleAttribute(e){const t={};return Array.from(e.style).forEach((n=>{const r=e.style[n];"string"!=typeof r&&"number"!=typeof r||(t[n.replace(/-([a-z])/g,((e,t)=>String(t).toUpperCase()))]=r)})),t}getTagConfig(e){const t={children:[],content:0,invalid:[],parent:[],self:!0,tagName:"",type:0,void:!1};return p[e]?{...t,...p[e],tagName:e}:t}isSafe(e){if("undefined"!=typeof HTMLAnchorElement&&e instanceof HTMLAnchorElement){const t=e.getAttribute("href");if(null!=t&&t.startsWith("#"))return!0;const n=e.protocol.toLowerCase();return":"===n||"http:"===n||"https:"===n||"mailto:"===n||"tel:"===n}return!0}isTagAllowed(e){return!this.banned.has(e)&&!this.blocked.has(e)&&(this.props.allowElements||this.allowed.has(e))}parse(){return this.container?this.parseNode(this.container,this.getTagConfig(this.container.nodeName.toLowerCase())):[]}parseNode(e,t){const{noHtml:n,noHtmlExceptMatchers:r,allowElements:o,transform:a,transformOnlyAllowList:c}=this.props;let l=[],s="";return[...e.childNodes].forEach((e=>{if(1===e.nodeType){const d=e.nodeName.toLowerCase(),p=this.getTagConfig(d);s&&(l.push(s),s="");const f=this.applyNodeFilters(d,e);if(!f)return;let h;if(a&&(!c||this.isTagAllowed(d))){this.keyIndex+=1;const e=this.keyIndex;h=this.parseNode(f,p);const t=a(f,h,p);if(null===t)return;if(void 0!==t)return void l.push(i().cloneElement(t,{key:e}));this.keyIndex=e-1}if(this.banned.has(d))return;if(n||r&&"br"!==d||!this.isTagAllowed(d)||!o&&!this.canRenderChild(t,p))l=[...l,...this.parseNode(f,p.tagName?p:t)];else{var u;this.keyIndex+=1;const e=this.extractAttributes(f),t={tagName:d};e&&(t.attributes=e),p.void&&(t.selfClose=p.void),l.push(i().createElement(b,{...t,key:this.keyIndex},null!==(u=h)&&void 0!==u?u:this.parseNode(f,p)))}}else if(3===e.nodeType){const o=n&&!r?e.textContent:this.applyMatchers(e.textContent||"",t);Array.isArray(o)?l=[...l,...o]:s+=o}})),s&&l.push(s),l}replaceTokens(e,t){if(!e.includes("{{{"))return e;const n=[];let r=e,o=null;for(;o=r.match(S);){const[e,i]=o,a=o.index,c=e.includes("/");0,a>0&&(n.push(r.slice(0,a)),r=r.slice(a));const{children:l,matcher:s,props:u}=t[i];let d;if(c)d=e.length,n.push(s.createElement(l,u));else{const o=r.match(new RegExp(`{{{/${i}}}}`));0,d=o.index+o[0].length,n.push(s.createElement(this.replaceTokens(r.slice(e.length,o.index),t),u))}r=r.slice(d)}return r.length>0&&n.push(r),0===n.length?"":1===n.length&&"string"==typeof n[0]?n[0]:n}}function T(e){var t;const{attributes:n,className:r,containerTagName:o,content:a,emptyContent:c,parsedContent:l,tagName:s,noWrap:u}=e,d=null!==(t=null!=o?o:s)&&void 0!==t?t:"span",p="fragment"===d||u;let f;if(l)f=l;else{const t=new C(null!=a?a:"",e).parse();t.length>0&&(f=t)}return f||(f=c),p?i().createElement(i().Fragment,null,f):i().createElement(b,{attributes:n,className:r,tagName:d},f)}function j(e){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},j(e)}function N(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function P(e,t){return P=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},P(e,t)}function I(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=L(e);if(t){var o=L(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return z(this,n)}}function z(e,t){if(t&&("object"===j(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function L(e){return L=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},L(e)}var R=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&P(e,t)}(a,e);var t,n,r,o=I(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).state={hasError:!1},t}return t=a,r=[{key:"getDerivedStateFromError",value:function(e){return{hasError:!0}}}],(n=[{key:"componentDidCatch",value:function(e,t){console.warn(e,t)}},{key:"render",value:function(){return this.state.hasError?this.props.component?i().createElement("h1",null,"Something went wrong with component ",this.props.component,"."):i().createElement("h1",null,"Something went wrong."):this.props.children}}])&&N(t.prototype,n),r&&N(t,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(i().Component);r(8291);function D(e){var t=e.viewport,n=void 0===t?"lg":t;return i().createElement("section",{className:"loading","aria-live":"assertive"},i().createElement("span",{className:"sr-only",style:{display:"none"}},"Content is loading."),i().createElement("div",{className:"la-ball-beat la-dark ".concat(n)},i().createElement("div",null),i().createElement("div",null),i().createElement("div",null)))}var M=(0,n.createContext)({});function F(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function B(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function U(e,t,n){return t&&B(e.prototype,t),n&&B(e,n),e}function H(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q(){return q=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},q.apply(this,arguments)}function V(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Z(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&G(e,t)}function W(e){return W=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},W(e)}function G(e,t){return G=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},G(e,t)}function X(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function $(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function J(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?$(e):t}function Y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=W(e);if(t){var o=W(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return J(this,n)}}function K(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}(e,t)||ee(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Q(e){return function(e){if(Array.isArray(e))return te(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||ee(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ee(e,t){if(e){if("string"==typeof e)return te(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?te(e,t):void 0}}function te(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ne=function e(t){var n=this,r=t.expanded,o=void 0===r?[]:r,i=t.allowMultipleExpanded,a=void 0!==i&&i,c=t.allowZeroExpanded,l=void 0!==c&&c;F(this,e),H(this,"expanded",void 0),H(this,"allowMultipleExpanded",void 0),H(this,"allowZeroExpanded",void 0),H(this,"toggleExpanded",(function(e){return n.isItemDisabled(e)?n:n.isItemExpanded(e)?n.augment({expanded:n.expanded.filter((function(t){return t!==e}))}):n.augment({expanded:n.allowMultipleExpanded?[].concat(Q(n.expanded),[e]):[e]})})),H(this,"isItemDisabled",(function(e){var t=n.isItemExpanded(e),r=1===n.expanded.length;return Boolean(t&&!n.allowZeroExpanded&&r)})),H(this,"isItemExpanded",(function(e){return-1!==n.expanded.indexOf(e)})),H(this,"getPanelAttributes",(function(e,t){var r=null!=t?t:n.isItemExpanded(e);return{role:n.allowMultipleExpanded?void 0:"region","aria-hidden":n.allowMultipleExpanded?!r:void 0,"aria-labelledby":n.getButtonId(e),id:n.getPanelId(e),hidden:!r||void 0}})),H(this,"getHeadingAttributes",(function(){return{role:"heading"}})),H(this,"getButtonAttributes",(function(e,t){var r=null!=t?t:n.isItemExpanded(e),o=n.isItemDisabled(e);return{id:n.getButtonId(e),"aria-disabled":o,"aria-expanded":r,"aria-controls":n.getPanelId(e),role:"button",tabIndex:0}})),H(this,"getPanelId",(function(e){return"accordion__panel-".concat(e)})),H(this,"getButtonId",(function(e){return"accordion__heading-".concat(e)})),H(this,"augment",(function(t){return new e(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?V(Object(n),!0).forEach((function(t){H(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({expanded:n.expanded,allowMultipleExpanded:n.allowMultipleExpanded,allowZeroExpanded:n.allowZeroExpanded},t))})),this.expanded=o,this.allowMultipleExpanded=a,this.allowZeroExpanded=l},re=(0,n.createContext)(null),oe=function(e){Z(r,e);var t=Y(r);function r(){var e;F(this,r);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return H($(e=t.call.apply(t,[this].concat(o))),"state",new ne({expanded:e.props.preExpanded,allowMultipleExpanded:e.props.allowMultipleExpanded,allowZeroExpanded:e.props.allowZeroExpanded})),H($(e),"toggleExpanded",(function(t){e.setState((function(e){return e.toggleExpanded(t)}),(function(){e.props.onChange&&e.props.onChange(e.state.expanded)}))})),H($(e),"isItemDisabled",(function(t){return e.state.isItemDisabled(t)})),H($(e),"isItemExpanded",(function(t){return e.state.isItemExpanded(t)})),H($(e),"getPanelAttributes",(function(t,n){return e.state.getPanelAttributes(t,n)})),H($(e),"getHeadingAttributes",(function(){return e.state.getHeadingAttributes()})),H($(e),"getButtonAttributes",(function(t,n){return e.state.getButtonAttributes(t,n)})),e}return U(r,[{key:"render",value:function(){var e=this.state,t=e.allowZeroExpanded,r=e.allowMultipleExpanded;return(0,n.createElement)(re.Provider,{value:{allowMultipleExpanded:r,allowZeroExpanded:t,toggleExpanded:this.toggleExpanded,isItemDisabled:this.isItemDisabled,isItemExpanded:this.isItemExpanded,getPanelAttributes:this.getPanelAttributes,getHeadingAttributes:this.getHeadingAttributes,getButtonAttributes:this.getButtonAttributes}},this.props.children||null)}}]),r}(n.PureComponent);H(oe,"defaultProps",{allowMultipleExpanded:!1,allowZeroExpanded:!1});var ie,ae=function(e){Z(r,e);var t=Y(r);function r(){var e;F(this,r);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return H($(e=t.call.apply(t,[this].concat(o))),"renderChildren",(function(t){return t?e.props.children(t):null})),e}return U(r,[{key:"render",value:function(){return(0,n.createElement)(re.Consumer,null,this.renderChildren)}}]),r}(n.PureComponent),ce=function(e){var t=e.className,r=void 0===t?"accordion":t,o=e.allowMultipleExpanded,i=e.allowZeroExpanded,a=e.onChange,c=e.preExpanded,l=X(e,["className","allowMultipleExpanded","allowZeroExpanded","onChange","preExpanded"]);return(0,n.createElement)(oe,{preExpanded:c,allowMultipleExpanded:o,allowZeroExpanded:i,onChange:a},(0,n.createElement)("div",q({"data-accordion-component":"Accordion",className:r},l)))};!function(e){e.Accordion="Accordion",e.AccordionItem="AccordionItem",e.AccordionItemButton="AccordionItemButton",e.AccordionItemHeading="AccordionItemHeading",e.AccordionItemPanel="AccordionItemPanel"}(ie||(ie={}));var le=ie,se=0;var ue=/[\u0009\u000a\u000c\u000d\u0020]/g;function de(e){return""!==e&&!ue.test(e)||(console.error('uuid must be a valid HTML5 id but was given "'.concat(e,'", ASCII whitespaces are forbidden')),!1)}var pe=(0,n.createContext)(null),fe=function(e){var t=e.children,r=e.uuid,o=e.accordionContext,i=e.dangerouslySetExpanded,a=function(){o.toggleExpanded(r)},c=function(e){var o=null!=i?i:e.isItemExpanded(r),c=e.isItemDisabled(r),l=e.getPanelAttributes(r,i),s=e.getHeadingAttributes(r),u=e.getButtonAttributes(r,i);return(0,n.createElement)(pe.Provider,{value:{uuid:r,expanded:o,disabled:c,toggleExpanded:a,panelAttributes:l,headingAttributes:s,buttonAttributes:u}},t)};return(0,n.createElement)(ae,null,c)},he=function(e){return(0,n.createElement)(ae,null,(function(t){return(0,n.createElement)(fe,q({},e,{accordionContext:t}))}))},me=function(e){var t=e.children,r=function(e){return e?t(e):null};return(0,n.createElement)(pe.Consumer,null,r)},ve=function(e){var t,r=e.uuid,o=e.dangerouslySetExpanded,i=e.className,a=void 0===i?"accordion__item":i,c=e.activeClassName,l=X(e,["uuid","dangerouslySetExpanded","className","activeClassName"]),s=K((0,n.useState)((t=se,se+=1,"raa-".concat(t))),1)[0],u=null!=r?r:s,d=function(e){var t=e.expanded&&c?c:a;return(0,n.createElement)("div",q({"data-accordion-component":"AccordionItem",className:t},l))};return de(u.toString()),l.id&&de(l.id),(0,n.createElement)(he,{uuid:u,dangerouslySetExpanded:o},(0,n.createElement)(me,null,d))};function ge(e){return e&&(e.matches('[data-accordion-component="Accordion"]')?e:ge(e.parentElement))}function be(e){var t=ge(e);return t&&Array.from(t.querySelectorAll('[data-accordion-component="AccordionItemButton"]'))}ve.displayName=le.AccordionItem;var ye="End",xe="Enter",we="Home",Ee=" ",ke="Spacebar",_e="ArrowUp",Oe="ArrowDown",Se="ArrowLeft",Ae="ArrowRight",Ce=function(e){var t=e.toggleExpanded,r=e.className,o=void 0===r?"accordion__button":r,i=X(e,["toggleExpanded","className"]);return i.id&&de(i.id),(0,n.createElement)("div",q({className:o},i,{role:"button",tabIndex:0,onClick:t,onKeyDown:function(e){var n,r,o=e.key;if(o!==xe&&o!==Ee&&o!==ke||(e.preventDefault(),t()),e.target instanceof HTMLElement)switch(o){case we:e.preventDefault(),n=e.target,(r=(be(n)||[])[0])&&r.focus();break;case ye:e.preventDefault(),function(e){var t=be(e)||[],n=t[t.length-1];n&&n.focus()}(e.target);break;case Se:case _e:e.preventDefault(),function(e){var t=be(e)||[],n=t.indexOf(e);if(-1!==n){var r=t[n-1];r&&r.focus()}}(e.target);break;case Ae:case Oe:e.preventDefault(),function(e){var t=be(e)||[],n=t.indexOf(e);if(-1!==n){var r=t[n+1];r&&r.focus()}}(e.target)}},"data-accordion-component":"AccordionItemButton"}))},Te=function(e){return(0,n.createElement)(me,null,(function(t){var r=t.toggleExpanded,o=t.buttonAttributes;return(0,n.createElement)(Ce,q({toggleExpanded:r},e,o))}))},je=function(e){Z(r,e);var t=Y(r);function r(){var e;F(this,r);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return H($(e=t.call.apply(t,[this].concat(o))),"ref",void 0),H($(e),"setRef",(function(t){e.ref=t})),e}return U(r,[{key:"componentDidUpdate",value:function(){r.VALIDATE(this.ref)}},{key:"componentDidMount",value:function(){r.VALIDATE(this.ref)}},{key:"render",value:function(){return(0,n.createElement)("div",q({"data-accordion-component":"AccordionItemHeading"},this.props,{ref:this.setRef}))}}],[{key:"VALIDATE",value:function(e){if(void 0===e)throw new Error("ref is undefined");if(1!==e.childElementCount||!e.firstElementChild||"AccordionItemButton"!==e.firstElementChild.getAttribute("data-accordion-component"))throw new Error("AccordionItemButton may contain only one child element, which must be an instance of AccordionItemButton.\n\nFrom the WAI-ARIA spec (https://www.w3.org/TR/wai-aria-practices-1.1/#accordion):\n\n“The button element is the only element inside the heading element. That is, if there are other visually persistent elements, they are not included inside the heading element.”\n\n")}}]),r}(n.PureComponent);H(je,"defaultProps",{className:"accordion__heading","aria-level":3});var Ne=function(e){return(0,n.createElement)(me,null,(function(t){var r=t.headingAttributes;return e.id&&de(e.id),(0,n.createElement)(je,q({},e,r))}))};Ne.displayName=le.AccordionItemHeading;var Pe=function(e){var t=e.className,r=void 0===t?"accordion__panel":t,o=e.id,i=X(e,["className","id"]),a=function(e){var t=e.panelAttributes;return o&&de(o),(0,n.createElement)("div",q({"data-accordion-component":"AccordionItemPanel",className:r},i,t))};return(0,n.createElement)(me,null,a)};function Ie(e,t){return e===t}function ze(e){return"function"==typeof e?function(){return e}:e}function Le(e,t,r){var o=r&&r.equalityFn||Ie,i=function(e){var t=(0,n.useState)(ze(e)),r=t[0],o=t[1];return[r,(0,n.useCallback)((function(e){return o(ze(e))}),[])]}(e),a=i[0],c=i[1],l=function(e,t,r){var o=this,i=(0,n.useRef)(null),a=(0,n.useRef)(0),c=(0,n.useRef)(null),l=(0,n.useRef)([]),s=(0,n.useRef)(),u=(0,n.useRef)(),d=(0,n.useRef)(e),p=(0,n.useRef)(!0);d.current=e;var f=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var h=!!(r=r||{}).leading,m=!("trailing"in r)||!!r.trailing,v="maxWait"in r,g=v?Math.max(+r.maxWait||0,t):null;(0,n.useEffect)((function(){return p.current=!0,function(){p.current=!1}}),[]);var b=(0,n.useMemo)((function(){var e=function(e){var t=l.current,n=s.current;return l.current=s.current=null,a.current=e,u.current=d.current.apply(n,t)},n=function(e,t){f&&cancelAnimationFrame(c.current),c.current=f?requestAnimationFrame(e):setTimeout(e,t)},r=function(e){if(!p.current)return!1;var n=e-i.current,r=e-a.current;return!i.current||n>=t||n<0||v&&r>=g},b=function(t){return c.current=null,m&&l.current?e(t):(l.current=s.current=null,u.current)},y=function(){var e=Date.now();if(r(e))return b(e);if(p.current){var o=e-i.current,c=e-a.current,l=t-o,s=v?Math.min(l,g-c):l;n(y,s)}},x=function(){for(var d=[],f=0;f<arguments.length;f++)d[f]=arguments[f];var m=Date.now(),g=r(m);if(l.current=d,s.current=o,i.current=m,g){if(!c.current&&p.current)return a.current=i.current,n(y,t),h?e(i.current):u.current;if(v)return n(y,t),e(i.current)}return c.current||n(y,t),u.current};return x.cancel=function(){c.current&&(f?cancelAnimationFrame(c.current):clearTimeout(c.current)),a.current=0,l.current=i.current=s.current=c.current=null},x.isPending=function(){return!!c.current},x.flush=function(){return c.current?b(Date.now()):u.current},x}),[h,v,t,g,m,f]);return b}((0,n.useCallback)((function(e){return c(e)}),[c]),t,r),s=(0,n.useRef)(e);return(0,n.useEffect)((function(){o(s.current,e)||(l(e),s.current=e)}),[e,l,o]),[a,{cancel:l.cancel,isPending:l.isPending,flush:l.flush}]}var Re=["label","section","subsection","fieldName","updateField","value","type","i","min","max"];function De(){return De=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},De.apply(this,arguments)}function Me(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Fe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Fe(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Be(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ue=(0,n.memo)((function(e){var t=e.label,r=e.section,o=void 0===r?null:r,a=e.subsection,c=void 0===a?null:a,l=e.fieldName,s=e.updateField,u=e.value,d=e.type,p=void 0===d?"input":d,f=e.i,h=void 0===f?null:f,m=e.min,v=void 0===m?null:m,g=e.max,b=void 0===g?null:g,y=Be(e,Re),x=Me((0,n.useState)(u),2),w=x[0],E=x[1],k=Me(Le(w,500),1)[0];(0,n.useEffect)((function(){"string"==typeof k&&u!==k&&s(o,c,l,k,h)}),[k,o,c,l,h,u,s]);var _="".concat(o,"-").concat(c,"-").concat(l),O=function(e){"number"!==p||null===v||!e.target.value||parseFloat(v)<=parseFloat(e.target.value)&parseFloat(b)>=parseFloat(e.target.value)?E(e.target.value):E(v.toString())},S=i().createElement("input",De({type:"text",name:_,onChange:O},y,{value:w}));return"textarea"===p&&(S=i().createElement("textarea",De({name:_,onChange:O},y,{value:w}))),"number"===p&&(S=i().createElement("input",De({type:"number",name:_,onChange:O},y,{value:w}))),i().createElement("div",{className:"input-group"},t&&i().createElement("label",null,t),S)}));function He(e){return function(e){if(Array.isArray(e))return Xe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ge(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ve(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(n),!0).forEach((function(t){Ze(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ze(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function We(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(e,t)||Ge(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ge(e,t){if(e){if("string"==typeof e)return Xe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xe(e,t):void 0}}function Xe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var $e=["theme-blue","theme-purple","theme-brown","theme-teal","theme-pink","theme-orange","theme-slate","theme-indigo","theme-cyan","theme-green","theme-amber"],Je=(0,n.memo)((function(e){var t=(0,n.useContext)(M),r=t.config,o=t.updateConfig,a=t.loading,c=(t.data,t.setParentConfig),l=(t.isDashboard,We((0,n.useState)(!0),2)),s=l[0],u=l[1],d=We((0,n.useState)(!0),2),p=d[0],f=(d[1],function(e,t,n,i){if(null===e&&null===t){var a=Ve(Ve({},r),{},Ze({},n,i));return"filterColumn"===n&&(a.filterValue=""),void o(a)}var c=Array.isArray(r[e]),l=c?[].concat(He(r[e]),[i]):Ve(Ve({},r[e]),{},Ze({},n,i));null!==t&&(c?(l=He(r[e]))[t]=Ve(Ve({},l[t]),{},Ze({},n,i)):"string"==typeof i?l[t]=i:l=Ve(Ve({},r[e]),{},Ze({},t,Ve(Ve({},r[e][t]),{},Ze({},n,i)))));var s=Ve(Ve({},r),{},Ze({},e,l));o(s)});(0,n.useEffect)((function(){if(c){var e=v();c(e)}}),[r]),(0,n.useEffect)((function(){if(!p){var e=Ve({},r);delete e.newViz,o(e)}}),[]);var h=function(){return i().createElement("section",{className:"waiting"},i().createElement("section",{className:"waiting-container"},i().createElement("h3",null,"Error With Configuration"),i().createElement("p",null,r.runtime.editorErrorMessage)))},m=function(){return i().createElement("section",{className:"waiting"},i().createElement("section",{className:"waiting-container"},i().createElement("h3",null,"Finish Configuring"),i().createElement("p",null,"Set all required options to the left and confirm below to display a preview of the markup."),i().createElement("button",{className:"btn",style:{margin:"1em auto"},disabled:!1,onClick:function(e){e.preventDefault();var t=Ve({},r);delete t.newViz,o(t)}},"I'm Done")))},v=function(){var e=JSON.parse(JSON.stringify(r));return delete e.newViz,delete e.runtime,e};return a?null:i().createElement(R,{component:"EditorPanel"},i().createElement("div",{className:"cove-editor"},!r.newViz&&r.runtime&&r.runtime.editorErrorMessage&&i().createElement(h,null),r.newViz&&p&&i().createElement(m,null),i().createElement("button",{className:"cove-editor--toggle"+(s?"":" collapsed"),title:s?"Collapse Editor":"Expand Editor",onClick:function(){u(!s)}}),i().createElement("section",{className:"cove-editor__panel"+(s?"":" hidden")},i().createElement("div",{className:"cove-editor__panel-container"},i().createElement("h2",{className:"cove-editor__heading"},"Configure Markup Include"),i().createElement("section",{className:"form-container"},i().createElement("form",null,i().createElement(ce,{allowZeroExpanded:!0},i().createElement(ve,null," ",i().createElement(Ne,null,i().createElement(Te,null,"General")),i().createElement(Pe,null,i().createElement(Ue,{value:r.title||"",fieldName:"title",label:"Title",placeholder:"Markup Include Title",updateField:f}),i().createElement(Ue,{value:r.srcUrl||"",fieldName:"srcUrl",label:"Source URL",placeholder:"https://www.example.com/file.html",updateField:f}))),i().createElement(ve,null,i().createElement(Ne,null,i().createElement(Te,null,"Visual")),i().createElement(Pe,null,i().createElement("div",{className:"input-group"},i().createElement("label",null,"Theme"),i().createElement("ul",{className:"color-palette"},$e.map((function(e){return i().createElement("li",{title:e,key:e,onClick:function(){o(Ve(Ve({},r),{},{theme:e}))},className:r.theme===e?"selected "+e:e})}))))))))))),i().createElement("div",{className:"cove-editor__content"},i().createElement("div",{className:"cove-editor__content-wrap"},e.children))))})),Ye=Je,Ke={title:"Markup Include",showHeader:!1,type:"markup-include",srcUrl:"#example",theme:"theme-blue"};r(4874);function Qe(e,t,n,r,o,i,a){try{var c=e[i](a),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function et(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Qe(i,r,o,a,c,"next",e)}function c(e){Qe(i,r,o,a,c,"throw",e)}a(void 0)}))}}function tt(e){return tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tt(e)}function nt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nt(Object(n),!0).forEach((function(t){ot(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ot(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function it(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return at(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return at(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function at(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ct=function(e){var r=e.configUrl,o=e.config,a=e.isDashboard,l=void 0!==a&&a,u=e.isEditor,d=void 0!==u&&u,p=e.setConfig,f=it((0,n.useState)(rt({},Ke)),2),h=f[0],m=f[1],v=it((0,n.useState)(!0),2),g=v[0],b=v[1],y=it((0,n.useState)(""),2),x=y[0],w=y[1],E=it((0,n.useState)(null),2),k=E[0],_=E[1],O=it((0,n.useState)(null),2),S=O[0],A=O[1],C=h.title,j=function(e){Object.keys(Ke).forEach((function(t){e[t]&&"object"===tt(e[t])&&!Array.isArray(e[t])&&(e[t]=rt(rt({},Ke[t]),e[t]))})),e.runtime={},e.runtime.uniqueId=Date.now(),e.runtime.editorErrorMessage="",m(e)},N=(0,n.useCallback)(et(t().mark((function e(){var n,i,a,c;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=o,e.t0){e.next=7;break}return e.next=4,fetch(r);case 4:return e.next=6,e.sent.json();case 6:e.t0=e.sent;case 7:if(i=e.t0,a=null!==(n=i.data)&&void 0!==n?n:{},!i.dataUrl){e.next=16;break}return e.next=12,fetch(i.dataUrl);case 12:return c=e.sent,e.next=15,c.json();case 15:a=e.sent;case 16:i.data=a,j(rt(rt({},Ke),i)),b(!1);case 19:case"end":return e.stop()}}),e)}))),[]);(0,n.useEffect)((function(){if(k){var e=k,t="There was a problem retrieving the content from "+h.srcUrl+". ";404!==e||h.srcUrl.match(/https?:\/\//g)||(e="proto");A(t+={200:"This is likely due to a CORS restriction policy from the remote origin address.",404:"The requested source URL cannot be found. Please verify the link address provided.",proto:"Provided source URL must include https:// or http:// before the address (depending on the source content type)."}[e])}else A(null)}),[k]);var P=(0,n.useCallback)(et(t().mark((function e(){return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(_(null),!h.srcUrl){e.next=17;break}if("#example"!==h.srcUrl){e.next=6;break}w('<!doctype html><html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> </head> <body> <h1>Header</h1> <p> But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. </p><br/><p> No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. </p><br/><p> To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?</p></body></html>'),e.next=15;break;case 6:return e.prev=6,e.next=9,c().get(h.srcUrl).then((function(e){e.data&&w(e.data)}));case 9:e.next=15;break;case 11:e.prev=11,e.t0=e.catch(6),e.t0.response?_(e.t0.response.status):e.t0.request&&_(200),w("");case 15:e.next=18;break;case 17:w("");case 18:case"end":return e.stop()}}),e,null,[[6,11]])}))),[h.srcUrl]);(0,n.useEffect)((function(){N().catch((function(e){return console.log(e)}))}),[]),(0,n.useEffect)((function(){N().catch((function(e){return console.log(e)}))}),[null==o?void 0:o.data]),(0,n.useEffect)((function(){P().catch((function(e){return console.log(e)}))}),[P]);var I,z,L,F=i().createElement(D,null);if(!1===g){var B=i().createElement(i().Fragment,null,i().createElement("div",{className:"cove-component markup-include"},C&&i().createElement("header",{className:"cove-component__header ".concat(h.theme),"aria-hidden":"true"},s(C)," ",l),i().createElement("div",{className:"cove-component__content"},!k&&x&&i().createElement("div",{className:"cove-component__content-wrap"},i().createElement(T,{content:(I=x,L=!1,I&&""!==I&&null!==I&&(I.toString().match(/<body[^>]*>/i)&&I.toString().match(/<\/body\s*>/i)?(L=!0,z=I.toString().match(/<body[^>]*>([^<]*(?:(?!<\/?body)<[^<]*)*)<\/body\s*>/i)):z=I.toString()),L?z[1]:z)})),k&&h.srcUrl&&i().createElement("div",{className:"warning"},S))));F=i().createElement("div",{className:"cove",style:l?{marginTop:"3rem"}:null},d&&i().createElement(Ye,null,B),!d&&B)}return i().createElement(R,{component:"CdcMarkupInclude"},i().createElement(M.Provider,{value:{config:h,updateConfig:j,loading:g,data:h.data,setParentConfig:p,isDashboard:l}},F))}}(),o}()}));
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@cdc/markup-include",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "React component for displaying HTML content from an outside link",
|
|
5
|
+
"main": "dist/cdcmarkupinclude",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"start": "npx webpack serve --mode development -c ../../webpack.config.js",
|
|
8
|
+
"build": "npx webpack --mode production --env packageName=CdcMarkupInclude --env folderName=markup-include -c ../../webpack.config.js",
|
|
9
|
+
"prepublishOnly": "lerna run --scope @cdc/markup-include build"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/CDCgov/cdc-open-viz",
|
|
14
|
+
"directory": "packages/markup-include"
|
|
15
|
+
},
|
|
16
|
+
"author": "rshelnutt <qyu6@cdc.gov>",
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/CDCgov/cdc-open-viz/issues"
|
|
19
|
+
},
|
|
20
|
+
"license": "Apache-2.0",
|
|
21
|
+
"homepage": "https://github.com/CDCgov/cdc-open-viz#readme",
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@cdc/core": "^1.1.2",
|
|
24
|
+
"interweave": "^13.0.0",
|
|
25
|
+
"react-accessible-accordion": "^3.3.4",
|
|
26
|
+
"use-debounce": "^6.0.1"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"axios": "^0.26.1",
|
|
30
|
+
"chroma": "0.0.1",
|
|
31
|
+
"chroma-js": "^2.1.0",
|
|
32
|
+
"html-react-parser": "^1.4.8"
|
|
33
|
+
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"react": "^17.0.2",
|
|
36
|
+
"react-dom": ">=16"
|
|
37
|
+
},
|
|
38
|
+
"gitHead": "7b505fcc2ba71d8ee9beadc7fdf7aed769e58644"
|
|
39
|
+
}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import React, { useEffect, useCallback, useState } from 'react'
|
|
2
|
+
import axios from 'axios'
|
|
3
|
+
import parse from 'html-react-parser'
|
|
4
|
+
import { Markup } from 'interweave'
|
|
5
|
+
|
|
6
|
+
import ErrorBoundary from '@cdc/core/components/ErrorBoundary'
|
|
7
|
+
import Loading from '@cdc/core/components/Loading'
|
|
8
|
+
|
|
9
|
+
import ConfigContext from './ConfigContext'
|
|
10
|
+
import EditorPanel from './components/EditorPanel'
|
|
11
|
+
import defaults from './data/initial-state'
|
|
12
|
+
import './scss/main.scss'
|
|
13
|
+
|
|
14
|
+
const CdcMarkupInclude = (
|
|
15
|
+
{
|
|
16
|
+
configUrl,
|
|
17
|
+
config: configObj,
|
|
18
|
+
isDashboard = false,
|
|
19
|
+
isEditor = false,
|
|
20
|
+
setConfig: setParentConfig
|
|
21
|
+
}
|
|
22
|
+
) => {
|
|
23
|
+
|
|
24
|
+
// Default States
|
|
25
|
+
const [ config, setConfig ] = useState({ ...defaults })
|
|
26
|
+
const [ loading, setLoading ] = useState(true)
|
|
27
|
+
|
|
28
|
+
// Custom States
|
|
29
|
+
const [ urlMarkup, setUrlMarkup ] = useState('')
|
|
30
|
+
const [ markupError, setMarkupError ] = useState(null)
|
|
31
|
+
const [ errorMessage, setErrorMessage ] = useState(null)
|
|
32
|
+
|
|
33
|
+
let {
|
|
34
|
+
title
|
|
35
|
+
} = config
|
|
36
|
+
|
|
37
|
+
// Default Functions
|
|
38
|
+
const updateConfig = (newConfig) => {
|
|
39
|
+
Object.keys(defaults).forEach(key => {
|
|
40
|
+
if (newConfig[key] && 'object' === typeof newConfig[key] && !Array.isArray(newConfig[key])) {
|
|
41
|
+
newConfig[key] = { ...defaults[key], ...newConfig[key] }
|
|
42
|
+
}
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
newConfig.runtime = {}
|
|
46
|
+
newConfig.runtime.uniqueId = Date.now()
|
|
47
|
+
|
|
48
|
+
newConfig.runtime.editorErrorMessage = ''
|
|
49
|
+
setConfig(newConfig)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const loadConfig = useCallback(async () => {
|
|
53
|
+
let response = configObj || await (await fetch(configUrl)).json()
|
|
54
|
+
let responseData = response.data ?? {}
|
|
55
|
+
|
|
56
|
+
if (response.dataUrl) {
|
|
57
|
+
const dataString = await fetch(response.dataUrl)
|
|
58
|
+
responseData = await dataString.json()
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
response.data = responseData
|
|
62
|
+
|
|
63
|
+
updateConfig({ ...defaults, ...response })
|
|
64
|
+
setLoading(false)
|
|
65
|
+
}, [])
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
// Custom Functions
|
|
69
|
+
useEffect(() => {
|
|
70
|
+
if (markupError) {
|
|
71
|
+
let errorCode = markupError
|
|
72
|
+
let message = 'There was a problem retrieving the content from ' + config.srcUrl + '. '
|
|
73
|
+
let protocolCheck = /https?:\/\//g
|
|
74
|
+
|
|
75
|
+
if (errorCode === 404 && !config.srcUrl.match(protocolCheck)) {
|
|
76
|
+
errorCode = 'proto' //Capture 404 caused by missing protocols and adjust message
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
let errorList = {
|
|
80
|
+
200: 'This is likely due to a CORS restriction policy from the remote origin address.',
|
|
81
|
+
404: 'The requested source URL cannot be found. Please verify the link address provided.',
|
|
82
|
+
'proto': 'Provided source URL must include https:// or http:// before the address (depending on the source content type).'
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
message += errorList[errorCode]
|
|
86
|
+
setErrorMessage(message)
|
|
87
|
+
} else {
|
|
88
|
+
setErrorMessage(null)
|
|
89
|
+
}
|
|
90
|
+
}, [ markupError ])
|
|
91
|
+
|
|
92
|
+
const loadConfigMarkupData = useCallback(async () => {
|
|
93
|
+
setMarkupError(null)
|
|
94
|
+
|
|
95
|
+
if (config.srcUrl) {
|
|
96
|
+
if (config.srcUrl === '#example') {
|
|
97
|
+
setUrlMarkup('<!doctype html><html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> </head> <body> <h1>Header</h1> <p> But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. </p><br/><p> No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. </p><br/><p> To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?</p></body></html>')
|
|
98
|
+
} else {
|
|
99
|
+
try {
|
|
100
|
+
await axios
|
|
101
|
+
.get(config.srcUrl)
|
|
102
|
+
.then((res) => {
|
|
103
|
+
if (res.data) {
|
|
104
|
+
setUrlMarkup(res.data)
|
|
105
|
+
}
|
|
106
|
+
})
|
|
107
|
+
} catch (err) {
|
|
108
|
+
if (err.response) {
|
|
109
|
+
// Response with error
|
|
110
|
+
setMarkupError(err.response.status)
|
|
111
|
+
} else if (err.request) {
|
|
112
|
+
// No response received
|
|
113
|
+
setMarkupError(200)
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
setUrlMarkup('')
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
} else {
|
|
120
|
+
setUrlMarkup('')
|
|
121
|
+
}
|
|
122
|
+
}, [ config.srcUrl ])
|
|
123
|
+
|
|
124
|
+
const parseBodyMarkup = (markup) => {
|
|
125
|
+
let parse
|
|
126
|
+
let hasBody = false
|
|
127
|
+
if (markup && markup !== '' && markup !== null) {
|
|
128
|
+
if (markup.toString().match(/<body[^>]*>/i) && markup.toString().match(/<\/body\s*>/i)) {
|
|
129
|
+
hasBody = true
|
|
130
|
+
parse = markup.toString().match(/<body[^>]*>([^<]*(?:(?!<\/?body)<[^<]*)*)<\/body\s*>/i)
|
|
131
|
+
} else {
|
|
132
|
+
parse = markup.toString()
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return hasBody ? parse[1] : parse
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
//Load initial config
|
|
140
|
+
useEffect(() => {
|
|
141
|
+
loadConfig().catch((err) => console.log(err))
|
|
142
|
+
}, [])
|
|
143
|
+
|
|
144
|
+
//Reload config if config object provided/updated
|
|
145
|
+
useEffect(() => {
|
|
146
|
+
loadConfig().catch((err) => console.log(err))
|
|
147
|
+
}, [ configObj?.data ])
|
|
148
|
+
|
|
149
|
+
//Reload any functions when config is updated
|
|
150
|
+
useEffect(() => {
|
|
151
|
+
loadConfigMarkupData().catch((err) => console.log(err))
|
|
152
|
+
}, [ loadConfigMarkupData ])
|
|
153
|
+
|
|
154
|
+
let content = (<Loading/>)
|
|
155
|
+
|
|
156
|
+
if (loading === false) {
|
|
157
|
+
let body = (
|
|
158
|
+
<>
|
|
159
|
+
<div className="cove-component markup-include">
|
|
160
|
+
{title &&
|
|
161
|
+
<header className={`cove-component__header ${config.theme}`} aria-hidden="true">
|
|
162
|
+
{parse(title)} {isDashboard}
|
|
163
|
+
</header>
|
|
164
|
+
}
|
|
165
|
+
<div className="cove-component__content">
|
|
166
|
+
{!markupError && urlMarkup &&
|
|
167
|
+
<div className="cove-component__content-wrap">
|
|
168
|
+
<Markup content={parseBodyMarkup(urlMarkup)}/>
|
|
169
|
+
</div>
|
|
170
|
+
}
|
|
171
|
+
{markupError && config.srcUrl && <div className="warning">{errorMessage}</div>}
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
</>
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
content = (
|
|
178
|
+
<div className={`cove`} style={isDashboard ? { marginTop: '3rem' } : null}>
|
|
179
|
+
{isEditor && <EditorPanel>{body}</EditorPanel>}
|
|
180
|
+
{!isEditor && body}
|
|
181
|
+
</div>
|
|
182
|
+
)
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
return (
|
|
186
|
+
<ErrorBoundary component="CdcMarkupInclude">
|
|
187
|
+
<ConfigContext.Provider
|
|
188
|
+
value={{ config, updateConfig, loading, data: config.data, setParentConfig, isDashboard }}>
|
|
189
|
+
{content}
|
|
190
|
+
</ConfigContext.Provider>
|
|
191
|
+
</ErrorBoundary>
|
|
192
|
+
)
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export default CdcMarkupInclude
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import React, { useState, useEffect, memo, useContext } from 'react'
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
Accordion,
|
|
5
|
+
AccordionItem,
|
|
6
|
+
AccordionItemHeading,
|
|
7
|
+
AccordionItemPanel,
|
|
8
|
+
AccordionItemButton,
|
|
9
|
+
} from 'react-accessible-accordion'
|
|
10
|
+
|
|
11
|
+
import ConfigContext from '../ConfigContext'
|
|
12
|
+
import ErrorBoundary from '@cdc/core/components/ErrorBoundary'
|
|
13
|
+
import InputText from '@cdc/core/components/input/InputText'
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
const headerColors = [ 'theme-blue', 'theme-purple', 'theme-brown', 'theme-teal', 'theme-pink', 'theme-orange', 'theme-slate', 'theme-indigo', 'theme-cyan', 'theme-green', 'theme-amber' ]
|
|
17
|
+
|
|
18
|
+
const EditorPanel = memo((props) => {
|
|
19
|
+
const {
|
|
20
|
+
config,
|
|
21
|
+
updateConfig,
|
|
22
|
+
loading,
|
|
23
|
+
data,
|
|
24
|
+
setParentConfig,
|
|
25
|
+
isDashboard
|
|
26
|
+
} = useContext(ConfigContext)
|
|
27
|
+
|
|
28
|
+
const [ displayPanel, setDisplayPanel ] = useState(true)
|
|
29
|
+
const [ showConfigConfirm, setShowConfigConfirm ] = useState(true)
|
|
30
|
+
|
|
31
|
+
const updateField = (section, subsection, fieldName, newValue) => {
|
|
32
|
+
// Top level
|
|
33
|
+
if (null === section && null === subsection) {
|
|
34
|
+
let updatedConfig = { ...config, [fieldName]: newValue }
|
|
35
|
+
|
|
36
|
+
if ('filterColumn' === fieldName) {
|
|
37
|
+
updatedConfig.filterValue = ''
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
updateConfig(updatedConfig)
|
|
41
|
+
return
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const isArray = Array.isArray(config[section])
|
|
45
|
+
|
|
46
|
+
let sectionValue = isArray ? [ ...config[section], newValue ] : { ...config[section], [fieldName]: newValue }
|
|
47
|
+
|
|
48
|
+
if (null !== subsection) {
|
|
49
|
+
if (isArray) {
|
|
50
|
+
sectionValue = [ ...config[section] ]
|
|
51
|
+
sectionValue[subsection] = { ...sectionValue[subsection], [fieldName]: newValue }
|
|
52
|
+
} else if (typeof newValue === 'string') {
|
|
53
|
+
sectionValue[subsection] = newValue
|
|
54
|
+
} else {
|
|
55
|
+
sectionValue = { ...config[section], [subsection]: { ...config[section][subsection], [fieldName]: newValue } }
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
let updatedConfig = { ...config, [section]: sectionValue }
|
|
60
|
+
|
|
61
|
+
updateConfig(updatedConfig)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const missingRequiredSections = () => {
|
|
65
|
+
return false
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
useEffect(() => {
|
|
69
|
+
// Pass up to Editor if needed
|
|
70
|
+
if (setParentConfig) {
|
|
71
|
+
const newConfig = convertStateToConfig()
|
|
72
|
+
|
|
73
|
+
setParentConfig(newConfig)
|
|
74
|
+
}
|
|
75
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
76
|
+
}, [ config ])
|
|
77
|
+
|
|
78
|
+
useEffect(()=> {
|
|
79
|
+
if (!showConfigConfirm) {
|
|
80
|
+
let newConfig = { ...config }
|
|
81
|
+
delete newConfig.newViz
|
|
82
|
+
updateConfig(newConfig)
|
|
83
|
+
}
|
|
84
|
+
}, [])
|
|
85
|
+
|
|
86
|
+
const onBackClick = () => {
|
|
87
|
+
setDisplayPanel(!displayPanel)
|
|
88
|
+
|
|
89
|
+
// if (isDashboard) {
|
|
90
|
+
// updateConfig({ ...config, editing: false })
|
|
91
|
+
// } else {
|
|
92
|
+
// setDisplayPanel(!displayPanel)
|
|
93
|
+
// }
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
const Error = () => {
|
|
97
|
+
return (
|
|
98
|
+
<section className="waiting">
|
|
99
|
+
<section className="waiting-container">
|
|
100
|
+
<h3>Error With Configuration</h3>
|
|
101
|
+
<p>{config.runtime.editorErrorMessage}</p>
|
|
102
|
+
</section>
|
|
103
|
+
</section>
|
|
104
|
+
)
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const Confirm = () => {
|
|
108
|
+
const confirmDone = (e) => {
|
|
109
|
+
e.preventDefault()
|
|
110
|
+
let newConfig = { ...config }
|
|
111
|
+
delete newConfig.newViz
|
|
112
|
+
updateConfig(newConfig)
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
return (
|
|
116
|
+
<section className="waiting">
|
|
117
|
+
<section className="waiting-container">
|
|
118
|
+
<h3>Finish Configuring</h3>
|
|
119
|
+
<p>Set all required options to the left and confirm below to display a preview of the markup.</p>
|
|
120
|
+
<button className="btn" style={{ margin: '1em auto' }} disabled={missingRequiredSections()}
|
|
121
|
+
onClick={confirmDone}>I'm Done
|
|
122
|
+
</button>
|
|
123
|
+
</section>
|
|
124
|
+
</section>
|
|
125
|
+
)
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
const convertStateToConfig = () => {
|
|
129
|
+
let strippedState = JSON.parse(JSON.stringify(config))
|
|
130
|
+
if (false === missingRequiredSections()) {
|
|
131
|
+
delete strippedState.newViz
|
|
132
|
+
}
|
|
133
|
+
delete strippedState.runtime
|
|
134
|
+
|
|
135
|
+
return strippedState
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
if (loading) {
|
|
139
|
+
return null
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
return (
|
|
143
|
+
<ErrorBoundary component="EditorPanel">
|
|
144
|
+
<div className="cove-editor">
|
|
145
|
+
{!config.newViz && config.runtime && config.runtime.editorErrorMessage && <Error/>}
|
|
146
|
+
{config.newViz && showConfigConfirm && <Confirm/>}
|
|
147
|
+
<button className={`cove-editor--toggle` + (!displayPanel ? ` collapsed` : ``)}
|
|
148
|
+
title={displayPanel ? `Collapse Editor` : `Expand Editor`} onClick={onBackClick}/>
|
|
149
|
+
<section className={`cove-editor__panel` + (displayPanel ? `` : ' hidden')}>
|
|
150
|
+
<div className="cove-editor__panel-container">
|
|
151
|
+
<h2 className="cove-editor__heading">Configure Markup Include</h2>
|
|
152
|
+
<section className="form-container">
|
|
153
|
+
<form>
|
|
154
|
+
<Accordion allowZeroExpanded={true}>
|
|
155
|
+
<AccordionItem> {/* General */}
|
|
156
|
+
<AccordionItemHeading>
|
|
157
|
+
<AccordionItemButton>
|
|
158
|
+
General
|
|
159
|
+
</AccordionItemButton>
|
|
160
|
+
</AccordionItemHeading>
|
|
161
|
+
<AccordionItemPanel>
|
|
162
|
+
<InputText value={config.title || ''} fieldName="title" label="Title"
|
|
163
|
+
placeholder="Markup Include Title"
|
|
164
|
+
updateField={updateField}/>
|
|
165
|
+
|
|
166
|
+
<InputText
|
|
167
|
+
value={config.srcUrl || ''} fieldName="srcUrl" label="Source URL"
|
|
168
|
+
placeholder="https://www.example.com/file.html" updateField={updateField}
|
|
169
|
+
/>
|
|
170
|
+
</AccordionItemPanel>
|
|
171
|
+
</AccordionItem>
|
|
172
|
+
<AccordionItem>
|
|
173
|
+
<AccordionItemHeading>
|
|
174
|
+
<AccordionItemButton>
|
|
175
|
+
Visual
|
|
176
|
+
</AccordionItemButton>
|
|
177
|
+
</AccordionItemHeading>
|
|
178
|
+
<AccordionItemPanel>
|
|
179
|
+
<div className="input-group">
|
|
180
|
+
<label>Theme</label>
|
|
181
|
+
<ul className="color-palette">
|
|
182
|
+
{headerColors.map((palette) => (
|
|
183
|
+
<li title={palette} key={palette} onClick={() => {
|
|
184
|
+
updateConfig({ ...config, theme: palette })
|
|
185
|
+
}} className={config.theme === palette ? 'selected ' + palette : palette}>
|
|
186
|
+
</li>
|
|
187
|
+
))}
|
|
188
|
+
</ul>
|
|
189
|
+
</div>
|
|
190
|
+
</AccordionItemPanel>
|
|
191
|
+
</AccordionItem>
|
|
192
|
+
</Accordion>
|
|
193
|
+
</form>
|
|
194
|
+
</section>
|
|
195
|
+
</div>
|
|
196
|
+
</section>
|
|
197
|
+
<div className="cove-editor__content">
|
|
198
|
+
<div className="cove-editor__content-wrap">
|
|
199
|
+
{props.children}
|
|
200
|
+
</div>
|
|
201
|
+
</div>
|
|
202
|
+
</div>
|
|
203
|
+
</ErrorBoundary>
|
|
204
|
+
)
|
|
205
|
+
})
|
|
206
|
+
|
|
207
|
+
export default EditorPanel
|
package/src/index.html
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8"/>
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
|
|
6
|
+
</head>
|
|
7
|
+
<body>
|
|
8
|
+
<div class="react-container" data-config="/examples/example-config.json"></div>
|
|
9
|
+
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
10
|
+
</body>
|
|
11
|
+
</html>
|
package/src/index.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render } from 'react-dom';
|
|
3
|
+
import CdcMarkupInclude from './CdcMarkupInclude'
|
|
4
|
+
|
|
5
|
+
const domContainers = document.querySelectorAll('.react-container');
|
|
6
|
+
|
|
7
|
+
let isEditor = window.location.href.includes('editor=true');
|
|
8
|
+
|
|
9
|
+
domContainers.forEach((domContainer) => {
|
|
10
|
+
render(
|
|
11
|
+
<React.StrictMode>
|
|
12
|
+
<CdcMarkupInclude configUrl={domContainer.attributes['data-config'].value} isEditor={isEditor} />
|
|
13
|
+
</React.StrictMode>,
|
|
14
|
+
domContainer
|
|
15
|
+
);
|
|
16
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
$theme-colors: (
|
|
2
|
+
"blue": $primary,
|
|
3
|
+
"purple": $purple-primary,
|
|
4
|
+
"brown": $brown-primary,
|
|
5
|
+
"teal": $teal-primary,
|
|
6
|
+
"pink": $pink-primary,
|
|
7
|
+
"orange": $orange-primary,
|
|
8
|
+
"slate": $slate-primary,
|
|
9
|
+
"indigo": $indigo-primary,
|
|
10
|
+
"cyan": $cyan-primary,
|
|
11
|
+
"green": $green-primary,
|
|
12
|
+
"amber": $amber-primary
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
$theme-colors-secondary: (
|
|
16
|
+
"blue": $secondary,
|
|
17
|
+
"purple": $purple-secondary,
|
|
18
|
+
"brown": $brown-secondary,
|
|
19
|
+
"teal": $teal-secondary,
|
|
20
|
+
"pink": $pink-secondary,
|
|
21
|
+
"orange": $orange-secondary,
|
|
22
|
+
"slate": $slate-secondary,
|
|
23
|
+
"indigo": $indigo-secondary,
|
|
24
|
+
"cyan": $cyan-secondary,
|
|
25
|
+
"green": $green-secondary,
|
|
26
|
+
"amber": $amber-secondary
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
$editorWidth: 350px;
|