Version Description
- 25.07.2022 = Fixed: Warning Undefined array key "icon", "icon-color", "icon-text" if transients are not set. ( https://github.com/WPChill/download-monitor/issues/979 ) Fixed: On Pantheon hosted environments redirect to file doesn't work. ( https://github.com/WPChill/download-monitor/issues/914 ) Changed: Remove double usage of parse_file_path();. ( https://github.com/WPChill/download-monitor/issues/983 ) Changed: Remove all non-related actions from admin_notices on Download Monitor's pages. ( https://github.com/WPChill/download-monitor/issues/910 ) Changed: Move all Download Monitor's admin_notices actions to prio 8 (https://github.com/WPChill/download-monitor/issues/984) Changed: Enhanced Download Monitor's disable survey ( https://github.com/WPChill/download-monitor/issues/881 ) Fix: Uninstall process not targeting the components correctly ( https://github.com/WPChill/download-monitor/issues/992 )
Download this release
Release Info
Developer | raldea89 |
Plugin | Download Monitor |
Version | 4.5.95 |
Comparing to | |
See all releases |
Code changes from version 4.5.94 to 4.5.95
- assets/blocks/src/blocks.js +165 -165
- assets/blocks/src/components/DownloadButton/index.js +67 -67
- assets/blocks/src/components/DownloadInput/index.js +33 -33
- assets/blocks/src/components/TemplateInput/index.js +22 -22
- assets/blocks/src/components/VersionInput/index.js +49 -49
- assets/css/admin.css +1 -1
- assets/css/admin.less +2274 -2274
- assets/css/cart.less +87 -87
- assets/css/checkout.less +205 -205
- assets/css/dashboard.less +49 -49
- assets/css/frontend.less +198 -198
- assets/css/gb-editor.less +10 -10
- assets/css/menu.css +1 -1
- assets/css/menu.less +97 -97
- assets/css/preview.less +18 -18
- assets/js/blockui.js +615 -615
- assets/js/blockui.min.js +1 -1
- assets/js/chosen/chosen.css +413 -413
- assets/js/chosen/chosen.jquery.js +1090 -1090
- assets/js/chosen/chosen.jquery.min.js +9 -9
- assets/js/dlm-uninstall.js +69 -69
- assets/js/dlm-uninstall.min.js +1 -1
- assets/js/download-duplicator.js +18 -18
- assets/js/edit-download.js +246 -246
- assets/js/edit-download.min.js +1 -1
- assets/js/extensions.js +41 -41
- assets/js/insert-download.js +8 -8
- assets/js/legacy-upgrader/build/style.css +1 -1
- assets/js/legacy-upgrader/package.json +101 -101
- assets/js/legacy-upgrader/src/components/app.js +69 -69
- assets/js/legacy-upgrader/src/components/content/QueueItem.js +13 -13
- assets/js/legacy-upgrader/src/components/content/index.js +149 -149
- assets/js/legacy-upgrader/src/components/content/style.less +49 -49
- assets/js/legacy-upgrader/src/components/done/index.js +36 -36
- assets/js/legacy-upgrader/src/components/done/style.less +5 -5
- assets/js/legacy-upgrader/src/components/downloads/QueueItem.js +12 -12
- assets/js/legacy-upgrader/src/components/downloads/index.js +145 -145
- assets/js/legacy-upgrader/src/components/downloads/style.less +49 -49
- assets/js/legacy-upgrader/src/components/welcome/index.js +16 -16
- assets/js/legacy-upgrader/src/components/welcome/style.less +5 -5
- assets/js/legacy-upgrader/src/config.json +3 -3
- assets/js/legacy-upgrader/src/index.ejs +408 -408
- assets/js/legacy-upgrader/src/index.js +20 -20
- assets/js/legacy-upgrader/src/style/helpers.less +19 -19
- assets/js/legacy-upgrader/src/style/index.less +6 -6
- assets/js/legacy-upgrader/src/style/mixins.less +18 -18
- assets/js/legacy-upgrader/src/style/variables.less +5 -5
- assets/js/legacy-upgrader/webpack.config.babel.js +184 -184
- assets/js/notices.js +20 -20
- assets/js/onboarding.js +69 -69
- assets/js/overview-download.js +51 -51
- assets/js/overview-download.min.js +1 -1
- assets/js/reports/charts-date-range-selector.js +90 -90
- assets/js/reports/charts-date-range-selector.min.js +1 -1
- assets/js/reports/charts.min.js +13 -13
- assets/js/reports/reports.js +367 -367
- assets/js/reports/reports.min.js +1 -1
- assets/js/select2/select2.min.css +1 -1
- assets/js/settings.js +62 -62
- assets/js/shop/admin-order-details.js +45 -45
- assets/js/shop/checkout.js +43 -127
assets/blocks/src/blocks.js
CHANGED
@@ -1,165 +1,165 @@
|
|
1 |
-
//import 'whatwg-fetch';
|
2 |
-
import Select from 'react-select';
|
3 |
-
|
4 |
-
import { __ } from '@wordpress/i18n';
|
5 |
-
import { registerBlockType } from '@wordpress/blocks';
|
6 |
-
import { InspectorControls } from '@wordpress/block-editor';
|
7 |
-
import { PanelBody } from '@wordpress/components';
|
8 |
-
import { Fragment } from '@wordpress/element';
|
9 |
-
|
10 |
-
import DownloadButton from './components/DownloadButton';
|
11 |
-
import DownloadInput from './components/DownloadInput';
|
12 |
-
import VersionInput from './components/VersionInput';
|
13 |
-
import TemplateInput from './components/TemplateInput';
|
14 |
-
|
15 |
-
//setLocaleData( window.gutenberg_dlm_blocks.localeData, 'download-monitor' );
|
16 |
-
|
17 |
-
registerBlockType( 'download-monitor/download-button', {
|
18 |
-
title: __( 'Download Button', 'download-monitor' ),
|
19 |
-
icon: 'download',
|
20 |
-
keywords: [
|
21 |
-
__( 'download', 'download-monitor' ),
|
22 |
-
'download monitor',
|
23 |
-
__( 'file', 'download-monitor' ),
|
24 |
-
],
|
25 |
-
category: 'common',
|
26 |
-
attributes: {
|
27 |
-
download_id: {
|
28 |
-
type: 'number',
|
29 |
-
default: 0,
|
30 |
-
},
|
31 |
-
version_id: {
|
32 |
-
type: 'number',
|
33 |
-
default: 0,
|
34 |
-
},
|
35 |
-
template: {
|
36 |
-
type: 'string',
|
37 |
-
default: 'settings',
|
38 |
-
},
|
39 |
-
custom_template: {
|
40 |
-
type: 'string',
|
41 |
-
default: '',
|
42 |
-
},
|
43 |
-
autop: {
|
44 |
-
type: 'number',
|
45 |
-
default: 0,
|
46 |
-
},
|
47 |
-
},
|
48 |
-
edit: ( props ) => {
|
49 |
-
const {
|
50 |
-
attributes: {
|
51 |
-
download_id,
|
52 |
-
version_id,
|
53 |
-
template,
|
54 |
-
custom_template,
|
55 |
-
autop,
|
56 |
-
},
|
57 |
-
setAttributes,
|
58 |
-
} = props;
|
59 |
-
|
60 |
-
const valueFromId = ( opts, id ) =>
|
61 |
-
opts.find( ( o ) => o.value === id );
|
62 |
-
const autoPOptions = [
|
63 |
-
{ value: 0, label: 'No' },
|
64 |
-
{ value: 1, label: 'Yes' },
|
65 |
-
];
|
66 |
-
|
67 |
-
return (
|
68 |
-
<Fragment>
|
69 |
-
<InspectorControls>
|
70 |
-
<PanelBody
|
71 |
-
title={ __(
|
72 |
-
'Download Information',
|
73 |
-
'download-monitor'
|
74 |
-
) }
|
75 |
-
>
|
76 |
-
<div className="components-base-control">
|
77 |
-
<span className="components-base-control__label">
|
78 |
-
{ __( 'Download', 'download-monitor' ) }
|
79 |
-
</span>
|
80 |
-
<DownloadInput
|
81 |
-
onChange={ ( v ) =>
|
82 |
-
setAttributes( { download_id: v } )
|
83 |
-
}
|
84 |
-
selectedDownloadId={ download_id }
|
85 |
-
/>
|
86 |
-
</div>
|
87 |
-
|
88 |
-
<div className="components-base-control">
|
89 |
-
<span className="components-base-control__label">
|
90 |
-
{ __( 'Version', 'download-monitor' ) }
|
91 |
-
</span>
|
92 |
-
<VersionInput
|
93 |
-
onChange={ ( v ) =>
|
94 |
-
setAttributes( { version_id: v } )
|
95 |
-
}
|
96 |
-
selectedVersionId={ version_id }
|
97 |
-
downloadId={ download_id }
|
98 |
-
/>
|
99 |
-
</div>
|
100 |
-
</PanelBody>
|
101 |
-
|
102 |
-
<PanelBody title={ __( 'Template', 'download-monitor' ) }>
|
103 |
-
<div className="components-base-control dlmGbEditorTemplateWrapper">
|
104 |
-
<span className="components-base-control__label">
|
105 |
-
{ __( 'Template', 'download-monitor' ) }
|
106 |
-
</span>
|
107 |
-
<TemplateInput
|
108 |
-
onChange={ ( v ) =>
|
109 |
-
setAttributes( { template: v } )
|
110 |
-
}
|
111 |
-
selectedTemplate={ template }
|
112 |
-
templatesStr={ window.dlmBlocks.templates }
|
113 |
-
/>
|
114 |
-
</div>
|
115 |
-
{ template === 'custom' && (
|
116 |
-
<div className="components-base-control">
|
117 |
-
<span className="components-base-control__label">
|
118 |
-
{ __(
|
119 |
-
'Custom Template',
|
120 |
-
'download-monitor'
|
121 |
-
) }
|
122 |
-
</span>
|
123 |
-
<input
|
124 |
-
className="components-text-control__input"
|
125 |
-
onChange={ ( e ) =>
|
126 |
-
setAttributes( {
|
127 |
-
custom_template: e.target.value,
|
128 |
-
} )
|
129 |
-
}
|
130 |
-
value={ custom_template }
|
131 |
-
/>
|
132 |
-
</div>
|
133 |
-
) }
|
134 |
-
<div className="components-base-control dlmGbEditorTemplateWrapper">
|
135 |
-
<span className="components-base-control__label">
|
136 |
-
{ __(
|
137 |
-
'Wrap in paragraph tag (<p>)?',
|
138 |
-
'download-monitor'
|
139 |
-
) }
|
140 |
-
</span>
|
141 |
-
<Select
|
142 |
-
value={ valueFromId( autoPOptions, autop ) }
|
143 |
-
onChange={ ( selectedOption ) => {
|
144 |
-
setAttributes( {
|
145 |
-
autop: selectedOption.value,
|
146 |
-
} );
|
147 |
-
} }
|
148 |
-
options={ autoPOptions }
|
149 |
-
isSearchable="false"
|
150 |
-
/>
|
151 |
-
</div>
|
152 |
-
</PanelBody>
|
153 |
-
</InspectorControls>
|
154 |
-
|
155 |
-
<DownloadButton
|
156 |
-
download_id={ download_id }
|
157 |
-
version_id={ version_id }
|
158 |
-
template={ template }
|
159 |
-
custom_template={ custom_template }
|
160 |
-
/>
|
161 |
-
</Fragment>
|
162 |
-
);
|
163 |
-
},
|
164 |
-
save: () => null,
|
165 |
-
} );
|
1 |
+
//import 'whatwg-fetch';
|
2 |
+
import Select from 'react-select';
|
3 |
+
|
4 |
+
import { __ } from '@wordpress/i18n';
|
5 |
+
import { registerBlockType } from '@wordpress/blocks';
|
6 |
+
import { InspectorControls } from '@wordpress/block-editor';
|
7 |
+
import { PanelBody } from '@wordpress/components';
|
8 |
+
import { Fragment } from '@wordpress/element';
|
9 |
+
|
10 |
+
import DownloadButton from './components/DownloadButton';
|
11 |
+
import DownloadInput from './components/DownloadInput';
|
12 |
+
import VersionInput from './components/VersionInput';
|
13 |
+
import TemplateInput from './components/TemplateInput';
|
14 |
+
|
15 |
+
//setLocaleData( window.gutenberg_dlm_blocks.localeData, 'download-monitor' );
|
16 |
+
|
17 |
+
registerBlockType( 'download-monitor/download-button', {
|
18 |
+
title: __( 'Download Button', 'download-monitor' ),
|
19 |
+
icon: 'download',
|
20 |
+
keywords: [
|
21 |
+
__( 'download', 'download-monitor' ),
|
22 |
+
'download monitor',
|
23 |
+
__( 'file', 'download-monitor' ),
|
24 |
+
],
|
25 |
+
category: 'common',
|
26 |
+
attributes: {
|
27 |
+
download_id: {
|
28 |
+
type: 'number',
|
29 |
+
default: 0,
|
30 |
+
},
|
31 |
+
version_id: {
|
32 |
+
type: 'number',
|
33 |
+
default: 0,
|
34 |
+
},
|
35 |
+
template: {
|
36 |
+
type: 'string',
|
37 |
+
default: 'settings',
|
38 |
+
},
|
39 |
+
custom_template: {
|
40 |
+
type: 'string',
|
41 |
+
default: '',
|
42 |
+
},
|
43 |
+
autop: {
|
44 |
+
type: 'number',
|
45 |
+
default: 0,
|
46 |
+
},
|
47 |
+
},
|
48 |
+
edit: ( props ) => {
|
49 |
+
const {
|
50 |
+
attributes: {
|
51 |
+
download_id,
|
52 |
+
version_id,
|
53 |
+
template,
|
54 |
+
custom_template,
|
55 |
+
autop,
|
56 |
+
},
|
57 |
+
setAttributes,
|
58 |
+
} = props;
|
59 |
+
|
60 |
+
const valueFromId = ( opts, id ) =>
|
61 |
+
opts.find( ( o ) => o.value === id );
|
62 |
+
const autoPOptions = [
|
63 |
+
{ value: 0, label: 'No' },
|
64 |
+
{ value: 1, label: 'Yes' },
|
65 |
+
];
|
66 |
+
|
67 |
+
return (
|
68 |
+
<Fragment>
|
69 |
+
<InspectorControls>
|
70 |
+
<PanelBody
|
71 |
+
title={ __(
|
72 |
+
'Download Information',
|
73 |
+
'download-monitor'
|
74 |
+
) }
|
75 |
+
>
|
76 |
+
<div className="components-base-control">
|
77 |
+
<span className="components-base-control__label">
|
78 |
+
{ __( 'Download', 'download-monitor' ) }
|
79 |
+
</span>
|
80 |
+
<DownloadInput
|
81 |
+
onChange={ ( v ) =>
|
82 |
+
setAttributes( { download_id: v } )
|
83 |
+
}
|
84 |
+
selectedDownloadId={ download_id }
|
85 |
+
/>
|
86 |
+
</div>
|
87 |
+
|
88 |
+
<div className="components-base-control">
|
89 |
+
<span className="components-base-control__label">
|
90 |
+
{ __( 'Version', 'download-monitor' ) }
|
91 |
+
</span>
|
92 |
+
<VersionInput
|
93 |
+
onChange={ ( v ) =>
|
94 |
+
setAttributes( { version_id: v } )
|
95 |
+
}
|
96 |
+
selectedVersionId={ version_id }
|
97 |
+
downloadId={ download_id }
|
98 |
+
/>
|
99 |
+
</div>
|
100 |
+
</PanelBody>
|
101 |
+
|
102 |
+
<PanelBody title={ __( 'Template', 'download-monitor' ) }>
|
103 |
+
<div className="components-base-control dlmGbEditorTemplateWrapper">
|
104 |
+
<span className="components-base-control__label">
|
105 |
+
{ __( 'Template', 'download-monitor' ) }
|
106 |
+
</span>
|
107 |
+
<TemplateInput
|
108 |
+
onChange={ ( v ) =>
|
109 |
+
setAttributes( { template: v } )
|
110 |
+
}
|
111 |
+
selectedTemplate={ template }
|
112 |
+
templatesStr={ window.dlmBlocks.templates }
|
113 |
+
/>
|
114 |
+
</div>
|
115 |
+
{ template === 'custom' && (
|
116 |
+
<div className="components-base-control">
|
117 |
+
<span className="components-base-control__label">
|
118 |
+
{ __(
|
119 |
+
'Custom Template',
|
120 |
+
'download-monitor'
|
121 |
+
) }
|
122 |
+
</span>
|
123 |
+
<input
|
124 |
+
className="components-text-control__input"
|
125 |
+
onChange={ ( e ) =>
|
126 |
+
setAttributes( {
|
127 |
+
custom_template: e.target.value,
|
128 |
+
} )
|
129 |
+
}
|
130 |
+
value={ custom_template }
|
131 |
+
/>
|
132 |
+
</div>
|
133 |
+
) }
|
134 |
+
<div className="components-base-control dlmGbEditorTemplateWrapper">
|
135 |
+
<span className="components-base-control__label">
|
136 |
+
{ __(
|
137 |
+
'Wrap in paragraph tag (<p>)?',
|
138 |
+
'download-monitor'
|
139 |
+
) }
|
140 |
+
</span>
|
141 |
+
<Select
|
142 |
+
value={ valueFromId( autoPOptions, autop ) }
|
143 |
+
onChange={ ( selectedOption ) => {
|
144 |
+
setAttributes( {
|
145 |
+
autop: selectedOption.value,
|
146 |
+
} );
|
147 |
+
} }
|
148 |
+
options={ autoPOptions }
|
149 |
+
isSearchable="false"
|
150 |
+
/>
|
151 |
+
</div>
|
152 |
+
</PanelBody>
|
153 |
+
</InspectorControls>
|
154 |
+
|
155 |
+
<DownloadButton
|
156 |
+
download_id={ download_id }
|
157 |
+
version_id={ version_id }
|
158 |
+
template={ template }
|
159 |
+
custom_template={ custom_template }
|
160 |
+
/>
|
161 |
+
</Fragment>
|
162 |
+
);
|
163 |
+
},
|
164 |
+
save: () => null,
|
165 |
+
} );
|
assets/blocks/src/components/DownloadButton/index.js
CHANGED
@@ -1,67 +1,67 @@
|
|
1 |
-
import { useState } from '@wordpress/element';
|
2 |
-
|
3 |
-
const DownloadButton = ( {
|
4 |
-
download_id,
|
5 |
-
version_id,
|
6 |
-
template,
|
7 |
-
custom_template,
|
8 |
-
} ) => {
|
9 |
-
const [ calculatedHeight, setCalculatedHeight ] = useState( {
|
10 |
-
cacheKey: '',
|
11 |
-
height: 100,
|
12 |
-
} );
|
13 |
-
|
14 |
-
const getIframeUrl = () => {
|
15 |
-
let iframeURL = window.dlmBlocks.urlButtonPreview;
|
16 |
-
|
17 |
-
if ( download_id !== 0 ) {
|
18 |
-
iframeURL += '&download_id=' + download_id;
|
19 |
-
}
|
20 |
-
|
21 |
-
if ( version_id !== 0 ) {
|
22 |
-
iframeURL += '&version_id=' + version_id;
|
23 |
-
}
|
24 |
-
|
25 |
-
if ( template !== '' ) {
|
26 |
-
iframeURL += '&template=' + template;
|
27 |
-
}
|
28 |
-
|
29 |
-
if ( custom_template !== '' ) {
|
30 |
-
iframeURL += '&custom_template=' + custom_template;
|
31 |
-
}
|
32 |
-
|
33 |
-
return iframeURL;
|
34 |
-
};
|
35 |
-
|
36 |
-
const updateHeight = ( target ) => {
|
37 |
-
const cacheKey = encodeURI( getIframeUrl() );
|
38 |
-
|
39 |
-
// check if we need to reset height to new URL
|
40 |
-
if ( calculatedHeight.chacheKey !== cacheKey ) {
|
41 |
-
setCalculatedHeight( {
|
42 |
-
cacheKey,
|
43 |
-
height: target.contentDocument.getElementById(
|
44 |
-
'dlmPreviewContainer'
|
45 |
-
).scrollHeight,
|
46 |
-
} );
|
47 |
-
}
|
48 |
-
};
|
49 |
-
|
50 |
-
const iframeURL = getIframeUrl();
|
51 |
-
const frameHeight = calculatedHeight.height + 'px';
|
52 |
-
|
53 |
-
return (
|
54 |
-
<div className="dlmPreviewButton">
|
55 |
-
<iframe
|
56 |
-
src={ iframeURL }
|
57 |
-
width="100%"
|
58 |
-
height={ frameHeight }
|
59 |
-
onLoad={ ( e ) => {
|
60 |
-
updateHeight( e.target );
|
61 |
-
} }
|
62 |
-
></iframe>
|
63 |
-
</div>
|
64 |
-
);
|
65 |
-
};
|
66 |
-
|
67 |
-
export default DownloadButton;
|
1 |
+
import { useState } from '@wordpress/element';
|
2 |
+
|
3 |
+
const DownloadButton = ( {
|
4 |
+
download_id,
|
5 |
+
version_id,
|
6 |
+
template,
|
7 |
+
custom_template,
|
8 |
+
} ) => {
|
9 |
+
const [ calculatedHeight, setCalculatedHeight ] = useState( {
|
10 |
+
cacheKey: '',
|
11 |
+
height: 100,
|
12 |
+
} );
|
13 |
+
|
14 |
+
const getIframeUrl = () => {
|
15 |
+
let iframeURL = window.dlmBlocks.urlButtonPreview;
|
16 |
+
|
17 |
+
if ( download_id !== 0 ) {
|
18 |
+
iframeURL += '&download_id=' + download_id;
|
19 |
+
}
|
20 |
+
|
21 |
+
if ( version_id !== 0 ) {
|
22 |
+
iframeURL += '&version_id=' + version_id;
|
23 |
+
}
|
24 |
+
|
25 |
+
if ( template !== '' ) {
|
26 |
+
iframeURL += '&template=' + template;
|
27 |
+
}
|
28 |
+
|
29 |
+
if ( custom_template !== '' ) {
|
30 |
+
iframeURL += '&custom_template=' + custom_template;
|
31 |
+
}
|
32 |
+
|
33 |
+
return iframeURL;
|
34 |
+
};
|
35 |
+
|
36 |
+
const updateHeight = ( target ) => {
|
37 |
+
const cacheKey = encodeURI( getIframeUrl() );
|
38 |
+
|
39 |
+
// check if we need to reset height to new URL
|
40 |
+
if ( calculatedHeight.chacheKey !== cacheKey ) {
|
41 |
+
setCalculatedHeight( {
|
42 |
+
cacheKey,
|
43 |
+
height: target.contentDocument.getElementById(
|
44 |
+
'dlmPreviewContainer'
|
45 |
+
).scrollHeight,
|
46 |
+
} );
|
47 |
+
}
|
48 |
+
};
|
49 |
+
|
50 |
+
const iframeURL = getIframeUrl();
|
51 |
+
const frameHeight = calculatedHeight.height + 'px';
|
52 |
+
|
53 |
+
return (
|
54 |
+
<div className="dlmPreviewButton">
|
55 |
+
<iframe
|
56 |
+
src={ iframeURL }
|
57 |
+
width="100%"
|
58 |
+
height={ frameHeight }
|
59 |
+
onLoad={ ( e ) => {
|
60 |
+
updateHeight( e.target );
|
61 |
+
} }
|
62 |
+
></iframe>
|
63 |
+
</div>
|
64 |
+
);
|
65 |
+
};
|
66 |
+
|
67 |
+
export default DownloadButton;
|
assets/blocks/src/components/DownloadInput/index.js
CHANGED
@@ -1,33 +1,33 @@
|
|
1 |
-
import Select from 'react-select';
|
2 |
-
|
3 |
-
import { useEffect, useState } from '@wordpress/element';
|
4 |
-
import apiFetch from '@wordpress/api-fetch';
|
5 |
-
|
6 |
-
const DownloadInput = ( { selectedDownloadId, onChange } ) => {
|
7 |
-
const [ downloads, setDownloads ] = useState( [] );
|
8 |
-
|
9 |
-
useEffect( () => {
|
10 |
-
apiFetch( { url: window.dlmBlocks.ajax_getDownloads } ).then(
|
11 |
-
( results ) => {
|
12 |
-
setDownloads( results );
|
13 |
-
}
|
14 |
-
);
|
15 |
-
}, [] );
|
16 |
-
|
17 |
-
const valueFromId = ( opts, id ) => opts.find( ( o ) => o.value === id );
|
18 |
-
|
19 |
-
return (
|
20 |
-
<div>
|
21 |
-
<Select
|
22 |
-
value={ valueFromId( downloads, selectedDownloadId ) }
|
23 |
-
onChange={ ( selectedOption ) =>
|
24 |
-
onChange( selectedOption.value )
|
25 |
-
}
|
26 |
-
options={ downloads }
|
27 |
-
isSearchable="true"
|
28 |
-
/>
|
29 |
-
</div>
|
30 |
-
);
|
31 |
-
};
|
32 |
-
|
33 |
-
export default DownloadInput;
|
1 |
+
import Select from 'react-select';
|
2 |
+
|
3 |
+
import { useEffect, useState } from '@wordpress/element';
|
4 |
+
import apiFetch from '@wordpress/api-fetch';
|
5 |
+
|
6 |
+
const DownloadInput = ( { selectedDownloadId, onChange } ) => {
|
7 |
+
const [ downloads, setDownloads ] = useState( [] );
|
8 |
+
|
9 |
+
useEffect( () => {
|
10 |
+
apiFetch( { url: window.dlmBlocks.ajax_getDownloads } ).then(
|
11 |
+
( results ) => {
|
12 |
+
setDownloads( results );
|
13 |
+
}
|
14 |
+
);
|
15 |
+
}, [] );
|
16 |
+
|
17 |
+
const valueFromId = ( opts, id ) => opts.find( ( o ) => o.value === id );
|
18 |
+
|
19 |
+
return (
|
20 |
+
<div>
|
21 |
+
<Select
|
22 |
+
value={ valueFromId( downloads, selectedDownloadId ) }
|
23 |
+
onChange={ ( selectedOption ) =>
|
24 |
+
onChange( selectedOption.value )
|
25 |
+
}
|
26 |
+
options={ downloads }
|
27 |
+
isSearchable="true"
|
28 |
+
/>
|
29 |
+
</div>
|
30 |
+
);
|
31 |
+
};
|
32 |
+
|
33 |
+
export default DownloadInput;
|
assets/blocks/src/components/TemplateInput/index.js
CHANGED
@@ -1,22 +1,22 @@
|
|
1 |
-
import Select from 'react-select';
|
2 |
-
|
3 |
-
const TemplateInput = ( { templatesStr, selectedTemplate, onChange } ) => {
|
4 |
-
const templates = JSON.parse( templatesStr );
|
5 |
-
|
6 |
-
const valueFromId = ( opts, id ) => opts.find( ( o ) => o.value === id );
|
7 |
-
|
8 |
-
return (
|
9 |
-
<div>
|
10 |
-
<Select
|
11 |
-
value={ valueFromId( templates, selectedTemplate ) }
|
12 |
-
onChange={ ( selectedOption ) =>
|
13 |
-
onChange( selectedOption.value )
|
14 |
-
}
|
15 |
-
options={ templates }
|
16 |
-
isSearchable="true"
|
17 |
-
/>
|
18 |
-
</div>
|
19 |
-
);
|
20 |
-
};
|
21 |
-
|
22 |
-
export default TemplateInput;
|
1 |
+
import Select from 'react-select';
|
2 |
+
|
3 |
+
const TemplateInput = ( { templatesStr, selectedTemplate, onChange } ) => {
|
4 |
+
const templates = JSON.parse( templatesStr );
|
5 |
+
|
6 |
+
const valueFromId = ( opts, id ) => opts.find( ( o ) => o.value === id );
|
7 |
+
|
8 |
+
return (
|
9 |
+
<div>
|
10 |
+
<Select
|
11 |
+
value={ valueFromId( templates, selectedTemplate ) }
|
12 |
+
onChange={ ( selectedOption ) =>
|
13 |
+
onChange( selectedOption.value )
|
14 |
+
}
|
15 |
+
options={ templates }
|
16 |
+
isSearchable="true"
|
17 |
+
/>
|
18 |
+
</div>
|
19 |
+
);
|
20 |
+
};
|
21 |
+
|
22 |
+
export default TemplateInput;
|
assets/blocks/src/components/VersionInput/index.js
CHANGED
@@ -1,49 +1,49 @@
|
|
1 |
-
import Select from 'react-select';
|
2 |
-
|
3 |
-
import { __ } from '@wordpress/i18n';
|
4 |
-
import { useEffect, useState } from '@wordpress/element';
|
5 |
-
import apiFetch from '@wordpress/api-fetch';
|
6 |
-
|
7 |
-
const VersionInput = ({ downloadId, selectedVersionId, onChange }) => {
|
8 |
-
const [versions, setVersions] = useState([]);
|
9 |
-
const [currentDownloadId, setCurrentDownloadId] = useState(downloadId);
|
10 |
-
|
11 |
-
useEffect(() => fetchVersions(downloadId), []);
|
12 |
-
|
13 |
-
useEffect(() => fetchVersions(downloadId), [downloadId]);
|
14 |
-
|
15 |
-
const fetchVersions = (downloadId) => {
|
16 |
-
if (
|
17 |
-
typeof downloadId !== 'undefined' &&
|
18 |
-
downloadId !== currentDownloadId
|
19 |
-
) {
|
20 |
-
// prettier-ignore
|
21 |
-
apiFetch({url:window.dlmBlocks.ajax_getVersions +'&download_id=' +downloadId,})
|
22 |
-
.then((results) => {
|
23 |
-
results.unshift({
|
24 |
-
value: 0,
|
25 |
-
label: __('Latest version', 'download-monitor'),
|
26 |
-
});
|
27 |
-
results = results.map( (version) => ( version.label == '' ? { value: version.value, label: `Unnamed ${version.value}` } : version ) ); //prettier-ignore
|
28 |
-
setVersions(results);
|
29 |
-
setCurrentDownloadId(downloadId);
|
30 |
-
});
|
31 |
-
}
|
32 |
-
};
|
33 |
-
|
34 |
-
const valueFromId = (opts, id) => opts.find((o) => o.value === id);
|
35 |
-
|
36 |
-
return (
|
37 |
-
<div>
|
38 |
-
<Select
|
39 |
-
value={valueFromId(versions, selectedVersionId)}
|
40 |
-
onChange={(selectedOption) => onChange(selectedOption.value)}
|
41 |
-
options={versions}
|
42 |
-
isSearchable="true"
|
43 |
-
isDisabled={typeof downloadId === 'undefined'}
|
44 |
-
/>
|
45 |
-
</div>
|
46 |
-
);
|
47 |
-
};
|
48 |
-
|
49 |
-
export default VersionInput;
|
1 |
+
import Select from 'react-select';
|
2 |
+
|
3 |
+
import { __ } from '@wordpress/i18n';
|
4 |
+
import { useEffect, useState } from '@wordpress/element';
|
5 |
+
import apiFetch from '@wordpress/api-fetch';
|
6 |
+
|
7 |
+
const VersionInput = ({ downloadId, selectedVersionId, onChange }) => {
|
8 |
+
const [versions, setVersions] = useState([]);
|
9 |
+
const [currentDownloadId, setCurrentDownloadId] = useState(downloadId);
|
10 |
+
|
11 |
+
useEffect(() => fetchVersions(downloadId), []);
|
12 |
+
|
13 |
+
useEffect(() => fetchVersions(downloadId), [downloadId]);
|
14 |
+
|
15 |
+
const fetchVersions = (downloadId) => {
|
16 |
+
if (
|
17 |
+
typeof downloadId !== 'undefined' &&
|
18 |
+
downloadId !== currentDownloadId
|
19 |
+
) {
|
20 |
+
// prettier-ignore
|
21 |
+
apiFetch({url:window.dlmBlocks.ajax_getVersions +'&download_id=' +downloadId,})
|
22 |
+
.then((results) => {
|
23 |
+
results.unshift({
|
24 |
+
value: 0,
|
25 |
+
label: __('Latest version', 'download-monitor'),
|
26 |
+
});
|
27 |
+
results = results.map( (version) => ( version.label == '' ? { value: version.value, label: `Unnamed ${version.value}` } : version ) ); //prettier-ignore
|
28 |
+
setVersions(results);
|
29 |
+
setCurrentDownloadId(downloadId);
|
30 |
+
});
|
31 |
+
}
|
32 |
+
};
|
33 |
+
|
34 |
+
const valueFromId = (opts, id) => opts.find((o) => o.value === id);
|
35 |
+
|
36 |
+
return (
|
37 |
+
<div>
|
38 |
+
<Select
|
39 |
+
value={valueFromId(versions, selectedVersionId)}
|
40 |
+
onChange={(selectedOption) => onChange(selectedOption.value)}
|
41 |
+
options={versions}
|
42 |
+
isSearchable="true"
|
43 |
+
isDisabled={typeof downloadId === 'undefined'}
|
44 |
+
/>
|
45 |
+
</div>
|
46 |
+
);
|
47 |
+
};
|
48 |
+
|
49 |
+
export default VersionInput;
|
assets/css/admin.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.post-type-dlm_download h1 a.dlm-delete-logs{color:#a00}.post-type-dlm_download h1 a.dlm-delete-logs:hover{color:#fff;background:#a00;border-color:#7c0900}.post-type-dlm_download .dlm-page-header{border-bottom:1px solid #ccc;padding:15px 20px;display:flex;justify-content:space-between;background:#fff;width:calc(100% + 20px);box-sizing:border-box;margin-left:-20px}.post-type-dlm_download .dlm-page-header .dlm-header-links{margin-left:-20px}.post-type-dlm_download .dlm-page-header .dlm-header-links a span{vertical-align:middle;position:relative;top:-2px;padding-right:10px}.post-type-dlm_download .dlm-page-header .dlm-header-logo img{max-height:35px}.post-type-dlm_download td.column-shortcode .hidden{display:none}#dlm_logs td{padding:7px 7px;vertical-align:middle}#dlm_logs .check-column{width:1%;padding:0;vertical-align:middle}#dlm_logs .column-status{width:2%}#dlm_logs td.column-status{font-size:10px;vertical-align:middle;text-align:center}#dlm_logs td.column-status span{color:#fff;font-weight:400;-moz-border-radius:50%;-webkit-border-radius:50%;border-radius:50%;height:18px;line-height:18px;width:18px;display:inline-block;background:url(../images/log-status-icons.png) top left no-repeat}#dlm_logs td.column-status .completed{background-color:#6cc644}#dlm_logs td.column-status .failed{background-color:#bd2c00;background-position-y:-18px}#dlm_logs td.column-status .redirected{background-color:#1c769b;background-position-y:-36px}#dlm_logs td.column-user_agent,#dlm_logs td.column-user_ip{font-family:monospace;font-weight:400}#dlm_logs span.dlm-description{font-weight:400}#dlm_logs .column-download,#dlm_logs .column-file,#dlm_logs .column-user,#dlm_logs .column-user_ua{width:16%!important}#dlm_logs .column-date,#dlm_logs .column-user_ip{width:6%!important}.post-type-dlm_download .inline-edit-row .inline-edit-col-dlm .inline-edit-col-dlm-inner{margin-top:10px}.dlm-settings-sub-nav{margin:0 0 10px 0;width:100%;border-bottom:1px solid #ccc;box-shadow:0 1px 1px rgba(0,0,0,.04)}.dlm-settings-sub-nav li{margin-right:10px;margin-bottom:-2px}.dlm-settings-sub-nav a{padding:13px;display:block}.dlm-settings-sub-nav .active-section{margin-bottom:-2px}.dlm-settings-sub-nav .active-section a{border-bottom:4px solid #000;padding-bottom:9px;margin-bottom:-2px;font-weight:600}.admin-color-blue .dlm-settings-sub-nav .active-section a{border-bottom-color:#096484}.admin-color-coffee .dlm-settings-sub-nav .active-section a{border-bottom-color:#c7a589}.admin-color-ectoplasm .dlm-settings-sub-nav .active-section a{border-bottom-color:#a3b745}.admin-color-midnight .dlm-settings-sub-nav .active-section a{border-bottom-color:#e14d43}.admin-color-ocean .dlm-settings-sub-nav .active-section a{border-bottom-color:#627c83}.admin-color-sunrise .dlm-settings-sub-nav .active-section a{border-bottom-color:#be3631}.admin-color-light .dlm-settings-sub-nav .active-section a{border-bottom-color:#888}.admin-color-evergreen .dlm-settings-sub-nav .active-section a{border-bottom-color:#36533f}.admin-color-mint .dlm-settings-sub-nav .active-section a{border-bottom-color:#4f6d59}.admin-color-modern .dlm-settings-sub-nav .active-section a{border-bottom-color:#3858e9}.dlm-admin-settings #setting-dlm_decimal_separator,.dlm-admin-settings #setting-dlm_thousand_separator{width:50px}.dlm-admin-settings table td{padding:15px 0}.dlm-admin-settings h3{margin:2em 0 0}ul.download_monitor_file_browser{list-style:none outside;margin:0;border:1px solid #ddd;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background:#f9f9f9;padding:5px 5px;-moz-box-shadow:inset 0 0 0 1px #fff;-webkit-box-shadow:inset 0 0 0 1px #fff;box-shadow:inset 0 0 0 1px #fff}ul.download_monitor_file_browser li{padding:0;margin:0}ul.download_monitor_file_browser li a{color:#21759b;display:block;padding:4px 0 4px 4px;text-decoration:none}ul.download_monitor_file_browser li a:hover{background-color:#eaf2fa}ul.download_monitor_file_browser li a:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f123";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}ul.download_monitor_file_browser li a.folder:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f318";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}ul.download_monitor_file_browser li a.filetype-3g2:before,ul.download_monitor_file_browser li a.filetype-3gp:before,ul.download_monitor_file_browser li a.filetype-asf:before,ul.download_monitor_file_browser li a.filetype-asx:before,ul.download_monitor_file_browser li a.filetype-avi:before,ul.download_monitor_file_browser li a.filetype-mov:before,ul.download_monitor_file_browser li a.filetype-mp4:before,ul.download_monitor_file_browser li a.filetype-mpg:before,ul.download_monitor_file_browser li a.filetype-rm:before,ul.download_monitor_file_browser li a.filetype-srt:before,ul.download_monitor_file_browser li a.filetype-vob:before,ul.download_monitor_file_browser li a.filetype-wmv:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f126";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}ul.download_monitor_file_browser li a.filetype-aif:before,ul.download_monitor_file_browser li a.filetype-iff:before,ul.download_monitor_file_browser li a.filetype-m3u:before,ul.download_monitor_file_browser li a.filetype-m4a:before,ul.download_monitor_file_browser li a.filetype-mid:before,ul.download_monitor_file_browser li a.filetype-midi:before,ul.download_monitor_file_browser li a.filetype-mp3:before,ul.download_monitor_file_browser li a.filetype-mpa:before,ul.download_monitor_file_browser li a.filetype-ra:before,ul.download_monitor_file_browser li a.filetype-wav:before,ul.download_monitor_file_browser li a.filetype-wma:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f127";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}ul.download_monitor_file_browser li a.filetype-ai:before,ul.download_monitor_file_browser li a.filetype-bmp:before,ul.download_monitor_file_browser li a.filetype-dds:before,ul.download_monitor_file_browser li a.filetype-eps:before,ul.download_monitor_file_browser li a.filetype-gif:before,ul.download_monitor_file_browser li a.filetype-ico:before,ul.download_monitor_file_browser li a.filetype-jpeg:before,ul.download_monitor_file_browser li a.filetype-jpg:before,ul.download_monitor_file_browser li a.filetype-png:before,ul.download_monitor_file_browser li a.filetype-ps:before,ul.download_monitor_file_browser li a.filetype-psd:before,ul.download_monitor_file_browser li a.filetype-pspimage:before,ul.download_monitor_file_browser li a.filetype-svg:before,ul.download_monitor_file_browser li a.filetype-tga:before,ul.download_monitor_file_browser li a.filetype-thm:before,ul.download_monitor_file_browser li a.filetype-tif:before,ul.download_monitor_file_browser li a.filetype-yuv:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f128";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}ul.download_monitor_file_browser li.nofiles{color:#999;font-style:italic;padding:4px 0}ul.download_monitor_file_browser li ul{list-style:none outside;margin:0;padding:0 0 0 28px}ul.download_monitor_file_browser li ul.loading{background:url(../images/ajax-loader.gif) no-repeat 24px 0;height:32px}table.wp-list-table .column-thumb{width:44px;text-align:center;white-space:nowrap}table.wp-list-table .column-dlm_download_cat,table.wp-list-table .column-dlm_download_tag,table.wp-list-table .column-file{width:11%!important}table.wp-list-table .column-file,table.wp-list-table .column-title{width:17%!important}table.wp-list-table .column-download_id,table.wp-list-table .column-version{width:5em}table.wp-list-table th.column-download_count span:first-child,table.wp-list-table th.column-featured span:first-child,table.wp-list-table th.column-locked_download span:first-child,table.wp-list-table th.column-redirect_only span:first-child,table.wp-list-table th.column-thumb span:first-child{float:none;display:inline-block;width:1em;height:1em;line-height:1em;padding:2px 0 0 0;overflow:hidden}table.wp-list-table th.column-download_count .sorting-indicator,table.wp-list-table th.column-featured .sorting-indicator,table.wp-list-table th.column-locked_download .sorting-indicator,table.wp-list-table th.column-redirect_only .sorting-indicator,table.wp-list-table th.column-thumb .sorting-indicator{float:right}table.wp-list-table th.column-thumb{width:52px;text-align:center}table.wp-list-table th.column-thumb span:first-child:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f128";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table th.column-download_count{width:5em}table.wp-list-table th.column-download_count span:first-child:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f346";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table th.column-locked_download{width:3.5em}table.wp-list-table th.column-locked_download span:first-child:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f160";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table th.column-redirect_only{width:3.5em}table.wp-list-table th.column-redirect_only span:first-child:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f103";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table th.column-featured{width:3.5em}table.wp-list-table th.column-featured span:first-child:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f155";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table td.column-download_count,table.wp-list-table td.column-featured,table.wp-list-table td.column-locked_download,table.wp-list-table td.column-redirect_only{text-align:left;padding-left:11px}table.wp-list-table td.column-download_count span.na,table.wp-list-table td.column-featured span.na,table.wp-list-table td.column-locked_download span.na,table.wp-list-table td.column-redirect_only span.na{color:#999;width:1em;height:1em;line-height:1em;display:inline-block;overflow:hidden;vertical-align:middle}table.wp-list-table td.column-download_count span.na:before,table.wp-list-table td.column-featured span.na:before,table.wp-list-table td.column-locked_download span.na:before,table.wp-list-table td.column-redirect_only span.na:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f460";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table td.column-download_count span.yes,table.wp-list-table td.column-featured span.yes,table.wp-list-table td.column-locked_download span.yes,table.wp-list-table td.column-redirect_only span.yes{width:1em;height:1em;line-height:1em;display:inline-block;overflow:hidden;vertical-align:middle}table.wp-list-table td.column-download_count span.yes:before,table.wp-list-table td.column-featured span.yes:before,table.wp-list-table td.column-locked_download span.yes:before,table.wp-list-table td.column-redirect_only span.yes:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f147";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table .column-thumb img{padding:2px;margin:0;border:1px solid #dfdfdf;vertical-align:middle;width:32px;height:32px}#download-monitor-file .inside{padding:0;margin:0}#download-monitor-file .dlm-metaboxes-wrapper .close_all,#download-monitor-file .dlm-metaboxes-wrapper .expand_all{float:right;margin-left:1em;line-height:22px;text-decoration:none}#download-monitor-file .dlm-metaboxes-wrapper .expand_all:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f168";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper .close_all:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f460";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper p.toolbar{margin:0!important;border-top:1px solid #fff;border-bottom:1px solid #dfdfdf;padding:7px 12px!important;overflow:hidden;zoom:1}#download-monitor-file .dlm-metaboxes-wrapper p.toolbar a.button{float:left;margin:0}#download-monitor-file .dlm-metaboxes-wrapper .fr,#download-monitor-file .dlm-metaboxes-wrapper button.add_attribute,#download-monitor-file .dlm-metaboxes-wrapper button.add_variable_attribute,#download-monitor-file .dlm-metaboxes-wrapper select.attribute_taxonomy{float:right;margin:0 0 0 6px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metaboxes{padding:0 12px 0}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox-sortable-placeholder{border-color:#bbb;background-color:#f5f5f5;margin:9px 0;border-width:1px;border-style:dashed}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox{background:#ececec;border:1px solid #ececec;margin:9px 0!important}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox .dlm-blury:before{content:url(../images/ajax-loader.gif);display:block;position:absolute;top:50%;transform:translateY(-50%);width:100%;left:0;margin:0 auto;color:#cecece;text-align:center;z-index:11;font-size:16px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox .dlm-blury:after{content:"";display:block;background:rgba(0,0,0,.5);width:100%;top:0;left:0;margin:0 auto;height:100%;z-index:10;position:absolute}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3{margin:0!important;padding:6px!important;font-size:1em!important;overflow:hidden;zoom:1;cursor:move}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3 button{float:right}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3 strong{line-height:24px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3 select{font-family:sans-serif}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3 .handlediv{background-position:6px 5px!important;display:none!important;height:24px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox:hover h3 .handlediv{display:block}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table{width:100%;position:relative;background:#fff;padding:3px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td{text-align:left;padding:6px 6px;vertical-align:top;border:0;line-height:26px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td label{text-align:left;display:block;line-height:21px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input{float:left;min-width:200px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input,#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td textarea{width:100%;margin:0;display:block;font-size:14px;padding:4px;color:#555}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td textarea{height:7.5em}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td select{width:100%}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input.short{width:200px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input.checkbox{width:auto;min-width:inherit;vertical-align:middle;display:inline;float:none}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input.date-picker-field{width:50%;min-width:inherit;float:none;display:inline}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input.hour,#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input.minute{width:2em;min-width:inherit;float:none;display:inline}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td.attribute_name{width:200px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table .minus,#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table .plus{margin-top:6px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table .fl{float:left}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table .fr{float:right}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox:first-child h3{background-color:#fafafa;border-bottom:1px solid #dcdcde}#download-monitor-file .dlm-metaboxes-wrapper .plus:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f132";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper .minus:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f460";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper .dlm_upload_file:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f317";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper .dlm_media_library:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f104";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper .dlm_browse_for_file{float:right}#download-monitor-file .dlm-metaboxes-wrapper .dlm_browse_for_file:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f322";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-information .dlm_information_panel div p{overflow:hidden;width:100%;font-weight:700;box-sizing:border-box;line-height:28px;margin-bottom:5px}#download-monitor-information .dlm_information_panel input{margin:0;border-top-right-radius:0;border-bottom-right-radius:0;flex-grow:1;width:calc(100% - 45px)}#download-monitor-product-information .dlm_information_panel div p{overflow:hidden;width:100%;font-weight:700;box-sizing:border-box;line-height:28px;margin-bottom:5px}#download-monitor-product-information .dlm_information_panel input{margin:0;border-top-right-radius:0;border-bottom-right-radius:0;flex-grow:1;width:calc(100% - 45px)}#download-monitor-options .inside{padding:0;margin:0}#download-monitor-options .form-field-checkbox label{display:inline;padding:0 0 4px}#download-monitor-options .form-field-checkbox input{display:inline-block;width:auto;vertical-align:middle}#download-monitor-options .form-field-checkbox .dlm-description{padding:4px 0 0 0;display:block}#download-monitor-options .access_permissions{margin:0!important;border-top:1px solid #fff;border-bottom:1px solid #dfdfdf;padding:7px 12px!important;overflow:hidden;zoom:1}#download-monitor-options .access_permissions h4{margin-bottom:.5em;margin:0 0 .5em}#download-monitor-options .access_permissions ul{background:#fff;border:1px solid #dfdfdf;height:110px;overflow:auto;padding:.5em .9em;margin:0}#download-monitor-options p{margin:0!important;border-top:1px solid #fff;border-bottom:1px solid #dfdfdf;padding:7px 12px!important;overflow:hidden;zoom:1}#download-monitor-options p.not-active{opacity:.7}#download-monitor-options .options_upsell_link{color:unset;text-decoration:none}#download-monitor-options .dlm-upsell-badge{font-size:10px;background:#f4daa4;padding:2px 5px;display:inline-block;margin-left:5px;border-radius:10px}#insert-download{padding:20px 20px}#insert-download #drag-drop-area,#insert-download #insert-shortcode{margin:1em 0}#insert-download .error,#insert-download .updated{margin-left:0;margin-right:0}#insert-download h2{margin-top:0}#insert-download label{margin:0 0 .25em 0;display:block;font-size:1.1em}#insert-download span.description{display:block}#insert-download input.input{margin:0 0 .25em 0;display:block;width:100%;font-size:1.1em}#insert-download .add_link{float:right}#insert-download ul.page-numbers{overflow:hidden;zoom:1;margin:0 auto;padding:0;text-align:center}#insert-download ul.page-numbers li{display:inline-block;margin:0;list-style:none outside;line-height:1em}#insert-download ul.page-numbers li a,#insert-download ul.page-numbers li span{text-decoration:none;border:1px solid #ddd;-webkit-border-radius:4px;border-radius:4px;padding:8px;display:block}#insert-download ul.page-numbers li span{border-color:#eee}#insert-download legend{font-weight:700;display:block;margin:0 0 1em}#insert-download fieldset label{display:block;margin:0 0 .5em}.dlm-code-nginx-rules{display:block}.settings_panel .form-table td{padding-left:0}.settings_panel .dlm-lazy-select-loader{display:inline-block;vertical-align:middle;padding:0 0 0 3px}.settings_panel .dlm-lazy-select-loader img{display:inline-block;height:25px;width:25px;margin-top:1px}.dlm-reports h1 .dlm-reports-actions{float:right}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector,.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-period,.dlm-reports h1 .dlm-reports-actions a.dlm-reports-header-chart-switcher{margin:0 5px;float:left}.dlm-reports h1 .dlm-reports-actions>:last-child{margin-right:0}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector{position:relative;font-size:14px;padding:0 .5em 0 1em;background:#fff;border:1px solid #ccc;border-radius:3px;user-select:none;cursor:pointer}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm-arrow:before{font-family:dashicons!important;content:"\f140";font-style:normal;font-weight:400;speak:none;display:inline-block;text-decoration:inherit;width:1em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;font-size:1.6em;vertical-align:middle;margin-top:-2px}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay{display:block;width:466px;padding:10px;background:#fff;border:1px solid #ccc;position:absolute;top:30px;right:0;z-index:10;overflow:hidden}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date{font-size:70%;margin-right:5px;float:left;z-index:11}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline{border:0}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline .ui-state-highlight{background:#e6e6e6 url(../images/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;color:#555;border:1px solid #d3d3d3}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline .ui-state-active{border:1px solid #aaa;background:#fff url(../images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline td,.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline th{padding:0;margin:0;line-height:2em}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline td a,.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline th a{text-align:center!important}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_actions{width:70px;padding-left:10px;text-align:center;float:left}.dlm-reports h1 .dlm-reports-actions a.dlm-reports-header-chart-switcher{display:block;margin-top:1px;padding-top:4px;color:#23282d;text-decoration:none}.dlm-reports h1 .dlm-reports-actions a.dlm-reports-header-chart-switcher:before{font-family:dashicons!important;font-style:normal;font-weight:400;speak:none;display:inline-block;text-decoration:inherit;width:1em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;font-size:1.4em}.dlm-reports h1 .dlm-reports-actions a.dlm-reports-header-chart-switcher.dlm-line:before{content:"\f238"}.dlm-reports h1 .dlm-reports-actions a.dlm-reports-header-chart-switcher.dlm-bar:before{content:"\f185"}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-period a{border-color:#ccc!important}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-period a:first-child{border-bottom-right-radius:0;border-top-right-radius:0;border-right:0}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-period a:last-child{border-bottom-left-radius:0;border-top-left-radius:0;border-left:0}.dlm-reports .dlm_reports_loader{position:absolute;width:32px;height:32px;top:50%;left:50%;margin:-16px 0 0 -16px}.dlm-reports .dlm-reports-block-chart{width:100%;height:300px;margin-top:20px;background:#fff;border:1px solid #e5e5e5;overflow:hidden}.dlm-reports .dlm-reports-block-chart .chart-container h6{display:none}.dlm-reports .dlm-reports-block-summary #popular span{line-height:1em}.dlm-reports .dlm-reports-block{position:relative;box-sizing:border-box;width:100%;padding:20px 10px;margin-top:20px;background:#fff;border:1px solid #e5e5e5;overflow:hidden;float:left}.dlm-reports .dlm-reports-block.dlm-reports-block-half{width:49%;margin-right:1%}.dlm-reports .dlm-reports-block.dlm-reports-block-half-right{width:49%;margin-left:1%}.dlm-reports .dlm-reports-block .dlm-reports-placeholder-no-data{display:inline-block;width:100%;font-size:1.5em;color:#b4b9be;font-style:italic;text-align:center}.dlm-reports .dlm-reports-block ul{box-sizing:border-box;width:100%;padding:0;margin:0}.dlm-reports .dlm-reports-block ul li{display:inline-block;width:33%;padding:5px 0}.dlm-reports .dlm-reports-block ul li label,.dlm-reports .dlm-reports-block ul li span{display:block;width:100%;text-align:center}.dlm-reports .dlm-reports-block ul li span{font-size:2.5em;font-weight:700;padding:.5em 0 0}.dlm-reports .dlm-reports-block table{width:100%}.dlm-reports .dlm-reports-block table td,.dlm-reports .dlm-reports-block table th{text-align:center;padding:10px 0;border-bottom:1px solid #e5e5e5}.dlm-reports .dlm-reports-block table td:first-child,.dlm-reports .dlm-reports-block table th:first-child{text-align:left}.dlm-reports .dlm-reports-block table th{padding-bottom:20px}.dlm-reports-block-summary{background:#333!important;color:#fff}.post-type-dlm_product table.wp-list-table .column-title{width:65%!important}.dlm_mb_shop_product_information .dlm_shop_field_row{width:100%;overflow:hidden}.dlm_mb_shop_product_information .dlm_shop_field_row label.dlm_shop_field_label{display:inline-block;width:20%;height:100%;line-height:2.2em;float:left}.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input{display:inline-block;width:50%;float:left}.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input .dlm_shop_input{width:100%;padding:5px 7px}.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input .select2-selection--multiple{border:1px solid #ddd}.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input .select2-search,.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input .select2-selection__choice{margin-bottom:0}.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input .select2-search__field{padding-top:3px}.dlm-order-overview #dlm_empty_trash{margin-left:3px}.dlm-order-overview .wp-list-table td .column-id{width:25%}.dlm-order-details{max-width:1250px;margin-left:auto;margin-right:auto;padding-right:20px}.dlm-order-details h1{padding-bottom:25px}.dlm-order-details .dlm-order-details-main,.dlm-order-details .dlm-order-details-side{width:100%;float:left}.dlm-order-details .dlm-order-details-block{padding:0;margin-bottom:20px;line-height:1;border:1px solid #e5e5e5;background:#fff;box-shadow:0 1px 1px rgba(0,0,0,.04)}.dlm-order-details .dlm-order-details-block h2.dlm-order-details-block-title{font-size:14px;padding:8px 12px;margin:0;line-height:1.4;border-bottom:1px solid #eee}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside{margin:6px 0 0 0;padding:6px 12px 12px;line-height:1.4em;font-size:13px}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside label{display:block;font-weight:700;padding-bottom:6px}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside p{padding:0;margin:0}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside ul,.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside ul li{list-style:none;padding:0;margin:0}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside ul li{padding:6px 0}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside .dlm-order-details-current-state{width:70%;height:30px}.dlm-order-details .dlm-order-details-block.dlm-order-details-customer .dlm-order-details-customer-image{float:right}.dlm-order-details .dlm-order-details-block.dlm-order-details-customer ul li{margin-bottom:4px;padding:0}.dlm-order-details .dlm-order-details-block.dlm-order-details-customer ul li:first-child{font-weight:700}.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items{overflow:hidden}.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items .dlm-order-details-overview{width:25%;float:right}.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items .dlm-order-details-overview td,.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items .dlm-order-details-overview th{padding-top:1.5em;padding-bottom:1.5em;text-align:right}.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items .dlm-order-details-overview th{width:50%;font-weight:400}.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items .dlm-order-details-overview td{padding-right:1em;font-weight:700}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table{width:100%}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td,.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th{text-align:center}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td:first-child,.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th:first-child{text-align:left;padding-left:.5em}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th{padding-top:.5em;padding-bottom:.5em;border-bottom:2px solid #c3c1bc}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td{padding-top:1.5em;padding-bottom:1.5em;border-bottom:1px solid #c3c1bc}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td.dlm-order-details-order-items-item-total,.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th.dlm-order-details-order-items-item-total{text-align:right;padding-right:1em}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td.dlm-order-transaction-processor-id,.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th.dlm-order-transaction-processor-id{display:none}.dlm-order-details .dlm-order-details-block .dlm-order-details-update-successful{font-size:2em;padding:.2em .3em;color:#46b450}@media (min-width:768px){.dlm-order-details .dlm-order-details-main{width:62%;float:left}.dlm-order-details .dlm-order-details-side{width:35%;float:right}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td.dlm-order-transaction-processor-id,.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th.dlm-order-transaction-processor-id{display:table-cell}}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-one-col{margin:0 auto;max-width:800px}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-cta{margin-top:40px;text-align:center}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-three-col{max-width:680px;margin:40px auto 0;overflow:hidden;display:flex;justify-content:space-between;flex-wrap:wrap}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-three-col .dlm-onboarding-col{padding-top:2.5em;flex:1;align-self:flex-start;min-width:100%;max-width:100%}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-three-col .dlm-onboarding-col img{width:100%}.dlm-onboarding .dlm-onboarding-section h2{margin:60px 0 .6em;font-size:2.7em;line-height:1.3;font-weight:300;text-align:center}.dlm-onboarding .dlm-onboarding-section p{max-width:55em;margin:.6em auto 0 auto}.dlm-onboarding .dlm-onboarding-section a.button-hero{height:46px;font-size:14px;line-height:44px;padding:0 36px;font-weight:700;text-align:center}.dlm-onboarding .dlm-onboarding-pages{max-width:55em;margin:0 auto;padding:2em 0 0}.dlm-onboarding .dlm-onboarding-pages a.button-hero{width:170px}.dlm-onboarding .dlm-onboarding-pages a.button-hero.dlm-page-exists{background:#46b450;border-color:#46b450 #4a8442 #467a3f;box-shadow:0 2px 0 #467a3f;text-shadow:0 -1px 1px #4a8442,1px 0 1px #4a8442,0 1px 1px #4a8442,-1px 0 1px #4a8442}.dlm-onboarding .dlm-onboarding-pages a.button-hero.dlm-page-exists:active{box-shadow:0 2px 0 #467a3f}.dlm-onboarding .dlm-onboarding-pages td,.dlm-onboarding .dlm-onboarding-pages th{padding:1em 0;border-bottom:1px solid #ccc}.dlm-onboarding .dlm-onboarding-pages th{width:13%;min-width:6em;text-align:left}.dlm-onboarding .dlm-onboarding-pages td{padding-right:.5em;padding-left:.5em}.dlm-onboarding .dlm-onboarding-pages td.dlm-onboarding-pages-page-title{font-weight:700}@media (min-width:768px){.dlm-onboarding .dlm-onboarding-section .dlm-onboarding-pages{width:55em}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-three-col .dlm-onboarding-col{padding-top:0;min-width:31%;max-width:31%}}.dlm_extensions_wrap a.dlm-reload-button{float:right;position:relative;top:-40px}.dlm_extensions_wrap #available-extensions{clear:both}.dlm_extensions_wrap .dlm_extensions{padding:15px 0;overflow:hidden}.dlm_extensions_wrap .dlm_extensions .dlm_extension{background-color:#fff;width:calc(20% - 15px);margin:0 15px 15px 0;display:inline-block;vertical-align:top}.dlm_extensions_wrap .dlm_extensions .dlm_extension p{margin:0}.dlm_extensions_wrap .dlm_extensions .dlm_extension a{color:#444;text-decoration:none}.dlm_extensions_wrap .dlm_extensions .dlm_extension .dlm_extension_img_wrapper{width:100%;background:#419ccb;text-align:center}.dlm_extensions_wrap .dlm_extensions .dlm_extension .dlm_extension_img_wrapper img{max-width:100%;margin:0 auto}.dlm_extensions_wrap .dlm_extensions .dlm_extension h3{padding:0 20px}.dlm_extensions_wrap .dlm_extensions .dlm_extension div.extension-desc{min-height:120px;padding:0 20px}.dlm_extensions_wrap .dlm_extensions .dlm_extension .product_footer{padding:15px 15px 15px 0;text-align:right;background-color:#fafafa;border-top:1px solid #dcdcde}.dlm_extensions_wrap .dlm_extensions .dlm_extension .product_footer .loop_price{font-weight:700}.dlm_extensions_wrap .dlm_extensions .dlm_extension .product_footer .loop_price.sale{color:green}.dlm_extensions_wrap .dlm_extensions .dlm_extension .product_footer .loop_price.sale strike{color:#444}.dlm_extensions_wrap .dlm_extensions .dlm_extension .product_footer .button .dashicons{vertical-align:middle;font-size:16px}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license{padding:0 20px 20px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license div.dlm_license_error{padding:.5em;margin-bottom:15px;background:#ffffe0}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license div.dlm_license_error a{color:#00f;text-decoration:underline}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license p.license-status{padding:5px 0;margin:5px 0;background:red;font-weight:700;font-size:1.2em;color:#fff;text-align:center}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license p.license-status.active{background:green}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license input{width:100%;margin:7px 0;padding:7px}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license a.button-primary{width:100%;margin:5px auto 0;color:#fff;text-align:center}#ui-datepicker-div{display:none}.wpchill-upsell{background:#fff;border:0;padding:15px;margin-top:30px}.wpchill-upsell .wpchill-upsell-features{text-align:left;display:flex;flex-wrap:wrap;padding:20px 0}.wpchill-upsell .wpchill-upsell-features li{width:33%}.wpchill-upsell a:first-child{margin-right:10px}.wpchill-upsells-wrapper{width:100%}.wrap.dlm-admin-settings .form-table{width:65%;float:left}.wrap.dlm-admin-settings .form-table+.wpchill-upsells-wrapper{width:30%;float:right}.wrap.dlm-admin-settings .form-table .dlm_htaccess_notice{margin-bottom:5px}.wrap.dlm-admin-settings .dlm-upsell-badge{font-size:10px;background:#f4daa4;padding:2px 5px;display:inline-block;margin-left:10px;border-radius:10px}.wrap.dlm-admin-settings #setting-dlm_downloads_path+p strong{color:red}#total_downloads_browser_table a.nav-tab{text-transform:capitalize}#dlm-amazon-s3-upsell .inside,#dlm-buttons-upsell .inside,#dlm-download-page-upsell .inside,#dlm-google-drive-upsell .inside{display:flex;flex-wrap:wrap;background:#f1f1f1}#dlm-amazon-s3-upsell .inside .wpchill-upsell,#dlm-buttons-upsell .inside .wpchill-upsell,#dlm-download-page-upsell .inside .wpchill-upsell,#dlm-google-drive-upsell .inside .wpchill-upsell{background:0 0;text-align:center;width:100%;margin-top:0}#dlm-amazon-s3-upsell .inside,#dlm-buttons-upsell .inside,#dlm-download-page-upsell .inside,#dlm-google-drive-upsell .inside{margin:0;padding:0}.upsells-columns{display:flex;flex-wrap:wrap;align-items:center;align-content:center}.upsells-columns .upsells-columns-2{width:50%;text-align:center;display:flex;align-items:center;align-content:center}.upsells-columns .upsells-column{width:100%;text-align:center;display:flex;align-items:center;align-content:center}.upsells-columns .upsells-column>*{display:inline-block;align-content:center;vertical-align:middle;margin:0 15px;padding:10px 0}.upsells-columns .upsells-column>.wpchill-upsell{position:relative;float:none;flex-grow:1;display:flex;align-items:center}.upsells-columns .upsells-column>.wpchill-upsell .wpchill-upsell-description{margin:0 auto}.upsells-columns .upsells-column h3{line-height:1.3em}.upsells-columns .upsells-column:last-child{border-top:1px solid #c3c4c7;border-bottom:1px solid #c3c4c7}.upsells-columns .wpchill-upsell{margin-top:0}.dlm_download_page_dlm-extensions .theme.dlm_extension{background-color:#fff}body.rsvp_page_rsvp-upgrade-to-pro #wpcontent .wrap{margin-left:0;max-width:85%}.rsvp-lite-vs-premium,.rsvp-lite-vs-premium p{font-size:14px;margin:0}.rsvp-lite-vs-premium>.wpchill-plans-table.wpchill-highlight>.wpchill-pricing-package{background:#fefff0;box-shadow:0 0 15px rgb(208 219 219)}.rsvp-lite-vs-premium .wp-badge{display:inline-block;vertical-align:middle;position:relative;margin-right:2.5%}.rsvp-lite-vs-premium h3{display:block;position:relative;font-size:16px;margin:0}.rsvp-lite-vs-premium .wpchill-plans-table{display:flex}.rsvp-lite-vs-premium .wpchill-plans-table.table-header{margin-top:50px;border-top:0}.rsvp-lite-vs-premium .wpchill-plans-table.table-header .wpchill-pricing-package{border:0}.rsvp-lite-vs-premium .wpchill-plans-table.table-header .wpchill-pricing-package.wpchill-title.wpchill-highlight::before,.rsvp-lite-vs-premium .wpchill-plans-table.table-header .wpchill-pricing-package:not(.wpchill-modula-lite):last-child:before{content:'';width:auto;display:inline-block;opacity:1;position:absolute;top:-1px;background:#41495b;text-align:center;left:0;right:0;color:#fff;font-size:15px;text-transform:uppercase;padding:10px 5px;transform:translateY(-100%)}.rsvp-lite-vs-premium.table-footer .wpchill-pricing-package:last-child{border:0}.rsvp-lite-vs-premium .wpchill-pricing-package{text-align:center;line-height:1.5;padding:10px 15px;display:flex;align-content:center;align-items:center;justify-content:center;background:#fff;border-top:1px solid #ccc;width:32%}.rsvp-lite-vs-premium .wpchill-pricing-package:not(:first-child){max-width:300px}.rsvp-lite-vs-premium .wpchill-pricing-package.wpchill-title{font-weight:400;color:#666;font-size:1.25rem;height:auto;-ms-flex-direction:column;flex-direction:column;padding-top:30px;padding-bottom:30px;justify-content:space-between;position:relative}.rsvp-lite-vs-premium .wpchill-pricing-package.wpchill-title .wpchill-name{margin:0;font-size:36px}.rsvp-lite-vs-premium .wpchill-pricing-package.wpchill-title.wpchill-modula-lite{justify-content:center}.rsvp-lite-vs-premium .wpchill-pricing-package.wpchill-title p.description{font-style:italic;font-size:13px;margin-bottom:40px}.rsvp-lite-vs-premium .wpchill-pricing-package.wpchill-title .wpchill-price p:last-child{font-size:30px;margin:0 0 40px 0}.rsvp-lite-vs-premium .wpchill-pricing-package.wpchill-title .wpchill-price p.old-price{margin:0;position:relative}.rsvp-lite-vs-premium .wpchill-pricing-package.wpchill-title .wpchill-price p.old-price:after{content:"";height:2px;width:60px;background:red;display:block;position:absolute;left:50%;top:52%;transform:translate(-50%,-50%)}.rsvp-lite-vs-premium .wpchill-pricing-package.wpchill-title .wpchill-price sup{top:2px;position:relative;font-size:15px}.rsvp-lite-vs-premium .wpchill-pricing-package.wpchill-empty{background:0 0;border-color:transparent}.rsvp-lite-vs-premium .wpchill-pricing-package.feature-name{justify-content:space-between;font-weight:400;text-align:left;font-size:13px;display:block;background:0 0}.rsvp-lite-vs-premium .wpchill-pricing-package .dashicons-saved{color:green}.rsvp-lite-vs-premium .wpchill-pricing-package .dashicons{width:30px;height:30px;font-size:30px}.rsvp-lite-vs-premium .wpchill-pricing-package .dashicons-no-alt{color:#ff3439}.rsvp-lite-vs-premium .wpchill-pricing-package:last-child{background:#fefff0}.rsvp-lite-vs-premium .button .dashicons{font-size:16px;vertical-align:middle;line-height:26px}.wpchill-tooltip{position:relative;display:inline-block;float:left;margin-right:10px}.wpchill-tooltip>span{cursor:pointer;color:#0073aa;text-decoration:underline;margin-left:5px}.wpchill-tooltip .wpchill-tooltip-content{display:none;position:absolute;top:50%;right:-10px;transform:translate(100%,-50%);width:300px;background:#000;color:#fff;padding:10px;box-sizing:border-box;z-index:99}.wpchill-tooltip:hover .wpchill-tooltip-content{display:block}.wpchill-tooltip .wpchill-tooltip-content:before{content:'';width:0;height:0;border-style:solid;border-width:8px 8px 8px 0;border-color:transparent #000 transparent transparent;display:block;position:absolute;top:50%;left:-8px;transform:translateY(-50%)}.wpchill-tooltip-button{position:relative}.wpchill-tooltip-button .wpchill-tooltip-content{display:none;position:absolute;top:50%;right:25px;transform:translate(50%,-135%);width:auto;background:rgba(0,0,0,.8);color:#fff;padding:10px 15px;box-sizing:border-box;font-size:14px;z-index:99}.wpchill-tooltip-button:hover .wpchill-tooltip-content{display:block}.wpchill-tooltip-button .wpchill-tooltip-content:before{content:'';width:0;height:0;border-style:solid;border-width:8px 8px 8px 0;border-color:transparent #000 transparent transparent;display:block;position:absolute;bottom:-12px;left:50%;transform:rotate(-90deg)}.dlm-file-link{display:block;margin-top:3px}.dlm-listing-no-file code{color:#b32d2e}
|
1 |
+
.post-type-dlm_download h1 a.dlm-delete-logs{color:#a00}.post-type-dlm_download h1 a.dlm-delete-logs:hover{color:#fff;background:#a00;border-color:#7c0900}.post-type-dlm_download .dlm-page-header{border-bottom:1px solid #ccc;padding:15px 20px;display:flex;justify-content:space-between;background:#fff;width:calc(100% + 20px);box-sizing:border-box;margin-left:-20px}.post-type-dlm_download .dlm-page-header .dlm-header-links{margin-left:-20px}.post-type-dlm_download .dlm-page-header .dlm-header-links a span{vertical-align:middle;position:relative;top:-2px;padding-right:10px}.post-type-dlm_download .dlm-page-header .dlm-header-logo img{max-height:35px}.post-type-dlm_download td.column-shortcode .hidden{display:none}#dlm_logs td{padding:7px 7px;vertical-align:middle}#dlm_logs .check-column{width:1%;padding:0;vertical-align:middle}#dlm_logs .column-status{width:2%}#dlm_logs td.column-status{font-size:10px;vertical-align:middle;text-align:center}#dlm_logs td.column-status span{color:#fff;font-weight:400;-moz-border-radius:50%;-webkit-border-radius:50%;border-radius:50%;height:18px;line-height:18px;width:18px;display:inline-block;background:url('../images/log-status-icons.png') top left no-repeat}#dlm_logs td.column-status .completed{background-color:#6cc644}#dlm_logs td.column-status .failed{background-color:#bd2c00;background-position-y:-18px}#dlm_logs td.column-status .redirected{background-color:#1c769b;background-position-y:-36px}#dlm_logs td.column-user_agent,#dlm_logs td.column-user_ip{font-family:monospace;font-weight:400}#dlm_logs span.dlm-description{font-weight:400}#dlm_logs .column-download,#dlm_logs .column-file,#dlm_logs .column-user,#dlm_logs .column-user_ua{width:16%!important}#dlm_logs .column-date,#dlm_logs .column-user_ip{width:6%!important}.post-type-dlm_download .inline-edit-row .inline-edit-col-dlm .inline-edit-col-dlm-inner{margin-top:10px}.dlm-settings-sub-nav{margin:0 0 10px 0;width:100%;border-bottom:1px solid #ccc;box-shadow:0 1px 1px rgba(0,0,0,.04)}.dlm-settings-sub-nav li{margin-right:10px;margin-bottom:-2px}.dlm-settings-sub-nav a{padding:13px;display:block}.dlm-settings-sub-nav .active-section{margin-bottom:-2px}.dlm-settings-sub-nav .active-section a{border-bottom:4px solid #000;padding-bottom:9px;margin-bottom:-2px;font-weight:600}.admin-color-blue .dlm-settings-sub-nav .active-section a{border-bottom-color:#096484}.admin-color-coffee .dlm-settings-sub-nav .active-section a{border-bottom-color:#c7a589}.admin-color-ectoplasm .dlm-settings-sub-nav .active-section a{border-bottom-color:#a3b745}.admin-color-midnight .dlm-settings-sub-nav .active-section a{border-bottom-color:#e14d43}.admin-color-ocean .dlm-settings-sub-nav .active-section a{border-bottom-color:#627c83}.admin-color-sunrise .dlm-settings-sub-nav .active-section a{border-bottom-color:#be3631}.admin-color-light .dlm-settings-sub-nav .active-section a{border-bottom-color:#888}.admin-color-evergreen .dlm-settings-sub-nav .active-section a{border-bottom-color:#36533f}.admin-color-mint .dlm-settings-sub-nav .active-section a{border-bottom-color:#4f6d59}.admin-color-modern .dlm-settings-sub-nav .active-section a{border-bottom-color:#3858e9}.dlm-admin-settings #setting-dlm_decimal_separator,.dlm-admin-settings #setting-dlm_thousand_separator{width:50px}.dlm-admin-settings table td{padding:15px 0}.dlm-admin-settings h3{margin:2em 0 0}ul.download_monitor_file_browser{list-style:none outside;margin:0;border:1px solid #ddd;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background:#f9f9f9;padding:5px 5px;-moz-box-shadow:inset 0 0 0 1px #fff;-webkit-box-shadow:inset 0 0 0 1px #fff;box-shadow:inset 0 0 0 1px #fff}ul.download_monitor_file_browser li{padding:0;margin:0}ul.download_monitor_file_browser li a{color:#21759b;display:block;padding:4px 0 4px 4px;text-decoration:none}ul.download_monitor_file_browser li a:hover{background-color:#eaf2fa}ul.download_monitor_file_browser li a:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f123";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}ul.download_monitor_file_browser li a.folder:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f318";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}ul.download_monitor_file_browser li a.filetype-3g2:before,ul.download_monitor_file_browser li a.filetype-3gp:before,ul.download_monitor_file_browser li a.filetype-asf:before,ul.download_monitor_file_browser li a.filetype-asx:before,ul.download_monitor_file_browser li a.filetype-avi:before,ul.download_monitor_file_browser li a.filetype-mov:before,ul.download_monitor_file_browser li a.filetype-mp4:before,ul.download_monitor_file_browser li a.filetype-mpg:before,ul.download_monitor_file_browser li a.filetype-rm:before,ul.download_monitor_file_browser li a.filetype-srt:before,ul.download_monitor_file_browser li a.filetype-vob:before,ul.download_monitor_file_browser li a.filetype-wmv:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f126";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}ul.download_monitor_file_browser li a.filetype-aif:before,ul.download_monitor_file_browser li a.filetype-iff:before,ul.download_monitor_file_browser li a.filetype-m3u:before,ul.download_monitor_file_browser li a.filetype-m4a:before,ul.download_monitor_file_browser li a.filetype-mid:before,ul.download_monitor_file_browser li a.filetype-midi:before,ul.download_monitor_file_browser li a.filetype-mp3:before,ul.download_monitor_file_browser li a.filetype-mpa:before,ul.download_monitor_file_browser li a.filetype-ra:before,ul.download_monitor_file_browser li a.filetype-wav:before,ul.download_monitor_file_browser li a.filetype-wma:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f127";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}ul.download_monitor_file_browser li a.filetype-ai:before,ul.download_monitor_file_browser li a.filetype-bmp:before,ul.download_monitor_file_browser li a.filetype-dds:before,ul.download_monitor_file_browser li a.filetype-eps:before,ul.download_monitor_file_browser li a.filetype-gif:before,ul.download_monitor_file_browser li a.filetype-ico:before,ul.download_monitor_file_browser li a.filetype-jpeg:before,ul.download_monitor_file_browser li a.filetype-jpg:before,ul.download_monitor_file_browser li a.filetype-png:before,ul.download_monitor_file_browser li a.filetype-ps:before,ul.download_monitor_file_browser li a.filetype-psd:before,ul.download_monitor_file_browser li a.filetype-pspimage:before,ul.download_monitor_file_browser li a.filetype-svg:before,ul.download_monitor_file_browser li a.filetype-tga:before,ul.download_monitor_file_browser li a.filetype-thm:before,ul.download_monitor_file_browser li a.filetype-tif:before,ul.download_monitor_file_browser li a.filetype-yuv:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f128";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}ul.download_monitor_file_browser li.nofiles{color:#999;font-style:italic;padding:4px 0}ul.download_monitor_file_browser li ul{list-style:none outside;margin:0;padding:0 0 0 28px}ul.download_monitor_file_browser li ul.loading{background:url(../images/ajax-loader.gif) no-repeat 24px 0;height:32px}table.wp-list-table .column-thumb{width:44px;text-align:center;white-space:nowrap}table.wp-list-table .column-dlm_download_cat,table.wp-list-table .column-dlm_download_tag,table.wp-list-table .column-file{width:11%!important}table.wp-list-table .column-file,table.wp-list-table .column-title{width:17%!important}table.wp-list-table .column-download_id,table.wp-list-table .column-version{width:5em}table.wp-list-table th.column-download_count span:first-child,table.wp-list-table th.column-featured span:first-child,table.wp-list-table th.column-locked_download span:first-child,table.wp-list-table th.column-redirect_only span:first-child,table.wp-list-table th.column-thumb span:first-child{float:none;display:inline-block;width:1em;height:1em;line-height:1em;padding:2px 0 0 0;overflow:hidden}table.wp-list-table th.column-download_count .sorting-indicator,table.wp-list-table th.column-featured .sorting-indicator,table.wp-list-table th.column-locked_download .sorting-indicator,table.wp-list-table th.column-redirect_only .sorting-indicator,table.wp-list-table th.column-thumb .sorting-indicator{float:right}table.wp-list-table th.column-thumb{width:52px;text-align:center}table.wp-list-table th.column-thumb span:first-child:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f128";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table th.column-download_count{width:5em}table.wp-list-table th.column-download_count span:first-child:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f346";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table th.column-locked_download{width:3.5em}table.wp-list-table th.column-locked_download span:first-child:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f160";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table th.column-redirect_only{width:3.5em}table.wp-list-table th.column-redirect_only span:first-child:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f103";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table th.column-featured{width:3.5em}table.wp-list-table th.column-featured span:first-child:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f155";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table td.column-download_count,table.wp-list-table td.column-featured,table.wp-list-table td.column-locked_download,table.wp-list-table td.column-redirect_only{text-align:left;padding-left:11px}table.wp-list-table td.column-download_count span.na,table.wp-list-table td.column-featured span.na,table.wp-list-table td.column-locked_download span.na,table.wp-list-table td.column-redirect_only span.na{color:#999;width:1em;height:1em;line-height:1em;display:inline-block;overflow:hidden;vertical-align:middle}table.wp-list-table td.column-download_count span.na:before,table.wp-list-table td.column-featured span.na:before,table.wp-list-table td.column-locked_download span.na:before,table.wp-list-table td.column-redirect_only span.na:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f460";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table td.column-download_count span.yes,table.wp-list-table td.column-featured span.yes,table.wp-list-table td.column-locked_download span.yes,table.wp-list-table td.column-redirect_only span.yes{width:1em;height:1em;line-height:1em;display:inline-block;overflow:hidden;vertical-align:middle}table.wp-list-table td.column-download_count span.yes:before,table.wp-list-table td.column-featured span.yes:before,table.wp-list-table td.column-locked_download span.yes:before,table.wp-list-table td.column-redirect_only span.yes:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f147";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table .column-thumb img{padding:2px;margin:0;border:1px solid #dfdfdf;vertical-align:middle;width:32px;height:32px}#download-monitor-file .inside{padding:0;margin:0}#download-monitor-file .dlm-metaboxes-wrapper .close_all,#download-monitor-file .dlm-metaboxes-wrapper .expand_all{float:right;margin-left:1em;line-height:22px;text-decoration:none}#download-monitor-file .dlm-metaboxes-wrapper .expand_all:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f168";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper .close_all:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f460";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper p.toolbar{margin:0!important;border-top:1px solid #fff;border-bottom:1px solid #dfdfdf;padding:7px 12px!important;overflow:hidden;zoom:1}#download-monitor-file .dlm-metaboxes-wrapper p.toolbar a.button{float:left;margin:0}#download-monitor-file .dlm-metaboxes-wrapper .fr,#download-monitor-file .dlm-metaboxes-wrapper button.add_attribute,#download-monitor-file .dlm-metaboxes-wrapper button.add_variable_attribute,#download-monitor-file .dlm-metaboxes-wrapper select.attribute_taxonomy{float:right;margin:0 0 0 6px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metaboxes{padding:0 12px 0}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox-sortable-placeholder{border-color:#bbb;background-color:#f5f5f5;margin:9px 0;border-width:1px;border-style:dashed}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox{background:#ececec;border:1px solid #ececec;margin:9px 0!important}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox .dlm-blury:before{content:url('../images/ajax-loader.gif');display:block;position:absolute;top:50%;transform:translateY(-50%);width:100%;left:0;margin:0 auto;color:#cecece;text-align:center;z-index:11;font-size:16px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox .dlm-blury:after{content:"";display:block;background:rgba(0,0,0,.5);width:100%;top:0;left:0;margin:0 auto;height:100%;z-index:10;position:absolute}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3{margin:0!important;padding:6px!important;font-size:1em!important;overflow:hidden;zoom:1;cursor:move}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3 button{float:right}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3 strong{line-height:24px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3 select{font-family:sans-serif}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3 .handlediv{background-position:6px 5px!important;display:none!important;height:24px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox:hover h3 .handlediv{display:block}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table{width:100%;position:relative;background:#fff;padding:3px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td{text-align:left;padding:6px 6px;vertical-align:top;border:0;line-height:26px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td label{text-align:left;display:block;line-height:21px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input{float:left;min-width:200px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input,#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td textarea{width:100%;margin:0;display:block;font-size:14px;padding:4px;color:#555}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td textarea{height:7.5em}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td select{width:100%}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input.short{width:200px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input.checkbox{width:auto;min-width:inherit;vertical-align:middle;display:inline;float:none}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input.date-picker-field{width:50%;min-width:inherit;float:none;display:inline}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input.hour,#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input.minute{width:2em;min-width:inherit;float:none;display:inline}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td.attribute_name{width:200px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table .minus,#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table .plus{margin-top:6px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table .fl{float:left}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table .fr{float:right}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox:first-child h3{background-color:#fafafa;border-bottom:1px solid #dcdcde}#download-monitor-file .dlm-metaboxes-wrapper .plus:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f132";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper .minus:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f460";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper .dlm_upload_file:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f317";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper .dlm_media_library:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f104";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper .dlm_browse_for_file{float:right}#download-monitor-file .dlm-metaboxes-wrapper .dlm_browse_for_file:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f322";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-information .dlm_information_panel div p{overflow:hidden;width:100%;font-weight:700;box-sizing:border-box;line-height:28px;margin-bottom:5px}#download-monitor-information .dlm_information_panel input{margin:0;border-top-right-radius:0;border-bottom-right-radius:0;flex-grow:1;width:calc(100% - 45px)}#download-monitor-product-information .dlm_information_panel div p{overflow:hidden;width:100%;font-weight:700;box-sizing:border-box;line-height:28px;margin-bottom:5px}#download-monitor-product-information .dlm_information_panel input{margin:0;border-top-right-radius:0;border-bottom-right-radius:0;flex-grow:1;width:calc(100% - 45px)}#download-monitor-options .inside{padding:0;margin:0}#download-monitor-options .form-field-checkbox label{display:inline;padding:0 0 4px}#download-monitor-options .form-field-checkbox input{display:inline-block;width:auto;vertical-align:middle}#download-monitor-options .form-field-checkbox .dlm-description{padding:4px 0 0 0;display:block}#download-monitor-options .access_permissions{margin:0!important;border-top:1px solid #fff;border-bottom:1px solid #dfdfdf;padding:7px 12px!important;overflow:hidden;zoom:1}#download-monitor-options .access_permissions h4{margin-bottom:.5em;margin:0 0 .5em}#download-monitor-options .access_permissions ul{background:#fff;border:1px solid #dfdfdf;height:110px;overflow:auto;padding:.5em .9em;margin:0}#download-monitor-options p{margin:0!important;border-top:1px solid #fff;border-bottom:1px solid #dfdfdf;padding:7px 12px!important;overflow:hidden;zoom:1}#download-monitor-options p.not-active{opacity:.7}#download-monitor-options .options_upsell_link{color:unset;text-decoration:none}#download-monitor-options .dlm-upsell-badge{font-size:10px;background:#f4daa4;padding:2px 5px;display:inline-block;margin-left:5px;border-radius:10px}#insert-download{padding:20px 20px}#insert-download #drag-drop-area,#insert-download #insert-shortcode{margin:1em 0}#insert-download .error,#insert-download .updated{margin-left:0;margin-right:0}#insert-download h2{margin-top:0}#insert-download label{margin:0 0 .25em 0;display:block;font-size:1.1em}#insert-download span.description{display:block}#insert-download input.input{margin:0 0 .25em 0;display:block;width:100%;font-size:1.1em}#insert-download .add_link{float:right}#insert-download ul.page-numbers{overflow:hidden;zoom:1;margin:0 auto;padding:0;text-align:center}#insert-download ul.page-numbers li{display:inline-block;margin:0;list-style:none outside;line-height:1em}#insert-download ul.page-numbers li a,#insert-download ul.page-numbers li span{text-decoration:none;border:1px solid #ddd;-webkit-border-radius:4px;border-radius:4px;padding:8px;display:block}#insert-download ul.page-numbers li span{border-color:#eee}#insert-download legend{font-weight:700;display:block;margin:0 0 1em}#insert-download fieldset label{display:block;margin:0 0 .5em}.dlm-code-nginx-rules{display:block}.settings_panel .form-table td{padding-left:0}.settings_panel .dlm-lazy-select-loader{display:inline-block;vertical-align:middle;padding:0 0 0 3px}.settings_panel .dlm-lazy-select-loader img{display:inline-block;height:25px;width:25px;margin-top:1px}.dlm-reports h1 .dlm-reports-actions{float:right}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector,.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-period,.dlm-reports h1 .dlm-reports-actions a.dlm-reports-header-chart-switcher{margin:0 5px;float:left}.dlm-reports h1 .dlm-reports-actions>:last-child{margin-right:0}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector{position:relative;font-size:14px;padding:0 .5em 0 1em;background:#fff;border:1px solid #ccc;border-radius:3px;user-select:none;cursor:pointer}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm-arrow:before{font-family:dashicons!important;content:"\f140";font-style:normal;font-weight:400;speak:none;display:inline-block;text-decoration:inherit;width:1em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;font-size:1.6em;vertical-align:middle;margin-top:-2px}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay{display:block;width:466px;padding:10px;background:#fff;border:1px solid #ccc;position:absolute;top:30px;right:0;z-index:10;overflow:hidden}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date{font-size:70%;margin-right:5px;float:left;z-index:11}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline{border:0}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline .ui-state-highlight{background:#e6e6e6 url(../images/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;color:#555;border:1px solid #d3d3d3}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline .ui-state-active{border:1px solid #aaa;background:#fff url(../images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline td,.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline th{padding:0;margin:0;line-height:2em}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline td a,.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline th a{text-align:center!important}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_actions{width:70px;padding-left:10px;text-align:center;float:left}.dlm-reports h1 .dlm-reports-actions a.dlm-reports-header-chart-switcher{display:block;margin-top:1px;padding-top:4px;color:#23282d;text-decoration:none}.dlm-reports h1 .dlm-reports-actions a.dlm-reports-header-chart-switcher:before{font-family:dashicons!important;font-style:normal;font-weight:400;speak:none;display:inline-block;text-decoration:inherit;width:1em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;font-size:1.4em}.dlm-reports h1 .dlm-reports-actions a.dlm-reports-header-chart-switcher.dlm-line:before{content:"\f238"}.dlm-reports h1 .dlm-reports-actions a.dlm-reports-header-chart-switcher.dlm-bar:before{content:"\f185"}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-period a{border-color:#ccc!important}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-period a:first-child{border-bottom-right-radius:0;border-top-right-radius:0;border-right:0}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-period a:last-child{border-bottom-left-radius:0;border-top-left-radius:0;border-left:0}.dlm-reports .dlm_reports_loader{position:absolute;width:32px;height:32px;top:50%;left:50%;margin:-16px 0 0 -16px}.dlm-reports .dlm-reports-block-chart{width:100%;height:300px;margin-top:20px;background:#fff;border:1px solid #e5e5e5;overflow:hidden}.dlm-reports .dlm-reports-block-chart .chart-container h6{display:none}.dlm-reports .dlm-reports-block-summary #popular span{line-height:1em}.dlm-reports .dlm-reports-block{position:relative;box-sizing:border-box;width:100%;padding:20px 10px;margin-top:20px;background:#fff;border:1px solid #e5e5e5;overflow:hidden;float:left}.dlm-reports .dlm-reports-block.dlm-reports-block-half{width:49%;margin-right:1%}.dlm-reports .dlm-reports-block.dlm-reports-block-half-right{width:49%;margin-left:1%}.dlm-reports .dlm-reports-block .dlm-reports-placeholder-no-data{display:inline-block;width:100%;font-size:1.5em;color:#b4b9be;font-style:italic;text-align:center}.dlm-reports .dlm-reports-block ul{box-sizing:border-box;width:100%;padding:0;margin:0}.dlm-reports .dlm-reports-block ul li{display:inline-block;width:33%;padding:5px 0}.dlm-reports .dlm-reports-block ul li label,.dlm-reports .dlm-reports-block ul li span{display:block;width:100%;text-align:center}.dlm-reports .dlm-reports-block ul li span{font-size:2.5em;font-weight:700;padding:.5em 0 0}.dlm-reports .dlm-reports-block table{width:100%}.dlm-reports .dlm-reports-block table td,.dlm-reports .dlm-reports-block table th{text-align:center;padding:10px 0;border-bottom:1px solid #e5e5e5}.dlm-reports .dlm-reports-block table td:first-child,.dlm-reports .dlm-reports-block table th:first-child{text-align:left}.dlm-reports .dlm-reports-block table th{padding-bottom:20px}.dlm-reports-block-summary{background:#333!important;color:#fff}.post-type-dlm_product table.wp-list-table .column-title{width:65%!important}.dlm_mb_shop_product_information .dlm_shop_field_row{width:100%;overflow:hidden}.dlm_mb_shop_product_information .dlm_shop_field_row label.dlm_shop_field_label{display:inline-block;width:20%;height:100%;line-height:2.2em;float:left}.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input{display:inline-block;width:50%;float:left}.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input .dlm_shop_input{width:100%;padding:5px 7px}.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input .select2-selection--multiple{border:1px solid #ddd}.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input .select2-search,.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input .select2-selection__choice{margin-bottom:0}.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input .select2-search__field{padding-top:3px}.dlm-order-overview #dlm_empty_trash{margin-left:3px}.dlm-order-overview .wp-list-table td .column-id{width:25%}.dlm-order-details{max-width:1250px;margin-left:auto;margin-right:auto;padding-right:20px}.dlm-order-details h1{padding-bottom:25px}.dlm-order-details .dlm-order-details-main,.dlm-order-details .dlm-order-details-side{width:100%;float:left}.dlm-order-details .dlm-order-details-block{padding:0;margin-bottom:20px;line-height:1;border:1px solid #e5e5e5;background:#fff;box-shadow:0 1px 1px rgba(0,0,0,.04)}.dlm-order-details .dlm-order-details-block h2.dlm-order-details-block-title{font-size:14px;padding:8px 12px;margin:0;line-height:1.4;border-bottom:1px solid #eee}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside{margin:6px 0 0 0;padding:6px 12px 12px;line-height:1.4em;font-size:13px}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside label{display:block;font-weight:700;padding-bottom:6px}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside p{padding:0;margin:0}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside ul,.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside ul li{list-style:none;padding:0;margin:0}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside ul li{padding:6px 0}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside .dlm-order-details-current-state{width:70%;height:30px}.dlm-order-details .dlm-order-details-block.dlm-order-details-customer .dlm-order-details-customer-image{float:right}.dlm-order-details .dlm-order-details-block.dlm-order-details-customer ul li{margin-bottom:4px;padding:0}.dlm-order-details .dlm-order-details-block.dlm-order-details-customer ul li:first-child{font-weight:700}.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items{overflow:hidden}.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items .dlm-order-details-overview{width:25%;float:right}.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items .dlm-order-details-overview td,.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items .dlm-order-details-overview th{padding-top:1.5em;padding-bottom:1.5em;text-align:right}.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items .dlm-order-details-overview th{width:50%;font-weight:400}.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items .dlm-order-details-overview td{padding-right:1em;font-weight:700}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table{width:100%}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td,.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th{text-align:center}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td:first-child,.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th:first-child{text-align:left;padding-left:.5em}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th{padding-top:.5em;padding-bottom:.5em;border-bottom:2px solid #c3c1bc}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td{padding-top:1.5em;padding-bottom:1.5em;border-bottom:1px solid #c3c1bc}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td.dlm-order-details-order-items-item-total,.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th.dlm-order-details-order-items-item-total{text-align:right;padding-right:1em}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td.dlm-order-transaction-processor-id,.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th.dlm-order-transaction-processor-id{display:none}.dlm-order-details .dlm-order-details-block .dlm-order-details-update-successful{font-size:2em;padding:.2em .3em;color:#46b450}@media (min-width:768px){.dlm-order-details .dlm-order-details-main{width:62%;float:left}.dlm-order-details .dlm-order-details-side{width:35%;float:right}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td.dlm-order-transaction-processor-id,.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th.dlm-order-transaction-processor-id{display:table-cell}}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-one-col{margin:0 auto;max-width:800px}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-cta{margin-top:40px;text-align:center}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-three-col{max-width:680px;margin:40px auto 0;overflow:hidden;display:flex;justify-content:space-between;flex-wrap:wrap}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-three-col .dlm-onboarding-col{padding-top:2.5em;flex:1;align-self:flex-start;min-width:100%;max-width:100%}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-three-col .dlm-onboarding-col img{width:100%}.dlm-onboarding .dlm-onboarding-section h2{margin:60px 0 .6em;font-size:2.7em;line-height:1.3;font-weight:300;text-align:center}.dlm-onboarding .dlm-onboarding-section p{max-width:55em;margin:.6em auto 0 auto}.dlm-onboarding .dlm-onboarding-section a.button-hero{height:46px;font-size:14px;line-height:44px;padding:0 36px;font-weight:700;text-align:center}.dlm-onboarding .dlm-onboarding-pages{max-width:55em;margin:0 auto;padding:2em 0 0}.dlm-onboarding .dlm-onboarding-pages a.button-hero{width:170px}.dlm-onboarding .dlm-onboarding-pages a.button-hero.dlm-page-exists{background:#46b450;border-color:#46b450 #4a8442 #467a3f;box-shadow:0 2px 0 #467a3f;text-shadow:0 -1px 1px #4a8442,1px 0 1px #4a8442,0 1px 1px #4a8442,-1px 0 1px #4a8442}.dlm-onboarding .dlm-onboarding-pages a.button-hero.dlm-page-exists:active{box-shadow:0 2px 0 #467a3f}.dlm-onboarding .dlm-onboarding-pages td,.dlm-onboarding .dlm-onboarding-pages th{padding:1em 0;border-bottom:1px solid #ccc}.dlm-onboarding .dlm-onboarding-pages th{width:13%;min-width:6em;text-align:left}.dlm-onboarding .dlm-onboarding-pages td{padding-right:.5em;padding-left:.5em}.dlm-onboarding .dlm-onboarding-pages td.dlm-onboarding-pages-page-title{font-weight:700}@media (min-width:768px){.dlm-onboarding .dlm-onboarding-section .dlm-onboarding-pages{width:55em}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-three-col .dlm-onboarding-col{padding-top:0;min-width:31%;max-width:31%}}.dlm_extensions_wrap a.dlm-reload-button{float:right;position:relative;top:-40px}.dlm_extensions_wrap #available-extensions{clear:both}.dlm_extensions_wrap .dlm_extensions{padding:15px 0;overflow:hidden}.dlm_extensions_wrap .dlm_extensions .dlm_extension{background-color:#fff;width:calc(20% - 15px);margin:0 15px 15px 0;display:inline-block;vertical-align:top}.dlm_extensions_wrap .dlm_extensions .dlm_extension p{margin:0}.dlm_extensions_wrap .dlm_extensions .dlm_extension a{color:#444;text-decoration:none}.dlm_extensions_wrap .dlm_extensions .dlm_extension .dlm_extension_img_wrapper{width:100%;background:#419ccb;text-align:center}.dlm_extensions_wrap .dlm_extensions .dlm_extension .dlm_extension_img_wrapper img{max-width:100%;margin:0 auto}.dlm_extensions_wrap .dlm_extensions .dlm_extension h3{padding:0 20px}.dlm_extensions_wrap .dlm_extensions .dlm_extension div.extension-desc{min-height:120px;padding:0 20px}.dlm_extensions_wrap .dlm_extensions .dlm_extension .product_footer{padding:15px 15px 15px 0;text-align:right;background-color:#fafafa;border-top:1px solid #dcdcde}.dlm_extensions_wrap .dlm_extensions .dlm_extension .product_footer .loop_price{font-weight:700}.dlm_extensions_wrap .dlm_extensions .dlm_extension .product_footer .loop_price.sale{color:green}.dlm_extensions_wrap .dlm_extensions .dlm_extension .product_footer .loop_price.sale strike{color:#444}.dlm_extensions_wrap .dlm_extensions .dlm_extension .product_footer .button .dashicons{vertical-align:middle;font-size:16px}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license{padding:0 20px 20px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license div.dlm_license_error{padding:.5em;margin-bottom:15px;background:#ffffe0}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license div.dlm_license_error a{color:#00f;text-decoration:underline}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license p.license-status{padding:5px 0;margin:5px 0;background:red;font-weight:700;font-size:1.2em;color:#fff;text-align:center}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license p.license-status.active{background:green}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license input{width:100%;margin:7px 0;padding:7px}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license a.button-primary{width:100%;margin:5px auto 0;color:#fff;text-align:center}#ui-datepicker-div{display:none}.wpchill-upsell{background:#fff;border:0;padding:15px;margin-top:30px}.wpchill-upsell .wpchill-upsell-features{text-align:left;display:flex;flex-wrap:wrap;padding:20px 0}.wpchill-upsell .wpchill-upsell-features li{width:33%}.wpchill-upsell a:first-child{margin-right:10px}.wpchill-upsells-wrapper{width:100%}.wrap.dlm-admin-settings .form-table{width:65%;float:left}.wrap.dlm-admin-settings .form-table+.wpchill-upsells-wrapper{width:30%;float:right}.wrap.dlm-admin-settings .form-table .dlm_htaccess_notice{margin-bottom:5px}.wrap.dlm-admin-settings .dlm-upsell-badge{font-size:10px;background:#f4daa4;padding:2px 5px;display:inline-block;margin-left:10px;border-radius:10px}.wrap.dlm-admin-settings #setting-dlm_downloads_path+p strong{color:red}#total_downloads_browser_table a.nav-tab{text-transform:capitalize}#dlm-amazon-s3-upsell .inside,#dlm-buttons-upsell .inside,#dlm-download-page-upsell .inside,#dlm-google-drive-upsell .inside{display:flex;flex-wrap:wrap;background:#f1f1f1}#dlm-amazon-s3-upsell .inside .wpchill-upsell,#dlm-buttons-upsell .inside .wpchill-upsell,#dlm-download-page-upsell .inside .wpchill-upsell,#dlm-google-drive-upsell .inside .wpchill-upsell{background:0 0;text-align:center;width:100%;margin-top:0}#dlm-amazon-s3-upsell .inside,#dlm-buttons-upsell .inside,#dlm-download-page-upsell .inside,#dlm-google-drive-upsell .inside{margin:0;padding:0}.upsells-columns{display:flex;flex-wrap:wrap;align-items:center;align-content:center}.upsells-columns .upsells-columns-2{width:50%;text-align:center;display:flex;align-items:center;align-content:center}.upsells-columns .upsells-column{width:100%;text-align:center;display:flex;align-items:center;align-content:center}.upsells-columns .upsells-column>*{display:inline-block;align-content:center;vertical-align:middle;margin:0 15px;padding:10px 0}.upsells-columns .upsells-column>.wpchill-upsell{position:relative;float:none;flex-grow:1;display:flex;align-items:center}.upsells-columns .upsells-column>.wpchill-upsell .wpchill-upsell-description{margin:0 auto}.upsells-columns .upsells-column h3{line-height:1.3em}.upsells-columns .upsells-column:last-child{border-top:1px solid #c3c4c7;border-bottom:1px solid #c3c4c7}.upsells-columns .wpchill-upsell{margin-top:0}.dlm_download_page_dlm-extensions .theme.dlm_extension{background-color:#fff}body.rsvp_page_rsvp-upgrade-to-pro #wpcontent .wrap{margin-left:0;max-width:85%}.rsvp-lite-vs-premium,.rsvp-lite-vs-premium p{font-size:14px;margin:0}.rsvp-lite-vs-premium>.wpchill-plans-table.wpchill-highlight>.wpchill-pricing-package{background:#fefff0;box-shadow:0 0 15px #d0dbdb}.rsvp-lite-vs-premium .wp-badge{display:inline-block;vertical-align:middle;position:relative;margin-right:2.5%}.rsvp-lite-vs-premium h3{display:block;position:relative;font-size:16px;margin:0}.rsvp-lite-vs-premium .wpchill-plans-table{display:flex}.rsvp-lite-vs-premium .wpchill-plans-table.table-header{margin-top:50px;border-top:0}.rsvp-lite-vs-premium .wpchill-plans-table.table-header .wpchill-pricing-package{border:0}.rsvp-lite-vs-premium .wpchill-plans-table.table-header .wpchill-pricing-package.wpchill-title.wpchill-highlight::before,.rsvp-lite-vs-premium .wpchill-plans-table.table-header .wpchill-pricing-package:not(.wpchill-modula-lite):last-child:before{content:'';width:auto;display:inline-block;opacity:1;position:absolute;top:-1px;background:#41495b;text-align:center;left:0;right:0;color:#fff;font-size:15px;text-transform:uppercase;padding:10px 5px;transform:translateY(-100%)}.rsvp-lite-vs-premium.table-footer .wpchill-pricing-package:last-child{border:0}.rsvp-lite-vs-premium .wpchill-pricing-package{text-align:center;line-height:1.5;padding:10px 15px;display:flex;align-content:center;align-items:center;justify-content:center;background:#fff;border-top:1px solid #ccc;width:32%}.rsvp-lite-vs-premium .wpchill-pricing-package:not(:first-child){max-width:300px}.rsvp-lite-vs-premium .wpchill-pricing-package.wpchill-title{font-weight:400;color:#666;font-size:1.25rem;height:auto;-ms-flex-direction:column;flex-direction:column;padding-top:30px;padding-bottom:30px;justify-content:space-between;position:relative}.rsvp-lite-vs-premium .wpchill-pricing-package.wpchill-title .wpchill-name{margin:0;font-size:36px}.rsvp-lite-vs-premium .wpchill-pricing-package.wpchill-title.wpchill-modula-lite{justify-content:center}.rsvp-lite-vs-premium .wpchill-pricing-package.wpchill-title p.description{font-style:italic;font-size:13px;margin-bottom:40px}.rsvp-lite-vs-premium .wpchill-pricing-package.wpchill-title .wpchill-price p:last-child{font-size:30px;margin:0 0 40px 0}.rsvp-lite-vs-premium .wpchill-pricing-package.wpchill-title .wpchill-price p.old-price{margin:0;position:relative}.rsvp-lite-vs-premium .wpchill-pricing-package.wpchill-title .wpchill-price p.old-price:after{content:"";height:2px;width:60px;background:red;display:block;position:absolute;left:50%;top:52%;transform:translate(-50%,-50%)}.rsvp-lite-vs-premium .wpchill-pricing-package.wpchill-title .wpchill-price sup{top:2px;position:relative;font-size:15px}.rsvp-lite-vs-premium .wpchill-pricing-package.wpchill-empty{background:0 0;border-color:transparent}.rsvp-lite-vs-premium .wpchill-pricing-package.feature-name{justify-content:space-between;font-weight:400;text-align:left;font-size:13px;display:block;background:0 0}.rsvp-lite-vs-premium .wpchill-pricing-package .dashicons-saved{color:green}.rsvp-lite-vs-premium .wpchill-pricing-package .dashicons{width:30px;height:30px;font-size:30px}.rsvp-lite-vs-premium .wpchill-pricing-package .dashicons-no-alt{color:#ff3439}.rsvp-lite-vs-premium .wpchill-pricing-package:last-child{background:#fefff0}.rsvp-lite-vs-premium .button .dashicons{font-size:16px;vertical-align:middle;line-height:26px}.wpchill-tooltip{position:relative;display:inline-block;float:left;margin-right:10px}.wpchill-tooltip>span{cursor:pointer;color:#0073aa;text-decoration:underline;margin-left:5px}.wpchill-tooltip .wpchill-tooltip-content{display:none;position:absolute;top:50%;right:-10px;transform:translate(100%,-50%);width:300px;background:#000;color:#fff;padding:10px;box-sizing:border-box;z-index:99}.wpchill-tooltip:hover .wpchill-tooltip-content{display:block}.wpchill-tooltip .wpchill-tooltip-content:before{content:'';width:0;height:0;border-style:solid;border-width:8px 8px 8px 0;border-color:transparent #000 transparent transparent;display:block;position:absolute;top:50%;left:-8px;transform:translateY(-50%)}.wpchill-tooltip-button{position:relative}.wpchill-tooltip-button .wpchill-tooltip-content{display:none;position:absolute;top:50%;right:25px;transform:translate(50%,-135%);width:auto;background:rgba(0,0,0,.8);color:#fff;padding:10px 15px;box-sizing:border-box;font-size:14px;z-index:99}.wpchill-tooltip-button:hover .wpchill-tooltip-content{display:block}.wpchill-tooltip-button .wpchill-tooltip-content:before{content:'';width:0;height:0;border-style:solid;border-width:8px 8px 8px 0;border-color:transparent #000 transparent transparent;display:block;position:absolute;bottom:-12px;left:50%;transform:rotate(-90deg)}.dlm-file-link{display:block;margin-top:3px}.dlm-listing-no-file code{color:#b32d2e}
|
assets/css/admin.less
CHANGED
@@ -1,2275 +1,2275 @@
|
|
1 |
-
.iconbefore(@glyph: "\f333") {
|
2 |
-
font-family: dashicons !important;
|
3 |
-
speak: none;
|
4 |
-
font-weight: normal;
|
5 |
-
font-variant: normal;
|
6 |
-
text-transform: none;
|
7 |
-
-webkit-font-smoothing: antialiased;
|
8 |
-
-moz-osx-font-smoothing: grayscale;
|
9 |
-
margin: 0 4px 0 0;
|
10 |
-
content: @glyph;
|
11 |
-
top: 1px;
|
12 |
-
left: -1px;
|
13 |
-
font-size: 1em;
|
14 |
-
line-height: inherit;
|
15 |
-
position: relative;
|
16 |
-
vertical-align: top;
|
17 |
-
}
|
18 |
-
|
19 |
-
/* Logs */
|
20 |
-
.post-type-dlm_download {
|
21 |
-
h1 {
|
22 |
-
a.dlm-delete-logs {
|
23 |
-
color: #a00;
|
24 |
-
|
25 |
-
&:hover {
|
26 |
-
color: #fff;
|
27 |
-
background: #a00;
|
28 |
-
border-color: #7C0900;
|
29 |
-
}
|
30 |
-
}
|
31 |
-
}
|
32 |
-
|
33 |
-
.dlm-page-header {
|
34 |
-
border-bottom: 1px solid #ccc;
|
35 |
-
padding: 15px 20px;
|
36 |
-
display: flex;
|
37 |
-
justify-content: space-between;
|
38 |
-
background: #fff;
|
39 |
-
width: calc(100% + 20px);
|
40 |
-
box-sizing: border-box;
|
41 |
-
margin-left: -20px;
|
42 |
-
|
43 |
-
.dlm-header-links {
|
44 |
-
margin-left: -20px;
|
45 |
-
|
46 |
-
a {
|
47 |
-
span {
|
48 |
-
vertical-align: middle;
|
49 |
-
position: relative;
|
50 |
-
top: -2px;
|
51 |
-
padding-right: 10px;
|
52 |
-
}
|
53 |
-
}
|
54 |
-
}
|
55 |
-
|
56 |
-
.dlm-header-logo img {
|
57 |
-
max-height: 35px;
|
58 |
-
}
|
59 |
-
}
|
60 |
-
|
61 |
-
td.column-shortcode {
|
62 |
-
.hidden {
|
63 |
-
display:none;
|
64 |
-
}
|
65 |
-
}
|
66 |
-
}
|
67 |
-
|
68 |
-
#dlm_logs {
|
69 |
-
td {
|
70 |
-
padding: 7px 7px;
|
71 |
-
vertical-align: middle;
|
72 |
-
}
|
73 |
-
|
74 |
-
.check-column {
|
75 |
-
width: 1%;
|
76 |
-
padding: 0;
|
77 |
-
vertical-align: middle;
|
78 |
-
}
|
79 |
-
|
80 |
-
.column-status {
|
81 |
-
width: 2%;
|
82 |
-
}
|
83 |
-
|
84 |
-
td.column-status {
|
85 |
-
font-size: 10px;
|
86 |
-
vertical-align: middle;
|
87 |
-
text-align: center;
|
88 |
-
|
89 |
-
span {
|
90 |
-
color: #fff;
|
91 |
-
font-weight: normal;
|
92 |
-
-moz-border-radius: 50%;
|
93 |
-
-webkit-border-radius: 50%;
|
94 |
-
border-radius: 50%;
|
95 |
-
height: 18px;
|
96 |
-
line-height: 18px;
|
97 |
-
width: 18px;
|
98 |
-
display: inline-block;
|
99 |
-
background: url('../images/log-status-icons.png') top left no-repeat;
|
100 |
-
}
|
101 |
-
|
102 |
-
.completed {
|
103 |
-
background-color: #6cc644;
|
104 |
-
}
|
105 |
-
|
106 |
-
.failed {
|
107 |
-
background-color: #bd2c00;
|
108 |
-
background-position-y: -18px;
|
109 |
-
}
|
110 |
-
|
111 |
-
.redirected {
|
112 |
-
background-color: #1c769b;
|
113 |
-
background-position-y: -36px;
|
114 |
-
}
|
115 |
-
}
|
116 |
-
|
117 |
-
td.column-user_ip,
|
118 |
-
td.column-user_agent {
|
119 |
-
font-family: monospace;
|
120 |
-
font-weight: normal;
|
121 |
-
}
|
122 |
-
|
123 |
-
span.dlm-description {
|
124 |
-
font-weight: normal;
|
125 |
-
}
|
126 |
-
|
127 |
-
.column-download,
|
128 |
-
.column-file,
|
129 |
-
.column-user,
|
130 |
-
.column-user_ua {
|
131 |
-
width: 16% !important;
|
132 |
-
}
|
133 |
-
|
134 |
-
.column-user_ip,
|
135 |
-
.column-date {
|
136 |
-
width: 6% !important;
|
137 |
-
}
|
138 |
-
}
|
139 |
-
|
140 |
-
.post-type-dlm_download {
|
141 |
-
.inline-edit-row {
|
142 |
-
.inline-edit-col-dlm {
|
143 |
-
.inline-edit-col-dlm-inner {
|
144 |
-
margin-top: 10px;
|
145 |
-
}
|
146 |
-
}
|
147 |
-
}
|
148 |
-
}
|
149 |
-
|
150 |
-
/** Settings */
|
151 |
-
.dlm-settings-sub-nav {
|
152 |
-
margin: 0 0 10px 0;
|
153 |
-
width: 100%;
|
154 |
-
border-bottom: 1px solid #ccc;
|
155 |
-
box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
|
156 |
-
|
157 |
-
li {
|
158 |
-
margin-right: 10px;
|
159 |
-
margin-bottom: -2px;
|
160 |
-
}
|
161 |
-
|
162 |
-
a {
|
163 |
-
padding: 13px;
|
164 |
-
display: block;
|
165 |
-
}
|
166 |
-
|
167 |
-
.active-section {
|
168 |
-
margin-bottom: -2px;
|
169 |
-
|
170 |
-
a {
|
171 |
-
border-bottom: 4px solid #000;
|
172 |
-
padding-bottom: 9px;
|
173 |
-
margin-bottom: -2px;
|
174 |
-
font-weight: 600;
|
175 |
-
}
|
176 |
-
}
|
177 |
-
}
|
178 |
-
|
179 |
-
.admin-color-blue {
|
180 |
-
.dlm-settings-sub-nav {
|
181 |
-
.active-section {
|
182 |
-
a {
|
183 |
-
border-bottom-color: #096484;
|
184 |
-
}
|
185 |
-
}
|
186 |
-
}
|
187 |
-
}
|
188 |
-
|
189 |
-
.admin-color-coffee {
|
190 |
-
.dlm-settings-sub-nav {
|
191 |
-
.active-section {
|
192 |
-
a {
|
193 |
-
border-bottom-color: #c7a589;
|
194 |
-
}
|
195 |
-
}
|
196 |
-
}
|
197 |
-
}
|
198 |
-
|
199 |
-
.admin-color-ectoplasm {
|
200 |
-
.dlm-settings-sub-nav {
|
201 |
-
.active-section {
|
202 |
-
a {
|
203 |
-
border-bottom-color: #a3b745;
|
204 |
-
}
|
205 |
-
}
|
206 |
-
}
|
207 |
-
}
|
208 |
-
|
209 |
-
.admin-color-midnight {
|
210 |
-
.dlm-settings-sub-nav {
|
211 |
-
.active-section {
|
212 |
-
a {
|
213 |
-
border-bottom-color: #e14d43;
|
214 |
-
}
|
215 |
-
}
|
216 |
-
}
|
217 |
-
}
|
218 |
-
|
219 |
-
.admin-color-ocean {
|
220 |
-
.dlm-settings-sub-nav {
|
221 |
-
.active-section {
|
222 |
-
a {
|
223 |
-
border-bottom-color: #627c83;
|
224 |
-
}
|
225 |
-
}
|
226 |
-
}
|
227 |
-
}
|
228 |
-
|
229 |
-
.admin-color-sunrise {
|
230 |
-
.dlm-settings-sub-nav {
|
231 |
-
.active-section {
|
232 |
-
a {
|
233 |
-
border-bottom-color: #be3631;
|
234 |
-
}
|
235 |
-
}
|
236 |
-
}
|
237 |
-
}
|
238 |
-
|
239 |
-
.admin-color-light {
|
240 |
-
.dlm-settings-sub-nav {
|
241 |
-
.active-section {
|
242 |
-
a {
|
243 |
-
border-bottom-color: #888;
|
244 |
-
}
|
245 |
-
}
|
246 |
-
}
|
247 |
-
}
|
248 |
-
|
249 |
-
.admin-color-evergreen {
|
250 |
-
.dlm-settings-sub-nav {
|
251 |
-
.active-section {
|
252 |
-
a {
|
253 |
-
border-bottom-color: #36533f;
|
254 |
-
}
|
255 |
-
}
|
256 |
-
}
|
257 |
-
}
|
258 |
-
|
259 |
-
.admin-color-mint {
|
260 |
-
.dlm-settings-sub-nav {
|
261 |
-
.active-section {
|
262 |
-
a {
|
263 |
-
border-bottom-color: #4f6d59;
|
264 |
-
}
|
265 |
-
}
|
266 |
-
}
|
267 |
-
}
|
268 |
-
|
269 |
-
.admin-color-modern {
|
270 |
-
.dlm-settings-sub-nav {
|
271 |
-
.active-section {
|
272 |
-
a {
|
273 |
-
border-bottom-color: #3858e9;
|
274 |
-
}
|
275 |
-
}
|
276 |
-
}
|
277 |
-
}
|
278 |
-
|
279 |
-
.dlm-admin-settings {
|
280 |
-
|
281 |
-
#setting-dlm_decimal_separator,
|
282 |
-
#setting-dlm_thousand_separator {
|
283 |
-
width: 50px;
|
284 |
-
}
|
285 |
-
|
286 |
-
table {
|
287 |
-
td {
|
288 |
-
padding: 15px 0;
|
289 |
-
}
|
290 |
-
}
|
291 |
-
|
292 |
-
h3 {
|
293 |
-
margin: 2em 0 0;
|
294 |
-
}
|
295 |
-
}
|
296 |
-
|
297 |
-
/* File lists */
|
298 |
-
ul.download_monitor_file_browser {
|
299 |
-
list-style: none outside;
|
300 |
-
margin: 0;
|
301 |
-
border: 1px solid #ddd;
|
302 |
-
-moz-border-radius: 3px;
|
303 |
-
-webkit-border-radius: 3px;
|
304 |
-
border-radius: 3px;
|
305 |
-
background: #f9f9f9;
|
306 |
-
padding: 5px 5px;
|
307 |
-
-moz-box-shadow: inset 0 0 0 1px #fff;
|
308 |
-
-webkit-box-shadow: inset 0 0 0 1px #fff;
|
309 |
-
box-shadow: inset 0 0 0 1px #fff;
|
310 |
-
|
311 |
-
li {
|
312 |
-
padding: 0;
|
313 |
-
margin: 0;
|
314 |
-
|
315 |
-
a {
|
316 |
-
color: #21759B;
|
317 |
-
display: block;
|
318 |
-
padding: 4px 0 4px 4px;
|
319 |
-
text-decoration: none;
|
320 |
-
|
321 |
-
&:hover {
|
322 |
-
background-color: #eaf2fa;
|
323 |
-
}
|
324 |
-
|
325 |
-
&:before {
|
326 |
-
.iconbefore("\f123");
|
327 |
-
}
|
328 |
-
|
329 |
-
&.folder:before {
|
330 |
-
.iconbefore("\f318");
|
331 |
-
}
|
332 |
-
|
333 |
-
// Videos
|
334 |
-
&.filetype-mov,
|
335 |
-
&.filetype-avi,
|
336 |
-
&.filetype-3g2,
|
337 |
-
&.filetype-3gp,
|
338 |
-
&.filetype-asf,
|
339 |
-
&.filetype-asx,
|
340 |
-
&.filetype-mp4,
|
341 |
-
&.filetype-mpg,
|
342 |
-
&.filetype-rm,
|
343 |
-
&.filetype-srt,
|
344 |
-
&.filetype-vob,
|
345 |
-
&.filetype-wmv {
|
346 |
-
&:before {
|
347 |
-
.iconbefore("\f126");
|
348 |
-
}
|
349 |
-
}
|
350 |
-
|
351 |
-
// Audio
|
352 |
-
&.filetype-mp3,
|
353 |
-
&.filetype-aif,
|
354 |
-
&.filetype-iff,
|
355 |
-
&.filetype-m3u,
|
356 |
-
&.filetype-m4a,
|
357 |
-
&.filetype-mid,
|
358 |
-
&.filetype-midi,
|
359 |
-
&.filetype-mpa,
|
360 |
-
&.filetype-ra,
|
361 |
-
&.filetype-wav,
|
362 |
-
&.filetype-wma {
|
363 |
-
&:before {
|
364 |
-
.iconbefore("\f127");
|
365 |
-
}
|
366 |
-
}
|
367 |
-
|
368 |
-
// Images
|
369 |
-
&.filetype-psd,
|
370 |
-
&.filetype-ai,
|
371 |
-
&.filetype-eps,
|
372 |
-
&.filetype-ps,
|
373 |
-
&.filetype-svg,
|
374 |
-
&.filetype-bmp,
|
375 |
-
&.filetype-dds,
|
376 |
-
&.filetype-gif,
|
377 |
-
&.filetype-jpg,
|
378 |
-
&.filetype-jpeg,
|
379 |
-
&.filetype-png,
|
380 |
-
&.filetype-pspimage,
|
381 |
-
&.filetype-tga,
|
382 |
-
&.filetype-thm,
|
383 |
-
&.filetype-tif,
|
384 |
-
&.filetype-yuv,
|
385 |
-
&.filetype-ico {
|
386 |
-
&:before {
|
387 |
-
.iconbefore("\f128");
|
388 |
-
}
|
389 |
-
}
|
390 |
-
}
|
391 |
-
|
392 |
-
&.nofiles {
|
393 |
-
color: #999;
|
394 |
-
font-style: italic;
|
395 |
-
padding: 4px 0;
|
396 |
-
}
|
397 |
-
|
398 |
-
ul {
|
399 |
-
list-style: none outside;
|
400 |
-
margin: 0;
|
401 |
-
padding: 0 0 0 28px;
|
402 |
-
|
403 |
-
&.loading {
|
404 |
-
background: url(../images/ajax-loader.gif) no-repeat 24px 0;
|
405 |
-
height: 32px;
|
406 |
-
}
|
407 |
-
}
|
408 |
-
}
|
409 |
-
}
|
410 |
-
|
411 |
-
/* Download list */
|
412 |
-
table.wp-list-table {
|
413 |
-
.column-thumb {
|
414 |
-
width: 44px;
|
415 |
-
text-align: center;
|
416 |
-
white-space: nowrap
|
417 |
-
}
|
418 |
-
|
419 |
-
.column-dlm_download_cat,
|
420 |
-
.column-dlm_download_tag,
|
421 |
-
.column-file {
|
422 |
-
width: 11% !important;
|
423 |
-
}
|
424 |
-
|
425 |
-
.column-title,
|
426 |
-
.column-file {
|
427 |
-
width: 17% !important;
|
428 |
-
}
|
429 |
-
|
430 |
-
.column-download_id,
|
431 |
-
.column-version {
|
432 |
-
width: 5em;
|
433 |
-
}
|
434 |
-
|
435 |
-
th.column-thumb,
|
436 |
-
th.column-download_count,
|
437 |
-
th.column-locked_download,
|
438 |
-
th.column-redirect_only,
|
439 |
-
th.column-featured {
|
440 |
-
span:first-child {
|
441 |
-
float: none;
|
442 |
-
display: inline-block;
|
443 |
-
width: 1em;
|
444 |
-
height: 1em;
|
445 |
-
line-height: 1em;
|
446 |
-
padding: 2px 0 0 0;
|
447 |
-
overflow: hidden;
|
448 |
-
}
|
449 |
-
|
450 |
-
.sorting-indicator {
|
451 |
-
float: right;
|
452 |
-
}
|
453 |
-
}
|
454 |
-
|
455 |
-
th.column-thumb {
|
456 |
-
width: 52px;
|
457 |
-
text-align: center;
|
458 |
-
|
459 |
-
span:first-child {
|
460 |
-
&:before {
|
461 |
-
.iconbefore("\f128");
|
462 |
-
}
|
463 |
-
}
|
464 |
-
}
|
465 |
-
|
466 |
-
th.column-download_count {
|
467 |
-
width: 5em;
|
468 |
-
|
469 |
-
span:first-child {
|
470 |
-
&:before {
|
471 |
-
.iconbefore("\f346");
|
472 |
-
}
|
473 |
-
}
|
474 |
-
}
|
475 |
-
|
476 |
-
th.column-locked_download {
|
477 |
-
width: 3.5em;
|
478 |
-
|
479 |
-
span:first-child {
|
480 |
-
&:before {
|
481 |
-
.iconbefore("\f160");
|
482 |
-
}
|
483 |
-
}
|
484 |
-
}
|
485 |
-
|
486 |
-
th.column-redirect_only {
|
487 |
-
width: 3.5em;
|
488 |
-
|
489 |
-
span:first-child {
|
490 |
-
&:before {
|
491 |
-
.iconbefore("\f103");
|
492 |
-
}
|
493 |
-
}
|
494 |
-
}
|
495 |
-
|
496 |
-
th.column-featured {
|
497 |
-
width: 3.5em;
|
498 |
-
|
499 |
-
span:first-child {
|
500 |
-
&:before {
|
501 |
-
.iconbefore("\f155");
|
502 |
-
}
|
503 |
-
}
|
504 |
-
}
|
505 |
-
|
506 |
-
td.column-download_count,
|
507 |
-
td.column-locked_download,
|
508 |
-
td.column-redirect_only,
|
509 |
-
td.column-featured {
|
510 |
-
text-align: left;
|
511 |
-
padding-left: 11px;
|
512 |
-
|
513 |
-
span.na {
|
514 |
-
color: #999;
|
515 |
-
width: 1em;
|
516 |
-
height: 1em;
|
517 |
-
line-height: 1em;
|
518 |
-
display: inline-block;
|
519 |
-
overflow: hidden;
|
520 |
-
vertical-align: middle;
|
521 |
-
|
522 |
-
&:before {
|
523 |
-
.iconbefore("\f460");
|
524 |
-
}
|
525 |
-
}
|
526 |
-
|
527 |
-
span.yes {
|
528 |
-
width: 1em;
|
529 |
-
height: 1em;
|
530 |
-
line-height: 1em;
|
531 |
-
display: inline-block;
|
532 |
-
overflow: hidden;
|
533 |
-
vertical-align: middle;
|
534 |
-
|
535 |
-
&:before {
|
536 |
-
.iconbefore("\f147");
|
537 |
-
}
|
538 |
-
}
|
539 |
-
}
|
540 |
-
|
541 |
-
.column-thumb img {
|
542 |
-
padding: 2px;
|
543 |
-
margin: 0;
|
544 |
-
border: 1px solid #dfdfdf;
|
545 |
-
vertical-align: middle;
|
546 |
-
width: 32px;
|
547 |
-
height: 32px;
|
548 |
-
}
|
549 |
-
}
|
550 |
-
|
551 |
-
/* Meta boxes */
|
552 |
-
#download-monitor-file {
|
553 |
-
.inside {
|
554 |
-
padding: 0;
|
555 |
-
margin: 0;
|
556 |
-
}
|
557 |
-
|
558 |
-
.dlm-metaboxes-wrapper {
|
559 |
-
|
560 |
-
.expand_all,
|
561 |
-
.close_all {
|
562 |
-
float: right;
|
563 |
-
margin-left: 1em;
|
564 |
-
line-height: 22px;
|
565 |
-
text-decoration: none;
|
566 |
-
}
|
567 |
-
|
568 |
-
.expand_all {
|
569 |
-
&:before {
|
570 |
-
.iconbefore("\f168");
|
571 |
-
}
|
572 |
-
}
|
573 |
-
|
574 |
-
.close_all {
|
575 |
-
&:before {
|
576 |
-
.iconbefore("\f460");
|
577 |
-
}
|
578 |
-
}
|
579 |
-
|
580 |
-
p.toolbar {
|
581 |
-
margin: 0 !important;
|
582 |
-
border-top: 1px solid white;
|
583 |
-
border-bottom: 1px solid #DFDFDF;
|
584 |
-
padding: 7px 12px !important;
|
585 |
-
overflow: hidden;
|
586 |
-
zoom: 1;
|
587 |
-
|
588 |
-
a.button {
|
589 |
-
float: left;
|
590 |
-
margin: 0;
|
591 |
-
}
|
592 |
-
}
|
593 |
-
|
594 |
-
select.attribute_taxonomy,
|
595 |
-
button.add_attribute,
|
596 |
-
button.add_variable_attribute,
|
597 |
-
.fr {
|
598 |
-
float: right;
|
599 |
-
margin: 0 0 0 6px;
|
600 |
-
}
|
601 |
-
|
602 |
-
.dlm-metaboxes {
|
603 |
-
padding: 0 12px 0;
|
604 |
-
}
|
605 |
-
|
606 |
-
.dlm-metabox-sortable-placeholder {
|
607 |
-
border-color: #bbb;
|
608 |
-
background-color: #f5f5f5;
|
609 |
-
margin: 9px 0;
|
610 |
-
border-width: 1px;
|
611 |
-
border-style: dashed;
|
612 |
-
}
|
613 |
-
|
614 |
-
.dlm-metabox {
|
615 |
-
background: #ececec;
|
616 |
-
border: 1px solid #ececec;
|
617 |
-
margin: 9px 0 !important;
|
618 |
-
|
619 |
-
& .dlm-blury{
|
620 |
-
&:before {
|
621 |
-
content:url('../images/ajax-loader.gif');
|
622 |
-
display:block;
|
623 |
-
position: absolute;
|
624 |
-
top:50%;
|
625 |
-
transform:translateY(-50%);
|
626 |
-
width:100%;
|
627 |
-
left:0;
|
628 |
-
margin:0 auto;
|
629 |
-
color:#cecece;
|
630 |
-
text-align: center;
|
631 |
-
z-index: 11;
|
632 |
-
font-size: 16px;
|
633 |
-
// background-image:url('../images/ajax-loader.gif') center center no-repeat;
|
634 |
-
}
|
635 |
-
|
636 |
-
&:after {
|
637 |
-
content:"";
|
638 |
-
display:block;
|
639 |
-
background:rgba(0,0,0,0.5);
|
640 |
-
width:100%;
|
641 |
-
top:0;
|
642 |
-
left:0;
|
643 |
-
margin:0 auto;
|
644 |
-
height: 100%;
|
645 |
-
z-index: 10;
|
646 |
-
position: absolute;
|
647 |
-
}
|
648 |
-
}
|
649 |
-
|
650 |
-
h3 {
|
651 |
-
margin: 0 !important;
|
652 |
-
padding: 6px !important;
|
653 |
-
font-size: 1em !important;
|
654 |
-
overflow: hidden;
|
655 |
-
zoom: 1;
|
656 |
-
cursor: move;
|
657 |
-
|
658 |
-
button {
|
659 |
-
float: right;
|
660 |
-
}
|
661 |
-
|
662 |
-
strong {
|
663 |
-
line-height: 24px;
|
664 |
-
}
|
665 |
-
|
666 |
-
select {
|
667 |
-
font-family: sans-serif;
|
668 |
-
}
|
669 |
-
|
670 |
-
.handlediv {
|
671 |
-
background-position: 6px 5px !important;
|
672 |
-
display: none !important;
|
673 |
-
height: 24px;
|
674 |
-
}
|
675 |
-
}
|
676 |
-
|
677 |
-
&:hover h3 .handlediv {
|
678 |
-
display: block;
|
679 |
-
}
|
680 |
-
|
681 |
-
table {
|
682 |
-
width: 100%;
|
683 |
-
position: relative;
|
684 |
-
background: #fff;
|
685 |
-
padding: 3px;
|
686 |
-
|
687 |
-
td {
|
688 |
-
text-align: left;
|
689 |
-
padding: 6px 6px;
|
690 |
-
vertical-align: top;
|
691 |
-
border: 0;
|
692 |
-
line-height: 26px;
|
693 |
-
|
694 |
-
label {
|
695 |
-
text-align: left;
|
696 |
-
display: block;
|
697 |
-
line-height: 21px;
|
698 |
-
}
|
699 |
-
|
700 |
-
input {
|
701 |
-
float: left;
|
702 |
-
min-width: 200px;
|
703 |
-
}
|
704 |
-
|
705 |
-
input,
|
706 |
-
textarea {
|
707 |
-
width: 100%;
|
708 |
-
margin: 0;
|
709 |
-
display: block;
|
710 |
-
font-size: 14px;
|
711 |
-
padding: 4px;
|
712 |
-
color: #555;
|
713 |
-
}
|
714 |
-
|
715 |
-
textarea {
|
716 |
-
height: 7.5em;
|
717 |
-
}
|
718 |
-
|
719 |
-
select {
|
720 |
-
width: 100%;
|
721 |
-
}
|
722 |
-
|
723 |
-
input.short {
|
724 |
-
width: 200px;
|
725 |
-
}
|
726 |
-
|
727 |
-
input.checkbox {
|
728 |
-
width: auto;
|
729 |
-
min-width: inherit;
|
730 |
-
vertical-align: middle;
|
731 |
-
display: inline;
|
732 |
-
float: none;
|
733 |
-
}
|
734 |
-
|
735 |
-
input.date-picker-field {
|
736 |
-
width: 50%;
|
737 |
-
min-width: inherit;
|
738 |
-
float: none;
|
739 |
-
display: inline;
|
740 |
-
}
|
741 |
-
|
742 |
-
input.minute,
|
743 |
-
input.hour {
|
744 |
-
width: 2em;
|
745 |
-
min-width: inherit;
|
746 |
-
float: none;
|
747 |
-
display: inline;
|
748 |
-
}
|
749 |
-
}
|
750 |
-
|
751 |
-
td.attribute_name {
|
752 |
-
width: 200px;
|
753 |
-
}
|
754 |
-
|
755 |
-
.plus,
|
756 |
-
.minus {
|
757 |
-
margin-top: 6px;
|
758 |
-
}
|
759 |
-
|
760 |
-
.fl {
|
761 |
-
float: left;
|
762 |
-
}
|
763 |
-
|
764 |
-
.fr {
|
765 |
-
float: right;
|
766 |
-
}
|
767 |
-
}
|
768 |
-
|
769 |
-
&:first-child {
|
770 |
-
|
771 |
-
/* main file */
|
772 |
-
h3 {
|
773 |
-
background-color: #FAFAFA;
|
774 |
-
border-bottom: 1px solid #dcdcde;
|
775 |
-
}
|
776 |
-
}
|
777 |
-
}
|
778 |
-
|
779 |
-
.plus:before {
|
780 |
-
.iconbefore("\f132");
|
781 |
-
}
|
782 |
-
|
783 |
-
.minus:before {
|
784 |
-
.iconbefore("\f460");
|
785 |
-
}
|
786 |
-
|
787 |
-
.dlm_upload_file:before {
|
788 |
-
.iconbefore("\f317");
|
789 |
-
}
|
790 |
-
|
791 |
-
.dlm_media_library:before {
|
792 |
-
.iconbefore("\f104");
|
793 |
-
}
|
794 |
-
|
795 |
-
.dlm_browse_for_file {
|
796 |
-
float: right;
|
797 |
-
&:before {
|
798 |
-
.iconbefore("\f322");
|
799 |
-
}
|
800 |
-
}
|
801 |
-
}
|
802 |
-
}
|
803 |
-
|
804 |
-
/* Writepanel forms */
|
805 |
-
#download-monitor-information {
|
806 |
-
.dlm_information_panel {
|
807 |
-
div {
|
808 |
-
p {
|
809 |
-
overflow: hidden;
|
810 |
-
width: 100%;
|
811 |
-
font-weight: bold;
|
812 |
-
box-sizing: border-box;
|
813 |
-
line-height: 28px;
|
814 |
-
margin-bottom: 5px;
|
815 |
-
}
|
816 |
-
}
|
817 |
-
|
818 |
-
input {
|
819 |
-
margin: 0;
|
820 |
-
border-top-right-radius: 0;
|
821 |
-
border-bottom-right-radius: 0;
|
822 |
-
flex-grow: 1;
|
823 |
-
width: calc(100% - 45px);
|
824 |
-
}
|
825 |
-
}
|
826 |
-
}
|
827 |
-
#download-monitor-product-information {
|
828 |
-
.dlm_information_panel {
|
829 |
-
div {
|
830 |
-
p {
|
831 |
-
overflow: hidden;
|
832 |
-
width: 100%;
|
833 |
-
font-weight: bold;
|
834 |
-
box-sizing: border-box;
|
835 |
-
line-height: 28px;
|
836 |
-
margin-bottom: 5px;
|
837 |
-
}
|
838 |
-
}
|
839 |
-
|
840 |
-
input {
|
841 |
-
margin: 0;
|
842 |
-
border-top-right-radius: 0;
|
843 |
-
border-bottom-right-radius: 0;
|
844 |
-
flex-grow: 1;
|
845 |
-
width: calc(100% - 45px);
|
846 |
-
}
|
847 |
-
}
|
848 |
-
}
|
849 |
-
|
850 |
-
#download-monitor-options {
|
851 |
-
.inside {
|
852 |
-
padding: 0;
|
853 |
-
margin: 0;
|
854 |
-
}
|
855 |
-
|
856 |
-
.form-field-checkbox {
|
857 |
-
label {
|
858 |
-
display: inline;
|
859 |
-
padding: 0 0 4px;
|
860 |
-
}
|
861 |
-
|
862 |
-
input {
|
863 |
-
display: inline-block;
|
864 |
-
width: auto;
|
865 |
-
vertical-align: middle;
|
866 |
-
}
|
867 |
-
|
868 |
-
.dlm-description {
|
869 |
-
padding: 4px 0 0 0;
|
870 |
-
display: block;
|
871 |
-
}
|
872 |
-
}
|
873 |
-
|
874 |
-
.access_permissions {
|
875 |
-
margin: 0 !important;
|
876 |
-
border-top: 1px solid white;
|
877 |
-
border-bottom: 1px solid #DFDFDF;
|
878 |
-
padding: 7px 12px !important;
|
879 |
-
overflow: hidden;
|
880 |
-
zoom: 1;
|
881 |
-
|
882 |
-
h4 {
|
883 |
-
margin-bottom: .5em;
|
884 |
-
margin: 0 0 .5em;
|
885 |
-
}
|
886 |
-
|
887 |
-
ul {
|
888 |
-
background: #fff;
|
889 |
-
border: 1px solid #dfdfdf;
|
890 |
-
height: 110px;
|
891 |
-
overflow: auto;
|
892 |
-
padding: .5em .9em;
|
893 |
-
margin: 0;
|
894 |
-
}
|
895 |
-
}
|
896 |
-
|
897 |
-
p {
|
898 |
-
margin: 0 !important;
|
899 |
-
border-top: 1px solid white;
|
900 |
-
border-bottom: 1px solid #DFDFDF;
|
901 |
-
padding: 7px 12px !important;
|
902 |
-
overflow: hidden;
|
903 |
-
zoom: 1;
|
904 |
-
|
905 |
-
&.not-active {
|
906 |
-
opacity: 0.7;
|
907 |
-
}
|
908 |
-
}
|
909 |
-
|
910 |
-
.options_upsell_link {
|
911 |
-
color: unset;
|
912 |
-
text-decoration: none;
|
913 |
-
}
|
914 |
-
|
915 |
-
.dlm-upsell-badge {
|
916 |
-
font-size: 10px;
|
917 |
-
background: #f4daa4;
|
918 |
-
padding: 2px 5px;
|
919 |
-
display: inline-block;
|
920 |
-
margin-left: 5px;
|
921 |
-
border-radius: 10px;
|
922 |
-
}
|
923 |
-
}
|
924 |
-
|
925 |
-
#insert-download {
|
926 |
-
padding: 20px 20px;
|
927 |
-
|
928 |
-
#insert-shortcode,
|
929 |
-
#drag-drop-area {
|
930 |
-
margin: 1em 0;
|
931 |
-
}
|
932 |
-
|
933 |
-
.updated,
|
934 |
-
.error {
|
935 |
-
margin-left: 0;
|
936 |
-
margin-right: 0;
|
937 |
-
}
|
938 |
-
|
939 |
-
h2 {
|
940 |
-
margin-top: 0;
|
941 |
-
}
|
942 |
-
|
943 |
-
label {
|
944 |
-
margin: 0 0 .25em 0;
|
945 |
-
display: block;
|
946 |
-
font-size: 1.1em;
|
947 |
-
}
|
948 |
-
|
949 |
-
span.description {
|
950 |
-
display: block;
|
951 |
-
}
|
952 |
-
|
953 |
-
input.input {
|
954 |
-
margin: 0 0 .25em 0;
|
955 |
-
display: block;
|
956 |
-
width: 100%;
|
957 |
-
font-size: 1.1em;
|
958 |
-
}
|
959 |
-
|
960 |
-
.add_link {
|
961 |
-
float: right;
|
962 |
-
}
|
963 |
-
|
964 |
-
ul.page-numbers {
|
965 |
-
overflow: hidden;
|
966 |
-
zoom: 1;
|
967 |
-
margin: 0 auto;
|
968 |
-
padding: 0;
|
969 |
-
text-align: center;
|
970 |
-
|
971 |
-
li {
|
972 |
-
display: inline-block;
|
973 |
-
margin: 0;
|
974 |
-
list-style: none outside;
|
975 |
-
line-height: 1em;
|
976 |
-
|
977 |
-
a,
|
978 |
-
span {
|
979 |
-
text-decoration: none;
|
980 |
-
border: 1px solid #ddd;
|
981 |
-
-webkit-border-radius: 4px;
|
982 |
-
border-radius: 4px;
|
983 |
-
padding: 8px;
|
984 |
-
display: block;
|
985 |
-
}
|
986 |
-
|
987 |
-
span {
|
988 |
-
border-color: #eee;
|
989 |
-
}
|
990 |
-
}
|
991 |
-
}
|
992 |
-
|
993 |
-
legend {
|
994 |
-
font-weight: bold;
|
995 |
-
display: block;
|
996 |
-
margin: 0 0 1em;
|
997 |
-
}
|
998 |
-
|
999 |
-
fieldset {
|
1000 |
-
label {
|
1001 |
-
display: block;
|
1002 |
-
margin: 0 0 .5em;
|
1003 |
-
}
|
1004 |
-
}
|
1005 |
-
}
|
1006 |
-
|
1007 |
-
/* Settings */
|
1008 |
-
.dlm-code-nginx-rules {
|
1009 |
-
display: block;
|
1010 |
-
}
|
1011 |
-
|
1012 |
-
.settings_panel {
|
1013 |
-
.form-table {
|
1014 |
-
td {
|
1015 |
-
padding-left: 0;
|
1016 |
-
}
|
1017 |
-
}
|
1018 |
-
|
1019 |
-
.dlm-lazy-select-loader {
|
1020 |
-
display: inline-block;
|
1021 |
-
vertical-align: middle;
|
1022 |
-
padding: 0 0 0 3px;
|
1023 |
-
|
1024 |
-
img {
|
1025 |
-
display: inline-block;
|
1026 |
-
height: 25px;
|
1027 |
-
width: 25px;
|
1028 |
-
margin-top: 1px;
|
1029 |
-
}
|
1030 |
-
}
|
1031 |
-
}
|
1032 |
-
|
1033 |
-
/* Reports */
|
1034 |
-
.dlm-reports {
|
1035 |
-
|
1036 |
-
h1 {
|
1037 |
-
.dlm-reports-actions {
|
1038 |
-
float: right;
|
1039 |
-
|
1040 |
-
a.dlm-reports-header-chart-switcher,
|
1041 |
-
.dlm-reports-header-date-selector,
|
1042 |
-
.dlm-reports-header-period {
|
1043 |
-
margin: 0 5px;
|
1044 |
-
float: left;
|
1045 |
-
}
|
1046 |
-
|
1047 |
-
&> :last-child {
|
1048 |
-
margin-right: 0;
|
1049 |
-
}
|
1050 |
-
|
1051 |
-
.dlm-reports-header-date-selector {
|
1052 |
-
|
1053 |
-
position: relative;
|
1054 |
-
font-size: 14px;
|
1055 |
-
padding: 0 .5em 0 1em;
|
1056 |
-
background: #fff;
|
1057 |
-
border: 1px solid #cccccc;
|
1058 |
-
border-radius: 3px;
|
1059 |
-
|
1060 |
-
user-select: none;
|
1061 |
-
|
1062 |
-
cursor: pointer;
|
1063 |
-
|
1064 |
-
.dlm-arrow {
|
1065 |
-
&:before {
|
1066 |
-
font-family: "dashicons" !important;
|
1067 |
-
content: "\f140";
|
1068 |
-
font-style: normal;
|
1069 |
-
font-weight: normal;
|
1070 |
-
speak: none;
|
1071 |
-
display: inline-block;
|
1072 |
-
text-decoration: inherit;
|
1073 |
-
width: 1em;
|
1074 |
-
text-align: center;
|
1075 |
-
font-variant: normal;
|
1076 |
-
text-transform: none;
|
1077 |
-
line-height: 1em;
|
1078 |
-
font-size: 1.6em;
|
1079 |
-
vertical-align: middle;
|
1080 |
-
margin-top: -2px;
|
1081 |
-
}
|
1082 |
-
}
|
1083 |
-
|
1084 |
-
.dlm_rdrs_overlay {
|
1085 |
-
display: block;
|
1086 |
-
width: 466px;
|
1087 |
-
//height: 198px;
|
1088 |
-
padding: 10px;
|
1089 |
-
background: #fff;
|
1090 |
-
border: 1px solid #cccccc;
|
1091 |
-
position: absolute;
|
1092 |
-
top: 30px;
|
1093 |
-
right: 0;
|
1094 |
-
z-index: 10;
|
1095 |
-
overflow: hidden;
|
1096 |
-
|
1097 |
-
.dlm_rdrs_date {
|
1098 |
-
font-size: 70%;
|
1099 |
-
margin-right: 5px;
|
1100 |
-
float: left;
|
1101 |
-
z-index: 11;
|
1102 |
-
|
1103 |
-
.ui-datepicker-inline {
|
1104 |
-
border: 0;
|
1105 |
-
|
1106 |
-
.ui-state-highlight {
|
1107 |
-
background: #e6e6e6 url(../images/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;
|
1108 |
-
color: #555555;
|
1109 |
-
border: 1px solid #D3D3D3;
|
1110 |
-
}
|
1111 |
-
|
1112 |
-
.ui-state-active {
|
1113 |
-
border: 1px solid #aaaaaa;
|
1114 |
-
background: #ffffff url(../images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;
|
1115 |
-
}
|
1116 |
-
|
1117 |
-
td,
|
1118 |
-
th {
|
1119 |
-
padding: 0;
|
1120 |
-
margin: 0;
|
1121 |
-
line-height: 2em;
|
1122 |
-
|
1123 |
-
a {
|
1124 |
-
text-align: center !important;
|
1125 |
-
}
|
1126 |
-
|
1127 |
-
}
|
1128 |
-
}
|
1129 |
-
}
|
1130 |
-
|
1131 |
-
.dlm_rdrs_actions {
|
1132 |
-
width: 70px;
|
1133 |
-
padding-left: 10px;
|
1134 |
-
text-align: center;
|
1135 |
-
float: left;
|
1136 |
-
}
|
1137 |
-
}
|
1138 |
-
|
1139 |
-
}
|
1140 |
-
|
1141 |
-
a.dlm-reports-header-chart-switcher {
|
1142 |
-
display: block;
|
1143 |
-
margin-top: 1px;
|
1144 |
-
padding-top: 4px;
|
1145 |
-
color: #23282d;
|
1146 |
-
//border: 1px solid #23282d;
|
1147 |
-
text-decoration: none;
|
1148 |
-
|
1149 |
-
&:before {
|
1150 |
-
font-family: "dashicons" !important;
|
1151 |
-
font-style: normal;
|
1152 |
-
font-weight: normal;
|
1153 |
-
speak: none;
|
1154 |
-
display: inline-block;
|
1155 |
-
text-decoration: inherit;
|
1156 |
-
width: 1em;
|
1157 |
-
text-align: center;
|
1158 |
-
font-variant: normal;
|
1159 |
-
text-transform: none;
|
1160 |
-
line-height: 1em;
|
1161 |
-
font-size: 1.4em;
|
1162 |
-
}
|
1163 |
-
|
1164 |
-
&.dlm-line:before {
|
1165 |
-
content: "\f238";
|
1166 |
-
}
|
1167 |
-
|
1168 |
-
&.dlm-bar:before {
|
1169 |
-
content: "\f185";
|
1170 |
-
}
|
1171 |
-
}
|
1172 |
-
|
1173 |
-
.dlm-reports-header-period {
|
1174 |
-
a {
|
1175 |
-
border-color: #cccccc !important;
|
1176 |
-
}
|
1177 |
-
|
1178 |
-
a:first-child {
|
1179 |
-
border-bottom-right-radius: 0;
|
1180 |
-
border-top-right-radius: 0;
|
1181 |
-
border-right: 0;
|
1182 |
-
}
|
1183 |
-
|
1184 |
-
a:last-child {
|
1185 |
-
border-bottom-left-radius: 0;
|
1186 |
-
border-top-left-radius: 0;
|
1187 |
-
border-left: 0;
|
1188 |
-
}
|
1189 |
-
}
|
1190 |
-
|
1191 |
-
}
|
1192 |
-
}
|
1193 |
-
|
1194 |
-
.dlm_reports_loader {
|
1195 |
-
position: absolute;
|
1196 |
-
width: 32px;
|
1197 |
-
height: 32px;
|
1198 |
-
top: 50%;
|
1199 |
-
left: 50%;
|
1200 |
-
margin: -16px 0 0 -16px;
|
1201 |
-
}
|
1202 |
-
|
1203 |
-
.dlm-reports-block-chart {
|
1204 |
-
width: 100%;
|
1205 |
-
height: 300px;
|
1206 |
-
margin-top: 20px;
|
1207 |
-
background: #fff;
|
1208 |
-
border: 1px solid #e5e5e5;
|
1209 |
-
overflow: hidden;
|
1210 |
-
|
1211 |
-
.chart-container {
|
1212 |
-
h6 {
|
1213 |
-
display: none;
|
1214 |
-
}
|
1215 |
-
}
|
1216 |
-
}
|
1217 |
-
|
1218 |
-
.dlm-reports-block-summary {
|
1219 |
-
#popular {
|
1220 |
-
span {
|
1221 |
-
line-height: 1em;
|
1222 |
-
}
|
1223 |
-
}
|
1224 |
-
}
|
1225 |
-
|
1226 |
-
.dlm-reports-block {
|
1227 |
-
position: relative;
|
1228 |
-
box-sizing: border-box;
|
1229 |
-
width: 100%;
|
1230 |
-
//height: 300px;
|
1231 |
-
padding: 20px 10px;
|
1232 |
-
margin-top: 20px;
|
1233 |
-
background: #fff;
|
1234 |
-
border: 1px solid #e5e5e5;
|
1235 |
-
overflow: hidden;
|
1236 |
-
float: left;
|
1237 |
-
|
1238 |
-
&.dlm-reports-block-half {
|
1239 |
-
width: 49%;
|
1240 |
-
margin-right: 1%;
|
1241 |
-
}
|
1242 |
-
|
1243 |
-
&.dlm-reports-block-half-right {
|
1244 |
-
width: 49%;
|
1245 |
-
margin-left: 1%;
|
1246 |
-
}
|
1247 |
-
|
1248 |
-
.dlm-reports-placeholder-no-data {
|
1249 |
-
display: inline-block;
|
1250 |
-
width: 100%;
|
1251 |
-
font-size: 1.5em;
|
1252 |
-
color: #b4b9be;
|
1253 |
-
font-style: italic;
|
1254 |
-
text-align: center;
|
1255 |
-
}
|
1256 |
-
|
1257 |
-
ul {
|
1258 |
-
box-sizing: border-box;
|
1259 |
-
width: 100%;
|
1260 |
-
padding: 0;
|
1261 |
-
margin: 0;
|
1262 |
-
|
1263 |
-
li {
|
1264 |
-
display: inline-block;
|
1265 |
-
width: 33%;
|
1266 |
-
padding: 5px 0;
|
1267 |
-
|
1268 |
-
label,
|
1269 |
-
span {
|
1270 |
-
display: block;
|
1271 |
-
width: 100%;
|
1272 |
-
text-align: center;
|
1273 |
-
}
|
1274 |
-
|
1275 |
-
span {
|
1276 |
-
font-size: 2.5em;
|
1277 |
-
font-weight: bold;
|
1278 |
-
padding: .5em 0 0;
|
1279 |
-
}
|
1280 |
-
}
|
1281 |
-
}
|
1282 |
-
|
1283 |
-
table {
|
1284 |
-
width: 100%;
|
1285 |
-
|
1286 |
-
th,
|
1287 |
-
td {
|
1288 |
-
text-align: center;
|
1289 |
-
padding: 10px 0;
|
1290 |
-
border-bottom: 1px solid #e5e5e5;
|
1291 |
-
|
1292 |
-
&:first-child {
|
1293 |
-
text-align: left;
|
1294 |
-
}
|
1295 |
-
}
|
1296 |
-
|
1297 |
-
th {
|
1298 |
-
padding-bottom: 20px;
|
1299 |
-
}
|
1300 |
-
}
|
1301 |
-
}
|
1302 |
-
|
1303 |
-
}
|
1304 |
-
|
1305 |
-
.dlm-reports-block-summary {
|
1306 |
-
background: #333 !important;
|
1307 |
-
color: white;
|
1308 |
-
}
|
1309 |
-
|
1310 |
-
/** Products overview page */
|
1311 |
-
.post-type-dlm_product {
|
1312 |
-
table.wp-list-table {
|
1313 |
-
.column-title {
|
1314 |
-
width: 65% !important;
|
1315 |
-
}
|
1316 |
-
}
|
1317 |
-
}
|
1318 |
-
|
1319 |
-
/** Products detail page */
|
1320 |
-
.dlm_mb_shop_product_information {
|
1321 |
-
.dlm_shop_field_row {
|
1322 |
-
width: 100%;
|
1323 |
-
overflow: hidden;
|
1324 |
-
|
1325 |
-
label.dlm_shop_field_label {
|
1326 |
-
display: inline-block;
|
1327 |
-
width: 20%;
|
1328 |
-
height: 100%;
|
1329 |
-
line-height: 2.2em;
|
1330 |
-
float: left;
|
1331 |
-
}
|
1332 |
-
|
1333 |
-
span.dlm_shop_field_input {
|
1334 |
-
display: inline-block;
|
1335 |
-
width: 50%;
|
1336 |
-
float: left;
|
1337 |
-
|
1338 |
-
.dlm_shop_input {
|
1339 |
-
width: 100%;
|
1340 |
-
padding: 5px 7px;
|
1341 |
-
}
|
1342 |
-
|
1343 |
-
.select2-selection--multiple {
|
1344 |
-
border: 1px solid #dddddd;
|
1345 |
-
}
|
1346 |
-
|
1347 |
-
.select2-search,
|
1348 |
-
.select2-selection__choice {
|
1349 |
-
margin-bottom: 0;
|
1350 |
-
}
|
1351 |
-
|
1352 |
-
.select2-search__field {
|
1353 |
-
padding-top: 3px;
|
1354 |
-
}
|
1355 |
-
}
|
1356 |
-
}
|
1357 |
-
}
|
1358 |
-
|
1359 |
-
/** Orders Overview */
|
1360 |
-
.dlm-order-overview {
|
1361 |
-
|
1362 |
-
#dlm_empty_trash {
|
1363 |
-
margin-left: 3px;
|
1364 |
-
}
|
1365 |
-
|
1366 |
-
.wp-list-table {
|
1367 |
-
td {
|
1368 |
-
.column-id {
|
1369 |
-
width: 25%;
|
1370 |
-
}
|
1371 |
-
}
|
1372 |
-
}
|
1373 |
-
|
1374 |
-
}
|
1375 |
-
|
1376 |
-
/** Order details */
|
1377 |
-
.dlm-order-details {
|
1378 |
-
|
1379 |
-
max-width: 1250px;
|
1380 |
-
margin-left: auto;
|
1381 |
-
margin-right: auto;
|
1382 |
-
padding-right: 20px;
|
1383 |
-
|
1384 |
-
h1 {
|
1385 |
-
padding-bottom: 25px;
|
1386 |
-
}
|
1387 |
-
|
1388 |
-
.dlm-order-details-main,
|
1389 |
-
.dlm-order-details-side {
|
1390 |
-
width: 100%;
|
1391 |
-
float: left;
|
1392 |
-
}
|
1393 |
-
|
1394 |
-
.dlm-order-details-block {
|
1395 |
-
padding: 0;
|
1396 |
-
margin-bottom: 20px;
|
1397 |
-
line-height: 1;
|
1398 |
-
border: 1px solid #e5e5e5;
|
1399 |
-
background: #fff;
|
1400 |
-
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
|
1401 |
-
|
1402 |
-
h2.dlm-order-details-block-title {
|
1403 |
-
font-size: 14px;
|
1404 |
-
padding: 8px 12px;
|
1405 |
-
margin: 0;
|
1406 |
-
line-height: 1.4;
|
1407 |
-
border-bottom: 1px solid #eee;
|
1408 |
-
}
|
1409 |
-
|
1410 |
-
.dlm-order-details-block-inside {
|
1411 |
-
margin: 6px 0 0 0;
|
1412 |
-
padding: 6px 12px 12px;
|
1413 |
-
line-height: 1.4em;
|
1414 |
-
font-size: 13px;
|
1415 |
-
|
1416 |
-
label {
|
1417 |
-
display: block;
|
1418 |
-
font-weight: bold;
|
1419 |
-
padding-bottom: 6px;
|
1420 |
-
}
|
1421 |
-
|
1422 |
-
p {
|
1423 |
-
padding: 0;
|
1424 |
-
margin: 0;
|
1425 |
-
}
|
1426 |
-
|
1427 |
-
ul {
|
1428 |
-
|
1429 |
-
&,
|
1430 |
-
li {
|
1431 |
-
list-style: none;
|
1432 |
-
padding: 0;
|
1433 |
-
margin: 0;
|
1434 |
-
}
|
1435 |
-
|
1436 |
-
li {
|
1437 |
-
padding: 6px 0;
|
1438 |
-
}
|
1439 |
-
}
|
1440 |
-
|
1441 |
-
.dlm-order-details-current-state {
|
1442 |
-
width: 70%;
|
1443 |
-
height: 30px;
|
1444 |
-
}
|
1445 |
-
|
1446 |
-
}
|
1447 |
-
|
1448 |
-
&.dlm-order-details-customer {
|
1449 |
-
.dlm-order-details-customer-image {
|
1450 |
-
float: right;
|
1451 |
-
}
|
1452 |
-
|
1453 |
-
ul {
|
1454 |
-
li {
|
1455 |
-
margin-bottom: 4px;
|
1456 |
-
padding: 0;
|
1457 |
-
|
1458 |
-
&:first-child {
|
1459 |
-
font-weight: bold;
|
1460 |
-
}
|
1461 |
-
}
|
1462 |
-
}
|
1463 |
-
}
|
1464 |
-
|
1465 |
-
&.dlm-order-details-order-items {
|
1466 |
-
|
1467 |
-
overflow: hidden;
|
1468 |
-
|
1469 |
-
.dlm-order-details-overview {
|
1470 |
-
width: 25%;
|
1471 |
-
float: right;
|
1472 |
-
|
1473 |
-
th,
|
1474 |
-
td {
|
1475 |
-
padding-top: 1.5em;
|
1476 |
-
padding-bottom: 1.5em;
|
1477 |
-
text-align: right;
|
1478 |
-
}
|
1479 |
-
|
1480 |
-
th {
|
1481 |
-
width: 50%;
|
1482 |
-
font-weight: normal;
|
1483 |
-
}
|
1484 |
-
|
1485 |
-
td {
|
1486 |
-
padding-right: 1em;
|
1487 |
-
font-weight: bold;
|
1488 |
-
}
|
1489 |
-
}
|
1490 |
-
}
|
1491 |
-
|
1492 |
-
table.dlm-order-details-data-table {
|
1493 |
-
width: 100%;
|
1494 |
-
|
1495 |
-
th,
|
1496 |
-
td {
|
1497 |
-
text-align: center;
|
1498 |
-
|
1499 |
-
&:first-child {
|
1500 |
-
text-align: left;
|
1501 |
-
padding-left: .5em;
|
1502 |
-
}
|
1503 |
-
}
|
1504 |
-
|
1505 |
-
th {
|
1506 |
-
padding-top: .5em;
|
1507 |
-
padding-bottom: .5em;
|
1508 |
-
border-bottom: 2px solid #c3c1bc;
|
1509 |
-
}
|
1510 |
-
|
1511 |
-
td {
|
1512 |
-
padding-top: 1.5em;
|
1513 |
-
padding-bottom: 1.5em;
|
1514 |
-
border-bottom: 1px solid #c3c1bc;
|
1515 |
-
}
|
1516 |
-
|
1517 |
-
th,
|
1518 |
-
td {
|
1519 |
-
&.dlm-order-details-order-items-item-total {
|
1520 |
-
text-align: right;
|
1521 |
-
padding-right: 1em;
|
1522 |
-
}
|
1523 |
-
|
1524 |
-
&.dlm-order-transaction-processor-id {
|
1525 |
-
display: none;
|
1526 |
-
}
|
1527 |
-
}
|
1528 |
-
|
1529 |
-
}
|
1530 |
-
|
1531 |
-
.dlm-order-details-update-successful {
|
1532 |
-
font-size: 2em;
|
1533 |
-
padding: 0.2em .3em;
|
1534 |
-
color: #46b450;
|
1535 |
-
}
|
1536 |
-
|
1537 |
-
}
|
1538 |
-
|
1539 |
-
}
|
1540 |
-
|
1541 |
-
@media (min-width: 768px) {
|
1542 |
-
.dlm-order-details {
|
1543 |
-
|
1544 |
-
.dlm-order-details-main {
|
1545 |
-
width: 62%;
|
1546 |
-
float: left;
|
1547 |
-
}
|
1548 |
-
|
1549 |
-
.dlm-order-details-side {
|
1550 |
-
width: 35%;
|
1551 |
-
float: right;
|
1552 |
-
}
|
1553 |
-
|
1554 |
-
.dlm-order-details-block {
|
1555 |
-
table.dlm-order-details-data-table {
|
1556 |
-
|
1557 |
-
th,
|
1558 |
-
td {
|
1559 |
-
|
1560 |
-
&.dlm-order-transaction-processor-id {
|
1561 |
-
display: table-cell;
|
1562 |
-
}
|
1563 |
-
}
|
1564 |
-
}
|
1565 |
-
}
|
1566 |
-
|
1567 |
-
}
|
1568 |
-
}
|
1569 |
-
|
1570 |
-
/** Onboarding */
|
1571 |
-
.dlm-onboarding {
|
1572 |
-
|
1573 |
-
.dlm-onboarding-section {
|
1574 |
-
|
1575 |
-
&.dlm-onboarding-section-one-col {
|
1576 |
-
margin: 0 auto;
|
1577 |
-
max-width: 800px;
|
1578 |
-
}
|
1579 |
-
|
1580 |
-
&.dlm-onboarding-section-cta {
|
1581 |
-
margin-top: 40px;
|
1582 |
-
text-align: center;
|
1583 |
-
}
|
1584 |
-
|
1585 |
-
&.dlm-onboarding-section-three-col {
|
1586 |
-
//margin-top: 40px;
|
1587 |
-
max-width: 680px;
|
1588 |
-
margin: 40px auto 0;
|
1589 |
-
//max-width: 1020px;
|
1590 |
-
overflow: hidden;
|
1591 |
-
display: flex;
|
1592 |
-
justify-content: space-between;
|
1593 |
-
flex-wrap: wrap;
|
1594 |
-
|
1595 |
-
.dlm-onboarding-col {
|
1596 |
-
padding-top: 2.5em;
|
1597 |
-
flex: 1;
|
1598 |
-
align-self: flex-start;
|
1599 |
-
min-width: 100%;
|
1600 |
-
max-width: 100%;
|
1601 |
-
|
1602 |
-
img {
|
1603 |
-
width: 100%;
|
1604 |
-
}
|
1605 |
-
}
|
1606 |
-
}
|
1607 |
-
|
1608 |
-
h2 {
|
1609 |
-
margin: 60px 0 .6em;
|
1610 |
-
font-size: 2.7em;
|
1611 |
-
line-height: 1.3;
|
1612 |
-
font-weight: 300;
|
1613 |
-
text-align: center;
|
1614 |
-
}
|
1615 |
-
|
1616 |
-
p {
|
1617 |
-
max-width: 55em;
|
1618 |
-
margin: 0.6em auto 0 auto;
|
1619 |
-
}
|
1620 |
-
|
1621 |
-
a.button-hero {
|
1622 |
-
height: 46px;
|
1623 |
-
font-size: 14px;
|
1624 |
-
line-height: 44px;
|
1625 |
-
padding: 0 36px;
|
1626 |
-
font-weight: bold;
|
1627 |
-
text-align: center;
|
1628 |
-
}
|
1629 |
-
|
1630 |
-
}
|
1631 |
-
|
1632 |
-
.dlm-onboarding-pages {
|
1633 |
-
max-width: 55em;
|
1634 |
-
margin: 0 auto;
|
1635 |
-
padding: 2em 0 0;
|
1636 |
-
|
1637 |
-
a.button-hero {
|
1638 |
-
width: 170px;
|
1639 |
-
|
1640 |
-
&.dlm-page-exists {
|
1641 |
-
background: #46b450;
|
1642 |
-
border-color: #46b450 #4a8442 #467a3f;
|
1643 |
-
box-shadow: 0 2px 0 #467a3f;
|
1644 |
-
text-shadow: 0 -1px 1px #4a8442, 1px 0 1px #4a8442, 0 1px 1px #4a8442, -1px 0 1px #4a8442;
|
1645 |
-
|
1646 |
-
&:active {
|
1647 |
-
box-shadow: 0 2px 0 #467a3f;
|
1648 |
-
}
|
1649 |
-
}
|
1650 |
-
}
|
1651 |
-
|
1652 |
-
th,
|
1653 |
-
td {
|
1654 |
-
padding: 1em 0;
|
1655 |
-
border-bottom: 1px solid #ccc;
|
1656 |
-
}
|
1657 |
-
|
1658 |
-
th {
|
1659 |
-
width: 13%;
|
1660 |
-
min-width: 6em;
|
1661 |
-
text-align: left;
|
1662 |
-
}
|
1663 |
-
|
1664 |
-
td {
|
1665 |
-
padding-right: .5em;
|
1666 |
-
padding-left: .5em;
|
1667 |
-
}
|
1668 |
-
|
1669 |
-
td.dlm-onboarding-pages-page-title {
|
1670 |
-
font-weight: bold;
|
1671 |
-
}
|
1672 |
-
}
|
1673 |
-
|
1674 |
-
}
|
1675 |
-
|
1676 |
-
@media (min-width: 768px) {
|
1677 |
-
.dlm-onboarding {
|
1678 |
-
|
1679 |
-
.dlm-onboarding-section {
|
1680 |
-
.dlm-onboarding-pages {
|
1681 |
-
width: 55em;
|
1682 |
-
}
|
1683 |
-
|
1684 |
-
&.dlm-onboarding-section-three-col {
|
1685 |
-
.dlm-onboarding-col {
|
1686 |
-
padding-top: 0;
|
1687 |
-
min-width: 31%;
|
1688 |
-
max-width: 31%;
|
1689 |
-
}
|
1690 |
-
}
|
1691 |
-
}
|
1692 |
-
}
|
1693 |
-
}
|
1694 |
-
|
1695 |
-
/* Extensions */
|
1696 |
-
.dlm_extensions_wrap {
|
1697 |
-
|
1698 |
-
a.dlm-reload-button {
|
1699 |
-
float: right;
|
1700 |
-
position: relative;
|
1701 |
-
top: -40px;
|
1702 |
-
}
|
1703 |
-
#available-extensions{
|
1704 |
-
clear:both;
|
1705 |
-
}
|
1706 |
-
|
1707 |
-
.dlm_extensions {
|
1708 |
-
padding: 15px 0;
|
1709 |
-
overflow: hidden;
|
1710 |
-
|
1711 |
-
.dlm_extension {
|
1712 |
-
|
1713 |
-
background-color: #FFF;
|
1714 |
-
width: calc( 20% - 15px);
|
1715 |
-
margin: 0 15px 15px 0;
|
1716 |
-
display: inline-block;
|
1717 |
-
vertical-align: top;
|
1718 |
-
|
1719 |
-
p {
|
1720 |
-
margin: 0;
|
1721 |
-
}
|
1722 |
-
|
1723 |
-
a {
|
1724 |
-
color: #444;
|
1725 |
-
text-decoration: none;
|
1726 |
-
}
|
1727 |
-
|
1728 |
-
.dlm_extension_img_wrapper {
|
1729 |
-
width: 100%;
|
1730 |
-
background: #419CCB;
|
1731 |
-
text-align: center;
|
1732 |
-
|
1733 |
-
img {
|
1734 |
-
max-width: 100%;
|
1735 |
-
margin: 0 auto;
|
1736 |
-
}
|
1737 |
-
}
|
1738 |
-
|
1739 |
-
h3 {
|
1740 |
-
padding: 0 20px;
|
1741 |
-
|
1742 |
-
}
|
1743 |
-
|
1744 |
-
div.extension-desc {
|
1745 |
-
min-height: 120px;
|
1746 |
-
padding: 0 20px;
|
1747 |
-
}
|
1748 |
-
|
1749 |
-
.product_footer {
|
1750 |
-
padding: 15px 15px 15px 0;
|
1751 |
-
text-align: right;
|
1752 |
-
background-color: #FAFAFA;
|
1753 |
-
border-top: 1px solid #dcdcde;
|
1754 |
-
|
1755 |
-
.loop_price {
|
1756 |
-
font-weight: bold;
|
1757 |
-
|
1758 |
-
&.sale {
|
1759 |
-
color: #008000;
|
1760 |
-
|
1761 |
-
strike {
|
1762 |
-
color: #444;
|
1763 |
-
}
|
1764 |
-
}
|
1765 |
-
}
|
1766 |
-
|
1767 |
-
.button {
|
1768 |
-
.dashicons {
|
1769 |
-
vertical-align: middle;
|
1770 |
-
font-size: 16px;
|
1771 |
-
}
|
1772 |
-
}
|
1773 |
-
}
|
1774 |
-
|
1775 |
-
.extension_license {
|
1776 |
-
// padding: 0 10% 10%;
|
1777 |
-
padding: 0 20px 20px;
|
1778 |
-
-webkit-box-sizing: border-box;
|
1779 |
-
-moz-box-sizing: border-box;
|
1780 |
-
box-sizing: border-box;
|
1781 |
-
|
1782 |
-
div.dlm_license_error {
|
1783 |
-
padding: .5em;
|
1784 |
-
margin-bottom: 15px;
|
1785 |
-
background: lightYellow;
|
1786 |
-
|
1787 |
-
a {
|
1788 |
-
color: blue;
|
1789 |
-
text-decoration: underline;
|
1790 |
-
}
|
1791 |
-
}
|
1792 |
-
|
1793 |
-
p.license-status {
|
1794 |
-
padding: 5px 0;
|
1795 |
-
margin: 5px 0;
|
1796 |
-
background: red;
|
1797 |
-
font-weight: bold;
|
1798 |
-
font-size: 1.2em;
|
1799 |
-
color: #fff;
|
1800 |
-
text-align: center;
|
1801 |
-
}
|
1802 |
-
|
1803 |
-
p.license-status.active {
|
1804 |
-
background: #008000;
|
1805 |
-
}
|
1806 |
-
|
1807 |
-
input {
|
1808 |
-
width: 100%;
|
1809 |
-
margin: 7px 0;
|
1810 |
-
padding: 7px;
|
1811 |
-
}
|
1812 |
-
|
1813 |
-
a.button-primary {
|
1814 |
-
width: 100%;
|
1815 |
-
margin: 5px auto 0;
|
1816 |
-
color: #fff;
|
1817 |
-
text-align: center;
|
1818 |
-
}
|
1819 |
-
}
|
1820 |
-
}
|
1821 |
-
}
|
1822 |
-
|
1823 |
-
}
|
1824 |
-
|
1825 |
-
/* Fix Datepicker's UI bug */
|
1826 |
-
#ui-datepicker-div {
|
1827 |
-
display: none;
|
1828 |
-
}
|
1829 |
-
|
1830 |
-
/* Upsells */
|
1831 |
-
.wpchill-upsell {
|
1832 |
-
background: #fff;
|
1833 |
-
border: 0;
|
1834 |
-
padding: 15px;
|
1835 |
-
margin-top: 30px;
|
1836 |
-
|
1837 |
-
.wpchill-upsell-features {
|
1838 |
-
text-align: left;
|
1839 |
-
display: flex;
|
1840 |
-
flex-wrap: wrap;
|
1841 |
-
padding: 20px 0;
|
1842 |
-
|
1843 |
-
li {
|
1844 |
-
width: 33%;
|
1845 |
-
}
|
1846 |
-
}
|
1847 |
-
a:first-child{
|
1848 |
-
margin-right: 10px;
|
1849 |
-
}
|
1850 |
-
}
|
1851 |
-
|
1852 |
-
.wpchill-upsells-wrapper {
|
1853 |
-
width: 100%;
|
1854 |
-
}
|
1855 |
-
|
1856 |
-
.wrap.dlm-admin-settings {
|
1857 |
-
.form-table {
|
1858 |
-
width: 65%;
|
1859 |
-
float: left;
|
1860 |
-
|
1861 |
-
&+.wpchill-upsells-wrapper {
|
1862 |
-
width: 30%;
|
1863 |
-
float: right;
|
1864 |
-
}
|
1865 |
-
|
1866 |
-
.dlm_htaccess_notice{
|
1867 |
-
margin-bottom:5px;
|
1868 |
-
}
|
1869 |
-
}
|
1870 |
-
|
1871 |
-
.dlm-upsell-badge {
|
1872 |
-
font-size: 10px;
|
1873 |
-
background: #f4daa4;
|
1874 |
-
padding: 2px 5px;
|
1875 |
-
display: inline-block;
|
1876 |
-
margin-left: 10px;
|
1877 |
-
border-radius: 10px;
|
1878 |
-
}
|
1879 |
-
#setting-dlm_downloads_path {
|
1880 |
-
& + p {
|
1881 |
-
strong {
|
1882 |
-
color:red;
|
1883 |
-
}
|
1884 |
-
}
|
1885 |
-
}
|
1886 |
-
}
|
1887 |
-
|
1888 |
-
#total_downloads_browser_table {
|
1889 |
-
a.nav-tab {
|
1890 |
-
text-transform: capitalize;
|
1891 |
-
}
|
1892 |
-
}
|
1893 |
-
|
1894 |
-
#dlm-download-page-upsell,
|
1895 |
-
#dlm-amazon-s3-upsell,
|
1896 |
-
#dlm-google-drive-upsell,
|
1897 |
-
#dlm-buttons-upsell {
|
1898 |
-
.inside {
|
1899 |
-
display: flex;
|
1900 |
-
flex-wrap: wrap;
|
1901 |
-
background: #f1f1f1;
|
1902 |
-
|
1903 |
-
.wpchill-upsell {
|
1904 |
-
background: transparent;
|
1905 |
-
text-align: center;
|
1906 |
-
width: 100%;
|
1907 |
-
margin-top: 0;
|
1908 |
-
}
|
1909 |
-
}
|
1910 |
-
|
1911 |
-
.inside {
|
1912 |
-
margin: 0;
|
1913 |
-
padding: 0;
|
1914 |
-
}
|
1915 |
-
|
1916 |
-
}
|
1917 |
-
|
1918 |
-
.upsells-columns {
|
1919 |
-
display: flex;
|
1920 |
-
flex-wrap: wrap;
|
1921 |
-
align-items: center;
|
1922 |
-
align-content: center;
|
1923 |
-
|
1924 |
-
.upsells-columns-2 {
|
1925 |
-
width: 50%;
|
1926 |
-
text-align: center;
|
1927 |
-
display: flex;
|
1928 |
-
align-items: center;
|
1929 |
-
align-content: center;
|
1930 |
-
}
|
1931 |
-
|
1932 |
-
.upsells-column {
|
1933 |
-
width: 100%;
|
1934 |
-
text-align: center;
|
1935 |
-
display: flex;
|
1936 |
-
align-items: center;
|
1937 |
-
align-content: center;
|
1938 |
-
|
1939 |
-
>* {
|
1940 |
-
display: inline-block;
|
1941 |
-
align-content: center;
|
1942 |
-
vertical-align: middle;
|
1943 |
-
margin: 0 15px;
|
1944 |
-
padding: 10px 0;
|
1945 |
-
|
1946 |
-
&.wpchill-upsell {
|
1947 |
-
position: relative;
|
1948 |
-
float: none;
|
1949 |
-
flex-grow: 1;
|
1950 |
-
display: flex;
|
1951 |
-
align-items: center;
|
1952 |
-
|
1953 |
-
.wpchill-upsell-description {
|
1954 |
-
margin: 0 auto;
|
1955 |
-
}
|
1956 |
-
}
|
1957 |
-
}
|
1958 |
-
|
1959 |
-
h3 {
|
1960 |
-
line-height: 1.3em;
|
1961 |
-
}
|
1962 |
-
|
1963 |
-
&:last-child {
|
1964 |
-
border-top: 1px solid #c3c4c7;
|
1965 |
-
border-bottom: 1px solid #c3c4c7;
|
1966 |
-
}
|
1967 |
-
|
1968 |
-
}
|
1969 |
-
|
1970 |
-
.wpchill-upsell {
|
1971 |
-
margin-top: 0;
|
1972 |
-
}
|
1973 |
-
}
|
1974 |
-
|
1975 |
-
.dlm_download_page_dlm-extensions {
|
1976 |
-
.theme.dlm_extension {
|
1977 |
-
background-color: #FFF;
|
1978 |
-
}
|
1979 |
-
}
|
1980 |
-
|
1981 |
-
/* Lite vs PRO Section */
|
1982 |
-
|
1983 |
-
body.rsvp_page_rsvp-upgrade-to-pro #wpcontent .wrap {
|
1984 |
-
margin-left: 0;
|
1985 |
-
max-width: 85%;
|
1986 |
-
}
|
1987 |
-
|
1988 |
-
.rsvp-lite-vs-premium {
|
1989 |
-
|
1990 |
-
&,
|
1991 |
-
p {
|
1992 |
-
font-size: 14px;
|
1993 |
-
margin: 0;
|
1994 |
-
}
|
1995 |
-
|
1996 |
-
&>.wpchill-plans-table.wpchill-highlight {
|
1997 |
-
&>.wpchill-pricing-package {
|
1998 |
-
background: #fefff0;
|
1999 |
-
box-shadow: 0 0 15px rgb(208 219 219);
|
2000 |
-
}
|
2001 |
-
}
|
2002 |
-
|
2003 |
-
.wp-badge {
|
2004 |
-
display: inline-block;
|
2005 |
-
vertical-align: middle;
|
2006 |
-
position: relative;
|
2007 |
-
margin-right: 2.5%;
|
2008 |
-
}
|
2009 |
-
|
2010 |
-
h3 {
|
2011 |
-
display: block;
|
2012 |
-
position: relative;
|
2013 |
-
font-size: 16px;
|
2014 |
-
margin: 0;
|
2015 |
-
}
|
2016 |
-
|
2017 |
-
.wpchill-plans-table {
|
2018 |
-
display: flex;
|
2019 |
-
|
2020 |
-
&.table-header {
|
2021 |
-
margin-top: 50px;
|
2022 |
-
border-top: 0;
|
2023 |
-
|
2024 |
-
.wpchill-pricing-package {
|
2025 |
-
border: 0;
|
2026 |
-
|
2027 |
-
&:not(.wpchill-modula-lite):last-child:before,
|
2028 |
-
&.wpchill-title.wpchill-highlight::before {
|
2029 |
-
content: '';
|
2030 |
-
width: auto;
|
2031 |
-
display: inline-block;
|
2032 |
-
opacity: 1;
|
2033 |
-
position: absolute;
|
2034 |
-
top: -1px;
|
2035 |
-
background: #41495b;
|
2036 |
-
text-align: center;
|
2037 |
-
left: 0;
|
2038 |
-
right: 0;
|
2039 |
-
color: #fff;
|
2040 |
-
font-size: 15px;
|
2041 |
-
text-transform: uppercase;
|
2042 |
-
padding: 10px 5px;
|
2043 |
-
transform: translateY(-100%);
|
2044 |
-
}
|
2045 |
-
}
|
2046 |
-
}
|
2047 |
-
}
|
2048 |
-
|
2049 |
-
&.table-footer {
|
2050 |
-
.wpchill-pricing-package:last-child {
|
2051 |
-
border: 0;
|
2052 |
-
}
|
2053 |
-
}
|
2054 |
-
|
2055 |
-
.wpchill-pricing-package {
|
2056 |
-
text-align: center;
|
2057 |
-
line-height: 1.5;
|
2058 |
-
padding: 10px 15px;
|
2059 |
-
display: flex;
|
2060 |
-
align-content: center;
|
2061 |
-
align-items: center;
|
2062 |
-
justify-content: center;
|
2063 |
-
background: #fff;
|
2064 |
-
border-top: 1px solid #ccc;
|
2065 |
-
width: 32%;
|
2066 |
-
|
2067 |
-
&:not(:first-child) {
|
2068 |
-
max-width: 300px;
|
2069 |
-
}
|
2070 |
-
|
2071 |
-
&.wpchill-title {
|
2072 |
-
font-weight: 400;
|
2073 |
-
color: #666;
|
2074 |
-
font-size: 1.25rem;
|
2075 |
-
height: auto;
|
2076 |
-
-ms-flex-direction: column;
|
2077 |
-
flex-direction: column;
|
2078 |
-
padding-top: 30px;
|
2079 |
-
padding-bottom: 30px;
|
2080 |
-
justify-content: space-between;
|
2081 |
-
position: relative;
|
2082 |
-
|
2083 |
-
.wpchill-name {
|
2084 |
-
margin: 0;
|
2085 |
-
font-size: 36px;
|
2086 |
-
}
|
2087 |
-
|
2088 |
-
&.wpchill-modula-lite {
|
2089 |
-
justify-content: center;
|
2090 |
-
}
|
2091 |
-
|
2092 |
-
p.description {
|
2093 |
-
font-style: italic;
|
2094 |
-
font-size: 13px;
|
2095 |
-
margin-bottom: 40px;
|
2096 |
-
}
|
2097 |
-
|
2098 |
-
.wpchill-price {
|
2099 |
-
|
2100 |
-
p {
|
2101 |
-
&:last-child {
|
2102 |
-
font-size: 30px;
|
2103 |
-
margin: 0 0 40px 0;
|
2104 |
-
}
|
2105 |
-
|
2106 |
-
&.old-price {
|
2107 |
-
margin: 0;
|
2108 |
-
position: relative;
|
2109 |
-
|
2110 |
-
&:after {
|
2111 |
-
content: "";
|
2112 |
-
height: 2px;
|
2113 |
-
width: 60px;
|
2114 |
-
background: red;
|
2115 |
-
display: block;
|
2116 |
-
position: absolute;
|
2117 |
-
left: 50%;
|
2118 |
-
top: 52%;
|
2119 |
-
transform: translate(-50%, -50%);
|
2120 |
-
}
|
2121 |
-
}
|
2122 |
-
}
|
2123 |
-
|
2124 |
-
sup {
|
2125 |
-
top: 2px;
|
2126 |
-
position: relative;
|
2127 |
-
font-size: 15px;
|
2128 |
-
}
|
2129 |
-
}
|
2130 |
-
}
|
2131 |
-
|
2132 |
-
&.wpchill-empty {
|
2133 |
-
background: transparent;
|
2134 |
-
border-color: transparent;
|
2135 |
-
}
|
2136 |
-
|
2137 |
-
&.feature-name {
|
2138 |
-
justify-content: space-between;
|
2139 |
-
font-weight: 400;
|
2140 |
-
text-align: left;
|
2141 |
-
font-size: 13px;
|
2142 |
-
display: block;
|
2143 |
-
background: transparent;
|
2144 |
-
}
|
2145 |
-
|
2146 |
-
.dashicons-saved {
|
2147 |
-
color: green;
|
2148 |
-
}
|
2149 |
-
|
2150 |
-
.dashicons {
|
2151 |
-
width: 30px;
|
2152 |
-
height: 30px;
|
2153 |
-
font-size: 30px;
|
2154 |
-
}
|
2155 |
-
|
2156 |
-
.dashicons-no-alt {
|
2157 |
-
color: #ff3439;
|
2158 |
-
}
|
2159 |
-
|
2160 |
-
&:last-child {
|
2161 |
-
background: #fefff0;
|
2162 |
-
}
|
2163 |
-
}
|
2164 |
-
|
2165 |
-
.button {
|
2166 |
-
.dashicons {
|
2167 |
-
font-size: 16px;
|
2168 |
-
vertical-align: middle;
|
2169 |
-
line-height: 26px;
|
2170 |
-
}
|
2171 |
-
}
|
2172 |
-
}
|
2173 |
-
|
2174 |
-
/**
|
2175 |
-
* Tooltips
|
2176 |
-
*/
|
2177 |
-
|
2178 |
-
.wpchill-tooltip {
|
2179 |
-
position: relative;
|
2180 |
-
display: inline-block;
|
2181 |
-
float: left;
|
2182 |
-
margin-right: 10px;
|
2183 |
-
|
2184 |
-
& > span {
|
2185 |
-
cursor: pointer;
|
2186 |
-
color: #0073aa;
|
2187 |
-
text-decoration: underline;
|
2188 |
-
margin-left: 5px;
|
2189 |
-
}
|
2190 |
-
|
2191 |
-
.wpchill-tooltip-content {
|
2192 |
-
display: none;
|
2193 |
-
position: absolute;
|
2194 |
-
top: 50%;
|
2195 |
-
right: -10px;
|
2196 |
-
transform: translate( 100% ,-50% );
|
2197 |
-
width: 300px;
|
2198 |
-
background: #000;
|
2199 |
-
color: #fff;
|
2200 |
-
padding: 10px;
|
2201 |
-
box-sizing: border-box;
|
2202 |
-
z-index: 99;
|
2203 |
-
}
|
2204 |
-
|
2205 |
-
&:hover .wpchill-tooltip-content {
|
2206 |
-
display: block;
|
2207 |
-
}
|
2208 |
-
|
2209 |
-
.wpchill-tooltip-content{
|
2210 |
-
&:before {
|
2211 |
-
content: '';
|
2212 |
-
width: 0px;
|
2213 |
-
height: 0px;
|
2214 |
-
border-style: solid;
|
2215 |
-
border-width: 8px 8px 8px 0;
|
2216 |
-
border-color: transparent #000 transparent transparent;
|
2217 |
-
display: block;
|
2218 |
-
position: absolute;
|
2219 |
-
top: 50%;
|
2220 |
-
left: -8px;
|
2221 |
-
transform: translateY( -50% );
|
2222 |
-
}
|
2223 |
-
}
|
2224 |
-
}
|
2225 |
-
|
2226 |
-
.wpchill-tooltip-button {
|
2227 |
-
|
2228 |
-
position: relative;
|
2229 |
-
|
2230 |
-
.wpchill-tooltip-content {
|
2231 |
-
display: none;
|
2232 |
-
position: absolute;
|
2233 |
-
top: 50%;
|
2234 |
-
right: 25px;
|
2235 |
-
transform: translate(50%, -135%);
|
2236 |
-
width: auto;
|
2237 |
-
background: rgba(0, 0, 0, 0.8);
|
2238 |
-
color: #fff;
|
2239 |
-
padding: 10px 15px;
|
2240 |
-
box-sizing: border-box;
|
2241 |
-
font-size: 14px;
|
2242 |
-
z-index: 99;
|
2243 |
-
}
|
2244 |
-
|
2245 |
-
&:hover .wpchill-tooltip-content {
|
2246 |
-
display: block;
|
2247 |
-
}
|
2248 |
-
|
2249 |
-
.wpchill-tooltip-content{
|
2250 |
-
&:before {
|
2251 |
-
content: '';
|
2252 |
-
width: 0px;
|
2253 |
-
height: 0px;
|
2254 |
-
border-style: solid;
|
2255 |
-
border-width: 8px 8px 8px 0;
|
2256 |
-
border-color: transparent #000 transparent transparent;
|
2257 |
-
display: block;
|
2258 |
-
position: absolute;
|
2259 |
-
bottom: -12px;
|
2260 |
-
left: 50%;
|
2261 |
-
transform: rotate(-90deg);
|
2262 |
-
}
|
2263 |
-
}
|
2264 |
-
}
|
2265 |
-
|
2266 |
-
.dlm-file-link{
|
2267 |
-
display:block;
|
2268 |
-
margin-top:3px;
|
2269 |
-
}
|
2270 |
-
|
2271 |
-
.dlm-listing-no-file{
|
2272 |
-
code {
|
2273 |
-
color: #b32d2e;
|
2274 |
-
}
|
2275 |
}
|
1 |
+
.iconbefore(@glyph: "\f333") {
|
2 |
+
font-family: dashicons !important;
|
3 |
+
speak: none;
|
4 |
+
font-weight: normal;
|
5 |
+
font-variant: normal;
|
6 |
+
text-transform: none;
|
7 |
+
-webkit-font-smoothing: antialiased;
|
8 |
+
-moz-osx-font-smoothing: grayscale;
|
9 |
+
margin: 0 4px 0 0;
|
10 |
+
content: @glyph;
|
11 |
+
top: 1px;
|
12 |
+
left: -1px;
|
13 |
+
font-size: 1em;
|
14 |
+
line-height: inherit;
|
15 |
+
position: relative;
|
16 |
+
vertical-align: top;
|
17 |
+
}
|
18 |
+
|
19 |
+
/* Logs */
|
20 |
+
.post-type-dlm_download {
|
21 |
+
h1 {
|
22 |
+
a.dlm-delete-logs {
|
23 |
+
color: #a00;
|
24 |
+
|
25 |
+
&:hover {
|
26 |
+
color: #fff;
|
27 |
+
background: #a00;
|
28 |
+
border-color: #7C0900;
|
29 |
+
}
|
30 |
+
}
|
31 |
+
}
|
32 |
+
|
33 |
+
.dlm-page-header {
|
34 |
+
border-bottom: 1px solid #ccc;
|
35 |
+
padding: 15px 20px;
|
36 |
+
display: flex;
|
37 |
+
justify-content: space-between;
|
38 |
+
background: #fff;
|
39 |
+
width: calc(100% + 20px);
|
40 |
+
box-sizing: border-box;
|
41 |
+
margin-left: -20px;
|
42 |
+
|
43 |
+
.dlm-header-links {
|
44 |
+
margin-left: -20px;
|
45 |
+
|
46 |
+
a {
|
47 |
+
span {
|
48 |
+
vertical-align: middle;
|
49 |
+
position: relative;
|
50 |
+
top: -2px;
|
51 |
+
padding-right: 10px;
|
52 |
+
}
|
53 |
+
}
|
54 |
+
}
|
55 |
+
|
56 |
+
.dlm-header-logo img {
|
57 |
+
max-height: 35px;
|
58 |
+
}
|
59 |
+
}
|
60 |
+
|
61 |
+
td.column-shortcode {
|
62 |
+
.hidden {
|
63 |
+
display:none;
|
64 |
+
}
|
65 |
+
}
|
66 |
+
}
|
67 |
+
|
68 |
+
#dlm_logs {
|
69 |
+
td {
|
70 |
+
padding: 7px 7px;
|
71 |
+
vertical-align: middle;
|
72 |
+
}
|
73 |
+
|
74 |
+
.check-column {
|
75 |
+
width: 1%;
|
76 |
+
padding: 0;
|
77 |
+
vertical-align: middle;
|
78 |
+
}
|
79 |
+
|
80 |
+
.column-status {
|
81 |
+
width: 2%;
|
82 |
+
}
|
83 |
+
|
84 |
+
td.column-status {
|
85 |
+
font-size: 10px;
|
86 |
+
vertical-align: middle;
|
87 |
+
text-align: center;
|
88 |
+
|
89 |
+
span {
|
90 |
+
color: #fff;
|
91 |
+
font-weight: normal;
|
92 |
+
-moz-border-radius: 50%;
|
93 |
+
-webkit-border-radius: 50%;
|
94 |
+
border-radius: 50%;
|
95 |
+
height: 18px;
|
96 |
+
line-height: 18px;
|
97 |
+
width: 18px;
|
98 |
+
display: inline-block;
|
99 |
+
background: url('../images/log-status-icons.png') top left no-repeat;
|
100 |
+
}
|
101 |
+
|
102 |
+
.completed {
|
103 |
+
background-color: #6cc644;
|
104 |
+
}
|
105 |
+
|
106 |
+
.failed {
|
107 |
+
background-color: #bd2c00;
|
108 |
+
background-position-y: -18px;
|
109 |
+
}
|
110 |
+
|
111 |
+
.redirected {
|
112 |
+
background-color: #1c769b;
|
113 |
+
background-position-y: -36px;
|
114 |
+
}
|
115 |
+
}
|
116 |
+
|
117 |
+
td.column-user_ip,
|
118 |
+
td.column-user_agent {
|
119 |
+
font-family: monospace;
|
120 |
+
font-weight: normal;
|
121 |
+
}
|
122 |
+
|
123 |
+
span.dlm-description {
|
124 |
+
font-weight: normal;
|
125 |
+
}
|
126 |
+
|
127 |
+
.column-download,
|
128 |
+
.column-file,
|
129 |
+
.column-user,
|
130 |
+
.column-user_ua {
|
131 |
+
width: 16% !important;
|
132 |
+
}
|
133 |
+
|
134 |
+
.column-user_ip,
|
135 |
+
.column-date {
|
136 |
+
width: 6% !important;
|
137 |
+
}
|
138 |
+
}
|
139 |
+
|
140 |
+
.post-type-dlm_download {
|
141 |
+
.inline-edit-row {
|
142 |
+
.inline-edit-col-dlm {
|
143 |
+
.inline-edit-col-dlm-inner {
|
144 |
+
margin-top: 10px;
|
145 |
+
}
|
146 |
+
}
|
147 |
+
}
|
148 |
+
}
|
149 |
+
|
150 |
+
/** Settings */
|
151 |
+
.dlm-settings-sub-nav {
|
152 |
+
margin: 0 0 10px 0;
|
153 |
+
width: 100%;
|
154 |
+
border-bottom: 1px solid #ccc;
|
155 |
+
box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
|
156 |
+
|
157 |
+
li {
|
158 |
+
margin-right: 10px;
|
159 |
+
margin-bottom: -2px;
|
160 |
+
}
|
161 |
+
|
162 |
+
a {
|
163 |
+
padding: 13px;
|
164 |
+
display: block;
|
165 |
+
}
|
166 |
+
|
167 |
+
.active-section {
|
168 |
+
margin-bottom: -2px;
|
169 |
+
|
170 |
+
a {
|
171 |
+
border-bottom: 4px solid #000;
|
172 |
+
padding-bottom: 9px;
|
173 |
+
margin-bottom: -2px;
|
174 |
+
font-weight: 600;
|
175 |
+
}
|
176 |
+
}
|
177 |
+
}
|
178 |
+
|
179 |
+
.admin-color-blue {
|
180 |
+
.dlm-settings-sub-nav {
|
181 |
+
.active-section {
|
182 |
+
a {
|
183 |
+
border-bottom-color: #096484;
|
184 |
+
}
|
185 |
+
}
|
186 |
+
}
|
187 |
+
}
|
188 |
+
|
189 |
+
.admin-color-coffee {
|
190 |
+
.dlm-settings-sub-nav {
|
191 |
+
.active-section {
|
192 |
+
a {
|
193 |
+
border-bottom-color: #c7a589;
|
194 |
+
}
|
195 |
+
}
|
196 |
+
}
|
197 |
+
}
|
198 |
+
|
199 |
+
.admin-color-ectoplasm {
|
200 |
+
.dlm-settings-sub-nav {
|
201 |
+
.active-section {
|
202 |
+
a {
|
203 |
+
border-bottom-color: #a3b745;
|
204 |
+
}
|
205 |
+
}
|
206 |
+
}
|
207 |
+
}
|
208 |
+
|
209 |
+
.admin-color-midnight {
|
210 |
+
.dlm-settings-sub-nav {
|
211 |
+
.active-section {
|
212 |
+
a {
|
213 |
+
border-bottom-color: #e14d43;
|
214 |
+
}
|
215 |
+
}
|
216 |
+
}
|
217 |
+
}
|
218 |
+
|
219 |
+
.admin-color-ocean {
|
220 |
+
.dlm-settings-sub-nav {
|
221 |
+
.active-section {
|
222 |
+
a {
|
223 |
+
border-bottom-color: #627c83;
|
224 |
+
}
|
225 |
+
}
|
226 |
+
}
|
227 |
+
}
|
228 |
+
|
229 |
+
.admin-color-sunrise {
|
230 |
+
.dlm-settings-sub-nav {
|
231 |
+
.active-section {
|
232 |
+
a {
|
233 |
+
border-bottom-color: #be3631;
|
234 |
+
}
|
235 |
+
}
|
236 |
+
}
|
237 |
+
}
|
238 |
+
|
239 |
+
.admin-color-light {
|
240 |
+
.dlm-settings-sub-nav {
|
241 |
+
.active-section {
|
242 |
+
a {
|
243 |
+
border-bottom-color: #888;
|
244 |
+
}
|
245 |
+
}
|
246 |
+
}
|
247 |
+
}
|
248 |
+
|
249 |
+
.admin-color-evergreen {
|
250 |
+
.dlm-settings-sub-nav {
|
251 |
+
.active-section {
|
252 |
+
a {
|
253 |
+
border-bottom-color: #36533f;
|
254 |
+
}
|
255 |
+
}
|
256 |
+
}
|
257 |
+
}
|
258 |
+
|
259 |
+
.admin-color-mint {
|
260 |
+
.dlm-settings-sub-nav {
|
261 |
+
.active-section {
|
262 |
+
a {
|
263 |
+
border-bottom-color: #4f6d59;
|
264 |
+
}
|
265 |
+
}
|
266 |
+
}
|
267 |
+
}
|
268 |
+
|
269 |
+
.admin-color-modern {
|
270 |
+
.dlm-settings-sub-nav {
|
271 |
+
.active-section {
|
272 |
+
a {
|
273 |
+
border-bottom-color: #3858e9;
|
274 |
+
}
|
275 |
+
}
|
276 |
+
}
|
277 |
+
}
|
278 |
+
|
279 |
+
.dlm-admin-settings {
|
280 |
+
|
281 |
+
#setting-dlm_decimal_separator,
|
282 |
+
#setting-dlm_thousand_separator {
|
283 |
+
width: 50px;
|
284 |
+
}
|
285 |
+
|
286 |
+
table {
|
287 |
+
td {
|
288 |
+
padding: 15px 0;
|
289 |
+
}
|
290 |
+
}
|
291 |
+
|
292 |
+
h3 {
|
293 |
+
margin: 2em 0 0;
|
294 |
+
}
|
295 |
+
}
|
296 |
+
|
297 |
+
/* File lists */
|
298 |
+
ul.download_monitor_file_browser {
|
299 |
+
list-style: none outside;
|
300 |
+
margin: 0;
|
301 |
+
border: 1px solid #ddd;
|
302 |
+
-moz-border-radius: 3px;
|
303 |
+
-webkit-border-radius: 3px;
|
304 |
+
border-radius: 3px;
|
305 |
+
background: #f9f9f9;
|
306 |
+
padding: 5px 5px;
|
307 |
+
-moz-box-shadow: inset 0 0 0 1px #fff;
|
308 |
+
-webkit-box-shadow: inset 0 0 0 1px #fff;
|
309 |
+
box-shadow: inset 0 0 0 1px #fff;
|
310 |
+
|
311 |
+
li {
|
312 |
+
padding: 0;
|
313 |
+
margin: 0;
|
314 |
+
|
315 |
+
a {
|
316 |
+
color: #21759B;
|
317 |
+
display: block;
|
318 |
+
padding: 4px 0 4px 4px;
|
319 |
+
text-decoration: none;
|
320 |
+
|
321 |
+
&:hover {
|
322 |
+
background-color: #eaf2fa;
|
323 |
+
}
|
324 |
+
|
325 |
+
&:before {
|
326 |
+
.iconbefore("\f123");
|
327 |
+
}
|
328 |
+
|
329 |
+
&.folder:before {
|
330 |
+
.iconbefore("\f318");
|
331 |
+
}
|
332 |
+
|
333 |
+
// Videos
|
334 |
+
&.filetype-mov,
|
335 |
+
&.filetype-avi,
|
336 |
+
&.filetype-3g2,
|
337 |
+
&.filetype-3gp,
|
338 |
+
&.filetype-asf,
|
339 |
+
&.filetype-asx,
|
340 |
+
&.filetype-mp4,
|
341 |
+
&.filetype-mpg,
|
342 |
+
&.filetype-rm,
|
343 |
+
&.filetype-srt,
|
344 |
+
&.filetype-vob,
|
345 |
+
&.filetype-wmv {
|
346 |
+
&:before {
|
347 |
+
.iconbefore("\f126");
|
348 |
+
}
|
349 |
+
}
|
350 |
+
|
351 |
+
// Audio
|
352 |
+
&.filetype-mp3,
|
353 |
+
&.filetype-aif,
|
354 |
+
&.filetype-iff,
|
355 |
+
&.filetype-m3u,
|
356 |
+
&.filetype-m4a,
|
357 |
+
&.filetype-mid,
|
358 |
+
&.filetype-midi,
|
359 |
+
&.filetype-mpa,
|
360 |
+
&.filetype-ra,
|
361 |
+
&.filetype-wav,
|
362 |
+
&.filetype-wma {
|
363 |
+
&:before {
|
364 |
+
.iconbefore("\f127");
|
365 |
+
}
|
366 |
+
}
|
367 |
+
|
368 |
+
// Images
|
369 |
+
&.filetype-psd,
|
370 |
+
&.filetype-ai,
|
371 |
+
&.filetype-eps,
|
372 |
+
&.filetype-ps,
|
373 |
+
&.filetype-svg,
|
374 |
+
&.filetype-bmp,
|
375 |
+
&.filetype-dds,
|
376 |
+
&.filetype-gif,
|
377 |
+
&.filetype-jpg,
|
378 |
+
&.filetype-jpeg,
|
379 |
+
&.filetype-png,
|
380 |
+
&.filetype-pspimage,
|
381 |
+
&.filetype-tga,
|
382 |
+
&.filetype-thm,
|
383 |
+
&.filetype-tif,
|
384 |
+
&.filetype-yuv,
|
385 |
+
&.filetype-ico {
|
386 |
+
&:before {
|
387 |
+
.iconbefore("\f128");
|
388 |
+
}
|
389 |
+
}
|
390 |
+
}
|
391 |
+
|
392 |
+
&.nofiles {
|
393 |
+
color: #999;
|
394 |
+
font-style: italic;
|
395 |
+
padding: 4px 0;
|
396 |
+
}
|
397 |
+
|
398 |
+
ul {
|
399 |
+
list-style: none outside;
|
400 |
+
margin: 0;
|
401 |
+
padding: 0 0 0 28px;
|
402 |
+
|
403 |
+
&.loading {
|
404 |
+
background: url(../images/ajax-loader.gif) no-repeat 24px 0;
|
405 |
+
height: 32px;
|
406 |
+
}
|
407 |
+
}
|
408 |
+
}
|
409 |
+
}
|
410 |
+
|
411 |
+
/* Download list */
|
412 |
+
table.wp-list-table {
|
413 |
+
.column-thumb {
|
414 |
+
width: 44px;
|
415 |
+
text-align: center;
|
416 |
+
white-space: nowrap
|
417 |
+
}
|
418 |
+
|
419 |
+
.column-dlm_download_cat,
|
420 |
+
.column-dlm_download_tag,
|
421 |
+
.column-file {
|
422 |
+
width: 11% !important;
|
423 |
+
}
|
424 |
+
|
425 |
+
.column-title,
|
426 |
+
.column-file {
|
427 |
+
width: 17% !important;
|
428 |
+
}
|
429 |
+
|
430 |
+
.column-download_id,
|
431 |
+
.column-version {
|
432 |
+
width: 5em;
|
433 |
+
}
|
434 |
+
|
435 |
+
th.column-thumb,
|
436 |
+
th.column-download_count,
|
437 |
+
th.column-locked_download,
|
438 |
+
th.column-redirect_only,
|
439 |
+
th.column-featured {
|
440 |
+
span:first-child {
|
441 |
+
float: none;
|
442 |
+
display: inline-block;
|
443 |
+
width: 1em;
|
444 |
+
height: 1em;
|
445 |
+
line-height: 1em;
|
446 |
+
padding: 2px 0 0 0;
|
447 |
+
overflow: hidden;
|
448 |
+
}
|
449 |
+
|
450 |
+
.sorting-indicator {
|
451 |
+
float: right;
|
452 |
+
}
|
453 |
+
}
|
454 |
+
|
455 |
+
th.column-thumb {
|
456 |
+
width: 52px;
|
457 |
+
text-align: center;
|
458 |
+
|
459 |
+
span:first-child {
|
460 |
+
&:before {
|
461 |
+
.iconbefore("\f128");
|
462 |
+
}
|
463 |
+
}
|
464 |
+
}
|
465 |
+
|
466 |
+
th.column-download_count {
|
467 |
+
width: 5em;
|
468 |
+
|
469 |
+
span:first-child {
|
470 |
+
&:before {
|
471 |
+
.iconbefore("\f346");
|
472 |
+
}
|
473 |
+
}
|
474 |
+
}
|
475 |
+
|
476 |
+
th.column-locked_download {
|
477 |
+
width: 3.5em;
|
478 |
+
|
479 |
+
span:first-child {
|
480 |
+
&:before {
|
481 |
+
.iconbefore("\f160");
|
482 |
+
}
|
483 |
+
}
|
484 |
+
}
|
485 |
+
|
486 |
+
th.column-redirect_only {
|
487 |
+
width: 3.5em;
|
488 |
+
|
489 |
+
span:first-child {
|
490 |
+
&:before {
|
491 |
+
.iconbefore("\f103");
|
492 |
+
}
|
493 |
+
}
|
494 |
+
}
|
495 |
+
|
496 |
+
th.column-featured {
|
497 |
+
width: 3.5em;
|
498 |
+
|
499 |
+
span:first-child {
|
500 |
+
&:before {
|
501 |
+
.iconbefore("\f155");
|
502 |
+
}
|
503 |
+
}
|
504 |
+
}
|
505 |
+
|
506 |
+
td.column-download_count,
|
507 |
+
td.column-locked_download,
|
508 |
+
td.column-redirect_only,
|
509 |
+
td.column-featured {
|
510 |
+
text-align: left;
|
511 |
+
padding-left: 11px;
|
512 |
+
|
513 |
+
span.na {
|
514 |
+
color: #999;
|
515 |
+
width: 1em;
|
516 |
+
height: 1em;
|
517 |
+
line-height: 1em;
|
518 |
+
display: inline-block;
|
519 |
+
overflow: hidden;
|
520 |
+
vertical-align: middle;
|
521 |
+
|
522 |
+
&:before {
|
523 |
+
.iconbefore("\f460");
|
524 |
+
}
|
525 |
+
}
|
526 |
+
|
527 |
+
span.yes {
|
528 |
+
width: 1em;
|
529 |
+
height: 1em;
|
530 |
+
line-height: 1em;
|
531 |
+
display: inline-block;
|
532 |
+
overflow: hidden;
|
533 |
+
vertical-align: middle;
|
534 |
+
|
535 |
+
&:before {
|
536 |
+
.iconbefore("\f147");
|
537 |
+
}
|
538 |
+
}
|
539 |
+
}
|
540 |
+
|
541 |
+
.column-thumb img {
|
542 |
+
padding: 2px;
|
543 |
+
margin: 0;
|
544 |
+
border: 1px solid #dfdfdf;
|
545 |
+
vertical-align: middle;
|
546 |
+
width: 32px;
|
547 |
+
height: 32px;
|
548 |
+
}
|
549 |
+
}
|
550 |
+
|
551 |
+
/* Meta boxes */
|
552 |
+
#download-monitor-file {
|
553 |
+
.inside {
|
554 |
+
padding: 0;
|
555 |
+
margin: 0;
|
556 |
+
}
|
557 |
+
|
558 |
+
.dlm-metaboxes-wrapper {
|
559 |
+
|
560 |
+
.expand_all,
|
561 |
+
.close_all {
|
562 |
+
float: right;
|
563 |
+
margin-left: 1em;
|
564 |
+
line-height: 22px;
|
565 |
+
text-decoration: none;
|
566 |
+
}
|
567 |
+
|
568 |
+
.expand_all {
|
569 |
+
&:before {
|
570 |
+
.iconbefore("\f168");
|
571 |
+
}
|
572 |
+
}
|
573 |
+
|
574 |
+
.close_all {
|
575 |
+
&:before {
|
576 |
+
.iconbefore("\f460");
|
577 |
+
}
|
578 |
+
}
|
579 |
+
|
580 |
+
p.toolbar {
|
581 |
+
margin: 0 !important;
|
582 |
+
border-top: 1px solid white;
|
583 |
+
border-bottom: 1px solid #DFDFDF;
|
584 |
+
padding: 7px 12px !important;
|
585 |
+
overflow: hidden;
|
586 |
+
zoom: 1;
|
587 |
+
|
588 |
+
a.button {
|
589 |
+
float: left;
|
590 |
+
margin: 0;
|
591 |
+
}
|
592 |
+
}
|
593 |
+
|
594 |
+
select.attribute_taxonomy,
|
595 |
+
button.add_attribute,
|
596 |
+
button.add_variable_attribute,
|
597 |
+
.fr {
|
598 |
+
float: right;
|
599 |
+
margin: 0 0 0 6px;
|
600 |
+
}
|
601 |
+
|
602 |
+
.dlm-metaboxes {
|
603 |
+
padding: 0 12px 0;
|
604 |
+
}
|
605 |
+
|
606 |
+
.dlm-metabox-sortable-placeholder {
|
607 |
+
border-color: #bbb;
|
608 |
+
background-color: #f5f5f5;
|
609 |
+
margin: 9px 0;
|
610 |
+
border-width: 1px;
|
611 |
+
border-style: dashed;
|
612 |
+
}
|
613 |
+
|
614 |
+
.dlm-metabox {
|
615 |
+
background: #ececec;
|
616 |
+
border: 1px solid #ececec;
|
617 |
+
margin: 9px 0 !important;
|
618 |
+
|
619 |
+
& .dlm-blury{
|
620 |
+
&:before {
|
621 |
+
content:url('../images/ajax-loader.gif');
|
622 |
+
display:block;
|
623 |
+
position: absolute;
|
624 |
+
top:50%;
|
625 |
+
transform:translateY(-50%);
|
626 |
+
width:100%;
|
627 |
+
left:0;
|
628 |
+
margin:0 auto;
|
629 |
+
color:#cecece;
|
630 |
+
text-align: center;
|
631 |
+
z-index: 11;
|
632 |
+
font-size: 16px;
|
633 |
+
// background-image:url('../images/ajax-loader.gif') center center no-repeat;
|
634 |
+
}
|
635 |
+
|
636 |
+
&:after {
|
637 |
+
content:"";
|
638 |
+
display:block;
|
639 |
+
background:rgba(0,0,0,0.5);
|
640 |
+
width:100%;
|
641 |
+
top:0;
|
642 |
+
left:0;
|
643 |
+
margin:0 auto;
|
644 |
+
height: 100%;
|
645 |
+
z-index: 10;
|
646 |
+
position: absolute;
|
647 |
+
}
|
648 |
+
}
|
649 |
+
|
650 |
+
h3 {
|
651 |
+
margin: 0 !important;
|
652 |
+
padding: 6px !important;
|
653 |
+
font-size: 1em !important;
|
654 |
+
overflow: hidden;
|
655 |
+
zoom: 1;
|
656 |
+
cursor: move;
|
657 |
+
|
658 |
+
button {
|
659 |
+
float: right;
|
660 |
+
}
|
661 |
+
|
662 |
+
strong {
|
663 |
+
line-height: 24px;
|
664 |
+
}
|
665 |
+
|
666 |
+
select {
|
667 |
+
font-family: sans-serif;
|
668 |
+
}
|
669 |
+
|
670 |
+
.handlediv {
|
671 |
+
background-position: 6px 5px !important;
|
672 |
+
display: none !important;
|
673 |
+
height: 24px;
|
674 |
+
}
|
675 |
+
}
|
676 |
+
|
677 |
+
&:hover h3 .handlediv {
|
678 |
+
display: block;
|
679 |
+
}
|
680 |
+
|
681 |
+
table {
|
682 |
+
width: 100%;
|
683 |
+
position: relative;
|
684 |
+
background: #fff;
|
685 |
+
padding: 3px;
|
686 |
+
|
687 |
+
td {
|
688 |
+
text-align: left;
|
689 |
+
padding: 6px 6px;
|
690 |
+
vertical-align: top;
|
691 |
+
border: 0;
|
692 |
+
line-height: 26px;
|
693 |
+
|
694 |
+
label {
|
695 |
+
text-align: left;
|
696 |
+
display: block;
|
697 |
+
line-height: 21px;
|
698 |
+
}
|
699 |
+
|
700 |
+
input {
|
701 |
+
float: left;
|
702 |
+
min-width: 200px;
|
703 |
+
}
|
704 |
+
|
705 |
+
input,
|
706 |
+
textarea {
|
707 |
+
width: 100%;
|
708 |
+
margin: 0;
|
709 |
+
display: block;
|
710 |
+
font-size: 14px;
|
711 |
+
padding: 4px;
|
712 |
+
color: #555;
|
713 |
+
}
|
714 |
+
|
715 |
+
textarea {
|
716 |
+
height: 7.5em;
|
717 |
+
}
|
718 |
+
|
719 |
+
select {
|
720 |
+
width: 100%;
|
721 |
+
}
|
722 |
+
|
723 |
+
input.short {
|
724 |
+
width: 200px;
|
725 |
+
}
|
726 |
+
|
727 |
+
input.checkbox {
|
728 |
+
width: auto;
|
729 |
+
min-width: inherit;
|
730 |
+
vertical-align: middle;
|
731 |
+
display: inline;
|
732 |
+
float: none;
|
733 |
+
}
|
734 |
+
|
735 |
+
input.date-picker-field {
|
736 |
+
width: 50%;
|
737 |
+
min-width: inherit;
|
738 |
+
float: none;
|
739 |
+
display: inline;
|
740 |
+
}
|
741 |
+
|
742 |
+
input.minute,
|
743 |
+
input.hour {
|
744 |
+
width: 2em;
|
745 |
+
min-width: inherit;
|
746 |
+
float: none;
|
747 |
+
display: inline;
|
748 |
+
}
|
749 |
+
}
|
750 |
+
|
751 |
+
td.attribute_name {
|
752 |
+
width: 200px;
|
753 |
+
}
|
754 |
+
|
755 |
+
.plus,
|
756 |
+
.minus {
|
757 |
+
margin-top: 6px;
|
758 |
+
}
|
759 |
+
|
760 |
+
.fl {
|
761 |
+
float: left;
|
762 |
+
}
|
763 |
+
|
764 |
+
.fr {
|
765 |
+
float: right;
|
766 |
+
}
|
767 |
+
}
|
768 |
+
|
769 |
+
&:first-child {
|
770 |
+
|
771 |
+
/* main file */
|
772 |
+
h3 {
|
773 |
+
background-color: #FAFAFA;
|
774 |
+
border-bottom: 1px solid #dcdcde;
|
775 |
+
}
|
776 |
+
}
|
777 |
+
}
|
778 |
+
|
779 |
+
.plus:before {
|
780 |
+
.iconbefore("\f132");
|
781 |
+
}
|
782 |
+
|
783 |
+
.minus:before {
|
784 |
+
.iconbefore("\f460");
|
785 |
+
}
|
786 |
+
|
787 |
+
.dlm_upload_file:before {
|
788 |
+
.iconbefore("\f317");
|
789 |
+
}
|
790 |
+
|
791 |
+
.dlm_media_library:before {
|
792 |
+
.iconbefore("\f104");
|
793 |
+
}
|
794 |
+
|
795 |
+
.dlm_browse_for_file {
|
796 |
+
float: right;
|
797 |
+
&:before {
|
798 |
+
.iconbefore("\f322");
|
799 |
+
}
|
800 |
+
}
|
801 |
+
}
|
802 |
+
}
|
803 |
+
|
804 |
+
/* Writepanel forms */
|
805 |
+
#download-monitor-information {
|
806 |
+
.dlm_information_panel {
|
807 |
+
div {
|
808 |
+
p {
|
809 |
+
overflow: hidden;
|
810 |
+
width: 100%;
|
811 |
+
font-weight: bold;
|
812 |
+
box-sizing: border-box;
|
813 |
+
line-height: 28px;
|
814 |
+
margin-bottom: 5px;
|
815 |
+
}
|
816 |
+
}
|
817 |
+
|
818 |
+
input {
|
819 |
+
margin: 0;
|
820 |
+
border-top-right-radius: 0;
|
821 |
+
border-bottom-right-radius: 0;
|
822 |
+
flex-grow: 1;
|
823 |
+
width: calc(100% - 45px);
|
824 |
+
}
|
825 |
+
}
|
826 |
+
}
|
827 |
+
#download-monitor-product-information {
|
828 |
+
.dlm_information_panel {
|
829 |
+
div {
|
830 |
+
p {
|
831 |
+
overflow: hidden;
|
832 |
+
width: 100%;
|
833 |
+
font-weight: bold;
|
834 |
+
box-sizing: border-box;
|
835 |
+
line-height: 28px;
|
836 |
+
margin-bottom: 5px;
|
837 |
+
}
|
838 |
+
}
|
839 |
+
|
840 |
+
input {
|
841 |
+
margin: 0;
|
842 |
+
border-top-right-radius: 0;
|
843 |
+
border-bottom-right-radius: 0;
|
844 |
+
flex-grow: 1;
|
845 |
+
width: calc(100% - 45px);
|
846 |
+
}
|
847 |
+
}
|
848 |
+
}
|
849 |
+
|
850 |
+
#download-monitor-options {
|
851 |
+
.inside {
|
852 |
+
padding: 0;
|
853 |
+
margin: 0;
|
854 |
+
}
|
855 |
+
|
856 |
+
.form-field-checkbox {
|
857 |
+
label {
|
858 |
+
display: inline;
|
859 |
+
padding: 0 0 4px;
|
860 |
+
}
|
861 |
+
|
862 |
+
input {
|
863 |
+
display: inline-block;
|
864 |
+
width: auto;
|
865 |
+
vertical-align: middle;
|
866 |
+
}
|
867 |
+
|
868 |
+
.dlm-description {
|
869 |
+
padding: 4px 0 0 0;
|
870 |
+
display: block;
|
871 |
+
}
|
872 |
+
}
|
873 |
+
|
874 |
+
.access_permissions {
|
875 |
+
margin: 0 !important;
|
876 |
+
border-top: 1px solid white;
|
877 |
+
border-bottom: 1px solid #DFDFDF;
|
878 |
+
padding: 7px 12px !important;
|
879 |
+
overflow: hidden;
|
880 |
+
zoom: 1;
|
881 |
+
|
882 |
+
h4 {
|
883 |
+
margin-bottom: .5em;
|
884 |
+
margin: 0 0 .5em;
|
885 |
+
}
|
886 |
+
|
887 |
+
ul {
|
888 |
+
background: #fff;
|
889 |
+
border: 1px solid #dfdfdf;
|
890 |
+
height: 110px;
|
891 |
+
overflow: auto;
|
892 |
+
padding: .5em .9em;
|
893 |
+
margin: 0;
|
894 |
+
}
|
895 |
+
}
|
896 |
+
|
897 |
+
p {
|
898 |
+
margin: 0 !important;
|
899 |
+
border-top: 1px solid white;
|
900 |
+
border-bottom: 1px solid #DFDFDF;
|
901 |
+
padding: 7px 12px !important;
|
902 |
+
overflow: hidden;
|
903 |
+
zoom: 1;
|
904 |
+
|
905 |
+
&.not-active {
|
906 |
+
opacity: 0.7;
|
907 |
+
}
|
908 |
+
}
|
909 |
+
|
910 |
+
.options_upsell_link {
|
911 |
+
color: unset;
|
912 |
+
text-decoration: none;
|
913 |
+
}
|
914 |
+
|
915 |
+
.dlm-upsell-badge {
|
916 |
+
font-size: 10px;
|
917 |
+
background: #f4daa4;
|
918 |
+
padding: 2px 5px;
|
919 |
+
display: inline-block;
|
920 |
+
margin-left: 5px;
|
921 |
+
border-radius: 10px;
|
922 |
+
}
|
923 |
+
}
|
924 |
+
|
925 |
+
#insert-download {
|
926 |
+
padding: 20px 20px;
|
927 |
+
|
928 |
+
#insert-shortcode,
|
929 |
+
#drag-drop-area {
|
930 |
+
margin: 1em 0;
|
931 |
+
}
|
932 |
+
|
933 |
+
.updated,
|
934 |
+
.error {
|
935 |
+
margin-left: 0;
|
936 |
+
margin-right: 0;
|
937 |
+
}
|
938 |
+
|
939 |
+
h2 {
|
940 |
+
margin-top: 0;
|
941 |
+
}
|
942 |
+
|
943 |
+
label {
|
944 |
+
margin: 0 0 .25em 0;
|
945 |
+
display: block;
|
946 |
+
font-size: 1.1em;
|
947 |
+
}
|
948 |
+
|
949 |
+
span.description {
|
950 |
+
display: block;
|
951 |
+
}
|
952 |
+
|
953 |
+
input.input {
|
954 |
+
margin: 0 0 .25em 0;
|
955 |
+
display: block;
|
956 |
+
width: 100%;
|
957 |
+
font-size: 1.1em;
|
958 |
+
}
|
959 |
+
|
960 |
+
.add_link {
|
961 |
+
float: right;
|
962 |
+
}
|
963 |
+
|
964 |
+
ul.page-numbers {
|
965 |
+
overflow: hidden;
|
966 |
+
zoom: 1;
|
967 |
+
margin: 0 auto;
|
968 |
+
padding: 0;
|
969 |
+
text-align: center;
|
970 |
+
|
971 |
+
li {
|
972 |
+
display: inline-block;
|
973 |
+
margin: 0;
|
974 |
+
list-style: none outside;
|
975 |
+
line-height: 1em;
|
976 |
+
|
977 |
+
a,
|
978 |
+
span {
|
979 |
+
text-decoration: none;
|
980 |
+
border: 1px solid #ddd;
|
981 |
+
-webkit-border-radius: 4px;
|
982 |
+
border-radius: 4px;
|
983 |
+
padding: 8px;
|
984 |
+
display: block;
|
985 |
+
}
|
986 |
+
|
987 |
+
span {
|
988 |
+
border-color: #eee;
|
989 |
+
}
|
990 |
+
}
|
991 |
+
}
|
992 |
+
|
993 |
+
legend {
|
994 |
+
font-weight: bold;
|
995 |
+
display: block;
|
996 |
+
margin: 0 0 1em;
|
997 |
+
}
|
998 |
+
|
999 |
+
fieldset {
|
1000 |
+
label {
|
1001 |
+
display: block;
|
1002 |
+
margin: 0 0 .5em;
|
1003 |
+
}
|
1004 |
+
}
|
1005 |
+
}
|
1006 |
+
|
1007 |
+
/* Settings */
|
1008 |
+
.dlm-code-nginx-rules {
|
1009 |
+
display: block;
|
1010 |
+
}
|
1011 |
+
|
1012 |
+
.settings_panel {
|
1013 |
+
.form-table {
|
1014 |
+
td {
|
1015 |
+
padding-left: 0;
|
1016 |
+
}
|
1017 |
+
}
|
1018 |
+
|
1019 |
+
.dlm-lazy-select-loader {
|
1020 |
+
display: inline-block;
|
1021 |
+
vertical-align: middle;
|
1022 |
+
padding: 0 0 0 3px;
|
1023 |
+
|
1024 |
+
img {
|
1025 |
+
display: inline-block;
|
1026 |
+
height: 25px;
|
1027 |
+
width: 25px;
|
1028 |
+
margin-top: 1px;
|
1029 |
+
}
|
1030 |
+
}
|
1031 |
+
}
|
1032 |
+
|
1033 |
+
/* Reports */
|
1034 |
+
.dlm-reports {
|
1035 |
+
|
1036 |
+
h1 {
|
1037 |
+
.dlm-reports-actions {
|
1038 |
+
float: right;
|
1039 |
+
|
1040 |
+
a.dlm-reports-header-chart-switcher,
|
1041 |
+
.dlm-reports-header-date-selector,
|
1042 |
+
.dlm-reports-header-period {
|
1043 |
+
margin: 0 5px;
|
1044 |
+
float: left;
|
1045 |
+
}
|
1046 |
+
|
1047 |
+
&> :last-child {
|
1048 |
+
margin-right: 0;
|
1049 |
+
}
|
1050 |
+
|
1051 |
+
.dlm-reports-header-date-selector {
|
1052 |
+
|
1053 |
+
position: relative;
|
1054 |
+
font-size: 14px;
|
1055 |
+
padding: 0 .5em 0 1em;
|
1056 |
+
background: #fff;
|
1057 |
+
border: 1px solid #cccccc;
|
1058 |
+
border-radius: 3px;
|
1059 |
+
|
1060 |
+
user-select: none;
|
1061 |
+
|
1062 |
+
cursor: pointer;
|
1063 |
+
|
1064 |
+
.dlm-arrow {
|
1065 |
+
&:before {
|
1066 |
+
font-family: "dashicons" !important;
|
1067 |
+
content: "\f140";
|
1068 |
+
font-style: normal;
|
1069 |
+
font-weight: normal;
|
1070 |
+
speak: none;
|
1071 |
+
display: inline-block;
|
1072 |
+
text-decoration: inherit;
|
1073 |
+
width: 1em;
|
1074 |
+
text-align: center;
|
1075 |
+
font-variant: normal;
|
1076 |
+
text-transform: none;
|
1077 |
+
line-height: 1em;
|
1078 |
+
font-size: 1.6em;
|
1079 |
+
vertical-align: middle;
|
1080 |
+
margin-top: -2px;
|
1081 |
+
}
|
1082 |
+
}
|
1083 |
+
|
1084 |
+
.dlm_rdrs_overlay {
|
1085 |
+
display: block;
|
1086 |
+
width: 466px;
|
1087 |
+
//height: 198px;
|
1088 |
+
padding: 10px;
|
1089 |
+
background: #fff;
|
1090 |
+
border: 1px solid #cccccc;
|
1091 |
+
position: absolute;
|
1092 |
+
top: 30px;
|
1093 |
+
right: 0;
|
1094 |
+
z-index: 10;
|
1095 |
+
overflow: hidden;
|
1096 |
+
|
1097 |
+
.dlm_rdrs_date {
|
1098 |
+
font-size: 70%;
|
1099 |
+
margin-right: 5px;
|
1100 |
+
float: left;
|
1101 |
+
z-index: 11;
|
1102 |
+
|
1103 |
+
.ui-datepicker-inline {
|
1104 |
+
border: 0;
|
1105 |
+
|
1106 |
+
.ui-state-highlight {
|
1107 |
+
background: #e6e6e6 url(../images/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;
|
1108 |
+
color: #555555;
|
1109 |
+
border: 1px solid #D3D3D3;
|
1110 |
+
}
|
1111 |
+
|
1112 |
+
.ui-state-active {
|
1113 |
+
border: 1px solid #aaaaaa;
|
1114 |
+
background: #ffffff url(../images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;
|
1115 |
+
}
|
1116 |
+
|
1117 |
+
td,
|
1118 |
+
th {
|
1119 |
+
padding: 0;
|
1120 |
+
margin: 0;
|
1121 |
+
line-height: 2em;
|
1122 |
+
|
1123 |
+
a {
|
1124 |
+
text-align: center !important;
|
1125 |
+
}
|
1126 |
+
|
1127 |
+
}
|
1128 |
+
}
|
1129 |
+
}
|
1130 |
+
|
1131 |
+
.dlm_rdrs_actions {
|
1132 |
+
width: 70px;
|
1133 |
+
padding-left: 10px;
|
1134 |
+
text-align: center;
|
1135 |
+
float: left;
|
1136 |
+
}
|
1137 |
+
}
|
1138 |
+
|
1139 |
+
}
|
1140 |
+
|
1141 |
+
a.dlm-reports-header-chart-switcher {
|
1142 |
+
display: block;
|
1143 |
+
margin-top: 1px;
|
1144 |
+
padding-top: 4px;
|
1145 |
+
color: #23282d;
|
1146 |
+
//border: 1px solid #23282d;
|
1147 |
+
text-decoration: none;
|
1148 |
+
|
1149 |
+
&:before {
|
1150 |
+
font-family: "dashicons" !important;
|
1151 |
+
font-style: normal;
|
1152 |
+
font-weight: normal;
|
1153 |
+
speak: none;
|
1154 |
+
display: inline-block;
|
1155 |
+
text-decoration: inherit;
|
1156 |
+
width: 1em;
|
1157 |
+
text-align: center;
|
1158 |
+
font-variant: normal;
|
1159 |
+
text-transform: none;
|
1160 |
+
line-height: 1em;
|
1161 |
+
font-size: 1.4em;
|
1162 |
+
}
|
1163 |
+
|
1164 |
+
&.dlm-line:before {
|
1165 |
+
content: "\f238";
|
1166 |
+
}
|
1167 |
+
|
1168 |
+
&.dlm-bar:before {
|
1169 |
+
content: "\f185";
|
1170 |
+
}
|
1171 |
+
}
|
1172 |
+
|
1173 |
+
.dlm-reports-header-period {
|
1174 |
+
a {
|
1175 |
+
border-color: #cccccc !important;
|
1176 |
+
}
|
1177 |
+
|
1178 |
+
a:first-child {
|
1179 |
+
border-bottom-right-radius: 0;
|
1180 |
+
border-top-right-radius: 0;
|
1181 |
+
border-right: 0;
|
1182 |
+
}
|
1183 |
+
|
1184 |
+
a:last-child {
|
1185 |
+
border-bottom-left-radius: 0;
|
1186 |
+
border-top-left-radius: 0;
|
1187 |
+
border-left: 0;
|
1188 |
+
}
|
1189 |
+
}
|
1190 |
+
|
1191 |
+
}
|
1192 |
+
}
|
1193 |
+
|
1194 |
+
.dlm_reports_loader {
|
1195 |
+
position: absolute;
|
1196 |
+
width: 32px;
|
1197 |
+
height: 32px;
|
1198 |
+
top: 50%;
|
1199 |
+
left: 50%;
|
1200 |
+
margin: -16px 0 0 -16px;
|
1201 |
+
}
|
1202 |
+
|
1203 |
+
.dlm-reports-block-chart {
|
1204 |
+
width: 100%;
|
1205 |
+
height: 300px;
|
1206 |
+
margin-top: 20px;
|
1207 |
+
background: #fff;
|
1208 |
+
border: 1px solid #e5e5e5;
|
1209 |
+
overflow: hidden;
|
1210 |
+
|
1211 |
+
.chart-container {
|
1212 |
+
h6 {
|
1213 |
+
display: none;
|
1214 |
+
}
|
1215 |
+
}
|
1216 |
+
}
|
1217 |
+
|
1218 |
+
.dlm-reports-block-summary {
|
1219 |
+
#popular {
|
1220 |
+
span {
|
1221 |
+
line-height: 1em;
|
1222 |
+
}
|
1223 |
+
}
|
1224 |
+
}
|
1225 |
+
|
1226 |
+
.dlm-reports-block {
|
1227 |
+
position: relative;
|
1228 |
+
box-sizing: border-box;
|
1229 |
+
width: 100%;
|
1230 |
+
//height: 300px;
|
1231 |
+
padding: 20px 10px;
|
1232 |
+
margin-top: 20px;
|
1233 |
+
background: #fff;
|
1234 |
+
border: 1px solid #e5e5e5;
|
1235 |
+
overflow: hidden;
|
1236 |
+
float: left;
|
1237 |
+
|
1238 |
+
&.dlm-reports-block-half {
|
1239 |
+
width: 49%;
|
1240 |
+
margin-right: 1%;
|
1241 |
+
}
|
1242 |
+
|
1243 |
+
&.dlm-reports-block-half-right {
|
1244 |
+
width: 49%;
|
1245 |
+
margin-left: 1%;
|
1246 |
+
}
|
1247 |
+
|
1248 |
+
.dlm-reports-placeholder-no-data {
|
1249 |
+
display: inline-block;
|
1250 |
+
width: 100%;
|
1251 |
+
font-size: 1.5em;
|
1252 |
+
color: #b4b9be;
|
1253 |
+
font-style: italic;
|
1254 |
+
text-align: center;
|
1255 |
+
}
|
1256 |
+
|
1257 |
+
ul {
|
1258 |
+
box-sizing: border-box;
|
1259 |
+
width: 100%;
|
1260 |
+
padding: 0;
|
1261 |
+
margin: 0;
|
1262 |
+
|
1263 |
+
li {
|
1264 |
+
display: inline-block;
|
1265 |
+
width: 33%;
|
1266 |
+
padding: 5px 0;
|
1267 |
+
|
1268 |
+
label,
|
1269 |
+
span {
|
1270 |
+
display: block;
|
1271 |
+
width: 100%;
|
1272 |
+
text-align: center;
|
1273 |
+
}
|
1274 |
+
|
1275 |
+
span {
|
1276 |
+
font-size: 2.5em;
|
1277 |
+
font-weight: bold;
|
1278 |
+
padding: .5em 0 0;
|
1279 |
+
}
|
1280 |
+
}
|
1281 |
+
}
|
1282 |
+
|
1283 |
+
table {
|
1284 |
+
width: 100%;
|
1285 |
+
|
1286 |
+
th,
|
1287 |
+
td {
|
1288 |
+
text-align: center;
|
1289 |
+
padding: 10px 0;
|
1290 |
+
border-bottom: 1px solid #e5e5e5;
|
1291 |
+
|
1292 |
+
&:first-child {
|
1293 |
+
text-align: left;
|
1294 |
+
}
|
1295 |
+
}
|
1296 |
+
|
1297 |
+
th {
|
1298 |
+
padding-bottom: 20px;
|
1299 |
+
}
|
1300 |
+
}
|
1301 |
+
}
|
1302 |
+
|
1303 |
+
}
|
1304 |
+
|
1305 |
+
.dlm-reports-block-summary {
|
1306 |
+
background: #333 !important;
|
1307 |
+
color: white;
|
1308 |
+
}
|
1309 |
+
|
1310 |
+
/** Products overview page */
|
1311 |
+
.post-type-dlm_product {
|
1312 |
+
table.wp-list-table {
|
1313 |
+
.column-title {
|
1314 |
+
width: 65% !important;
|
1315 |
+
}
|
1316 |
+
}
|
1317 |
+
}
|
1318 |
+
|
1319 |
+
/** Products detail page */
|
1320 |
+
.dlm_mb_shop_product_information {
|
1321 |
+
.dlm_shop_field_row {
|
1322 |
+
width: 100%;
|
1323 |
+
overflow: hidden;
|
1324 |
+
|
1325 |
+
label.dlm_shop_field_label {
|
1326 |
+
display: inline-block;
|
1327 |
+
width: 20%;
|
1328 |
+
height: 100%;
|
1329 |
+
line-height: 2.2em;
|
1330 |
+
float: left;
|
1331 |
+
}
|
1332 |
+
|
1333 |
+
span.dlm_shop_field_input {
|
1334 |
+
display: inline-block;
|
1335 |
+
width: 50%;
|
1336 |
+
float: left;
|
1337 |
+
|
1338 |
+
.dlm_shop_input {
|
1339 |
+
width: 100%;
|
1340 |
+
padding: 5px 7px;
|
1341 |
+
}
|
1342 |
+
|
1343 |
+
.select2-selection--multiple {
|
1344 |
+
border: 1px solid #dddddd;
|
1345 |
+
}
|
1346 |
+
|
1347 |
+
.select2-search,
|
1348 |
+
.select2-selection__choice {
|
1349 |
+
margin-bottom: 0;
|
1350 |
+
}
|
1351 |
+
|
1352 |
+
.select2-search__field {
|
1353 |
+
padding-top: 3px;
|
1354 |
+
}
|
1355 |
+
}
|
1356 |
+
}
|
1357 |
+
}
|
1358 |
+
|
1359 |
+
/** Orders Overview */
|
1360 |
+
.dlm-order-overview {
|
1361 |
+
|
1362 |
+
#dlm_empty_trash {
|
1363 |
+
margin-left: 3px;
|
1364 |
+
}
|
1365 |
+
|
1366 |
+
.wp-list-table {
|
1367 |
+
td {
|
1368 |
+
.column-id {
|
1369 |
+
width: 25%;
|
1370 |
+
}
|
1371 |
+
}
|
1372 |
+
}
|
1373 |
+
|
1374 |
+
}
|
1375 |
+
|
1376 |
+
/** Order details */
|
1377 |
+
.dlm-order-details {
|
1378 |
+
|
1379 |
+
max-width: 1250px;
|
1380 |
+
margin-left: auto;
|
1381 |
+
margin-right: auto;
|
1382 |
+
padding-right: 20px;
|
1383 |
+
|
1384 |
+
h1 {
|
1385 |
+
padding-bottom: 25px;
|
1386 |
+
}
|
1387 |
+
|
1388 |
+
.dlm-order-details-main,
|
1389 |
+
.dlm-order-details-side {
|
1390 |
+
width: 100%;
|
1391 |
+
float: left;
|
1392 |
+
}
|
1393 |
+
|
1394 |
+
.dlm-order-details-block {
|
1395 |
+
padding: 0;
|
1396 |
+
margin-bottom: 20px;
|
1397 |
+
line-height: 1;
|
1398 |
+
border: 1px solid #e5e5e5;
|
1399 |
+
background: #fff;
|
1400 |
+
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
|
1401 |
+
|
1402 |
+
h2.dlm-order-details-block-title {
|
1403 |
+
font-size: 14px;
|
1404 |
+
padding: 8px 12px;
|
1405 |
+
margin: 0;
|
1406 |
+
line-height: 1.4;
|
1407 |
+
border-bottom: 1px solid #eee;
|
1408 |
+
}
|
1409 |
+
|
1410 |
+
.dlm-order-details-block-inside {
|
1411 |
+
margin: 6px 0 0 0;
|
1412 |
+
padding: 6px 12px 12px;
|
1413 |
+
line-height: 1.4em;
|
1414 |
+
font-size: 13px;
|
1415 |
+
|
1416 |
+
label {
|
1417 |
+
display: block;
|
1418 |
+
font-weight: bold;
|
1419 |
+
padding-bottom: 6px;
|
1420 |
+
}
|
1421 |
+
|
1422 |
+
p {
|
1423 |
+
padding: 0;
|
1424 |
+
margin: 0;
|
1425 |
+
}
|
1426 |
+
|
1427 |
+
ul {
|
1428 |
+
|
1429 |
+
&,
|
1430 |
+
li {
|
1431 |
+
list-style: none;
|
1432 |
+
padding: 0;
|
1433 |
+
margin: 0;
|
1434 |
+
}
|
1435 |
+
|
1436 |
+
li {
|
1437 |
+
padding: 6px 0;
|
1438 |
+
}
|
1439 |
+
}
|
1440 |
+
|
1441 |
+
.dlm-order-details-current-state {
|
1442 |
+
width: 70%;
|
1443 |
+
height: 30px;
|
1444 |
+
}
|
1445 |
+
|
1446 |
+
}
|
1447 |
+
|
1448 |
+
&.dlm-order-details-customer {
|
1449 |
+
.dlm-order-details-customer-image {
|
1450 |
+
float: right;
|
1451 |
+
}
|
1452 |
+
|
1453 |
+
ul {
|
1454 |
+
li {
|
1455 |
+
margin-bottom: 4px;
|
1456 |
+
padding: 0;
|
1457 |
+
|
1458 |
+
&:first-child {
|
1459 |
+
font-weight: bold;
|
1460 |
+
}
|
1461 |
+
}
|
1462 |
+
}
|
1463 |
+
}
|
1464 |
+
|
1465 |
+
&.dlm-order-details-order-items {
|
1466 |
+
|
1467 |
+
overflow: hidden;
|
1468 |
+
|
1469 |
+
.dlm-order-details-overview {
|
1470 |
+
width: 25%;
|
1471 |
+
float: right;
|
1472 |
+
|
1473 |
+
th,
|
1474 |
+
td {
|
1475 |
+
padding-top: 1.5em;
|
1476 |
+
padding-bottom: 1.5em;
|
1477 |
+
text-align: right;
|
1478 |
+
}
|
1479 |
+
|
1480 |
+
th {
|
1481 |
+
width: 50%;
|
1482 |
+
font-weight: normal;
|
1483 |
+
}
|
1484 |
+
|
1485 |
+
td {
|
1486 |
+
padding-right: 1em;
|
1487 |
+
font-weight: bold;
|
1488 |
+
}
|
1489 |
+
}
|
1490 |
+
}
|
1491 |
+
|
1492 |
+
table.dlm-order-details-data-table {
|
1493 |
+
width: 100%;
|
1494 |
+
|
1495 |
+
th,
|
1496 |
+
td {
|
1497 |
+
text-align: center;
|
1498 |
+
|
1499 |
+
&:first-child {
|
1500 |
+
text-align: left;
|
1501 |
+
padding-left: .5em;
|
1502 |
+
}
|
1503 |
+
}
|
1504 |
+
|
1505 |
+
th {
|
1506 |
+
padding-top: .5em;
|
1507 |
+
padding-bottom: .5em;
|
1508 |
+
border-bottom: 2px solid #c3c1bc;
|
1509 |
+
}
|
1510 |
+
|
1511 |
+
td {
|
1512 |
+
padding-top: 1.5em;
|
1513 |
+
padding-bottom: 1.5em;
|
1514 |
+
border-bottom: 1px solid #c3c1bc;
|
1515 |
+
}
|
1516 |
+
|
1517 |
+
th,
|
1518 |
+
td {
|
1519 |
+
&.dlm-order-details-order-items-item-total {
|
1520 |
+
text-align: right;
|
1521 |
+
padding-right: 1em;
|
1522 |
+
}
|
1523 |
+
|
1524 |
+
&.dlm-order-transaction-processor-id {
|
1525 |
+
display: none;
|
1526 |
+
}
|
1527 |
+
}
|
1528 |
+
|
1529 |
+
}
|
1530 |
+
|
1531 |
+
.dlm-order-details-update-successful {
|
1532 |
+
font-size: 2em;
|
1533 |
+
padding: 0.2em .3em;
|
1534 |
+
color: #46b450;
|
1535 |
+
}
|
1536 |
+
|
1537 |
+
}
|
1538 |
+
|
1539 |
+
}
|
1540 |
+
|
1541 |
+
@media (min-width: 768px) {
|
1542 |
+
.dlm-order-details {
|
1543 |
+
|
1544 |
+
.dlm-order-details-main {
|
1545 |
+
width: 62%;
|
1546 |
+
float: left;
|
1547 |
+
}
|
1548 |
+
|
1549 |
+
.dlm-order-details-side {
|
1550 |
+
width: 35%;
|
1551 |
+
float: right;
|
1552 |
+
}
|
1553 |
+
|
1554 |
+
.dlm-order-details-block {
|
1555 |
+
table.dlm-order-details-data-table {
|
1556 |
+
|
1557 |
+
th,
|
1558 |
+
td {
|
1559 |
+
|
1560 |
+
&.dlm-order-transaction-processor-id {
|
1561 |
+
display: table-cell;
|
1562 |
+
}
|
1563 |
+
}
|
1564 |
+
}
|
1565 |
+
}
|
1566 |
+
|
1567 |
+
}
|
1568 |
+
}
|
1569 |
+
|
1570 |
+
/** Onboarding */
|
1571 |
+
.dlm-onboarding {
|
1572 |
+
|
1573 |
+
.dlm-onboarding-section {
|
1574 |
+
|
1575 |
+
&.dlm-onboarding-section-one-col {
|
1576 |
+
margin: 0 auto;
|
1577 |
+
max-width: 800px;
|
1578 |
+
}
|
1579 |
+
|
1580 |
+
&.dlm-onboarding-section-cta {
|
1581 |
+
margin-top: 40px;
|
1582 |
+
text-align: center;
|
1583 |
+
}
|
1584 |
+
|
1585 |
+
&.dlm-onboarding-section-three-col {
|
1586 |
+
//margin-top: 40px;
|
1587 |
+
max-width: 680px;
|
1588 |
+
margin: 40px auto 0;
|
1589 |
+
//max-width: 1020px;
|
1590 |
+
overflow: hidden;
|
1591 |
+
display: flex;
|
1592 |
+
justify-content: space-between;
|
1593 |
+
flex-wrap: wrap;
|
1594 |
+
|
1595 |
+
.dlm-onboarding-col {
|
1596 |
+
padding-top: 2.5em;
|
1597 |
+
flex: 1;
|
1598 |
+
align-self: flex-start;
|
1599 |
+
min-width: 100%;
|
1600 |
+
max-width: 100%;
|
1601 |
+
|
1602 |
+
img {
|
1603 |
+
width: 100%;
|
1604 |
+
}
|
1605 |
+
}
|
1606 |
+
}
|
1607 |
+
|
1608 |
+
h2 {
|
1609 |
+
margin: 60px 0 .6em;
|
1610 |
+
font-size: 2.7em;
|
1611 |
+
line-height: 1.3;
|
1612 |
+
font-weight: 300;
|
1613 |
+
text-align: center;
|
1614 |
+
}
|
1615 |
+
|
1616 |
+
p {
|
1617 |
+
max-width: 55em;
|
1618 |
+
margin: 0.6em auto 0 auto;
|
1619 |
+
}
|
1620 |
+
|
1621 |
+
a.button-hero {
|
1622 |
+
height: 46px;
|
1623 |
+
font-size: 14px;
|
1624 |
+
line-height: 44px;
|
1625 |
+
padding: 0 36px;
|
1626 |
+
font-weight: bold;
|
1627 |
+
text-align: center;
|
1628 |
+
}
|
1629 |
+
|
1630 |
+
}
|
1631 |
+
|
1632 |
+
.dlm-onboarding-pages {
|
1633 |
+
max-width: 55em;
|
1634 |
+
margin: 0 auto;
|
1635 |
+
padding: 2em 0 0;
|
1636 |
+
|
1637 |
+
a.button-hero {
|
1638 |
+
width: 170px;
|
1639 |
+
|
1640 |
+
&.dlm-page-exists {
|
1641 |
+
background: #46b450;
|
1642 |
+
border-color: #46b450 #4a8442 #467a3f;
|
1643 |
+
box-shadow: 0 2px 0 #467a3f;
|
1644 |
+
text-shadow: 0 -1px 1px #4a8442, 1px 0 1px #4a8442, 0 1px 1px #4a8442, -1px 0 1px #4a8442;
|
1645 |
+
|
1646 |
+
&:active {
|
1647 |
+
box-shadow: 0 2px 0 #467a3f;
|
1648 |
+
}
|
1649 |
+
}
|
1650 |
+
}
|
1651 |
+
|
1652 |
+
th,
|
1653 |
+
td {
|
1654 |
+
padding: 1em 0;
|
1655 |
+
border-bottom: 1px solid #ccc;
|
1656 |
+
}
|
1657 |
+
|
1658 |
+
th {
|
1659 |
+
width: 13%;
|
1660 |
+
min-width: 6em;
|
1661 |
+
text-align: left;
|
1662 |
+
}
|
1663 |
+
|
1664 |
+
td {
|
1665 |
+
padding-right: .5em;
|
1666 |
+
padding-left: .5em;
|
1667 |
+
}
|
1668 |
+
|
1669 |
+
td.dlm-onboarding-pages-page-title {
|
1670 |
+
font-weight: bold;
|
1671 |
+
}
|
1672 |
+
}
|
1673 |
+
|
1674 |
+
}
|
1675 |
+
|
1676 |
+
@media (min-width: 768px) {
|
1677 |
+
.dlm-onboarding {
|
1678 |
+
|
1679 |
+
.dlm-onboarding-section {
|
1680 |
+
.dlm-onboarding-pages {
|
1681 |
+
width: 55em;
|
1682 |
+
}
|
1683 |
+
|
1684 |
+
&.dlm-onboarding-section-three-col {
|
1685 |
+
.dlm-onboarding-col {
|
1686 |
+
padding-top: 0;
|
1687 |
+
min-width: 31%;
|
1688 |
+
max-width: 31%;
|
1689 |
+
}
|
1690 |
+
}
|
1691 |
+
}
|
1692 |
+
}
|
1693 |
+
}
|
1694 |
+
|
1695 |
+
/* Extensions */
|
1696 |
+
.dlm_extensions_wrap {
|
1697 |
+
|
1698 |
+
a.dlm-reload-button {
|
1699 |
+
float: right;
|
1700 |
+
position: relative;
|
1701 |
+
top: -40px;
|
1702 |
+
}
|
1703 |
+
#available-extensions{
|
1704 |
+
clear:both;
|
1705 |
+
}
|
1706 |
+
|
1707 |
+
.dlm_extensions {
|
1708 |
+
padding: 15px 0;
|
1709 |
+
overflow: hidden;
|
1710 |
+
|
1711 |
+
.dlm_extension {
|
1712 |
+
|
1713 |
+
background-color: #FFF;
|
1714 |
+
width: calc( 20% - 15px);
|
1715 |
+
margin: 0 15px 15px 0;
|
1716 |
+
display: inline-block;
|
1717 |
+
vertical-align: top;
|
1718 |
+
|
1719 |
+
p {
|
1720 |
+
margin: 0;
|
1721 |
+
}
|
1722 |
+
|
1723 |
+
a {
|
1724 |
+
color: #444;
|
1725 |
+
text-decoration: none;
|
1726 |
+
}
|
1727 |
+
|
1728 |
+
.dlm_extension_img_wrapper {
|
1729 |
+
width: 100%;
|
1730 |
+
background: #419CCB;
|
1731 |
+
text-align: center;
|
1732 |
+
|
1733 |
+
img {
|
1734 |
+
max-width: 100%;
|
1735 |
+
margin: 0 auto;
|
1736 |
+
}
|
1737 |
+
}
|
1738 |
+
|
1739 |
+
h3 {
|
1740 |
+
padding: 0 20px;
|
1741 |
+
|
1742 |
+
}
|
1743 |
+
|
1744 |
+
div.extension-desc {
|
1745 |
+
min-height: 120px;
|
1746 |
+
padding: 0 20px;
|
1747 |
+
}
|
1748 |
+
|
1749 |
+
.product_footer {
|
1750 |
+
padding: 15px 15px 15px 0;
|
1751 |
+
text-align: right;
|
1752 |
+
background-color: #FAFAFA;
|
1753 |
+
border-top: 1px solid #dcdcde;
|
1754 |
+
|
1755 |
+
.loop_price {
|
1756 |
+
font-weight: bold;
|
1757 |
+
|
1758 |
+
&.sale {
|
1759 |
+
color: #008000;
|
1760 |
+
|
1761 |
+
strike {
|
1762 |
+
color: #444;
|
1763 |
+
}
|
1764 |
+
}
|
1765 |
+
}
|
1766 |
+
|
1767 |
+
.button {
|
1768 |
+
.dashicons {
|
1769 |
+
vertical-align: middle;
|
1770 |
+
font-size: 16px;
|
1771 |
+
}
|
1772 |
+
}
|
1773 |
+
}
|
1774 |
+
|
1775 |
+
.extension_license {
|
1776 |
+
// padding: 0 10% 10%;
|
1777 |
+
padding: 0 20px 20px;
|
1778 |
+
-webkit-box-sizing: border-box;
|
1779 |
+
-moz-box-sizing: border-box;
|
1780 |
+
box-sizing: border-box;
|
1781 |
+
|
1782 |
+
div.dlm_license_error {
|
1783 |
+
padding: .5em;
|
1784 |
+
margin-bottom: 15px;
|
1785 |
+
background: lightYellow;
|
1786 |
+
|
1787 |
+
a {
|
1788 |
+
color: blue;
|
1789 |
+
text-decoration: underline;
|
1790 |
+
}
|
1791 |
+
}
|
1792 |
+
|
1793 |
+
p.license-status {
|
1794 |
+
padding: 5px 0;
|
1795 |
+
margin: 5px 0;
|
1796 |
+
background: red;
|
1797 |
+
font-weight: bold;
|
1798 |
+
font-size: 1.2em;
|
1799 |
+
color: #fff;
|
1800 |
+
text-align: center;
|
1801 |
+
}
|
1802 |
+
|
1803 |
+
p.license-status.active {
|
1804 |
+
background: #008000;
|
1805 |
+
}
|
1806 |
+
|
1807 |
+
input {
|
1808 |
+
width: 100%;
|
1809 |
+
margin: 7px 0;
|
1810 |
+
padding: 7px;
|
1811 |
+
}
|
1812 |
+
|
1813 |
+
a.button-primary {
|
1814 |
+
width: 100%;
|
1815 |
+
margin: 5px auto 0;
|
1816 |
+
color: #fff;
|
1817 |
+
text-align: center;
|
1818 |
+
}
|
1819 |
+
}
|
1820 |
+
}
|
1821 |
+
}
|
1822 |
+
|
1823 |
+
}
|
1824 |
+
|
1825 |
+
/* Fix Datepicker's UI bug */
|
1826 |
+
#ui-datepicker-div {
|
1827 |
+
display: none;
|
1828 |
+
}
|
1829 |
+
|
1830 |
+
/* Upsells */
|
1831 |
+
.wpchill-upsell {
|
1832 |
+
background: #fff;
|
1833 |
+
border: 0;
|
1834 |
+
padding: 15px;
|
1835 |
+
margin-top: 30px;
|
1836 |
+
|
1837 |
+
.wpchill-upsell-features {
|
1838 |
+
text-align: left;
|
1839 |
+
display: flex;
|
1840 |
+
flex-wrap: wrap;
|
1841 |
+
padding: 20px 0;
|
1842 |
+
|
1843 |
+
li {
|
1844 |
+
width: 33%;
|
1845 |
+
}
|
1846 |
+
}
|
1847 |
+
a:first-child{
|
1848 |
+
margin-right: 10px;
|
1849 |
+
}
|
1850 |
+
}
|
1851 |
+
|
1852 |
+
.wpchill-upsells-wrapper {
|
1853 |
+
width: 100%;
|
1854 |
+
}
|
1855 |
+
|
1856 |
+
.wrap.dlm-admin-settings {
|
1857 |
+
.form-table {
|
1858 |
+
width: 65%;
|
1859 |
+
float: left;
|
1860 |
+
|
1861 |
+
&+.wpchill-upsells-wrapper {
|
1862 |
+
width: 30%;
|
1863 |
+
float: right;
|
1864 |
+
}
|
1865 |
+
|
1866 |
+
.dlm_htaccess_notice{
|
1867 |
+
margin-bottom:5px;
|
1868 |
+
}
|
1869 |
+
}
|
1870 |
+
|
1871 |
+
.dlm-upsell-badge {
|
1872 |
+
font-size: 10px;
|
1873 |
+
background: #f4daa4;
|
1874 |
+
padding: 2px 5px;
|
1875 |
+
display: inline-block;
|
1876 |
+
margin-left: 10px;
|
1877 |
+
border-radius: 10px;
|
1878 |
+
}
|
1879 |
+
#setting-dlm_downloads_path {
|
1880 |
+
& + p {
|
1881 |
+
strong {
|
1882 |
+
color:red;
|
1883 |
+
}
|
1884 |
+
}
|
1885 |
+
}
|
1886 |
+
}
|
1887 |
+
|
1888 |
+
#total_downloads_browser_table {
|
1889 |
+
a.nav-tab {
|
1890 |
+
text-transform: capitalize;
|
1891 |
+
}
|
1892 |
+
}
|
1893 |
+
|
1894 |
+
#dlm-download-page-upsell,
|
1895 |
+
#dlm-amazon-s3-upsell,
|
1896 |
+
#dlm-google-drive-upsell,
|
1897 |
+
#dlm-buttons-upsell {
|
1898 |
+
.inside {
|
1899 |
+
display: flex;
|
1900 |
+
flex-wrap: wrap;
|
1901 |
+
background: #f1f1f1;
|
1902 |
+
|
1903 |
+
.wpchill-upsell {
|
1904 |
+
background: transparent;
|
1905 |
+
text-align: center;
|
1906 |
+
width: 100%;
|
1907 |
+
margin-top: 0;
|
1908 |
+
}
|
1909 |
+
}
|
1910 |
+
|
1911 |
+
.inside {
|
1912 |
+
margin: 0;
|
1913 |
+
padding: 0;
|
1914 |
+
}
|
1915 |
+
|
1916 |
+
}
|
1917 |
+
|
1918 |
+
.upsells-columns {
|
1919 |
+
display: flex;
|
1920 |
+
flex-wrap: wrap;
|
1921 |
+
align-items: center;
|
1922 |
+
align-content: center;
|
1923 |
+
|
1924 |
+
.upsells-columns-2 {
|
1925 |
+
width: 50%;
|
1926 |
+
text-align: center;
|
1927 |
+
display: flex;
|
1928 |
+
align-items: center;
|
1929 |
+
align-content: center;
|
1930 |
+
}
|
1931 |
+
|
1932 |
+
.upsells-column {
|
1933 |
+
width: 100%;
|
1934 |
+
text-align: center;
|
1935 |
+
display: flex;
|
1936 |
+
align-items: center;
|
1937 |
+
align-content: center;
|
1938 |
+
|
1939 |
+
>* {
|
1940 |
+
display: inline-block;
|
1941 |
+
align-content: center;
|
1942 |
+
vertical-align: middle;
|
1943 |
+
margin: 0 15px;
|
1944 |
+
padding: 10px 0;
|
1945 |
+
|
1946 |
+
&.wpchill-upsell {
|
1947 |
+
position: relative;
|
1948 |
+
float: none;
|
1949 |
+
flex-grow: 1;
|
1950 |
+
display: flex;
|
1951 |
+
align-items: center;
|
1952 |
+
|
1953 |
+
.wpchill-upsell-description {
|
1954 |
+
margin: 0 auto;
|
1955 |
+
}
|
1956 |
+
}
|
1957 |
+
}
|
1958 |
+
|
1959 |
+
h3 {
|
1960 |
+
line-height: 1.3em;
|
1961 |
+
}
|
1962 |
+
|
1963 |
+
&:last-child {
|
1964 |
+
border-top: 1px solid #c3c4c7;
|
1965 |
+
border-bottom: 1px solid #c3c4c7;
|
1966 |
+
}
|
1967 |
+
|
1968 |
+
}
|
1969 |
+
|
1970 |
+
.wpchill-upsell {
|
1971 |
+
margin-top: 0;
|
1972 |
+
}
|
1973 |
+
}
|
1974 |
+
|
1975 |
+
.dlm_download_page_dlm-extensions {
|
1976 |
+
.theme.dlm_extension {
|
1977 |
+
background-color: #FFF;
|
1978 |
+
}
|
1979 |
+
}
|
1980 |
+
|
1981 |
+
/* Lite vs PRO Section */
|
1982 |
+
|
1983 |
+
body.rsvp_page_rsvp-upgrade-to-pro #wpcontent .wrap {
|
1984 |
+
margin-left: 0;
|
1985 |
+
max-width: 85%;
|
1986 |
+
}
|
1987 |
+
|
1988 |
+
.rsvp-lite-vs-premium {
|
1989 |
+
|
1990 |
+
&,
|
1991 |
+
p {
|
1992 |
+
font-size: 14px;
|
1993 |
+
margin: 0;
|
1994 |
+
}
|
1995 |
+
|
1996 |
+
&>.wpchill-plans-table.wpchill-highlight {
|
1997 |
+
&>.wpchill-pricing-package {
|
1998 |
+
background: #fefff0;
|
1999 |
+
box-shadow: 0 0 15px rgb(208 219 219);
|
2000 |
+
}
|
2001 |
+
}
|
2002 |
+
|
2003 |
+
.wp-badge {
|
2004 |
+
display: inline-block;
|
2005 |
+
vertical-align: middle;
|
2006 |
+
position: relative;
|
2007 |
+
margin-right: 2.5%;
|
2008 |
+
}
|
2009 |
+
|
2010 |
+
h3 {
|
2011 |
+
display: block;
|
2012 |
+
position: relative;
|
2013 |
+
font-size: 16px;
|
2014 |
+
margin: 0;
|
2015 |
+
}
|
2016 |
+
|
2017 |
+
.wpchill-plans-table {
|
2018 |
+
display: flex;
|
2019 |
+
|
2020 |
+
&.table-header {
|
2021 |
+
margin-top: 50px;
|
2022 |
+
border-top: 0;
|
2023 |
+
|
2024 |
+
.wpchill-pricing-package {
|
2025 |
+
border: 0;
|
2026 |
+
|
2027 |
+
&:not(.wpchill-modula-lite):last-child:before,
|
2028 |
+
&.wpchill-title.wpchill-highlight::before {
|
2029 |
+
content: '';
|
2030 |
+
width: auto;
|
2031 |
+
display: inline-block;
|
2032 |
+
opacity: 1;
|
2033 |
+
position: absolute;
|
2034 |
+
top: -1px;
|
2035 |
+
background: #41495b;
|
2036 |
+
text-align: center;
|
2037 |
+
left: 0;
|
2038 |
+
right: 0;
|
2039 |
+
color: #fff;
|
2040 |
+
font-size: 15px;
|
2041 |
+
text-transform: uppercase;
|
2042 |
+
padding: 10px 5px;
|
2043 |
+
transform: translateY(-100%);
|
2044 |
+
}
|
2045 |
+
}
|
2046 |
+
}
|
2047 |
+
}
|
2048 |
+
|
2049 |
+
&.table-footer {
|
2050 |
+
.wpchill-pricing-package:last-child {
|
2051 |
+
border: 0;
|
2052 |
+
}
|
2053 |
+
}
|
2054 |
+
|
2055 |
+
.wpchill-pricing-package {
|
2056 |
+
text-align: center;
|
2057 |
+
line-height: 1.5;
|
2058 |
+
padding: 10px 15px;
|
2059 |
+
display: flex;
|
2060 |
+
align-content: center;
|
2061 |
+
align-items: center;
|
2062 |
+
justify-content: center;
|
2063 |
+
background: #fff;
|
2064 |
+
border-top: 1px solid #ccc;
|
2065 |
+
width: 32%;
|
2066 |
+
|
2067 |
+
&:not(:first-child) {
|
2068 |
+
max-width: 300px;
|
2069 |
+
}
|
2070 |
+
|
2071 |
+
&.wpchill-title {
|
2072 |
+
font-weight: 400;
|
2073 |
+
color: #666;
|
2074 |
+
font-size: 1.25rem;
|
2075 |
+
height: auto;
|
2076 |
+
-ms-flex-direction: column;
|
2077 |
+
flex-direction: column;
|
2078 |
+
padding-top: 30px;
|
2079 |
+
padding-bottom: 30px;
|
2080 |
+
justify-content: space-between;
|
2081 |
+
position: relative;
|
2082 |
+
|
2083 |
+
.wpchill-name {
|
2084 |
+
margin: 0;
|
2085 |
+
font-size: 36px;
|
2086 |
+
}
|
2087 |
+
|
2088 |
+
&.wpchill-modula-lite {
|
2089 |
+
justify-content: center;
|
2090 |
+
}
|
2091 |
+
|
2092 |
+
p.description {
|
2093 |
+
font-style: italic;
|
2094 |
+
font-size: 13px;
|
2095 |
+
margin-bottom: 40px;
|
2096 |
+
}
|
2097 |
+
|
2098 |
+
.wpchill-price {
|
2099 |
+
|
2100 |
+
p {
|
2101 |
+
&:last-child {
|
2102 |
+
font-size: 30px;
|
2103 |
+
margin: 0 0 40px 0;
|
2104 |
+
}
|
2105 |
+
|
2106 |
+
&.old-price {
|
2107 |
+
margin: 0;
|
2108 |
+
position: relative;
|
2109 |
+
|
2110 |
+
&:after {
|
2111 |
+
content: "";
|
2112 |
+
height: 2px;
|
2113 |
+
width: 60px;
|
2114 |
+
background: red;
|
2115 |
+
display: block;
|
2116 |
+
position: absolute;
|
2117 |
+
left: 50%;
|
2118 |
+
top: 52%;
|
2119 |
+
transform: translate(-50%, -50%);
|
2120 |
+
}
|
2121 |
+
}
|
2122 |
+
}
|
2123 |
+
|
2124 |
+
sup {
|
2125 |
+
top: 2px;
|
2126 |
+
position: relative;
|
2127 |
+
font-size: 15px;
|
2128 |
+
}
|
2129 |
+
}
|
2130 |
+
}
|
2131 |
+
|
2132 |
+
&.wpchill-empty {
|
2133 |
+
background: transparent;
|
2134 |
+
border-color: transparent;
|
2135 |
+
}
|
2136 |
+
|
2137 |
+
&.feature-name {
|
2138 |
+
justify-content: space-between;
|
2139 |
+
font-weight: 400;
|
2140 |
+
text-align: left;
|
2141 |
+
font-size: 13px;
|
2142 |
+
display: block;
|
2143 |
+
background: transparent;
|
2144 |
+
}
|
2145 |
+
|
2146 |
+
.dashicons-saved {
|
2147 |
+
color: green;
|
2148 |
+
}
|
2149 |
+
|
2150 |
+
.dashicons {
|
2151 |
+
width: 30px;
|
2152 |
+
height: 30px;
|
2153 |
+
font-size: 30px;
|
2154 |
+
}
|
2155 |
+
|
2156 |
+
.dashicons-no-alt {
|
2157 |
+
color: #ff3439;
|
2158 |
+
}
|
2159 |
+
|
2160 |
+
&:last-child {
|
2161 |
+
background: #fefff0;
|
2162 |
+
}
|
2163 |
+
}
|
2164 |
+
|
2165 |
+
.button {
|
2166 |
+
.dashicons {
|
2167 |
+
font-size: 16px;
|
2168 |
+
vertical-align: middle;
|
2169 |
+
line-height: 26px;
|
2170 |
+
}
|
2171 |
+
}
|
2172 |
+
}
|
2173 |
+
|
2174 |
+
/**
|
2175 |
+
* Tooltips
|
2176 |
+
*/
|
2177 |
+
|
2178 |
+
.wpchill-tooltip {
|
2179 |
+
position: relative;
|
2180 |
+
display: inline-block;
|
2181 |
+
float: left;
|
2182 |
+
margin-right: 10px;
|
2183 |
+
|
2184 |
+
& > span {
|
2185 |
+
cursor: pointer;
|
2186 |
+
color: #0073aa;
|
2187 |
+
text-decoration: underline;
|
2188 |
+
margin-left: 5px;
|
2189 |
+
}
|
2190 |
+
|
2191 |
+
.wpchill-tooltip-content {
|
2192 |
+
display: none;
|
2193 |
+
position: absolute;
|
2194 |
+
top: 50%;
|
2195 |
+
right: -10px;
|
2196 |
+
transform: translate( 100% ,-50% );
|
2197 |
+
width: 300px;
|
2198 |
+
background: #000;
|
2199 |
+
color: #fff;
|
2200 |
+
padding: 10px;
|
2201 |
+
box-sizing: border-box;
|
2202 |
+
z-index: 99;
|
2203 |
+
}
|
2204 |
+
|
2205 |
+
&:hover .wpchill-tooltip-content {
|
2206 |
+
display: block;
|
2207 |
+
}
|
2208 |
+
|
2209 |
+
.wpchill-tooltip-content{
|
2210 |
+
&:before {
|
2211 |
+
content: '';
|
2212 |
+
width: 0px;
|
2213 |
+
height: 0px;
|
2214 |
+
border-style: solid;
|
2215 |
+
border-width: 8px 8px 8px 0;
|
2216 |
+
border-color: transparent #000 transparent transparent;
|
2217 |
+
display: block;
|
2218 |
+
position: absolute;
|
2219 |
+
top: 50%;
|
2220 |
+
left: -8px;
|
2221 |
+
transform: translateY( -50% );
|
2222 |
+
}
|
2223 |
+
}
|
2224 |
+
}
|
2225 |
+
|
2226 |
+
.wpchill-tooltip-button {
|
2227 |
+
|
2228 |
+
position: relative;
|
2229 |
+
|
2230 |
+
.wpchill-tooltip-content {
|
2231 |
+
display: none;
|
2232 |
+
position: absolute;
|
2233 |
+
top: 50%;
|
2234 |
+
right: 25px;
|
2235 |
+
transform: translate(50%, -135%);
|
2236 |
+
width: auto;
|
2237 |
+
background: rgba(0, 0, 0, 0.8);
|
2238 |
+
color: #fff;
|
2239 |
+
padding: 10px 15px;
|
2240 |
+
box-sizing: border-box;
|
2241 |
+
font-size: 14px;
|
2242 |
+
z-index: 99;
|
2243 |
+
}
|
2244 |
+
|
2245 |
+
&:hover .wpchill-tooltip-content {
|
2246 |
+
display: block;
|
2247 |
+
}
|
2248 |
+
|
2249 |
+
.wpchill-tooltip-content{
|
2250 |
+
&:before {
|
2251 |
+
content: '';
|
2252 |
+
width: 0px;
|
2253 |
+
height: 0px;
|
2254 |
+
border-style: solid;
|
2255 |
+
border-width: 8px 8px 8px 0;
|
2256 |
+
border-color: transparent #000 transparent transparent;
|
2257 |
+
display: block;
|
2258 |
+
position: absolute;
|
2259 |
+
bottom: -12px;
|
2260 |
+
left: 50%;
|
2261 |
+
transform: rotate(-90deg);
|
2262 |
+
}
|
2263 |
+
}
|
2264 |
+
}
|
2265 |
+
|
2266 |
+
.dlm-file-link{
|
2267 |
+
display:block;
|
2268 |
+
margin-top:3px;
|
2269 |
+
}
|
2270 |
+
|
2271 |
+
.dlm-listing-no-file{
|
2272 |
+
code {
|
2273 |
+
color: #b32d2e;
|
2274 |
+
}
|
2275 |
}
|
assets/css/cart.less
CHANGED
@@ -1,88 +1,88 @@
|
|
1 |
-
@cart_bottom_bg: #f8f8f8;
|
2 |
-
|
3 |
-
.dlm-cart {
|
4 |
-
|
5 |
-
.dlm-cart-table-items {
|
6 |
-
table {
|
7 |
-
tr {
|
8 |
-
th, td {
|
9 |
-
background: none;
|
10 |
-
padding: 1em;
|
11 |
-
}
|
12 |
-
th {
|
13 |
-
font-size: 1.1em;
|
14 |
-
padding-top: 0.5em;
|
15 |
-
padding-bottom: 0.5em;
|
16 |
-
border-bottom: 2px solid #c3c1bc;
|
17 |
-
}
|
18 |
-
td {
|
19 |
-
padding-top: 1.5em;
|
20 |
-
padding-bottom: 1.5em;
|
21 |
-
border-bottom: 1px solid #c3c1bc;
|
22 |
-
|
23 |
-
.dlm-cart-remove-item {
|
24 |
-
display: inline-block;
|
25 |
-
width: 18px;
|
26 |
-
height: 18px;
|
27 |
-
line-height: 14px;
|
28 |
-
font-size: 15px;
|
29 |
-
color: #000;
|
30 |
-
text-align: center;
|
31 |
-
border: 1px solid #000;
|
32 |
-
-webkit-border-radius: 100%;
|
33 |
-
-moz-border-radius: 100%;
|
34 |
-
border-radius: 100%;
|
35 |
-
}
|
36 |
-
}
|
37 |
-
}
|
38 |
-
}
|
39 |
-
}
|
40 |
-
|
41 |
-
.dlm-cart-bottom {
|
42 |
-
background: @cart_bottom_bg;
|
43 |
-
padding: 1em;
|
44 |
-
overflow: hidden;
|
45 |
-
|
46 |
-
.dlm-cart-coupons {
|
47 |
-
width: 40%;
|
48 |
-
float: left;
|
49 |
-
}
|
50 |
-
|
51 |
-
.dlm-cart-bottom-right {
|
52 |
-
width: 40%;
|
53 |
-
float: right;
|
54 |
-
|
55 |
-
.dlm-cart-totals {
|
56 |
-
h2 {
|
57 |
-
font-size: 1.6em;
|
58 |
-
}
|
59 |
-
|
60 |
-
table {
|
61 |
-
tr {
|
62 |
-
th, td {
|
63 |
-
padding: .75em .5em;
|
64 |
-
background: @cart_bottom_bg;
|
65 |
-
}
|
66 |
-
}
|
67 |
-
tr.dlm-totals-last-row {
|
68 |
-
th, td {
|
69 |
-
border-top: 1px solid #c3c1bc;
|
70 |
-
}
|
71 |
-
}
|
72 |
-
}
|
73 |
-
}
|
74 |
-
|
75 |
-
.dlm-proceed-to-checkout {
|
76 |
-
a.dlm-button-checkout {
|
77 |
-
display: block;
|
78 |
-
color: #000;
|
79 |
-
padding: 1em 2em;
|
80 |
-
border: 2px solid #000;
|
81 |
-
text-align: center;
|
82 |
-
font-weight: 800;
|
83 |
-
box-shadow: none !important;
|
84 |
-
}
|
85 |
-
}
|
86 |
-
}
|
87 |
-
}
|
88 |
}
|
1 |
+
@cart_bottom_bg: #f8f8f8;
|
2 |
+
|
3 |
+
.dlm-cart {
|
4 |
+
|
5 |
+
.dlm-cart-table-items {
|
6 |
+
table {
|
7 |
+
tr {
|
8 |
+
th, td {
|
9 |
+
background: none;
|
10 |
+
padding: 1em;
|
11 |
+
}
|
12 |
+
th {
|
13 |
+
font-size: 1.1em;
|
14 |
+
padding-top: 0.5em;
|
15 |
+
padding-bottom: 0.5em;
|
16 |
+
border-bottom: 2px solid #c3c1bc;
|
17 |
+
}
|
18 |
+
td {
|
19 |
+
padding-top: 1.5em;
|
20 |
+
padding-bottom: 1.5em;
|
21 |
+
border-bottom: 1px solid #c3c1bc;
|
22 |
+
|
23 |
+
.dlm-cart-remove-item {
|
24 |
+
display: inline-block;
|
25 |
+
width: 18px;
|
26 |
+
height: 18px;
|
27 |
+
line-height: 14px;
|
28 |
+
font-size: 15px;
|
29 |
+
color: #000;
|
30 |
+
text-align: center;
|
31 |
+
border: 1px solid #000;
|
32 |
+
-webkit-border-radius: 100%;
|
33 |
+
-moz-border-radius: 100%;
|
34 |
+
border-radius: 100%;
|
35 |
+
}
|
36 |
+
}
|
37 |
+
}
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
.dlm-cart-bottom {
|
42 |
+
background: @cart_bottom_bg;
|
43 |
+
padding: 1em;
|
44 |
+
overflow: hidden;
|
45 |
+
|
46 |
+
.dlm-cart-coupons {
|
47 |
+
width: 40%;
|
48 |
+
float: left;
|
49 |
+
}
|
50 |
+
|
51 |
+
.dlm-cart-bottom-right {
|
52 |
+
width: 40%;
|
53 |
+
float: right;
|
54 |
+
|
55 |
+
.dlm-cart-totals {
|
56 |
+
h2 {
|
57 |
+
font-size: 1.6em;
|
58 |
+
}
|
59 |
+
|
60 |
+
table {
|
61 |
+
tr {
|
62 |
+
th, td {
|
63 |
+
padding: .75em .5em;
|
64 |
+
background: @cart_bottom_bg;
|
65 |
+
}
|
66 |
+
}
|
67 |
+
tr.dlm-totals-last-row {
|
68 |
+
th, td {
|
69 |
+
border-top: 1px solid #c3c1bc;
|
70 |
+
}
|
71 |
+
}
|
72 |
+
}
|
73 |
+
}
|
74 |
+
|
75 |
+
.dlm-proceed-to-checkout {
|
76 |
+
a.dlm-button-checkout {
|
77 |
+
display: block;
|
78 |
+
color: #000;
|
79 |
+
padding: 1em 2em;
|
80 |
+
border: 2px solid #000;
|
81 |
+
text-align: center;
|
82 |
+
font-weight: 800;
|
83 |
+
box-shadow: none !important;
|
84 |
+
}
|
85 |
+
}
|
86 |
+
}
|
87 |
+
}
|
88 |
}
|
assets/css/checkout.less
CHANGED
@@ -1,206 +1,206 @@
|
|
1 |
-
@cart_bottom_bg: #f8f8f8;
|
2 |
-
|
3 |
-
.dlm-checkout {
|
4 |
-
|
5 |
-
width: 100% !important;
|
6 |
-
max-width: 100% !important;
|
7 |
-
overflow: hidden;
|
8 |
-
|
9 |
-
.dlm-checkout-error {
|
10 |
-
padding: 1em;
|
11 |
-
margin-bottom: 15px;
|
12 |
-
background: #dc3232;
|
13 |
-
box-shadow: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 );
|
14 |
-
|
15 |
-
.dlm-checkout-error-icon {
|
16 |
-
display: inline-block;
|
17 |
-
width: 25px;
|
18 |
-
color: #fff;
|
19 |
-
vertical-align: middle;
|
20 |
-
margin-right: 10px;
|
21 |
-
}
|
22 |
-
|
23 |
-
p {
|
24 |
-
display: inline-block;
|
25 |
-
color: #fff;
|
26 |
-
font-weight: bold;
|
27 |
-
padding: 0;
|
28 |
-
margin: 0;
|
29 |
-
}
|
30 |
-
}
|
31 |
-
|
32 |
-
form {
|
33 |
-
padding: 0;
|
34 |
-
margin: 0;
|
35 |
-
}
|
36 |
-
|
37 |
-
.dlm-checkout-billing {
|
38 |
-
width: 55%;
|
39 |
-
float: left;
|
40 |
-
}
|
41 |
-
|
42 |
-
.dlm-checkout-order-review {
|
43 |
-
width: 40%;
|
44 |
-
float: right;
|
45 |
-
|
46 |
-
table {
|
47 |
-
th {
|
48 |
-
text-align: left;
|
49 |
-
}
|
50 |
-
}
|
51 |
-
}
|
52 |
-
|
53 |
-
.dlm-checkout-row {
|
54 |
-
width: 100%;
|
55 |
-
padding: 5px 0;
|
56 |
-
|
57 |
-
label {
|
58 |
-
display: inline-block;
|
59 |
-
width: 100%;
|
60 |
-
.dlm-checkout-required {
|
61 |
-
padding: 0 5px;
|
62 |
-
color: #ff0000;
|
63 |
-
}
|
64 |
-
}
|
65 |
-
|
66 |
-
.dlm-checkout-input-wrapper {
|
67 |
-
display: inline-block;
|
68 |
-
width: 100%;
|
69 |
-
padding: 5px 0;
|
70 |
-
|
71 |
-
input, select {
|
72 |
-
width: 100%;
|
73 |
-
}
|
74 |
-
select {
|
75 |
-
padding: 5px;
|
76 |
-
}
|
77 |
-
|
78 |
-
.dlm-checkout-field {
|
79 |
-
&.dlm-checkout-field-error {
|
80 |
-
border: 1px solid #dc3232;
|
81 |
-
}
|
82 |
-
}
|
83 |
-
|
84 |
-
}
|
85 |
-
}
|
86 |
-
|
87 |
-
.dlm-checkout-row-half {
|
88 |
-
width: 45%;
|
89 |
-
float: left;
|
90 |
-
}
|
91 |
-
|
92 |
-
.dlm-checkout-row-last {
|
93 |
-
float: right;
|
94 |
-
}
|
95 |
-
|
96 |
-
.dlm-checkout-payment {
|
97 |
-
ul, li {
|
98 |
-
padding: 0;
|
99 |
-
margin: 0;
|
100 |
-
list-style: none;
|
101 |
-
}
|
102 |
-
ul {
|
103 |
-
li {
|
104 |
-
background: #fbfbfb;
|
105 |
-
margin-bottom: 20px;
|
106 |
-
label {
|
107 |
-
display: inline-block;
|
108 |
-
width: 100%;
|
109 |
-
padding: 15px 25px;
|
110 |
-
background: #f8f8f8;
|
111 |
-
cursor: pointer;
|
112 |
-
|
113 |
-
input {
|
114 |
-
margin-right: 10px;
|
115 |
-
}
|
116 |
-
}
|
117 |
-
.dlm_gateway_details {
|
118 |
-
padding: 15px 25px;
|
119 |
-
|
120 |
-
p {
|
121 |
-
padding: 0;
|
122 |
-
margin: 0;
|
123 |
-
}
|
124 |
-
}
|
125 |
-
}
|
126 |
-
}
|
127 |
-
}
|
128 |
-
|
129 |
-
}
|
130 |
-
|
131 |
-
.dlm-checkout-complete {
|
132 |
-
|
133 |
-
table {
|
134 |
-
th {
|
135 |
-
text-align: left;
|
136 |
-
}
|
137 |
-
}
|
138 |
-
|
139 |
-
.dlm-checkout-download-button {
|
140 |
-
display: inline-block;
|
141 |
-
padding: 1em 1.5em;
|
142 |
-
background-color: #eeeeee;
|
143 |
-
border-color: #eeeeee;
|
144 |
-
color: #333333;
|
145 |
-
}
|
146 |
-
}
|
147 |
-
|
148 |
-
.dlm-checkout-overlay-bg {
|
149 |
-
position: fixed;
|
150 |
-
top: 0;
|
151 |
-
left: 0;
|
152 |
-
width: 100%;
|
153 |
-
height:100%;
|
154 |
-
background: #000;
|
155 |
-
opacity: 0.5;
|
156 |
-
z-index: 9998;
|
157 |
-
|
158 |
-
display: none;
|
159 |
-
}
|
160 |
-
|
161 |
-
.dlm-checkout-overlay {
|
162 |
-
box-sizing: border-box;
|
163 |
-
position: fixed;
|
164 |
-
top: 50%;
|
165 |
-
left: 50%;
|
166 |
-
width: 350px;
|
167 |
-
height:150px;
|
168 |
-
margin-top: -75px;
|
169 |
-
margin-left: -175px;
|
170 |
-
padding: 25px;
|
171 |
-
background: #fff;
|
172 |
-
border-radius: 8px;
|
173 |
-
box-shadow: 1px 2px;
|
174 |
-
z-index: 9999;
|
175 |
-
text-align: center;
|
176 |
-
display: none;
|
177 |
-
|
178 |
-
h2 {
|
179 |
-
padding: 0;
|
180 |
-
margin: 0;
|
181 |
-
font-size: 26px;
|
182 |
-
font-weight: 400;
|
183 |
-
text-align: center;
|
184 |
-
|
185 |
-
&:before {
|
186 |
-
content:"";
|
187 |
-
display: none;
|
188 |
-
}
|
189 |
-
}
|
190 |
-
|
191 |
-
span {
|
192 |
-
font-size: 16px;
|
193 |
-
display: inline-block;
|
194 |
-
width: 100%;
|
195 |
-
padding: 10px 0 20px;
|
196 |
-
text-align: center;
|
197 |
-
}
|
198 |
-
|
199 |
-
img {
|
200 |
-
position: absolute;
|
201 |
-
bottom: 25px;
|
202 |
-
left: 50%;
|
203 |
-
margin-left: -22px;
|
204 |
-
}
|
205 |
-
|
206 |
}
|
1 |
+
@cart_bottom_bg: #f8f8f8;
|
2 |
+
|
3 |
+
.dlm-checkout {
|
4 |
+
|
5 |
+
width: 100% !important;
|
6 |
+
max-width: 100% !important;
|
7 |
+
overflow: hidden;
|
8 |
+
|
9 |
+
.dlm-checkout-error {
|
10 |
+
padding: 1em;
|
11 |
+
margin-bottom: 15px;
|
12 |
+
background: #dc3232;
|
13 |
+
box-shadow: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 );
|
14 |
+
|
15 |
+
.dlm-checkout-error-icon {
|
16 |
+
display: inline-block;
|
17 |
+
width: 25px;
|
18 |
+
color: #fff;
|
19 |
+
vertical-align: middle;
|
20 |
+
margin-right: 10px;
|
21 |
+
}
|
22 |
+
|
23 |
+
p {
|
24 |
+
display: inline-block;
|
25 |
+
color: #fff;
|
26 |
+
font-weight: bold;
|
27 |
+
padding: 0;
|
28 |
+
margin: 0;
|
29 |
+
}
|
30 |
+
}
|
31 |
+
|
32 |
+
form {
|
33 |
+
padding: 0;
|
34 |
+
margin: 0;
|
35 |
+
}
|
36 |
+
|
37 |
+
.dlm-checkout-billing {
|
38 |
+
width: 55%;
|
39 |
+
float: left;
|
40 |
+
}
|
41 |
+
|
42 |
+
.dlm-checkout-order-review {
|
43 |
+
width: 40%;
|
44 |
+
float: right;
|
45 |
+
|
46 |
+
table {
|
47 |
+
th {
|
48 |
+
text-align: left;
|
49 |
+
}
|
50 |
+
}
|
51 |
+
}
|
52 |
+
|
53 |
+
.dlm-checkout-row {
|
54 |
+
width: 100%;
|
55 |
+
padding: 5px 0;
|
56 |
+
|
57 |
+
label {
|
58 |
+
display: inline-block;
|
59 |
+
width: 100%;
|
60 |
+
.dlm-checkout-required {
|
61 |
+
padding: 0 5px;
|
62 |
+
color: #ff0000;
|
63 |
+
}
|
64 |
+
}
|
65 |
+
|
66 |
+
.dlm-checkout-input-wrapper {
|
67 |
+
display: inline-block;
|
68 |
+
width: 100%;
|
69 |
+
padding: 5px 0;
|
70 |
+
|
71 |
+
input, select {
|
72 |
+
width: 100%;
|
73 |
+
}
|
74 |
+
select {
|
75 |
+
padding: 5px;
|
76 |
+
}
|
77 |
+
|
78 |
+
.dlm-checkout-field {
|
79 |
+
&.dlm-checkout-field-error {
|
80 |
+
border: 1px solid #dc3232;
|
81 |
+
}
|
82 |
+
}
|
83 |
+
|
84 |
+
}
|
85 |
+
}
|
86 |
+
|
87 |
+
.dlm-checkout-row-half {
|
88 |
+
width: 45%;
|
89 |
+
float: left;
|
90 |
+
}
|
91 |
+
|
92 |
+
.dlm-checkout-row-last {
|
93 |
+
float: right;
|
94 |
+
}
|
95 |
+
|
96 |
+
.dlm-checkout-payment {
|
97 |
+
ul, li {
|
98 |
+
padding: 0;
|
99 |
+
margin: 0;
|
100 |
+
list-style: none;
|
101 |
+
}
|
102 |
+
ul {
|
103 |
+
li {
|
104 |
+
background: #fbfbfb;
|
105 |
+
margin-bottom: 20px;
|
106 |
+
label {
|
107 |
+
display: inline-block;
|
108 |
+
width: 100%;
|
109 |
+
padding: 15px 25px;
|
110 |
+
background: #f8f8f8;
|
111 |
+
cursor: pointer;
|
112 |
+
|
113 |
+
input {
|
114 |
+
margin-right: 10px;
|
115 |
+
}
|
116 |
+
}
|
117 |
+
.dlm_gateway_details {
|
118 |
+
padding: 15px 25px;
|
119 |
+
|
120 |
+
p {
|
121 |
+
padding: 0;
|
122 |
+
margin: 0;
|
123 |
+
}
|
124 |
+
}
|
125 |
+
}
|
126 |
+
}
|
127 |
+
}
|
128 |
+
|
129 |
+
}
|
130 |
+
|
131 |
+
.dlm-checkout-complete {
|
132 |
+
|
133 |
+
table {
|
134 |
+
th {
|
135 |
+
text-align: left;
|
136 |
+
}
|
137 |
+
}
|
138 |
+
|
139 |
+
.dlm-checkout-download-button {
|
140 |
+
display: inline-block;
|
141 |
+
padding: 1em 1.5em;
|
142 |
+
background-color: #eeeeee;
|
143 |
+
border-color: #eeeeee;
|
144 |
+
color: #333333;
|
145 |
+
}
|
146 |
+
}
|
147 |
+
|
148 |
+
.dlm-checkout-overlay-bg {
|
149 |
+
position: fixed;
|
150 |
+
top: 0;
|
151 |
+
left: 0;
|
152 |
+
width: 100%;
|
153 |
+
height:100%;
|
154 |
+
background: #000;
|
155 |
+
opacity: 0.5;
|
156 |
+
z-index: 9998;
|
157 |
+
|
158 |
+
display: none;
|
159 |
+
}
|
160 |
+
|
161 |
+
.dlm-checkout-overlay {
|
162 |
+
box-sizing: border-box;
|
163 |
+
position: fixed;
|
164 |
+
top: 50%;
|
165 |
+
left: 50%;
|
166 |
+
width: 350px;
|
167 |
+
height:150px;
|
168 |
+
margin-top: -75px;
|
169 |
+
margin-left: -175px;
|
170 |
+
padding: 25px;
|
171 |
+
background: #fff;
|
172 |
+
border-radius: 8px;
|
173 |
+
box-shadow: 1px 2px;
|
174 |
+
z-index: 9999;
|
175 |
+
text-align: center;
|
176 |
+
display: none;
|
177 |
+
|
178 |
+
h2 {
|
179 |
+
padding: 0;
|
180 |
+
margin: 0;
|
181 |
+
font-size: 26px;
|
182 |
+
font-weight: 400;
|
183 |
+
text-align: center;
|
184 |
+
|
185 |
+
&:before {
|
186 |
+
content:"";
|
187 |
+
display: none;
|
188 |
+
}
|
189 |
+
}
|
190 |
+
|
191 |
+
span {
|
192 |
+
font-size: 16px;
|
193 |
+
display: inline-block;
|
194 |
+
width: 100%;
|
195 |
+
padding: 10px 0 20px;
|
196 |
+
text-align: center;
|
197 |
+
}
|
198 |
+
|
199 |
+
img {
|
200 |
+
position: absolute;
|
201 |
+
bottom: 25px;
|
202 |
+
left: 50%;
|
203 |
+
margin-left: -22px;
|
204 |
+
}
|
205 |
+
|
206 |
}
|
assets/css/dashboard.less
CHANGED
@@ -1,50 +1,50 @@
|
|
1 |
-
/* Widgets */
|
2 |
-
table.download_chart {
|
3 |
-
width: 100%;
|
4 |
-
thead {
|
5 |
-
display: none;
|
6 |
-
}
|
7 |
-
td, th {
|
8 |
-
padding: 5px;
|
9 |
-
vertical-align: middle;
|
10 |
-
line-height: 1.5em;
|
11 |
-
}
|
12 |
-
th {
|
13 |
-
text-align: left;
|
14 |
-
font-weight: normal;
|
15 |
-
padding-left: 0;
|
16 |
-
}
|
17 |
-
td:last-child {
|
18 |
-
padding-right: 0;
|
19 |
-
}
|
20 |
-
tr:first-child {
|
21 |
-
td, th {
|
22 |
-
padding-top: 0;
|
23 |
-
}
|
24 |
-
}
|
25 |
-
tr:last-child {
|
26 |
-
td, th {
|
27 |
-
border-bottom: 0;
|
28 |
-
padding-bottom: 0;
|
29 |
-
}
|
30 |
-
}
|
31 |
-
span.bar {
|
32 |
-
padding: 0 0 0 1px;
|
33 |
-
height: 1.5em;
|
34 |
-
float: left;
|
35 |
-
margin-right: 5px;
|
36 |
-
-moz-box-sizing: border-box;
|
37 |
-
-webkit-box-sizing: border-box;
|
38 |
-
box-sizing: border-box;
|
39 |
-
-moz-border-radius: 2px;
|
40 |
-
-webkit-border-radius: 2px;
|
41 |
-
border-radius: 2px;
|
42 |
-
bprder: 1px solid #6e6e6e;
|
43 |
-
background: #6e6e6e;
|
44 |
-
background-image: -webkit-gradient(linear, left bottom, left top, from(#747474), to(#6e6e6e));
|
45 |
-
background-image: -webkit-linear-gradient(bottom, #747474, #6e6e6e);
|
46 |
-
background-image: -moz-linear-gradient(bottom, #747474, #6e6e6e);
|
47 |
-
background-image: -o-linear-gradient(bottom, #747474, #6e6e6e);
|
48 |
-
background-image: linear-gradient(to top, #747474, #6e6e6e);
|
49 |
-
}
|
50 |
}
|
1 |
+
/* Widgets */
|
2 |
+
table.download_chart {
|
3 |
+
width: 100%;
|
4 |
+
thead {
|
5 |
+
display: none;
|
6 |
+
}
|
7 |
+
td, th {
|
8 |
+
padding: 5px;
|
9 |
+
vertical-align: middle;
|
10 |
+
line-height: 1.5em;
|
11 |
+
}
|
12 |
+
th {
|
13 |
+
text-align: left;
|
14 |
+
font-weight: normal;
|
15 |
+
padding-left: 0;
|
16 |
+
}
|
17 |
+
td:last-child {
|
18 |
+
padding-right: 0;
|
19 |
+
}
|
20 |
+
tr:first-child {
|
21 |
+
td, th {
|
22 |
+
padding-top: 0;
|
23 |
+
}
|
24 |
+
}
|
25 |
+
tr:last-child {
|
26 |
+
td, th {
|
27 |
+
border-bottom: 0;
|
28 |
+
padding-bottom: 0;
|
29 |
+
}
|
30 |
+
}
|
31 |
+
span.bar {
|
32 |
+
padding: 0 0 0 1px;
|
33 |
+
height: 1.5em;
|
34 |
+
float: left;
|
35 |
+
margin-right: 5px;
|
36 |
+
-moz-box-sizing: border-box;
|
37 |
+
-webkit-box-sizing: border-box;
|
38 |
+
box-sizing: border-box;
|
39 |
+
-moz-border-radius: 2px;
|
40 |
+
-webkit-border-radius: 2px;
|
41 |
+
border-radius: 2px;
|
42 |
+
bprder: 1px solid #6e6e6e;
|
43 |
+
background: #6e6e6e;
|
44 |
+
background-image: -webkit-gradient(linear, left bottom, left top, from(#747474), to(#6e6e6e));
|
45 |
+
background-image: -webkit-linear-gradient(bottom, #747474, #6e6e6e);
|
46 |
+
background-image: -moz-linear-gradient(bottom, #747474, #6e6e6e);
|
47 |
+
background-image: -o-linear-gradient(bottom, #747474, #6e6e6e);
|
48 |
+
background-image: linear-gradient(to top, #747474, #6e6e6e);
|
49 |
+
}
|
50 |
}
|
assets/css/frontend.less
CHANGED
@@ -1,199 +1,199 @@
|
|
1 |
-
.download-box {
|
2 |
-
width: 250px;
|
3 |
-
border: 1px solid #ccc;
|
4 |
-
-moz-border-radius: 4px;
|
5 |
-
-webkit-border-radius: 4px;
|
6 |
-
border-radius: 4px;
|
7 |
-
text-align: center;
|
8 |
-
position: relative;
|
9 |
-
margin: 1em auto;
|
10 |
-
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.4);
|
11 |
-
|
12 |
-
h1 {
|
13 |
-
margin: 0.5em 0 !important;
|
14 |
-
}
|
15 |
-
|
16 |
-
img.wp-post-image {
|
17 |
-
margin: 0;
|
18 |
-
padding: 0;
|
19 |
-
display: block;
|
20 |
-
width: 100%;
|
21 |
-
-moz-border-radius: 0;
|
22 |
-
-webkit-border-radius: 0;
|
23 |
-
-moz-border-top-left-radius: 3px;
|
24 |
-
-moz-border-top-right-radius: 3px;
|
25 |
-
-webkit-border-top-left-radius: 3px;
|
26 |
-
-webkit-border-top-right-radius: 3px;
|
27 |
-
border-radius: 0;
|
28 |
-
border-top-left-radius: 3px;
|
29 |
-
border-top-right-radius: 3px;
|
30 |
-
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
|
31 |
-
}
|
32 |
-
|
33 |
-
.download-box-content {
|
34 |
-
padding: 0 1em 1em;
|
35 |
-
}
|
36 |
-
|
37 |
-
.download-count {
|
38 |
-
-moz-border-radius: 1em;
|
39 |
-
-webkit-border-radius: 1em;
|
40 |
-
border-radius: 1em;
|
41 |
-
color: #777;
|
42 |
-
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
43 |
-
background: #ddd;
|
44 |
-
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.4);
|
45 |
-
position: absolute;
|
46 |
-
top: 0;
|
47 |
-
right: 0;
|
48 |
-
padding: .6em;
|
49 |
-
width: auto;
|
50 |
-
min-width: 1em;
|
51 |
-
font-size: 1em;
|
52 |
-
text-align: center;
|
53 |
-
vertical-align: middle;
|
54 |
-
line-height: 1em;
|
55 |
-
border: 1px solid #bbb;
|
56 |
-
margin: -.5em -.5em 0 0;
|
57 |
-
}
|
58 |
-
}
|
59 |
-
|
60 |
-
.download-button {
|
61 |
-
text-align: center;
|
62 |
-
text-decoration: none !important;
|
63 |
-
padding: 0.75em 1em;
|
64 |
-
color: #fff;
|
65 |
-
display: block;
|
66 |
-
font-size: 1.2em;
|
67 |
-
line-height: 1.5em;
|
68 |
-
background-color: #0099cc;
|
69 |
-
background-image: -webkit-linear-gradient(#009fd4, #0099cc, #0086b2);
|
70 |
-
background-image: -moz-linear-gradient(#009fd4, #0099cc, #0086b2);
|
71 |
-
-moz-border-radius: 4px;
|
72 |
-
-webkit-border-radius: 4px;
|
73 |
-
border-radius: 4px;
|
74 |
-
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5);
|
75 |
-
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
|
76 |
-
border: 1px solid #0086b2;
|
77 |
-
cursor: pointer;
|
78 |
-
|
79 |
-
&:hover {
|
80 |
-
color: #fff;
|
81 |
-
background-color: #0099cc;
|
82 |
-
background-image: -webkit-linear-gradient(#0099cc, #0086b2);
|
83 |
-
background-image: -moz-linear-gradient(#0099cc, #0086b2);
|
84 |
-
}
|
85 |
-
|
86 |
-
&:visited {
|
87 |
-
color: #fff;
|
88 |
-
text-decoration: none;
|
89 |
-
}
|
90 |
-
|
91 |
-
|
92 |
-
small {
|
93 |
-
font-size: 0.8em;
|
94 |
-
opacity: 0.8;
|
95 |
-
display: block;
|
96 |
-
}
|
97 |
-
}
|
98 |
-
|
99 |
-
.filetype-icon {
|
100 |
-
padding-left: 19px;
|
101 |
-
background-repeat: no-repeat;
|
102 |
-
background-position: left;
|
103 |
-
background-image: url(../images/filetypes/document.png);
|
104 |
-
}
|
105 |
-
|
106 |
-
.filetype-pdf {
|
107 |
-
background-image: url(../images/filetypes/document-pdf.png);
|
108 |
-
}
|
109 |
-
|
110 |
-
.filetype-m4r, .filetype-au, .filetype-snd, .filetype-mid, .filetype-midi, .filetype-kar, .filetype-mpga, .filetype-mp2, .filetype-mp3, .filetype-aif, .filetype-aiff, .filetype-aifc, .filetype-m3u, .filetype-ram, .filetype-rm, .filetype-rpm, .filetype-ra, .filetype-wav, .filetype-wave {
|
111 |
-
background-image: url(../images/filetypes/document-music.png);
|
112 |
-
}
|
113 |
-
|
114 |
-
.filetype-mpeg, .filetype-mpg, .filetype-mpe, .filetype-qt, .filetype-mov, .filetype-mxu, .filetype-avi, .filetype-movie, .filetype-mp4, .filetype-divx, .filetype-wmv {
|
115 |
-
background-image: url(../images/filetypes/document-film.png);
|
116 |
-
}
|
117 |
-
|
118 |
-
.filetype-zip, .filetype-gz, .filetype-rar, .filetype-sit, .filetype-tar, .filetype-7z {
|
119 |
-
background-image: url(../images/filetypes/document-zipper.png);
|
120 |
-
}
|
121 |
-
|
122 |
-
.filetype-xls, .filetype-tsv, .filetype-csv, .filetype-xlsx {
|
123 |
-
background-image: url(../images/filetypes/document-excel.png);
|
124 |
-
}
|
125 |
-
|
126 |
-
.filetype-doc, .filetype-docx {
|
127 |
-
background-image: url(../images/filetypes/document-word-text.png);
|
128 |
-
}
|
129 |
-
|
130 |
-
.filetype-ai {
|
131 |
-
background-image: url(../images/filetypes/document-illustrator.png);
|
132 |
-
}
|
133 |
-
|
134 |
-
.filetype-swf {
|
135 |
-
background-image: url(../images/filetypes/document-flash-movie.png);
|
136 |
-
}
|
137 |
-
|
138 |
-
.filetype-eps, .filetype-ps, .filetype-bmp, .filetype-gif, .filetype-ief, .filetype-jpeg, .filetype-jpg, .filetype-jpe, .filetype-png, .filetype-tiff, .filetype-tif, .filetype-djv, .filetype-wbmp, .filetype-ras, .filetype-pnm, .filetype-pbm, .filetype-pgm, .filetype-ppm, .filetype-rgb, .filetype-xbm, .filetype-xpm, .filetype-xwd {
|
139 |
-
background-image: url(../images/filetypes/document-image.png);
|
140 |
-
}
|
141 |
-
|
142 |
-
.filetype-psd {
|
143 |
-
background-image: url(../images/filetypes/document-photoshop.png);
|
144 |
-
}
|
145 |
-
|
146 |
-
.filetype-ppt, .filetype-pptx {
|
147 |
-
background-image: url(../images/filetypes/document-powerpoint.png);
|
148 |
-
}
|
149 |
-
|
150 |
-
.filetype-js, .filetype-css, .filetype-as, .filetype-htm, .filetype-htaccess, .filetype-sql, .filetype-html, .filetype-php, .filetype-xml, .filetype-xsl {
|
151 |
-
background-image: url(../images/filetypes/document-code.png);
|
152 |
-
}
|
153 |
-
|
154 |
-
.filetype-rtx, .filetype-rtf {
|
155 |
-
background-image: url(../images/filetypes/document-text-image.png);
|
156 |
-
}
|
157 |
-
|
158 |
-
.filetype-txt {
|
159 |
-
background-image: url(../images/filetypes/document-text.png);
|
160 |
-
}
|
161 |
-
|
162 |
-
nav.download-monitor-pagination, #content nav.download-monitor-pagination {
|
163 |
-
text-align: center;
|
164 |
-
ul {
|
165 |
-
display: inline-block;
|
166 |
-
white-space: nowrap;
|
167 |
-
padding: 0;
|
168 |
-
clear: both;
|
169 |
-
border: 1px solid #eee;
|
170 |
-
border-right: 0;
|
171 |
-
margin: 1px;
|
172 |
-
li {
|
173 |
-
border-right: 1px solid #eee;
|
174 |
-
padding: 0;
|
175 |
-
margin: 0;
|
176 |
-
float: left;
|
177 |
-
display: inline;
|
178 |
-
overflow: hidden;
|
179 |
-
a, span {
|
180 |
-
margin: 0;
|
181 |
-
text-decoration: none;
|
182 |
-
padding: 0;
|
183 |
-
line-height: 1em;
|
184 |
-
font-size: 1em;
|
185 |
-
font-weight: normal;
|
186 |
-
padding: .5em;
|
187 |
-
min-width: 1em;
|
188 |
-
display: block;
|
189 |
-
}
|
190 |
-
span.current, a:hover, a:focus {
|
191 |
-
background: #eee;
|
192 |
-
color: darken(#eee, 40);
|
193 |
-
}
|
194 |
-
}
|
195 |
-
}
|
196 |
-
}
|
197 |
-
.dlm_widget_downloads ul, .dlm_widget_downloads ul li {
|
198 |
-
list-style: none;
|
199 |
}
|
1 |
+
.download-box {
|
2 |
+
width: 250px;
|
3 |
+
border: 1px solid #ccc;
|
4 |
+
-moz-border-radius: 4px;
|
5 |
+
-webkit-border-radius: 4px;
|
6 |
+
border-radius: 4px;
|
7 |
+
text-align: center;
|
8 |
+
position: relative;
|
9 |
+
margin: 1em auto;
|
10 |
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.4);
|
11 |
+
|
12 |
+
h1 {
|
13 |
+
margin: 0.5em 0 !important;
|
14 |
+
}
|
15 |
+
|
16 |
+
img.wp-post-image {
|
17 |
+
margin: 0;
|
18 |
+
padding: 0;
|
19 |
+
display: block;
|
20 |
+
width: 100%;
|
21 |
+
-moz-border-radius: 0;
|
22 |
+
-webkit-border-radius: 0;
|
23 |
+
-moz-border-top-left-radius: 3px;
|
24 |
+
-moz-border-top-right-radius: 3px;
|
25 |
+
-webkit-border-top-left-radius: 3px;
|
26 |
+
-webkit-border-top-right-radius: 3px;
|
27 |
+
border-radius: 0;
|
28 |
+
border-top-left-radius: 3px;
|
29 |
+
border-top-right-radius: 3px;
|
30 |
+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
|
31 |
+
}
|
32 |
+
|
33 |
+
.download-box-content {
|
34 |
+
padding: 0 1em 1em;
|
35 |
+
}
|
36 |
+
|
37 |
+
.download-count {
|
38 |
+
-moz-border-radius: 1em;
|
39 |
+
-webkit-border-radius: 1em;
|
40 |
+
border-radius: 1em;
|
41 |
+
color: #777;
|
42 |
+
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
43 |
+
background: #ddd;
|
44 |
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.4);
|
45 |
+
position: absolute;
|
46 |
+
top: 0;
|
47 |
+
right: 0;
|
48 |
+
padding: .6em;
|
49 |
+
width: auto;
|
50 |
+
min-width: 1em;
|
51 |
+
font-size: 1em;
|
52 |
+
text-align: center;
|
53 |
+
vertical-align: middle;
|
54 |
+
line-height: 1em;
|
55 |
+
border: 1px solid #bbb;
|
56 |
+
margin: -.5em -.5em 0 0;
|
57 |
+
}
|
58 |
+
}
|
59 |
+
|
60 |
+
.download-button {
|
61 |
+
text-align: center;
|
62 |
+
text-decoration: none !important;
|
63 |
+
padding: 0.75em 1em;
|
64 |
+
color: #fff;
|
65 |
+
display: block;
|
66 |
+
font-size: 1.2em;
|
67 |
+
line-height: 1.5em;
|
68 |
+
background-color: #0099cc;
|
69 |
+
background-image: -webkit-linear-gradient(#009fd4, #0099cc, #0086b2);
|
70 |
+
background-image: -moz-linear-gradient(#009fd4, #0099cc, #0086b2);
|
71 |
+
-moz-border-radius: 4px;
|
72 |
+
-webkit-border-radius: 4px;
|
73 |
+
border-radius: 4px;
|
74 |
+
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5);
|
75 |
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
|
76 |
+
border: 1px solid #0086b2;
|
77 |
+
cursor: pointer;
|
78 |
+
|
79 |
+
&:hover {
|
80 |
+
color: #fff;
|
81 |
+
background-color: #0099cc;
|
82 |
+
background-image: -webkit-linear-gradient(#0099cc, #0086b2);
|
83 |
+
background-image: -moz-linear-gradient(#0099cc, #0086b2);
|
84 |
+
}
|
85 |
+
|
86 |
+
&:visited {
|
87 |
+
color: #fff;
|
88 |
+
text-decoration: none;
|
89 |
+
}
|
90 |
+
|
91 |
+
|
92 |
+
small {
|
93 |
+
font-size: 0.8em;
|
94 |
+
opacity: 0.8;
|
95 |
+
display: block;
|
96 |
+
}
|
97 |
+
}
|
98 |
+
|
99 |
+
.filetype-icon {
|
100 |
+
padding-left: 19px;
|
101 |
+
background-repeat: no-repeat;
|
102 |
+
background-position: left;
|
103 |
+
background-image: url(../images/filetypes/document.png);
|
104 |
+
}
|
105 |
+
|
106 |
+
.filetype-pdf {
|
107 |
+
background-image: url(../images/filetypes/document-pdf.png);
|
108 |
+
}
|
109 |
+
|
110 |
+
.filetype-m4r, .filetype-au, .filetype-snd, .filetype-mid, .filetype-midi, .filetype-kar, .filetype-mpga, .filetype-mp2, .filetype-mp3, .filetype-aif, .filetype-aiff, .filetype-aifc, .filetype-m3u, .filetype-ram, .filetype-rm, .filetype-rpm, .filetype-ra, .filetype-wav, .filetype-wave {
|
111 |
+
background-image: url(../images/filetypes/document-music.png);
|
112 |
+
}
|
113 |
+
|
114 |
+
.filetype-mpeg, .filetype-mpg, .filetype-mpe, .filetype-qt, .filetype-mov, .filetype-mxu, .filetype-avi, .filetype-movie, .filetype-mp4, .filetype-divx, .filetype-wmv {
|
115 |
+
background-image: url(../images/filetypes/document-film.png);
|
116 |
+
}
|
117 |
+
|
118 |
+
.filetype-zip, .filetype-gz, .filetype-rar, .filetype-sit, .filetype-tar, .filetype-7z {
|
119 |
+
background-image: url(../images/filetypes/document-zipper.png);
|
120 |
+
}
|
121 |
+
|
122 |
+
.filetype-xls, .filetype-tsv, .filetype-csv, .filetype-xlsx {
|
123 |
+
background-image: url(../images/filetypes/document-excel.png);
|
124 |
+
}
|
125 |
+
|
126 |
+
.filetype-doc, .filetype-docx {
|
127 |
+
background-image: url(../images/filetypes/document-word-text.png);
|
128 |
+
}
|
129 |
+
|
130 |
+
.filetype-ai {
|
131 |
+
background-image: url(../images/filetypes/document-illustrator.png);
|
132 |
+
}
|
133 |
+
|
134 |
+
.filetype-swf {
|
135 |
+
background-image: url(../images/filetypes/document-flash-movie.png);
|
136 |
+
}
|
137 |
+
|
138 |
+
.filetype-eps, .filetype-ps, .filetype-bmp, .filetype-gif, .filetype-ief, .filetype-jpeg, .filetype-jpg, .filetype-jpe, .filetype-png, .filetype-tiff, .filetype-tif, .filetype-djv, .filetype-wbmp, .filetype-ras, .filetype-pnm, .filetype-pbm, .filetype-pgm, .filetype-ppm, .filetype-rgb, .filetype-xbm, .filetype-xpm, .filetype-xwd {
|
139 |
+
background-image: url(../images/filetypes/document-image.png);
|
140 |
+
}
|
141 |
+
|
142 |
+
.filetype-psd {
|
143 |
+
background-image: url(../images/filetypes/document-photoshop.png);
|
144 |
+
}
|
145 |
+
|
146 |
+
.filetype-ppt, .filetype-pptx {
|
147 |
+
background-image: url(../images/filetypes/document-powerpoint.png);
|
148 |
+
}
|
149 |
+
|
150 |
+
.filetype-js, .filetype-css, .filetype-as, .filetype-htm, .filetype-htaccess, .filetype-sql, .filetype-html, .filetype-php, .filetype-xml, .filetype-xsl {
|
151 |
+
background-image: url(../images/filetypes/document-code.png);
|
152 |
+
}
|
153 |
+
|
154 |
+
.filetype-rtx, .filetype-rtf {
|
155 |
+
background-image: url(../images/filetypes/document-text-image.png);
|
156 |
+
}
|
157 |
+
|
158 |
+
.filetype-txt {
|
159 |
+
background-image: url(../images/filetypes/document-text.png);
|
160 |
+
}
|
161 |
+
|
162 |
+
nav.download-monitor-pagination, #content nav.download-monitor-pagination {
|
163 |
+
text-align: center;
|
164 |
+
ul {
|
165 |
+
display: inline-block;
|
166 |
+
white-space: nowrap;
|
167 |
+
padding: 0;
|
168 |
+
clear: both;
|
169 |
+
border: 1px solid #eee;
|
170 |
+
border-right: 0;
|
171 |
+
margin: 1px;
|
172 |
+
li {
|
173 |
+
border-right: 1px solid #eee;
|
174 |
+
padding: 0;
|
175 |
+
margin: 0;
|
176 |
+
float: left;
|
177 |
+
display: inline;
|
178 |
+
overflow: hidden;
|
179 |
+
a, span {
|
180 |
+
margin: 0;
|
181 |
+
text-decoration: none;
|
182 |
+
padding: 0;
|
183 |
+
line-height: 1em;
|
184 |
+
font-size: 1em;
|
185 |
+
font-weight: normal;
|
186 |
+
padding: .5em;
|
187 |
+
min-width: 1em;
|
188 |
+
display: block;
|
189 |
+
}
|
190 |
+
span.current, a:hover, a:focus {
|
191 |
+
background: #eee;
|
192 |
+
color: darken(#eee, 40);
|
193 |
+
}
|
194 |
+
}
|
195 |
+
}
|
196 |
+
}
|
197 |
+
.dlm_widget_downloads ul, .dlm_widget_downloads ul li {
|
198 |
+
list-style: none;
|
199 |
}
|
assets/css/gb-editor.less
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
-
.dlmPreviewButton {
|
2 |
-
border: 2px dashed #419ccb;
|
3 |
-
color: #fff;
|
4 |
-
padding: 1em;
|
5 |
-
overflow: hidden;
|
6 |
-
|
7 |
-
iframe {
|
8 |
-
overflow: hidden;
|
9 |
-
float: left;
|
10 |
-
}
|
11 |
}
|
1 |
+
.dlmPreviewButton {
|
2 |
+
border: 2px dashed #419ccb;
|
3 |
+
color: #fff;
|
4 |
+
padding: 1em;
|
5 |
+
overflow: hidden;
|
6 |
+
|
7 |
+
iframe {
|
8 |
+
overflow: hidden;
|
9 |
+
float: left;
|
10 |
+
}
|
11 |
}
|
assets/css/menu.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#adminmenu #menu-posts-dlm_download .wp-menu-image:before{content:"\f316";font-family:dashicons!important;font-style:normal;font-weight:400;speak:none;display:inline-block;text-decoration:inherit;width:1em;text-align:center;font-variant:normal;text-transform:none;line-height:1em}#adminmenu #menu-posts-dlm_download ul.wp-submenu li>a{padding:7px 12px}#adminmenu #menu-posts-dlm_download ul.wp-submenu li a[href$=dlm-lite-vs-pro]{color:gold}#adminmenu #menu-posts-dlm_download ul.wp-submenu li a[href$="edit-tags.php?taxonomy=dlm_download_tag&post_type=dlm_download"],#adminmenu #menu-posts-dlm_download ul.wp-submenu li a[href$="edit.php?post_type=dlm_download&page=download-monitor-reports"],#adminmenu #menu-posts-dlm_download ul.wp-submenu li a[href$="edit.php?post_type=dlm_download&page=download-monitor-settings"]{border-bottom:1px solid hsla(0,0%,100%,.2)}.dlm-lu-upgrade-notice{position:relative;padding:1em;margin:3em 1em 1em 0;color:#fff;background:#419ccb;box-shadow:2px 2px 1px grey}.dlm-lu-upgrade-notice a,.dlm-lu-upgrade-notice h3{color:#fff}.dlm-lu-upgrade-notice h3{margin-top:0}.dlm-lu-upgrade-notice p{font-size:1.05em}.dlm-lu-upgrade-notice p a{font-weight:700}.dlm-lu-upgrade-notice a.dlm-lu-upgrade-notice-hide{position:absolute;top:10px;right:10px;text-decoration:none;font-size:.95em}.dlm-onboarding-notice{border-left-color:#419ccb}.dlm-onboarding-notice:before{display:inline-block;position:absolute;top:0;left:0;width:35px;height:100%;content:"";background-color:#419ccb;background-image:url(../images/logo.png);background-size:29px 28px;background-position:1px center;background-repeat:no-repeat}.dlm-onboarding-notice p{padding-left:33px}
|
1 |
+
#adminmenu #menu-posts-dlm_download .wp-menu-image:before{content:"\f316";font-family:dashicons!important;font-style:normal;font-weight:400;speak:none;display:inline-block;text-decoration:inherit;width:1em;text-align:center;font-variant:normal;text-transform:none;line-height:1em}#adminmenu #menu-posts-dlm_download ul.wp-submenu li>a{padding:7px 12px}#adminmenu #menu-posts-dlm_download ul.wp-submenu li a[href$=dlm-lite-vs-pro]{color:gold}#adminmenu #menu-posts-dlm_download ul.wp-submenu li a[href$="edit-tags.php?taxonomy=dlm_download_tag&post_type=dlm_download"],#adminmenu #menu-posts-dlm_download ul.wp-submenu li a[href$="edit.php?post_type=dlm_download&page=download-monitor-reports"],#adminmenu #menu-posts-dlm_download ul.wp-submenu li a[href$="edit.php?post_type=dlm_download&page=download-monitor-settings"]{border-bottom:1px solid hsla(0,0%,100%,.2)}.dlm-lu-upgrade-notice{position:relative;padding:1em;margin:3em 1em 1em 0;color:#fff;background:#419ccb;box-shadow:2px 2px 1px grey}.dlm-lu-upgrade-notice a,.dlm-lu-upgrade-notice h3{color:#fff}.dlm-lu-upgrade-notice h3{margin-top:0}.dlm-lu-upgrade-notice p{font-size:1.05em}.dlm-lu-upgrade-notice p a{font-weight:700}.dlm-lu-upgrade-notice a.dlm-lu-upgrade-notice-hide{position:absolute;top:10px;right:10px;text-decoration:none;font-size:.95em}.dlm-onboarding-notice{border-left-color:#419ccb}.dlm-onboarding-notice:before{display:inline-block;position:absolute;top:0;left:0;width:35px;height:100%;content:"";background-color:#419ccb;background-image:url('../images/logo.png');background-size:29px 28px;background-position:1px center;background-repeat:no-repeat}.dlm-onboarding-notice p{padding-left:33px}
|
assets/css/menu.less
CHANGED
@@ -1,97 +1,97 @@
|
|
1 |
-
/* Menu */
|
2 |
-
#adminmenu {
|
3 |
-
#menu-posts-dlm_download {
|
4 |
-
.wp-menu-image:before {
|
5 |
-
content: "\f316";
|
6 |
-
font-family: "dashicons" !important;
|
7 |
-
font-style: normal;
|
8 |
-
font-weight: normal;
|
9 |
-
speak: none;
|
10 |
-
|
11 |
-
display: inline-block;
|
12 |
-
text-decoration: inherit;
|
13 |
-
width: 1em;
|
14 |
-
text-align: center;
|
15 |
-
|
16 |
-
/* For safety - reset parent styles, that can break glyph codes*/
|
17 |
-
font-variant: normal;
|
18 |
-
text-transform: none;
|
19 |
-
|
20 |
-
/* fix buttons height, for twitter bootstrap */
|
21 |
-
line-height: 1em;
|
22 |
-
}
|
23 |
-
|
24 |
-
ul.wp-submenu {
|
25 |
-
|
26 |
-
li {
|
27 |
-
|
28 |
-
& > a {
|
29 |
-
padding:7px 12px;
|
30 |
-
}
|
31 |
-
// Lite vs PRO menu link
|
32 |
-
a[href$="dlm-lite-vs-pro"] {
|
33 |
-
color: gold;
|
34 |
-
}
|
35 |
-
|
36 |
-
a[href$="edit-tags.php?taxonomy=dlm_download_tag&post_type=dlm_download"],
|
37 |
-
a[href$="edit.php?post_type=dlm_download&page=download-monitor-settings"],
|
38 |
-
a[href$="edit.php?post_type=dlm_download&page=download-monitor-reports"]{
|
39 |
-
border-bottom: 1px solid hsla(0,0%,100%,.2);
|
40 |
-
}
|
41 |
-
}
|
42 |
-
}
|
43 |
-
}
|
44 |
-
}
|
45 |
-
|
46 |
-
/* LU upgrade notice */
|
47 |
-
.dlm-lu-upgrade-notice {
|
48 |
-
position: relative;
|
49 |
-
padding: 1em;
|
50 |
-
margin: 3em 1em 1em 0;
|
51 |
-
color: #fff;
|
52 |
-
background: #419ccb;
|
53 |
-
box-shadow: 2px 2px 1px grey;
|
54 |
-
|
55 |
-
h3, a {
|
56 |
-
color: #fff;
|
57 |
-
}
|
58 |
-
h3 {
|
59 |
-
margin-top: 0;
|
60 |
-
}
|
61 |
-
|
62 |
-
p {
|
63 |
-
font-size: 1.05em;
|
64 |
-
a {
|
65 |
-
font-weight: bold;
|
66 |
-
}
|
67 |
-
}
|
68 |
-
a.dlm-lu-upgrade-notice-hide {
|
69 |
-
position: absolute;
|
70 |
-
top: 10px;
|
71 |
-
right: 10px;
|
72 |
-
text-decoration: none;
|
73 |
-
font-size: 0.95em;
|
74 |
-
}
|
75 |
-
}
|
76 |
-
|
77 |
-
.dlm-onboarding-notice {
|
78 |
-
border-left-color: #419ccb;
|
79 |
-
|
80 |
-
&:before {
|
81 |
-
display: inline-block;
|
82 |
-
position:absolute;
|
83 |
-
top:0;
|
84 |
-
left:0;
|
85 |
-
width: 35px;
|
86 |
-
height: 100%;
|
87 |
-
content:"";
|
88 |
-
background-color: #419ccb;
|
89 |
-
background-image: url('../images/logo.png');
|
90 |
-
background-size: 29px 28px;
|
91 |
-
background-position: 1px center;
|
92 |
-
background-repeat: no-repeat;
|
93 |
-
}
|
94 |
-
p {
|
95 |
-
padding-left: 33px;
|
96 |
-
}
|
97 |
-
}
|
1 |
+
/* Menu */
|
2 |
+
#adminmenu {
|
3 |
+
#menu-posts-dlm_download {
|
4 |
+
.wp-menu-image:before {
|
5 |
+
content: "\f316";
|
6 |
+
font-family: "dashicons" !important;
|
7 |
+
font-style: normal;
|
8 |
+
font-weight: normal;
|
9 |
+
speak: none;
|
10 |
+
|
11 |
+
display: inline-block;
|
12 |
+
text-decoration: inherit;
|
13 |
+
width: 1em;
|
14 |
+
text-align: center;
|
15 |
+
|
16 |
+
/* For safety - reset parent styles, that can break glyph codes*/
|
17 |
+
font-variant: normal;
|
18 |
+
text-transform: none;
|
19 |
+
|
20 |
+
/* fix buttons height, for twitter bootstrap */
|
21 |
+
line-height: 1em;
|
22 |
+
}
|
23 |
+
|
24 |
+
ul.wp-submenu {
|
25 |
+
|
26 |
+
li {
|
27 |
+
|
28 |
+
& > a {
|
29 |
+
padding:7px 12px;
|
30 |
+
}
|
31 |
+
// Lite vs PRO menu link
|
32 |
+
a[href$="dlm-lite-vs-pro"] {
|
33 |
+
color: gold;
|
34 |
+
}
|
35 |
+
|
36 |
+
a[href$="edit-tags.php?taxonomy=dlm_download_tag&post_type=dlm_download"],
|
37 |
+
a[href$="edit.php?post_type=dlm_download&page=download-monitor-settings"],
|
38 |
+
a[href$="edit.php?post_type=dlm_download&page=download-monitor-reports"]{
|
39 |
+
border-bottom: 1px solid hsla(0,0%,100%,.2);
|
40 |
+
}
|
41 |
+
}
|
42 |
+
}
|
43 |
+
}
|
44 |
+
}
|
45 |
+
|
46 |
+
/* LU upgrade notice */
|
47 |
+
.dlm-lu-upgrade-notice {
|
48 |
+
position: relative;
|
49 |
+
padding: 1em;
|
50 |
+
margin: 3em 1em 1em 0;
|
51 |
+
color: #fff;
|
52 |
+
background: #419ccb;
|
53 |
+
box-shadow: 2px 2px 1px grey;
|
54 |
+
|
55 |
+
h3, a {
|
56 |
+
color: #fff;
|
57 |
+
}
|
58 |
+
h3 {
|
59 |
+
margin-top: 0;
|
60 |
+
}
|
61 |
+
|
62 |
+
p {
|
63 |
+
font-size: 1.05em;
|
64 |
+
a {
|
65 |
+
font-weight: bold;
|
66 |
+
}
|
67 |
+
}
|
68 |
+
a.dlm-lu-upgrade-notice-hide {
|
69 |
+
position: absolute;
|
70 |
+
top: 10px;
|
71 |
+
right: 10px;
|
72 |
+
text-decoration: none;
|
73 |
+
font-size: 0.95em;
|
74 |
+
}
|
75 |
+
}
|
76 |
+
|
77 |
+
.dlm-onboarding-notice {
|
78 |
+
border-left-color: #419ccb;
|
79 |
+
|
80 |
+
&:before {
|
81 |
+
display: inline-block;
|
82 |
+
position:absolute;
|
83 |
+
top:0;
|
84 |
+
left:0;
|
85 |
+
width: 35px;
|
86 |
+
height: 100%;
|
87 |
+
content:"";
|
88 |
+
background-color: #419ccb;
|
89 |
+
background-image: url('../images/logo.png');
|
90 |
+
background-size: 29px 28px;
|
91 |
+
background-position: 1px center;
|
92 |
+
background-repeat: no-repeat;
|
93 |
+
}
|
94 |
+
p {
|
95 |
+
padding-left: 33px;
|
96 |
+
}
|
97 |
+
}
|
assets/css/preview.less
CHANGED
@@ -1,19 +1,19 @@
|
|
1 |
-
html,body {
|
2 |
-
padding: 0;
|
3 |
-
margin: 0;
|
4 |
-
overflow: hidden !important;
|
5 |
-
}
|
6 |
-
|
7 |
-
table,tr,td {
|
8 |
-
padding: 0 !important;
|
9 |
-
margin: 0 !important;
|
10 |
-
}
|
11 |
-
|
12 |
-
p {
|
13 |
-
padding: 0 !important;
|
14 |
-
margin: 0 !important;
|
15 |
-
}
|
16 |
-
|
17 |
-
.dlmPreviewContainer {
|
18 |
-
overflow: hidden;
|
19 |
}
|
1 |
+
html,body {
|
2 |
+
padding: 0;
|
3 |
+
margin: 0;
|
4 |
+
overflow: hidden !important;
|
5 |
+
}
|
6 |
+
|
7 |
+
table,tr,td {
|
8 |
+
padding: 0 !important;
|
9 |
+
margin: 0 !important;
|
10 |
+
}
|
11 |
+
|
12 |
+
p {
|
13 |
+
padding: 0 !important;
|
14 |
+
margin: 0 !important;
|
15 |
+
}
|
16 |
+
|
17 |
+
.dlmPreviewContainer {
|
18 |
+
overflow: hidden;
|
19 |
}
|
assets/js/blockui.js
CHANGED
@@ -1,616 +1,616 @@
|
|
1 |
-
/*!
|
2 |
-
* jQuery blockUI plugin
|
3 |
-
* Version 2.61.0-2013.06.06
|
4 |
-
* @requires jQuery v1.7 or later
|
5 |
-
*
|
6 |
-
* Examples at: http://malsup.com/jquery/block/
|
7 |
-
* Copyright (c) 2007-2013 M. Alsup
|
8 |
-
* Dual licensed under the MIT and GPL licenses:
|
9 |
-
* http://www.opensource.org/licenses/mit-license.php
|
10 |
-
* http://www.gnu.org/licenses/gpl.html
|
11 |
-
*
|
12 |
-
* Thanks to Amir-Hossein Sobhi for some excellent contributions!
|
13 |
-
*/
|
14 |
-
|
15 |
-
;(function() {
|
16 |
-
/*jshint eqeqeq:false curly:false latedef:false */
|
17 |
-
"use strict";
|
18 |
-
|
19 |
-
function setup($) {
|
20 |
-
$.fn._fadeIn = $.fn.fadeIn;
|
21 |
-
|
22 |
-
var noOp = $.noop || function() {};
|
23 |
-
|
24 |
-
// this bit is to ensure we don't call setExpression when we shouldn't (with extra muscle to handle
|
25 |
-
// retarded userAgent strings on Vista)
|
26 |
-
var msie = /MSIE/.test(navigator.userAgent);
|
27 |
-
var ie6 = /MSIE 6.0/.test(navigator.userAgent) && ! /MSIE 8.0/.test(navigator.userAgent);
|
28 |
-
var mode = document.documentMode || 0;
|
29 |
-
var setExpr = $.isFunction( document.createElement('div').style.setExpression );
|
30 |
-
|
31 |
-
// global $ methods for blocking/unblocking the entire page
|
32 |
-
$.blockUI = function(opts) { install(window, opts); };
|
33 |
-
$.unblockUI = function(opts) { remove(window, opts); };
|
34 |
-
|
35 |
-
// convenience method for quick growl-like notifications (http://www.google.com/search?q=growl)
|
36 |
-
$.growlUI = function(title, message, timeout, onClose) {
|
37 |
-
var $m = $('<div class="growlUI"></div>');
|
38 |
-
if (title) $m.append('<h1>'+title+'</h1>');
|
39 |
-
if (message) $m.append('<h2>'+message+'</h2>');
|
40 |
-
if (timeout === undefined) timeout = 3000;
|
41 |
-
|
42 |
-
// Added by konapun: Set timeout to 30 seconds if this growl is moused over, like normal toast notifications
|
43 |
-
var callBlock = function(opts) {
|
44 |
-
opts = opts || {};
|
45 |
-
|
46 |
-
$.blockUI({
|
47 |
-
message: $m,
|
48 |
-
fadeIn : typeof opts.fadeIn !== 'undefined' ? opts.fadeIn : 700,
|
49 |
-
fadeOut: typeof opts.fadeOut !== 'undefined' ? opts.fadeOut : 1000,
|
50 |
-
timeout: typeof opts.timeout !== 'undefined' ? opts.timeout : timeout,
|
51 |
-
centerY: false,
|
52 |
-
showOverlay: false,
|
53 |
-
onUnblock: onClose,
|
54 |
-
css: $.blockUI.defaults.growlCSS
|
55 |
-
});
|
56 |
-
};
|
57 |
-
|
58 |
-
callBlock();
|
59 |
-
var nonmousedOpacity = $m.css('opacity');
|
60 |
-
$m.mouseover(function() {
|
61 |
-
callBlock({
|
62 |
-
fadeIn: 0,
|
63 |
-
timeout: 30000
|
64 |
-
});
|
65 |
-
|
66 |
-
var displayBlock = $('.blockMsg');
|
67 |
-
displayBlock.stop(); // cancel fadeout if it has started
|
68 |
-
displayBlock.fadeTo(300, 1); // make it easier to read the message by removing transparency
|
69 |
-
}).mouseout(function() {
|
70 |
-
$('.blockMsg').fadeOut(1000);
|
71 |
-
});
|
72 |
-
// End konapun additions
|
73 |
-
};
|
74 |
-
|
75 |
-
// plugin method for blocking element content
|
76 |
-
$.fn.block = function(opts) {
|
77 |
-
if ( this[0] === window ) {
|
78 |
-
$.blockUI( opts );
|
79 |
-
return this;
|
80 |
-
}
|
81 |
-
var fullOpts = $.extend({}, $.blockUI.defaults, opts || {});
|
82 |
-
this.each(function() {
|
83 |
-
var $el = $(this);
|
84 |
-
if (fullOpts.ignoreIfBlocked && $el.data('blockUI.isBlocked'))
|
85 |
-
return;
|
86 |
-
$el.unblock({ fadeOut: 0 });
|
87 |
-
});
|
88 |
-
|
89 |
-
return this.each(function() {
|
90 |
-
if ($.css(this,'position') == 'static') {
|
91 |
-
this.style.position = 'relative';
|
92 |
-
$(this).data('blockUI.static', true);
|
93 |
-
}
|
94 |
-
this.style.zoom = 1; // force 'hasLayout' in ie
|
95 |
-
install(this, opts);
|
96 |
-
});
|
97 |
-
};
|
98 |
-
|
99 |
-
// plugin method for unblocking element content
|
100 |
-
$.fn.unblock = function(opts) {
|
101 |
-
if ( this[0] === window ) {
|
102 |
-
$.unblockUI( opts );
|
103 |
-
return this;
|
104 |
-
}
|
105 |
-
return this.each(function() {
|
106 |
-
remove(this, opts);
|
107 |
-
});
|
108 |
-
};
|
109 |
-
|
110 |
-
$.blockUI.version = 2.60; // 2nd generation blocking at no extra cost!
|
111 |
-
|
112 |
-
// override these in your code to change the default behavior and style
|
113 |
-
$.blockUI.defaults = {
|
114 |
-
// message displayed when blocking (use null for no message)
|
115 |
-
message: '<h1>Please wait...</h1>',
|
116 |
-
|
117 |
-
title: null, // title string; only used when theme == true
|
118 |
-
draggable: true, // only used when theme == true (requires jquery-ui.js to be loaded)
|
119 |
-
|
120 |
-
theme: false, // set to true to use with jQuery UI themes
|
121 |
-
|
122 |
-
// styles for the message when blocking; if you wish to disable
|
123 |
-
// these and use an external stylesheet then do this in your code:
|
124 |
-
// $.blockUI.defaults.css = {};
|
125 |
-
css: {
|
126 |
-
padding: 0,
|
127 |
-
margin: 0,
|
128 |
-
width: '30%',
|
129 |
-
top: '40%',
|
130 |
-
left: '35%',
|
131 |
-
textAlign: 'center',
|
132 |
-
color: '#000',
|
133 |
-
border: '3px solid #aaa',
|
134 |
-
backgroundColor:'#fff',
|
135 |
-
cursor: 'wait'
|
136 |
-
},
|
137 |
-
|
138 |
-
// minimal style set used when themes are used
|
139 |
-
themedCSS: {
|
140 |
-
width: '30%',
|
141 |
-
top: '40%',
|
142 |
-
left: '35%'
|
143 |
-
},
|
144 |
-
|
145 |
-
// styles for the overlay
|
146 |
-
overlayCSS: {
|
147 |
-
backgroundColor: '#000',
|
148 |
-
opacity: 0.6,
|
149 |
-
cursor: 'wait'
|
150 |
-
},
|
151 |
-
|
152 |
-
// style to replace wait cursor before unblocking to correct issue
|
153 |
-
// of lingering wait cursor
|
154 |
-
cursorReset: 'default',
|
155 |
-
|
156 |
-
// styles applied when using $.growlUI
|
157 |
-
growlCSS: {
|
158 |
-
width: '350px',
|
159 |
-
top: '10px',
|
160 |
-
left: '',
|
161 |
-
right: '10px',
|
162 |
-
border: 'none',
|
163 |
-
padding: '5px',
|
164 |
-
opacity: 0.6,
|
165 |
-
cursor: 'default',
|
166 |
-
color: '#fff',
|
167 |
-
backgroundColor: '#000',
|
168 |
-
'-webkit-border-radius':'10px',
|
169 |
-
'-moz-border-radius': '10px',
|
170 |
-
'border-radius': '10px'
|
171 |
-
},
|
172 |
-
|
173 |
-
// IE issues: 'about:blank' fails on HTTPS and javascript:false is s-l-o-w
|
174 |
-
// (hat tip to Jorge H. N. de Vasconcelos)
|
175 |
-
/*jshint scripturl:true */
|
176 |
-
iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank',
|
177 |
-
|
178 |
-
// force usage of iframe in non-IE browsers (handy for blocking applets)
|
179 |
-
forceIframe: false,
|
180 |
-
|
181 |
-
// z-index for the blocking overlay
|
182 |
-
baseZ: 1000,
|
183 |
-
|
184 |
-
// set these to true to have the message automatically centered
|
185 |
-
centerX: true, // <-- only effects element blocking (page block controlled via css above)
|
186 |
-
centerY: true,
|
187 |
-
|
188 |
-
// allow body element to be stetched in ie6; this makes blocking look better
|
189 |
-
// on "short" pages. disable if you wish to prevent changes to the body height
|
190 |
-
allowBodyStretch: true,
|
191 |
-
|
192 |
-
// enable if you want key and mouse events to be disabled for content that is blocked
|
193 |
-
bindEvents: true,
|
194 |
-
|
195 |
-
// be default blockUI will supress tab navigation from leaving blocking content
|
196 |
-
// (if bindEvents is true)
|
197 |
-
constrainTabKey: true,
|
198 |
-
|
199 |
-
// fadeIn time in millis; set to 0 to disable fadeIn on block
|
200 |
-
fadeIn: 200,
|
201 |
-
|
202 |
-
// fadeOut time in millis; set to 0 to disable fadeOut on unblock
|
203 |
-
fadeOut: 400,
|
204 |
-
|
205 |
-
// time in millis to wait before auto-unblocking; set to 0 to disable auto-unblock
|
206 |
-
timeout: 0,
|
207 |
-
|
208 |
-
// disable if you don't want to show the overlay
|
209 |
-
showOverlay: true,
|
210 |
-
|
211 |
-
// if true, focus will be placed in the first available input field when
|
212 |
-
// page blocking
|
213 |
-
focusInput: true,
|
214 |
-
|
215 |
-
// elements that can receive focus
|
216 |
-
focusableElements: ':input:enabled:visible',
|
217 |
-
|
218 |
-
// suppresses the use of overlay styles on FF/Linux (due to performance issues with opacity)
|
219 |
-
// no longer needed in 2012
|
220 |
-
// applyPlatformOpacityRules: true,
|
221 |
-
|
222 |
-
// callback method invoked when fadeIn has completed and blocking message is visible
|
223 |
-
onBlock: null,
|
224 |
-
|
225 |
-
// callback method invoked when unblocking has completed; the callback is
|
226 |
-
// passed the element that has been unblocked (which is the window object for page
|
227 |
-
// blocks) and the options that were passed to the unblock call:
|
228 |
-
// onUnblock(element, options)
|
229 |
-
onUnblock: null,
|
230 |
-
|
231 |
-
// callback method invoked when the overlay area is clicked.
|
232 |
-
// setting this will turn the cursor to a pointer, otherwise cursor defined in overlayCss will be used.
|
233 |
-
onOverlayClick: null,
|
234 |
-
|
235 |
-
// don't ask; if you really must know: http://groups.google.com/group/jquery-en/browse_thread/thread/36640a8730503595/2f6a79a77a78e493#2f6a79a77a78e493
|
236 |
-
quirksmodeOffsetHack: 4,
|
237 |
-
|
238 |
-
// class name of the message block
|
239 |
-
blockMsgClass: 'blockMsg',
|
240 |
-
|
241 |
-
// if it is already blocked, then ignore it (don't unblock and reblock)
|
242 |
-
ignoreIfBlocked: false
|
243 |
-
};
|
244 |
-
|
245 |
-
// private data and functions follow...
|
246 |
-
|
247 |
-
var pageBlock = null;
|
248 |
-
var pageBlockEls = [];
|
249 |
-
|
250 |
-
function install(el, opts) {
|
251 |
-
var css, themedCSS;
|
252 |
-
var full = (el == window);
|
253 |
-
var msg = (opts && opts.message !== undefined ? opts.message : undefined);
|
254 |
-
opts = $.extend({}, $.blockUI.defaults, opts || {});
|
255 |
-
|
256 |
-
if (opts.ignoreIfBlocked && $(el).data('blockUI.isBlocked'))
|
257 |
-
return;
|
258 |
-
|
259 |
-
opts.overlayCSS = $.extend({}, $.blockUI.defaults.overlayCSS, opts.overlayCSS || {});
|
260 |
-
css = $.extend({}, $.blockUI.defaults.css, opts.css || {});
|
261 |
-
if (opts.onOverlayClick)
|
262 |
-
opts.overlayCSS.cursor = 'pointer';
|
263 |
-
|
264 |
-
themedCSS = $.extend({}, $.blockUI.defaults.themedCSS, opts.themedCSS || {});
|
265 |
-
msg = msg === undefined ? opts.message : msg;
|
266 |
-
|
267 |
-
// remove the current block (if there is one)
|
268 |
-
if (full && pageBlock)
|
269 |
-
remove(window, {fadeOut:0});
|
270 |
-
|
271 |
-
// if an existing element is being used as the blocking content then we capture
|
272 |
-
// its current place in the DOM (and current display style) so we can restore
|
273 |
-
// it when we unblock
|
274 |
-
if (msg && typeof msg != 'string' && (msg.parentNode || msg.jquery)) {
|
275 |
-
var node = msg.jquery ? msg[0] : msg;
|
276 |
-
var data = {};
|
277 |
-
$(el).data('blockUI.history', data);
|
278 |
-
data.el = node;
|
279 |
-
data.parent = node.parentNode;
|
280 |
-
data.display = node.style.display;
|
281 |
-
data.position = node.style.position;
|
282 |
-
if (data.parent)
|
283 |
-
data.parent.removeChild(node);
|
284 |
-
}
|
285 |
-
|
286 |
-
$(el).data('blockUI.onUnblock', opts.onUnblock);
|
287 |
-
var z = opts.baseZ;
|
288 |
-
|
289 |
-
// blockUI uses 3 layers for blocking, for simplicity they are all used on every platform;
|
290 |
-
// layer1 is the iframe layer which is used to supress bleed through of underlying content
|
291 |
-
// layer2 is the overlay layer which has opacity and a wait cursor (by default)
|
292 |
-
// layer3 is the message content that is displayed while blocking
|
293 |
-
var lyr1, lyr2, lyr3, s;
|
294 |
-
if (msie || opts.forceIframe)
|
295 |
-
lyr1 = $('<iframe class="blockUI" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+opts.iframeSrc+'"></iframe>');
|
296 |
-
else
|
297 |
-
lyr1 = $('<div class="blockUI" style="display:none"></div>');
|
298 |
-
|
299 |
-
if (opts.theme)
|
300 |
-
lyr2 = $('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+ (z++) +';display:none"></div>');
|
301 |
-
else
|
302 |
-
lyr2 = $('<div class="blockUI blockOverlay" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');
|
303 |
-
|
304 |
-
if (opts.theme && full) {
|
305 |
-
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(z+10)+';display:none;position:fixed">';
|
306 |
-
if ( opts.title ) {
|
307 |
-
s += '<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(opts.title || ' ')+'</div>';
|
308 |
-
}
|
309 |
-
s += '<div class="ui-widget-content ui-dialog-content"></div>';
|
310 |
-
s += '</div>';
|
311 |
-
}
|
312 |
-
else if (opts.theme) {
|
313 |
-
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(z+10)+';display:none;position:absolute">';
|
314 |
-
if ( opts.title ) {
|
315 |
-
s += '<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(opts.title || ' ')+'</div>';
|
316 |
-
}
|
317 |
-
s += '<div class="ui-widget-content ui-dialog-content"></div>';
|
318 |
-
s += '</div>';
|
319 |
-
}
|
320 |
-
else if (full) {
|
321 |
-
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockPage" style="z-index:'+(z+10)+';display:none;position:fixed"></div>';
|
322 |
-
}
|
323 |
-
else {
|
324 |
-
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockElement" style="z-index:'+(z+10)+';display:none;position:absolute"></div>';
|
325 |
-
}
|
326 |
-
lyr3 = $(s);
|
327 |
-
|
328 |
-
// if we have a message, style it
|
329 |
-
if (msg) {
|
330 |
-
if (opts.theme) {
|
331 |
-
lyr3.css(themedCSS);
|
332 |
-
lyr3.addClass('ui-widget-content');
|
333 |
-
}
|
334 |
-
else
|
335 |
-
lyr3.css(css);
|
336 |
-
}
|
337 |
-
|
338 |
-
// style the overlay
|
339 |
-
if (!opts.theme /*&& (!opts.applyPlatformOpacityRules)*/)
|
340 |
-
lyr2.css(opts.overlayCSS);
|
341 |
-
lyr2.css('position', full ? 'fixed' : 'absolute');
|
342 |
-
|
343 |
-
// make iframe layer transparent in IE
|
344 |
-
if (msie || opts.forceIframe)
|
345 |
-
lyr1.css('opacity',0.0);
|
346 |
-
|
347 |
-
//$([lyr1[0],lyr2[0],lyr3[0]]).appendTo(full ? 'body' : el);
|
348 |
-
var layers = [lyr1,lyr2,lyr3], $par = full ? $('body') : $(el);
|
349 |
-
$.each(layers, function() {
|
350 |
-
this.appendTo($par);
|
351 |
-
});
|
352 |
-
|
353 |
-
if (opts.theme && opts.draggable && $.fn.draggable) {
|
354 |
-
lyr3.draggable({
|
355 |
-
handle: '.ui-dialog-titlebar',
|
356 |
-
cancel: 'li'
|
357 |
-
});
|
358 |
-
}
|
359 |
-
|
360 |
-
// ie7 must use absolute positioning in quirks mode and to account for activex issues (when scrolling)
|
361 |
-
var expr = setExpr && (!$.support.boxModel || $('object,embed', full ? null : el).length > 0);
|
362 |
-
if (ie6 || expr) {
|
363 |
-
// give body 100% height
|
364 |
-
if (full && opts.allowBodyStretch && $.support.boxModel)
|
365 |
-
$('html,body').css('height','100%');
|
366 |
-
|
367 |
-
// fix ie6 issue when blocked element has a border width
|
368 |
-
if ((ie6 || !$.support.boxModel) && !full) {
|
369 |
-
var t = sz(el,'borderTopWidth'), l = sz(el,'borderLeftWidth');
|
370 |
-
var fixT = t ? '(0 - '+t+')' : 0;
|
371 |
-
var fixL = l ? '(0 - '+l+')' : 0;
|
372 |
-
}
|
373 |
-
|
374 |
-
// simulate fixed position
|
375 |
-
$.each(layers, function(i,o) {
|
376 |
-
var s = o[0].style;
|
377 |
-
s.position = 'absolute';
|
378 |
-
if (i < 2) {
|
379 |
-
if (full)
|
380 |
-
s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:'+opts.quirksmodeOffsetHack+') + "px"');
|
381 |
-
else
|
382 |
-
s.setExpression('height','this.parentNode.offsetHeight + "px"');
|
383 |
-
if (full)
|
384 |
-
s.setExpression('width','jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"');
|
385 |
-
else
|
386 |
-
s.setExpression('width','this.parentNode.offsetWidth + "px"');
|
387 |
-
if (fixL) s.setExpression('left', fixL);
|
388 |
-
if (fixT) s.setExpression('top', fixT);
|
389 |
-
}
|
390 |
-
else if (opts.centerY) {
|
391 |
-
if (full) s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');
|
392 |
-
s.marginTop = 0;
|
393 |
-
}
|
394 |
-
else if (!opts.centerY && full) {
|
395 |
-
var top = (opts.css && opts.css.top) ? parseInt(opts.css.top, 10) : 0;
|
396 |
-
var expression = '((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"';
|
397 |
-
s.setExpression('top',expression);
|
398 |
-
}
|
399 |
-
});
|
400 |
-
}
|
401 |
-
|
402 |
-
// show the message
|
403 |
-
if (msg) {
|
404 |
-
if (opts.theme)
|
405 |
-
lyr3.find('.ui-widget-content').append(msg);
|
406 |
-
else
|
407 |
-
lyr3.append(msg);
|
408 |
-
if (msg.jquery || msg.nodeType)
|
409 |
-
$(msg).show();
|
410 |
-
}
|
411 |
-
|
412 |
-
if ((msie || opts.forceIframe) && opts.showOverlay)
|
413 |
-
lyr1.show(); // opacity is zero
|
414 |
-
if (opts.fadeIn) {
|
415 |
-
var cb = opts.onBlock ? opts.onBlock : noOp;
|
416 |
-
var cb1 = (opts.showOverlay && !msg) ? cb : noOp;
|
417 |
-
var cb2 = msg ? cb : noOp;
|
418 |
-
if (opts.showOverlay)
|
419 |
-
lyr2._fadeIn(opts.fadeIn, cb1);
|
420 |
-
if (msg)
|
421 |
-
lyr3._fadeIn(opts.fadeIn, cb2);
|
422 |
-
}
|
423 |
-
else {
|
424 |
-
if (opts.showOverlay)
|
425 |
-
lyr2.show();
|
426 |
-
if (msg)
|
427 |
-
lyr3.show();
|
428 |
-
if (opts.onBlock)
|
429 |
-
opts.onBlock();
|
430 |
-
}
|
431 |
-
|
432 |
-
// bind key and mouse events
|
433 |
-
bind(1, el, opts);
|
434 |
-
|
435 |
-
if (full) {
|
436 |
-
pageBlock = lyr3[0];
|
437 |
-
pageBlockEls = $(opts.focusableElements,pageBlock);
|
438 |
-
if (opts.focusInput)
|
439 |
-
setTimeout(focus, 20);
|
440 |
-
}
|
441 |
-
else
|
442 |
-
center(lyr3[0], opts.centerX, opts.centerY);
|
443 |
-
|
444 |
-
if (opts.timeout) {
|
445 |
-
// auto-unblock
|
446 |
-
var to = setTimeout(function() {
|
447 |
-
if (full)
|
448 |
-
$.unblockUI(opts);
|
449 |
-
else
|
450 |
-
$(el).unblock(opts);
|
451 |
-
}, opts.timeout);
|
452 |
-
$(el).data('blockUI.timeout', to);
|
453 |
-
}
|
454 |
-
}
|
455 |
-
|
456 |
-
// remove the block
|
457 |
-
function remove(el, opts) {
|
458 |
-
var count;
|
459 |
-
var full = (el == window);
|
460 |
-
var $el = $(el);
|
461 |
-
var data = $el.data('blockUI.history');
|
462 |
-
var to = $el.data('blockUI.timeout');
|
463 |
-
if (to) {
|
464 |
-
clearTimeout(to);
|
465 |
-
$el.removeData('blockUI.timeout');
|
466 |
-
}
|
467 |
-
opts = $.extend({}, $.blockUI.defaults, opts || {});
|
468 |
-
bind(0, el, opts); // unbind events
|
469 |
-
|
470 |
-
if (opts.onUnblock === null) {
|
471 |
-
opts.onUnblock = $el.data('blockUI.onUnblock');
|
472 |
-
$el.removeData('blockUI.onUnblock');
|
473 |
-
}
|
474 |
-
|
475 |
-
var els;
|
476 |
-
if (full) // crazy selector to handle odd field errors in ie6/7
|
477 |
-
els = $('body').children().filter('.blockUI').add('body > .blockUI');
|
478 |
-
else
|
479 |
-
els = $el.find('>.blockUI');
|
480 |
-
|
481 |
-
// fix cursor issue
|
482 |
-
if ( opts.cursorReset ) {
|
483 |
-
if ( els.length > 1 )
|
484 |
-
els[1].style.cursor = opts.cursorReset;
|
485 |
-
if ( els.length > 2 )
|
486 |
-
els[2].style.cursor = opts.cursorReset;
|
487 |
-
}
|
488 |
-
|
489 |
-
if (full)
|
490 |
-
pageBlock = pageBlockEls = null;
|
491 |
-
|
492 |
-
if (opts.fadeOut) {
|
493 |
-
count = els.length;
|
494 |
-
els.fadeOut(opts.fadeOut, function() {
|
495 |
-
if ( --count === 0)
|
496 |
-
reset(els,data,opts,el);
|
497 |
-
});
|
498 |
-
}
|
499 |
-
else
|
500 |
-
reset(els, data, opts, el);
|
501 |
-
}
|
502 |
-
|
503 |
-
// move blocking element back into the DOM where it started
|
504 |
-
function reset(els,data,opts,el) {
|
505 |
-
var $el = $(el);
|
506 |
-
els.each(function(i,o) {
|
507 |
-
// remove via DOM calls so we don't lose event handlers
|
508 |
-
if (this.parentNode)
|
509 |
-
this.parentNode.removeChild(this);
|
510 |
-
});
|
511 |
-
|
512 |
-
if (data && data.el) {
|
513 |
-
data.el.style.display = data.display;
|
514 |
-
data.el.style.position = data.position;
|
515 |
-
if (data.parent)
|
516 |
-
data.parent.appendChild(data.el);
|
517 |
-
$el.removeData('blockUI.history');
|
518 |
-
}
|
519 |
-
|
520 |
-
if ($el.data('blockUI.static')) {
|
521 |
-
$el.css('position', 'static'); // #22
|
522 |
-
}
|
523 |
-
|
524 |
-
if (typeof opts.onUnblock == 'function')
|
525 |
-
opts.onUnblock(el,opts);
|
526 |
-
|
527 |
-
// fix issue in Safari 6 where block artifacts remain until reflow
|
528 |
-
var body = $(document.body), w = body.width(), cssW = body[0].style.width;
|
529 |
-
body.width(w-1).width(w);
|
530 |
-
body[0].style.width = cssW;
|
531 |
-
}
|
532 |
-
|
533 |
-
// bind/unbind the handler
|
534 |
-
function bind(b, el, opts) {
|
535 |
-
var full = el == window, $el = $(el);
|
536 |
-
|
537 |
-
// don't bother unbinding if there is nothing to unbind
|
538 |
-
if (!b && (full && !pageBlock || !full && !$el.data('blockUI.isBlocked')))
|
539 |
-
return;
|
540 |
-
|
541 |
-
$el.data('blockUI.isBlocked', b);
|
542 |
-
|
543 |
-
// don't bind events when overlay is not in use or if bindEvents is false
|
544 |
-
if (!full || !opts.bindEvents || (b && !opts.showOverlay))
|
545 |
-
return;
|
546 |
-
|
547 |
-
// bind anchors and inputs for mouse and key events
|
548 |
-
var events = 'mousedown mouseup keydown keypress keyup touchstart touchend touchmove';
|
549 |
-
if (b)
|
550 |
-
$(document).bind(events, opts, handler);
|
551 |
-
else
|
552 |
-
$(document).unbind(events, handler);
|
553 |
-
|
554 |
-
// former impl...
|
555 |
-
// var $e = $('a,:input');
|
556 |
-
// b ? $e.bind(events, opts, handler) : $e.unbind(events, handler);
|
557 |
-
}
|
558 |
-
|
559 |
-
// event handler to suppress keyboard/mouse events when blocking
|
560 |
-
function handler(e) {
|
561 |
-
// allow tab navigation (conditionally)
|
562 |
-
if (e.keyCode && e.keyCode == 9) {
|
563 |
-
if (pageBlock && e.data.constrainTabKey) {
|
564 |
-
var els = pageBlockEls;
|
565 |
-
var fwd = !e.shiftKey && e.target === els[els.length-1];
|
566 |
-
var back = e.shiftKey && e.target === els[0];
|
567 |
-
if (fwd || back) {
|
568 |
-
setTimeout(function(){focus(back);},10);
|
569 |
-
return false;
|
570 |
-
}
|
571 |
-
}
|
572 |
-
}
|
573 |
-
var opts = e.data;
|
574 |
-
var target = $(e.target);
|
575 |
-
if (target.hasClass('blockOverlay') && opts.onOverlayClick)
|
576 |
-
opts.onOverlayClick();
|
577 |
-
|
578 |
-
// allow events within the message content
|
579 |
-
if (target.parents('div.' + opts.blockMsgClass).length > 0)
|
580 |
-
return true;
|
581 |
-
|
582 |
-
// allow events for content that is not being blocked
|
583 |
-
return target.parents().children().filter('div.blockUI').length === 0;
|
584 |
-
}
|
585 |
-
|
586 |
-
function focus(back) {
|
587 |
-
if (!pageBlockEls)
|
588 |
-
return;
|
589 |
-
var e = pageBlockEls[back===true ? pageBlockEls.length-1 : 0];
|
590 |
-
if (e)
|
591 |
-
e.focus();
|
592 |
-
}
|
593 |
-
|
594 |
-
function center(el, x, y) {
|
595 |
-
var p = el.parentNode, s = el.style;
|
596 |
-
var l = ((p.offsetWidth - el.offsetWidth)/2) - sz(p,'borderLeftWidth');
|
597 |
-
var t = ((p.offsetHeight - el.offsetHeight)/2) - sz(p,'borderTopWidth');
|
598 |
-
if (x) s.left = l > 0 ? (l+'px') : '0';
|
599 |
-
if (y) s.top = t > 0 ? (t+'px') : '0';
|
600 |
-
}
|
601 |
-
|
602 |
-
function sz(el, p) {
|
603 |
-
return parseInt($.css(el,p),10)||0;
|
604 |
-
}
|
605 |
-
|
606 |
-
}
|
607 |
-
|
608 |
-
|
609 |
-
/*global define:true */
|
610 |
-
if (typeof define === 'function' && define.amd && define.amd.jQuery) {
|
611 |
-
define(['jquery'], setup);
|
612 |
-
} else {
|
613 |
-
setup(jQuery);
|
614 |
-
}
|
615 |
-
|
616 |
})();
|
1 |
+
/*!
|
2 |
+
* jQuery blockUI plugin
|
3 |
+
* Version 2.61.0-2013.06.06
|
4 |
+
* @requires jQuery v1.7 or later
|
5 |
+
*
|
6 |
+
* Examples at: http://malsup.com/jquery/block/
|
7 |
+
* Copyright (c) 2007-2013 M. Alsup
|
8 |
+
* Dual licensed under the MIT and GPL licenses:
|
9 |
+
* http://www.opensource.org/licenses/mit-license.php
|
10 |
+
* http://www.gnu.org/licenses/gpl.html
|
11 |
+
*
|
12 |
+
* Thanks to Amir-Hossein Sobhi for some excellent contributions!
|
13 |
+
*/
|
14 |
+
|
15 |
+
;(function() {
|
16 |
+
/*jshint eqeqeq:false curly:false latedef:false */
|
17 |
+
"use strict";
|
18 |
+
|
19 |
+
function setup($) {
|
20 |
+
$.fn._fadeIn = $.fn.fadeIn;
|
21 |
+
|
22 |
+
var noOp = $.noop || function() {};
|
23 |
+
|
24 |
+
// this bit is to ensure we don't call setExpression when we shouldn't (with extra muscle to handle
|
25 |
+
// retarded userAgent strings on Vista)
|
26 |
+
var msie = /MSIE/.test(navigator.userAgent);
|
27 |
+
var ie6 = /MSIE 6.0/.test(navigator.userAgent) && ! /MSIE 8.0/.test(navigator.userAgent);
|
28 |
+
var mode = document.documentMode || 0;
|
29 |
+
var setExpr = $.isFunction( document.createElement('div').style.setExpression );
|
30 |
+
|
31 |
+
// global $ methods for blocking/unblocking the entire page
|
32 |
+
$.blockUI = function(opts) { install(window, opts); };
|
33 |
+
$.unblockUI = function(opts) { remove(window, opts); };
|
34 |
+
|
35 |
+
// convenience method for quick growl-like notifications (http://www.google.com/search?q=growl)
|
36 |
+
$.growlUI = function(title, message, timeout, onClose) {
|
37 |
+
var $m = $('<div class="growlUI"></div>');
|
38 |
+
if (title) $m.append('<h1>'+title+'</h1>');
|
39 |
+
if (message) $m.append('<h2>'+message+'</h2>');
|
40 |
+
if (timeout === undefined) timeout = 3000;
|
41 |
+
|
42 |
+
// Added by konapun: Set timeout to 30 seconds if this growl is moused over, like normal toast notifications
|
43 |
+
var callBlock = function(opts) {
|
44 |
+
opts = opts || {};
|
45 |
+
|
46 |
+
$.blockUI({
|
47 |
+
message: $m,
|
48 |
+
fadeIn : typeof opts.fadeIn !== 'undefined' ? opts.fadeIn : 700,
|
49 |
+
fadeOut: typeof opts.fadeOut !== 'undefined' ? opts.fadeOut : 1000,
|
50 |
+
timeout: typeof opts.timeout !== 'undefined' ? opts.timeout : timeout,
|
51 |
+
centerY: false,
|
52 |
+
showOverlay: false,
|
53 |
+
onUnblock: onClose,
|
54 |
+
css: $.blockUI.defaults.growlCSS
|
55 |
+
});
|
56 |
+
};
|
57 |
+
|
58 |
+
callBlock();
|
59 |
+
var nonmousedOpacity = $m.css('opacity');
|
60 |
+
$m.mouseover(function() {
|
61 |
+
callBlock({
|
62 |
+
fadeIn: 0,
|
63 |
+
timeout: 30000
|
64 |
+
});
|
65 |
+
|
66 |
+
var displayBlock = $('.blockMsg');
|
67 |
+
displayBlock.stop(); // cancel fadeout if it has started
|
68 |
+
displayBlock.fadeTo(300, 1); // make it easier to read the message by removing transparency
|
69 |
+
}).mouseout(function() {
|
70 |
+
$('.blockMsg').fadeOut(1000);
|
71 |
+
});
|
72 |
+
// End konapun additions
|
73 |
+
};
|
74 |
+
|
75 |
+
// plugin method for blocking element content
|
76 |
+
$.fn.block = function(opts) {
|
77 |
+
if ( this[0] === window ) {
|
78 |
+
$.blockUI( opts );
|
79 |
+
return this;
|
80 |
+
}
|
81 |
+
var fullOpts = $.extend({}, $.blockUI.defaults, opts || {});
|
82 |
+
this.each(function() {
|
83 |
+
var $el = $(this);
|
84 |
+
if (fullOpts.ignoreIfBlocked && $el.data('blockUI.isBlocked'))
|
85 |
+
return;
|
86 |
+
$el.unblock({ fadeOut: 0 });
|
87 |
+
});
|
88 |
+
|
89 |
+
return this.each(function() {
|
90 |
+
if ($.css(this,'position') == 'static') {
|
91 |
+
this.style.position = 'relative';
|
92 |
+
$(this).data('blockUI.static', true);
|
93 |
+
}
|
94 |
+
this.style.zoom = 1; // force 'hasLayout' in ie
|
95 |
+
install(this, opts);
|
96 |
+
});
|
97 |
+
};
|
98 |
+
|
99 |
+
// plugin method for unblocking element content
|
100 |
+
$.fn.unblock = function(opts) {
|
101 |
+
if ( this[0] === window ) {
|
102 |
+
$.unblockUI( opts );
|
103 |
+
return this;
|
104 |
+
}
|
105 |
+
return this.each(function() {
|
106 |
+
remove(this, opts);
|
107 |
+
});
|
108 |
+
};
|
109 |
+
|
110 |
+
$.blockUI.version = 2.60; // 2nd generation blocking at no extra cost!
|
111 |
+
|
112 |
+
// override these in your code to change the default behavior and style
|
113 |
+
$.blockUI.defaults = {
|
114 |
+
// message displayed when blocking (use null for no message)
|
115 |
+
message: '<h1>Please wait...</h1>',
|
116 |
+
|
117 |
+
title: null, // title string; only used when theme == true
|
118 |
+
draggable: true, // only used when theme == true (requires jquery-ui.js to be loaded)
|
119 |
+
|
120 |
+
theme: false, // set to true to use with jQuery UI themes
|
121 |
+
|
122 |
+
// styles for the message when blocking; if you wish to disable
|
123 |
+
// these and use an external stylesheet then do this in your code:
|
124 |
+
// $.blockUI.defaults.css = {};
|
125 |
+
css: {
|
126 |
+
padding: 0,
|
127 |
+
margin: 0,
|
128 |
+
width: '30%',
|
129 |
+
top: '40%',
|
130 |
+
left: '35%',
|
131 |
+
textAlign: 'center',
|
132 |
+
color: '#000',
|
133 |
+
border: '3px solid #aaa',
|
134 |
+
backgroundColor:'#fff',
|
135 |
+
cursor: 'wait'
|
136 |
+
},
|
137 |
+
|
138 |
+
// minimal style set used when themes are used
|
139 |
+
themedCSS: {
|
140 |
+
width: '30%',
|
141 |
+
top: '40%',
|
142 |
+
left: '35%'
|
143 |
+
},
|
144 |
+
|
145 |
+
// styles for the overlay
|
146 |
+
overlayCSS: {
|
147 |
+
backgroundColor: '#000',
|
148 |
+
opacity: 0.6,
|
149 |
+
cursor: 'wait'
|
150 |
+
},
|
151 |
+
|
152 |
+
// style to replace wait cursor before unblocking to correct issue
|
153 |
+
// of lingering wait cursor
|
154 |
+
cursorReset: 'default',
|
155 |
+
|
156 |
+
// styles applied when using $.growlUI
|
157 |
+
growlCSS: {
|
158 |
+
width: '350px',
|
159 |
+
top: '10px',
|
160 |
+
left: '',
|
161 |
+
right: '10px',
|
162 |
+
border: 'none',
|
163 |
+
padding: '5px',
|
164 |
+
opacity: 0.6,
|
165 |
+
cursor: 'default',
|
166 |
+
color: '#fff',
|
167 |
+
backgroundColor: '#000',
|
168 |
+
'-webkit-border-radius':'10px',
|
169 |
+
'-moz-border-radius': '10px',
|
170 |
+
'border-radius': '10px'
|
171 |
+
},
|
172 |
+
|
173 |
+
// IE issues: 'about:blank' fails on HTTPS and javascript:false is s-l-o-w
|
174 |
+
// (hat tip to Jorge H. N. de Vasconcelos)
|
175 |
+
/*jshint scripturl:true */
|
176 |
+
iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank',
|
177 |
+
|
178 |
+
// force usage of iframe in non-IE browsers (handy for blocking applets)
|
179 |
+
forceIframe: false,
|
180 |
+
|
181 |
+
// z-index for the blocking overlay
|
182 |
+
baseZ: 1000,
|
183 |
+
|
184 |
+
// set these to true to have the message automatically centered
|
185 |
+
centerX: true, // <-- only effects element blocking (page block controlled via css above)
|
186 |
+
centerY: true,
|
187 |
+
|
188 |
+
// allow body element to be stetched in ie6; this makes blocking look better
|
189 |
+
// on "short" pages. disable if you wish to prevent changes to the body height
|
190 |
+
allowBodyStretch: true,
|
191 |
+
|
192 |
+
// enable if you want key and mouse events to be disabled for content that is blocked
|
193 |
+
bindEvents: true,
|
194 |
+
|
195 |
+
// be default blockUI will supress tab navigation from leaving blocking content
|
196 |
+
// (if bindEvents is true)
|
197 |
+
constrainTabKey: true,
|
198 |
+
|
199 |
+
// fadeIn time in millis; set to 0 to disable fadeIn on block
|
200 |
+
fadeIn: 200,
|
201 |
+
|
202 |
+
// fadeOut time in millis; set to 0 to disable fadeOut on unblock
|
203 |
+
fadeOut: 400,
|
204 |
+
|
205 |
+
// time in millis to wait before auto-unblocking; set to 0 to disable auto-unblock
|
206 |
+
timeout: 0,
|
207 |
+
|
208 |
+
// disable if you don't want to show the overlay
|
209 |
+
showOverlay: true,
|
210 |
+
|
211 |
+
// if true, focus will be placed in the first available input field when
|
212 |
+
// page blocking
|
213 |
+
focusInput: true,
|
214 |
+
|
215 |
+
// elements that can receive focus
|
216 |
+
focusableElements: ':input:enabled:visible',
|
217 |
+
|
218 |
+
// suppresses the use of overlay styles on FF/Linux (due to performance issues with opacity)
|
219 |
+
// no longer needed in 2012
|
220 |
+
// applyPlatformOpacityRules: true,
|
221 |
+
|
222 |
+
// callback method invoked when fadeIn has completed and blocking message is visible
|
223 |
+
onBlock: null,
|
224 |
+
|
225 |
+
// callback method invoked when unblocking has completed; the callback is
|
226 |
+
// passed the element that has been unblocked (which is the window object for page
|
227 |
+
// blocks) and the options that were passed to the unblock call:
|
228 |
+
// onUnblock(element, options)
|
229 |
+
onUnblock: null,
|
230 |
+
|
231 |
+
// callback method invoked when the overlay area is clicked.
|
232 |
+
// setting this will turn the cursor to a pointer, otherwise cursor defined in overlayCss will be used.
|
233 |
+
onOverlayClick: null,
|
234 |
+
|
235 |
+
// don't ask; if you really must know: http://groups.google.com/group/jquery-en/browse_thread/thread/36640a8730503595/2f6a79a77a78e493#2f6a79a77a78e493
|
236 |
+
quirksmodeOffsetHack: 4,
|
237 |
+
|
238 |
+
// class name of the message block
|
239 |
+
blockMsgClass: 'blockMsg',
|
240 |
+
|
241 |
+
// if it is already blocked, then ignore it (don't unblock and reblock)
|
242 |
+
ignoreIfBlocked: false
|
243 |
+
};
|
244 |
+
|
245 |
+
// private data and functions follow...
|
246 |
+
|
247 |
+
var pageBlock = null;
|
248 |
+
var pageBlockEls = [];
|
249 |
+
|
250 |
+
function install(el, opts) {
|
251 |
+
var css, themedCSS;
|
252 |
+
var full = (el == window);
|
253 |
+
var msg = (opts && opts.message !== undefined ? opts.message : undefined);
|
254 |
+
opts = $.extend({}, $.blockUI.defaults, opts || {});
|
255 |
+
|
256 |
+
if (opts.ignoreIfBlocked && $(el).data('blockUI.isBlocked'))
|
257 |
+
return;
|
258 |
+
|
259 |
+
opts.overlayCSS = $.extend({}, $.blockUI.defaults.overlayCSS, opts.overlayCSS || {});
|
260 |
+
css = $.extend({}, $.blockUI.defaults.css, opts.css || {});
|
261 |
+
if (opts.onOverlayClick)
|
262 |
+
opts.overlayCSS.cursor = 'pointer';
|
263 |
+
|
264 |
+
themedCSS = $.extend({}, $.blockUI.defaults.themedCSS, opts.themedCSS || {});
|
265 |
+
msg = msg === undefined ? opts.message : msg;
|
266 |
+
|
267 |
+
// remove the current block (if there is one)
|
268 |
+
if (full && pageBlock)
|
269 |
+
remove(window, {fadeOut:0});
|
270 |
+
|
271 |
+
// if an existing element is being used as the blocking content then we capture
|
272 |
+
// its current place in the DOM (and current display style) so we can restore
|
273 |
+
// it when we unblock
|
274 |
+
if (msg && typeof msg != 'string' && (msg.parentNode || msg.jquery)) {
|
275 |
+
var node = msg.jquery ? msg[0] : msg;
|
276 |
+
var data = {};
|
277 |
+
$(el).data('blockUI.history', data);
|
278 |
+
data.el = node;
|
279 |
+
data.parent = node.parentNode;
|
280 |
+
data.display = node.style.display;
|
281 |
+
data.position = node.style.position;
|
282 |
+
if (data.parent)
|
283 |
+
data.parent.removeChild(node);
|
284 |
+
}
|
285 |
+
|
286 |
+
$(el).data('blockUI.onUnblock', opts.onUnblock);
|
287 |
+
var z = opts.baseZ;
|
288 |
+
|
289 |
+
// blockUI uses 3 layers for blocking, for simplicity they are all used on every platform;
|
290 |
+
// layer1 is the iframe layer which is used to supress bleed through of underlying content
|
291 |
+
// layer2 is the overlay layer which has opacity and a wait cursor (by default)
|
292 |
+
// layer3 is the message content that is displayed while blocking
|
293 |
+
var lyr1, lyr2, lyr3, s;
|
294 |
+
if (msie || opts.forceIframe)
|
295 |
+
lyr1 = $('<iframe class="blockUI" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+opts.iframeSrc+'"></iframe>');
|
296 |
+
else
|
297 |
+
lyr1 = $('<div class="blockUI" style="display:none"></div>');
|
298 |
+
|
299 |
+
if (opts.theme)
|
300 |
+
lyr2 = $('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+ (z++) +';display:none"></div>');
|
301 |
+
else
|
302 |
+
lyr2 = $('<div class="blockUI blockOverlay" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');
|
303 |
+
|
304 |
+
if (opts.theme && full) {
|
305 |
+
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(z+10)+';display:none;position:fixed">';
|
306 |
+
if ( opts.title ) {
|
307 |
+
s += '<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(opts.title || ' ')+'</div>';
|
308 |
+
}
|
309 |
+
s += '<div class="ui-widget-content ui-dialog-content"></div>';
|
310 |
+
s += '</div>';
|
311 |
+
}
|
312 |
+
else if (opts.theme) {
|
313 |
+
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(z+10)+';display:none;position:absolute">';
|
314 |
+
if ( opts.title ) {
|
315 |
+
s += '<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(opts.title || ' ')+'</div>';
|
316 |
+
}
|
317 |
+
s += '<div class="ui-widget-content ui-dialog-content"></div>';
|
318 |
+
s += '</div>';
|
319 |
+
}
|
320 |
+
else if (full) {
|
321 |
+
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockPage" style="z-index:'+(z+10)+';display:none;position:fixed"></div>';
|
322 |
+
}
|
323 |
+
else {
|
324 |
+
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockElement" style="z-index:'+(z+10)+';display:none;position:absolute"></div>';
|
325 |
+
}
|
326 |
+
lyr3 = $(s);
|
327 |
+
|
328 |
+
// if we have a message, style it
|
329 |
+
if (msg) {
|
330 |
+
if (opts.theme) {
|
331 |
+
lyr3.css(themedCSS);
|
332 |
+
lyr3.addClass('ui-widget-content');
|
333 |
+
}
|
334 |
+
else
|
335 |
+
lyr3.css(css);
|
336 |
+
}
|
337 |
+
|
338 |
+
// style the overlay
|
339 |
+
if (!opts.theme /*&& (!opts.applyPlatformOpacityRules)*/)
|
340 |
+
lyr2.css(opts.overlayCSS);
|
341 |
+
lyr2.css('position', full ? 'fixed' : 'absolute');
|
342 |
+
|
343 |
+
// make iframe layer transparent in IE
|
344 |
+
if (msie || opts.forceIframe)
|
345 |
+
lyr1.css('opacity',0.0);
|
346 |
+
|
347 |
+
//$([lyr1[0],lyr2[0],lyr3[0]]).appendTo(full ? 'body' : el);
|
348 |
+
var layers = [lyr1,lyr2,lyr3], $par = full ? $('body') : $(el);
|
349 |
+
$.each(layers, function() {
|
350 |
+
this.appendTo($par);
|
351 |
+
});
|
352 |
+
|
353 |
+
if (opts.theme && opts.draggable && $.fn.draggable) {
|
354 |
+
lyr3.draggable({
|
355 |
+
handle: '.ui-dialog-titlebar',
|
356 |
+
cancel: 'li'
|
357 |
+
});
|
358 |
+
}
|
359 |
+
|
360 |
+
// ie7 must use absolute positioning in quirks mode and to account for activex issues (when scrolling)
|
361 |
+
var expr = setExpr && (!$.support.boxModel || $('object,embed', full ? null : el).length > 0);
|
362 |
+
if (ie6 || expr) {
|
363 |
+
// give body 100% height
|
364 |
+
if (full && opts.allowBodyStretch && $.support.boxModel)
|
365 |
+
$('html,body').css('height','100%');
|
366 |
+
|
367 |
+
// fix ie6 issue when blocked element has a border width
|
368 |
+
if ((ie6 || !$.support.boxModel) && !full) {
|
369 |
+
var t = sz(el,'borderTopWidth'), l = sz(el,'borderLeftWidth');
|
370 |
+
var fixT = t ? '(0 - '+t+')' : 0;
|
371 |
+
var fixL = l ? '(0 - '+l+')' : 0;
|
372 |
+
}
|
373 |
+
|
374 |
+
// simulate fixed position
|
375 |
+
$.each(layers, function(i,o) {
|
376 |
+
var s = o[0].style;
|
377 |
+
s.position = 'absolute';
|
378 |
+
if (i < 2) {
|
379 |
+
if (full)
|
380 |
+
s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:'+opts.quirksmodeOffsetHack+') + "px"');
|
381 |
+
else
|
382 |
+
s.setExpression('height','this.parentNode.offsetHeight + "px"');
|
383 |
+
if (full)
|
384 |
+
s.setExpression('width','jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"');
|
385 |
+
else
|
386 |
+
s.setExpression('width','this.parentNode.offsetWidth + "px"');
|
387 |
+
if (fixL) s.setExpression('left', fixL);
|
388 |
+
if (fixT) s.setExpression('top', fixT);
|
389 |
+
}
|
390 |
+
else if (opts.centerY) {
|
391 |
+
if (full) s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');
|
392 |
+
s.marginTop = 0;
|
393 |
+
}
|
394 |
+
else if (!opts.centerY && full) {
|
395 |
+
var top = (opts.css && opts.css.top) ? parseInt(opts.css.top, 10) : 0;
|
396 |
+
var expression = '((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"';
|
397 |
+
s.setExpression('top',expression);
|
398 |
+
}
|
399 |
+
});
|
400 |
+
}
|
401 |
+
|
402 |
+
// show the message
|
403 |
+
if (msg) {
|
404 |
+
if (opts.theme)
|
405 |
+
lyr3.find('.ui-widget-content').append(msg);
|
406 |
+
else
|
407 |
+
lyr3.append(msg);
|
408 |
+
if (msg.jquery || msg.nodeType)
|
409 |
+
$(msg).show();
|
410 |
+
}
|
411 |
+
|
412 |
+
if ((msie || opts.forceIframe) && opts.showOverlay)
|
413 |
+
lyr1.show(); // opacity is zero
|
414 |
+
if (opts.fadeIn) {
|
415 |
+
var cb = opts.onBlock ? opts.onBlock : noOp;
|
416 |
+
var cb1 = (opts.showOverlay && !msg) ? cb : noOp;
|
417 |
+
var cb2 = msg ? cb : noOp;
|
418 |
+
if (opts.showOverlay)
|
419 |
+
lyr2._fadeIn(opts.fadeIn, cb1);
|
420 |
+
if (msg)
|
421 |
+
lyr3._fadeIn(opts.fadeIn, cb2);
|
422 |
+
}
|
423 |
+
else {
|
424 |
+
if (opts.showOverlay)
|
425 |
+
lyr2.show();
|
426 |
+
if (msg)
|
427 |
+
lyr3.show();
|
428 |
+
if (opts.onBlock)
|
429 |
+
opts.onBlock();
|
430 |
+
}
|
431 |
+
|
432 |
+
// bind key and mouse events
|
433 |
+
bind(1, el, opts);
|
434 |
+
|
435 |
+
if (full) {
|
436 |
+
pageBlock = lyr3[0];
|
437 |
+
pageBlockEls = $(opts.focusableElements,pageBlock);
|
438 |
+
if (opts.focusInput)
|
439 |
+
setTimeout(focus, 20);
|
440 |
+
}
|
441 |
+
else
|
442 |
+
center(lyr3[0], opts.centerX, opts.centerY);
|
443 |
+
|
444 |
+
if (opts.timeout) {
|
445 |
+
// auto-unblock
|
446 |
+
var to = setTimeout(function() {
|
447 |
+
if (full)
|
448 |
+
$.unblockUI(opts);
|
449 |
+
else
|
450 |
+
$(el).unblock(opts);
|
451 |
+
}, opts.timeout);
|
452 |
+
$(el).data('blockUI.timeout', to);
|
453 |
+
}
|
454 |
+
}
|
455 |
+
|
456 |
+
// remove the block
|
457 |
+
function remove(el, opts) {
|
458 |
+
var count;
|
459 |
+
var full = (el == window);
|
460 |
+
var $el = $(el);
|
461 |
+
var data = $el.data('blockUI.history');
|
462 |
+
var to = $el.data('blockUI.timeout');
|
463 |
+
if (to) {
|
464 |
+
clearTimeout(to);
|
465 |
+
$el.removeData('blockUI.timeout');
|
466 |
+
}
|
467 |
+
opts = $.extend({}, $.blockUI.defaults, opts || {});
|
468 |
+
bind(0, el, opts); // unbind events
|
469 |
+
|
470 |
+
if (opts.onUnblock === null) {
|
471 |
+
opts.onUnblock = $el.data('blockUI.onUnblock');
|
472 |
+
$el.removeData('blockUI.onUnblock');
|
473 |
+
}
|
474 |
+
|
475 |
+
var els;
|
476 |
+
if (full) // crazy selector to handle odd field errors in ie6/7
|
477 |
+
els = $('body').children().filter('.blockUI').add('body > .blockUI');
|
478 |
+
else
|
479 |
+
els = $el.find('>.blockUI');
|
480 |
+
|
481 |
+
// fix cursor issue
|
482 |
+
if ( opts.cursorReset ) {
|
483 |
+
if ( els.length > 1 )
|
484 |
+
els[1].style.cursor = opts.cursorReset;
|
485 |
+
if ( els.length > 2 )
|
486 |
+
els[2].style.cursor = opts.cursorReset;
|
487 |
+
}
|
488 |
+
|
489 |
+
if (full)
|
490 |
+
pageBlock = pageBlockEls = null;
|
491 |
+
|
492 |
+
if (opts.fadeOut) {
|
493 |
+
count = els.length;
|
494 |
+
els.fadeOut(opts.fadeOut, function() {
|
495 |
+
if ( --count === 0)
|
496 |
+
reset(els,data,opts,el);
|
497 |
+
});
|
498 |
+
}
|
499 |
+
else
|
500 |
+
reset(els, data, opts, el);
|
501 |
+
}
|
502 |
+
|
503 |
+
// move blocking element back into the DOM where it started
|
504 |
+
function reset(els,data,opts,el) {
|
505 |
+
var $el = $(el);
|
506 |
+
els.each(function(i,o) {
|
507 |
+
// remove via DOM calls so we don't lose event handlers
|
508 |
+
if (this.parentNode)
|
509 |
+
this.parentNode.removeChild(this);
|
510 |
+
});
|
511 |
+
|
512 |
+
if (data && data.el) {
|
513 |
+
data.el.style.display = data.display;
|
514 |
+
data.el.style.position = data.position;
|
515 |
+
if (data.parent)
|
516 |
+
data.parent.appendChild(data.el);
|
517 |
+
$el.removeData('blockUI.history');
|
518 |
+
}
|
519 |
+
|
520 |
+
if ($el.data('blockUI.static')) {
|
521 |
+
$el.css('position', 'static'); // #22
|
522 |
+
}
|
523 |
+
|
524 |
+
if (typeof opts.onUnblock == 'function')
|
525 |
+
opts.onUnblock(el,opts);
|
526 |
+
|
527 |
+
// fix issue in Safari 6 where block artifacts remain until reflow
|
528 |
+
var body = $(document.body), w = body.width(), cssW = body[0].style.width;
|
529 |
+
body.width(w-1).width(w);
|
530 |
+
body[0].style.width = cssW;
|
531 |
+
}
|
532 |
+
|
533 |
+
// bind/unbind the handler
|
534 |
+
function bind(b, el, opts) {
|
535 |
+
var full = el == window, $el = $(el);
|
536 |
+
|
537 |
+
// don't bother unbinding if there is nothing to unbind
|
538 |
+
if (!b && (full && !pageBlock || !full && !$el.data('blockUI.isBlocked')))
|
539 |
+
return;
|
540 |
+
|
541 |
+
$el.data('blockUI.isBlocked', b);
|
542 |
+
|
543 |
+
// don't bind events when overlay is not in use or if bindEvents is false
|
544 |
+
if (!full || !opts.bindEvents || (b && !opts.showOverlay))
|
545 |
+
return;
|
546 |
+
|
547 |
+
// bind anchors and inputs for mouse and key events
|
548 |
+
var events = 'mousedown mouseup keydown keypress keyup touchstart touchend touchmove';
|
549 |
+
if (b)
|
550 |
+
$(document).bind(events, opts, handler);
|
551 |
+
else
|
552 |
+
$(document).unbind(events, handler);
|
553 |
+
|
554 |
+
// former impl...
|
555 |
+
// var $e = $('a,:input');
|
556 |
+
// b ? $e.bind(events, opts, handler) : $e.unbind(events, handler);
|
557 |
+
}
|
558 |
+
|
559 |
+
// event handler to suppress keyboard/mouse events when blocking
|
560 |
+
function handler(e) {
|
561 |
+
// allow tab navigation (conditionally)
|
562 |
+
if (e.keyCode && e.keyCode == 9) {
|
563 |
+
if (pageBlock && e.data.constrainTabKey) {
|
564 |
+
var els = pageBlockEls;
|
565 |
+
var fwd = !e.shiftKey && e.target === els[els.length-1];
|
566 |
+
var back = e.shiftKey && e.target === els[0];
|
567 |
+
if (fwd || back) {
|
568 |
+
setTimeout(function(){focus(back);},10);
|
569 |
+
return false;
|
570 |
+
}
|
571 |
+
}
|
572 |
+
}
|
573 |
+
var opts = e.data;
|
574 |
+
var target = $(e.target);
|
575 |
+
if (target.hasClass('blockOverlay') && opts.onOverlayClick)
|
576 |
+
opts.onOverlayClick();
|
577 |
+
|
578 |
+
// allow events within the message content
|
579 |
+
if (target.parents('div.' + opts.blockMsgClass).length > 0)
|
580 |
+
return true;
|
581 |
+
|
582 |
+
// allow events for content that is not being blocked
|
583 |
+
return target.parents().children().filter('div.blockUI').length === 0;
|
584 |
+
}
|
585 |
+
|
586 |
+
function focus(back) {
|
587 |
+
if (!pageBlockEls)
|
588 |
+
return;
|
589 |
+
var e = pageBlockEls[back===true ? pageBlockEls.length-1 : 0];
|
590 |
+
if (e)
|
591 |
+
e.focus();
|
592 |
+
}
|
593 |
+
|
594 |
+
function center(el, x, y) {
|
595 |
+
var p = el.parentNode, s = el.style;
|
596 |
+
var l = ((p.offsetWidth - el.offsetWidth)/2) - sz(p,'borderLeftWidth');
|
597 |
+
var t = ((p.offsetHeight - el.offsetHeight)/2) - sz(p,'borderTopWidth');
|
598 |
+
if (x) s.left = l > 0 ? (l+'px') : '0';
|
599 |
+
if (y) s.top = t > 0 ? (t+'px') : '0';
|
600 |
+
}
|
601 |
+
|
602 |
+
function sz(el, p) {
|
603 |
+
return parseInt($.css(el,p),10)||0;
|
604 |
+
}
|
605 |
+
|
606 |
+
}
|
607 |
+
|
608 |
+
|
609 |
+
/*global define:true */
|
610 |
+
if (typeof define === 'function' && define.amd && define.amd.jQuery) {
|
611 |
+
define(['jquery'], setup);
|
612 |
+
} else {
|
613 |
+
setup(jQuery);
|
614 |
+
}
|
615 |
+
|
616 |
})();
|
assets/js/blockui.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(){"use strict";function e(b){b.fn._fadeIn=b.fn.fadeIn;var p=b.noop||function(){},h=/MSIE/.test(navigator.userAgent),k=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),m=(document.documentMode,b.isFunction(document.createElement("div").style.setExpression))
|
1 |
+
!function(){"use strict";function e(b){b.fn._fadeIn=b.fn.fadeIn;var p=b.noop||function(){},h=/MSIE/.test(navigator.userAgent),k=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),m=(document.documentMode,b.isFunction(document.createElement("div").style.setExpression)),y=(b.blockUI=function(e){o(window,e)},b.unblockUI=function(e){v(window,e)},b.growlUI=function(e,t,o,n){function i(e){b.blockUI({message:s,fadeIn:void 0!==(e=e||{}).fadeIn?e.fadeIn:700,fadeOut:void 0!==e.fadeOut?e.fadeOut:1e3,timeout:void 0!==e.timeout?e.timeout:o,centerY:!1,showOverlay:!1,onUnblock:n,css:b.blockUI.defaults.growlCSS})}var s=b('<div class="growlUI"></div>');e&&s.append("<h1>"+e+"</h1>"),t&&s.append("<h2>"+t+"</h2>"),void 0===o&&(o=3e3),i(),s.css("opacity");s.mouseover(function(){i({fadeIn:0,timeout:3e4});var e=b(".blockMsg");e.stop(),e.fadeTo(300,1)}).mouseout(function(){b(".blockMsg").fadeOut(1e3)})},b.fn.block=function(e){if(this[0]===window)return b.blockUI(e),this;var t=b.extend({},b.blockUI.defaults,e||{});return this.each(function(){var e=b(this);t.ignoreIfBlocked&&e.data("blockUI.isBlocked")||e.unblock({fadeOut:0})}),this.each(function(){"static"==b.css(this,"position")&&(this.style.position="relative",b(this).data("blockUI.static",!0)),this.style.zoom=1,o(this,e)})},b.fn.unblock=function(e){return this[0]===window?(b.unblockUI(e),this):this.each(function(){v(this,e)})},b.blockUI.version=2.6,b.blockUI.defaults={message:"<h1>Please wait...</h1>",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1},null),g=[];function o(e,o){var n=e==window,t=o&&void 0!==o.message?o.message:void 0;if(!(o=b.extend({},b.blockUI.defaults,o||{})).ignoreIfBlocked||!b(e).data("blockUI.isBlocked")){o.overlayCSS=b.extend({},b.blockUI.defaults.overlayCSS,o.overlayCSS||{}),f=b.extend({},b.blockUI.defaults.css,o.css||{}),o.onOverlayClick&&(o.overlayCSS.cursor="pointer"),u=b.extend({},b.blockUI.defaults.themedCSS,o.themedCSS||{}),t=void 0===t?o.message:t,n&&y&&v(window,{fadeOut:0}),t&&"string"!=typeof t&&(t.parentNode||t.jquery)&&(d=t.jquery?t[0]:t,l={},b(e).data("blockUI.history",l),l.el=d,l.parent=d.parentNode,l.display=d.style.display,l.position=d.style.position,l.parent&&l.parent.removeChild(d)),b(e).data("blockUI.onUnblock",o.onUnblock);var i,s,l=o.baseZ,d=h||o.forceIframe?b('<iframe class="blockUI" style="z-index:'+l+++';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+o.iframeSrc+'"></iframe>'):b('<div class="blockUI" style="display:none"></div>'),a=o.theme?b('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+l+++';display:none"></div>'):b('<div class="blockUI blockOverlay" style="z-index:'+l+++';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>'),c=(o.theme&&n?(c='<div class="blockUI '+o.blockMsgClass+' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(l+10)+';display:none;position:fixed">',o.title&&(c+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(o.title||" ")+"</div>"),c+='<div class="ui-widget-content ui-dialog-content"></div></div>'):o.theme?(c='<div class="blockUI '+o.blockMsgClass+' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(l+10)+';display:none;position:absolute">',o.title&&(c+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(o.title||" ")+"</div>"),c+='<div class="ui-widget-content ui-dialog-content"></div></div>'):c=n?'<div class="blockUI '+o.blockMsgClass+' blockPage" style="z-index:'+(l+10)+';display:none;position:fixed"></div>':'<div class="blockUI '+o.blockMsgClass+' blockElement" style="z-index:'+(l+10)+';display:none;position:absolute"></div>',l=b(c),t&&(o.theme?(l.css(u),l.addClass("ui-widget-content")):l.css(f)),o.theme||a.css(o.overlayCSS),a.css("position",n?"fixed":"absolute"),(h||o.forceIframe)&&d.css("opacity",0),[d,a,l]),r=b(n?"body":e),u=(b.each(c,function(){this.appendTo(r)}),o.theme&&o.draggable&&b.fn.draggable&&l.draggable({handle:".ui-dialog-titlebar",cancel:"li"}),m&&(!b.support.boxModel||0<b("object,embed",n?null:e).length));if((k||u)&&(n&&o.allowBodyStretch&&b.support.boxModel&&b("html,body").css("height","100%"),!k&&b.support.boxModel||n||(f=U(e,"borderTopWidth"),u=U(e,"borderLeftWidth"),i=f?"(0 - "+f+")":0,s=u?"(0 - "+u+")":0),b.each(c,function(e,t){t=t[0].style;t.position="absolute",e<2?(n?t.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+o.quirksmodeOffsetHack+') + "px"'):t.setExpression("height",'this.parentNode.offsetHeight + "px"'),n?t.setExpression("width",'jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):t.setExpression("width",'this.parentNode.offsetWidth + "px"'),s&&t.setExpression("left",s),i&&t.setExpression("top",i)):o.centerY?(n&&t.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'),t.marginTop=0):!o.centerY&&n&&(e=o.css&&o.css.top?parseInt(o.css.top,10):0,t.setExpression("top","((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+e+') + "px"'))})),t&&((o.theme?l.find(".ui-widget-content"):l).append(t),(t.jquery||t.nodeType)&&b(t).show()),(h||o.forceIframe)&&o.showOverlay&&d.show(),o.fadeIn?(f=o.onBlock||p,u=o.showOverlay&&!t?f:p,c=t?f:p,o.showOverlay&&a._fadeIn(o.fadeIn,u),t&&l._fadeIn(o.fadeIn,c)):(o.showOverlay&&a.show(),t&&l.show(),o.onBlock&&o.onBlock()),I(1,e,o),n)y=l[0],g=b(o.focusableElements,y),o.focusInput&&setTimeout(w,20);else{var d=l[0],f=o.centerX,u=o.centerY,c=d.parentNode,a=d.style,t=(c.offsetWidth-d.offsetWidth)/2-U(c,"borderLeftWidth"),d=(c.offsetHeight-d.offsetHeight)/2-U(c,"borderTopWidth");f&&(a.left=0<t?t+"px":"0"),u&&(a.top=0<d?d+"px":"0")}o.timeout&&(l=setTimeout(function(){n?b.unblockUI(o):b(e).unblock(o)},o.timeout),b(e).data("blockUI.timeout",l))}}function v(e,t){var o,n,i=e==window,s=b(e),l=s.data("blockUI.history"),d=s.data("blockUI.timeout");d&&(clearTimeout(d),s.removeData("blockUI.timeout")),t=b.extend({},b.blockUI.defaults,t||{}),I(0,e,t),null===t.onUnblock&&(t.onUnblock=s.data("blockUI.onUnblock"),s.removeData("blockUI.onUnblock")),n=i?b("body").children().filter(".blockUI").add("body > .blockUI"):s.find(">.blockUI"),t.cursorReset&&(1<n.length&&(n[1].style.cursor=t.cursorReset),2<n.length&&(n[2].style.cursor=t.cursorReset)),i&&(y=g=null),t.fadeOut?(o=n.length,n.fadeOut(t.fadeOut,function(){0==--o&&a(n,l,t,e)})):a(n,l,t,e)}function a(e,t,o,n){var i=b(n),e=(e.each(function(e,t){this.parentNode&&this.parentNode.removeChild(this)}),t&&t.el&&(t.el.style.display=t.display,t.el.style.position=t.position,t.parent&&t.parent.appendChild(t.el),i.removeData("blockUI.history")),i.data("blockUI.static")&&i.css("position","static"),"function"==typeof o.onUnblock&&o.onUnblock(n,o),b(document.body)),t=e.width(),i=e[0].style.width;e.width(t-1).width(t),e[0].style.width=i}function I(e,t,o){var n=t==window,t=b(t);!e&&(n&&!y||!n&&!t.data("blockUI.isBlocked"))||(t.data("blockUI.isBlocked",e),n&&o.bindEvents&&(!e||o.showOverlay)&&(t="mousedown mouseup keydown keypress keyup touchstart touchend touchmove",e?b(document).bind(t,o,i):b(document).unbind(t,i)))}function i(e){if(e.keyCode&&9==e.keyCode&&y&&e.data.constrainTabKey){var t=g,o=!e.shiftKey&&e.target===t[t.length-1],n=e.shiftKey&&e.target===t[0];if(o||n)return setTimeout(function(){w(n)},10),!1}t=e.data,o=b(e.target);return o.hasClass("blockOverlay")&&t.onOverlayClick&&t.onOverlayClick(),0<o.parents("div."+t.blockMsgClass).length||0===o.parents().children().filter("div.blockUI").length}function w(e){!g||(e=g[!0===e?g.length-1:0])&&e.focus()}function U(e,t){return parseInt(b.css(e,t),10)||0}}"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],e):e(jQuery)}();
|
assets/js/chosen/chosen.css
CHANGED
@@ -1,413 +1,413 @@
|
|
1 |
-
/* @group Base */
|
2 |
-
.chzn-container {
|
3 |
-
font-size: 13px;
|
4 |
-
position: relative;
|
5 |
-
display: inline-block;
|
6 |
-
zoom: 1;
|
7 |
-
*display: inline;
|
8 |
-
}
|
9 |
-
.chzn-container .chzn-drop {
|
10 |
-
background: #fff;
|
11 |
-
border: 1px solid #aaa;
|
12 |
-
border-top: 0;
|
13 |
-
position: absolute;
|
14 |
-
top: 29px;
|
15 |
-
left: 0;
|
16 |
-
-webkit-box-shadow: 0 4px 5px rgba(0,0,0,.15);
|
17 |
-
-moz-box-shadow : 0 4px 5px rgba(0,0,0,.15);
|
18 |
-
box-shadow : 0 4px 5px rgba(0,0,0,.15);
|
19 |
-
z-index: 1010;
|
20 |
-
}
|
21 |
-
/* @end */
|
22 |
-
|
23 |
-
/* @group Single Chosen */
|
24 |
-
.chzn-container-single .chzn-single {
|
25 |
-
background-color: #ffffff;
|
26 |
-
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0 );
|
27 |
-
background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(20%, #ffffff), color-stop(50%, #f6f6f6), color-stop(52%, #eeeeee), color-stop(100%, #f4f4f4));
|
28 |
-
background-image: -webkit-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
|
29 |
-
background-image: -moz-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
|
30 |
-
background-image: -o-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
|
31 |
-
background-image: linear-gradient(#ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
|
32 |
-
-webkit-border-radius: 5px;
|
33 |
-
-moz-border-radius : 5px;
|
34 |
-
border-radius : 5px;
|
35 |
-
-moz-background-clip : padding;
|
36 |
-
-webkit-background-clip: padding-box;
|
37 |
-
background-clip : padding-box;
|
38 |
-
border: 1px solid #aaaaaa;
|
39 |
-
-webkit-box-shadow: 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1);
|
40 |
-
-moz-box-shadow : 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1);
|
41 |
-
box-shadow : 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1);
|
42 |
-
display: block;
|
43 |
-
overflow: hidden;
|
44 |
-
white-space: nowrap;
|
45 |
-
position: relative;
|
46 |
-
height: 23px;
|
47 |
-
line-height: 24px;
|
48 |
-
padding: 0 0 0 8px;
|
49 |
-
color: #444444;
|
50 |
-
text-decoration: none;
|
51 |
-
}
|
52 |
-
.chzn-container-single .chzn-default {
|
53 |
-
color: #999;
|
54 |
-
}
|
55 |
-
.chzn-container-single .chzn-single span {
|
56 |
-
margin-right: 26px;
|
57 |
-
display: block;
|
58 |
-
overflow: hidden;
|
59 |
-
white-space: nowrap;
|
60 |
-
-o-text-overflow: ellipsis;
|
61 |
-
-ms-text-overflow: ellipsis;
|
62 |
-
text-overflow: ellipsis;
|
63 |
-
}
|
64 |
-
.chzn-container-single .chzn-single abbr {
|
65 |
-
display: block;
|
66 |
-
position: absolute;
|
67 |
-
right: 26px;
|
68 |
-
top: 6px;
|
69 |
-
width: 12px;
|
70 |
-
height: 12px;
|
71 |
-
font-size: 1px;
|
72 |
-
background: url('chosen-sprite.png') -42px 1px no-repeat;
|
73 |
-
}
|
74 |
-
.chzn-container-single .chzn-single abbr:hover {
|
75 |
-
background-position: -42px -10px;
|
76 |
-
}
|
77 |
-
.chzn-container-single.chzn-disabled .chzn-single abbr:hover {
|
78 |
-
background-position: -42px -10px;
|
79 |
-
}
|
80 |
-
.chzn-container-single .chzn-single div {
|
81 |
-
position: absolute;
|
82 |
-
right: 0;
|
83 |
-
top: 0;
|
84 |
-
display: block;
|
85 |
-
height: 100%;
|
86 |
-
width: 18px;
|
87 |
-
}
|
88 |
-
.chzn-container-single .chzn-single div b {
|
89 |
-
background: url('chosen-sprite.png') no-repeat 0px 2px;
|
90 |
-
display: block;
|
91 |
-
width: 100%;
|
92 |
-
height: 100%;
|
93 |
-
}
|
94 |
-
.chzn-container-single .chzn-search {
|
95 |
-
padding: 3px 4px;
|
96 |
-
position: relative;
|
97 |
-
margin: 0;
|
98 |
-
white-space: nowrap;
|
99 |
-
z-index: 1010;
|
100 |
-
}
|
101 |
-
.chzn-container-single .chzn-search input {
|
102 |
-
background: #fff url('chosen-sprite.png') no-repeat 100% -20px;
|
103 |
-
background: url('chosen-sprite.png') no-repeat 100% -20px, -webkit-gradient(linear, 0 0, 0 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
|
104 |
-
background: url('chosen-sprite.png') no-repeat 100% -20px, -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
105 |
-
background: url('chosen-sprite.png') no-repeat 100% -20px, -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
106 |
-
background: url('chosen-sprite.png') no-repeat 100% -20px, -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
107 |
-
background: url('chosen-sprite.png') no-repeat 100% -20px, linear-gradient(#eeeeee 1%, #ffffff 15%);
|
108 |
-
margin: 1px 0;
|
109 |
-
padding: 4px 20px 4px 5px;
|
110 |
-
outline: 0;
|
111 |
-
border: 1px solid #aaa;
|
112 |
-
font-family: sans-serif;
|
113 |
-
font-size: 1em;
|
114 |
-
}
|
115 |
-
.chzn-container-single .chzn-drop {
|
116 |
-
-webkit-border-radius: 0 0 4px 4px;
|
117 |
-
-moz-border-radius : 0 0 4px 4px;
|
118 |
-
border-radius : 0 0 4px 4px;
|
119 |
-
-moz-background-clip : padding;
|
120 |
-
-webkit-background-clip: padding-box;
|
121 |
-
background-clip : padding-box;
|
122 |
-
}
|
123 |
-
/* @end */
|
124 |
-
|
125 |
-
.chzn-container-single-nosearch .chzn-search input {
|
126 |
-
position: absolute;
|
127 |
-
left: -9000px;
|
128 |
-
}
|
129 |
-
|
130 |
-
/* @group Multi Chosen */
|
131 |
-
.chzn-container-multi .chzn-choices {
|
132 |
-
background-color: #fff;
|
133 |
-
background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
|
134 |
-
background-image: -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
135 |
-
background-image: -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
136 |
-
background-image: -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
137 |
-
background-image: linear-gradient(#eeeeee 1%, #ffffff 15%);
|
138 |
-
border: 1px solid #aaa;
|
139 |
-
margin: 0;
|
140 |
-
padding: 0;
|
141 |
-
cursor: text;
|
142 |
-
overflow: hidden;
|
143 |
-
height: auto !important;
|
144 |
-
height: 1%;
|
145 |
-
position: relative;
|
146 |
-
}
|
147 |
-
.chzn-container-multi .chzn-choices li {
|
148 |
-
float: left;
|
149 |
-
list-style: none;
|
150 |
-
}
|
151 |
-
.chzn-container-multi .chzn-choices .search-field {
|
152 |
-
white-space: nowrap;
|
153 |
-
margin: 0;
|
154 |
-
padding: 0;
|
155 |
-
}
|
156 |
-
.chzn-container-multi .chzn-choices .search-field input {
|
157 |
-
color: #666;
|
158 |
-
background: transparent !important;
|
159 |
-
border: 0 !important;
|
160 |
-
font-family: sans-serif;
|
161 |
-
font-size: 100%;
|
162 |
-
height: 15px;
|
163 |
-
padding: 5px;
|
164 |
-
margin: 1px 0;
|
165 |
-
outline: 0;
|
166 |
-
-webkit-box-shadow: none;
|
167 |
-
-moz-box-shadow : none;
|
168 |
-
box-shadow : none;
|
169 |
-
}
|
170 |
-
.chzn-container-multi .chzn-choices .search-field .default {
|
171 |
-
color: #999;
|
172 |
-
}
|
173 |
-
.chzn-container-multi .chzn-choices .search-choice {
|
174 |
-
-webkit-border-radius: 3px;
|
175 |
-
-moz-border-radius : 3px;
|
176 |
-
border-radius : 3px;
|
177 |
-
-moz-background-clip : padding;
|
178 |
-
-webkit-background-clip: padding-box;
|
179 |
-
background-clip : padding-box;
|
180 |
-
background-color: #e4e4e4;
|
181 |
-
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f4f4', endColorstr='#eeeeee', GradientType=0 );
|
182 |
-
background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
|
183 |
-
background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
184 |
-
background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
185 |
-
background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
186 |
-
background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
187 |
-
-webkit-box-shadow: 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
|
188 |
-
-moz-box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
|
189 |
-
box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
|
190 |
-
color: #333;
|
191 |
-
border: 1px solid #aaaaaa;
|
192 |
-
line-height: 13px;
|
193 |
-
padding: 3px 20px 3px 5px;
|
194 |
-
margin: 3px 0 3px 5px;
|
195 |
-
position: relative;
|
196 |
-
cursor: default;
|
197 |
-
}
|
198 |
-
.chzn-container-multi .chzn-choices .search-choice.search-choice-disabled {
|
199 |
-
background-color: #e4e4e4;
|
200 |
-
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f4f4', endColorstr='#eeeeee', GradientType=0 );
|
201 |
-
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
|
202 |
-
background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
203 |
-
background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
204 |
-
background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
205 |
-
background-image: -ms-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
206 |
-
background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
207 |
-
color: #666;
|
208 |
-
border: 1px solid #cccccc;
|
209 |
-
padding-right: 5px;
|
210 |
-
}
|
211 |
-
.chzn-container-multi .chzn-choices .search-choice-focus {
|
212 |
-
background: #d4d4d4;
|
213 |
-
}
|
214 |
-
.chzn-container-multi .chzn-choices .search-choice .search-choice-close {
|
215 |
-
display: block;
|
216 |
-
position: absolute;
|
217 |
-
right: 3px;
|
218 |
-
top: 4px;
|
219 |
-
width: 12px;
|
220 |
-
height: 12px;
|
221 |
-
font-size: 1px;
|
222 |
-
background: url('chosen-sprite.png') -42px 1px no-repeat;
|
223 |
-
}
|
224 |
-
.chzn-container-multi .chzn-choices .search-choice .search-choice-close:hover {
|
225 |
-
background-position: -42px -10px;
|
226 |
-
}
|
227 |
-
.chzn-container-multi .chzn-choices .search-choice-focus .search-choice-close {
|
228 |
-
background-position: -42px -10px;
|
229 |
-
}
|
230 |
-
/* @end */
|
231 |
-
|
232 |
-
/* @group Results */
|
233 |
-
.chzn-container .chzn-results {
|
234 |
-
margin: 0 4px 4px 0;
|
235 |
-
max-height: 240px;
|
236 |
-
padding: 0 0 0 4px;
|
237 |
-
position: relative;
|
238 |
-
overflow-x: hidden;
|
239 |
-
overflow-y: auto;
|
240 |
-
-webkit-overflow-scrolling: touch;
|
241 |
-
}
|
242 |
-
.chzn-container-multi .chzn-results {
|
243 |
-
margin: -1px 0 0;
|
244 |
-
padding: 0;
|
245 |
-
}
|
246 |
-
.chzn-container .chzn-results li {
|
247 |
-
display: none;
|
248 |
-
line-height: 15px;
|
249 |
-
padding: 5px 6px;
|
250 |
-
margin: 0;
|
251 |
-
list-style: none;
|
252 |
-
}
|
253 |
-
.chzn-container .chzn-results .active-result {
|
254 |
-
cursor: pointer;
|
255 |
-
display: list-item;
|
256 |
-
}
|
257 |
-
.chzn-container .chzn-results .highlighted {
|
258 |
-
background-color: #3875d7;
|
259 |
-
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3875d7', endColorstr='#2a62bc', GradientType=0 );
|
260 |
-
background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(20%, #3875d7), color-stop(90%, #2a62bc));
|
261 |
-
background-image: -webkit-linear-gradient(top, #3875d7 20%, #2a62bc 90%);
|
262 |
-
background-image: -moz-linear-gradient(top, #3875d7 20%, #2a62bc 90%);
|
263 |
-
background-image: -o-linear-gradient(top, #3875d7 20%, #2a62bc 90%);
|
264 |
-
background-image: linear-gradient(#3875d7 20%, #2a62bc 90%);
|
265 |
-
color: #fff;
|
266 |
-
}
|
267 |
-
.chzn-container .chzn-results li em {
|
268 |
-
background: #feffde;
|
269 |
-
font-style: normal;
|
270 |
-
}
|
271 |
-
.chzn-container .chzn-results .highlighted em {
|
272 |
-
background: transparent;
|
273 |
-
}
|
274 |
-
.chzn-container .chzn-results .no-results {
|
275 |
-
background: #f4f4f4;
|
276 |
-
display: list-item;
|
277 |
-
}
|
278 |
-
.chzn-container .chzn-results .group-result {
|
279 |
-
cursor: default;
|
280 |
-
color: #999;
|
281 |
-
font-weight: bold;
|
282 |
-
}
|
283 |
-
.chzn-container .chzn-results .group-option {
|
284 |
-
padding-left: 15px;
|
285 |
-
}
|
286 |
-
.chzn-container-multi .chzn-drop .result-selected {
|
287 |
-
display: none;
|
288 |
-
}
|
289 |
-
.chzn-container .chzn-results-scroll {
|
290 |
-
background: white;
|
291 |
-
margin: 0 4px;
|
292 |
-
position: absolute;
|
293 |
-
text-align: center;
|
294 |
-
width: 321px; /* This should by dynamic with js */
|
295 |
-
z-index: 1;
|
296 |
-
}
|
297 |
-
.chzn-container .chzn-results-scroll span {
|
298 |
-
display: inline-block;
|
299 |
-
height: 17px;
|
300 |
-
text-indent: -5000px;
|
301 |
-
width: 9px;
|
302 |
-
}
|
303 |
-
.chzn-container .chzn-results-scroll-down {
|
304 |
-
bottom: 0;
|
305 |
-
}
|
306 |
-
.chzn-container .chzn-results-scroll-down span {
|
307 |
-
background: url('chosen-sprite.png') no-repeat -4px -3px;
|
308 |
-
}
|
309 |
-
.chzn-container .chzn-results-scroll-up span {
|
310 |
-
background: url('chosen-sprite.png') no-repeat -22px -3px;
|
311 |
-
}
|
312 |
-
/* @end */
|
313 |
-
|
314 |
-
/* @group Active */
|
315 |
-
.chzn-container-active .chzn-single {
|
316 |
-
-webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
|
317 |
-
-moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
|
318 |
-
box-shadow : 0 0 5px rgba(0,0,0,.3);
|
319 |
-
border: 1px solid #5897fb;
|
320 |
-
}
|
321 |
-
.chzn-container-active .chzn-single-with-drop {
|
322 |
-
border: 1px solid #aaa;
|
323 |
-
-webkit-box-shadow: 0 1px 0 #fff inset;
|
324 |
-
-moz-box-shadow : 0 1px 0 #fff inset;
|
325 |
-
box-shadow : 0 1px 0 #fff inset;
|
326 |
-
background-color: #eee;
|
327 |
-
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0 );
|
328 |
-
background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(20%, #eeeeee), color-stop(80%, #ffffff));
|
329 |
-
background-image: -webkit-linear-gradient(top, #eeeeee 20%, #ffffff 80%);
|
330 |
-
background-image: -moz-linear-gradient(top, #eeeeee 20%, #ffffff 80%);
|
331 |
-
background-image: -o-linear-gradient(top, #eeeeee 20%, #ffffff 80%);
|
332 |
-
background-image: linear-gradient(#eeeeee 20%, #ffffff 80%);
|
333 |
-
-webkit-border-bottom-left-radius : 0;
|
334 |
-
-webkit-border-bottom-right-radius: 0;
|
335 |
-
-moz-border-radius-bottomleft : 0;
|
336 |
-
-moz-border-radius-bottomright: 0;
|
337 |
-
border-bottom-left-radius : 0;
|
338 |
-
border-bottom-right-radius: 0;
|
339 |
-
}
|
340 |
-
.chzn-container-active .chzn-single-with-drop div {
|
341 |
-
background: transparent;
|
342 |
-
border-left: none;
|
343 |
-
}
|
344 |
-
.chzn-container-active .chzn-single-with-drop div b {
|
345 |
-
background-position: -18px 2px;
|
346 |
-
}
|
347 |
-
.chzn-container-active .chzn-choices {
|
348 |
-
-webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
|
349 |
-
-moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
|
350 |
-
box-shadow : 0 0 5px rgba(0,0,0,.3);
|
351 |
-
border: 1px solid #5897fb;
|
352 |
-
}
|
353 |
-
.chzn-container-active .chzn-choices .search-field input {
|
354 |
-
color: #111 !important;
|
355 |
-
}
|
356 |
-
/* @end */
|
357 |
-
|
358 |
-
/* @group Disabled Support */
|
359 |
-
.chzn-disabled {
|
360 |
-
cursor: default;
|
361 |
-
opacity:0.5 !important;
|
362 |
-
}
|
363 |
-
.chzn-disabled .chzn-single {
|
364 |
-
cursor: default;
|
365 |
-
}
|
366 |
-
.chzn-disabled .chzn-choices .search-choice .search-choice-close {
|
367 |
-
cursor: default;
|
368 |
-
}
|
369 |
-
|
370 |
-
/* @group Right to Left */
|
371 |
-
.chzn-rtl { text-align: right; }
|
372 |
-
.chzn-rtl .chzn-single { padding: 0 8px 0 0; overflow: visible; }
|
373 |
-
.chzn-rtl .chzn-single span { margin-left: 26px; margin-right: 0; direction: rtl; }
|
374 |
-
|
375 |
-
.chzn-rtl .chzn-single div { left: 3px; right: auto; }
|
376 |
-
.chzn-rtl .chzn-single abbr {
|
377 |
-
left: 26px;
|
378 |
-
right: auto;
|
379 |
-
}
|
380 |
-
.chzn-rtl .chzn-choices .search-field input { direction: rtl; }
|
381 |
-
.chzn-rtl .chzn-choices li { float: right; }
|
382 |
-
.chzn-rtl .chzn-choices .search-choice { padding: 3px 5px 3px 19px; margin: 3px 5px 3px 0; }
|
383 |
-
.chzn-rtl .chzn-choices .search-choice .search-choice-close { left: 4px; right: auto; }
|
384 |
-
.chzn-rtl.chzn-container-single .chzn-results { margin: 0 0 4px 4px; padding: 0 4px 0 0; }
|
385 |
-
.chzn-rtl .chzn-results .group-option { padding-left: 0; padding-right: 15px; }
|
386 |
-
.chzn-rtl.chzn-container-active .chzn-single-with-drop div { border-right: none; }
|
387 |
-
.chzn-rtl .chzn-search input {
|
388 |
-
background: #fff url('chosen-sprite.png') no-repeat -30px -20px;
|
389 |
-
background: url('chosen-sprite.png') no-repeat -30px -20px, -webkit-gradient(linear, 0 0, 0 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
|
390 |
-
background: url('chosen-sprite.png') no-repeat -30px -20px, -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
391 |
-
background: url('chosen-sprite.png') no-repeat -30px -20px, -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
392 |
-
background: url('chosen-sprite.png') no-repeat -30px -20px, -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
393 |
-
background: url('chosen-sprite.png') no-repeat -30px -20px, linear-gradient(#eeeeee 1%, #ffffff 15%);
|
394 |
-
padding: 4px 5px 4px 20px;
|
395 |
-
direction: rtl;
|
396 |
-
}
|
397 |
-
.chzn-container-single.chzn-rtl .chzn-single div b {
|
398 |
-
background-position: 6px 2px;
|
399 |
-
}
|
400 |
-
.chzn-container-single.chzn-rtl .chzn-single-with-drop div b {
|
401 |
-
background-position: -12px 2px;
|
402 |
-
}
|
403 |
-
/* @end */
|
404 |
-
|
405 |
-
/* @group Retina compatibility */
|
406 |
-
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-resolution: 144dpi) {
|
407 |
-
.chzn-rtl .chzn-search input, .chzn-container-single .chzn-single abbr, .chzn-container-single .chzn-single div b, .chzn-container-single .chzn-search input, .chzn-container-multi .chzn-choices .search-choice .search-choice-close, .chzn-container .chzn-results-scroll-down span, .chzn-container .chzn-results-scroll-up span {
|
408 |
-
background-image: url('chosen-sprite@2x.png') !important;
|
409 |
-
background-repeat: no-repeat !important;
|
410 |
-
background-size: 52px 37px !important;
|
411 |
-
}
|
412 |
-
}
|
413 |
-
/* @end */
|
1 |
+
/* @group Base */
|
2 |
+
.chzn-container {
|
3 |
+
font-size: 13px;
|
4 |
+
position: relative;
|
5 |
+
display: inline-block;
|
6 |
+
zoom: 1;
|
7 |
+
*display: inline;
|
8 |
+
}
|
9 |
+
.chzn-container .chzn-drop {
|
10 |
+
background: #fff;
|
11 |
+
border: 1px solid #aaa;
|
12 |
+
border-top: 0;
|
13 |
+
position: absolute;
|
14 |
+
top: 29px;
|
15 |
+
left: 0;
|
16 |
+
-webkit-box-shadow: 0 4px 5px rgba(0,0,0,.15);
|
17 |
+
-moz-box-shadow : 0 4px 5px rgba(0,0,0,.15);
|
18 |
+
box-shadow : 0 4px 5px rgba(0,0,0,.15);
|
19 |
+
z-index: 1010;
|
20 |
+
}
|
21 |
+
/* @end */
|
22 |
+
|
23 |
+
/* @group Single Chosen */
|
24 |
+
.chzn-container-single .chzn-single {
|
25 |
+
background-color: #ffffff;
|
26 |
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0 );
|
27 |
+
background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(20%, #ffffff), color-stop(50%, #f6f6f6), color-stop(52%, #eeeeee), color-stop(100%, #f4f4f4));
|
28 |
+
background-image: -webkit-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
|
29 |
+
background-image: -moz-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
|
30 |
+
background-image: -o-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
|
31 |
+
background-image: linear-gradient(#ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
|
32 |
+
-webkit-border-radius: 5px;
|
33 |
+
-moz-border-radius : 5px;
|
34 |
+
border-radius : 5px;
|
35 |
+
-moz-background-clip : padding;
|
36 |
+
-webkit-background-clip: padding-box;
|
37 |
+
background-clip : padding-box;
|
38 |
+
border: 1px solid #aaaaaa;
|
39 |
+
-webkit-box-shadow: 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1);
|
40 |
+
-moz-box-shadow : 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1);
|
41 |
+
box-shadow : 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1);
|
42 |
+
display: block;
|
43 |
+
overflow: hidden;
|
44 |
+
white-space: nowrap;
|
45 |
+
position: relative;
|
46 |
+
height: 23px;
|
47 |
+
line-height: 24px;
|
48 |
+
padding: 0 0 0 8px;
|
49 |
+
color: #444444;
|
50 |
+
text-decoration: none;
|
51 |
+
}
|
52 |
+
.chzn-container-single .chzn-default {
|
53 |
+
color: #999;
|
54 |
+
}
|
55 |
+
.chzn-container-single .chzn-single span {
|
56 |
+
margin-right: 26px;
|
57 |
+
display: block;
|
58 |
+
overflow: hidden;
|
59 |
+
white-space: nowrap;
|
60 |
+
-o-text-overflow: ellipsis;
|
61 |
+
-ms-text-overflow: ellipsis;
|
62 |
+
text-overflow: ellipsis;
|
63 |
+
}
|
64 |
+
.chzn-container-single .chzn-single abbr {
|
65 |
+
display: block;
|
66 |
+
position: absolute;
|
67 |
+
right: 26px;
|
68 |
+
top: 6px;
|
69 |
+
width: 12px;
|
70 |
+
height: 12px;
|
71 |
+
font-size: 1px;
|
72 |
+
background: url('chosen-sprite.png') -42px 1px no-repeat;
|
73 |
+
}
|
74 |
+
.chzn-container-single .chzn-single abbr:hover {
|
75 |
+
background-position: -42px -10px;
|
76 |
+
}
|
77 |
+
.chzn-container-single.chzn-disabled .chzn-single abbr:hover {
|
78 |
+
background-position: -42px -10px;
|
79 |
+
}
|
80 |
+
.chzn-container-single .chzn-single div {
|
81 |
+
position: absolute;
|
82 |
+
right: 0;
|
83 |
+
top: 0;
|
84 |
+
display: block;
|
85 |
+
height: 100%;
|
86 |
+
width: 18px;
|
87 |
+
}
|
88 |
+
.chzn-container-single .chzn-single div b {
|
89 |
+
background: url('chosen-sprite.png') no-repeat 0px 2px;
|
90 |
+
display: block;
|
91 |
+
width: 100%;
|
92 |
+
height: 100%;
|
93 |
+
}
|
94 |
+
.chzn-container-single .chzn-search {
|
95 |
+
padding: 3px 4px;
|
96 |
+
position: relative;
|
97 |
+
margin: 0;
|
98 |
+
white-space: nowrap;
|
99 |
+
z-index: 1010;
|
100 |
+
}
|
101 |
+
.chzn-container-single .chzn-search input {
|
102 |
+
background: #fff url('chosen-sprite.png') no-repeat 100% -20px;
|
103 |
+
background: url('chosen-sprite.png') no-repeat 100% -20px, -webkit-gradient(linear, 0 0, 0 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
|
104 |
+
background: url('chosen-sprite.png') no-repeat 100% -20px, -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
105 |
+
background: url('chosen-sprite.png') no-repeat 100% -20px, -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
106 |
+
background: url('chosen-sprite.png') no-repeat 100% -20px, -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
107 |
+
background: url('chosen-sprite.png') no-repeat 100% -20px, linear-gradient(#eeeeee 1%, #ffffff 15%);
|
108 |
+
margin: 1px 0;
|
109 |
+
padding: 4px 20px 4px 5px;
|
110 |
+
outline: 0;
|
111 |
+
border: 1px solid #aaa;
|
112 |
+
font-family: sans-serif;
|
113 |
+
font-size: 1em;
|
114 |
+
}
|
115 |
+
.chzn-container-single .chzn-drop {
|
116 |
+
-webkit-border-radius: 0 0 4px 4px;
|
117 |
+
-moz-border-radius : 0 0 4px 4px;
|
118 |
+
border-radius : 0 0 4px 4px;
|
119 |
+
-moz-background-clip : padding;
|
120 |
+
-webkit-background-clip: padding-box;
|
121 |
+
background-clip : padding-box;
|
122 |
+
}
|
123 |
+
/* @end */
|
124 |
+
|
125 |
+
.chzn-container-single-nosearch .chzn-search input {
|
126 |
+
position: absolute;
|
127 |
+
left: -9000px;
|
128 |
+
}
|
129 |
+
|
130 |
+
/* @group Multi Chosen */
|
131 |
+
.chzn-container-multi .chzn-choices {
|
132 |
+
background-color: #fff;
|
133 |
+
background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
|
134 |
+
background-image: -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
135 |
+
background-image: -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
136 |
+
background-image: -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
137 |
+
background-image: linear-gradient(#eeeeee 1%, #ffffff 15%);
|
138 |
+
border: 1px solid #aaa;
|
139 |
+
margin: 0;
|
140 |
+
padding: 0;
|
141 |
+
cursor: text;
|
142 |
+
overflow: hidden;
|
143 |
+
height: auto !important;
|
144 |
+
height: 1%;
|
145 |
+
position: relative;
|
146 |
+
}
|
147 |
+
.chzn-container-multi .chzn-choices li {
|
148 |
+
float: left;
|
149 |
+
list-style: none;
|
150 |
+
}
|
151 |
+
.chzn-container-multi .chzn-choices .search-field {
|
152 |
+
white-space: nowrap;
|
153 |
+
margin: 0;
|
154 |
+
padding: 0;
|
155 |
+
}
|
156 |
+
.chzn-container-multi .chzn-choices .search-field input {
|
157 |
+
color: #666;
|
158 |
+
background: transparent !important;
|
159 |
+
border: 0 !important;
|
160 |
+
font-family: sans-serif;
|
161 |
+
font-size: 100%;
|
162 |
+
height: 15px;
|
163 |
+
padding: 5px;
|
164 |
+
margin: 1px 0;
|
165 |
+
outline: 0;
|
166 |
+
-webkit-box-shadow: none;
|
167 |
+
-moz-box-shadow : none;
|
168 |
+
box-shadow : none;
|
169 |
+
}
|
170 |
+
.chzn-container-multi .chzn-choices .search-field .default {
|
171 |
+
color: #999;
|
172 |
+
}
|
173 |
+
.chzn-container-multi .chzn-choices .search-choice {
|
174 |
+
-webkit-border-radius: 3px;
|
175 |
+
-moz-border-radius : 3px;
|
176 |
+
border-radius : 3px;
|
177 |
+
-moz-background-clip : padding;
|
178 |
+
-webkit-background-clip: padding-box;
|
179 |
+
background-clip : padding-box;
|
180 |
+
background-color: #e4e4e4;
|
181 |
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f4f4', endColorstr='#eeeeee', GradientType=0 );
|
182 |
+
background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
|
183 |
+
background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
184 |
+
background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
185 |
+
background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
186 |
+
background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
187 |
+
-webkit-box-shadow: 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
|
188 |
+
-moz-box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
|
189 |
+
box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
|
190 |
+
color: #333;
|
191 |
+
border: 1px solid #aaaaaa;
|
192 |
+
line-height: 13px;
|
193 |
+
padding: 3px 20px 3px 5px;
|
194 |
+
margin: 3px 0 3px 5px;
|
195 |
+
position: relative;
|
196 |
+
cursor: default;
|
197 |
+
}
|
198 |
+
.chzn-container-multi .chzn-choices .search-choice.search-choice-disabled {
|
199 |
+
background-color: #e4e4e4;
|
200 |
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f4f4', endColorstr='#eeeeee', GradientType=0 );
|
201 |
+
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
|
202 |
+
background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
203 |
+
background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
204 |
+
background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
205 |
+
background-image: -ms-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
206 |
+
background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
207 |
+
color: #666;
|
208 |
+
border: 1px solid #cccccc;
|
209 |
+
padding-right: 5px;
|
210 |
+
}
|
211 |
+
.chzn-container-multi .chzn-choices .search-choice-focus {
|
212 |
+
background: #d4d4d4;
|
213 |
+
}
|
214 |
+
.chzn-container-multi .chzn-choices .search-choice .search-choice-close {
|
215 |
+
display: block;
|
216 |
+
position: absolute;
|
217 |
+
right: 3px;
|
218 |
+
top: 4px;
|
219 |
+
width: 12px;
|
220 |
+
height: 12px;
|
221 |
+
font-size: 1px;
|
222 |
+
background: url('chosen-sprite.png') -42px 1px no-repeat;
|
223 |
+
}
|
224 |
+
.chzn-container-multi .chzn-choices .search-choice .search-choice-close:hover {
|
225 |
+
background-position: -42px -10px;
|
226 |
+
}
|
227 |
+
.chzn-container-multi .chzn-choices .search-choice-focus .search-choice-close {
|
228 |
+
background-position: -42px -10px;
|
229 |
+
}
|
230 |
+
/* @end */
|
231 |
+
|
232 |
+
/* @group Results */
|
233 |
+
.chzn-container .chzn-results {
|
234 |
+
margin: 0 4px 4px 0;
|
235 |
+
max-height: 240px;
|
236 |
+
padding: 0 0 0 4px;
|
237 |
+
position: relative;
|
238 |
+
overflow-x: hidden;
|
239 |
+
overflow-y: auto;
|
240 |
+
-webkit-overflow-scrolling: touch;
|
241 |
+
}
|
242 |
+
.chzn-container-multi .chzn-results {
|
243 |
+
margin: -1px 0 0;
|
244 |
+
padding: 0;
|
245 |
+
}
|
246 |
+
.chzn-container .chzn-results li {
|
247 |
+
display: none;
|
248 |
+
line-height: 15px;
|
249 |
+
padding: 5px 6px;
|
250 |
+
margin: 0;
|
251 |
+
list-style: none;
|
252 |
+
}
|
253 |
+
.chzn-container .chzn-results .active-result {
|
254 |
+
cursor: pointer;
|
255 |
+
display: list-item;
|
256 |
+
}
|
257 |
+
.chzn-container .chzn-results .highlighted {
|
258 |
+
background-color: #3875d7;
|
259 |
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3875d7', endColorstr='#2a62bc', GradientType=0 );
|
260 |
+
background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(20%, #3875d7), color-stop(90%, #2a62bc));
|
261 |
+
background-image: -webkit-linear-gradient(top, #3875d7 20%, #2a62bc 90%);
|
262 |
+
background-image: -moz-linear-gradient(top, #3875d7 20%, #2a62bc 90%);
|
263 |
+
background-image: -o-linear-gradient(top, #3875d7 20%, #2a62bc 90%);
|
264 |
+
background-image: linear-gradient(#3875d7 20%, #2a62bc 90%);
|
265 |
+
color: #fff;
|
266 |
+
}
|
267 |
+
.chzn-container .chzn-results li em {
|
268 |
+
background: #feffde;
|
269 |
+
font-style: normal;
|
270 |
+
}
|
271 |
+
.chzn-container .chzn-results .highlighted em {
|
272 |
+
background: transparent;
|
273 |
+
}
|
274 |
+
.chzn-container .chzn-results .no-results {
|
275 |
+
background: #f4f4f4;
|
276 |
+
display: list-item;
|
277 |
+
}
|
278 |
+
.chzn-container .chzn-results .group-result {
|
279 |
+
cursor: default;
|
280 |
+
color: #999;
|
281 |
+
font-weight: bold;
|
282 |
+
}
|
283 |
+
.chzn-container .chzn-results .group-option {
|
284 |
+
padding-left: 15px;
|
285 |
+
}
|
286 |
+
.chzn-container-multi .chzn-drop .result-selected {
|
287 |
+
display: none;
|
288 |
+
}
|
289 |
+
.chzn-container .chzn-results-scroll {
|
290 |
+
background: white;
|
291 |
+
margin: 0 4px;
|
292 |
+
position: absolute;
|
293 |
+
text-align: center;
|
294 |
+
width: 321px; /* This should by dynamic with js */
|
295 |
+
z-index: 1;
|
296 |
+
}
|
297 |
+
.chzn-container .chzn-results-scroll span {
|
298 |
+
display: inline-block;
|
299 |
+
height: 17px;
|
300 |
+
text-indent: -5000px;
|
301 |
+
width: 9px;
|
302 |
+
}
|
303 |
+
.chzn-container .chzn-results-scroll-down {
|
304 |
+
bottom: 0;
|
305 |
+
}
|
306 |
+
.chzn-container .chzn-results-scroll-down span {
|
307 |
+
background: url('chosen-sprite.png') no-repeat -4px -3px;
|
308 |
+
}
|
309 |
+
.chzn-container .chzn-results-scroll-up span {
|
310 |
+
background: url('chosen-sprite.png') no-repeat -22px -3px;
|
311 |
+
}
|
312 |
+
/* @end */
|
313 |
+
|
314 |
+
/* @group Active */
|
315 |
+
.chzn-container-active .chzn-single {
|
316 |
+
-webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
|
317 |
+
-moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
|
318 |
+
box-shadow : 0 0 5px rgba(0,0,0,.3);
|
319 |
+
border: 1px solid #5897fb;
|
320 |
+
}
|
321 |
+
.chzn-container-active .chzn-single-with-drop {
|
322 |
+
border: 1px solid #aaa;
|
323 |
+
-webkit-box-shadow: 0 1px 0 #fff inset;
|
324 |
+
-moz-box-shadow : 0 1px 0 #fff inset;
|
325 |
+
box-shadow : 0 1px 0 #fff inset;
|
326 |
+
background-color: #eee;
|
327 |
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0 );
|
328 |
+
background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(20%, #eeeeee), color-stop(80%, #ffffff));
|
329 |
+
background-image: -webkit-linear-gradient(top, #eeeeee 20%, #ffffff 80%);
|
330 |
+
background-image: -moz-linear-gradient(top, #eeeeee 20%, #ffffff 80%);
|
331 |
+
background-image: -o-linear-gradient(top, #eeeeee 20%, #ffffff 80%);
|
332 |
+
background-image: linear-gradient(#eeeeee 20%, #ffffff 80%);
|
333 |
+
-webkit-border-bottom-left-radius : 0;
|
334 |
+
-webkit-border-bottom-right-radius: 0;
|
335 |
+
-moz-border-radius-bottomleft : 0;
|
336 |
+
-moz-border-radius-bottomright: 0;
|
337 |
+
border-bottom-left-radius : 0;
|
338 |
+
border-bottom-right-radius: 0;
|
339 |
+
}
|
340 |
+
.chzn-container-active .chzn-single-with-drop div {
|
341 |
+
background: transparent;
|
342 |
+
border-left: none;
|
343 |
+
}
|
344 |
+
.chzn-container-active .chzn-single-with-drop div b {
|
345 |
+
background-position: -18px 2px;
|
346 |
+
}
|
347 |
+
.chzn-container-active .chzn-choices {
|
348 |
+
-webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
|
349 |
+
-moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
|
350 |
+
box-shadow : 0 0 5px rgba(0,0,0,.3);
|
351 |
+
border: 1px solid #5897fb;
|
352 |
+
}
|
353 |
+
.chzn-container-active .chzn-choices .search-field input {
|
354 |
+
color: #111 !important;
|
355 |
+
}
|
356 |
+
/* @end */
|
357 |
+
|
358 |
+
/* @group Disabled Support */
|
359 |
+
.chzn-disabled {
|
360 |
+
cursor: default;
|
361 |
+
opacity:0.5 !important;
|
362 |
+
}
|
363 |
+
.chzn-disabled .chzn-single {
|
364 |
+
cursor: default;
|
365 |
+
}
|
366 |
+
.chzn-disabled .chzn-choices .search-choice .search-choice-close {
|
367 |
+
cursor: default;
|
368 |
+
}
|
369 |
+
|
370 |
+
/* @group Right to Left */
|
371 |
+
.chzn-rtl { text-align: right; }
|
372 |
+
.chzn-rtl .chzn-single { padding: 0 8px 0 0; overflow: visible; }
|
373 |
+
.chzn-rtl .chzn-single span { margin-left: 26px; margin-right: 0; direction: rtl; }
|
374 |
+
|
375 |
+
.chzn-rtl .chzn-single div { left: 3px; right: auto; }
|
376 |
+
.chzn-rtl .chzn-single abbr {
|
377 |
+
left: 26px;
|
378 |
+
right: auto;
|
379 |
+
}
|
380 |
+
.chzn-rtl .chzn-choices .search-field input { direction: rtl; }
|
381 |
+
.chzn-rtl .chzn-choices li { float: right; }
|
382 |
+
.chzn-rtl .chzn-choices .search-choice { padding: 3px 5px 3px 19px; margin: 3px 5px 3px 0; }
|
383 |
+
.chzn-rtl .chzn-choices .search-choice .search-choice-close { left: 4px; right: auto; }
|
384 |
+
.chzn-rtl.chzn-container-single .chzn-results { margin: 0 0 4px 4px; padding: 0 4px 0 0; }
|
385 |
+
.chzn-rtl .chzn-results .group-option { padding-left: 0; padding-right: 15px; }
|
386 |
+
.chzn-rtl.chzn-container-active .chzn-single-with-drop div { border-right: none; }
|
387 |
+
.chzn-rtl .chzn-search input {
|
388 |
+
background: #fff url('chosen-sprite.png') no-repeat -30px -20px;
|
389 |
+
background: url('chosen-sprite.png') no-repeat -30px -20px, -webkit-gradient(linear, 0 0, 0 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
|
390 |
+
background: url('chosen-sprite.png') no-repeat -30px -20px, -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
391 |
+
background: url('chosen-sprite.png') no-repeat -30px -20px, -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
392 |
+
background: url('chosen-sprite.png') no-repeat -30px -20px, -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
393 |
+
background: url('chosen-sprite.png') no-repeat -30px -20px, linear-gradient(#eeeeee 1%, #ffffff 15%);
|
394 |
+
padding: 4px 5px 4px 20px;
|
395 |
+
direction: rtl;
|
396 |
+
}
|
397 |
+
.chzn-container-single.chzn-rtl .chzn-single div b {
|
398 |
+
background-position: 6px 2px;
|
399 |
+
}
|
400 |
+
.chzn-container-single.chzn-rtl .chzn-single-with-drop div b {
|
401 |
+
background-position: -12px 2px;
|
402 |
+
}
|
403 |
+
/* @end */
|
404 |
+
|
405 |
+
/* @group Retina compatibility */
|
406 |
+
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-resolution: 144dpi) {
|
407 |
+
.chzn-rtl .chzn-search input, .chzn-container-single .chzn-single abbr, .chzn-container-single .chzn-single div b, .chzn-container-single .chzn-search input, .chzn-container-multi .chzn-choices .search-choice .search-choice-close, .chzn-container .chzn-results-scroll-down span, .chzn-container .chzn-results-scroll-up span {
|
408 |
+
background-image: url('chosen-sprite@2x.png') !important;
|
409 |
+
background-repeat: no-repeat !important;
|
410 |
+
background-size: 52px 37px !important;
|
411 |
+
}
|
412 |
+
}
|
413 |
+
/* @end */
|
assets/js/chosen/chosen.jquery.js
CHANGED
@@ -1,1090 +1,1090 @@
|
|
1 |
-
// Chosen, a Select Box Enhancer for jQuery and Protoype
|
2 |
-
// by Patrick Filler for Harvest, http://getharvest.com
|
3 |
-
//
|
4 |
-
// Version 0.9.12
|
5 |
-
// Full source at https://github.com/harvesthq/chosen
|
6 |
-
// Copyright (c) 2011 Harvest http://getharvest.com
|
7 |
-
|
8 |
-
// MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
|
9 |
-
// This file is generated by `cake build`, do not edit it by hand.
|
10 |
-
(function() {
|
11 |
-
var SelectParser;
|
12 |
-
|
13 |
-
SelectParser = (function() {
|
14 |
-
|
15 |
-
function SelectParser() {
|
16 |
-
this.options_index = 0;
|
17 |
-
this.parsed = [];
|
18 |
-
}
|
19 |
-
|
20 |
-
SelectParser.prototype.add_node = function(child) {
|
21 |
-
if (child.nodeName.toUpperCase() === "OPTGROUP") {
|
22 |
-
return this.add_group(child);
|
23 |
-
} else {
|
24 |
-
return this.add_option(child);
|
25 |
-
}
|
26 |
-
};
|
27 |
-
|
28 |
-
SelectParser.prototype.add_group = function(group) {
|
29 |
-
var group_position, option, _i, _len, _ref, _results;
|
30 |
-
group_position = this.parsed.length;
|
31 |
-
this.parsed.push({
|
32 |
-
array_index: group_position,
|
33 |
-
group: true,
|
34 |
-
label: group.label,
|
35 |
-
children: 0,
|
36 |
-
disabled: group.disabled
|
37 |
-
});
|
38 |
-
_ref = group.childNodes;
|
39 |
-
_results = [];
|
40 |
-
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
41 |
-
option = _ref[_i];
|
42 |
-
_results.push(this.add_option(option, group_position, group.disabled));
|
43 |
-
}
|
44 |
-
return _results;
|
45 |
-
};
|
46 |
-
|
47 |
-
SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
|
48 |
-
if (option.nodeName.toUpperCase() === "OPTION") {
|
49 |
-
if (option.text !== "") {
|
50 |
-
if (group_position != null) {
|
51 |
-
this.parsed[group_position].children += 1;
|
52 |
-
}
|
53 |
-
this.parsed.push({
|
54 |
-
array_index: this.parsed.length,
|
55 |
-
options_index: this.options_index,
|
56 |
-
value: option.value,
|
57 |
-
text: option.text,
|
58 |
-
html: option.innerHTML,
|
59 |
-
selected: option.selected,
|
60 |
-
disabled: group_disabled === true ? group_disabled : option.disabled,
|
61 |
-
group_array_index: group_position,
|
62 |
-
classes: option.className,
|
63 |
-
style: option.style.cssText
|
64 |
-
});
|
65 |
-
} else {
|
66 |
-
this.parsed.push({
|
67 |
-
array_index: this.parsed.length,
|
68 |
-
options_index: this.options_index,
|
69 |
-
empty: true
|
70 |
-
});
|
71 |
-
}
|
72 |
-
return this.options_index += 1;
|
73 |
-
}
|
74 |
-
};
|
75 |
-
|
76 |
-
return SelectParser;
|
77 |
-
|
78 |
-
})();
|
79 |
-
|
80 |
-
SelectParser.select_to_array = function(select) {
|
81 |
-
var child, parser, _i, _len, _ref;
|
82 |
-
parser = new SelectParser();
|
83 |
-
_ref = select.childNodes;
|
84 |
-
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
85 |
-
child = _ref[_i];
|
86 |
-
parser.add_node(child);
|
87 |
-
}
|
88 |
-
return parser.parsed;
|
89 |
-
};
|
90 |
-
|
91 |
-
this.SelectParser = SelectParser;
|
92 |
-
|
93 |
-
}).call(this);
|
94 |
-
|
95 |
-
/*
|
96 |
-
Chosen source: generate output using 'cake build'
|
97 |
-
Copyright (c) 2011 by Harvest
|
98 |
-
*/
|
99 |
-
|
100 |
-
|
101 |
-
(function() {
|
102 |
-
var AbstractChosen, root;
|
103 |
-
|
104 |
-
root = this;
|
105 |
-
|
106 |
-
AbstractChosen = (function() {
|
107 |
-
|
108 |
-
function AbstractChosen(form_field, options) {
|
109 |
-
this.form_field = form_field;
|
110 |
-
this.options = options != null ? options : {};
|
111 |
-
this.is_multiple = this.form_field.multiple;
|
112 |
-
this.set_default_text();
|
113 |
-
this.set_default_values();
|
114 |
-
this.setup();
|
115 |
-
this.set_up_html();
|
116 |
-
this.register_observers();
|
117 |
-
this.finish_setup();
|
118 |
-
}
|
119 |
-
|
120 |
-
AbstractChosen.prototype.set_default_values = function() {
|
121 |
-
var _this = this;
|
122 |
-
this.click_test_action = function(evt) {
|
123 |
-
return _this.test_active_click(evt);
|
124 |
-
};
|
125 |
-
this.activate_action = function(evt) {
|
126 |
-
return _this.activate_field(evt);
|
127 |
-
};
|
128 |
-
this.active_field = false;
|
129 |
-
this.mouse_on_container = false;
|
130 |
-
this.results_showing = false;
|
131 |
-
this.result_highlighted = null;
|
132 |
-
this.result_single_selected = null;
|
133 |
-
this.allow_single_deselect = (this.options.allow_single_deselect != null) && (this.form_field.options[0] != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false;
|
134 |
-
this.disable_search_threshold = this.options.disable_search_threshold || 0;
|
135 |
-
this.disable_search = this.options.disable_search || false;
|
136 |
-
this.enable_split_word_search = this.options.enable_split_word_search != null ? this.options.enable_split_word_search : true;
|
137 |
-
this.search_contains = this.options.search_contains || false;
|
138 |
-
this.choices = 0;
|
139 |
-
this.single_backstroke_delete = this.options.single_backstroke_delete || false;
|
140 |
-
this.max_selected_options = this.options.max_selected_options || Infinity;
|
141 |
-
return this.inherit_select_classes = this.options.inherit_select_classes || false;
|
142 |
-
};
|
143 |
-
|
144 |
-
AbstractChosen.prototype.set_default_text = function() {
|
145 |
-
if (this.form_field.getAttribute("data-placeholder")) {
|
146 |
-
this.default_text = this.form_field.getAttribute("data-placeholder");
|
147 |
-
} else if (this.is_multiple) {
|
148 |
-
this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || "Select Some Options";
|
149 |
-
} else {
|
150 |
-
this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || "Select an Option";
|
151 |
-
}
|
152 |
-
return this.results_none_found = this.form_field.getAttribute("data-no_results_text") || this.options.no_results_text || "No results match";
|
153 |
-
};
|
154 |
-
|
155 |
-
AbstractChosen.prototype.mouse_enter = function() {
|
156 |
-
return this.mouse_on_container = true;
|
157 |
-
};
|
158 |
-
|
159 |
-
AbstractChosen.prototype.mouse_leave = function() {
|
160 |
-
return this.mouse_on_container = false;
|
161 |
-
};
|
162 |
-
|
163 |
-
AbstractChosen.prototype.input_focus = function(evt) {
|
164 |
-
var _this = this;
|
165 |
-
if (this.is_multiple) {
|
166 |
-
if (!this.active_field) {
|
167 |
-
return setTimeout((function() {
|
168 |
-
return _this.container_mousedown();
|
169 |
-
}), 50);
|
170 |
-
}
|
171 |
-
} else {
|
172 |
-
if (!this.active_field) {
|
173 |
-
return this.activate_field();
|
174 |
-
}
|
175 |
-
}
|
176 |
-
};
|
177 |
-
|
178 |
-
AbstractChosen.prototype.input_blur = function(evt) {
|
179 |
-
var _this = this;
|
180 |
-
if (!this.mouse_on_container) {
|
181 |
-
this.active_field = false;
|
182 |
-
return setTimeout((function() {
|
183 |
-
return _this.blur_test();
|
184 |
-
}), 100);
|
185 |
-
}
|
186 |
-
};
|
187 |
-
|
188 |
-
AbstractChosen.prototype.result_add_option = function(option) {
|
189 |
-
var classes, style;
|
190 |
-
if (!option.disabled) {
|
191 |
-
option.dom_id = this.container_id + "_o_" + option.array_index;
|
192 |
-
classes = option.selected && this.is_multiple ? [] : ["active-result"];
|
193 |
-
if (option.selected) {
|
194 |
-
classes.push("result-selected");
|
195 |
-
}
|
196 |
-
if (option.group_array_index != null) {
|
197 |
-
classes.push("group-option");
|
198 |
-
}
|
199 |
-
if (option.classes !== "") {
|
200 |
-
classes.push(option.classes);
|
201 |
-
}
|
202 |
-
style = option.style.cssText !== "" ? " style=\"" + option.style + "\"" : "";
|
203 |
-
return '<li id="' + option.dom_id + '" class="' + classes.join(' ') + '"' + style + '>' + option.html + '</li>';
|
204 |
-
} else {
|
205 |
-
return "";
|
206 |
-
}
|
207 |
-
};
|
208 |
-
|
209 |
-
AbstractChosen.prototype.results_update_field = function() {
|
210 |
-
this.set_default_text();
|
211 |
-
if (!this.is_multiple) {
|
212 |
-
this.results_reset_cleanup();
|
213 |
-
}
|
214 |
-
this.result_clear_highlight();
|
215 |
-
this.result_single_selected = null;
|
216 |
-
return this.results_build();
|
217 |
-
};
|
218 |
-
|
219 |
-
AbstractChosen.prototype.results_toggle = function() {
|
220 |
-
if (this.results_showing) {
|
221 |
-
return this.results_hide();
|
222 |
-
} else {
|
223 |
-
return this.results_show();
|
224 |
-
}
|
225 |
-
};
|
226 |
-
|
227 |
-
AbstractChosen.prototype.results_search = function(evt) {
|
228 |
-
if (this.results_showing) {
|
229 |
-
return this.winnow_results();
|
230 |
-
} else {
|
231 |
-
return this.results_show();
|
232 |
-
}
|
233 |
-
};
|
234 |
-
|
235 |
-
AbstractChosen.prototype.keyup_checker = function(evt) {
|
236 |
-
var stroke, _ref;
|
237 |
-
stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
|
238 |
-
this.search_field_scale();
|
239 |
-
switch (stroke) {
|
240 |
-
case 8:
|
241 |
-
if (this.is_multiple && this.backstroke_length < 1 && this.choices > 0) {
|
242 |
-
return this.keydown_backstroke();
|
243 |
-
} else if (!this.pending_backstroke) {
|
244 |
-
this.result_clear_highlight();
|
245 |
-
return this.results_search();
|
246 |
-
}
|
247 |
-
break;
|
248 |
-
case 13:
|
249 |
-
evt.preventDefault();
|
250 |
-
if (this.results_showing) {
|
251 |
-
return this.result_select(evt);
|
252 |
-
}
|
253 |
-
break;
|
254 |
-
case 27:
|
255 |
-
if (this.results_showing) {
|
256 |
-
this.results_hide();
|
257 |
-
}
|
258 |
-
return true;
|
259 |
-
case 9:
|
260 |
-
case 38:
|
261 |
-
case 40:
|
262 |
-
case 16:
|
263 |
-
case 91:
|
264 |
-
case 17:
|
265 |
-
break;
|
266 |
-
default:
|
267 |
-
return this.results_search();
|
268 |
-
}
|
269 |
-
};
|
270 |
-
|
271 |
-
AbstractChosen.prototype.generate_field_id = function() {
|
272 |
-
var new_id;
|
273 |
-
new_id = this.generate_random_id();
|
274 |
-
this.form_field.id = new_id;
|
275 |
-
return new_id;
|
276 |
-
};
|
277 |
-
|
278 |
-
AbstractChosen.prototype.generate_random_char = function() {
|
279 |
-
var chars, newchar, rand;
|
280 |
-
chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
281 |
-
rand = Math.floor(Math.random() * chars.length);
|
282 |
-
return newchar = chars.substring(rand, rand + 1);
|
283 |
-
};
|
284 |
-
|
285 |
-
return AbstractChosen;
|
286 |
-
|
287 |
-
})();
|
288 |
-
|
289 |
-
root.AbstractChosen = AbstractChosen;
|
290 |
-
|
291 |
-
}).call(this);
|
292 |
-
|
293 |
-
/*
|
294 |
-
Chosen source: generate output using 'cake build'
|
295 |
-
Copyright (c) 2011 by Harvest
|
296 |
-
*/
|
297 |
-
|
298 |
-
|
299 |
-
(function() {
|
300 |
-
var $, Chosen, get_side_border_padding, root,
|
301 |
-
__hasProp = {}.hasOwnProperty,
|
302 |
-
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
303 |
-
|
304 |
-
root = this;
|
305 |
-
|
306 |
-
$ = jQuery;
|
307 |
-
|
308 |
-
$.fn.extend({
|
309 |
-
chosen: function(options) {
|
310 |
-
var browser, match, ua;
|
311 |
-
ua = navigator.userAgent.toLowerCase();
|
312 |
-
match = /(msie) ([\w.]+)/.exec(ua) || [];
|
313 |
-
browser = {
|
314 |
-
name: match[1] || "",
|
315 |
-
version: match[2] || "0"
|
316 |
-
};
|
317 |
-
if (browser.name === "msie" && (browser.version === "6.0" || (browser.version === "7.0" && document.documentMode === 7))) {
|
318 |
-
return this;
|
319 |
-
}
|
320 |
-
return this.each(function(input_field) {
|
321 |
-
var $this;
|
322 |
-
$this = $(this);
|
323 |
-
if (!$this.hasClass("chzn-done")) {
|
324 |
-
return $this.data('chosen', new Chosen(this, options));
|
325 |
-
}
|
326 |
-
});
|
327 |
-
}
|
328 |
-
});
|
329 |
-
|
330 |
-
Chosen = (function(_super) {
|
331 |
-
|
332 |
-
__extends(Chosen, _super);
|
333 |
-
|
334 |
-
function Chosen() {
|
335 |
-
return Chosen.__super__.constructor.apply(this, arguments);
|
336 |
-
}
|
337 |
-
|
338 |
-
Chosen.prototype.setup = function() {
|
339 |
-
this.form_field_jq = $(this.form_field);
|
340 |
-
this.current_value = this.form_field_jq.val();
|
341 |
-
return this.is_rtl = this.form_field_jq.hasClass("chzn-rtl");
|
342 |
-
};
|
343 |
-
|
344 |
-
Chosen.prototype.finish_setup = function() {
|
345 |
-
return this.form_field_jq.addClass("chzn-done");
|
346 |
-
};
|
347 |
-
|
348 |
-
Chosen.prototype.set_up_html = function() {
|
349 |
-
var container_classes, container_div, container_props, dd_top, dd_width, sf_width;
|
350 |
-
this.container_id = this.form_field.id.length ? this.form_field.id.replace(/[^\w]/g, '_') : this.generate_field_id();
|
351 |
-
this.container_id += "_chzn";
|
352 |
-
container_classes = ["chzn-container"];
|
353 |
-
container_classes.push("chzn-container-" + (this.is_multiple ? "multi" : "single"));
|
354 |
-
if (this.inherit_select_classes && this.form_field.className) {
|
355 |
-
container_classes.push(this.form_field.className);
|
356 |
-
}
|
357 |
-
if (this.is_rtl) {
|
358 |
-
container_classes.push("chzn-rtl");
|
359 |
-
}
|
360 |
-
this.f_width = this.form_field_jq.outerWidth();
|
361 |
-
container_props = {
|
362 |
-
id: this.container_id,
|
363 |
-
"class": container_classes.join(' '),
|
364 |
-
style: 'width: ' + this.f_width + 'px;',
|
365 |
-
title: this.form_field.title
|
366 |
-
};
|
367 |
-
container_div = $("<div />", container_props);
|
368 |
-
if (this.is_multiple) {
|
369 |
-
container_div.html('<ul class="chzn-choices"><li class="search-field"><input type="text" value="' + this.default_text + '" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chzn-drop" style="left:-9000px;"><ul class="chzn-results"></ul></div>');
|
370 |
-
} else {
|
371 |
-
container_div.html('<a href="javascript:void(0)" class="chzn-single chzn-default" tabindex="-1"><span>' + this.default_text + '</span><div><b></b></div></a><div class="chzn-drop" style="left:-9000px;"><div class="chzn-search"><input type="text" autocomplete="off" /></div><ul class="chzn-results"></ul></div>');
|
372 |
-
}
|
373 |
-
this.form_field_jq.hide().after(container_div);
|
374 |
-
this.container = $('#' + this.container_id);
|
375 |
-
this.dropdown = this.container.find('div.chzn-drop').first();
|
376 |
-
dd_top = this.container.height();
|
377 |
-
dd_width = this.f_width - get_side_border_padding(this.dropdown);
|
378 |
-
this.dropdown.css({
|
379 |
-
"width": dd_width + "px",
|
380 |
-
"top": dd_top + "px"
|
381 |
-
});
|
382 |
-
this.search_field = this.container.find('input').first();
|
383 |
-
this.search_results = this.container.find('ul.chzn-results').first();
|
384 |
-
this.search_field_scale();
|
385 |
-
this.search_no_results = this.container.find('li.no-results').first();
|
386 |
-
if (this.is_multiple) {
|
387 |
-
this.search_choices = this.container.find('ul.chzn-choices').first();
|
388 |
-
this.search_container = this.container.find('li.search-field').first();
|
389 |
-
} else {
|
390 |
-
this.search_container = this.container.find('div.chzn-search').first();
|
391 |
-
this.selected_item = this.container.find('.chzn-single').first();
|
392 |
-
sf_width = dd_width - get_side_border_padding(this.search_container) - get_side_border_padding(this.search_field);
|
393 |
-
this.search_field.css({
|
394 |
-
"width": sf_width + "px"
|
395 |
-
});
|
396 |
-
}
|
397 |
-
this.results_build();
|
398 |
-
this.set_tab_index();
|
399 |
-
return this.form_field_jq.trigger("liszt:ready", {
|
400 |
-
chosen: this
|
401 |
-
});
|
402 |
-
};
|
403 |
-
|
404 |
-
Chosen.prototype.register_observers = function() {
|
405 |
-
var _this = this;
|
406 |
-
this.container.mousedown(function(evt) {
|
407 |
-
_this.container_mousedown(evt);
|
408 |
-
});
|
409 |
-
this.container.mouseup(function(evt) {
|
410 |
-
_this.container_mouseup(evt);
|
411 |
-
});
|
412 |
-
this.container.mouseenter(function(evt) {
|
413 |
-
_this.mouse_enter(evt);
|
414 |
-
});
|
415 |
-
this.container.mouseleave(function(evt) {
|
416 |
-
_this.mouse_leave(evt);
|
417 |
-
});
|
418 |
-
this.search_results.mouseup(function(evt) {
|
419 |
-
_this.search_results_mouseup(evt);
|
420 |
-
});
|
421 |
-
this.search_results.mouseover(function(evt) {
|
422 |
-
_this.search_results_mouseover(evt);
|
423 |
-
});
|
424 |
-
this.search_results.mouseout(function(evt) {
|
425 |
-
_this.search_results_mouseout(evt);
|
426 |
-
});
|
427 |
-
this.form_field_jq.bind("liszt:updated", function(evt) {
|
428 |
-
_this.results_update_field(evt);
|
429 |
-
});
|
430 |
-
this.form_field_jq.bind("liszt:activate", function(evt) {
|
431 |
-
_this.activate_field(evt);
|
432 |
-
});
|
433 |
-
this.form_field_jq.bind("liszt:open", function(evt) {
|
434 |
-
_this.container_mousedown(evt);
|
435 |
-
});
|
436 |
-
this.search_field.blur(function(evt) {
|
437 |
-
_this.input_blur(evt);
|
438 |
-
});
|
439 |
-
this.search_field.keyup(function(evt) {
|
440 |
-
_this.keyup_checker(evt);
|
441 |
-
});
|
442 |
-
this.search_field.keydown(function(evt) {
|
443 |
-
_this.keydown_checker(evt);
|
444 |
-
});
|
445 |
-
this.search_field.focus(function(evt) {
|
446 |
-
_this.input_focus(evt);
|
447 |
-
});
|
448 |
-
if (this.is_multiple) {
|
449 |
-
return this.search_choices.click(function(evt) {
|
450 |
-
_this.choices_click(evt);
|
451 |
-
});
|
452 |
-
} else {
|
453 |
-
return this.container.click(function(evt) {
|
454 |
-
evt.preventDefault();
|
455 |
-
});
|
456 |
-
}
|
457 |
-
};
|
458 |
-
|
459 |
-
Chosen.prototype.search_field_disabled = function() {
|
460 |
-
this.is_disabled = this.form_field_jq[0].disabled;
|
461 |
-
if (this.is_disabled) {
|
462 |
-
this.container.addClass('chzn-disabled');
|
463 |
-
this.search_field[0].disabled = true;
|
464 |
-
if (!this.is_multiple) {
|
465 |
-
this.selected_item.unbind("focus", this.activate_action);
|
466 |
-
}
|
467 |
-
return this.close_field();
|
468 |
-
} else {
|
469 |
-
this.container.removeClass('chzn-disabled');
|
470 |
-
this.search_field[0].disabled = false;
|
471 |
-
if (!this.is_multiple) {
|
472 |
-
return this.selected_item.bind("focus", this.activate_action);
|
473 |
-
}
|
474 |
-
}
|
475 |
-
};
|
476 |
-
|
477 |
-
Chosen.prototype.container_mousedown = function(evt) {
|
478 |
-
var target_closelink;
|
479 |
-
if (!this.is_disabled) {
|
480 |
-
target_closelink = evt != null ? ($(evt.target)).hasClass("search-choice-close") : false;
|
481 |
-
if (evt && evt.type === "mousedown" && !this.results_showing) {
|
482 |
-
evt.preventDefault();
|
483 |
-
}
|
484 |
-
if (!this.pending_destroy_click && !target_closelink) {
|
485 |
-
if (!this.active_field) {
|
486 |
-
if (this.is_multiple) {
|
487 |
-
this.search_field.val("");
|
488 |
-
}
|
489 |
-
$(document).click(this.click_test_action);
|
490 |
-
this.results_show();
|
491 |
-
} else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chzn-single").length)) {
|
492 |
-
evt.preventDefault();
|
493 |
-
this.results_toggle();
|
494 |
-
}
|
495 |
-
return this.activate_field();
|
496 |
-
} else {
|
497 |
-
return this.pending_destroy_click = false;
|
498 |
-
}
|
499 |
-
}
|
500 |
-
};
|
501 |
-
|
502 |
-
Chosen.prototype.container_mouseup = function(evt) {
|
503 |
-
if (evt.target.nodeName === "ABBR" && !this.is_disabled) {
|
504 |
-
return this.results_reset(evt);
|
505 |
-
}
|
506 |
-
};
|
507 |
-
|
508 |
-
Chosen.prototype.blur_test = function(evt) {
|
509 |
-
if (!this.active_field && this.container.hasClass("chzn-container-active")) {
|
510 |
-
return this.close_field();
|
511 |
-
}
|
512 |
-
};
|
513 |
-
|
514 |
-
Chosen.prototype.close_field = function() {
|
515 |
-
$(document).unbind("click", this.click_test_action);
|
516 |
-
this.active_field = false;
|
517 |
-
this.results_hide();
|
518 |
-
this.container.removeClass("chzn-container-active");
|
519 |
-
this.winnow_results_clear();
|
520 |
-
this.clear_backstroke();
|
521 |
-
this.show_search_field_default();
|
522 |
-
return this.search_field_scale();
|
523 |
-
};
|
524 |
-
|
525 |
-
Chosen.prototype.activate_field = function() {
|
526 |
-
this.container.addClass("chzn-container-active");
|
527 |
-
this.active_field = true;
|
528 |
-
this.search_field.val(this.search_field.val());
|
529 |
-
return this.search_field.focus();
|
530 |
-
};
|
531 |
-
|
532 |
-
Chosen.prototype.test_active_click = function(evt) {
|
533 |
-
if ($(evt.target).parents('#' + this.container_id).length) {
|
534 |
-
return this.active_field = true;
|
535 |
-
} else {
|
536 |
-
return this.close_field();
|
537 |
-
}
|
538 |
-
};
|
539 |
-
|
540 |
-
Chosen.prototype.results_build = function() {
|
541 |
-
var content, data, _i, _len, _ref;
|
542 |
-
this.parsing = true;
|
543 |
-
this.results_data = root.SelectParser.select_to_array(this.form_field);
|
544 |
-
if (this.is_multiple && this.choices > 0) {
|
545 |
-
this.search_choices.find("li.search-choice").remove();
|
546 |
-
this.choices = 0;
|
547 |
-
} else if (!this.is_multiple) {
|
548 |
-
this.selected_item.addClass("chzn-default").find("span").text(this.default_text);
|
549 |
-
if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
|
550 |
-
this.container.addClass("chzn-container-single-nosearch");
|
551 |
-
} else {
|
552 |
-
this.container.removeClass("chzn-container-single-nosearch");
|
553 |
-
}
|
554 |
-
}
|
555 |
-
content = '';
|
556 |
-
_ref = this.results_data;
|
557 |
-
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
558 |
-
data = _ref[_i];
|
559 |
-
if (data.group) {
|
560 |
-
content += this.result_add_group(data);
|
561 |
-
} else if (!data.empty) {
|
562 |
-
content += this.result_add_option(data);
|
563 |
-
if (data.selected && this.is_multiple) {
|
564 |
-
this.choice_build(data);
|
565 |
-
} else if (data.selected && !this.is_multiple) {
|
566 |
-
this.selected_item.removeClass("chzn-default").find("span").text(data.text);
|
567 |
-
if (this.allow_single_deselect) {
|
568 |
-
this.single_deselect_control_build();
|
569 |
-
}
|
570 |
-
}
|
571 |
-
}
|
572 |
-
}
|
573 |
-
this.search_field_disabled();
|
574 |
-
this.show_search_field_default();
|
575 |
-
this.search_field_scale();
|
576 |
-
this.search_results.html(content);
|
577 |
-
return this.parsing = false;
|
578 |
-
};
|
579 |
-
|
580 |
-
Chosen.prototype.result_add_group = function(group) {
|
581 |
-
if (!group.disabled) {
|
582 |
-
group.dom_id = this.container_id + "_g_" + group.array_index;
|
583 |
-
return '<li id="' + group.dom_id + '" class="group-result">' + $("<div />").text(group.label).html() + '</li>';
|
584 |
-
} else {
|
585 |
-
return "";
|
586 |
-
}
|
587 |
-
};
|
588 |
-
|
589 |
-
Chosen.prototype.result_do_highlight = function(el) {
|
590 |
-
var high_bottom, high_top, maxHeight, visible_bottom, visible_top;
|
591 |
-
if (el.length) {
|
592 |
-
this.result_clear_highlight();
|
593 |
-
this.result_highlight = el;
|
594 |
-
this.result_highlight.addClass("highlighted");
|
595 |
-
maxHeight = parseInt(this.search_results.css("maxHeight"), 10);
|
596 |
-
visible_top = this.search_results.scrollTop();
|
597 |
-
visible_bottom = maxHeight + visible_top;
|
598 |
-
high_top = this.result_highlight.position().top + this.search_results.scrollTop();
|
599 |
-
high_bottom = high_top + this.result_highlight.outerHeight();
|
600 |
-
if (high_bottom >= visible_bottom) {
|
601 |
-
return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0);
|
602 |
-
} else if (high_top < visible_top) {
|
603 |
-
return this.search_results.scrollTop(high_top);
|
604 |
-
}
|
605 |
-
}
|
606 |
-
};
|
607 |
-
|
608 |
-
Chosen.prototype.result_clear_highlight = function() {
|
609 |
-
if (this.result_highlight) {
|
610 |
-
this.result_highlight.removeClass("highlighted");
|
611 |
-
}
|
612 |
-
return this.result_highlight = null;
|
613 |
-
};
|
614 |
-
|
615 |
-
Chosen.prototype.results_show = function() {
|
616 |
-
var dd_top;
|
617 |
-
if (!this.is_multiple) {
|
618 |
-
this.selected_item.addClass("chzn-single-with-drop");
|
619 |
-
if (this.result_single_selected) {
|
620 |
-
this.result_do_highlight(this.result_single_selected);
|
621 |
-
}
|
622 |
-
} else if (this.max_selected_options <= this.choices) {
|
623 |
-
this.form_field_jq.trigger("liszt:maxselected", {
|
624 |
-
chosen: this
|
625 |
-
});
|
626 |
-
return false;
|
627 |
-
}
|
628 |
-
dd_top = this.is_multiple ? this.container.height() : this.container.height() - 1;
|
629 |
-
this.form_field_jq.trigger("liszt:showing_dropdown", {
|
630 |
-
chosen: this
|
631 |
-
});
|
632 |
-
this.dropdown.css({
|
633 |
-
"top": dd_top + "px",
|
634 |
-
"left": 0
|
635 |
-
});
|
636 |
-
this.results_showing = true;
|
637 |
-
this.search_field.focus();
|
638 |
-
this.search_field.val(this.search_field.val());
|
639 |
-
return this.winnow_results();
|
640 |
-
};
|
641 |
-
|
642 |
-
Chosen.prototype.results_hide = function() {
|
643 |
-
if (!this.is_multiple) {
|
644 |
-
this.selected_item.removeClass("chzn-single-with-drop");
|
645 |
-
}
|
646 |
-
this.result_clear_highlight();
|
647 |
-
this.form_field_jq.trigger("liszt:hiding_dropdown", {
|
648 |
-
chosen: this
|
649 |
-
});
|
650 |
-
this.dropdown.css({
|
651 |
-
"left": "-9000px"
|
652 |
-
});
|
653 |
-
return this.results_showing = false;
|
654 |
-
};
|
655 |
-
|
656 |
-
Chosen.prototype.set_tab_index = function(el) {
|
657 |
-
var ti;
|
658 |
-
if (this.form_field_jq.attr("tabindex")) {
|
659 |
-
ti = this.form_field_jq.attr("tabindex");
|
660 |
-
this.form_field_jq.attr("tabindex", -1);
|
661 |
-
return this.search_field.attr("tabindex", ti);
|
662 |
-
}
|
663 |
-
};
|
664 |
-
|
665 |
-
Chosen.prototype.show_search_field_default = function() {
|
666 |
-
if (this.is_multiple && this.choices < 1 && !this.active_field) {
|
667 |
-
this.search_field.val(this.default_text);
|
668 |
-
return this.search_field.addClass("default");
|
669 |
-
} else {
|
670 |
-
this.search_field.val("");
|
671 |
-
return this.search_field.removeClass("default");
|
672 |
-
}
|
673 |
-
};
|
674 |
-
|
675 |
-
Chosen.prototype.search_results_mouseup = function(evt) {
|
676 |
-
var target;
|
677 |
-
target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
|
678 |
-
if (target.length) {
|
679 |
-
this.result_highlight = target;
|
680 |
-
this.result_select(evt);
|
681 |
-
return this.search_field.focus();
|
682 |
-
}
|
683 |
-
};
|
684 |
-
|
685 |
-
Chosen.prototype.search_results_mouseover = function(evt) {
|
686 |
-
var target;
|
687 |
-
target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
|
688 |
-
if (target) {
|
689 |
-
return this.result_do_highlight(target);
|
690 |
-
}
|
691 |
-
};
|
692 |
-
|
693 |
-
Chosen.prototype.search_results_mouseout = function(evt) {
|
694 |
-
if ($(evt.target).hasClass("active-result" || $(evt.target).parents('.active-result').first())) {
|
695 |
-
return this.result_clear_highlight();
|
696 |
-
}
|
697 |
-
};
|
698 |
-
|
699 |
-
Chosen.prototype.choices_click = function(evt) {
|
700 |
-
evt.preventDefault();
|
701 |
-
if (this.active_field && !($(evt.target).hasClass("search-choice" || $(evt.target).parents('.search-choice').first)) && !this.results_showing) {
|
702 |
-
return this.results_show();
|
703 |
-
}
|
704 |
-
};
|
705 |
-
|
706 |
-
Chosen.prototype.choice_build = function(item) {
|
707 |
-
var choice_id, html, link,
|
708 |
-
_this = this;
|
709 |
-
if (this.is_multiple && this.max_selected_options <= this.choices) {
|
710 |
-
this.form_field_jq.trigger("liszt:maxselected", {
|
711 |
-
chosen: this
|
712 |
-
});
|
713 |
-
return false;
|
714 |
-
}
|
715 |
-
choice_id = this.container_id + "_c_" + item.array_index;
|
716 |
-
this.choices += 1;
|
717 |
-
if (item.disabled) {
|
718 |
-
html = '<li class="search-choice search-choice-disabled" id="' + choice_id + '"><span>' + item.html + '</span></li>';
|
719 |
-
} else {
|
720 |
-
html = '<li class="search-choice" id="' + choice_id + '"><span>' + item.html + '</span><a href="javascript:void(0)" class="search-choice-close" rel="' + item.array_index + '"></a></li>';
|
721 |
-
}
|
722 |
-
this.search_container.before(html);
|
723 |
-
link = $('#' + choice_id).find("a").first();
|
724 |
-
return link.click(function(evt) {
|
725 |
-
return _this.choice_destroy_link_click(evt);
|
726 |
-
});
|
727 |
-
};
|
728 |
-
|
729 |
-
Chosen.prototype.choice_destroy_link_click = function(evt) {
|
730 |
-
evt.preventDefault();
|
731 |
-
if (!this.is_disabled) {
|
732 |
-
this.pending_destroy_click = true;
|
733 |
-
return this.choice_destroy($(evt.target));
|
734 |
-
} else {
|
735 |
-
return evt.stopPropagation;
|
736 |
-
}
|
737 |
-
};
|
738 |
-
|
739 |
-
Chosen.prototype.choice_destroy = function(link) {
|
740 |
-
if (this.result_deselect(link.attr("rel"))) {
|
741 |
-
this.choices -= 1;
|
742 |
-
this.show_search_field_default();
|
743 |
-
if (this.is_multiple && this.choices > 0 && this.search_field.val().length < 1) {
|
744 |
-
this.results_hide();
|
745 |
-
}
|
746 |
-
link.parents('li').first().remove();
|
747 |
-
return this.search_field_scale();
|
748 |
-
}
|
749 |
-
};
|
750 |
-
|
751 |
-
Chosen.prototype.results_reset = function() {
|
752 |
-
this.form_field.options[0].selected = true;
|
753 |
-
this.selected_item.find("span").text(this.default_text);
|
754 |
-
if (!this.is_multiple) {
|
755 |
-
this.selected_item.addClass("chzn-default");
|
756 |
-
}
|
757 |
-
this.show_search_field_default();
|
758 |
-
this.results_reset_cleanup();
|
759 |
-
this.form_field_jq.trigger("change");
|
760 |
-
if (this.active_field) {
|
761 |
-
return this.results_hide();
|
762 |
-
}
|
763 |
-
};
|
764 |
-
|
765 |
-
Chosen.prototype.results_reset_cleanup = function() {
|
766 |
-
this.current_value = this.form_field_jq.val();
|
767 |
-
return this.selected_item.find("abbr").remove();
|
768 |
-
};
|
769 |
-
|
770 |
-
Chosen.prototype.result_select = function(evt) {
|
771 |
-
var high, high_id, item, position;
|
772 |
-
if (this.result_highlight) {
|
773 |
-
high = this.result_highlight;
|
774 |
-
high_id = high.attr("id");
|
775 |
-
this.result_clear_highlight();
|
776 |
-
if (this.is_multiple) {
|
777 |
-
this.result_deactivate(high);
|
778 |
-
} else {
|
779 |
-
this.search_results.find(".result-selected").removeClass("result-selected");
|
780 |
-
this.result_single_selected = high;
|
781 |
-
this.selected_item.removeClass("chzn-default");
|
782 |
-
}
|
783 |
-
high.addClass("result-selected");
|
784 |
-
position = high_id.substr(high_id.lastIndexOf("_") + 1);
|
785 |
-
item = this.results_data[position];
|
786 |
-
item.selected = true;
|
787 |
-
this.form_field.options[item.options_index].selected = true;
|
788 |
-
if (this.is_multiple) {
|
789 |
-
this.choice_build(item);
|
790 |
-
} else {
|
791 |
-
this.selected_item.find("span").first().text(item.text);
|
792 |
-
if (this.allow_single_deselect) {
|
793 |
-
this.single_deselect_control_build();
|
794 |
-
}
|
795 |
-
}
|
796 |
-
if (!((evt.metaKey || evt.ctrlKey) && this.is_multiple)) {
|
797 |
-
this.results_hide();
|
798 |
-
}
|
799 |
-
this.search_field.val("");
|
800 |
-
if (this.is_multiple || this.form_field_jq.val() !== this.current_value) {
|
801 |
-
this.form_field_jq.trigger("change", {
|
802 |
-
'selected': this.form_field.options[item.options_index].value
|
803 |
-
});
|
804 |
-
}
|
805 |
-
this.current_value = this.form_field_jq.val();
|
806 |
-
return this.search_field_scale();
|
807 |
-
}
|
808 |
-
};
|
809 |
-
|
810 |
-
Chosen.prototype.result_activate = function(el) {
|
811 |
-
return el.addClass("active-result");
|
812 |
-
};
|
813 |
-
|
814 |
-
Chosen.prototype.result_deactivate = function(el) {
|
815 |
-
return el.removeClass("active-result");
|
816 |
-
};
|
817 |
-
|
818 |
-
Chosen.prototype.result_deselect = function(pos) {
|
819 |
-
var result, result_data;
|
820 |
-
result_data = this.results_data[pos];
|
821 |
-
if (!this.form_field.options[result_data.options_index].disabled) {
|
822 |
-
result_data.selected = false;
|
823 |
-
this.form_field.options[result_data.options_index].selected = false;
|
824 |
-
result = $("#" + this.container_id + "_o_" + pos);
|
825 |
-
result.removeClass("result-selected").addClass("active-result").show();
|
826 |
-
this.result_clear_highlight();
|
827 |
-
this.winnow_results();
|
828 |
-
this.form_field_jq.trigger("change", {
|
829 |
-
deselected: this.form_field.options[result_data.options_index].value
|
830 |
-
});
|
831 |
-
this.search_field_scale();
|
832 |
-
return true;
|
833 |
-
} else {
|
834 |
-
return false;
|
835 |
-
}
|
836 |
-
};
|
837 |
-
|
838 |
-
Chosen.prototype.single_deselect_control_build = function() {
|
839 |
-
if (this.allow_single_deselect && this.selected_item.find("abbr").length < 1) {
|
840 |
-
return this.selected_item.find("span").first().after("<abbr class=\"search-choice-close\"></abbr>");
|
841 |
-
}
|
842 |
-
};
|
843 |
-
|
844 |
-
Chosen.prototype.winnow_results = function() {
|
845 |
-
var found, option, part, parts, regex, regexAnchor, result, result_id, results, searchText, startpos, text, zregex, _i, _j, _len, _len1, _ref;
|
846 |
-
this.no_results_clear();
|
847 |
-
results = 0;
|
848 |
-
searchText = this.search_field.val() === this.default_text ? "" : $('<div/>').text($.trim(this.search_field.val())).html();
|
849 |
-
regexAnchor = this.search_contains ? "" : "^";
|
850 |
-
regex = new RegExp(regexAnchor + searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), 'i');
|
851 |
-
zregex = new RegExp(searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), 'i');
|
852 |
-
_ref = this.results_data;
|
853 |
-
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
854 |
-
option = _ref[_i];
|
855 |
-
if (!option.disabled && !option.empty) {
|
856 |
-
if (option.group) {
|
857 |
-
$('#' + option.dom_id).css('display', 'none');
|
858 |
-
} else if (!(this.is_multiple && option.selected)) {
|
859 |
-
found = false;
|
860 |
-
result_id = option.dom_id;
|
861 |
-
result = $("#" + result_id);
|
862 |
-
if (regex.test(option.html)) {
|
863 |
-
found = true;
|
864 |
-
results += 1;
|
865 |
-
} else if (this.enable_split_word_search && (option.html.indexOf(" ") >= 0 || option.html.indexOf("[") === 0)) {
|
866 |
-
parts = option.html.replace(/\[|\]/g, "").split(" ");
|
867 |
-
if (parts.length) {
|
868 |
-
for (_j = 0, _len1 = parts.length; _j < _len1; _j++) {
|
869 |
-
part = parts[_j];
|
870 |
-
if (regex.test(part)) {
|
871 |
-
found = true;
|
872 |
-
results += 1;
|
873 |
-
}
|
874 |
-
}
|
875 |
-
}
|
876 |
-
}
|
877 |
-
if (found) {
|
878 |
-
if (searchText.length) {
|
879 |
-
startpos = option.html.search(zregex);
|
880 |
-
text = option.html.substr(0, startpos + searchText.length) + '</em>' + option.html.substr(startpos + searchText.length);
|
881 |
-
text = text.substr(0, startpos) + '<em>' + text.substr(startpos);
|
882 |
-
} else {
|
883 |
-
text = option.html;
|
884 |
-
}
|
885 |
-
result.html(text);
|
886 |
-
this.result_activate(result);
|
887 |
-
if (option.group_array_index != null) {
|
888 |
-
$("#" + this.results_data[option.group_array_index].dom_id).css('display', 'list-item');
|
889 |
-
}
|
890 |
-
} else {
|
891 |
-
if (this.result_highlight && result_id === this.result_highlight.attr('id')) {
|
892 |
-
this.result_clear_highlight();
|
893 |
-
}
|
894 |
-
this.result_deactivate(result);
|
895 |
-
}
|
896 |
-
}
|
897 |
-
}
|
898 |
-
}
|
899 |
-
if (results < 1 && searchText.length) {
|
900 |
-
return this.no_results(searchText);
|
901 |
-
} else {
|
902 |
-
return this.winnow_results_set_highlight();
|
903 |
-
}
|
904 |
-
};
|
905 |
-
|
906 |
-
Chosen.prototype.winnow_results_clear = function() {
|
907 |
-
var li, lis, _i, _len, _results;
|
908 |
-
this.search_field.val("");
|
909 |
-
lis = this.search_results.find("li");
|
910 |
-
_results = [];
|
911 |
-
for (_i = 0, _len = lis.length; _i < _len; _i++) {
|
912 |
-
li = lis[_i];
|
913 |
-
li = $(li);
|
914 |
-
if (li.hasClass("group-result")) {
|
915 |
-
_results.push(li.css('display', 'auto'));
|
916 |
-
} else if (!this.is_multiple || !li.hasClass("result-selected")) {
|
917 |
-
_results.push(this.result_activate(li));
|
918 |
-
} else {
|
919 |
-
_results.push(void 0);
|
920 |
-
}
|
921 |
-
}
|
922 |
-
return _results;
|
923 |
-
};
|
924 |
-
|
925 |
-
Chosen.prototype.winnow_results_set_highlight = function() {
|
926 |
-
var do_high, selected_results;
|
927 |
-
if (!this.result_highlight) {
|
928 |
-
selected_results = !this.is_multiple ? this.search_results.find(".result-selected.active-result") : [];
|
929 |
-
do_high = selected_results.length ? selected_results.first() : this.search_results.find(".active-result").first();
|
930 |
-
if (do_high != null) {
|
931 |
-
return this.result_do_highlight(do_high);
|
932 |
-
}
|
933 |
-
}
|
934 |
-
};
|
935 |
-
|
936 |
-
Chosen.prototype.no_results = function(terms) {
|
937 |
-
var no_results_html;
|
938 |
-
no_results_html = $('<li class="no-results">' + this.results_none_found + ' "<span></span>"</li>');
|
939 |
-
no_results_html.find("span").first().html(terms);
|
940 |
-
return this.search_results.append(no_results_html);
|
941 |
-
};
|
942 |
-
|
943 |
-
Chosen.prototype.no_results_clear = function() {
|
944 |
-
return this.search_results.find(".no-results").remove();
|
945 |
-
};
|
946 |
-
|
947 |
-
Chosen.prototype.keydown_arrow = function() {
|
948 |
-
var first_active, next_sib;
|
949 |
-
if (!this.result_highlight) {
|
950 |
-
first_active = this.search_results.find("li.active-result").first();
|
951 |
-
if (first_active) {
|
952 |
-
this.result_do_highlight($(first_active));
|
953 |
-
}
|
954 |
-
} else if (this.results_showing) {
|
955 |
-
next_sib = this.result_highlight.nextAll("li.active-result").first();
|
956 |
-
if (next_sib) {
|
957 |
-
this.result_do_highlight(next_sib);
|
958 |
-
}
|
959 |
-
}
|
960 |
-
if (!this.results_showing) {
|
961 |
-
return this.results_show();
|
962 |
-
}
|
963 |
-
};
|
964 |
-
|
965 |
-
Chosen.prototype.keyup_arrow = function() {
|
966 |
-
var prev_sibs;
|
967 |
-
if (!this.results_showing && !this.is_multiple) {
|
968 |
-
return this.results_show();
|
969 |
-
} else if (this.result_highlight) {
|
970 |
-
prev_sibs = this.result_highlight.prevAll("li.active-result");
|
971 |
-
if (prev_sibs.length) {
|
972 |
-
return this.result_do_highlight(prev_sibs.first());
|
973 |
-
} else {
|
974 |
-
if (this.choices > 0) {
|
975 |
-
this.results_hide();
|
976 |
-
}
|
977 |
-
return this.result_clear_highlight();
|
978 |
-
}
|
979 |
-
}
|
980 |
-
};
|
981 |
-
|
982 |
-
Chosen.prototype.keydown_backstroke = function() {
|
983 |
-
var next_available_destroy;
|
984 |
-
if (this.pending_backstroke) {
|
985 |
-
this.choice_destroy(this.pending_backstroke.find("a").first());
|
986 |
-
return this.clear_backstroke();
|
987 |
-
} else {
|
988 |
-
next_available_destroy = this.search_container.siblings("li.search-choice").last();
|
989 |
-
if (next_available_destroy.length && !next_available_destroy.hasClass("search-choice-disabled")) {
|
990 |
-
this.pending_backstroke = next_available_destroy;
|
991 |
-
if (this.single_backstroke_delete) {
|
992 |
-
return this.keydown_backstroke();
|
993 |
-
} else {
|
994 |
-
return this.pending_backstroke.addClass("search-choice-focus");
|
995 |
-
}
|
996 |
-
}
|
997 |
-
}
|
998 |
-
};
|
999 |
-
|
1000 |
-
Chosen.prototype.clear_backstroke = function() {
|
1001 |
-
if (this.pending_backstroke) {
|
1002 |
-
this.pending_backstroke.removeClass("search-choice-focus");
|
1003 |
-
}
|
1004 |
-
return this.pending_backstroke = null;
|
1005 |
-
};
|
1006 |
-
|
1007 |
-
Chosen.prototype.keydown_checker = function(evt) {
|
1008 |
-
var stroke, _ref;
|
1009 |
-
stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
|
1010 |
-
this.search_field_scale();
|
1011 |
-
if (stroke !== 8 && this.pending_backstroke) {
|
1012 |
-
this.clear_backstroke();
|
1013 |
-
}
|
1014 |
-
switch (stroke) {
|
1015 |
-
case 8:
|
1016 |
-
this.backstroke_length = this.search_field.val().length;
|
1017 |
-
break;
|
1018 |
-
case 9:
|
1019 |
-
if (this.results_showing && !this.is_multiple) {
|
1020 |
-
this.result_select(evt);
|
1021 |
-
}
|
1022 |
-
this.mouse_on_container = false;
|
1023 |
-
break;
|
1024 |
-
case 13:
|
1025 |
-
evt.preventDefault();
|
1026 |
-
break;
|
1027 |
-
case 38:
|
1028 |
-
evt.preventDefault();
|
1029 |
-
this.keyup_arrow();
|
1030 |
-
break;
|
1031 |
-
case 40:
|
1032 |
-
this.keydown_arrow();
|
1033 |
-
break;
|
1034 |
-
}
|
1035 |
-
};
|
1036 |
-
|
1037 |
-
Chosen.prototype.search_field_scale = function() {
|
1038 |
-
var dd_top, div, h, style, style_block, styles, w, _i, _len;
|
1039 |
-
if (this.is_multiple) {
|
1040 |
-
h = 0;
|
1041 |
-
w = 0;
|
1042 |
-
style_block = "position:absolute; left: -1000px; top: -1000px; display:none;";
|
1043 |
-
styles = ['font-size', 'font-style', 'font-weight', 'font-family', 'line-height', 'text-transform', 'letter-spacing'];
|
1044 |
-
for (_i = 0, _len = styles.length; _i < _len; _i++) {
|
1045 |
-
style = styles[_i];
|
1046 |
-
style_block += style + ":" + this.search_field.css(style) + ";";
|
1047 |
-
}
|
1048 |
-
div = $('<div />', {
|
1049 |
-
'style': style_block
|
1050 |
-
});
|
1051 |
-
div.text(this.search_field.val());
|
1052 |
-
$('body').append(div);
|
1053 |
-
w = div.width() + 25;
|
1054 |
-
div.remove();
|
1055 |
-
if (w > this.f_width - 10) {
|
1056 |
-
w = this.f_width - 10;
|
1057 |
-
}
|
1058 |
-
this.search_field.css({
|
1059 |
-
'width': w + 'px'
|
1060 |
-
});
|
1061 |
-
dd_top = this.container.height();
|
1062 |
-
return this.dropdown.css({
|
1063 |
-
"top": dd_top + "px"
|
1064 |
-
});
|
1065 |
-
}
|
1066 |
-
};
|
1067 |
-
|
1068 |
-
Chosen.prototype.generate_random_id = function() {
|
1069 |
-
var string;
|
1070 |
-
string = "sel" + this.generate_random_char() + this.generate_random_char() + this.generate_random_char();
|
1071 |
-
while ($("#" + string).length > 0) {
|
1072 |
-
string += this.generate_random_char();
|
1073 |
-
}
|
1074 |
-
return string;
|
1075 |
-
};
|
1076 |
-
|
1077 |
-
return Chosen;
|
1078 |
-
|
1079 |
-
})(AbstractChosen);
|
1080 |
-
|
1081 |
-
root.Chosen = Chosen;
|
1082 |
-
|
1083 |
-
get_side_border_padding = function(elmt) {
|
1084 |
-
var side_border_padding;
|
1085 |
-
return side_border_padding = elmt.outerWidth() - elmt.width();
|
1086 |
-
};
|
1087 |
-
|
1088 |
-
root.get_side_border_padding = get_side_border_padding;
|
1089 |
-
|
1090 |
-
}).call(this);
|
1 |
+
// Chosen, a Select Box Enhancer for jQuery and Protoype
|
2 |
+
// by Patrick Filler for Harvest, http://getharvest.com
|
3 |
+
//
|
4 |
+
// Version 0.9.12
|
5 |
+
// Full source at https://github.com/harvesthq/chosen
|
6 |
+
// Copyright (c) 2011 Harvest http://getharvest.com
|
7 |
+
|
8 |
+
// MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
|
9 |
+
// This file is generated by `cake build`, do not edit it by hand.
|
10 |
+
(function() {
|
11 |
+
var SelectParser;
|
12 |
+
|
13 |
+
SelectParser = (function() {
|
14 |
+
|
15 |
+
function SelectParser() {
|
16 |
+
this.options_index = 0;
|
17 |
+
this.parsed = [];
|
18 |
+
}
|
19 |
+
|
20 |
+
SelectParser.prototype.add_node = function(child) {
|
21 |
+
if (child.nodeName.toUpperCase() === "OPTGROUP") {
|
22 |
+
return this.add_group(child);
|
23 |
+
} else {
|
24 |
+
return this.add_option(child);
|
25 |
+
}
|
26 |
+
};
|
27 |
+
|
28 |
+
SelectParser.prototype.add_group = function(group) {
|
29 |
+
var group_position, option, _i, _len, _ref, _results;
|
30 |
+
group_position = this.parsed.length;
|
31 |
+
this.parsed.push({
|
32 |
+
array_index: group_position,
|
33 |
+
group: true,
|
34 |
+
label: group.label,
|
35 |
+
children: 0,
|
36 |
+
disabled: group.disabled
|
37 |
+
});
|
38 |
+
_ref = group.childNodes;
|
39 |
+
_results = [];
|
40 |
+
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
41 |
+
option = _ref[_i];
|
42 |
+
_results.push(this.add_option(option, group_position, group.disabled));
|
43 |
+
}
|
44 |
+
return _results;
|
45 |
+
};
|
46 |
+
|
47 |
+
SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
|
48 |
+
if (option.nodeName.toUpperCase() === "OPTION") {
|
49 |
+
if (option.text !== "") {
|
50 |
+
if (group_position != null) {
|
51 |
+
this.parsed[group_position].children += 1;
|
52 |
+
}
|
53 |
+
this.parsed.push({
|
54 |
+
array_index: this.parsed.length,
|
55 |
+
options_index: this.options_index,
|
56 |
+
value: option.value,
|
57 |
+
text: option.text,
|
58 |
+
html: option.innerHTML,
|
59 |
+
selected: option.selected,
|
60 |
+
disabled: group_disabled === true ? group_disabled : option.disabled,
|
61 |
+
group_array_index: group_position,
|
62 |
+
classes: option.className,
|
63 |
+
style: option.style.cssText
|
64 |
+
});
|
65 |
+
} else {
|
66 |
+
this.parsed.push({
|
67 |
+
array_index: this.parsed.length,
|
68 |
+
options_index: this.options_index,
|
69 |
+
empty: true
|
70 |
+
});
|
71 |
+
}
|
72 |
+
return this.options_index += 1;
|
73 |
+
}
|
74 |
+
};
|
75 |
+
|
76 |
+
return SelectParser;
|
77 |
+
|
78 |
+
})();
|
79 |
+
|
80 |
+
SelectParser.select_to_array = function(select) {
|
81 |
+
var child, parser, _i, _len, _ref;
|
82 |
+
parser = new SelectParser();
|
83 |
+
_ref = select.childNodes;
|
84 |
+
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
85 |
+
child = _ref[_i];
|
86 |
+
parser.add_node(child);
|
87 |
+
}
|
88 |
+
return parser.parsed;
|
89 |
+
};
|
90 |
+
|
91 |
+
this.SelectParser = SelectParser;
|
92 |
+
|
93 |
+
}).call(this);
|
94 |
+
|
95 |
+
/*
|
96 |
+
Chosen source: generate output using 'cake build'
|
97 |
+
Copyright (c) 2011 by Harvest
|
98 |
+
*/
|
99 |
+
|
100 |
+
|
101 |
+
(function() {
|
102 |
+
var AbstractChosen, root;
|
103 |
+
|
104 |
+
root = this;
|
105 |
+
|
106 |
+
AbstractChosen = (function() {
|
107 |
+
|
108 |
+
function AbstractChosen(form_field, options) {
|
109 |
+
this.form_field = form_field;
|
110 |
+
this.options = options != null ? options : {};
|
111 |
+
this.is_multiple = this.form_field.multiple;
|
112 |
+
this.set_default_text();
|
113 |
+
this.set_default_values();
|
114 |
+
this.setup();
|
115 |
+
this.set_up_html();
|
116 |
+
this.register_observers();
|
117 |
+
this.finish_setup();
|
118 |
+
}
|
119 |
+
|
120 |
+
AbstractChosen.prototype.set_default_values = function() {
|
121 |
+
var _this = this;
|
122 |
+
this.click_test_action = function(evt) {
|
123 |
+
return _this.test_active_click(evt);
|
124 |
+
};
|
125 |
+
this.activate_action = function(evt) {
|
126 |
+
return _this.activate_field(evt);
|
127 |
+
};
|
128 |
+
this.active_field = false;
|
129 |
+
this.mouse_on_container = false;
|
130 |
+
this.results_showing = false;
|
131 |
+
this.result_highlighted = null;
|
132 |
+
this.result_single_selected = null;
|
133 |
+
this.allow_single_deselect = (this.options.allow_single_deselect != null) && (this.form_field.options[0] != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false;
|
134 |
+
this.disable_search_threshold = this.options.disable_search_threshold || 0;
|
135 |
+
this.disable_search = this.options.disable_search || false;
|
136 |
+
this.enable_split_word_search = this.options.enable_split_word_search != null ? this.options.enable_split_word_search : true;
|
137 |
+
this.search_contains = this.options.search_contains || false;
|
138 |
+
this.choices = 0;
|
139 |
+
this.single_backstroke_delete = this.options.single_backstroke_delete || false;
|
140 |
+
this.max_selected_options = this.options.max_selected_options || Infinity;
|
141 |
+
return this.inherit_select_classes = this.options.inherit_select_classes || false;
|
142 |
+
};
|
143 |
+
|
144 |
+
AbstractChosen.prototype.set_default_text = function() {
|
145 |
+
if (this.form_field.getAttribute("data-placeholder")) {
|
146 |
+
this.default_text = this.form_field.getAttribute("data-placeholder");
|
147 |
+
} else if (this.is_multiple) {
|
148 |
+
this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || "Select Some Options";
|
149 |
+
} else {
|
150 |
+
this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || "Select an Option";
|
151 |
+
}
|
152 |
+
return this.results_none_found = this.form_field.getAttribute("data-no_results_text") || this.options.no_results_text || "No results match";
|
153 |
+
};
|
154 |
+
|
155 |
+
AbstractChosen.prototype.mouse_enter = function() {
|
156 |
+
return this.mouse_on_container = true;
|
157 |
+
};
|
158 |
+
|
159 |
+
AbstractChosen.prototype.mouse_leave = function() {
|
160 |
+
return this.mouse_on_container = false;
|
161 |
+
};
|
162 |
+
|
163 |
+
AbstractChosen.prototype.input_focus = function(evt) {
|
164 |
+
var _this = this;
|
165 |
+
if (this.is_multiple) {
|
166 |
+
if (!this.active_field) {
|
167 |
+
return setTimeout((function() {
|
168 |
+
return _this.container_mousedown();
|
169 |
+
}), 50);
|
170 |
+
}
|
171 |
+
} else {
|
172 |
+
if (!this.active_field) {
|
173 |
+
return this.activate_field();
|
174 |
+
}
|
175 |
+
}
|
176 |
+
};
|
177 |
+
|
178 |
+
AbstractChosen.prototype.input_blur = function(evt) {
|
179 |
+
var _this = this;
|
180 |
+
if (!this.mouse_on_container) {
|
181 |
+
this.active_field = false;
|
182 |
+
return setTimeout((function() {
|
183 |
+
return _this.blur_test();
|
184 |
+
}), 100);
|
185 |
+
}
|
186 |
+
};
|
187 |
+
|
188 |
+
AbstractChosen.prototype.result_add_option = function(option) {
|
189 |
+
var classes, style;
|
190 |
+
if (!option.disabled) {
|
191 |
+
option.dom_id = this.container_id + "_o_" + option.array_index;
|
192 |
+
classes = option.selected && this.is_multiple ? [] : ["active-result"];
|
193 |
+
if (option.selected) {
|
194 |
+
classes.push("result-selected");
|
195 |
+
}
|
196 |
+
if (option.group_array_index != null) {
|
197 |
+
classes.push("group-option");
|
198 |
+
}
|
199 |
+
if (option.classes !== "") {
|
200 |
+
classes.push(option.classes);
|
201 |
+
}
|
202 |
+
style = option.style.cssText !== "" ? " style=\"" + option.style + "\"" : "";
|
203 |
+
return '<li id="' + option.dom_id + '" class="' + classes.join(' ') + '"' + style + '>' + option.html + '</li>';
|
204 |
+
} else {
|
205 |
+
return "";
|
206 |
+
}
|
207 |
+
};
|
208 |
+
|
209 |
+
AbstractChosen.prototype.results_update_field = function() {
|
210 |
+
this.set_default_text();
|
211 |
+
if (!this.is_multiple) {
|
212 |
+
this.results_reset_cleanup();
|
213 |
+
}
|
214 |
+
this.result_clear_highlight();
|
215 |
+
this.result_single_selected = null;
|
216 |
+
return this.results_build();
|
217 |
+
};
|
218 |
+
|
219 |
+
AbstractChosen.prototype.results_toggle = function() {
|
220 |
+
if (this.results_showing) {
|
221 |
+
return this.results_hide();
|
222 |
+
} else {
|
223 |
+
return this.results_show();
|
224 |
+
}
|
225 |
+
};
|
226 |
+
|
227 |
+
AbstractChosen.prototype.results_search = function(evt) {
|
228 |
+
if (this.results_showing) {
|
229 |
+
return this.winnow_results();
|
230 |
+
} else {
|
231 |
+
return this.results_show();
|
232 |
+
}
|
233 |
+
};
|
234 |
+
|
235 |
+
AbstractChosen.prototype.keyup_checker = function(evt) {
|
236 |
+
var stroke, _ref;
|
237 |
+
stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
|
238 |
+
this.search_field_scale();
|
239 |
+
switch (stroke) {
|
240 |
+
case 8:
|
241 |
+
if (this.is_multiple && this.backstroke_length < 1 && this.choices > 0) {
|
242 |
+
return this.keydown_backstroke();
|
243 |
+
} else if (!this.pending_backstroke) {
|
244 |
+
this.result_clear_highlight();
|
245 |
+
return this.results_search();
|
246 |
+
}
|
247 |
+
break;
|
248 |
+
case 13:
|
249 |
+
evt.preventDefault();
|
250 |
+
if (this.results_showing) {
|
251 |
+
return this.result_select(evt);
|
252 |
+
}
|
253 |
+
break;
|
254 |
+
case 27:
|
255 |
+
if (this.results_showing) {
|
256 |
+
this.results_hide();
|
257 |
+
}
|
258 |
+
return true;
|
259 |
+
case 9:
|
260 |
+
case 38:
|
261 |
+
case 40:
|
262 |
+
case 16:
|
263 |
+
case 91:
|
264 |
+
case 17:
|
265 |
+
break;
|
266 |
+
default:
|
267 |
+
return this.results_search();
|
268 |
+
}
|
269 |
+
};
|
270 |
+
|
271 |
+
AbstractChosen.prototype.generate_field_id = function() {
|
272 |
+
var new_id;
|
273 |
+
new_id = this.generate_random_id();
|
274 |
+
this.form_field.id = new_id;
|
275 |
+
return new_id;
|
276 |
+
};
|
277 |
+
|
278 |
+
AbstractChosen.prototype.generate_random_char = function() {
|
279 |
+
var chars, newchar, rand;
|
280 |
+
chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
281 |
+
rand = Math.floor(Math.random() * chars.length);
|
282 |
+
return newchar = chars.substring(rand, rand + 1);
|
283 |
+
};
|
284 |
+
|
285 |
+
return AbstractChosen;
|
286 |
+
|
287 |
+
})();
|
288 |
+
|
289 |
+
root.AbstractChosen = AbstractChosen;
|
290 |
+
|
291 |
+
}).call(this);
|
292 |
+
|
293 |
+
/*
|
294 |
+
Chosen source: generate output using 'cake build'
|
295 |
+
Copyright (c) 2011 by Harvest
|
296 |
+
*/
|
297 |
+
|
298 |
+
|
299 |
+
(function() {
|
300 |
+
var $, Chosen, get_side_border_padding, root,
|
301 |
+
__hasProp = {}.hasOwnProperty,
|
302 |
+
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
303 |
+
|
304 |
+
root = this;
|
305 |
+
|
306 |
+
$ = jQuery;
|
307 |
+
|
308 |
+
$.fn.extend({
|
309 |
+
chosen: function(options) {
|
310 |
+
var browser, match, ua;
|
311 |
+
ua = navigator.userAgent.toLowerCase();
|
312 |
+
match = /(msie) ([\w.]+)/.exec(ua) || [];
|
313 |
+
browser = {
|
314 |
+
name: match[1] || "",
|
315 |
+
version: match[2] || "0"
|
316 |
+
};
|
317 |
+
if (browser.name === "msie" && (browser.version === "6.0" || (browser.version === "7.0" && document.documentMode === 7))) {
|
318 |
+
return this;
|
319 |
+
}
|
320 |
+
return this.each(function(input_field) {
|
321 |
+
var $this;
|
322 |
+
$this = $(this);
|
323 |
+
if (!$this.hasClass("chzn-done")) {
|
324 |
+
return $this.data('chosen', new Chosen(this, options));
|
325 |
+
}
|
326 |
+
});
|
327 |
+
}
|
328 |
+
});
|
329 |
+
|
330 |
+
Chosen = (function(_super) {
|
331 |
+
|
332 |
+
__extends(Chosen, _super);
|
333 |
+
|
334 |
+
function Chosen() {
|
335 |
+
return Chosen.__super__.constructor.apply(this, arguments);
|
336 |
+
}
|
337 |
+
|
338 |
+
Chosen.prototype.setup = function() {
|
339 |
+
this.form_field_jq = $(this.form_field);
|
340 |
+
this.current_value = this.form_field_jq.val();
|
341 |
+
return this.is_rtl = this.form_field_jq.hasClass("chzn-rtl");
|
342 |
+
};
|
343 |
+
|
344 |
+
Chosen.prototype.finish_setup = function() {
|
345 |
+
return this.form_field_jq.addClass("chzn-done");
|
346 |
+
};
|
347 |
+
|
348 |
+
Chosen.prototype.set_up_html = function() {
|
349 |
+
var container_classes, container_div, container_props, dd_top, dd_width, sf_width;
|
350 |
+
this.container_id = this.form_field.id.length ? this.form_field.id.replace(/[^\w]/g, '_') : this.generate_field_id();
|
351 |
+
this.container_id += "_chzn";
|
352 |
+
container_classes = ["chzn-container"];
|
353 |
+
container_classes.push("chzn-container-" + (this.is_multiple ? "multi" : "single"));
|
354 |
+
if (this.inherit_select_classes && this.form_field.className) {
|
355 |
+
container_classes.push(this.form_field.className);
|
356 |
+
}
|
357 |
+
if (this.is_rtl) {
|
358 |
+
container_classes.push("chzn-rtl");
|
359 |
+
}
|
360 |
+
this.f_width = this.form_field_jq.outerWidth();
|
361 |
+
container_props = {
|
362 |
+
id: this.container_id,
|
363 |
+
"class": container_classes.join(' '),
|
364 |
+
style: 'width: ' + this.f_width + 'px;',
|
365 |
+
title: this.form_field.title
|
366 |
+
};
|
367 |
+
container_div = $("<div />", container_props);
|
368 |
+
if (this.is_multiple) {
|
369 |
+
container_div.html('<ul class="chzn-choices"><li class="search-field"><input type="text" value="' + this.default_text + '" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chzn-drop" style="left:-9000px;"><ul class="chzn-results"></ul></div>');
|
370 |
+
} else {
|
371 |
+
container_div.html('<a href="javascript:void(0)" class="chzn-single chzn-default" tabindex="-1"><span>' + this.default_text + '</span><div><b></b></div></a><div class="chzn-drop" style="left:-9000px;"><div class="chzn-search"><input type="text" autocomplete="off" /></div><ul class="chzn-results"></ul></div>');
|
372 |
+
}
|
373 |
+
this.form_field_jq.hide().after(container_div);
|
374 |
+
this.container = $('#' + this.container_id);
|
375 |
+
this.dropdown = this.container.find('div.chzn-drop').first();
|
376 |
+
dd_top = this.container.height();
|
377 |
+
dd_width = this.f_width - get_side_border_padding(this.dropdown);
|
378 |
+
this.dropdown.css({
|
379 |
+
"width": dd_width + "px",
|
380 |
+
"top": dd_top + "px"
|
381 |
+
});
|
382 |
+
this.search_field = this.container.find('input').first();
|
383 |
+
this.search_results = this.container.find('ul.chzn-results').first();
|
384 |
+
this.search_field_scale();
|
385 |
+
this.search_no_results = this.container.find('li.no-results').first();
|
386 |
+
if (this.is_multiple) {
|
387 |
+
this.search_choices = this.container.find('ul.chzn-choices').first();
|
388 |
+
this.search_container = this.container.find('li.search-field').first();
|
389 |
+
} else {
|
390 |
+
this.search_container = this.container.find('div.chzn-search').first();
|
391 |
+
this.selected_item = this.container.find('.chzn-single').first();
|
392 |
+
sf_width = dd_width - get_side_border_padding(this.search_container) - get_side_border_padding(this.search_field);
|
393 |
+
this.search_field.css({
|
394 |
+
"width": sf_width + "px"
|
395 |
+
});
|
396 |
+
}
|
397 |
+
this.results_build();
|
398 |
+
this.set_tab_index();
|
399 |
+
return this.form_field_jq.trigger("liszt:ready", {
|
400 |
+
chosen: this
|
401 |
+
});
|
402 |
+
};
|
403 |
+
|
404 |
+
Chosen.prototype.register_observers = function() {
|
405 |
+
var _this = this;
|
406 |
+
this.container.mousedown(function(evt) {
|
407 |
+
_this.container_mousedown(evt);
|
408 |
+
});
|
409 |
+
this.container.mouseup(function(evt) {
|
410 |
+
_this.container_mouseup(evt);
|
411 |
+
});
|
412 |
+
this.container.mouseenter(function(evt) {
|
413 |
+
_this.mouse_enter(evt);
|
414 |
+
});
|
415 |
+
this.container.mouseleave(function(evt) {
|
416 |
+
_this.mouse_leave(evt);
|
417 |
+
});
|
418 |
+
this.search_results.mouseup(function(evt) {
|
419 |
+
_this.search_results_mouseup(evt);
|
420 |
+
});
|
421 |
+
this.search_results.mouseover(function(evt) {
|
422 |
+
_this.search_results_mouseover(evt);
|
423 |
+
});
|
424 |
+
this.search_results.mouseout(function(evt) {
|
425 |
+
_this.search_results_mouseout(evt);
|
426 |
+
});
|
427 |
+
this.form_field_jq.bind("liszt:updated", function(evt) {
|
428 |
+
_this.results_update_field(evt);
|
429 |
+
});
|
430 |
+
this.form_field_jq.bind("liszt:activate", function(evt) {
|
431 |
+
_this.activate_field(evt);
|
432 |
+
});
|
433 |
+
this.form_field_jq.bind("liszt:open", function(evt) {
|
434 |
+
_this.container_mousedown(evt);
|
435 |
+
});
|
436 |
+
this.search_field.blur(function(evt) {
|
437 |
+
_this.input_blur(evt);
|
438 |
+
});
|
439 |
+
this.search_field.keyup(function(evt) {
|
440 |
+
_this.keyup_checker(evt);
|
441 |
+
});
|
442 |
+
this.search_field.keydown(function(evt) {
|
443 |
+
_this.keydown_checker(evt);
|
444 |
+
});
|
445 |
+
this.search_field.focus(function(evt) {
|
446 |
+
_this.input_focus(evt);
|
447 |
+
});
|
448 |
+
if (this.is_multiple) {
|
449 |
+
return this.search_choices.click(function(evt) {
|
450 |
+
_this.choices_click(evt);
|
451 |
+
});
|
452 |
+
} else {
|
453 |
+
return this.container.click(function(evt) {
|
454 |
+
evt.preventDefault();
|
455 |
+
});
|
456 |
+
}
|
457 |
+
};
|
458 |
+
|
459 |
+
Chosen.prototype.search_field_disabled = function() {
|
460 |
+
this.is_disabled = this.form_field_jq[0].disabled;
|
461 |
+
if (this.is_disabled) {
|
462 |
+
this.container.addClass('chzn-disabled');
|
463 |
+
this.search_field[0].disabled = true;
|
464 |
+
if (!this.is_multiple) {
|
465 |
+
this.selected_item.unbind("focus", this.activate_action);
|
466 |
+
}
|
467 |
+
return this.close_field();
|
468 |
+
} else {
|
469 |
+
this.container.removeClass('chzn-disabled');
|
470 |
+
this.search_field[0].disabled = false;
|
471 |
+
if (!this.is_multiple) {
|
472 |
+
return this.selected_item.bind("focus", this.activate_action);
|
473 |
+
}
|
474 |
+
}
|
475 |
+
};
|
476 |
+
|
477 |
+
Chosen.prototype.container_mousedown = function(evt) {
|
478 |
+
var target_closelink;
|
479 |
+
if (!this.is_disabled) {
|
480 |
+
target_closelink = evt != null ? ($(evt.target)).hasClass("search-choice-close") : false;
|
481 |
+
if (evt && evt.type === "mousedown" && !this.results_showing) {
|
482 |
+
evt.preventDefault();
|
483 |
+
}
|
484 |
+
if (!this.pending_destroy_click && !target_closelink) {
|
485 |
+
if (!this.active_field) {
|
486 |
+
if (this.is_multiple) {
|
487 |
+
this.search_field.val("");
|
488 |
+
}
|
489 |
+
$(document).click(this.click_test_action);
|
490 |
+
this.results_show();
|
491 |
+
} else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chzn-single").length)) {
|
492 |
+
evt.preventDefault();
|
493 |
+
this.results_toggle();
|
494 |
+
}
|
495 |
+
return this.activate_field();
|
496 |
+
} else {
|
497 |
+
return this.pending_destroy_click = false;
|
498 |
+
}
|
499 |
+
}
|
500 |
+
};
|
501 |
+
|
502 |
+
Chosen.prototype.container_mouseup = function(evt) {
|
503 |
+
if (evt.target.nodeName === "ABBR" && !this.is_disabled) {
|
504 |
+
return this.results_reset(evt);
|
505 |
+
}
|
506 |
+
};
|
507 |
+
|
508 |
+
Chosen.prototype.blur_test = function(evt) {
|
509 |
+
if (!this.active_field && this.container.hasClass("chzn-container-active")) {
|
510 |
+
return this.close_field();
|
511 |
+
}
|
512 |
+
};
|
513 |
+
|
514 |
+
Chosen.prototype.close_field = function() {
|
515 |
+
$(document).unbind("click", this.click_test_action);
|
516 |
+
this.active_field = false;
|
517 |
+
this.results_hide();
|
518 |
+
this.container.removeClass("chzn-container-active");
|
519 |
+
this.winnow_results_clear();
|
520 |
+
this.clear_backstroke();
|
521 |
+
this.show_search_field_default();
|
522 |
+
return this.search_field_scale();
|
523 |
+
};
|
524 |
+
|
525 |
+
Chosen.prototype.activate_field = function() {
|
526 |
+
this.container.addClass("chzn-container-active");
|
527 |
+
this.active_field = true;
|
528 |
+
this.search_field.val(this.search_field.val());
|
529 |
+
return this.search_field.focus();
|
530 |
+
};
|
531 |
+
|
532 |
+
Chosen.prototype.test_active_click = function(evt) {
|
533 |
+
if ($(evt.target).parents('#' + this.container_id).length) {
|
534 |
+
return this.active_field = true;
|
535 |
+
} else {
|
536 |
+
return this.close_field();
|
537 |
+
}
|
538 |
+
};
|
539 |
+
|
540 |
+
Chosen.prototype.results_build = function() {
|
541 |
+
var content, data, _i, _len, _ref;
|
542 |
+
this.parsing = true;
|
543 |
+
this.results_data = root.SelectParser.select_to_array(this.form_field);
|
544 |
+
if (this.is_multiple && this.choices > 0) {
|
545 |
+
this.search_choices.find("li.search-choice").remove();
|
546 |
+
this.choices = 0;
|
547 |
+
} else if (!this.is_multiple) {
|
548 |
+
this.selected_item.addClass("chzn-default").find("span").text(this.default_text);
|
549 |
+
if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
|
550 |
+
this.container.addClass("chzn-container-single-nosearch");
|
551 |
+
} else {
|
552 |
+
this.container.removeClass("chzn-container-single-nosearch");
|
553 |
+
}
|
554 |
+
}
|
555 |
+
content = '';
|
556 |
+
_ref = this.results_data;
|
557 |
+
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
558 |
+
data = _ref[_i];
|
559 |
+
if (data.group) {
|
560 |
+
content += this.result_add_group(data);
|
561 |
+
} else if (!data.empty) {
|
562 |
+
content += this.result_add_option(data);
|
563 |
+
if (data.selected && this.is_multiple) {
|
564 |
+
this.choice_build(data);
|
565 |
+
} else if (data.selected && !this.is_multiple) {
|
566 |
+
this.selected_item.removeClass("chzn-default").find("span").text(data.text);
|
567 |
+
if (this.allow_single_deselect) {
|
568 |
+
this.single_deselect_control_build();
|
569 |
+
}
|
570 |
+
}
|
571 |
+
}
|
572 |
+
}
|
573 |
+
this.search_field_disabled();
|
574 |
+
this.show_search_field_default();
|
575 |
+
this.search_field_scale();
|
576 |
+
this.search_results.html(content);
|
577 |
+
return this.parsing = false;
|
578 |
+
};
|
579 |
+
|
580 |
+
Chosen.prototype.result_add_group = function(group) {
|
581 |
+
if (!group.disabled) {
|
582 |
+
group.dom_id = this.container_id + "_g_" + group.array_index;
|
583 |
+
return '<li id="' + group.dom_id + '" class="group-result">' + $("<div />").text(group.label).html() + '</li>';
|
584 |
+
} else {
|
585 |
+
return "";
|
586 |
+
}
|
587 |
+
};
|
588 |
+
|
589 |
+
Chosen.prototype.result_do_highlight = function(el) {
|
590 |
+
var high_bottom, high_top, maxHeight, visible_bottom, visible_top;
|
591 |
+
if (el.length) {
|
592 |
+
this.result_clear_highlight();
|
593 |
+
this.result_highlight = el;
|
594 |
+
this.result_highlight.addClass("highlighted");
|
595 |
+
maxHeight = parseInt(this.search_results.css("maxHeight"), 10);
|
596 |
+
visible_top = this.search_results.scrollTop();
|
597 |
+
visible_bottom = maxHeight + visible_top;
|
598 |
+
high_top = this.result_highlight.position().top + this.search_results.scrollTop();
|
599 |
+
high_bottom = high_top + this.result_highlight.outerHeight();
|
600 |
+
if (high_bottom >= visible_bottom) {
|
601 |
+
return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0);
|
602 |
+
} else if (high_top < visible_top) {
|
603 |
+
return this.search_results.scrollTop(high_top);
|
604 |
+
}
|
605 |
+
}
|
606 |
+
};
|
607 |
+
|
608 |
+
Chosen.prototype.result_clear_highlight = function() {
|
609 |
+
if (this.result_highlight) {
|
610 |
+
this.result_highlight.removeClass("highlighted");
|
611 |
+
}
|
612 |
+
return this.result_highlight = null;
|
613 |
+
};
|
614 |
+
|
615 |
+
Chosen.prototype.results_show = function() {
|
616 |
+
var dd_top;
|
617 |
+
if (!this.is_multiple) {
|
618 |
+
this.selected_item.addClass("chzn-single-with-drop");
|
619 |
+
if (this.result_single_selected) {
|
620 |
+
this.result_do_highlight(this.result_single_selected);
|
621 |
+
}
|
622 |
+
} else if (this.max_selected_options <= this.choices) {
|
623 |
+
this.form_field_jq.trigger("liszt:maxselected", {
|
624 |
+
chosen: this
|
625 |
+
});
|
626 |
+
return false;
|
627 |
+
}
|
628 |
+
dd_top = this.is_multiple ? this.container.height() : this.container.height() - 1;
|
629 |
+
this.form_field_jq.trigger("liszt:showing_dropdown", {
|
630 |
+
chosen: this
|
631 |
+
});
|
632 |
+
this.dropdown.css({
|
633 |
+
"top": dd_top + "px",
|
634 |
+
"left": 0
|
635 |
+
});
|
636 |
+
this.results_showing = true;
|
637 |
+
this.search_field.focus();
|
638 |
+
this.search_field.val(this.search_field.val());
|
639 |
+
return this.winnow_results();
|
640 |
+
};
|
641 |
+
|
642 |
+
Chosen.prototype.results_hide = function() {
|
643 |
+
if (!this.is_multiple) {
|
644 |
+
this.selected_item.removeClass("chzn-single-with-drop");
|
645 |
+
}
|
646 |
+
this.result_clear_highlight();
|
647 |
+
this.form_field_jq.trigger("liszt:hiding_dropdown", {
|
648 |
+
chosen: this
|
649 |
+
});
|
650 |
+
this.dropdown.css({
|
651 |
+
"left": "-9000px"
|
652 |
+
});
|
653 |
+
return this.results_showing = false;
|
654 |
+
};
|
655 |
+
|
656 |
+
Chosen.prototype.set_tab_index = function(el) {
|
657 |
+
var ti;
|
658 |
+
if (this.form_field_jq.attr("tabindex")) {
|
659 |
+
ti = this.form_field_jq.attr("tabindex");
|
660 |
+
this.form_field_jq.attr("tabindex", -1);
|
661 |
+
return this.search_field.attr("tabindex", ti);
|
662 |
+
}
|
663 |
+
};
|
664 |
+
|
665 |
+
Chosen.prototype.show_search_field_default = function() {
|
666 |
+
if (this.is_multiple && this.choices < 1 && !this.active_field) {
|
667 |
+
this.search_field.val(this.default_text);
|
668 |
+
return this.search_field.addClass("default");
|
669 |
+
} else {
|
670 |
+
this.search_field.val("");
|
671 |
+
return this.search_field.removeClass("default");
|
672 |
+
}
|
673 |
+
};
|
674 |
+
|
675 |
+
Chosen.prototype.search_results_mouseup = function(evt) {
|
676 |
+
var target;
|
677 |
+
target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
|
678 |
+
if (target.length) {
|
679 |
+
this.result_highlight = target;
|
680 |
+
this.result_select(evt);
|
681 |
+
return this.search_field.focus();
|
682 |
+
}
|
683 |
+
};
|
684 |
+
|
685 |
+
Chosen.prototype.search_results_mouseover = function(evt) {
|
686 |
+
var target;
|
687 |
+
target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
|
688 |
+
if (target) {
|
689 |
+
return this.result_do_highlight(target);
|
690 |
+
}
|
691 |
+
};
|
692 |
+
|
693 |
+
Chosen.prototype.search_results_mouseout = function(evt) {
|
694 |
+
if ($(evt.target).hasClass("active-result" || $(evt.target).parents('.active-result').first())) {
|
695 |
+
return this.result_clear_highlight();
|
696 |
+
}
|
697 |
+
};
|
698 |
+
|
699 |
+
Chosen.prototype.choices_click = function(evt) {
|
700 |
+
evt.preventDefault();
|
701 |
+
if (this.active_field && !($(evt.target).hasClass("search-choice" || $(evt.target).parents('.search-choice').first)) && !this.results_showing) {
|
702 |
+
return this.results_show();
|
703 |
+
}
|
704 |
+
};
|
705 |
+
|
706 |
+
Chosen.prototype.choice_build = function(item) {
|
707 |
+
var choice_id, html, link,
|
708 |
+
_this = this;
|
709 |
+
if (this.is_multiple && this.max_selected_options <= this.choices) {
|
710 |
+
this.form_field_jq.trigger("liszt:maxselected", {
|
711 |
+
chosen: this
|
712 |
+
});
|
713 |
+
return false;
|
714 |
+
}
|
715 |
+
choice_id = this.container_id + "_c_" + item.array_index;
|
716 |
+
this.choices += 1;
|
717 |
+
if (item.disabled) {
|
718 |
+
html = '<li class="search-choice search-choice-disabled" id="' + choice_id + '"><span>' + item.html + '</span></li>';
|
719 |
+
} else {
|
720 |
+
html = '<li class="search-choice" id="' + choice_id + '"><span>' + item.html + '</span><a href="javascript:void(0)" class="search-choice-close" rel="' + item.array_index + '"></a></li>';
|
721 |
+
}
|
722 |
+
this.search_container.before(html);
|
723 |
+
link = $('#' + choice_id).find("a").first();
|
724 |
+
return link.click(function(evt) {
|
725 |
+
return _this.choice_destroy_link_click(evt);
|
726 |
+
});
|
727 |
+
};
|
728 |
+
|
729 |
+
Chosen.prototype.choice_destroy_link_click = function(evt) {
|
730 |
+
evt.preventDefault();
|
731 |
+
if (!this.is_disabled) {
|
732 |
+
this.pending_destroy_click = true;
|
733 |
+
return this.choice_destroy($(evt.target));
|
734 |
+
} else {
|
735 |
+
return evt.stopPropagation;
|
736 |
+
}
|
737 |
+
};
|
738 |
+
|
739 |
+
Chosen.prototype.choice_destroy = function(link) {
|
740 |
+
if (this.result_deselect(link.attr("rel"))) {
|
741 |
+
this.choices -= 1;
|
742 |
+
this.show_search_field_default();
|
743 |
+
if (this.is_multiple && this.choices > 0 && this.search_field.val().length < 1) {
|
744 |
+
this.results_hide();
|
745 |
+
}
|
746 |
+
link.parents('li').first().remove();
|
747 |
+
return this.search_field_scale();
|
748 |
+
}
|
749 |
+
};
|
750 |
+
|
751 |
+
Chosen.prototype.results_reset = function() {
|
752 |
+
this.form_field.options[0].selected = true;
|
753 |
+
this.selected_item.find("span").text(this.default_text);
|
754 |
+
if (!this.is_multiple) {
|
755 |
+
this.selected_item.addClass("chzn-default");
|
756 |
+
}
|
757 |
+
this.show_search_field_default();
|
758 |
+
this.results_reset_cleanup();
|
759 |
+
this.form_field_jq.trigger("change");
|
760 |
+
if (this.active_field) {
|
761 |
+
return this.results_hide();
|
762 |
+
}
|
763 |
+
};
|
764 |
+
|
765 |
+
Chosen.prototype.results_reset_cleanup = function() {
|
766 |
+
this.current_value = this.form_field_jq.val();
|
767 |
+
return this.selected_item.find("abbr").remove();
|
768 |
+
};
|
769 |
+
|
770 |
+
Chosen.prototype.result_select = function(evt) {
|
771 |
+
var high, high_id, item, position;
|
772 |
+
if (this.result_highlight) {
|
773 |
+
high = this.result_highlight;
|
774 |
+
high_id = high.attr("id");
|
775 |
+
this.result_clear_highlight();
|
776 |
+
if (this.is_multiple) {
|
777 |
+
this.result_deactivate(high);
|
778 |
+
} else {
|
779 |
+
this.search_results.find(".result-selected").removeClass("result-selected");
|
780 |
+
this.result_single_selected = high;
|
781 |
+
this.selected_item.removeClass("chzn-default");
|
782 |
+
}
|
783 |
+
high.addClass("result-selected");
|
784 |
+
position = high_id.substr(high_id.lastIndexOf("_") + 1);
|
785 |
+
item = this.results_data[position];
|
786 |
+
item.selected = true;
|
787 |
+
this.form_field.options[item.options_index].selected = true;
|
788 |
+
if (this.is_multiple) {
|
789 |
+
this.choice_build(item);
|
790 |
+
} else {
|
791 |
+
this.selected_item.find("span").first().text(item.text);
|
792 |
+
if (this.allow_single_deselect) {
|
793 |
+
this.single_deselect_control_build();
|
794 |
+
}
|
795 |
+
}
|
796 |
+
if (!((evt.metaKey || evt.ctrlKey) && this.is_multiple)) {
|
797 |
+
this.results_hide();
|
798 |
+
}
|
799 |
+
this.search_field.val("");
|
800 |
+
if (this.is_multiple || this.form_field_jq.val() !== this.current_value) {
|
801 |
+
this.form_field_jq.trigger("change", {
|
802 |
+
'selected': this.form_field.options[item.options_index].value
|
803 |
+
});
|
804 |
+
}
|
805 |
+
this.current_value = this.form_field_jq.val();
|
806 |
+
return this.search_field_scale();
|
807 |
+
}
|
808 |
+
};
|
809 |
+
|
810 |
+
Chosen.prototype.result_activate = function(el) {
|
811 |
+
return el.addClass("active-result");
|
812 |
+
};
|
813 |
+
|
814 |
+
Chosen.prototype.result_deactivate = function(el) {
|
815 |
+
return el.removeClass("active-result");
|
816 |
+
};
|
817 |
+
|
818 |
+
Chosen.prototype.result_deselect = function(pos) {
|
819 |
+
var result, result_data;
|
820 |
+
result_data = this.results_data[pos];
|
821 |
+
if (!this.form_field.options[result_data.options_index].disabled) {
|
822 |
+
result_data.selected = false;
|
823 |
+
this.form_field.options[result_data.options_index].selected = false;
|
824 |
+
result = $("#" + this.container_id + "_o_" + pos);
|
825 |
+
result.removeClass("result-selected").addClass("active-result").show();
|
826 |
+
this.result_clear_highlight();
|
827 |
+
this.winnow_results();
|
828 |
+
this.form_field_jq.trigger("change", {
|
829 |
+
deselected: this.form_field.options[result_data.options_index].value
|
830 |
+
});
|
831 |
+
this.search_field_scale();
|
832 |
+
return true;
|
833 |
+
} else {
|
834 |
+
return false;
|
835 |
+
}
|
836 |
+
};
|
837 |
+
|
838 |
+
Chosen.prototype.single_deselect_control_build = function() {
|
839 |
+
if (this.allow_single_deselect && this.selected_item.find("abbr").length < 1) {
|
840 |
+
return this.selected_item.find("span").first().after("<abbr class=\"search-choice-close\"></abbr>");
|
841 |
+
}
|
842 |
+
};
|
843 |
+
|
844 |
+
Chosen.prototype.winnow_results = function() {
|
845 |
+
var found, option, part, parts, regex, regexAnchor, result, result_id, results, searchText, startpos, text, zregex, _i, _j, _len, _len1, _ref;
|
846 |
+
this.no_results_clear();
|
847 |
+
results = 0;
|
848 |
+
searchText = this.search_field.val() === this.default_text ? "" : $('<div/>').text($.trim(this.search_field.val())).html();
|
849 |
+
regexAnchor = this.search_contains ? "" : "^";
|
850 |
+
regex = new RegExp(regexAnchor + searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), 'i');
|
851 |
+
zregex = new RegExp(searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), 'i');
|
852 |
+
_ref = this.results_data;
|
853 |
+
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
854 |
+
option = _ref[_i];
|
855 |
+
if (!option.disabled && !option.empty) {
|
856 |
+
if (option.group) {
|
857 |
+
$('#' + option.dom_id).css('display', 'none');
|
858 |
+
} else if (!(this.is_multiple && option.selected)) {
|
859 |
+
found = false;
|
860 |
+
result_id = option.dom_id;
|
861 |
+
result = $("#" + result_id);
|
862 |
+
if (regex.test(option.html)) {
|
863 |
+
found = true;
|
864 |
+
results += 1;
|
865 |
+
} else if (this.enable_split_word_search && (option.html.indexOf(" ") >= 0 || option.html.indexOf("[") === 0)) {
|
866 |
+
parts = option.html.replace(/\[|\]/g, "").split(" ");
|
867 |
+
if (parts.length) {
|
868 |
+
for (_j = 0, _len1 = parts.length; _j < _len1; _j++) {
|
869 |
+
part = parts[_j];
|
870 |
+
if (regex.test(part)) {
|
871 |
+
found = true;
|
872 |
+
results += 1;
|
873 |
+
}
|
874 |
+
}
|
875 |
+
}
|
876 |
+
}
|
877 |
+
if (found) {
|
878 |
+
if (searchText.length) {
|
879 |
+
startpos = option.html.search(zregex);
|
880 |
+
text = option.html.substr(0, startpos + searchText.length) + '</em>' + option.html.substr(startpos + searchText.length);
|
881 |
+
text = text.substr(0, startpos) + '<em>' + text.substr(startpos);
|
882 |
+
} else {
|
883 |
+
text = option.html;
|
884 |
+
}
|
885 |
+
result.html(text);
|
886 |
+
this.result_activate(result);
|
887 |
+
if (option.group_array_index != null) {
|
888 |
+
$("#" + this.results_data[option.group_array_index].dom_id).css('display', 'list-item');
|
889 |
+
}
|
890 |
+
} else {
|
891 |
+
if (this.result_highlight && result_id === this.result_highlight.attr('id')) {
|
892 |
+
this.result_clear_highlight();
|
893 |
+
}
|
894 |
+
this.result_deactivate(result);
|
895 |
+
}
|
896 |
+
}
|
897 |
+
}
|
898 |
+
}
|
899 |
+
if (results < 1 && searchText.length) {
|
900 |
+
return this.no_results(searchText);
|
901 |
+
} else {
|
902 |
+
return this.winnow_results_set_highlight();
|
903 |
+
}
|
904 |
+
};
|
905 |
+
|
906 |
+
Chosen.prototype.winnow_results_clear = function() {
|
907 |
+
var li, lis, _i, _len, _results;
|
908 |
+
this.search_field.val("");
|
909 |
+
lis = this.search_results.find("li");
|
910 |
+
_results = [];
|
911 |
+
for (_i = 0, _len = lis.length; _i < _len; _i++) {
|
912 |
+
li = lis[_i];
|
913 |
+
li = $(li);
|
914 |
+
if (li.hasClass("group-result")) {
|
915 |
+
_results.push(li.css('display', 'auto'));
|
916 |
+
} else if (!this.is_multiple || !li.hasClass("result-selected")) {
|
917 |
+
_results.push(this.result_activate(li));
|
918 |
+
} else {
|
919 |
+
_results.push(void 0);
|
920 |
+
}
|
921 |
+
}
|
922 |
+
return _results;
|
923 |
+
};
|
924 |
+
|
925 |
+
Chosen.prototype.winnow_results_set_highlight = function() {
|
926 |
+
var do_high, selected_results;
|
927 |
+
if (!this.result_highlight) {
|
928 |
+
selected_results = !this.is_multiple ? this.search_results.find(".result-selected.active-result") : [];
|
929 |
+
do_high = selected_results.length ? selected_results.first() : this.search_results.find(".active-result").first();
|
930 |
+
if (do_high != null) {
|
931 |
+
return this.result_do_highlight(do_high);
|
932 |
+
}
|
933 |
+
}
|
934 |
+
};
|
935 |
+
|
936 |
+
Chosen.prototype.no_results = function(terms) {
|
937 |
+
var no_results_html;
|
938 |
+
no_results_html = $('<li class="no-results">' + this.results_none_found + ' "<span></span>"</li>');
|
939 |
+
no_results_html.find("span").first().html(terms);
|
940 |
+
return this.search_results.append(no_results_html);
|
941 |
+
};
|
942 |
+
|
943 |
+
Chosen.prototype.no_results_clear = function() {
|
944 |
+
return this.search_results.find(".no-results").remove();
|
945 |
+
};
|
946 |
+
|
947 |
+
Chosen.prototype.keydown_arrow = function() {
|
948 |
+
var first_active, next_sib;
|
949 |
+
if (!this.result_highlight) {
|
950 |
+
first_active = this.search_results.find("li.active-result").first();
|
951 |
+
if (first_active) {
|
952 |
+
this.result_do_highlight($(first_active));
|
953 |
+
}
|
954 |
+
} else if (this.results_showing) {
|
955 |
+
next_sib = this.result_highlight.nextAll("li.active-result").first();
|
956 |
+
if (next_sib) {
|
957 |
+
this.result_do_highlight(next_sib);
|
958 |
+
}
|
959 |
+
}
|
960 |
+
if (!this.results_showing) {
|
961 |
+
return this.results_show();
|
962 |
+
}
|
963 |
+
};
|
964 |
+
|
965 |
+
Chosen.prototype.keyup_arrow = function() {
|
966 |
+
var prev_sibs;
|
967 |
+
if (!this.results_showing && !this.is_multiple) {
|
968 |
+
return this.results_show();
|
969 |
+
} else if (this.result_highlight) {
|
970 |
+
prev_sibs = this.result_highlight.prevAll("li.active-result");
|
971 |
+
if (prev_sibs.length) {
|
972 |
+
return this.result_do_highlight(prev_sibs.first());
|
973 |
+
} else {
|
974 |
+
if (this.choices > 0) {
|
975 |
+
this.results_hide();
|
976 |
+
}
|
977 |
+
return this.result_clear_highlight();
|
978 |
+
}
|
979 |
+
}
|
980 |
+
};
|
981 |
+
|
982 |
+
Chosen.prototype.keydown_backstroke = function() {
|
983 |
+
var next_available_destroy;
|
984 |
+
if (this.pending_backstroke) {
|
985 |
+
this.choice_destroy(this.pending_backstroke.find("a").first());
|
986 |
+
return this.clear_backstroke();
|
987 |
+
} else {
|
988 |
+
next_available_destroy = this.search_container.siblings("li.search-choice").last();
|
989 |
+
if (next_available_destroy.length && !next_available_destroy.hasClass("search-choice-disabled")) {
|
990 |
+
this.pending_backstroke = next_available_destroy;
|
991 |
+
if (this.single_backstroke_delete) {
|
992 |
+
return this.keydown_backstroke();
|
993 |
+
} else {
|
994 |
+
return this.pending_backstroke.addClass("search-choice-focus");
|
995 |
+
}
|
996 |
+
}
|
997 |
+
}
|
998 |
+
};
|
999 |
+
|
1000 |
+
Chosen.prototype.clear_backstroke = function() {
|
1001 |
+
if (this.pending_backstroke) {
|
1002 |
+
this.pending_backstroke.removeClass("search-choice-focus");
|
1003 |
+
}
|
1004 |
+
return this.pending_backstroke = null;
|
1005 |
+
};
|
1006 |
+
|
1007 |
+
Chosen.prototype.keydown_checker = function(evt) {
|
1008 |
+
var stroke, _ref;
|
1009 |
+
stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
|
1010 |
+
this.search_field_scale();
|
1011 |
+
if (stroke !== 8 && this.pending_backstroke) {
|
1012 |
+
this.clear_backstroke();
|
1013 |
+
}
|
1014 |
+
switch (stroke) {
|
1015 |
+
case 8:
|
1016 |
+
this.backstroke_length = this.search_field.val().length;
|
1017 |
+
break;
|
1018 |
+
case 9:
|
1019 |
+
if (this.results_showing && !this.is_multiple) {
|
1020 |
+
this.result_select(evt);
|
1021 |
+
}
|
1022 |
+
this.mouse_on_container = false;
|
1023 |
+
break;
|
1024 |
+
case 13:
|
1025 |
+
evt.preventDefault();
|
1026 |
+
break;
|
1027 |
+
case 38:
|
1028 |
+
evt.preventDefault();
|
1029 |
+
this.keyup_arrow();
|
1030 |
+
break;
|
1031 |
+
case 40:
|
1032 |
+
this.keydown_arrow();
|
1033 |
+
break;
|
1034 |
+
}
|
1035 |
+
};
|
1036 |
+
|
1037 |
+
Chosen.prototype.search_field_scale = function() {
|
1038 |
+
var dd_top, div, h, style, style_block, styles, w, _i, _len;
|
1039 |
+
if (this.is_multiple) {
|
1040 |
+
h = 0;
|
1041 |
+
w = 0;
|
1042 |
+
style_block = "position:absolute; left: -1000px; top: -1000px; display:none;";
|
1043 |
+
styles = ['font-size', 'font-style', 'font-weight', 'font-family', 'line-height', 'text-transform', 'letter-spacing'];
|
1044 |
+
for (_i = 0, _len = styles.length; _i < _len; _i++) {
|
1045 |
+
style = styles[_i];
|
1046 |
+
style_block += style + ":" + this.search_field.css(style) + ";";
|
1047 |
+
}
|
1048 |
+
div = $('<div />', {
|
1049 |
+
'style': style_block
|
1050 |
+
});
|
1051 |
+
div.text(this.search_field.val());
|
1052 |
+
$('body').append(div);
|
1053 |
+
w = div.width() + 25;
|
1054 |
+
div.remove();
|
1055 |
+
if (w > this.f_width - 10) {
|
1056 |
+
w = this.f_width - 10;
|
1057 |
+
}
|
1058 |
+
this.search_field.css({
|
1059 |
+
'width': w + 'px'
|
1060 |
+
});
|
1061 |
+
dd_top = this.container.height();
|
1062 |
+
return this.dropdown.css({
|
1063 |
+
"top": dd_top + "px"
|
1064 |
+
});
|
1065 |
+
}
|
1066 |
+
};
|
1067 |
+
|
1068 |
+
Chosen.prototype.generate_random_id = function() {
|
1069 |
+
var string;
|
1070 |
+
string = "sel" + this.generate_random_char() + this.generate_random_char() + this.generate_random_char();
|
1071 |
+
while ($("#" + string).length > 0) {
|
1072 |
+
string += this.generate_random_char();
|
1073 |
+
}
|
1074 |
+
return string;
|
1075 |
+
};
|
1076 |
+
|
1077 |
+
return Chosen;
|
1078 |
+
|
1079 |
+
})(AbstractChosen);
|
1080 |
+
|
1081 |
+
root.Chosen = Chosen;
|
1082 |
+
|
1083 |
+
get_side_border_padding = function(elmt) {
|
1084 |
+
var side_border_padding;
|
1085 |
+
return side_border_padding = elmt.outerWidth() - elmt.width();
|
1086 |
+
};
|
1087 |
+
|
1088 |
+
root.get_side_border_padding = get_side_border_padding;
|
1089 |
+
|
1090 |
+
}).call(this);
|
assets/js/chosen/chosen.jquery.min.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
-
// Chosen, a Select Box Enhancer for jQuery and Protoype
|
2 |
-
// by Patrick Filler for Harvest, http://getharvest.com
|
3 |
-
//
|
4 |
-
// Version 0.9.12
|
5 |
-
// Full source at https://github.com/harvesthq/chosen
|
6 |
-
// Copyright (c) 2011 Harvest http://getharvest.com
|
7 |
-
|
8 |
-
// MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
|
9 |
-
// This file is generated by `cake build`, do not edit it by hand.
|
10 |
(function(){var e;e=function(){function e(){this.options_index=0,this.parsed=[]}return e.prototype.add_node=function(e){return e.nodeName.toUpperCase()==="OPTGROUP"?this.add_group(e):this.add_option(e)},e.prototype.add_group=function(e){var t,n,r,i,s,o;t=this.parsed.length,this.parsed.push({array_index:t,group:!0,label:e.label,children:0,disabled:e.disabled}),s=e.childNodes,o=[];for(r=0,i=s.length;r<i;r++)n=s[r],o.push(this.add_option(n,t,e.disabled));return o},e.prototype.add_option=function(e,t,n){if(e.nodeName.toUpperCase()==="OPTION")return e.text!==""?(t!=null&&(this.parsed[t].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:e.value,text:e.text,html:e.innerHTML,selected:e.selected,disabled:n===!0?n:e.disabled,group_array_index:t,classes:e.className,style:e.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},e}(),e.select_to_array=function(t){var n,r,i,s,o;r=new e,o=t.childNodes;for(i=0,s=o.length;i<s;i++)n=o[i],r.add_node(n);return r.parsed},this.SelectParser=e}).call(this),function(){var e,t;t=this,e=function(){function e(e,t){this.form_field=e,this.options=t!=null?t:{},this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.finish_setup()}return e.prototype.set_default_values=function(){var e=this;return this.click_test_action=function(t){return e.test_active_click(t)},this.activate_action=function(t){return e.activate_field(t)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.result_single_selected=null,this.allow_single_deselect=this.options.allow_single_deselect!=null&&this.form_field.options[0]!=null&&this.form_field.options[0].text===""?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=this.options.enable_split_word_search!=null?this.options.enable_split_word_search:!0,this.search_contains=this.options.search_contains||!1,this.choices=0,this.single_backstroke_delete=this.options.single_backstroke_delete||!1,this.max_selected_options=this.options.max_selected_options||Infinity,this.inherit_select_classes=this.options.inherit_select_classes||!1},e.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||"Select Some Options":this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||"Select an Option",this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||"No results match"},e.prototype.mouse_enter=function(){return this.mouse_on_container=!0},e.prototype.mouse_leave=function(){return this.mouse_on_container=!1},e.prototype.input_focus=function(e){var t=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return t.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},e.prototype.input_blur=function(e){var t=this;if(!this.mouse_on_container)return this.active_field=!1,setTimeout(function(){return t.blur_test()},100)},e.prototype.result_add_option=function(e){var t,n;return e.disabled?"":(e.dom_id=this.container_id+"_o_"+e.array_index,t=e.selected&&this.is_multiple?[]:["active-result"],e.selected&&t.push("result-selected"),e.group_array_index!=null&&t.push("group-option"),e.classes!==""&&t.push(e.classes),n=e.style.cssText!==""?' style="'+e.style+'"':"",'<li id="'+e.dom_id+'" class="'+t.join(" ")+'"'+n+">"+e.html+"</li>")},e.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.result_single_selected=null,this.results_build()},e.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},e.prototype.results_search=function(e){return this.results_showing?this.winnow_results():this.results_show()},e.prototype.keyup_checker=function(e){var t,n;t=(n=e.which)!=null?n:e.keyCode,this.search_field_scale();switch(t){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:e.preventDefault();if(this.results_showing)return this.result_select(e);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},e.prototype.generate_field_id=function(){var e;return e=this.generate_random_id(),this.form_field.id=e,e},e.prototype.generate_random_char=function(){var e,t,n;return e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",n=Math.floor(Math.random()*e.length),t=e.substring(n,n+1)},e}(),t.AbstractChosen=e}.call(this),function(){var e,t,n,r,i={}.hasOwnProperty,s=function(e,t){function r(){this.constructor=e}for(var n in t)i.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e};r=this,e=jQuery,e.fn.extend({chosen:function(n){var r,i,s;return s=navigator.userAgent.toLowerCase(),i=/(msie) ([\w.]+)/.exec(s)||[],r={name:i[1]||"",version:i[2]||"0"},r.name==="msie"&&(r.version==="6.0"||r.version==="7.0"&&document.documentMode===7)?this:this.each(function(r){var i;i=e(this);if(!i.hasClass("chzn-done"))return i.data("chosen",new t(this,n))})}}),t=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return s(i,t),i.prototype.setup=function(){return this.form_field_jq=e(this.form_field),this.current_value=this.form_field_jq.val(),this.is_rtl=this.form_field_jq.hasClass("chzn-rtl")},i.prototype.finish_setup=function(){return this.form_field_jq.addClass("chzn-done")},i.prototype.set_up_html=function(){var t,r,i,s,o,u;return this.container_id=this.form_field.id.length?this.form_field.id.replace(/[^\w]/g,"_"):this.generate_field_id(),this.container_id+="_chzn",t=["chzn-container"],t.push("chzn-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&t.push(this.form_field.className),this.is_rtl&&t.push("chzn-rtl"),this.f_width=this.form_field_jq.outerWidth(),i={id:this.container_id,"class":t.join(" "),style:"width: "+this.f_width+"px;",title:this.form_field.title},r=e("<div />",i),this.is_multiple?r.html('<ul class="chzn-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chzn-drop" style="left:-9000px;"><ul class="chzn-results"></ul></div>'):r.html('<a href="javascript:void(0)" class="chzn-single chzn-default" tabindex="-1"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chzn-drop" style="left:-9000px;"><div class="chzn-search"><input type="text" autocomplete="off" /></div><ul class="chzn-results"></ul></div>'),this.form_field_jq.hide().after(r),this.container=e("#"+this.container_id),this.dropdown=this.container.find("div.chzn-drop").first(),s=this.container.height(),o=this.f_width-n(this.dropdown),this.dropdown.css({width:o+"px",top:s+"px"}),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chzn-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chzn-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chzn-search").first(),this.selected_item=this.container.find(".chzn-single").first(),u=o-n(this.search_container)-n(this.search_field),this.search_field.css({width:u+"px"})),this.results_build(),this.set_tab_index(),this.form_field_jq.trigger("liszt:ready",{chosen:this})},i.prototype.register_observers=function(){var e=this;return this.container.mousedown(function(t){e.container_mousedown(t)}),this.container.mouseup(function(t){e.container_mouseup(t)}),this.container.mouseenter(function(t){e.mouse_enter(t)}),this.container.mouseleave(function(t){e.mouse_leave(t)}),this.search_results.mouseup(function(t){e.search_results_mouseup(t)}),this.search_results.mouseover(function(t){e.search_results_mouseover(t)}),this.search_results.mouseout(function(t){e.search_results_mouseout(t)}),this.form_field_jq.bind("liszt:updated",function(t){e.results_update_field(t)}),this.form_field_jq.bind("liszt:activate",function(t){e.activate_field(t)}),this.form_field_jq.bind("liszt:open",function(t){e.container_mousedown(t)}),this.search_field.blur(function(t){e.input_blur(t)}),this.search_field.keyup(function(t){e.keyup_checker(t)}),this.search_field.keydown(function(t){e.keydown_checker(t)}),this.search_field.focus(function(t){e.input_focus(t)}),this.is_multiple?this.search_choices.click(function(t){e.choices_click(t)}):this.container.click(function(e){e.preventDefault()})},i.prototype.search_field_disabled=function(){this.is_disabled=this.form_field_jq[0].disabled;if(this.is_disabled)return this.container.addClass("chzn-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus",this.activate_action),this.close_field();this.container.removeClass("chzn-disabled"),this.search_field[0].disabled=!1;if(!this.is_multiple)return this.selected_item.bind("focus",this.activate_action)},i.prototype.container_mousedown=function(t){var n;if(!this.is_disabled)return n=t!=null?e(t.target).hasClass("search-choice-close"):!1,t&&t.type==="mousedown"&&!this.results_showing&&t.preventDefault(),!this.pending_destroy_click&&!n?(this.active_field?!this.is_multiple&&t&&(e(t.target)[0]===this.selected_item[0]||e(t.target).parents("a.chzn-single").length)&&(t.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),e(document).click(this.click_test_action),this.results_show()),this.activate_field()):this.pending_destroy_click=!1},i.prototype.container_mouseup=function(e){if(e.target.nodeName==="ABBR"&&!this.is_disabled)return this.results_reset(e)},i.prototype.blur_test=function(e){if(!this.active_field&&this.container.hasClass("chzn-container-active"))return this.close_field()},i.prototype.close_field=function(){return e(document).unbind("click",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chzn-container-active"),this.winnow_results_clear(),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},i.prototype.activate_field=function(){return this.container.addClass("chzn-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},i.prototype.test_active_click=function(t){return e(t.target).parents("#"+this.container_id).length?this.active_field=!0:this.close_field()},i.prototype.results_build=function(){var e,t,n,i,s;this.parsing=!0,this.results_data=r.SelectParser.select_to_array(this.form_field),this.is_multiple&&this.choices>0?(this.search_choices.find("li.search-choice").remove(),this.choices=0):this.is_multiple||(this.selected_item.addClass("chzn-default").find("span").text(this.default_text),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?this.container.addClass("chzn-container-single-nosearch"):this.container.removeClass("chzn-container-single-nosearch")),e="",s=this.results_data;for(n=0,i=s.length;n<i;n++)t=s[n],t.group?e+=this.result_add_group(t):t.empty||(e+=this.result_add_option(t),t.selected&&this.is_multiple?this.choice_build(t):t.selected&&!this.is_multiple&&(this.selected_item.removeClass("chzn-default").find("span").text(t.text),this.allow_single_deselect&&this.single_deselect_control_build()));return this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.search_results.html(e),this.parsing=!1},i.prototype.result_add_group=function(t){return t.disabled?"":(t.dom_id=this.container_id+"_g_"+t.array_index,'<li id="'+t.dom_id+'" class="group-result">'+e("<div />").text(t.label).html()+"</li>")},i.prototype.result_do_highlight=function(e){var t,n,r,i,s;if(e.length){this.result_clear_highlight(),this.result_highlight=e,this.result_highlight.addClass("highlighted"),r=parseInt(this.search_results.css("maxHeight"),10),s=this.search_results.scrollTop(),i=r+s,n=this.result_highlight.position().top+this.search_results.scrollTop(),t=n+this.result_highlight.outerHeight();if(t>=i)return this.search_results.scrollTop(t-r>0?t-r:0);if(n<s)return this.search_results.scrollTop(n)}},i.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},i.prototype.results_show=function(){var e;if(!this.is_multiple)this.selected_item.addClass("chzn-single-with-drop"),this.result_single_selected&&this.result_do_highlight(this.result_single_selected);else if(this.max_selected_options<=this.choices)return this.form_field_jq.trigger("liszt:maxselected",{chosen:this}),!1;return e=this.is_multiple?this.container.height():this.container.height()-1,this.form_field_jq.trigger("liszt:showing_dropdown",{chosen:this}),this.dropdown.css({top:e+"px",left:0}),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results()},i.prototype.results_hide=function(){return this.is_multiple||this.selected_item.removeClass("chzn-single-with-drop"),this.result_clear_highlight(),this.form_field_jq.trigger("liszt:hiding_dropdown",{chosen:this}),this.dropdown.css({left:"-9000px"}),this.results_showing=!1},i.prototype.set_tab_index=function(e){var t;if(this.form_field_jq.attr("tabindex"))return t=this.form_field_jq.attr("tabindex"),this.form_field_jq.attr("tabindex",-1),this.search_field.attr("tabindex",t)},i.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},i.prototype.search_results_mouseup=function(t){var n;n=e(t.target).hasClass("active-result")?e(t.target):e(t.target).parents(".active-result").first();if(n.length)return this.result_highlight=n,this.result_select(t),this.search_field.focus()},i.prototype.search_results_mouseover=function(t){var n;n=e(t.target).hasClass("active-result")?e(t.target):e(t.target).parents(".active-result").first();if(n)return this.result_do_highlight(n)},i.prototype.search_results_mouseout=function(t){if(e(t.target).hasClass("active-result"))return this.result_clear_highlight()},i.prototype.choices_click=function(t){t.preventDefault();if(this.active_field&&!e(t.target).hasClass("search-choice")&&!this.results_showing)return this.results_show()},i.prototype.choice_build=function(t){var n,r,i,s=this;return this.is_multiple&&this.max_selected_options<=this.choices?(this.form_field_jq.trigger("liszt:maxselected",{chosen:this}),!1):(n=this.container_id+"_c_"+t.array_index,this.choices+=1,t.disabled?r='<li class="search-choice search-choice-disabled" id="'+n+'"><span>'+t.html+"</span></li>":r='<li class="search-choice" id="'+n+'"><span>'+t.html+'</span><a href="javascript:void(0)" class="search-choice-close" rel="'+t.array_index+'"></a></li>',this.search_container.before(r),i=e("#"+n).find("a").first(),i.click(function(e){return s.choice_destroy_link_click(e)}))},i.prototype.choice_destroy_link_click=function(t){return t.preventDefault(),this.is_disabled?t.stopPropagation:(this.pending_destroy_click=!0,this.choice_destroy(e(t.target)))},i.prototype.choice_destroy=function(e){if(this.result_deselect(e.attr("rel")))return this.choices-=1,this.show_search_field_default(),this.is_multiple&&this.choices>0&&this.search_field.val().length<1&&this.results_hide(),e.parents("li").first().remove(),this.search_field_scale()},i.prototype.results_reset=function(){this.form_field.options[0].selected=!0,this.selected_item.find("span").text(this.default_text),this.is_multiple||this.selected_item.addClass("chzn-default"),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change");if(this.active_field)return this.results_hide()},i.prototype.results_reset_cleanup=function(){return this.current_value=this.form_field_jq.val(),this.selected_item.find("abbr").remove()},i.prototype.result_select=function(e){var t,n,r,i;if(this.result_highlight)return t=this.result_highlight,n=t.attr("id"),this.result_clear_highlight(),this.is_multiple?this.result_deactivate(t):(this.search_results.find(".result-selected").removeClass("result-selected"),this.result_single_selected=t,this.selected_item.removeClass("chzn-default")),t.addClass("result-selected"),i=n.substr(n.lastIndexOf("_")+1),r=this.results_data[i],r.selected=!0,this.form_field.options[r.options_index].selected=!0,this.is_multiple?this.choice_build(r):(this.selected_item.find("span").first().text(r.text),this.allow_single_deselect&&this.single_deselect_control_build()),(!e.metaKey&&!e.ctrlKey||!this.is_multiple)&&this.results_hide(),this.search_field.val(""),(this.is_multiple||this.form_field_jq.val()!==this.current_value)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[r.options_index].value}),this.current_value=this.form_field_jq.val(),this.search_field_scale()},i.prototype.result_activate=function(e){return e.addClass("active-result")},i.prototype.result_deactivate=function(e){return e.removeClass("active-result")},i.prototype.result_deselect=function(t){var n,r;return r=this.results_data[t],this.form_field.options[r.options_index].disabled?!1:(r.selected=!1,this.form_field.options[r.options_index].selected=!1,n=e("#"+this.container_id+"_o_"+t),n.removeClass("result-selected").addClass("active-result").show(),this.result_clear_highlight(),this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[r.options_index].value}),this.search_field_scale(),!0)},i.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect&&this.selected_item.find("abbr").length<1)return this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>')},i.prototype.winnow_results=function(){var t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y;this.no_results_clear(),f=0,l=this.search_field.val()===this.default_text?"":e("<div/>").text(e.trim(this.search_field.val())).html(),o=this.search_contains?"":"^",s=new RegExp(o+l.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),p=new RegExp(l.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),y=this.results_data;for(d=0,m=y.length;d<m;d++){n=y[d];if(!n.disabled&&!n.empty)if(n.group)e("#"+n.dom_id).css("display","none");else if(!this.is_multiple||!n.selected){t=!1,a=n.dom_id,u=e("#"+a);if(s.test(n.html))t=!0,f+=1;else if(this.enable_split_word_search&&(n.html.indexOf(" ")>=0||n.html.indexOf("[")===0)){i=n.html.replace(/\[|\]/g,"").split(" ");if(i.length)for(v=0,g=i.length;v<g;v++)r=i[v],s.test(r)&&(t=!0,f+=1)}t?(l.length?(c=n.html.search(p),h=n.html.substr(0,c+l.length)+"</em>"+n.html.substr(c+l.length),h=h.substr(0,c)+"<em>"+h.substr(c)):h=n.html,u.html(h),this.result_activate(u),n.group_array_index!=null&&e("#"+this.results_data[n.group_array_index].dom_id).css("display","list-item")):(this.result_highlight&&a===this.result_highlight.attr("id")&&this.result_clear_highlight(),this.result_deactivate(u))}}return f<1&&l.length?this.no_results(l):this.winnow_results_set_highlight()},i.prototype.winnow_results_clear=function(){var t,n,r,i,s;this.search_field.val(""),n=this.search_results.find("li"),s=[];for(r=0,i=n.length;r<i;r++)t=n[r],t=e(t),t.hasClass("group-result")?s.push(t.css("display","auto")):!this.is_multiple||!t.hasClass("result-selected")?s.push(this.result_activate(t)):s.push(void 0);return s},i.prototype.winnow_results_set_highlight=function(){var e,t;if(!this.result_highlight){t=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),e=t.length?t.first():this.search_results.find(".active-result").first();if(e!=null)return this.result_do_highlight(e)}},i.prototype.no_results=function(t){var n;return n=e('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>'),n.find("span").first().html(t),this.search_results.append(n)},i.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},i.prototype.keydown_arrow=function(){var t,n;this.result_highlight?this.results_showing&&(n=this.result_highlight.nextAll("li.active-result").first(),n&&this.result_do_highlight(n)):(t=this.search_results.find("li.active-result").first(),t&&this.result_do_highlight(e(t)));if(!this.results_showing)return this.results_show()},i.prototype.keyup_arrow=function(){var e;if(!this.results_showing&&!this.is_multiple)return this.results_show();if(this.result_highlight)return e=this.result_highlight.prevAll("li.active-result"),e.length?this.result_do_highlight(e.first()):(this.choices>0&&this.results_hide(),this.result_clear_highlight())},i.prototype.keydown_backstroke=function(){var e;if(this.pending_backstroke)return this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke();e=this.search_container.siblings("li.search-choice").last();if(e.length&&!e.hasClass("search-choice-disabled"))return this.pending_backstroke=e,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")},i.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},i.prototype.keydown_checker=function(e){var t,n;t=(n=e.which)!=null?n:e.keyCode,this.search_field_scale(),t!==8&&this.pending_backstroke&&this.clear_backstroke();switch(t){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(e),this.mouse_on_container=!1;break;case 13:e.preventDefault();break;case 38:e.preventDefault(),this.keyup_arrow();break;case 40:this.keydown_arrow()}},i.prototype.search_field_scale=function(){var t,n,r,i,s,o,u,a,f;if(this.is_multiple){r=0,u=0,s="position:absolute; left: -1000px; top: -1000px; display:none;",o=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"];for(a=0,f=o.length;a<f;a++)i=o[a],s+=i+":"+this.search_field.css(i)+";";return n=e("<div />",{style:s}),n.text(this.search_field.val()),e("body").append(n),u=n.width()+25,n.remove(),u>this.f_width-10&&(u=this.f_width-10),this.search_field.css({width:u+"px"}),t=this.container.height(),this.dropdown.css({top:t+"px"})}},i.prototype.generate_random_id=function(){var t;t="sel"+this.generate_random_char()+this.generate_random_char()+this.generate_random_char();while(e("#"+t).length>0)t+=this.generate_random_char();return t},i}(AbstractChosen),r.Chosen=t,n=function(e){var t;return t=e.outerWidth()-e.width()},r.get_side_border_padding=n}.call(this);
|
1 |
+
// Chosen, a Select Box Enhancer for jQuery and Protoype
|
2 |
+
// by Patrick Filler for Harvest, http://getharvest.com
|
3 |
+
//
|
4 |
+
// Version 0.9.12
|
5 |
+
// Full source at https://github.com/harvesthq/chosen
|
6 |
+
// Copyright (c) 2011 Harvest http://getharvest.com
|
7 |
+
|
8 |
+
// MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
|
9 |
+
// This file is generated by `cake build`, do not edit it by hand.
|
10 |
(function(){var e;e=function(){function e(){this.options_index=0,this.parsed=[]}return e.prototype.add_node=function(e){return e.nodeName.toUpperCase()==="OPTGROUP"?this.add_group(e):this.add_option(e)},e.prototype.add_group=function(e){var t,n,r,i,s,o;t=this.parsed.length,this.parsed.push({array_index:t,group:!0,label:e.label,children:0,disabled:e.disabled}),s=e.childNodes,o=[];for(r=0,i=s.length;r<i;r++)n=s[r],o.push(this.add_option(n,t,e.disabled));return o},e.prototype.add_option=function(e,t,n){if(e.nodeName.toUpperCase()==="OPTION")return e.text!==""?(t!=null&&(this.parsed[t].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:e.value,text:e.text,html:e.innerHTML,selected:e.selected,disabled:n===!0?n:e.disabled,group_array_index:t,classes:e.className,style:e.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},e}(),e.select_to_array=function(t){var n,r,i,s,o;r=new e,o=t.childNodes;for(i=0,s=o.length;i<s;i++)n=o[i],r.add_node(n);return r.parsed},this.SelectParser=e}).call(this),function(){var e,t;t=this,e=function(){function e(e,t){this.form_field=e,this.options=t!=null?t:{},this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.finish_setup()}return e.prototype.set_default_values=function(){var e=this;return this.click_test_action=function(t){return e.test_active_click(t)},this.activate_action=function(t){return e.activate_field(t)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.result_single_selected=null,this.allow_single_deselect=this.options.allow_single_deselect!=null&&this.form_field.options[0]!=null&&this.form_field.options[0].text===""?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=this.options.enable_split_word_search!=null?this.options.enable_split_word_search:!0,this.search_contains=this.options.search_contains||!1,this.choices=0,this.single_backstroke_delete=this.options.single_backstroke_delete||!1,this.max_selected_options=this.options.max_selected_options||Infinity,this.inherit_select_classes=this.options.inherit_select_classes||!1},e.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||"Select Some Options":this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||"Select an Option",this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||"No results match"},e.prototype.mouse_enter=function(){return this.mouse_on_container=!0},e.prototype.mouse_leave=function(){return this.mouse_on_container=!1},e.prototype.input_focus=function(e){var t=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return t.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},e.prototype.input_blur=function(e){var t=this;if(!this.mouse_on_container)return this.active_field=!1,setTimeout(function(){return t.blur_test()},100)},e.prototype.result_add_option=function(e){var t,n;return e.disabled?"":(e.dom_id=this.container_id+"_o_"+e.array_index,t=e.selected&&this.is_multiple?[]:["active-result"],e.selected&&t.push("result-selected"),e.group_array_index!=null&&t.push("group-option"),e.classes!==""&&t.push(e.classes),n=e.style.cssText!==""?' style="'+e.style+'"':"",'<li id="'+e.dom_id+'" class="'+t.join(" ")+'"'+n+">"+e.html+"</li>")},e.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.result_single_selected=null,this.results_build()},e.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},e.prototype.results_search=function(e){return this.results_showing?this.winnow_results():this.results_show()},e.prototype.keyup_checker=function(e){var t,n;t=(n=e.which)!=null?n:e.keyCode,this.search_field_scale();switch(t){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:e.preventDefault();if(this.results_showing)return this.result_select(e);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},e.prototype.generate_field_id=function(){var e;return e=this.generate_random_id(),this.form_field.id=e,e},e.prototype.generate_random_char=function(){var e,t,n;return e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",n=Math.floor(Math.random()*e.length),t=e.substring(n,n+1)},e}(),t.AbstractChosen=e}.call(this),function(){var e,t,n,r,i={}.hasOwnProperty,s=function(e,t){function r(){this.constructor=e}for(var n in t)i.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e};r=this,e=jQuery,e.fn.extend({chosen:function(n){var r,i,s;return s=navigator.userAgent.toLowerCase(),i=/(msie) ([\w.]+)/.exec(s)||[],r={name:i[1]||"",version:i[2]||"0"},r.name==="msie"&&(r.version==="6.0"||r.version==="7.0"&&document.documentMode===7)?this:this.each(function(r){var i;i=e(this);if(!i.hasClass("chzn-done"))return i.data("chosen",new t(this,n))})}}),t=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return s(i,t),i.prototype.setup=function(){return this.form_field_jq=e(this.form_field),this.current_value=this.form_field_jq.val(),this.is_rtl=this.form_field_jq.hasClass("chzn-rtl")},i.prototype.finish_setup=function(){return this.form_field_jq.addClass("chzn-done")},i.prototype.set_up_html=function(){var t,r,i,s,o,u;return this.container_id=this.form_field.id.length?this.form_field.id.replace(/[^\w]/g,"_"):this.generate_field_id(),this.container_id+="_chzn",t=["chzn-container"],t.push("chzn-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&t.push(this.form_field.className),this.is_rtl&&t.push("chzn-rtl"),this.f_width=this.form_field_jq.outerWidth(),i={id:this.container_id,"class":t.join(" "),style:"width: "+this.f_width+"px;",title:this.form_field.title},r=e("<div />",i),this.is_multiple?r.html('<ul class="chzn-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chzn-drop" style="left:-9000px;"><ul class="chzn-results"></ul></div>'):r.html('<a href="javascript:void(0)" class="chzn-single chzn-default" tabindex="-1"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chzn-drop" style="left:-9000px;"><div class="chzn-search"><input type="text" autocomplete="off" /></div><ul class="chzn-results"></ul></div>'),this.form_field_jq.hide().after(r),this.container=e("#"+this.container_id),this.dropdown=this.container.find("div.chzn-drop").first(),s=this.container.height(),o=this.f_width-n(this.dropdown),this.dropdown.css({width:o+"px",top:s+"px"}),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chzn-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chzn-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chzn-search").first(),this.selected_item=this.container.find(".chzn-single").first(),u=o-n(this.search_container)-n(this.search_field),this.search_field.css({width:u+"px"})),this.results_build(),this.set_tab_index(),this.form_field_jq.trigger("liszt:ready",{chosen:this})},i.prototype.register_observers=function(){var e=this;return this.container.mousedown(function(t){e.container_mousedown(t)}),this.container.mouseup(function(t){e.container_mouseup(t)}),this.container.mouseenter(function(t){e.mouse_enter(t)}),this.container.mouseleave(function(t){e.mouse_leave(t)}),this.search_results.mouseup(function(t){e.search_results_mouseup(t)}),this.search_results.mouseover(function(t){e.search_results_mouseover(t)}),this.search_results.mouseout(function(t){e.search_results_mouseout(t)}),this.form_field_jq.bind("liszt:updated",function(t){e.results_update_field(t)}),this.form_field_jq.bind("liszt:activate",function(t){e.activate_field(t)}),this.form_field_jq.bind("liszt:open",function(t){e.container_mousedown(t)}),this.search_field.blur(function(t){e.input_blur(t)}),this.search_field.keyup(function(t){e.keyup_checker(t)}),this.search_field.keydown(function(t){e.keydown_checker(t)}),this.search_field.focus(function(t){e.input_focus(t)}),this.is_multiple?this.search_choices.click(function(t){e.choices_click(t)}):this.container.click(function(e){e.preventDefault()})},i.prototype.search_field_disabled=function(){this.is_disabled=this.form_field_jq[0].disabled;if(this.is_disabled)return this.container.addClass("chzn-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus",this.activate_action),this.close_field();this.container.removeClass("chzn-disabled"),this.search_field[0].disabled=!1;if(!this.is_multiple)return this.selected_item.bind("focus",this.activate_action)},i.prototype.container_mousedown=function(t){var n;if(!this.is_disabled)return n=t!=null?e(t.target).hasClass("search-choice-close"):!1,t&&t.type==="mousedown"&&!this.results_showing&&t.preventDefault(),!this.pending_destroy_click&&!n?(this.active_field?!this.is_multiple&&t&&(e(t.target)[0]===this.selected_item[0]||e(t.target).parents("a.chzn-single").length)&&(t.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),e(document).click(this.click_test_action),this.results_show()),this.activate_field()):this.pending_destroy_click=!1},i.prototype.container_mouseup=function(e){if(e.target.nodeName==="ABBR"&&!this.is_disabled)return this.results_reset(e)},i.prototype.blur_test=function(e){if(!this.active_field&&this.container.hasClass("chzn-container-active"))return this.close_field()},i.prototype.close_field=function(){return e(document).unbind("click",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chzn-container-active"),this.winnow_results_clear(),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},i.prototype.activate_field=function(){return this.container.addClass("chzn-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},i.prototype.test_active_click=function(t){return e(t.target).parents("#"+this.container_id).length?this.active_field=!0:this.close_field()},i.prototype.results_build=function(){var e,t,n,i,s;this.parsing=!0,this.results_data=r.SelectParser.select_to_array(this.form_field),this.is_multiple&&this.choices>0?(this.search_choices.find("li.search-choice").remove(),this.choices=0):this.is_multiple||(this.selected_item.addClass("chzn-default").find("span").text(this.default_text),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?this.container.addClass("chzn-container-single-nosearch"):this.container.removeClass("chzn-container-single-nosearch")),e="",s=this.results_data;for(n=0,i=s.length;n<i;n++)t=s[n],t.group?e+=this.result_add_group(t):t.empty||(e+=this.result_add_option(t),t.selected&&this.is_multiple?this.choice_build(t):t.selected&&!this.is_multiple&&(this.selected_item.removeClass("chzn-default").find("span").text(t.text),this.allow_single_deselect&&this.single_deselect_control_build()));return this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.search_results.html(e),this.parsing=!1},i.prototype.result_add_group=function(t){return t.disabled?"":(t.dom_id=this.container_id+"_g_"+t.array_index,'<li id="'+t.dom_id+'" class="group-result">'+e("<div />").text(t.label).html()+"</li>")},i.prototype.result_do_highlight=function(e){var t,n,r,i,s;if(e.length){this.result_clear_highlight(),this.result_highlight=e,this.result_highlight.addClass("highlighted"),r=parseInt(this.search_results.css("maxHeight"),10),s=this.search_results.scrollTop(),i=r+s,n=this.result_highlight.position().top+this.search_results.scrollTop(),t=n+this.result_highlight.outerHeight();if(t>=i)return this.search_results.scrollTop(t-r>0?t-r:0);if(n<s)return this.search_results.scrollTop(n)}},i.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},i.prototype.results_show=function(){var e;if(!this.is_multiple)this.selected_item.addClass("chzn-single-with-drop"),this.result_single_selected&&this.result_do_highlight(this.result_single_selected);else if(this.max_selected_options<=this.choices)return this.form_field_jq.trigger("liszt:maxselected",{chosen:this}),!1;return e=this.is_multiple?this.container.height():this.container.height()-1,this.form_field_jq.trigger("liszt:showing_dropdown",{chosen:this}),this.dropdown.css({top:e+"px",left:0}),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results()},i.prototype.results_hide=function(){return this.is_multiple||this.selected_item.removeClass("chzn-single-with-drop"),this.result_clear_highlight(),this.form_field_jq.trigger("liszt:hiding_dropdown",{chosen:this}),this.dropdown.css({left:"-9000px"}),this.results_showing=!1},i.prototype.set_tab_index=function(e){var t;if(this.form_field_jq.attr("tabindex"))return t=this.form_field_jq.attr("tabindex"),this.form_field_jq.attr("tabindex",-1),this.search_field.attr("tabindex",t)},i.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},i.prototype.search_results_mouseup=function(t){var n;n=e(t.target).hasClass("active-result")?e(t.target):e(t.target).parents(".active-result").first();if(n.length)return this.result_highlight=n,this.result_select(t),this.search_field.focus()},i.prototype.search_results_mouseover=function(t){var n;n=e(t.target).hasClass("active-result")?e(t.target):e(t.target).parents(".active-result").first();if(n)return this.result_do_highlight(n)},i.prototype.search_results_mouseout=function(t){if(e(t.target).hasClass("active-result"))return this.result_clear_highlight()},i.prototype.choices_click=function(t){t.preventDefault();if(this.active_field&&!e(t.target).hasClass("search-choice")&&!this.results_showing)return this.results_show()},i.prototype.choice_build=function(t){var n,r,i,s=this;return this.is_multiple&&this.max_selected_options<=this.choices?(this.form_field_jq.trigger("liszt:maxselected",{chosen:this}),!1):(n=this.container_id+"_c_"+t.array_index,this.choices+=1,t.disabled?r='<li class="search-choice search-choice-disabled" id="'+n+'"><span>'+t.html+"</span></li>":r='<li class="search-choice" id="'+n+'"><span>'+t.html+'</span><a href="javascript:void(0)" class="search-choice-close" rel="'+t.array_index+'"></a></li>',this.search_container.before(r),i=e("#"+n).find("a").first(),i.click(function(e){return s.choice_destroy_link_click(e)}))},i.prototype.choice_destroy_link_click=function(t){return t.preventDefault(),this.is_disabled?t.stopPropagation:(this.pending_destroy_click=!0,this.choice_destroy(e(t.target)))},i.prototype.choice_destroy=function(e){if(this.result_deselect(e.attr("rel")))return this.choices-=1,this.show_search_field_default(),this.is_multiple&&this.choices>0&&this.search_field.val().length<1&&this.results_hide(),e.parents("li").first().remove(),this.search_field_scale()},i.prototype.results_reset=function(){this.form_field.options[0].selected=!0,this.selected_item.find("span").text(this.default_text),this.is_multiple||this.selected_item.addClass("chzn-default"),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change");if(this.active_field)return this.results_hide()},i.prototype.results_reset_cleanup=function(){return this.current_value=this.form_field_jq.val(),this.selected_item.find("abbr").remove()},i.prototype.result_select=function(e){var t,n,r,i;if(this.result_highlight)return t=this.result_highlight,n=t.attr("id"),this.result_clear_highlight(),this.is_multiple?this.result_deactivate(t):(this.search_results.find(".result-selected").removeClass("result-selected"),this.result_single_selected=t,this.selected_item.removeClass("chzn-default")),t.addClass("result-selected"),i=n.substr(n.lastIndexOf("_")+1),r=this.results_data[i],r.selected=!0,this.form_field.options[r.options_index].selected=!0,this.is_multiple?this.choice_build(r):(this.selected_item.find("span").first().text(r.text),this.allow_single_deselect&&this.single_deselect_control_build()),(!e.metaKey&&!e.ctrlKey||!this.is_multiple)&&this.results_hide(),this.search_field.val(""),(this.is_multiple||this.form_field_jq.val()!==this.current_value)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[r.options_index].value}),this.current_value=this.form_field_jq.val(),this.search_field_scale()},i.prototype.result_activate=function(e){return e.addClass("active-result")},i.prototype.result_deactivate=function(e){return e.removeClass("active-result")},i.prototype.result_deselect=function(t){var n,r;return r=this.results_data[t],this.form_field.options[r.options_index].disabled?!1:(r.selected=!1,this.form_field.options[r.options_index].selected=!1,n=e("#"+this.container_id+"_o_"+t),n.removeClass("result-selected").addClass("active-result").show(),this.result_clear_highlight(),this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[r.options_index].value}),this.search_field_scale(),!0)},i.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect&&this.selected_item.find("abbr").length<1)return this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>')},i.prototype.winnow_results=function(){var t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y;this.no_results_clear(),f=0,l=this.search_field.val()===this.default_text?"":e("<div/>").text(e.trim(this.search_field.val())).html(),o=this.search_contains?"":"^",s=new RegExp(o+l.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),p=new RegExp(l.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),y=this.results_data;for(d=0,m=y.length;d<m;d++){n=y[d];if(!n.disabled&&!n.empty)if(n.group)e("#"+n.dom_id).css("display","none");else if(!this.is_multiple||!n.selected){t=!1,a=n.dom_id,u=e("#"+a);if(s.test(n.html))t=!0,f+=1;else if(this.enable_split_word_search&&(n.html.indexOf(" ")>=0||n.html.indexOf("[")===0)){i=n.html.replace(/\[|\]/g,"").split(" ");if(i.length)for(v=0,g=i.length;v<g;v++)r=i[v],s.test(r)&&(t=!0,f+=1)}t?(l.length?(c=n.html.search(p),h=n.html.substr(0,c+l.length)+"</em>"+n.html.substr(c+l.length),h=h.substr(0,c)+"<em>"+h.substr(c)):h=n.html,u.html(h),this.result_activate(u),n.group_array_index!=null&&e("#"+this.results_data[n.group_array_index].dom_id).css("display","list-item")):(this.result_highlight&&a===this.result_highlight.attr("id")&&this.result_clear_highlight(),this.result_deactivate(u))}}return f<1&&l.length?this.no_results(l):this.winnow_results_set_highlight()},i.prototype.winnow_results_clear=function(){var t,n,r,i,s;this.search_field.val(""),n=this.search_results.find("li"),s=[];for(r=0,i=n.length;r<i;r++)t=n[r],t=e(t),t.hasClass("group-result")?s.push(t.css("display","auto")):!this.is_multiple||!t.hasClass("result-selected")?s.push(this.result_activate(t)):s.push(void 0);return s},i.prototype.winnow_results_set_highlight=function(){var e,t;if(!this.result_highlight){t=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),e=t.length?t.first():this.search_results.find(".active-result").first();if(e!=null)return this.result_do_highlight(e)}},i.prototype.no_results=function(t){var n;return n=e('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>'),n.find("span").first().html(t),this.search_results.append(n)},i.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},i.prototype.keydown_arrow=function(){var t,n;this.result_highlight?this.results_showing&&(n=this.result_highlight.nextAll("li.active-result").first(),n&&this.result_do_highlight(n)):(t=this.search_results.find("li.active-result").first(),t&&this.result_do_highlight(e(t)));if(!this.results_showing)return this.results_show()},i.prototype.keyup_arrow=function(){var e;if(!this.results_showing&&!this.is_multiple)return this.results_show();if(this.result_highlight)return e=this.result_highlight.prevAll("li.active-result"),e.length?this.result_do_highlight(e.first()):(this.choices>0&&this.results_hide(),this.result_clear_highlight())},i.prototype.keydown_backstroke=function(){var e;if(this.pending_backstroke)return this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke();e=this.search_container.siblings("li.search-choice").last();if(e.length&&!e.hasClass("search-choice-disabled"))return this.pending_backstroke=e,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")},i.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},i.prototype.keydown_checker=function(e){var t,n;t=(n=e.which)!=null?n:e.keyCode,this.search_field_scale(),t!==8&&this.pending_backstroke&&this.clear_backstroke();switch(t){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(e),this.mouse_on_container=!1;break;case 13:e.preventDefault();break;case 38:e.preventDefault(),this.keyup_arrow();break;case 40:this.keydown_arrow()}},i.prototype.search_field_scale=function(){var t,n,r,i,s,o,u,a,f;if(this.is_multiple){r=0,u=0,s="position:absolute; left: -1000px; top: -1000px; display:none;",o=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"];for(a=0,f=o.length;a<f;a++)i=o[a],s+=i+":"+this.search_field.css(i)+";";return n=e("<div />",{style:s}),n.text(this.search_field.val()),e("body").append(n),u=n.width()+25,n.remove(),u>this.f_width-10&&(u=this.f_width-10),this.search_field.css({width:u+"px"}),t=this.container.height(),this.dropdown.css({top:t+"px"})}},i.prototype.generate_random_id=function(){var t;t="sel"+this.generate_random_char()+this.generate_random_char()+this.generate_random_char();while(e("#"+t).length>0)t+=this.generate_random_char();return t},i}(AbstractChosen),r.Chosen=t,n=function(e){var t;return t=e.outerWidth()-e.width()},r.get_side_border_padding=n}.call(this);
|
assets/js/dlm-uninstall.js
CHANGED
@@ -1,70 +1,70 @@
|
|
1 |
-
jQuery(document).ready(function ($) {
|
2 |
-
|
3 |
-
var uninstall = $("a.uninstall-dlm"),
|
4 |
-
formContainer = $('#dlm-uninstall-form');
|
5 |
-
|
6 |
-
formContainer.on('click', '#delete_all', function () {
|
7 |
-
if (
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
} else {
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
}
|
18 |
-
});
|
19 |
-
|
20 |
-
$(uninstall).on("click", function () {
|
21 |
-
|
22 |
-
$('body').toggleClass('dlm-uninstall-form-active');
|
23 |
-
formContainer.fadeIn();
|
24 |
-
|
25 |
-
formContainer.on('click', '#dlm-uninstall-submit-form', function (e) {
|
26 |
-
formContainer.addClass('toggle-spinner');
|
27 |
-
var selectedOptions = {
|
28 |
-
delete_options: (
|
29 |
-
delete_transients: (
|
30 |
-
delete_cpt: (
|
31 |
-
delete_set_tables: (
|
32 |
-
};
|
33 |
-
|
34 |
-
var data = {
|
35 |
-
'action': 'dlm_uninstall_plugin',
|
36 |
-
'security': wpDLMUninstall.nonce,
|
37 |
-
'dataType': "json",
|
38 |
-
'options': selectedOptions
|
39 |
-
};
|
40 |
-
|
41 |
-
$.post(
|
42 |
-
ajaxurl,
|
43 |
-
data,
|
44 |
-
function (response) {
|
45 |
-
// Redirect to plugins page
|
46 |
-
window.location.href = wpDLMUninstall.redirect_url;
|
47 |
-
}
|
48 |
-
);
|
49 |
-
});
|
50 |
-
|
51 |
-
// If we click outside the form, the form will close
|
52 |
-
// Stop propagation from form
|
53 |
-
formContainer.on('click', function (e) {
|
54 |
-
e.stopPropagation();
|
55 |
-
});
|
56 |
-
|
57 |
-
$('.dlm-uninstall-form-wrapper, .close-uninstall-form').on('click', function (e) {
|
58 |
-
e.stopPropagation();
|
59 |
-
formContainer.fadeOut();
|
60 |
-
$('body').removeClass('dlm-uninstall-form-active');
|
61 |
-
});
|
62 |
-
|
63 |
-
$(document).on("keyup", function (e) {
|
64 |
-
if ( e.key === "Escape" ) {
|
65 |
-
formContainer.fadeOut();
|
66 |
-
$('body').removeClass('dlm-uninstall-form-active');
|
67 |
-
}
|
68 |
-
});
|
69 |
-
});
|
70 |
});
|
1 |
+
jQuery(document).ready(function ($) {
|
2 |
+
|
3 |
+
var uninstall = $("a.uninstall-dlm"),
|
4 |
+
formContainer = $('#dlm-uninstall-form');
|
5 |
+
|
6 |
+
formContainer.on('click', '#delete_all', function () {
|
7 |
+
if ( formContainer.parent().find('#delete_all').is(':checked') ) {
|
8 |
+
formContainer.parent().find('#delete_options').prop('checked', true);
|
9 |
+
formContainer.parent().find('#delete_transients').prop('checked', true);
|
10 |
+
formContainer.parent().find('#delete_cpt').prop('checked', true);
|
11 |
+
formContainer.parent().find('#delete_set_tables').prop('checked', true);
|
12 |
+
} else {
|
13 |
+
formContainer.parent().find('#delete_options').prop('checked', false);
|
14 |
+
formContainer.parent().find('#delete_transients').prop('checked', false);
|
15 |
+
formContainer.parent().find('#delete_cpt').prop('checked', false);
|
16 |
+
formContainer.parent().find('#delete_set_tables').prop('checked', false);
|
17 |
+
}
|
18 |
+
});
|
19 |
+
|
20 |
+
$(uninstall).on("click", function () {
|
21 |
+
|
22 |
+
$('body').toggleClass('dlm-uninstall-form-active');
|
23 |
+
formContainer.fadeIn();
|
24 |
+
|
25 |
+
formContainer.on('click', '#dlm-uninstall-submit-form', function (e) {
|
26 |
+
formContainer.addClass('toggle-spinner');
|
27 |
+
var selectedOptions = {
|
28 |
+
delete_options: (formContainer.parent().find('#delete_options').is(':checked')) ? 1 : 0,
|
29 |
+
delete_transients: (formContainer.parent().find('#delete_transients').is(':checked')) ? 1 : 0,
|
30 |
+
delete_cpt: (formContainer.parent().find('#delete_cpt').is(':checked')) ? 1 : 0,
|
31 |
+
delete_set_tables: (formContainer.parent().find('#delete_set_tables').is(':checked')) ? 1 : 0,
|
32 |
+
};
|
33 |
+
|
34 |
+
var data = {
|
35 |
+
'action': 'dlm_uninstall_plugin',
|
36 |
+
'security': wpDLMUninstall.nonce,
|
37 |
+
'dataType': "json",
|
38 |
+
'options': selectedOptions
|
39 |
+
};
|
40 |
+
|
41 |
+
$.post(
|
42 |
+
ajaxurl,
|
43 |
+
data,
|
44 |
+
function (response) {
|
45 |
+
// Redirect to plugins page
|
46 |
+
window.location.href = wpDLMUninstall.redirect_url;
|
47 |
+
}
|
48 |
+
);
|
49 |
+
});
|
50 |
+
|
51 |
+
// If we click outside the form, the form will close
|
52 |
+
// Stop propagation from form
|
53 |
+
formContainer.on('click', function (e) {
|
54 |
+
e.stopPropagation();
|
55 |
+
});
|
56 |
+
|
57 |
+
$('.dlm-uninstall-form-wrapper, .close-uninstall-form').on('click', function (e) {
|
58 |
+
e.stopPropagation();
|
59 |
+
formContainer.fadeOut();
|
60 |
+
$('body').removeClass('dlm-uninstall-form-active');
|
61 |
+
});
|
62 |
+
|
63 |
+
$(document).on("keyup", function (e) {
|
64 |
+
if ( e.key === "Escape" ) {
|
65 |
+
formContainer.fadeOut();
|
66 |
+
$('body').removeClass('dlm-uninstall-form-active');
|
67 |
+
}
|
68 |
+
});
|
69 |
+
});
|
70 |
});
|
assets/js/dlm-uninstall.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(
|
1 |
+
jQuery(document).ready(function(t){var e=t("a.uninstall-dlm"),l=t("#dlm-uninstall-form");l.on("click","#delete_all",function(){l.parent().find("#delete_all").is(":checked")?(l.parent().find("#delete_options").prop("checked",!0),l.parent().find("#delete_transients").prop("checked",!0),l.parent().find("#delete_cpt").prop("checked",!0),l.parent().find("#delete_set_tables").prop("checked",!0)):(l.parent().find("#delete_options").prop("checked",!1),l.parent().find("#delete_transients").prop("checked",!1),l.parent().find("#delete_cpt").prop("checked",!1),l.parent().find("#delete_set_tables").prop("checked",!1))}),t(e).on("click",function(){t("body").toggleClass("dlm-uninstall-form-active"),l.fadeIn(),l.on("click","#dlm-uninstall-submit-form",function(e){l.addClass("toggle-spinner");var n={delete_options:l.parent().find("#delete_options").is(":checked")?1:0,delete_transients:l.parent().find("#delete_transients").is(":checked")?1:0,delete_cpt:l.parent().find("#delete_cpt").is(":checked")?1:0,delete_set_tables:l.parent().find("#delete_set_tables").is(":checked")?1:0},n={action:"dlm_uninstall_plugin",security:wpDLMUninstall.nonce,dataType:"json",options:n};t.post(ajaxurl,n,function(e){window.location.href=wpDLMUninstall.redirect_url})}),l.on("click",function(e){e.stopPropagation()}),t(".dlm-uninstall-form-wrapper, .close-uninstall-form").on("click",function(e){e.stopPropagation(),l.fadeOut(),t("body").removeClass("dlm-uninstall-form-active")}),t(document).on("keyup",function(e){"Escape"===e.key&&(l.fadeOut(),t("body").removeClass("dlm-uninstall-form-active"))})})});
|
assets/js/download-duplicator.js
CHANGED
@@ -1,19 +1,19 @@
|
|
1 |
-
jQuery( function ( $ ) {
|
2 |
-
|
3 |
-
$( '.dlm-duplicate-download' ).click( function () {
|
4 |
-
|
5 |
-
$.post( ajaxurl, {
|
6 |
-
action: 'dlm_download_duplicator_duplicate',
|
7 |
-
nonce: $( this ).attr( 'data-value' ),
|
8 |
-
download_id: $( this ).attr( 'rel' )
|
9 |
-
}, function ( response ) {
|
10 |
-
if( 'success' == response.result ) {
|
11 |
-
window.location.href = response.success_url;
|
12 |
-
}else {
|
13 |
-
alert( 'Something went wrong while duplicating download. Please contact support.' );
|
14 |
-
}
|
15 |
-
} );
|
16 |
-
|
17 |
-
} );
|
18 |
-
|
19 |
} );
|
1 |
+
jQuery( function ( $ ) {
|
2 |
+
|
3 |
+
$( '.dlm-duplicate-download' ).click( function () {
|
4 |
+
|
5 |
+
$.post( ajaxurl, {
|
6 |
+
action: 'dlm_download_duplicator_duplicate',
|
7 |
+
nonce: $( this ).attr( 'data-value' ),
|
8 |
+
download_id: $( this ).attr( 'rel' )
|
9 |
+
}, function ( response ) {
|
10 |
+
if( 'success' == response.result ) {
|
11 |
+
window.location.href = response.success_url;
|
12 |
+
}else {
|
13 |
+
alert( 'Something went wrong while duplicating download. Please contact support.' );
|
14 |
+
}
|
15 |
+
} );
|
16 |
+
|
17 |
+
} );
|
18 |
+
|
19 |
} );
|
assets/js/edit-download.js
CHANGED
@@ -1,247 +1,247 @@
|
|
1 |
-
jQuery( function ( $ ) {
|
2 |
-
|
3 |
-
// Expand all files
|
4 |
-
jQuery( '.expand_all' ).click( function () {
|
5 |
-
jQuery( this ).closest( '.dlm-metaboxes-wrapper' ).find( '.dlm-metabox table' ).show();
|
6 |
-
return false;
|
7 |
-
} );
|
8 |
-
|
9 |
-
// Close all files
|
10 |
-
jQuery( '.close_all' ).click( function () {
|
11 |
-
jQuery( this ).closest( '.dlm-metaboxes-wrapper' ).find( '.dlm-metabox table' ).hide();
|
12 |
-
return false;
|
13 |
-
} );
|
14 |
-
|
15 |
-
// Open/close
|
16 |
-
jQuery( '.dlm-metaboxes-wrapper' ).on( 'click', '.dlm-metabox h3', function ( event ) {
|
17 |
-
// If the user clicks on some form input inside the h3, like a select list (for variations), the box should not be toggled
|
18 |
-
if ( jQuery( event.target ).filter( ':input, option' ).length ) return;
|
19 |
-
|
20 |
-
jQuery( this ).next( '.dlm-metabox-content' ).toggle();
|
21 |
-
} );
|
22 |
-
|
23 |
-
// Closes all to begin
|
24 |
-
jQuery( '.dlm-metabox.closed' ).each( function () {
|
25 |
-
jQuery( this ).find( '.dlm-metabox-content' ).hide();
|
26 |
-
} );
|
27 |
-
|
28 |
-
// Date picker
|
29 |
-
jQuery( ".date-picker-field" ).datepicker( {
|
30 |
-
dateFormat: "yy-mm-dd",
|
31 |
-
numberOfMonths: 1,
|
32 |
-
showButtonPanel: true,
|
33 |
-
} );
|
34 |
-
|
35 |
-
// Ordering
|
36 |
-
jQuery( '.downloadable_files' ).sortable( {
|
37 |
-
items: '.downloadable_file',
|
38 |
-
cursor: 'move',
|
39 |
-
axis: 'y',
|
40 |
-
handle: 'h3',
|
41 |
-
scrollSensitivity: 40,
|
42 |
-
forcePlaceholderSize: true,
|
43 |
-
helper: 'clone',
|
44 |
-
opacity: 0.65,
|
45 |
-
placeholder: 'dlm-metabox-sortable-placeholder',
|
46 |
-
start: function ( event, ui ) {
|
47 |
-
ui.item.css( 'background-color', '#f6f6f6' );
|
48 |
-
},
|
49 |
-
stop: function ( event, ui ) {
|
50 |
-
ui.item.removeAttr( 'style' );
|
51 |
-
downloadable_file_row_indexes();
|
52 |
-
}
|
53 |
-
} );
|
54 |
-
|
55 |
-
function downloadable_file_row_indexes() {
|
56 |
-
jQuery( '.downloadable_files .downloadable_file' ).each( function ( index, el ) {
|
57 |
-
jQuery( '.file_menu_order', el ).val( parseInt( jQuery( el ).index( '.downloadable_files .downloadable_file' ) ) );
|
58 |
-
} );
|
59 |
-
};
|
60 |
-
|
61 |
-
// Add a file
|
62 |
-
jQuery( '.download_monitor_files' ).on( 'click', 'a.add_file', function () {
|
63 |
-
|
64 |
-
jQuery( '.download_monitor_files' ).block( {
|
65 |
-
message: null,
|
66 |
-
overlayCSS: {
|
67 |
-
background: '#fff url(' + $( '#dlm-plugin-url' ).val() + '/assets/images/ajax-loader.gif) no-repeat center',
|
68 |
-
opacity: 0.6
|
69 |
-
}
|
70 |
-
} );
|
71 |
-
|
72 |
-
var size = jQuery( '.downloadable_files .downloadable_file' ).length;
|
73 |
-
|
74 |
-
var data = {
|
75 |
-
action: 'download_monitor_add_file',
|
76 |
-
post_id: $( '#dlm-post-id' ).val(),
|
77 |
-
size: size,
|
78 |
-
security: $( '#dlm-ajax-nonce-add-file' ).val()
|
79 |
-
};
|
80 |
-
|
81 |
-
jQuery.post( ajaxurl, data, function ( response ) {
|
82 |
-
|
83 |
-
jQuery( '.downloadable_files' ).prepend( response );
|
84 |
-
|
85 |
-
downloadable_file_row_indexes();
|
86 |
-
|
87 |
-
jQuery( '.download_monitor_files' ).unblock();
|
88 |
-
|
89 |
-
// Date picker
|
90 |
-
jQuery( ".date-picker-field" ).datepicker( {
|
91 |
-
dateFormat: "yy-mm-dd",
|
92 |
-
numberOfMonths: 1,
|
93 |
-
showButtonPanel: true
|
94 |
-
} );
|
95 |
-
|
96 |
-
jQuery(document).trigger( 'dlm_new_file_added', [this, response] );
|
97 |
-
} );
|
98 |
-
|
99 |
-
return false;
|
100 |
-
|
101 |
-
} );
|
102 |
-
|
103 |
-
// Remove a file
|
104 |
-
jQuery( '.download_monitor_files' ).on( 'click', 'button.remove_file', function ( e ) {
|
105 |
-
e.preventDefault();
|
106 |
-
var answer = confirm( dlm_ed_strings.confirm_delete );
|
107 |
-
if ( answer ) {
|
108 |
-
|
109 |
-
var el = jQuery( this ).closest( '.downloadable_file' );
|
110 |
-
var file_id = el.attr( 'data-file' );
|
111 |
-
|
112 |
-
if ( file_id > 0 ) {
|
113 |
-
|
114 |
-
jQuery( el ).block( {
|
115 |
-
message: null,
|
116 |
-
overlayCSS: {
|
117 |
-
background: '#fff url(' + $( '#dlm-plugin-url' ).val() + '/assets/images/ajax-loader.gif) no-repeat center',
|
118 |
-
opacity: 0.6
|
119 |
-
}
|
120 |
-
} );
|
121 |
-
|
122 |
-
var data = {
|
123 |
-
action: 'download_monitor_remove_file',
|
124 |
-
file_id: file_id,
|
125 |
-
download_id: $( '#dlm-post-id' ).val(),
|
126 |
-
security: $( '#dlm-ajax-nonce-remove-file' ).val()
|
127 |
-
};
|
128 |
-
|
129 |
-
jQuery.post( ajaxurl, data, function ( response ) {
|
130 |
-
jQuery( el ).fadeOut( '300' ).remove();
|
131 |
-
}
|
132 |
-
)
|
133 |
-
;
|
134 |
-
|
135 |
-
} else {
|
136 |
-
jQuery( el ).fadeOut( '300' ).remove();
|
137 |
-
}
|
138 |
-
}
|
139 |
-
return false;
|
140 |
-
} );
|
141 |
-
|
142 |
-
// Browse for file
|
143 |
-
jQuery( '.download_monitor_files' ).on( 'click', 'a.dlm_browse_for_file', function ( e ) {
|
144 |
-
|
145 |
-
downloadable_files_field = jQuery( this ).closest( '.downloadable_file' ).find( 'textarea[name^="downloadable_file_urls"]' );
|
146 |
-
|
147 |
-
window.send_to_editor = window.send_to_browse_file_url;
|
148 |
-
|
149 |
-
tb_show( dlm_ed_strings.browse_file, 'media-upload.php?post_id=' + $( '#dlm-post-id' ).val() + '&type=downloadable_file_browser&from=wpdlm01&TB_iframe=true' );
|
150 |
-
|
151 |
-
return false;
|
152 |
-
} );
|
153 |
-
|
154 |
-
window.send_to_browse_file_url = function ( html ) {
|
155 |
-
|
156 |
-
if ( html ) {
|
157 |
-
old = jQuery.trim( jQuery( downloadable_files_field ).val() );
|
158 |
-
if ( old ) old = old + "\n";
|
159 |
-
jQuery( downloadable_files_field ).val( old + html );
|
160 |
-
}
|
161 |
-
|
162 |
-
tb_remove();
|
163 |
-
|
164 |
-
window.send_to_editor = window.send_to_editor_default;
|
165 |
-
}
|
166 |
-
|
167 |
-
// Uploading files
|
168 |
-
var dlm_media_library_frame;
|
169 |
-
|
170 |
-
jQuery( document ).on( 'click', '.dlm_media_library', function ( event ) {
|
171 |
-
|
172 |
-
var $el = $( this );
|
173 |
-
var $file_path_field = $el.parent().parent().find( '.downloadable_file_urls' );
|
174 |
-
var file_paths = $file_path_field.val();
|
175 |
-
|
176 |
-
event.preventDefault();
|
177 |
-
|
178 |
-
// If the media frame already exists, reopen it.
|
179 |
-
if ( dlm_media_library_frame ) {
|
180 |
-
dlm_media_library_frame.close();
|
181 |
-
}
|
182 |
-
|
183 |
-
var downloadable_file_states = [
|
184 |
-
// Main states.
|
185 |
-
new wp.media.controller.Library( {
|
186 |
-
library: wp.media.query(),
|
187 |
-
multiple: true,
|
188 |
-
title: $el.data( 'choose' ),
|
189 |
-
priority: 20,
|
190 |
-
filterable: 'all',
|
191 |
-
} )
|
192 |
-
];
|
193 |
-
|
194 |
-
// Create the media frame.
|
195 |
-
dlm_media_library_frame = wp.media.frames.downloadable_file = wp.media( {
|
196 |
-
// Set the title of the modal.
|
197 |
-
title: $el.data( 'choose' ),
|
198 |
-
library: {
|
199 |
-
type: ''
|
200 |
-
},
|
201 |
-
button: {
|
202 |
-
text: $el.data( 'update' ),
|
203 |
-
},
|
204 |
-
multiple: true,
|
205 |
-
states: downloadable_file_states,
|
206 |
-
} );
|
207 |
-
|
208 |
-
// When an image is selected, run a callback.
|
209 |
-
dlm_media_library_frame.on( 'select', function () {
|
210 |
-
|
211 |
-
var selection = dlm_media_library_frame.state().get( 'selection' );
|
212 |
-
|
213 |
-
selection.map( function ( attachment ) {
|
214 |
-
|
215 |
-
attachment = attachment.toJSON();
|
216 |
-
|
217 |
-
if ( attachment.url )
|
218 |
-
file_paths = file_paths ? file_paths + "\n" + attachment.url : attachment.url
|
219 |
-
|
220 |
-
} );
|
221 |
-
|
222 |
-
$file_path_field.val( file_paths );
|
223 |
-
} );
|
224 |
-
|
225 |
-
// Set post to 0 and set our custom type
|
226 |
-
dlm_media_library_frame.on( 'ready', function () {
|
227 |
-
dlm_media_library_frame.uploader.options.uploader.params = {
|
228 |
-
type: 'dlm_download'
|
229 |
-
};
|
230 |
-
} );
|
231 |
-
|
232 |
-
// Finally, open the modal.
|
233 |
-
dlm_media_library_frame.open();
|
234 |
-
} );
|
235 |
-
|
236 |
-
// Copy button functionality
|
237 |
-
$('.copy-dlm-button').click(function(e) {
|
238 |
-
e.preventDefault();
|
239 |
-
var dlm_input = $(this).parent().find('input');
|
240 |
-
dlm_input.focus();
|
241 |
-
dlm_input.select();
|
242 |
-
document.execCommand('copy');
|
243 |
-
$(this).next('span').text( $(this).data('item') + ' copied');
|
244 |
-
$('.copy-dlm-button').not($(this)).parent().find('span').text('');
|
245 |
-
});
|
246 |
-
|
247 |
} );
|
1 |
+
jQuery( function ( $ ) {
|
2 |
+
|
3 |
+
// Expand all files
|
4 |
+
jQuery( '.expand_all' ).click( function () {
|
5 |
+
jQuery( this ).closest( '.dlm-metaboxes-wrapper' ).find( '.dlm-metabox table' ).show();
|
6 |
+
return false;
|
7 |
+
} );
|
8 |
+
|
9 |
+
// Close all files
|
10 |
+
jQuery( '.close_all' ).click( function () {
|
11 |
+
jQuery( this ).closest( '.dlm-metaboxes-wrapper' ).find( '.dlm-metabox table' ).hide();
|
12 |
+
return false;
|
13 |
+
} );
|
14 |
+
|
15 |
+
// Open/close
|
16 |
+
jQuery( '.dlm-metaboxes-wrapper' ).on( 'click', '.dlm-metabox h3', function ( event ) {
|
17 |
+
// If the user clicks on some form input inside the h3, like a select list (for variations), the box should not be toggled
|
18 |
+
if ( jQuery( event.target ).filter( ':input, option' ).length ) return;
|
19 |
+
|
20 |
+
jQuery( this ).next( '.dlm-metabox-content' ).toggle();
|
21 |
+
} );
|
22 |
+
|
23 |
+
// Closes all to begin
|
24 |
+
jQuery( '.dlm-metabox.closed' ).each( function () {
|
25 |
+
jQuery( this ).find( '.dlm-metabox-content' ).hide();
|
26 |
+
} );
|
27 |
+
|
28 |
+
// Date picker
|
29 |
+
jQuery( ".date-picker-field" ).datepicker( {
|
30 |
+
dateFormat: "yy-mm-dd",
|
31 |
+
numberOfMonths: 1,
|
32 |
+
showButtonPanel: true,
|
33 |
+
} );
|
34 |
+
|
35 |
+
// Ordering
|
36 |
+
jQuery( '.downloadable_files' ).sortable( {
|
37 |
+
items: '.downloadable_file',
|
38 |
+
cursor: 'move',
|
39 |
+
axis: 'y',
|
40 |
+
handle: 'h3',
|
41 |
+
scrollSensitivity: 40,
|
42 |
+
forcePlaceholderSize: true,
|
43 |
+
helper: 'clone',
|
44 |
+
opacity: 0.65,
|
45 |
+
placeholder: 'dlm-metabox-sortable-placeholder',
|
46 |
+
start: function ( event, ui ) {
|
47 |
+
ui.item.css( 'background-color', '#f6f6f6' );
|
48 |
+
},
|
49 |
+
stop: function ( event, ui ) {
|
50 |
+
ui.item.removeAttr( 'style' );
|
51 |
+
downloadable_file_row_indexes();
|
52 |
+
}
|
53 |
+
} );
|
54 |
+
|
55 |
+
function downloadable_file_row_indexes() {
|
56 |
+
jQuery( '.downloadable_files .downloadable_file' ).each( function ( index, el ) {
|
57 |
+
jQuery( '.file_menu_order', el ).val( parseInt( jQuery( el ).index( '.downloadable_files .downloadable_file' ) ) );
|
58 |
+
} );
|
59 |
+
};
|
60 |
+
|
61 |
+
// Add a file
|
62 |
+
jQuery( '.download_monitor_files' ).on( 'click', 'a.add_file', function () {
|
63 |
+
|
64 |
+
jQuery( '.download_monitor_files' ).block( {
|
65 |
+
message: null,
|
66 |
+
overlayCSS: {
|
67 |
+
background: '#fff url(' + $( '#dlm-plugin-url' ).val() + '/assets/images/ajax-loader.gif) no-repeat center',
|
68 |
+
opacity: 0.6
|
69 |
+
}
|
70 |
+
} );
|
71 |
+
|
72 |
+
var size = jQuery( '.downloadable_files .downloadable_file' ).length;
|
73 |
+
|
74 |
+
var data = {
|
75 |
+
action: 'download_monitor_add_file',
|
76 |
+
post_id: $( '#dlm-post-id' ).val(),
|
77 |
+
size: size,
|
78 |
+
security: $( '#dlm-ajax-nonce-add-file' ).val()
|
79 |
+
};
|
80 |
+
|
81 |
+
jQuery.post( ajaxurl, data, function ( response ) {
|
82 |
+
|
83 |
+
jQuery( '.downloadable_files' ).prepend( response );
|
84 |
+
|
85 |
+
downloadable_file_row_indexes();
|
86 |
+
|
87 |
+
jQuery( '.download_monitor_files' ).unblock();
|
88 |
+
|
89 |
+
// Date picker
|
90 |
+
jQuery( ".date-picker-field" ).datepicker( {
|
91 |
+
dateFormat: "yy-mm-dd",
|
92 |
+
numberOfMonths: 1,
|
93 |
+
showButtonPanel: true
|
94 |
+
} );
|
95 |
+
|
96 |
+
jQuery(document).trigger( 'dlm_new_file_added', [this, response] );
|
97 |
+
} );
|
98 |
+
|
99 |
+
return false;
|
100 |
+
|
101 |
+
} );
|
102 |
+
|
103 |
+
// Remove a file
|
104 |
+
jQuery( '.download_monitor_files' ).on( 'click', 'button.remove_file', function ( e ) {
|
105 |
+
e.preventDefault();
|
106 |
+
var answer = confirm( dlm_ed_strings.confirm_delete );
|
107 |
+
if ( answer ) {
|
108 |
+
|
109 |
+
var el = jQuery( this ).closest( '.downloadable_file' );
|
110 |
+
var file_id = el.attr( 'data-file' );
|
111 |
+
|
112 |
+
if ( file_id > 0 ) {
|
113 |
+
|
114 |
+
jQuery( el ).block( {
|
115 |
+
message: null,
|
116 |
+
overlayCSS: {
|
117 |
+
background: '#fff url(' + $( '#dlm-plugin-url' ).val() + '/assets/images/ajax-loader.gif) no-repeat center',
|
118 |
+
opacity: 0.6
|
119 |
+
}
|
120 |
+
} );
|
121 |
+
|
122 |
+
var data = {
|
123 |
+
action: 'download_monitor_remove_file',
|
124 |
+
file_id: file_id,
|
125 |
+
download_id: $( '#dlm-post-id' ).val(),
|
126 |
+
security: $( '#dlm-ajax-nonce-remove-file' ).val()
|
127 |
+
};
|
128 |
+
|
129 |
+
jQuery.post( ajaxurl, data, function ( response ) {
|
130 |
+
jQuery( el ).fadeOut( '300' ).remove();
|
131 |
+
}
|
132 |
+
)
|
133 |
+
;
|
134 |
+
|
135 |
+
} else {
|
136 |
+
jQuery( el ).fadeOut( '300' ).remove();
|
137 |
+
}
|
138 |
+
}
|
139 |
+
return false;
|
140 |
+
} );
|
141 |
+
|
142 |
+
// Browse for file
|
143 |
+
jQuery( '.download_monitor_files' ).on( 'click', 'a.dlm_browse_for_file', function ( e ) {
|
144 |
+
|
145 |
+
downloadable_files_field = jQuery( this ).closest( '.downloadable_file' ).find( 'textarea[name^="downloadable_file_urls"]' );
|
146 |
+
|
147 |
+
window.send_to_editor = window.send_to_browse_file_url;
|
148 |
+
|
149 |
+
tb_show( dlm_ed_strings.browse_file, 'media-upload.php?post_id=' + $( '#dlm-post-id' ).val() + '&type=downloadable_file_browser&from=wpdlm01&TB_iframe=true' );
|
150 |
+
|
151 |
+
return false;
|
152 |
+
} );
|
153 |
+
|
154 |
+
window.send_to_browse_file_url = function ( html ) {
|
155 |
+
|
156 |
+
if ( html ) {
|
157 |
+
old = jQuery.trim( jQuery( downloadable_files_field ).val() );
|
158 |
+
if ( old ) old = old + "\n";
|
159 |
+
jQuery( downloadable_files_field ).val( old + html );
|
160 |
+
}
|
161 |
+
|
162 |
+
tb_remove();
|
163 |
+
|
164 |
+
window.send_to_editor = window.send_to_editor_default;
|
165 |
+
}
|
166 |
+
|
167 |
+
// Uploading files
|
168 |
+
var dlm_media_library_frame;
|
169 |
+
|
170 |
+
jQuery( document ).on( 'click', '.dlm_media_library', function ( event ) {
|
171 |
+
|
172 |
+
var $el = $( this );
|
173 |
+
var $file_path_field = $el.parent().parent().find( '.downloadable_file_urls' );
|
174 |
+
var file_paths = $file_path_field.val();
|
175 |
+
|
176 |
+
event.preventDefault();
|
177 |
+
|
178 |
+
// If the media frame already exists, reopen it.
|
179 |
+
if ( dlm_media_library_frame ) {
|
180 |
+
dlm_media_library_frame.close();
|
181 |
+
}
|
182 |
+
|
183 |
+
var downloadable_file_states = [
|
184 |
+
// Main states.
|
185 |
+
new wp.media.controller.Library( {
|
186 |
+
library: wp.media.query(),
|
187 |
+
multiple: true,
|
188 |
+
title: $el.data( 'choose' ),
|
189 |
+
priority: 20,
|
190 |
+
filterable: 'all',
|
191 |
+
} )
|
192 |
+
];
|
193 |
+
|
194 |
+
// Create the media frame.
|
195 |
+
dlm_media_library_frame = wp.media.frames.downloadable_file = wp.media( {
|
196 |
+
// Set the title of the modal.
|
197 |
+
title: $el.data( 'choose' ),
|
198 |
+
library: {
|
199 |
+
type: ''
|
200 |
+
},
|
201 |
+
button: {
|
202 |
+
text: $el.data( 'update' ),
|
203 |
+
},
|
204 |
+
multiple: true,
|
205 |
+
states: downloadable_file_states,
|
206 |
+
} );
|
207 |
+
|
208 |
+
// When an image is selected, run a callback.
|
209 |
+
dlm_media_library_frame.on( 'select', function () {
|
210 |
+
|
211 |
+
var selection = dlm_media_library_frame.state().get( 'selection' );
|
212 |
+
|
213 |
+
selection.map( function ( attachment ) {
|
214 |
+
|
215 |
+
attachment = attachment.toJSON();
|
216 |
+
|
217 |
+
if ( attachment.url )
|
218 |
+
file_paths = file_paths ? file_paths + "\n" + attachment.url : attachment.url
|
219 |
+
|
220 |
+
} );
|
221 |
+
|
222 |
+
$file_path_field.val( file_paths );
|
223 |
+
} );
|
224 |
+
|
225 |
+
// Set post to 0 and set our custom type
|
226 |
+
dlm_media_library_frame.on( 'ready', function () {
|
227 |
+
dlm_media_library_frame.uploader.options.uploader.params = {
|
228 |
+
type: 'dlm_download'
|
229 |
+
};
|
230 |
+
} );
|
231 |
+
|
232 |
+
// Finally, open the modal.
|
233 |
+
dlm_media_library_frame.open();
|
234 |
+
} );
|
235 |
+
|
236 |
+
// Copy button functionality
|
237 |
+
$('.copy-dlm-button').click(function(e) {
|
238 |
+
e.preventDefault();
|
239 |
+
var dlm_input = $(this).parent().find('input');
|
240 |
+
dlm_input.focus();
|
241 |
+
dlm_input.select();
|
242 |
+
document.execCommand('copy');
|
243 |
+
$(this).next('span').text( $(this).data('item') + ' copied');
|
244 |
+
$('.copy-dlm-button').not($(this)).parent().find('span').text('');
|
245 |
+
});
|
246 |
+
|
247 |
} );
|
assets/js/edit-download.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(function(a){function l(){jQuery(".downloadable_files .downloadable_file").each(function(e,o){jQuery(".file_menu_order",o).val(parseInt(jQuery(o).index(".downloadable_files .downloadable_file")))})}var n;jQuery(".expand_all").click(function(){return jQuery(this).closest(".dlm-metaboxes-wrapper").find(".dlm-metabox table").show(),!1}),jQuery(".close_all").click(function(){return jQuery(this).closest(".dlm-metaboxes-wrapper").find(".dlm-metabox table").hide(),!1}),jQuery(".dlm-metaboxes-wrapper").on("click",".dlm-metabox h3",function(e){jQuery(e.target).filter(":input, option").length||jQuery(this).next(".dlm-metabox-content").toggle()}),jQuery(".dlm-metabox.closed").each(function(){jQuery(this).find(".dlm-metabox-content").hide()}),jQuery(".date-picker-field").datepicker({dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:!0}),jQuery(".downloadable_files").sortable({items:".downloadable_file",cursor:"move",axis:"y",handle:"h3",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",opacity:.65,placeholder:"dlm-metabox-sortable-placeholder",start:function(e,o){o.item.css("background-color","#f6f6f6")},stop:function(e,o){o.item.removeAttr("style"),l()}}),jQuery(".download_monitor_files").on("click","a.add_file",function(){jQuery(".download_monitor_files").block({message:null,overlayCSS:{background:"#fff url("+a("#dlm-plugin-url").val()+"/assets/images/ajax-loader.gif) no-repeat center",opacity:.6}});var e=jQuery(".downloadable_files .downloadable_file").length,e={action:"download_monitor_add_file",post_id:a("#dlm-post-id").val(),size:e,security:a("#dlm-ajax-nonce-add-file").val()};return jQuery.post(ajaxurl,e,function(e){jQuery(".downloadable_files").prepend(e),l(),jQuery(".download_monitor_files").unblock(),jQuery(".date-picker-field").datepicker({dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:!0}),jQuery(document).trigger("dlm_new_file_added",[this,e])}),!1}),jQuery(".download_monitor_files").on("click","button.remove_file",function(e){var o;return e.preventDefault(),confirm(dlm_ed_strings.confirm_delete)&&(0<(e=(o=jQuery(this).closest(".downloadable_file")).attr("data-file"))?(jQuery(o).block({message:null,overlayCSS:{background:"#fff url("+a("#dlm-plugin-url").val()+"/assets/images/ajax-loader.gif) no-repeat center",opacity:.6}}),e={action:"download_monitor_remove_file",file_id:e,download_id:a("#dlm-post-id").val(),security:a("#dlm-ajax-nonce-remove-file").val()},jQuery.post(ajaxurl,e,function(e){jQuery(o).fadeOut("300").remove()})):jQuery(o).fadeOut("300").remove()),!1}),jQuery(".download_monitor_files").on("click","a.dlm_browse_for_file",function(e){return downloadable_files_field=jQuery(this).closest(".downloadable_file").find('textarea[name^="downloadable_file_urls"]'),window.send_to_editor=window.send_to_browse_file_url,tb_show(dlm_ed_strings.browse_file,"media-upload.php?post_id="+a("#dlm-post-id").val()+"&type=downloadable_file_browser&from=wpdlm01&TB_iframe=true"),!1}),window.send_to_browse_file_url=function(e){e&&(old=jQuery.trim(jQuery(downloadable_files_field).val())
|
1 |
+
jQuery(function(a){function l(){jQuery(".downloadable_files .downloadable_file").each(function(e,o){jQuery(".file_menu_order",o).val(parseInt(jQuery(o).index(".downloadable_files .downloadable_file")))})}var n;jQuery(".expand_all").click(function(){return jQuery(this).closest(".dlm-metaboxes-wrapper").find(".dlm-metabox table").show(),!1}),jQuery(".close_all").click(function(){return jQuery(this).closest(".dlm-metaboxes-wrapper").find(".dlm-metabox table").hide(),!1}),jQuery(".dlm-metaboxes-wrapper").on("click",".dlm-metabox h3",function(e){jQuery(e.target).filter(":input, option").length||jQuery(this).next(".dlm-metabox-content").toggle()}),jQuery(".dlm-metabox.closed").each(function(){jQuery(this).find(".dlm-metabox-content").hide()}),jQuery(".date-picker-field").datepicker({dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:!0}),jQuery(".downloadable_files").sortable({items:".downloadable_file",cursor:"move",axis:"y",handle:"h3",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",opacity:.65,placeholder:"dlm-metabox-sortable-placeholder",start:function(e,o){o.item.css("background-color","#f6f6f6")},stop:function(e,o){o.item.removeAttr("style"),l()}}),jQuery(".download_monitor_files").on("click","a.add_file",function(){jQuery(".download_monitor_files").block({message:null,overlayCSS:{background:"#fff url("+a("#dlm-plugin-url").val()+"/assets/images/ajax-loader.gif) no-repeat center",opacity:.6}});var e=jQuery(".downloadable_files .downloadable_file").length,e={action:"download_monitor_add_file",post_id:a("#dlm-post-id").val(),size:e,security:a("#dlm-ajax-nonce-add-file").val()};return jQuery.post(ajaxurl,e,function(e){jQuery(".downloadable_files").prepend(e),l(),jQuery(".download_monitor_files").unblock(),jQuery(".date-picker-field").datepicker({dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:!0}),jQuery(document).trigger("dlm_new_file_added",[this,e])}),!1}),jQuery(".download_monitor_files").on("click","button.remove_file",function(e){var o;return e.preventDefault(),confirm(dlm_ed_strings.confirm_delete)&&(0<(e=(o=jQuery(this).closest(".downloadable_file")).attr("data-file"))?(jQuery(o).block({message:null,overlayCSS:{background:"#fff url("+a("#dlm-plugin-url").val()+"/assets/images/ajax-loader.gif) no-repeat center",opacity:.6}}),e={action:"download_monitor_remove_file",file_id:e,download_id:a("#dlm-post-id").val(),security:a("#dlm-ajax-nonce-remove-file").val()},jQuery.post(ajaxurl,e,function(e){jQuery(o).fadeOut("300").remove()})):jQuery(o).fadeOut("300").remove()),!1}),jQuery(".download_monitor_files").on("click","a.dlm_browse_for_file",function(e){return downloadable_files_field=jQuery(this).closest(".downloadable_file").find('textarea[name^="downloadable_file_urls"]'),window.send_to_editor=window.send_to_browse_file_url,tb_show(dlm_ed_strings.browse_file,"media-upload.php?post_id="+a("#dlm-post-id").val()+"&type=downloadable_file_browser&from=wpdlm01&TB_iframe=true"),!1}),window.send_to_browse_file_url=function(e){e&&((old=jQuery.trim(jQuery(downloadable_files_field).val()))&&(old+="\n"),jQuery(downloadable_files_field).val(old+e)),tb_remove(),window.send_to_editor=window.send_to_editor_default},jQuery(document).on("click",".dlm_media_library",function(e){var o=a(this),l=o.parent().parent().find(".downloadable_file_urls"),t=l.val(),e=(e.preventDefault(),n&&n.close(),[new wp.media.controller.Library({library:wp.media.query(),multiple:!0,title:o.data("choose"),priority:20,filterable:"all"})]);(n=wp.media.frames.downloadable_file=wp.media({title:o.data("choose"),library:{type:""},button:{text:o.data("update")},multiple:!0,states:e})).on("select",function(){n.state().get("selection").map(function(e){(e=e.toJSON()).url&&(t=t?t+"\n"+e.url:e.url)}),l.val(t)}),n.on("ready",function(){n.uploader.options.uploader.params={type:"dlm_download"}}),n.open()}),a(".copy-dlm-button").click(function(e){e.preventDefault();e=a(this).parent().find("input");e.focus(),e.select(),document.execCommand("copy"),a(this).next("span").text(a(this).data("item")+" copied"),a(".copy-dlm-button").not(a(this)).parent().find("span").text("")})});
|
assets/js/extensions.js
CHANGED
@@ -1,42 +1,42 @@
|
|
1 |
-
jQuery( function ( $ ) {
|
2 |
-
|
3 |
-
$.each( $( '.extension_license a' ), function ( k, v ) {
|
4 |
-
$( v ).click( function () {
|
5 |
-
var wrap = $( v ).closest( '.extension_license' );
|
6 |
-
|
7 |
-
var ex_ac = (
|
8 |
-
'inactive' == $( wrap ).find( '#status' ).val()
|
9 |
-
) ? 'activate' : 'deactivate';
|
10 |
-
|
11 |
-
$(wrap).find('.dlm_license_error').remove();
|
12 |
-
|
13 |
-
$.post( ajaxurl, {
|
14 |
-
action: 'dlm_extension',
|
15 |
-
nonce: $( '#dlm-ajax-nonce' ).val(),
|
16 |
-
product_id: $( wrap ).find( '#product_id' ).val(),
|
17 |
-
key: $( wrap ).find( '#key' ).val(),
|
18 |
-
email: $( wrap ).find( '#email' ).val(),
|
19 |
-
extension_action: ex_ac
|
20 |
-
}, function ( response ) {
|
21 |
-
if ( response.result == 'failed' ) {
|
22 |
-
$( wrap ).prepend( $( "<div>" ).addClass( "dlm_license_error" ).html( response.message ) );
|
23 |
-
} else {
|
24 |
-
if ( 'activate' == ex_ac ) {
|
25 |
-
$( wrap ).find( '.license-status' ).addClass( 'active' ).html( 'ACTIVE' );
|
26 |
-
$( wrap ).find( '.button' ).html( 'Deactivate' );
|
27 |
-
$( wrap ).find( '#status' ).val( 'active' );
|
28 |
-
$( wrap ).find( '#key' ).attr( 'disabled', true );
|
29 |
-
$( wrap ).find( '#email' ).attr( 'disabled', true );
|
30 |
-
} else {
|
31 |
-
$( wrap ).find( '.license-status' ).removeClass( 'active' ).html( 'INACTIVE' );
|
32 |
-
$( wrap ).find( '.button' ).html( 'Activate' );
|
33 |
-
$( wrap ).find( '#status' ).val( 'inactive' );
|
34 |
-
$( wrap ).find( '#key' ).attr( 'disabled', false );
|
35 |
-
$( wrap ).find( '#email' ).attr( 'disabled', false );
|
36 |
-
}
|
37 |
-
}
|
38 |
-
} );
|
39 |
-
|
40 |
-
} );
|
41 |
-
} );
|
42 |
} );
|
1 |
+
jQuery( function ( $ ) {
|
2 |
+
|
3 |
+
$.each( $( '.extension_license a' ), function ( k, v ) {
|
4 |
+
$( v ).click( function () {
|
5 |
+
var wrap = $( v ).closest( '.extension_license' );
|
6 |
+
|
7 |
+
var ex_ac = (
|
8 |
+
'inactive' == $( wrap ).find( '#status' ).val()
|
9 |
+
) ? 'activate' : 'deactivate';
|
10 |
+
|
11 |
+
$(wrap).find('.dlm_license_error').remove();
|
12 |
+
|
13 |
+
$.post( ajaxurl, {
|
14 |
+
action: 'dlm_extension',
|
15 |
+
nonce: $( '#dlm-ajax-nonce' ).val(),
|
16 |
+
product_id: $( wrap ).find( '#product_id' ).val(),
|
17 |
+
key: $( wrap ).find( '#key' ).val(),
|
18 |
+
email: $( wrap ).find( '#email' ).val(),
|
19 |
+
extension_action: ex_ac
|
20 |
+
}, function ( response ) {
|
21 |
+
if ( response.result == 'failed' ) {
|
22 |
+
$( wrap ).prepend( $( "<div>" ).addClass( "dlm_license_error" ).html( response.message ) );
|
23 |
+
} else {
|
24 |
+
if ( 'activate' == ex_ac ) {
|
25 |
+
$( wrap ).find( '.license-status' ).addClass( 'active' ).html( 'ACTIVE' );
|
26 |
+
$( wrap ).find( '.button' ).html( 'Deactivate' );
|
27 |
+
$( wrap ).find( '#status' ).val( 'active' );
|
28 |
+
$( wrap ).find( '#key' ).attr( 'disabled', true );
|
29 |
+
$( wrap ).find( '#email' ).attr( 'disabled', true );
|
30 |
+
} else {
|
31 |
+
$( wrap ).find( '.license-status' ).removeClass( 'active' ).html( 'INACTIVE' );
|
32 |
+
$( wrap ).find( '.button' ).html( 'Activate' );
|
33 |
+
$( wrap ).find( '#status' ).val( 'inactive' );
|
34 |
+
$( wrap ).find( '#key' ).attr( 'disabled', false );
|
35 |
+
$( wrap ).find( '#email' ).attr( 'disabled', false );
|
36 |
+
}
|
37 |
+
}
|
38 |
+
} );
|
39 |
+
|
40 |
+
} );
|
41 |
+
} );
|
42 |
} );
|
assets/js/insert-download.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
-
jQuery( function ($) {
|
2 |
-
// Browse for file
|
3 |
-
jQuery( 'body' ).on( 'click', 'a.dlm_insert_download', function () {
|
4 |
-
|
5 |
-
tb_show( dlm_id_strings.insert_download, 'media-upload.php?type=add_download&from=wpdlm01&TB_iframe=true&height=200' );
|
6 |
-
|
7 |
-
return false;
|
8 |
-
} );
|
9 |
} );
|
1 |
+
jQuery( function ($) {
|
2 |
+
// Browse for file
|
3 |
+
jQuery( 'body' ).on( 'click', 'a.dlm_insert_download', function () {
|
4 |
+
|
5 |
+
tb_show( dlm_id_strings.insert_download, 'media-upload.php?type=add_download&from=wpdlm01&TB_iframe=true&height=200' );
|
6 |
+
|
7 |
+
return false;
|
8 |
+
} );
|
9 |
} );
|
assets/js/legacy-upgrader/build/style.css
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
#dlm_legacy_upgrader_app{height:100%;box-sizing:border-box}._1kijZ35OiZkKapzULElh6m ._2CxVTmzHXSW60xGZZcsG4W{position:relative;background:#419ccb;color:#fff;font-weight:700;padding:10px 10px 10px 35px}._1kijZ35OiZkKapzULElh6m ._2CxVTmzHXSW60xGZZcsG4W img{display:block;position:absolute;left:12px;top:12px;width:15px;height:15px;z-index:10}._1kijZ35OiZkKapzULElh6m ul{width:100%;padding:10px 0}._1kijZ35OiZkKapzULElh6m ul li{display:inline-block;width:50%}._1kijZ35OiZkKapzULElh6m ul li:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\F147";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top;font-size:1.5em}._1kijZ35OiZkKapzULElh6m ul li.zV9Nyt3hQBQicmm04gduY:before{color:#000}._1kijZ35OiZkKapzULElh6m ul li._1AzdgG9aB69nDxpkTig5B9:before{color:green}._5MraKW-sdXoMAncl8aoJ0 ._34ZBh3TYpaRFeMMsfEgz75{position:relative;background:#419ccb;color:#fff;font-weight:700;padding:10px 10px 10px 35px}._5MraKW-sdXoMAncl8aoJ0 ._34ZBh3TYpaRFeMMsfEgz75 img{display:block;position:absolute;left:12px;top:12px;width:15px;height:15px;z-index:10}._5MraKW-sdXoMAncl8aoJ0 ul{width:100%;padding:10px 0}._5MraKW-sdXoMAncl8aoJ0 ul li{display:inline-block;width:50%}._5MraKW-sdXoMAncl8aoJ0 ul li:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\F147";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top;font-size:1.5em}._5MraKW-sdXoMAncl8aoJ0 ul li._34VuGJn3eCzOVIhWxpf3EI:before{color:#000}._5MraKW-sdXoMAncl8aoJ0 ul li._3o3myVBr0p_jZTcVVSWdNC:before{color:green}
|
2 |
/*# sourceMappingURL=style.css.map*/
|
1 |
+
#dlm_legacy_upgrader_app{height:100%;box-sizing:border-box}._1kijZ35OiZkKapzULElh6m ._2CxVTmzHXSW60xGZZcsG4W{position:relative;background:#419ccb;color:#fff;font-weight:700;padding:10px 10px 10px 35px}._1kijZ35OiZkKapzULElh6m ._2CxVTmzHXSW60xGZZcsG4W img{display:block;position:absolute;left:12px;top:12px;width:15px;height:15px;z-index:10}._1kijZ35OiZkKapzULElh6m ul{width:100%;padding:10px 0}._1kijZ35OiZkKapzULElh6m ul li{display:inline-block;width:50%}._1kijZ35OiZkKapzULElh6m ul li:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\F147";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top;font-size:1.5em}._1kijZ35OiZkKapzULElh6m ul li.zV9Nyt3hQBQicmm04gduY:before{color:#000}._1kijZ35OiZkKapzULElh6m ul li._1AzdgG9aB69nDxpkTig5B9:before{color:green}._5MraKW-sdXoMAncl8aoJ0 ._34ZBh3TYpaRFeMMsfEgz75{position:relative;background:#419ccb;color:#fff;font-weight:700;padding:10px 10px 10px 35px}._5MraKW-sdXoMAncl8aoJ0 ._34ZBh3TYpaRFeMMsfEgz75 img{display:block;position:absolute;left:12px;top:12px;width:15px;height:15px;z-index:10}._5MraKW-sdXoMAncl8aoJ0 ul{width:100%;padding:10px 0}._5MraKW-sdXoMAncl8aoJ0 ul li{display:inline-block;width:50%}._5MraKW-sdXoMAncl8aoJ0 ul li:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\F147";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top;font-size:1.5em}._5MraKW-sdXoMAncl8aoJ0 ul li._34VuGJn3eCzOVIhWxpf3EI:before{color:#000}._5MraKW-sdXoMAncl8aoJ0 ul li._3o3myVBr0p_jZTcVVSWdNC:before{color:green}
|
2 |
/*# sourceMappingURL=style.css.map*/
|
assets/js/legacy-upgrader/package.json
CHANGED
@@ -1,101 +1,101 @@
|
|
1 |
-
{
|
2 |
-
"name": "preact-boilerplate",
|
3 |
-
"version": "6.0.0",
|
4 |
-
"description": "Ready-to-go Preact starter project powered by webpack.",
|
5 |
-
"scripts": {
|
6 |
-
"dev": "cross-env NODE_ENV=development webpack-dev-server --inline --hot --progress",
|
7 |
-
"start": "serve build -s -c 1",
|
8 |
-
"prestart": "npm run build",
|
9 |
-
"build": "cross-env NODE_ENV=production webpack --progress",
|
10 |
-
"prebuild": "mkdirp build && ncp src/assets build/assets",
|
11 |
-
"test": "npm run -s lint && jest --coverage",
|
12 |
-
"test:watch": "npm run -s test -- --watch",
|
13 |
-
"lint": "eslint src test"
|
14 |
-
},
|
15 |
-
"keywords": [
|
16 |
-
"preact",
|
17 |
-
"boilerplate",
|
18 |
-
"webpack"
|
19 |
-
],
|
20 |
-
"license": "MIT",
|
21 |
-
"author": "Jason Miller <jason@developit.ca>",
|
22 |
-
"jest": {
|
23 |
-
"setupFiles": [
|
24 |
-
"./test/setup.js"
|
25 |
-
],
|
26 |
-
"testURL": "http://localhost:8080",
|
27 |
-
"moduleFileExtensions": [
|
28 |
-
"js",
|
29 |
-
"jsx"
|
30 |
-
],
|
31 |
-
"moduleDirectories": [
|
32 |
-
"node_modules"
|
33 |
-
],
|
34 |
-
"moduleNameMapper": {
|
35 |
-
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js",
|
36 |
-
"\\.(css|less)$": "identity-obj-proxy",
|
37 |
-
"^react$": "preact-compat",
|
38 |
-
"^react-dom$": "preact-compat"
|
39 |
-
},
|
40 |
-
"collectCoverageFrom": [
|
41 |
-
"src/**/*.{js,jsx}"
|
42 |
-
]
|
43 |
-
},
|
44 |
-
"devDependencies": {
|
45 |
-
"autoprefixer": "^7.0.1",
|
46 |
-
"babel": "^6.5.2",
|
47 |
-
"babel-core": "^6.24.0",
|
48 |
-
"babel-eslint": "^7.2.2",
|
49 |
-
"babel-jest": "^20.0.0",
|
50 |
-
"babel-loader": "^7.0.0",
|
51 |
-
"babel-plugin-transform-decorators-legacy": "^1.3.4",
|
52 |
-
"babel-plugin-transform-react-jsx": "^6.8.0",
|
53 |
-
"babel-preset-es2015": "^6.24.0",
|
54 |
-
"babel-preset-stage-0": "^6.5.0",
|
55 |
-
"babel-register": "^6.24.0",
|
56 |
-
"babel-runtime": "^6.11.6",
|
57 |
-
"chai": "^4.0.2",
|
58 |
-
"copy-webpack-plugin": "^4.0.1",
|
59 |
-
"core-js": "^2.4.1",
|
60 |
-
"cross-env": "^5.0.1",
|
61 |
-
"css-loader": "^0.28.0",
|
62 |
-
"eslint": "^4.1.0",
|
63 |
-
"eslint-plugin-jest": "^20.0.0",
|
64 |
-
"eslint-plugin-react": "^7.0.0",
|
65 |
-
"extract-text-webpack-plugin": "^2.1.0",
|
66 |
-
"file-loader": "^0.11.1",
|
67 |
-
"html-webpack-plugin": "^2.28.0",
|
68 |
-
"identity-obj-proxy": "^3.0.0",
|
69 |
-
"jest": "^20.0.0",
|
70 |
-
"json-loader": "^0.5.4",
|
71 |
-
"less": "^2.7.1",
|
72 |
-
"less-loader": "^4.0.3",
|
73 |
-
"mkdirp": "^0.5.1",
|
74 |
-
"ncp": "^2.0.0",
|
75 |
-
"offline-plugin": "^4.7.0",
|
76 |
-
"postcss-loader": "^2.0.3",
|
77 |
-
"preact-jsx-chai": "^2.2.1",
|
78 |
-
"raw-loader": "^0.5.1",
|
79 |
-
"regenerator-runtime": "^0.10.3",
|
80 |
-
"replace-bundle-webpack-plugin": "^1.0.0",
|
81 |
-
"script-ext-html-webpack-plugin": "^1.3.4",
|
82 |
-
"sinon": "^2.1.0",
|
83 |
-
"sinon-chai": "^2.9.0",
|
84 |
-
"source-map-loader": "^0.2.1",
|
85 |
-
"style-loader": "^0.18.1",
|
86 |
-
"url-loader": "^0.6.1",
|
87 |
-
"webpack": "^3.0.0",
|
88 |
-
"webpack-dev-server": "^2.4.4"
|
89 |
-
},
|
90 |
-
"dependencies": {
|
91 |
-
"preact": "^8.1.0",
|
92 |
-
"preact-compat": "^3.15.0",
|
93 |
-
"preact-render-to-string": "^3.6.0",
|
94 |
-
"preact-router": "^2.5.1",
|
95 |
-
"promise-polyfill": "^6.0.2",
|
96 |
-
"proptypes": "^1.0.0",
|
97 |
-
"serve": "^6.0.0",
|
98 |
-
"react-router-dom": "^4.1.1",
|
99 |
-
"whatwg-fetch": "^2.0.3"
|
100 |
-
}
|
101 |
-
}
|
1 |
+
{
|
2 |
+
"name": "preact-boilerplate",
|
3 |
+
"version": "6.0.0",
|
4 |
+
"description": "Ready-to-go Preact starter project powered by webpack.",
|
5 |
+
"scripts": {
|
6 |
+
"dev": "cross-env NODE_ENV=development webpack-dev-server --inline --hot --progress",
|
7 |
+
"start": "serve build -s -c 1",
|
8 |
+
"prestart": "npm run build",
|
9 |
+
"build": "cross-env NODE_ENV=production webpack --progress",
|
10 |
+
"prebuild": "mkdirp build && ncp src/assets build/assets",
|
11 |
+
"test": "npm run -s lint && jest --coverage",
|
12 |
+
"test:watch": "npm run -s test -- --watch",
|
13 |
+
"lint": "eslint src test"
|
14 |
+
},
|
15 |
+
"keywords": [
|
16 |
+
"preact",
|
17 |
+
"boilerplate",
|
18 |
+
"webpack"
|
19 |
+
],
|
20 |
+
"license": "MIT",
|
21 |
+
"author": "Jason Miller <jason@developit.ca>",
|
22 |
+
"jest": {
|
23 |
+
"setupFiles": [
|
24 |
+
"./test/setup.js"
|
25 |
+
],
|
26 |
+
"testURL": "http://localhost:8080",
|
27 |
+
"moduleFileExtensions": [
|
28 |
+
"js",
|
29 |
+
"jsx"
|
30 |
+
],
|
31 |
+
"moduleDirectories": [
|
32 |
+
"node_modules"
|
33 |
+
],
|
34 |
+
"moduleNameMapper": {
|
35 |
+
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js",
|
36 |
+
"\\.(css|less)$": "identity-obj-proxy",
|
37 |
+
"^react$": "preact-compat",
|
38 |
+
"^react-dom$": "preact-compat"
|
39 |
+
},
|
40 |
+
"collectCoverageFrom": [
|
41 |
+
"src/**/*.{js,jsx}"
|
42 |
+
]
|
43 |
+
},
|
44 |
+
"devDependencies": {
|
45 |
+
"autoprefixer": "^7.0.1",
|
46 |
+
"babel": "^6.5.2",
|
47 |
+
"babel-core": "^6.24.0",
|
48 |
+
"babel-eslint": "^7.2.2",
|
49 |
+
"babel-jest": "^20.0.0",
|
50 |
+
"babel-loader": "^7.0.0",
|
51 |
+
"babel-plugin-transform-decorators-legacy": "^1.3.4",
|
52 |
+
"babel-plugin-transform-react-jsx": "^6.8.0",
|
53 |
+
"babel-preset-es2015": "^6.24.0",
|
54 |
+
"babel-preset-stage-0": "^6.5.0",
|
55 |
+
"babel-register": "^6.24.0",
|
56 |
+
"babel-runtime": "^6.11.6",
|
57 |
+
"chai": "^4.0.2",
|
58 |
+
"copy-webpack-plugin": "^4.0.1",
|
59 |
+
"core-js": "^2.4.1",
|
60 |
+
"cross-env": "^5.0.1",
|
61 |
+
"css-loader": "^0.28.0",
|
62 |
+
"eslint": "^4.1.0",
|
63 |
+
"eslint-plugin-jest": "^20.0.0",
|
64 |
+
"eslint-plugin-react": "^7.0.0",
|
65 |
+
"extract-text-webpack-plugin": "^2.1.0",
|
66 |
+
"file-loader": "^0.11.1",
|
67 |
+
"html-webpack-plugin": "^2.28.0",
|
68 |
+
"identity-obj-proxy": "^3.0.0",
|
69 |
+
"jest": "^20.0.0",
|
70 |
+
"json-loader": "^0.5.4",
|
71 |
+
"less": "^2.7.1",
|
72 |
+
"less-loader": "^4.0.3",
|
73 |
+
"mkdirp": "^0.5.1",
|
74 |
+
"ncp": "^2.0.0",
|
75 |
+
"offline-plugin": "^4.7.0",
|
76 |
+
"postcss-loader": "^2.0.3",
|
77 |
+
"preact-jsx-chai": "^2.2.1",
|
78 |
+
"raw-loader": "^0.5.1",
|
79 |
+
"regenerator-runtime": "^0.10.3",
|
80 |
+
"replace-bundle-webpack-plugin": "^1.0.0",
|
81 |
+
"script-ext-html-webpack-plugin": "^1.3.4",
|
82 |
+
"sinon": "^2.1.0",
|
83 |
+
"sinon-chai": "^2.9.0",
|
84 |
+
"source-map-loader": "^0.2.1",
|
85 |
+
"style-loader": "^0.18.1",
|
86 |
+
"url-loader": "^0.6.1",
|
87 |
+
"webpack": "^3.0.0",
|
88 |
+
"webpack-dev-server": "^2.4.4"
|
89 |
+
},
|
90 |
+
"dependencies": {
|
91 |
+
"preact": "^8.1.0",
|
92 |
+
"preact-compat": "^3.15.0",
|
93 |
+
"preact-render-to-string": "^3.6.0",
|
94 |
+
"preact-router": "^2.5.1",
|
95 |
+
"promise-polyfill": "^6.0.2",
|
96 |
+
"proptypes": "^1.0.0",
|
97 |
+
"serve": "^6.0.0",
|
98 |
+
"react-router-dom": "^4.1.1",
|
99 |
+
"whatwg-fetch": "^2.0.3"
|
100 |
+
}
|
101 |
+
}
|
assets/js/legacy-upgrader/src/components/app.js
CHANGED
@@ -1,69 +1,69 @@
|
|
1 |
-
import { h, Component } from 'preact';
|
2 |
-
import { HashRouter, Route, Redirect } from 'react-router-dom';
|
3 |
-
|
4 |
-
// polyfill fetch and promise
|
5 |
-
import 'whatwg-fetch';
|
6 |
-
import Promise from 'promise-polyfill';
|
7 |
-
if (!window.Promise) {
|
8 |
-
window.Promise = Promise;
|
9 |
-
}
|
10 |
-
|
11 |
-
import Welcome from './welcome';
|
12 |
-
import Downloads from './downloads';
|
13 |
-
import Content from './content';
|
14 |
-
import Done from './done';
|
15 |
-
|
16 |
-
// mock dlm_vars for dev
|
17 |
-
if(window.dlm_lu_vars == undefined) {
|
18 |
-
window.dlm_lu_vars = {
|
19 |
-
nonce: 'noncemock',
|
20 |
-
assets_path: 'http://lnmp.dev:1337/assets/'
|
21 |
-
};
|
22 |
-
}
|
23 |
-
|
24 |
-
export default class App extends Component {
|
25 |
-
|
26 |
-
ROUTES = {
|
27 |
-
welcome: () => <Welcome />,
|
28 |
-
downloads: () => <Downloads />,
|
29 |
-
content: ({match}) => <Content download_amount={match.params.download_amount} />,
|
30 |
-
done: ({match}) => <Done download_amount={match.params.download_amount} content_amount={match.params.content_amount} />
|
31 |
-
};
|
32 |
-
|
33 |
-
constructor(props) {
|
34 |
-
super(props);
|
35 |
-
|
36 |
-
this.state = {
|
37 |
-
queue: []
|
38 |
-
};
|
39 |
-
}
|
40 |
-
|
41 |
-
/**
|
42 |
-
<Router onChange={this.handleRoute}>
|
43 |
-
|
44 |
-
<Welcome path="" />
|
45 |
-
<Downloads path="/downloads" />
|
46 |
-
<Content path="/content/:download_amount" />
|
47 |
-
<Done path="/done/:download_amount/:content_amount" />
|
48 |
-
</Router>*/
|
49 |
-
|
50 |
-
render() {
|
51 |
-
|
52 |
-
const ROUTES = this.ROUTES;
|
53 |
-
|
54 |
-
return (
|
55 |
-
<div id="dlm_legacy_upgrader_app">
|
56 |
-
<HashRouter>
|
57 |
-
<div>
|
58 |
-
<Route path="/welcome" component={ROUTES.welcome} />
|
59 |
-
<Route path="/downloads" component={ROUTES.downloads} />
|
60 |
-
<Route path="/content/:download_amount" component={ROUTES.content} />
|
61 |
-
<Route path="/done/:download_amount/:content_amount" component={ROUTES.done} />
|
62 |
-
<Redirect from="/" to="/welcome" />
|
63 |
-
</div>
|
64 |
-
</HashRouter>
|
65 |
-
|
66 |
-
</div>
|
67 |
-
);
|
68 |
-
}
|
69 |
-
}
|
1 |
+
import { h, Component } from 'preact';
|
2 |
+
import { HashRouter, Route, Redirect } from 'react-router-dom';
|
3 |
+
|
4 |
+
// polyfill fetch and promise
|
5 |
+
import 'whatwg-fetch';
|
6 |
+
import Promise from 'promise-polyfill';
|
7 |
+
if (!window.Promise) {
|
8 |
+
window.Promise = Promise;
|
9 |
+
}
|
10 |
+
|
11 |
+
import Welcome from './welcome';
|
12 |
+
import Downloads from './downloads';
|
13 |
+
import Content from './content';
|
14 |
+
import Done from './done';
|
15 |
+
|
16 |
+
// mock dlm_vars for dev
|
17 |
+
if(window.dlm_lu_vars == undefined) {
|
18 |
+
window.dlm_lu_vars = {
|
19 |
+
nonce: 'noncemock',
|
20 |
+
assets_path: 'http://lnmp.dev:1337/assets/'
|
21 |
+
};
|
22 |
+
}
|
23 |
+
|
24 |
+
export default class App extends Component {
|
25 |
+
|
26 |
+
ROUTES = {
|
27 |
+
welcome: () => <Welcome />,
|
28 |
+
downloads: () => <Downloads />,
|
29 |
+
content: ({match}) => <Content download_amount={match.params.download_amount} />,
|
30 |
+
done: ({match}) => <Done download_amount={match.params.download_amount} content_amount={match.params.content_amount} />
|
31 |
+
};
|
32 |
+
|
33 |
+
constructor(props) {
|
34 |
+
super(props);
|
35 |
+
|
36 |
+
this.state = {
|
37 |
+
queue: []
|
38 |
+
};
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
<Router onChange={this.handleRoute}>
|
43 |
+
|
44 |
+
<Welcome path="" />
|
45 |
+
<Downloads path="/downloads" />
|
46 |
+
<Content path="/content/:download_amount" />
|
47 |
+
<Done path="/done/:download_amount/:content_amount" />
|
48 |
+
</Router>*/
|
49 |
+
|
50 |
+
render() {
|
51 |
+
|
52 |
+
const ROUTES = this.ROUTES;
|
53 |
+
|
54 |
+
return (
|
55 |
+
<div id="dlm_legacy_upgrader_app">
|
56 |
+
<HashRouter>
|
57 |
+
<div>
|
58 |
+
<Route path="/welcome" component={ROUTES.welcome} />
|
59 |
+
<Route path="/downloads" component={ROUTES.downloads} />
|
60 |
+
<Route path="/content/:download_amount" component={ROUTES.content} />
|
61 |
+
<Route path="/done/:download_amount/:content_amount" component={ROUTES.done} />
|
62 |
+
<Redirect from="/" to="/welcome" />
|
63 |
+
</div>
|
64 |
+
</HashRouter>
|
65 |
+
|
66 |
+
</div>
|
67 |
+
);
|
68 |
+
}
|
69 |
+
}
|
assets/js/legacy-upgrader/src/components/content/QueueItem.js
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
-
import { h, Component } from 'preact';
|
2 |
-
import style from './style';
|
3 |
-
|
4 |
-
export default class QueueItem extends Component {
|
5 |
-
|
6 |
-
render() {
|
7 |
-
var listClass = (this.props.item.done?style.done:style.todo);
|
8 |
-
|
9 |
-
return (
|
10 |
-
<li class={listClass}>Content ID: {this.props.item.id}</li>
|
11 |
-
);
|
12 |
-
}
|
13 |
-
}
|
1 |
+
import { h, Component } from 'preact';
|
2 |
+
import style from './style';
|
3 |
+
|
4 |
+
export default class QueueItem extends Component {
|
5 |
+
|
6 |
+
render() {
|
7 |
+
var listClass = (this.props.item.done?style.done:style.todo);
|
8 |
+
|
9 |
+
return (
|
10 |
+
<li class={listClass}>Content ID: {this.props.item.id}</li>
|
11 |
+
);
|
12 |
+
}
|
13 |
+
}
|
assets/js/legacy-upgrader/src/components/content/index.js
CHANGED
@@ -1,149 +1,149 @@
|
|
1 |
-
import {h, Component} from 'preact';
|
2 |
-
import style from './style.less';
|
3 |
-
import QueueItem from './QueueItem';
|
4 |
-
import { Link } from 'react-router-dom';
|
5 |
-
|
6 |
-
export default class Content extends Component {
|
7 |
-
|
8 |
-
state = {
|
9 |
-
checked: false,
|
10 |
-
items: [],
|
11 |
-
upgrading: false
|
12 |
-
};
|
13 |
-
|
14 |
-
constructor(props) {
|
15 |
-
super(props);
|
16 |
-
|
17 |
-
this.startUpgrade = this.startUpgrade.bind(this);
|
18 |
-
this.upgradeNext = this.upgradeNext.bind(this);
|
19 |
-
this.upgradeItem = this.upgradeItem.bind(this);
|
20 |
-
}
|
21 |
-
|
22 |
-
// gets called when this route is navigated to
|
23 |
-
componentDidMount() {
|
24 |
-
fetch( ajaxurl + "?action=dlm_lu_get_content_queue&nonce="+window.dlm_lu_vars.nonce, {
|
25 |
-
method: 'GET',
|
26 |
-
credentials: 'include'
|
27 |
-
} ).then( ( r ) => {
|
28 |
-
if ( r.status == 200 ) {
|
29 |
-
return r.json();
|
30 |
-
}
|
31 |
-
|
32 |
-
throw "AJAX API OFFLINE";
|
33 |
-
} ).then( ( j ) => {
|
34 |
-
var items = [];
|
35 |
-
for ( var i = 0; i < j.length; i ++ ) {
|
36 |
-
items.push( {id: j[i], done: false} );
|
37 |
-
}
|
38 |
-
this.setState( {checked: true, items: items} );
|
39 |
-
return;
|
40 |
-
} ).catch( ( e ) => {
|
41 |
-
console.log( e );
|
42 |
-
return;
|
43 |
-
} );
|
44 |
-
}
|
45 |
-
|
46 |
-
// gets called just before navigating away from the route
|
47 |
-
componentWillUnmount() {
|
48 |
-
// todo clear queue
|
49 |
-
}
|
50 |
-
|
51 |
-
upgradeNext() {
|
52 |
-
var upgradeDone = true;
|
53 |
-
for( var i = 0; i < this.state.items.length; i++ ) {
|
54 |
-
if( this.state.items[i].done === false ) {
|
55 |
-
upgradeDone = false;
|
56 |
-
this.upgradeItem( this.state.items[i] );
|
57 |
-
break;
|
58 |
-
}
|
59 |
-
}
|
60 |
-
|
61 |
-
if( upgradeDone ) {
|
62 |
-
window.location.hash = "/done/"+this.props.download_amount+"/"+this.state.items.length;
|
63 |
-
}
|
64 |
-
}
|
65 |
-
|
66 |
-
upgradeItem( item ) {
|
67 |
-
fetch( ajaxurl + "?action=dlm_lu_upgrade_content&content_id="+item.id+"&nonce="+window.dlm_lu_vars.nonce, {
|
68 |
-
method: 'GET',
|
69 |
-
credentials: 'include'
|
70 |
-
} ).then( ( r ) => {
|
71 |
-
if ( r.status == 200 ) {
|
72 |
-
return r.json();
|
73 |
-
}
|
74 |
-
|
75 |
-
throw "AJAX API OFFLINE";
|
76 |
-
} ).then( ( j ) => {
|
77 |
-
console.log( j );
|
78 |
-
item.done = true;
|
79 |
-
this.forceUpdate();
|
80 |
-
this.upgradeNext();
|
81 |
-
return;
|
82 |
-
} ).catch( ( e ) => {
|
83 |
-
console.log( e );
|
84 |
-
return;
|
85 |
-
} );
|
86 |
-
}
|
87 |
-
|
88 |
-
startUpgrade() {
|
89 |
-
// check if we're upgrading
|
90 |
-
if( this.state.upgrading ) {
|
91 |
-
return;
|
92 |
-
}
|
93 |
-
|
94 |
-
// set we're upgrading
|
95 |
-
this.setState( {upgrading: true} );
|
96 |
-
|
97 |
-
// upgrade next download
|
98 |
-
this.upgradeNext();
|
99 |
-
}
|
100 |
-
|
101 |
-
render() {
|
102 |
-
|
103 |
-
var loadingImg = window.dlm_lu_vars.assets_path + "loading.gif";
|
104 |
-
|
105 |
-
if ( this.state.checked == false ) {
|
106 |
-
return (
|
107 |
-
<div class={style.queue}>
|
108 |
-
<h2>Posts/Pages Queue</h2>
|
109 |
-
<p><strong>{this.props.download_amount}</strong> downloads have been upgraded.</p>
|
110 |
-
<p>We're currently building the posts/pages queue, please wait.</p>
|
111 |
-
</div>
|
112 |
-
);
|
113 |
-
}
|
114 |
-
|
115 |
-
if ( this.state.items.length == 0 ) {
|
116 |
-
var linkURL = "/done/"+this.props.download_amount+"/0";
|
117 |
-
return (
|
118 |
-
<div class={style.queue}>
|
119 |
-
<p><strong>{this.props.download_amount}</strong> downloads have been upgraded.</p>
|
120 |
-
<p>No posts/pages found that require upgrading.</p>
|
121 |
-
<Link to={linkURL} class="button button-primary button-large">Continue to Post/Page upgrade</Link>
|
122 |
-
</div>
|
123 |
-
);
|
124 |
-
}
|
125 |
-
|
126 |
-
return (
|
127 |
-
<div class={style.queue}>
|
128 |
-
<h2>Posts/Pages Queue</h2>
|
129 |
-
|
130 |
-
{this.state.upgrading &&
|
131 |
-
<p class={style.upgrading_notice}><img src={loadingImg} />Currently upgrading your downloads, please wait...</p>
|
132 |
-
}
|
133 |
-
|
134 |
-
<p><strong>{this.props.download_amount}</strong> downloads have been upgraded.</p>
|
135 |
-
|
136 |
-
<p>The following posts/pages items have been found that need upgrading:</p>
|
137 |
-
|
138 |
-
{this.state.items.length > 0 &&
|
139 |
-
<ul>
|
140 |
-
{this.state.items.map( ( o, i ) => <QueueItem item={o}/> )}
|
141 |
-
</ul>
|
142 |
-
}
|
143 |
-
|
144 |
-
<a href="javascript:;" class="button button-primary button-large" onClick={() => this.startUpgrade()}>Upgrade Content Items</a>
|
145 |
-
|
146 |
-
</div>
|
147 |
-
);
|
148 |
-
}
|
149 |
-
}
|
1 |
+
import {h, Component} from 'preact';
|
2 |
+
import style from './style.less';
|
3 |
+
import QueueItem from './QueueItem';
|
4 |
+
import { Link } from 'react-router-dom';
|
5 |
+
|
6 |
+
export default class Content extends Component {
|
7 |
+
|
8 |
+
state = {
|
9 |
+
checked: false,
|
10 |
+
items: [],
|
11 |
+
upgrading: false
|
12 |
+
};
|
13 |
+
|
14 |
+
constructor(props) {
|
15 |
+
super(props);
|
16 |
+
|
17 |
+
this.startUpgrade = this.startUpgrade.bind(this);
|
18 |
+
this.upgradeNext = this.upgradeNext.bind(this);
|
19 |
+
this.upgradeItem = this.upgradeItem.bind(this);
|
20 |
+
}
|
21 |
+
|
22 |
+
// gets called when this route is navigated to
|
23 |
+
componentDidMount() {
|
24 |
+
fetch( ajaxurl + "?action=dlm_lu_get_content_queue&nonce="+window.dlm_lu_vars.nonce, {
|
25 |
+
method: 'GET',
|
26 |
+
credentials: 'include'
|
27 |
+
} ).then( ( r ) => {
|
28 |
+
if ( r.status == 200 ) {
|
29 |
+
return r.json();
|
30 |
+
}
|
31 |
+
|
32 |
+
throw "AJAX API OFFLINE";
|
33 |
+
} ).then( ( j ) => {
|
34 |
+
var items = [];
|
35 |
+
for ( var i = 0; i < j.length; i ++ ) {
|
36 |
+
items.push( {id: j[i], done: false} );
|
37 |
+
}
|
38 |
+
this.setState( {checked: true, items: items} );
|
39 |
+
return;
|
40 |
+
} ).catch( ( e ) => {
|
41 |
+
console.log( e );
|
42 |
+
return;
|
43 |
+
} );
|
44 |
+
}
|
45 |
+
|
46 |
+
// gets called just before navigating away from the route
|
47 |
+
componentWillUnmount() {
|
48 |
+
// todo clear queue
|
49 |
+
}
|
50 |
+
|
51 |
+
upgradeNext() {
|
52 |
+
var upgradeDone = true;
|
53 |
+
for( var i = 0; i < this.state.items.length; i++ ) {
|
54 |
+
if( this.state.items[i].done === false ) {
|
55 |
+
upgradeDone = false;
|
56 |
+
this.upgradeItem( this.state.items[i] );
|
57 |
+
break;
|
58 |
+
}
|
59 |
+
}
|
60 |
+
|
61 |
+
if( upgradeDone ) {
|
62 |
+
window.location.hash = "/done/"+this.props.download_amount+"/"+this.state.items.length;
|
63 |
+
}
|
64 |
+
}
|
65 |
+
|
66 |
+
upgradeItem( item ) {
|
67 |
+
fetch( ajaxurl + "?action=dlm_lu_upgrade_content&content_id="+item.id+"&nonce="+window.dlm_lu_vars.nonce, {
|
68 |
+
method: 'GET',
|
69 |
+
credentials: 'include'
|
70 |
+
} ).then( ( r ) => {
|
71 |
+
if ( r.status == 200 ) {
|
72 |
+
return r.json();
|
73 |
+
}
|
74 |
+
|
75 |
+
throw "AJAX API OFFLINE";
|
76 |
+
} ).then( ( j ) => {
|
77 |
+
console.log( j );
|
78 |
+
item.done = true;
|
79 |
+
this.forceUpdate();
|
80 |
+
this.upgradeNext();
|
81 |
+
return;
|
82 |
+
} ).catch( ( e ) => {
|
83 |
+
console.log( e );
|
84 |
+
return;
|
85 |
+
} );
|
86 |
+
}
|
87 |
+
|
88 |
+
startUpgrade() {
|
89 |
+
// check if we're upgrading
|
90 |
+
if( this.state.upgrading ) {
|
91 |
+
return;
|
92 |
+
}
|
93 |
+
|
94 |
+
// set we're upgrading
|
95 |
+
this.setState( {upgrading: true} );
|
96 |
+
|
97 |
+
// upgrade next download
|
98 |
+
this.upgradeNext();
|
99 |
+
}
|
100 |
+
|
101 |
+
render() {
|
102 |
+
|
103 |
+
var loadingImg = window.dlm_lu_vars.assets_path + "loading.gif";
|
104 |
+
|
105 |
+
if ( this.state.checked == false ) {
|
106 |
+
return (
|
107 |
+
<div class={style.queue}>
|
108 |
+
<h2>Posts/Pages Queue</h2>
|
109 |
+
<p><strong>{this.props.download_amount}</strong> downloads have been upgraded.</p>
|
110 |
+
<p>We're currently building the posts/pages queue, please wait.</p>
|
111 |
+
</div>
|
112 |
+
);
|
113 |
+
}
|
114 |
+
|
115 |
+
if ( this.state.items.length == 0 ) {
|
116 |
+
var linkURL = "/done/"+this.props.download_amount+"/0";
|
117 |
+
return (
|
118 |
+
<div class={style.queue}>
|
119 |
+
<p><strong>{this.props.download_amount}</strong> downloads have been upgraded.</p>
|
120 |
+
<p>No posts/pages found that require upgrading.</p>
|
121 |
+
<Link to={linkURL} class="button button-primary button-large">Continue to Post/Page upgrade</Link>
|
122 |
+
</div>
|
123 |
+
);
|
124 |
+
}
|
125 |
+
|
126 |
+
return (
|
127 |
+
<div class={style.queue}>
|
128 |
+
<h2>Posts/Pages Queue</h2>
|
129 |
+
|
130 |
+
{this.state.upgrading &&
|
131 |
+
<p class={style.upgrading_notice}><img src={loadingImg} />Currently upgrading your downloads, please wait...</p>
|
132 |
+
}
|
133 |
+
|
134 |
+
<p><strong>{this.props.download_amount}</strong> downloads have been upgraded.</p>
|
135 |
+
|
136 |
+
<p>The following posts/pages items have been found that need upgrading:</p>
|
137 |
+
|
138 |
+
{this.state.items.length > 0 &&
|
139 |
+
<ul>
|
140 |
+
{this.state.items.map( ( o, i ) => <QueueItem item={o}/> )}
|
141 |
+
</ul>
|
142 |
+
}
|
143 |
+
|
144 |
+
<a href="javascript:;" class="button button-primary button-large" onClick={() => this.startUpgrade()}>Upgrade Content Items</a>
|
145 |
+
|
146 |
+
</div>
|
147 |
+
);
|
148 |
+
}
|
149 |
+
}
|
assets/js/legacy-upgrader/src/components/content/style.less
CHANGED
@@ -1,49 +1,49 @@
|
|
1 |
-
@import '~style/helpers';
|
2 |
-
|
3 |
-
.queue {
|
4 |
-
|
5 |
-
.upgrading_notice {
|
6 |
-
position: relative;
|
7 |
-
background: #419ccb;
|
8 |
-
color: #fff;
|
9 |
-
font-weight: bold;
|
10 |
-
padding: 10px 10px 10px 35px;
|
11 |
-
|
12 |
-
img {
|
13 |
-
display: block;
|
14 |
-
position: absolute;
|
15 |
-
left: 12px;
|
16 |
-
top: 12px;
|
17 |
-
width: 15px;
|
18 |
-
height: 15px;
|
19 |
-
z-index: 10;
|
20 |
-
}
|
21 |
-
}
|
22 |
-
|
23 |
-
ul {
|
24 |
-
width: 100%;
|
25 |
-
padding: 10px 0;
|
26 |
-
|
27 |
-
li {
|
28 |
-
display: inline-block;
|
29 |
-
width: 50%;
|
30 |
-
&:before {
|
31 |
-
.iconbefore("\f147");
|
32 |
-
font-size: 1.5em;
|
33 |
-
}
|
34 |
-
|
35 |
-
&.todo {
|
36 |
-
&:before {
|
37 |
-
color: black;
|
38 |
-
}
|
39 |
-
}
|
40 |
-
|
41 |
-
&.done {
|
42 |
-
&:before {
|
43 |
-
color: green;
|
44 |
-
}
|
45 |
-
}
|
46 |
-
}
|
47 |
-
|
48 |
-
}
|
49 |
-
}
|
1 |
+
@import '~style/helpers';
|
2 |
+
|
3 |
+
.queue {
|
4 |
+
|
5 |
+
.upgrading_notice {
|
6 |
+
position: relative;
|
7 |
+
background: #419ccb;
|
8 |
+
color: #fff;
|
9 |
+
font-weight: bold;
|
10 |
+
padding: 10px 10px 10px 35px;
|
11 |
+
|
12 |
+
img {
|
13 |
+
display: block;
|
14 |
+
position: absolute;
|
15 |
+
left: 12px;
|
16 |
+
top: 12px;
|
17 |
+
width: 15px;
|
18 |
+
height: 15px;
|
19 |
+
z-index: 10;
|
20 |
+
}
|
21 |
+
}
|
22 |
+
|
23 |
+
ul {
|
24 |
+
width: 100%;
|
25 |
+
padding: 10px 0;
|
26 |
+
|
27 |
+
li {
|
28 |
+
display: inline-block;
|
29 |
+
width: 50%;
|
30 |
+
&:before {
|
31 |
+
.iconbefore("\f147");
|
32 |
+
font-size: 1.5em;
|
33 |
+
}
|
34 |
+
|
35 |
+
&.todo {
|
36 |
+
&:before {
|
37 |
+
color: black;
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
&.done {
|
42 |
+
&:before {
|
43 |
+
color: green;
|
44 |
+
}
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
}
|
49 |
+
}
|
assets/js/legacy-upgrader/src/components/done/index.js
CHANGED
@@ -1,36 +1,36 @@
|
|
1 |
-
import { h, Component } from 'preact';
|
2 |
-
import { Link } from 'preact-router';
|
3 |
-
import style from './style.less';
|
4 |
-
|
5 |
-
export default class Done extends Component {
|
6 |
-
|
7 |
-
// gets called when this route is navigated to
|
8 |
-
componentDidMount() {
|
9 |
-
// mark upgrade as completed
|
10 |
-
fetch( ajaxurl + "?action=dlm_lu_mark_upgrade_done&nonce="+window.dlm_lu_vars.nonce, {
|
11 |
-
method: 'GET',
|
12 |
-
credentials: 'include'
|
13 |
-
} ).then( ( r ) => {
|
14 |
-
if ( r.status == 200 ) {
|
15 |
-
return r.json();
|
16 |
-
}
|
17 |
-
|
18 |
-
throw "AJAX API OFFLINE";
|
19 |
-
} ).then( ( j ) => {
|
20 |
-
return;
|
21 |
-
} ).catch( ( e ) => {
|
22 |
-
console.log( e );
|
23 |
-
return;
|
24 |
-
} );
|
25 |
-
}
|
26 |
-
|
27 |
-
render() {
|
28 |
-
return (
|
29 |
-
<div class={style.welcome}>
|
30 |
-
<h2>Upgrade Done</h2>
|
31 |
-
<p><strong>{this.props.download_amount}</strong> downloads have been upgraded.</p>
|
32 |
-
<p><strong>{this.props.content_amount}</strong> posts/pages have been upgraded.</p>
|
33 |
-
</div>
|
34 |
-
);
|
35 |
-
}
|
36 |
-
}
|
1 |
+
import { h, Component } from 'preact';
|
2 |
+
import { Link } from 'preact-router';
|
3 |
+
import style from './style.less';
|
4 |
+
|
5 |
+
export default class Done extends Component {
|
6 |
+
|
7 |
+
// gets called when this route is navigated to
|
8 |
+
componentDidMount() {
|
9 |
+
// mark upgrade as completed
|
10 |
+
fetch( ajaxurl + "?action=dlm_lu_mark_upgrade_done&nonce="+window.dlm_lu_vars.nonce, {
|
11 |
+
method: 'GET',
|
12 |
+
credentials: 'include'
|
13 |
+
} ).then( ( r ) => {
|
14 |
+
if ( r.status == 200 ) {
|
15 |
+
return r.json();
|
16 |
+
}
|
17 |
+
|
18 |
+
throw "AJAX API OFFLINE";
|
19 |
+
} ).then( ( j ) => {
|
20 |
+
return;
|
21 |
+
} ).catch( ( e ) => {
|
22 |
+
console.log( e );
|
23 |
+
return;
|
24 |
+
} );
|
25 |
+
}
|
26 |
+
|
27 |
+
render() {
|
28 |
+
return (
|
29 |
+
<div class={style.welcome}>
|
30 |
+
<h2>Upgrade Done</h2>
|
31 |
+
<p><strong>{this.props.download_amount}</strong> downloads have been upgraded.</p>
|
32 |
+
<p><strong>{this.props.content_amount}</strong> posts/pages have been upgraded.</p>
|
33 |
+
</div>
|
34 |
+
);
|
35 |
+
}
|
36 |
+
}
|
assets/js/legacy-upgrader/src/components/done/style.less
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
@import '~style/helpers';
|
2 |
-
|
3 |
-
.done {
|
4 |
-
|
5 |
-
}
|
1 |
+
@import '~style/helpers';
|
2 |
+
|
3 |
+
.done {
|
4 |
+
|
5 |
+
}
|
assets/js/legacy-upgrader/src/components/downloads/QueueItem.js
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
-
import { h, Component } from 'preact';
|
2 |
-
import style from './style';
|
3 |
-
|
4 |
-
export default class QueueItem extends Component {
|
5 |
-
|
6 |
-
render() {
|
7 |
-
var listClass = (this.props.item.done?style.done:style.todo);
|
8 |
-
|
9 |
-
return (
|
10 |
-
<li class={listClass}>Legacy Download ID: {this.props.item.id}</li>
|
11 |
-
);
|
12 |
-
}
|
13 |
}
|
1 |
+
import { h, Component } from 'preact';
|
2 |
+
import style from './style';
|
3 |
+
|
4 |
+
export default class QueueItem extends Component {
|
5 |
+
|
6 |
+
render() {
|
7 |
+
var listClass = (this.props.item.done?style.done:style.todo);
|
8 |
+
|
9 |
+
return (
|
10 |
+
<li class={listClass}>Legacy Download ID: {this.props.item.id}</li>
|
11 |
+
);
|
12 |
+
}
|
13 |
}
|
assets/js/legacy-upgrader/src/components/downloads/index.js
CHANGED
@@ -1,145 +1,145 @@
|
|
1 |
-
import {h, Component} from 'preact';
|
2 |
-
import style from './style.less';
|
3 |
-
import QueueItem from './QueueItem';
|
4 |
-
import { Link } from 'react-router-dom';
|
5 |
-
|
6 |
-
export default class Downloads extends Component {
|
7 |
-
|
8 |
-
state = {
|
9 |
-
checked: false,
|
10 |
-
items: [],
|
11 |
-
upgrading: false
|
12 |
-
};
|
13 |
-
|
14 |
-
constructor(props) {
|
15 |
-
super(props);
|
16 |
-
|
17 |
-
this.startUpgrade = this.startUpgrade.bind(this);
|
18 |
-
this.upgradeNext = this.upgradeNext.bind(this);
|
19 |
-
this.upgradeItem = this.upgradeItem.bind(this);
|
20 |
-
}
|
21 |
-
|
22 |
-
// gets called when this route is navigated to
|
23 |
-
componentDidMount() {
|
24 |
-
fetch( ajaxurl + "?action=dlm_lu_get_download_queue&nonce="+window.dlm_lu_vars.nonce, {
|
25 |
-
method: 'GET',
|
26 |
-
credentials: 'include'
|
27 |
-
} ).then( ( r ) => {
|
28 |
-
if ( r.status == 200 ) {
|
29 |
-
return r.json();
|
30 |
-
}
|
31 |
-
|
32 |
-
throw "AJAX API OFFLINE";
|
33 |
-
} ).then( ( j ) => {
|
34 |
-
var items = [];
|
35 |
-
for ( var i = 0; i < j.length; i ++ ) {
|
36 |
-
items.push( {id: j[i], done: false} );
|
37 |
-
}
|
38 |
-
this.setState( {checked: true, items: items} );
|
39 |
-
return;
|
40 |
-
} ).catch( ( e ) => {
|
41 |
-
console.log( e );
|
42 |
-
return;
|
43 |
-
} );
|
44 |
-
}
|
45 |
-
|
46 |
-
// gets called just before navigating away from the route
|
47 |
-
componentWillUnmount() {
|
48 |
-
// todo clear queue
|
49 |
-
}
|
50 |
-
|
51 |
-
upgradeNext() {
|
52 |
-
var upgradeDone = true;
|
53 |
-
for( var i = 0; i < this.state.items.length; i++ ) {
|
54 |
-
if( this.state.items[i].done === false ) {
|
55 |
-
upgradeDone = false;
|
56 |
-
this.upgradeItem( this.state.items[i] );
|
57 |
-
break;
|
58 |
-
}
|
59 |
-
}
|
60 |
-
|
61 |
-
if( upgradeDone ) {
|
62 |
-
window.location.hash = "/content/"+this.state.items.length;
|
63 |
-
}
|
64 |
-
}
|
65 |
-
|
66 |
-
upgradeItem( item ) {
|
67 |
-
fetch( ajaxurl + "?action=dlm_lu_upgrade_download&download_id="+item.id+"&nonce="+window.dlm_lu_vars.nonce, {
|
68 |
-
method: 'GET',
|
69 |
-
credentials: 'include'
|
70 |
-
} ).then( ( r ) => {
|
71 |
-
if ( r.status == 200 ) {
|
72 |
-
return r.json();
|
73 |
-
}
|
74 |
-
|
75 |
-
throw "AJAX API OFFLINE";
|
76 |
-
} ).then( ( j ) => {
|
77 |
-
console.log( j );
|
78 |
-
item.done = true;
|
79 |
-
this.forceUpdate();
|
80 |
-
this.upgradeNext();
|
81 |
-
return;
|
82 |
-
} ).catch( ( e ) => {
|
83 |
-
console.log( e );
|
84 |
-
return;
|
85 |
-
} );
|
86 |
-
}
|
87 |
-
|
88 |
-
startUpgrade() {
|
89 |
-
// check if we're upgrading
|
90 |
-
if( this.state.upgrading ) {
|
91 |
-
return;
|
92 |
-
}
|
93 |
-
|
94 |
-
// set we're upgrading
|
95 |
-
this.setState( {upgrading: true} );
|
96 |
-
|
97 |
-
// upgrade next download
|
98 |
-
this.upgradeNext();
|
99 |
-
}
|
100 |
-
|
101 |
-
render() {
|
102 |
-
|
103 |
-
var loadingImg = window.dlm_lu_vars.assets_path + "loading.gif";
|
104 |
-
|
105 |
-
if ( this.state.checked == false ) {
|
106 |
-
return (
|
107 |
-
<div class={style.queue}>
|
108 |
-
<h2>Downloads Queue</h2>
|
109 |
-
<p>We're currently building the queue, please wait.</p>
|
110 |
-
</div>
|
111 |
-
);
|
112 |
-
}
|
113 |
-
|
114 |
-
if ( this.state.items.length == 0 ) {
|
115 |
-
return (
|
116 |
-
<div class={style.queue}>
|
117 |
-
<h2>Downloads Queue</h2>
|
118 |
-
<p>No Downloads found that require upgrading</p>
|
119 |
-
<Link to="/content/0" class="button button-primary button-large">Continue to Post/Page upgrade</Link>
|
120 |
-
</div>
|
121 |
-
);
|
122 |
-
}
|
123 |
-
|
124 |
-
return (
|
125 |
-
<div class={style.queue}>
|
126 |
-
<h2>Downloads Queue</h2>
|
127 |
-
|
128 |
-
{this.state.upgrading &&
|
129 |
-
<p class={style.upgrading_notice}><img src={loadingImg} />Currently upgrading your downloads, please wait...</p>
|
130 |
-
}
|
131 |
-
|
132 |
-
<p>The following legacy download ID's have been found that need upgrading:</p>
|
133 |
-
|
134 |
-
{this.state.items.length > 0 &&
|
135 |
-
<ul>
|
136 |
-
{this.state.items.map( ( o, i ) => <QueueItem item={o}/> )}
|
137 |
-
</ul>
|
138 |
-
}
|
139 |
-
|
140 |
-
<a href="javascript:;" class="button button-primary button-large" onClick={() => this.startUpgrade()}>Upgrade Downloads</a>
|
141 |
-
|
142 |
-
</div>
|
143 |
-
);
|
144 |
-
}
|
145 |
-
}
|
1 |
+
import {h, Component} from 'preact';
|
2 |
+
import style from './style.less';
|
3 |
+
import QueueItem from './QueueItem';
|
4 |
+
import { Link } from 'react-router-dom';
|
5 |
+
|
6 |
+
export default class Downloads extends Component {
|
7 |
+
|
8 |
+
state = {
|
9 |
+
checked: false,
|
10 |
+
items: [],
|
11 |
+
upgrading: false
|
12 |
+
};
|
13 |
+
|
14 |
+
constructor(props) {
|
15 |
+
super(props);
|
16 |
+
|
17 |
+
this.startUpgrade = this.startUpgrade.bind(this);
|
18 |
+
this.upgradeNext = this.upgradeNext.bind(this);
|
19 |
+
this.upgradeItem = this.upgradeItem.bind(this);
|
20 |
+
}
|
21 |
+
|
22 |
+
// gets called when this route is navigated to
|
23 |
+
componentDidMount() {
|
24 |
+
fetch( ajaxurl + "?action=dlm_lu_get_download_queue&nonce="+window.dlm_lu_vars.nonce, {
|
25 |
+
method: 'GET',
|
26 |
+
credentials: 'include'
|
27 |
+
} ).then( ( r ) => {
|
28 |
+
if ( r.status == 200 ) {
|
29 |
+
return r.json();
|
30 |
+
}
|
31 |
+
|
32 |
+
throw "AJAX API OFFLINE";
|
33 |
+
} ).then( ( j ) => {
|
34 |
+
var items = [];
|
35 |
+
for ( var i = 0; i < j.length; i ++ ) {
|
36 |
+
items.push( {id: j[i], done: false} );
|
37 |
+
}
|
38 |
+
this.setState( {checked: true, items: items} );
|
39 |
+
return;
|
40 |
+
} ).catch( ( e ) => {
|
41 |
+
console.log( e );
|
42 |
+
return;
|
43 |
+
} );
|
44 |
+
}
|
45 |
+
|
46 |
+
// gets called just before navigating away from the route
|
47 |
+
componentWillUnmount() {
|
48 |
+
// todo clear queue
|
49 |
+
}
|
50 |
+
|
51 |
+
upgradeNext() {
|
52 |
+
var upgradeDone = true;
|
53 |
+
for( var i = 0; i < this.state.items.length; i++ ) {
|
54 |
+
if( this.state.items[i].done === false ) {
|
55 |
+
upgradeDone = false;
|
56 |
+
this.upgradeItem( this.state.items[i] );
|
57 |
+
break;
|
58 |
+
}
|
59 |
+
}
|
60 |
+
|
61 |
+
if( upgradeDone ) {
|
62 |
+
window.location.hash = "/content/"+this.state.items.length;
|
63 |
+
}
|
64 |
+
}
|
65 |
+
|
66 |
+
upgradeItem( item ) {
|
67 |
+
fetch( ajaxurl + "?action=dlm_lu_upgrade_download&download_id="+item.id+"&nonce="+window.dlm_lu_vars.nonce, {
|
68 |
+
method: 'GET',
|
69 |
+
credentials: 'include'
|
70 |
+
} ).then( ( r ) => {
|
71 |
+
if ( r.status == 200 ) {
|
72 |
+
return r.json();
|
73 |
+
}
|
74 |
+
|
75 |
+
throw "AJAX API OFFLINE";
|
76 |
+
} ).then( ( j ) => {
|
77 |
+
console.log( j );
|
78 |
+
item.done = true;
|
79 |
+
this.forceUpdate();
|
80 |
+
this.upgradeNext();
|
81 |
+
return;
|
82 |
+
} ).catch( ( e ) => {
|
83 |
+
console.log( e );
|
84 |
+
return;
|
85 |
+
} );
|
86 |
+
}
|
87 |
+
|
88 |
+
startUpgrade() {
|
89 |
+
// check if we're upgrading
|
90 |
+
if( this.state.upgrading ) {
|
91 |
+
return;
|
92 |
+
}
|
93 |
+
|
94 |
+
// set we're upgrading
|
95 |
+
this.setState( {upgrading: true} );
|
96 |
+
|
97 |
+
// upgrade next download
|
98 |
+
this.upgradeNext();
|
99 |
+
}
|
100 |
+
|
101 |
+
render() {
|
102 |
+
|
103 |
+
var loadingImg = window.dlm_lu_vars.assets_path + "loading.gif";
|
104 |
+
|
105 |
+
if ( this.state.checked == false ) {
|
106 |
+
return (
|
107 |
+
<div class={style.queue}>
|
108 |
+
<h2>Downloads Queue</h2>
|
109 |
+
<p>We're currently building the queue, please wait.</p>
|
110 |
+
</div>
|
111 |
+
);
|
112 |
+
}
|
113 |
+
|
114 |
+
if ( this.state.items.length == 0 ) {
|
115 |
+
return (
|
116 |
+
<div class={style.queue}>
|
117 |
+
<h2>Downloads Queue</h2>
|
118 |
+
<p>No Downloads found that require upgrading</p>
|
119 |
+
<Link to="/content/0" class="button button-primary button-large">Continue to Post/Page upgrade</Link>
|
120 |
+
</div>
|
121 |
+
);
|
122 |
+
}
|
123 |
+
|
124 |
+
return (
|
125 |
+
<div class={style.queue}>
|
126 |
+
<h2>Downloads Queue</h2>
|
127 |
+
|
128 |
+
{this.state.upgrading &&
|
129 |
+
<p class={style.upgrading_notice}><img src={loadingImg} />Currently upgrading your downloads, please wait...</p>
|
130 |
+
}
|
131 |
+
|
132 |
+
<p>The following legacy download ID's have been found that need upgrading:</p>
|
133 |
+
|
134 |
+
{this.state.items.length > 0 &&
|
135 |
+
<ul>
|
136 |
+
{this.state.items.map( ( o, i ) => <QueueItem item={o}/> )}
|
137 |
+
</ul>
|
138 |
+
}
|
139 |
+
|
140 |
+
<a href="javascript:;" class="button button-primary button-large" onClick={() => this.startUpgrade()}>Upgrade Downloads</a>
|
141 |
+
|
142 |
+
</div>
|
143 |
+
);
|
144 |
+
}
|
145 |
+
}
|
assets/js/legacy-upgrader/src/components/downloads/style.less
CHANGED
@@ -1,49 +1,49 @@
|
|
1 |
-
@import '~style/helpers';
|
2 |
-
|
3 |
-
.queue {
|
4 |
-
|
5 |
-
.upgrading_notice {
|
6 |
-
position: relative;
|
7 |
-
background: #419ccb;
|
8 |
-
color: #fff;
|
9 |
-
font-weight: bold;
|
10 |
-
padding: 10px 10px 10px 35px;
|
11 |
-
|
12 |
-
img {
|
13 |
-
display: block;
|
14 |
-
position: absolute;
|
15 |
-
left: 12px;
|
16 |
-
top: 12px;
|
17 |
-
width: 15px;
|
18 |
-
height: 15px;
|
19 |
-
z-index: 10;
|
20 |
-
}
|
21 |
-
}
|
22 |
-
|
23 |
-
ul {
|
24 |
-
width: 100%;
|
25 |
-
padding: 10px 0;
|
26 |
-
|
27 |
-
li {
|
28 |
-
display: inline-block;
|
29 |
-
width: 50%;
|
30 |
-
&:before {
|
31 |
-
.iconbefore("\f147");
|
32 |
-
font-size: 1.5em;
|
33 |
-
}
|
34 |
-
|
35 |
-
&.todo {
|
36 |
-
&:before {
|
37 |
-
color: black;
|
38 |
-
}
|
39 |
-
}
|
40 |
-
|
41 |
-
&.done {
|
42 |
-
&:before {
|
43 |
-
color: green;
|
44 |
-
}
|
45 |
-
}
|
46 |
-
}
|
47 |
-
|
48 |
-
}
|
49 |
-
}
|
1 |
+
@import '~style/helpers';
|
2 |
+
|
3 |
+
.queue {
|
4 |
+
|
5 |
+
.upgrading_notice {
|
6 |
+
position: relative;
|
7 |
+
background: #419ccb;
|
8 |
+
color: #fff;
|
9 |
+
font-weight: bold;
|
10 |
+
padding: 10px 10px 10px 35px;
|
11 |
+
|
12 |
+
img {
|
13 |
+
display: block;
|
14 |
+
position: absolute;
|
15 |
+
left: 12px;
|
16 |
+
top: 12px;
|
17 |
+
width: 15px;
|
18 |
+
height: 15px;
|
19 |
+
z-index: 10;
|
20 |
+
}
|
21 |
+
}
|
22 |
+
|
23 |
+
ul {
|
24 |
+
width: 100%;
|
25 |
+
padding: 10px 0;
|
26 |
+
|
27 |
+
li {
|
28 |
+
display: inline-block;
|
29 |
+
width: 50%;
|
30 |
+
&:before {
|
31 |
+
.iconbefore("\f147");
|
32 |
+
font-size: 1.5em;
|
33 |
+
}
|
34 |
+
|
35 |
+
&.todo {
|
36 |
+
&:before {
|
37 |
+
color: black;
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
&.done {
|
42 |
+
&:before {
|
43 |
+
color: green;
|
44 |
+
}
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
}
|
49 |
+
}
|
assets/js/legacy-upgrader/src/components/welcome/index.js
CHANGED
@@ -1,16 +1,16 @@
|
|
1 |
-
import { h, Component } from 'preact';
|
2 |
-
import { Link } from 'react-router-dom';
|
3 |
-
import style from './style.less';
|
4 |
-
|
5 |
-
export default class Welcome extends Component {
|
6 |
-
render() {
|
7 |
-
return (
|
8 |
-
<div class={style.welcome}>
|
9 |
-
<h2>Welcome</h2>
|
10 |
-
<p>Before upgrading your downloads, we'll first scan your database to find your legacy downloads. We will put all found legacy downloads in a queue which you can review before the actual upgrading begins.</p>
|
11 |
-
<p><strong>PLEASE NOTE: Although thoroughly tested, this process will modify and move your download data. Backup your database before you continue.</strong></p>
|
12 |
-
<p><Link to="/downloads" class="button button-primary button-large">I have backed up my database, let's go</Link></p>
|
13 |
-
</div>
|
14 |
-
);
|
15 |
-
}
|
16 |
-
}
|
1 |
+
import { h, Component } from 'preact';
|
2 |
+
import { Link } from 'react-router-dom';
|
3 |
+
import style from './style.less';
|
4 |
+
|
5 |
+
export default class Welcome extends Component {
|
6 |
+
render() {
|
7 |
+
return (
|
8 |
+
<div class={style.welcome}>
|
9 |
+
<h2>Welcome</h2>
|
10 |
+
<p>Before upgrading your downloads, we'll first scan your database to find your legacy downloads. We will put all found legacy downloads in a queue which you can review before the actual upgrading begins.</p>
|
11 |
+
<p><strong>PLEASE NOTE: Although thoroughly tested, this process will modify and move your download data. Backup your database before you continue.</strong></p>
|
12 |
+
<p><Link to="/downloads" class="button button-primary button-large">I have backed up my database, let's go</Link></p>
|
13 |
+
</div>
|
14 |
+
);
|
15 |
+
}
|
16 |
+
}
|
assets/js/legacy-upgrader/src/components/welcome/style.less
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
@import '~style/helpers';
|
2 |
-
|
3 |
-
.welcome {
|
4 |
-
|
5 |
-
}
|
1 |
+
@import '~style/helpers';
|
2 |
+
|
3 |
+
.welcome {
|
4 |
+
|
5 |
+
}
|
assets/js/legacy-upgrader/src/config.json
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
{
|
2 |
-
"key": "value"
|
3 |
-
}
|
1 |
+
{
|
2 |
+
"key": "value"
|
3 |
+
}
|
assets/js/legacy-upgrader/src/index.ejs
CHANGED
@@ -1,408 +1,408 @@
|
|
1 |
-
<!DOCTYPE html>
|
2 |
-
<!--[if IE 8]>
|
3 |
-
<html xmlns="http://www.w3.org/1999/xhtml" class="ie8 wp-toolbar" lang="en-US">
|
4 |
-
<![endif]-->
|
5 |
-
<!--[if !(IE 8) ]><!-->
|
6 |
-
<html xmlns="http://www.w3.org/1999/xhtml" class="wp-toolbar" lang="en-US">
|
7 |
-
<!--<![endif]-->
|
8 |
-
<head>
|
9 |
-
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
10 |
-
<title> ‹ Download Monitor — WordPress</title>
|
11 |
-
|
12 |
-
<script type="text/javascript">
|
13 |
-
addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
|
14 |
-
var ajaxurl = 'http://lnmp.dev/download-monitor/wp-admin/admin-ajax.php',
|
15 |
-
pagenow = 'admin_page_dlm_legacy_upgrade',
|
16 |
-
typenow = '',
|
17 |
-
adminpage = 'admin_page_dlm_legacy_upgrade',
|
18 |
-
thousandsSeparator = ',',
|
19 |
-
decimalPoint = '.',
|
20 |
-
isRtl = 0;
|
21 |
-
</script>
|
22 |
-
|
23 |
-
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
24 |
-
<link rel='dns-prefetch' href='//s.w.org' />
|
25 |
-
<style type="text/css">
|
26 |
-
img.wp-smiley,
|
27 |
-
img.emoji {
|
28 |
-
display: inline !important;
|
29 |
-
border: none !important;
|
30 |
-
box-shadow: none !important;
|
31 |
-
height: 1em !important;
|
32 |
-
width: 1em !important;
|
33 |
-
margin: 0 .07em !important;
|
34 |
-
vertical-align: -0.1em !important;
|
35 |
-
background: none !important;
|
36 |
-
padding: 0 !important;
|
37 |
-
}
|
38 |
-
</style>
|
39 |
-
<link rel='stylesheet' id='dashicons-css' href='http://lnmp.dev/download-monitor/wp-includes/css/dashicons.css?ver=4.9' type='text/css' media='all' />
|
40 |
-
<link rel='stylesheet' id='admin-bar-css' href='http://lnmp.dev/download-monitor/wp-includes/css/admin-bar.css?ver=4.9' type='text/css' media='all' />
|
41 |
-
<link rel='stylesheet' id='common-css' href='http://lnmp.dev/download-monitor/wp-admin/css/common.css?ver=4.9' type='text/css' media='all' />
|
42 |
-
<link rel='stylesheet' id='forms-css' href='http://lnmp.dev/download-monitor/wp-admin/css/forms.css?ver=4.9' type='text/css' media='all' />
|
43 |
-
<link rel='stylesheet' id='admin-menu-css' href='http://lnmp.dev/download-monitor/wp-admin/css/admin-menu.css?ver=4.9' type='text/css' media='all' />
|
44 |
-
<link rel='stylesheet' id='dashboard-css' href='http://lnmp.dev/download-monitor/wp-admin/css/dashboard.css?ver=4.9' type='text/css' media='all' />
|
45 |
-
<link rel='stylesheet' id='list-tables-css' href='http://lnmp.dev/download-monitor/wp-admin/css/list-tables.css?ver=4.9' type='text/css' media='all' />
|
46 |
-
<link rel='stylesheet' id='edit-css' href='http://lnmp.dev/download-monitor/wp-admin/css/edit.css?ver=4.9' type='text/css' media='all' />
|
47 |
-
<link rel='stylesheet' id='revisions-css' href='http://lnmp.dev/download-monitor/wp-admin/css/revisions.css?ver=4.9' type='text/css' media='all' />
|
48 |
-
<link rel='stylesheet' id='media-css' href='http://lnmp.dev/download-monitor/wp-admin/css/media.css?ver=4.9' type='text/css' media='all' />
|
49 |
-
<link rel='stylesheet' id='themes-css' href='http://lnmp.dev/download-monitor/wp-admin/css/themes.css?ver=4.9' type='text/css' media='all' />
|
50 |
-
<link rel='stylesheet' id='about-css' href='http://lnmp.dev/download-monitor/wp-admin/css/about.css?ver=4.9' type='text/css' media='all' />
|
51 |
-
<link rel='stylesheet' id='nav-menus-css' href='http://lnmp.dev/download-monitor/wp-admin/css/nav-menus.css?ver=4.9' type='text/css' media='all' />
|
52 |
-
<link rel='stylesheet' id='wp-pointer-css' href='http://lnmp.dev/download-monitor/wp-includes/css/wp-pointer.css?ver=4.9' type='text/css' media='all' />
|
53 |
-
<link rel='stylesheet' id='widgets-css' href='http://lnmp.dev/download-monitor/wp-admin/css/widgets.css?ver=4.9' type='text/css' media='all' />
|
54 |
-
<link rel='stylesheet' id='site-icon-css' href='http://lnmp.dev/download-monitor/wp-admin/css/site-icon.css?ver=4.9' type='text/css' media='all' />
|
55 |
-
<link rel='stylesheet' id='l10n-css' href='http://lnmp.dev/download-monitor/wp-admin/css/l10n.css?ver=4.9' type='text/css' media='all' />
|
56 |
-
<link rel='stylesheet' id='buttons-css' href='http://lnmp.dev/download-monitor/wp-includes/css/buttons.css?ver=4.9' type='text/css' media='all' />
|
57 |
-
<!--[if lte IE 7]>
|
58 |
-
<link rel='stylesheet' id='ie-css' href='http://lnmp.dev/download-monitor/wp-admin/css/ie.css?ver=4.9' type='text/css' media='all' />
|
59 |
-
<![endif]-->
|
60 |
-
<link rel='stylesheet' id='wp-auth-check-css' href='http://lnmp.dev/download-monitor/wp-includes/css/wp-auth-check.css?ver=4.9' type='text/css' media='all' />
|
61 |
-
<link rel='stylesheet' id='download_monitor_menu_css-css' href='http://lnmp.dev/download-monitor/wp-content/plugins/_download-monitor-new/assets/css/menu.css?ver=4.9' type='text/css' media='all' />
|
62 |
-
<script type="text/javascript">
|
63 |
-
window._wpemojiSettings = {"baseUrl":"https:\/\/s.w.org\/images\/core\/emoji\/2.3\/72x72\/","ext":".png","svgUrl":"https:\/\/s.w.org\/images\/core\/emoji\/2.3\/svg\/","svgExt":".svg","source":{"wpemoji":"http:\/\/lnmp.dev\/download-monitor\/wp-includes\/js\/wp-emoji.js?ver=4.9","twemoji":"http:\/\/lnmp.dev\/download-monitor\/wp-includes\/js\/twemoji.js?ver=4.9"}};
|
64 |
-
( function( window, document, settings ) {
|
65 |
-
var src, ready, ii, tests;
|
66 |
-
|
67 |
-
/*
|
68 |
-
* Create a canvas element for testing native browser support
|
69 |
-
* of emoji.
|
70 |
-
*/
|
71 |
-
var canvas = document.createElement( 'canvas' );
|
72 |
-
var context = canvas.getContext && canvas.getContext( '2d' );
|
73 |
-
|
74 |
-
/**
|
75 |
-
* Check if two sets of Emoji characters render the same.
|
76 |
-
*
|
77 |
-
* @param set1 array Set of Emoji characters.
|
78 |
-
* @param set2 array Set of Emoji characters.
|
79 |
-
* @returns {boolean} True if the two sets render the same.
|
80 |
-
*/
|
81 |
-
function emojiSetsRenderIdentically( set1, set2 ) {
|
82 |
-
var stringFromCharCode = String.fromCharCode;
|
83 |
-
|
84 |
-
// Cleanup from previous test.
|
85 |
-
context.clearRect( 0, 0, canvas.width, canvas.height );
|
86 |
-
context.fillText( stringFromCharCode.apply( this, set1 ), 0, 0 );
|
87 |
-
var rendered1 = canvas.toDataURL();
|
88 |
-
|
89 |
-
// Cleanup from previous test.
|
90 |
-
context.clearRect( 0, 0, canvas.width, canvas.height );
|
91 |
-
context.fillText( stringFromCharCode.apply( this, set2 ), 0, 0 );
|
92 |
-
var rendered2 = canvas.toDataURL();
|
93 |
-
|
94 |
-
return rendered1 === rendered2;
|
95 |
-
}
|
96 |
-
|
97 |
-
/**
|
98 |
-
* Detect if the browser supports rendering emoji or flag emoji. Flag emoji are a single glyph
|
99 |
-
* made of two characters, so some browsers (notably, Firefox OS X) don't support them.
|
100 |
-
*
|
101 |
-
* @since 4.2.0
|
102 |
-
*
|
103 |
-
* @param type {String} Whether to test for support of "flag" or "emoji".
|
104 |
-
* @return {Boolean} True if the browser can render emoji, false if it cannot.
|
105 |
-
*/
|
106 |
-
function browserSupportsEmoji( type ) {
|
107 |
-
var isIdentical;
|
108 |
-
|
109 |
-
if ( ! context || ! context.fillText ) {
|
110 |
-
return false;
|
111 |
-
}
|
112 |
-
|
113 |
-
/*
|
114 |
-
* Chrome on OS X added native emoji rendering in M41. Unfortunately,
|
115 |
-
* it doesn't work when the font is bolder than 500 weight. So, we
|
116 |
-
* check for bold rendering support to avoid invisible emoji in Chrome.
|
117 |
-
*/
|
118 |
-
context.textBaseline = 'top';
|
119 |
-
context.font = '600 32px Arial';
|
120 |
-
|
121 |
-
switch ( type ) {
|
122 |
-
case 'flag':
|
123 |
-
/*
|
124 |
-
* Test for UN flag compatibility. This is the least supported of the letter locale flags,
|
125 |
-
* so gives us an easy test for full support.
|
126 |
-
*
|
127 |
-
* To test for support, we try to render it, and compare the rendering to how it would look if
|
128 |
-
* the browser doesn't render it correctly ([U] + [N]).
|
129 |
-
*/
|
130 |
-
isIdentical = emojiSetsRenderIdentically(
|
131 |
-
[ 55356, 56826, 55356, 56819 ],
|
132 |
-
[ 55356, 56826, 8203, 55356, 56819 ]
|
133 |
-
);
|
134 |
-
|
135 |
-
if ( isIdentical ) {
|
136 |
-
return false;
|
137 |
-
}
|
138 |
-
|
139 |
-
/*
|
140 |
-
* Test for English flag compatibility. England is a country in the United Kingdom, it
|
141 |
-
* does not have a two letter locale code but rather an five letter sub-division code.
|
142 |
-
*
|
143 |
-
* To test for support, we try to render it, and compare the rendering to how it would look if
|
144 |
-
* the browser doesn't render it correctly (black flag emoji + [G] + [B] + [E] + [N] + [G]).
|
145 |
-
*/
|
146 |
-
isIdentical = emojiSetsRenderIdentically(
|
147 |
-
[ 55356, 57332, 56128, 56423, 56128, 56418, 56128, 56421, 56128, 56430, 56128, 56423, 56128, 56447 ],
|
148 |
-
[ 55356, 57332, 8203, 56128, 56423, 8203, 56128, 56418, 8203, 56128, 56421, 8203, 56128, 56430, 8203, 56128, 56423, 8203, 56128, 56447 ]
|
149 |
-
);
|
150 |
-
|
151 |
-
return ! isIdentical;
|
152 |
-
case 'emoji':
|
153 |
-
/*
|
154 |
-
* Emoji 5 has fairies of all genders.
|
155 |
-
*
|
156 |
-
* To test for support, try to render a new emoji (fairy, male), then compares
|
157 |
-
* it to how it would look if the browser doesn't render it correctly
|
158 |
-
* (fairy + male sign).
|
159 |
-
*/
|
160 |
-
isIdentical = emojiSetsRenderIdentically(
|
161 |
-
[ 55358, 56794, 8205, 9794, 65039 ],
|
162 |
-
[ 55358, 56794, 8203, 9794, 65039 ]
|
163 |
-
);
|
164 |
-
return ! isIdentical;
|
165 |
-
}
|
166 |
-
|
167 |
-
return false;
|
168 |
-
}
|
169 |
-
|
170 |
-
function addScript( src ) {
|
171 |
-
var script = document.createElement( 'script' );
|
172 |
-
|
173 |
-
script.src = src;
|
174 |
-
script.defer = script.type = 'text/javascript';
|
175 |
-
document.getElementsByTagName( 'head' )[0].appendChild( script );
|
176 |
-
}
|
177 |
-
|
178 |
-
tests = Array( 'flag', 'emoji' );
|
179 |
-
|
180 |
-
settings.supports = {
|
181 |
-
everything: true,
|
182 |
-
everythingExceptFlag: true
|
183 |
-
};
|
184 |
-
|
185 |
-
for( ii = 0; ii < tests.length; ii++ ) {
|
186 |
-
settings.supports[ tests[ ii ] ] = browserSupportsEmoji( tests[ ii ] );
|
187 |
-
|
188 |
-
settings.supports.everything = settings.supports.everything && settings.supports[ tests[ ii ] ];
|
189 |
-
|
190 |
-
if ( 'flag' !== tests[ ii ] ) {
|
191 |
-
settings.supports.everythingExceptFlag = settings.supports.everythingExceptFlag && settings.supports[ tests[ ii ] ];
|
192 |
-
}
|
193 |
-
}
|
194 |
-
|
195 |
-
settings.supports.everythingExceptFlag = settings.supports.everythingExceptFlag && ! settings.supports.flag;
|
196 |
-
|
197 |
-
settings.DOMReady = false;
|
198 |
-
settings.readyCallback = function() {
|
199 |
-
settings.DOMReady = true;
|
200 |
-
};
|
201 |
-
|
202 |
-
if ( ! settings.supports.everything ) {
|
203 |
-
ready = function() {
|
204 |
-
settings.readyCallback();
|
205 |
-
};
|
206 |
-
|
207 |
-
if ( document.addEventListener ) {
|
208 |
-
document.addEventListener( 'DOMContentLoaded', ready, false );
|
209 |
-
window.addEventListener( 'load', ready, false );
|
210 |
-
} else {
|
211 |
-
window.attachEvent( 'onload', ready );
|
212 |
-
document.attachEvent( 'onreadystatechange', function() {
|
213 |
-
if ( 'complete' === document.readyState ) {
|
214 |
-
settings.readyCallback();
|
215 |
-
}
|
216 |
-
} );
|
217 |
-
}
|
218 |
-
|
219 |
-
src = settings.source || {};
|
220 |
-
|
221 |
-
if ( src.concatemoji ) {
|
222 |
-
addScript( src.concatemoji );
|
223 |
-
} else if ( src.wpemoji && src.twemoji ) {
|
224 |
-
addScript( src.twemoji );
|
225 |
-
addScript( src.wpemoji );
|
226 |
-
}
|
227 |
-
}
|
228 |
-
|
229 |
-
} )( window, document, window._wpemojiSettings );
|
230 |
-
</script>
|
231 |
-
<script type='text/javascript' src='http://lnmp.dev/download-monitor/wp-includes/js/jquery/jquery.js?ver=1.12.4'></script>
|
232 |
-
<script type='text/javascript' src='http://lnmp.dev/download-monitor/wp-includes/js/jquery/jquery-migrate.js?ver=1.4.1'></script>
|
233 |
-
<script type='text/javascript'>
|
234 |
-
/* <![CDATA[ */
|
235 |
-
var userSettings = {"url":"\/download-monitor\/","uid":"1","time":"1511968878","secure":""};
|
236 |
-
/* ]]> */
|
237 |
-
</script>
|
238 |
-
<script type='text/javascript' src='http://lnmp.dev/download-monitor/wp-includes/js/utils.js?ver=4.9'></script>
|
239 |
-
<script type='text/javascript'>
|
240 |
-
/* <![CDATA[ */
|
241 |
-
var dlm_id_strings = {"insert_download":"Insert Download"};
|
242 |
-
/* ]]> */
|
243 |
-
</script>
|
244 |
-
<script type='text/javascript' src='http://lnmp.dev/download-monitor/wp-content/plugins/_download-monitor-new/assets/js/insert-download.js?ver=4.0.0'></script>
|
245 |
-
<script type='text/javascript' src='http://lnmp.dev/download-monitor/wp-content/plugins/_download-monitor-new/assets/js/notices.js?ver=4.0.0'></script>
|
246 |
-
<link id="wp-admin-canonical" rel="canonical" href="http://lnmp.dev/download-monitor/wp-admin/options.php?page=dlm_legacy_upgrade" />
|
247 |
-
<script>
|
248 |
-
if ( window.history.replaceState ) {
|
249 |
-
window.history.replaceState( null, null, document.getElementById( 'wp-admin-canonical' ).href + window.location.hash );
|
250 |
-
}
|
251 |
-
</script>
|
252 |
-
<script type="text/javascript">var _wpColorScheme = {"icons":{"base":"#82878c","focus":"#00a0d2","current":"#fff"}};</script>
|
253 |
-
<style type="text/css" media="print">#wpadminbar { display:none; }</style>
|
254 |
-
</head>
|
255 |
-
<body class="wp-admin wp-core-ui no-js admin_page_dlm_legacy_upgrade auto-fold admin-bar branch-4-9 version-4-9 admin-color-fresh locale-en-us no-customize-support no-svg">
|
256 |
-
<script type="text/javascript">
|
257 |
-
document.body.className = document.body.className.replace('no-js','js');
|
258 |
-
</script>
|
259 |
-
|
260 |
-
<!--[if lte IE 8]>
|
261 |
-
<script type="text/javascript">
|
262 |
-
document.body.className = document.body.className.replace( /(^|\s)(no-)?customize-support(?=\s|$)/, '' ) + ' no-customize-support';
|
263 |
-
</script>
|
264 |
-
<![endif]-->
|
265 |
-
<!--[if gte IE 9]><!-->
|
266 |
-
<script type="text/javascript">
|
267 |
-
(function() {
|
268 |
-
var request, b = document.body, c = 'className', cs = 'customize-support', rcs = new RegExp('(^|\\s+)(no-)?'+cs+'(\\s+|$)');
|
269 |
-
|
270 |
-
request = true;
|
271 |
-
|
272 |
-
b[c] = b[c].replace( rcs, ' ' );
|
273 |
-
// The customizer requires postMessage and CORS (if the site is cross domain)
|
274 |
-
b[c] += ( window.postMessage && request ? ' ' : ' no-' ) + cs;
|
275 |
-
}());
|
276 |
-
</script>
|
277 |
-
<!--<![endif]-->
|
278 |
-
|
279 |
-
<div id="wpwrap">
|
280 |
-
|
281 |
-
<div id="adminmenumain" role="navigation" aria-label="Main menu">
|
282 |
-
<a href="#wpbody-content" class="screen-reader-shortcut">Skip to main content</a>
|
283 |
-
<a href="#wp-toolbar" class="screen-reader-shortcut">Skip to toolbar</a>
|
284 |
-
<div id="adminmenuback"></div>
|
285 |
-
<div id="adminmenuwrap">
|
286 |
-
<ul id="adminmenu">
|
287 |
-
|
288 |
-
|
289 |
-
<li class="wp-first-item wp-has-submenu wp-not-current-submenu menu-top menu-top-first menu-icon-dashboard menu-top-last" id="menu-dashboard">
|
290 |
-
<a href='index.php' class="wp-first-item wp-has-submenu wp-not-current-submenu menu-top menu-top-first menu-icon-dashboard menu-top-last" aria-haspopup="true"><div class="wp-menu-arrow"><div></div></div><div class='wp-menu-image dashicons-before dashicons-dashboard'><br /></div><div class='wp-menu-name'>Dashboard</div></a>
|
291 |
-
<ul class='wp-submenu wp-submenu-wrap'><li class='wp-submenu-head' aria-hidden='true'>Dashboard</li><li class="wp-first-item"><a href='index.php' class="wp-first-item">Home</a></li><li><a href='update-core.php'>Updates <span class='update-plugins count-5'><span class='update-count'>5</span></span></a></li></ul></li>
|
292 |
-
<li class="wp-not-current-submenu wp-menu-separator" aria-hidden="true"><div class="separator"></div></li>
|
293 |
-
<li class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-post open-if-no-js menu-top-first" id="menu-posts">
|
294 |
-
<a href='edit.php' class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-post open-if-no-js menu-top-first" aria-haspopup="true"><div class="wp-menu-arrow"><div></div></div><div class='wp-menu-image dashicons-before dashicons-admin-post'><br /></div><div class='wp-menu-name'>Posts</div></a>
|
295 |
-
<ul class='wp-submenu wp-submenu-wrap'><li class='wp-submenu-head' aria-hidden='true'>Posts</li><li class="wp-first-item"><a href='edit.php' class="wp-first-item">All Posts</a></li><li><a href='post-new.php'>Add New</a></li><li><a href='edit-tags.php?taxonomy=category'>Categories</a></li><li><a href='edit-tags.php?taxonomy=post_tag'>Tags</a></li></ul></li>
|
296 |
-
<li class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-media" id="menu-media">
|
297 |
-
<a href='upload.php' class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-media" aria-haspopup="true"><div class="wp-menu-arrow"><div></div></div><div class='wp-menu-image dashicons-before dashicons-admin-media'><br /></div><div class='wp-menu-name'>Media</div></a>
|
298 |
-
<ul class='wp-submenu wp-submenu-wrap'><li class='wp-submenu-head' aria-hidden='true'>Media</li><li class="wp-first-item"><a href='upload.php' class="wp-first-item">Library</a></li><li><a href='media-new.php'>Add New</a></li></ul></li>
|
299 |
-
<li class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-page" id="menu-pages">
|
300 |
-
<a href='edit.php?post_type=page' class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-page" aria-haspopup="true"><div class="wp-menu-arrow"><div></div></div><div class='wp-menu-image dashicons-before dashicons-admin-page'><br /></div><div class='wp-menu-name'>Pages</div></a>
|
301 |
-
<ul class='wp-submenu wp-submenu-wrap'><li class='wp-submenu-head' aria-hidden='true'>Pages</li><li class="wp-first-item"><a href='edit.php?post_type=page' class="wp-first-item">All Pages</a></li><li><a href='post-new.php?post_type=page'>Add New</a></li></ul></li>
|
302 |
-
<li class="wp-not-current-submenu menu-top menu-icon-comments" id="menu-comments">
|
303 |
-
<a href='edit-comments.php' class="wp-not-current-submenu menu-top menu-icon-comments" ><div class="wp-menu-arrow"><div></div></div><div class='wp-menu-image dashicons-before dashicons-admin-comments'><br /></div><div class='wp-menu-name'>Comments <span class="awaiting-mod count-0"><span class="pending-count">0</span></span></div></a></li>
|
304 |
-
<li class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-dlm_download menu-top-last" id="menu-posts-dlm_download">
|
305 |
-
<a href='edit.php?post_type=dlm_download' class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-dlm_download menu-top-last" aria-haspopup="true"><div class="wp-menu-arrow"><div></div></div><div class='wp-menu-image dashicons-before dashicons-admin-post'><br /></div><div class='wp-menu-name'>Downloads</div></a>
|
306 |
-
<ul class='wp-submenu wp-submenu-wrap'><li class='wp-submenu-head' aria-hidden='true'>Downloads</li><li class="wp-first-item"><a href='edit.php?post_type=dlm_download' class="wp-first-item">All Downloads</a></li><li><a href='post-new.php?post_type=dlm_download'>Add New</a></li><li><a href='edit-tags.php?taxonomy=dlm_download_category&post_type=dlm_download'>Categories</a></li><li><a href='edit-tags.php?taxonomy=dlm_download_tag&post_type=dlm_download'>Tags</a></li><li><a href='edit.php?post_type=dlm_download&page=download-monitor-settings'>Settings</a></li><li><a href='edit.php?post_type=dlm_download&page=download-monitor-logs'>Logs</a></li><li><a href='edit.php?post_type=dlm_download&page=download-monitor-reports'>Reports</a></li><li><a href='edit.php?post_type=dlm_download&page=dlm-extensions'><span style="color:#419CCB;font-weight:bold;">Extensions</span></a></li></ul></li>
|
307 |
-
<li class="wp-not-current-submenu wp-menu-separator" aria-hidden="true"><div class="separator"></div></li>
|
308 |
-
<li class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-appearance menu-top-first" id="menu-appearance">
|
309 |
-
<a href='themes.php' class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-appearance menu-top-first" aria-haspopup="true"><div class="wp-menu-arrow"><div></div></div><div class='wp-menu-image dashicons-before dashicons-admin-appearance'><br /></div><div class='wp-menu-name'>Appearance</div></a>
|
310 |
-
<ul class='wp-submenu wp-submenu-wrap'><li class='wp-submenu-head' aria-hidden='true'>Appearance</li><li class="wp-first-item"><a href='themes.php' class="wp-first-item">Themes</a></li><li class="hide-if-no-customize"><a href='customize.php?return=%2Fdownload-monitor%2Fwp-admin%2Foptions.php%3Fpage%3Ddlm_legacy_upgrade' class="hide-if-no-customize">Customize</a></li><li><a href='widgets.php'>Widgets</a></li><li><a href='nav-menus.php'>Menus</a></li><li class="hide-if-no-customize"><a href='customize.php?return=%2Fdownload-monitor%2Fwp-admin%2Foptions.php%3Fpage%3Ddlm_legacy_upgrade&autofocus%5Bcontrol%5D=header_image' class="hide-if-no-customize">Header</a></li><li class="hide-if-no-customize"><a href='customize.php?return=%2Fdownload-monitor%2Fwp-admin%2Foptions.php%3Fpage%3Ddlm_legacy_upgrade&autofocus%5Bcontrol%5D=background_image' class="hide-if-no-customize">Background</a></li><li><a href='themes.php?page=custom-header'>Header</a></li><li><a href='themes.php?page=custom-background'>Background</a></li><li><a href='theme-editor.php'>Editor</a></li></ul></li>
|
311 |
-
<li class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-plugins" id="menu-plugins">
|
312 |
-
<a href='plugins.php' class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-plugins" aria-haspopup="true"><div class="wp-menu-arrow"><div></div></div><div class='wp-menu-image dashicons-before dashicons-admin-plugins'><br /></div><div class='wp-menu-name'>Plugins <span class='update-plugins count-0'><span class='plugin-count'>0</span></span></div></a>
|
313 |
-
<ul class='wp-submenu wp-submenu-wrap'><li class='wp-submenu-head' aria-hidden='true'>Plugins <span class='update-plugins count-0'><span class='plugin-count'>0</span></span></li><li class="wp-first-item"><a href='plugins.php' class="wp-first-item">Installed Plugins</a></li><li><a href='plugin-install.php'>Add New</a></li><li><a href='plugin-editor.php'>Editor</a></li></ul></li>
|
314 |
-
<li class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-users" id="menu-users">
|
315 |
-
<a href='users.php' class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-users" aria-haspopup="true"><div class="wp-menu-arrow"><div></div></div><div class='wp-menu-image dashicons-before dashicons-admin-users'><br /></div><div class='wp-menu-name'>Users</div></a>
|
316 |
-
<ul class='wp-submenu wp-submenu-wrap'><li class='wp-submenu-head' aria-hidden='true'>Users</li><li class="wp-first-item"><a href='users.php' class="wp-first-item">All Users</a></li><li><a href='user-new.php'>Add New</a></li><li><a href='profile.php'>Your Profile</a></li></ul></li>
|
317 |
-
<li class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-tools" id="menu-tools">
|
318 |
-
<a href='tools.php' class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-tools" aria-haspopup="true"><div class="wp-menu-arrow"><div></div></div><div class='wp-menu-image dashicons-before dashicons-admin-tools'><br /></div><div class='wp-menu-name'>Tools</div></a>
|
319 |
-
<ul class='wp-submenu wp-submenu-wrap'><li class='wp-submenu-head' aria-hidden='true'>Tools</li><li class="wp-first-item"><a href='tools.php' class="wp-first-item">Available Tools</a></li><li><a href='import.php'>Import</a></li><li><a href='export.php'>Export</a></li></ul></li>
|
320 |
-
<li class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-settings menu-top-last" id="menu-settings">
|
321 |
-
<a href='options-general.php' class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-settings menu-top-last" aria-haspopup="true"><div class="wp-menu-arrow"><div></div></div><div class='wp-menu-image dashicons-before dashicons-admin-settings'><br /></div><div class='wp-menu-name'>Settings</div></a>
|
322 |
-
<ul class='wp-submenu wp-submenu-wrap'><li class='wp-submenu-head' aria-hidden='true'>Settings</li><li class="wp-first-item"><a href='options-general.php' class="wp-first-item">General</a></li><li><a href='options-writing.php'>Writing</a></li><li><a href='options-reading.php'>Reading</a></li><li><a href='options-discussion.php'>Discussion</a></li><li><a href='options-media.php'>Media</a></li><li><a href='options-permalink.php'>Permalinks</a></li></ul></li><li id="collapse-menu" class="hide-if-no-js"><button type="button" id="collapse-button" aria-label="Collapse Main menu" aria-expanded="true"><span class="collapse-button-icon" aria-hidden="true"></span><span class="collapse-button-label">Collapse menu</span></button></li></ul>
|
323 |
-
</div>
|
324 |
-
</div>
|
325 |
-
<div id="wpcontent">
|
326 |
-
|
327 |
-
<div id="wpadminbar" class="nojq nojs">
|
328 |
-
<div class="quicklinks" id="wp-toolbar" role="navigation" aria-label="Toolbar" tabindex="0">
|
329 |
-
<ul id="wp-admin-bar-root-default" class="ab-top-menu">
|
330 |
-
<li id="wp-admin-bar-menu-toggle"><a class="ab-item" href="#"><span class="ab-icon"></span><span class="screen-reader-text">Menu</span></a> </li>
|
331 |
-
<li id="wp-admin-bar-wp-logo" class="menupop"><a class="ab-item" aria-haspopup="true" href="http://lnmp.dev/download-monitor/wp-admin/about.php"><span class="ab-icon"></span><span class="screen-reader-text">About WordPress</span></a><div class="ab-sub-wrapper"><ul id="wp-admin-bar-wp-logo-default" class="ab-submenu">
|
332 |
-
<li id="wp-admin-bar-about"><a class="ab-item" href="http://lnmp.dev/download-monitor/wp-admin/about.php">About WordPress</a> </li></ul><ul id="wp-admin-bar-wp-logo-external" class="ab-sub-secondary ab-submenu">
|
333 |
-
<li id="wp-admin-bar-wporg"><a class="ab-item" href="https://wordpress.org/">WordPress.org</a> </li>
|
334 |
-
<li id="wp-admin-bar-documentation"><a class="ab-item" href="https://codex.wordpress.org/">Documentation</a> </li>
|
335 |
-
<li id="wp-admin-bar-support-forums"><a class="ab-item" href="https://wordpress.org/support/">Support Forums</a> </li>
|
336 |
-
<li id="wp-admin-bar-feedback"><a class="ab-item" href="https://wordpress.org/support/forum/requests-and-feedback">Feedback</a> </li></ul></div> </li>
|
337 |
-
<li id="wp-admin-bar-site-name" class="menupop"><a class="ab-item" aria-haspopup="true" href="http://lnmp.dev/download-monitor/">Download Monitor</a><div class="ab-sub-wrapper"><ul id="wp-admin-bar-site-name-default" class="ab-submenu">
|
338 |
-
<li id="wp-admin-bar-view-site"><a class="ab-item" href="http://lnmp.dev/download-monitor/">Visit Site</a> </li></ul></div> </li>
|
339 |
-
<li id="wp-admin-bar-updates"><a class="ab-item" href="http://lnmp.dev/download-monitor/wp-admin/update-core.php" title="4 Theme Updates, Translation Updates"><span class="ab-icon"></span><span class="ab-label">5</span><span class="screen-reader-text">4 Theme Updates, Translation Updates</span></a> </li>
|
340 |
-
<li id="wp-admin-bar-comments"><a class="ab-item" href="http://lnmp.dev/download-monitor/wp-admin/edit-comments.php"><span class="ab-icon"></span><span class="ab-label awaiting-mod pending-count count-0" aria-hidden="true">0</span><span class="screen-reader-text">0 comments awaiting moderation</span></a> </li>
|
341 |
-
<li id="wp-admin-bar-new-content" class="menupop"><a class="ab-item" aria-haspopup="true" href="http://lnmp.dev/download-monitor/wp-admin/post-new.php"><span class="ab-icon"></span><span class="ab-label">New</span></a><div class="ab-sub-wrapper"><ul id="wp-admin-bar-new-content-default" class="ab-submenu">
|
342 |
-
<li id="wp-admin-bar-new-post"><a class="ab-item" href="http://lnmp.dev/download-monitor/wp-admin/post-new.php">Post</a> </li>
|
343 |
-
<li id="wp-admin-bar-new-media"><a class="ab-item" href="http://lnmp.dev/download-monitor/wp-admin/media-new.php">Media</a> </li>
|
344 |
-
<li id="wp-admin-bar-new-page"><a class="ab-item" href="http://lnmp.dev/download-monitor/wp-admin/post-new.php?post_type=page">Page</a> </li>
|
345 |
-
<li id="wp-admin-bar-new-dlm_download"><a class="ab-item" href="http://lnmp.dev/download-monitor/wp-admin/post-new.php?post_type=dlm_download">Download</a> </li>
|
346 |
-
<li id="wp-admin-bar-new-user"><a class="ab-item" href="http://lnmp.dev/download-monitor/wp-admin/user-new.php">User</a> </li></ul></div> </li></ul><ul id="wp-admin-bar-top-secondary" class="ab-top-secondary ab-top-menu">
|
347 |
-
<li id="wp-admin-bar-my-account" class="menupop with-avatar"><a class="ab-item" aria-haspopup="true" href="http://lnmp.dev/download-monitor/wp-admin/profile.php">Howdy, <span class="display-name">admin</span><img alt='' src='http://2.gravatar.com/avatar/e16646b416e72c193d5f23b1790343ef?s=26&d=mm&r=g' srcset='http://2.gravatar.com/avatar/e16646b416e72c193d5f23b1790343ef?s=52&d=mm&r=g 2x' class='avatar avatar-26 photo' height='26' width='26' /></a><div class="ab-sub-wrapper"><ul id="wp-admin-bar-user-actions" class="ab-submenu">
|
348 |
-
<li id="wp-admin-bar-user-info"><a class="ab-item" tabindex="-1" href="http://lnmp.dev/download-monitor/wp-admin/profile.php"><img alt='' src='http://2.gravatar.com/avatar/e16646b416e72c193d5f23b1790343ef?s=64&d=mm&r=g' srcset='http://2.gravatar.com/avatar/e16646b416e72c193d5f23b1790343ef?s=128&d=mm&r=g 2x' class='avatar avatar-64 photo' height='64' width='64' /><span class='display-name'>admin</span></a> </li>
|
349 |
-
<li id="wp-admin-bar-edit-profile"><a class="ab-item" href="http://lnmp.dev/download-monitor/wp-admin/profile.php">Edit My Profile</a> </li>
|
350 |
-
<li id="wp-admin-bar-logout"><a class="ab-item" href="http://lnmp.dev/download-monitor/wp-login.php?action=logout&_wpnonce=73db673a22">Log Out</a> </li></ul></div> </li></ul> </div>
|
351 |
-
<a class="screen-reader-shortcut" href="http://lnmp.dev/download-monitor/wp-login.php?action=logout&_wpnonce=73db673a22">Log Out</a>
|
352 |
-
</div>
|
353 |
-
|
354 |
-
|
355 |
-
<div id="wpbody" role="main">
|
356 |
-
|
357 |
-
<div id="wpbody-content" aria-label="Main content" tabindex="0">
|
358 |
-
<div id="screen-meta" class="metabox-prefs">
|
359 |
-
|
360 |
-
<div id="contextual-help-wrap" class="hidden no-sidebar" tabindex="-1" aria-label="Contextual Help Tab">
|
361 |
-
<div id="contextual-help-back"></div>
|
362 |
-
<div id="contextual-help-columns">
|
363 |
-
<div class="contextual-help-tabs">
|
364 |
-
<ul>
|
365 |
-
</ul>
|
366 |
-
</div>
|
367 |
-
|
368 |
-
|
369 |
-
<div class="contextual-help-tabs-wrap">
|
370 |
-
</div>
|
371 |
-
</div>
|
372 |
-
</div>
|
373 |
-
</div>
|
374 |
-
<div class="wrap">
|
375 |
-
<h1>Download Monitor - Legacy Upgrade</h1><br/>
|
376 |
-
<p>Welcome to the Download Monitor Legacy Upgrader. On this page we will upgrade your old Download Monitor (legacy) data so it will work with the latest version. If you're on this page, it should mean that you updated to this version from Download Monitor <strong>3.x</strong>. If you're unsure if this is correct, or you want to read more about the legacy upgrade, we've setup a page that will explain this process in a lot more detail. <a href='https://www.download-monitor.com/kb/legacy-upgrade' target='_blank'>Click here</a> if to view that page.</p>
|
377 |
-
|
378 |
-
<div id="dlm-legacy-upgrade-container" style="position:relative;"></div>
|
379 |
-
</div>
|
380 |
-
|
381 |
-
<div class="clear"></div></div><!-- wpbody-content -->
|
382 |
-
<div class="clear"></div></div><!-- wpbody -->
|
383 |
-
<div class="clear"></div></div><!-- wpcontent -->
|
384 |
-
|
385 |
-
<div id="wpfooter" role="contentinfo">
|
386 |
-
<p id="footer-left" class="alignleft">
|
387 |
-
<span id="footer-thankyou">Thank you for creating with <a href="https://wordpress.org/">WordPress</a>.</span> </p>
|
388 |
-
<p id="footer-upgrade" class="alignright">
|
389 |
-
Version 4.9 </p>
|
390 |
-
<div class="clear"></div>
|
391 |
-
</div>
|
392 |
-
<div id="wp-auth-check-wrap" class="hidden">
|
393 |
-
<div id="wp-auth-check-bg"></div>
|
394 |
-
<div id="wp-auth-check">
|
395 |
-
<button type="button" class="wp-auth-check-close button-link"><span class="screen-reader-text">Close dialog</span></button>
|
396 |
-
<div id="wp-auth-check-form" class="loading" data-src="http://lnmp.dev/download-monitor/wp-login.php?interim-login=1&wp_lang=en_US"></div>
|
397 |
-
<div class="wp-auth-fallback">
|
398 |
-
<p><b class="wp-auth-fallback-expired" tabindex="0">Session expired</b></p>
|
399 |
-
<p><a href="http://lnmp.dev/download-monitor/wp-login.php" target="_blank">Please log in again.</a>
|
400 |
-
The login page will open in a new window. After logging in you can close it and return to this page.</p>
|
401 |
-
</div>
|
402 |
-
</div>
|
403 |
-
</div>
|
404 |
-
|
405 |
-
|
406 |
-
<div class="clear"></div></div><!-- wpwrap -->
|
407 |
-
</body>
|
408 |
-
</html>
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<!--[if IE 8]>
|
3 |
+
<html xmlns="http://www.w3.org/1999/xhtml" class="ie8 wp-toolbar" lang="en-US">
|
4 |
+
<![endif]-->
|
5 |
+
<!--[if !(IE 8) ]><!-->
|
6 |
+
<html xmlns="http://www.w3.org/1999/xhtml" class="wp-toolbar" lang="en-US">
|
7 |
+
<!--<![endif]-->
|
8 |
+
<head>
|
9 |
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
10 |
+
<title> ‹ Download Monitor — WordPress</title>
|
11 |
+
|
12 |
+
<script type="text/javascript">
|
13 |
+
addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
|
14 |
+
var ajaxurl = 'http://lnmp.dev/download-monitor/wp-admin/admin-ajax.php',
|
15 |
+
pagenow = 'admin_page_dlm_legacy_upgrade',
|
16 |
+
typenow = '',
|
17 |
+
adminpage = 'admin_page_dlm_legacy_upgrade',
|
18 |
+
thousandsSeparator = ',',
|
19 |
+
decimalPoint = '.',
|
20 |
+
isRtl = 0;
|
21 |
+
</script>
|
22 |
+
|
23 |
+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
24 |
+
<link rel='dns-prefetch' href='//s.w.org' />
|
25 |
+
<style type="text/css">
|
26 |
+
img.wp-smiley,
|
27 |
+
img.emoji {
|
28 |
+
display: inline !important;
|
29 |
+
border: none !important;
|
30 |
+
box-shadow: none !important;
|
31 |
+
height: 1em !important;
|
32 |
+
width: 1em !important;
|
33 |
+
margin: 0 .07em !important;
|
34 |
+
vertical-align: -0.1em !important;
|
35 |
+
background: none !important;
|
36 |
+
padding: 0 !important;
|
37 |
+
}
|
38 |
+
</style>
|
39 |
+
<link rel='stylesheet' id='dashicons-css' href='http://lnmp.dev/download-monitor/wp-includes/css/dashicons.css?ver=4.9' type='text/css' media='all' />
|
40 |
+
<link rel='stylesheet' id='admin-bar-css' href='http://lnmp.dev/download-monitor/wp-includes/css/admin-bar.css?ver=4.9' type='text/css' media='all' />
|
41 |
+
<link rel='stylesheet' id='common-css' href='http://lnmp.dev/download-monitor/wp-admin/css/common.css?ver=4.9' type='text/css' media='all' />
|
42 |
+
<link rel='stylesheet' id='forms-css' href='http://lnmp.dev/download-monitor/wp-admin/css/forms.css?ver=4.9' type='text/css' media='all' />
|
43 |
+
<link rel='stylesheet' id='admin-menu-css' href='http://lnmp.dev/download-monitor/wp-admin/css/admin-menu.css?ver=4.9' type='text/css' media='all' />
|
44 |
+
<link rel='stylesheet' id='dashboard-css' href='http://lnmp.dev/download-monitor/wp-admin/css/dashboard.css?ver=4.9' type='text/css' media='all' />
|
45 |
+
<link rel='stylesheet' id='list-tables-css' href='http://lnmp.dev/download-monitor/wp-admin/css/list-tables.css?ver=4.9' type='text/css' media='all' />
|
46 |
+
<link rel='stylesheet' id='edit-css' href='http://lnmp.dev/download-monitor/wp-admin/css/edit.css?ver=4.9' type='text/css' media='all' />
|
47 |
+
<link rel='stylesheet' id='revisions-css' href='http://lnmp.dev/download-monitor/wp-admin/css/revisions.css?ver=4.9' type='text/css' media='all' />
|
48 |
+
<link rel='stylesheet' id='media-css' href='http://lnmp.dev/download-monitor/wp-admin/css/media.css?ver=4.9' type='text/css' media='all' />
|
49 |
+
<link rel='stylesheet' id='themes-css' href='http://lnmp.dev/download-monitor/wp-admin/css/themes.css?ver=4.9' type='text/css' media='all' />
|
50 |
+
<link rel='stylesheet' id='about-css' href='http://lnmp.dev/download-monitor/wp-admin/css/about.css?ver=4.9' type='text/css' media='all' />
|
51 |
+
<link rel='stylesheet' id='nav-menus-css' href='http://lnmp.dev/download-monitor/wp-admin/css/nav-menus.css?ver=4.9' type='text/css' media='all' />
|
52 |
+
<link rel='stylesheet' id='wp-pointer-css' href='http://lnmp.dev/download-monitor/wp-includes/css/wp-pointer.css?ver=4.9' type='text/css' media='all' />
|
53 |
+
<link rel='stylesheet' id='widgets-css' href='http://lnmp.dev/download-monitor/wp-admin/css/widgets.css?ver=4.9' type='text/css' media='all' />
|
54 |
+
<link rel='stylesheet' id='site-icon-css' href='http://lnmp.dev/download-monitor/wp-admin/css/site-icon.css?ver=4.9' type='text/css' media='all' />
|
55 |
+
<link rel='stylesheet' id='l10n-css' href='http://lnmp.dev/download-monitor/wp-admin/css/l10n.css?ver=4.9' type='text/css' media='all' />
|
56 |
+
<link rel='stylesheet' id='buttons-css' href='http://lnmp.dev/download-monitor/wp-includes/css/buttons.css?ver=4.9' type='text/css' media='all' />
|
57 |
+
<!--[if lte IE 7]>
|
58 |
+
<link rel='stylesheet' id='ie-css' href='http://lnmp.dev/download-monitor/wp-admin/css/ie.css?ver=4.9' type='text/css' media='all' />
|
59 |
+
<![endif]-->
|
60 |
+
<link rel='stylesheet' id='wp-auth-check-css' href='http://lnmp.dev/download-monitor/wp-includes/css/wp-auth-check.css?ver=4.9' type='text/css' media='all' />
|
61 |
+
<link rel='stylesheet' id='download_monitor_menu_css-css' href='http://lnmp.dev/download-monitor/wp-content/plugins/_download-monitor-new/assets/css/menu.css?ver=4.9' type='text/css' media='all' />
|
62 |
+
<script type="text/javascript">
|
63 |
+
window._wpemojiSettings = {"baseUrl":"https:\/\/s.w.org\/images\/core\/emoji\/2.3\/72x72\/","ext":".png","svgUrl":"https:\/\/s.w.org\/images\/core\/emoji\/2.3\/svg\/","svgExt":".svg","source":{"wpemoji":"http:\/\/lnmp.dev\/download-monitor\/wp-includes\/js\/wp-emoji.js?ver=4.9","twemoji":"http:\/\/lnmp.dev\/download-monitor\/wp-includes\/js\/twemoji.js?ver=4.9"}};
|
64 |
+
( function( window, document, settings ) {
|
65 |
+
var src, ready, ii, tests;
|
66 |
+
|
67 |
+
/*
|
68 |
+
* Create a canvas element for testing native browser support
|
69 |
+
* of emoji.
|
70 |
+
*/
|
71 |
+
var canvas = document.createElement( 'canvas' );
|
72 |
+
var context = canvas.getContext && canvas.getContext( '2d' );
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Check if two sets of Emoji characters render the same.
|
76 |
+
*
|
77 |
+
* @param set1 array Set of Emoji characters.
|
78 |
+
* @param set2 array Set of Emoji characters.
|
79 |
+
* @returns {boolean} True if the two sets render the same.
|
80 |
+
*/
|
81 |
+
function emojiSetsRenderIdentically( set1, set2 ) {
|
82 |
+
var stringFromCharCode = String.fromCharCode;
|
83 |
+
|
84 |
+
// Cleanup from previous test.
|
85 |
+
context.clearRect( 0, 0, canvas.width, canvas.height );
|
86 |
+
context.fillText( stringFromCharCode.apply( this, set1 ), 0, 0 );
|
87 |
+
var rendered1 = canvas.toDataURL();
|
88 |
+
|
89 |
+
// Cleanup from previous test.
|
90 |
+
context.clearRect( 0, 0, canvas.width, canvas.height );
|
91 |
+
context.fillText( stringFromCharCode.apply( this, set2 ), 0, 0 );
|
92 |
+
var rendered2 = canvas.toDataURL();
|
93 |
+
|
94 |
+
return rendered1 === rendered2;
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Detect if the browser supports rendering emoji or flag emoji. Flag emoji are a single glyph
|
99 |
+
* made of two characters, so some browsers (notably, Firefox OS X) don't support them.
|
100 |
+
*
|
101 |
+
* @since 4.2.0
|
102 |
+
*
|
103 |
+
* @param type {String} Whether to test for support of "flag" or "emoji".
|
104 |
+
* @return {Boolean} True if the browser can render emoji, false if it cannot.
|
105 |
+
*/
|
106 |
+
function browserSupportsEmoji( type ) {
|
107 |
+
var isIdentical;
|
108 |
+
|
109 |
+
if ( ! context || ! context.fillText ) {
|
110 |
+
return false;
|
111 |
+
}
|
112 |
+
|
113 |
+
/*
|
114 |
+
* Chrome on OS X added native emoji rendering in M41. Unfortunately,
|
115 |
+
* it doesn't work when the font is bolder than 500 weight. So, we
|
116 |
+
* check for bold rendering support to avoid invisible emoji in Chrome.
|
117 |
+
*/
|
118 |
+
context.textBaseline = 'top';
|
119 |
+
context.font = '600 32px Arial';
|
120 |
+
|
121 |
+
switch ( type ) {
|
122 |
+
case 'flag':
|
123 |
+
/*
|
124 |
+
* Test for UN flag compatibility. This is the least supported of the letter locale flags,
|
125 |
+
* so gives us an easy test for full support.
|
126 |
+
*
|
127 |
+
* To test for support, we try to render it, and compare the rendering to how it would look if
|
128 |
+
* the browser doesn't render it correctly ([U] + [N]).
|
129 |
+
*/
|
130 |
+
isIdentical = emojiSetsRenderIdentically(
|
131 |
+
[ 55356, 56826, 55356, 56819 ],
|
132 |
+
[ 55356, 56826, 8203, 55356, 56819 ]
|
133 |
+
);
|
134 |
+
|
135 |
+
if ( isIdentical ) {
|
136 |
+
return false;
|
137 |
+
}
|
138 |
+
|
139 |
+
/*
|
140 |
+
* Test for English flag compatibility. England is a country in the United Kingdom, it
|
141 |
+
* does not have a two letter locale code but rather an five letter sub-division code.
|
142 |
+
*
|
143 |
+
* To test for support, we try to render it, and compare the rendering to how it would look if
|
144 |
+
* the browser doesn't render it correctly (black flag emoji + [G] + [B] + [E] + [N] + [G]).
|
145 |
+
*/
|
146 |
+
isIdentical = emojiSetsRenderIdentically(
|
147 |
+
[ 55356, 57332, 56128, 56423, 56128, 56418, 56128, 56421, 56128, 56430, 56128, 56423, 56128, 56447 ],
|
148 |
+
[ 55356, 57332, 8203, 56128, 56423, 8203, 56128, 56418, 8203, 56128, 56421, 8203, 56128, 56430, 8203, 56128, 56423, 8203, 56128, 56447 ]
|
149 |
+
);
|
150 |
+
|
151 |
+
return ! isIdentical;
|
152 |
+
case 'emoji':
|
153 |
+
/*
|
154 |
+
* Emoji 5 has fairies of all genders.
|
155 |
+
*
|
156 |
+
* To test for support, try to render a new emoji (fairy, male), then compares
|
157 |
+
* it to how it would look if the browser doesn't render it correctly
|
158 |
+
* (fairy + male sign).
|
159 |
+
*/
|
160 |
+
isIdentical = emojiSetsRenderIdentically(
|
161 |
+
[ 55358, 56794, 8205, 9794, 65039 ],
|
162 |
+
[ 55358, 56794, 8203, 9794, 65039 ]
|
163 |
+
);
|
164 |
+
return ! isIdentical;
|
165 |
+
}
|
166 |
+
|
167 |
+
return false;
|
168 |
+
}
|
169 |
+
|
170 |
+
function addScript( src ) {
|
171 |
+
var script = document.createElement( 'script' );
|
172 |
+
|
173 |
+
script.src = src;
|
174 |
+
script.defer = script.type = 'text/javascript';
|
175 |
+
document.getElementsByTagName( 'head' )[0].appendChild( script );
|
176 |
+
}
|
177 |
+
|
178 |
+
tests = Array( 'flag', 'emoji' );
|
179 |
+
|
180 |
+
settings.supports = {
|
181 |
+
everything: true,
|
182 |
+
everythingExceptFlag: true
|
183 |
+
};
|
184 |
+
|
185 |
+
for( ii = 0; ii < tests.length; ii++ ) {
|
186 |
+
settings.supports[ tests[ ii ] ] = browserSupportsEmoji( tests[ ii ] );
|
187 |
+
|
188 |
+
settings.supports.everything = settings.supports.everything && settings.supports[ tests[ ii ] ];
|
189 |
+
|
190 |
+
if ( 'flag' !== tests[ ii ] ) {
|
191 |
+
settings.supports.everythingExceptFlag = settings.supports.everythingExceptFlag && settings.supports[ tests[ ii ] ];
|
192 |
+
}
|
193 |
+
}
|
194 |
+
|
195 |
+
settings.supports.everythingExceptFlag = settings.supports.everythingExceptFlag && ! settings.supports.flag;
|
196 |
+
|
197 |
+
settings.DOMReady = false;
|
198 |
+
settings.readyCallback = function() {
|
199 |
+
settings.DOMReady = true;
|
200 |
+
};
|
201 |
+
|
202 |
+
if ( ! settings.supports.everything ) {
|
203 |
+
ready = function() {
|
204 |
+
settings.readyCallback();
|
205 |
+
};
|
206 |
+
|
207 |
+
if ( document.addEventListener ) {
|
208 |
+
document.addEventListener( 'DOMContentLoaded', ready, false );
|
209 |
+
window.addEventListener( 'load', ready, false );
|
210 |
+
} else {
|
211 |
+
window.attachEvent( 'onload', ready );
|
212 |
+
document.attachEvent( 'onreadystatechange', function() {
|
213 |
+
if ( 'complete' === document.readyState ) {
|
214 |
+
settings.readyCallback();
|
215 |
+
}
|
216 |
+
} );
|
217 |
+
}
|
218 |
+
|
219 |
+
src = settings.source || {};
|
220 |
+
|
221 |
+
if ( src.concatemoji ) {
|
222 |
+
addScript( src.concatemoji );
|
223 |
+
} else if ( src.wpemoji && src.twemoji ) {
|
224 |
+
addScript( src.twemoji );
|
225 |
+
addScript( src.wpemoji );
|
226 |
+
}
|
227 |
+
}
|
228 |
+
|
229 |
+
} )( window, document, window._wpemojiSettings );
|
230 |
+
</script>
|
231 |
+
<script type='text/javascript' src='http://lnmp.dev/download-monitor/wp-includes/js/jquery/jquery.js?ver=1.12.4'></script>
|
232 |
+
<script type='text/javascript' src='http://lnmp.dev/download-monitor/wp-includes/js/jquery/jquery-migrate.js?ver=1.4.1'></script>
|
233 |
+
<script type='text/javascript'>
|
234 |
+
/* <![CDATA[ */
|
235 |
+
var userSettings = {"url":"\/download-monitor\/","uid":"1","time":"1511968878","secure":""};
|
236 |
+
/* ]]> */
|
237 |
+
</script>
|
238 |
+
<script type='text/javascript' src='http://lnmp.dev/download-monitor/wp-includes/js/utils.js?ver=4.9'></script>
|
239 |
+
<script type='text/javascript'>
|
240 |
+
/* <![CDATA[ */
|
241 |
+
var dlm_id_strings = {"insert_download":"Insert Download"};
|
242 |
+
/* ]]> */
|
243 |
+
</script>
|
244 |
+
<script type='text/javascript' src='http://lnmp.dev/download-monitor/wp-content/plugins/_download-monitor-new/assets/js/insert-download.js?ver=4.0.0'></script>
|
245 |
+
<script type='text/javascript' src='http://lnmp.dev/download-monitor/wp-content/plugins/_download-monitor-new/assets/js/notices.js?ver=4.0.0'></script>
|
246 |
+
<link id="wp-admin-canonical" rel="canonical" href="http://lnmp.dev/download-monitor/wp-admin/options.php?page=dlm_legacy_upgrade" />
|
247 |
+
<script>
|
248 |
+
if ( window.history.replaceState ) {
|
249 |
+
window.history.replaceState( null, null, document.getElementById( 'wp-admin-canonical' ).href + window.location.hash );
|
250 |
+
}
|
251 |
+
</script>
|
252 |
+
<script type="text/javascript">var _wpColorScheme = {"icons":{"base":"#82878c","focus":"#00a0d2","current":"#fff"}};</script>
|
253 |
+
<style type="text/css" media="print">#wpadminbar { display:none; }</style>
|
254 |
+
</head>
|
255 |
+
<body class="wp-admin wp-core-ui no-js admin_page_dlm_legacy_upgrade auto-fold admin-bar branch-4-9 version-4-9 admin-color-fresh locale-en-us no-customize-support no-svg">
|
256 |
+
<script type="text/javascript">
|
257 |
+
document.body.className = document.body.className.replace('no-js','js');
|
258 |
+
</script>
|
259 |
+
|
260 |
+
<!--[if lte IE 8]>
|
261 |
+
<script type="text/javascript">
|
262 |
+
document.body.className = document.body.className.replace( /(^|\s)(no-)?customize-support(?=\s|$)/, '' ) + ' no-customize-support';
|
263 |
+
</script>
|
264 |
+
<![endif]-->
|
265 |
+
<!--[if gte IE 9]><!-->
|
266 |
+
<script type="text/javascript">
|
267 |
+
(function() {
|
268 |
+
var request, b = document.body, c = 'className', cs = 'customize-support', rcs = new RegExp('(^|\\s+)(no-)?'+cs+'(\\s+|$)');
|
269 |
+
|
270 |
+
request = true;
|
271 |
+
|
272 |
+
b[c] = b[c].replace( rcs, ' ' );
|
273 |
+
// The customizer requires postMessage and CORS (if the site is cross domain)
|
274 |
+
b[c] += ( window.postMessage && request ? ' ' : ' no-' ) + cs;
|
275 |
+
}());
|
276 |
+
</script>
|
277 |
+
<!--<![endif]-->
|
278 |
+
|
279 |
+
<div id="wpwrap">
|
280 |
+
|
281 |
+
<div id="adminmenumain" role="navigation" aria-label="Main menu">
|
282 |
+
<a href="#wpbody-content" class="screen-reader-shortcut">Skip to main content</a>
|
283 |
+
<a href="#wp-toolbar" class="screen-reader-shortcut">Skip to toolbar</a>
|
284 |
+
<div id="adminmenuback"></div>
|
285 |
+
<div id="adminmenuwrap">
|
286 |
+
<ul id="adminmenu">
|
287 |
+
|
288 |
+
|
289 |
+
<li class="wp-first-item wp-has-submenu wp-not-current-submenu menu-top menu-top-first menu-icon-dashboard menu-top-last" id="menu-dashboard">
|
290 |
+
<a href='index.php' class="wp-first-item wp-has-submenu wp-not-current-submenu menu-top menu-top-first menu-icon-dashboard menu-top-last" aria-haspopup="true"><div class="wp-menu-arrow"><div></div></div><div class='wp-menu-image dashicons-before dashicons-dashboard'><br /></div><div class='wp-menu-name'>Dashboard</div></a>
|
291 |
+
<ul class='wp-submenu wp-submenu-wrap'><li class='wp-submenu-head' aria-hidden='true'>Dashboard</li><li class="wp-first-item"><a href='index.php' class="wp-first-item">Home</a></li><li><a href='update-core.php'>Updates <span class='update-plugins count-5'><span class='update-count'>5</span></span></a></li></ul></li>
|
292 |
+
<li class="wp-not-current-submenu wp-menu-separator" aria-hidden="true"><div class="separator"></div></li>
|
293 |
+
<li class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-post open-if-no-js menu-top-first" id="menu-posts">
|
294 |
+
<a href='edit.php' class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-post open-if-no-js menu-top-first" aria-haspopup="true"><div class="wp-menu-arrow"><div></div></div><div class='wp-menu-image dashicons-before dashicons-admin-post'><br /></div><div class='wp-menu-name'>Posts</div></a>
|
295 |
+
<ul class='wp-submenu wp-submenu-wrap'><li class='wp-submenu-head' aria-hidden='true'>Posts</li><li class="wp-first-item"><a href='edit.php' class="wp-first-item">All Posts</a></li><li><a href='post-new.php'>Add New</a></li><li><a href='edit-tags.php?taxonomy=category'>Categories</a></li><li><a href='edit-tags.php?taxonomy=post_tag'>Tags</a></li></ul></li>
|
296 |
+
<li class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-media" id="menu-media">
|
297 |
+
<a href='upload.php' class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-media" aria-haspopup="true"><div class="wp-menu-arrow"><div></div></div><div class='wp-menu-image dashicons-before dashicons-admin-media'><br /></div><div class='wp-menu-name'>Media</div></a>
|
298 |
+
<ul class='wp-submenu wp-submenu-wrap'><li class='wp-submenu-head' aria-hidden='true'>Media</li><li class="wp-first-item"><a href='upload.php' class="wp-first-item">Library</a></li><li><a href='media-new.php'>Add New</a></li></ul></li>
|
299 |
+
<li class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-page" id="menu-pages">
|
300 |
+
<a href='edit.php?post_type=page' class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-page" aria-haspopup="true"><div class="wp-menu-arrow"><div></div></div><div class='wp-menu-image dashicons-before dashicons-admin-page'><br /></div><div class='wp-menu-name'>Pages</div></a>
|
301 |
+
<ul class='wp-submenu wp-submenu-wrap'><li class='wp-submenu-head' aria-hidden='true'>Pages</li><li class="wp-first-item"><a href='edit.php?post_type=page' class="wp-first-item">All Pages</a></li><li><a href='post-new.php?post_type=page'>Add New</a></li></ul></li>
|
302 |
+
<li class="wp-not-current-submenu menu-top menu-icon-comments" id="menu-comments">
|
303 |
+
<a href='edit-comments.php' class="wp-not-current-submenu menu-top menu-icon-comments" ><div class="wp-menu-arrow"><div></div></div><div class='wp-menu-image dashicons-before dashicons-admin-comments'><br /></div><div class='wp-menu-name'>Comments <span class="awaiting-mod count-0"><span class="pending-count">0</span></span></div></a></li>
|
304 |
+
<li class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-dlm_download menu-top-last" id="menu-posts-dlm_download">
|
305 |
+
<a href='edit.php?post_type=dlm_download' class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-dlm_download menu-top-last" aria-haspopup="true"><div class="wp-menu-arrow"><div></div></div><div class='wp-menu-image dashicons-before dashicons-admin-post'><br /></div><div class='wp-menu-name'>Downloads</div></a>
|
306 |
+
<ul class='wp-submenu wp-submenu-wrap'><li class='wp-submenu-head' aria-hidden='true'>Downloads</li><li class="wp-first-item"><a href='edit.php?post_type=dlm_download' class="wp-first-item">All Downloads</a></li><li><a href='post-new.php?post_type=dlm_download'>Add New</a></li><li><a href='edit-tags.php?taxonomy=dlm_download_category&post_type=dlm_download'>Categories</a></li><li><a href='edit-tags.php?taxonomy=dlm_download_tag&post_type=dlm_download'>Tags</a></li><li><a href='edit.php?post_type=dlm_download&page=download-monitor-settings'>Settings</a></li><li><a href='edit.php?post_type=dlm_download&page=download-monitor-logs'>Logs</a></li><li><a href='edit.php?post_type=dlm_download&page=download-monitor-reports'>Reports</a></li><li><a href='edit.php?post_type=dlm_download&page=dlm-extensions'><span style="color:#419CCB;font-weight:bold;">Extensions</span></a></li></ul></li>
|
307 |
+
<li class="wp-not-current-submenu wp-menu-separator" aria-hidden="true"><div class="separator"></div></li>
|
308 |
+
<li class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-appearance menu-top-first" id="menu-appearance">
|
309 |
+
<a href='themes.php' class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-appearance menu-top-first" aria-haspopup="true"><div class="wp-menu-arrow"><div></div></div><div class='wp-menu-image dashicons-before dashicons-admin-appearance'><br /></div><div class='wp-menu-name'>Appearance</div></a>
|
310 |
+
<ul class='wp-submenu wp-submenu-wrap'><li class='wp-submenu-head' aria-hidden='true'>Appearance</li><li class="wp-first-item"><a href='themes.php' class="wp-first-item">Themes</a></li><li class="hide-if-no-customize"><a href='customize.php?return=%2Fdownload-monitor%2Fwp-admin%2Foptions.php%3Fpage%3Ddlm_legacy_upgrade' class="hide-if-no-customize">Customize</a></li><li><a href='widgets.php'>Widgets</a></li><li><a href='nav-menus.php'>Menus</a></li><li class="hide-if-no-customize"><a href='customize.php?return=%2Fdownload-monitor%2Fwp-admin%2Foptions.php%3Fpage%3Ddlm_legacy_upgrade&autofocus%5Bcontrol%5D=header_image' class="hide-if-no-customize">Header</a></li><li class="hide-if-no-customize"><a href='customize.php?return=%2Fdownload-monitor%2Fwp-admin%2Foptions.php%3Fpage%3Ddlm_legacy_upgrade&autofocus%5Bcontrol%5D=background_image' class="hide-if-no-customize">Background</a></li><li><a href='themes.php?page=custom-header'>Header</a></li><li><a href='themes.php?page=custom-background'>Background</a></li><li><a href='theme-editor.php'>Editor</a></li></ul></li>
|
311 |
+
<li class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-plugins" id="menu-plugins">
|
312 |
+
<a href='plugins.php' class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-plugins" aria-haspopup="true"><div class="wp-menu-arrow"><div></div></div><div class='wp-menu-image dashicons-before dashicons-admin-plugins'><br /></div><div class='wp-menu-name'>Plugins <span class='update-plugins count-0'><span class='plugin-count'>0</span></span></div></a>
|
313 |
+
<ul class='wp-submenu wp-submenu-wrap'><li class='wp-submenu-head' aria-hidden='true'>Plugins <span class='update-plugins count-0'><span class='plugin-count'>0</span></span></li><li class="wp-first-item"><a href='plugins.php' class="wp-first-item">Installed Plugins</a></li><li><a href='plugin-install.php'>Add New</a></li><li><a href='plugin-editor.php'>Editor</a></li></ul></li>
|
314 |
+
<li class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-users" id="menu-users">
|
315 |
+
<a href='users.php' class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-users" aria-haspopup="true"><div class="wp-menu-arrow"><div></div></div><div class='wp-menu-image dashicons-before dashicons-admin-users'><br /></div><div class='wp-menu-name'>Users</div></a>
|
316 |
+
<ul class='wp-submenu wp-submenu-wrap'><li class='wp-submenu-head' aria-hidden='true'>Users</li><li class="wp-first-item"><a href='users.php' class="wp-first-item">All Users</a></li><li><a href='user-new.php'>Add New</a></li><li><a href='profile.php'>Your Profile</a></li></ul></li>
|
317 |
+
<li class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-tools" id="menu-tools">
|
318 |
+
<a href='tools.php' class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-tools" aria-haspopup="true"><div class="wp-menu-arrow"><div></div></div><div class='wp-menu-image dashicons-before dashicons-admin-tools'><br /></div><div class='wp-menu-name'>Tools</div></a>
|
319 |
+
<ul class='wp-submenu wp-submenu-wrap'><li class='wp-submenu-head' aria-hidden='true'>Tools</li><li class="wp-first-item"><a href='tools.php' class="wp-first-item">Available Tools</a></li><li><a href='import.php'>Import</a></li><li><a href='export.php'>Export</a></li></ul></li>
|
320 |
+
<li class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-settings menu-top-last" id="menu-settings">
|
321 |
+
<a href='options-general.php' class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-settings menu-top-last" aria-haspopup="true"><div class="wp-menu-arrow"><div></div></div><div class='wp-menu-image dashicons-before dashicons-admin-settings'><br /></div><div class='wp-menu-name'>Settings</div></a>
|
322 |
+
<ul class='wp-submenu wp-submenu-wrap'><li class='wp-submenu-head' aria-hidden='true'>Settings</li><li class="wp-first-item"><a href='options-general.php' class="wp-first-item">General</a></li><li><a href='options-writing.php'>Writing</a></li><li><a href='options-reading.php'>Reading</a></li><li><a href='options-discussion.php'>Discussion</a></li><li><a href='options-media.php'>Media</a></li><li><a href='options-permalink.php'>Permalinks</a></li></ul></li><li id="collapse-menu" class="hide-if-no-js"><button type="button" id="collapse-button" aria-label="Collapse Main menu" aria-expanded="true"><span class="collapse-button-icon" aria-hidden="true"></span><span class="collapse-button-label">Collapse menu</span></button></li></ul>
|
323 |
+
</div>
|
324 |
+
</div>
|
325 |
+
<div id="wpcontent">
|
326 |
+
|
327 |
+
<div id="wpadminbar" class="nojq nojs">
|
328 |
+
<div class="quicklinks" id="wp-toolbar" role="navigation" aria-label="Toolbar" tabindex="0">
|
329 |
+
<ul id="wp-admin-bar-root-default" class="ab-top-menu">
|
330 |
+
<li id="wp-admin-bar-menu-toggle"><a class="ab-item" href="#"><span class="ab-icon"></span><span class="screen-reader-text">Menu</span></a> </li>
|
331 |
+
<li id="wp-admin-bar-wp-logo" class="menupop"><a class="ab-item" aria-haspopup="true" href="http://lnmp.dev/download-monitor/wp-admin/about.php"><span class="ab-icon"></span><span class="screen-reader-text">About WordPress</span></a><div class="ab-sub-wrapper"><ul id="wp-admin-bar-wp-logo-default" class="ab-submenu">
|
332 |
+
<li id="wp-admin-bar-about"><a class="ab-item" href="http://lnmp.dev/download-monitor/wp-admin/about.php">About WordPress</a> </li></ul><ul id="wp-admin-bar-wp-logo-external" class="ab-sub-secondary ab-submenu">
|
333 |
+
<li id="wp-admin-bar-wporg"><a class="ab-item" href="https://wordpress.org/">WordPress.org</a> </li>
|
334 |
+
<li id="wp-admin-bar-documentation"><a class="ab-item" href="https://codex.wordpress.org/">Documentation</a> </li>
|
335 |
+
<li id="wp-admin-bar-support-forums"><a class="ab-item" href="https://wordpress.org/support/">Support Forums</a> </li>
|
336 |
+
<li id="wp-admin-bar-feedback"><a class="ab-item" href="https://wordpress.org/support/forum/requests-and-feedback">Feedback</a> </li></ul></div> </li>
|
337 |
+
<li id="wp-admin-bar-site-name" class="menupop"><a class="ab-item" aria-haspopup="true" href="http://lnmp.dev/download-monitor/">Download Monitor</a><div class="ab-sub-wrapper"><ul id="wp-admin-bar-site-name-default" class="ab-submenu">
|
338 |
+
<li id="wp-admin-bar-view-site"><a class="ab-item" href="http://lnmp.dev/download-monitor/">Visit Site</a> </li></ul></div> </li>
|
339 |
+
<li id="wp-admin-bar-updates"><a class="ab-item" href="http://lnmp.dev/download-monitor/wp-admin/update-core.php" title="4 Theme Updates, Translation Updates"><span class="ab-icon"></span><span class="ab-label">5</span><span class="screen-reader-text">4 Theme Updates, Translation Updates</span></a> </li>
|
340 |
+
<li id="wp-admin-bar-comments"><a class="ab-item" href="http://lnmp.dev/download-monitor/wp-admin/edit-comments.php"><span class="ab-icon"></span><span class="ab-label awaiting-mod pending-count count-0" aria-hidden="true">0</span><span class="screen-reader-text">0 comments awaiting moderation</span></a> </li>
|
341 |
+
<li id="wp-admin-bar-new-content" class="menupop"><a class="ab-item" aria-haspopup="true" href="http://lnmp.dev/download-monitor/wp-admin/post-new.php"><span class="ab-icon"></span><span class="ab-label">New</span></a><div class="ab-sub-wrapper"><ul id="wp-admin-bar-new-content-default" class="ab-submenu">
|
342 |
+
<li id="wp-admin-bar-new-post"><a class="ab-item" href="http://lnmp.dev/download-monitor/wp-admin/post-new.php">Post</a> </li>
|
343 |
+
<li id="wp-admin-bar-new-media"><a class="ab-item" href="http://lnmp.dev/download-monitor/wp-admin/media-new.php">Media</a> </li>
|
344 |
+
<li id="wp-admin-bar-new-page"><a class="ab-item" href="http://lnmp.dev/download-monitor/wp-admin/post-new.php?post_type=page">Page</a> </li>
|
345 |
+
<li id="wp-admin-bar-new-dlm_download"><a class="ab-item" href="http://lnmp.dev/download-monitor/wp-admin/post-new.php?post_type=dlm_download">Download</a> </li>
|
346 |
+
<li id="wp-admin-bar-new-user"><a class="ab-item" href="http://lnmp.dev/download-monitor/wp-admin/user-new.php">User</a> </li></ul></div> </li></ul><ul id="wp-admin-bar-top-secondary" class="ab-top-secondary ab-top-menu">
|
347 |
+
<li id="wp-admin-bar-my-account" class="menupop with-avatar"><a class="ab-item" aria-haspopup="true" href="http://lnmp.dev/download-monitor/wp-admin/profile.php">Howdy, <span class="display-name">admin</span><img alt='' src='http://2.gravatar.com/avatar/e16646b416e72c193d5f23b1790343ef?s=26&d=mm&r=g' srcset='http://2.gravatar.com/avatar/e16646b416e72c193d5f23b1790343ef?s=52&d=mm&r=g 2x' class='avatar avatar-26 photo' height='26' width='26' /></a><div class="ab-sub-wrapper"><ul id="wp-admin-bar-user-actions" class="ab-submenu">
|
348 |
+
<li id="wp-admin-bar-user-info"><a class="ab-item" tabindex="-1" href="http://lnmp.dev/download-monitor/wp-admin/profile.php"><img alt='' src='http://2.gravatar.com/avatar/e16646b416e72c193d5f23b1790343ef?s=64&d=mm&r=g' srcset='http://2.gravatar.com/avatar/e16646b416e72c193d5f23b1790343ef?s=128&d=mm&r=g 2x' class='avatar avatar-64 photo' height='64' width='64' /><span class='display-name'>admin</span></a> </li>
|
349 |
+
<li id="wp-admin-bar-edit-profile"><a class="ab-item" href="http://lnmp.dev/download-monitor/wp-admin/profile.php">Edit My Profile</a> </li>
|
350 |
+
<li id="wp-admin-bar-logout"><a class="ab-item" href="http://lnmp.dev/download-monitor/wp-login.php?action=logout&_wpnonce=73db673a22">Log Out</a> </li></ul></div> </li></ul> </div>
|
351 |
+
<a class="screen-reader-shortcut" href="http://lnmp.dev/download-monitor/wp-login.php?action=logout&_wpnonce=73db673a22">Log Out</a>
|
352 |
+
</div>
|
353 |
+
|
354 |
+
|
355 |
+
<div id="wpbody" role="main">
|
356 |
+
|
357 |
+
<div id="wpbody-content" aria-label="Main content" tabindex="0">
|
358 |
+
<div id="screen-meta" class="metabox-prefs">
|
359 |
+
|
360 |
+
<div id="contextual-help-wrap" class="hidden no-sidebar" tabindex="-1" aria-label="Contextual Help Tab">
|
361 |
+
<div id="contextual-help-back"></div>
|
362 |
+
<div id="contextual-help-columns">
|
363 |
+
<div class="contextual-help-tabs">
|
364 |
+
<ul>
|
365 |
+
</ul>
|
366 |
+
</div>
|
367 |
+
|
368 |
+
|
369 |
+
<div class="contextual-help-tabs-wrap">
|
370 |
+
</div>
|
371 |
+
</div>
|
372 |
+
</div>
|
373 |
+
</div>
|
374 |
+
<div class="wrap">
|
375 |
+
<h1>Download Monitor - Legacy Upgrade</h1><br/>
|
376 |
+
<p>Welcome to the Download Monitor Legacy Upgrader. On this page we will upgrade your old Download Monitor (legacy) data so it will work with the latest version. If you're on this page, it should mean that you updated to this version from Download Monitor <strong>3.x</strong>. If you're unsure if this is correct, or you want to read more about the legacy upgrade, we've setup a page that will explain this process in a lot more detail. <a href='https://www.download-monitor.com/kb/legacy-upgrade' target='_blank'>Click here</a> if to view that page.</p>
|
377 |
+
|
378 |
+
<div id="dlm-legacy-upgrade-container" style="position:relative;"></div>
|
379 |
+
</div>
|
380 |
+
|
381 |
+
<div class="clear"></div></div><!-- wpbody-content -->
|
382 |
+
<div class="clear"></div></div><!-- wpbody -->
|
383 |
+
<div class="clear"></div></div><!-- wpcontent -->
|
384 |
+
|
385 |
+
<div id="wpfooter" role="contentinfo">
|
386 |
+
<p id="footer-left" class="alignleft">
|
387 |
+
<span id="footer-thankyou">Thank you for creating with <a href="https://wordpress.org/">WordPress</a>.</span> </p>
|
388 |
+
<p id="footer-upgrade" class="alignright">
|
389 |
+
Version 4.9 </p>
|
390 |
+
<div class="clear"></div>
|
391 |
+
</div>
|
392 |
+
<div id="wp-auth-check-wrap" class="hidden">
|
393 |
+
<div id="wp-auth-check-bg"></div>
|
394 |
+
<div id="wp-auth-check">
|
395 |
+
<button type="button" class="wp-auth-check-close button-link"><span class="screen-reader-text">Close dialog</span></button>
|
396 |
+
<div id="wp-auth-check-form" class="loading" data-src="http://lnmp.dev/download-monitor/wp-login.php?interim-login=1&wp_lang=en_US"></div>
|
397 |
+
<div class="wp-auth-fallback">
|
398 |
+
<p><b class="wp-auth-fallback-expired" tabindex="0">Session expired</b></p>
|
399 |
+
<p><a href="http://lnmp.dev/download-monitor/wp-login.php" target="_blank">Please log in again.</a>
|
400 |
+
The login page will open in a new window. After logging in you can close it and return to this page.</p>
|
401 |
+
</div>
|
402 |
+
</div>
|
403 |
+
</div>
|
404 |
+
|
405 |
+
|
406 |
+
<div class="clear"></div></div><!-- wpwrap -->
|
407 |
+
</body>
|
408 |
+
</html>
|
assets/js/legacy-upgrader/src/index.js
CHANGED
@@ -1,20 +1,20 @@
|
|
1 |
-
// import 'promise-polyfill';
|
2 |
-
// import 'isomorphic-fetch';
|
3 |
-
import { h, render } from 'preact';
|
4 |
-
import './style';
|
5 |
-
|
6 |
-
let root;
|
7 |
-
function DLM_LU_init() {
|
8 |
-
let App = require('./components/app').default;
|
9 |
-
root = render(<App />, document.getElementById("dlm-legacy-upgrade-container"), root);
|
10 |
-
}
|
11 |
-
|
12 |
-
// in development, set up HMR:
|
13 |
-
if (module.hot) {
|
14 |
-
//require('preact/devtools'); // turn this on if you want to enable React DevTools!
|
15 |
-
module.hot.accept('./components/app', () => requestAnimationFrame(init) );
|
16 |
-
}
|
17 |
-
|
18 |
-
document.addEventListener("DOMContentLoaded", function(event) {
|
19 |
-
DLM_LU_init();
|
20 |
-
});
|
1 |
+
// import 'promise-polyfill';
|
2 |
+
// import 'isomorphic-fetch';
|
3 |
+
import { h, render } from 'preact';
|
4 |
+
import './style';
|
5 |
+
|
6 |
+
let root;
|
7 |
+
function DLM_LU_init() {
|
8 |
+
let App = require('./components/app').default;
|
9 |
+
root = render(<App />, document.getElementById("dlm-legacy-upgrade-container"), root);
|
10 |
+
}
|
11 |
+
|
12 |
+
// in development, set up HMR:
|
13 |
+
if (module.hot) {
|
14 |
+
//require('preact/devtools'); // turn this on if you want to enable React DevTools!
|
15 |
+
module.hot.accept('./components/app', () => requestAnimationFrame(init) );
|
16 |
+
}
|
17 |
+
|
18 |
+
document.addEventListener("DOMContentLoaded", function(event) {
|
19 |
+
DLM_LU_init();
|
20 |
+
});
|
assets/js/legacy-upgrader/src/style/helpers.less
CHANGED
@@ -1,20 +1,20 @@
|
|
1 |
-
@import 'variables';
|
2 |
-
@import 'mixins';
|
3 |
-
|
4 |
-
.iconbefore( @glyph: "\f333" ) {
|
5 |
-
font-family: dashicons !important;
|
6 |
-
speak: none;
|
7 |
-
font-weight: normal;
|
8 |
-
font-variant: normal;
|
9 |
-
text-transform: none;
|
10 |
-
-webkit-font-smoothing: antialiased;
|
11 |
-
-moz-osx-font-smoothing: grayscale;
|
12 |
-
margin: 0 4px 0 0;
|
13 |
-
content: @glyph;
|
14 |
-
top: 1px;
|
15 |
-
left: -1px;
|
16 |
-
font-size: 1em;
|
17 |
-
line-height: inherit;
|
18 |
-
position: relative;
|
19 |
-
vertical-align: top;
|
20 |
}
|
1 |
+
@import 'variables';
|
2 |
+
@import 'mixins';
|
3 |
+
|
4 |
+
.iconbefore( @glyph: "\f333" ) {
|
5 |
+
font-family: dashicons !important;
|
6 |
+
speak: none;
|
7 |
+
font-weight: normal;
|
8 |
+
font-variant: normal;
|
9 |
+
text-transform: none;
|
10 |
+
-webkit-font-smoothing: antialiased;
|
11 |
+
-moz-osx-font-smoothing: grayscale;
|
12 |
+
margin: 0 4px 0 0;
|
13 |
+
content: @glyph;
|
14 |
+
top: 1px;
|
15 |
+
left: -1px;
|
16 |
+
font-size: 1em;
|
17 |
+
line-height: inherit;
|
18 |
+
position: relative;
|
19 |
+
vertical-align: top;
|
20 |
}
|
assets/js/legacy-upgrader/src/style/index.less
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
-
@import 'helpers';
|
2 |
-
|
3 |
-
#dlm_legacy_upgrader_app {
|
4 |
-
height: 100%;
|
5 |
-
box-sizing: border-box;
|
6 |
-
}
|
1 |
+
@import 'helpers';
|
2 |
+
|
3 |
+
#dlm_legacy_upgrader_app {
|
4 |
+
height: 100%;
|
5 |
+
box-sizing: border-box;
|
6 |
+
}
|
assets/js/legacy-upgrader/src/style/mixins.less
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
-
.fill() {
|
2 |
-
position: absolute;
|
3 |
-
left: 0;
|
4 |
-
top: 0;
|
5 |
-
width: 100%;
|
6 |
-
height: 100%;
|
7 |
-
}
|
8 |
-
|
9 |
-
.scroll() {
|
10 |
-
overflow: auto;
|
11 |
-
overflow-scrolling: touch;
|
12 |
-
|
13 |
-
& > .inner {
|
14 |
-
position: relative;
|
15 |
-
transform: translateZ(0);
|
16 |
-
overflow: hidden;
|
17 |
-
}
|
18 |
-
}
|
1 |
+
.fill() {
|
2 |
+
position: absolute;
|
3 |
+
left: 0;
|
4 |
+
top: 0;
|
5 |
+
width: 100%;
|
6 |
+
height: 100%;
|
7 |
+
}
|
8 |
+
|
9 |
+
.scroll() {
|
10 |
+
overflow: auto;
|
11 |
+
overflow-scrolling: touch;
|
12 |
+
|
13 |
+
& > .inner {
|
14 |
+
position: relative;
|
15 |
+
transform: translateZ(0);
|
16 |
+
overflow: hidden;
|
17 |
+
}
|
18 |
+
}
|
assets/js/legacy-upgrader/src/style/variables.less
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
@red: #F00;
|
2 |
-
@blue: #00F;
|
3 |
-
@white: #FFF;
|
4 |
-
@gray: #999;
|
5 |
-
@black: #000;
|
1 |
+
@red: #F00;
|
2 |
+
@blue: #00F;
|
3 |
+
@white: #FFF;
|
4 |
+
@gray: #999;
|
5 |
+
@black: #000;
|
assets/js/legacy-upgrader/webpack.config.babel.js
CHANGED
@@ -1,184 +1,184 @@
|
|
1 |
-
import webpack from 'webpack';
|
2 |
-
import ExtractTextPlugin from 'extract-text-webpack-plugin';
|
3 |
-
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
4 |
-
import autoprefixer from 'autoprefixer';
|
5 |
-
import path from 'path';
|
6 |
-
const ENV = process.env.NODE_ENV || 'development';
|
7 |
-
|
8 |
-
const CSS_MAPS = ENV!=='production';
|
9 |
-
|
10 |
-
module.exports = {
|
11 |
-
context: path.resolve(__dirname, "src"),
|
12 |
-
entry: './index.js',
|
13 |
-
|
14 |
-
output: {
|
15 |
-
path: path.resolve(__dirname, "build"),
|
16 |
-
publicPath: '/',
|
17 |
-
filename: 'bundle.js'
|
18 |
-
},
|
19 |
-
|
20 |
-
resolve: {
|
21 |
-
extensions: ['.jsx', '.js', '.json', '.less'],
|
22 |
-
modules: [
|
23 |
-
path.resolve(__dirname, "src/lib"),
|
24 |
-
path.resolve(__dirname, "node_modules"),
|
25 |
-
'node_modules'
|
26 |
-
],
|
27 |
-
alias: {
|
28 |
-
components: path.resolve(__dirname, "src/components"), // used for tests
|
29 |
-
style: path.resolve(__dirname, "src/style"),
|
30 |
-
'react': 'preact-compat',
|
31 |
-
'react-dom': 'preact-compat'
|
32 |
-
}
|
33 |
-
},
|
34 |
-
|
35 |
-
module: {
|
36 |
-
rules: [
|
37 |
-
{
|
38 |
-
test: /\.jsx?$/,
|
39 |
-
exclude: path.resolve(__dirname, 'src'),
|
40 |
-
enforce: 'pre',
|
41 |
-
use: 'source-map-loader'
|
42 |
-
},
|
43 |
-
{
|
44 |
-
test: /\.jsx?$/,
|
45 |
-
exclude: /node_modules/,
|
46 |
-
use: 'babel-loader'
|
47 |
-
},
|
48 |
-
{
|
49 |
-
// Transform our own .(less|css) files with PostCSS and CSS-modules
|
50 |
-
test: /\.(less|css)$/,
|
51 |
-
include: [path.resolve(__dirname, 'src/components')],
|
52 |
-
use: ExtractTextPlugin.extract({
|
53 |
-
fallback: 'style-loader',
|
54 |
-
use: [
|
55 |
-
{
|
56 |
-
loader: 'css-loader',
|
57 |
-
options: { modules: true, sourceMap: CSS_MAPS, importLoaders: 1, minimize: true }
|
58 |
-
},
|
59 |
-
{
|
60 |
-
loader: `postcss-loader`,
|
61 |
-
options: {
|
62 |
-
sourceMap: CSS_MAPS,
|
63 |
-
plugins: () => {
|
64 |
-
autoprefixer({ browsers: [ 'last 2 versions' ] });
|
65 |
-
}
|
66 |
-
}
|
67 |
-
},
|
68 |
-
{
|
69 |
-
loader: 'less-loader',
|
70 |
-
options: { sourceMap: CSS_MAPS }
|
71 |
-
}
|
72 |
-
]
|
73 |
-
})
|
74 |
-
},
|
75 |
-
{
|
76 |
-
test: /\.(less|css)$/,
|
77 |
-
exclude: [path.resolve(__dirname, 'src/components')],
|
78 |
-
use: ExtractTextPlugin.extract({
|
79 |
-
fallback: 'style-loader',
|
80 |
-
use: [
|
81 |
-
{
|
82 |
-
loader: 'css-loader',
|
83 |
-
options: { sourceMap: CSS_MAPS, importLoaders: 1, minimize: true }
|
84 |
-
},
|
85 |
-
{
|
86 |
-
loader: `postcss-loader`,
|
87 |
-
options: {
|
88 |
-
sourceMap: CSS_MAPS,
|
89 |
-
plugins: () => {
|
90 |
-
autoprefixer({ browsers: [ 'last 2 versions' ] });
|
91 |
-
}
|
92 |
-
}
|
93 |
-
},
|
94 |
-
{
|
95 |
-
loader: 'less-loader',
|
96 |
-
options: { sourceMap: CSS_MAPS }
|
97 |
-
}
|
98 |
-
]
|
99 |
-
})
|
100 |
-
},
|
101 |
-
{
|
102 |
-
test: /\.json$/,
|
103 |
-
use: 'json-loader'
|
104 |
-
},
|
105 |
-
{
|
106 |
-
test: /\.(xml|html|txt|md)$/,
|
107 |
-
use: 'raw-loader'
|
108 |
-
},
|
109 |
-
{
|
110 |
-
test: /\.(svg|woff2?|ttf|eot|jpe?g|png|gif)(\?.*)?$/i,
|
111 |
-
use: ENV==='production' ? 'file-loader' : 'url-loader'
|
112 |
-
}
|
113 |
-
]
|
114 |
-
},
|
115 |
-
plugins: ([
|
116 |
-
new webpack.NoEmitOnErrorsPlugin(),
|
117 |
-
new ExtractTextPlugin({
|
118 |
-
filename: 'style.css',
|
119 |
-
allChunks: true,
|
120 |
-
disable: ENV !== 'production'
|
121 |
-
}),
|
122 |
-
new webpack.DefinePlugin({
|
123 |
-
'process.env.NODE_ENV': JSON.stringify(ENV)
|
124 |
-
}),
|
125 |
-
new HtmlWebpackPlugin({
|
126 |
-
template: './index.ejs',
|
127 |
-
minify: { collapseWhitespace: true }
|
128 |
-
})
|
129 |
-
]).concat(ENV==='production' ? [
|
130 |
-
new webpack.optimize.UglifyJsPlugin({
|
131 |
-
output: {
|
132 |
-
comments: false
|
133 |
-
},
|
134 |
-
compress: {
|
135 |
-
unsafe_comps: true,
|
136 |
-
properties: true,
|
137 |
-
keep_fargs: false,
|
138 |
-
pure_getters: true,
|
139 |
-
collapse_vars: true,
|
140 |
-
unsafe: true,
|
141 |
-
warnings: false,
|
142 |
-
screw_ie8: true,
|
143 |
-
sequences: true,
|
144 |
-
dead_code: true,
|
145 |
-
drop_debugger: true,
|
146 |
-
comparisons: true,
|
147 |
-
conditionals: true,
|
148 |
-
evaluate: true,
|
149 |
-
booleans: true,
|
150 |
-
loops: true,
|
151 |
-
unused: true,
|
152 |
-
hoist_funs: true,
|
153 |
-
if_return: true,
|
154 |
-
join_vars: true,
|
155 |
-
cascade: true,
|
156 |
-
drop_console: true
|
157 |
-
}
|
158 |
-
})
|
159 |
-
] : []),
|
160 |
-
|
161 |
-
stats: { colors: true },
|
162 |
-
|
163 |
-
node: {
|
164 |
-
global: true,
|
165 |
-
process: false,
|
166 |
-
Buffer: false,
|
167 |
-
__filename: false,
|
168 |
-
__dirname: false,
|
169 |
-
setImmediate: false
|
170 |
-
},
|
171 |
-
|
172 |
-
devtool: ENV==='production' ? 'source-map' : 'cheap-module-eval-source-map',
|
173 |
-
|
174 |
-
devServer: {
|
175 |
-
inline: true,
|
176 |
-
port: 1337,
|
177 |
-
host: 'lnmp.dev',
|
178 |
-
publicPath: '/',
|
179 |
-
contentBase: './src',
|
180 |
-
historyApiFallback: true,
|
181 |
-
open: true,
|
182 |
-
openPage: ''
|
183 |
-
}
|
184 |
-
};
|
1 |
+
import webpack from 'webpack';
|
2 |
+
import ExtractTextPlugin from 'extract-text-webpack-plugin';
|
3 |
+
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
4 |
+
import autoprefixer from 'autoprefixer';
|
5 |
+
import path from 'path';
|
6 |
+
const ENV = process.env.NODE_ENV || 'development';
|
7 |
+
|
8 |
+
const CSS_MAPS = ENV!=='production';
|
9 |
+
|
10 |
+
module.exports = {
|
11 |
+
context: path.resolve(__dirname, "src"),
|
12 |
+
entry: './index.js',
|
13 |
+
|
14 |
+
output: {
|
15 |
+
path: path.resolve(__dirname, "build"),
|
16 |
+
publicPath: '/',
|
17 |
+
filename: 'bundle.js'
|
18 |
+
},
|
19 |
+
|
20 |
+
resolve: {
|
21 |
+
extensions: ['.jsx', '.js', '.json', '.less'],
|
22 |
+
modules: [
|
23 |
+
path.resolve(__dirname, "src/lib"),
|
24 |
+
path.resolve(__dirname, "node_modules"),
|
25 |
+
'node_modules'
|
26 |
+
],
|
27 |
+
alias: {
|
28 |
+
components: path.resolve(__dirname, "src/components"), // used for tests
|
29 |
+
style: path.resolve(__dirname, "src/style"),
|
30 |
+
'react': 'preact-compat',
|
31 |
+
'react-dom': 'preact-compat'
|
32 |
+
}
|
33 |
+
},
|
34 |
+
|
35 |
+
module: {
|
36 |
+
rules: [
|
37 |
+
{
|
38 |
+
test: /\.jsx?$/,
|
39 |
+
exclude: path.resolve(__dirname, 'src'),
|
40 |
+
enforce: 'pre',
|
41 |
+
use: 'source-map-loader'
|
42 |
+
},
|
43 |
+
{
|
44 |
+
test: /\.jsx?$/,
|
45 |
+
exclude: /node_modules/,
|
46 |
+
use: 'babel-loader'
|
47 |
+
},
|
48 |
+
{
|
49 |
+
// Transform our own .(less|css) files with PostCSS and CSS-modules
|
50 |
+
test: /\.(less|css)$/,
|
51 |
+
include: [path.resolve(__dirname, 'src/components')],
|
52 |
+
use: ExtractTextPlugin.extract({
|
53 |
+
fallback: 'style-loader',
|
54 |
+
use: [
|
55 |
+
{
|
56 |
+
loader: 'css-loader',
|
57 |
+
options: { modules: true, sourceMap: CSS_MAPS, importLoaders: 1, minimize: true }
|
58 |
+
},
|
59 |
+
{
|
60 |
+
loader: `postcss-loader`,
|
61 |
+
options: {
|
62 |
+
sourceMap: CSS_MAPS,
|
63 |
+
plugins: () => {
|
64 |
+
autoprefixer({ browsers: [ 'last 2 versions' ] });
|
65 |
+
}
|
66 |
+
}
|
67 |
+
},
|
68 |
+
{
|
69 |
+
loader: 'less-loader',
|
70 |
+
options: { sourceMap: CSS_MAPS }
|
71 |
+
}
|
72 |
+
]
|
73 |
+
})
|
74 |
+
},
|
75 |
+
{
|
76 |
+
test: /\.(less|css)$/,
|
77 |
+
exclude: [path.resolve(__dirname, 'src/components')],
|
78 |
+
use: ExtractTextPlugin.extract({
|
79 |
+
fallback: 'style-loader',
|
80 |
+
use: [
|
81 |
+
{
|
82 |
+
loader: 'css-loader',
|
83 |
+
options: { sourceMap: CSS_MAPS, importLoaders: 1, minimize: true }
|
84 |
+
},
|
85 |
+
{
|
86 |
+
loader: `postcss-loader`,
|
87 |
+
options: {
|
88 |
+
sourceMap: CSS_MAPS,
|
89 |
+
plugins: () => {
|
90 |
+
autoprefixer({ browsers: [ 'last 2 versions' ] });
|
91 |
+
}
|
92 |
+
}
|
93 |
+
},
|
94 |
+
{
|
95 |
+
loader: 'less-loader',
|
96 |
+
options: { sourceMap: CSS_MAPS }
|
97 |
+
}
|
98 |
+
]
|
99 |
+
})
|
100 |
+
},
|
101 |
+
{
|
102 |
+
test: /\.json$/,
|
103 |
+
use: 'json-loader'
|
104 |
+
},
|
105 |
+
{
|
106 |
+
test: /\.(xml|html|txt|md)$/,
|
107 |
+
use: 'raw-loader'
|
108 |
+
},
|
109 |
+
{
|
110 |
+
test: /\.(svg|woff2?|ttf|eot|jpe?g|png|gif)(\?.*)?$/i,
|
111 |
+
use: ENV==='production' ? 'file-loader' : 'url-loader'
|
112 |
+
}
|
113 |
+
]
|
114 |
+
},
|
115 |
+
plugins: ([
|
116 |
+
new webpack.NoEmitOnErrorsPlugin(),
|
117 |
+
new ExtractTextPlugin({
|
118 |
+
filename: 'style.css',
|
119 |
+
allChunks: true,
|
120 |
+
disable: ENV !== 'production'
|
121 |
+
}),
|
122 |
+
new webpack.DefinePlugin({
|
123 |
+
'process.env.NODE_ENV': JSON.stringify(ENV)
|
124 |
+
}),
|
125 |
+
new HtmlWebpackPlugin({
|
126 |
+
template: './index.ejs',
|
127 |
+
minify: { collapseWhitespace: true }
|
128 |
+
})
|
129 |
+
]).concat(ENV==='production' ? [
|
130 |
+
new webpack.optimize.UglifyJsPlugin({
|
131 |
+
output: {
|
132 |
+
comments: false
|
133 |
+
},
|
134 |
+
compress: {
|
135 |
+
unsafe_comps: true,
|
136 |
+
properties: true,
|
137 |
+
keep_fargs: false,
|
138 |
+
pure_getters: true,
|
139 |
+
collapse_vars: true,
|
140 |
+
unsafe: true,
|
141 |
+
warnings: false,
|
142 |
+
screw_ie8: true,
|
143 |
+
sequences: true,
|
144 |
+
dead_code: true,
|
145 |
+
drop_debugger: true,
|
146 |
+
comparisons: true,
|
147 |
+
conditionals: true,
|
148 |
+
evaluate: true,
|
149 |
+
booleans: true,
|
150 |
+
loops: true,
|
151 |
+
unused: true,
|
152 |
+
hoist_funs: true,
|
153 |
+
if_return: true,
|
154 |
+
join_vars: true,
|
155 |
+
cascade: true,
|
156 |
+
drop_console: true
|
157 |
+
}
|
158 |
+
})
|
159 |
+
] : []),
|
160 |
+
|
161 |
+
stats: { colors: true },
|
162 |
+
|
163 |
+
node: {
|
164 |
+
global: true,
|
165 |
+
process: false,
|
166 |
+
Buffer: false,
|
167 |
+
__filename: false,
|
168 |
+
__dirname: false,
|
169 |
+
setImmediate: false
|
170 |
+
},
|
171 |
+
|
172 |
+
devtool: ENV==='production' ? 'source-map' : 'cheap-module-eval-source-map',
|
173 |
+
|
174 |
+
devServer: {
|
175 |
+
inline: true,
|
176 |
+
port: 1337,
|
177 |
+
host: 'lnmp.dev',
|
178 |
+
publicPath: '/',
|
179 |
+
contentBase: './src',
|
180 |
+
historyApiFallback: true,
|
181 |
+
open: true,
|
182 |
+
openPage: ''
|
183 |
+
}
|
184 |
+
};
|
assets/js/notices.js
CHANGED
@@ -1,21 +1,21 @@
|
|
1 |
-
jQuery( function ( $ ) {
|
2 |
-
|
3 |
-
$( '.dlm-notice.is-dismissible' ).on( 'click', '.notice-dismiss', function ( event ) {
|
4 |
-
//$( '#dlm-ajax-nonce' ).val()
|
5 |
-
var notice_el = $( this ).closest( '.dlm-notice' );
|
6 |
-
|
7 |
-
var notice = notice_el.attr( 'id' );
|
8 |
-
var notice_nonce = notice_el.attr( 'data-nonce' );
|
9 |
-
$.post(
|
10 |
-
ajaxurl,
|
11 |
-
{
|
12 |
-
action: 'dlm_dismiss_notice',
|
13 |
-
nonce: notice_nonce,
|
14 |
-
notice: notice
|
15 |
-
},
|
16 |
-
function ( response ) {
|
17 |
-
}
|
18 |
-
)
|
19 |
-
} );
|
20 |
-
|
21 |
} );
|
1 |
+
jQuery( function ( $ ) {
|
2 |
+
|
3 |
+
$( '.dlm-notice.is-dismissible' ).on( 'click', '.notice-dismiss', function ( event ) {
|
4 |
+
//$( '#dlm-ajax-nonce' ).val()
|
5 |
+
var notice_el = $( this ).closest( '.dlm-notice' );
|
6 |
+
|
7 |
+
var notice = notice_el.attr( 'id' );
|
8 |
+
var notice_nonce = notice_el.attr( 'data-nonce' );
|
9 |
+
$.post(
|
10 |
+
ajaxurl,
|
11 |
+
{
|
12 |
+
action: 'dlm_dismiss_notice',
|
13 |
+
nonce: notice_nonce,
|
14 |
+
notice: notice
|
15 |
+
},
|
16 |
+
function ( response ) {
|
17 |
+
}
|
18 |
+
)
|
19 |
+
} );
|
20 |
+
|
21 |
} );
|
assets/js/onboarding.js
CHANGED
@@ -1,70 +1,70 @@
|
|
1 |
-
jQuery( function ( $ ) {
|
2 |
-
|
3 |
-
$.each( $( '.dlm-create-page' ), function ( k, v ) {
|
4 |
-
new DLM_Onboarding_CP( v );
|
5 |
-
} );
|
6 |
-
|
7 |
-
/*
|
8 |
-
$('.dlm-create-page').click(function() {
|
9 |
-
|
10 |
-
var page = $(this).data('page');
|
11 |
-
|
12 |
-
$(this).html(dlm_onboarding.lbl_creating);
|
13 |
-
|
14 |
-
// set loading
|
15 |
-
|
16 |
-
// do ajax request
|
17 |
-
|
18 |
-
// check response
|
19 |
-
|
20 |
-
// if success, change button to green with checkmark
|
21 |
-
|
22 |
-
});
|
23 |
-
*/
|
24 |
-
} );
|
25 |
-
|
26 |
-
var DLM_Onboarding_CP = function ( el ) {
|
27 |
-
this.el = el;
|
28 |
-
this.page = jQuery( el ).data( 'page' );
|
29 |
-
this.allowAction = true;
|
30 |
-
this.setup();
|
31 |
-
};
|
32 |
-
|
33 |
-
DLM_Onboarding_CP.prototype.setup = function () {
|
34 |
-
var instance = this;
|
35 |
-
jQuery( this.el ).click( function () {
|
36 |
-
instance.process();
|
37 |
-
} );
|
38 |
-
};
|
39 |
-
|
40 |
-
DLM_Onboarding_CP.prototype.process = function () {
|
41 |
-
if ( !this.allowAction ) {
|
42 |
-
return false;
|
43 |
-
}
|
44 |
-
|
45 |
-
this.allowAction = false;
|
46 |
-
|
47 |
-
var instance = this;
|
48 |
-
|
49 |
-
jQuery( instance.el ).html( dlm_onboarding.lbl_creating );
|
50 |
-
|
51 |
-
jQuery.get( dlm_onboarding.ajax_url_create_page, {
|
52 |
-
page: this.page
|
53 |
-
}, function ( response ) {
|
54 |
-
if ( response.result === 'success' ) {
|
55 |
-
jQuery( instance.el ).html( dlm_onboarding.lbl_created );
|
56 |
-
jQuery( instance.el ).removeClass( 'dlm-create-page' ).addClass( 'dlm-page-exists' );
|
57 |
-
} else {
|
58 |
-
jQuery( instance.el ).html( dlm_onboarding.lbl_create_page );
|
59 |
-
|
60 |
-
if ( typeof response.error !== 'undefined' ) {
|
61 |
-
alert( response.error );
|
62 |
-
}
|
63 |
-
|
64 |
-
instance.allowAction = true;
|
65 |
-
}
|
66 |
-
|
67 |
-
console.log( response );
|
68 |
-
} );
|
69 |
-
|
70 |
};
|
1 |
+
jQuery( function ( $ ) {
|
2 |
+
|
3 |
+
$.each( $( '.dlm-create-page' ), function ( k, v ) {
|
4 |
+
new DLM_Onboarding_CP( v );
|
5 |
+
} );
|
6 |
+
|
7 |
+
/*
|
8 |
+
$('.dlm-create-page').click(function() {
|
9 |
+
|
10 |
+
var page = $(this).data('page');
|
11 |
+
|
12 |
+
$(this).html(dlm_onboarding.lbl_creating);
|
13 |
+
|
14 |
+
// set loading
|
15 |
+
|
16 |
+
// do ajax request
|
17 |
+
|
18 |
+
// check response
|
19 |
+
|
20 |
+
// if success, change button to green with checkmark
|
21 |
+
|
22 |
+
});
|
23 |
+
*/
|
24 |
+
} );
|
25 |
+
|
26 |
+
var DLM_Onboarding_CP = function ( el ) {
|
27 |
+
this.el = el;
|
28 |
+
this.page = jQuery( el ).data( 'page' );
|
29 |
+
this.allowAction = true;
|
30 |
+
this.setup();
|
31 |
+
};
|
32 |
+
|
33 |
+
DLM_Onboarding_CP.prototype.setup = function () {
|
34 |
+
var instance = this;
|
35 |
+
jQuery( this.el ).click( function () {
|
36 |
+
instance.process();
|
37 |
+
} );
|
38 |
+
};
|
39 |
+
|
40 |
+
DLM_Onboarding_CP.prototype.process = function () {
|
41 |
+
if ( !this.allowAction ) {
|
42 |
+
return false;
|
43 |
+
}
|
44 |
+
|
45 |
+
this.allowAction = false;
|
46 |
+
|
47 |
+
var instance = this;
|
48 |
+
|
49 |
+
jQuery( instance.el ).html( dlm_onboarding.lbl_creating );
|
50 |
+
|
51 |
+
jQuery.get( dlm_onboarding.ajax_url_create_page, {
|
52 |
+
page: this.page
|
53 |
+
}, function ( response ) {
|
54 |
+
if ( response.result === 'success' ) {
|
55 |
+
jQuery( instance.el ).html( dlm_onboarding.lbl_created );
|
56 |
+
jQuery( instance.el ).removeClass( 'dlm-create-page' ).addClass( 'dlm-page-exists' );
|
57 |
+
} else {
|
58 |
+
jQuery( instance.el ).html( dlm_onboarding.lbl_create_page );
|
59 |
+
|
60 |
+
if ( typeof response.error !== 'undefined' ) {
|
61 |
+
alert( response.error );
|
62 |
+
}
|
63 |
+
|
64 |
+
instance.allowAction = true;
|
65 |
+
}
|
66 |
+
|
67 |
+
console.log( response );
|
68 |
+
} );
|
69 |
+
|
70 |
};
|
assets/js/overview-download.js
CHANGED
@@ -1,52 +1,52 @@
|
|
1 |
-
(function ( $ ) {
|
2 |
-
|
3 |
-
// we create a copy of the WP inline edit post function
|
4 |
-
var $wp_inline_edit = inlineEditPost.edit;
|
5 |
-
|
6 |
-
// and then we overwrite the function with our own code
|
7 |
-
inlineEditPost.edit = function ( id ) {
|
8 |
-
|
9 |
-
// "call" the original WP edit function
|
10 |
-
// we don't want to leave WordPress hanging
|
11 |
-
$wp_inline_edit.apply( this, arguments );
|
12 |
-
|
13 |
-
// now we take care of our business
|
14 |
-
|
15 |
-
// get the post ID
|
16 |
-
var $post_id = 0;
|
17 |
-
if ( typeof( id ) == 'object' ) {
|
18 |
-
$post_id = parseInt( this.getId( id ) );
|
19 |
-
}
|
20 |
-
|
21 |
-
if ( $post_id > 0 ) {
|
22 |
-
|
23 |
-
// define rows
|
24 |
-
var $edit_row = $( '#edit-' + $post_id );
|
25 |
-
var $post_row = $( '#post-' + $post_id );
|
26 |
-
|
27 |
-
// get data
|
28 |
-
var featured = ('Yes' == $( '.column-featured', $post_row ).text() );
|
29 |
-
var members_only = ('Yes' == $( '.column-members_only', $post_row ).text() );
|
30 |
-
var redirect_only = ('Yes' == $( '.column-redirect_only', $post_row ).text() );
|
31 |
-
|
32 |
-
// populate data
|
33 |
-
$( ':input[name="_featured"]', $edit_row ).prop( 'checked', featured );
|
34 |
-
$( ':input[name="_members_only"]', $edit_row ).prop( 'checked', members_only );
|
35 |
-
$( ':input[name="_redirect_only"]', $edit_row ).prop( 'checked', redirect_only );
|
36 |
-
}
|
37 |
-
};
|
38 |
-
|
39 |
-
// Copy shortcode functionality
|
40 |
-
$('.copy-dlm-shortcode').click( (e) => {
|
41 |
-
e.preventDefault();
|
42 |
-
|
43 |
-
const target = $(e.currentTarget);
|
44 |
-
const dlm_shortcode = target.find('input');
|
45 |
-
navigator.clipboard.writeText(dlm_shortcode.val());
|
46 |
-
target.find('.wpchill-tooltip-content span').text(dlm_download_overview.shortcode_copied);
|
47 |
-
setTimeout(() => {
|
48 |
-
target.find('.wpchill-tooltip-content span').text(dlm_download_overview.copy_shortcode);
|
49 |
-
}, 1000);
|
50 |
-
});
|
51 |
-
|
52 |
})( jQuery );
|
1 |
+
(function ( $ ) {
|
2 |
+
|
3 |
+
// we create a copy of the WP inline edit post function
|
4 |
+
var $wp_inline_edit = inlineEditPost.edit;
|
5 |
+
|
6 |
+
// and then we overwrite the function with our own code
|
7 |
+
inlineEditPost.edit = function ( id ) {
|
8 |
+
|
9 |
+
// "call" the original WP edit function
|
10 |
+
// we don't want to leave WordPress hanging
|
11 |
+
$wp_inline_edit.apply( this, arguments );
|
12 |
+
|
13 |
+
// now we take care of our business
|
14 |
+
|
15 |
+
// get the post ID
|
16 |
+
var $post_id = 0;
|
17 |
+
if ( typeof( id ) == 'object' ) {
|
18 |
+
$post_id = parseInt( this.getId( id ) );
|
19 |
+
}
|
20 |
+
|
21 |
+
if ( $post_id > 0 ) {
|
22 |
+
|
23 |
+
// define rows
|
24 |
+
var $edit_row = $( '#edit-' + $post_id );
|
25 |
+
var $post_row = $( '#post-' + $post_id );
|
26 |
+
|
27 |
+
// get data
|
28 |
+
var featured = ('Yes' == $( '.column-featured', $post_row ).text() );
|
29 |
+
var members_only = ('Yes' == $( '.column-members_only', $post_row ).text() );
|
30 |
+
var redirect_only = ('Yes' == $( '.column-redirect_only', $post_row ).text() );
|
31 |
+
|
32 |
+
// populate data
|
33 |
+
$( ':input[name="_featured"]', $edit_row ).prop( 'checked', featured );
|
34 |
+
$( ':input[name="_members_only"]', $edit_row ).prop( 'checked', members_only );
|
35 |
+
$( ':input[name="_redirect_only"]', $edit_row ).prop( 'checked', redirect_only );
|
36 |
+
}
|
37 |
+
};
|
38 |
+
|
39 |
+
// Copy shortcode functionality
|
40 |
+
$('.copy-dlm-shortcode').click( (e) => {
|
41 |
+
e.preventDefault();
|
42 |
+
|
43 |
+
const target = $(e.currentTarget);
|
44 |
+
const dlm_shortcode = target.find('input');
|
45 |
+
navigator.clipboard.writeText(dlm_shortcode.val());
|
46 |
+
target.find('.wpchill-tooltip-content span').text(dlm_download_overview.shortcode_copied);
|
47 |
+
setTimeout(() => {
|
48 |
+
target.find('.wpchill-tooltip-content span').text(dlm_download_overview.copy_shortcode);
|
49 |
+
}, 1000);
|
50 |
+
});
|
51 |
+
|
52 |
})( jQuery );
|
assets/js/overview-download.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(c){var d=inlineEditPost.edit;inlineEditPost.edit=function(e){d.apply(this,arguments);var t,o,n,i=0;0<(i="object"==typeof e?parseInt(this.getId(e)):i)&&(t=c("#edit-"+i),
|
1 |
+
!function(c){var d=inlineEditPost.edit;inlineEditPost.edit=function(e){d.apply(this,arguments);var t,o,n,i=0;0<(i="object"==typeof e?parseInt(this.getId(e)):i)&&(t=c("#edit-"+i),i=c("#post-"+i),o="Yes"==c(".column-featured",i).text(),n="Yes"==c(".column-members_only",i).text(),i="Yes"==c(".column-redirect_only",i).text(),c(':input[name="_featured"]',t).prop("checked",o),c(':input[name="_members_only"]',t).prop("checked",n),c(':input[name="_redirect_only"]',t).prop("checked",i))},c(".copy-dlm-shortcode").click(e=>{e.preventDefault();const t=c(e.currentTarget),o=t.find("input");navigator.clipboard.writeText(o.val()),t.find(".wpchill-tooltip-content span").text(dlm_download_overview.shortcode_copied),setTimeout(()=>{t.find(".wpchill-tooltip-content span").text(dlm_download_overview.copy_shortcode)},1e3)})}(jQuery);
|
assets/js/reports/charts-date-range-selector.js
CHANGED
@@ -1,91 +1,91 @@
|
|
1 |
-
jQuery.fn.extend( {
|
2 |
-
dlm_reports_date_range: function ( start_date, end_date, url ) {
|
3 |
-
new DLM_Reports_Date_Range_Selector( this, start_date, end_date, url );
|
4 |
-
return this;
|
5 |
-
}
|
6 |
-
} );
|
7 |
-
|
8 |
-
var DLM_Reports_Date_Range_Selector = function ( c, sd, ed, u ) {
|
9 |
-
|
10 |
-
this.container = c;
|
11 |
-
this.startDate = new Date( sd );
|
12 |
-
this.endDate = new Date( ed );
|
13 |
-
this.url = u.replace(/&#(\d+);/g, function(match, dec) {
|
14 |
-
return String.fromCharCode(dec);
|
15 |
-
});
|
16 |
-
this.el = null;
|
17 |
-
this.opened = false;
|
18 |
-
|
19 |
-
this.startDateInput = null;
|
20 |
-
this.endDateInput = null;
|
21 |
-
|
22 |
-
this.setup = function () {
|
23 |
-
var instance = this;
|
24 |
-
this.container.click( function () {
|
25 |
-
instance.toggleDisplay();
|
26 |
-
return false;
|
27 |
-
} );
|
28 |
-
};
|
29 |
-
|
30 |
-
this.setup();
|
31 |
-
|
32 |
-
};
|
33 |
-
|
34 |
-
DLM_Reports_Date_Range_Selector.prototype.toggleDisplay = function () {
|
35 |
-
if ( this.opened ) {
|
36 |
-
this.hide();
|
37 |
-
} else {
|
38 |
-
this.display();
|
39 |
-
}
|
40 |
-
};
|
41 |
-
|
42 |
-
DLM_Reports_Date_Range_Selector.prototype.display = function () {
|
43 |
-
if ( this.opened ) {
|
44 |
-
return;
|
45 |
-
}
|
46 |
-
this.opened = true;
|
47 |
-
this.el = this.createElement();
|
48 |
-
this.container.append( this.el );
|
49 |
-
};
|
50 |
-
|
51 |
-
DLM_Reports_Date_Range_Selector.prototype.hide = function () {
|
52 |
-
this.opened = false;
|
53 |
-
this.el.remove();
|
54 |
-
};
|
55 |
-
|
56 |
-
DLM_Reports_Date_Range_Selector.prototype.apply = function () {
|
57 |
-
|
58 |
-
var sd = ( this.startDateInput.val().length ) ? new Date( this.startDateInput.val() + "T00:00:00" ) : false ;
|
59 |
-
var ed = ( this.endDateInput.val().length ) ? new Date( this.endDateInput.val() + "T00:00:00" ) : false;
|
60 |
-
var url = this.url;
|
61 |
-
if (sd) {
|
62 |
-
url += "&date_from=" + sd.getFullYear()+ "-"+(sd.getMonth()+1)+"-"+sd.getDate();
|
63 |
-
}
|
64 |
-
if (ed) {
|
65 |
-
url += "&date_to=" + ed.getFullYear()+ "-"+(ed.getMonth()+1)+"-"+ed.getDate();
|
66 |
-
}
|
67 |
-
this.hide();
|
68 |
-
window.location.replace( url );
|
69 |
-
};
|
70 |
-
|
71 |
-
DLM_Reports_Date_Range_Selector.prototype.createElement = function () {
|
72 |
-
var instance = this;
|
73 |
-
var el = jQuery( '<div>' ).addClass( 'dlm_rdrs_overlay' );
|
74 |
-
var startDate = jQuery( '<div>' ).addClass( 'dlm_rdrs_date' ).attr( 'id', 'dlm_rdrs_date_start' );
|
75 |
-
var endDate = jQuery( '<div>' ).addClass( 'dlm_rdrs_date' ).attr( 'id', 'dlm_rdrs_date_end' );
|
76 |
-
this.startDateInput = jQuery( '<input>' ).attr( 'type', 'hidden' );
|
77 |
-
this.endDateInput = jQuery( '<input>' ).attr( 'type', 'hidden' );
|
78 |
-
var actions = jQuery( '<div>' ).addClass( 'dlm_rdrs_actions' );
|
79 |
-
var applyButton = jQuery( '<a>' ).addClass( 'button' ).html( 'Apply' ).click( function () {
|
80 |
-
instance.apply();
|
81 |
-
return false;
|
82 |
-
} );
|
83 |
-
actions.append( applyButton );
|
84 |
-
el.append( startDate ).append( endDate ).append( actions ).append( this.startDateInput ).append( this.endDateInput );
|
85 |
-
startDate.datepicker( {inline: true, altField: this.startDateInput, dateFormat: "yy-mm-dd", defaultDate: this.startDate } );
|
86 |
-
endDate.datepicker( {inline: true, altField: this.endDateInput, dateFormat: "yy-mm-dd", defaultDate: this.endDate } );
|
87 |
-
el.click( function () {
|
88 |
-
return false
|
89 |
-
} );
|
90 |
-
return el;
|
91 |
};
|
1 |
+
jQuery.fn.extend( {
|
2 |
+
dlm_reports_date_range: function ( start_date, end_date, url ) {
|
3 |
+
new DLM_Reports_Date_Range_Selector( this, start_date, end_date, url );
|
4 |
+
return this;
|
5 |
+
}
|
6 |
+
} );
|
7 |
+
|
8 |
+
var DLM_Reports_Date_Range_Selector = function ( c, sd, ed, u ) {
|
9 |
+
|
10 |
+
this.container = c;
|
11 |
+
this.startDate = new Date( sd );
|
12 |
+
this.endDate = new Date( ed );
|
13 |
+
this.url = u.replace(/&#(\d+);/g, function(match, dec) {
|
14 |
+
return String.fromCharCode(dec);
|
15 |
+
});
|
16 |
+
this.el = null;
|
17 |
+
this.opened = false;
|
18 |
+
|
19 |
+
this.startDateInput = null;
|
20 |
+
this.endDateInput = null;
|
21 |
+
|
22 |
+
this.setup = function () {
|
23 |
+
var instance = this;
|
24 |
+
this.container.click( function () {
|
25 |
+
instance.toggleDisplay();
|
26 |
+
return false;
|
27 |
+
} );
|
28 |
+
};
|
29 |
+
|
30 |
+
this.setup();
|
31 |
+
|
32 |
+
};
|
33 |
+
|
34 |
+
DLM_Reports_Date_Range_Selector.prototype.toggleDisplay = function () {
|
35 |
+
if ( this.opened ) {
|
36 |
+
this.hide();
|
37 |
+
} else {
|
38 |
+
this.display();
|
39 |
+
}
|
40 |
+
};
|
41 |
+
|
42 |
+
DLM_Reports_Date_Range_Selector.prototype.display = function () {
|
43 |
+
if ( this.opened ) {
|
44 |
+
return;
|
45 |
+
}
|
46 |
+
this.opened = true;
|
47 |
+
this.el = this.createElement();
|
48 |
+
this.container.append( this.el );
|
49 |
+
};
|
50 |
+
|
51 |
+
DLM_Reports_Date_Range_Selector.prototype.hide = function () {
|
52 |
+
this.opened = false;
|
53 |
+
this.el.remove();
|
54 |
+
};
|
55 |
+
|
56 |
+
DLM_Reports_Date_Range_Selector.prototype.apply = function () {
|
57 |
+
|
58 |
+
var sd = ( this.startDateInput.val().length ) ? new Date( this.startDateInput.val() + "T00:00:00" ) : false ;
|
59 |
+
var ed = ( this.endDateInput.val().length ) ? new Date( this.endDateInput.val() + "T00:00:00" ) : false;
|
60 |
+
var url = this.url;
|
61 |
+
if (sd) {
|
62 |
+
url += "&date_from=" + sd.getFullYear()+ "-"+(sd.getMonth()+1)+"-"+sd.getDate();
|
63 |
+
}
|
64 |
+
if (ed) {
|
65 |
+
url += "&date_to=" + ed.getFullYear()+ "-"+(ed.getMonth()+1)+"-"+ed.getDate();
|
66 |
+
}
|
67 |
+
this.hide();
|
68 |
+
window.location.replace( url );
|
69 |
+
};
|
70 |
+
|
71 |
+
DLM_Reports_Date_Range_Selector.prototype.createElement = function () {
|
72 |
+
var instance = this;
|
73 |
+
var el = jQuery( '<div>' ).addClass( 'dlm_rdrs_overlay' );
|
74 |
+
var startDate = jQuery( '<div>' ).addClass( 'dlm_rdrs_date' ).attr( 'id', 'dlm_rdrs_date_start' );
|
75 |
+
var endDate = jQuery( '<div>' ).addClass( 'dlm_rdrs_date' ).attr( 'id', 'dlm_rdrs_date_end' );
|
76 |
+
this.startDateInput = jQuery( '<input>' ).attr( 'type', 'hidden' );
|
77 |
+
this.endDateInput = jQuery( '<input>' ).attr( 'type', 'hidden' );
|
78 |
+
var actions = jQuery( '<div>' ).addClass( 'dlm_rdrs_actions' );
|
79 |
+
var applyButton = jQuery( '<a>' ).addClass( 'button' ).html( 'Apply' ).click( function () {
|
80 |
+
instance.apply();
|
81 |
+
return false;
|
82 |
+
} );
|
83 |
+
actions.append( applyButton );
|
84 |
+
el.append( startDate ).append( endDate ).append( actions ).append( this.startDateInput ).append( this.endDateInput );
|
85 |
+
startDate.datepicker( {inline: true, altField: this.startDateInput, dateFormat: "yy-mm-dd", defaultDate: this.startDate } );
|
86 |
+
endDate.datepicker( {inline: true, altField: this.endDateInput, dateFormat: "yy-mm-dd", defaultDate: this.endDate } );
|
87 |
+
el.click( function () {
|
88 |
+
return false
|
89 |
+
} );
|
90 |
+
return el;
|
91 |
};
|
assets/js/reports/charts-date-range-selector.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery.fn.extend({dlm_reports_date_range:function(t,e,a){return new DLM_Reports_Date_Range_Selector(this,t,e,a),this}});var DLM_Reports_Date_Range_Selector=function(t,e,a,n){this.container=t,this.startDate=new Date(e),this.endDate=new Date(a),this.url=n.replace(/&#(\d+);/g,function(t,e){return String.fromCharCode(e)}),this.el=null,this.opened=!1,this.startDateInput=null,this.endDateInput=null,this.setup=function(){var t=this;this.container.click(function(){return t.toggleDisplay(),!1})},this.setup()};DLM_Reports_Date_Range_Selector.prototype.toggleDisplay=function(){this.opened?this.hide():this.display()},DLM_Reports_Date_Range_Selector.prototype.display=function(){this.opened||(this.opened=!0,this.el=this.createElement(),this.container.append(this.el))},DLM_Reports_Date_Range_Selector.prototype.hide=function(){this.opened=!1,this.el.remove()},DLM_Reports_Date_Range_Selector.prototype.apply=function(){var t=!!this.startDateInput.val().length&&new Date(this.startDateInput.val()+"T00:00:00"),e=!!this.endDateInput.val().length&&new Date(this.endDateInput.val()+"T00:00:00"),a=this.url;t&&(a+="&date_from="+t.getFullYear()+"-"+(t.getMonth()+1)+"-"+t.getDate()),e&&(a+="&date_to="+e.getFullYear()+"-"+(e.getMonth()+1)+"-"+e.getDate()),this.hide(),window.location.replace(a)},DLM_Reports_Date_Range_Selector.prototype.createElement=function(){var t=this,e=jQuery("<div>").addClass("dlm_rdrs_overlay"),a=jQuery("<div>").addClass("dlm_rdrs_date").attr("id","dlm_rdrs_date_start"),n=jQuery("<div>").addClass("dlm_rdrs_date").attr("id","dlm_rdrs_date_end")
|
1 |
+
jQuery.fn.extend({dlm_reports_date_range:function(t,e,a){return new DLM_Reports_Date_Range_Selector(this,t,e,a),this}});var DLM_Reports_Date_Range_Selector=function(t,e,a,n){this.container=t,this.startDate=new Date(e),this.endDate=new Date(a),this.url=n.replace(/&#(\d+);/g,function(t,e){return String.fromCharCode(e)}),this.el=null,this.opened=!1,this.startDateInput=null,this.endDateInput=null,this.setup=function(){var t=this;this.container.click(function(){return t.toggleDisplay(),!1})},this.setup()};DLM_Reports_Date_Range_Selector.prototype.toggleDisplay=function(){this.opened?this.hide():this.display()},DLM_Reports_Date_Range_Selector.prototype.display=function(){this.opened||(this.opened=!0,this.el=this.createElement(),this.container.append(this.el))},DLM_Reports_Date_Range_Selector.prototype.hide=function(){this.opened=!1,this.el.remove()},DLM_Reports_Date_Range_Selector.prototype.apply=function(){var t=!!this.startDateInput.val().length&&new Date(this.startDateInput.val()+"T00:00:00"),e=!!this.endDateInput.val().length&&new Date(this.endDateInput.val()+"T00:00:00"),a=this.url;t&&(a+="&date_from="+t.getFullYear()+"-"+(t.getMonth()+1)+"-"+t.getDate()),e&&(a+="&date_to="+e.getFullYear()+"-"+(e.getMonth()+1)+"-"+e.getDate()),this.hide(),window.location.replace(a)},DLM_Reports_Date_Range_Selector.prototype.createElement=function(){var t=this,e=jQuery("<div>").addClass("dlm_rdrs_overlay"),a=jQuery("<div>").addClass("dlm_rdrs_date").attr("id","dlm_rdrs_date_start"),n=jQuery("<div>").addClass("dlm_rdrs_date").attr("id","dlm_rdrs_date_end"),r=(this.startDateInput=jQuery("<input>").attr("type","hidden"),this.endDateInput=jQuery("<input>").attr("type","hidden"),jQuery("<div>").addClass("dlm_rdrs_actions")),i=jQuery("<a>").addClass("button").html("Apply").click(function(){return t.apply(),!1});return r.append(i),e.append(a).append(n).append(r).append(this.startDateInput).append(this.endDateInput),a.datepicker({inline:!0,altField:this.startDateInput,dateFormat:"yy-mm-dd",defaultDate:this.startDate}),n.datepicker({inline:!0,altField:this.endDateInput,dateFormat:"yy-mm-dd",defaultDate:this.endDate}),e.click(function(){return!1}),e};
|
assets/js/reports/charts.min.js
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
-
/*!
|
2 |
-
* Chart.js v3.5.1
|
3 |
-
* https://www.chartjs.org
|
4 |
-
* (c) 2021 Chart.js Contributors
|
5 |
-
* Released under the MIT License
|
6 |
-
*/
|
7 |
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Chart=e()}(this,(function(){"use strict";const t="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function e(e,i,n){const o=n||(t=>Array.prototype.slice.call(t));let s=!1,a=[];return function(...n){a=o(n),s||(s=!0,t.call(window,(()=>{s=!1,e.apply(i,a)})))}}function i(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}const n=t=>"start"===t?"left":"end"===t?"right":"center",o=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2,s=(t,e,i,n)=>t===(n?"left":"right")?i:"center"===t?(e+i)/2:e;var a=new class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,n){const o=e.listeners[n],s=e.duration;o.forEach((n=>n({chart:t,initial:e.initial,numSteps:s,currentStep:Math.min(i-e.start,s)})))}_refresh(){const e=this;e._request||(e._running=!0,e._request=t.call(window,(()=>{e._update(),e._request=null,e._running&&e._refresh()})))}_update(t=Date.now()){const e=this;let i=0;e._charts.forEach(((n,o)=>{if(!n.running||!n.items.length)return;const s=n.items;let a,r=s.length-1,l=!1;for(;r>=0;--r)a=s[r],a._active?(a._total>n.duration&&(n.duration=a._total),a.tick(t),l=!0):(s[r]=s[s.length-1],s.pop());l&&(o.draw(),e._notify(o,n,t,"progress")),s.length||(n.running=!1,e._notify(o,n,t,"complete"),n.initial=!1),i+=s.length})),e._lastDate=t,0===i&&(e._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};
|
8 |
-
/*!
|
9 |
-
* @kurkle/color v0.1.9
|
10 |
-
* https://github.com/kurkle/color#readme
|
11 |
-
* (c) 2020 Jukka Kurkela
|
12 |
-
* Released under the MIT License
|
13 |
-
*/const r={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},l="0123456789ABCDEF",c=t=>l[15&t],h=t=>l[(240&t)>>4]+l[15&t],d=t=>(240&t)>>4==(15&t);function u(t){var e=function(t){return d(t.r)&&d(t.g)&&d(t.b)&&d(t.a)}(t)?c:h;return t?"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):""):t}function f(t){return t+.5|0}const g=(t,e,i)=>Math.max(Math.min(t,i),e);function p(t){return g(f(2.55*t),0,255)}function m(t){return g(f(255*t),0,255)}function x(t){return g(f(t/2.55)/100,0,1)}function b(t){return g(f(100*t),0,100)}const _=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const y=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function v(t,e,i){const n=e*Math.min(i,1-i),o=(e,o=(e+t/30)%12)=>i-n*Math.max(Math.min(o-3,9-o,1),-1);return[o(0),o(8),o(4)]}function w(t,e,i){const n=(n,o=(n+t/60)%6)=>i-i*e*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)]}function M(t,e,i){const n=v(t,1,.5);let o;for(e+i>1&&(o=1/(e+i),e*=o,i*=o),o=0;o<3;o++)n[o]*=1-e-i,n[o]+=e;return n}function k(t){const e=t.r/255,i=t.g/255,n=t.b/255,o=Math.max(e,i,n),s=Math.min(e,i,n),a=(o+s)/2;let r,l,c;return o!==s&&(c=o-s,l=a>.5?c/(2-o-s):c/(o+s),r=o===e?(i-n)/c+(i<n?6:0):o===i?(n-e)/c+2:(e-i)/c+4,r=60*r+.5),[0|r,l||0,a]}function S(t,e,i,n){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,n)).map(m)}function P(t,e,i){return S(v,t,e,i)}function D(t){return(t%360+360)%360}function C(t){const e=y.exec(t);let i,n=255;if(!e)return;e[5]!==i&&(n=e[6]?p(+e[5]):m(+e[5]));const o=D(+e[2]),s=+e[3]/100,a=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return S(M,t,e,i)}(o,s,a):"hsv"===e[1]?function(t,e,i){return S(w,t,e,i)}(o,s,a):P(o,s,a),{r:i[0],g:i[1],b:i[2],a:n}}const O={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},T={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let A;function L(t){A||(A=function(){const t={},e=Object.keys(T),i=Object.keys(O);let n,o,s,a,r;for(n=0;n<e.length;n++){for(a=r=e[n],o=0;o<i.length;o++)s=i[o],r=r.replace(s,O[s]);s=parseInt(T[a],16),t[r]=[s>>16&255,s>>8&255,255&s]}return t}(),A.transparent=[0,0,0,0]);const e=A[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}function R(t,e,i){if(t){let n=k(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=P(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function E(t,e){return t?Object.assign(e||{},t):t}function I(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=m(t[3]))):(e=E(t,{r:0,g:0,b:0,a:1})).a=m(e.a),e}function z(t){return"r"===t.charAt(0)?function(t){const e=_.exec(t);let i,n,o,s=255;if(e){if(e[7]!==i){const t=+e[7];s=255&(e[8]?p(t):255*t)}return i=+e[1],n=+e[3],o=+e[5],i=255&(e[2]?p(i):i),n=255&(e[4]?p(n):n),o=255&(e[6]?p(o):o),{r:i,g:n,b:o,a:s}}}(t):C(t)}class F{constructor(t){if(t instanceof F)return t;const e=typeof t;let i;var n,o,s;"object"===e?i=I(t):"string"===e&&(s=(n=t).length,"#"===n[0]&&(4===s||5===s?o={r:255&17*r[n[1]],g:255&17*r[n[2]],b:255&17*r[n[3]],a:5===s?17*r[n[4]]:255}:7!==s&&9!==s||(o={r:r[n[1]]<<4|r[n[2]],g:r[n[3]]<<4|r[n[4]],b:r[n[5]]<<4|r[n[6]],a:9===s?r[n[7]]<<4|r[n[8]]:255})),i=o||L(t)||z(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=E(this._rgb);return t&&(t.a=x(t.a)),t}set rgb(t){this._rgb=I(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${x(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):this._rgb;var t}hexString(){return this._valid?u(this._rgb):this._rgb}hslString(){return this._valid?function(t){if(!t)return;const e=k(t),i=e[0],n=b(e[1]),o=b(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${o}%, ${x(t.a)})`:`hsl(${i}, ${n}%, ${o}%)`}(this._rgb):this._rgb}mix(t,e){const i=this;if(t){const n=i.rgb,o=t.rgb;let s;const a=e===s?.5:e,r=2*a-1,l=n.a-o.a,c=((r*l==-1?r:(r+l)/(1+r*l))+1)/2;s=1-c,n.r=255&c*n.r+s*o.r+.5,n.g=255&c*n.g+s*o.g+.5,n.b=255&c*n.b+s*o.b+.5,n.a=a*n.a+(1-a)*o.a,i.rgb=n}return i}clone(){return new F(this.rgb)}alpha(t){return this._rgb.a=m(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=f(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return R(this._rgb,2,t),this}darken(t){return R(this._rgb,2,-t),this}saturate(t){return R(this._rgb,1,t),this}desaturate(t){return R(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=k(t);i[0]=D(i[0]+e),i=P(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function B(t){return new F(t)}const V=t=>t instanceof CanvasGradient||t instanceof CanvasPattern;function W(t){return V(t)?t:B(t)}function N(t){return V(t)?t:B(t).saturate(.5).darken(.1).hexString()}function H(){}const j=function(){let t=0;return function(){return t++}}();function $(t){return null==t}function Y(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function U(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const X=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function q(t,e){return X(t)?t:e}function K(t,e){return void 0===t?e:t}const G=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100:t/e,Z=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function Q(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function J(t,e,i,n){let o,s,a;if(Y(t))if(s=t.length,n)for(o=s-1;o>=0;o--)e.call(i,t[o],o);else for(o=0;o<s;o++)e.call(i,t[o],o);else if(U(t))for(a=Object.keys(t),s=a.length,o=0;o<s;o++)e.call(i,t[a[o]],a[o])}function tt(t,e){let i,n,o,s;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(o=t[i],s=e[i],o.datasetIndex!==s.datasetIndex||o.index!==s.index)return!1;return!0}function et(t){if(Y(t))return t.map(et);if(U(t)){const e=Object.create(null),i=Object.keys(t),n=i.length;let o=0;for(;o<n;++o)e[i[o]]=et(t[i[o]]);return e}return t}function it(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function nt(t,e,i,n){if(!it(t))return;const o=e[t],s=i[t];U(o)&&U(s)?ot(o,s,n):e[t]=et(s)}function ot(t,e,i){const n=Y(e)?e:[e],o=n.length;if(!U(t))return t;const s=(i=i||{}).merger||nt;for(let a=0;a<o;++a){if(!U(e=n[a]))continue;const o=Object.keys(e);for(let n=0,a=o.length;n<a;++n)s(o[n],t,e,i)}return t}function st(t,e){return ot(t,e,{merger:at})}function at(t,e,i){if(!it(t))return;const n=e[t],o=i[t];U(n)&&U(o)?st(n,o):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=et(o))}function rt(t,e){const i=t.indexOf(".",e);return-1===i?t.length:i}function lt(t,e){if(""===e)return t;let i=0,n=rt(e,i);for(;t&&n>i;)t=t[e.substr(i,n-i)],i=n+1,n=rt(e,i);return t}function ct(t){return t.charAt(0).toUpperCase()+t.slice(1)}const ht=t=>void 0!==t,dt=t=>"function"==typeof t,ut=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0},ft=Object.create(null),gt=Object.create(null);function pt(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;e<n;++e){const n=i[e];t=t[n]||(t[n]=Object.create(null))}return t}function mt(t,e,i){return"string"==typeof e?ot(pt(t,e),i):ot(pt(t,""),e)}var xt=new class{constructor(t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>N(e.backgroundColor),this.hoverBorderColor=(t,e)=>N(e.borderColor),this.hoverColor=(t,e)=>N(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.describe(t)}set(t,e){return mt(this,t,e)}get(t){return pt(this,t)}describe(t,e){return mt(gt,t,e)}override(t,e){return mt(ft,t,e)}route(t,e,i,n){const o=pt(this,t),s=pt(this,i),a="_"+e;Object.defineProperties(o,{[a]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[a],e=s[n];return U(t)?Object.assign({},e,t):K(t,e)},set(t){this[a]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});const bt=Math.PI,_t=2*bt,yt=_t+bt,vt=Number.POSITIVE_INFINITY,wt=bt/180,Mt=bt/2,kt=bt/4,St=2*bt/3,Pt=Math.log10,Dt=Math.sign;function Ct(t){const e=Math.round(t);t=At(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(Pt(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function Ot(t){const e=[],i=Math.sqrt(t);let n;for(n=1;n<i;n++)t%n==0&&(e.push(n),e.push(t/n));return i===(0|i)&&e.push(i),e.sort(((t,e)=>t-e)).pop(),e}function Tt(t){return!isNaN(parseFloat(t))&&isFinite(t)}function At(t,e,i){return Math.abs(t-e)<i}function Lt(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}function Rt(t,e,i){let n,o,s;for(n=0,o=t.length;n<o;n++)s=t[n][i],isNaN(s)||(e.min=Math.min(e.min,s),e.max=Math.max(e.max,s))}function Et(t){return t*(bt/180)}function It(t){return t*(180/bt)}function zt(t){if(!X(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}function Ft(t,e){const i=e.x-t.x,n=e.y-t.y,o=Math.sqrt(i*i+n*n);let s=Math.atan2(n,i);return s<-.5*bt&&(s+=_t),{angle:s,distance:o}}function Bt(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Vt(t,e){return(t-e+yt)%_t-bt}function Wt(t){return(t%_t+_t)%_t}function Nt(t,e,i,n){const o=Wt(t),s=Wt(e),a=Wt(i),r=Wt(s-o),l=Wt(a-o),c=Wt(o-s),h=Wt(o-a);return o===s||o===a||n&&s===a||r>l&&c<h}function Ht(t,e,i){return Math.max(e,Math.min(i,t))}function jt(t){return Ht(t,-32768,32767)}function $t(t){return!t||$(t.size)||$(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function Yt(t,e,i,n,o){let s=e[o];return s||(s=e[o]=t.measureText(o).width,i.push(o)),s>n&&(n=s),n}function Ut(t,e,i,n){let o=(n=n||{}).data=n.data||{},s=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(o=n.data={},s=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let a=0;const r=i.length;let l,c,h,d,u;for(l=0;l<r;l++)if(d=i[l],null!=d&&!0!==Y(d))a=Yt(t,o,s,a,d);else if(Y(d))for(c=0,h=d.length;c<h;c++)u=d[c],null==u||Y(u)||(a=Yt(t,o,s,a,u));t.restore();const f=s.length/2;if(f>i.length){for(l=0;l<f;l++)delete o[s[l]];s.splice(0,f)}return a}function Xt(t,e,i){const n=t.currentDevicePixelRatio,o=0!==i?Math.max(i/2,.5):0;return Math.round((e-o)*n)/n+o}function qt(t,e){(e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function Kt(t,e,i,n){let o,s,a,r,l;const c=e.pointStyle,h=e.rotation,d=e.radius;let u=(h||0)*wt;if(c&&"object"==typeof c&&(o=c.toString(),"[object HTMLImageElement]"===o||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(i,n),t.rotate(u),t.drawImage(c,-c.width/2,-c.height/2,c.width,c.height),void t.restore();if(!(isNaN(d)||d<=0)){switch(t.beginPath(),c){default:t.arc(i,n,d,0,_t),t.closePath();break;case"triangle":t.moveTo(i+Math.sin(u)*d,n-Math.cos(u)*d),u+=St,t.lineTo(i+Math.sin(u)*d,n-Math.cos(u)*d),u+=St,t.lineTo(i+Math.sin(u)*d,n-Math.cos(u)*d),t.closePath();break;case"rectRounded":l=.516*d,r=d-l,s=Math.cos(u+kt)*r,a=Math.sin(u+kt)*r,t.arc(i-s,n-a,l,u-bt,u-Mt),t.arc(i+a,n-s,l,u-Mt,u),t.arc(i+s,n+a,l,u,u+Mt),t.arc(i-a,n+s,l,u+Mt,u+bt),t.closePath();break;case"rect":if(!h){r=Math.SQRT1_2*d,t.rect(i-r,n-r,2*r,2*r);break}u+=kt;case"rectRot":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+a,n-s),t.lineTo(i+s,n+a),t.lineTo(i-a,n+s),t.closePath();break;case"crossRot":u+=kt;case"cross":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a),t.moveTo(i+a,n-s),t.lineTo(i-a,n+s);break;case"star":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a),t.moveTo(i+a,n-s),t.lineTo(i-a,n+s),u+=kt,s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a),t.moveTo(i+a,n-s),t.lineTo(i-a,n+s);break;case"line":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a);break;case"dash":t.moveTo(i,n),t.lineTo(i+Math.cos(u)*d,n+Math.sin(u)*d)}t.fill(),e.borderWidth>0&&t.stroke()}}function Gt(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function Zt(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Qt(t){t.restore()}function Jt(t,e,i,n,o){if(!e)return t.lineTo(i.x,i.y);if("middle"===o){const n=(e.x+i.x)/2;t.lineTo(n,e.y),t.lineTo(n,i.y)}else"after"===o!=!!n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function te(t,e,i,n){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(n?e.cp1x:e.cp2x,n?e.cp1y:e.cp2y,n?i.cp2x:i.cp1x,n?i.cp2y:i.cp1y,i.x,i.y)}function ee(t,e,i,n,o,s={}){const a=Y(e)?e:[e],r=s.strokeWidth>0&&""!==s.strokeColor;let l,c;for(t.save(),t.font=o.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]);$(e.rotation)||t.rotate(e.rotation);e.color&&(t.fillStyle=e.color);e.textAlign&&(t.textAlign=e.textAlign);e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,s),l=0;l<a.length;++l)c=a[l],r&&(s.strokeColor&&(t.strokeStyle=s.strokeColor),$(s.strokeWidth)||(t.lineWidth=s.strokeWidth),t.strokeText(c,i,n,s.maxWidth)),t.fillText(c,i,n,s.maxWidth),ie(t,i,n,c,s),n+=o.lineHeight;t.restore()}function ie(t,e,i,n,o){if(o.strikethrough||o.underline){const s=t.measureText(n),a=e-s.actualBoundingBoxLeft,r=e+s.actualBoundingBoxRight,l=i-s.actualBoundingBoxAscent,c=i+s.actualBoundingBoxDescent,h=o.strikethrough?(l+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=o.decorationWidth||2,t.moveTo(a,h),t.lineTo(r,h),t.stroke()}}function ne(t,e){const{x:i,y:n,w:o,h:s,radius:a}=e;t.arc(i+a.topLeft,n+a.topLeft,a.topLeft,-Mt,bt,!0),t.lineTo(i,n+s-a.bottomLeft),t.arc(i+a.bottomLeft,n+s-a.bottomLeft,a.bottomLeft,bt,Mt,!0),t.lineTo(i+o-a.bottomRight,n+s),t.arc(i+o-a.bottomRight,n+s-a.bottomRight,a.bottomRight,Mt,0,!0),t.lineTo(i+o,n+a.topRight),t.arc(i+o-a.topRight,n+a.topRight,a.topRight,0,-Mt,!0),t.lineTo(i+a.topLeft,n)}function oe(t,e,i){i=i||(i=>t[i]<e);let n,o=t.length-1,s=0;for(;o-s>1;)n=s+o>>1,i(n)?s=n:o=n;return{lo:s,hi:o}}const se=(t,e,i)=>oe(t,i,(n=>t[n][e]<i)),ae=(t,e,i)=>oe(t,i,(n=>t[n][e]>=i));function re(t,e,i){let n=0,o=t.length;for(;n<o&&t[n]<e;)n++;for(;o>n&&t[o-1]>i;)o--;return n>0||o<t.length?t.slice(n,o):t}const le=["push","pop","shift","splice","unshift"];function ce(t,e){t._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),le.forEach((e=>{const i="_onData"+ct(e),n=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...e){const o=n.apply(this,e);return t._chartjs.listeners.forEach((t=>{"function"==typeof t[i]&&t[i](...e)})),o}})})))}function he(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,o=n.indexOf(e);-1!==o&&n.splice(o,1),n.length>0||(le.forEach((e=>{delete t[e]})),delete t._chartjs)}function de(t){const e=new Set;let i,n;for(i=0,n=t.length;i<n;++i)e.add(t[i]);return e.size===n?t:Array.from(e)}function ue(){return"undefined"!=typeof window&&"undefined"!=typeof document}function fe(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function ge(t,e,i){let n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}const pe=t=>window.getComputedStyle(t,null);function me(t,e){return pe(t).getPropertyValue(e)}const xe=["top","right","bottom","left"];function be(t,e,i){const n={};i=i?"-"+i:"";for(let o=0;o<4;o++){const s=xe[o];n[s]=parseFloat(t[e+"-"+s+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function _e(t,e){const{canvas:i,currentDevicePixelRatio:n}=e,o=pe(i),s="border-box"===o.boxSizing,a=be(o,"padding"),r=be(o,"border","width"),{x:l,y:c,box:h}=function(t,e){const i=t.native||t,n=i.touches,o=n&&n.length?n[0]:i,{offsetX:s,offsetY:a}=o;let r,l,c=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(s,a,i.target))r=s,l=a;else{const t=e.getBoundingClientRect();r=o.clientX-t.left,l=o.clientY-t.top,c=!0}return{x:r,y:l,box:c}}(t,i),d=a.left+(h&&r.left),u=a.top+(h&&r.top);let{width:f,height:g}=e;return s&&(f-=a.width+r.width,g-=a.height+r.height),{x:Math.round((l-d)/f*i.width/n),y:Math.round((c-u)/g*i.height/n)}}const ye=t=>Math.round(10*t)/10;function ve(t,e,i,n){const o=pe(t),s=be(o,"margin"),a=ge(o.maxWidth,t,"clientWidth")||vt,r=ge(o.maxHeight,t,"clientHeight")||vt,l=function(t,e,i){let n,o;if(void 0===e||void 0===i){const s=fe(t);if(s){const t=s.getBoundingClientRect(),a=pe(s),r=be(a,"border","width"),l=be(a,"padding");e=t.width-l.width-r.width,i=t.height-l.height-r.height,n=ge(a.maxWidth,s,"clientWidth"),o=ge(a.maxHeight,s,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||vt,maxHeight:o||vt}}(t,e,i);let{width:c,height:h}=l;if("content-box"===o.boxSizing){const t=be(o,"border","width"),e=be(o,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-s.width),h=Math.max(0,n?Math.floor(c/n):h-s.height),c=ye(Math.min(c,a,l.maxWidth)),h=ye(Math.min(h,r,l.maxHeight)),c&&!h&&(h=ye(c/2)),{width:c,height:h}}function we(t,e,i){const n=e||1,o=Math.floor(t.height*n),s=Math.floor(t.width*n);t.height=o/n,t.width=s/n;const a=t.canvas;return a.style&&(i||!a.style.height&&!a.style.width)&&(a.style.height=`${t.height}px`,a.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||a.height!==o||a.width!==s)&&(t.currentDevicePixelRatio=n,a.height=o,a.width=s,t.ctx.setTransform(n,0,0,n,0,0),!0)}const Me=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function ke(t,e){const i=me(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Se(t,e){return"native"in t?{x:t.x,y:t.y}:_e(t,e)}function Pe(t,e,i,n){const{controller:o,data:s,_sorted:a}=t,r=o._cachedMeta.iScale;if(r&&e===r.axis&&a&&s.length){const t=r._reversePixels?ae:se;if(!n)return t(s,e,i);if(o._sharedOptions){const n=s[0],o="function"==typeof n.getRange&&n.getRange(e);if(o){const n=t(s,e,i-o),a=t(s,e,i+o);return{lo:n.lo,hi:a.hi}}}}return{lo:0,hi:s.length-1}}function De(t,e,i,n,o){const s=t.getSortedVisibleDatasetMetas(),a=i[e];for(let t=0,i=s.length;t<i;++t){const{index:i,data:r}=s[t],{lo:l,hi:c}=Pe(s[t],e,a,o);for(let t=l;t<=c;++t){const e=r[t];e.skip||n(e,i,t)}}}function Ce(t,e,i,n){const o=[];if(!Gt(e,t.chartArea,t._minPadding))return o;return De(t,i,e,(function(t,i,s){t.inRange(e.x,e.y,n)&&o.push({element:t,datasetIndex:i,index:s})}),!0),o}function Oe(t,e,i,n,o){const s=function(t){const e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,n){const o=e?Math.abs(t.x-n.x):0,s=i?Math.abs(t.y-n.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(s,2))}}(i);let a=Number.POSITIVE_INFINITY,r=[];if(!Gt(e,t.chartArea,t._minPadding))return r;return De(t,i,e,(function(i,l,c){if(n&&!i.inRange(e.x,e.y,o))return;const h=i.getCenterPoint(o);if(!Gt(h,t.chartArea,t._minPadding)&&!i.inRange(e.x,e.y,o))return;const d=s(e,h);d<a?(r=[{element:i,datasetIndex:l,index:c}],a=d):d===a&&r.push({element:i,datasetIndex:l,index:c})})),r}function Te(t,e,i,n){const o=Se(e,t),s=[],a=i.axis,r="x"===a?"inXRange":"inYRange";let l=!1;return function(t,e){const i=t.getSortedVisibleDatasetMetas();let n,o,s;for(let t=0,a=i.length;t<a;++t){({index:n,data:o}=i[t]);for(let t=0,i=o.length;t<i;++t)s=o[t],s.skip||e(s,n,t)}}(t,((t,e,i)=>{t[r](o[a],n)&&s.push({element:t,datasetIndex:e,index:i}),t.inRange(o.x,o.y,n)&&(l=!0)})),i.intersect&&!l?[]:s}var Ae={modes:{index(t,e,i,n){const o=Se(e,t),s=i.axis||"x",a=i.intersect?Ce(t,o,s,n):Oe(t,o,s,!1,n),r=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=a[0].index,i=t.data[e];i&&!i.skip&&r.push({element:i,datasetIndex:t.index,index:e})})),r):[]},dataset(t,e,i,n){const o=Se(e,t),s=i.axis||"xy";let a=i.intersect?Ce(t,o,s,n):Oe(t,o,s,!1,n);if(a.length>0){const e=a[0].datasetIndex,i=t.getDatasetMeta(e).data;a=[];for(let t=0;t<i.length;++t)a.push({element:i[t],datasetIndex:e,index:t})}return a},point:(t,e,i,n)=>Ce(t,Se(e,t),i.axis||"xy",n),nearest:(t,e,i,n)=>Oe(t,Se(e,t),i.axis||"xy",i.intersect,n),x:(t,e,i,n)=>(i.axis="x",Te(t,e,i,n)),y:(t,e,i,n)=>(i.axis="y",Te(t,e,i,n))}};const Le=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),Re=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function Ee(t,e){const i=(""+t).match(Le);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}function Ie(t,e){const i={},n=U(e),o=n?Object.keys(e):e,s=U(t)?n?i=>K(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of o)i[t]=+s(t)||0;return i}function ze(t){return Ie(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Fe(t){return Ie(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Be(t){const e=ze(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Ve(t,e){t=t||{},e=e||xt.font;let i=K(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=K(t.style,e.style);n&&!(""+n).match(Re)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const o={family:K(t.family,e.family),lineHeight:Ee(K(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:K(t.weight,e.weight),string:""};return o.string=$t(o),o}function We(t,e,i,n){let o,s,a,r=!0;for(o=0,s=t.length;o<s;++o)if(a=t[o],void 0!==a&&(void 0!==e&&"function"==typeof a&&(a=a(e),r=!1),void 0!==i&&Y(a)&&(a=a[i%a.length],r=!1),void 0!==a))return n&&!r&&(n.cacheable=!1),a}function Ne(t,e){const{min:i,max:n}=t;return{min:i-Math.abs(Z(e,i)),max:n+Z(e,n)}}const He=["left","top","right","bottom"];function je(t,e){return t.filter((t=>t.pos===e))}function $e(t,e){return t.filter((t=>-1===He.indexOf(t.pos)&&t.box.axis===e))}function Ye(t,e){return t.sort(((t,i)=>{const n=e?i:t,o=e?t:i;return n.weight===o.weight?n.index-o.index:n.weight-o.weight}))}function Ue(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:o}=i;if(!t||!He.includes(n))continue;const s=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=o}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:o}=e;let s,a,r;for(s=0,a=t.length;s<a;++s){r=t[s];const{fullSize:a}=r.box,l=i[r.stack],c=l&&r.stackWeight/l.weight;r.horizontal?(r.width=c?c*n:a&&e.availableWidth,r.height=o):(r.width=n,r.height=c?c*o:a&&e.availableHeight)}return i}function Xe(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function qe(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Ke(t,e,i,n){const{pos:o,box:s}=i,a=t.maxPadding;if(!U(o)){i.size&&(t[o]-=i.size);const e=n[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?s.height:s.width),i.size=e.size/e.count,t[o]+=i.size}s.getPadding&&qe(a,s.getPadding());const r=Math.max(0,e.outerWidth-Xe(a,t,"left","right")),l=Math.max(0,e.outerHeight-Xe(a,t,"top","bottom")),c=r!==t.w,h=l!==t.h;return t.w=r,t.h=l,i.horizontal?{same:c,other:h}:{same:h,other:c}}function Ge(t,e){const i=e.maxPadding;function n(t){const n={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{n[t]=Math.max(e[t],i[t])})),n}return n(t?["left","right"]:["top","bottom"])}function Ze(t,e,i,n){const o=[];let s,a,r,l,c,h;for(s=0,a=t.length,c=0;s<a;++s){r=t[s],l=r.box,l.update(r.width||e.w,r.height||e.h,Ge(r.horizontal,e));const{same:a,other:d}=Ke(e,i,r,n);c|=a&&o.length,h=h||d,l.fullSize||o.push(r)}return c&&Ze(o,e,i,n)||h}function Qe(t,e,i,n,o){t.top=i,t.left=e,t.right=e+n,t.bottom=i+o,t.width=n,t.height=o}function Je(t,e,i,n){const o=i.padding;let{x:s,y:a}=e;for(const r of t){const t=r.box,l=n[r.stack]||{count:1,placed:0,weight:1},c=r.stackWeight/l.weight||1;if(r.horizontal){const n=e.w*c,s=l.size||t.height;ht(l.start)&&(a=l.start),t.fullSize?Qe(t,o.left,a,i.outerWidth-o.right-o.left,s):Qe(t,e.left+l.placed,a,n,s),l.start=a,l.placed+=n,a=t.bottom}else{const n=e.h*c,a=l.size||t.width;ht(l.start)&&(s=l.start),t.fullSize?Qe(t,s,o.top,a,i.outerHeight-o.bottom-o.top):Qe(t,s,e.top+l.placed,a,n),l.start=s,l.placed+=n,s=t.right}}e.x=s,e.y=a}xt.set("layout",{padding:{top:0,right:0,bottom:0,left:0}});var ti={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(t,e,i,n){if(!t)return;const o=Be(t.options.layout.padding),s=Math.max(e-o.width,0),a=Math.max(i-o.height,0),r=function(t){const e=function(t){const e=[];let i,n,o,s,a,r;for(i=0,n=(t||[]).length;i<n;++i)o=t[i],({position:s,options:{stack:a,stackWeight:r=1}}=o),e.push({index:i,box:o,pos:s,horizontal:o.isHorizontal(),weight:o.weight,stack:a&&s+a,stackWeight:r});return e}(t),i=Ye(e.filter((t=>t.box.fullSize)),!0),n=Ye(je(e,"left"),!0),o=Ye(je(e,"right")),s=Ye(je(e,"top"),!0),a=Ye(je(e,"bottom")),r=$e(e,"x"),l=$e(e,"y");return{fullSize:i,leftAndTop:n.concat(s),rightAndBottom:o.concat(l).concat(a).concat(r),chartArea:je(e,"chartArea"),vertical:n.concat(o).concat(l),horizontal:s.concat(a).concat(r)}}(t.boxes),l=r.vertical,c=r.horizontal;J(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const h=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,d=Object.freeze({outerWidth:e,outerHeight:i,padding:o,availableWidth:s,availableHeight:a,vBoxMaxWidth:s/2/h,hBoxMaxHeight:a/2}),u=Object.assign({},o);qe(u,Be(n));const f=Object.assign({maxPadding:u,w:s,h:a,x:o.left,y:o.top},o),g=Ue(l.concat(c),d);Ze(r.fullSize,f,d,g),Ze(l,f,d,g),Ze(c,f,d,g)&&Ze(l,f,d,g),function(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(f),Je(r.leftAndTop,f,d,g),f.x+=f.w,f.y+=f.h,Je(r.rightAndBottom,f,d,g),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},J(r.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h)}))}};function ei(t,e=[""],i=t,n,o=(()=>t[0])){ht(n)||(n=ui("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:o,override:o=>ei([o,...t],e,i,n)};return new Proxy(s,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>ai(i,n,(()=>function(t,e,i,n){let o;for(const s of e)if(o=ui(oi(s,t),i),ht(o))return si(t,o)?hi(i,n,t,o):o}(n,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>fi(t).includes(e),ownKeys:t=>fi(t),set:(t,e,i)=>((t._storage||(t._storage=o()))[e]=i,delete t[e],delete t._keys,!0)})}function ii(t,e,i,n){const o={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:ni(t,n),setContext:e=>ii(t,e,i,n),override:o=>ii(t.override(o),e,i,n)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>ai(t,e,(()=>function(t,e,i){const{_proxy:n,_context:o,_subProxy:s,_descriptors:a}=t;let r=n[e];dt(r)&&a.isScriptable(e)&&(r=function(t,e,i,n){const{_proxy:o,_context:s,_subProxy:a,_stack:r}=i;if(r.has(t))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+t);r.add(t),e=e(s,a||n),r.delete(t),U(e)&&(e=hi(o._scopes,o,t,e));return e}(e,r,t,i));Y(r)&&r.length&&(r=function(t,e,i,n){const{_proxy:o,_context:s,_subProxy:a,_descriptors:r}=i;if(ht(s.index)&&n(t))e=e[s.index%e.length];else if(U(e[0])){const i=e,n=o._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=hi(n,o,t,l);e.push(ii(i,s,a&&a[t],r))}}return e}(e,r,t,a.isIndexable));si(e,r)&&(r=ii(r,o,s&&s[e],a));return r}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function ni(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:o=e.allKeys}=t;return{allKeys:o,scriptable:i,indexable:n,isScriptable:dt(i)?i:()=>i,isIndexable:dt(n)?n:()=>n}}const oi=(t,e)=>t?t+ct(e):e,si=(t,e)=>U(e)&&"adapters"!==t;function ai(t,e,i){let n=t[e];return ht(n)||(n=i(),ht(n)&&(t[e]=n)),n}function ri(t,e,i){return dt(t)?t(e,i):t}const li=(t,e)=>!0===t?e:"string"==typeof t?lt(e,t):void 0;function ci(t,e,i,n){for(const o of e){const e=li(i,o);if(e){t.add(e);const o=ri(e._fallback,i,e);if(ht(o)&&o!==i&&o!==n)return o}else if(!1===e&&ht(n)&&i!==n)return null}return!1}function hi(t,e,i,n){const o=e._rootScopes,s=ri(e._fallback,i,n),a=[...t,...o],r=new Set;r.add(n);let l=di(r,a,i,s||i);return null!==l&&((!ht(s)||s===i||(l=di(r,a,s,l),null!==l))&&ei(Array.from(r),[""],o,s,(()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const o=n[e];if(Y(o)&&U(i))return i;return o}(e,i,n))))}function di(t,e,i,n){for(;i;)i=ci(t,e,i,n);return i}function ui(t,e){for(const i of e){if(!i)continue;const e=i[t];if(ht(e))return e}}function fi(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}const gi=Number.EPSILON||1e-14,pi=(t,e)=>e<t.length&&!t[e].skip&&t[e],mi=t=>"x"===t?"y":"x";function xi(t,e,i,n){const o=t.skip?e:t,s=e,a=i.skip?e:i,r=Bt(s,o),l=Bt(a,s);let c=r/(r+l),h=l/(r+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const d=n*c,u=n*h;return{previous:{x:s.x-d*(a.x-o.x),y:s.y-d*(a.y-o.y)},next:{x:s.x+u*(a.x-o.x),y:s.y+u*(a.y-o.y)}}}function bi(t,e="x"){const i=mi(e),n=t.length,o=Array(n).fill(0),s=Array(n);let a,r,l,c=pi(t,0);for(a=0;a<n;++a)if(r=l,l=c,c=pi(t,a+1),l){if(c){const t=c[e]-l[e];o[a]=0!==t?(c[i]-l[i])/t:0}s[a]=r?c?Dt(o[a-1])!==Dt(o[a])?0:(o[a-1]+o[a])/2:o[a-1]:o[a]}!function(t,e,i){const n=t.length;let o,s,a,r,l,c=pi(t,0);for(let h=0;h<n-1;++h)l=c,c=pi(t,h+1),l&&c&&(At(e[h],0,gi)?i[h]=i[h+1]=0:(o=i[h]/e[h],s=i[h+1]/e[h],r=Math.pow(o,2)+Math.pow(s,2),r<=9||(a=3/Math.sqrt(r),i[h]=o*a*e[h],i[h+1]=s*a*e[h])))}(t,o,s),function(t,e,i="x"){const n=mi(i),o=t.length;let s,a,r,l=pi(t,0);for(let c=0;c<o;++c){if(a=r,r=l,l=pi(t,c+1),!r)continue;const o=r[i],h=r[n];a&&(s=(o-a[i])/3,r[`cp1${i}`]=o-s,r[`cp1${n}`]=h-s*e[c]),l&&(s=(l[i]-o)/3,r[`cp2${i}`]=o+s,r[`cp2${n}`]=h+s*e[c])}}(t,s,e)}function _i(t,e,i){return Math.max(Math.min(t,i),e)}function yi(t,e,i,n,o){let s,a,r,l;if(e.spanGaps&&(t=t.filter((t=>!t.skip))),"monotone"===e.cubicInterpolationMode)bi(t,o);else{let i=n?t[t.length-1]:t[0];for(s=0,a=t.length;s<a;++s)r=t[s],l=xi(i,r,t[Math.min(s+1,a-(n?0:1))%a],e.tension),r.cp1x=l.previous.x,r.cp1y=l.previous.y,r.cp2x=l.next.x,r.cp2y=l.next.y,i=r}e.capBezierPoints&&function(t,e){let i,n,o,s,a,r=Gt(t[0],e);for(i=0,n=t.length;i<n;++i)a=s,s=r,r=i<n-1&&Gt(t[i+1],e),s&&(o=t[i],a&&(o.cp1x=_i(o.cp1x,e.left,e.right),o.cp1y=_i(o.cp1y,e.top,e.bottom)),r&&(o.cp2x=_i(o.cp2x,e.left,e.right),o.cp2y=_i(o.cp2y,e.top,e.bottom)))}(t,i)}const vi=t=>0===t||1===t,wi=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*_t/i),Mi=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*_t/i)+1,ki={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*Mt),easeOutSine:t=>Math.sin(t*Mt),easeInOutSine:t=>-.5*(Math.cos(bt*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>vi(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>vi(t)?t:wi(t,.075,.3),easeOutElastic:t=>vi(t)?t:Mi(t,.075,.3),easeInOutElastic(t){const e=.1125;return vi(t)?t:t<.5?.5*wi(2*t,e,.45):.5+.5*Mi(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-ki.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*ki.easeInBounce(2*t):.5*ki.easeOutBounce(2*t-1)+.5};function Si(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function Pi(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function Di(t,e,i,n){const o={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},a=Si(t,o,i),r=Si(o,s,i),l=Si(s,e,i),c=Si(a,r,i),h=Si(r,l,i);return Si(c,h,i)}const Ci=new Map;function Oi(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=Ci.get(i);return n||(n=new Intl.NumberFormat(t,e),Ci.set(i,n)),n}(e,i).format(t)}function Ti(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function Ai(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function Li(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Ri(t){return"angle"===t?{between:Nt,compare:Vt,normalize:Wt}:{between:(t,e,i)=>t>=Math.min(e,i)&&t<=Math.max(i,e),compare:(t,e)=>t-e,normalize:t=>t}}function Ei({start:t,end:e,count:i,loop:n,style:o}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:o}}function Ii(t,e,i){if(!i)return[t];const{property:n,start:o,end:s}=i,a=e.length,{compare:r,between:l,normalize:c}=Ri(n),{start:h,end:d,loop:u,style:f}=function(t,e,i){const{property:n,start:o,end:s}=i,{between:a,normalize:r}=Ri(n),l=e.length;let c,h,{start:d,end:u,loop:f}=t;if(f){for(d+=l,u+=l,c=0,h=l;c<h&&a(r(e[d%l][n]),o,s);++c)d--,u--;d%=l,u%=l}return u<d&&(u+=l),{start:d,end:u,loop:f,style:t.style}}(t,e,i),g=[];let p,m,x,b=!1,_=null;const y=()=>b||l(o,x,p)&&0!==r(o,x),v=()=>!b||0===r(s,p)||l(s,x,p);for(let t=h,i=h;t<=d;++t)m=e[t%a],m.skip||(p=c(m[n]),p!==x&&(b=l(p,o,s),null===_&&y()&&(_=0===r(p,o)?t:i),null!==_&&v()&&(g.push(Ei({start:_,end:t,loop:u,count:a,style:f})),_=null),i=t,x=p));return null!==_&&g.push(Ei({start:_,end:d,loop:u,count:a,style:f})),g}function zi(t,e){const i=[],n=t.segments;for(let o=0;o<n.length;o++){const s=Ii(n[o],t.points,e);s.length&&i.push(...s)}return i}function Fi(t,e){const i=t.points,n=t.options.spanGaps,o=i.length;if(!o)return[];const s=!!t._loop,{start:a,end:r}=function(t,e,i,n){let o=0,s=e-1;if(i&&!n)for(;o<e&&!t[o].skip;)o++;for(;o<e&&t[o].skip;)o++;for(o%=e,i&&(s+=o);s>o&&t[s%e].skip;)s--;return s%=e,{start:o,end:s}}(i,o,s,n);if(!0===n)return Bi(t,[{start:a,end:r,loop:s}],i,e);return Bi(t,function(t,e,i,n){const o=t.length,s=[];let a,r=e,l=t[e];for(a=e+1;a<=i;++a){const i=t[a%o];i.skip||i.stop?l.skip||(n=!1,s.push({start:e%o,end:(a-1)%o,loop:n}),e=r=i.stop?a:null):(r=a,l.skip&&(e=a)),l=i}return null!==r&&s.push({start:e%o,end:r%o,loop:n}),s}(i,a,r<a?r+o:r,!!t._fullLoop&&0===a&&r===o-1),i,e)}function Bi(t,e,i,n){return n&&n.setContext&&i?function(t,e,i,n){const o=Vi(t.options),s=i.length,a=[];let r=e[0].start,l=r;for(const c of e){let e,h=o,d=i[r%s];for(l=r+1;l<=c.end;l++){const o=i[l%s];e=Vi(n.setContext({type:"segment",p0:d,p1:o,p0DataIndex:(l-1)%s,p1DataIndex:l%s,datasetIndex:t._datasetIndex})),Wi(e,h)&&(a.push({start:r,end:l-1,loop:c.loop,style:h}),h=e,r=l-1),d=o,h=e}r<l-1&&(a.push({start:r,end:l-1,loop:c.loop,style:e}),r=l-1)}return a}(t,e,i,n):e}function Vi(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Wi(t,e){return e&&JSON.stringify(t)!==JSON.stringify(e)}var Ni=Object.freeze({__proto__:null,easingEffects:ki,color:W,getHoverColor:N,noop:H,uid:j,isNullOrUndef:$,isArray:Y,isObject:U,isFinite:X,finiteOrDefault:q,valueOrDefault:K,toPercentage:G,toDimension:Z,callback:Q,each:J,_elementsEqual:tt,clone:et,_merger:nt,merge:ot,mergeIf:st,_mergerIf:at,_deprecated:function(t,e,i,n){void 0!==e&&console.warn(t+': "'+i+'" is deprecated. Please use "'+n+'" instead')},resolveObjectKey:lt,_capitalize:ct,defined:ht,isFunction:dt,setsEqual:ut,toFontString:$t,_measureText:Yt,_longestText:Ut,_alignPixel:Xt,clearCanvas:qt,drawPoint:Kt,_isPointInArea:Gt,clipArea:Zt,unclipArea:Qt,_steppedLineTo:Jt,_bezierCurveTo:te,renderText:ee,addRoundedRectPath:ne,_lookup:oe,_lookupByKey:se,_rlookupByKey:ae,_filterBetween:re,listenArrayEvents:ce,unlistenArrayEvents:he,_arrayUnique:de,_createResolver:ei,_attachContext:ii,_descriptors:ni,splineCurve:xi,splineCurveMonotone:bi,_updateBezierControlPoints:yi,_isDomSupported:ue,_getParentNode:fe,getStyle:me,getRelativePosition:_e,getMaximumSize:ve,retinaScale:we,supportsEventListenerOptions:Me,readUsedSize:ke,fontString:function(t,e,i){return e+" "+t+"px "+i},requestAnimFrame:t,throttled:e,debounce:i,_toLeftRightCenter:n,_alignStartEnd:o,_textX:s,_pointInLine:Si,_steppedInterpolation:Pi,_bezierInterpolation:Di,formatNumber:Oi,toLineHeight:Ee,_readValueToProps:Ie,toTRBL:ze,toTRBLCorners:Fe,toPadding:Be,toFont:Ve,resolve:We,_addGrace:Ne,PI:bt,TAU:_t,PITAU:yt,INFINITY:vt,RAD_PER_DEG:wt,HALF_PI:Mt,QUARTER_PI:kt,TWO_THIRDS_PI:St,log10:Pt,sign:Dt,niceNum:Ct,_factorize:Ot,isNumber:Tt,almostEquals:At,almostWhole:Lt,_setMinAndMaxByKey:Rt,toRadians:Et,toDegrees:It,_decimalPlaces:zt,getAngleFromPoint:Ft,distanceBetweenPoints:Bt,_angleDiff:Vt,_normalizeAngle:Wt,_angleBetween:Nt,_limitValue:Ht,_int16Range:jt,getRtlAdapter:Ti,overrideTextDirection:Ai,restoreTextDirection:Li,_boundSegment:Ii,_boundSegments:zi,_computeSegments:Fi});class Hi{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}}class ji extends Hi{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}}const $i={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Yi=t=>null===t||""===t;const Ui=!!Me&&{passive:!0};function Xi(t,e,i){t.canvas.removeEventListener(e,i,Ui)}function qi(t,e,i){const n=t.canvas,o=new MutationObserver((t=>{for(const e of t)for(const t of e.addedNodes)if(t===n||t.contains(n))return i()}));return o.observe(document,{childList:!0,subtree:!0}),o}function Ki(t,e,i){const n=t.canvas,o=new MutationObserver((t=>{for(const e of t)for(const t of e.removedNodes)if(t===n||t.contains(n))return i()}));return o.observe(document,{childList:!0,subtree:!0}),o}const Gi=new Map;let Zi=0;function Qi(){const t=window.devicePixelRatio;t!==Zi&&(Zi=t,Gi.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function Ji(t,i,n){const o=t.canvas,s=o&&fe(o);if(!s)return;const a=e(((t,e)=>{const i=s.clientWidth;n(t,e),i<s.clientWidth&&n()}),window),r=new ResizeObserver((t=>{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||a(i,n)}));return r.observe(s),function(t,e){Gi.size||window.addEventListener("resize",Qi),Gi.set(t,e)}(t,a),r}function tn(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){Gi.delete(t),Gi.size||window.removeEventListener("resize",Qi)}(t)}function en(t,i,n){const o=t.canvas,s=e((e=>{null!==t.ctx&&n(function(t,e){const i=$i[t.type]||t.type,{x:n,y:o}=_e(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==o?o:null}}(e,t))}),t,(t=>{const e=t[0];return[e,e.offsetX,e.offsetY]}));return function(t,e,i){t.addEventListener(e,i,Ui)}(o,i,s),s}class nn extends Hi{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),o=t.getAttribute("width");if(t.$chartjs={initial:{height:n,width:o,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Yi(o)){const e=ke(t,"width");void 0!==e&&(t.width=e)}if(Yi(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=ke(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const i=e.$chartjs.initial;["height","width"].forEach((t=>{const n=i[t];$(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=i.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),o={attach:qi,detach:Ki,resize:Ji}[e]||en;n[e]=o(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;({attach:tn,detach:tn,resize:tn}[e]||Xi)(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return ve(t,e,i,n)}isAttached(t){const e=fe(t);return!(!e||!e.isConnected)}}function on(t){return!ue()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?ji:nn}var sn=Object.freeze({__proto__:null,_detectPlatform:on,BasePlatform:Hi,BasicPlatform:ji,DomPlatform:nn});const an="transparent",rn={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=W(t||an),o=n.valid&&W(e||an);return o&&o.valid?o.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class ln{constructor(t,e,i,n){const o=e[i];n=We([t.to,n,o,t.from]);const s=We([t.from,o,n]);this._active=!0,this._fn=t.fn||rn[t.type||typeof s],this._easing=ki[t.easing]||ki.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=s,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){const n=this;if(n._active){n._notify(!1);const o=n._target[n._prop],s=i-n._start,a=n._duration-s;n._start=i,n._duration=Math.floor(Math.max(a,t.duration)),n._total+=s,n._loop=!!t.loop,n._to=We([t.to,e,o,t.from]),n._from=We([t.from,o,e])}}cancel(){const t=this;t._active&&(t.tick(Date.now()),t._active=!1,t._notify(!1))}tick(t){const e=this,i=t-e._start,n=e._duration,o=e._prop,s=e._from,a=e._loop,r=e._to;let l;if(e._active=s!==r&&(a||i<n),!e._active)return e._target[o]=r,void e._notify(!0);i<0?e._target[o]=s:(l=i/n%2,l=a&&l>1?2-l:l,l=e._easing(Math.min(1,Math.max(0,l))),e._target[o]=e._fn(s,r,l))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t<i.length;t++)i[t][e]()}}xt.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const cn=Object.keys(xt.animation);xt.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),xt.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),xt.describe("animations",{_fallback:"animation"}),xt.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class hn{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!U(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const n=t[i];if(!U(n))return;const o={};for(const t of cn)o[t]=n[t];(Y(n.properties)&&n.properties||[i]).forEach((t=>{t!==i&&e.has(t)||e.set(t,o)}))}))}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!n)return[];const o=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e<n.length;e++){const o=t[n[e]];o&&o.active()&&i.push(o.wait())}return Promise.all(i)}(t.options.$animations,i).then((()=>{t.options=i}),(()=>{})),o}_createAnimations(t,e){const i=this._properties,n=[],o=t.$animations||(t.$animations={}),s=Object.keys(e),a=Date.now();let r;for(r=s.length-1;r>=0;--r){const l=s[r];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const c=e[l];let h=o[l];const d=i.get(l);if(h){if(d&&h.active()){h.update(d,c,a);continue}h.cancel()}d&&d.duration?(o[l]=h=new ln(d,t,l,c),n.push(h)):t[l]=c}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(a.add(this._chart,i),!0):void 0}}function dn(t,e){const i=t&&t.options||{},n=i.reverse,o=void 0===i.min?e:0,s=void 0===i.max?e:0;return{start:n?s:o,end:n?o:s}}function un(t,e){const i=[],n=t._getSortedDatasetMetas(e);let o,s;for(o=0,s=n.length;o<s;++o)i.push(n[o].index);return i}function fn(t,e,i,n){const o=t.keys,s="single"===n.mode;let a,r,l,c;if(null!==e){for(a=0,r=o.length;a<r;++a){if(l=+o[a],l===i){if(n.all)continue;break}c=t.values[l],X(c)&&(s||0===e||Dt(e)===Dt(c))&&(e+=c)}return e}}function gn(t,e){const i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function pn(t,e,i){const n=t[e]||(t[e]={});return n[i]||(n[i]={})}function mn(t,e,i,n){for(const o of e.getMatchingVisibleMetas(n).reverse()){const e=t[o.index];if(i&&e>0||!i&&e<0)return o.index}return null}function xn(t,e){const{chart:i,_cachedMeta:n}=t,o=i._stacks||(i._stacks={}),{iScale:s,vScale:a,index:r}=n,l=s.axis,c=a.axis,h=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(s,a,n),d=e.length;let u;for(let t=0;t<d;++t){const i=e[t],{[l]:s,[c]:d}=i;u=(i._stacks||(i._stacks={}))[c]=pn(o,h,s),u[r]=d,u._top=mn(u,a,!0,n.type),u._bottom=mn(u,a,!1,n.type)}}function bn(t,e){const i=t.scales;return Object.keys(i).filter((t=>i[t].axis===e)).shift()}function _n(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i]}}}const yn=t=>"reset"===t||"none"===t,vn=(t,e)=>e?t:Object.assign({},t);class wn{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this,e=t._cachedMeta;t.configure(),t.linkScales(),e._stacked=gn(e.vScale,e),t.addElements()}updateIndex(t){this.index!==t&&_n(this._cachedMeta),this.index=t}linkScales(){const t=this,e=t.chart,i=t._cachedMeta,n=t.getDataset(),o=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,s=i.xAxisID=K(n.xAxisID,bn(e,"x")),a=i.yAxisID=K(n.yAxisID,bn(e,"y")),r=i.rAxisID=K(n.rAxisID,bn(e,"r")),l=i.indexAxis,c=i.iAxisID=o(l,s,a,r),h=i.vAxisID=o(l,a,s,r);i.xScale=t.getScaleForId(s),i.yScale=t.getScaleForId(a),i.rScale=t.getScaleForId(r),i.iScale=t.getScaleForId(c),i.vScale=t.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&he(this._data,this),t._stacked&&_n(t)}_dataCheck(){const t=this,e=t.getDataset(),i=e.data||(e.data=[]),n=t._data;if(U(i))t._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,o,s;for(n=0,o=e.length;n<o;++n)s=e[n],i[n]={x:s,y:t[s]};return i}(i);else if(n!==i){if(n){he(n,t);const e=t._cachedMeta;_n(e),e._parsed=[]}i&&Object.isExtensible(i)&&ce(i,t),t._syncList=[],t._data=i}}addElements(){const t=this,e=t._cachedMeta;t._dataCheck(),t.datasetElementType&&(e.dataset=new t.datasetElementType)}buildOrUpdateElements(t){const e=this,i=e._cachedMeta,n=e.getDataset();let o=!1;e._dataCheck();const s=i._stacked;i._stacked=gn(i.vScale,i),i.stack!==n.stack&&(o=!0,_n(i),i.stack=n.stack),e._resyncElements(t),(o||s!==i._stacked)&&xn(e,i._parsed)}configure(){const t=this,e=t.chart.config,i=e.datasetScopeKeys(t._type),n=e.getOptionScopes(t.getDataset(),i,!0);t.options=e.createResolver(n,t.getContext()),t._parsing=t.options.parsing}parse(t,e){const i=this,{_cachedMeta:n,_data:o}=i,{iScale:s,_stacked:a}=n,r=s.axis;let l,c,h,d=0===t&&e===o.length||n._sorted,u=t>0&&n._parsed[t-1];if(!1===i._parsing)n._parsed=o,n._sorted=!0,h=o;else{h=Y(o[t])?i.parseArrayData(n,o,t,e):U(o[t])?i.parseObjectData(n,o,t,e):i.parsePrimitiveData(n,o,t,e);const s=()=>null===c[r]||u&&c[r]<u[r];for(l=0;l<e;++l)n._parsed[l+t]=c=h[l],d&&(s()&&(d=!1),u=c);n._sorted=d}a&&xn(i,h)}parsePrimitiveData(t,e,i,n){const{iScale:o,vScale:s}=t,a=o.axis,r=s.axis,l=o.getLabels(),c=o===s,h=new Array(n);let d,u,f;for(d=0,u=n;d<u;++d)f=d+i,h[d]={[a]:c||o.parse(l[f],f),[r]:s.parse(e[f],f)};return h}parseArrayData(t,e,i,n){const{xScale:o,yScale:s}=t,a=new Array(n);let r,l,c,h;for(r=0,l=n;r<l;++r)c=r+i,h=e[c],a[r]={x:o.parse(h[0],c),y:s.parse(h[1],c)};return a}parseObjectData(t,e,i,n){const{xScale:o,yScale:s}=t,{xAxisKey:a="x",yAxisKey:r="y"}=this._parsing,l=new Array(n);let c,h,d,u;for(c=0,h=n;c<h;++c)d=c+i,u=e[d],l[c]={x:o.parse(lt(u,a),d),y:s.parse(lt(u,r),d)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const n=this.chart,o=this._cachedMeta,s=e[t.axis];return fn({keys:un(n,!0),values:e._stacks[t.axis]},s,o.index,{mode:i})}updateRangeFromParsed(t,e,i,n){const o=i[e.axis];let s=null===o?NaN:o;const a=n&&i._stacks[e.axis];n&&a&&(n.values=a,t.min=Math.min(t.min,s),t.max=Math.max(t.max,s),s=fn(n,o,this._cachedMeta.index,{all:!0})),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,e){const i=this,n=i._cachedMeta,o=n._parsed,s=n._sorted&&t===n.iScale,a=o.length,r=i._getOtherScale(t),l=e&&n._stacked&&{keys:un(i.chart,!0),values:null},c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:d}=function(t){const{min:e,max:i,minDefined:n,maxDefined:o}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:o?i:Number.POSITIVE_INFINITY}}(r);let u,f,g,p;function m(){return g=o[u],f=g[t.axis],p=g[r.axis],!X(f)||h>p||d<p}for(u=0;u<a&&(m()||(i.updateRangeFromParsed(c,t,g,l),!s));++u);if(s)for(u=a-1;u>=0;--u)if(!m()){i.updateRangeFromParsed(c,t,g,l);break}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,o,s;for(n=0,o=e.length;n<o;++n)s=e[n][t.axis],X(s)&&i.push(s);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,n=e.vScale,o=this.getParsed(t);return{label:i?""+i.getLabelForValue(o[i.axis]):"",value:n?""+n.getLabelForValue(o[n.axis]):""}}_update(t){const e=this,i=e._cachedMeta;e.configure(),e._cachedDataOpts={},e.update(t||"default"),i._clip=function(t){let e,i,n,o;return U(t)?(e=t.top,i=t.right,n=t.bottom,o=t.left):e=i=n=o=t,{top:e,right:i,bottom:n,left:o,disabled:!1===t}}(K(e.options.clip,function(t,e,i){if(!1===i)return!1;const n=dn(t,i),o=dn(e,i);return{top:o.end,right:n.end,bottom:o.start,left:n.start}}(i.xScale,i.yScale,e.getMaxOverflow())))}update(t){}draw(){const t=this,e=t._ctx,i=t.chart,n=t._cachedMeta,o=n.data||[],s=i.chartArea,a=[],r=t._drawStart||0,l=t._drawCount||o.length-r;let c;for(n.dataset&&n.dataset.draw(e,s,r,l),c=r;c<r+l;++c){const t=o[c];t.hidden||(t.active?a.push(t):t.draw(e,s))}for(c=0;c<a.length;++c)a[c].draw(e,s)}getStyle(t,e){const i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const n=this,o=n.getDataset();let s;if(t>=0&&t<n._cachedMeta.data.length){const e=n._cachedMeta.data[t];s=e.$context||(e.$context=function(t,e,i){return Object.assign(Object.create(t),{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}(n.getContext(),t,e)),s.parsed=n.getParsed(t),s.raw=o.data[t],s.index=s.dataIndex=t}else s=n.$context||(n.$context=function(t,e){return Object.assign(Object.create(t),{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(n.chart.getContext(),n.index)),s.dataset=o,s.index=s.datasetIndex=n.index;return s.active=!!e,s.mode=i,s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const n=this,o="active"===e,s=n._cachedDataOpts,a=t+"-"+e,r=s[a],l=n.enableOptionSharing&&ht(i);if(r)return vn(r,l);const c=n.chart.config,h=c.datasetElementScopeKeys(n._type,t),d=o?[`${t}Hover`,"hover",t,""]:[t,""],u=c.getOptionScopes(n.getDataset(),h),f=Object.keys(xt.elements[t]),g=c.resolveNamedOptions(u,f,(()=>n.getContext(i,o)),d);return g.$shared&&(g.$shared=l,s[a]=Object.freeze(vn(g,l))),g}_resolveAnimations(t,e,i){const n=this,o=n.chart,s=n._cachedDataOpts,a=`animation-${e}`,r=s[a];if(r)return r;let l;if(!1!==o.options.animation){const o=n.chart.config,s=o.datasetAnimationScopeKeys(n._type,e),a=o.getOptionScopes(n.getDataset(),s);l=o.createResolver(a,n.getContext(t,i,e))}const c=new hn(o,l&&l.animations);return l&&l._cacheable&&(s[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||yn(t)||this.chart._animationsDisabled}updateElement(t,e,i,n){yn(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!yn(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const o=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this,i=e._data,n=e._cachedMeta.data;for(const[t,i,n]of e._syncList)e[t](i,n);e._syncList=[];const o=n.length,s=i.length,a=Math.min(s,o);a&&e.parse(0,a),s>o?e._insertElements(o,s-o,t):s<o&&e._removeElements(s,o-s)}_insertElements(t,e,i=!0){const n=this,o=n._cachedMeta,s=o.data,a=t+e;let r;const l=t=>{for(t.length+=e,r=t.length-1;r>=a;r--)t[r]=t[r-e]};for(l(s),r=t;r<a;++r)s[r]=new n.dataElementType;n._parsing&&l(o._parsed),n.parse(t,e),i&&n.updateElements(s,t,e,"reset")}updateElements(t,e,i,n){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const n=i._parsed.splice(t,e);i._stacked&&_n(i,n)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,n]=t;this[e](i,n)}}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){this._sync(["_removeElements",t,e]),this._sync(["_insertElements",t,arguments.length-2])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}wn.defaults={},wn.prototype.datasetElementType=null,wn.prototype.dataElementType=null;class Mn{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return Tt(this.x)&&Tt(this.y)}getProps(t,e){const i=this,n=this.$animations;if(!e||!n)return i;const o={};return t.forEach((t=>{o[t]=n[t]&&n[t].active()?n[t]._to:i[t]})),o}}Mn.defaults={},Mn.defaultRoutes=void 0;const kn={values:t=>Y(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let o,s=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(o="scientific"),s=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const a=Pt(Math.abs(s)),r=Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:o,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),Oi(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=t/Math.pow(10,Math.floor(Pt(t)));return 1===n||2===n||5===n?kn.numeric.call(this,t,e,i):""}};var Sn={formatters:kn};function Pn(t,e){const i=t.options.ticks,n=i.maxTicksLimit||function(t){const e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),o=t._maxLength/i;return Math.floor(Math.min(n,o))}(t),o=i.major.enabled?function(t){const e=[];let i,n;for(i=0,n=t.length;i<n;i++)t[i].major&&e.push(i);return e}(e):[],s=o.length,a=o[0],r=o[s-1],l=[];if(s>n)return function(t,e,i,n){let o,s=0,a=i[0];for(n=Math.ceil(n),o=0;o<t.length;o++)o===a&&(e.push(t[o]),s++,a=i[s*n])}(e,l,o,s/n),l;const c=function(t,e,i){const n=function(t){const e=t.length;let i,n;if(e<2)return!1;for(n=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==n)return!1;return n}(t),o=e.length/i;if(!n)return Math.max(o,1);const s=Ot(n);for(let t=0,e=s.length-1;t<e;t++){const e=s[t];if(e>o)return e}return Math.max(o,1)}(o,e,n);if(s>0){let t,i;const n=s>1?Math.round((r-a)/(s-1)):null;for(Dn(e,l,c,$(n)?0:a-n,a),t=0,i=s-1;t<i;t++)Dn(e,l,c,o[t],o[t+1]);return Dn(e,l,c,r,$(n)?e.length:r+n),l}return Dn(e,l,c),l}function Dn(t,e,i,n,o){const s=K(n,0),a=Math.min(K(o,t.length),t.length);let r,l,c,h=0;for(i=Math.ceil(i),o&&(r=o-n,i=r/Math.floor(r/i)),c=s;c<0;)h++,c=Math.round(s+h*i);for(l=Math.max(s,0);l<a;l++)l===c&&(e.push(t[l]),h++,c=Math.round(s+h*i))}xt.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Sn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),xt.route("scale.ticks","color","","color"),xt.route("scale.grid","color","","borderColor"),xt.route("scale.grid","borderColor","","borderColor"),xt.route("scale.title","color","","color"),xt.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),xt.describe("scales",{_fallback:"scale"}),xt.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const Cn=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function On(t,e){const i=[],n=t.length/e,o=t.length;let s=0;for(;s<o;s+=n)i.push(t[Math.floor(s)]);return i}function Tn(t,e,i){const n=t.ticks.length,o=Math.min(e,n-1),s=t._startPixel,a=t._endPixel,r=1e-6;let l,c=t.getPixelForTick(o);if(!(i&&(l=1===n?Math.max(c-s,a-c):0===e?(t.getPixelForTick(1)-c)/2:(c-t.getPixelForTick(o-1))/2,c+=o<e?l:-l,c<s-r||c>a+r)))return c}function An(t){return t.drawTicks?t.tickLength:0}function Ln(t,e){if(!t.display)return 0;const i=Ve(t.font,e),n=Be(t.padding);return(Y(t.text)?t.text.length:1)*i.lineHeight+n.height}function Rn(t,e,i){let o=n(t);return(i&&"right"!==e||!i&&"right"===e)&&(o=(t=>"left"===t?"right":"right"===t?"left":t)(o)),o}class En extends Mn{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){const e=this;e.options=t.setContext(e.getContext()),e.axis=t.axis,e._userMin=e.parse(t.min),e._userMax=e.parse(t.max),e._suggestedMin=e.parse(t.suggestedMin),e._suggestedMax=e.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=q(t,Number.POSITIVE_INFINITY),e=q(e,Number.NEGATIVE_INFINITY),i=q(i,Number.POSITIVE_INFINITY),n=q(n,Number.NEGATIVE_INFINITY),{min:q(t,i),max:q(e,n),minDefined:X(t),maxDefined:X(e)}}getMinMax(t){const e=this;let i,{min:n,max:o,minDefined:s,maxDefined:a}=e.getUserBounds();if(s&&a)return{min:n,max:o};const r=e.getMatchingVisibleMetas();for(let l=0,c=r.length;l<c;++l)i=r[l].controller.getMinMax(e,t),s||(n=Math.min(n,i.min)),a||(o=Math.max(o,i.max));return{min:q(n,q(o,n)),max:q(o,q(n,o))}}getPadding(){const t=this;return{left:t.paddingLeft||0,top:t.paddingTop||0,right:t.paddingRight||0,bottom:t.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Q(this.options.beforeUpdate,[this])}update(t,e,i){const n=this,o=n.options.ticks,s=o.sampleSize;n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),n.ticks=null,n._labelSizes=null,n._gridLineItems=null,n._labelItems=null,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n._maxLength=n.isHorizontal()?n.width+i.left+i.right:n.height+i.top+i.bottom,n._dataLimitsCached||(n.beforeDataLimits(),n.determineDataLimits(),n.afterDataLimits(),n._range=Ne(n,n.options.grace),n._dataLimitsCached=!0),n.beforeBuildTicks(),n.ticks=n.buildTicks()||[],n.afterBuildTicks();const a=s<n.ticks.length;n._convertTicksToLabels(a?On(n.ticks,s):n.ticks),n.configure(),n.beforeCalculateLabelRotation(),n.calculateLabelRotation(),n.afterCalculateLabelRotation(),o.display&&(o.autoSkip||"auto"===o.source)&&(n.ticks=Pn(n,n.ticks),n._labelSizes=null),a&&n._convertTicksToLabels(n.ticks),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate()}configure(){const t=this;let e,i,n=t.options.reverse;t.isHorizontal()?(e=t.left,i=t.right):(e=t.top,i=t.bottom,n=!n),t._startPixel=e,t._endPixel=i,t._reversePixels=n,t._length=i-e,t._alignToPixels=t.options.alignToPixels}afterUpdate(){Q(this.options.afterUpdate,[this])}beforeSetDimensions(){Q(this.options.beforeSetDimensions,[this])}setDimensions(){const t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0}afterSetDimensions(){Q(this.options.afterSetDimensions,[this])}_callHooks(t){const e=this;e.chart.notifyPlugins(t,e.getContext()),Q(e.options[t],[e])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Q(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this,i=e.options.ticks;let n,o,s;for(n=0,o=t.length;n<o;n++)s=t[n],s.label=Q(i.callback,[s.value,n,t],e)}afterTickToLabelConversion(){Q(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Q(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this,e=t.options,i=e.ticks,n=t.ticks.length,o=i.minRotation||0,s=i.maxRotation;let a,r,l,c=o;if(!t._isVisible()||!i.display||o>=s||n<=1||!t.isHorizontal())return void(t.labelRotation=o);const h=t._getLabelSizes(),d=h.widest.width,u=h.highest.height,f=Ht(t.chart.width-d,0,t.maxWidth);a=e.offset?t.maxWidth/n:f/(n-1),d+6>a&&(a=f/(n-(e.offset?.5:1)),r=t.maxHeight-An(e.grid)-i.padding-Ln(e.title,t.chart.options.font),l=Math.sqrt(d*d+u*u),c=It(Math.min(Math.asin(Ht((h.highest.height+6)/a,-1,1)),Math.asin(Ht(r/l,-1,1))-Math.asin(Ht(u/l,-1,1)))),c=Math.max(o,Math.min(s,c))),t.labelRotation=c}afterCalculateLabelRotation(){Q(this.options.afterCalculateLabelRotation,[this])}beforeFit(){Q(this.options.beforeFit,[this])}fit(){const t=this,e={width:0,height:0},{chart:i,options:{ticks:n,title:o,grid:s}}=t,a=t._isVisible(),r=t.isHorizontal();if(a){const a=Ln(o,i.options.font);if(r?(e.width=t.maxWidth,e.height=An(s)+a):(e.height=t.maxHeight,e.width=An(s)+a),n.display&&t.ticks.length){const{first:i,last:o,widest:s,highest:a}=t._getLabelSizes(),l=2*n.padding,c=Et(t.labelRotation),h=Math.cos(c),d=Math.sin(c);if(r){const i=n.mirror?0:d*s.width+h*a.height;e.height=Math.min(t.maxHeight,e.height+i+l)}else{const i=n.mirror?0:h*s.width+d*a.height;e.width=Math.min(t.maxWidth,e.width+i+l)}t._calculatePadding(i,o,d,h)}}t._handleMargins(),r?(t.width=t._length=i.width-t._margins.left-t._margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=i.height-t._margins.top-t._margins.bottom)}_calculatePadding(t,e,i,n){const o=this,{ticks:{align:s,padding:a},position:r}=o.options,l=0!==o.labelRotation,c="top"!==r&&"x"===o.axis;if(o.isHorizontal()){const r=o.getPixelForTick(0)-o.left,h=o.right-o.getPixelForTick(o.ticks.length-1);let d=0,u=0;l?c?(d=n*t.width,u=i*e.height):(d=i*t.height,u=n*e.width):"start"===s?u=e.width:"end"===s?d=t.width:(d=t.width/2,u=e.width/2),o.paddingLeft=Math.max((d-r+a)*o.width/(o.width-r),0),o.paddingRight=Math.max((u-h+a)*o.width/(o.width-h),0)}else{let i=e.height/2,n=t.height/2;"start"===s?(i=0,n=t.height):"end"===s&&(i=e.height,n=0),o.paddingTop=i+a,o.paddingBottom=n+a}}_handleMargins(){const t=this;t._margins&&(t._margins.left=Math.max(t.paddingLeft,t._margins.left),t._margins.top=Math.max(t.paddingTop,t._margins.top),t._margins.right=Math.max(t.paddingRight,t._margins.right),t._margins.bottom=Math.max(t.paddingBottom,t._margins.bottom))}afterFit(){Q(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){const e=this;let i,n;for(e.beforeTickToLabelConversion(),e.generateTickLabels(t),i=0,n=t.length;i<n;i++)$(t[i].label)&&(t.splice(i,1),n--,i--);e.afterTickToLabelConversion()}_getLabelSizes(){const t=this;let e=t._labelSizes;if(!e){const i=t.options.ticks.sampleSize;let n=t.ticks;i<n.length&&(n=On(n,i)),t._labelSizes=e=t._computeLabelSizes(n,n.length)}return e}_computeLabelSizes(t,e){const{ctx:i,_longestTextCache:n}=this,o=[],s=[];let a,r,l,c,h,d,u,f,g,p,m,x=0,b=0;for(a=0;a<e;++a){if(c=t[a].label,h=this._resolveTickFontOptions(a),i.font=d=h.string,u=n[d]=n[d]||{data:{},gc:[]},f=h.lineHeight,g=p=0,$(c)||Y(c)){if(Y(c))for(r=0,l=c.length;r<l;++r)m=c[r],$(m)||Y(m)||(g=Yt(i,u.data,u.gc,g,m),p+=f)}else g=Yt(i,u.data,u.gc,g,c),p=f;o.push(g),s.push(p),x=Math.max(g,x),b=Math.max(p,b)}!function(t,e){J(t,(t=>{const i=t.gc,n=i.length/2;let o;if(n>e){for(o=0;o<n;++o)delete t.data[i[o]];i.splice(0,n)}}))}(n,e);const _=o.indexOf(x),y=s.indexOf(b),v=t=>({width:o[t]||0,height:s[t]||0});return{first:v(0),last:v(e-1),widest:v(_),highest:v(y),widths:o,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){const e=this;e._reversePixels&&(t=1-t);const i=e._startPixel+t*e._length;return jt(e._alignToPixels?Xt(e.chart,i,0):i)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this,i=e.ticks||[];if(t>=0&&t<i.length){const n=i[t];return n.$context||(n.$context=function(t,e,i){return Object.assign(Object.create(t),{tick:i,index:e,type:"tick"})}(e.getContext(),t,n))}return e.$context||(e.$context=(n=e.chart.getContext(),o=e,Object.assign(Object.create(n),{scale:o,type:"scale"})));var n,o}_tickSize(){const t=this,e=t.options.ticks,i=Et(t.labelRotation),n=Math.abs(Math.cos(i)),o=Math.abs(Math.sin(i)),s=t._getLabelSizes(),a=e.autoSkipPadding||0,r=s?s.widest.width+a:0,l=s?s.highest.height+a:0;return t.isHorizontal()?l*n>r*o?r/n:l/o:l*o<r*n?l/n:r/o}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this,i=e.axis,n=e.chart,o=e.options,{grid:s,position:a}=o,r=s.offset,l=e.isHorizontal(),c=e.ticks.length+(r?1:0),h=An(s),d=[],u=s.setContext(e.getContext()),f=u.drawBorder?u.borderWidth:0,g=f/2,p=function(t){return Xt(n,t,f)};let m,x,b,_,y,v,w,M,k,S,P,D;if("top"===a)m=p(e.bottom),v=e.bottom-h,M=m-g,S=p(t.top)+g,D=t.bottom;else if("bottom"===a)m=p(e.top),S=t.top,D=p(t.bottom)-g,v=m+g,M=e.top+h;else if("left"===a)m=p(e.right),y=e.right-h,w=m-g,k=p(t.left)+g,P=t.right;else if("right"===a)m=p(e.left),k=t.left,P=p(t.right)-g,y=m+g,w=e.left+h;else if("x"===i){if("center"===a)m=p((t.top+t.bottom)/2+.5);else if(U(a)){const t=Object.keys(a)[0],i=a[t];m=p(e.chart.scales[t].getPixelForValue(i))}S=t.top,D=t.bottom,v=m+g,M=v+h}else if("y"===i){if("center"===a)m=p((t.left+t.right)/2);else if(U(a)){const t=Object.keys(a)[0],i=a[t];m=p(e.chart.scales[t].getPixelForValue(i))}y=m-g,w=y-h,k=t.left,P=t.right}const C=K(o.ticks.maxTicksLimit,c),O=Math.max(1,Math.ceil(c/C));for(x=0;x<c;x+=O){const t=s.setContext(e.getContext(x)),i=t.lineWidth,o=t.color,a=s.borderDash||[],c=t.borderDashOffset,h=t.tickWidth,u=t.tickColor,f=t.tickBorderDash||[],g=t.tickBorderDashOffset;b=Tn(e,x,r),void 0!==b&&(_=Xt(n,b,i),l?y=w=k=P=_:v=M=S=D=_,d.push({tx1:y,ty1:v,tx2:w,ty2:M,x1:k,y1:S,x2:P,y2:D,width:i,color:o,borderDash:a,borderDashOffset:c,tickWidth:h,tickColor:u,tickBorderDash:f,tickBorderDashOffset:g}))}return e._ticksLength=c,e._borderValue=m,d}_computeLabelItems(t){const e=this,i=e.axis,n=e.options,{position:o,ticks:s}=n,a=e.isHorizontal(),r=e.ticks,{align:l,crossAlign:c,padding:h,mirror:d}=s,u=An(n.grid),f=u+h,g=d?-h:f,p=-Et(e.labelRotation),m=[];let x,b,_,y,v,w,M,k,S,P,D,C,O="middle";if("top"===o)w=e.bottom-g,M=e._getXAxisLabelAlignment();else if("bottom"===o)w=e.top+g,M=e._getXAxisLabelAlignment();else if("left"===o){const t=e._getYAxisLabelAlignment(u);M=t.textAlign,v=t.x}else if("right"===o){const t=e._getYAxisLabelAlignment(u);M=t.textAlign,v=t.x}else if("x"===i){if("center"===o)w=(t.top+t.bottom)/2+f;else if(U(o)){const t=Object.keys(o)[0],i=o[t];w=e.chart.scales[t].getPixelForValue(i)+f}M=e._getXAxisLabelAlignment()}else if("y"===i){if("center"===o)v=(t.left+t.right)/2-f;else if(U(o)){const t=Object.keys(o)[0],i=o[t];v=e.chart.scales[t].getPixelForValue(i)}M=e._getYAxisLabelAlignment(u).textAlign}"y"===i&&("start"===l?O="top":"end"===l&&(O="bottom"));const T=e._getLabelSizes();for(x=0,b=r.length;x<b;++x){_=r[x],y=_.label;const t=s.setContext(e.getContext(x));k=e.getPixelForTick(x)+s.labelOffset,S=e._resolveTickFontOptions(x),P=S.lineHeight,D=Y(y)?y.length:1;const i=D/2,n=t.color,l=t.textStrokeColor,h=t.textStrokeWidth;let u;if(a?(v=k,C="top"===o?"near"===c||0!==p?-D*P+P/2:"center"===c?-T.highest.height/2-i*P+P:-T.highest.height+P/2:"near"===c||0!==p?P/2:"center"===c?T.highest.height/2-i*P:T.highest.height-D*P,d&&(C*=-1)):(w=k,C=(1-D)*P/2),t.showLabelBackdrop){const e=Be(t.backdropPadding),i=T.heights[x],n=T.widths[x];let o=w+C-e.top,s=v-e.left;switch(O){case"middle":o-=i/2;break;case"bottom":o-=i}switch(M){case"center":s-=n/2;break;case"right":s-=n}u={left:s,top:o,width:n+e.width,height:i+e.height,color:t.backdropColor}}m.push({rotation:p,label:y,font:S,color:n,strokeColor:l,strokeWidth:h,textOffset:C,textAlign:M,textBaseline:O,translation:[v,w],backdrop:u})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Et(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align&&(i="right"),i}_getYAxisLabelAlignment(t){const e=this,{position:i,ticks:{crossAlign:n,mirror:o,padding:s}}=e.options,a=t+s,r=e._getLabelSizes().widest.width;let l,c;return"left"===i?o?(c=e.right+s,"near"===n?l="left":"center"===n?(l="center",c+=r/2):(l="right",c+=r)):(c=e.right-a,"near"===n?l="right":"center"===n?(l="center",c-=r/2):(l="left",c=e.left)):"right"===i?o?(c=e.left+s,"near"===n?l="right":"center"===n?(l="center",c-=r/2):(l="left",c-=r)):(c=e.left+a,"near"===n?l="left":"center"===n?(l="center",c+=r/2):(l="right",c=e.right)):l="right",{textAlign:l,x:c}}_computeLabelArea(){const t=this;if(t.options.ticks.mirror)return;const e=t.chart,i=t.options.position;return"left"===i||"right"===i?{top:0,left:t.left,bottom:e.height,right:t.right}:"top"===i||"bottom"===i?{top:t.top,left:0,bottom:t.bottom,right:e.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:n,width:o,height:s}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,n,o,s),t.restore())}getLineWidthForValue(t){const e=this,i=e.options.grid;if(!e._isVisible()||!i.display)return 0;const n=e.ticks.findIndex((e=>e.value===t));if(n>=0){return i.setContext(e.getContext(n)).lineWidth}return 0}drawGrid(t){const e=this,i=e.options.grid,n=e.ctx,o=e._gridLineItems||(e._gridLineItems=e._computeGridLineItems(t));let s,a;const r=(t,e,i)=>{i.width&&i.color&&(n.save(),n.lineWidth=i.width,n.strokeStyle=i.color,n.setLineDash(i.borderDash||[]),n.lineDashOffset=i.borderDashOffset,n.beginPath(),n.moveTo(t.x,t.y),n.lineTo(e.x,e.y),n.stroke(),n.restore())};if(i.display)for(s=0,a=o.length;s<a;++s){const t=o[s];i.drawOnChartArea&&r({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),i.drawTicks&&r({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const t=this,{chart:e,ctx:i,options:{grid:n}}=t,o=n.setContext(t.getContext()),s=n.drawBorder?o.borderWidth:0;if(!s)return;const a=n.setContext(t.getContext(0)).lineWidth,r=t._borderValue;let l,c,h,d;t.isHorizontal()?(l=Xt(e,t.left,s)-s/2,c=Xt(e,t.right,a)+a/2,h=d=r):(h=Xt(e,t.top,s)-s/2,d=Xt(e,t.bottom,a)+a/2,l=c=r),i.save(),i.lineWidth=o.borderWidth,i.strokeStyle=o.borderColor,i.beginPath(),i.moveTo(l,h),i.lineTo(c,d),i.stroke(),i.restore()}drawLabels(t){const e=this;if(!e.options.ticks.display)return;const i=e.ctx,n=e._computeLabelArea();n&&Zt(i,n);const o=e._labelItems||(e._labelItems=e._computeLabelItems(t));let s,a;for(s=0,a=o.length;s<a;++s){const t=o[s],e=t.font,n=t.label;t.backdrop&&(i.fillStyle=t.backdrop.color,i.fillRect(t.backdrop.left,t.backdrop.top,t.backdrop.width,t.backdrop.height)),ee(i,n,0,t.textOffset,e,t)}n&&Qt(i)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:n}}=this;if(!i.display)return;const s=Ve(i.font),a=Be(i.padding),r=i.align;let l=s.lineHeight/2;"bottom"===e||"center"===e||U(e)?(l+=a.bottom,Y(i.text)&&(l+=s.lineHeight*(i.text.length-1))):l+=a.top;const{titleX:c,titleY:h,maxWidth:d,rotation:u}=function(t,e,i,n){const{top:s,left:a,bottom:r,right:l,chart:c}=t,{chartArea:h,scales:d}=c;let u,f,g,p=0;const m=r-s,x=l-a;if(t.isHorizontal()){if(f=o(n,a,l),U(i)){const t=Object.keys(i)[0],n=i[t];g=d[t].getPixelForValue(n)+m-e}else g="center"===i?(h.bottom+h.top)/2+m-e:Cn(t,i,e);u=l-a}else{if(U(i)){const t=Object.keys(i)[0],n=i[t];f=d[t].getPixelForValue(n)-x+e}else f="center"===i?(h.left+h.right)/2-x+e:Cn(t,i,e);g=o(n,r,s),p="left"===i?-Mt:Mt}return{titleX:f,titleY:g,maxWidth:u,rotation:p}}(this,l,e,r);ee(t,i.text,0,0,s,{color:i.color,maxWidth:d,rotation:u,textAlign:Rn(r,e,n),textBaseline:"middle",translation:[c,h]})}draw(t){const e=this;e._isVisible()&&(e.drawBackground(),e.drawGrid(t),e.drawBorder(),e.drawTitle(),e.drawLabels(t))}_layers(){const t=this,e=t.options,i=e.ticks&&e.ticks.z||0,n=K(e.grid&&e.grid.z,-1);return t._isVisible()&&t.draw===En.prototype.draw?[{z:n,draw(e){t.drawBackground(),t.drawGrid(e),t.drawTitle()}},{z:n+1,draw(){t.drawBorder()}},{z:i,draw(e){t.drawLabels(e)}}]:[{z:i,draw(e){t.draw(e)}}]}getMatchingVisibleMetas(t){const e=this,i=e.chart.getSortedVisibleDatasetMetas(),n=e.axis+"AxisID",o=[];let s,a;for(s=0,a=i.length;s<a;++s){const a=i[s];a[n]!==e.id||t&&a.type!==t||o.push(a)}return o}_resolveTickFontOptions(t){return Ve(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this,e=t._resolveTickFontOptions(0).lineHeight;return(t.isHorizontal()?t.width:t.height)/e}}class In{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=this,i=Object.getPrototypeOf(t);let n;(function(t){return"id"in t&&"defaults"in t})(i)&&(n=e.register(i));const o=e.items,s=t.id,a=e.scope+"."+s;if(!s)throw new Error("class does not have id: "+t);return s in o||(o[s]=t,function(t,e,i){const n=ot(Object.create(null),[i?xt.get(i):{},xt.get(e),t.defaults]);xt.set(e,n),t.defaultRoutes&&function(t,e){Object.keys(e).forEach((i=>{const n=i.split("."),o=n.pop(),s=[t].concat(n).join("."),a=e[i].split("."),r=a.pop(),l=a.join(".");xt.route(s,o,l,r)}))}(e,t.defaultRoutes);t.descriptors&&xt.describe(e,t.descriptors)}(t,a,n),e.override&&xt.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in xt[n]&&(delete xt[n][i],this.override&&delete ft[i])}}var zn=new class{constructor(){this.controllers=new In(wn,"datasets",!0),this.elements=new In(Mn,"elements"),this.plugins=new In(Object,"plugins"),this.scales=new In(En,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){const n=this;[...e].forEach((e=>{const o=i||n._getRegistryForType(e);i||o.isForType(e)||o===n.plugins&&e.id?n._exec(t,o,e):J(e,(e=>{const o=i||n._getRegistryForType(e);n._exec(t,o,e)}))}))}_exec(t,e,i){const n=ct(t);Q(i["before"+n],[],i),e[t](i),Q(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const n=e.get(t);if(void 0===n)throw new Error('"'+t+'" is not a registered '+i+".");return n}};class Fn{constructor(){this._init=[]}notify(t,e,i,n){const o=this;"beforeInit"===e&&(o._init=o._createDescriptors(t,!0),o._notify(o._init,t,"install"));const s=n?o._descriptors(t).filter(n):o._descriptors(t),a=o._notify(s,t,e,i);return"destroy"===e&&(o._notify(s,t,"stop"),o._notify(o._init,t,"uninstall")),a}_notify(t,e,i,n){n=n||{};for(const o of t){const t=o.plugin;if(!1===Q(t[i],[e,n,o.options],t)&&n.cancelable)return!1}return!0}invalidate(){$(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,n=K(i.options&&i.options.plugins,{}),o=function(t){const e=[],i=Object.keys(zn.plugins.items);for(let t=0;t<i.length;t++)e.push(zn.getPlugin(i[t]));const n=t.plugins||[];for(let t=0;t<n.length;t++){const i=n[t];-1===e.indexOf(i)&&e.push(i)}return e}(i);return!1!==n||e?function(t,e,i,n){const o=[],s=t.getContext();for(let a=0;a<e.length;a++){const r=e[a],l=Bn(i[r.id],n);null!==l&&o.push({plugin:r,options:Vn(t.config,r,l,s)})}return o}(t,o,n,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,n=(t,e)=>t.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function Bn(t,e){return e||!1!==t?!0===t?{}:t:null}function Vn(t,e,i,n){const o=t.pluginScopeKeys(e),s=t.getOptionScopes(i,o);return t.createResolver(s,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Wn(t,e){const i=xt.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function Nn(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function Hn(t){const e=t.options||(t.options={});e.plugins=K(e.plugins,{}),e.scales=function(t,e){const i=ft[t.type]||{scales:{}},n=e.scales||{},o=Wn(t.type,e),s=Object.create(null),a=Object.create(null);return Object.keys(n).forEach((t=>{const e=n[t];if(!U(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const r=Nn(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(r,o),c=i.scales||{};s[r]=s[r]||t,a[t]=st(Object.create(null),[{axis:r},e,c[r],c[l]])})),t.data.datasets.forEach((i=>{const o=i.type||t.type,r=i.indexAxis||Wn(o,e),l=(ft[o]||{}).scales||{};Object.keys(l).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,r),o=i[e+"AxisID"]||s[e]||e;a[o]=a[o]||Object.create(null),st(a[o],[{axis:e},n[o],l[t]])}))})),Object.keys(a).forEach((t=>{const e=a[t];st(e,[xt.scales[e.type],xt.scale])})),a}(t,e)}function jn(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const $n=new Map,Yn=new Set;function Un(t,e){let i=$n.get(t);return i||(i=e(),$n.set(t,i),Yn.add(i)),i}const Xn=(t,e,i)=>{const n=lt(e,i);void 0!==n&&t.add(n)};class qn{constructor(t){this._config=function(t){return(t=t||{}).data=jn(t.data),Hn(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=jn(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Hn(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Un(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return Un(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return Un(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return Un(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:o}=this,s=this._cachedScopes(t,i),a=s.get(e);if(a)return a;const r=new Set;e.forEach((e=>{t&&(r.add(t),e.forEach((e=>Xn(r,t,e)))),e.forEach((t=>Xn(r,n,t))),e.forEach((t=>Xn(r,ft[o]||{},t))),e.forEach((t=>Xn(r,xt,t))),e.forEach((t=>Xn(r,gt,t)))}));const l=Array.from(r);return 0===l.length&&l.push(Object.create(null)),Yn.has(e)&&s.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,ft[e]||{},xt.datasets[e]||{},{type:e},xt,gt]}resolveNamedOptions(t,e,i,n=[""]){const o={$shared:!0},{resolver:s,subPrefixes:a}=Kn(this._resolverCache,t,n);let r=s;if(function(t,e){const{isScriptable:i,isIndexable:n}=ni(t);for(const o of e)if(i(o)&&dt(t[o])||n(o)&&Y(t[o]))return!0;return!1}(s,e)){o.$shared=!1;r=ii(s,i=dt(i)?i():i,this.createResolver(t,i,a))}for(const t of e)o[t]=r[t];return o}createResolver(t,e,i=[""],n){const{resolver:o}=Kn(this._resolverCache,t,i);return U(e)?ii(o,e,void 0,n):o}}function Kn(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const o=i.join();let s=n.get(o);if(!s){s={resolver:ei(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},n.set(o,s)}return s}const Gn=["top","bottom","left","right","chartArea"];function Zn(t,e){return"top"===t||"bottom"===t||-1===Gn.indexOf(t)&&"x"===e}function Qn(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function Jn(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),Q(i&&i.onComplete,[t],e)}function to(t){const e=t.chart,i=e.options.animation;Q(i&&i.onProgress,[t],e)}function eo(t){return ue()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const io={},no=t=>{const e=eo(t);return Object.values(io).filter((t=>t.canvas===e)).pop()};class oo{constructor(t,e){const n=this,o=this.config=new qn(e),s=eo(t),r=no(s);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas can be reused.");const l=o.createResolver(o.chartOptionScopes(),n.getContext());this.platform=new(o.platform||on(s));const c=n.platform.acquireContext(s,l.aspectRatio),h=c&&c.canvas,d=h&&h.height,u=h&&h.width;this.id=j(),this.ctx=c,this.canvas=h,this.width=u,this.height=d,this._options=l,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Fn,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=i((t=>this.update(t)),l.resizeDelay||0),io[n.id]=n,c&&h?(a.listen(n,"complete",Jn),a.listen(n,"progress",to),n._initialize(),n.attached&&n.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:o}=this;return $(t)?e&&o?o:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){const t=this;return t.notifyPlugins("beforeInit"),t.options.responsive?t.resize():we(t,t.options.devicePixelRatio),t.bindEvents(),t.notifyPlugins("afterInit"),t}clear(){return qt(this.canvas,this.ctx),this}stop(){return a.stop(this),this}resize(t,e){a.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this,n=i.options,o=i.canvas,s=n.maintainAspectRatio&&i.aspectRatio,a=i.platform.getMaximumSize(o,t,e,s),r=n.devicePixelRatio||i.platform.getDevicePixelRatio(),l=i.width?"resize":"attach";i.width=a.width,i.height=a.height,i._aspectRatio=i.aspectRatio,we(i,r,!0)&&(i.notifyPlugins("resize",{size:a}),Q(n.onResize,[i,a],i),i.attached&&i._doResize(l)&&i.render())}ensureScalesHaveIDs(){J(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this,e=t.options,i=e.scales,n=t.scales,o=Object.keys(n).reduce(((t,e)=>(t[e]=!1,t)),{});let s=[];i&&(s=s.concat(Object.keys(i).map((t=>{const e=i[t],n=Nn(t,e),o="r"===n,s="x"===n;return{options:e,dposition:o?"chartArea":s?"bottom":"left",dtype:o?"radialLinear":s?"category":"linear"}})))),J(s,(i=>{const s=i.options,a=s.id,r=Nn(a,s),l=K(s.type,i.dtype);void 0!==s.position&&Zn(s.position,r)===Zn(i.dposition)||(s.position=i.dposition),o[a]=!0;let c=null;if(a in n&&n[a].type===l)c=n[a];else{c=new(zn.getScale(l))({id:a,type:l,ctx:t.ctx,chart:t}),n[c.id]=c}c.init(s,e)})),J(o,((t,e)=>{t||delete n[e]})),J(n,(e=>{ti.configure(t,e,e.options),ti.addBox(t,e)}))}_updateMetasets(){const t=this,e=t._metasets,i=t.data.datasets.length,n=e.length;if(e.sort(((t,e)=>t.index-e.index)),n>i){for(let e=i;e<n;++e)t._destroyDatasetMeta(e);e.splice(i,n-i)}t._sortedMetasets=e.slice(0).sort(Qn("order","index"))}_removeUnreferencedMetasets(){const t=this,{_metasets:e,data:{datasets:i}}=t;e.length>i.length&&delete t._stacks,e.forEach(((e,n)=>{0===i.filter((t=>t===e._dataset)).length&&t._destroyDatasetMeta(n)}))}buildOrUpdateControllers(){const t=this,e=[],i=t.data.datasets;let n,o;for(t._removeUnreferencedMetasets(),n=0,o=i.length;n<o;n++){const o=i[n];let s=t.getDatasetMeta(n);const a=o.type||t.config.type;if(s.type&&s.type!==a&&(t._destroyDatasetMeta(n),s=t.getDatasetMeta(n)),s.type=a,s.indexAxis=o.indexAxis||Wn(a,t.options),s.order=o.order||0,s.index=n,s.label=""+o.label,s.visible=t.isDatasetVisible(n),s.controller)s.controller.updateIndex(n),s.controller.linkScales();else{const i=zn.getController(a),{datasetElementType:o,dataElementType:r}=xt.datasets[a];Object.assign(i.prototype,{dataElementType:zn.getElement(r),datasetElementType:o&&zn.getElement(o)}),s.controller=new i(t,n),e.push(s.controller)}}return t._updateMetasets(),e}_resetElements(){const t=this;J(t.data.datasets,((e,i)=>{t.getDatasetMeta(i).controller.reset()}),t)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this,i=e.config;i.update(),e._options=i.createResolver(i.chartOptionScopes(),e.getContext()),J(e.scales,(t=>{ti.removeBox(e,t)}));const n=e._animationsDisabled=!e.options.animation;e.ensureScalesHaveIDs(),e.buildOrUpdateScales();const o=new Set(Object.keys(e._listeners)),s=new Set(e.options.events);if(ut(o,s)&&!!this._responsiveListeners===e.options.responsive||(e.unbindEvents(),e.bindEvents()),e._plugins.invalidate(),!1===e.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const a=e.buildOrUpdateControllers();e.notifyPlugins("beforeElementsUpdate");let r=0;for(let t=0,i=e.data.datasets.length;t<i;t++){const{controller:i}=e.getDatasetMeta(t),o=!n&&-1===a.indexOf(i);i.buildOrUpdateElements(o),r=Math.max(+i.getMaxOverflow(),r)}e._minPadding=r,e._updateLayout(r),n||J(a,(t=>{t.reset()})),e._updateDatasets(t),e.notifyPlugins("afterUpdate",{mode:t}),e._layers.sort(Qn("z","_idx")),e._lastEvent&&e._eventHandler(e._lastEvent,!0),e.render()}_updateLayout(t){const e=this;if(!1===e.notifyPlugins("beforeLayout",{cancelable:!0}))return;ti.update(e,e.width,e.height,t);const i=e.chartArea,n=i.width<=0||i.height<=0;e._layers=[],J(e.boxes,(t=>{n&&"chartArea"===t.position||(t.configure&&t.configure(),e._layers.push(...t._layers()))}),e),e._layers.forEach(((t,e)=>{t._idx=e})),e.notifyPlugins("afterLayout")}_updateDatasets(t){const e=this,i="function"==typeof t;if(!1!==e.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let n=0,o=e.data.datasets.length;n<o;++n)e._updateDataset(n,i?t({datasetIndex:n}):t);e.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this,n=i.getDatasetMeta(t),o={meta:n,index:t,mode:e,cancelable:!0};!1!==i.notifyPlugins("beforeDatasetUpdate",o)&&(n.controller._update(e),o.cancelable=!1,i.notifyPlugins("afterDatasetUpdate",o))}render(){const t=this;!1!==t.notifyPlugins("beforeRender",{cancelable:!0})&&(a.has(t)?t.attached&&!a.running(t)&&a.start(t):(t.draw(),Jn({chart:t})))}draw(){const t=this;let e;if(t._resizeBeforeDraw){const{width:e,height:i}=t._resizeBeforeDraw;t._resize(e,i),t._resizeBeforeDraw=null}if(t.clear(),t.width<=0||t.height<=0)return;if(!1===t.notifyPlugins("beforeDraw",{cancelable:!0}))return;const i=t._layers;for(e=0;e<i.length&&i[e].z<=0;++e)i[e].draw(t.chartArea);for(t._drawDatasets();e<i.length;++e)i[e].draw(t.chartArea);t.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let n,o;for(n=0,o=e.length;n<o;++n){const o=e[n];t&&!o.visible||i.push(o)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){const t=this;if(!1===t.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const e=t.getSortedVisibleDatasetMetas();for(let i=e.length-1;i>=0;--i)t._drawDataset(e[i]);t.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this,i=e.ctx,n=t._clip,o=!n.disabled,s=e.chartArea,a={meta:t,index:t.index,cancelable:!0};!1!==e.notifyPlugins("beforeDatasetDraw",a)&&(o&&Zt(i,{left:!1===n.left?0:s.left-n.left,right:!1===n.right?e.width:s.right+n.right,top:!1===n.top?0:s.top-n.top,bottom:!1===n.bottom?e.height:s.bottom+n.bottom}),t.controller.draw(),o&&Qt(i),a.cancelable=!1,e.notifyPlugins("afterDatasetDraw",a))}getElementsAtEventForMode(t,e,i,n){const o=Ae.modes[e];return"function"==typeof o?o(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter((t=>t&&t._dataset===e)).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context={chart:this,type:"chart"})}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=this,o=i?"show":"hide",s=n.getDatasetMeta(t),a=s.controller._resolveAnimations(void 0,o);ht(e)?(s.data[e].hidden=!i,n.update()):(n.setDatasetVisibility(t,i),a.update(s,{visible:i}),n.update((e=>e.datasetIndex===t?o:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this,i=e._metasets&&e._metasets[t];i&&i.controller&&(i.controller._destroy(),delete e._metasets[t])}_stop(){const t=this;let e,i;for(t.stop(),a.remove(t),e=0,i=t.data.datasets.length;e<i;++e)t._destroyDatasetMeta(e)}destroy(){const t=this,{canvas:e,ctx:i}=t;t._stop(),t.config.clearCache(),e&&(t.unbindEvents(),qt(e,i),t.platform.releaseContext(i),t.canvas=null,t.ctx=null),t.notifyPlugins("destroy"),delete io[t.id]}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this,e=t._listeners,i=t.platform,n=function(e,i,n){e.offsetX=i,e.offsetY=n,t._eventHandler(e)};J(t.options.events,(o=>((n,o)=>{i.addEventListener(t,n,o),e[n]=o})(o,n)))}bindResponsiveEvents(){const t=this;t._responsiveListeners||(t._responsiveListeners={});const e=t._responsiveListeners,i=t.platform,n=(n,o)=>{i.addEventListener(t,n,o),e[n]=o},o=(n,o)=>{e[n]&&(i.removeEventListener(t,n,o),delete e[n])},s=(e,i)=>{t.canvas&&t.resize(e,i)};let a;const r=()=>{o("attach",r),t.attached=!0,t.resize(),n("resize",s),n("detach",a)};a=()=>{t.attached=!1,o("resize",s),t._stop(),t._resize(0,0),n("attach",r)},i.isAttached(t.canvas)?r():a()}unbindEvents(){const t=this;J(t._listeners,((e,i)=>{t.platform.removeEventListener(t,i,e)})),t._listeners={},J(t._responsiveListeners,((e,i)=>{t.platform.removeEventListener(t,i,e)})),t._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let o,s,a,r;for("dataset"===e&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),a=0,r=t.length;a<r;++a){s=t[a];const e=s&&this.getDatasetMeta(s.datasetIndex).controller;e&&e[n+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this,i=e._active||[],n=t.map((({datasetIndex:t,index:i})=>{const n=e.getDatasetMeta(t);if(!n)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:n.data[i],index:i}}));!tt(n,i)&&(e._active=n,e._updateHoverStyles(n,i))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const n=this,o=n.options.hover,s=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),a=s(e,t),r=i?t:s(t,e);a.length&&n.updateHoverStyle(a,o.mode,!1),r.length&&o.mode&&n.updateHoverStyle(r,o.mode,!0)}_eventHandler(t,e){const i=this,n={event:t,replay:e,cancelable:!0},o=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===i.notifyPlugins("beforeEvent",n,o))return;const s=i._handleEvent(t,e);return n.cancelable=!1,i.notifyPlugins("afterEvent",n,o),(s||n.changed)&&i.render(),i}_handleEvent(t,e){const i=this,{_active:n=[],options:o}=i,s=o.hover,a=e;let r=[],l=!1,c=null;return"mouseout"!==t.type&&(r=i.getElementsAtEventForMode(t,s.mode,s,a),c="click"===t.type?i._lastEvent:t),i._lastEvent=null,Gt(t,i.chartArea,i._minPadding)&&(Q(o.onHover,[t,r,i],i),"mouseup"!==t.type&&"click"!==t.type&&"contextmenu"!==t.type||Q(o.onClick,[t,r,i],i)),l=!tt(r,n),(l||e)&&(i._active=r,i._updateHoverStyles(r,n,e)),i._lastEvent=c,l}}const so=()=>J(oo.instances,(t=>t._plugins.invalidate())),ao=!0;function ro(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}Object.defineProperties(oo,{defaults:{enumerable:ao,value:xt},instances:{enumerable:ao,value:io},overrides:{enumerable:ao,value:ft},registry:{enumerable:ao,value:zn},version:{enumerable:ao,value:"3.5.1"},getChart:{enumerable:ao,value:no},register:{enumerable:ao,value:(...t)=>{zn.add(...t),so()}},unregister:{enumerable:ao,value:(...t)=>{zn.remove(...t),so()}}});class lo{constructor(t){this.options=t||{}}formats(){return ro()}parse(t,e){return ro()}format(t,e){return ro()}add(t,e,i){return ro()}diff(t,e,i){return ro()}startOf(t,e,i){return ro()}endOf(t,e){return ro()}}lo.override=function(t){Object.assign(lo.prototype,t)};var co={_date:lo};function ho(t){const e=t.iScale,i=function(t,e){if(!t._cache.$bar){const i=t.getMatchingVisibleMetas(e);let n=[];for(let e=0,o=i.length;e<o;e++)n=n.concat(i[e].controller.getAllParsedValues(t));t._cache.$bar=de(n.sort(((t,e)=>t-e)))}return t._cache.$bar}(e,t.type);let n,o,s,a,r=e._length;const l=()=>{32767!==s&&-32768!==s&&(ht(a)&&(r=Math.min(r,Math.abs(s-a)||r)),a=s)};for(n=0,o=i.length;n<o;++n)s=e.getPixelForValue(i[n]),l();for(a=void 0,n=0,o=e.ticks.length;n<o;++n)s=e.getPixelForTick(n),l();return r}function uo(t,e,i,n){return Y(t)?function(t,e,i,n){const o=i.parse(t[0],n),s=i.parse(t[1],n),a=Math.min(o,s),r=Math.max(o,s);let l=a,c=r;Math.abs(a)>Math.abs(r)&&(l=r,c=a),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:o,end:s,min:a,max:r}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function fo(t,e,i,n){const o=t.iScale,s=t.vScale,a=o.getLabels(),r=o===s,l=[];let c,h,d,u;for(c=i,h=i+n;c<h;++c)u=e[c],d={},d[o.axis]=r||o.parse(a[c],c),l.push(uo(u,d,s,c));return l}function go(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function po(t,e,i,n){let o=e.borderSkipped;const s={};if(!o)return void(t.borderSkipped=s);const{start:a,end:r,reverse:l,top:c,bottom:h}=function(t){let e,i,n,o,s;return t.horizontal?(e=t.base>t.x,i="left",n="right"):(e=t.base<t.y,i="bottom",n="top"),e?(o="end",s="start"):(o="start",s="end"),{start:i,end:n,reverse:e,top:o,bottom:s}}(t);"middle"===o&&i&&(t.enableBorderRadius=!0,(i._top||0)===n?o=c:(i._bottom||0)===n?o=h:(s[mo(h,a,r,l)]=!0,o=c)),s[mo(o,a,r,l)]=!0,t.borderSkipped=s}function mo(t,e,i,n){var o,s,a;return n?(a=i,t=xo(t=(o=t)===(s=e)?a:o===a?s:o,i,e)):t=xo(t,e,i),t}function xo(t,e,i){return"start"===t?e:"end"===t?i:t}class bo extends wn{parsePrimitiveData(t,e,i,n){return fo(t,e,i,n)}parseArrayData(t,e,i,n){return fo(t,e,i,n)}parseObjectData(t,e,i,n){const{iScale:o,vScale:s}=t,{xAxisKey:a="x",yAxisKey:r="y"}=this._parsing,l="x"===o.axis?a:r,c="x"===s.axis?a:r,h=[];let d,u,f,g;for(d=i,u=i+n;d<u;++d)g=e[d],f={},f[o.axis]=o.parse(lt(g,l),d),h.push(uo(lt(g,c),f,s,d));return h}updateRangeFromParsed(t,e,i,n){super.updateRangeFromParsed(t,e,i,n);const o=i._custom;o&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:n}=e,o=this.getParsed(t),s=o._custom,a=go(s)?"["+s.start+", "+s.end+"]":""+n.getLabelForValue(o[n.axis]);return{label:""+i.getLabelForValue(o[i.axis]),value:a}}initialize(){const t=this;t.enableOptionSharing=!0,super.initialize();t._cachedMeta.stack=t.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,n){const o=this,s="reset"===n,{index:a,_cachedMeta:{vScale:r}}=o,l=r.getBasePixel(),c=r.isHorizontal(),h=o._getRuler(),d=o.resolveDataElementOptions(e,n),u=o.getSharedOptions(d),f=o.includeOptions(n,u);o.updateSharedOptions(u,n,d);for(let d=e;d<e+i;d++){const e=o.getParsed(d),i=s||$(e[r.axis])?{base:l,head:l}:o._calculateBarValuePixels(d),g=o._calculateBarIndexPixels(d,h),p=(e._stacks||{})[r.axis],m={horizontal:c,base:i.base,enableBorderRadius:!p||go(e._custom)||a===p._top||a===p._bottom,x:c?i.head:g.center,y:c?g.center:i.head,height:c?g.size:Math.abs(i.size),width:c?Math.abs(i.size):g.size};f&&(m.options=u||o.resolveDataElementOptions(d,t[d].active?"active":n)),po(m,m.options||t[d].options,p,a),o.updateElement(t[d],d,m,n)}}_getStacks(t,e){const i=this._cachedMeta.iScale,n=i.getMatchingVisibleMetas(this._type),o=i.options.stacked,s=n.length,a=[];let r,l;for(r=0;r<s;++r)if(l=n[r],l.controller.options.grouped){if(void 0!==e){const t=l.controller.getParsed(e)[l.controller._cachedMeta.vScale.axis];if($(t)||isNaN(t))continue}if((!1===o||-1===a.indexOf(l.stack)||void 0===o&&void 0===l.stack)&&a.push(l.stack),l.index===t)break}return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const n=this._getStacks(t,i),o=void 0!==e?n.indexOf(e):-1;return-1===o?n.length-1:o}_getRuler(){const t=this,e=t.options,i=t._cachedMeta,n=i.iScale,o=[];let s,a;for(s=0,a=i.data.length;s<a;++s)o.push(n.getPixelForValue(t.getParsed(s)[n.axis],s));const r=e.barThickness;return{min:r||ho(i),pixels:o,start:n._startPixel,end:n._endPixel,stackCount:t._getStackCount(),scale:n,grouped:e.grouped,ratio:r?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(t){const e=this,{_cachedMeta:{vScale:i,_stacked:n},options:{base:o,minBarLength:s}}=e,a=o||0,r=e.getParsed(t),l=r._custom,c=go(l);let h,d,u=r[i.axis],f=0,g=n?e.applyStack(i,r,n):u;g!==u&&(f=g-u,g=u),c&&(u=l.barStart,g=l.barEnd-l.barStart,0!==u&&Dt(u)!==Dt(l.barEnd)&&(f=0),f+=u);const p=$(o)||c?f:o;let m=i.getPixelForValue(p);if(h=e.chart.getDataVisibility(t)?i.getPixelForValue(f+g):m,d=h-m,Math.abs(d)<s&&(d=function(t,e,i){return 0!==t?Dt(t):(e.isHorizontal()?1:-1)*(e.min>=i?1:-1)}(d,i,a)*s,u===a&&(m-=d/2),h=m+d),m===i.getPixelForValue(a)){const t=Dt(d)*i.getLineWidthForValue(a)/2;m+=t,d-=t}return{size:d,base:m,head:h,center:h+d/2}}_calculateBarIndexPixels(t,e){const i=this,n=e.scale,o=i.options,s=o.skipNull,a=K(o.maxBarThickness,1/0);let r,l;if(e.grouped){const n=s?i._getStackCount(t):e.stackCount,c="flex"===o.barThickness?function(t,e,i,n){const o=e.pixels,s=o[t];let a=t>0?o[t-1]:null,r=t<o.length-1?o[t+1]:null;const l=i.categoryPercentage;null===a&&(a=s-(null===r?e.end-e.start:r-s)),null===r&&(r=s+s-a);const c=s-(s-Math.min(a,r))/2*l;return{chunk:Math.abs(r-a)/2*l/n,ratio:i.barPercentage,start:c}}(t,e,o,n):function(t,e,i,n){const o=i.barThickness;let s,a;return $(o)?(s=e.min*i.categoryPercentage,a=i.barPercentage):(s=o*n,a=1),{chunk:s/n,ratio:a,start:e.pixels[t]-s/2}}(t,e,o,n),h=i._getStackIndex(i.index,i._cachedMeta.stack,s?t:void 0);r=c.start+c.chunk*h+c.chunk/2,l=Math.min(a,c.chunk*c.ratio)}else r=n.getPixelForValue(i.getParsed(t)[n.axis],t),l=Math.min(a,e.min*e.ratio);return{base:r-l/2,head:r+l/2,center:r,size:l}}draw(){const t=this,e=t._cachedMeta,i=e.vScale,n=e.data,o=n.length;let s=0;for(;s<o;++s)null!==t.getParsed(s)[i.axis]&&n[s].draw(t._ctx)}}bo.id="bar",bo.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},bo.overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class _o extends wn{initialize(){this.enableOptionSharing=!0,super.initialize()}parseObjectData(t,e,i,n){const{xScale:o,yScale:s}=t,{xAxisKey:a="x",yAxisKey:r="y"}=this._parsing,l=[];let c,h,d;for(c=i,h=i+n;c<h;++c)d=e[c],l.push({x:o.parse(lt(d,a),c),y:s.parse(lt(d,r),c),_custom:d&&d.r&&+d.r});return l}getMaxOverflow(){const{data:t,_parsed:e}=this._cachedMeta;let i=0;for(let n=t.length-1;n>=0;--n)i=Math.max(i,t[n].size()/2,e[n]._custom);return i>0&&i}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:n}=e,o=this.getParsed(t),s=i.getLabelForValue(o.x),a=n.getLabelForValue(o.y),r=o._custom;return{label:e.label,value:"("+s+", "+a+(r?", "+r:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const o=this,s="reset"===n,{iScale:a,vScale:r}=o._cachedMeta,l=o.resolveDataElementOptions(e,n),c=o.getSharedOptions(l),h=o.includeOptions(n,c),d=a.axis,u=r.axis;for(let l=e;l<e+i;l++){const e=t[l],i=!s&&o.getParsed(l),c={},f=c[d]=s?a.getPixelForDecimal(.5):a.getPixelForValue(i[d]),g=c[u]=s?r.getBasePixel():r.getPixelForValue(i[u]);c.skip=isNaN(f)||isNaN(g),h&&(c.options=o.resolveDataElementOptions(l,e.active?"active":n),s&&(c.options.radius=0)),o.updateElement(e,l,c,n)}o.updateSharedOptions(c,n,l)}resolveDataElementOptions(t,e){const i=this.getParsed(t);let n=super.resolveDataElementOptions(t,e);n.$shared&&(n=Object.assign({},n,{$shared:!1}));const o=n.radius;return"active"!==e&&(n.radius=0),n.radius+=K(i&&i._custom,o),n}}_o.id="bubble",_o.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}},_o.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title:()=>""}}}};class yo extends wn{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let o,s,a=t=>+i[t];if(U(i[t])){const{key:t="value"}=this._parsing;a=e=>+lt(i[e],t)}for(o=t,s=t+e;o<s;++o)n._parsed[o]=a(o)}}_getRotation(){return Et(this.options.rotation-90)}_getCircumference(){return Et(this.options.circumference)}_getRotationExtents(){let t=_t,e=-_t;const i=this;for(let n=0;n<i.chart.data.datasets.length;++n)if(i.chart.isDatasetVisible(n)){const o=i.chart.getDatasetMeta(n).controller,s=o._getRotation(),a=o._getCircumference();t=Math.min(t,s),e=Math.max(e,s+a)}return{rotation:t,circumference:e-t}}update(t){const e=this,i=e.chart,{chartArea:n}=i,o=e._cachedMeta,s=o.data,a=e.getMaxBorderWidth()+e.getMaxOffset(s)+e.options.spacing,r=Math.max((Math.min(n.width,n.height)-a)/2,0),l=Math.min(G(e.options.cutout,r),1),c=e._getRingWeight(e.index),{circumference:h,rotation:d}=e._getRotationExtents(),{ratioX:u,ratioY:f,offsetX:g,offsetY:p}=function(t,e,i){let n=1,o=1,s=0,a=0;if(e<_t){const r=t,l=r+e,c=Math.cos(r),h=Math.sin(r),d=Math.cos(l),u=Math.sin(l),f=(t,e,n)=>Nt(t,r,l,!0)?1:Math.max(e,e*i,n,n*i),g=(t,e,n)=>Nt(t,r,l,!0)?-1:Math.min(e,e*i,n,n*i),p=f(0,c,d),m=f(Mt,h,u),x=g(bt,c,d),b=g(bt+Mt,h,u);n=(p-x)/2,o=(m-b)/2,s=-(p+x)/2,a=-(m+b)/2}return{ratioX:n,ratioY:o,offsetX:s,offsetY:a}}(d,h,l),m=(n.width-a)/u,x=(n.height-a)/f,b=Math.max(Math.min(m,x)/2,0),_=Z(e.options.radius,b),y=(_-Math.max(_*l,0))/e._getVisibleDatasetWeightTotal();e.offsetX=g*_,e.offsetY=p*_,o.total=e.calculateTotal(),e.outerRadius=_-y*e._getRingWeightOffset(e.index),e.innerRadius=Math.max(e.outerRadius-y*c,0),e.updateElements(s,0,s.length,t)}_circumference(t,e){const i=this,n=i.options,o=i._cachedMeta,s=i._getCircumference();return e&&n.animation.animateRotate||!this.chart.getDataVisibility(t)||null===o._parsed[t]||o.data[t].hidden?0:i.calculateCircumference(o._parsed[t]*s/_t)}updateElements(t,e,i,n){const o=this,s="reset"===n,a=o.chart,r=a.chartArea,l=a.options.animation,c=(r.left+r.right)/2,h=(r.top+r.bottom)/2,d=s&&l.animateScale,u=d?0:o.innerRadius,f=d?0:o.outerRadius,g=o.resolveDataElementOptions(e,n),p=o.getSharedOptions(g),m=o.includeOptions(n,p);let x,b=o._getRotation();for(x=0;x<e;++x)b+=o._circumference(x,s);for(x=e;x<e+i;++x){const e=o._circumference(x,s),i=t[x],a={x:c+o.offsetX,y:h+o.offsetY,startAngle:b,endAngle:b+e,circumference:e,outerRadius:f,innerRadius:u};m&&(a.options=p||o.resolveDataElementOptions(x,i.active?"active":n)),b+=e,o.updateElement(i,x,a,n)}o.updateSharedOptions(p,n,g)}calculateTotal(){const t=this._cachedMeta,e=t.data;let i,n=0;for(i=0;i<e.length;i++){const o=t._parsed[i];null===o||isNaN(o)||!this.chart.getDataVisibility(i)||e[i].hidden||(n+=Math.abs(o))}return n}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?_t*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],o=Oi(e._parsed[t],i.options.locale);return{label:n[t]||"",value:o}}getMaxBorderWidth(t){const e=this;let i=0;const n=e.chart;let o,s,a,r,l;if(!t)for(o=0,s=n.data.datasets.length;o<s;++o)if(n.isDatasetVisible(o)){a=n.getDatasetMeta(o),t=a.data,r=a.controller,r!==e&&r.configure();break}if(!t)return 0;for(o=0,s=t.length;o<s;++o)l=r.resolveDataElementOptions(o),"inner"!==l.borderAlign&&(i=Math.max(i,l.borderWidth||0,l.hoverBorderWidth||0));return i}getMaxOffset(t){let e=0;for(let i=0,n=t.length;i<n;++i){const t=this.resolveDataElementOptions(i);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(K(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}yo.id="doughnut",yo.defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"},yo.descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t},yo.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const o=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return Y(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class vo extends wn{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){const e=this,i=e._cachedMeta,{dataset:n,data:o=[],_dataset:s}=i,a=e.chart._animationsDisabled;let{start:r,count:l}=function(t,e,i){const n=e.length;let o=0,s=n;if(t._sorted){const{iScale:a,_parsed:r}=t,l=a.axis,{min:c,max:h,minDefined:d,maxDefined:u}=a.getUserBounds();d&&(o=Ht(Math.min(se(r,a.axis,c).lo,i?n:se(e,l,a.getPixelForValue(c)).lo),0,n-1)),s=u?Ht(Math.max(se(r,a.axis,h).hi+1,i?0:se(e,l,a.getPixelForValue(h)).hi+1),o,n)-o:n-o}return{start:o,count:s}}(i,o,a);e._drawStart=r,e._drawCount=l,function(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,o={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=o,!0;const s=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,o),s}(i)&&(r=0,l=o.length),n._datasetIndex=e.index,n._decimated=!!s._decimated,n.points=o;const c=e.resolveDatasetElementOptions(t);e.options.showLine||(c.borderWidth=0),c.segment=e.options.segment,e.updateElement(n,void 0,{animated:!a,options:c},t),e.updateElements(o,r,l,t)}updateElements(t,e,i,n){const o=this,s="reset"===n,{iScale:a,vScale:r,_stacked:l}=o._cachedMeta,c=o.resolveDataElementOptions(e,n),h=o.getSharedOptions(c),d=o.includeOptions(n,h),u=a.axis,f=r.axis,g=o.options.spanGaps,p=Tt(g)?g:Number.POSITIVE_INFINITY,m=o.chart._animationsDisabled||s||"none"===n;let x=e>0&&o.getParsed(e-1);for(let c=e;c<e+i;++c){const e=t[c],i=o.getParsed(c),g=m?e:{},b=$(i[f]),_=g[u]=a.getPixelForValue(i[u],c),y=g[f]=s||b?r.getBasePixel():r.getPixelForValue(l?o.applyStack(r,i,l):i[f],c);g.skip=isNaN(_)||isNaN(y)||b,g.stop=c>0&&i[u]-x[u]>p,g.parsed=i,d&&(g.options=h||o.resolveDataElementOptions(c,e.active?"active":n)),m||o.updateElement(e,c,g,n),x=i}o.updateSharedOptions(h,n,c)}getMaxOverflow(){const t=this,e=t._cachedMeta,i=e.dataset,n=i.options&&i.options.borderWidth||0,o=e.data||[];if(!o.length)return n;const s=o[0].size(t.resolveDataElementOptions(0)),a=o[o.length-1].size(t.resolveDataElementOptions(o.length-1));return Math.max(n,s,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}vo.id="line",vo.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},vo.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class wo extends wn{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],o=Oi(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:o}}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}_updateRadius(){const t=this,e=t.chart,i=e.chartArea,n=e.options,o=Math.min(i.right-i.left,i.bottom-i.top),s=Math.max(o/2,0),a=(s-Math.max(n.cutoutPercentage?s/100*n.cutoutPercentage:1,0))/e.getVisibleDatasetCount();t.outerRadius=s-a*t.index,t.innerRadius=t.outerRadius-a}updateElements(t,e,i,n){const o=this,s="reset"===n,a=o.chart,r=o.getDataset(),l=a.options.animation,c=o._cachedMeta.rScale,h=c.xCenter,d=c.yCenter,u=c.getIndexAngle(0)-.5*bt;let f,g=u;const p=360/o.countVisibleElements();for(f=0;f<e;++f)g+=o._computeAngle(f,n,p);for(f=e;f<e+i;f++){const e=t[f];let i=g,m=g+o._computeAngle(f,n,p),x=a.getDataVisibility(f)?c.getDistanceFromCenterForValue(r.data[f]):0;g=m,s&&(l.animateScale&&(x=0),l.animateRotate&&(i=m=u));const b={x:h,y:d,innerRadius:0,outerRadius:x,startAngle:i,endAngle:m,options:o.resolveDataElementOptions(f,e.active?"active":n)};o.updateElement(e,f,b,n)}}countVisibleElements(){const t=this.getDataset(),e=this._cachedMeta;let i=0;return e.data.forEach(((e,n)=>{!isNaN(t.data[n])&&this.chart.getDataVisibility(n)&&i++})),i}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?Et(this.resolveDataElementOptions(t,e).angle||i):0}}wo.id="polarArea",wo.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},wo.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const o=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class Mo extends yo{}Mo.id="pie",Mo.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class ko extends wn{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}update(t){const e=this,i=e._cachedMeta,n=i.dataset,o=i.data||[],s=i.iScale.getLabels();if(n.points=o,"resize"!==t){const i=e.resolveDatasetElementOptions(t);e.options.showLine||(i.borderWidth=0);const a={_loop:!0,_fullLoop:s.length===o.length,options:i};e.updateElement(n,void 0,a,t)}e.updateElements(o,0,o.length,t)}updateElements(t,e,i,n){const o=this,s=o.getDataset(),a=o._cachedMeta.rScale,r="reset"===n;for(let l=e;l<e+i;l++){const e=t[l],i=o.resolveDataElementOptions(l,e.active?"active":n),c=a.getPointPositionForValue(l,s.data[l]),h=r?a.xCenter:c.x,d=r?a.yCenter:c.y,u={x:h,y:d,angle:c.angle,skip:isNaN(h)||isNaN(d),options:i};o.updateElement(e,l,u,n)}}}ko.id="radar",ko.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}},ko.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class So extends vo{}So.id="scatter",So.defaults={showLine:!1,fill:!1},So.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title:()=>"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var Po=Object.freeze({__proto__:null,BarController:bo,BubbleController:_o,DoughnutController:yo,LineController:vo,PolarAreaController:wo,PieController:Mo,RadarController:ko,ScatterController:So});function Do(t,e,i){const{startAngle:n,pixelMargin:o,x:s,y:a,outerRadius:r,innerRadius:l}=e;let c=o/r;t.beginPath(),t.arc(s,a,r,n-c,i+c),l>o?(c=o/l,t.arc(s,a,l,i+c,n-c,!0)):t.arc(s,a,o,i+Mt,n-Mt),t.closePath(),t.clip()}function Co(t,e,i,n){const o=Ie(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const s=(i-e)/2,a=Math.min(s,n*e/2),r=t=>{const e=(i-Math.min(s,t))*n/2;return Ht(t,0,Math.min(s,e))};return{outerStart:r(o.outerStart),outerEnd:r(o.outerEnd),innerStart:Ht(o.innerStart,0,a),innerEnd:Ht(o.innerEnd,0,a)}}function Oo(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function To(t,e,i,n,o){const{x:s,y:a,startAngle:r,pixelMargin:l,innerRadius:c}=e,h=Math.max(e.outerRadius+n+i-l,0),d=c>0?c+n+i+l:0;let u=0;const f=o-r;if(n){const t=((c>0?c-n:0)+(h>0?h-n:0))/2;u=(f-(0!==t?f*t/(t+n):f))/2}const g=(f-Math.max(.001,f*h-i/bt)/h)/2,p=r+g+u,m=o-g-u,{outerStart:x,outerEnd:b,innerStart:_,innerEnd:y}=Co(e,d,h,m-p),v=h-x,w=h-b,M=p+x/v,k=m-b/w,S=d+_,P=d+y,D=p+_/S,C=m-y/P;if(t.beginPath(),t.arc(s,a,h,M,k),b>0){const e=Oo(w,k,s,a);t.arc(e.x,e.y,b,k,m+Mt)}const O=Oo(P,m,s,a);if(t.lineTo(O.x,O.y),y>0){const e=Oo(P,C,s,a);t.arc(e.x,e.y,y,m+Mt,C+Math.PI)}if(t.arc(s,a,d,m-y/d,p+_/d,!0),_>0){const e=Oo(S,D,s,a);t.arc(e.x,e.y,_,D+Math.PI,p-Mt)}const T=Oo(v,p,s,a);if(t.lineTo(T.x,T.y),x>0){const e=Oo(v,M,s,a);t.arc(e.x,e.y,x,p-Mt,M)}t.closePath()}function Ao(t,e,i,n,o){const{options:s}=e,a="inner"===s.borderAlign;s.borderWidth&&(a?(t.lineWidth=2*s.borderWidth,t.lineJoin="round"):(t.lineWidth=s.borderWidth,t.lineJoin="bevel"),e.fullCircles&&function(t,e,i){const{x:n,y:o,startAngle:s,pixelMargin:a,fullCircles:r}=e,l=Math.max(e.outerRadius-a,0),c=e.innerRadius+a;let h;for(i&&Do(t,e,s+_t),t.beginPath(),t.arc(n,o,c,s+_t,s,!0),h=0;h<r;++h)t.stroke();for(t.beginPath(),t.arc(n,o,l,s,s+_t),h=0;h<r;++h)t.stroke()}(t,e,a),a&&Do(t,e,o),To(t,e,i,n,o),t.stroke())}class Lo extends Mn{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:o,distance:s}=Ft(n,{x:t,y:e}),{startAngle:a,endAngle:r,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),d=this.options.spacing/2;return(h>=_t||Nt(o,a,r))&&(s>=l+d&&s<=c+d)}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:o,innerRadius:s,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:r,spacing:l}=this.options,c=(n+o)/2,h=(s+a+l+r)/2;return{x:e+Math.cos(c)*h,y:i+Math.sin(c)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const e=this,{options:i,circumference:n}=e,o=(i.offset||0)/2,s=(i.spacing||0)/2;if(e.pixelMargin="inner"===i.borderAlign?.33:0,e.fullCircles=n>_t?Math.floor(n/_t):0,0===n||e.innerRadius<0||e.outerRadius<0)return;t.save();let a=0;if(o){a=o/2;const i=(e.startAngle+e.endAngle)/2;t.translate(Math.cos(i)*a,Math.sin(i)*a),e.circumference>=bt&&(a=o)}t.fillStyle=i.backgroundColor,t.strokeStyle=i.borderColor;const r=function(t,e,i,n){const{fullCircles:o,startAngle:s,circumference:a}=e;let r=e.endAngle;if(o){To(t,e,i,n,s+_t);for(let e=0;e<o;++e)t.fill();isNaN(a)||(r=s+a%_t,a%_t==0&&(r+=_t))}return To(t,e,i,n,r),t.fill(),r}(t,e,a,s);Ao(t,e,a,s,r),t.restore()}}function Ro(t,e,i=e){t.lineCap=K(i.borderCapStyle,e.borderCapStyle),t.setLineDash(K(i.borderDash,e.borderDash)),t.lineDashOffset=K(i.borderDashOffset,e.borderDashOffset),t.lineJoin=K(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=K(i.borderWidth,e.borderWidth),t.strokeStyle=K(i.borderColor,e.borderColor)}function Eo(t,e,i){t.lineTo(i.x,i.y)}function Io(t,e,i={}){const n=t.length,{start:o=0,end:s=n-1}=i,{start:a,end:r}=e,l=Math.max(o,a),c=Math.min(s,r),h=o<a&&s<a||o>r&&s>r;return{count:n,start:l,loop:e.loop,ilen:c<l&&!h?n+c-l:c-l}}function zo(t,e,i,n){const{points:o,options:s}=e,{count:a,start:r,loop:l,ilen:c}=Io(o,i,n),h=function(t){return t.stepped?Jt:t.tension||"monotone"===t.cubicInterpolationMode?te:Eo}(s);let d,u,f,{move:g=!0,reverse:p}=n||{};for(d=0;d<=c;++d)u=o[(r+(p?c-d:d))%a],u.skip||(g?(t.moveTo(u.x,u.y),g=!1):h(t,f,u,p,s.stepped),f=u);return l&&(u=o[(r+(p?c:0))%a],h(t,f,u,p,s.stepped)),!!l}function Fo(t,e,i,n){const o=e.points,{count:s,start:a,ilen:r}=Io(o,i,n),{move:l=!0,reverse:c}=n||{};let h,d,u,f,g,p,m=0,x=0;const b=t=>(a+(c?r-t:t))%s,_=()=>{f!==g&&(t.lineTo(m,g),t.lineTo(m,f),t.lineTo(m,p))};for(l&&(d=o[b(0)],t.moveTo(d.x,d.y)),h=0;h<=r;++h){if(d=o[b(h)],d.skip)continue;const e=d.x,i=d.y,n=0|e;n===u?(i<f?f=i:i>g&&(g=i),m=(x*m+e)/++x):(_(),t.lineTo(e,i),u=n,x=0,f=g=i),p=i}_()}function Bo(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?Fo:zo}Lo.id="arc",Lo.defaults={borderAlign:"center",borderColor:"#fff",borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0},Lo.defaultRoutes={backgroundColor:"backgroundColor"};const Vo="function"==typeof Path2D;function Wo(t,e,i,n){Vo&&1===e.segments.length?function(t,e,i,n){let o=e._path;o||(o=e._path=new Path2D,e.path(o,i,n)&&o.closePath()),Ro(t,e.options),t.stroke(o)}(t,e,i,n):function(t,e,i,n){const{segments:o,options:s}=e,a=Bo(e);for(const r of o)Ro(t,s,r.style),t.beginPath(),a(t,e,r,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}(t,e,i,n)}class No extends Mn{constructor(t){super(),this.animated=!0,this.options=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this,n=i.options;if((n.tension||"monotone"===n.cubicInterpolationMode)&&!n.stepped&&!i._pointsUpdated){const o=n.spanGaps?i._loop:i._fullLoop;yi(i._points,n,t,o,e),i._pointsUpdated=!0}}set points(t){const e=this;e._points=t,delete e._segments,delete e._path,e._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Fi(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this,n=i.options,o=t[e],s=i.points,a=zi(i,{property:e,start:o,end:o});if(!a.length)return;const r=[],l=function(t){return t.stepped?Pi:t.tension||"monotone"===t.cubicInterpolationMode?Di:Si}(n);let c,h;for(c=0,h=a.length;c<h;++c){const{start:i,end:h}=a[c],d=s[i],u=s[h];if(d===u){r.push(d);continue}const f=l(d,u,Math.abs((o-d[e])/(u[e]-d[e])),n.stepped);f[e]=t[e],r.push(f)}return 1===r.length?r[0]:r}pathSegment(t,e,i){return Bo(this)(t,this,e,i)}path(t,e,i){const n=this,o=n.segments,s=Bo(n);let a=n._loop;e=e||0,i=i||n.points.length-e;for(const r of o)a&=s(t,n,r,{start:e,end:e+i-1});return!!a}draw(t,e,i,n){const o=this,s=o.options||{};(o.points||[]).length&&s.borderWidth&&(t.save(),Wo(t,o,i,n),t.restore()),o.animated&&(o._pointsUpdated=!1,o._path=void 0)}}function Ho(t,e,i,n){const o=t.options,{[i]:s}=t.getProps([i],n);return Math.abs(e-s)<o.radius+o.hitRadius}No.id="line",No.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},No.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},No.descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};class jo extends Mn{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:o,y:s}=this.getProps(["x","y"],i);return Math.pow(t-o,2)+Math.pow(e-s,2)<Math.pow(n.hitRadius+n.radius,2)}inXRange(t,e){return Ho(this,t,"x",e)}inYRange(t,e){return Ho(this,t,"y",e)}getCenterPoint(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){let e=(t=t||this.options||{}).radius||0;e=Math.max(e,e&&t.hoverRadius||0);return 2*(e+(e&&t.borderWidth||0))}draw(t,e){const i=this,n=i.options;i.skip||n.radius<.1||!Gt(i,e,i.size(n)/2)||(t.strokeStyle=n.borderColor,t.lineWidth=n.borderWidth,t.fillStyle=n.backgroundColor,Kt(t,n,i.x,i.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function $o(t,e){const{x:i,y:n,base:o,width:s,height:a}=t.getProps(["x","y","base","width","height"],e);let r,l,c,h,d;return t.horizontal?(d=a/2,r=Math.min(i,o),l=Math.max(i,o),c=n-d,h=n+d):(d=s/2,r=i-d,l=i+d,c=Math.min(n,o),h=Math.max(n,o)),{left:r,top:c,right:l,bottom:h}}function Yo(t,e,i,n){return t?0:Ht(e,i,n)}function Uo(t){const e=$o(t),i=e.right-e.left,n=e.bottom-e.top,o=function(t,e,i){const n=t.options.borderWidth,o=t.borderSkipped,s=ze(n);return{t:Yo(o.top,s.top,0,i),r:Yo(o.right,s.right,0,e),b:Yo(o.bottom,s.bottom,0,i),l:Yo(o.left,s.left,0,e)}}(t,i/2,n/2),s=function(t,e,i){const{enableBorderRadius:n}=t.getProps(["enableBorderRadius"]),o=t.options.borderRadius,s=Fe(o),a=Math.min(e,i),r=t.borderSkipped,l=n||U(o);return{topLeft:Yo(!l||r.top||r.left,s.topLeft,0,a),topRight:Yo(!l||r.top||r.right,s.topRight,0,a),bottomLeft:Yo(!l||r.bottom||r.left,s.bottomLeft,0,a),bottomRight:Yo(!l||r.bottom||r.right,s.bottomRight,0,a)}}(t,i/2,n/2);return{outer:{x:e.left,y:e.top,w:i,h:n,radius:s},inner:{x:e.left+o.l,y:e.top+o.t,w:i-o.l-o.r,h:n-o.t-o.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(o.t,o.l)),topRight:Math.max(0,s.topRight-Math.max(o.t,o.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(o.b,o.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(o.b,o.r))}}}}function Xo(t,e,i,n){const o=null===e,s=null===i,a=t&&!(o&&s)&&$o(t,n);return a&&(o||e>=a.left&&e<=a.right)&&(s||i>=a.top&&i<=a.bottom)}function qo(t,e){t.rect(e.x,e.y,e.w,e.h)}function Ko(t,e,i={}){const n=t.x!==i.x?-e:0,o=t.y!==i.y?-e:0,s=(t.x+t.w!==i.x+i.w?e:0)-n,a=(t.y+t.h!==i.y+i.h?e:0)-o;return{x:t.x+n,y:t.y+o,w:t.w+s,h:t.h+a,radius:t.radius}}jo.id="point",jo.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},jo.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class Go extends Mn{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,t&&Object.assign(this,t)}draw(t){const e=this.options,{inner:i,outer:n}=Uo(this),o=(s=n.radius).topLeft||s.topRight||s.bottomLeft||s.bottomRight?ne:qo;var s;const a=.33;t.save(),n.w===i.w&&n.h===i.h||(t.beginPath(),o(t,Ko(n,a,i)),t.clip(),o(t,Ko(i,-.33,n)),t.fillStyle=e.borderColor,t.fill("evenodd")),t.beginPath(),o(t,Ko(i,a,n)),t.fillStyle=e.backgroundColor,t.fill(),t.restore()}inRange(t,e,i){return Xo(this,t,e,i)}inXRange(t,e){return Xo(this,t,null,e)}inYRange(t,e){return Xo(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+n)/2:e,y:o?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}Go.id="bar",Go.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,enableBorderRadius:!0,pointStyle:void 0},Go.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var Zo=Object.freeze({__proto__:null,ArcElement:Lo,LineElement:No,PointElement:jo,BarElement:Go});function Qo(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}function Jo(t){t.data.datasets.forEach((t=>{Qo(t)}))}var ts={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void Jo(t);const n=t.width;t.data.datasets.forEach(((e,o)=>{const{_data:s,indexAxis:a}=e,r=t.getDatasetMeta(o),l=s||e.data;if("y"===We([a,t.options.indexAxis]))return;if("line"!==r.type)return;const c=t.scales[r.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let{start:h,count:d}=function(t,e){const i=e.length;let n,o=0;const{iScale:s}=t,{min:a,max:r,minDefined:l,maxDefined:c}=s.getUserBounds();return l&&(o=Ht(se(e,s.axis,a).lo,0,i-1)),n=c?Ht(se(e,s.axis,r).hi+1,o,i)-o:i-o,{start:o,count:n}}(r,l);if(d<=(i.threshold||4*n))return void Qo(e);let u;switch($(s)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":u=function(t,e,i,n,o){const s=o.samples||n;if(s>=i)return t.slice(e,e+i);const a=[],r=(i-2)/(s-2);let l=0;const c=e+i-1;let h,d,u,f,g,p=e;for(a[l++]=t[p],h=0;h<s-2;h++){let n,o=0,s=0;const c=Math.floor((h+1)*r)+1+e,m=Math.min(Math.floor((h+2)*r)+1,i)+e,x=m-c;for(n=c;n<m;n++)o+=t[n].x,s+=t[n].y;o/=x,s/=x;const b=Math.floor(h*r)+1+e,_=Math.min(Math.floor((h+1)*r)+1,i)+e,{x:y,y:v}=t[p];for(u=f=-1,n=b;n<_;n++)f=.5*Math.abs((y-o)*(t[n].y-v)-(y-t[n].x)*(s-v)),f>u&&(u=f,d=t[n],g=n);a[l++]=d,p=g}return a[l++]=t[c],a}(l,h,d,n,i);break;case"min-max":u=function(t,e,i,n){let o,s,a,r,l,c,h,d,u,f,g=0,p=0;const m=[],x=e+i-1,b=t[e].x,_=t[x].x-b;for(o=e;o<e+i;++o){s=t[o],a=(s.x-b)/_*n,r=s.y;const e=0|a;if(e===l)r<u?(u=r,c=o):r>f&&(f=r,h=o),g=(p*g+s.x)/++p;else{const i=o-1;if(!$(c)&&!$(h)){const e=Math.min(c,h),n=Math.max(c,h);e!==d&&e!==i&&m.push({...t[e],x:g}),n!==d&&n!==i&&m.push({...t[n],x:g})}o>0&&i!==d&&m.push(t[i]),m.push(s),l=e,p=0,u=f=r,c=h=d=o}}return m}(l,h,d,n);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=u}))},destroy(t){Jo(t)}};function es(t,e,i){const n=function(t){const e=t.options,i=e.fill;let n=K(i&&i.target,i);return void 0===n&&(n=!!e.backgroundColor),!1!==n&&null!==n&&(!0===n?"origin":n)}(t);if(U(n))return!isNaN(n.value)&&n;let o=parseFloat(n);return X(o)&&Math.floor(o)===o?("-"!==n[0]&&"+"!==n[0]||(o=e+o),!(o===e||o<0||o>=i)&&o):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}class is{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:o,radius:s}=this;return e=e||{start:0,end:_t},t.arc(n,o,s,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,o=t.angle;return{x:e+Math.cos(o)*n,y:i+Math.sin(o)*n,angle:o}}}function ns(t){return(t.scale||{}).getPointPositionForValue?function(t){const{scale:e,fill:i}=t,n=e.options,o=e.getLabels().length,s=[],a=n.reverse?e.max:e.min,r=n.reverse?e.min:e.max;let l,c,h;if(h="start"===i?a:"end"===i?r:U(i)?i.value:e.getBaseValue(),n.grid.circular)return c=e.getPointPositionForValue(0,a),new is({x:c.x,y:c.y,radius:e.getDistanceFromCenterForValue(h)});for(l=0;l<o;++l)s.push(e.getPointPositionForValue(l,h));return s}(t):function(t){const{scale:e={},fill:i}=t;let n,o=null;return"start"===i?o=e.bottom:"end"===i?o=e.top:U(i)?o=e.getPixelForValue(i.value):e.getBasePixel&&(o=e.getBasePixel()),X(o)?(n=e.isHorizontal(),{x:n?o:null,y:n?null:o}):null}(t)}function os(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function ss(t){const{chart:e,scale:i,index:n,line:o}=t,s=[],a=o.segments,r=o.points,l=function(t,e){const i=[],n=t.getSortedVisibleDatasetMetas();for(let t=0;t<n.length;t++){const o=n[t];if(o.index===e)break;as(o)&&i.unshift(o.dataset)}return i}(e,n);l.push(cs({x:null,y:i.bottom},o));for(let t=0;t<a.length;t++){const e=a[t];for(let t=e.start;t<=e.end;t++)rs(s,r[t],l)}return new No({points:s,options:{}})}const as=t=>"line"===t.type&&!t.hidden;function rs(t,e,i){const n=[];for(let o=0;o<i.length;o++){const s=i[o],{first:a,last:r,point:l}=ls(s,e,"x");if(!(!l||a&&r))if(a)n.unshift(l);else if(t.push(l),!r)break}t.push(...n)}function ls(t,e,i){const n=t.interpolate(e,i);if(!n)return{};const o=n[i],s=t.segments,a=t.points;let r=!1,l=!1;for(let t=0;t<s.length;t++){const e=s[t],n=a[e.start][i],c=a[e.end][i];if(o>=n&&o<=c){r=o===n,l=o===c;break}}return{first:r,last:l,point:n}}function cs(t,e){let i=[],n=!1;return Y(t)?(n=!0,i=t):i=function(t,e){const{x:i=null,y:n=null}=t||{},o=e.points,s=[];return e.segments.forEach((({start:t,end:e})=>{e=os(t,e,o);const a=o[t],r=o[e];null!==n?(s.push({x:a.x,y:n}),s.push({x:r.x,y:n})):null!==i&&(s.push({x:i,y:a.y}),s.push({x:i,y:r.y}))})),s}(t,e),i.length?new No({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function hs(t,e,i){let n=t[e].fill;const o=[e];let s;if(!i)return n;for(;!1!==n&&-1===o.indexOf(n);){if(!X(n))return n;if(s=t[n],!s)return!1;if(s.visible)return n;o.push(n),n=s.fill}return!1}function ds(t,e,i){t.beginPath(),e.path(t),t.lineTo(e.last().x,i),t.lineTo(e.first().x,i),t.closePath(),t.clip()}function us(t,e,i,n){if(n)return;let o=e[t],s=i[t];return"angle"===t&&(o=Wt(o),s=Wt(s)),{property:t,start:o,end:s}}function fs(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function gs(t,e,i){const{top:n,bottom:o}=e.chart.chartArea,{property:s,start:a,end:r}=i||{};"x"===s&&(t.beginPath(),t.rect(a,n,r-a,o-n),t.clip())}function ps(t,e,i,n){const o=e.interpolate(i,n);o&&t.lineTo(o.x,o.y)}function ms(t,e){const{line:i,target:n,property:o,color:s,scale:a}=e,r=function(t,e,i){const n=t.segments,o=t.points,s=e.points,a=[];for(const t of n){let{start:n,end:r}=t;r=os(n,r,o);const l=us(i,o[n],o[r],t.loop);if(!e.segments){a.push({source:t,target:l,start:o[n],end:o[r]});continue}const c=zi(e,l);for(const e of c){const n=us(i,s[e.start],s[e.end],e.loop),r=Ii(t,o,n);for(const t of r)a.push({source:t,target:e,start:{[i]:fs(l,n,"start",Math.max)},end:{[i]:fs(l,n,"end",Math.min)}})}}return a}(i,n,o);for(const{source:e,target:l,start:c,end:h}of r){const{style:{backgroundColor:r=s}={}}=e,d=!0!==n;t.save(),t.fillStyle=r,gs(t,a,d&&us(o,c,h)),t.beginPath();const u=!!i.pathSegment(t,e);let f;if(d){u?t.closePath():ps(t,n,h,o);const e=!!n.pathSegment(t,l,{move:u,reverse:!0});f=u&&e,f||ps(t,n,c,o)}t.closePath(),t.fill(f?"evenodd":"nonzero"),t.restore()}}function xs(t,e,i){const n=function(t){const{chart:e,fill:i,line:n}=t;if(X(i))return function(t,e){const i=t.getDatasetMeta(e);return i&&t.isDatasetVisible(e)?i.dataset:null}(e,i);if("stack"===i)return ss(t);if("shape"===i)return!0;const o=ns(t);return o instanceof is?o:cs(o,n)}(e),{line:o,scale:s,axis:a}=e,r=o.options,l=r.fill,c=r.backgroundColor,{above:h=c,below:d=c}=l||{};n&&o.points.length&&(Zt(t,i),function(t,e){const{line:i,target:n,above:o,below:s,area:a,scale:r}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&s!==o&&(ds(t,n,a.top),ms(t,{line:i,target:n,color:o,scale:r,property:l}),t.restore(),t.save(),ds(t,n,a.bottom)),ms(t,{line:i,target:n,color:s,scale:r,property:l}),t.restore()}(t,{line:o,target:n,above:h,below:d,area:i,scale:s,axis:a}),Qt(t))}var bs={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,o=[];let s,a,r,l;for(a=0;a<n;++a)s=t.getDatasetMeta(a),r=s.dataset,l=null,r&&r.options&&r instanceof No&&(l={visible:t.isDatasetVisible(a),index:a,fill:es(r,a,n),chart:t,axis:s.controller.options.indexAxis,scale:s.vScale,line:r}),s.$filler=l,o.push(l);for(a=0;a<n;++a)l=o[a],l&&!1!==l.fill&&(l.fill=hs(o,a,i.propagate))},beforeDraw(t,e,i){const n="beforeDraw"===i.drawTime,o=t.getSortedVisibleDatasetMetas(),s=t.chartArea;for(let e=o.length-1;e>=0;--e){const i=o[e].$filler;i&&(i.line.updateControlPoints(s,i.axis),n&&xs(t.ctx,i,s))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;i&&xs(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;n&&!1!==n.fill&&"beforeDatasetDraw"===i.drawTime&&xs(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const _s=(t,e)=>{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}};class ys extends Mn{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){const n=this;n.maxWidth=t,n.maxHeight=e,n._margins=i,n.setDimensions(),n.buildLabels(),n.fit()}setDimensions(){const t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=t._margins.left,t.right=t.width):(t.height=t.maxHeight,t.top=t._margins.top,t.bottom=t.height)}buildLabels(){const t=this,e=t.options.labels||{};let i=Q(e.generateLabels,[t.chart],t)||[];e.filter&&(i=i.filter((i=>e.filter(i,t.chart.data)))),e.sort&&(i=i.sort(((i,n)=>e.sort(i,n,t.chart.data)))),t.options.reverse&&i.reverse(),t.legendItems=i}fit(){const t=this,{options:e,ctx:i}=t;if(!e.display)return void(t.width=t.height=0);const n=e.labels,o=Ve(n.font),s=o.size,a=t._computeTitleHeight(),{boxWidth:r,itemHeight:l}=_s(n,s);let c,h;i.font=o.string,t.isHorizontal()?(c=t.maxWidth,h=t._fitRows(a,s,r,l)+10):(h=t.maxHeight,c=t._fitCols(a,s,r,l)+10),t.width=Math.min(c,e.maxWidth||t.maxWidth),t.height=Math.min(h,e.maxHeight||t.maxHeight)}_fitRows(t,e,i,n){const o=this,{ctx:s,maxWidth:a,options:{labels:{padding:r}}}=o,l=o.legendHitBoxes=[],c=o.lineWidths=[0],h=n+r;let d=t;s.textAlign="left",s.textBaseline="middle";let u=-1,f=-h;return o.legendItems.forEach(((t,o)=>{const g=i+e/2+s.measureText(t.text).width;(0===o||c[c.length-1]+g+2*r>a)&&(d+=h,c[c.length-(o>0?0:1)]=0,f+=h,u++),l[o]={left:0,top:f,row:u,width:g,height:n},c[c.length-1]+=g+r})),d}_fitCols(t,e,i,n){const o=this,{ctx:s,maxHeight:a,options:{labels:{padding:r}}}=o,l=o.legendHitBoxes=[],c=o.columnSizes=[],h=a-t;let d=r,u=0,f=0,g=0,p=0;return o.legendItems.forEach(((t,o)=>{const a=i+e/2+s.measureText(t.text).width;o>0&&f+n+2*r>h&&(d+=u+r,c.push({width:u,height:f}),g+=u+r,p++,u=f=0),l[o]={left:g,top:f,col:p,width:a,height:n},u=Math.max(u,a),f+=n+r})),d+=u,c.push({width:u,height:f}),d}adjustHitBoxes(){const t=this;if(!t.options.display)return;const e=t._computeTitleHeight(),{legendHitBoxes:i,options:{align:n,labels:{padding:s},rtl:a}}=t,r=Ti(a,t.left,t.width);if(this.isHorizontal()){let a=0,l=o(n,t.left+s,t.right-t.lineWidths[a]);for(const c of i)a!==c.row&&(a=c.row,l=o(n,t.left+s,t.right-t.lineWidths[a])),c.top+=t.top+e+s,c.left=r.leftForLtr(r.x(l),c.width),l+=c.width+s}else{let a=0,l=o(n,t.top+e+s,t.bottom-t.columnSizes[a].height);for(const c of i)c.col!==a&&(a=c.col,l=o(n,t.top+e+s,t.bottom-t.columnSizes[a].height)),c.top=l,c.left+=t.left+s,c.left=r.leftForLtr(r.x(c.left),c.width),l+=c.height+s}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){const t=this;if(t.options.display){const e=t.ctx;Zt(e,t),t._draw(),Qt(e)}}_draw(){const t=this,{options:e,columnSizes:i,lineWidths:n,ctx:a}=t,{align:r,labels:l}=e,c=xt.color,h=Ti(e.rtl,t.left,t.width),d=Ve(l.font),{color:u,padding:f}=l,g=d.size,p=g/2;let m;t.drawTitle(),a.textAlign=h.textAlign("left"),a.textBaseline="middle",a.lineWidth=.5,a.font=d.string;const{boxWidth:x,boxHeight:b,itemHeight:_}=_s(l,g),y=t.isHorizontal(),v=this._computeTitleHeight();m=y?{x:o(r,t.left+f,t.right-n[0]),y:t.top+f+v,line:0}:{x:t.left+f,y:o(r,t.top+v+f,t.bottom-i[0].height),line:0},Ai(t.ctx,e.textDirection);const w=_+f;t.legendItems.forEach(((M,k)=>{a.strokeStyle=M.fontColor||u,a.fillStyle=M.fontColor||u;const S=a.measureText(M.text).width,P=h.textAlign(M.textAlign||(M.textAlign=l.textAlign)),D=x+p+S;let C=m.x,O=m.y;h.setWidth(t.width),y?k>0&&C+D+f>t.right&&(O=m.y+=w,m.line++,C=m.x=o(r,t.left+f,t.right-n[m.line])):k>0&&O+w>t.bottom&&(C=m.x=C+i[m.line].width+f,m.line++,O=m.y=o(r,t.top+v+f,t.bottom-i[m.line].height));!function(t,e,i){if(isNaN(x)||x<=0||isNaN(b)||b<0)return;a.save();const n=K(i.lineWidth,1);if(a.fillStyle=K(i.fillStyle,c),a.lineCap=K(i.lineCap,"butt"),a.lineDashOffset=K(i.lineDashOffset,0),a.lineJoin=K(i.lineJoin,"miter"),a.lineWidth=n,a.strokeStyle=K(i.strokeStyle,c),a.setLineDash(K(i.lineDash,[])),l.usePointStyle){const o={radius:x*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:n},s=h.xPlus(t,x/2);Kt(a,o,s,e+p)}else{const o=e+Math.max((g-b)/2,0),s=h.leftForLtr(t,x),r=Fe(i.borderRadius);a.beginPath(),Object.values(r).some((t=>0!==t))?ne(a,{x:s,y:o,w:x,h:b,radius:r}):a.rect(s,o,x,b),a.fill(),0!==n&&a.stroke()}a.restore()}(h.x(C),O,M),C=s(P,C+x+p,y?C+D:t.right,e.rtl),function(t,e,i){ee(a,i.text,t,e+_/2,d,{strikethrough:i.hidden,textAlign:h.textAlign(i.textAlign)})}(h.x(C),O,M),y?m.x+=D+f:m.y+=w})),Li(t.ctx,e.textDirection)}drawTitle(){const t=this,e=t.options,i=e.title,s=Ve(i.font),a=Be(i.padding);if(!i.display)return;const r=Ti(e.rtl,t.left,t.width),l=t.ctx,c=i.position,h=s.size/2,d=a.top+h;let u,f=t.left,g=t.width;if(this.isHorizontal())g=Math.max(...t.lineWidths),u=t.top+d,f=o(e.align,f,t.right-g);else{const i=t.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);u=d+o(e.align,t.top,t.bottom-i-e.labels.padding-t._computeTitleHeight())}const p=o(c,f,f+g);l.textAlign=r.textAlign(n(c)),l.textBaseline="middle",l.strokeStyle=i.color,l.fillStyle=i.color,l.font=s.string,ee(l,i.text,p,u,s)}_computeTitleHeight(){const t=this.options.title,e=Ve(t.font),i=Be(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){const i=this;let n,o,s;if(t>=i.left&&t<=i.right&&e>=i.top&&e<=i.bottom)for(s=i.legendHitBoxes,n=0;n<s.length;++n)if(o=s[n],t>=o.left&&t<=o.left+o.width&&e>=o.top&&e<=o.top+o.height)return i.legendItems[n];return null}handleEvent(t){const e=this,i=e.options;if(!function(t,e){if("mousemove"===t&&(e.onHover||e.onLeave))return!0;if(e.onClick&&("click"===t||"mouseup"===t))return!0;return!1}(t.type,i))return;const n=e._getLegendItemAt(t.x,t.y);if("mousemove"===t.type){const a=e._hoveredItem,r=(s=n,null!==(o=a)&&null!==s&&o.datasetIndex===s.datasetIndex&&o.index===s.index);a&&!r&&Q(i.onLeave,[t,a,e],e),e._hoveredItem=n,n&&!r&&Q(i.onHover,[t,n,e],e)}else n&&Q(i.onClick,[t,n,e],e);var o,s}}var vs={id:"legend",_element:ys,start(t,e,i){const n=t.legend=new ys({ctx:t.ctx,options:i,chart:t});ti.configure(t,n,i),ti.addBox(t,n)},stop(t){ti.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;ti.configure(t,n,i),n.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const n=e.datasetIndex,o=i.chart;o.isDatasetVisible(n)?(o.hide(n),e.hidden=!0):(o.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:o,color:s}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const a=t.controller.getStyle(i?0:void 0),r=Be(a.borderWidth);return{text:e[t.index].label,fillStyle:a.backgroundColor,fontColor:s,hidden:!t.visible,lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:(r.width+r.height)/4,strokeStyle:a.borderColor,pointStyle:n||a.pointStyle,rotation:a.rotation,textAlign:o||a.textAlign,borderRadius:0,datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class ws extends Mn{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this,n=i.options;if(i.left=0,i.top=0,!n.display)return void(i.width=i.height=i.right=i.bottom=0);i.width=i.right=t,i.height=i.bottom=e;const o=Y(n.text)?n.text.length:1;i._padding=Be(n.padding);const s=o*Ve(n.font).lineHeight+i._padding.height;i.isHorizontal()?i.height=s:i.width=s}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:n,right:s,options:a}=this,r=a.align;let l,c,h,d=0;return this.isHorizontal()?(c=o(r,i,s),h=e+t,l=s-i):("left"===a.position?(c=i+t,h=o(r,n,e),d=-.5*bt):(c=s-t,h=o(r,e,n),d=.5*bt),l=n-e),{titleX:c,titleY:h,maxWidth:l,rotation:d}}draw(){const t=this,e=t.ctx,i=t.options;if(!i.display)return;const o=Ve(i.font),s=o.lineHeight/2+t._padding.top,{titleX:a,titleY:r,maxWidth:l,rotation:c}=t._drawArgs(s);ee(e,i.text,0,0,o,{color:i.color,maxWidth:l,rotation:c,textAlign:n(i.align),textBaseline:"middle",translation:[a,r]})}}var Ms={id:"title",_element:ws,start(t,e,i){!function(t,e){const i=new ws({ctx:t.ctx,options:e,chart:t});ti.configure(t,i,e),ti.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;ti.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const n=t.titleBlock;ti.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const ks=new WeakMap;var Ss={id:"subtitle",start(t,e,i){const n=new ws({ctx:t.ctx,options:i,chart:t});ti.configure(t,n,i),ti.addBox(t,n),ks.set(t,n)},stop(t){ti.removeBox(t,ks.get(t)),ks.delete(t)},beforeUpdate(t,e,i){const n=ks.get(t);ti.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Ps={average(t){if(!t.length)return!1;let e,i,n=0,o=0,s=0;for(e=0,i=t.length;e<i;++e){const i=t[e].element;if(i&&i.hasValue()){const t=i.tooltipPosition();n+=t.x,o+=t.y,++s}}return{x:n/s,y:o/s}},nearest(t,e){if(!t.length)return!1;let i,n,o,s=e.x,a=e.y,r=Number.POSITIVE_INFINITY;for(i=0,n=t.length;i<n;++i){const n=t[i].element;if(n&&n.hasValue()){const t=Bt(e,n.getCenterPoint());t<r&&(r=t,o=n)}}if(o){const t=o.tooltipPosition();s=t.x,a=t.y}return{x:s,y:a}}};function Ds(t,e){return e&&(Y(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Cs(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function Os(t,e){const{element:i,datasetIndex:n,index:o}=e,s=t.getDatasetMeta(n).controller,{label:a,value:r}=s.getLabelAndValue(o);return{chart:t,label:a,parsed:s.getParsed(o),raw:t.data.datasets[n].data[o],formattedValue:r,dataset:s.getDataset(),dataIndex:o,datasetIndex:n,element:i}}function Ts(t,e){const i=t._chart.ctx,{body:n,footer:o,title:s}=t,{boxWidth:a,boxHeight:r}=e,l=Ve(e.bodyFont),c=Ve(e.titleFont),h=Ve(e.footerFont),d=s.length,u=o.length,f=n.length,g=Be(e.padding);let p=g.height,m=0,x=n.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(x+=t.beforeBody.length+t.afterBody.length,d&&(p+=d*c.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),x){p+=f*(e.displayColors?Math.max(r,l.lineHeight):l.lineHeight)+(x-f)*l.lineHeight+(x-1)*e.bodySpacing}u&&(p+=e.footerMarginTop+u*h.lineHeight+(u-1)*e.footerSpacing);let b=0;const _=function(t){m=Math.max(m,i.measureText(t).width+b)};return i.save(),i.font=c.string,J(t.title,_),i.font=l.string,J(t.beforeBody.concat(t.afterBody),_),b=e.displayColors?a+2+e.boxPadding:0,J(n,(t=>{J(t.before,_),J(t.lines,_),J(t.after,_)})),b=0,i.font=h.string,J(t.footer,_),i.restore(),m+=g.width,{width:m,height:p}}function As(t,e,i,n){const{x:o,width:s}=i,{width:a,chartArea:{left:r,right:l}}=t;let c="center";return"center"===n?c=o<=(r+l)/2?"left":"right":o<=s/2?c="left":o>=a-s/2&&(c="right"),function(t,e,i,n){const{x:o,width:s}=n,a=i.caretSize+i.caretPadding;return"left"===t&&o+s+a>e.width||"right"===t&&o-s-a<0||void 0}(c,t,e,i)&&(c="center"),c}function Ls(t,e,i){const n=e.yAlign||function(t,e){const{y:i,height:n}=e;return i<n/2?"top":i>t.height-n/2?"bottom":"center"}(t,i);return{xAlign:e.xAlign||As(t,e,i,n),yAlign:n}}function Rs(t,e,i,n){const{caretSize:o,caretPadding:s,cornerRadius:a}=t,{xAlign:r,yAlign:l}=i,c=o+s,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=Fe(a);let g=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,r);const p=function(t,e,i){let{y:n,height:o}=t;return"top"===e?n+=i:n-="bottom"===e?o+i:o/2,n}(e,l,c);return"center"===l?"left"===r?g+=c:"right"===r&&(g-=c):"left"===r?g-=Math.max(h,u)+s:"right"===r&&(g+=Math.max(d,f)+s),{x:Ht(g,0,n.width-e.width),y:Ht(p,0,n.height-e.height)}}function Es(t,e,i){const n=Be(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function Is(t){return Ds([],Cs(t))}function zs(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class Fs extends Mn{constructor(t){super(),this.opacity=0,this._active=[],this._chart=t._chart,this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this,e=t._cachedAnimations;if(e)return e;const i=t._chart,n=t.options.setContext(t.getContext()),o=n.enabled&&i.options.animation&&n.animations,s=new hn(t._chart,o);return o._cacheable&&(t._cachedAnimations=Object.freeze(s)),s}getContext(){const t=this;return t.$context||(t.$context=(e=t._chart.getContext(),i=t,n=t._tooltipItems,Object.assign(Object.create(e),{tooltip:i,tooltipItems:n,type:"tooltip"})));var e,i,n}getTitle(t,e){const i=this,{callbacks:n}=e,o=n.beforeTitle.apply(i,[t]),s=n.title.apply(i,[t]),a=n.afterTitle.apply(i,[t]);let r=[];return r=Ds(r,Cs(o)),r=Ds(r,Cs(s)),r=Ds(r,Cs(a)),r}getBeforeBody(t,e){return Is(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const i=this,{callbacks:n}=e,o=[];return J(t,(t=>{const e={before:[],lines:[],after:[]},s=zs(n,t);Ds(e.before,Cs(s.beforeLabel.call(i,t))),Ds(e.lines,s.label.call(i,t)),Ds(e.after,Cs(s.afterLabel.call(i,t))),o.push(e)})),o}getAfterBody(t,e){return Is(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const i=this,{callbacks:n}=e,o=n.beforeFooter.apply(i,[t]),s=n.footer.apply(i,[t]),a=n.afterFooter.apply(i,[t]);let r=[];return r=Ds(r,Cs(o)),r=Ds(r,Cs(s)),r=Ds(r,Cs(a)),r}_createItems(t){const e=this,i=e._active,n=e._chart.data,o=[],s=[],a=[];let r,l,c=[];for(r=0,l=i.length;r<l;++r)c.push(Os(e._chart,i[r]));return t.filter&&(c=c.filter(((e,i,o)=>t.filter(e,i,o,n)))),t.itemSort&&(c=c.sort(((e,i)=>t.itemSort(e,i,n)))),J(c,(i=>{const n=zs(t.callbacks,i);o.push(n.labelColor.call(e,i)),s.push(n.labelPointStyle.call(e,i)),a.push(n.labelTextColor.call(e,i))})),e.labelColors=o,e.labelPointStyles=s,e.labelTextColors=a,e.dataPoints=c,c}update(t,e){const i=this,n=i.options.setContext(i.getContext()),o=i._active;let s,a=[];if(o.length){const t=Ps[n.position].call(i,o,i._eventPosition);a=i._createItems(n),i.title=i.getTitle(a,n),i.beforeBody=i.getBeforeBody(a,n),i.body=i.getBody(a,n),i.afterBody=i.getAfterBody(a,n),i.footer=i.getFooter(a,n);const e=i._size=Ts(i,n),r=Object.assign({},t,e),l=Ls(i._chart,n,r),c=Rs(n,r,l,i._chart);i.xAlign=l.xAlign,i.yAlign=l.yAlign,s={opacity:1,x:c.x,y:c.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==i.opacity&&(s={opacity:0});i._tooltipItems=a,i.$context=void 0,s&&i._resolveAnimations().update(i,s),t&&n.external&&n.external.call(i,{chart:i._chart,tooltip:i,replay:e})}drawCaret(t,e,i,n){const o=this.getCaretPosition(t,i,n);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:o}=this,{caretSize:s,cornerRadius:a}=i,{topLeft:r,topRight:l,bottomLeft:c,bottomRight:h}=Fe(a),{x:d,y:u}=t,{width:f,height:g}=e;let p,m,x,b,_,y;return"center"===o?(_=u+g/2,"left"===n?(p=d,m=p-s,b=_+s,y=_-s):(p=d+f,m=p+s,b=_-s,y=_+s),x=p):(m="left"===n?d+Math.max(r,c)+s:"right"===n?d+f-Math.max(l,h)-s:this.caretX,"top"===o?(b=u,_=b-s,p=m-s,x=m+s):(b=u+g,_=b+s,p=m+s,x=m-s),y=b),{x1:p,x2:m,x3:x,y1:b,y2:_,y3:y}}drawTitle(t,e,i){const n=this,o=n.title,s=o.length;let a,r,l;if(s){const c=Ti(i.rtl,n.x,n.width);for(t.x=Es(n,i.titleAlign,i),e.textAlign=c.textAlign(i.titleAlign),e.textBaseline="middle",a=Ve(i.titleFont),r=i.titleSpacing,e.fillStyle=i.titleColor,e.font=a.string,l=0;l<s;++l)e.fillText(o[l],c.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+r,l+1===s&&(t.y+=i.titleMarginBottom-r)}}_drawColorBox(t,e,i,n,o){const s=this,a=s.labelColors[i],r=s.labelPointStyles[i],{boxHeight:l,boxWidth:c,boxPadding:h}=o,d=Ve(o.bodyFont),u=Es(s,"left",o),f=n.x(u),g=l<d.lineHeight?(d.lineHeight-l)/2:0,p=e.y+g;if(o.usePointStyle){const e={radius:Math.min(c,l)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},i=n.leftForLtr(f,c)+c/2,s=p+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,Kt(t,e,i,s),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,Kt(t,e,i,s)}else{t.lineWidth=a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const e=n.leftForLtr(f,c-h),i=n.leftForLtr(n.xPlus(f,1),c-h-2),s=Fe(a.borderRadius);Object.values(s).some((t=>0!==t))?(t.beginPath(),t.fillStyle=o.multiKeyBackground,ne(t,{x:e,y:p,w:c,h:l,radius:s}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),ne(t,{x:i,y:p+1,w:c-2,h:l-2,radius:s}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(e,p,c,l),t.strokeRect(e,p,c,l),t.fillStyle=a.backgroundColor,t.fillRect(i,p+1,c-2,l-2))}t.fillStyle=s.labelTextColors[i]}drawBody(t,e,i){const n=this,{body:o}=n,{bodySpacing:s,bodyAlign:a,displayColors:r,boxHeight:l,boxWidth:c,boxPadding:h}=i,d=Ve(i.bodyFont);let u=d.lineHeight,f=0;const g=Ti(i.rtl,n.x,n.width),p=function(i){e.fillText(i,g.x(t.x+f),t.y+u/2),t.y+=u+s},m=g.textAlign(a);let x,b,_,y,v,w,M;for(e.textAlign=a,e.textBaseline="middle",e.font=d.string,t.x=Es(n,m,i),e.fillStyle=i.bodyColor,J(n.beforeBody,p),f=r&&"right"!==m?"center"===a?c/2+h:c+2+h:0,y=0,w=o.length;y<w;++y){for(x=o[y],b=n.labelTextColors[y],e.fillStyle=b,J(x.before,p),_=x.lines,r&&_.length&&(n._drawColorBox(e,t,y,g,i),u=Math.max(d.lineHeight,l)),v=0,M=_.length;v<M;++v)p(_[v]),u=d.lineHeight;J(x.after,p)}f=0,u=d.lineHeight,J(n.afterBody,p),t.y-=s}drawFooter(t,e,i){const n=this,o=n.footer,s=o.length;let a,r;if(s){const l=Ti(i.rtl,n.x,n.width);for(t.x=Es(n,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=l.textAlign(i.footerAlign),e.textBaseline="middle",a=Ve(i.footerFont),e.fillStyle=i.footerColor,e.font=a.string,r=0;r<s;++r)e.fillText(o[r],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+i.footerSpacing}}drawBackground(t,e,i,n){const{xAlign:o,yAlign:s}=this,{x:a,y:r}=t,{width:l,height:c}=i,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=Fe(n.cornerRadius);e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.beginPath(),e.moveTo(a+h,r),"top"===s&&this.drawCaret(t,e,i,n),e.lineTo(a+l-d,r),e.quadraticCurveTo(a+l,r,a+l,r+d),"center"===s&&"right"===o&&this.drawCaret(t,e,i,n),e.lineTo(a+l,r+c-f),e.quadraticCurveTo(a+l,r+c,a+l-f,r+c),"bottom"===s&&this.drawCaret(t,e,i,n),e.lineTo(a+u,r+c),e.quadraticCurveTo(a,r+c,a,r+c-u),"center"===s&&"left"===o&&this.drawCaret(t,e,i,n),e.lineTo(a,r+h),e.quadraticCurveTo(a,r,a+h,r),e.closePath(),e.fill(),n.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this,i=e._chart,n=e.$animations,o=n&&n.x,s=n&&n.y;if(o||s){const n=Ps[t.position].call(e,e._active,e._eventPosition);if(!n)return;const a=e._size=Ts(e,t),r=Object.assign({},n,e._size),l=Ls(i,t,r),c=Rs(t,r,l,i);o._to===c.x&&s._to===c.y||(e.xAlign=l.xAlign,e.yAlign=l.yAlign,e.width=a.width,e.height=a.height,e.caretX=n.x,e.caretY=n.y,e._resolveAnimations().update(e,c))}}draw(t){const e=this,i=e.options.setContext(e.getContext());let n=e.opacity;if(!n)return;e._updateAnimationTarget(i);const o={width:e.width,height:e.height},s={x:e.x,y:e.y};n=Math.abs(n)<.001?0:n;const a=Be(i.padding),r=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;i.enabled&&r&&(t.save(),t.globalAlpha=n,e.drawBackground(s,t,o,i),Ai(t,i.textDirection),s.y+=a.top,e.drawTitle(s,t,i),e.drawBody(s,t,i),e.drawFooter(s,t,i),Li(t,i.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this,n=i._active,o=t.map((({datasetIndex:t,index:e})=>{const n=i._chart.getDatasetMeta(t);if(!n)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:n.data[e],index:e}})),s=!tt(n,o),a=i._positionChanged(o,e);(s||a)&&(i._active=o,i._eventPosition=e,i.update(!0))}handleEvent(t,e){const i=this,n=i.options,o=i._active||[];let s=!1,a=[];"mouseout"!==t.type&&(a=i._chart.getElementsAtEventForMode(t,n.mode,n,e),n.reverse&&a.reverse());const r=i._positionChanged(a,t);return s=e||!tt(a,o)||r,s&&(i._active=a,(n.enabled||n.external)&&(i._eventPosition={x:t.x,y:t.y},i.update(!0,e))),s}_positionChanged(t,e){const{caretX:i,caretY:n,options:o}=this,s=Ps[o.position].call(this,t,e);return!1!==s&&(i!==s.x||n!==s.y)}}Fs.positioners=Ps;var Bs={id:"tooltip",_element:Fs,positioners:Ps,afterInit(t,e,i){i&&(t.tooltip=new Fs({_chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip,i={tooltip:e};!1!==t.notifyPlugins("beforeTooltipDraw",i)&&(e&&e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i))},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:H,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex<n)return i[e.dataIndex]}return""},afterTitle:H,beforeBody:H,beforeLabel:H,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const i=t.formattedValue;return $(i)||(e+=i),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:H,afterBody:H,beforeFooter:H,footer:H,afterFooter:H}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Vs=Object.freeze({__proto__:null,Decimation:ts,Filler:bs,Legend:vs,SubTitle:Ss,Title:Ms,Tooltip:Bs});function Ws(t,e,i){const n=t.indexOf(e);if(-1===n)return((t,e,i)=>"string"==typeof e?t.push(e)-1:isNaN(e)?null:i)(t,e,i);return n!==t.lastIndexOf(e)?i:n}class Ns extends En{constructor(t){super(t),this._startValue=void 0,this._valueRange=0}parse(t,e){if($(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:Ht(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:Ws(i,t,K(e,t)),i.length-1)}determineDataLimits(){const t=this,{minDefined:e,maxDefined:i}=t.getUserBounds();let{min:n,max:o}=t.getMinMax(!0);"ticks"===t.options.bounds&&(e||(n=0),i||(o=t.getLabels().length-1)),t.min=n,t.max=o}buildTicks(){const t=this,e=t.min,i=t.max,n=t.options.offset,o=[];let s=t.getLabels();s=0===e&&i===s.length-1?s:s.slice(e,i+1),t._valueRange=Math.max(s.length-(n?0:1),1),t._startValue=t.min-(n?.5:0);for(let t=e;t<=i;t++)o.push({value:t});return o}getLabelForValue(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}configure(){const t=this;super.configure(),t.isHorizontal()||(t._reversePixels=!t._reversePixels)}getPixelForValue(t){const e=this;return"number"!=typeof t&&(t=e.parse(t)),null===t?NaN:e.getPixelForDecimal((t-e._startValue)/e._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){const e=this;return Math.round(e._startValue+e.getDecimalForPixel(t)*e._valueRange)}getBasePixel(){return this.bottom}}function Hs(t,e,{horizontal:i,minRotation:n}){const o=Et(n),s=(i?Math.sin(o):Math.cos(o))||.001,a=.75*e*(""+t).length;return Math.min(e/s,a)}Ns.id="category",Ns.defaults={ticks:{callback:Ns.prototype.getLabelForValue}};class js extends En{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return $(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const t=this,{beginAtZero:e}=t.options,{minDefined:i,maxDefined:n}=t.getUserBounds();let{min:o,max:s}=t;const a=t=>o=i?o:t,r=t=>s=n?s:t;if(e){const t=Dt(o),e=Dt(s);t<0&&e<0?r(0):t>0&&e>0&&a(0)}if(o===s){let t=1;(s>=Number.MAX_SAFE_INTEGER||o<=Number.MIN_SAFE_INTEGER)&&(t=Math.abs(.05*s)),r(s+t),e||a(o-t)}t.min=o,t.max=s}getTickLimit(){const t=this,e=t.options.ticks;let i,{maxTicksLimit:n,stepSize:o}=e;return o?i=Math.ceil(t.max/o)-Math.floor(t.min/o)+1:(i=t.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this,e=t.options,i=e.ticks;let n=t.getTickLimit();n=Math.max(2,n);const o=function(t,e){const i=[],{bounds:n,step:o,min:s,max:a,precision:r,count:l,maxTicks:c,maxDigits:h,includeBounds:d}=t,u=o||1,f=c-1,{min:g,max:p}=e,m=!$(s),x=!$(a),b=!$(l),_=(p-g)/(h+1);let y,v,w,M,k=Ct((p-g)/f/u)*u;if(k<1e-14&&!m&&!x)return[{value:g},{value:p}];M=Math.ceil(p/k)-Math.floor(g/k),M>f&&(k=Ct(M*k/f/u)*u),$(r)||(y=Math.pow(10,r),k=Math.ceil(k*y)/y),"ticks"===n?(v=Math.floor(g/k)*k,w=Math.ceil(p/k)*k):(v=g,w=p),m&&x&&o&&Lt((a-s)/o,k/1e3)?(M=Math.round(Math.min((a-s)/k,c)),k=(a-s)/M,v=s,w=a):b?(v=m?s:v,w=x?a:w,M=l-1,k=(w-v)/M):(M=(w-v)/k,M=At(M,Math.round(M),k/1e3)?Math.round(M):Math.ceil(M));const S=Math.max(zt(k),zt(v));y=Math.pow(10,$(r)?S:r),v=Math.round(v*y)/y,w=Math.round(w*y)/y;let P=0;for(m&&(d&&v!==s?(i.push({value:s}),v<s&&P++,At(Math.round((v+P*k)*y)/y,s,Hs(s,_,t))&&P++):v<s&&P++);P<M;++P)i.push({value:Math.round((v+P*k)*y)/y});return x&&d&&w!==a?At(i[i.length-1].value,a,Hs(a,_,t))?i[i.length-1].value=a:i.push({value:a}):x&&w!==a||i.push({value:w}),i}({maxTicks:n,bounds:e.bounds,min:e.min,max:e.max,precision:i.precision,step:i.stepSize,count:i.count,maxDigits:t._maxDigits(),horizontal:t.isHorizontal(),minRotation:i.minRotation||0,includeBounds:!1!==i.includeBounds},t._range||t);return"ticks"===e.bounds&&Rt(o,t,"value"),e.reverse?(o.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),o}configure(){const t=this,e=t.ticks;let i=t.min,n=t.max;if(super.configure(),t.options.offset&&e.length){const t=(n-i)/Math.max(e.length-1,1)/2;i-=t,n+=t}t._startValue=i,t._endValue=n,t._valueRange=n-i}getLabelForValue(t){return Oi(t,this.chart.options.locale)}}class $s extends js{determineDataLimits(){const t=this,{min:e,max:i}=t.getMinMax(!0);t.min=X(e)?e:0,t.max=X(i)?i:1,t.handleTickRangeOptions()}computeTickLimit(){const t=this,e=t.isHorizontal(),i=e?t.width:t.height,n=Et(t.options.ticks.minRotation),o=(e?Math.sin(n):Math.cos(n))||.001,s=t._resolveTickFontOptions(0);return Math.ceil(i/Math.min(40,s.lineHeight/o))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function Ys(t){return 1===t/Math.pow(10,Math.floor(Pt(t)))}$s.id="linear",$s.defaults={ticks:{callback:Sn.formatters.numeric}};class Us extends En{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=js.prototype.parse.apply(this,[t,e]);if(0!==i)return X(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const t=this,{min:e,max:i}=t.getMinMax(!0);t.min=X(e)?Math.max(0,e):null,t.max=X(i)?Math.max(0,i):null,t.options.beginAtZero&&(t._zero=!0),t.handleTickRangeOptions()}handleTickRangeOptions(){const t=this,{minDefined:e,maxDefined:i}=t.getUserBounds();let n=t.min,o=t.max;const s=t=>n=e?n:t,a=t=>o=i?o:t,r=(t,e)=>Math.pow(10,Math.floor(Pt(t))+e);n===o&&(n<=0?(s(1),a(10)):(s(r(n,-1)),a(r(o,1)))),n<=0&&s(r(o,-1)),o<=0&&a(r(n,1)),t._zero&&t.min!==t._suggestedMin&&n===r(t.min,0)&&s(r(n,-1)),t.min=n,t.max=o}buildTicks(){const t=this,e=t.options,i=function(t,e){const i=Math.floor(Pt(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),o=[];let s=q(t.min,Math.pow(10,Math.floor(Pt(e.min)))),a=Math.floor(Pt(s)),r=Math.floor(s/Math.pow(10,a)),l=a<0?Math.pow(10,Math.abs(a)):1;do{o.push({value:s,major:Ys(s)}),++r,10===r&&(r=1,++a,l=a>=0?1:l),s=Math.round(r*Math.pow(10,a)*l)/l}while(a<i||a===i&&r<n);const c=q(t.max,s);return o.push({value:c,major:Ys(s)}),o}({min:t._userMin,max:t._userMax},t);return"ticks"===e.bounds&&Rt(i,t,"value"),e.reverse?(i.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),i}getLabelForValue(t){return void 0===t?"0":Oi(t,this.chart.options.locale)}configure(){const t=this,e=t.min;super.configure(),t._startValue=Pt(e),t._valueRange=Pt(t.max)-Pt(e)}getPixelForValue(t){const e=this;return void 0!==t&&0!==t||(t=e.min),null===t||isNaN(t)?NaN:e.getPixelForDecimal(t===e.min?0:(Pt(t)-e._startValue)/e._valueRange)}getValueForPixel(t){const e=this,i=e.getDecimalForPixel(t);return Math.pow(10,e._startValue+i*e._valueRange)}}function Xs(t){const e=t.ticks;if(e.display&&t.display){const t=Be(e.backdropPadding);return K(e.font&&e.font.size,xt.font.size)+t.height}return 0}function qs(t,e,i,n,o){return t===n||t===o?{start:e-i/2,end:e+i/2}:t<n||t>o?{start:e-i,end:e}:{start:e,end:e+i}}function Ks(t){const e={l:0,r:t.width,t:0,b:t.height-t.paddingTop},i={},n=[],o=[],s=t.getLabels().length;for(let c=0;c<s;c++){const s=t.options.pointLabels.setContext(t.getPointLabelContext(c));o[c]=s.padding;const h=t.getPointPosition(c,t.drawingArea+o[c]),d=Ve(s.font),u=(a=t.ctx,r=d,l=Y(l=t._pointLabels[c])?l:[l],{w:Ut(a,r.string,l),h:l.length*r.lineHeight});n[c]=u;const f=t.getIndexAngle(c),g=It(f),p=qs(g,h.x,u.w,0,180),m=qs(g,h.y,u.h,90,270);p.start<e.l&&(e.l=p.start,i.l=f),p.end>e.r&&(e.r=p.end,i.r=f),m.start<e.t&&(e.t=m.start,i.t=f),m.end>e.b&&(e.b=m.end,i.b=f)}var a,r,l;t._setReductions(t.drawingArea,e,i),t._pointLabelItems=function(t,e,i){const n=[],o=t.getLabels().length,s=t.options,a=Xs(s),r=t.getDistanceFromCenterForValue(s.ticks.reverse?t.min:t.max);for(let s=0;s<o;s++){const o=0===s?a/2:0,l=t.getPointPosition(s,r+o+i[s]),c=It(t.getIndexAngle(s)),h=e[s],d=Qs(l.y,h.h,c),u=Gs(c),f=Zs(l.x,h.w,u);n.push({x:l.x,y:d,textAlign:u,left:f,top:d,right:f+h.w,bottom:d+h.h})}return n}(t,n,o)}function Gs(t){return 0===t||180===t?"center":t<180?"left":"right"}function Zs(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function Qs(t,e,i){return 90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e),t}function Js(t,e,i,n){const{ctx:o}=t;if(i)o.arc(t.xCenter,t.yCenter,e,0,_t);else{let i=t.getPointPosition(0,e);o.moveTo(i.x,i.y);for(let s=1;s<n;s++)i=t.getPointPosition(s,e),o.lineTo(i.x,i.y)}}function ta(t){return Tt(t)?t:0}Us.id="logarithmic",Us.defaults={ticks:{callback:Sn.formatters.logarithmic,major:{enabled:!0}}};class ea extends js{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=Xs(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2}determineDataLimits(){const t=this,{min:e,max:i}=t.getMinMax(!1);t.min=X(e)&&!isNaN(e)?e:0,t.max=X(i)&&!isNaN(i)?i:0,t.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Xs(this.options))}generateTickLabels(t){const e=this;js.prototype.generateTickLabels.call(e,t),e._pointLabels=e.getLabels().map(((t,i)=>{const n=Q(e.options.pointLabels.callback,[t,i],e);return n||0===n?n:""}))}fit(){const t=this,e=t.options;e.display&&e.pointLabels.display?Ks(t):t.setCenterPoint(0,0,0,0)}_setReductions(t,e,i){const n=this;let o=e.l/Math.sin(i.l),s=Math.max(e.r-n.width,0)/Math.sin(i.r),a=-e.t/Math.cos(i.t),r=-Math.max(e.b-(n.height-n.paddingTop),0)/Math.cos(i.b);o=ta(o),s=ta(s),a=ta(a),r=ta(r),n.drawingArea=Math.max(t/2,Math.min(Math.floor(t-(o+s)/2),Math.floor(t-(a+r)/2))),n.setCenterPoint(o,s,a,r)}setCenterPoint(t,e,i,n){const o=this,s=o.width-e-o.drawingArea,a=t+o.drawingArea,r=i+o.drawingArea,l=o.height-o.paddingTop-n-o.drawingArea;o.xCenter=Math.floor((a+s)/2+o.left),o.yCenter=Math.floor((r+l)/2+o.top+o.paddingTop)}getIndexAngle(t){return Wt(t*(_t/this.getLabels().length)+Et(this.options.startAngle||0))}getDistanceFromCenterForValue(t){const e=this;if($(t))return NaN;const i=e.drawingArea/(e.max-e.min);return e.options.reverse?(e.max-t)*i:(t-e.min)*i}getValueForDistanceFromCenter(t){if($(t))return NaN;const e=this,i=t/(e.drawingArea/(e.max-e.min));return e.options.reverse?e.max-i:e.min+i}getPointLabelContext(t){const e=this,i=e._pointLabels||[];if(t>=0&&t<i.length){const n=i[t];return function(t,e,i){return Object.assign(Object.create(t),{label:i,index:e,type:"pointLabel"})}(e.getContext(),t,n)}}getPointPosition(t,e){const i=this,n=i.getIndexAngle(t)-Mt;return{x:Math.cos(n)*e+i.xCenter,y:Math.sin(n)*e+i.yCenter,angle:n}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:n,bottom:o}=this._pointLabelItems[t];return{left:e,top:i,right:n,bottom:o}}drawBackground(){const t=this,{backgroundColor:e,grid:{circular:i}}=t.options;if(e){const n=t.ctx;n.save(),n.beginPath(),Js(t,t.getDistanceFromCenterForValue(t._endValue),i,t.getLabels().length),n.closePath(),n.fillStyle=e,n.fill(),n.restore()}}drawGrid(){const t=this,e=t.ctx,i=t.options,{angleLines:n,grid:o}=i,s=t.getLabels().length;let a,r,l;if(i.pointLabels.display&&function(t,e){const{ctx:i,options:{pointLabels:n}}=t;for(let o=e-1;o>=0;o--){const e=n.setContext(t.getPointLabelContext(o)),s=Ve(e.font),{x:a,y:r,textAlign:l,left:c,top:h,right:d,bottom:u}=t._pointLabelItems[o],{backdropColor:f}=e;if(!$(f)){const t=Be(e.backdropPadding);i.fillStyle=f,i.fillRect(c-t.left,h-t.top,d-c+t.width,u-h+t.height)}ee(i,t._pointLabels[o],a,r+s.lineHeight/2,s,{color:e.color,textAlign:l,textBaseline:"middle"})}}(t,s),o.display&&t.ticks.forEach(((e,i)=>{if(0!==i){r=t.getDistanceFromCenterForValue(e.value);const n=o.setContext(t.getContext(i-1));!function(t,e,i,n){const o=t.ctx,s=e.circular,{color:a,lineWidth:r}=e;!s&&!n||!a||!r||i<0||(o.save(),o.strokeStyle=a,o.lineWidth=r,o.setLineDash(e.borderDash),o.lineDashOffset=e.borderDashOffset,o.beginPath(),Js(t,i,s,n),o.closePath(),o.stroke(),o.restore())}(t,n,r,s)}})),n.display){for(e.save(),a=t.getLabels().length-1;a>=0;a--){const o=n.setContext(t.getPointLabelContext(a)),{color:s,lineWidth:c}=o;c&&s&&(e.lineWidth=c,e.strokeStyle=s,e.setLineDash(o.borderDash),e.lineDashOffset=o.borderDashOffset,r=t.getDistanceFromCenterForValue(i.ticks.reverse?t.min:t.max),l=t.getPointPosition(a,r),e.beginPath(),e.moveTo(t.xCenter,t.yCenter),e.lineTo(l.x,l.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const t=this,e=t.ctx,i=t.options,n=i.ticks;if(!n.display)return;const o=t.getIndexAngle(0);let s,a;e.save(),e.translate(t.xCenter,t.yCenter),e.rotate(o),e.textAlign="center",e.textBaseline="middle",t.ticks.forEach(((o,r)=>{if(0===r&&!i.reverse)return;const l=n.setContext(t.getContext(r)),c=Ve(l.font);if(s=t.getDistanceFromCenterForValue(t.ticks[r].value),l.showLabelBackdrop){e.font=c.string,a=e.measureText(o.label).width,e.fillStyle=l.backdropColor;const t=Be(l.backdropPadding);e.fillRect(-a/2-t.left,-s-c.size/2-t.top,a+t.width,c.size+t.height)}ee(e,o.label,0,-s,c,{color:l.color})})),e.restore()}drawTitle(){}}ea.id="radialLinear",ea.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Sn.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5}},ea.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},ea.descriptors={angleLines:{_fallback:"grid"}};const ia={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},na=Object.keys(ia);function oa(t,e){return t-e}function sa(t,e){if($(e))return null;const i=t._adapter,{parser:n,round:o,isoWeekday:s}=t._parseOpts;let a=e;return"function"==typeof n&&(a=n(a)),X(a)||(a="string"==typeof n?i.parse(a,n):i.parse(a)),null===a?null:(o&&(a="week"!==o||!Tt(s)&&!0!==s?i.startOf(a,o):i.startOf(a,"isoWeek",s)),+a)}function aa(t,e,i,n){const o=na.length;for(let s=na.indexOf(t);s<o-1;++s){const t=ia[na[s]],o=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((i-e)/(o*t.size))<=n)return na[s]}return na[o-1]}function ra(t,e,i){if(i){if(i.length){const{lo:n,hi:o}=oe(i,e);t[i[n]>=e?i[n]:i[o]]=!0}}else t[e]=!0}function la(t,e,i){const n=[],o={},s=e.length;let a,r;for(a=0;a<s;++a)r=e[a],o[r]=a,n.push({value:r,major:!1});return 0!==s&&i?function(t,e,i,n){const o=t._adapter,s=+o.startOf(e[0].value,n),a=e[e.length-1].value;let r,l;for(r=s;r<=a;r=+o.add(r,1,n))l=i[r],l>=0&&(e[l].major=!0);return e}(t,n,o,i):n}class ca extends En{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),n=this._adapter=new co._date(t.adapters.date);st(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:sa(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this,e=t.options,i=t._adapter,n=e.time.unit||"day";let{min:o,max:s,minDefined:a,maxDefined:r}=t.getUserBounds();function l(t){a||isNaN(t.min)||(o=Math.min(o,t.min)),r||isNaN(t.max)||(s=Math.max(s,t.max))}a&&r||(l(t._getLabelBounds()),"ticks"===e.bounds&&"labels"===e.ticks.source||l(t.getMinMax(!1))),o=X(o)&&!isNaN(o)?o:+i.startOf(Date.now(),n),s=X(s)&&!isNaN(s)?s:+i.endOf(Date.now(),n)+1,t.min=Math.min(o,s-1),t.max=Math.max(o+1,s)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this,e=t.options,i=e.time,n=e.ticks,o="labels"===n.source?t.getLabelTimestamps():t._generate();"ticks"===e.bounds&&o.length&&(t.min=t._userMin||o[0],t.max=t._userMax||o[o.length-1]);const s=t.min,a=re(o,s,t.max);return t._unit=i.unit||(n.autoSkip?aa(i.minUnit,t.min,t.max,t._getLabelCapacity(s)):function(t,e,i,n,o){for(let s=na.length-1;s>=na.indexOf(i);s--){const i=na[s];if(ia[i].common&&t._adapter.diff(o,n,i)>=e-1)return i}return na[i?na.indexOf(i):0]}(t,a.length,i.minUnit,t.min,t.max)),t._majorUnit=n.major.enabled&&"year"!==t._unit?function(t){for(let e=na.indexOf(t)+1,i=na.length;e<i;++e)if(ia[na[e]].common)return na[e]}(t._unit):void 0,t.initOffsets(o),e.reverse&&a.reverse(),la(t,a,t._majorUnit)}initOffsets(t){const e=this;let i,n,o=0,s=0;e.options.offset&&t.length&&(i=e.getDecimalForValue(t[0]),o=1===t.length?1-i:(e.getDecimalForValue(t[1])-i)/2,n=e.getDecimalForValue(t[t.length-1]),s=1===t.length?n:(n-e.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;o=Ht(o,0,a),s=Ht(s,0,a),e._offsets={start:o,end:s,factor:1/(o+1+s)}}_generate(){const t=this,e=t._adapter,i=t.min,n=t.max,o=t.options,s=o.time,a=s.unit||aa(s.minUnit,i,n,t._getLabelCapacity(i)),r=K(s.stepSize,1),l="week"===a&&s.isoWeekday,c=Tt(l)||!0===l,h={};let d,u,f=i;if(c&&(f=+e.startOf(f,"isoWeek",l)),f=+e.startOf(f,c?"day":a),e.diff(n,i,a)>1e5*r)throw new Error(i+" and "+n+" are too far apart with stepSize of "+r+" "+a);const g="data"===o.ticks.source&&t.getDataTimestamps();for(d=f,u=0;d<n;d=+e.add(d,r,a),u++)ra(h,d,g);return d!==n&&"ticks"!==o.bounds&&1!==u||ra(h,d,g),Object.keys(h).sort(((t,e)=>t-e)).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,n){const o=this,s=o.options,a=s.time.displayFormats,r=o._unit,l=o._majorUnit,c=r&&a[r],h=l&&a[l],d=i[e],u=l&&h&&d&&d.major,f=o._adapter.format(t,n||(u?h:c)),g=s.ticks.callback;return g?Q(g,[f,e,i],o):f}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e<i;++e)n=t[e],n.label=this._tickFormatFunction(n.value,e,t)}getDecimalForValue(t){const e=this;return null===t?NaN:(t-e.min)/(e.max-e.min)}getPixelForValue(t){const e=this,i=e._offsets,n=e.getDecimalForValue(t);return e.getPixelForDecimal((i.start+n)*i.factor)}getValueForPixel(t){const e=this,i=e._offsets,n=e.getDecimalForPixel(t)/i.factor-i.end;return e.min+n*(e.max-e.min)}_getLabelSize(t){const e=this,i=e.options.ticks,n=e.ctx.measureText(t).width,o=Et(e.isHorizontal()?i.maxRotation:i.minRotation),s=Math.cos(o),a=Math.sin(o),r=e._resolveTickFontOptions(0).size;return{w:n*s+r*a,h:n*a+r*s}}_getLabelCapacity(t){const e=this,i=e.options.time,n=i.displayFormats,o=n[i.unit]||n.millisecond,s=e._tickFormatFunction(t,0,la(e,[t],e._majorUnit),o),a=e._getLabelSize(s),r=Math.floor(e.isHorizontal()?e.width/a.w:e.height/a.h)-1;return r>0?r:1}getDataTimestamps(){const t=this;let e,i,n=t._cache.data||[];if(n.length)return n;const o=t.getMatchingVisibleMetas();if(t._normalized&&o.length)return t._cache.data=o[0].controller.getAllParsedValues(t);for(e=0,i=o.length;e<i;++e)n=n.concat(o[e].controller.getAllParsedValues(t));return t._cache.data=t.normalize(n)}getLabelTimestamps(){const t=this,e=t._cache.labels||[];let i,n;if(e.length)return e;const o=t.getLabels();for(i=0,n=o.length;i<n;++i)e.push(sa(t,o[i]));return t._cache.labels=t._normalized?e:t.normalize(e)}normalize(t){return de(t.sort(oa))}}function ha(t,e,i){let n,o,s,a,r=0,l=t.length-1;i?(e>=t[r].pos&&e<=t[l].pos&&({lo:r,hi:l}=se(t,"pos",e)),({pos:n,time:s}=t[r]),({pos:o,time:a}=t[l])):(e>=t[r].time&&e<=t[l].time&&({lo:r,hi:l}=se(t,"time",e)),({time:n,pos:s}=t[r]),({time:o,pos:a}=t[l]));const c=o-n;return c?s+(a-s)*(e-n)/c:s}ca.id="time",ca.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class da extends ca{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this,e=t._getTimestampsForTable(),i=t._table=t.buildLookupTable(e);t._minPos=ha(i,t.min),t._tableRange=ha(i,t.max)-t._minPos,super.initOffsets(e)}buildLookupTable(t){const{min:e,max:i}=this,n=[],o=[];let s,a,r,l,c;for(s=0,a=t.length;s<a;++s)l=t[s],l>=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(s=0,a=n.length;s<a;++s)c=n[s+1],r=n[s-1],l=n[s],Math.round((c+r)/2)!==l&&o.push({time:l,pos:s/(a-1)});return o}_getTimestampsForTable(){const t=this;let e=t._cache.all||[];if(e.length)return e;const i=t.getDataTimestamps(),n=t.getLabelTimestamps();return e=i.length&&n.length?t.normalize(i.concat(n)):i.length?i:n,e=t._cache.all=e,e}getDecimalForValue(t){return(ha(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this,i=e._offsets,n=e.getDecimalForPixel(t)/i.factor-i.end;return ha(e._table,n*e._tableRange+e._minPos,!0)}}da.id="timeseries",da.defaults=ca.defaults;var ua=Object.freeze({__proto__:null,CategoryScale:Ns,LinearScale:$s,LogarithmicScale:Us,RadialLinearScale:ea,TimeScale:ca,TimeSeriesScale:da});return oo.register(Po,ua,Zo,Vs),oo.helpers={...Ni},oo._adapters=co,oo.Animation=ln,oo.Animations=hn,oo.animator=a,oo.controllers=zn.controllers.items,oo.DatasetController=wn,oo.Element=Mn,oo.elements=Zo,oo.Interaction=Ae,oo.layouts=ti,oo.platforms=sn,oo.Scale=En,oo.Ticks=Sn,Object.assign(oo,Po,ua,Zo,Vs,sn),oo.Chart=oo,"undefined"!=typeof window&&(window.Chart=oo),oo}));
|
1 |
+
/*!
|
2 |
+
* Chart.js v3.5.1
|
3 |
+
* https://www.chartjs.org
|
4 |
+
* (c) 2021 Chart.js Contributors
|
5 |
+
* Released under the MIT License
|
6 |
+
*/
|
7 |
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Chart=e()}(this,(function(){"use strict";const t="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function e(e,i,n){const o=n||(t=>Array.prototype.slice.call(t));let s=!1,a=[];return function(...n){a=o(n),s||(s=!0,t.call(window,(()=>{s=!1,e.apply(i,a)})))}}function i(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}const n=t=>"start"===t?"left":"end"===t?"right":"center",o=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2,s=(t,e,i,n)=>t===(n?"left":"right")?i:"center"===t?(e+i)/2:e;var a=new class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,n){const o=e.listeners[n],s=e.duration;o.forEach((n=>n({chart:t,initial:e.initial,numSteps:s,currentStep:Math.min(i-e.start,s)})))}_refresh(){const e=this;e._request||(e._running=!0,e._request=t.call(window,(()=>{e._update(),e._request=null,e._running&&e._refresh()})))}_update(t=Date.now()){const e=this;let i=0;e._charts.forEach(((n,o)=>{if(!n.running||!n.items.length)return;const s=n.items;let a,r=s.length-1,l=!1;for(;r>=0;--r)a=s[r],a._active?(a._total>n.duration&&(n.duration=a._total),a.tick(t),l=!0):(s[r]=s[s.length-1],s.pop());l&&(o.draw(),e._notify(o,n,t,"progress")),s.length||(n.running=!1,e._notify(o,n,t,"complete"),n.initial=!1),i+=s.length})),e._lastDate=t,0===i&&(e._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};
|
8 |
+
/*!
|
9 |
+
* @kurkle/color v0.1.9
|
10 |
+
* https://github.com/kurkle/color#readme
|
11 |
+
* (c) 2020 Jukka Kurkela
|
12 |
+
* Released under the MIT License
|
13 |
+
*/const r={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},l="0123456789ABCDEF",c=t=>l[15&t],h=t=>l[(240&t)>>4]+l[15&t],d=t=>(240&t)>>4==(15&t);function u(t){var e=function(t){return d(t.r)&&d(t.g)&&d(t.b)&&d(t.a)}(t)?c:h;return t?"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):""):t}function f(t){return t+.5|0}const g=(t,e,i)=>Math.max(Math.min(t,i),e);function p(t){return g(f(2.55*t),0,255)}function m(t){return g(f(255*t),0,255)}function x(t){return g(f(t/2.55)/100,0,1)}function b(t){return g(f(100*t),0,100)}const _=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const y=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function v(t,e,i){const n=e*Math.min(i,1-i),o=(e,o=(e+t/30)%12)=>i-n*Math.max(Math.min(o-3,9-o,1),-1);return[o(0),o(8),o(4)]}function w(t,e,i){const n=(n,o=(n+t/60)%6)=>i-i*e*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)]}function M(t,e,i){const n=v(t,1,.5);let o;for(e+i>1&&(o=1/(e+i),e*=o,i*=o),o=0;o<3;o++)n[o]*=1-e-i,n[o]+=e;return n}function k(t){const e=t.r/255,i=t.g/255,n=t.b/255,o=Math.max(e,i,n),s=Math.min(e,i,n),a=(o+s)/2;let r,l,c;return o!==s&&(c=o-s,l=a>.5?c/(2-o-s):c/(o+s),r=o===e?(i-n)/c+(i<n?6:0):o===i?(n-e)/c+2:(e-i)/c+4,r=60*r+.5),[0|r,l||0,a]}function S(t,e,i,n){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,n)).map(m)}function P(t,e,i){return S(v,t,e,i)}function D(t){return(t%360+360)%360}function C(t){const e=y.exec(t);let i,n=255;if(!e)return;e[5]!==i&&(n=e[6]?p(+e[5]):m(+e[5]));const o=D(+e[2]),s=+e[3]/100,a=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return S(M,t,e,i)}(o,s,a):"hsv"===e[1]?function(t,e,i){return S(w,t,e,i)}(o,s,a):P(o,s,a),{r:i[0],g:i[1],b:i[2],a:n}}const O={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},T={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let A;function L(t){A||(A=function(){const t={},e=Object.keys(T),i=Object.keys(O);let n,o,s,a,r;for(n=0;n<e.length;n++){for(a=r=e[n],o=0;o<i.length;o++)s=i[o],r=r.replace(s,O[s]);s=parseInt(T[a],16),t[r]=[s>>16&255,s>>8&255,255&s]}return t}(),A.transparent=[0,0,0,0]);const e=A[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}function R(t,e,i){if(t){let n=k(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=P(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function E(t,e){return t?Object.assign(e||{},t):t}function I(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=m(t[3]))):(e=E(t,{r:0,g:0,b:0,a:1})).a=m(e.a),e}function z(t){return"r"===t.charAt(0)?function(t){const e=_.exec(t);let i,n,o,s=255;if(e){if(e[7]!==i){const t=+e[7];s=255&(e[8]?p(t):255*t)}return i=+e[1],n=+e[3],o=+e[5],i=255&(e[2]?p(i):i),n=255&(e[4]?p(n):n),o=255&(e[6]?p(o):o),{r:i,g:n,b:o,a:s}}}(t):C(t)}class F{constructor(t){if(t instanceof F)return t;const e=typeof t;let i;var n,o,s;"object"===e?i=I(t):"string"===e&&(s=(n=t).length,"#"===n[0]&&(4===s||5===s?o={r:255&17*r[n[1]],g:255&17*r[n[2]],b:255&17*r[n[3]],a:5===s?17*r[n[4]]:255}:7!==s&&9!==s||(o={r:r[n[1]]<<4|r[n[2]],g:r[n[3]]<<4|r[n[4]],b:r[n[5]]<<4|r[n[6]],a:9===s?r[n[7]]<<4|r[n[8]]:255})),i=o||L(t)||z(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=E(this._rgb);return t&&(t.a=x(t.a)),t}set rgb(t){this._rgb=I(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${x(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):this._rgb;var t}hexString(){return this._valid?u(this._rgb):this._rgb}hslString(){return this._valid?function(t){if(!t)return;const e=k(t),i=e[0],n=b(e[1]),o=b(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${o}%, ${x(t.a)})`:`hsl(${i}, ${n}%, ${o}%)`}(this._rgb):this._rgb}mix(t,e){const i=this;if(t){const n=i.rgb,o=t.rgb;let s;const a=e===s?.5:e,r=2*a-1,l=n.a-o.a,c=((r*l==-1?r:(r+l)/(1+r*l))+1)/2;s=1-c,n.r=255&c*n.r+s*o.r+.5,n.g=255&c*n.g+s*o.g+.5,n.b=255&c*n.b+s*o.b+.5,n.a=a*n.a+(1-a)*o.a,i.rgb=n}return i}clone(){return new F(this.rgb)}alpha(t){return this._rgb.a=m(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=f(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return R(this._rgb,2,t),this}darken(t){return R(this._rgb,2,-t),this}saturate(t){return R(this._rgb,1,t),this}desaturate(t){return R(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=k(t);i[0]=D(i[0]+e),i=P(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function B(t){return new F(t)}const V=t=>t instanceof CanvasGradient||t instanceof CanvasPattern;function W(t){return V(t)?t:B(t)}function N(t){return V(t)?t:B(t).saturate(.5).darken(.1).hexString()}function H(){}const j=function(){let t=0;return function(){return t++}}();function $(t){return null==t}function Y(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function U(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const X=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function q(t,e){return X(t)?t:e}function K(t,e){return void 0===t?e:t}const G=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100:t/e,Z=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function Q(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function J(t,e,i,n){let o,s,a;if(Y(t))if(s=t.length,n)for(o=s-1;o>=0;o--)e.call(i,t[o],o);else for(o=0;o<s;o++)e.call(i,t[o],o);else if(U(t))for(a=Object.keys(t),s=a.length,o=0;o<s;o++)e.call(i,t[a[o]],a[o])}function tt(t,e){let i,n,o,s;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(o=t[i],s=e[i],o.datasetIndex!==s.datasetIndex||o.index!==s.index)return!1;return!0}function et(t){if(Y(t))return t.map(et);if(U(t)){const e=Object.create(null),i=Object.keys(t),n=i.length;let o=0;for(;o<n;++o)e[i[o]]=et(t[i[o]]);return e}return t}function it(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function nt(t,e,i,n){if(!it(t))return;const o=e[t],s=i[t];U(o)&&U(s)?ot(o,s,n):e[t]=et(s)}function ot(t,e,i){const n=Y(e)?e:[e],o=n.length;if(!U(t))return t;const s=(i=i||{}).merger||nt;for(let a=0;a<o;++a){if(!U(e=n[a]))continue;const o=Object.keys(e);for(let n=0,a=o.length;n<a;++n)s(o[n],t,e,i)}return t}function st(t,e){return ot(t,e,{merger:at})}function at(t,e,i){if(!it(t))return;const n=e[t],o=i[t];U(n)&&U(o)?st(n,o):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=et(o))}function rt(t,e){const i=t.indexOf(".",e);return-1===i?t.length:i}function lt(t,e){if(""===e)return t;let i=0,n=rt(e,i);for(;t&&n>i;)t=t[e.substr(i,n-i)],i=n+1,n=rt(e,i);return t}function ct(t){return t.charAt(0).toUpperCase()+t.slice(1)}const ht=t=>void 0!==t,dt=t=>"function"==typeof t,ut=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0},ft=Object.create(null),gt=Object.create(null);function pt(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;e<n;++e){const n=i[e];t=t[n]||(t[n]=Object.create(null))}return t}function mt(t,e,i){return"string"==typeof e?ot(pt(t,e),i):ot(pt(t,""),e)}var xt=new class{constructor(t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>N(e.backgroundColor),this.hoverBorderColor=(t,e)=>N(e.borderColor),this.hoverColor=(t,e)=>N(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.describe(t)}set(t,e){return mt(this,t,e)}get(t){return pt(this,t)}describe(t,e){return mt(gt,t,e)}override(t,e){return mt(ft,t,e)}route(t,e,i,n){const o=pt(this,t),s=pt(this,i),a="_"+e;Object.defineProperties(o,{[a]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[a],e=s[n];return U(t)?Object.assign({},e,t):K(t,e)},set(t){this[a]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});const bt=Math.PI,_t=2*bt,yt=_t+bt,vt=Number.POSITIVE_INFINITY,wt=bt/180,Mt=bt/2,kt=bt/4,St=2*bt/3,Pt=Math.log10,Dt=Math.sign;function Ct(t){const e=Math.round(t);t=At(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(Pt(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function Ot(t){const e=[],i=Math.sqrt(t);let n;for(n=1;n<i;n++)t%n==0&&(e.push(n),e.push(t/n));return i===(0|i)&&e.push(i),e.sort(((t,e)=>t-e)).pop(),e}function Tt(t){return!isNaN(parseFloat(t))&&isFinite(t)}function At(t,e,i){return Math.abs(t-e)<i}function Lt(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}function Rt(t,e,i){let n,o,s;for(n=0,o=t.length;n<o;n++)s=t[n][i],isNaN(s)||(e.min=Math.min(e.min,s),e.max=Math.max(e.max,s))}function Et(t){return t*(bt/180)}function It(t){return t*(180/bt)}function zt(t){if(!X(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}function Ft(t,e){const i=e.x-t.x,n=e.y-t.y,o=Math.sqrt(i*i+n*n);let s=Math.atan2(n,i);return s<-.5*bt&&(s+=_t),{angle:s,distance:o}}function Bt(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Vt(t,e){return(t-e+yt)%_t-bt}function Wt(t){return(t%_t+_t)%_t}function Nt(t,e,i,n){const o=Wt(t),s=Wt(e),a=Wt(i),r=Wt(s-o),l=Wt(a-o),c=Wt(o-s),h=Wt(o-a);return o===s||o===a||n&&s===a||r>l&&c<h}function Ht(t,e,i){return Math.max(e,Math.min(i,t))}function jt(t){return Ht(t,-32768,32767)}function $t(t){return!t||$(t.size)||$(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function Yt(t,e,i,n,o){let s=e[o];return s||(s=e[o]=t.measureText(o).width,i.push(o)),s>n&&(n=s),n}function Ut(t,e,i,n){let o=(n=n||{}).data=n.data||{},s=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(o=n.data={},s=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let a=0;const r=i.length;let l,c,h,d,u;for(l=0;l<r;l++)if(d=i[l],null!=d&&!0!==Y(d))a=Yt(t,o,s,a,d);else if(Y(d))for(c=0,h=d.length;c<h;c++)u=d[c],null==u||Y(u)||(a=Yt(t,o,s,a,u));t.restore();const f=s.length/2;if(f>i.length){for(l=0;l<f;l++)delete o[s[l]];s.splice(0,f)}return a}function Xt(t,e,i){const n=t.currentDevicePixelRatio,o=0!==i?Math.max(i/2,.5):0;return Math.round((e-o)*n)/n+o}function qt(t,e){(e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function Kt(t,e,i,n){let o,s,a,r,l;const c=e.pointStyle,h=e.rotation,d=e.radius;let u=(h||0)*wt;if(c&&"object"==typeof c&&(o=c.toString(),"[object HTMLImageElement]"===o||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(i,n),t.rotate(u),t.drawImage(c,-c.width/2,-c.height/2,c.width,c.height),void t.restore();if(!(isNaN(d)||d<=0)){switch(t.beginPath(),c){default:t.arc(i,n,d,0,_t),t.closePath();break;case"triangle":t.moveTo(i+Math.sin(u)*d,n-Math.cos(u)*d),u+=St,t.lineTo(i+Math.sin(u)*d,n-Math.cos(u)*d),u+=St,t.lineTo(i+Math.sin(u)*d,n-Math.cos(u)*d),t.closePath();break;case"rectRounded":l=.516*d,r=d-l,s=Math.cos(u+kt)*r,a=Math.sin(u+kt)*r,t.arc(i-s,n-a,l,u-bt,u-Mt),t.arc(i+a,n-s,l,u-Mt,u),t.arc(i+s,n+a,l,u,u+Mt),t.arc(i-a,n+s,l,u+Mt,u+bt),t.closePath();break;case"rect":if(!h){r=Math.SQRT1_2*d,t.rect(i-r,n-r,2*r,2*r);break}u+=kt;case"rectRot":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+a,n-s),t.lineTo(i+s,n+a),t.lineTo(i-a,n+s),t.closePath();break;case"crossRot":u+=kt;case"cross":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a),t.moveTo(i+a,n-s),t.lineTo(i-a,n+s);break;case"star":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a),t.moveTo(i+a,n-s),t.lineTo(i-a,n+s),u+=kt,s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a),t.moveTo(i+a,n-s),t.lineTo(i-a,n+s);break;case"line":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a);break;case"dash":t.moveTo(i,n),t.lineTo(i+Math.cos(u)*d,n+Math.sin(u)*d)}t.fill(),e.borderWidth>0&&t.stroke()}}function Gt(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function Zt(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Qt(t){t.restore()}function Jt(t,e,i,n,o){if(!e)return t.lineTo(i.x,i.y);if("middle"===o){const n=(e.x+i.x)/2;t.lineTo(n,e.y),t.lineTo(n,i.y)}else"after"===o!=!!n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function te(t,e,i,n){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(n?e.cp1x:e.cp2x,n?e.cp1y:e.cp2y,n?i.cp2x:i.cp1x,n?i.cp2y:i.cp1y,i.x,i.y)}function ee(t,e,i,n,o,s={}){const a=Y(e)?e:[e],r=s.strokeWidth>0&&""!==s.strokeColor;let l,c;for(t.save(),t.font=o.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]);$(e.rotation)||t.rotate(e.rotation);e.color&&(t.fillStyle=e.color);e.textAlign&&(t.textAlign=e.textAlign);e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,s),l=0;l<a.length;++l)c=a[l],r&&(s.strokeColor&&(t.strokeStyle=s.strokeColor),$(s.strokeWidth)||(t.lineWidth=s.strokeWidth),t.strokeText(c,i,n,s.maxWidth)),t.fillText(c,i,n,s.maxWidth),ie(t,i,n,c,s),n+=o.lineHeight;t.restore()}function ie(t,e,i,n,o){if(o.strikethrough||o.underline){const s=t.measureText(n),a=e-s.actualBoundingBoxLeft,r=e+s.actualBoundingBoxRight,l=i-s.actualBoundingBoxAscent,c=i+s.actualBoundingBoxDescent,h=o.strikethrough?(l+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=o.decorationWidth||2,t.moveTo(a,h),t.lineTo(r,h),t.stroke()}}function ne(t,e){const{x:i,y:n,w:o,h:s,radius:a}=e;t.arc(i+a.topLeft,n+a.topLeft,a.topLeft,-Mt,bt,!0),t.lineTo(i,n+s-a.bottomLeft),t.arc(i+a.bottomLeft,n+s-a.bottomLeft,a.bottomLeft,bt,Mt,!0),t.lineTo(i+o-a.bottomRight,n+s),t.arc(i+o-a.bottomRight,n+s-a.bottomRight,a.bottomRight,Mt,0,!0),t.lineTo(i+o,n+a.topRight),t.arc(i+o-a.topRight,n+a.topRight,a.topRight,0,-Mt,!0),t.lineTo(i+a.topLeft,n)}function oe(t,e,i){i=i||(i=>t[i]<e);let n,o=t.length-1,s=0;for(;o-s>1;)n=s+o>>1,i(n)?s=n:o=n;return{lo:s,hi:o}}const se=(t,e,i)=>oe(t,i,(n=>t[n][e]<i)),ae=(t,e,i)=>oe(t,i,(n=>t[n][e]>=i));function re(t,e,i){let n=0,o=t.length;for(;n<o&&t[n]<e;)n++;for(;o>n&&t[o-1]>i;)o--;return n>0||o<t.length?t.slice(n,o):t}const le=["push","pop","shift","splice","unshift"];function ce(t,e){t._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),le.forEach((e=>{const i="_onData"+ct(e),n=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...e){const o=n.apply(this,e);return t._chartjs.listeners.forEach((t=>{"function"==typeof t[i]&&t[i](...e)})),o}})})))}function he(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,o=n.indexOf(e);-1!==o&&n.splice(o,1),n.length>0||(le.forEach((e=>{delete t[e]})),delete t._chartjs)}function de(t){const e=new Set;let i,n;for(i=0,n=t.length;i<n;++i)e.add(t[i]);return e.size===n?t:Array.from(e)}function ue(){return"undefined"!=typeof window&&"undefined"!=typeof document}function fe(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function ge(t,e,i){let n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}const pe=t=>window.getComputedStyle(t,null);function me(t,e){return pe(t).getPropertyValue(e)}const xe=["top","right","bottom","left"];function be(t,e,i){const n={};i=i?"-"+i:"";for(let o=0;o<4;o++){const s=xe[o];n[s]=parseFloat(t[e+"-"+s+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function _e(t,e){const{canvas:i,currentDevicePixelRatio:n}=e,o=pe(i),s="border-box"===o.boxSizing,a=be(o,"padding"),r=be(o,"border","width"),{x:l,y:c,box:h}=function(t,e){const i=t.native||t,n=i.touches,o=n&&n.length?n[0]:i,{offsetX:s,offsetY:a}=o;let r,l,c=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(s,a,i.target))r=s,l=a;else{const t=e.getBoundingClientRect();r=o.clientX-t.left,l=o.clientY-t.top,c=!0}return{x:r,y:l,box:c}}(t,i),d=a.left+(h&&r.left),u=a.top+(h&&r.top);let{width:f,height:g}=e;return s&&(f-=a.width+r.width,g-=a.height+r.height),{x:Math.round((l-d)/f*i.width/n),y:Math.round((c-u)/g*i.height/n)}}const ye=t=>Math.round(10*t)/10;function ve(t,e,i,n){const o=pe(t),s=be(o,"margin"),a=ge(o.maxWidth,t,"clientWidth")||vt,r=ge(o.maxHeight,t,"clientHeight")||vt,l=function(t,e,i){let n,o;if(void 0===e||void 0===i){const s=fe(t);if(s){const t=s.getBoundingClientRect(),a=pe(s),r=be(a,"border","width"),l=be(a,"padding");e=t.width-l.width-r.width,i=t.height-l.height-r.height,n=ge(a.maxWidth,s,"clientWidth"),o=ge(a.maxHeight,s,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||vt,maxHeight:o||vt}}(t,e,i);let{width:c,height:h}=l;if("content-box"===o.boxSizing){const t=be(o,"border","width"),e=be(o,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-s.width),h=Math.max(0,n?Math.floor(c/n):h-s.height),c=ye(Math.min(c,a,l.maxWidth)),h=ye(Math.min(h,r,l.maxHeight)),c&&!h&&(h=ye(c/2)),{width:c,height:h}}function we(t,e,i){const n=e||1,o=Math.floor(t.height*n),s=Math.floor(t.width*n);t.height=o/n,t.width=s/n;const a=t.canvas;return a.style&&(i||!a.style.height&&!a.style.width)&&(a.style.height=`${t.height}px`,a.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||a.height!==o||a.width!==s)&&(t.currentDevicePixelRatio=n,a.height=o,a.width=s,t.ctx.setTransform(n,0,0,n,0,0),!0)}const Me=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function ke(t,e){const i=me(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Se(t,e){return"native"in t?{x:t.x,y:t.y}:_e(t,e)}function Pe(t,e,i,n){const{controller:o,data:s,_sorted:a}=t,r=o._cachedMeta.iScale;if(r&&e===r.axis&&a&&s.length){const t=r._reversePixels?ae:se;if(!n)return t(s,e,i);if(o._sharedOptions){const n=s[0],o="function"==typeof n.getRange&&n.getRange(e);if(o){const n=t(s,e,i-o),a=t(s,e,i+o);return{lo:n.lo,hi:a.hi}}}}return{lo:0,hi:s.length-1}}function De(t,e,i,n,o){const s=t.getSortedVisibleDatasetMetas(),a=i[e];for(let t=0,i=s.length;t<i;++t){const{index:i,data:r}=s[t],{lo:l,hi:c}=Pe(s[t],e,a,o);for(let t=l;t<=c;++t){const e=r[t];e.skip||n(e,i,t)}}}function Ce(t,e,i,n){const o=[];if(!Gt(e,t.chartArea,t._minPadding))return o;return De(t,i,e,(function(t,i,s){t.inRange(e.x,e.y,n)&&o.push({element:t,datasetIndex:i,index:s})}),!0),o}function Oe(t,e,i,n,o){const s=function(t){const e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,n){const o=e?Math.abs(t.x-n.x):0,s=i?Math.abs(t.y-n.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(s,2))}}(i);let a=Number.POSITIVE_INFINITY,r=[];if(!Gt(e,t.chartArea,t._minPadding))return r;return De(t,i,e,(function(i,l,c){if(n&&!i.inRange(e.x,e.y,o))return;const h=i.getCenterPoint(o);if(!Gt(h,t.chartArea,t._minPadding)&&!i.inRange(e.x,e.y,o))return;const d=s(e,h);d<a?(r=[{element:i,datasetIndex:l,index:c}],a=d):d===a&&r.push({element:i,datasetIndex:l,index:c})})),r}function Te(t,e,i,n){const o=Se(e,t),s=[],a=i.axis,r="x"===a?"inXRange":"inYRange";let l=!1;return function(t,e){const i=t.getSortedVisibleDatasetMetas();let n,o,s;for(let t=0,a=i.length;t<a;++t){({index:n,data:o}=i[t]);for(let t=0,i=o.length;t<i;++t)s=o[t],s.skip||e(s,n,t)}}(t,((t,e,i)=>{t[r](o[a],n)&&s.push({element:t,datasetIndex:e,index:i}),t.inRange(o.x,o.y,n)&&(l=!0)})),i.intersect&&!l?[]:s}var Ae={modes:{index(t,e,i,n){const o=Se(e,t),s=i.axis||"x",a=i.intersect?Ce(t,o,s,n):Oe(t,o,s,!1,n),r=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=a[0].index,i=t.data[e];i&&!i.skip&&r.push({element:i,datasetIndex:t.index,index:e})})),r):[]},dataset(t,e,i,n){const o=Se(e,t),s=i.axis||"xy";let a=i.intersect?Ce(t,o,s,n):Oe(t,o,s,!1,n);if(a.length>0){const e=a[0].datasetIndex,i=t.getDatasetMeta(e).data;a=[];for(let t=0;t<i.length;++t)a.push({element:i[t],datasetIndex:e,index:t})}return a},point:(t,e,i,n)=>Ce(t,Se(e,t),i.axis||"xy",n),nearest:(t,e,i,n)=>Oe(t,Se(e,t),i.axis||"xy",i.intersect,n),x:(t,e,i,n)=>(i.axis="x",Te(t,e,i,n)),y:(t,e,i,n)=>(i.axis="y",Te(t,e,i,n))}};const Le=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),Re=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function Ee(t,e){const i=(""+t).match(Le);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}function Ie(t,e){const i={},n=U(e),o=n?Object.keys(e):e,s=U(t)?n?i=>K(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of o)i[t]=+s(t)||0;return i}function ze(t){return Ie(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Fe(t){return Ie(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Be(t){const e=ze(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Ve(t,e){t=t||{},e=e||xt.font;let i=K(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=K(t.style,e.style);n&&!(""+n).match(Re)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const o={family:K(t.family,e.family),lineHeight:Ee(K(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:K(t.weight,e.weight),string:""};return o.string=$t(o),o}function We(t,e,i,n){let o,s,a,r=!0;for(o=0,s=t.length;o<s;++o)if(a=t[o],void 0!==a&&(void 0!==e&&"function"==typeof a&&(a=a(e),r=!1),void 0!==i&&Y(a)&&(a=a[i%a.length],r=!1),void 0!==a))return n&&!r&&(n.cacheable=!1),a}function Ne(t,e){const{min:i,max:n}=t;return{min:i-Math.abs(Z(e,i)),max:n+Z(e,n)}}const He=["left","top","right","bottom"];function je(t,e){return t.filter((t=>t.pos===e))}function $e(t,e){return t.filter((t=>-1===He.indexOf(t.pos)&&t.box.axis===e))}function Ye(t,e){return t.sort(((t,i)=>{const n=e?i:t,o=e?t:i;return n.weight===o.weight?n.index-o.index:n.weight-o.weight}))}function Ue(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:o}=i;if(!t||!He.includes(n))continue;const s=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=o}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:o}=e;let s,a,r;for(s=0,a=t.length;s<a;++s){r=t[s];const{fullSize:a}=r.box,l=i[r.stack],c=l&&r.stackWeight/l.weight;r.horizontal?(r.width=c?c*n:a&&e.availableWidth,r.height=o):(r.width=n,r.height=c?c*o:a&&e.availableHeight)}return i}function Xe(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function qe(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Ke(t,e,i,n){const{pos:o,box:s}=i,a=t.maxPadding;if(!U(o)){i.size&&(t[o]-=i.size);const e=n[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?s.height:s.width),i.size=e.size/e.count,t[o]+=i.size}s.getPadding&&qe(a,s.getPadding());const r=Math.max(0,e.outerWidth-Xe(a,t,"left","right")),l=Math.max(0,e.outerHeight-Xe(a,t,"top","bottom")),c=r!==t.w,h=l!==t.h;return t.w=r,t.h=l,i.horizontal?{same:c,other:h}:{same:h,other:c}}function Ge(t,e){const i=e.maxPadding;function n(t){const n={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{n[t]=Math.max(e[t],i[t])})),n}return n(t?["left","right"]:["top","bottom"])}function Ze(t,e,i,n){const o=[];let s,a,r,l,c,h;for(s=0,a=t.length,c=0;s<a;++s){r=t[s],l=r.box,l.update(r.width||e.w,r.height||e.h,Ge(r.horizontal,e));const{same:a,other:d}=Ke(e,i,r,n);c|=a&&o.length,h=h||d,l.fullSize||o.push(r)}return c&&Ze(o,e,i,n)||h}function Qe(t,e,i,n,o){t.top=i,t.left=e,t.right=e+n,t.bottom=i+o,t.width=n,t.height=o}function Je(t,e,i,n){const o=i.padding;let{x:s,y:a}=e;for(const r of t){const t=r.box,l=n[r.stack]||{count:1,placed:0,weight:1},c=r.stackWeight/l.weight||1;if(r.horizontal){const n=e.w*c,s=l.size||t.height;ht(l.start)&&(a=l.start),t.fullSize?Qe(t,o.left,a,i.outerWidth-o.right-o.left,s):Qe(t,e.left+l.placed,a,n,s),l.start=a,l.placed+=n,a=t.bottom}else{const n=e.h*c,a=l.size||t.width;ht(l.start)&&(s=l.start),t.fullSize?Qe(t,s,o.top,a,i.outerHeight-o.bottom-o.top):Qe(t,s,e.top+l.placed,a,n),l.start=s,l.placed+=n,s=t.right}}e.x=s,e.y=a}xt.set("layout",{padding:{top:0,right:0,bottom:0,left:0}});var ti={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(t,e,i,n){if(!t)return;const o=Be(t.options.layout.padding),s=Math.max(e-o.width,0),a=Math.max(i-o.height,0),r=function(t){const e=function(t){const e=[];let i,n,o,s,a,r;for(i=0,n=(t||[]).length;i<n;++i)o=t[i],({position:s,options:{stack:a,stackWeight:r=1}}=o),e.push({index:i,box:o,pos:s,horizontal:o.isHorizontal(),weight:o.weight,stack:a&&s+a,stackWeight:r});return e}(t),i=Ye(e.filter((t=>t.box.fullSize)),!0),n=Ye(je(e,"left"),!0),o=Ye(je(e,"right")),s=Ye(je(e,"top"),!0),a=Ye(je(e,"bottom")),r=$e(e,"x"),l=$e(e,"y");return{fullSize:i,leftAndTop:n.concat(s),rightAndBottom:o.concat(l).concat(a).concat(r),chartArea:je(e,"chartArea"),vertical:n.concat(o).concat(l),horizontal:s.concat(a).concat(r)}}(t.boxes),l=r.vertical,c=r.horizontal;J(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const h=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,d=Object.freeze({outerWidth:e,outerHeight:i,padding:o,availableWidth:s,availableHeight:a,vBoxMaxWidth:s/2/h,hBoxMaxHeight:a/2}),u=Object.assign({},o);qe(u,Be(n));const f=Object.assign({maxPadding:u,w:s,h:a,x:o.left,y:o.top},o),g=Ue(l.concat(c),d);Ze(r.fullSize,f,d,g),Ze(l,f,d,g),Ze(c,f,d,g)&&Ze(l,f,d,g),function(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(f),Je(r.leftAndTop,f,d,g),f.x+=f.w,f.y+=f.h,Je(r.rightAndBottom,f,d,g),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},J(r.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h)}))}};function ei(t,e=[""],i=t,n,o=(()=>t[0])){ht(n)||(n=ui("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:o,override:o=>ei([o,...t],e,i,n)};return new Proxy(s,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>ai(i,n,(()=>function(t,e,i,n){let o;for(const s of e)if(o=ui(oi(s,t),i),ht(o))return si(t,o)?hi(i,n,t,o):o}(n,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>fi(t).includes(e),ownKeys:t=>fi(t),set:(t,e,i)=>((t._storage||(t._storage=o()))[e]=i,delete t[e],delete t._keys,!0)})}function ii(t,e,i,n){const o={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:ni(t,n),setContext:e=>ii(t,e,i,n),override:o=>ii(t.override(o),e,i,n)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>ai(t,e,(()=>function(t,e,i){const{_proxy:n,_context:o,_subProxy:s,_descriptors:a}=t;let r=n[e];dt(r)&&a.isScriptable(e)&&(r=function(t,e,i,n){const{_proxy:o,_context:s,_subProxy:a,_stack:r}=i;if(r.has(t))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+t);r.add(t),e=e(s,a||n),r.delete(t),U(e)&&(e=hi(o._scopes,o,t,e));return e}(e,r,t,i));Y(r)&&r.length&&(r=function(t,e,i,n){const{_proxy:o,_context:s,_subProxy:a,_descriptors:r}=i;if(ht(s.index)&&n(t))e=e[s.index%e.length];else if(U(e[0])){const i=e,n=o._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=hi(n,o,t,l);e.push(ii(i,s,a&&a[t],r))}}return e}(e,r,t,a.isIndexable));si(e,r)&&(r=ii(r,o,s&&s[e],a));return r}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function ni(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:o=e.allKeys}=t;return{allKeys:o,scriptable:i,indexable:n,isScriptable:dt(i)?i:()=>i,isIndexable:dt(n)?n:()=>n}}const oi=(t,e)=>t?t+ct(e):e,si=(t,e)=>U(e)&&"adapters"!==t;function ai(t,e,i){let n=t[e];return ht(n)||(n=i(),ht(n)&&(t[e]=n)),n}function ri(t,e,i){return dt(t)?t(e,i):t}const li=(t,e)=>!0===t?e:"string"==typeof t?lt(e,t):void 0;function ci(t,e,i,n){for(const o of e){const e=li(i,o);if(e){t.add(e);const o=ri(e._fallback,i,e);if(ht(o)&&o!==i&&o!==n)return o}else if(!1===e&&ht(n)&&i!==n)return null}return!1}function hi(t,e,i,n){const o=e._rootScopes,s=ri(e._fallback,i,n),a=[...t,...o],r=new Set;r.add(n);let l=di(r,a,i,s||i);return null!==l&&((!ht(s)||s===i||(l=di(r,a,s,l),null!==l))&&ei(Array.from(r),[""],o,s,(()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const o=n[e];if(Y(o)&&U(i))return i;return o}(e,i,n))))}function di(t,e,i,n){for(;i;)i=ci(t,e,i,n);return i}function ui(t,e){for(const i of e){if(!i)continue;const e=i[t];if(ht(e))return e}}function fi(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}const gi=Number.EPSILON||1e-14,pi=(t,e)=>e<t.length&&!t[e].skip&&t[e],mi=t=>"x"===t?"y":"x";function xi(t,e,i,n){const o=t.skip?e:t,s=e,a=i.skip?e:i,r=Bt(s,o),l=Bt(a,s);let c=r/(r+l),h=l/(r+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const d=n*c,u=n*h;return{previous:{x:s.x-d*(a.x-o.x),y:s.y-d*(a.y-o.y)},next:{x:s.x+u*(a.x-o.x),y:s.y+u*(a.y-o.y)}}}function bi(t,e="x"){const i=mi(e),n=t.length,o=Array(n).fill(0),s=Array(n);let a,r,l,c=pi(t,0);for(a=0;a<n;++a)if(r=l,l=c,c=pi(t,a+1),l){if(c){const t=c[e]-l[e];o[a]=0!==t?(c[i]-l[i])/t:0}s[a]=r?c?Dt(o[a-1])!==Dt(o[a])?0:(o[a-1]+o[a])/2:o[a-1]:o[a]}!function(t,e,i){const n=t.length;let o,s,a,r,l,c=pi(t,0);for(let h=0;h<n-1;++h)l=c,c=pi(t,h+1),l&&c&&(At(e[h],0,gi)?i[h]=i[h+1]=0:(o=i[h]/e[h],s=i[h+1]/e[h],r=Math.pow(o,2)+Math.pow(s,2),r<=9||(a=3/Math.sqrt(r),i[h]=o*a*e[h],i[h+1]=s*a*e[h])))}(t,o,s),function(t,e,i="x"){const n=mi(i),o=t.length;let s,a,r,l=pi(t,0);for(let c=0;c<o;++c){if(a=r,r=l,l=pi(t,c+1),!r)continue;const o=r[i],h=r[n];a&&(s=(o-a[i])/3,r[`cp1${i}`]=o-s,r[`cp1${n}`]=h-s*e[c]),l&&(s=(l[i]-o)/3,r[`cp2${i}`]=o+s,r[`cp2${n}`]=h+s*e[c])}}(t,s,e)}function _i(t,e,i){return Math.max(Math.min(t,i),e)}function yi(t,e,i,n,o){let s,a,r,l;if(e.spanGaps&&(t=t.filter((t=>!t.skip))),"monotone"===e.cubicInterpolationMode)bi(t,o);else{let i=n?t[t.length-1]:t[0];for(s=0,a=t.length;s<a;++s)r=t[s],l=xi(i,r,t[Math.min(s+1,a-(n?0:1))%a],e.tension),r.cp1x=l.previous.x,r.cp1y=l.previous.y,r.cp2x=l.next.x,r.cp2y=l.next.y,i=r}e.capBezierPoints&&function(t,e){let i,n,o,s,a,r=Gt(t[0],e);for(i=0,n=t.length;i<n;++i)a=s,s=r,r=i<n-1&&Gt(t[i+1],e),s&&(o=t[i],a&&(o.cp1x=_i(o.cp1x,e.left,e.right),o.cp1y=_i(o.cp1y,e.top,e.bottom)),r&&(o.cp2x=_i(o.cp2x,e.left,e.right),o.cp2y=_i(o.cp2y,e.top,e.bottom)))}(t,i)}const vi=t=>0===t||1===t,wi=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*_t/i),Mi=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*_t/i)+1,ki={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*Mt),easeOutSine:t=>Math.sin(t*Mt),easeInOutSine:t=>-.5*(Math.cos(bt*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>vi(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>vi(t)?t:wi(t,.075,.3),easeOutElastic:t=>vi(t)?t:Mi(t,.075,.3),easeInOutElastic(t){const e=.1125;return vi(t)?t:t<.5?.5*wi(2*t,e,.45):.5+.5*Mi(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-ki.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*ki.easeInBounce(2*t):.5*ki.easeOutBounce(2*t-1)+.5};function Si(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function Pi(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function Di(t,e,i,n){const o={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},a=Si(t,o,i),r=Si(o,s,i),l=Si(s,e,i),c=Si(a,r,i),h=Si(r,l,i);return Si(c,h,i)}const Ci=new Map;function Oi(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=Ci.get(i);return n||(n=new Intl.NumberFormat(t,e),Ci.set(i,n)),n}(e,i).format(t)}function Ti(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function Ai(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function Li(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Ri(t){return"angle"===t?{between:Nt,compare:Vt,normalize:Wt}:{between:(t,e,i)=>t>=Math.min(e,i)&&t<=Math.max(i,e),compare:(t,e)=>t-e,normalize:t=>t}}function Ei({start:t,end:e,count:i,loop:n,style:o}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:o}}function Ii(t,e,i){if(!i)return[t];const{property:n,start:o,end:s}=i,a=e.length,{compare:r,between:l,normalize:c}=Ri(n),{start:h,end:d,loop:u,style:f}=function(t,e,i){const{property:n,start:o,end:s}=i,{between:a,normalize:r}=Ri(n),l=e.length;let c,h,{start:d,end:u,loop:f}=t;if(f){for(d+=l,u+=l,c=0,h=l;c<h&&a(r(e[d%l][n]),o,s);++c)d--,u--;d%=l,u%=l}return u<d&&(u+=l),{start:d,end:u,loop:f,style:t.style}}(t,e,i),g=[];let p,m,x,b=!1,_=null;const y=()=>b||l(o,x,p)&&0!==r(o,x),v=()=>!b||0===r(s,p)||l(s,x,p);for(let t=h,i=h;t<=d;++t)m=e[t%a],m.skip||(p=c(m[n]),p!==x&&(b=l(p,o,s),null===_&&y()&&(_=0===r(p,o)?t:i),null!==_&&v()&&(g.push(Ei({start:_,end:t,loop:u,count:a,style:f})),_=null),i=t,x=p));return null!==_&&g.push(Ei({start:_,end:d,loop:u,count:a,style:f})),g}function zi(t,e){const i=[],n=t.segments;for(let o=0;o<n.length;o++){const s=Ii(n[o],t.points,e);s.length&&i.push(...s)}return i}function Fi(t,e){const i=t.points,n=t.options.spanGaps,o=i.length;if(!o)return[];const s=!!t._loop,{start:a,end:r}=function(t,e,i,n){let o=0,s=e-1;if(i&&!n)for(;o<e&&!t[o].skip;)o++;for(;o<e&&t[o].skip;)o++;for(o%=e,i&&(s+=o);s>o&&t[s%e].skip;)s--;return s%=e,{start:o,end:s}}(i,o,s,n);if(!0===n)return Bi(t,[{start:a,end:r,loop:s}],i,e);return Bi(t,function(t,e,i,n){const o=t.length,s=[];let a,r=e,l=t[e];for(a=e+1;a<=i;++a){const i=t[a%o];i.skip||i.stop?l.skip||(n=!1,s.push({start:e%o,end:(a-1)%o,loop:n}),e=r=i.stop?a:null):(r=a,l.skip&&(e=a)),l=i}return null!==r&&s.push({start:e%o,end:r%o,loop:n}),s}(i,a,r<a?r+o:r,!!t._fullLoop&&0===a&&r===o-1),i,e)}function Bi(t,e,i,n){return n&&n.setContext&&i?function(t,e,i,n){const o=Vi(t.options),s=i.length,a=[];let r=e[0].start,l=r;for(const c of e){let e,h=o,d=i[r%s];for(l=r+1;l<=c.end;l++){const o=i[l%s];e=Vi(n.setContext({type:"segment",p0:d,p1:o,p0DataIndex:(l-1)%s,p1DataIndex:l%s,datasetIndex:t._datasetIndex})),Wi(e,h)&&(a.push({start:r,end:l-1,loop:c.loop,style:h}),h=e,r=l-1),d=o,h=e}r<l-1&&(a.push({start:r,end:l-1,loop:c.loop,style:e}),r=l-1)}return a}(t,e,i,n):e}function Vi(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Wi(t,e){return e&&JSON.stringify(t)!==JSON.stringify(e)}var Ni=Object.freeze({__proto__:null,easingEffects:ki,color:W,getHoverColor:N,noop:H,uid:j,isNullOrUndef:$,isArray:Y,isObject:U,isFinite:X,finiteOrDefault:q,valueOrDefault:K,toPercentage:G,toDimension:Z,callback:Q,each:J,_elementsEqual:tt,clone:et,_merger:nt,merge:ot,mergeIf:st,_mergerIf:at,_deprecated:function(t,e,i,n){void 0!==e&&console.warn(t+': "'+i+'" is deprecated. Please use "'+n+'" instead')},resolveObjectKey:lt,_capitalize:ct,defined:ht,isFunction:dt,setsEqual:ut,toFontString:$t,_measureText:Yt,_longestText:Ut,_alignPixel:Xt,clearCanvas:qt,drawPoint:Kt,_isPointInArea:Gt,clipArea:Zt,unclipArea:Qt,_steppedLineTo:Jt,_bezierCurveTo:te,renderText:ee,addRoundedRectPath:ne,_lookup:oe,_lookupByKey:se,_rlookupByKey:ae,_filterBetween:re,listenArrayEvents:ce,unlistenArrayEvents:he,_arrayUnique:de,_createResolver:ei,_attachContext:ii,_descriptors:ni,splineCurve:xi,splineCurveMonotone:bi,_updateBezierControlPoints:yi,_isDomSupported:ue,_getParentNode:fe,getStyle:me,getRelativePosition:_e,getMaximumSize:ve,retinaScale:we,supportsEventListenerOptions:Me,readUsedSize:ke,fontString:function(t,e,i){return e+" "+t+"px "+i},requestAnimFrame:t,throttled:e,debounce:i,_toLeftRightCenter:n,_alignStartEnd:o,_textX:s,_pointInLine:Si,_steppedInterpolation:Pi,_bezierInterpolation:Di,formatNumber:Oi,toLineHeight:Ee,_readValueToProps:Ie,toTRBL:ze,toTRBLCorners:Fe,toPadding:Be,toFont:Ve,resolve:We,_addGrace:Ne,PI:bt,TAU:_t,PITAU:yt,INFINITY:vt,RAD_PER_DEG:wt,HALF_PI:Mt,QUARTER_PI:kt,TWO_THIRDS_PI:St,log10:Pt,sign:Dt,niceNum:Ct,_factorize:Ot,isNumber:Tt,almostEquals:At,almostWhole:Lt,_setMinAndMaxByKey:Rt,toRadians:Et,toDegrees:It,_decimalPlaces:zt,getAngleFromPoint:Ft,distanceBetweenPoints:Bt,_angleDiff:Vt,_normalizeAngle:Wt,_angleBetween:Nt,_limitValue:Ht,_int16Range:jt,getRtlAdapter:Ti,overrideTextDirection:Ai,restoreTextDirection:Li,_boundSegment:Ii,_boundSegments:zi,_computeSegments:Fi});class Hi{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}}class ji extends Hi{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}}const $i={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Yi=t=>null===t||""===t;const Ui=!!Me&&{passive:!0};function Xi(t,e,i){t.canvas.removeEventListener(e,i,Ui)}function qi(t,e,i){const n=t.canvas,o=new MutationObserver((t=>{for(const e of t)for(const t of e.addedNodes)if(t===n||t.contains(n))return i()}));return o.observe(document,{childList:!0,subtree:!0}),o}function Ki(t,e,i){const n=t.canvas,o=new MutationObserver((t=>{for(const e of t)for(const t of e.removedNodes)if(t===n||t.contains(n))return i()}));return o.observe(document,{childList:!0,subtree:!0}),o}const Gi=new Map;let Zi=0;function Qi(){const t=window.devicePixelRatio;t!==Zi&&(Zi=t,Gi.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function Ji(t,i,n){const o=t.canvas,s=o&&fe(o);if(!s)return;const a=e(((t,e)=>{const i=s.clientWidth;n(t,e),i<s.clientWidth&&n()}),window),r=new ResizeObserver((t=>{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||a(i,n)}));return r.observe(s),function(t,e){Gi.size||window.addEventListener("resize",Qi),Gi.set(t,e)}(t,a),r}function tn(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){Gi.delete(t),Gi.size||window.removeEventListener("resize",Qi)}(t)}function en(t,i,n){const o=t.canvas,s=e((e=>{null!==t.ctx&&n(function(t,e){const i=$i[t.type]||t.type,{x:n,y:o}=_e(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==o?o:null}}(e,t))}),t,(t=>{const e=t[0];return[e,e.offsetX,e.offsetY]}));return function(t,e,i){t.addEventListener(e,i,Ui)}(o,i,s),s}class nn extends Hi{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),o=t.getAttribute("width");if(t.$chartjs={initial:{height:n,width:o,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Yi(o)){const e=ke(t,"width");void 0!==e&&(t.width=e)}if(Yi(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=ke(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const i=e.$chartjs.initial;["height","width"].forEach((t=>{const n=i[t];$(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=i.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),o={attach:qi,detach:Ki,resize:Ji}[e]||en;n[e]=o(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;({attach:tn,detach:tn,resize:tn}[e]||Xi)(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return ve(t,e,i,n)}isAttached(t){const e=fe(t);return!(!e||!e.isConnected)}}function on(t){return!ue()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?ji:nn}var sn=Object.freeze({__proto__:null,_detectPlatform:on,BasePlatform:Hi,BasicPlatform:ji,DomPlatform:nn});const an="transparent",rn={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=W(t||an),o=n.valid&&W(e||an);return o&&o.valid?o.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class ln{constructor(t,e,i,n){const o=e[i];n=We([t.to,n,o,t.from]);const s=We([t.from,o,n]);this._active=!0,this._fn=t.fn||rn[t.type||typeof s],this._easing=ki[t.easing]||ki.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=s,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){const n=this;if(n._active){n._notify(!1);const o=n._target[n._prop],s=i-n._start,a=n._duration-s;n._start=i,n._duration=Math.floor(Math.max(a,t.duration)),n._total+=s,n._loop=!!t.loop,n._to=We([t.to,e,o,t.from]),n._from=We([t.from,o,e])}}cancel(){const t=this;t._active&&(t.tick(Date.now()),t._active=!1,t._notify(!1))}tick(t){const e=this,i=t-e._start,n=e._duration,o=e._prop,s=e._from,a=e._loop,r=e._to;let l;if(e._active=s!==r&&(a||i<n),!e._active)return e._target[o]=r,void e._notify(!0);i<0?e._target[o]=s:(l=i/n%2,l=a&&l>1?2-l:l,l=e._easing(Math.min(1,Math.max(0,l))),e._target[o]=e._fn(s,r,l))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t<i.length;t++)i[t][e]()}}xt.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const cn=Object.keys(xt.animation);xt.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),xt.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),xt.describe("animations",{_fallback:"animation"}),xt.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class hn{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!U(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const n=t[i];if(!U(n))return;const o={};for(const t of cn)o[t]=n[t];(Y(n.properties)&&n.properties||[i]).forEach((t=>{t!==i&&e.has(t)||e.set(t,o)}))}))}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!n)return[];const o=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e<n.length;e++){const o=t[n[e]];o&&o.active()&&i.push(o.wait())}return Promise.all(i)}(t.options.$animations,i).then((()=>{t.options=i}),(()=>{})),o}_createAnimations(t,e){const i=this._properties,n=[],o=t.$animations||(t.$animations={}),s=Object.keys(e),a=Date.now();let r;for(r=s.length-1;r>=0;--r){const l=s[r];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const c=e[l];let h=o[l];const d=i.get(l);if(h){if(d&&h.active()){h.update(d,c,a);continue}h.cancel()}d&&d.duration?(o[l]=h=new ln(d,t,l,c),n.push(h)):t[l]=c}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(a.add(this._chart,i),!0):void 0}}function dn(t,e){const i=t&&t.options||{},n=i.reverse,o=void 0===i.min?e:0,s=void 0===i.max?e:0;return{start:n?s:o,end:n?o:s}}function un(t,e){const i=[],n=t._getSortedDatasetMetas(e);let o,s;for(o=0,s=n.length;o<s;++o)i.push(n[o].index);return i}function fn(t,e,i,n){const o=t.keys,s="single"===n.mode;let a,r,l,c;if(null!==e){for(a=0,r=o.length;a<r;++a){if(l=+o[a],l===i){if(n.all)continue;break}c=t.values[l],X(c)&&(s||0===e||Dt(e)===Dt(c))&&(e+=c)}return e}}function gn(t,e){const i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function pn(t,e,i){const n=t[e]||(t[e]={});return n[i]||(n[i]={})}function mn(t,e,i,n){for(const o of e.getMatchingVisibleMetas(n).reverse()){const e=t[o.index];if(i&&e>0||!i&&e<0)return o.index}return null}function xn(t,e){const{chart:i,_cachedMeta:n}=t,o=i._stacks||(i._stacks={}),{iScale:s,vScale:a,index:r}=n,l=s.axis,c=a.axis,h=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(s,a,n),d=e.length;let u;for(let t=0;t<d;++t){const i=e[t],{[l]:s,[c]:d}=i;u=(i._stacks||(i._stacks={}))[c]=pn(o,h,s),u[r]=d,u._top=mn(u,a,!0,n.type),u._bottom=mn(u,a,!1,n.type)}}function bn(t,e){const i=t.scales;return Object.keys(i).filter((t=>i[t].axis===e)).shift()}function _n(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i]}}}const yn=t=>"reset"===t||"none"===t,vn=(t,e)=>e?t:Object.assign({},t);class wn{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this,e=t._cachedMeta;t.configure(),t.linkScales(),e._stacked=gn(e.vScale,e),t.addElements()}updateIndex(t){this.index!==t&&_n(this._cachedMeta),this.index=t}linkScales(){const t=this,e=t.chart,i=t._cachedMeta,n=t.getDataset(),o=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,s=i.xAxisID=K(n.xAxisID,bn(e,"x")),a=i.yAxisID=K(n.yAxisID,bn(e,"y")),r=i.rAxisID=K(n.rAxisID,bn(e,"r")),l=i.indexAxis,c=i.iAxisID=o(l,s,a,r),h=i.vAxisID=o(l,a,s,r);i.xScale=t.getScaleForId(s),i.yScale=t.getScaleForId(a),i.rScale=t.getScaleForId(r),i.iScale=t.getScaleForId(c),i.vScale=t.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&he(this._data,this),t._stacked&&_n(t)}_dataCheck(){const t=this,e=t.getDataset(),i=e.data||(e.data=[]),n=t._data;if(U(i))t._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,o,s;for(n=0,o=e.length;n<o;++n)s=e[n],i[n]={x:s,y:t[s]};return i}(i);else if(n!==i){if(n){he(n,t);const e=t._cachedMeta;_n(e),e._parsed=[]}i&&Object.isExtensible(i)&&ce(i,t),t._syncList=[],t._data=i}}addElements(){const t=this,e=t._cachedMeta;t._dataCheck(),t.datasetElementType&&(e.dataset=new t.datasetElementType)}buildOrUpdateElements(t){const e=this,i=e._cachedMeta,n=e.getDataset();let o=!1;e._dataCheck();const s=i._stacked;i._stacked=gn(i.vScale,i),i.stack!==n.stack&&(o=!0,_n(i),i.stack=n.stack),e._resyncElements(t),(o||s!==i._stacked)&&xn(e,i._parsed)}configure(){const t=this,e=t.chart.config,i=e.datasetScopeKeys(t._type),n=e.getOptionScopes(t.getDataset(),i,!0);t.options=e.createResolver(n,t.getContext()),t._parsing=t.options.parsing}parse(t,e){const i=this,{_cachedMeta:n,_data:o}=i,{iScale:s,_stacked:a}=n,r=s.axis;let l,c,h,d=0===t&&e===o.length||n._sorted,u=t>0&&n._parsed[t-1];if(!1===i._parsing)n._parsed=o,n._sorted=!0,h=o;else{h=Y(o[t])?i.parseArrayData(n,o,t,e):U(o[t])?i.parseObjectData(n,o,t,e):i.parsePrimitiveData(n,o,t,e);const s=()=>null===c[r]||u&&c[r]<u[r];for(l=0;l<e;++l)n._parsed[l+t]=c=h[l],d&&(s()&&(d=!1),u=c);n._sorted=d}a&&xn(i,h)}parsePrimitiveData(t,e,i,n){const{iScale:o,vScale:s}=t,a=o.axis,r=s.axis,l=o.getLabels(),c=o===s,h=new Array(n);let d,u,f;for(d=0,u=n;d<u;++d)f=d+i,h[d]={[a]:c||o.parse(l[f],f),[r]:s.parse(e[f],f)};return h}parseArrayData(t,e,i,n){const{xScale:o,yScale:s}=t,a=new Array(n);let r,l,c,h;for(r=0,l=n;r<l;++r)c=r+i,h=e[c],a[r]={x:o.parse(h[0],c),y:s.parse(h[1],c)};return a}parseObjectData(t,e,i,n){const{xScale:o,yScale:s}=t,{xAxisKey:a="x",yAxisKey:r="y"}=this._parsing,l=new Array(n);let c,h,d,u;for(c=0,h=n;c<h;++c)d=c+i,u=e[d],l[c]={x:o.parse(lt(u,a),d),y:s.parse(lt(u,r),d)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const n=this.chart,o=this._cachedMeta,s=e[t.axis];return fn({keys:un(n,!0),values:e._stacks[t.axis]},s,o.index,{mode:i})}updateRangeFromParsed(t,e,i,n){const o=i[e.axis];let s=null===o?NaN:o;const a=n&&i._stacks[e.axis];n&&a&&(n.values=a,t.min=Math.min(t.min,s),t.max=Math.max(t.max,s),s=fn(n,o,this._cachedMeta.index,{all:!0})),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,e){const i=this,n=i._cachedMeta,o=n._parsed,s=n._sorted&&t===n.iScale,a=o.length,r=i._getOtherScale(t),l=e&&n._stacked&&{keys:un(i.chart,!0),values:null},c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:d}=function(t){const{min:e,max:i,minDefined:n,maxDefined:o}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:o?i:Number.POSITIVE_INFINITY}}(r);let u,f,g,p;function m(){return g=o[u],f=g[t.axis],p=g[r.axis],!X(f)||h>p||d<p}for(u=0;u<a&&(m()||(i.updateRangeFromParsed(c,t,g,l),!s));++u);if(s)for(u=a-1;u>=0;--u)if(!m()){i.updateRangeFromParsed(c,t,g,l);break}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,o,s;for(n=0,o=e.length;n<o;++n)s=e[n][t.axis],X(s)&&i.push(s);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,n=e.vScale,o=this.getParsed(t);return{label:i?""+i.getLabelForValue(o[i.axis]):"",value:n?""+n.getLabelForValue(o[n.axis]):""}}_update(t){const e=this,i=e._cachedMeta;e.configure(),e._cachedDataOpts={},e.update(t||"default"),i._clip=function(t){let e,i,n,o;return U(t)?(e=t.top,i=t.right,n=t.bottom,o=t.left):e=i=n=o=t,{top:e,right:i,bottom:n,left:o,disabled:!1===t}}(K(e.options.clip,function(t,e,i){if(!1===i)return!1;const n=dn(t,i),o=dn(e,i);return{top:o.end,right:n.end,bottom:o.start,left:n.start}}(i.xScale,i.yScale,e.getMaxOverflow())))}update(t){}draw(){const t=this,e=t._ctx,i=t.chart,n=t._cachedMeta,o=n.data||[],s=i.chartArea,a=[],r=t._drawStart||0,l=t._drawCount||o.length-r;let c;for(n.dataset&&n.dataset.draw(e,s,r,l),c=r;c<r+l;++c){const t=o[c];t.hidden||(t.active?a.push(t):t.draw(e,s))}for(c=0;c<a.length;++c)a[c].draw(e,s)}getStyle(t,e){const i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const n=this,o=n.getDataset();let s;if(t>=0&&t<n._cachedMeta.data.length){const e=n._cachedMeta.data[t];s=e.$context||(e.$context=function(t,e,i){return Object.assign(Object.create(t),{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}(n.getContext(),t,e)),s.parsed=n.getParsed(t),s.raw=o.data[t],s.index=s.dataIndex=t}else s=n.$context||(n.$context=function(t,e){return Object.assign(Object.create(t),{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(n.chart.getContext(),n.index)),s.dataset=o,s.index=s.datasetIndex=n.index;return s.active=!!e,s.mode=i,s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const n=this,o="active"===e,s=n._cachedDataOpts,a=t+"-"+e,r=s[a],l=n.enableOptionSharing&&ht(i);if(r)return vn(r,l);const c=n.chart.config,h=c.datasetElementScopeKeys(n._type,t),d=o?[`${t}Hover`,"hover",t,""]:[t,""],u=c.getOptionScopes(n.getDataset(),h),f=Object.keys(xt.elements[t]),g=c.resolveNamedOptions(u,f,(()=>n.getContext(i,o)),d);return g.$shared&&(g.$shared=l,s[a]=Object.freeze(vn(g,l))),g}_resolveAnimations(t,e,i){const n=this,o=n.chart,s=n._cachedDataOpts,a=`animation-${e}`,r=s[a];if(r)return r;let l;if(!1!==o.options.animation){const o=n.chart.config,s=o.datasetAnimationScopeKeys(n._type,e),a=o.getOptionScopes(n.getDataset(),s);l=o.createResolver(a,n.getContext(t,i,e))}const c=new hn(o,l&&l.animations);return l&&l._cacheable&&(s[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||yn(t)||this.chart._animationsDisabled}updateElement(t,e,i,n){yn(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!yn(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const o=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this,i=e._data,n=e._cachedMeta.data;for(const[t,i,n]of e._syncList)e[t](i,n);e._syncList=[];const o=n.length,s=i.length,a=Math.min(s,o);a&&e.parse(0,a),s>o?e._insertElements(o,s-o,t):s<o&&e._removeElements(s,o-s)}_insertElements(t,e,i=!0){const n=this,o=n._cachedMeta,s=o.data,a=t+e;let r;const l=t=>{for(t.length+=e,r=t.length-1;r>=a;r--)t[r]=t[r-e]};for(l(s),r=t;r<a;++r)s[r]=new n.dataElementType;n._parsing&&l(o._parsed),n.parse(t,e),i&&n.updateElements(s,t,e,"reset")}updateElements(t,e,i,n){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const n=i._parsed.splice(t,e);i._stacked&&_n(i,n)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,n]=t;this[e](i,n)}}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){this._sync(["_removeElements",t,e]),this._sync(["_insertElements",t,arguments.length-2])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}wn.defaults={},wn.prototype.datasetElementType=null,wn.prototype.dataElementType=null;class Mn{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return Tt(this.x)&&Tt(this.y)}getProps(t,e){const i=this,n=this.$animations;if(!e||!n)return i;const o={};return t.forEach((t=>{o[t]=n[t]&&n[t].active()?n[t]._to:i[t]})),o}}Mn.defaults={},Mn.defaultRoutes=void 0;const kn={values:t=>Y(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let o,s=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(o="scientific"),s=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const a=Pt(Math.abs(s)),r=Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:o,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),Oi(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=t/Math.pow(10,Math.floor(Pt(t)));return 1===n||2===n||5===n?kn.numeric.call(this,t,e,i):""}};var Sn={formatters:kn};function Pn(t,e){const i=t.options.ticks,n=i.maxTicksLimit||function(t){const e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),o=t._maxLength/i;return Math.floor(Math.min(n,o))}(t),o=i.major.enabled?function(t){const e=[];let i,n;for(i=0,n=t.length;i<n;i++)t[i].major&&e.push(i);return e}(e):[],s=o.length,a=o[0],r=o[s-1],l=[];if(s>n)return function(t,e,i,n){let o,s=0,a=i[0];for(n=Math.ceil(n),o=0;o<t.length;o++)o===a&&(e.push(t[o]),s++,a=i[s*n])}(e,l,o,s/n),l;const c=function(t,e,i){const n=function(t){const e=t.length;let i,n;if(e<2)return!1;for(n=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==n)return!1;return n}(t),o=e.length/i;if(!n)return Math.max(o,1);const s=Ot(n);for(let t=0,e=s.length-1;t<e;t++){const e=s[t];if(e>o)return e}return Math.max(o,1)}(o,e,n);if(s>0){let t,i;const n=s>1?Math.round((r-a)/(s-1)):null;for(Dn(e,l,c,$(n)?0:a-n,a),t=0,i=s-1;t<i;t++)Dn(e,l,c,o[t],o[t+1]);return Dn(e,l,c,r,$(n)?e.length:r+n),l}return Dn(e,l,c),l}function Dn(t,e,i,n,o){const s=K(n,0),a=Math.min(K(o,t.length),t.length);let r,l,c,h=0;for(i=Math.ceil(i),o&&(r=o-n,i=r/Math.floor(r/i)),c=s;c<0;)h++,c=Math.round(s+h*i);for(l=Math.max(s,0);l<a;l++)l===c&&(e.push(t[l]),h++,c=Math.round(s+h*i))}xt.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Sn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),xt.route("scale.ticks","color","","color"),xt.route("scale.grid","color","","borderColor"),xt.route("scale.grid","borderColor","","borderColor"),xt.route("scale.title","color","","color"),xt.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),xt.describe("scales",{_fallback:"scale"}),xt.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const Cn=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function On(t,e){const i=[],n=t.length/e,o=t.length;let s=0;for(;s<o;s+=n)i.push(t[Math.floor(s)]);return i}function Tn(t,e,i){const n=t.ticks.length,o=Math.min(e,n-1),s=t._startPixel,a=t._endPixel,r=1e-6;let l,c=t.getPixelForTick(o);if(!(i&&(l=1===n?Math.max(c-s,a-c):0===e?(t.getPixelForTick(1)-c)/2:(c-t.getPixelForTick(o-1))/2,c+=o<e?l:-l,c<s-r||c>a+r)))return c}function An(t){return t.drawTicks?t.tickLength:0}function Ln(t,e){if(!t.display)return 0;const i=Ve(t.font,e),n=Be(t.padding);return(Y(t.text)?t.text.length:1)*i.lineHeight+n.height}function Rn(t,e,i){let o=n(t);return(i&&"right"!==e||!i&&"right"===e)&&(o=(t=>"left"===t?"right":"right"===t?"left":t)(o)),o}class En extends Mn{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){const e=this;e.options=t.setContext(e.getContext()),e.axis=t.axis,e._userMin=e.parse(t.min),e._userMax=e.parse(t.max),e._suggestedMin=e.parse(t.suggestedMin),e._suggestedMax=e.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=q(t,Number.POSITIVE_INFINITY),e=q(e,Number.NEGATIVE_INFINITY),i=q(i,Number.POSITIVE_INFINITY),n=q(n,Number.NEGATIVE_INFINITY),{min:q(t,i),max:q(e,n),minDefined:X(t),maxDefined:X(e)}}getMinMax(t){const e=this;let i,{min:n,max:o,minDefined:s,maxDefined:a}=e.getUserBounds();if(s&&a)return{min:n,max:o};const r=e.getMatchingVisibleMetas();for(let l=0,c=r.length;l<c;++l)i=r[l].controller.getMinMax(e,t),s||(n=Math.min(n,i.min)),a||(o=Math.max(o,i.max));return{min:q(n,q(o,n)),max:q(o,q(n,o))}}getPadding(){const t=this;return{left:t.paddingLeft||0,top:t.paddingTop||0,right:t.paddingRight||0,bottom:t.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Q(this.options.beforeUpdate,[this])}update(t,e,i){const n=this,o=n.options.ticks,s=o.sampleSize;n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),n.ticks=null,n._labelSizes=null,n._gridLineItems=null,n._labelItems=null,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n._maxLength=n.isHorizontal()?n.width+i.left+i.right:n.height+i.top+i.bottom,n._dataLimitsCached||(n.beforeDataLimits(),n.determineDataLimits(),n.afterDataLimits(),n._range=Ne(n,n.options.grace),n._dataLimitsCached=!0),n.beforeBuildTicks(),n.ticks=n.buildTicks()||[],n.afterBuildTicks();const a=s<n.ticks.length;n._convertTicksToLabels(a?On(n.ticks,s):n.ticks),n.configure(),n.beforeCalculateLabelRotation(),n.calculateLabelRotation(),n.afterCalculateLabelRotation(),o.display&&(o.autoSkip||"auto"===o.source)&&(n.ticks=Pn(n,n.ticks),n._labelSizes=null),a&&n._convertTicksToLabels(n.ticks),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate()}configure(){const t=this;let e,i,n=t.options.reverse;t.isHorizontal()?(e=t.left,i=t.right):(e=t.top,i=t.bottom,n=!n),t._startPixel=e,t._endPixel=i,t._reversePixels=n,t._length=i-e,t._alignToPixels=t.options.alignToPixels}afterUpdate(){Q(this.options.afterUpdate,[this])}beforeSetDimensions(){Q(this.options.beforeSetDimensions,[this])}setDimensions(){const t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0}afterSetDimensions(){Q(this.options.afterSetDimensions,[this])}_callHooks(t){const e=this;e.chart.notifyPlugins(t,e.getContext()),Q(e.options[t],[e])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Q(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this,i=e.options.ticks;let n,o,s;for(n=0,o=t.length;n<o;n++)s=t[n],s.label=Q(i.callback,[s.value,n,t],e)}afterTickToLabelConversion(){Q(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Q(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this,e=t.options,i=e.ticks,n=t.ticks.length,o=i.minRotation||0,s=i.maxRotation;let a,r,l,c=o;if(!t._isVisible()||!i.display||o>=s||n<=1||!t.isHorizontal())return void(t.labelRotation=o);const h=t._getLabelSizes(),d=h.widest.width,u=h.highest.height,f=Ht(t.chart.width-d,0,t.maxWidth);a=e.offset?t.maxWidth/n:f/(n-1),d+6>a&&(a=f/(n-(e.offset?.5:1)),r=t.maxHeight-An(e.grid)-i.padding-Ln(e.title,t.chart.options.font),l=Math.sqrt(d*d+u*u),c=It(Math.min(Math.asin(Ht((h.highest.height+6)/a,-1,1)),Math.asin(Ht(r/l,-1,1))-Math.asin(Ht(u/l,-1,1)))),c=Math.max(o,Math.min(s,c))),t.labelRotation=c}afterCalculateLabelRotation(){Q(this.options.afterCalculateLabelRotation,[this])}beforeFit(){Q(this.options.beforeFit,[this])}fit(){const t=this,e={width:0,height:0},{chart:i,options:{ticks:n,title:o,grid:s}}=t,a=t._isVisible(),r=t.isHorizontal();if(a){const a=Ln(o,i.options.font);if(r?(e.width=t.maxWidth,e.height=An(s)+a):(e.height=t.maxHeight,e.width=An(s)+a),n.display&&t.ticks.length){const{first:i,last:o,widest:s,highest:a}=t._getLabelSizes(),l=2*n.padding,c=Et(t.labelRotation),h=Math.cos(c),d=Math.sin(c);if(r){const i=n.mirror?0:d*s.width+h*a.height;e.height=Math.min(t.maxHeight,e.height+i+l)}else{const i=n.mirror?0:h*s.width+d*a.height;e.width=Math.min(t.maxWidth,e.width+i+l)}t._calculatePadding(i,o,d,h)}}t._handleMargins(),r?(t.width=t._length=i.width-t._margins.left-t._margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=i.height-t._margins.top-t._margins.bottom)}_calculatePadding(t,e,i,n){const o=this,{ticks:{align:s,padding:a},position:r}=o.options,l=0!==o.labelRotation,c="top"!==r&&"x"===o.axis;if(o.isHorizontal()){const r=o.getPixelForTick(0)-o.left,h=o.right-o.getPixelForTick(o.ticks.length-1);let d=0,u=0;l?c?(d=n*t.width,u=i*e.height):(d=i*t.height,u=n*e.width):"start"===s?u=e.width:"end"===s?d=t.width:(d=t.width/2,u=e.width/2),o.paddingLeft=Math.max((d-r+a)*o.width/(o.width-r),0),o.paddingRight=Math.max((u-h+a)*o.width/(o.width-h),0)}else{let i=e.height/2,n=t.height/2;"start"===s?(i=0,n=t.height):"end"===s&&(i=e.height,n=0),o.paddingTop=i+a,o.paddingBottom=n+a}}_handleMargins(){const t=this;t._margins&&(t._margins.left=Math.max(t.paddingLeft,t._margins.left),t._margins.top=Math.max(t.paddingTop,t._margins.top),t._margins.right=Math.max(t.paddingRight,t._margins.right),t._margins.bottom=Math.max(t.paddingBottom,t._margins.bottom))}afterFit(){Q(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){const e=this;let i,n;for(e.beforeTickToLabelConversion(),e.generateTickLabels(t),i=0,n=t.length;i<n;i++)$(t[i].label)&&(t.splice(i,1),n--,i--);e.afterTickToLabelConversion()}_getLabelSizes(){const t=this;let e=t._labelSizes;if(!e){const i=t.options.ticks.sampleSize;let n=t.ticks;i<n.length&&(n=On(n,i)),t._labelSizes=e=t._computeLabelSizes(n,n.length)}return e}_computeLabelSizes(t,e){const{ctx:i,_longestTextCache:n}=this,o=[],s=[];let a,r,l,c,h,d,u,f,g,p,m,x=0,b=0;for(a=0;a<e;++a){if(c=t[a].label,h=this._resolveTickFontOptions(a),i.font=d=h.string,u=n[d]=n[d]||{data:{},gc:[]},f=h.lineHeight,g=p=0,$(c)||Y(c)){if(Y(c))for(r=0,l=c.length;r<l;++r)m=c[r],$(m)||Y(m)||(g=Yt(i,u.data,u.gc,g,m),p+=f)}else g=Yt(i,u.data,u.gc,g,c),p=f;o.push(g),s.push(p),x=Math.max(g,x),b=Math.max(p,b)}!function(t,e){J(t,(t=>{const i=t.gc,n=i.length/2;let o;if(n>e){for(o=0;o<n;++o)delete t.data[i[o]];i.splice(0,n)}}))}(n,e);const _=o.indexOf(x),y=s.indexOf(b),v=t=>({width:o[t]||0,height:s[t]||0});return{first:v(0),last:v(e-1),widest:v(_),highest:v(y),widths:o,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){const e=this;e._reversePixels&&(t=1-t);const i=e._startPixel+t*e._length;return jt(e._alignToPixels?Xt(e.chart,i,0):i)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this,i=e.ticks||[];if(t>=0&&t<i.length){const n=i[t];return n.$context||(n.$context=function(t,e,i){return Object.assign(Object.create(t),{tick:i,index:e,type:"tick"})}(e.getContext(),t,n))}return e.$context||(e.$context=(n=e.chart.getContext(),o=e,Object.assign(Object.create(n),{scale:o,type:"scale"})));var n,o}_tickSize(){const t=this,e=t.options.ticks,i=Et(t.labelRotation),n=Math.abs(Math.cos(i)),o=Math.abs(Math.sin(i)),s=t._getLabelSizes(),a=e.autoSkipPadding||0,r=s?s.widest.width+a:0,l=s?s.highest.height+a:0;return t.isHorizontal()?l*n>r*o?r/n:l/o:l*o<r*n?l/n:r/o}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this,i=e.axis,n=e.chart,o=e.options,{grid:s,position:a}=o,r=s.offset,l=e.isHorizontal(),c=e.ticks.length+(r?1:0),h=An(s),d=[],u=s.setContext(e.getContext()),f=u.drawBorder?u.borderWidth:0,g=f/2,p=function(t){return Xt(n,t,f)};let m,x,b,_,y,v,w,M,k,S,P,D;if("top"===a)m=p(e.bottom),v=e.bottom-h,M=m-g,S=p(t.top)+g,D=t.bottom;else if("bottom"===a)m=p(e.top),S=t.top,D=p(t.bottom)-g,v=m+g,M=e.top+h;else if("left"===a)m=p(e.right),y=e.right-h,w=m-g,k=p(t.left)+g,P=t.right;else if("right"===a)m=p(e.left),k=t.left,P=p(t.right)-g,y=m+g,w=e.left+h;else if("x"===i){if("center"===a)m=p((t.top+t.bottom)/2+.5);else if(U(a)){const t=Object.keys(a)[0],i=a[t];m=p(e.chart.scales[t].getPixelForValue(i))}S=t.top,D=t.bottom,v=m+g,M=v+h}else if("y"===i){if("center"===a)m=p((t.left+t.right)/2);else if(U(a)){const t=Object.keys(a)[0],i=a[t];m=p(e.chart.scales[t].getPixelForValue(i))}y=m-g,w=y-h,k=t.left,P=t.right}const C=K(o.ticks.maxTicksLimit,c),O=Math.max(1,Math.ceil(c/C));for(x=0;x<c;x+=O){const t=s.setContext(e.getContext(x)),i=t.lineWidth,o=t.color,a=s.borderDash||[],c=t.borderDashOffset,h=t.tickWidth,u=t.tickColor,f=t.tickBorderDash||[],g=t.tickBorderDashOffset;b=Tn(e,x,r),void 0!==b&&(_=Xt(n,b,i),l?y=w=k=P=_:v=M=S=D=_,d.push({tx1:y,ty1:v,tx2:w,ty2:M,x1:k,y1:S,x2:P,y2:D,width:i,color:o,borderDash:a,borderDashOffset:c,tickWidth:h,tickColor:u,tickBorderDash:f,tickBorderDashOffset:g}))}return e._ticksLength=c,e._borderValue=m,d}_computeLabelItems(t){const e=this,i=e.axis,n=e.options,{position:o,ticks:s}=n,a=e.isHorizontal(),r=e.ticks,{align:l,crossAlign:c,padding:h,mirror:d}=s,u=An(n.grid),f=u+h,g=d?-h:f,p=-Et(e.labelRotation),m=[];let x,b,_,y,v,w,M,k,S,P,D,C,O="middle";if("top"===o)w=e.bottom-g,M=e._getXAxisLabelAlignment();else if("bottom"===o)w=e.top+g,M=e._getXAxisLabelAlignment();else if("left"===o){const t=e._getYAxisLabelAlignment(u);M=t.textAlign,v=t.x}else if("right"===o){const t=e._getYAxisLabelAlignment(u);M=t.textAlign,v=t.x}else if("x"===i){if("center"===o)w=(t.top+t.bottom)/2+f;else if(U(o)){const t=Object.keys(o)[0],i=o[t];w=e.chart.scales[t].getPixelForValue(i)+f}M=e._getXAxisLabelAlignment()}else if("y"===i){if("center"===o)v=(t.left+t.right)/2-f;else if(U(o)){const t=Object.keys(o)[0],i=o[t];v=e.chart.scales[t].getPixelForValue(i)}M=e._getYAxisLabelAlignment(u).textAlign}"y"===i&&("start"===l?O="top":"end"===l&&(O="bottom"));const T=e._getLabelSizes();for(x=0,b=r.length;x<b;++x){_=r[x],y=_.label;const t=s.setContext(e.getContext(x));k=e.getPixelForTick(x)+s.labelOffset,S=e._resolveTickFontOptions(x),P=S.lineHeight,D=Y(y)?y.length:1;const i=D/2,n=t.color,l=t.textStrokeColor,h=t.textStrokeWidth;let u;if(a?(v=k,C="top"===o?"near"===c||0!==p?-D*P+P/2:"center"===c?-T.highest.height/2-i*P+P:-T.highest.height+P/2:"near"===c||0!==p?P/2:"center"===c?T.highest.height/2-i*P:T.highest.height-D*P,d&&(C*=-1)):(w=k,C=(1-D)*P/2),t.showLabelBackdrop){const e=Be(t.backdropPadding),i=T.heights[x],n=T.widths[x];let o=w+C-e.top,s=v-e.left;switch(O){case"middle":o-=i/2;break;case"bottom":o-=i}switch(M){case"center":s-=n/2;break;case"right":s-=n}u={left:s,top:o,width:n+e.width,height:i+e.height,color:t.backdropColor}}m.push({rotation:p,label:y,font:S,color:n,strokeColor:l,strokeWidth:h,textOffset:C,textAlign:M,textBaseline:O,translation:[v,w],backdrop:u})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Et(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align&&(i="right"),i}_getYAxisLabelAlignment(t){const e=this,{position:i,ticks:{crossAlign:n,mirror:o,padding:s}}=e.options,a=t+s,r=e._getLabelSizes().widest.width;let l,c;return"left"===i?o?(c=e.right+s,"near"===n?l="left":"center"===n?(l="center",c+=r/2):(l="right",c+=r)):(c=e.right-a,"near"===n?l="right":"center"===n?(l="center",c-=r/2):(l="left",c=e.left)):"right"===i?o?(c=e.left+s,"near"===n?l="right":"center"===n?(l="center",c-=r/2):(l="left",c-=r)):(c=e.left+a,"near"===n?l="left":"center"===n?(l="center",c+=r/2):(l="right",c=e.right)):l="right",{textAlign:l,x:c}}_computeLabelArea(){const t=this;if(t.options.ticks.mirror)return;const e=t.chart,i=t.options.position;return"left"===i||"right"===i?{top:0,left:t.left,bottom:e.height,right:t.right}:"top"===i||"bottom"===i?{top:t.top,left:0,bottom:t.bottom,right:e.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:n,width:o,height:s}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,n,o,s),t.restore())}getLineWidthForValue(t){const e=this,i=e.options.grid;if(!e._isVisible()||!i.display)return 0;const n=e.ticks.findIndex((e=>e.value===t));if(n>=0){return i.setContext(e.getContext(n)).lineWidth}return 0}drawGrid(t){const e=this,i=e.options.grid,n=e.ctx,o=e._gridLineItems||(e._gridLineItems=e._computeGridLineItems(t));let s,a;const r=(t,e,i)=>{i.width&&i.color&&(n.save(),n.lineWidth=i.width,n.strokeStyle=i.color,n.setLineDash(i.borderDash||[]),n.lineDashOffset=i.borderDashOffset,n.beginPath(),n.moveTo(t.x,t.y),n.lineTo(e.x,e.y),n.stroke(),n.restore())};if(i.display)for(s=0,a=o.length;s<a;++s){const t=o[s];i.drawOnChartArea&&r({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),i.drawTicks&&r({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const t=this,{chart:e,ctx:i,options:{grid:n}}=t,o=n.setContext(t.getContext()),s=n.drawBorder?o.borderWidth:0;if(!s)return;const a=n.setContext(t.getContext(0)).lineWidth,r=t._borderValue;let l,c,h,d;t.isHorizontal()?(l=Xt(e,t.left,s)-s/2,c=Xt(e,t.right,a)+a/2,h=d=r):(h=Xt(e,t.top,s)-s/2,d=Xt(e,t.bottom,a)+a/2,l=c=r),i.save(),i.lineWidth=o.borderWidth,i.strokeStyle=o.borderColor,i.beginPath(),i.moveTo(l,h),i.lineTo(c,d),i.stroke(),i.restore()}drawLabels(t){const e=this;if(!e.options.ticks.display)return;const i=e.ctx,n=e._computeLabelArea();n&&Zt(i,n);const o=e._labelItems||(e._labelItems=e._computeLabelItems(t));let s,a;for(s=0,a=o.length;s<a;++s){const t=o[s],e=t.font,n=t.label;t.backdrop&&(i.fillStyle=t.backdrop.color,i.fillRect(t.backdrop.left,t.backdrop.top,t.backdrop.width,t.backdrop.height)),ee(i,n,0,t.textOffset,e,t)}n&&Qt(i)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:n}}=this;if(!i.display)return;const s=Ve(i.font),a=Be(i.padding),r=i.align;let l=s.lineHeight/2;"bottom"===e||"center"===e||U(e)?(l+=a.bottom,Y(i.text)&&(l+=s.lineHeight*(i.text.length-1))):l+=a.top;const{titleX:c,titleY:h,maxWidth:d,rotation:u}=function(t,e,i,n){const{top:s,left:a,bottom:r,right:l,chart:c}=t,{chartArea:h,scales:d}=c;let u,f,g,p=0;const m=r-s,x=l-a;if(t.isHorizontal()){if(f=o(n,a,l),U(i)){const t=Object.keys(i)[0],n=i[t];g=d[t].getPixelForValue(n)+m-e}else g="center"===i?(h.bottom+h.top)/2+m-e:Cn(t,i,e);u=l-a}else{if(U(i)){const t=Object.keys(i)[0],n=i[t];f=d[t].getPixelForValue(n)-x+e}else f="center"===i?(h.left+h.right)/2-x+e:Cn(t,i,e);g=o(n,r,s),p="left"===i?-Mt:Mt}return{titleX:f,titleY:g,maxWidth:u,rotation:p}}(this,l,e,r);ee(t,i.text,0,0,s,{color:i.color,maxWidth:d,rotation:u,textAlign:Rn(r,e,n),textBaseline:"middle",translation:[c,h]})}draw(t){const e=this;e._isVisible()&&(e.drawBackground(),e.drawGrid(t),e.drawBorder(),e.drawTitle(),e.drawLabels(t))}_layers(){const t=this,e=t.options,i=e.ticks&&e.ticks.z||0,n=K(e.grid&&e.grid.z,-1);return t._isVisible()&&t.draw===En.prototype.draw?[{z:n,draw(e){t.drawBackground(),t.drawGrid(e),t.drawTitle()}},{z:n+1,draw(){t.drawBorder()}},{z:i,draw(e){t.drawLabels(e)}}]:[{z:i,draw(e){t.draw(e)}}]}getMatchingVisibleMetas(t){const e=this,i=e.chart.getSortedVisibleDatasetMetas(),n=e.axis+"AxisID",o=[];let s,a;for(s=0,a=i.length;s<a;++s){const a=i[s];a[n]!==e.id||t&&a.type!==t||o.push(a)}return o}_resolveTickFontOptions(t){return Ve(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this,e=t._resolveTickFontOptions(0).lineHeight;return(t.isHorizontal()?t.width:t.height)/e}}class In{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=this,i=Object.getPrototypeOf(t);let n;(function(t){return"id"in t&&"defaults"in t})(i)&&(n=e.register(i));const o=e.items,s=t.id,a=e.scope+"."+s;if(!s)throw new Error("class does not have id: "+t);return s in o||(o[s]=t,function(t,e,i){const n=ot(Object.create(null),[i?xt.get(i):{},xt.get(e),t.defaults]);xt.set(e,n),t.defaultRoutes&&function(t,e){Object.keys(e).forEach((i=>{const n=i.split("."),o=n.pop(),s=[t].concat(n).join("."),a=e[i].split("."),r=a.pop(),l=a.join(".");xt.route(s,o,l,r)}))}(e,t.defaultRoutes);t.descriptors&&xt.describe(e,t.descriptors)}(t,a,n),e.override&&xt.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in xt[n]&&(delete xt[n][i],this.override&&delete ft[i])}}var zn=new class{constructor(){this.controllers=new In(wn,"datasets",!0),this.elements=new In(Mn,"elements"),this.plugins=new In(Object,"plugins"),this.scales=new In(En,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){const n=this;[...e].forEach((e=>{const o=i||n._getRegistryForType(e);i||o.isForType(e)||o===n.plugins&&e.id?n._exec(t,o,e):J(e,(e=>{const o=i||n._getRegistryForType(e);n._exec(t,o,e)}))}))}_exec(t,e,i){const n=ct(t);Q(i["before"+n],[],i),e[t](i),Q(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const n=e.get(t);if(void 0===n)throw new Error('"'+t+'" is not a registered '+i+".");return n}};class Fn{constructor(){this._init=[]}notify(t,e,i,n){const o=this;"beforeInit"===e&&(o._init=o._createDescriptors(t,!0),o._notify(o._init,t,"install"));const s=n?o._descriptors(t).filter(n):o._descriptors(t),a=o._notify(s,t,e,i);return"destroy"===e&&(o._notify(s,t,"stop"),o._notify(o._init,t,"uninstall")),a}_notify(t,e,i,n){n=n||{};for(const o of t){const t=o.plugin;if(!1===Q(t[i],[e,n,o.options],t)&&n.cancelable)return!1}return!0}invalidate(){$(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,n=K(i.options&&i.options.plugins,{}),o=function(t){const e=[],i=Object.keys(zn.plugins.items);for(let t=0;t<i.length;t++)e.push(zn.getPlugin(i[t]));const n=t.plugins||[];for(let t=0;t<n.length;t++){const i=n[t];-1===e.indexOf(i)&&e.push(i)}return e}(i);return!1!==n||e?function(t,e,i,n){const o=[],s=t.getContext();for(let a=0;a<e.length;a++){const r=e[a],l=Bn(i[r.id],n);null!==l&&o.push({plugin:r,options:Vn(t.config,r,l,s)})}return o}(t,o,n,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,n=(t,e)=>t.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function Bn(t,e){return e||!1!==t?!0===t?{}:t:null}function Vn(t,e,i,n){const o=t.pluginScopeKeys(e),s=t.getOptionScopes(i,o);return t.createResolver(s,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Wn(t,e){const i=xt.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function Nn(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function Hn(t){const e=t.options||(t.options={});e.plugins=K(e.plugins,{}),e.scales=function(t,e){const i=ft[t.type]||{scales:{}},n=e.scales||{},o=Wn(t.type,e),s=Object.create(null),a=Object.create(null);return Object.keys(n).forEach((t=>{const e=n[t];if(!U(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const r=Nn(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(r,o),c=i.scales||{};s[r]=s[r]||t,a[t]=st(Object.create(null),[{axis:r},e,c[r],c[l]])})),t.data.datasets.forEach((i=>{const o=i.type||t.type,r=i.indexAxis||Wn(o,e),l=(ft[o]||{}).scales||{};Object.keys(l).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,r),o=i[e+"AxisID"]||s[e]||e;a[o]=a[o]||Object.create(null),st(a[o],[{axis:e},n[o],l[t]])}))})),Object.keys(a).forEach((t=>{const e=a[t];st(e,[xt.scales[e.type],xt.scale])})),a}(t,e)}function jn(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const $n=new Map,Yn=new Set;function Un(t,e){let i=$n.get(t);return i||(i=e(),$n.set(t,i),Yn.add(i)),i}const Xn=(t,e,i)=>{const n=lt(e,i);void 0!==n&&t.add(n)};class qn{constructor(t){this._config=function(t){return(t=t||{}).data=jn(t.data),Hn(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=jn(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Hn(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Un(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return Un(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return Un(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return Un(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:o}=this,s=this._cachedScopes(t,i),a=s.get(e);if(a)return a;const r=new Set;e.forEach((e=>{t&&(r.add(t),e.forEach((e=>Xn(r,t,e)))),e.forEach((t=>Xn(r,n,t))),e.forEach((t=>Xn(r,ft[o]||{},t))),e.forEach((t=>Xn(r,xt,t))),e.forEach((t=>Xn(r,gt,t)))}));const l=Array.from(r);return 0===l.length&&l.push(Object.create(null)),Yn.has(e)&&s.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,ft[e]||{},xt.datasets[e]||{},{type:e},xt,gt]}resolveNamedOptions(t,e,i,n=[""]){const o={$shared:!0},{resolver:s,subPrefixes:a}=Kn(this._resolverCache,t,n);let r=s;if(function(t,e){const{isScriptable:i,isIndexable:n}=ni(t);for(const o of e)if(i(o)&&dt(t[o])||n(o)&&Y(t[o]))return!0;return!1}(s,e)){o.$shared=!1;r=ii(s,i=dt(i)?i():i,this.createResolver(t,i,a))}for(const t of e)o[t]=r[t];return o}createResolver(t,e,i=[""],n){const{resolver:o}=Kn(this._resolverCache,t,i);return U(e)?ii(o,e,void 0,n):o}}function Kn(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const o=i.join();let s=n.get(o);if(!s){s={resolver:ei(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},n.set(o,s)}return s}const Gn=["top","bottom","left","right","chartArea"];function Zn(t,e){return"top"===t||"bottom"===t||-1===Gn.indexOf(t)&&"x"===e}function Qn(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function Jn(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),Q(i&&i.onComplete,[t],e)}function to(t){const e=t.chart,i=e.options.animation;Q(i&&i.onProgress,[t],e)}function eo(t){return ue()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const io={},no=t=>{const e=eo(t);return Object.values(io).filter((t=>t.canvas===e)).pop()};class oo{constructor(t,e){const n=this,o=this.config=new qn(e),s=eo(t),r=no(s);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas can be reused.");const l=o.createResolver(o.chartOptionScopes(),n.getContext());this.platform=new(o.platform||on(s));const c=n.platform.acquireContext(s,l.aspectRatio),h=c&&c.canvas,d=h&&h.height,u=h&&h.width;this.id=j(),this.ctx=c,this.canvas=h,this.width=u,this.height=d,this._options=l,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Fn,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=i((t=>this.update(t)),l.resizeDelay||0),io[n.id]=n,c&&h?(a.listen(n,"complete",Jn),a.listen(n,"progress",to),n._initialize(),n.attached&&n.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:o}=this;return $(t)?e&&o?o:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){const t=this;return t.notifyPlugins("beforeInit"),t.options.responsive?t.resize():we(t,t.options.devicePixelRatio),t.bindEvents(),t.notifyPlugins("afterInit"),t}clear(){return qt(this.canvas,this.ctx),this}stop(){return a.stop(this),this}resize(t,e){a.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this,n=i.options,o=i.canvas,s=n.maintainAspectRatio&&i.aspectRatio,a=i.platform.getMaximumSize(o,t,e,s),r=n.devicePixelRatio||i.platform.getDevicePixelRatio(),l=i.width?"resize":"attach";i.width=a.width,i.height=a.height,i._aspectRatio=i.aspectRatio,we(i,r,!0)&&(i.notifyPlugins("resize",{size:a}),Q(n.onResize,[i,a],i),i.attached&&i._doResize(l)&&i.render())}ensureScalesHaveIDs(){J(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this,e=t.options,i=e.scales,n=t.scales,o=Object.keys(n).reduce(((t,e)=>(t[e]=!1,t)),{});let s=[];i&&(s=s.concat(Object.keys(i).map((t=>{const e=i[t],n=Nn(t,e),o="r"===n,s="x"===n;return{options:e,dposition:o?"chartArea":s?"bottom":"left",dtype:o?"radialLinear":s?"category":"linear"}})))),J(s,(i=>{const s=i.options,a=s.id,r=Nn(a,s),l=K(s.type,i.dtype);void 0!==s.position&&Zn(s.position,r)===Zn(i.dposition)||(s.position=i.dposition),o[a]=!0;let c=null;if(a in n&&n[a].type===l)c=n[a];else{c=new(zn.getScale(l))({id:a,type:l,ctx:t.ctx,chart:t}),n[c.id]=c}c.init(s,e)})),J(o,((t,e)=>{t||delete n[e]})),J(n,(e=>{ti.configure(t,e,e.options),ti.addBox(t,e)}))}_updateMetasets(){const t=this,e=t._metasets,i=t.data.datasets.length,n=e.length;if(e.sort(((t,e)=>t.index-e.index)),n>i){for(let e=i;e<n;++e)t._destroyDatasetMeta(e);e.splice(i,n-i)}t._sortedMetasets=e.slice(0).sort(Qn("order","index"))}_removeUnreferencedMetasets(){const t=this,{_metasets:e,data:{datasets:i}}=t;e.length>i.length&&delete t._stacks,e.forEach(((e,n)=>{0===i.filter((t=>t===e._dataset)).length&&t._destroyDatasetMeta(n)}))}buildOrUpdateControllers(){const t=this,e=[],i=t.data.datasets;let n,o;for(t._removeUnreferencedMetasets(),n=0,o=i.length;n<o;n++){const o=i[n];let s=t.getDatasetMeta(n);const a=o.type||t.config.type;if(s.type&&s.type!==a&&(t._destroyDatasetMeta(n),s=t.getDatasetMeta(n)),s.type=a,s.indexAxis=o.indexAxis||Wn(a,t.options),s.order=o.order||0,s.index=n,s.label=""+o.label,s.visible=t.isDatasetVisible(n),s.controller)s.controller.updateIndex(n),s.controller.linkScales();else{const i=zn.getController(a),{datasetElementType:o,dataElementType:r}=xt.datasets[a];Object.assign(i.prototype,{dataElementType:zn.getElement(r),datasetElementType:o&&zn.getElement(o)}),s.controller=new i(t,n),e.push(s.controller)}}return t._updateMetasets(),e}_resetElements(){const t=this;J(t.data.datasets,((e,i)=>{t.getDatasetMeta(i).controller.reset()}),t)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this,i=e.config;i.update(),e._options=i.createResolver(i.chartOptionScopes(),e.getContext()),J(e.scales,(t=>{ti.removeBox(e,t)}));const n=e._animationsDisabled=!e.options.animation;e.ensureScalesHaveIDs(),e.buildOrUpdateScales();const o=new Set(Object.keys(e._listeners)),s=new Set(e.options.events);if(ut(o,s)&&!!this._responsiveListeners===e.options.responsive||(e.unbindEvents(),e.bindEvents()),e._plugins.invalidate(),!1===e.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const a=e.buildOrUpdateControllers();e.notifyPlugins("beforeElementsUpdate");let r=0;for(let t=0,i=e.data.datasets.length;t<i;t++){const{controller:i}=e.getDatasetMeta(t),o=!n&&-1===a.indexOf(i);i.buildOrUpdateElements(o),r=Math.max(+i.getMaxOverflow(),r)}e._minPadding=r,e._updateLayout(r),n||J(a,(t=>{t.reset()})),e._updateDatasets(t),e.notifyPlugins("afterUpdate",{mode:t}),e._layers.sort(Qn("z","_idx")),e._lastEvent&&e._eventHandler(e._lastEvent,!0),e.render()}_updateLayout(t){const e=this;if(!1===e.notifyPlugins("beforeLayout",{cancelable:!0}))return;ti.update(e,e.width,e.height,t);const i=e.chartArea,n=i.width<=0||i.height<=0;e._layers=[],J(e.boxes,(t=>{n&&"chartArea"===t.position||(t.configure&&t.configure(),e._layers.push(...t._layers()))}),e),e._layers.forEach(((t,e)=>{t._idx=e})),e.notifyPlugins("afterLayout")}_updateDatasets(t){const e=this,i="function"==typeof t;if(!1!==e.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let n=0,o=e.data.datasets.length;n<o;++n)e._updateDataset(n,i?t({datasetIndex:n}):t);e.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this,n=i.getDatasetMeta(t),o={meta:n,index:t,mode:e,cancelable:!0};!1!==i.notifyPlugins("beforeDatasetUpdate",o)&&(n.controller._update(e),o.cancelable=!1,i.notifyPlugins("afterDatasetUpdate",o))}render(){const t=this;!1!==t.notifyPlugins("beforeRender",{cancelable:!0})&&(a.has(t)?t.attached&&!a.running(t)&&a.start(t):(t.draw(),Jn({chart:t})))}draw(){const t=this;let e;if(t._resizeBeforeDraw){const{width:e,height:i}=t._resizeBeforeDraw;t._resize(e,i),t._resizeBeforeDraw=null}if(t.clear(),t.width<=0||t.height<=0)return;if(!1===t.notifyPlugins("beforeDraw",{cancelable:!0}))return;const i=t._layers;for(e=0;e<i.length&&i[e].z<=0;++e)i[e].draw(t.chartArea);for(t._drawDatasets();e<i.length;++e)i[e].draw(t.chartArea);t.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let n,o;for(n=0,o=e.length;n<o;++n){const o=e[n];t&&!o.visible||i.push(o)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){const t=this;if(!1===t.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const e=t.getSortedVisibleDatasetMetas();for(let i=e.length-1;i>=0;--i)t._drawDataset(e[i]);t.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this,i=e.ctx,n=t._clip,o=!n.disabled,s=e.chartArea,a={meta:t,index:t.index,cancelable:!0};!1!==e.notifyPlugins("beforeDatasetDraw",a)&&(o&&Zt(i,{left:!1===n.left?0:s.left-n.left,right:!1===n.right?e.width:s.right+n.right,top:!1===n.top?0:s.top-n.top,bottom:!1===n.bottom?e.height:s.bottom+n.bottom}),t.controller.draw(),o&&Qt(i),a.cancelable=!1,e.notifyPlugins("afterDatasetDraw",a))}getElementsAtEventForMode(t,e,i,n){const o=Ae.modes[e];return"function"==typeof o?o(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter((t=>t&&t._dataset===e)).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context={chart:this,type:"chart"})}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=this,o=i?"show":"hide",s=n.getDatasetMeta(t),a=s.controller._resolveAnimations(void 0,o);ht(e)?(s.data[e].hidden=!i,n.update()):(n.setDatasetVisibility(t,i),a.update(s,{visible:i}),n.update((e=>e.datasetIndex===t?o:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this,i=e._metasets&&e._metasets[t];i&&i.controller&&(i.controller._destroy(),delete e._metasets[t])}_stop(){const t=this;let e,i;for(t.stop(),a.remove(t),e=0,i=t.data.datasets.length;e<i;++e)t._destroyDatasetMeta(e)}destroy(){const t=this,{canvas:e,ctx:i}=t;t._stop(),t.config.clearCache(),e&&(t.unbindEvents(),qt(e,i),t.platform.releaseContext(i),t.canvas=null,t.ctx=null),t.notifyPlugins("destroy"),delete io[t.id]}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this,e=t._listeners,i=t.platform,n=function(e,i,n){e.offsetX=i,e.offsetY=n,t._eventHandler(e)};J(t.options.events,(o=>((n,o)=>{i.addEventListener(t,n,o),e[n]=o})(o,n)))}bindResponsiveEvents(){const t=this;t._responsiveListeners||(t._responsiveListeners={});const e=t._responsiveListeners,i=t.platform,n=(n,o)=>{i.addEventListener(t,n,o),e[n]=o},o=(n,o)=>{e[n]&&(i.removeEventListener(t,n,o),delete e[n])},s=(e,i)=>{t.canvas&&t.resize(e,i)};let a;const r=()=>{o("attach",r),t.attached=!0,t.resize(),n("resize",s),n("detach",a)};a=()=>{t.attached=!1,o("resize",s),t._stop(),t._resize(0,0),n("attach",r)},i.isAttached(t.canvas)?r():a()}unbindEvents(){const t=this;J(t._listeners,((e,i)=>{t.platform.removeEventListener(t,i,e)})),t._listeners={},J(t._responsiveListeners,((e,i)=>{t.platform.removeEventListener(t,i,e)})),t._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let o,s,a,r;for("dataset"===e&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),a=0,r=t.length;a<r;++a){s=t[a];const e=s&&this.getDatasetMeta(s.datasetIndex).controller;e&&e[n+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this,i=e._active||[],n=t.map((({datasetIndex:t,index:i})=>{const n=e.getDatasetMeta(t);if(!n)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:n.data[i],index:i}}));!tt(n,i)&&(e._active=n,e._updateHoverStyles(n,i))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const n=this,o=n.options.hover,s=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),a=s(e,t),r=i?t:s(t,e);a.length&&n.updateHoverStyle(a,o.mode,!1),r.length&&o.mode&&n.updateHoverStyle(r,o.mode,!0)}_eventHandler(t,e){const i=this,n={event:t,replay:e,cancelable:!0},o=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===i.notifyPlugins("beforeEvent",n,o))return;const s=i._handleEvent(t,e);return n.cancelable=!1,i.notifyPlugins("afterEvent",n,o),(s||n.changed)&&i.render(),i}_handleEvent(t,e){const i=this,{_active:n=[],options:o}=i,s=o.hover,a=e;let r=[],l=!1,c=null;return"mouseout"!==t.type&&(r=i.getElementsAtEventForMode(t,s.mode,s,a),c="click"===t.type?i._lastEvent:t),i._lastEvent=null,Gt(t,i.chartArea,i._minPadding)&&(Q(o.onHover,[t,r,i],i),"mouseup"!==t.type&&"click"!==t.type&&"contextmenu"!==t.type||Q(o.onClick,[t,r,i],i)),l=!tt(r,n),(l||e)&&(i._active=r,i._updateHoverStyles(r,n,e)),i._lastEvent=c,l}}const so=()=>J(oo.instances,(t=>t._plugins.invalidate())),ao=!0;function ro(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}Object.defineProperties(oo,{defaults:{enumerable:ao,value:xt},instances:{enumerable:ao,value:io},overrides:{enumerable:ao,value:ft},registry:{enumerable:ao,value:zn},version:{enumerable:ao,value:"3.5.1"},getChart:{enumerable:ao,value:no},register:{enumerable:ao,value:(...t)=>{zn.add(...t),so()}},unregister:{enumerable:ao,value:(...t)=>{zn.remove(...t),so()}}});class lo{constructor(t){this.options=t||{}}formats(){return ro()}parse(t,e){return ro()}format(t,e){return ro()}add(t,e,i){return ro()}diff(t,e,i){return ro()}startOf(t,e,i){return ro()}endOf(t,e){return ro()}}lo.override=function(t){Object.assign(lo.prototype,t)};var co={_date:lo};function ho(t){const e=t.iScale,i=function(t,e){if(!t._cache.$bar){const i=t.getMatchingVisibleMetas(e);let n=[];for(let e=0,o=i.length;e<o;e++)n=n.concat(i[e].controller.getAllParsedValues(t));t._cache.$bar=de(n.sort(((t,e)=>t-e)))}return t._cache.$bar}(e,t.type);let n,o,s,a,r=e._length;const l=()=>{32767!==s&&-32768!==s&&(ht(a)&&(r=Math.min(r,Math.abs(s-a)||r)),a=s)};for(n=0,o=i.length;n<o;++n)s=e.getPixelForValue(i[n]),l();for(a=void 0,n=0,o=e.ticks.length;n<o;++n)s=e.getPixelForTick(n),l();return r}function uo(t,e,i,n){return Y(t)?function(t,e,i,n){const o=i.parse(t[0],n),s=i.parse(t[1],n),a=Math.min(o,s),r=Math.max(o,s);let l=a,c=r;Math.abs(a)>Math.abs(r)&&(l=r,c=a),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:o,end:s,min:a,max:r}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function fo(t,e,i,n){const o=t.iScale,s=t.vScale,a=o.getLabels(),r=o===s,l=[];let c,h,d,u;for(c=i,h=i+n;c<h;++c)u=e[c],d={},d[o.axis]=r||o.parse(a[c],c),l.push(uo(u,d,s,c));return l}function go(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function po(t,e,i,n){let o=e.borderSkipped;const s={};if(!o)return void(t.borderSkipped=s);const{start:a,end:r,reverse:l,top:c,bottom:h}=function(t){let e,i,n,o,s;return t.horizontal?(e=t.base>t.x,i="left",n="right"):(e=t.base<t.y,i="bottom",n="top"),e?(o="end",s="start"):(o="start",s="end"),{start:i,end:n,reverse:e,top:o,bottom:s}}(t);"middle"===o&&i&&(t.enableBorderRadius=!0,(i._top||0)===n?o=c:(i._bottom||0)===n?o=h:(s[mo(h,a,r,l)]=!0,o=c)),s[mo(o,a,r,l)]=!0,t.borderSkipped=s}function mo(t,e,i,n){var o,s,a;return n?(a=i,t=xo(t=(o=t)===(s=e)?a:o===a?s:o,i,e)):t=xo(t,e,i),t}function xo(t,e,i){return"start"===t?e:"end"===t?i:t}class bo extends wn{parsePrimitiveData(t,e,i,n){return fo(t,e,i,n)}parseArrayData(t,e,i,n){return fo(t,e,i,n)}parseObjectData(t,e,i,n){const{iScale:o,vScale:s}=t,{xAxisKey:a="x",yAxisKey:r="y"}=this._parsing,l="x"===o.axis?a:r,c="x"===s.axis?a:r,h=[];let d,u,f,g;for(d=i,u=i+n;d<u;++d)g=e[d],f={},f[o.axis]=o.parse(lt(g,l),d),h.push(uo(lt(g,c),f,s,d));return h}updateRangeFromParsed(t,e,i,n){super.updateRangeFromParsed(t,e,i,n);const o=i._custom;o&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:n}=e,o=this.getParsed(t),s=o._custom,a=go(s)?"["+s.start+", "+s.end+"]":""+n.getLabelForValue(o[n.axis]);return{label:""+i.getLabelForValue(o[i.axis]),value:a}}initialize(){const t=this;t.enableOptionSharing=!0,super.initialize();t._cachedMeta.stack=t.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,n){const o=this,s="reset"===n,{index:a,_cachedMeta:{vScale:r}}=o,l=r.getBasePixel(),c=r.isHorizontal(),h=o._getRuler(),d=o.resolveDataElementOptions(e,n),u=o.getSharedOptions(d),f=o.includeOptions(n,u);o.updateSharedOptions(u,n,d);for(let d=e;d<e+i;d++){const e=o.getParsed(d),i=s||$(e[r.axis])?{base:l,head:l}:o._calculateBarValuePixels(d),g=o._calculateBarIndexPixels(d,h),p=(e._stacks||{})[r.axis],m={horizontal:c,base:i.base,enableBorderRadius:!p||go(e._custom)||a===p._top||a===p._bottom,x:c?i.head:g.center,y:c?g.center:i.head,height:c?g.size:Math.abs(i.size),width:c?Math.abs(i.size):g.size};f&&(m.options=u||o.resolveDataElementOptions(d,t[d].active?"active":n)),po(m,m.options||t[d].options,p,a),o.updateElement(t[d],d,m,n)}}_getStacks(t,e){const i=this._cachedMeta.iScale,n=i.getMatchingVisibleMetas(this._type),o=i.options.stacked,s=n.length,a=[];let r,l;for(r=0;r<s;++r)if(l=n[r],l.controller.options.grouped){if(void 0!==e){const t=l.controller.getParsed(e)[l.controller._cachedMeta.vScale.axis];if($(t)||isNaN(t))continue}if((!1===o||-1===a.indexOf(l.stack)||void 0===o&&void 0===l.stack)&&a.push(l.stack),l.index===t)break}return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const n=this._getStacks(t,i),o=void 0!==e?n.indexOf(e):-1;return-1===o?n.length-1:o}_getRuler(){const t=this,e=t.options,i=t._cachedMeta,n=i.iScale,o=[];let s,a;for(s=0,a=i.data.length;s<a;++s)o.push(n.getPixelForValue(t.getParsed(s)[n.axis],s));const r=e.barThickness;return{min:r||ho(i),pixels:o,start:n._startPixel,end:n._endPixel,stackCount:t._getStackCount(),scale:n,grouped:e.grouped,ratio:r?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(t){const e=this,{_cachedMeta:{vScale:i,_stacked:n},options:{base:o,minBarLength:s}}=e,a=o||0,r=e.getParsed(t),l=r._custom,c=go(l);let h,d,u=r[i.axis],f=0,g=n?e.applyStack(i,r,n):u;g!==u&&(f=g-u,g=u),c&&(u=l.barStart,g=l.barEnd-l.barStart,0!==u&&Dt(u)!==Dt(l.barEnd)&&(f=0),f+=u);const p=$(o)||c?f:o;let m=i.getPixelForValue(p);if(h=e.chart.getDataVisibility(t)?i.getPixelForValue(f+g):m,d=h-m,Math.abs(d)<s&&(d=function(t,e,i){return 0!==t?Dt(t):(e.isHorizontal()?1:-1)*(e.min>=i?1:-1)}(d,i,a)*s,u===a&&(m-=d/2),h=m+d),m===i.getPixelForValue(a)){const t=Dt(d)*i.getLineWidthForValue(a)/2;m+=t,d-=t}return{size:d,base:m,head:h,center:h+d/2}}_calculateBarIndexPixels(t,e){const i=this,n=e.scale,o=i.options,s=o.skipNull,a=K(o.maxBarThickness,1/0);let r,l;if(e.grouped){const n=s?i._getStackCount(t):e.stackCount,c="flex"===o.barThickness?function(t,e,i,n){const o=e.pixels,s=o[t];let a=t>0?o[t-1]:null,r=t<o.length-1?o[t+1]:null;const l=i.categoryPercentage;null===a&&(a=s-(null===r?e.end-e.start:r-s)),null===r&&(r=s+s-a);const c=s-(s-Math.min(a,r))/2*l;return{chunk:Math.abs(r-a)/2*l/n,ratio:i.barPercentage,start:c}}(t,e,o,n):function(t,e,i,n){const o=i.barThickness;let s,a;return $(o)?(s=e.min*i.categoryPercentage,a=i.barPercentage):(s=o*n,a=1),{chunk:s/n,ratio:a,start:e.pixels[t]-s/2}}(t,e,o,n),h=i._getStackIndex(i.index,i._cachedMeta.stack,s?t:void 0);r=c.start+c.chunk*h+c.chunk/2,l=Math.min(a,c.chunk*c.ratio)}else r=n.getPixelForValue(i.getParsed(t)[n.axis],t),l=Math.min(a,e.min*e.ratio);return{base:r-l/2,head:r+l/2,center:r,size:l}}draw(){const t=this,e=t._cachedMeta,i=e.vScale,n=e.data,o=n.length;let s=0;for(;s<o;++s)null!==t.getParsed(s)[i.axis]&&n[s].draw(t._ctx)}}bo.id="bar",bo.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},bo.overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class _o extends wn{initialize(){this.enableOptionSharing=!0,super.initialize()}parseObjectData(t,e,i,n){const{xScale:o,yScale:s}=t,{xAxisKey:a="x",yAxisKey:r="y"}=this._parsing,l=[];let c,h,d;for(c=i,h=i+n;c<h;++c)d=e[c],l.push({x:o.parse(lt(d,a),c),y:s.parse(lt(d,r),c),_custom:d&&d.r&&+d.r});return l}getMaxOverflow(){const{data:t,_parsed:e}=this._cachedMeta;let i=0;for(let n=t.length-1;n>=0;--n)i=Math.max(i,t[n].size()/2,e[n]._custom);return i>0&&i}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:n}=e,o=this.getParsed(t),s=i.getLabelForValue(o.x),a=n.getLabelForValue(o.y),r=o._custom;return{label:e.label,value:"("+s+", "+a+(r?", "+r:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const o=this,s="reset"===n,{iScale:a,vScale:r}=o._cachedMeta,l=o.resolveDataElementOptions(e,n),c=o.getSharedOptions(l),h=o.includeOptions(n,c),d=a.axis,u=r.axis;for(let l=e;l<e+i;l++){const e=t[l],i=!s&&o.getParsed(l),c={},f=c[d]=s?a.getPixelForDecimal(.5):a.getPixelForValue(i[d]),g=c[u]=s?r.getBasePixel():r.getPixelForValue(i[u]);c.skip=isNaN(f)||isNaN(g),h&&(c.options=o.resolveDataElementOptions(l,e.active?"active":n),s&&(c.options.radius=0)),o.updateElement(e,l,c,n)}o.updateSharedOptions(c,n,l)}resolveDataElementOptions(t,e){const i=this.getParsed(t);let n=super.resolveDataElementOptions(t,e);n.$shared&&(n=Object.assign({},n,{$shared:!1}));const o=n.radius;return"active"!==e&&(n.radius=0),n.radius+=K(i&&i._custom,o),n}}_o.id="bubble",_o.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}},_o.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title:()=>""}}}};class yo extends wn{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let o,s,a=t=>+i[t];if(U(i[t])){const{key:t="value"}=this._parsing;a=e=>+lt(i[e],t)}for(o=t,s=t+e;o<s;++o)n._parsed[o]=a(o)}}_getRotation(){return Et(this.options.rotation-90)}_getCircumference(){return Et(this.options.circumference)}_getRotationExtents(){let t=_t,e=-_t;const i=this;for(let n=0;n<i.chart.data.datasets.length;++n)if(i.chart.isDatasetVisible(n)){const o=i.chart.getDatasetMeta(n).controller,s=o._getRotation(),a=o._getCircumference();t=Math.min(t,s),e=Math.max(e,s+a)}return{rotation:t,circumference:e-t}}update(t){const e=this,i=e.chart,{chartArea:n}=i,o=e._cachedMeta,s=o.data,a=e.getMaxBorderWidth()+e.getMaxOffset(s)+e.options.spacing,r=Math.max((Math.min(n.width,n.height)-a)/2,0),l=Math.min(G(e.options.cutout,r),1),c=e._getRingWeight(e.index),{circumference:h,rotation:d}=e._getRotationExtents(),{ratioX:u,ratioY:f,offsetX:g,offsetY:p}=function(t,e,i){let n=1,o=1,s=0,a=0;if(e<_t){const r=t,l=r+e,c=Math.cos(r),h=Math.sin(r),d=Math.cos(l),u=Math.sin(l),f=(t,e,n)=>Nt(t,r,l,!0)?1:Math.max(e,e*i,n,n*i),g=(t,e,n)=>Nt(t,r,l,!0)?-1:Math.min(e,e*i,n,n*i),p=f(0,c,d),m=f(Mt,h,u),x=g(bt,c,d),b=g(bt+Mt,h,u);n=(p-x)/2,o=(m-b)/2,s=-(p+x)/2,a=-(m+b)/2}return{ratioX:n,ratioY:o,offsetX:s,offsetY:a}}(d,h,l),m=(n.width-a)/u,x=(n.height-a)/f,b=Math.max(Math.min(m,x)/2,0),_=Z(e.options.radius,b),y=(_-Math.max(_*l,0))/e._getVisibleDatasetWeightTotal();e.offsetX=g*_,e.offsetY=p*_,o.total=e.calculateTotal(),e.outerRadius=_-y*e._getRingWeightOffset(e.index),e.innerRadius=Math.max(e.outerRadius-y*c,0),e.updateElements(s,0,s.length,t)}_circumference(t,e){const i=this,n=i.options,o=i._cachedMeta,s=i._getCircumference();return e&&n.animation.animateRotate||!this.chart.getDataVisibility(t)||null===o._parsed[t]||o.data[t].hidden?0:i.calculateCircumference(o._parsed[t]*s/_t)}updateElements(t,e,i,n){const o=this,s="reset"===n,a=o.chart,r=a.chartArea,l=a.options.animation,c=(r.left+r.right)/2,h=(r.top+r.bottom)/2,d=s&&l.animateScale,u=d?0:o.innerRadius,f=d?0:o.outerRadius,g=o.resolveDataElementOptions(e,n),p=o.getSharedOptions(g),m=o.includeOptions(n,p);let x,b=o._getRotation();for(x=0;x<e;++x)b+=o._circumference(x,s);for(x=e;x<e+i;++x){const e=o._circumference(x,s),i=t[x],a={x:c+o.offsetX,y:h+o.offsetY,startAngle:b,endAngle:b+e,circumference:e,outerRadius:f,innerRadius:u};m&&(a.options=p||o.resolveDataElementOptions(x,i.active?"active":n)),b+=e,o.updateElement(i,x,a,n)}o.updateSharedOptions(p,n,g)}calculateTotal(){const t=this._cachedMeta,e=t.data;let i,n=0;for(i=0;i<e.length;i++){const o=t._parsed[i];null===o||isNaN(o)||!this.chart.getDataVisibility(i)||e[i].hidden||(n+=Math.abs(o))}return n}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?_t*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],o=Oi(e._parsed[t],i.options.locale);return{label:n[t]||"",value:o}}getMaxBorderWidth(t){const e=this;let i=0;const n=e.chart;let o,s,a,r,l;if(!t)for(o=0,s=n.data.datasets.length;o<s;++o)if(n.isDatasetVisible(o)){a=n.getDatasetMeta(o),t=a.data,r=a.controller,r!==e&&r.configure();break}if(!t)return 0;for(o=0,s=t.length;o<s;++o)l=r.resolveDataElementOptions(o),"inner"!==l.borderAlign&&(i=Math.max(i,l.borderWidth||0,l.hoverBorderWidth||0));return i}getMaxOffset(t){let e=0;for(let i=0,n=t.length;i<n;++i){const t=this.resolveDataElementOptions(i);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(K(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}yo.id="doughnut",yo.defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"},yo.descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t},yo.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const o=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return Y(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class vo extends wn{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){const e=this,i=e._cachedMeta,{dataset:n,data:o=[],_dataset:s}=i,a=e.chart._animationsDisabled;let{start:r,count:l}=function(t,e,i){const n=e.length;let o=0,s=n;if(t._sorted){const{iScale:a,_parsed:r}=t,l=a.axis,{min:c,max:h,minDefined:d,maxDefined:u}=a.getUserBounds();d&&(o=Ht(Math.min(se(r,a.axis,c).lo,i?n:se(e,l,a.getPixelForValue(c)).lo),0,n-1)),s=u?Ht(Math.max(se(r,a.axis,h).hi+1,i?0:se(e,l,a.getPixelForValue(h)).hi+1),o,n)-o:n-o}return{start:o,count:s}}(i,o,a);e._drawStart=r,e._drawCount=l,function(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,o={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=o,!0;const s=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,o),s}(i)&&(r=0,l=o.length),n._datasetIndex=e.index,n._decimated=!!s._decimated,n.points=o;const c=e.resolveDatasetElementOptions(t);e.options.showLine||(c.borderWidth=0),c.segment=e.options.segment,e.updateElement(n,void 0,{animated:!a,options:c},t),e.updateElements(o,r,l,t)}updateElements(t,e,i,n){const o=this,s="reset"===n,{iScale:a,vScale:r,_stacked:l}=o._cachedMeta,c=o.resolveDataElementOptions(e,n),h=o.getSharedOptions(c),d=o.includeOptions(n,h),u=a.axis,f=r.axis,g=o.options.spanGaps,p=Tt(g)?g:Number.POSITIVE_INFINITY,m=o.chart._animationsDisabled||s||"none"===n;let x=e>0&&o.getParsed(e-1);for(let c=e;c<e+i;++c){const e=t[c],i=o.getParsed(c),g=m?e:{},b=$(i[f]),_=g[u]=a.getPixelForValue(i[u],c),y=g[f]=s||b?r.getBasePixel():r.getPixelForValue(l?o.applyStack(r,i,l):i[f],c);g.skip=isNaN(_)||isNaN(y)||b,g.stop=c>0&&i[u]-x[u]>p,g.parsed=i,d&&(g.options=h||o.resolveDataElementOptions(c,e.active?"active":n)),m||o.updateElement(e,c,g,n),x=i}o.updateSharedOptions(h,n,c)}getMaxOverflow(){const t=this,e=t._cachedMeta,i=e.dataset,n=i.options&&i.options.borderWidth||0,o=e.data||[];if(!o.length)return n;const s=o[0].size(t.resolveDataElementOptions(0)),a=o[o.length-1].size(t.resolveDataElementOptions(o.length-1));return Math.max(n,s,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}vo.id="line",vo.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},vo.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class wo extends wn{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],o=Oi(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:o}}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}_updateRadius(){const t=this,e=t.chart,i=e.chartArea,n=e.options,o=Math.min(i.right-i.left,i.bottom-i.top),s=Math.max(o/2,0),a=(s-Math.max(n.cutoutPercentage?s/100*n.cutoutPercentage:1,0))/e.getVisibleDatasetCount();t.outerRadius=s-a*t.index,t.innerRadius=t.outerRadius-a}updateElements(t,e,i,n){const o=this,s="reset"===n,a=o.chart,r=o.getDataset(),l=a.options.animation,c=o._cachedMeta.rScale,h=c.xCenter,d=c.yCenter,u=c.getIndexAngle(0)-.5*bt;let f,g=u;const p=360/o.countVisibleElements();for(f=0;f<e;++f)g+=o._computeAngle(f,n,p);for(f=e;f<e+i;f++){const e=t[f];let i=g,m=g+o._computeAngle(f,n,p),x=a.getDataVisibility(f)?c.getDistanceFromCenterForValue(r.data[f]):0;g=m,s&&(l.animateScale&&(x=0),l.animateRotate&&(i=m=u));const b={x:h,y:d,innerRadius:0,outerRadius:x,startAngle:i,endAngle:m,options:o.resolveDataElementOptions(f,e.active?"active":n)};o.updateElement(e,f,b,n)}}countVisibleElements(){const t=this.getDataset(),e=this._cachedMeta;let i=0;return e.data.forEach(((e,n)=>{!isNaN(t.data[n])&&this.chart.getDataVisibility(n)&&i++})),i}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?Et(this.resolveDataElementOptions(t,e).angle||i):0}}wo.id="polarArea",wo.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},wo.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const o=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class Mo extends yo{}Mo.id="pie",Mo.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class ko extends wn{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}update(t){const e=this,i=e._cachedMeta,n=i.dataset,o=i.data||[],s=i.iScale.getLabels();if(n.points=o,"resize"!==t){const i=e.resolveDatasetElementOptions(t);e.options.showLine||(i.borderWidth=0);const a={_loop:!0,_fullLoop:s.length===o.length,options:i};e.updateElement(n,void 0,a,t)}e.updateElements(o,0,o.length,t)}updateElements(t,e,i,n){const o=this,s=o.getDataset(),a=o._cachedMeta.rScale,r="reset"===n;for(let l=e;l<e+i;l++){const e=t[l],i=o.resolveDataElementOptions(l,e.active?"active":n),c=a.getPointPositionForValue(l,s.data[l]),h=r?a.xCenter:c.x,d=r?a.yCenter:c.y,u={x:h,y:d,angle:c.angle,skip:isNaN(h)||isNaN(d),options:i};o.updateElement(e,l,u,n)}}}ko.id="radar",ko.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}},ko.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class So extends vo{}So.id="scatter",So.defaults={showLine:!1,fill:!1},So.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title:()=>"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var Po=Object.freeze({__proto__:null,BarController:bo,BubbleController:_o,DoughnutController:yo,LineController:vo,PolarAreaController:wo,PieController:Mo,RadarController:ko,ScatterController:So});function Do(t,e,i){const{startAngle:n,pixelMargin:o,x:s,y:a,outerRadius:r,innerRadius:l}=e;let c=o/r;t.beginPath(),t.arc(s,a,r,n-c,i+c),l>o?(c=o/l,t.arc(s,a,l,i+c,n-c,!0)):t.arc(s,a,o,i+Mt,n-Mt),t.closePath(),t.clip()}function Co(t,e,i,n){const o=Ie(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const s=(i-e)/2,a=Math.min(s,n*e/2),r=t=>{const e=(i-Math.min(s,t))*n/2;return Ht(t,0,Math.min(s,e))};return{outerStart:r(o.outerStart),outerEnd:r(o.outerEnd),innerStart:Ht(o.innerStart,0,a),innerEnd:Ht(o.innerEnd,0,a)}}function Oo(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function To(t,e,i,n,o){const{x:s,y:a,startAngle:r,pixelMargin:l,innerRadius:c}=e,h=Math.max(e.outerRadius+n+i-l,0),d=c>0?c+n+i+l:0;let u=0;const f=o-r;if(n){const t=((c>0?c-n:0)+(h>0?h-n:0))/2;u=(f-(0!==t?f*t/(t+n):f))/2}const g=(f-Math.max(.001,f*h-i/bt)/h)/2,p=r+g+u,m=o-g-u,{outerStart:x,outerEnd:b,innerStart:_,innerEnd:y}=Co(e,d,h,m-p),v=h-x,w=h-b,M=p+x/v,k=m-b/w,S=d+_,P=d+y,D=p+_/S,C=m-y/P;if(t.beginPath(),t.arc(s,a,h,M,k),b>0){const e=Oo(w,k,s,a);t.arc(e.x,e.y,b,k,m+Mt)}const O=Oo(P,m,s,a);if(t.lineTo(O.x,O.y),y>0){const e=Oo(P,C,s,a);t.arc(e.x,e.y,y,m+Mt,C+Math.PI)}if(t.arc(s,a,d,m-y/d,p+_/d,!0),_>0){const e=Oo(S,D,s,a);t.arc(e.x,e.y,_,D+Math.PI,p-Mt)}const T=Oo(v,p,s,a);if(t.lineTo(T.x,T.y),x>0){const e=Oo(v,M,s,a);t.arc(e.x,e.y,x,p-Mt,M)}t.closePath()}function Ao(t,e,i,n,o){const{options:s}=e,a="inner"===s.borderAlign;s.borderWidth&&(a?(t.lineWidth=2*s.borderWidth,t.lineJoin="round"):(t.lineWidth=s.borderWidth,t.lineJoin="bevel"),e.fullCircles&&function(t,e,i){const{x:n,y:o,startAngle:s,pixelMargin:a,fullCircles:r}=e,l=Math.max(e.outerRadius-a,0),c=e.innerRadius+a;let h;for(i&&Do(t,e,s+_t),t.beginPath(),t.arc(n,o,c,s+_t,s,!0),h=0;h<r;++h)t.stroke();for(t.beginPath(),t.arc(n,o,l,s,s+_t),h=0;h<r;++h)t.stroke()}(t,e,a),a&&Do(t,e,o),To(t,e,i,n,o),t.stroke())}class Lo extends Mn{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:o,distance:s}=Ft(n,{x:t,y:e}),{startAngle:a,endAngle:r,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),d=this.options.spacing/2;return(h>=_t||Nt(o,a,r))&&(s>=l+d&&s<=c+d)}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:o,innerRadius:s,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:r,spacing:l}=this.options,c=(n+o)/2,h=(s+a+l+r)/2;return{x:e+Math.cos(c)*h,y:i+Math.sin(c)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const e=this,{options:i,circumference:n}=e,o=(i.offset||0)/2,s=(i.spacing||0)/2;if(e.pixelMargin="inner"===i.borderAlign?.33:0,e.fullCircles=n>_t?Math.floor(n/_t):0,0===n||e.innerRadius<0||e.outerRadius<0)return;t.save();let a=0;if(o){a=o/2;const i=(e.startAngle+e.endAngle)/2;t.translate(Math.cos(i)*a,Math.sin(i)*a),e.circumference>=bt&&(a=o)}t.fillStyle=i.backgroundColor,t.strokeStyle=i.borderColor;const r=function(t,e,i,n){const{fullCircles:o,startAngle:s,circumference:a}=e;let r=e.endAngle;if(o){To(t,e,i,n,s+_t);for(let e=0;e<o;++e)t.fill();isNaN(a)||(r=s+a%_t,a%_t==0&&(r+=_t))}return To(t,e,i,n,r),t.fill(),r}(t,e,a,s);Ao(t,e,a,s,r),t.restore()}}function Ro(t,e,i=e){t.lineCap=K(i.borderCapStyle,e.borderCapStyle),t.setLineDash(K(i.borderDash,e.borderDash)),t.lineDashOffset=K(i.borderDashOffset,e.borderDashOffset),t.lineJoin=K(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=K(i.borderWidth,e.borderWidth),t.strokeStyle=K(i.borderColor,e.borderColor)}function Eo(t,e,i){t.lineTo(i.x,i.y)}function Io(t,e,i={}){const n=t.length,{start:o=0,end:s=n-1}=i,{start:a,end:r}=e,l=Math.max(o,a),c=Math.min(s,r),h=o<a&&s<a||o>r&&s>r;return{count:n,start:l,loop:e.loop,ilen:c<l&&!h?n+c-l:c-l}}function zo(t,e,i,n){const{points:o,options:s}=e,{count:a,start:r,loop:l,ilen:c}=Io(o,i,n),h=function(t){return t.stepped?Jt:t.tension||"monotone"===t.cubicInterpolationMode?te:Eo}(s);let d,u,f,{move:g=!0,reverse:p}=n||{};for(d=0;d<=c;++d)u=o[(r+(p?c-d:d))%a],u.skip||(g?(t.moveTo(u.x,u.y),g=!1):h(t,f,u,p,s.stepped),f=u);return l&&(u=o[(r+(p?c:0))%a],h(t,f,u,p,s.stepped)),!!l}function Fo(t,e,i,n){const o=e.points,{count:s,start:a,ilen:r}=Io(o,i,n),{move:l=!0,reverse:c}=n||{};let h,d,u,f,g,p,m=0,x=0;const b=t=>(a+(c?r-t:t))%s,_=()=>{f!==g&&(t.lineTo(m,g),t.lineTo(m,f),t.lineTo(m,p))};for(l&&(d=o[b(0)],t.moveTo(d.x,d.y)),h=0;h<=r;++h){if(d=o[b(h)],d.skip)continue;const e=d.x,i=d.y,n=0|e;n===u?(i<f?f=i:i>g&&(g=i),m=(x*m+e)/++x):(_(),t.lineTo(e,i),u=n,x=0,f=g=i),p=i}_()}function Bo(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?Fo:zo}Lo.id="arc",Lo.defaults={borderAlign:"center",borderColor:"#fff",borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0},Lo.defaultRoutes={backgroundColor:"backgroundColor"};const Vo="function"==typeof Path2D;function Wo(t,e,i,n){Vo&&1===e.segments.length?function(t,e,i,n){let o=e._path;o||(o=e._path=new Path2D,e.path(o,i,n)&&o.closePath()),Ro(t,e.options),t.stroke(o)}(t,e,i,n):function(t,e,i,n){const{segments:o,options:s}=e,a=Bo(e);for(const r of o)Ro(t,s,r.style),t.beginPath(),a(t,e,r,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}(t,e,i,n)}class No extends Mn{constructor(t){super(),this.animated=!0,this.options=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this,n=i.options;if((n.tension||"monotone"===n.cubicInterpolationMode)&&!n.stepped&&!i._pointsUpdated){const o=n.spanGaps?i._loop:i._fullLoop;yi(i._points,n,t,o,e),i._pointsUpdated=!0}}set points(t){const e=this;e._points=t,delete e._segments,delete e._path,e._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Fi(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this,n=i.options,o=t[e],s=i.points,a=zi(i,{property:e,start:o,end:o});if(!a.length)return;const r=[],l=function(t){return t.stepped?Pi:t.tension||"monotone"===t.cubicInterpolationMode?Di:Si}(n);let c,h;for(c=0,h=a.length;c<h;++c){const{start:i,end:h}=a[c],d=s[i],u=s[h];if(d===u){r.push(d);continue}const f=l(d,u,Math.abs((o-d[e])/(u[e]-d[e])),n.stepped);f[e]=t[e],r.push(f)}return 1===r.length?r[0]:r}pathSegment(t,e,i){return Bo(this)(t,this,e,i)}path(t,e,i){const n=this,o=n.segments,s=Bo(n);let a=n._loop;e=e||0,i=i||n.points.length-e;for(const r of o)a&=s(t,n,r,{start:e,end:e+i-1});return!!a}draw(t,e,i,n){const o=this,s=o.options||{};(o.points||[]).length&&s.borderWidth&&(t.save(),Wo(t,o,i,n),t.restore()),o.animated&&(o._pointsUpdated=!1,o._path=void 0)}}function Ho(t,e,i,n){const o=t.options,{[i]:s}=t.getProps([i],n);return Math.abs(e-s)<o.radius+o.hitRadius}No.id="line",No.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},No.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},No.descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};class jo extends Mn{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:o,y:s}=this.getProps(["x","y"],i);return Math.pow(t-o,2)+Math.pow(e-s,2)<Math.pow(n.hitRadius+n.radius,2)}inXRange(t,e){return Ho(this,t,"x",e)}inYRange(t,e){return Ho(this,t,"y",e)}getCenterPoint(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){let e=(t=t||this.options||{}).radius||0;e=Math.max(e,e&&t.hoverRadius||0);return 2*(e+(e&&t.borderWidth||0))}draw(t,e){const i=this,n=i.options;i.skip||n.radius<.1||!Gt(i,e,i.size(n)/2)||(t.strokeStyle=n.borderColor,t.lineWidth=n.borderWidth,t.fillStyle=n.backgroundColor,Kt(t,n,i.x,i.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function $o(t,e){const{x:i,y:n,base:o,width:s,height:a}=t.getProps(["x","y","base","width","height"],e);let r,l,c,h,d;return t.horizontal?(d=a/2,r=Math.min(i,o),l=Math.max(i,o),c=n-d,h=n+d):(d=s/2,r=i-d,l=i+d,c=Math.min(n,o),h=Math.max(n,o)),{left:r,top:c,right:l,bottom:h}}function Yo(t,e,i,n){return t?0:Ht(e,i,n)}function Uo(t){const e=$o(t),i=e.right-e.left,n=e.bottom-e.top,o=function(t,e,i){const n=t.options.borderWidth,o=t.borderSkipped,s=ze(n);return{t:Yo(o.top,s.top,0,i),r:Yo(o.right,s.right,0,e),b:Yo(o.bottom,s.bottom,0,i),l:Yo(o.left,s.left,0,e)}}(t,i/2,n/2),s=function(t,e,i){const{enableBorderRadius:n}=t.getProps(["enableBorderRadius"]),o=t.options.borderRadius,s=Fe(o),a=Math.min(e,i),r=t.borderSkipped,l=n||U(o);return{topLeft:Yo(!l||r.top||r.left,s.topLeft,0,a),topRight:Yo(!l||r.top||r.right,s.topRight,0,a),bottomLeft:Yo(!l||r.bottom||r.left,s.bottomLeft,0,a),bottomRight:Yo(!l||r.bottom||r.right,s.bottomRight,0,a)}}(t,i/2,n/2);return{outer:{x:e.left,y:e.top,w:i,h:n,radius:s},inner:{x:e.left+o.l,y:e.top+o.t,w:i-o.l-o.r,h:n-o.t-o.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(o.t,o.l)),topRight:Math.max(0,s.topRight-Math.max(o.t,o.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(o.b,o.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(o.b,o.r))}}}}function Xo(t,e,i,n){const o=null===e,s=null===i,a=t&&!(o&&s)&&$o(t,n);return a&&(o||e>=a.left&&e<=a.right)&&(s||i>=a.top&&i<=a.bottom)}function qo(t,e){t.rect(e.x,e.y,e.w,e.h)}function Ko(t,e,i={}){const n=t.x!==i.x?-e:0,o=t.y!==i.y?-e:0,s=(t.x+t.w!==i.x+i.w?e:0)-n,a=(t.y+t.h!==i.y+i.h?e:0)-o;return{x:t.x+n,y:t.y+o,w:t.w+s,h:t.h+a,radius:t.radius}}jo.id="point",jo.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},jo.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class Go extends Mn{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,t&&Object.assign(this,t)}draw(t){const e=this.options,{inner:i,outer:n}=Uo(this),o=(s=n.radius).topLeft||s.topRight||s.bottomLeft||s.bottomRight?ne:qo;var s;const a=.33;t.save(),n.w===i.w&&n.h===i.h||(t.beginPath(),o(t,Ko(n,a,i)),t.clip(),o(t,Ko(i,-.33,n)),t.fillStyle=e.borderColor,t.fill("evenodd")),t.beginPath(),o(t,Ko(i,a,n)),t.fillStyle=e.backgroundColor,t.fill(),t.restore()}inRange(t,e,i){return Xo(this,t,e,i)}inXRange(t,e){return Xo(this,t,null,e)}inYRange(t,e){return Xo(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+n)/2:e,y:o?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}Go.id="bar",Go.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,enableBorderRadius:!0,pointStyle:void 0},Go.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var Zo=Object.freeze({__proto__:null,ArcElement:Lo,LineElement:No,PointElement:jo,BarElement:Go});function Qo(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}function Jo(t){t.data.datasets.forEach((t=>{Qo(t)}))}var ts={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void Jo(t);const n=t.width;t.data.datasets.forEach(((e,o)=>{const{_data:s,indexAxis:a}=e,r=t.getDatasetMeta(o),l=s||e.data;if("y"===We([a,t.options.indexAxis]))return;if("line"!==r.type)return;const c=t.scales[r.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let{start:h,count:d}=function(t,e){const i=e.length;let n,o=0;const{iScale:s}=t,{min:a,max:r,minDefined:l,maxDefined:c}=s.getUserBounds();return l&&(o=Ht(se(e,s.axis,a).lo,0,i-1)),n=c?Ht(se(e,s.axis,r).hi+1,o,i)-o:i-o,{start:o,count:n}}(r,l);if(d<=(i.threshold||4*n))return void Qo(e);let u;switch($(s)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":u=function(t,e,i,n,o){const s=o.samples||n;if(s>=i)return t.slice(e,e+i);const a=[],r=(i-2)/(s-2);let l=0;const c=e+i-1;let h,d,u,f,g,p=e;for(a[l++]=t[p],h=0;h<s-2;h++){let n,o=0,s=0;const c=Math.floor((h+1)*r)+1+e,m=Math.min(Math.floor((h+2)*r)+1,i)+e,x=m-c;for(n=c;n<m;n++)o+=t[n].x,s+=t[n].y;o/=x,s/=x;const b=Math.floor(h*r)+1+e,_=Math.min(Math.floor((h+1)*r)+1,i)+e,{x:y,y:v}=t[p];for(u=f=-1,n=b;n<_;n++)f=.5*Math.abs((y-o)*(t[n].y-v)-(y-t[n].x)*(s-v)),f>u&&(u=f,d=t[n],g=n);a[l++]=d,p=g}return a[l++]=t[c],a}(l,h,d,n,i);break;case"min-max":u=function(t,e,i,n){let o,s,a,r,l,c,h,d,u,f,g=0,p=0;const m=[],x=e+i-1,b=t[e].x,_=t[x].x-b;for(o=e;o<e+i;++o){s=t[o],a=(s.x-b)/_*n,r=s.y;const e=0|a;if(e===l)r<u?(u=r,c=o):r>f&&(f=r,h=o),g=(p*g+s.x)/++p;else{const i=o-1;if(!$(c)&&!$(h)){const e=Math.min(c,h),n=Math.max(c,h);e!==d&&e!==i&&m.push({...t[e],x:g}),n!==d&&n!==i&&m.push({...t[n],x:g})}o>0&&i!==d&&m.push(t[i]),m.push(s),l=e,p=0,u=f=r,c=h=d=o}}return m}(l,h,d,n);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=u}))},destroy(t){Jo(t)}};function es(t,e,i){const n=function(t){const e=t.options,i=e.fill;let n=K(i&&i.target,i);return void 0===n&&(n=!!e.backgroundColor),!1!==n&&null!==n&&(!0===n?"origin":n)}(t);if(U(n))return!isNaN(n.value)&&n;let o=parseFloat(n);return X(o)&&Math.floor(o)===o?("-"!==n[0]&&"+"!==n[0]||(o=e+o),!(o===e||o<0||o>=i)&&o):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}class is{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:o,radius:s}=this;return e=e||{start:0,end:_t},t.arc(n,o,s,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,o=t.angle;return{x:e+Math.cos(o)*n,y:i+Math.sin(o)*n,angle:o}}}function ns(t){return(t.scale||{}).getPointPositionForValue?function(t){const{scale:e,fill:i}=t,n=e.options,o=e.getLabels().length,s=[],a=n.reverse?e.max:e.min,r=n.reverse?e.min:e.max;let l,c,h;if(h="start"===i?a:"end"===i?r:U(i)?i.value:e.getBaseValue(),n.grid.circular)return c=e.getPointPositionForValue(0,a),new is({x:c.x,y:c.y,radius:e.getDistanceFromCenterForValue(h)});for(l=0;l<o;++l)s.push(e.getPointPositionForValue(l,h));return s}(t):function(t){const{scale:e={},fill:i}=t;let n,o=null;return"start"===i?o=e.bottom:"end"===i?o=e.top:U(i)?o=e.getPixelForValue(i.value):e.getBasePixel&&(o=e.getBasePixel()),X(o)?(n=e.isHorizontal(),{x:n?o:null,y:n?null:o}):null}(t)}function os(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function ss(t){const{chart:e,scale:i,index:n,line:o}=t,s=[],a=o.segments,r=o.points,l=function(t,e){const i=[],n=t.getSortedVisibleDatasetMetas();for(let t=0;t<n.length;t++){const o=n[t];if(o.index===e)break;as(o)&&i.unshift(o.dataset)}return i}(e,n);l.push(cs({x:null,y:i.bottom},o));for(let t=0;t<a.length;t++){const e=a[t];for(let t=e.start;t<=e.end;t++)rs(s,r[t],l)}return new No({points:s,options:{}})}const as=t=>"line"===t.type&&!t.hidden;function rs(t,e,i){const n=[];for(let o=0;o<i.length;o++){const s=i[o],{first:a,last:r,point:l}=ls(s,e,"x");if(!(!l||a&&r))if(a)n.unshift(l);else if(t.push(l),!r)break}t.push(...n)}function ls(t,e,i){const n=t.interpolate(e,i);if(!n)return{};const o=n[i],s=t.segments,a=t.points;let r=!1,l=!1;for(let t=0;t<s.length;t++){const e=s[t],n=a[e.start][i],c=a[e.end][i];if(o>=n&&o<=c){r=o===n,l=o===c;break}}return{first:r,last:l,point:n}}function cs(t,e){let i=[],n=!1;return Y(t)?(n=!0,i=t):i=function(t,e){const{x:i=null,y:n=null}=t||{},o=e.points,s=[];return e.segments.forEach((({start:t,end:e})=>{e=os(t,e,o);const a=o[t],r=o[e];null!==n?(s.push({x:a.x,y:n}),s.push({x:r.x,y:n})):null!==i&&(s.push({x:i,y:a.y}),s.push({x:i,y:r.y}))})),s}(t,e),i.length?new No({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function hs(t,e,i){let n=t[e].fill;const o=[e];let s;if(!i)return n;for(;!1!==n&&-1===o.indexOf(n);){if(!X(n))return n;if(s=t[n],!s)return!1;if(s.visible)return n;o.push(n),n=s.fill}return!1}function ds(t,e,i){t.beginPath(),e.path(t),t.lineTo(e.last().x,i),t.lineTo(e.first().x,i),t.closePath(),t.clip()}function us(t,e,i,n){if(n)return;let o=e[t],s=i[t];return"angle"===t&&(o=Wt(o),s=Wt(s)),{property:t,start:o,end:s}}function fs(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function gs(t,e,i){const{top:n,bottom:o}=e.chart.chartArea,{property:s,start:a,end:r}=i||{};"x"===s&&(t.beginPath(),t.rect(a,n,r-a,o-n),t.clip())}function ps(t,e,i,n){const o=e.interpolate(i,n);o&&t.lineTo(o.x,o.y)}function ms(t,e){const{line:i,target:n,property:o,color:s,scale:a}=e,r=function(t,e,i){const n=t.segments,o=t.points,s=e.points,a=[];for(const t of n){let{start:n,end:r}=t;r=os(n,r,o);const l=us(i,o[n],o[r],t.loop);if(!e.segments){a.push({source:t,target:l,start:o[n],end:o[r]});continue}const c=zi(e,l);for(const e of c){const n=us(i,s[e.start],s[e.end],e.loop),r=Ii(t,o,n);for(const t of r)a.push({source:t,target:e,start:{[i]:fs(l,n,"start",Math.max)},end:{[i]:fs(l,n,"end",Math.min)}})}}return a}(i,n,o);for(const{source:e,target:l,start:c,end:h}of r){const{style:{backgroundColor:r=s}={}}=e,d=!0!==n;t.save(),t.fillStyle=r,gs(t,a,d&&us(o,c,h)),t.beginPath();const u=!!i.pathSegment(t,e);let f;if(d){u?t.closePath():ps(t,n,h,o);const e=!!n.pathSegment(t,l,{move:u,reverse:!0});f=u&&e,f||ps(t,n,c,o)}t.closePath(),t.fill(f?"evenodd":"nonzero"),t.restore()}}function xs(t,e,i){const n=function(t){const{chart:e,fill:i,line:n}=t;if(X(i))return function(t,e){const i=t.getDatasetMeta(e);return i&&t.isDatasetVisible(e)?i.dataset:null}(e,i);if("stack"===i)return ss(t);if("shape"===i)return!0;const o=ns(t);return o instanceof is?o:cs(o,n)}(e),{line:o,scale:s,axis:a}=e,r=o.options,l=r.fill,c=r.backgroundColor,{above:h=c,below:d=c}=l||{};n&&o.points.length&&(Zt(t,i),function(t,e){const{line:i,target:n,above:o,below:s,area:a,scale:r}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&s!==o&&(ds(t,n,a.top),ms(t,{line:i,target:n,color:o,scale:r,property:l}),t.restore(),t.save(),ds(t,n,a.bottom)),ms(t,{line:i,target:n,color:s,scale:r,property:l}),t.restore()}(t,{line:o,target:n,above:h,below:d,area:i,scale:s,axis:a}),Qt(t))}var bs={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,o=[];let s,a,r,l;for(a=0;a<n;++a)s=t.getDatasetMeta(a),r=s.dataset,l=null,r&&r.options&&r instanceof No&&(l={visible:t.isDatasetVisible(a),index:a,fill:es(r,a,n),chart:t,axis:s.controller.options.indexAxis,scale:s.vScale,line:r}),s.$filler=l,o.push(l);for(a=0;a<n;++a)l=o[a],l&&!1!==l.fill&&(l.fill=hs(o,a,i.propagate))},beforeDraw(t,e,i){const n="beforeDraw"===i.drawTime,o=t.getSortedVisibleDatasetMetas(),s=t.chartArea;for(let e=o.length-1;e>=0;--e){const i=o[e].$filler;i&&(i.line.updateControlPoints(s,i.axis),n&&xs(t.ctx,i,s))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;i&&xs(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;n&&!1!==n.fill&&"beforeDatasetDraw"===i.drawTime&&xs(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const _s=(t,e)=>{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}};class ys extends Mn{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){const n=this;n.maxWidth=t,n.maxHeight=e,n._margins=i,n.setDimensions(),n.buildLabels(),n.fit()}setDimensions(){const t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=t._margins.left,t.right=t.width):(t.height=t.maxHeight,t.top=t._margins.top,t.bottom=t.height)}buildLabels(){const t=this,e=t.options.labels||{};let i=Q(e.generateLabels,[t.chart],t)||[];e.filter&&(i=i.filter((i=>e.filter(i,t.chart.data)))),e.sort&&(i=i.sort(((i,n)=>e.sort(i,n,t.chart.data)))),t.options.reverse&&i.reverse(),t.legendItems=i}fit(){const t=this,{options:e,ctx:i}=t;if(!e.display)return void(t.width=t.height=0);const n=e.labels,o=Ve(n.font),s=o.size,a=t._computeTitleHeight(),{boxWidth:r,itemHeight:l}=_s(n,s);let c,h;i.font=o.string,t.isHorizontal()?(c=t.maxWidth,h=t._fitRows(a,s,r,l)+10):(h=t.maxHeight,c=t._fitCols(a,s,r,l)+10),t.width=Math.min(c,e.maxWidth||t.maxWidth),t.height=Math.min(h,e.maxHeight||t.maxHeight)}_fitRows(t,e,i,n){const o=this,{ctx:s,maxWidth:a,options:{labels:{padding:r}}}=o,l=o.legendHitBoxes=[],c=o.lineWidths=[0],h=n+r;let d=t;s.textAlign="left",s.textBaseline="middle";let u=-1,f=-h;return o.legendItems.forEach(((t,o)=>{const g=i+e/2+s.measureText(t.text).width;(0===o||c[c.length-1]+g+2*r>a)&&(d+=h,c[c.length-(o>0?0:1)]=0,f+=h,u++),l[o]={left:0,top:f,row:u,width:g,height:n},c[c.length-1]+=g+r})),d}_fitCols(t,e,i,n){const o=this,{ctx:s,maxHeight:a,options:{labels:{padding:r}}}=o,l=o.legendHitBoxes=[],c=o.columnSizes=[],h=a-t;let d=r,u=0,f=0,g=0,p=0;return o.legendItems.forEach(((t,o)=>{const a=i+e/2+s.measureText(t.text).width;o>0&&f+n+2*r>h&&(d+=u+r,c.push({width:u,height:f}),g+=u+r,p++,u=f=0),l[o]={left:g,top:f,col:p,width:a,height:n},u=Math.max(u,a),f+=n+r})),d+=u,c.push({width:u,height:f}),d}adjustHitBoxes(){const t=this;if(!t.options.display)return;const e=t._computeTitleHeight(),{legendHitBoxes:i,options:{align:n,labels:{padding:s},rtl:a}}=t,r=Ti(a,t.left,t.width);if(this.isHorizontal()){let a=0,l=o(n,t.left+s,t.right-t.lineWidths[a]);for(const c of i)a!==c.row&&(a=c.row,l=o(n,t.left+s,t.right-t.lineWidths[a])),c.top+=t.top+e+s,c.left=r.leftForLtr(r.x(l),c.width),l+=c.width+s}else{let a=0,l=o(n,t.top+e+s,t.bottom-t.columnSizes[a].height);for(const c of i)c.col!==a&&(a=c.col,l=o(n,t.top+e+s,t.bottom-t.columnSizes[a].height)),c.top=l,c.left+=t.left+s,c.left=r.leftForLtr(r.x(c.left),c.width),l+=c.height+s}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){const t=this;if(t.options.display){const e=t.ctx;Zt(e,t),t._draw(),Qt(e)}}_draw(){const t=this,{options:e,columnSizes:i,lineWidths:n,ctx:a}=t,{align:r,labels:l}=e,c=xt.color,h=Ti(e.rtl,t.left,t.width),d=Ve(l.font),{color:u,padding:f}=l,g=d.size,p=g/2;let m;t.drawTitle(),a.textAlign=h.textAlign("left"),a.textBaseline="middle",a.lineWidth=.5,a.font=d.string;const{boxWidth:x,boxHeight:b,itemHeight:_}=_s(l,g),y=t.isHorizontal(),v=this._computeTitleHeight();m=y?{x:o(r,t.left+f,t.right-n[0]),y:t.top+f+v,line:0}:{x:t.left+f,y:o(r,t.top+v+f,t.bottom-i[0].height),line:0},Ai(t.ctx,e.textDirection);const w=_+f;t.legendItems.forEach(((M,k)=>{a.strokeStyle=M.fontColor||u,a.fillStyle=M.fontColor||u;const S=a.measureText(M.text).width,P=h.textAlign(M.textAlign||(M.textAlign=l.textAlign)),D=x+p+S;let C=m.x,O=m.y;h.setWidth(t.width),y?k>0&&C+D+f>t.right&&(O=m.y+=w,m.line++,C=m.x=o(r,t.left+f,t.right-n[m.line])):k>0&&O+w>t.bottom&&(C=m.x=C+i[m.line].width+f,m.line++,O=m.y=o(r,t.top+v+f,t.bottom-i[m.line].height));!function(t,e,i){if(isNaN(x)||x<=0||isNaN(b)||b<0)return;a.save();const n=K(i.lineWidth,1);if(a.fillStyle=K(i.fillStyle,c),a.lineCap=K(i.lineCap,"butt"),a.lineDashOffset=K(i.lineDashOffset,0),a.lineJoin=K(i.lineJoin,"miter"),a.lineWidth=n,a.strokeStyle=K(i.strokeStyle,c),a.setLineDash(K(i.lineDash,[])),l.usePointStyle){const o={radius:x*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:n},s=h.xPlus(t,x/2);Kt(a,o,s,e+p)}else{const o=e+Math.max((g-b)/2,0),s=h.leftForLtr(t,x),r=Fe(i.borderRadius);a.beginPath(),Object.values(r).some((t=>0!==t))?ne(a,{x:s,y:o,w:x,h:b,radius:r}):a.rect(s,o,x,b),a.fill(),0!==n&&a.stroke()}a.restore()}(h.x(C),O,M),C=s(P,C+x+p,y?C+D:t.right,e.rtl),function(t,e,i){ee(a,i.text,t,e+_/2,d,{strikethrough:i.hidden,textAlign:h.textAlign(i.textAlign)})}(h.x(C),O,M),y?m.x+=D+f:m.y+=w})),Li(t.ctx,e.textDirection)}drawTitle(){const t=this,e=t.options,i=e.title,s=Ve(i.font),a=Be(i.padding);if(!i.display)return;const r=Ti(e.rtl,t.left,t.width),l=t.ctx,c=i.position,h=s.size/2,d=a.top+h;let u,f=t.left,g=t.width;if(this.isHorizontal())g=Math.max(...t.lineWidths),u=t.top+d,f=o(e.align,f,t.right-g);else{const i=t.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);u=d+o(e.align,t.top,t.bottom-i-e.labels.padding-t._computeTitleHeight())}const p=o(c,f,f+g);l.textAlign=r.textAlign(n(c)),l.textBaseline="middle",l.strokeStyle=i.color,l.fillStyle=i.color,l.font=s.string,ee(l,i.text,p,u,s)}_computeTitleHeight(){const t=this.options.title,e=Ve(t.font),i=Be(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){const i=this;let n,o,s;if(t>=i.left&&t<=i.right&&e>=i.top&&e<=i.bottom)for(s=i.legendHitBoxes,n=0;n<s.length;++n)if(o=s[n],t>=o.left&&t<=o.left+o.width&&e>=o.top&&e<=o.top+o.height)return i.legendItems[n];return null}handleEvent(t){const e=this,i=e.options;if(!function(t,e){if("mousemove"===t&&(e.onHover||e.onLeave))return!0;if(e.onClick&&("click"===t||"mouseup"===t))return!0;return!1}(t.type,i))return;const n=e._getLegendItemAt(t.x,t.y);if("mousemove"===t.type){const a=e._hoveredItem,r=(s=n,null!==(o=a)&&null!==s&&o.datasetIndex===s.datasetIndex&&o.index===s.index);a&&!r&&Q(i.onLeave,[t,a,e],e),e._hoveredItem=n,n&&!r&&Q(i.onHover,[t,n,e],e)}else n&&Q(i.onClick,[t,n,e],e);var o,s}}var vs={id:"legend",_element:ys,start(t,e,i){const n=t.legend=new ys({ctx:t.ctx,options:i,chart:t});ti.configure(t,n,i),ti.addBox(t,n)},stop(t){ti.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;ti.configure(t,n,i),n.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const n=e.datasetIndex,o=i.chart;o.isDatasetVisible(n)?(o.hide(n),e.hidden=!0):(o.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:o,color:s}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const a=t.controller.getStyle(i?0:void 0),r=Be(a.borderWidth);return{text:e[t.index].label,fillStyle:a.backgroundColor,fontColor:s,hidden:!t.visible,lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:(r.width+r.height)/4,strokeStyle:a.borderColor,pointStyle:n||a.pointStyle,rotation:a.rotation,textAlign:o||a.textAlign,borderRadius:0,datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class ws extends Mn{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this,n=i.options;if(i.left=0,i.top=0,!n.display)return void(i.width=i.height=i.right=i.bottom=0);i.width=i.right=t,i.height=i.bottom=e;const o=Y(n.text)?n.text.length:1;i._padding=Be(n.padding);const s=o*Ve(n.font).lineHeight+i._padding.height;i.isHorizontal()?i.height=s:i.width=s}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:n,right:s,options:a}=this,r=a.align;let l,c,h,d=0;return this.isHorizontal()?(c=o(r,i,s),h=e+t,l=s-i):("left"===a.position?(c=i+t,h=o(r,n,e),d=-.5*bt):(c=s-t,h=o(r,e,n),d=.5*bt),l=n-e),{titleX:c,titleY:h,maxWidth:l,rotation:d}}draw(){const t=this,e=t.ctx,i=t.options;if(!i.display)return;const o=Ve(i.font),s=o.lineHeight/2+t._padding.top,{titleX:a,titleY:r,maxWidth:l,rotation:c}=t._drawArgs(s);ee(e,i.text,0,0,o,{color:i.color,maxWidth:l,rotation:c,textAlign:n(i.align),textBaseline:"middle",translation:[a,r]})}}var Ms={id:"title",_element:ws,start(t,e,i){!function(t,e){const i=new ws({ctx:t.ctx,options:e,chart:t});ti.configure(t,i,e),ti.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;ti.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const n=t.titleBlock;ti.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const ks=new WeakMap;var Ss={id:"subtitle",start(t,e,i){const n=new ws({ctx:t.ctx,options:i,chart:t});ti.configure(t,n,i),ti.addBox(t,n),ks.set(t,n)},stop(t){ti.removeBox(t,ks.get(t)),ks.delete(t)},beforeUpdate(t,e,i){const n=ks.get(t);ti.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Ps={average(t){if(!t.length)return!1;let e,i,n=0,o=0,s=0;for(e=0,i=t.length;e<i;++e){const i=t[e].element;if(i&&i.hasValue()){const t=i.tooltipPosition();n+=t.x,o+=t.y,++s}}return{x:n/s,y:o/s}},nearest(t,e){if(!t.length)return!1;let i,n,o,s=e.x,a=e.y,r=Number.POSITIVE_INFINITY;for(i=0,n=t.length;i<n;++i){const n=t[i].element;if(n&&n.hasValue()){const t=Bt(e,n.getCenterPoint());t<r&&(r=t,o=n)}}if(o){const t=o.tooltipPosition();s=t.x,a=t.y}return{x:s,y:a}}};function Ds(t,e){return e&&(Y(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Cs(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function Os(t,e){const{element:i,datasetIndex:n,index:o}=e,s=t.getDatasetMeta(n).controller,{label:a,value:r}=s.getLabelAndValue(o);return{chart:t,label:a,parsed:s.getParsed(o),raw:t.data.datasets[n].data[o],formattedValue:r,dataset:s.getDataset(),dataIndex:o,datasetIndex:n,element:i}}function Ts(t,e){const i=t._chart.ctx,{body:n,footer:o,title:s}=t,{boxWidth:a,boxHeight:r}=e,l=Ve(e.bodyFont),c=Ve(e.titleFont),h=Ve(e.footerFont),d=s.length,u=o.length,f=n.length,g=Be(e.padding);let p=g.height,m=0,x=n.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(x+=t.beforeBody.length+t.afterBody.length,d&&(p+=d*c.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),x){p+=f*(e.displayColors?Math.max(r,l.lineHeight):l.lineHeight)+(x-f)*l.lineHeight+(x-1)*e.bodySpacing}u&&(p+=e.footerMarginTop+u*h.lineHeight+(u-1)*e.footerSpacing);let b=0;const _=function(t){m=Math.max(m,i.measureText(t).width+b)};return i.save(),i.font=c.string,J(t.title,_),i.font=l.string,J(t.beforeBody.concat(t.afterBody),_),b=e.displayColors?a+2+e.boxPadding:0,J(n,(t=>{J(t.before,_),J(t.lines,_),J(t.after,_)})),b=0,i.font=h.string,J(t.footer,_),i.restore(),m+=g.width,{width:m,height:p}}function As(t,e,i,n){const{x:o,width:s}=i,{width:a,chartArea:{left:r,right:l}}=t;let c="center";return"center"===n?c=o<=(r+l)/2?"left":"right":o<=s/2?c="left":o>=a-s/2&&(c="right"),function(t,e,i,n){const{x:o,width:s}=n,a=i.caretSize+i.caretPadding;return"left"===t&&o+s+a>e.width||"right"===t&&o-s-a<0||void 0}(c,t,e,i)&&(c="center"),c}function Ls(t,e,i){const n=e.yAlign||function(t,e){const{y:i,height:n}=e;return i<n/2?"top":i>t.height-n/2?"bottom":"center"}(t,i);return{xAlign:e.xAlign||As(t,e,i,n),yAlign:n}}function Rs(t,e,i,n){const{caretSize:o,caretPadding:s,cornerRadius:a}=t,{xAlign:r,yAlign:l}=i,c=o+s,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=Fe(a);let g=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,r);const p=function(t,e,i){let{y:n,height:o}=t;return"top"===e?n+=i:n-="bottom"===e?o+i:o/2,n}(e,l,c);return"center"===l?"left"===r?g+=c:"right"===r&&(g-=c):"left"===r?g-=Math.max(h,u)+s:"right"===r&&(g+=Math.max(d,f)+s),{x:Ht(g,0,n.width-e.width),y:Ht(p,0,n.height-e.height)}}function Es(t,e,i){const n=Be(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function Is(t){return Ds([],Cs(t))}function zs(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class Fs extends Mn{constructor(t){super(),this.opacity=0,this._active=[],this._chart=t._chart,this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this,e=t._cachedAnimations;if(e)return e;const i=t._chart,n=t.options.setContext(t.getContext()),o=n.enabled&&i.options.animation&&n.animations,s=new hn(t._chart,o);return o._cacheable&&(t._cachedAnimations=Object.freeze(s)),s}getContext(){const t=this;return t.$context||(t.$context=(e=t._chart.getContext(),i=t,n=t._tooltipItems,Object.assign(Object.create(e),{tooltip:i,tooltipItems:n,type:"tooltip"})));var e,i,n}getTitle(t,e){const i=this,{callbacks:n}=e,o=n.beforeTitle.apply(i,[t]),s=n.title.apply(i,[t]),a=n.afterTitle.apply(i,[t]);let r=[];return r=Ds(r,Cs(o)),r=Ds(r,Cs(s)),r=Ds(r,Cs(a)),r}getBeforeBody(t,e){return Is(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const i=this,{callbacks:n}=e,o=[];return J(t,(t=>{const e={before:[],lines:[],after:[]},s=zs(n,t);Ds(e.before,Cs(s.beforeLabel.call(i,t))),Ds(e.lines,s.label.call(i,t)),Ds(e.after,Cs(s.afterLabel.call(i,t))),o.push(e)})),o}getAfterBody(t,e){return Is(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const i=this,{callbacks:n}=e,o=n.beforeFooter.apply(i,[t]),s=n.footer.apply(i,[t]),a=n.afterFooter.apply(i,[t]);let r=[];return r=Ds(r,Cs(o)),r=Ds(r,Cs(s)),r=Ds(r,Cs(a)),r}_createItems(t){const e=this,i=e._active,n=e._chart.data,o=[],s=[],a=[];let r,l,c=[];for(r=0,l=i.length;r<l;++r)c.push(Os(e._chart,i[r]));return t.filter&&(c=c.filter(((e,i,o)=>t.filter(e,i,o,n)))),t.itemSort&&(c=c.sort(((e,i)=>t.itemSort(e,i,n)))),J(c,(i=>{const n=zs(t.callbacks,i);o.push(n.labelColor.call(e,i)),s.push(n.labelPointStyle.call(e,i)),a.push(n.labelTextColor.call(e,i))})),e.labelColors=o,e.labelPointStyles=s,e.labelTextColors=a,e.dataPoints=c,c}update(t,e){const i=this,n=i.options.setContext(i.getContext()),o=i._active;let s,a=[];if(o.length){const t=Ps[n.position].call(i,o,i._eventPosition);a=i._createItems(n),i.title=i.getTitle(a,n),i.beforeBody=i.getBeforeBody(a,n),i.body=i.getBody(a,n),i.afterBody=i.getAfterBody(a,n),i.footer=i.getFooter(a,n);const e=i._size=Ts(i,n),r=Object.assign({},t,e),l=Ls(i._chart,n,r),c=Rs(n,r,l,i._chart);i.xAlign=l.xAlign,i.yAlign=l.yAlign,s={opacity:1,x:c.x,y:c.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==i.opacity&&(s={opacity:0});i._tooltipItems=a,i.$context=void 0,s&&i._resolveAnimations().update(i,s),t&&n.external&&n.external.call(i,{chart:i._chart,tooltip:i,replay:e})}drawCaret(t,e,i,n){const o=this.getCaretPosition(t,i,n);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:o}=this,{caretSize:s,cornerRadius:a}=i,{topLeft:r,topRight:l,bottomLeft:c,bottomRight:h}=Fe(a),{x:d,y:u}=t,{width:f,height:g}=e;let p,m,x,b,_,y;return"center"===o?(_=u+g/2,"left"===n?(p=d,m=p-s,b=_+s,y=_-s):(p=d+f,m=p+s,b=_-s,y=_+s),x=p):(m="left"===n?d+Math.max(r,c)+s:"right"===n?d+f-Math.max(l,h)-s:this.caretX,"top"===o?(b=u,_=b-s,p=m-s,x=m+s):(b=u+g,_=b+s,p=m+s,x=m-s),y=b),{x1:p,x2:m,x3:x,y1:b,y2:_,y3:y}}drawTitle(t,e,i){const n=this,o=n.title,s=o.length;let a,r,l;if(s){const c=Ti(i.rtl,n.x,n.width);for(t.x=Es(n,i.titleAlign,i),e.textAlign=c.textAlign(i.titleAlign),e.textBaseline="middle",a=Ve(i.titleFont),r=i.titleSpacing,e.fillStyle=i.titleColor,e.font=a.string,l=0;l<s;++l)e.fillText(o[l],c.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+r,l+1===s&&(t.y+=i.titleMarginBottom-r)}}_drawColorBox(t,e,i,n,o){const s=this,a=s.labelColors[i],r=s.labelPointStyles[i],{boxHeight:l,boxWidth:c,boxPadding:h}=o,d=Ve(o.bodyFont),u=Es(s,"left",o),f=n.x(u),g=l<d.lineHeight?(d.lineHeight-l)/2:0,p=e.y+g;if(o.usePointStyle){const e={radius:Math.min(c,l)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},i=n.leftForLtr(f,c)+c/2,s=p+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,Kt(t,e,i,s),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,Kt(t,e,i,s)}else{t.lineWidth=a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const e=n.leftForLtr(f,c-h),i=n.leftForLtr(n.xPlus(f,1),c-h-2),s=Fe(a.borderRadius);Object.values(s).some((t=>0!==t))?(t.beginPath(),t.fillStyle=o.multiKeyBackground,ne(t,{x:e,y:p,w:c,h:l,radius:s}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),ne(t,{x:i,y:p+1,w:c-2,h:l-2,radius:s}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(e,p,c,l),t.strokeRect(e,p,c,l),t.fillStyle=a.backgroundColor,t.fillRect(i,p+1,c-2,l-2))}t.fillStyle=s.labelTextColors[i]}drawBody(t,e,i){const n=this,{body:o}=n,{bodySpacing:s,bodyAlign:a,displayColors:r,boxHeight:l,boxWidth:c,boxPadding:h}=i,d=Ve(i.bodyFont);let u=d.lineHeight,f=0;const g=Ti(i.rtl,n.x,n.width),p=function(i){e.fillText(i,g.x(t.x+f),t.y+u/2),t.y+=u+s},m=g.textAlign(a);let x,b,_,y,v,w,M;for(e.textAlign=a,e.textBaseline="middle",e.font=d.string,t.x=Es(n,m,i),e.fillStyle=i.bodyColor,J(n.beforeBody,p),f=r&&"right"!==m?"center"===a?c/2+h:c+2+h:0,y=0,w=o.length;y<w;++y){for(x=o[y],b=n.labelTextColors[y],e.fillStyle=b,J(x.before,p),_=x.lines,r&&_.length&&(n._drawColorBox(e,t,y,g,i),u=Math.max(d.lineHeight,l)),v=0,M=_.length;v<M;++v)p(_[v]),u=d.lineHeight;J(x.after,p)}f=0,u=d.lineHeight,J(n.afterBody,p),t.y-=s}drawFooter(t,e,i){const n=this,o=n.footer,s=o.length;let a,r;if(s){const l=Ti(i.rtl,n.x,n.width);for(t.x=Es(n,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=l.textAlign(i.footerAlign),e.textBaseline="middle",a=Ve(i.footerFont),e.fillStyle=i.footerColor,e.font=a.string,r=0;r<s;++r)e.fillText(o[r],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+i.footerSpacing}}drawBackground(t,e,i,n){const{xAlign:o,yAlign:s}=this,{x:a,y:r}=t,{width:l,height:c}=i,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=Fe(n.cornerRadius);e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.beginPath(),e.moveTo(a+h,r),"top"===s&&this.drawCaret(t,e,i,n),e.lineTo(a+l-d,r),e.quadraticCurveTo(a+l,r,a+l,r+d),"center"===s&&"right"===o&&this.drawCaret(t,e,i,n),e.lineTo(a+l,r+c-f),e.quadraticCurveTo(a+l,r+c,a+l-f,r+c),"bottom"===s&&this.drawCaret(t,e,i,n),e.lineTo(a+u,r+c),e.quadraticCurveTo(a,r+c,a,r+c-u),"center"===s&&"left"===o&&this.drawCaret(t,e,i,n),e.lineTo(a,r+h),e.quadraticCurveTo(a,r,a+h,r),e.closePath(),e.fill(),n.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this,i=e._chart,n=e.$animations,o=n&&n.x,s=n&&n.y;if(o||s){const n=Ps[t.position].call(e,e._active,e._eventPosition);if(!n)return;const a=e._size=Ts(e,t),r=Object.assign({},n,e._size),l=Ls(i,t,r),c=Rs(t,r,l,i);o._to===c.x&&s._to===c.y||(e.xAlign=l.xAlign,e.yAlign=l.yAlign,e.width=a.width,e.height=a.height,e.caretX=n.x,e.caretY=n.y,e._resolveAnimations().update(e,c))}}draw(t){const e=this,i=e.options.setContext(e.getContext());let n=e.opacity;if(!n)return;e._updateAnimationTarget(i);const o={width:e.width,height:e.height},s={x:e.x,y:e.y};n=Math.abs(n)<.001?0:n;const a=Be(i.padding),r=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;i.enabled&&r&&(t.save(),t.globalAlpha=n,e.drawBackground(s,t,o,i),Ai(t,i.textDirection),s.y+=a.top,e.drawTitle(s,t,i),e.drawBody(s,t,i),e.drawFooter(s,t,i),Li(t,i.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this,n=i._active,o=t.map((({datasetIndex:t,index:e})=>{const n=i._chart.getDatasetMeta(t);if(!n)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:n.data[e],index:e}})),s=!tt(n,o),a=i._positionChanged(o,e);(s||a)&&(i._active=o,i._eventPosition=e,i.update(!0))}handleEvent(t,e){const i=this,n=i.options,o=i._active||[];let s=!1,a=[];"mouseout"!==t.type&&(a=i._chart.getElementsAtEventForMode(t,n.mode,n,e),n.reverse&&a.reverse());const r=i._positionChanged(a,t);return s=e||!tt(a,o)||r,s&&(i._active=a,(n.enabled||n.external)&&(i._eventPosition={x:t.x,y:t.y},i.update(!0,e))),s}_positionChanged(t,e){const{caretX:i,caretY:n,options:o}=this,s=Ps[o.position].call(this,t,e);return!1!==s&&(i!==s.x||n!==s.y)}}Fs.positioners=Ps;var Bs={id:"tooltip",_element:Fs,positioners:Ps,afterInit(t,e,i){i&&(t.tooltip=new Fs({_chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip,i={tooltip:e};!1!==t.notifyPlugins("beforeTooltipDraw",i)&&(e&&e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i))},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:H,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex<n)return i[e.dataIndex]}return""},afterTitle:H,beforeBody:H,beforeLabel:H,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const i=t.formattedValue;return $(i)||(e+=i),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:H,afterBody:H,beforeFooter:H,footer:H,afterFooter:H}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Vs=Object.freeze({__proto__:null,Decimation:ts,Filler:bs,Legend:vs,SubTitle:Ss,Title:Ms,Tooltip:Bs});function Ws(t,e,i){const n=t.indexOf(e);if(-1===n)return((t,e,i)=>"string"==typeof e?t.push(e)-1:isNaN(e)?null:i)(t,e,i);return n!==t.lastIndexOf(e)?i:n}class Ns extends En{constructor(t){super(t),this._startValue=void 0,this._valueRange=0}parse(t,e){if($(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:Ht(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:Ws(i,t,K(e,t)),i.length-1)}determineDataLimits(){const t=this,{minDefined:e,maxDefined:i}=t.getUserBounds();let{min:n,max:o}=t.getMinMax(!0);"ticks"===t.options.bounds&&(e||(n=0),i||(o=t.getLabels().length-1)),t.min=n,t.max=o}buildTicks(){const t=this,e=t.min,i=t.max,n=t.options.offset,o=[];let s=t.getLabels();s=0===e&&i===s.length-1?s:s.slice(e,i+1),t._valueRange=Math.max(s.length-(n?0:1),1),t._startValue=t.min-(n?.5:0);for(let t=e;t<=i;t++)o.push({value:t});return o}getLabelForValue(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}configure(){const t=this;super.configure(),t.isHorizontal()||(t._reversePixels=!t._reversePixels)}getPixelForValue(t){const e=this;return"number"!=typeof t&&(t=e.parse(t)),null===t?NaN:e.getPixelForDecimal((t-e._startValue)/e._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){const e=this;return Math.round(e._startValue+e.getDecimalForPixel(t)*e._valueRange)}getBasePixel(){return this.bottom}}function Hs(t,e,{horizontal:i,minRotation:n}){const o=Et(n),s=(i?Math.sin(o):Math.cos(o))||.001,a=.75*e*(""+t).length;return Math.min(e/s,a)}Ns.id="category",Ns.defaults={ticks:{callback:Ns.prototype.getLabelForValue}};class js extends En{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return $(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const t=this,{beginAtZero:e}=t.options,{minDefined:i,maxDefined:n}=t.getUserBounds();let{min:o,max:s}=t;const a=t=>o=i?o:t,r=t=>s=n?s:t;if(e){const t=Dt(o),e=Dt(s);t<0&&e<0?r(0):t>0&&e>0&&a(0)}if(o===s){let t=1;(s>=Number.MAX_SAFE_INTEGER||o<=Number.MIN_SAFE_INTEGER)&&(t=Math.abs(.05*s)),r(s+t),e||a(o-t)}t.min=o,t.max=s}getTickLimit(){const t=this,e=t.options.ticks;let i,{maxTicksLimit:n,stepSize:o}=e;return o?i=Math.ceil(t.max/o)-Math.floor(t.min/o)+1:(i=t.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this,e=t.options,i=e.ticks;let n=t.getTickLimit();n=Math.max(2,n);const o=function(t,e){const i=[],{bounds:n,step:o,min:s,max:a,precision:r,count:l,maxTicks:c,maxDigits:h,includeBounds:d}=t,u=o||1,f=c-1,{min:g,max:p}=e,m=!$(s),x=!$(a),b=!$(l),_=(p-g)/(h+1);let y,v,w,M,k=Ct((p-g)/f/u)*u;if(k<1e-14&&!m&&!x)return[{value:g},{value:p}];M=Math.ceil(p/k)-Math.floor(g/k),M>f&&(k=Ct(M*k/f/u)*u),$(r)||(y=Math.pow(10,r),k=Math.ceil(k*y)/y),"ticks"===n?(v=Math.floor(g/k)*k,w=Math.ceil(p/k)*k):(v=g,w=p),m&&x&&o&&Lt((a-s)/o,k/1e3)?(M=Math.round(Math.min((a-s)/k,c)),k=(a-s)/M,v=s,w=a):b?(v=m?s:v,w=x?a:w,M=l-1,k=(w-v)/M):(M=(w-v)/k,M=At(M,Math.round(M),k/1e3)?Math.round(M):Math.ceil(M));const S=Math.max(zt(k),zt(v));y=Math.pow(10,$(r)?S:r),v=Math.round(v*y)/y,w=Math.round(w*y)/y;let P=0;for(m&&(d&&v!==s?(i.push({value:s}),v<s&&P++,At(Math.round((v+P*k)*y)/y,s,Hs(s,_,t))&&P++):v<s&&P++);P<M;++P)i.push({value:Math.round((v+P*k)*y)/y});return x&&d&&w!==a?At(i[i.length-1].value,a,Hs(a,_,t))?i[i.length-1].value=a:i.push({value:a}):x&&w!==a||i.push({value:w}),i}({maxTicks:n,bounds:e.bounds,min:e.min,max:e.max,precision:i.precision,step:i.stepSize,count:i.count,maxDigits:t._maxDigits(),horizontal:t.isHorizontal(),minRotation:i.minRotation||0,includeBounds:!1!==i.includeBounds},t._range||t);return"ticks"===e.bounds&&Rt(o,t,"value"),e.reverse?(o.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),o}configure(){const t=this,e=t.ticks;let i=t.min,n=t.max;if(super.configure(),t.options.offset&&e.length){const t=(n-i)/Math.max(e.length-1,1)/2;i-=t,n+=t}t._startValue=i,t._endValue=n,t._valueRange=n-i}getLabelForValue(t){return Oi(t,this.chart.options.locale)}}class $s extends js{determineDataLimits(){const t=this,{min:e,max:i}=t.getMinMax(!0);t.min=X(e)?e:0,t.max=X(i)?i:1,t.handleTickRangeOptions()}computeTickLimit(){const t=this,e=t.isHorizontal(),i=e?t.width:t.height,n=Et(t.options.ticks.minRotation),o=(e?Math.sin(n):Math.cos(n))||.001,s=t._resolveTickFontOptions(0);return Math.ceil(i/Math.min(40,s.lineHeight/o))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function Ys(t){return 1===t/Math.pow(10,Math.floor(Pt(t)))}$s.id="linear",$s.defaults={ticks:{callback:Sn.formatters.numeric}};class Us extends En{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=js.prototype.parse.apply(this,[t,e]);if(0!==i)return X(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const t=this,{min:e,max:i}=t.getMinMax(!0);t.min=X(e)?Math.max(0,e):null,t.max=X(i)?Math.max(0,i):null,t.options.beginAtZero&&(t._zero=!0),t.handleTickRangeOptions()}handleTickRangeOptions(){const t=this,{minDefined:e,maxDefined:i}=t.getUserBounds();let n=t.min,o=t.max;const s=t=>n=e?n:t,a=t=>o=i?o:t,r=(t,e)=>Math.pow(10,Math.floor(Pt(t))+e);n===o&&(n<=0?(s(1),a(10)):(s(r(n,-1)),a(r(o,1)))),n<=0&&s(r(o,-1)),o<=0&&a(r(n,1)),t._zero&&t.min!==t._suggestedMin&&n===r(t.min,0)&&s(r(n,-1)),t.min=n,t.max=o}buildTicks(){const t=this,e=t.options,i=function(t,e){const i=Math.floor(Pt(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),o=[];let s=q(t.min,Math.pow(10,Math.floor(Pt(e.min)))),a=Math.floor(Pt(s)),r=Math.floor(s/Math.pow(10,a)),l=a<0?Math.pow(10,Math.abs(a)):1;do{o.push({value:s,major:Ys(s)}),++r,10===r&&(r=1,++a,l=a>=0?1:l),s=Math.round(r*Math.pow(10,a)*l)/l}while(a<i||a===i&&r<n);const c=q(t.max,s);return o.push({value:c,major:Ys(s)}),o}({min:t._userMin,max:t._userMax},t);return"ticks"===e.bounds&&Rt(i,t,"value"),e.reverse?(i.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),i}getLabelForValue(t){return void 0===t?"0":Oi(t,this.chart.options.locale)}configure(){const t=this,e=t.min;super.configure(),t._startValue=Pt(e),t._valueRange=Pt(t.max)-Pt(e)}getPixelForValue(t){const e=this;return void 0!==t&&0!==t||(t=e.min),null===t||isNaN(t)?NaN:e.getPixelForDecimal(t===e.min?0:(Pt(t)-e._startValue)/e._valueRange)}getValueForPixel(t){const e=this,i=e.getDecimalForPixel(t);return Math.pow(10,e._startValue+i*e._valueRange)}}function Xs(t){const e=t.ticks;if(e.display&&t.display){const t=Be(e.backdropPadding);return K(e.font&&e.font.size,xt.font.size)+t.height}return 0}function qs(t,e,i,n,o){return t===n||t===o?{start:e-i/2,end:e+i/2}:t<n||t>o?{start:e-i,end:e}:{start:e,end:e+i}}function Ks(t){const e={l:0,r:t.width,t:0,b:t.height-t.paddingTop},i={},n=[],o=[],s=t.getLabels().length;for(let c=0;c<s;c++){const s=t.options.pointLabels.setContext(t.getPointLabelContext(c));o[c]=s.padding;const h=t.getPointPosition(c,t.drawingArea+o[c]),d=Ve(s.font),u=(a=t.ctx,r=d,l=Y(l=t._pointLabels[c])?l:[l],{w:Ut(a,r.string,l),h:l.length*r.lineHeight});n[c]=u;const f=t.getIndexAngle(c),g=It(f),p=qs(g,h.x,u.w,0,180),m=qs(g,h.y,u.h,90,270);p.start<e.l&&(e.l=p.start,i.l=f),p.end>e.r&&(e.r=p.end,i.r=f),m.start<e.t&&(e.t=m.start,i.t=f),m.end>e.b&&(e.b=m.end,i.b=f)}var a,r,l;t._setReductions(t.drawingArea,e,i),t._pointLabelItems=function(t,e,i){const n=[],o=t.getLabels().length,s=t.options,a=Xs(s),r=t.getDistanceFromCenterForValue(s.ticks.reverse?t.min:t.max);for(let s=0;s<o;s++){const o=0===s?a/2:0,l=t.getPointPosition(s,r+o+i[s]),c=It(t.getIndexAngle(s)),h=e[s],d=Qs(l.y,h.h,c),u=Gs(c),f=Zs(l.x,h.w,u);n.push({x:l.x,y:d,textAlign:u,left:f,top:d,right:f+h.w,bottom:d+h.h})}return n}(t,n,o)}function Gs(t){return 0===t||180===t?"center":t<180?"left":"right"}function Zs(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function Qs(t,e,i){return 90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e),t}function Js(t,e,i,n){const{ctx:o}=t;if(i)o.arc(t.xCenter,t.yCenter,e,0,_t);else{let i=t.getPointPosition(0,e);o.moveTo(i.x,i.y);for(let s=1;s<n;s++)i=t.getPointPosition(s,e),o.lineTo(i.x,i.y)}}function ta(t){return Tt(t)?t:0}Us.id="logarithmic",Us.defaults={ticks:{callback:Sn.formatters.logarithmic,major:{enabled:!0}}};class ea extends js{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=Xs(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2}determineDataLimits(){const t=this,{min:e,max:i}=t.getMinMax(!1);t.min=X(e)&&!isNaN(e)?e:0,t.max=X(i)&&!isNaN(i)?i:0,t.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Xs(this.options))}generateTickLabels(t){const e=this;js.prototype.generateTickLabels.call(e,t),e._pointLabels=e.getLabels().map(((t,i)=>{const n=Q(e.options.pointLabels.callback,[t,i],e);return n||0===n?n:""}))}fit(){const t=this,e=t.options;e.display&&e.pointLabels.display?Ks(t):t.setCenterPoint(0,0,0,0)}_setReductions(t,e,i){const n=this;let o=e.l/Math.sin(i.l),s=Math.max(e.r-n.width,0)/Math.sin(i.r),a=-e.t/Math.cos(i.t),r=-Math.max(e.b-(n.height-n.paddingTop),0)/Math.cos(i.b);o=ta(o),s=ta(s),a=ta(a),r=ta(r),n.drawingArea=Math.max(t/2,Math.min(Math.floor(t-(o+s)/2),Math.floor(t-(a+r)/2))),n.setCenterPoint(o,s,a,r)}setCenterPoint(t,e,i,n){const o=this,s=o.width-e-o.drawingArea,a=t+o.drawingArea,r=i+o.drawingArea,l=o.height-o.paddingTop-n-o.drawingArea;o.xCenter=Math.floor((a+s)/2+o.left),o.yCenter=Math.floor((r+l)/2+o.top+o.paddingTop)}getIndexAngle(t){return Wt(t*(_t/this.getLabels().length)+Et(this.options.startAngle||0))}getDistanceFromCenterForValue(t){const e=this;if($(t))return NaN;const i=e.drawingArea/(e.max-e.min);return e.options.reverse?(e.max-t)*i:(t-e.min)*i}getValueForDistanceFromCenter(t){if($(t))return NaN;const e=this,i=t/(e.drawingArea/(e.max-e.min));return e.options.reverse?e.max-i:e.min+i}getPointLabelContext(t){const e=this,i=e._pointLabels||[];if(t>=0&&t<i.length){const n=i[t];return function(t,e,i){return Object.assign(Object.create(t),{label:i,index:e,type:"pointLabel"})}(e.getContext(),t,n)}}getPointPosition(t,e){const i=this,n=i.getIndexAngle(t)-Mt;return{x:Math.cos(n)*e+i.xCenter,y:Math.sin(n)*e+i.yCenter,angle:n}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:n,bottom:o}=this._pointLabelItems[t];return{left:e,top:i,right:n,bottom:o}}drawBackground(){const t=this,{backgroundColor:e,grid:{circular:i}}=t.options;if(e){const n=t.ctx;n.save(),n.beginPath(),Js(t,t.getDistanceFromCenterForValue(t._endValue),i,t.getLabels().length),n.closePath(),n.fillStyle=e,n.fill(),n.restore()}}drawGrid(){const t=this,e=t.ctx,i=t.options,{angleLines:n,grid:o}=i,s=t.getLabels().length;let a,r,l;if(i.pointLabels.display&&function(t,e){const{ctx:i,options:{pointLabels:n}}=t;for(let o=e-1;o>=0;o--){const e=n.setContext(t.getPointLabelContext(o)),s=Ve(e.font),{x:a,y:r,textAlign:l,left:c,top:h,right:d,bottom:u}=t._pointLabelItems[o],{backdropColor:f}=e;if(!$(f)){const t=Be(e.backdropPadding);i.fillStyle=f,i.fillRect(c-t.left,h-t.top,d-c+t.width,u-h+t.height)}ee(i,t._pointLabels[o],a,r+s.lineHeight/2,s,{color:e.color,textAlign:l,textBaseline:"middle"})}}(t,s),o.display&&t.ticks.forEach(((e,i)=>{if(0!==i){r=t.getDistanceFromCenterForValue(e.value);const n=o.setContext(t.getContext(i-1));!function(t,e,i,n){const o=t.ctx,s=e.circular,{color:a,lineWidth:r}=e;!s&&!n||!a||!r||i<0||(o.save(),o.strokeStyle=a,o.lineWidth=r,o.setLineDash(e.borderDash),o.lineDashOffset=e.borderDashOffset,o.beginPath(),Js(t,i,s,n),o.closePath(),o.stroke(),o.restore())}(t,n,r,s)}})),n.display){for(e.save(),a=t.getLabels().length-1;a>=0;a--){const o=n.setContext(t.getPointLabelContext(a)),{color:s,lineWidth:c}=o;c&&s&&(e.lineWidth=c,e.strokeStyle=s,e.setLineDash(o.borderDash),e.lineDashOffset=o.borderDashOffset,r=t.getDistanceFromCenterForValue(i.ticks.reverse?t.min:t.max),l=t.getPointPosition(a,r),e.beginPath(),e.moveTo(t.xCenter,t.yCenter),e.lineTo(l.x,l.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const t=this,e=t.ctx,i=t.options,n=i.ticks;if(!n.display)return;const o=t.getIndexAngle(0);let s,a;e.save(),e.translate(t.xCenter,t.yCenter),e.rotate(o),e.textAlign="center",e.textBaseline="middle",t.ticks.forEach(((o,r)=>{if(0===r&&!i.reverse)return;const l=n.setContext(t.getContext(r)),c=Ve(l.font);if(s=t.getDistanceFromCenterForValue(t.ticks[r].value),l.showLabelBackdrop){e.font=c.string,a=e.measureText(o.label).width,e.fillStyle=l.backdropColor;const t=Be(l.backdropPadding);e.fillRect(-a/2-t.left,-s-c.size/2-t.top,a+t.width,c.size+t.height)}ee(e,o.label,0,-s,c,{color:l.color})})),e.restore()}drawTitle(){}}ea.id="radialLinear",ea.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Sn.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5}},ea.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},ea.descriptors={angleLines:{_fallback:"grid"}};const ia={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},na=Object.keys(ia);function oa(t,e){return t-e}function sa(t,e){if($(e))return null;const i=t._adapter,{parser:n,round:o,isoWeekday:s}=t._parseOpts;let a=e;return"function"==typeof n&&(a=n(a)),X(a)||(a="string"==typeof n?i.parse(a,n):i.parse(a)),null===a?null:(o&&(a="week"!==o||!Tt(s)&&!0!==s?i.startOf(a,o):i.startOf(a,"isoWeek",s)),+a)}function aa(t,e,i,n){const o=na.length;for(let s=na.indexOf(t);s<o-1;++s){const t=ia[na[s]],o=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((i-e)/(o*t.size))<=n)return na[s]}return na[o-1]}function ra(t,e,i){if(i){if(i.length){const{lo:n,hi:o}=oe(i,e);t[i[n]>=e?i[n]:i[o]]=!0}}else t[e]=!0}function la(t,e,i){const n=[],o={},s=e.length;let a,r;for(a=0;a<s;++a)r=e[a],o[r]=a,n.push({value:r,major:!1});return 0!==s&&i?function(t,e,i,n){const o=t._adapter,s=+o.startOf(e[0].value,n),a=e[e.length-1].value;let r,l;for(r=s;r<=a;r=+o.add(r,1,n))l=i[r],l>=0&&(e[l].major=!0);return e}(t,n,o,i):n}class ca extends En{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),n=this._adapter=new co._date(t.adapters.date);st(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:sa(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this,e=t.options,i=t._adapter,n=e.time.unit||"day";let{min:o,max:s,minDefined:a,maxDefined:r}=t.getUserBounds();function l(t){a||isNaN(t.min)||(o=Math.min(o,t.min)),r||isNaN(t.max)||(s=Math.max(s,t.max))}a&&r||(l(t._getLabelBounds()),"ticks"===e.bounds&&"labels"===e.ticks.source||l(t.getMinMax(!1))),o=X(o)&&!isNaN(o)?o:+i.startOf(Date.now(),n),s=X(s)&&!isNaN(s)?s:+i.endOf(Date.now(),n)+1,t.min=Math.min(o,s-1),t.max=Math.max(o+1,s)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this,e=t.options,i=e.time,n=e.ticks,o="labels"===n.source?t.getLabelTimestamps():t._generate();"ticks"===e.bounds&&o.length&&(t.min=t._userMin||o[0],t.max=t._userMax||o[o.length-1]);const s=t.min,a=re(o,s,t.max);return t._unit=i.unit||(n.autoSkip?aa(i.minUnit,t.min,t.max,t._getLabelCapacity(s)):function(t,e,i,n,o){for(let s=na.length-1;s>=na.indexOf(i);s--){const i=na[s];if(ia[i].common&&t._adapter.diff(o,n,i)>=e-1)return i}return na[i?na.indexOf(i):0]}(t,a.length,i.minUnit,t.min,t.max)),t._majorUnit=n.major.enabled&&"year"!==t._unit?function(t){for(let e=na.indexOf(t)+1,i=na.length;e<i;++e)if(ia[na[e]].common)return na[e]}(t._unit):void 0,t.initOffsets(o),e.reverse&&a.reverse(),la(t,a,t._majorUnit)}initOffsets(t){const e=this;let i,n,o=0,s=0;e.options.offset&&t.length&&(i=e.getDecimalForValue(t[0]),o=1===t.length?1-i:(e.getDecimalForValue(t[1])-i)/2,n=e.getDecimalForValue(t[t.length-1]),s=1===t.length?n:(n-e.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;o=Ht(o,0,a),s=Ht(s,0,a),e._offsets={start:o,end:s,factor:1/(o+1+s)}}_generate(){const t=this,e=t._adapter,i=t.min,n=t.max,o=t.options,s=o.time,a=s.unit||aa(s.minUnit,i,n,t._getLabelCapacity(i)),r=K(s.stepSize,1),l="week"===a&&s.isoWeekday,c=Tt(l)||!0===l,h={};let d,u,f=i;if(c&&(f=+e.startOf(f,"isoWeek",l)),f=+e.startOf(f,c?"day":a),e.diff(n,i,a)>1e5*r)throw new Error(i+" and "+n+" are too far apart with stepSize of "+r+" "+a);const g="data"===o.ticks.source&&t.getDataTimestamps();for(d=f,u=0;d<n;d=+e.add(d,r,a),u++)ra(h,d,g);return d!==n&&"ticks"!==o.bounds&&1!==u||ra(h,d,g),Object.keys(h).sort(((t,e)=>t-e)).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,n){const o=this,s=o.options,a=s.time.displayFormats,r=o._unit,l=o._majorUnit,c=r&&a[r],h=l&&a[l],d=i[e],u=l&&h&&d&&d.major,f=o._adapter.format(t,n||(u?h:c)),g=s.ticks.callback;return g?Q(g,[f,e,i],o):f}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e<i;++e)n=t[e],n.label=this._tickFormatFunction(n.value,e,t)}getDecimalForValue(t){const e=this;return null===t?NaN:(t-e.min)/(e.max-e.min)}getPixelForValue(t){const e=this,i=e._offsets,n=e.getDecimalForValue(t);return e.getPixelForDecimal((i.start+n)*i.factor)}getValueForPixel(t){const e=this,i=e._offsets,n=e.getDecimalForPixel(t)/i.factor-i.end;return e.min+n*(e.max-e.min)}_getLabelSize(t){const e=this,i=e.options.ticks,n=e.ctx.measureText(t).width,o=Et(e.isHorizontal()?i.maxRotation:i.minRotation),s=Math.cos(o),a=Math.sin(o),r=e._resolveTickFontOptions(0).size;return{w:n*s+r*a,h:n*a+r*s}}_getLabelCapacity(t){const e=this,i=e.options.time,n=i.displayFormats,o=n[i.unit]||n.millisecond,s=e._tickFormatFunction(t,0,la(e,[t],e._majorUnit),o),a=e._getLabelSize(s),r=Math.floor(e.isHorizontal()?e.width/a.w:e.height/a.h)-1;return r>0?r:1}getDataTimestamps(){const t=this;let e,i,n=t._cache.data||[];if(n.length)return n;const o=t.getMatchingVisibleMetas();if(t._normalized&&o.length)return t._cache.data=o[0].controller.getAllParsedValues(t);for(e=0,i=o.length;e<i;++e)n=n.concat(o[e].controller.getAllParsedValues(t));return t._cache.data=t.normalize(n)}getLabelTimestamps(){const t=this,e=t._cache.labels||[];let i,n;if(e.length)return e;const o=t.getLabels();for(i=0,n=o.length;i<n;++i)e.push(sa(t,o[i]));return t._cache.labels=t._normalized?e:t.normalize(e)}normalize(t){return de(t.sort(oa))}}function ha(t,e,i){let n,o,s,a,r=0,l=t.length-1;i?(e>=t[r].pos&&e<=t[l].pos&&({lo:r,hi:l}=se(t,"pos",e)),({pos:n,time:s}=t[r]),({pos:o,time:a}=t[l])):(e>=t[r].time&&e<=t[l].time&&({lo:r,hi:l}=se(t,"time",e)),({time:n,pos:s}=t[r]),({time:o,pos:a}=t[l]));const c=o-n;return c?s+(a-s)*(e-n)/c:s}ca.id="time",ca.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class da extends ca{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this,e=t._getTimestampsForTable(),i=t._table=t.buildLookupTable(e);t._minPos=ha(i,t.min),t._tableRange=ha(i,t.max)-t._minPos,super.initOffsets(e)}buildLookupTable(t){const{min:e,max:i}=this,n=[],o=[];let s,a,r,l,c;for(s=0,a=t.length;s<a;++s)l=t[s],l>=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(s=0,a=n.length;s<a;++s)c=n[s+1],r=n[s-1],l=n[s],Math.round((c+r)/2)!==l&&o.push({time:l,pos:s/(a-1)});return o}_getTimestampsForTable(){const t=this;let e=t._cache.all||[];if(e.length)return e;const i=t.getDataTimestamps(),n=t.getLabelTimestamps();return e=i.length&&n.length?t.normalize(i.concat(n)):i.length?i:n,e=t._cache.all=e,e}getDecimalForValue(t){return(ha(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this,i=e._offsets,n=e.getDecimalForPixel(t)/i.factor-i.end;return ha(e._table,n*e._tableRange+e._minPos,!0)}}da.id="timeseries",da.defaults=ca.defaults;var ua=Object.freeze({__proto__:null,CategoryScale:Ns,LinearScale:$s,LogarithmicScale:Us,RadialLinearScale:ea,TimeScale:ca,TimeSeriesScale:da});return oo.register(Po,ua,Zo,Vs),oo.helpers={...Ni},oo._adapters=co,oo.Animation=ln,oo.Animations=hn,oo.animator=a,oo.controllers=zn.controllers.items,oo.DatasetController=wn,oo.Element=Mn,oo.elements=Zo,oo.Interaction=Ae,oo.layouts=ti,oo.platforms=sn,oo.Scale=En,oo.Ticks=Sn,Object.assign(oo,Po,ua,Zo,Vs,sn),oo.Chart=oo,"undefined"!=typeof window&&(window.Chart=oo),oo}));
|
assets/js/reports/reports.js
CHANGED
@@ -1,368 +1,368 @@
|
|
1 |
-
jQuery( function ( $ ) {
|
2 |
-
|
3 |
-
// init chart blocks
|
4 |
-
$.each( $( '.dlm-reports-block-chart' ), function ( k, v ) {
|
5 |
-
new DLM_Reports_Block_Chart( v );
|
6 |
-
} );
|
7 |
-
|
8 |
-
$.each( $( '.dlm-reports-block-summary' ), function ( k, v ) {
|
9 |
-
new DLM_Reports_Block_Summary( v );
|
10 |
-
} );
|
11 |
-
|
12 |
-
$.each( $( '.dlm-reports-block-table' ), function ( k, v ) {
|
13 |
-
new DLM_Reports_Block_Table( v );
|
14 |
-
} );
|
15 |
-
|
16 |
-
$( '#total_downloads_browser_table' ).on( 'click', 'a', function ( e ) {
|
17 |
-
e.preventDefault();
|
18 |
-
|
19 |
-
var target = $( this ).attr( 'href' );
|
20 |
-
$( this ).addClass( 'nav-tab-active' );
|
21 |
-
$( '#total_downloads_browser_table' ).find( 'a' ).not( $( this ) ).removeClass( 'nav-tab-active' );
|
22 |
-
$( target ).removeClass( 'hidden' );
|
23 |
-
$( '#total_downloads_browser_table' ).find( 'table' ).not( $( target ) ).addClass( 'hidden' );
|
24 |
-
} );
|
25 |
-
|
26 |
-
} );
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Creates a loader obj used in report blocks
|
30 |
-
*
|
31 |
-
* @returns {Element}
|
32 |
-
* @constructor
|
33 |
-
*/
|
34 |
-
function DLM_createLoaderObj() {
|
35 |
-
var loaderObj = document.createElement( "div" );
|
36 |
-
loaderObj = jQuery( loaderObj );
|
37 |
-
loaderObj.addClass( 'dlm_reports_loader' );
|
38 |
-
|
39 |
-
var loaderImgObj = document.createElement( "img" );
|
40 |
-
loaderImgObj = jQuery( loaderImgObj );
|
41 |
-
loaderImgObj.attr( 'src', dlm_rs.img_path + 'ajax-loader.gif' );
|
42 |
-
|
43 |
-
loaderObj.append( loaderImgObj );
|
44 |
-
|
45 |
-
return loaderObj;
|
46 |
-
}
|
47 |
-
|
48 |
-
/**
|
49 |
-
* DLM_Reports_Data
|
50 |
-
*
|
51 |
-
* @param el
|
52 |
-
* @constructor
|
53 |
-
*/
|
54 |
-
var DLM_Reports_Data = function ( el ) {
|
55 |
-
this.type = null;
|
56 |
-
this.from = null;
|
57 |
-
this.to = null;
|
58 |
-
this.period = null;
|
59 |
-
|
60 |
-
this.init = function ( el ) {
|
61 |
-
this.type = jQuery( el ).data( 'type' );
|
62 |
-
this.to = jQuery( el ).data( 'to' );
|
63 |
-
this.from = jQuery( el ).data( 'from' );
|
64 |
-
this.period = jQuery( el ).data( 'period' );
|
65 |
-
};
|
66 |
-
this.init( el );
|
67 |
-
};
|
68 |
-
|
69 |
-
/**
|
70 |
-
* DLM_Reports_Data_Fetch
|
71 |
-
*
|
72 |
-
* @param id
|
73 |
-
* @param data
|
74 |
-
* @param cb
|
75 |
-
* @constructor
|
76 |
-
*/
|
77 |
-
var DLM_Reports_Data_Fetch = function ( id, data, cb ) {
|
78 |
-
this.id = id;
|
79 |
-
this.data = data;
|
80 |
-
this.cb = cb;
|
81 |
-
this.fetch();
|
82 |
-
};
|
83 |
-
|
84 |
-
DLM_Reports_Data_Fetch.prototype.fetch = function () {
|
85 |
-
var id = this.id;
|
86 |
-
var cb = this.cb;
|
87 |
-
var from = this.data.from;
|
88 |
-
var to = this.data.to;
|
89 |
-
var period = this.data.period;
|
90 |
-
jQuery.get( ajaxurl, {
|
91 |
-
action: 'dlm_reports_data',
|
92 |
-
nonce: dlm_rs.ajax_nonce,
|
93 |
-
id: id,
|
94 |
-
from: from,
|
95 |
-
to: to,
|
96 |
-
period: period
|
97 |
-
}, function ( response ) {
|
98 |
-
cb( response );
|
99 |
-
} );
|
100 |
-
};
|
101 |
-
|
102 |
-
/**
|
103 |
-
* DLM_Reports_Block_Chart
|
104 |
-
*
|
105 |
-
* @param c
|
106 |
-
* @constructor
|
107 |
-
*/
|
108 |
-
var DLM_Reports_Block_Chart = function ( c ) {
|
109 |
-
|
110 |
-
this.container = c;
|
111 |
-
this.id = null;
|
112 |
-
|
113 |
-
this.queryData = null;
|
114 |
-
|
115 |
-
this.data = null;
|
116 |
-
this.chart = null;
|
117 |
-
|
118 |
-
this.setup = function () {
|
119 |
-
this.id = jQuery( this.container ).attr( 'id' );
|
120 |
-
this.queryData = new DLM_Reports_Data( this.container );
|
121 |
-
this.displayLoader();
|
122 |
-
this.fetch();
|
123 |
-
};
|
124 |
-
|
125 |
-
this.setup();
|
126 |
-
|
127 |
-
};
|
128 |
-
|
129 |
-
DLM_Reports_Block_Chart.prototype.displayLoader = function () {
|
130 |
-
jQuery( this.container ).append( DLM_createLoaderObj() );
|
131 |
-
};
|
132 |
-
|
133 |
-
DLM_Reports_Block_Chart.prototype.hideLoader = function () {
|
134 |
-
jQuery( this.container ).find( '.dlm_reports_loader' ).remove();
|
135 |
-
};
|
136 |
-
|
137 |
-
DLM_Reports_Block_Chart.prototype.fetch = function () {
|
138 |
-
var instance = this;
|
139 |
-
new DLM_Reports_Data_Fetch( this.id, this.queryData, function ( response ) {
|
140 |
-
instance.data = response;
|
141 |
-
instance.hideLoader();
|
142 |
-
instance.render();
|
143 |
-
} );
|
144 |
-
};
|
145 |
-
|
146 |
-
DLM_Reports_Block_Chart.prototype.render = function () {
|
147 |
-
if ( this.data === null ) {
|
148 |
-
return;
|
149 |
-
}
|
150 |
-
var chartId = document.getElementById('total_downloads_chart');
|
151 |
-
this.chart = new Chart( chartId, {
|
152 |
-
title: "",
|
153 |
-
data: this.data,
|
154 |
-
type: this.queryData.type,
|
155 |
-
height: 250,
|
156 |
-
show_dots: 0,
|
157 |
-
x_axis_mode: "tick",
|
158 |
-
y_axis_mode: "span",
|
159 |
-
is_series: 1,
|
160 |
-
} );
|
161 |
-
};
|
162 |
-
|
163 |
-
/**
|
164 |
-
* DLM_Reports_Block_Summary
|
165 |
-
*
|
166 |
-
* @param c
|
167 |
-
* @constructor
|
168 |
-
*/
|
169 |
-
var DLM_Reports_Block_Summary = function ( c ) {
|
170 |
-
|
171 |
-
this.container = c;
|
172 |
-
this.id = null;
|
173 |
-
|
174 |
-
this.data = null;
|
175 |
-
|
176 |
-
this.data = null;
|
177 |
-
this.chart = null;
|
178 |
-
|
179 |
-
this.setup = function () {
|
180 |
-
this.id = jQuery( this.container ).attr( 'id' );
|
181 |
-
this.data = new DLM_Reports_Data( this.container );
|
182 |
-
this.displayLoader();
|
183 |
-
this.fetch();
|
184 |
-
};
|
185 |
-
|
186 |
-
this.setup();
|
187 |
-
|
188 |
-
};
|
189 |
-
|
190 |
-
DLM_Reports_Block_Summary.prototype.displayLoader = function () {
|
191 |
-
jQuery( this.container ).append( DLM_createLoaderObj() );
|
192 |
-
};
|
193 |
-
|
194 |
-
DLM_Reports_Block_Summary.prototype.hideLoader = function () {
|
195 |
-
jQuery( this.container ).find( '.dlm_reports_loader' ).remove();
|
196 |
-
};
|
197 |
-
|
198 |
-
DLM_Reports_Block_Summary.prototype.fetch = function () {
|
199 |
-
var instance = this;
|
200 |
-
new DLM_Reports_Data_Fetch( this.id, this.data, function ( response ) {
|
201 |
-
instance.data = response;
|
202 |
-
instance.hideLoader();
|
203 |
-
instance.render();
|
204 |
-
} );
|
205 |
-
};
|
206 |
-
|
207 |
-
DLM_Reports_Block_Summary.prototype.render = function () {
|
208 |
-
if ( this.data === null ) {
|
209 |
-
return;
|
210 |
-
}
|
211 |
-
|
212 |
-
var instance = this;
|
213 |
-
|
214 |
-
jQuery.each( this.data, function ( k, v ) {
|
215 |
-
if ( jQuery( instance.container ).find( '#' + k ) ) {
|
216 |
-
jQuery( instance.container ).find( '#' + k ).find( 'span:first' ).html( v );
|
217 |
-
}
|
218 |
-
} );
|
219 |
-
};
|
220 |
-
|
221 |
-
/**
|
222 |
-
* DLM_Reports_Block_Table
|
223 |
-
*
|
224 |
-
* @param c
|
225 |
-
* @constructor
|
226 |
-
*/
|
227 |
-
var DLM_Reports_Block_Table = function ( c ) {
|
228 |
-
|
229 |
-
this.container = c;
|
230 |
-
this.id = null;
|
231 |
-
|
232 |
-
this.data = null;
|
233 |
-
|
234 |
-
this.data = null;
|
235 |
-
this.chart = null;
|
236 |
-
|
237 |
-
this.setup = function () {
|
238 |
-
this.id = jQuery( this.container ).attr( 'id' );
|
239 |
-
this.data = new DLM_Reports_Data( this.container );
|
240 |
-
this.displayLoader();
|
241 |
-
this.fetch();
|
242 |
-
};
|
243 |
-
|
244 |
-
this.setup();
|
245 |
-
|
246 |
-
};
|
247 |
-
|
248 |
-
DLM_Reports_Block_Table.prototype.displayLoader = function () {
|
249 |
-
jQuery( this.container ).append( DLM_createLoaderObj() );
|
250 |
-
};
|
251 |
-
|
252 |
-
DLM_Reports_Block_Table.prototype.hideLoader = function () {
|
253 |
-
jQuery( this.container ).find( '.dlm_reports_loader' ).remove();
|
254 |
-
};
|
255 |
-
|
256 |
-
DLM_Reports_Block_Table.prototype.fetch = function () {
|
257 |
-
var instance = this;
|
258 |
-
new DLM_Reports_Data_Fetch( this.id, this.data, function ( response ) {
|
259 |
-
instance.data = response;
|
260 |
-
instance.hideLoader();
|
261 |
-
instance.render();
|
262 |
-
} );
|
263 |
-
};
|
264 |
-
|
265 |
-
DLM_Reports_Block_Table.prototype.render = function () {
|
266 |
-
if ( this.data === null || (this.data.length < 2 && 'undefined' === typeof this.data['total_downloads_browser_table']) ) {
|
267 |
-
return;
|
268 |
-
}
|
269 |
-
|
270 |
-
var instance = this;
|
271 |
-
|
272 |
-
if ( 'undefined' !== typeof this.data['total_downloads_browser_table'] ) {
|
273 |
-
|
274 |
-
var $data = this.data['total_downloads_browser_table'];
|
275 |
-
var navigation = '<h2 class="dlm-reports-tab-navigation nav-tab-wrapper">';
|
276 |
-
jQuery( this.container ).html( '' );
|
277 |
-
jQuery( this.container ).append('<div class="">');
|
278 |
-
|
279 |
-
Object.keys( $data ).forEach( key => {
|
280 |
-
|
281 |
-
// the table
|
282 |
-
var table = jQuery( document.createElement( 'table' ) );
|
283 |
-
var table_class = 'hidden';
|
284 |
-
var link_class = '';
|
285 |
-
|
286 |
-
if ( 'desktop' == key ) {
|
287 |
-
table_class = '';
|
288 |
-
link_class = 'nav-tab-active';
|
289 |
-
}
|
290 |
-
|
291 |
-
navigation += '<a href="#' + key + '" class="nav-tab ' + link_class + '">' + key + '</a>';
|
292 |
-
|
293 |
-
table.attr( 'cellspacing', 0 ).attr( 'cellpadding', 0 ).attr( 'border', 0 ).attr( 'id', key ).attr( 'class', table_class );
|
294 |
-
|
295 |
-
// setup header row
|
296 |
-
var headerRow = document.createElement( 'tr' );
|
297 |
-
|
298 |
-
for ( var i = 0; i < $data[key][0].length; i++ ) {
|
299 |
-
|
300 |
-
var th = document.createElement( 'th' );
|
301 |
-
th.innerHTML = $data[key][0][i];
|
302 |
-
headerRow.appendChild( th );
|
303 |
-
}
|
304 |
-
|
305 |
-
// append header row
|
306 |
-
table.append( headerRow );
|
307 |
-
|
308 |
-
for ( var i = 1; i < $data[key].length; i++ ) {
|
309 |
-
// new row
|
310 |
-
var tr = document.createElement( 'tr' );
|
311 |
-
|
312 |
-
// loop
|
313 |
-
for ( var j = 0; j < $data[key][i].length; j++ ) {
|
314 |
-
var td = document.createElement( 'td' );
|
315 |
-
td.innerHTML = $data[key][i][j];
|
316 |
-
tr.appendChild( td );
|
317 |
-
}
|
318 |
-
// append row
|
319 |
-
table.append( tr );
|
320 |
-
}
|
321 |
-
|
322 |
-
// put table in container
|
323 |
-
jQuery( this.container ).append( table );
|
324 |
-
} );
|
325 |
-
|
326 |
-
navigation += '</div>';
|
327 |
-
|
328 |
-
jQuery( this.container ).prepend( navigation );
|
329 |
-
|
330 |
-
} else {
|
331 |
-
|
332 |
-
// the table
|
333 |
-
var table = jQuery( document.createElement( 'table' ) );
|
334 |
-
|
335 |
-
table.attr( 'cellspacing', 0 ).attr( 'cellpadding', 0 ).attr( 'border', 0 );
|
336 |
-
|
337 |
-
// setup header row
|
338 |
-
var headerRow = document.createElement( 'tr' );
|
339 |
-
|
340 |
-
for ( var i = 0; i < this.data[0].length; i++ ) {
|
341 |
-
var th = document.createElement( 'th' );
|
342 |
-
th.innerHTML = this.data[0][i];
|
343 |
-
headerRow.appendChild( th );
|
344 |
-
}
|
345 |
-
|
346 |
-
// append header row
|
347 |
-
table.append( headerRow );
|
348 |
-
|
349 |
-
for ( var i = 1; i < this.data.length; i++ ) {
|
350 |
-
// new row
|
351 |
-
var tr = document.createElement( 'tr' );
|
352 |
-
|
353 |
-
// loop
|
354 |
-
for ( var j = 0; j < this.data[i].length; j++ ) {
|
355 |
-
var td = document.createElement( 'td' );
|
356 |
-
td.innerHTML = this.data[i][j];
|
357 |
-
tr.appendChild( td );
|
358 |
-
}
|
359 |
-
|
360 |
-
// append row
|
361 |
-
table.append( tr );
|
362 |
-
}
|
363 |
-
|
364 |
-
// put table in container
|
365 |
-
jQuery( this.container ).html( '' ).append( table );
|
366 |
-
}
|
367 |
-
|
368 |
};
|
1 |
+
jQuery( function ( $ ) {
|
2 |
+
|
3 |
+
// init chart blocks
|
4 |
+
$.each( $( '.dlm-reports-block-chart' ), function ( k, v ) {
|
5 |
+
new DLM_Reports_Block_Chart( v );
|
6 |
+
} );
|
7 |
+
|
8 |
+
$.each( $( '.dlm-reports-block-summary' ), function ( k, v ) {
|
9 |
+
new DLM_Reports_Block_Summary( v );
|
10 |
+
} );
|
11 |
+
|
12 |
+
$.each( $( '.dlm-reports-block-table' ), function ( k, v ) {
|
13 |
+
new DLM_Reports_Block_Table( v );
|
14 |
+
} );
|
15 |
+
|
16 |
+
$( '#total_downloads_browser_table' ).on( 'click', 'a', function ( e ) {
|
17 |
+
e.preventDefault();
|
18 |
+
|
19 |
+
var target = $( this ).attr( 'href' );
|
20 |
+
$( this ).addClass( 'nav-tab-active' );
|
21 |
+
$( '#total_downloads_browser_table' ).find( 'a' ).not( $( this ) ).removeClass( 'nav-tab-active' );
|
22 |
+
$( target ).removeClass( 'hidden' );
|
23 |
+
$( '#total_downloads_browser_table' ).find( 'table' ).not( $( target ) ).addClass( 'hidden' );
|
24 |
+
} );
|
25 |
+
|
26 |
+
} );
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Creates a loader obj used in report blocks
|
30 |
+
*
|
31 |
+
* @returns {Element}
|
32 |
+
* @constructor
|
33 |
+
*/
|
34 |
+
function DLM_createLoaderObj() {
|
35 |
+
var loaderObj = document.createElement( "div" );
|
36 |
+
loaderObj = jQuery( loaderObj );
|
37 |
+
loaderObj.addClass( 'dlm_reports_loader' );
|
38 |
+
|
39 |
+
var loaderImgObj = document.createElement( "img" );
|
40 |
+
loaderImgObj = jQuery( loaderImgObj );
|
41 |
+
loaderImgObj.attr( 'src', dlm_rs.img_path + 'ajax-loader.gif' );
|
42 |
+
|
43 |
+
loaderObj.append( loaderImgObj );
|
44 |
+
|
45 |
+
return loaderObj;
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* DLM_Reports_Data
|
50 |
+
*
|
51 |
+
* @param el
|
52 |
+
* @constructor
|
53 |
+
*/
|
54 |
+
var DLM_Reports_Data = function ( el ) {
|
55 |
+
this.type = null;
|
56 |
+
this.from = null;
|
57 |
+
this.to = null;
|
58 |
+
this.period = null;
|
59 |
+
|
60 |
+
this.init = function ( el ) {
|
61 |
+
this.type = jQuery( el ).data( 'type' );
|
62 |
+
this.to = jQuery( el ).data( 'to' );
|
63 |
+
this.from = jQuery( el ).data( 'from' );
|
64 |
+
this.period = jQuery( el ).data( 'period' );
|
65 |
+
};
|
66 |
+
this.init( el );
|
67 |
+
};
|
68 |
+
|
69 |
+
/**
|
70 |
+
* DLM_Reports_Data_Fetch
|
71 |
+
*
|
72 |
+
* @param id
|
73 |
+
* @param data
|
74 |
+
* @param cb
|
75 |
+
* @constructor
|
76 |
+
*/
|
77 |
+
var DLM_Reports_Data_Fetch = function ( id, data, cb ) {
|
78 |
+
this.id = id;
|
79 |
+
this.data = data;
|
80 |
+
this.cb = cb;
|
81 |
+
this.fetch();
|
82 |
+
};
|
83 |
+
|
84 |
+
DLM_Reports_Data_Fetch.prototype.fetch = function () {
|
85 |
+
var id = this.id;
|
86 |
+
var cb = this.cb;
|
87 |
+
var from = this.data.from;
|
88 |
+
var to = this.data.to;
|
89 |
+
var period = this.data.period;
|
90 |
+
jQuery.get( ajaxurl, {
|
91 |
+
action: 'dlm_reports_data',
|
92 |
+
nonce: dlm_rs.ajax_nonce,
|
93 |
+
id: id,
|
94 |
+
from: from,
|
95 |
+
to: to,
|
96 |
+
period: period
|
97 |
+
}, function ( response ) {
|
98 |
+
cb( response );
|
99 |
+
} );
|
100 |
+
};
|
101 |
+
|
102 |
+
/**
|
103 |
+
* DLM_Reports_Block_Chart
|
104 |
+
*
|
105 |
+
* @param c
|
106 |
+
* @constructor
|
107 |
+
*/
|
108 |
+
var DLM_Reports_Block_Chart = function ( c ) {
|
109 |
+
|
110 |
+
this.container = c;
|
111 |
+
this.id = null;
|
112 |
+
|
113 |
+
this.queryData = null;
|
114 |
+
|
115 |
+
this.data = null;
|
116 |
+
this.chart = null;
|
117 |
+
|
118 |
+
this.setup = function () {
|
119 |
+
this.id = jQuery( this.container ).attr( 'id' );
|
120 |
+
this.queryData = new DLM_Reports_Data( this.container );
|
121 |
+
this.displayLoader();
|
122 |
+
this.fetch();
|
123 |
+
};
|
124 |
+
|
125 |
+
this.setup();
|
126 |
+
|
127 |
+
};
|
128 |
+
|
129 |
+
DLM_Reports_Block_Chart.prototype.displayLoader = function () {
|
130 |
+
jQuery( this.container ).append( DLM_createLoaderObj() );
|
131 |
+
};
|
132 |
+
|
133 |
+
DLM_Reports_Block_Chart.prototype.hideLoader = function () {
|
134 |
+
jQuery( this.container ).find( '.dlm_reports_loader' ).remove();
|
135 |
+
};
|
136 |
+
|
137 |
+
DLM_Reports_Block_Chart.prototype.fetch = function () {
|
138 |
+
var instance = this;
|
139 |
+
new DLM_Reports_Data_Fetch( this.id, this.queryData, function ( response ) {
|
140 |
+
instance.data = response;
|
141 |
+
instance.hideLoader();
|
142 |
+
instance.render();
|
143 |
+
} );
|
144 |
+
};
|
145 |
+
|
146 |
+
DLM_Reports_Block_Chart.prototype.render = function () {
|
147 |
+
if ( this.data === null ) {
|
148 |
+
return;
|
149 |
+
}
|
150 |
+
var chartId = document.getElementById('total_downloads_chart');
|
151 |
+
this.chart = new Chart( chartId, {
|
152 |
+
title: "",
|
153 |
+
data: this.data,
|
154 |
+
type: this.queryData.type,
|
155 |
+
height: 250,
|
156 |
+
show_dots: 0,
|
157 |
+
x_axis_mode: "tick",
|
158 |
+
y_axis_mode: "span",
|
159 |
+
is_series: 1,
|
160 |
+
} );
|
161 |
+
};
|
162 |
+
|
163 |
+
/**
|
164 |
+
* DLM_Reports_Block_Summary
|
165 |
+
*
|
166 |
+
* @param c
|
167 |
+
* @constructor
|
168 |
+
*/
|
169 |
+
var DLM_Reports_Block_Summary = function ( c ) {
|
170 |
+
|
171 |
+
this.container = c;
|
172 |
+
this.id = null;
|
173 |
+
|
174 |
+
this.data = null;
|
175 |
+
|
176 |
+
this.data = null;
|
177 |
+
this.chart = null;
|
178 |
+
|
179 |
+
this.setup = function () {
|
180 |
+
this.id = jQuery( this.container ).attr( 'id' );
|
181 |
+
this.data = new DLM_Reports_Data( this.container );
|
182 |
+
this.displayLoader();
|
183 |
+
this.fetch();
|
184 |
+
};
|
185 |
+
|
186 |
+
this.setup();
|
187 |
+
|
188 |
+
};
|
189 |
+
|
190 |
+
DLM_Reports_Block_Summary.prototype.displayLoader = function () {
|
191 |
+
jQuery( this.container ).append( DLM_createLoaderObj() );
|
192 |
+
};
|
193 |
+
|
194 |
+
DLM_Reports_Block_Summary.prototype.hideLoader = function () {
|
195 |
+
jQuery( this.container ).find( '.dlm_reports_loader' ).remove();
|
196 |
+
};
|
197 |
+
|
198 |
+
DLM_Reports_Block_Summary.prototype.fetch = function () {
|
199 |
+
var instance = this;
|
200 |
+
new DLM_Reports_Data_Fetch( this.id, this.data, function ( response ) {
|
201 |
+
instance.data = response;
|
202 |
+
instance.hideLoader();
|
203 |
+
instance.render();
|
204 |
+
} );
|
205 |
+
};
|
206 |
+
|
207 |
+
DLM_Reports_Block_Summary.prototype.render = function () {
|
208 |
+
if ( this.data === null ) {
|
209 |
+
return;
|
210 |
+
}
|
211 |
+
|
212 |
+
var instance = this;
|
213 |
+
|
214 |
+
jQuery.each( this.data, function ( k, v ) {
|
215 |
+
if ( jQuery( instance.container ).find( '#' + k ) ) {
|
216 |
+
jQuery( instance.container ).find( '#' + k ).find( 'span:first' ).html( v );
|
217 |
+
}
|
218 |
+
} );
|
219 |
+
};
|
220 |
+
|
221 |
+
/**
|
222 |
+
* DLM_Reports_Block_Table
|
223 |
+
*
|
224 |
+
* @param c
|
225 |
+
* @constructor
|
226 |
+
*/
|
227 |
+
var DLM_Reports_Block_Table = function ( c ) {
|
228 |
+
|
229 |
+
this.container = c;
|
230 |
+
this.id = null;
|
231 |
+
|
232 |
+
this.data = null;
|
233 |
+
|
234 |
+
this.data = null;
|
235 |
+
this.chart = null;
|
236 |
+
|
237 |
+
this.setup = function () {
|
238 |
+
this.id = jQuery( this.container ).attr( 'id' );
|
239 |
+
this.data = new DLM_Reports_Data( this.container );
|
240 |
+
this.displayLoader();
|
241 |
+
this.fetch();
|
242 |
+
};
|
243 |
+
|
244 |
+
this.setup();
|
245 |
+
|
246 |
+
};
|
247 |
+
|
248 |
+
DLM_Reports_Block_Table.prototype.displayLoader = function () {
|
249 |
+
jQuery( this.container ).append( DLM_createLoaderObj() );
|
250 |
+
};
|
251 |
+
|
252 |
+
DLM_Reports_Block_Table.prototype.hideLoader = function () {
|
253 |
+
jQuery( this.container ).find( '.dlm_reports_loader' ).remove();
|
254 |
+
};
|
255 |
+
|
256 |
+
DLM_Reports_Block_Table.prototype.fetch = function () {
|
257 |
+
var instance = this;
|
258 |
+
new DLM_Reports_Data_Fetch( this.id, this.data, function ( response ) {
|
259 |
+
instance.data = response;
|
260 |
+
instance.hideLoader();
|
261 |
+
instance.render();
|
262 |
+
} );
|
263 |
+
};
|
264 |
+
|
265 |
+
DLM_Reports_Block_Table.prototype.render = function () {
|
266 |
+
if ( this.data === null || (this.data.length < 2 && 'undefined' === typeof this.data['total_downloads_browser_table']) ) {
|
267 |
+
return;
|
268 |
+
}
|
269 |
+
|
270 |
+
var instance = this;
|
271 |
+
|
272 |
+
if ( 'undefined' !== typeof this.data['total_downloads_browser_table'] ) {
|
273 |
+
|
274 |
+
var $data = this.data['total_downloads_browser_table'];
|
275 |
+
var navigation = '<h2 class="dlm-reports-tab-navigation nav-tab-wrapper">';
|
276 |
+
jQuery( this.container ).html( '' );
|
277 |
+
jQuery( this.container ).append('<div class="">');
|
278 |
+
|
279 |
+
Object.keys( $data ).forEach( key => {
|
280 |
+
|
281 |
+
// the table
|
282 |
+
var table = jQuery( document.createElement( 'table' ) );
|
283 |
+
var table_class = 'hidden';
|
284 |
+
var link_class = '';
|
285 |
+
|
286 |
+
if ( 'desktop' == key ) {
|
287 |
+
table_class = '';
|
288 |
+
link_class = 'nav-tab-active';
|
289 |
+
}
|
290 |
+
|
291 |
+
navigation += '<a href="#' + key + '" class="nav-tab ' + link_class + '">' + key + '</a>';
|
292 |
+
|
293 |
+
table.attr( 'cellspacing', 0 ).attr( 'cellpadding', 0 ).attr( 'border', 0 ).attr( 'id', key ).attr( 'class', table_class );
|
294 |
+
|
295 |
+
// setup header row
|
296 |
+
var headerRow = document.createElement( 'tr' );
|
297 |
+
|
298 |
+
for ( var i = 0; i < $data[key][0].length; i++ ) {
|
299 |
+
|
300 |
+
var th = document.createElement( 'th' );
|
301 |
+
th.innerHTML = $data[key][0][i];
|
302 |
+
headerRow.appendChild( th );
|
303 |
+
}
|
304 |
+
|
305 |
+
// append header row
|
306 |
+
table.append( headerRow );
|
307 |
+
|
308 |
+
for ( var i = 1; i < $data[key].length; i++ ) {
|
309 |
+
// new row
|
310 |
+
var tr = document.createElement( 'tr' );
|
311 |
+
|
312 |
+
// loop
|
313 |
+
for ( var j = 0; j < $data[key][i].length; j++ ) {
|
314 |
+
var td = document.createElement( 'td' );
|
315 |
+
td.innerHTML = $data[key][i][j];
|
316 |
+
tr.appendChild( td );
|
317 |
+
}
|
318 |
+
// append row
|
319 |
+
table.append( tr );
|
320 |
+
}
|
321 |
+
|
322 |
+
// put table in container
|
323 |
+
jQuery( this.container ).append( table );
|
324 |
+
} );
|
325 |
+
|
326 |
+
navigation += '</div>';
|
327 |
+
|
328 |
+
jQuery( this.container ).prepend( navigation );
|
329 |
+
|
330 |
+
} else {
|
331 |
+
|
332 |
+
// the table
|
333 |
+
var table = jQuery( document.createElement( 'table' ) );
|
334 |
+
|
335 |
+
table.attr( 'cellspacing', 0 ).attr( 'cellpadding', 0 ).attr( 'border', 0 );
|
336 |
+
|
337 |
+
// setup header row
|
338 |
+
var headerRow = document.createElement( 'tr' );
|
339 |
+
|
340 |
+
for ( var i = 0; i < this.data[0].length; i++ ) {
|
341 |
+
var th = document.createElement( 'th' );
|
342 |
+
th.innerHTML = this.data[0][i];
|
343 |
+
headerRow.appendChild( th );
|
344 |
+
}
|
345 |
+
|
346 |
+
// append header row
|
347 |
+
table.append( headerRow );
|
348 |
+
|
349 |
+
for ( var i = 1; i < this.data.length; i++ ) {
|
350 |
+
// new row
|
351 |
+
var tr = document.createElement( 'tr' );
|
352 |
+
|
353 |
+
// loop
|
354 |
+
for ( var j = 0; j < this.data[i].length; j++ ) {
|
355 |
+
var td = document.createElement( 'td' );
|
356 |
+
td.innerHTML = this.data[i][j];
|
357 |
+
tr.appendChild( td );
|
358 |
+
}
|
359 |
+
|
360 |
+
// append row
|
361 |
+
table.append( tr );
|
362 |
+
}
|
363 |
+
|
364 |
+
// put table in container
|
365 |
+
jQuery( this.container ).html( '' ).append( table );
|
366 |
+
}
|
367 |
+
|
368 |
};
|
assets/js/reports/reports.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function DLM_createLoaderObj(){var t=document.createElement("div")
|
1 |
+
function DLM_createLoaderObj(){var t=document.createElement("div"),e=((t=jQuery(t)).addClass("dlm_reports_loader"),document.createElement("img"));return(e=jQuery(e)).attr("src",dlm_rs.img_path+"ajax-loader.gif"),t.append(e),t}jQuery(function(e){e.each(e(".dlm-reports-block-chart"),function(t,e){new DLM_Reports_Block_Chart(e)}),e.each(e(".dlm-reports-block-summary"),function(t,e){new DLM_Reports_Block_Summary(e)}),e.each(e(".dlm-reports-block-table"),function(t,e){new DLM_Reports_Block_Table(e)}),e("#total_downloads_browser_table").on("click","a",function(t){t.preventDefault();t=e(this).attr("href");e(this).addClass("nav-tab-active"),e("#total_downloads_browser_table").find("a").not(e(this)).removeClass("nav-tab-active"),e(t).removeClass("hidden"),e("#total_downloads_browser_table").find("table").not(e(t)).addClass("hidden")})});var DLM_Reports_Data=function(t){this.type=null,this.from=null,this.to=null,this.period=null,this.init=function(t){this.type=jQuery(t).data("type"),this.to=jQuery(t).data("to"),this.from=jQuery(t).data("from"),this.period=jQuery(t).data("period")},this.init(t)},DLM_Reports_Data_Fetch=function(t,e,a){this.id=t,this.data=e,this.cb=a,this.fetch()},DLM_Reports_Block_Chart=(DLM_Reports_Data_Fetch.prototype.fetch=function(){var t=this.id,e=this.cb,a=this.data.from,r=this.data.to,n=this.data.period;jQuery.get(ajaxurl,{action:"dlm_reports_data",nonce:dlm_rs.ajax_nonce,id:t,from:a,to:r,period:n},function(t){e(t)})},function(t){this.container=t,this.id=null,this.queryData=null,this.data=null,this.chart=null,this.setup=function(){this.id=jQuery(this.container).attr("id"),this.queryData=new DLM_Reports_Data(this.container),this.displayLoader(),this.fetch()},this.setup()}),DLM_Reports_Block_Summary=(DLM_Reports_Block_Chart.prototype.displayLoader=function(){jQuery(this.container).append(DLM_createLoaderObj())},DLM_Reports_Block_Chart.prototype.hideLoader=function(){jQuery(this.container).find(".dlm_reports_loader").remove()},DLM_Reports_Block_Chart.prototype.fetch=function(){var e=this;new DLM_Reports_Data_Fetch(this.id,this.queryData,function(t){e.data=t,e.hideLoader(),e.render()})},DLM_Reports_Block_Chart.prototype.render=function(){var t;null!==this.data&&(t=document.getElementById("total_downloads_chart"),this.chart=new Chart(t,{title:"",data:this.data,type:this.queryData.type,height:250,show_dots:0,x_axis_mode:"tick",y_axis_mode:"span",is_series:1}))},function(t){this.container=t,this.id=null,this.data=null,this.data=null,this.chart=null,this.setup=function(){this.id=jQuery(this.container).attr("id"),this.data=new DLM_Reports_Data(this.container),this.displayLoader(),this.fetch()},this.setup()}),DLM_Reports_Block_Table=(DLM_Reports_Block_Summary.prototype.displayLoader=function(){jQuery(this.container).append(DLM_createLoaderObj())},DLM_Reports_Block_Summary.prototype.hideLoader=function(){jQuery(this.container).find(".dlm_reports_loader").remove()},DLM_Reports_Block_Summary.prototype.fetch=function(){var e=this;new DLM_Reports_Data_Fetch(this.id,this.data,function(t){e.data=t,e.hideLoader(),e.render()})},DLM_Reports_Block_Summary.prototype.render=function(){var a;null!==this.data&&(a=this,jQuery.each(this.data,function(t,e){jQuery(a.container).find("#"+t)&&jQuery(a.container).find("#"+t).find("span:first").html(e)}))},function(t){this.container=t,this.id=null,this.data=null,this.data=null,this.chart=null,this.setup=function(){this.id=jQuery(this.container).attr("id"),this.data=new DLM_Reports_Data(this.container),this.displayLoader(),this.fetch()},this.setup()});DLM_Reports_Block_Table.prototype.displayLoader=function(){jQuery(this.container).append(DLM_createLoaderObj())},DLM_Reports_Block_Table.prototype.hideLoader=function(){jQuery(this.container).find(".dlm_reports_loader").remove()},DLM_Reports_Block_Table.prototype.fetch=function(){var e=this;new DLM_Reports_Data_Fetch(this.id,this.data,function(t){e.data=t,e.hideLoader(),e.render()})},DLM_Reports_Block_Table.prototype.render=function(){if(!(null===this.data||this.data.length<2&&void 0===this.data.total_downloads_browser_table))if(void 0!==this.data.total_downloads_browser_table){var l=this.data.total_downloads_browser_table,c='<h2 class="dlm-reports-tab-navigation nav-tab-wrapper">';jQuery(this.container).html(""),jQuery(this.container).append('<div class="">'),Object.keys(l).forEach(t=>{for(var e=jQuery(document.createElement("table")),a="hidden",r="",n=("desktop"==t&&(a="",r="nav-tab-active"),c+='<a href="#'+t+'" class="nav-tab '+r+'">'+t+"</a>",e.attr("cellspacing",0).attr("cellpadding",0).attr("border",0).attr("id",t).attr("class",a),document.createElement("tr")),o=0;o<l[t][0].length;o++){var i=document.createElement("th");i.innerHTML=l[t][0][o],n.appendChild(i)}e.append(n);for(o=1;o<l[t].length;o++){for(var s=document.createElement("tr"),d=0;d<l[t][o].length;d++){var h=document.createElement("td");h.innerHTML=l[t][o][d],s.appendChild(h)}e.append(s)}jQuery(this.container).append(e)}),c+="</div>",jQuery(this.container).prepend(c)}else{for(var t=jQuery(document.createElement("table")),e=(t.attr("cellspacing",0).attr("cellpadding",0).attr("border",0),document.createElement("tr")),a=0;a<this.data[0].length;a++){var r=document.createElement("th");r.innerHTML=this.data[0][a],e.appendChild(r)}t.append(e);for(a=1;a<this.data.length;a++){for(var n=document.createElement("tr"),o=0;o<this.data[a].length;o++){var i=document.createElement("td");i.innerHTML=this.data[a][o],n.appendChild(i)}t.append(n)}jQuery(this.container).html("").append(t)}};
|
assets/js/select2/select2.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #fff 50%, #eee 100%);background-image:-o-linear-gradient(top, #fff 50%, #eee 100%);background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eee 50%, #ccc 100%);background-image:-o-linear-gradient(top, #eee 50%, #ccc 100%);background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #fff 0%, #eee 50%);background-image:-o-linear-gradient(top, #fff 0%, #eee 50%);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eee 50%, #fff 100%);background-image:-o-linear-gradient(top, #eee 50%, #fff 100%);background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}
|
1 |
+
.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #fff 50%, #eee 100%);background-image:-o-linear-gradient(top, #fff 50%, #eee 100%);background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eee 50%, #ccc 100%);background-image:-o-linear-gradient(top, #eee 50%, #ccc 100%);background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #fff 0%, #eee 50%);background-image:-o-linear-gradient(top, #fff 0%, #eee 50%);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eee 50%, #fff 100%);background-image:-o-linear-gradient(top, #eee 50%, #fff 100%);background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}
|
assets/js/settings.js
CHANGED
@@ -1,63 +1,63 @@
|
|
1 |
-
jQuery( function ( $ ) {
|
2 |
-
|
3 |
-
$( '#setting-dlm_default_template' ).change( function () {
|
4 |
-
if ( $( this ).val() === 'custom' ) {
|
5 |
-
$( '#setting-dlm_custom_template' ).closest( 'tr' ).show();
|
6 |
-
} else {
|
7 |
-
$( '#setting-dlm_custom_template' ).closest( 'tr' ).hide();
|
8 |
-
}
|
9 |
-
} ).change();
|
10 |
-
|
11 |
-
$( '#setting-dlm_enable_logging' ).change( function () {
|
12 |
-
if ( $( this ).is( ":checked" ) === true ) {
|
13 |
-
$( '#setting-dlm_count_unique_ips' ).closest( 'tr' ).show();
|
14 |
-
} else {
|
15 |
-
$( '#setting-dlm_count_unique_ips' ).closest( 'tr' ).hide();
|
16 |
-
}
|
17 |
-
} ).change();
|
18 |
-
|
19 |
-
$( document ).ready( function () {
|
20 |
-
|
21 |
-
// load lazy-select elements
|
22 |
-
$.each( $( '.dlm-lazy-select' ), function () {
|
23 |
-
|
24 |
-
var lazy_select_el = $( this );
|
25 |
-
|
26 |
-
// add AJAX loader
|
27 |
-
$( '<span>' ).addClass( 'dlm-lazy-select-loader' ).append(
|
28 |
-
$( '<img>' ).attr( 'src', dlm_settings_vars.img_path + 'ajax-loader.gif' )
|
29 |
-
).insertAfter( lazy_select_el );
|
30 |
-
|
31 |
-
// load data
|
32 |
-
$.post( ajaxurl, {
|
33 |
-
action: 'dlm_settings_lazy_select',
|
34 |
-
nonce: dlm_settings_vars.lazy_select_nonce,
|
35 |
-
option: lazy_select_el.attr( 'name' )
|
36 |
-
}, function ( response ) {
|
37 |
-
|
38 |
-
// remove current option(s)
|
39 |
-
lazy_select_el.find( 'option' ).remove();
|
40 |
-
|
41 |
-
// set new options
|
42 |
-
if ( response ) {
|
43 |
-
var selected = lazy_select_el.data( 'selected' );
|
44 |
-
for ( var i = 0; i < response.length; i ++ ) {
|
45 |
-
var opt = $( '<option>' ).attr( 'value', response[i].key ).html( response[i].lbl );
|
46 |
-
if ( selected === response[i].key ) {
|
47 |
-
opt.attr( 'selected', 'selected' );
|
48 |
-
}
|
49 |
-
lazy_select_el.append( opt );
|
50 |
-
}
|
51 |
-
}
|
52 |
-
|
53 |
-
// remove ajax loader
|
54 |
-
lazy_select_el.parent().find( '.dlm-lazy-select-loader' ).remove();
|
55 |
-
|
56 |
-
} );
|
57 |
-
|
58 |
-
|
59 |
-
} );
|
60 |
-
|
61 |
-
} );
|
62 |
-
|
63 |
} );
|
1 |
+
jQuery( function ( $ ) {
|
2 |
+
|
3 |
+
$( '#setting-dlm_default_template' ).change( function () {
|
4 |
+
if ( $( this ).val() === 'custom' ) {
|
5 |
+
$( '#setting-dlm_custom_template' ).closest( 'tr' ).show();
|
6 |
+
} else {
|
7 |
+
$( '#setting-dlm_custom_template' ).closest( 'tr' ).hide();
|
8 |
+
}
|
9 |
+
} ).change();
|
10 |
+
|
11 |
+
$( '#setting-dlm_enable_logging' ).change( function () {
|
12 |
+
if ( $( this ).is( ":checked" ) === true ) {
|
13 |
+
$( '#setting-dlm_count_unique_ips' ).closest( 'tr' ).show();
|
14 |
+
} else {
|
15 |
+
$( '#setting-dlm_count_unique_ips' ).closest( 'tr' ).hide();
|
16 |
+
}
|
17 |
+
} ).change();
|
18 |
+
|
19 |
+
$( document ).ready( function () {
|
20 |
+
|
21 |
+
// load lazy-select elements
|
22 |
+
$.each( $( '.dlm-lazy-select' ), function () {
|
23 |
+
|
24 |
+
var lazy_select_el = $( this );
|
25 |
+
|
26 |
+
// add AJAX loader
|
27 |
+
$( '<span>' ).addClass( 'dlm-lazy-select-loader' ).append(
|
28 |
+
$( '<img>' ).attr( 'src', dlm_settings_vars.img_path + 'ajax-loader.gif' )
|
29 |
+
).insertAfter( lazy_select_el );
|
30 |
+
|
31 |
+
// load data
|
32 |
+
$.post( ajaxurl, {
|
33 |
+
action: 'dlm_settings_lazy_select',
|
34 |
+
nonce: dlm_settings_vars.lazy_select_nonce,
|
35 |
+
option: lazy_select_el.attr( 'name' )
|
36 |
+
}, function ( response ) {
|
37 |
+
|
38 |
+
// remove current option(s)
|
39 |
+
lazy_select_el.find( 'option' ).remove();
|
40 |
+
|
41 |
+
// set new options
|
42 |
+
if ( response ) {
|
43 |
+
var selected = lazy_select_el.data( 'selected' );
|
44 |
+
for ( var i = 0; i < response.length; i ++ ) {
|
45 |
+
var opt = $( '<option>' ).attr( 'value', response[i].key ).html( response[i].lbl );
|
46 |
+
if ( selected === response[i].key ) {
|
47 |
+
opt.attr( 'selected', 'selected' );
|
48 |
+
}
|
49 |
+
lazy_select_el.append( opt );
|
50 |
+
}
|
51 |
+
}
|
52 |
+
|
53 |
+
// remove ajax loader
|
54 |
+
lazy_select_el.parent().find( '.dlm-lazy-select-loader' ).remove();
|
55 |
+
|
56 |
+
} );
|
57 |
+
|
58 |
+
|
59 |
+
} );
|
60 |
+
|
61 |
+
} );
|
62 |
+
|
63 |
} );
|
assets/js/shop/admin-order-details.js
CHANGED
@@ -1,46 +1,46 @@
|
|
1 |
-
jQuery( function ( $ ) {
|
2 |
-
|
3 |
-
function handleChangeOrderAction() {
|
4 |
-
var button = $("#dlm-order-details-button-change-state");
|
5 |
-
var ogLbl = button.html();
|
6 |
-
var isWorking = false;
|
7 |
-
var successBlock = null;
|
8 |
-
|
9 |
-
button.click(function(){
|
10 |
-
if(isWorking) {
|
11 |
-
return;
|
12 |
-
}
|
13 |
-
isWorking = true;
|
14 |
-
button.html('...');
|
15 |
-
|
16 |
-
var new_status = $("#dlm-order-details-current-state").val();
|
17 |
-
|
18 |
-
$.post( dlm_strings.ajax_url_change_order_status, {
|
19 |
-
status: new_status,
|
20 |
-
order_id: dlm_strings.order_id
|
21 |
-
}, function ( response ) {
|
22 |
-
if ( response.success === true ) {
|
23 |
-
button.html(ogLbl);
|
24 |
-
isWorking = false;
|
25 |
-
if(successBlock === null) {
|
26 |
-
successBlock = $("<span>").addClass("dlm-order-details-update-successful").html("✓");
|
27 |
-
button.parent().append(successBlock);
|
28 |
-
setTimeout(
|
29 |
-
function() {
|
30 |
-
successBlock.fadeOut(300, function(){
|
31 |
-
successBlock.remove();
|
32 |
-
successBlock = null;
|
33 |
-
});
|
34 |
-
}, 300
|
35 |
-
);
|
36 |
-
}
|
37 |
-
|
38 |
-
}
|
39 |
-
} );
|
40 |
-
|
41 |
-
});
|
42 |
-
}
|
43 |
-
|
44 |
-
handleChangeOrderAction();
|
45 |
-
|
46 |
} );
|
1 |
+
jQuery( function ( $ ) {
|
2 |
+
|
3 |
+
function handleChangeOrderAction() {
|
4 |
+
var button = $("#dlm-order-details-button-change-state");
|
5 |
+
var ogLbl = button.html();
|
6 |
+
var isWorking = false;
|
7 |
+
var successBlock = null;
|
8 |
+
|
9 |
+
button.click(function(){
|
10 |
+
if(isWorking) {
|
11 |
+
return;
|
12 |
+
}
|
13 |
+
isWorking = true;
|
14 |
+
button.html('...');
|
15 |
+
|
16 |
+
var new_status = $("#dlm-order-details-current-state").val();
|
17 |
+
|
18 |
+
$.post( dlm_strings.ajax_url_change_order_status, {
|
19 |
+
status: new_status,
|
20 |
+
order_id: dlm_strings.order_id
|
21 |
+
}, function ( response ) {
|
22 |
+
if ( response.success === true ) {
|
23 |
+
button.html(ogLbl);
|
24 |
+
isWorking = false;
|
25 |
+
if(successBlock === null) {
|
26 |
+
successBlock = $("<span>").addClass("dlm-order-details-update-successful").html("✓");
|
27 |
+
button.parent().append(successBlock);
|
28 |
+
setTimeout(
|
29 |
+
function() {
|
30 |
+
successBlock.fadeOut(300, function(){
|
31 |
+
successBlock.remove();
|
32 |
+
successBlock = null;
|
33 |
+
});
|
34 |
+
}, 300
|
35 |
+
);
|
36 |
+
}
|
37 |
+
|
38 |
+
}
|
39 |
+
} );
|
40 |
+
|
41 |
+
});
|
42 |
+
}
|
43 |
+
|
44 |
+
handleChangeOrderAction();
|
45 |
+
|
46 |
} );
|
assets/js/shop/checkout.js
CHANGED
@@ -1,127 +1,127 @@
|
|
1 |
-
jQuery( function ( $ ) {
|
2 |
-
|
3 |
-
$( '#dlm-form-checkout' ).submit( function ( e ) {
|
4 |
-
|
5 |
-
var form = $( this );
|
6 |
-
|
7 |
-
dlmShopResetErrorFields( form );
|
8 |
-
dlmShopRemoveErrors( form );
|
9 |
-
|
10 |
-
dlmShopShowLoading( form );
|
11 |
-
|
12 |
-
var customer = {
|
13 |
-
first_name: form.find( '#dlm_first_name' ).val(),
|
14 |
-
last_name: form.find( '#dlm_last_name' ).val(),
|
15 |
-
company: form.find( '#dlm_company' ).val(),
|
16 |
-
email: form.find( '#dlm_email' ).val(),
|
17 |
-
address_1: form.find( '#dlm_address_1' ).val(),
|
18 |
-
postcode: form.find( '#dlm_postcode' ).val(),
|
19 |
-
city: form.find( '#dlm_city' ).val(),
|
20 |
-
country: form.find( '#dlm_country' ).val(),
|
21 |
-
};
|
22 |
-
|
23 |
-
var data = {
|
24 |
-
payment_gateway: $( 'input[name=dlm_gateway]:checked', $( this ) ).val(),
|
25 |
-
customer: customer
|
26 |
-
};
|
27 |
-
|
28 |
-
if ( typeof form.data( 'order_id' ) !== "undefined" ) {
|
29 |
-
data.order_id = form.data( 'order_id' );
|
30 |
-
}
|
31 |
-
|
32 |
-
if ( typeof form.data( 'order_hash' ) !== "undefined" ) {
|
33 |
-
data.order_hash = form.data( 'order_hash' );
|
34 |
-
}
|
35 |
-
|
36 |
-
// check if required data is set
|
37 |
-
var errorFields = [];
|
38 |
-
var success = true;
|
39 |
-
for ( var i = 0; i < dlm_strings.required_fields.length; i ++ ) {
|
40 |
-
|
41 |
-
if ( customer[dlm_strings.required_fields[i]] === "" ) {
|
42 |
-
success = false;
|
43 |
-
errorFields.
|
44 |
-
}
|
45 |
-
}
|
46 |
-
|
47 |
-
if ( success === false ) {
|
48 |
-
dlmShopMarkErrorFields( form, errorFields );
|
49 |
-
|
50 |
-
dlmShopDisplayError( form, dlm_strings.error_message_required_fields );
|
51 |
-
|
52 |
-
dlmShopHideLoading( form );
|
53 |
-
return false;
|
54 |
-
}
|
55 |
-
|
56 |
-
$.post( dlm_strings.ajax_url_place_order, data, function ( response ) {
|
57 |
-
if ( response.success === true && typeof response.redirect !== 'undefined' ) {
|
58 |
-
window.location.replace( response.redirect );
|
59 |
-
return false;
|
60 |
-
} else if ( response.success === false && response.error !== '' ) {
|
61 |
-
dlmShopDisplayError( form, response.error );
|
62 |
-
}
|
63 |
-
dlmShopHideLoading( form );
|
64 |
-
} );
|
65 |
-
|
66 |
-
return false;
|
67 |
-
} );
|
68 |
-
|
69 |
-
function dlmShopMarkErrorFields( form, fields ) {
|
70 |
-
for ( var i = 0; i < fields.length; i ++ ) {
|
71 |
-
$( form ).find( '#dlm_' + fields[i] ).addClass( 'dlm-checkout-field-error' );
|
72 |
-
}
|
73 |
-
}
|
74 |
-
|
75 |
-
function dlmShopResetErrorFields( form ) {
|
76 |
-
$( form ).find( '.dlm-checkout-field-error' ).removeClass( 'dlm-checkout-field-error' );
|
77 |
-
}
|
78 |
-
|
79 |
-
function dlmShopDisplayError( form, errorMessage ) {
|
80 |
-
var errorContainer = $( '<div>' ).addClass( "dlm-checkout-error" );
|
81 |
-
errorContainer.append( $( '<img>' ).attr( 'src', dlm_strings.icon_error ).attr( 'alt', 'Checkout error' ).addClass( 'dlm-checkout-error-icon' ) );
|
82 |
-
errorContainer.append( $( '<p>' ).html( errorMessage ) );
|
83 |
-
form.prepend( errorContainer );
|
84 |
-
}
|
85 |
-
|
86 |
-
function dlmShopRemoveErrors( form ) {
|
87 |
-
form.find( '.dlm-checkout-error' ).remove();
|
88 |
-
}
|
89 |
-
|
90 |
-
function dlmShopShowLoading( form ) {
|
91 |
-
$( form ).find( '#dlm_checkout_submit' ).attr( 'disabled', true );
|
92 |
-
|
93 |
-
var overlayBg = $( '<div>' ).addClass( 'dlm-checkout-overlay-bg' );
|
94 |
-
|
95 |
-
var overlay = $( '<div>' ).addClass( 'dlm-checkout-overlay' );
|
96 |
-
overlay.append( $( '<h2>' ).html( dlm_strings.overlay_title ) );
|
97 |
-
overlay.append( $( '<span>' ).html( dlm_strings.overlay_body ) );
|
98 |
-
overlay.append( $( '<img>' ).attr( 'src', dlm_strings.overlay_img_src ) );
|
99 |
-
|
100 |
-
$( 'body' ).append( overlayBg );
|
101 |
-
$( 'body' ).append( overlay );
|
102 |
-
|
103 |
-
overlayBg.fadeIn( 300, function () {
|
104 |
-
overlay.css( 'display', 'block' ).css( 'top', '47%' );
|
105 |
-
overlay.animate( {
|
106 |
-
"top": "+=3%"
|
107 |
-
}, 300 );
|
108 |
-
} );
|
109 |
-
}
|
110 |
-
|
111 |
-
function dlmShopHideLoading( form ) {
|
112 |
-
|
113 |
-
var overlay = $( '.dlm-checkout-overlay:first' );
|
114 |
-
var overlayBg = $( '.dlm-checkout-overlay-bg:first' );
|
115 |
-
|
116 |
-
overlay.fadeOut( 300, function () {
|
117 |
-
overlay.remove();
|
118 |
-
} );
|
119 |
-
|
120 |
-
overlayBg.fadeOut( 300, function () {
|
121 |
-
overlayBg.remove();
|
122 |
-
$( form ).find( '#dlm_checkout_submit' ).attr( 'disabled', false );
|
123 |
-
} );
|
124 |
-
}
|
125 |
-
} );
|
126 |
-
|
127 |
-
|
1 |
+
jQuery( function ( $ ) {
|
2 |
+
|
3 |
+
$( '#dlm-form-checkout' ).submit( function ( e ) {
|
4 |
+
|
5 |
+
var form = $( this );
|
6 |
+
|
7 |
+
dlmShopResetErrorFields( form );
|
8 |
+
dlmShopRemoveErrors( form );
|
9 |
+
|
10 |
+
dlmShopShowLoading( form );
|
11 |
+
|
12 |
+
var customer = {
|
13 |
+
first_name: form.find( '#dlm_first_name' ).val(),
|
14 |
+
last_name: form.find( '#dlm_last_name' ).val(),
|
15 |
+
company: form.find( '#dlm_company' ).val(),
|
16 |
+
email: form.find( '#dlm_email' ).val(),
|
17 |
+
address_1: form.find( '#dlm_address_1' ).val(),
|
18 |
+
postcode: form.find( '#dlm_postcode' ).val(),
|
19 |
+
city: form.find( '#dlm_city' ).val(),
|
20 |
+
country: form.find( '#dlm_country' ).val(),
|
21 |
+
};
|
22 |
+
|
23 |
+
var data = {
|
24 |
+
payment_gateway: $( 'input[name=dlm_gateway]:checked', $( this ) ).val(),
|
25 |
+
customer: customer
|
26 |
+
};
|
27 |
+
|
28 |
+
if ( typeof form.data( 'order_id' ) !== "undefined" ) {
|
29 |
+
data.order_id = form.data( 'order_id' );
|
30 |
+
}
|
31 |
+
|
32 |
+
if ( typeof form.data( 'order_hash' ) !== "undefined" ) {
|
33 |
+
data.order_hash = form.data( 'order_hash' );
|
34 |
+
}
|
35 |
+
|
36 |
+
// check if required data is set
|
37 |
+
var errorFields = [];
|
38 |
+
var success = true;
|
39 |
+
for ( var i = 0; i < dlm_strings.required_fields.length; i ++ ) {
|
40 |
+
|
41 |
+
if ( customer[dlm_strings.required_fields[i]] === "" ) {
|
42 |
+
success = false;
|
43 |
+
errorFields.p
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|